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EAAS,EAAQ,GAC3B,OAAO,IAAI,EAAmB,EAAQ,OAAQ,EAAQ,EAC1D,EAwCA,EAAQ,iBAAmB,EAC3B,EAAQ,IA9CR,SAAa,EAAS,EAAQ,GAC1B,OAAO,IAAI,EAAkB,EAAQ,OAAQ,EAAQ,EACzD,EA6CA,EAAQ,kBAAoB,EAC5B,EAAQ,mBAAqB,EAC7B,EAAQ,iBAAmB,EAC3B,EAAQ,KA5CR,SAAc,GACV,OAAO,IAAmB,WAAW,EAAQ,OACjD,EA4CA,OAAO,eAAe,EAAS,aAAc,CAAE,OAAO,GAEzD","file":"/npm/jasmine-marbles@0.9.2/bundles/jasmine-marbles.umd.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.37.0.\n * Original file: /npm/jasmine-marbles@0.9.2/bundles/jasmine-marbles.umd.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","(function (global, factory) {\n    typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('rxjs/testing'), require('lodash'), require('rxjs')) :\n    typeof define === 'function' && define.amd ? define(['exports', 'rxjs/testing', 'lodash', 'rxjs'], factory) :\n    (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['jasmine-marbles'] = {}, global.Rx, global._, global.Rx));\n}(this, (function (exports, testing, lodash, rxjs) { 'use strict';\n\n    /* istanbul ignore file */\n    /**\n     * @see https://github.com/ReactiveX/rxjs/blob/master/spec/helpers/observableMatcher.ts\n     */\n    function stringify(x) {\n        return JSON.stringify(x, function (_key, value) {\n            if (Array.isArray(value)) {\n                return ('[' +\n                    value.map(function (i) {\n                        return '\\n\\t' + stringify(i);\n                    }) +\n                    '\\n]');\n            }\n            return value;\n        })\n            .replace(/\\\\\"/g, '\"')\n            .replace(/\\\\t/g, '\\t')\n            .replace(/\\\\n/g, '\\n');\n    }\n    /**\n     * @see https://github.com/ReactiveX/rxjs/blob/master/spec/helpers/observableMatcher.ts\n     */\n    function deleteErrorNotificationStack(marble) {\n        const { notification } = marble;\n        if (notification) {\n            const { kind, error } = notification;\n            if (kind === 'E' && error instanceof Error) {\n                notification.error = { name: error.name, message: error.message };\n            }\n        }\n        return marble;\n    }\n    /**\n     * @see https://github.com/ReactiveX/rxjs/blob/master/spec/helpers/observableMatcher.ts\n     */\n    function observableMatcher(actual, expected) {\n        if (Array.isArray(actual) && Array.isArray(expected)) {\n            actual = actual.map(deleteErrorNotificationStack);\n            expected = expected.map(deleteErrorNotificationStack);\n            const passed = lodash.isEqual(actual, expected);\n            if (passed) {\n                expect(passed).toBe(true);\n                return;\n            }\n            let message = '\\nExpected \\n';\n            actual.forEach((x) => (message += `\\t${stringify(x)}\\n`));\n            message += '\\t\\nto deep equal \\n';\n            expected.forEach((x) => (message += `\\t${stringify(x)}\\n`));\n            fail(message);\n        }\n        else {\n            expect(actual).toEqual(expected);\n        }\n    }\n\n    let scheduler;\n    function initTestScheduler() {\n        scheduler = new testing.TestScheduler(observableMatcher);\n        scheduler['runMode'] = true;\n    }\n    function getTestScheduler() {\n        if (scheduler) {\n            return scheduler;\n        }\n        throw new Error('No test scheduler initialized');\n    }\n    function resetTestScheduler() {\n        scheduler = null;\n    }\n\n    class TestColdObservable extends rxjs.Observable {\n        constructor(marbles, values, error) {\n            super();\n            this.marbles = marbles;\n            this.values = values;\n            this.error = error;\n            const scheduler = getTestScheduler();\n            const cold = scheduler.createColdObservable(marbles, values, error);\n            this.source = cold;\n        }\n        getSubscriptions() {\n            return this.source['subscriptions'];\n        }\n    }\n    class TestHotObservable extends rxjs.Observable {\n        constructor(marbles, values, error) {\n            super();\n            this.marbles = marbles;\n            this.values = values;\n            this.error = error;\n            const scheduler = getTestScheduler();\n            const hot = scheduler.createHotObservable(marbles, values, error);\n            this.source = hot;\n        }\n        getSubscriptions() {\n            return this.source['subscriptions'];\n        }\n    }\n\n    function mapSymbolsToNotifications(marbles, messagesArg) {\n        const messages = messagesArg.slice();\n        const result = {};\n        for (let i = 0; i < marbles.length; i++) {\n            const symbol = marbles[i];\n            switch (symbol) {\n                case ' ':\n                case '-':\n                case '^':\n                case '(':\n                case ')':\n                    break;\n                case '#':\n                case '|': {\n                    messages.shift();\n                    break;\n                }\n                default: {\n                    if ((symbol.match(/^[0-9]$/) && i === 0) || marbles[i - 1] === ' ') {\n                        const buffer = marbles.slice(i);\n                        const match = buffer.match(/^([0-9]+(?:\\.[0-9]+)?)(ms|s|m) /);\n                        if (match) {\n                            i += match[0].length - 1;\n                        }\n                        break;\n                    }\n                    const message = messages.shift();\n                    result[symbol] = message.notification;\n                }\n            }\n        }\n        return result;\n    }\n\n    function unparseMarble(result, assignSymbolFn) {\n        const FRAME_TIME_FACTOR = 10; // need to be up to date with `TestScheduler.frameTimeFactor`\n        let frames = 0;\n        let marble = '';\n        let isInGroup = false;\n        let groupMembersAmount = 0;\n        let index = 0;\n        const isNextMessageInTheSameFrame = () => {\n            const nextMessage = result[index + 1];\n            return nextMessage && nextMessage.frame === result[index].frame;\n        };\n        result.forEach((testMessage, i) => {\n            index = i;\n            const framesDiff = testMessage.frame - frames;\n            const emptyFramesAmount = framesDiff > 0 ? framesDiff / FRAME_TIME_FACTOR : 0;\n            marble += '-'.repeat(emptyFramesAmount);\n            if (isNextMessageInTheSameFrame()) {\n                if (!isInGroup) {\n                    marble += '(';\n                }\n                isInGroup = true;\n            }\n            switch (testMessage.notification.kind) {\n                case 'N':\n                    marble += assignSymbolFn(testMessage.notification);\n                    break;\n                case 'E':\n                    marble += '#';\n                    break;\n                case 'C':\n                    marble += '|';\n                    break;\n            }\n            if (isInGroup) {\n                groupMembersAmount += 1;\n            }\n            if (!isNextMessageInTheSameFrame() && isInGroup) {\n                marble += ')';\n                isInGroup = false;\n                frames += (groupMembersAmount + 1) * FRAME_TIME_FACTOR;\n                groupMembersAmount = 0;\n            }\n            else {\n                frames = testMessage.frame + FRAME_TIME_FACTOR;\n            }\n        });\n        return marble;\n    }\n\n    /*\n     * Based on source code found in rxjs library\n     * https://github.com/ReactiveX/rxjs/blob/master/src/testing/TestScheduler.ts\n     *\n     */\n    function materializeInnerObservable(observable, outerFrame) {\n        const messages = [];\n        const scheduler = getTestScheduler();\n        observable.subscribe({\n            next: (value) => {\n                messages.push({\n                    frame: scheduler.frame - outerFrame,\n                    notification: {\n                        kind: 'N',\n                        value,\n                        error: undefined,\n                    },\n                });\n            },\n            error: (error) => {\n                messages.push({\n                    frame: scheduler.frame - outerFrame,\n                    notification: {\n                        kind: 'E',\n                        value: undefined,\n                        error,\n                    },\n                });\n            },\n            complete: () => {\n                messages.push({\n                    frame: scheduler.frame - outerFrame,\n                    notification: {\n                        kind: 'C',\n                        value: undefined,\n                        error: undefined,\n                    },\n                });\n            },\n        });\n        return messages;\n    }\n    function toHaveSubscriptionsComparer(actual, marbles) {\n        const marblesArray = typeof marbles === 'string' ? [marbles] : marbles;\n        const results = marblesArray.map((marbles) => testing.TestScheduler.parseMarblesAsSubscriptions(marbles));\n        expect(results).toEqual(actual.getSubscriptions());\n        return { pass: true, message: () => '' };\n    }\n    function toBeObservableComparer(actual, fixture) {\n        const results = [];\n        const scheduler = getTestScheduler();\n        scheduler.schedule(() => {\n            actual.subscribe({\n                next: (x) => {\n                    let value = x;\n                    // Support Observable-of-Observables\n                    if (x instanceof rxjs.Observable) {\n                        value = materializeInnerObservable(value, scheduler.frame);\n                    }\n                    results.push({\n                        frame: scheduler.frame,\n                        notification: {\n                            kind: 'N',\n                            value,\n                            error: undefined,\n                        },\n                    });\n                },\n                error: (error) => {\n                    results.push({\n                        frame: scheduler.frame,\n                        notification: {\n                            kind: 'E',\n                            value: undefined,\n                            error,\n                        },\n                    });\n                },\n                complete: () => {\n                    results.push({\n                        frame: scheduler.frame,\n                        notification: {\n                            kind: 'C',\n                            value: undefined,\n                            error: undefined,\n                        },\n                    });\n                },\n            });\n        });\n        scheduler.flush();\n        const expected = testing.TestScheduler.parseMarbles(fixture.marbles, fixture.values, fixture.error, true, true);\n        try {\n            expect(results).toEqual(expected);\n            return { pass: true, message: () => '' };\n        }\n        catch (e) {\n            const mapNotificationToSymbol = buildNotificationToSymbolMapper(fixture.marbles, expected, lodash.isEqual);\n            const receivedMarble = unparseMarble(results, mapNotificationToSymbol);\n            const message = formatMessage(fixture.marbles, expected, receivedMarble, results);\n            return { pass: false, message: () => message };\n        }\n    }\n    function buildNotificationToSymbolMapper(expectedMarbles, expectedMessages, equalityFn) {\n        const symbolsToNotificationsMap = mapSymbolsToNotifications(expectedMarbles, expectedMessages);\n        return (notification) => {\n            const mapped = Object.keys(symbolsToNotificationsMap).find((key) => equalityFn(symbolsToNotificationsMap[key], notification));\n            return mapped || '?';\n        };\n    }\n    function formatMessage(expectedMarbles, expectedMessages, receivedMarbles, receivedMessages) {\n        return `\n    Expected: ${expectedMarbles},\n    Received: ${receivedMarbles},\n    \n    Expected:\n    ${JSON.stringify(expectedMessages)}\n    \n    Received:\n    ${JSON.stringify(receivedMessages)},\n  `;\n    }\n\n    function hot(marbles, values, error) {\n        return new TestHotObservable(marbles.trim(), values, error);\n    }\n    function cold(marbles, values, error) {\n        return new TestColdObservable(marbles.trim(), values, error);\n    }\n    function time(marbles) {\n        return getTestScheduler().createTime(marbles.trim());\n    }\n    function addMatchers() {\n        /**\n         * expect.extend is an API exposed by jest-circus,\n         * the default runner as of Jest v27. If that method\n         * is not available, assume we're in a Jasmine test\n         * environment.\n         */\n        if (!expect.extend) {\n            jasmine.addMatchers({\n                toHaveSubscriptions: () => ({\n                    compare: toHaveSubscriptionsComparer,\n                }),\n                toBeObservable: (_utils) => ({\n                    compare: toBeObservableComparer,\n                }),\n            });\n        }\n        else {\n            expect.extend({\n                toHaveSubscriptions: toHaveSubscriptionsComparer,\n                toBeObservable: toBeObservableComparer,\n            });\n        }\n    }\n    function setupEnvironment() {\n        beforeAll(() => addMatchers());\n        beforeEach(() => initTestScheduler());\n        afterEach(() => {\n            getTestScheduler().flush();\n            resetTestScheduler();\n        });\n    }\n    setupEnvironment();\n\n    exports.addMatchers = addMatchers;\n    exports.cold = cold;\n    exports.getTestScheduler = getTestScheduler;\n    exports.hot = hot;\n    exports.initTestScheduler = initTestScheduler;\n    exports.resetTestScheduler = resetTestScheduler;\n    exports.setupEnvironment = setupEnvironment;\n    exports.time = time;\n\n    Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n"]}