Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/demo.cartinsight.co/vendor/livewire/livewire/src/Features/SupportEvents/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/demo.cartinsight.co/vendor/livewire/livewire/src/Features/SupportEvents/fake-echo.js
window.fakeEchoListeners = []

class FakeChannel {
    constructor(channel) {
        this.channel = channel

        this.type = 'public'
    }

    listen(eventName, callback) {
        window.fakeEchoListeners.push({
            channel: this.channel,
            event: eventName,
            type: this.type,
            callback,
        })

        return this
    }
}

class FakePrivateChannel extends FakeChannel {
    constructor(channel) {
        super(channel)

        this.type = 'private'
    }

    whisper(eventName, data) {
        return this
    }
}

class FakePresenceChannel extends FakeChannel {
    constructor(channel) {
        super(channel)

        this.type = 'presence'
    }

    here(callback) {
        return this
    }

    joining(callback) {
        return this
    }

    whisper(eventName, data) {
        return this
    }

    leaving(callback) {
        return this
    }
}

class FakeEcho {
    join(channel) {
        return new FakePresenceChannel(channel);
    }

    channel(channel) {
        return new FakeChannel(channel);
    }

    private(channel) {
        return new FakePrivateChannel(channel);
    }

    encryptedPrivate(channel) {
        return new FakePrivateChannel(channel);
    }

    socketId() {
        return 'fake-socked-id'
    }

    // For dusk to trigger listeners...

    fakeTrigger({ channel, event, type, payload = {} }) {
        window.fakeEchoListeners.filter(listener => {
            if (event !== listener.event) return false
            if (channel !== listener.channel) return false
            if (type !== undefined && type !== listener.type) return false

            return true
        }).forEach(({ callback }) => {
            callback(payload)
        })
    }
}

window.Echo = new FakeEcho

Spamworldpro Mini