text: import ScratchStorage from 'scratch-storage';
  
  import defaultProjectAssets from './default-project';
  
  const PROJECT_SERVER = 'https://projects.scratch.mit.edu';
  const ASSET_SERVER = 'https://cdn.assets.scratch.mit.edu';
  
  /**
   * Wrapper for ScratchStorage which adds default web sources.
   * @todo make this more configurable
   */
  class Storage extends ScratchStorage {
      constructor () {
          super();
          this.addWebSource(
              [this.AssetType.Project],
              projectAsset => {
                  const [projectId, revision] = projectAsset.assetId.split('.');
                  return revision ?
                      `${PROJECT_SERVER}/internalapi/project/${projectId}/get/${revision}` :
                      `${PROJECT_SERVER}/internalapi/project/${projectId}/get/`;
              }
          );
          this.addWebSource(
              [this.AssetType.ImageVector, this.AssetType.ImageBitmap, this.AssetType.Sound],
              asset => `${ASSET_SERVER}/internalapi/asset/${asset.assetId}.${asset.dataFormat}/get/`
          );
          this.addWebSource(
              [this.AssetType.Sound],
              asset => `static/extension-assets/scratch3_music/${asset.assetId}.${asset.dataFormat}`
          );
          defaultProjectAssets.forEach(asset => this.cache(
              this.AssetType[asset.assetType],
              this.DataFormat[asset.dataFormat],
              asset.data,
              asset.id
          ));
      }
  }
  
  const storage = new Storage();
  
  export default storage;
  