Rocky_Mountain_Vending/.pnpm-store/v10/files/de/963a44b1d18aae5bf51a464fa15ab5e1cc495ca00470038ac58787b2a890ea6c3050f451660ce7f318b1a763c803a328c8160be109d9925ed7cc86af441508
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

54 lines
No EOL
2 KiB
Text

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