Rocky_Mountain_Vending/.pnpm-store/v10/files/f3/a6023769789254d42a6e8f44cc9807278ce6317933610d200afb61a71c5cdeac4575cd505cffde2e1f50e436fe44d360267dec6113e8fbbb5d161844d826d2
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

40 lines
969 B
Text

import { createNotImplementedError } from "../../../_internal/utils.mjs";
const channels = {};
export const getChannels = () => channels;
export class Channel {
__unenv__ = true;
name;
get hasSubscribers() {
return this._subscribers.length > 0;
}
_subscribers;
constructor(name) {
this.name = name;
this._subscribers = [];
const channels = getChannels();
channels[name] = this;
}
subscribe(onMessage) {
this._subscribers.push(onMessage);
}
unsubscribe(onMessage) {
const index = this._subscribers.indexOf(onMessage);
if (index === -1) return false;
this._subscribers.splice(index, 1);
return true;
}
publish(message) {
for (const subscriber of this._subscribers) {
subscriber(message, this.name);
}
}
bindStore() {
throw createNotImplementedError("Channel.bindStore");
}
unbindStore() {
throw createNotImplementedError("Channel.unbindStore");
}
runStores() {
throw createNotImplementedError("Channel.runStores");
}
}