export default class TargetManager extends Common.Object{constructor(){super();this._targets=[];this._observers=[];this._modelListeners=new Platform.Multimap();this._modelObservers=new Platform.Multimap();this._isSuspended=false;} suspendAllTargets(reason){if(this._isSuspended){return Promise.resolve();} this._isSuspended=true;this.dispatchEventToListeners(Events.SuspendStateChanged);return Promise.all(this._targets.map(target=>target.suspend(reason)));} resumeAllTargets(){if(!this._isSuspended){return Promise.resolve();} this._isSuspended=false;this.dispatchEventToListeners(Events.SuspendStateChanged);return Promise.all(this._targets.map(target=>target.resume()));} allTargetsSuspended(){return this._isSuspended;} models(modelClass){const result=[];for(let i=0;i