text: "use strict";
  var __extends = (this && this.__extends) || (function () {
      var extendStatics = Object.setPrototypeOf ||
          ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
          function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
      return function (d, b) {
          extendStatics(d, b);
          function __() { this.constructor = d; }
          d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
      };
  })();
  Object.defineProperty(exports, "__esModule", { value: true });
  var GenericTagMapper_1 = require("../common/GenericTagMapper");
  /**
   * ASF Metadata tag mappings.
   * See http://msdn.microsoft.com/en-us/library/ms867702.aspx
   */
  var asfTagMap = {
      Title: 'title',
      Author: 'artist',
      'WM/AlbumArtist': 'albumartist',
      'WM/AlbumTitle': 'album',
      'WM/Year': 'date',
      'WM/OriginalReleaseTime': 'originaldate',
      'WM/OriginalReleaseYear': 'originalyear',
      Description: 'comment',
      'WM/TrackNumber': 'track',
      'WM/PartOfSet': 'disk',
      'WM/Genre': 'genre',
      'WM/Composer': 'composer',
      'WM/Lyrics': 'lyrics',
      'WM/AlbumSortOrder': 'albumsort',
      'WM/TitleSortOrder': 'titlesort',
      'WM/ArtistSortOrder': 'artistsort',
      'WM/AlbumArtistSortOrder': 'albumartistsort',
      'WM/ComposerSortOrder': 'composersort',
      'WM/Writer': 'lyricist',
      'WM/Conductor': 'conductor',
      'WM/ModifiedBy': 'remixer',
      'WM/Engineer': 'engineer',
      'WM/Producer': 'producer',
      'WM/DJMixer': 'djmixer',
      'WM/Mixer': 'mixer',
      'WM/Publisher': 'label',
      'WM/ContentGroupDescription': 'grouping',
      'WM/SubTitle': 'subtitle',
      'WM/SetSubTitle': 'discsubtitle',
      // 'WM/PartOfSet': 'totaldiscs',
      'WM/IsCompilation': 'compilation',
      'WM/SharedUserRating': 'rating',
      'WM/BeatsPerMinute': 'bpm',
      'WM/Mood': 'mood',
      'WM/Media': 'media',
      'WM/CatalogNo': 'catalognumber',
      'MusicBrainz/Album Status': 'releasestatus',
      'MusicBrainz/Album Type': 'releasetype',
      'MusicBrainz/Album Release Country': 'releasecountry',
      'WM/Script': 'script',
      'WM/Language': 'language',
      Copyright: 'copyright',
      LICENSE: 'license',
      'WM/EncodedBy': 'encodedby',
      'WM/EncodingSettings': 'encodersettings',
      'WM/Barcode': 'barcode',
      'WM/ISRC': 'isrc',
      'MusicBrainz/Track Id': 'musicbrainz_recordingid',
      'MusicBrainz/Release Track Id': 'musicbrainz_trackid',
      'MusicBrainz/Album Id': 'musicbrainz_albumid',
      'MusicBrainz/Artist Id': 'musicbrainz_artistid',
      'MusicBrainz/Album Artist Id': 'musicbrainz_albumartistid',
      'MusicBrainz/Release Group Id': 'musicbrainz_releasegroupid',
      'MusicBrainz/Work Id': 'musicbrainz_workid',
      'MusicBrainz/TRM Id': 'musicbrainz_trmid',
      'MusicBrainz/Disc Id': 'musicbrainz_discid',
      'Acoustid/Id': 'acoustid_id',
      'Acoustid/Fingerprint': 'acoustid_fingerprint',
      'MusicIP/PUID': 'musicip_puid',
      'WM/ARTISTS': 'artists',
      'WM/InitialKey': 'key',
      ASIN: 'asin',
      'WM/Work': 'work',
      'WM/AuthorURL': 'website',
      'WM/Picture': 'picture'
  };
  var AsfTagMapper = /** @class */ (function (_super) {
      __extends(AsfTagMapper, _super);
      function AsfTagMapper() {
          return _super.call(this, ['asf'], asfTagMap) || this;
      }
      AsfTagMapper.toRating = function (rating) {
          return {
              rating: parseFloat(rating + 1) / 5
          };
      };
      AsfTagMapper.prototype.postMap = function (tag) {
          switch (tag.id) {
              case 'WM/SharedUserRating':
                  var keys = tag.id.split(':');
                  tag.value = AsfTagMapper.toRating(tag.value);
                  tag.id = keys[0];
                  break;
          }
      };
      return AsfTagMapper;
  }(GenericTagMapper_1.CommonTagMapper));
  exports.AsfTagMapper = AsfTagMapper;
  