text: import { IS_PRODUCTION } from './environment.js';
  
  function getDevTools() {
    var w = window;
  
    if (!!w.__xstate__) {
      return w.__xstate__;
    }
  
    return undefined;
  }
  
  function registerService(service) {
    if (IS_PRODUCTION || typeof window === 'undefined') {
      return;
    }
  
    var devTools = getDevTools();
  
    if (devTools) {
      devTools.register(service);
    }
  }
  
  export { registerService };