1 line
No EOL
11 KiB
JSON
1 line
No EOL
11 KiB
JSON
{"ast":null,"code":"import { __extends } from \"tslib\";\nimport { AsyncAction } from './AsyncAction';\nimport { Subscription } from '../Subscription';\nimport { AsyncScheduler } from './AsyncScheduler';\nvar VirtualTimeScheduler = function (_super) {\n __extends(VirtualTimeScheduler, _super);\n function VirtualTimeScheduler(schedulerActionCtor, maxFrames) {\n if (schedulerActionCtor === void 0) {\n schedulerActionCtor = VirtualAction;\n }\n if (maxFrames === void 0) {\n maxFrames = Infinity;\n }\n var _this = _super.call(this, schedulerActionCtor, function () {\n return _this.frame;\n }) || this;\n _this.maxFrames = maxFrames;\n _this.frame = 0;\n _this.index = -1;\n return _this;\n }\n VirtualTimeScheduler.prototype.flush = function () {\n var _a = this,\n actions = _a.actions,\n maxFrames = _a.maxFrames;\n var error;\n var action;\n while ((action = actions[0]) && action.delay <= maxFrames) {\n actions.shift();\n this.frame = action.delay;\n if (error = action.execute(action.state, action.delay)) {\n break;\n }\n }\n if (error) {\n while (action = actions.shift()) {\n action.unsubscribe();\n }\n throw error;\n }\n };\n VirtualTimeScheduler.frameTimeFactor = 10;\n return VirtualTimeScheduler;\n}(AsyncScheduler);\nexport { VirtualTimeScheduler };\nvar VirtualAction = function (_super) {\n __extends(VirtualAction, _super);\n function VirtualAction(scheduler, work, index) {\n if (index === void 0) {\n index = scheduler.index += 1;\n }\n var _this = _super.call(this, scheduler, work) || this;\n _this.scheduler = scheduler;\n _this.work = work;\n _this.index = index;\n _this.active = true;\n _this.index = scheduler.index = index;\n return _this;\n }\n VirtualAction.prototype.schedule = function (state, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n if (Number.isFinite(delay)) {\n if (!this.id) {\n return _super.prototype.schedule.call(this, state, delay);\n }\n this.active = false;\n var action = new VirtualAction(this.scheduler, this.work);\n this.add(action);\n return action.schedule(state, delay);\n } else {\n return Subscription.EMPTY;\n }\n };\n VirtualAction.prototype.requestAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n this.delay = scheduler.frame + delay;\n var actions = scheduler.actions;\n actions.push(this);\n actions.sort(VirtualAction.sortActions);\n return 1;\n };\n VirtualAction.prototype.recycleAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n return undefined;\n };\n VirtualAction.prototype._execute = function (state, delay) {\n if (this.active === true) {\n return _super.prototype._execute.call(this, state, delay);\n }\n };\n VirtualAction.sortActions = function (a, b) {\n if (a.delay === b.delay) {\n if (a.index === b.index) {\n return 0;\n } else if (a.index > b.index) {\n return 1;\n } else {\n return -1;\n }\n } else if (a.delay > b.delay) {\n return 1;\n } else {\n return -1;\n }\n };\n return VirtualAction;\n}(AsyncAction);\nexport { VirtualAction };\n//# sourceMappingURL=VirtualTimeScheduler.js.map","map":{"version":3,"names":["__extends","AsyncAction","Subscription","AsyncScheduler","VirtualTimeScheduler","_super","schedulerActionCtor","maxFrames","VirtualAction","Infinity","_this","call","frame","index","prototype","flush","_a","actions","error","action","delay","shift","execute","state","unsubscribe","frameTimeFactor","scheduler","work","active","schedule","Number","isFinite","id","add","EMPTY","requestAsyncId","push","sort","sortActions","recycleAsyncId","undefined","_execute","a","b"],"sources":["/home/poule/encrypted/stockage-syncable/www/development/html/ng-implementation/implem/node_modules/rxjs/dist/esm5/internal/scheduler/VirtualTimeScheduler.js"],"sourcesContent":["import { __extends } from \"tslib\";\nimport { AsyncAction } from './AsyncAction';\nimport { Subscription } from '../Subscription';\nimport { AsyncScheduler } from './AsyncScheduler';\nvar VirtualTimeScheduler = (function (_super) {\n __extends(VirtualTimeScheduler, _super);\n function VirtualTimeScheduler(schedulerActionCtor, maxFrames) {\n if (schedulerActionCtor === void 0) { schedulerActionCtor = VirtualAction; }\n if (maxFrames === void 0) { maxFrames = Infinity; }\n var _this = _super.call(this, schedulerActionCtor, function () { return _this.frame; }) || this;\n _this.maxFrames = maxFrames;\n _this.frame = 0;\n _this.index = -1;\n return _this;\n }\n VirtualTimeScheduler.prototype.flush = function () {\n var _a = this, actions = _a.actions, maxFrames = _a.maxFrames;\n var error;\n var action;\n while ((action = actions[0]) && action.delay <= maxFrames) {\n actions.shift();\n this.frame = action.delay;\n if ((error = action.execute(action.state, action.delay))) {\n break;\n }\n }\n if (error) {\n while ((action = actions.shift())) {\n action.unsubscribe();\n }\n throw error;\n }\n };\n VirtualTimeScheduler.frameTimeFactor = 10;\n return VirtualTimeScheduler;\n}(AsyncScheduler));\nexport { VirtualTimeScheduler };\nvar VirtualAction = (function (_super) {\n __extends(VirtualAction, _super);\n function VirtualAction(scheduler, work, index) {\n if (index === void 0) { index = (scheduler.index += 1); }\n var _this = _super.call(this, scheduler, work) || this;\n _this.scheduler = scheduler;\n _this.work = work;\n _this.index = index;\n _this.active = true;\n _this.index = scheduler.index = index;\n return _this;\n }\n VirtualAction.prototype.schedule = function (state, delay) {\n if (delay === void 0) { delay = 0; }\n if (Number.isFinite(delay)) {\n if (!this.id) {\n return _super.prototype.schedule.call(this, state, delay);\n }\n this.active = false;\n var action = new VirtualAction(this.scheduler, this.work);\n this.add(action);\n return action.schedule(state, delay);\n }\n else {\n return Subscription.EMPTY;\n }\n };\n VirtualAction.prototype.requestAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) { delay = 0; }\n this.delay = scheduler.frame + delay;\n var actions = scheduler.actions;\n actions.push(this);\n actions.sort(VirtualAction.sortActions);\n return 1;\n };\n VirtualAction.prototype.recycleAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) { delay = 0; }\n return undefined;\n };\n VirtualAction.prototype._execute = function (state, delay) {\n if (this.active === true) {\n return _super.prototype._execute.call(this, state, delay);\n }\n };\n VirtualAction.sortActions = function (a, b) {\n if (a.delay === b.delay) {\n if (a.index === b.index) {\n return 0;\n }\n else if (a.index > b.index) {\n return 1;\n }\n else {\n return -1;\n }\n }\n else if (a.delay > b.delay) {\n return 1;\n }\n else {\n return -1;\n }\n };\n return VirtualAction;\n}(AsyncAction));\nexport { VirtualAction };\n//# sourceMappingUR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