ng-implementation/implem/.angular/cache/20.1.4/babel-webpack/00e50a97b218c65b36fd2725ad9a6c6c.json

1 line
9.9 KiB
JSON
Raw Normal View History

2025-08-19 10:58:54 +02:00
{"ast":null,"code":"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,\n kind = _a.kind,\n value = _a.value,\n 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) ? this.observe(nextOrObserver) : this.do(nextOrObserver, error, complete);\n };\n Notification.prototype.toObservable = function () {\n var _a = this,\n kind = _a.kind,\n value = _a.value,\n error = _a.error;\n var result = kind === 'N' ? of(value) : kind === 'E' ? throwError(function () {\n return error;\n }) : kind === 'C' ? EMPTY : 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,\n kind = _d.kind,\n value = _d.value,\n 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","map":{"version":3,"names":["EMPTY","of","throwError","isFunction","NotificationKind","Notification","kind","value","error","hasValue","prototype","observe","observer","observeNotification","do","nextHandler","errorHandler","completeHandler","_a","accept","nextOrObserver","complete","next","toObservable","result","TypeError","createNext","createError","err","undefined","createComplete","completeNotification","notification","_b","_c","_d","call"],"sources":["/home/poule/encrypted/stockage-syncable/www/development/html/ng-implementation/implem/node_modules/rxjs/dist/esm5/internal/Notification.js"],"sourcesContent":["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