{"version":3,"file":"mimeTypes.mjs","names":[],"sources":["../../../../src/components/FileIcon/mimeTypes.ts"],"sourcesContent":["export type GeneralType = 'audio/' | 'video/' | 'image/' | 'text/';\n\nexport type SupportedMimeType =\n  | (typeof wordMimeTypes)[number]\n  | (typeof excelMimeTypes)[number]\n  | (typeof powerpointMimeTypes)[number]\n  | (typeof archiveFileTypes)[number]\n  | (typeof codeFileTypes)[number];\n\nexport const wordMimeTypes = [\n  // Microsoft Word\n  // .doc .dot\n  'application/msword',\n  // .doc .dot\n  'application/msword-template',\n  // .docx\n  'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n  // .dotx\n  'application/vnd.openxmlformats-officedocument.wordprocessingml.template',\n  // .docm\n  'application/vnd.ms-word.document.macroEnabled.12',\n  // .dotm\n  'application/vnd.ms-word.template.macroEnabled.12',\n\n  // LibreOffice/OpenOffice Writer\n  // .odt\n  'application/vnd.oasis.opendocument.text',\n  // .ott\n  'application/vnd.oasis.opendocument.text-template',\n  // .fodt\n  'application/vnd.oasis.opendocument.text-flat-xml',\n  // No entry for .uot: Firefox does not know its MIME type.\n];\n\nexport const excelMimeTypes = [\n  // .csv\n  'text/csv',\n  // TODO: maybe more data files\n\n  // Microsoft Excel\n  // .xls .xlt .xla\n  'application/vnd.ms-excel',\n  // .xlsx\n  'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n  // .xltx\n  'application/vnd.openxmlformats-officedocument.spreadsheetml.template',\n  // .xlsm\n  'application/vnd.ms-excel.sheet.macroEnabled.12',\n  // .xltm\n  'application/vnd.ms-excel.template.macroEnabled.12',\n  // .xlam\n  'application/vnd.ms-excel.addin.macroEnabled.12',\n  // .xlsb\n  'application/vnd.ms-excel.sheet.binary.macroEnabled.12',\n\n  // LibreOffice/OpenOffice Calc\n  // .ods\n  'application/vnd.oasis.opendocument.spreadsheet',\n  // .ots\n  'application/vnd.oasis.opendocument.spreadsheet-template',\n  // .fods\n  'application/vnd.oasis.opendocument.spreadsheet-flat-xml',\n  // No entry for .uos: Firefox does not know its MIME type.\n];\n\nexport const powerpointMimeTypes = [\n  // Microsoft PowerPoint\n  // .ppt .pot .pps .ppa\n  'application/vnd.ms-powerpoint',\n  // .pptx\n  'application/vnd.openxmlformats-officedocument.presentationml.presentation',\n  // .potx\n  'application/vnd.openxmlformats-officedocument.presentationml.template',\n  // .ppsx\n  'application/vnd.openxmlformats-officedocument.presentationml.slideshow',\n  // .ppam\n  'application/vnd.ms-powerpoint.addin.macroEnabled.12',\n  // .pptm\n  'application/vnd.ms-powerpoint.presentation.macroEnabled.12',\n  // .potm\n  'application/vnd.ms-powerpoint.template.macroEnabled.12',\n  // .ppsm\n  'application/vnd.ms-powerpoint.slideshow.macroEnabled.12',\n\n  // LibreOffice/OpenOffice Impress\n  // .odp\n  'application/vnd.oasis.opendocument.presentation',\n  // .otp\n  'application/vnd.oasis.opendocument.presentation-template',\n  // .fodp\n  'application/vnd.oasis.opendocument.presentation-flat-xml',\n  // No entry for .uop: Firefox does not know its MIME type.\n];\n\nexport const archiveFileTypes = [\n  // .zip\n  'application/zip',\n  // .7z\n  'application/x-7z-compressed',\n  // .ar\n  'application/x-archive',\n  // .tar\n  'application/x-tar',\n  // .tar.gz\n  'application/gzip',\n  // .tar.Z\n  'application/x-compress',\n  // .tar.bz2\n  'application/x-bzip',\n  // .tar.lz\n  'application/x-lzip',\n  // .tar.lz4\n  'application/x-lz4',\n  // .tar.lzma\n  'application/x-lzma',\n  // .tar.lzo\n  'application/x-lzop',\n  // .tar.xz\n  'application/x-xz',\n  // .war\n  'application/x-webarchive',\n  // .rar\n  'application/vnd.rar',\n];\n\nexport const codeFileTypes = [\n  // .html .htm\n  'text/html',\n  // .css\n  'text/css',\n  // .js\n  'application/x-javascript',\n  'text/javascript',\n  // .json\n  'application/json',\n  // .py\n  'text/x-python',\n  // .go\n  'text/x-go',\n  // .c\n  'text/x-csrc',\n  // .cpp\n  'text/x-c++src',\n  // .rb\n  'application/x-ruby',\n  // .rs\n  'text/rust',\n  // .java\n  'text/x-java',\n  // .php\n  'application/x-php',\n  // .cs\n  'text/x-csharp',\n  // .scala\n  'text/x-scala',\n  // .erl\n  'text/x-erlang',\n  // .sh\n  'application/x-shellscript',\n];\n\nexport const mimeTypeToExtensionMap: Record<string, string> = {\n  // Grouped by top-level type, each group sorted alphabetically.\n  'application/epub+zip': 'epub',\n  'application/gzip': 'gz',\n  'application/java-archive': 'jar',\n  'application/json': 'json',\n  'application/ld+json': 'jsonld',\n  'application/msword': 'doc',\n  'application/msword-template': 'dot',\n  'application/octet-stream': 'bin',\n  'application/ogg': 'ogx',\n  'application/pdf': 'pdf',\n  'application/postscript': 'ps',\n  'application/rtf': 'rtf',\n  'application/vnd.amazon.ebook': 'azw',\n  'application/vnd.apple.installer+xml': 'mpkg',\n  'application/vnd.mozilla.xul+xml': 'xul',\n  'application/vnd.ms-excel': 'xls',\n  'application/vnd.ms-excel.addin.macroEnabled.12': 'xlam',\n  'application/vnd.ms-excel.sheet.binary.macroEnabled.12': 'xlsb',\n  'application/vnd.ms-excel.sheet.macroEnabled.12': 'xlsm',\n  'application/vnd.ms-excel.template.macroEnabled.12': 'xltm',\n  'application/vnd.ms-fontobject': 'eot',\n  'application/vnd.ms-powerpoint': 'ppt',\n  'application/vnd.ms-powerpoint.addin.macroEnabled.12': 'ppam',\n  'application/vnd.ms-powerpoint.presentation.macroEnabled.12': 'pptm',\n  'application/vnd.ms-powerpoint.slideshow.macroEnabled.12': 'ppsm',\n  'application/vnd.ms-powerpoint.template.macroEnabled.12': 'potm',\n  'application/vnd.ms-word.document.macroEnabled.12': 'docm',\n  'application/vnd.ms-word.template.macroEnabled.12': 'dotm',\n  'application/vnd.oasis.opendocument.presentation': 'odp',\n  'application/vnd.oasis.opendocument.presentation-flat-xml': 'fodp',\n  'application/vnd.oasis.opendocument.presentation-template': 'otp',\n  'application/vnd.oasis.opendocument.spreadsheet': 'ods',\n  'application/vnd.oasis.opendocument.spreadsheet-flat-xml': 'fods',\n  'application/vnd.oasis.opendocument.spreadsheet-template': 'ots',\n  'application/vnd.oasis.opendocument.text': 'odt',\n  'application/vnd.oasis.opendocument.text-flat-xml': 'fodt',\n  'application/vnd.oasis.opendocument.text-template': 'ott',\n  'application/vnd.openxmlformats-officedocument.presentationml.presentation': 'pptx',\n  'application/vnd.openxmlformats-officedocument.presentationml.slideshow': 'ppsx',\n  'application/vnd.openxmlformats-officedocument.presentationml.template': 'potx',\n  'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': 'xlsx',\n  'application/vnd.openxmlformats-officedocument.spreadsheetml.template': 'xltx',\n  'application/vnd.openxmlformats-officedocument.wordprocessingml.document': 'docx',\n  'application/vnd.openxmlformats-officedocument.wordprocessingml.template': 'dotx',\n  'application/vnd.rar': 'rar',\n  'application/vnd.visio': 'vsd',\n  'application/wasm': 'wasm',\n  'application/x-7z-compressed': '7z',\n  'application/x-abiword': 'abw',\n  'application/x-archive': 'ar',\n  'application/x-bzip': 'bz',\n  'application/x-bzip2': 'bz2',\n  'application/x-cdf': 'cda',\n  'application/x-compress': 'Z',\n  'application/x-csh': 'csh',\n  'application/x-dosexec': 'exe',\n  'application/x-freearc': 'arc',\n  'application/x-httpd-php': 'php',\n  'application/x-iso9660-image': 'iso',\n  'application/x-javascript': 'js',\n  'application/x-lz4': 'lz4',\n  'application/x-lzip': 'lz',\n  'application/x-lzma': 'lzma',\n  'application/x-lzop': 'lzo',\n  'application/x-mobipocket-ebook': 'mobi',\n  'application/x-msdownload': 'exe',\n  'application/x-perl': 'pl',\n  'application/x-php': 'php',\n  'application/x-rar-compressed': 'rar',\n  'application/x-ruby': 'rb',\n  'application/x-sh': 'sh',\n  'application/x-shellscript': 'sh',\n  'application/x-shockwave-flash': 'swf',\n  'application/x-sql': 'sql',\n  'application/x-stuffit': 'sit',\n  'application/x-tar': 'tar',\n  'application/x-webarchive': 'war',\n  'application/x-xz': 'xz',\n  'application/x-yaml': 'yaml',\n  'application/xhtml+xml': 'xhtml',\n  'application/xml': 'xml',\n  'application/zip': 'zip',\n\n  'audio/aac': 'aac',\n  'audio/flac': 'flac',\n  'audio/midi': 'midi',\n  'audio/mp4': 'm4a',\n  'audio/mpeg': 'mp3',\n  'audio/ogg': 'oga',\n  'audio/opus': 'opus',\n  'audio/wav': 'wav',\n  'audio/webm': 'weba',\n  'audio/x-aiff': 'aiff',\n  'audio/x-m4a': 'm4a',\n  'audio/x-midi': 'midi',\n  'audio/x-ms-wma': 'wma',\n  'audio/x-wav': 'wav',\n\n  'font/otf': 'otf',\n  'font/ttf': 'ttf',\n  'font/woff': 'woff',\n  'font/woff2': 'woff2',\n\n  'image/apng': 'apng',\n  'image/avif': 'avif',\n  'image/bmp': 'bmp',\n  'image/gif': 'gif',\n  'image/heic': 'heic',\n  'image/heif': 'heif',\n  'image/jpeg': 'jpg',\n  'image/png': 'png',\n  'image/svg+xml': 'svg',\n  'image/tiff': 'tiff',\n  'image/vnd.microsoft.icon': 'ico',\n  'image/webp': 'webp',\n  'image/x-icon': 'ico',\n\n  'text/calendar': 'ics',\n  'text/css': 'css',\n  'text/csv': 'csv',\n  'text/html': 'html',\n  'text/javascript': 'js',\n  'text/markdown': 'md',\n  'text/plain': 'txt',\n  'text/rtf': 'rtf',\n  'text/rust': 'rs',\n  'text/tab-separated-values': 'tsv',\n  'text/vcard': 'vcf',\n  'text/x-c': 'c',\n  'text/x-c++src': 'cpp',\n  'text/x-csharp': 'cs',\n  'text/x-csrc': 'c',\n  'text/x-diff': 'diff',\n  'text/x-erlang': 'erl',\n  'text/x-go': 'go',\n  'text/x-java': 'java',\n  'text/x-java-source': 'java',\n  'text/x-kotlin': 'kt',\n  'text/x-lua': 'lua',\n  'text/x-markdown': 'md',\n  'text/x-objectivec': 'm',\n  'text/x-pascal': 'pas',\n  'text/x-perl': 'pl',\n  'text/x-python': 'py',\n  'text/x-ruby': 'rb',\n  'text/x-rust': 'rs',\n  'text/x-scala': 'scala',\n  'text/x-sh': 'sh',\n  'text/x-shellscript': 'sh',\n  'text/x-sql': 'sql',\n  'text/x-swift': 'swift',\n  'text/x-typescript': 'ts',\n  'text/x-yaml': 'yaml',\n  'text/xml': 'xml',\n  'text/yaml': 'yaml',\n\n  'video/3gpp': '3gp',\n  'video/3gpp2': '3g2',\n  'video/mp2t': 'ts',\n  'video/mp4': 'mp4',\n  'video/mpeg': 'mpeg',\n  'video/ogg': 'ogv',\n  'video/quicktime': 'mov',\n  'video/webm': 'webm',\n  'video/x-flv': 'flv',\n  'video/x-m4v': 'm4v',\n  'video/x-matroska': 'mkv',\n  'video/x-ms-wmv': 'wmv',\n  'video/x-msvideo': 'avi',\n};\n"],"mappings":";AASA,IAAa,gBAAgB;CAG3B;CAEA;CAEA;CAEA;CAEA;CAEA;CAIA;CAEA;CAEA;AAEF;AAEA,IAAa,iBAAiB;CAE5B;CAKA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAIA;CAEA;CAEA;AAEF;AAEA,IAAa,sBAAsB;CAGjC;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAIA;CAEA;CAEA;AAEF;AAEA,IAAa,mBAAmB;CAE9B;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;AACF;AAEA,IAAa,gBAAgB;CAE3B;CAEA;CAEA;CACA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;CAEA;AACF;AAEA,IAAa,yBAAiD;CAE5D,wBAAwB;CACxB,oBAAoB;CACpB,4BAA4B;CAC5B,oBAAoB;CACpB,uBAAuB;CACvB,sBAAsB;CACtB,+BAA+B;CAC/B,4BAA4B;CAC5B,mBAAmB;CACnB,mBAAmB;CACnB,0BAA0B;CAC1B,mBAAmB;CACnB,gCAAgC;CAChC,uCAAuC;CACvC,mCAAmC;CACnC,4BAA4B;CAC5B,kDAAkD;CAClD,yDAAyD;CACzD,kDAAkD;CAClD,qDAAqD;CACrD,iCAAiC;CACjC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