"""
The builtin mimetypes utility tries to be elegant by loading custom extension mimetype records from the OS, but
this can easily make things worse. Sometimes it even overrides very common extensions with plainly incorrect user
customizations by application association.
It will be better overall to use our opinionated mapping.
"""
import os
from mimetypes import MimeTypes, knownfiles


class _MimeTypes(MimeTypes):
    def add_type(self, type, ext, strict=True):
        """
        This will prevent OS-sources from overriding common and custom specified mimetypes.
        """
        if ext not in self.types_map[strict]:
            MimeTypes.add_type(self, type, ext, strict=strict)


def _create_opinionated_mimetypes() -> _MimeTypes:
    # This instance will hold only the builtin map, our additions and lastly any from the OS that has been missed.
    m = _MimeTypes()

    # These were compiled from a Windows and Linux machine.
    for ext, mime in {
        ".androidproj": "Application/xml",
        ".props": "Application/xml",
        ".vcproj": "Application/xml",
        ".vcxitems": "Application/xml",
        ".vcxproj": "Application/xml",
        ".vsprops": "Application/xml",
        ".a2l": "application/A2L",
        ".aml": "application/AML",
        ".atf": "application/ATF",
        ".atfx": "application/ATFX",
        ".atxml": "application/ATXML",
        ".cdfx": "application/CDFX+XML",
        ".cea": "application/CEA",
        ".dcd": "application/DCD",
        ".dii": "application/DII",
        ".dit": "application/DIT",
        ".lxf": "application/LXF",
        ".mf4": "application/MF4",
        ".odx": "application/ODX",
        ".pdx": "application/PDX",
        ".psc1": "application/PowerShell",
        ".ez": "application/andrew-inset",
        ".atom": "application/atom+xml",
        ".atomcat": "application/atomcat+xml",
        ".atomdeleted": "application/atomdeleted+xml",
        ".atomsvc": "application/atomsvc+xml",
        ".dwd": "application/atsc-dwd+xml",
        ".held": "application/atsc-held+xml",
        ".rsat": "application/atsc-rsat+xml",
        ".apxml": "application/auth-policy+xml",
        ".avastvpn": "application/avast-avastvpn",
        ".avastconfig": "application/avast-config",
        ".avastlic": "application/avast-license",
        ".avastsounds": "application/avast-sounds",
        ".avasttheme": "application/avast-theme",
        ".xdd": "application/bacnet-xdd+zip",
        ".xcs": "application/calendar+xml",
        ".cbor": "application/cbor",
        ".c3ex": "application/cccex",
        ".ccmp": "application/ccmp+xml",
        ".ccxml": "application/ccxml+xml",
        ".cdmia": "application/cdmi-capability",
        ".cdmic": "application/cdmi-container",
        ".cdmid": "application/cdmi-domain",
        ".cdmio": "application/cdmi-object",
        ".cdmiq": "application/cdmi-queue",
        ".cellml": "application/cellml+xml",
        ".cml": "application/cellml+xml",
        ".1clr": "application/clr",
        ".clue": "application/clue_info+xml",
        ".cmsc": "application/cms",
        ".cpl": "application/cpl+xml",
        ".csrattrs": "application/csrattrs",
        ".mpd": "application/dash+xml",
        ".mpdd": "application/dashdelta",
        ".davmount": "application/davmount+xml",
        ".dcm": "application/dicom",
        ".xmls": "application/dskpp+xml",
        ".dssc": "application/dssc+der",
        ".xdssc": "application/dssc+xml",
        ".dvc": "application/dvcs",
        ".es": "application/ecmascript",
        ".efi": "application/efi",
        ".emma": "application/emma+xml",
        ".emotionml": "application/emotionml+xml",
        ".epub": "application/epub+zip",
        ".msepub": "application/epub+zip",
        ".exi": "application/exi",
        ".finf": "application/fastinfoset",
        ".fdt": "application/fdt+xml",
        ".pfr": "application/font-tdpfr",
        ".fif": "application/fractals",
        ".geojson": "application/geo+json",
        ".gpkg": "application/geopackage+sqlite3",
        ".glbin": "application/gltf-buffer",
        ".glbuf": "application/gltf-buffer",
        ".gml": "application/gml+xml",
        ".tgz": "application/gzip",
        ".gz": "application/gzip",
        ".hta": "application/hta",
        ".stk": "application/hyperstudio",
        ".ink": "application/inkml+xml",
        ".inkml": "application/inkml+xml",
        ".ipfix": "application/ipfix",
        ".its": "application/its+xml",
        ".jar": "application/java-archive",
        ".jrd": "application/jrd+json",
        ".json-patch": "application/json-patch+json",
        ".jsonld": "application/ld+json",
        ".lgr": "application/lgr+xml",
        ".wlnk": "application/link-format",
        ".lostxml": "application/lost+xml",
        ".lostsyncxml": "application/lostsync+xml",
        ".lpf": "application/lpf+zip",
        ".hqx": "application/mac-binhex40",
        ".mads": "application/mads+xml",
        ".mrc": "application/marc",
        ".mrcx": "application/marcxml+xml",
        ".nb": "application/mathematica",
        ".ma": "application/mathematica",
        ".mb": "application/mathematica",
        ".mml": "application/mathml+xml",
        ".mbox": "application/mbox",
        ".meta4": "application/metalink4+xml",
        ".mets": "application/mets+xml",
        ".h5": "application/mipc",
        ".maei": "application/mmt-aei+xml",
        ".musd": "application/mmt-usd+xml",
        ".mods": "application/mods+xml",
        ".m21": "application/mp21",
        ".mp21": "application/mp21",
        ".mxf": "application/mxf",
        ".nq": "application/n-quads",
        ".nt": "application/n-triples",
        ".orq": "application/ocsp-request",
        ".ors": "application/ocsp-response",
        ".lha": "application/octet-stream",
        ".lzh": "application/octet-stream",
        ".class": "application/octet-stream",
        ".img": "application/octet-stream",
        ".iso": "application/octet-stream",
        ".opf": "application/oebps-package+xml",
        ".ogx": "application/ogg",
        ".osdx": "application/opensearchdescription+xml",
        ".oxps": "application/oxps",
        ".relo": "application/p2p-overlay+xml",
        ".pem": "application/pem-certificate-chain",
        ".pgp": "application/pgp-encrypted",
        ".sig": "application/pgp-signature",
        ".prf": "application/pics-rules",
        ".p10": "application/pkcs10",
        ".p7m": "application/pkcs7-mime",
        ".p7s": "application/pkcs7-signature",
        ".p8": "application/pkcs8",
        ".p8e": "application/pkcs8-encrypted",
        ".cer": "application/pkix-cert",
        ".crl": "application/pkix-crl",
        ".pkipath": "application/pkix-pkipath",
        ".pki": "application/pkixcmp",
        ".pls": "application/pls+xml",
        ".provx": "application/provenance+xml",
        ".cw": "application/prs.cww",
        ".cww": "application/prs.cww",
        ".hpub": "application/prs.hpub+zip",
        ".rnd": "application/prs.nprend",
        ".rdf-crypt": "application/prs.rdf-xml-crypt",
        ".xsf": "application/prs.xsf+xml",
        ".pskcxml": "application/pskc+xml",
        ".rat": "application/rat-file",
        ".rif": "application/reginfo+xml",
        ".rnc": "application/relax-ng-compact-syntax",
        ".rl": "application/resource-lists+xml",
        ".rld": "application/resource-lists-diff+xml",
        ".rfcxml": "application/rfc+xml",
        ".rs": "application/rls-services+xml",
        ".rapd": "application/route-apd+xml",
        ".sls": "application/route-s-tsid+xml",
        ".rusd": "application/route-usd+xml",
        ".gbr": "application/rpki-ghostbusters",
        ".mft": "application/rpki-manifest",
        ".roa": "application/rpki-roa",
        ".rtf": "application/rtf",
        ".sarif": "application/sarif+json",
        ".sarif.json": "application/sarif+json",
        ".sarif-external-properties": "application/sarif-external-properties+json",
        ".sarif-external-properties.json": "application/sarif-external-properties+json",
        ".scim": "application/scim+json",
        ".scq": "application/scvp-cv-request",
        ".scs": "application/scvp-cv-response",
        ".spq": "application/scvp-vp-request",
        ".spp": "application/scvp-vp-response",
        ".sdp": "application/sdp",
        ".senmlc": "application/senml+cbor",
        ".senml": "application/senml+json",
        ".senmlx": "application/senml+xml",
        ".senml-etchc": "application/senml-etch+cbor",
        ".senml-etchj": "application/senml-etch+json",
        ".senmle": "application/senml-exi",
        ".sensmlc": "application/sensml+cbor",
        ".sensml": "application/sensml+json",
        ".sensmlx": "application/sensml+xml",
        ".bin": "application/octet-stream",
        ".sensmle": "application/sensml-exi",
        ".soc": "application/sgml-open-catalog",
        ".shf": "application/shf+xml",
        ".siv": "application/sieve",
        ".sieve": "application/sieve",
        ".cl": "application/simple-filter+xml",
        ".smil": "application/smil+xml",
        ".smi": "application/smil+xml",
        ".sml": "application/smil+xml",
        ".rq": "application/sparql-query",
        ".srx": "application/sparql-results+xml",
        ".sql": "application/sql",
        ".gram": "application/srgs",
        ".grxml": "application/srgs+xml",
        ".sru": "application/sru+xml",
        ".ssml": "application/ssml+xml",
        ".stix": "application/stix+json",
        ".swidtag": "application/swid+xml",
        ".tau": "application/tamp-apex-update",
        ".auc": "application/tamp-apex-update-confirm",
        ".tcu": "application/tamp-community-update",
        ".cuc": "application/tamp-community-update-confirm",
        ".ter": "application/tamp-error",
        ".tsa": "application/tamp-sequence-adjust",
        ".sac": "application/tamp-sequence-adjust-confirm",
        ".tur": "application/tamp-update",
        ".tuc": "application/tamp-update-confirm",
        ".jsontd": "application/td+json",
        ".tei": "application/tei+xml",
        ".teiCorpus": "application/tei+xml",
        ".odd": "application/tei+xml",
        ".tfi": "application/thraud+xml",
        ".tsq": "application/timestamp-query",
        ".tsr": "application/timestamp-reply",
        ".tsd": "application/timestamped-data",
        ".trig": "application/trig",
        ".ttml": "application/ttml+xml",
        ".gsheet": "application/urc-grpsheet+xml",
        ".rsheet": "application/urc-ressheet+xml",
        ".td": "application/urc-targetdesc+xml",
        ".uis": "application/urc-uisocketdesc+xml",
        ".1km": "application/vnd.1000minds.decision-model+xml",
        ".pwn": "application/vnd.3M.Post-it-Notes",
        ".plb": "application/vnd.3gpp.pic-bw-large",
        ".psb": "application/vnd.3gpp.pic-bw-small",
        ".pvb": "application/vnd.3gpp.pic-bw-var",
        ".sms": "application/vnd.3gpp2.sms",
        ".tcap": "application/vnd.3gpp2.tcap",
        ".imgcal": "application/vnd.3lightssoftware.imagescal",
        ".gph": "application/vnd.FloGraphIt",
        ".zmm": "application/vnd.HandHeld-Entertainment+xml",
        ".kne": "application/vnd.Kinar",
        ".knp": "application/vnd.Kinar",
        ".sdf": "application/vnd.Kinar",
        ".mwf": "application/vnd.MFER",
        ".daf": "application/vnd.Mobius.DAF",
        ".dis": "application/vnd.Mobius.DIS",
        ".mbk": "application/vnd.Mobius.MBK",
        ".mqy": "application/vnd.Mobius.MQY",
        ".msl": "application/vnd.Mobius.MSL",
        ".plc": "application/vnd.Mobius.PLC",
        ".txf": "application/vnd.Mobius.TXF",
        ".qxd": "application/vnd.Quark.QuarkXPress",
        ".qxt": "application/vnd.Quark.QuarkXPress",
        ".qwd": "application/vnd.Quark.QuarkXPress",
        ".qwt": "application/vnd.Quark.QuarkXPress",
        ".qxl": "application/vnd.Quark.QuarkXPress",
        ".qxb": "application/vnd.Quark.QuarkXPress",
        ".twd": "application/vnd.SimTech-MindMapper",
        ".twds": "application/vnd.SimTech-MindMapper",
        ".aso": "application/vnd.accpac.simply.aso",
        ".imp": "application/vnd.accpac.simply.imp",
        ".acu": "application/vnd.acucobol",
        ".atc": "application/vnd.acucorp",
        ".acutc": "application/vnd.acucorp",
        ".fcdt": "application/vnd.adobe.formscentral.fcdt",
        ".fxp": "application/vnd.adobe.fxp",
        ".fxpl": "application/vnd.adobe.fxp",
        ".xdp": "application/vnd.adobe.xdp+xml",
        ".xfdf": "application/vnd.adobe.xfdf",
        ".list3820": "application/vnd.afpc.modca",
        ".listafp": "application/vnd.afpc.modca",
        ".afp": "application/vnd.afpc.modca",
        ".pseg3820": "application/vnd.afpc.modca",
        ".ovl": "application/vnd.afpc.modca-overlay",
        ".psg": "application/vnd.afpc.modca-pagesegment",
        ".ahead": "application/vnd.ahead.space",
        ".azf": "application/vnd.airzip.filesecure.azf",
        ".azs": "application/vnd.airzip.filesecure.azs",
        ".azw": "application/vnd.amazon.ebook",
        ".azw3": "application/vnd.amazon.mobi8-ebook",
        ".acc": "application/vnd.americandynamics.acc",
        ".ami": "application/vnd.amiga.ami",
        ".ota": "application/vnd.android.ota",
        ".apkg": "application/vnd.anki",
        ".cii": "application/vnd.anser-web-certificate-issue-initiation",
        ".fti": "application/vnd.anser-web-funds-transfer-initiation",
        ".dist": "application/vnd.apple.installer+xml",
        ".distz": "application/vnd.apple.installer+xml",
        ".pkg": "application/vnd.apple.installer+xml",
        ".mpkg": "application/vnd.apple.installer+xml",
        ".keynote": "application/vnd.apple.keynote",
        ".numbers": "application/vnd.apple.numbers",
        ".pages": "application/vnd.apple.pages",
        ".swi": "application/vnd.aristanetworks.swi",
        ".artisan": "application/vnd.artisan+json",
        ".iota": "application/vnd.astraea-software.iota",
        ".aep": "application/vnd.audiograph",
        ".package": "application/vnd.autopackage",
        ".bmml": "application/vnd.balsamiq.bmml+xml",
        ".bmpr": "application/vnd.balsamiq.bmpr",
        ".ac2": "application/vnd.banana-accounting",
        ".mpm": "application/vnd.blueice.multipass",
        ".ep": "application/vnd.bluetooth.ep.oob",
        ".le": "application/vnd.bluetooth.le.oob",
        ".bmi": "application/vnd.bmi",
        ".rep": "application/vnd.businessobjects",
        ".tlclient": "application/vnd.cendio.thinlinc.clientconf",
        ".cdxml": "application/vnd.chemdraw+xml",
        ".pgn": "application/vnd.chess-pgn",
        ".mmd": "application/vnd.chipnuts.karaoke-mmd",
        ".cdy": "application/vnd.cinderella",
        ".csl": "application/vnd.citationstyles.style+xml",
        ".cla": "application/vnd.claymore",
        ".rp9": "application/vnd.cloanto.rp9",
        ".c4g": "application/vnd.clonk.c4group",
        ".c4d": "application/vnd.clonk.c4group",
        ".c4f": "application/vnd.clonk.c4group",
        ".c4p": "application/vnd.clonk.c4group",
        ".c4u": "application/vnd.clonk.c4group",
        ".c11amc": "application/vnd.cluetrust.cartomobile-config",
        ".c11amz": "application/vnd.cluetrust.cartomobile-config-pkg",
        ".coffee": "application/vnd.coffeescript",
        ".xodt": "application/vnd.collabio.xodocuments.document",
        ".xott": "application/vnd.collabio.xodocuments.document-template",
        ".xodp": "application/vnd.collabio.xodocuments.presentation",
        ".xotp": "application/vnd.collabio.xodocuments.presentation-template",
        ".xods": "application/vnd.collabio.xodocuments.spreadsheet",
        ".xots": "application/vnd.collabio.xodocuments.spreadsheet-template",
        ".cbz": "application/vnd.comicbook+zip",
        ".cbr": "application/vnd.comicbook-rar",
        ".ica": "application/vnd.commerce-battelle",
        ".icf": "application/vnd.commerce-battelle",
        ".icd": "application/vnd.commerce-battelle",
        ".ic0": "application/vnd.commerce-battelle",
        ".ic1": "application/vnd.commerce-battelle",
        ".ic2": "application/vnd.commerce-battelle",
        ".ic3": "application/vnd.commerce-battelle",
        ".ic4": "application/vnd.commerce-battelle",
        ".ic5": "application/vnd.commerce-battelle",
        ".ic6": "application/vnd.commerce-battelle",
        ".ic7": "application/vnd.commerce-battelle",
        ".ic8": "application/vnd.commerce-battelle",
        ".csp": "application/vnd.commonspace",
        ".cst": "application/vnd.commonspace",
        ".cdbcmsg": "application/vnd.contact.cmsg",
        ".ign": "application/vnd.coreos.ignition+json",
        ".ignition": "application/vnd.coreos.ignition+json",
        ".cmc": "application/vnd.cosmocaller",
        ".clkx": "application/vnd.crick.clicker",
        ".clkk": "application/vnd.crick.clicker.keyboard",
        ".clkp": "application/vnd.crick.clicker.palette",
        ".clkt": "application/vnd.crick.clicker.template",
        ".clkw": "application/vnd.crick.clicker.wordbank",
        ".wbs": "application/vnd.criticaltools.wbs+xml",
        ".ssvc": "application/vnd.crypto-shade-file",
        ".c9r": "application/vnd.cryptomator.encrypted",
        ".c9s": "application/vnd.cryptomator.encrypted",
        ".cryptomator": "application/vnd.cryptomator.vault",
        ".pml": "application/vnd.ctc-posml",
        ".ppd": "application/vnd.cups-ppd",
        ".curl": "application/vnd.curl",
        ".dart": "application/vnd.dart",
        ".rdz": "application/vnd.data-vision.rdz",
        ".dbf": "application/vnd.dbf",
        ".deb": "application/vnd.debian.binary-package",
        ".udeb": "application/vnd.debian.binary-package",
        ".uvf": "application/vnd.dece.data",
        ".uvvf": "application/vnd.dece.data",
        ".uvd": "application/vnd.dece.data",
        ".uvvd": "application/vnd.dece.data",
        ".uvt": "application/vnd.dece.ttml+xml",
        ".uvvt": "application/vnd.dece.ttml+xml",
        ".uvx": "application/vnd.dece.unspecified",
        ".uvvx": "application/vnd.dece.unspecified",
        ".uvz": "application/vnd.dece.zip",
        ".uvvz": "application/vnd.dece.zip",
        ".fe_launch": "application/vnd.denovo.fcselayout-link",
        ".dsm": "application/vnd.desmume.movie",
        ".dna": "application/vnd.dna",
        ".docjson": "application/vnd.document+json",
        ".scld": "application/vnd.doremir.scorecloud-binary-document",
        ".dpg": "application/vnd.dpgraph",
        ".mwc": "application/vnd.dpgraph",
        ".dpgraph": "application/vnd.dpgraph",
        ".dfac": "application/vnd.dreamfactory",
        ".fla": "application/vnd.dtg.local.flash",
        ".ait": "application/vnd.dvb.ait",
        ".svc": "application/vnd.dvb.service",
        ".geo": "application/vnd.dynageo",
        ".dzr": "application/vnd.dzr",
        ".mag": "application/vnd.ecowin.chart",
        ".nml": "application/vnd.enliven",
        ".esf": "application/vnd.epson.esf",
        ".msf": "application/vnd.epson.msf",
        ".qam": "application/vnd.epson.quickanime",
        ".slt": "application/vnd.epson.salt",
        ".ssf": "application/vnd.epson.ssf",
        ".qcall": "application/vnd.ericsson.quickcall",
        ".qca": "application/vnd.ericsson.quickcall",
        ".espass": "application/vnd.espass-espass+zip",
        ".es3": "application/vnd.eszigno3+xml",
        ".et3": "application/vnd.eszigno3+xml",
        ".asice": "application/vnd.etsi.asic-e+zip",
        ".sce": "application/vnd.etsi.asic-e+zip",
        ".asics": "application/vnd.etsi.asic-s+zip",
        ".tst": "application/vnd.etsi.timestamp-token",
        ".ecigprofile": "application/vnd.evolv.ecig.profile",
        ".ecig": "application/vnd.evolv.ecig.settings",
        ".ecigtheme": "application/vnd.evolv.ecig.theme",
        ".mpw": "application/vnd.exstream-empower+zip",
        ".pub": "application/vnd.exstream-package",
        ".ez2": "application/vnd.ezpix-album",
        ".ez3": "application/vnd.ezpix-package",
        ".dim": "application/vnd.fastcopy-disk-image",
        ".fdf": "application/vnd.fdf",
        ".msd": "application/vnd.fdsn.mseed",
        ".mseed": "application/vnd.fdsn.mseed",
        ".seed": "application/vnd.fdsn.seed",
        ".dataless": "application/vnd.fdsn.seed",
        ".flb": "application/vnd.ficlab.flb+zip",
        ".zfc": "application/vnd.filmit.zfc",
        ".ftc": "application/vnd.fluxtime.clip",
        ".sfd": "application/vnd.font-fontforge-sfd",
        ".fm": "application/vnd.framemaker",
        ".fnc": "application/vnd.frogans.fnc",
        ".ltf": "application/vnd.frogans.ltf",
        ".fsc": "application/vnd.fsc.weblaunch",
        ".oas": "application/vnd.fujitsu.oasys",
        ".oa2": "application/vnd.fujitsu.oasys2",
        ".oa3": "application/vnd.fujitsu.oasys3",
        ".fg5": "application/vnd.fujitsu.oasysgp",
        ".bh2": "application/vnd.fujitsu.oasysprs",
        ".ddd": "application/vnd.fujixerox.ddd",
        ".xdw": "application/vnd.fujixerox.docuworks",
        ".xbd": "application/vnd.fujixerox.docuworks.binder",
        ".xct": "application/vnd.fujixerox.docuworks.container",
        ".fzs": "application/vnd.fuzzysheet",
        ".txd": "application/vnd.genomatix.tuxedo",
        ".g3": "application/vnd.geocube+xml",
        ".g³": "application/vnd.geocube+xml",
        ".ggb": "application/vnd.geogebra.file",
        ".ggs": "application/vnd.geogebra.slides",
        ".ggt": "application/vnd.geogebra.tool",
        ".gex": "application/vnd.geometry-explorer",
        ".gre": "application/vnd.geometry-explorer",
        ".gxt": "application/vnd.geonext",
        ".g2w": "application/vnd.geoplan",
        ".g3w": "application/vnd.geospace",
        ".gmx": "application/vnd.gmx",
        ".kml": "application/vnd.google-earth.kml+xml",
        ".kmz": "application/vnd.google-earth.kmz",
        ".gqf": "application/vnd.grafeq",
        ".gqs": "application/vnd.grafeq",
        ".gac": "application/vnd.groove-account",
        ".ghf": "application/vnd.groove-help",
        ".gim": "application/vnd.groove-identity-message",
        ".grv": "application/vnd.groove-injector",
        ".gtm": "application/vnd.groove-tool-message",
        ".tpl": "application/vnd.groove-tool-template",
        ".vcg": "application/vnd.groove-vcard",
        ".hal": "application/vnd.hal+xml",
        ".hbci": "application/vnd.hbci",
        ".hbc": "application/vnd.hbci",
        ".kom": "application/vnd.hbci",
        ".upa": "application/vnd.hbci",
        ".pkd": "application/vnd.hbci",
        ".bpd": "application/vnd.hbci",
        ".hdt": "application/vnd.hdt",
        ".les": "application/vnd.hhe.lesson-player",
        ".hpgl": "application/vnd.hp-HPGL",
        ".pcl": "application/vnd.hp-PCL",
        ".hpi": "application/vnd.hp-hpid",
        ".hpid": "application/vnd.hp-hpid",
        ".hps": "application/vnd.hp-hps",
        ".jlt": "application/vnd.hp-jlyt",
        ".sfd-hdstx": "application/vnd.hydrostatix.sof-data",
        ".x3d": "application/vnd.hzn-3d-crossword",
        ".mpy": "application/vnd.ibm.MiniPay",
        ".emm": "application/vnd.ibm.electronic-media",
        ".irm": "application/vnd.ibm.rights-management",
        ".sc": "application/vnd.ibm.secure-container",
        ".icc": "application/vnd.iccprofile",
        ".icm": "application/vnd.iccprofile",
        ".1905.1": "application/vnd.ieee.1905",
        ".igl": "application/vnd.igloader",
        ".imf": "application/vnd.imagemeter.folder+zip",
        ".imi": "application/vnd.imagemeter.image+zip",
        ".ivp": "application/vnd.immervision-ivp",
        ".ivu": "application/vnd.immervision-ivu",
        ".imscc": "application/vnd.ims.imsccv1p1",
        ".igm": "application/vnd.insors.igm",
        ".xpw": "application/vnd.intercon.formnet",
        ".xpx": "application/vnd.intercon.formnet",
        ".i2g": "application/vnd.intergeo",
        ".qbo": "application/vnd.intu.qbo",
        ".qfx": "application/vnd.intu.qfx",
        ".rcprofile": "application/vnd.ipunplugged.rcprofile",
        ".irp": "application/vnd.irepository.package+xml",
        ".xpr": "application/vnd.is-xpr",
        ".fcs": "application/vnd.isac.fcs",
        ".jam": "application/vnd.jam",
        ".rms": "application/vnd.jcp.javame.midlet-rms",
        ".jisp": "application/vnd.jisp",
        ".joda": "application/vnd.joost.joda-archive",
        ".ktz": "application/vnd.kahootz",
        ".ktr": "application/vnd.kahootz",
        ".karbon": "application/vnd.kde.karbon",
        ".chrt": "application/vnd.kde.kchart",
        ".kfo": "application/vnd.kde.kformula",
        ".flw": "application/vnd.kde.kivio",
        ".kon": "application/vnd.kde.kontour",
        ".kpr": "application/vnd.kde.kpresenter",
        ".kpt": "application/vnd.kde.kpresenter",
        ".ksp": "application/vnd.kde.kspread",
        ".kwd": "application/vnd.kde.kword",
        ".kwt": "application/vnd.kde.kword",
        ".htke": "application/vnd.kenameaapp",
        ".kia": "application/vnd.kidspiration",
        ".skp": "application/vnd.koan",
        ".skd": "application/vnd.koan",
        ".skm": "application/vnd.koan",
        ".skt": "application/vnd.koan",
        ".sse": "application/vnd.kodak-descriptor",
        ".las": "application/vnd.las",
        ".lasjson": "application/vnd.las.las+json",
        ".lasxml": "application/vnd.las.las+xml",
        ".lbd": "application/vnd.llamagraphics.life-balance.desktop",
        ".lbe": "application/vnd.llamagraphics.life-balance.exchange+xml",
        ".lcs": "application/vnd.logipipe.circuit+zip",
        ".lca": "application/vnd.logipipe.circuit+zip",
        ".loom": "application/vnd.loom",
        ".123": "application/vnd.lotus-1-2-3",
        ".wk4": "application/vnd.lotus-1-2-3",
        ".wk3": "application/vnd.lotus-1-2-3",
        ".wk1": "application/vnd.lotus-1-2-3",
        ".apr": "application/vnd.lotus-approach",
        ".vew": "application/vnd.lotus-approach",
        ".prz": "application/vnd.lotus-freelance",
        ".pre": "application/vnd.lotus-freelance",
        ".nsf": "application/vnd.lotus-notes",
        ".ntf": "application/vnd.lotus-notes",
        ".ndl": "application/vnd.lotus-notes",
        ".ns4": "application/vnd.lotus-notes",
        ".ns3": "application/vnd.lotus-notes",
        ".ns2": "application/vnd.lotus-notes",
        ".nsh": "application/vnd.lotus-notes",
        ".nsg": "application/vnd.lotus-notes",
        ".or3": "application/vnd.lotus-organizer",
        ".or2": "application/vnd.lotus-organizer",
        ".org": "application/vnd.lotus-organizer",
        ".scm": "application/vnd.lotus-screencam",
        ".lwp": "application/vnd.lotus-wordpro",
        ".sam": "application/vnd.lotus-wordpro",
        ".portpkg": "application/vnd.macports.portpkg",
        ".mvt": "application/vnd.mapbox-vector-tile",
        ".mdc": "application/vnd.marlin.drm.mdcf",
        ".mmdb": "application/vnd.maxmind.maxmind-db",
        ".mcd": "application/vnd.mcd",
        ".mc1": "application/vnd.medcalcdata",
        ".cdkey": "application/vnd.mediastation.cdkey",
        ".mfm": "application/vnd.mfmp",
        ".flo": "application/vnd.micrografx.flo",
        ".igx": "application/vnd.micrografx.igx",
        ".mpn": "application/vnd.mophun.application",
        ".mpc": "application/vnd.mophun.certificate",
        ".xul": "application/vnd.mozilla.xul+xml",
        ".3mf": "application/vnd.ms-3mfdocument",
        ".cil": "application/vnd.ms-artgalry",
        ".cab": "application/vnd.ms-cab-compressed",
        ".xlm": "application/vnd.ms-excel",
        ".xla": "application/vnd.ms-excel",
        ".xlc": "application/vnd.ms-excel",
        ".xlt": "application/vnd.ms-excel",
        ".xlw": "application/vnd.ms-excel",
        ".xlam": "application/vnd.ms-excel.addin.macroEnabled.12",
        ".xlsb": "application/vnd.ms-excel.sheet.binary.macroEnabled.12",
        ".xlsm": "application/vnd.ms-excel.sheet.macroEnabled.12",
        ".xltm": "application/vnd.ms-excel.template.macroEnabled.12",
        ".eot": "application/vnd.ms-fontobject",
        ".chm": "application/vnd.ms-htmlhelp",
        ".ims": "application/vnd.ms-ims",
        ".lrm": "application/vnd.ms-lrm",
        ".thmx": "application/vnd.ms-officetheme",
        ".sst": "application/vnd.ms-pki.certstore",
        ".pko": "application/vnd.ms-pki.pko",
        ".cat": "application/vnd.ms-pki.seccat",
        ".ppam": "application/vnd.ms-powerpoint.addin.macroEnabled.12",
        ".pptm": "application/vnd.ms-powerpoint.presentation.macroEnabled.12",
        ".sldm": "application/vnd.ms-powerpoint.slide.macroEnabled.12",
        ".ppsm": "application/vnd.ms-powerpoint.slideshow.macroEnabled.12",
        ".potm": "application/vnd.ms-powerpoint.template.macroEnabled.12",
        ".mpp": "application/vnd.ms-project",
        ".mpt": "application/vnd.ms-project",
        ".tnef": "application/vnd.ms-tnef",
        ".tnf": "application/vnd.ms-tnef",
        ".docm": "application/vnd.ms-word.document.macroEnabled.12",
        ".dotm": "application/vnd.ms-word.template.macroEnabled.12",
        ".wcm": "application/vnd.ms-works",
        ".wdb": "application/vnd.ms-works",
        ".wks": "application/vnd.ms-works",
        ".wps": "application/vnd.ms-works",
        ".wpl": "application/vnd.ms-wpl",
        ".xps": "application/vnd.ms-xpsdocument",
        ".msa": "application/vnd.msa-disk-image",
        ".mseq": "application/vnd.mseq",
        ".crtr": "application/vnd.multiad.creator",
        ".cif": "application/vnd.multiad.creator.cif",
        ".mus": "application/vnd.musician",
        ".msty": "application/vnd.muvee.style",
        ".taglet": "application/vnd.mynfc",
        ".nebul": "application/vnd.nebumind.line",
        ".line": "application/vnd.nebumind.line",
        ".entity": "application/vnd.nervana",
        ".request": "application/vnd.nervana",
        ".bkm": "application/vnd.nervana",
        ".kcm": "application/vnd.nervana",
        ".nlu": "application/vnd.neurolanguage.nlu",
        ".nimn": "application/vnd.nimn",
        ".nds": "application/vnd.nintendo.nitro.rom",
        ".sfc": "application/vnd.nintendo.snes.rom",
        ".smc": "application/vnd.nintendo.snes.rom",
        ".nitf": "application/vnd.nitf",
        ".nnd": "application/vnd.noblenet-directory",
        ".nns": "application/vnd.noblenet-sealer",
        ".nnw": "application/vnd.noblenet-web",
        ".ac": "application/vnd.nokia.n-gage.ac+xml",
        ".ngdat": "application/vnd.nokia.n-gage.data",
        ".n-gage": "application/vnd.nokia.n-gage.symbian.install",
        ".rpst": "application/vnd.nokia.radio-preset",
        ".rpss": "application/vnd.nokia.radio-presets",
        ".edm": "application/vnd.novadigm.EDM",
        ".edx": "application/vnd.novadigm.EDX",
        ".ext": "application/vnd.novadigm.EXT",
        ".odc": "application/vnd.oasis.opendocument.chart",
        ".otc": "application/vnd.oasis.opendocument.chart-template",
        ".odb": "application/vnd.oasis.opendocument.database",
        ".odf": "application/vnd.oasis.opendocument.formula",
        ".odg": "application/vnd.oasis.opendocument.graphics",
        ".fodg": "application/vnd.oasis.opendocument.graphics",
        ".otg": "application/vnd.oasis.opendocument.graphics-template",
        ".odi": "application/vnd.oasis.opendocument.image",
        ".oti": "application/vnd.oasis.opendocument.image-template",
        ".odp": "application/vnd.oasis.opendocument.presentation",
        ".fodp": "application/vnd.oasis.opendocument.presentation",
        ".otp": "application/vnd.oasis.opendocument.presentation-template",
        ".ods": "application/vnd.oasis.opendocument.spreadsheet",
        ".fods": "application/vnd.oasis.opendocument.spreadsheet",
        ".ots": "application/vnd.oasis.opendocument.spreadsheet-template",
        ".odt": "application/vnd.oasis.opendocument.text",
        ".fodt": "application/vnd.oasis.opendocument.text",
        ".odm": "application/vnd.oasis.opendocument.text-master",
        ".otm": "application/vnd.oasis.opendocument.text-master-template",
        ".ott": "application/vnd.oasis.opendocument.text-template",
        ".oth": "application/vnd.oasis.opendocument.text-web",
        ".xo": "application/vnd.olpc-sugar",
        ".dd2": "application/vnd.oma.dd2+xml",
        ".tam": "application/vnd.onepager",
        ".tamp": "application/vnd.onepagertamp",
        ".tamx": "application/vnd.onepagertamx",
        ".tat": "application/vnd.onepagertat",
        ".tatp": "application/vnd.onepagertatp",
        ".tatx": "application/vnd.onepagertatx",
        ".obgx": "application/vnd.openblox.game+xml",
        ".obg": "application/vnd.openblox.game-binary",
        ".oeb": "application/vnd.openeye.oeb",
        ".oxt": "application/vnd.openofficeorg.extension",
        ".osm": "application/vnd.openstreetmap.data+xml",
        ".pptx": "application/vnd.openxmlformats-officedocument.presentationml.presentation",
        ".sldx": "application/vnd.openxmlformats-officedocument.presentationml.slide",
        ".ppsx": "application/vnd.openxmlformats-officedocument.presentationml.slideshow",
        ".potx": "application/vnd.openxmlformats-officedocument.presentationml.template",
        ".xlsx": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
        ".xltx": "application/vnd.openxmlformats-officedocument.spreadsheetml.template",
        ".docx": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
        ".dotx": "application/vnd.openxmlformats-officedocument.wordprocessingml.template",
        ".ndc": "application/vnd.osa.netdeploy",
        ".mgp": "application/vnd.osgeo.mapguide.package",
        ".dp": "application/vnd.osgi.dp",
        ".esa": "application/vnd.osgi.subsystem",
        ".oxlicg": "application/vnd.oxli.countgraph",
        ".prc": "application/vnd.palm",
        ".pdb": "application/vnd.palm",
        ".pqa": "application/vnd.palm",
        ".oprc": "application/vnd.palm",
        ".plp": "application/vnd.panoply",
        ".dive": "application/vnd.patentdive",
        ".paw": "application/vnd.pawaafile",
        ".str": "application/vnd.pg.format",
        ".ei6": "application/vnd.pg.osasli",
        ".pil": "application/vnd.piaccess.application-licence",
        ".efif": "application/vnd.picsel",
        ".wg": "application/vnd.pmi.widget",
        ".plf": "application/vnd.pocketlearn",
        ".pbd": "application/vnd.powerbuilder6",
        ".preminet": "application/vnd.preminet",
        ".box": "application/vnd.previewsystems.box",
        ".vbox": "application/vnd.previewsystems.box",
        ".mgz": "application/vnd.proteus.magazine",
        ".psfs": "application/vnd.psfs",
        ".qps": "application/vnd.publishare-delta-tree",
        ".ptid": "application/vnd.pvi.ptid1",
        ".bar": "application/vnd.qualcomm.brew-app-res",
        ".quox": "application/vnd.quobject-quoxdocument",
        ".quiz": "application/vnd.quobject-quoxdocument",
        ".tree": "application/vnd.rainstor.data",
        ".rar": "application/vnd.rar",
        ".bed": "application/vnd.realvnc.bed",
        ".mxl": "application/vnd.recordare.musicxml",
        ".cryptonote": "application/vnd.rig.cryptonote",
        ".link66": "application/vnd.route66.link66+xml",
        ".st": "application/vnd.sailingtracker.track",
        ".SAR": "application/vnd.sar",
        ".scd": "application/vnd.scribus",
        ".sla": "application/vnd.scribus",
        ".slaz": "application/vnd.scribus",
        ".s3df": "application/vnd.sealed.3df",
        ".scsf": "application/vnd.sealed.csf",
        ".sdoc": "application/vnd.sealed.doc",
        ".sdo": "application/vnd.sealed.doc",
        ".s1w": "application/vnd.sealed.doc",
        ".seml": "application/vnd.sealed.eml",
        ".sem": "application/vnd.sealed.eml",
        ".smht": "application/vnd.sealed.mht",
        ".smh": "application/vnd.sealed.mht",
        ".sppt": "application/vnd.sealed.ppt",
        ".s1p": "application/vnd.sealed.ppt",
        ".stif": "application/vnd.sealed.tiff",
        ".sxls": "application/vnd.sealed.xls",
        ".sxl": "application/vnd.sealed.xls",
        ".s1e": "application/vnd.sealed.xls",
        ".stml": "application/vnd.sealedmedia.softseal.html",
        ".s1h": "application/vnd.sealedmedia.softseal.html",
        ".spdf": "application/vnd.sealedmedia.softseal.pdf",
        ".spd": "application/vnd.sealedmedia.softseal.pdf",
        ".s1a": "application/vnd.sealedmedia.softseal.pdf",
        ".see": "application/vnd.seemail",
        ".sema": "application/vnd.sema",
        ".semd": "application/vnd.semd",
        ".semf": "application/vnd.semf",
        ".ssv": "application/vnd.shade-save-file",
        ".ifm": "application/vnd.shana.informed.formdata",
        ".itp": "application/vnd.shana.informed.formtemplate",
        ".iif": "application/vnd.shana.informed.interchange",
        ".ipk": "application/vnd.shana.informed.package",
        ".shp": "application/vnd.shp",
        ".shx": "application/vnd.shx",
        ".sr": "application/vnd.sigrok.session",
        ".mmf": "application/vnd.smaf",
        ".notebook": "application/vnd.smart.notebook",
        ".teacher": "application/vnd.smart.teacher",
        ".ptrom": "application/vnd.snesdev-page-table",
        ".pt": "application/vnd.snesdev-page-table",
        ".fo": "application/vnd.software602.filler.form+xml",
        ".zfo": "application/vnd.software602.filler.form-xml-zip",
        ".sdkm": "application/vnd.solent.sdkm+xml",
        ".sdkd": "application/vnd.solent.sdkm+xml",
        ".dxp": "application/vnd.spotfire.dxp",
        ".sfs": "application/vnd.spotfire.sfs",
        ".sqlite": "application/vnd.sqlite3",
        ".sqlite3": "application/vnd.sqlite3",
        ".vor": "application/vnd.stardivision.writer",
        ".smzip": "application/vnd.stepmania.package",
        ".sm": "application/vnd.stepmania.stepchart",
        ".wadl": "application/vnd.sun.wadl+xml",
        ".sxc": "application/vnd.sun.xml.calc",
        ".stc": "application/vnd.sun.xml.calc.template",
        ".sxd": "application/vnd.sun.xml.draw",
        ".std": "application/vnd.sun.xml.draw.template",
        ".sxi": "application/vnd.sun.xml.impress",
        ".sti": "application/vnd.sun.xml.impress.template",
        ".sxm": "application/vnd.sun.xml.math",
        ".sxw": "application/vnd.sun.xml.writer",
        ".sxg": "application/vnd.sun.xml.writer.global",
        ".stw": "application/vnd.sun.xml.writer.template",
        ".sus": "application/vnd.sus-calendar",
        ".susp": "application/vnd.sus-calendar",
        ".scl": "application/vnd.sycle+xml",
        ".xsm": "application/vnd.syncml+xml",
        ".bdm": "application/vnd.syncml.dm+wbxml",
        ".xdm": "application/vnd.syncml.dm+xml",
        ".ddf": "application/vnd.syncml.dmddf+xml",
        ".tao": "application/vnd.tao.intent-module-archive",
        ".pcap": "application/vnd.tcpdump.pcap",
        ".dmp": "application/vnd.tcpdump.pcap",
        ".qvd": "application/vnd.theqvd",
        ".ppttc": "application/vnd.think-cell.ppttc+json",
        ".vfr": "application/vnd.tml",
        ".viaframe": "application/vnd.tml",
        ".tmo": "application/vnd.tmobile-livetv",
        ".tpt": "application/vnd.trid.tpt",
        ".mxs": "application/vnd.triscape.mxs",
        ".tra": "application/vnd.trueapp",
        ".ufdl": "application/vnd.ufdl",
        ".ufd": "application/vnd.ufdl",
        ".frm": "application/vnd.ufdl",
        ".utz": "application/vnd.uiq.theme",
        ".umj": "application/vnd.umajin",
        ".unityweb": "application/vnd.unity",
        ".uoml": "application/vnd.uoml+xml",
        ".uo": "application/vnd.uoml+xml",
        ".urim": "application/vnd.uri-map",
        ".urimap": "application/vnd.uri-map",
        ".vmt": "application/vnd.valve.source.material",
        ".vcx": "application/vnd.vcx",
        ".mxi": "application/vnd.vd-study",
        ".study-inter": "application/vnd.vd-study",
        ".model-inter": "application/vnd.vd-study",
        ".vwx": "application/vnd.vectorworks",
        ".istc": "application/vnd.veryant.thin",
        ".isws": "application/vnd.veryant.thin",
        ".VES": "application/vnd.ves.encrypted",
        ".vsc": "application/vnd.vidsoft.vidconference",
        ".vsd": "application/vnd.visio",
        ".vst": "application/vnd.visio",
        ".vsw": "application/vnd.visio",
        ".vss": "application/vnd.visio",
        ".vis": "application/vnd.visionary",
        ".vsf": "application/vnd.vsf",
        ".sic": "application/vnd.wap.sic",
        ".slc": "application/vnd.wap.slc",
        ".wbxml": "application/vnd.wap.wbxml",
        ".wmlc": "application/vnd.wap.wmlc",
        ".wmlsc": "application/vnd.wap.wmlscriptc",
        ".wtb": "application/vnd.webturbo",
        ".p2p": "application/vnd.wfa.p2p",
        ".wmc": "application/vnd.wmc",
        ".m": "application/vnd.wolfram.mathematica.package",
        ".nbp": "application/vnd.wolfram.player",
        ".wpd": "application/vnd.wordperfect",
        ".wqd": "application/vnd.wqd",
        ".stf": "application/vnd.wt.stf",
        ".wv": "application/vnd.wv.csp+wbxml",
        ".xar": "application/vnd.xara",
        ".xfdl": "application/vnd.xfdl",
        ".xfd": "application/vnd.xfdl",
        ".cpkg": "application/vnd.xmpie.cpkg",
        ".dpkg": "application/vnd.xmpie.dpkg",
        ".ppkg": "application/vnd.xmpie.ppkg",
        ".xlim": "application/vnd.xmpie.xlim",
        ".hvd": "application/vnd.yamaha.hv-dic",
        ".hvs": "application/vnd.yamaha.hv-script",
        ".hvp": "application/vnd.yamaha.hv-voice",
        ".osf": "application/vnd.yamaha.openscoreformat",
        ".saf": "application/vnd.yamaha.smaf-audio",
        ".spf": "application/vnd.yamaha.smaf-phrase",
        ".yme": "application/vnd.yaoweme",
        ".cmp": "application/vnd.yellowriver-custom-menu",
        ".zir": "application/vnd.zul",
        ".zirz": "application/vnd.zul",
        ".zaz": "application/vnd.zzazz.deck+xml",
        ".vxml": "application/voicexml+xml",
        ".vcj": "application/voucher-cms+json",
        ".vsix": "application/vsix",
        ".wif": "application/watcherinfo+xml",
        ".wgt": "application/widget",
        ".accountpicture-ms": "application/windows-accountpicture",
        ".appcontent-ms": "application/windows-appcontent+xml",
        ".library-ms": "application/windows-library+xml",
        ".searchConnector-ms": "application/windows-search-connector+xml",
        ".wspolicy": "application/wspolicy+xml",
        ".z": "application/x-compress",
        ".dtcp-ip": "application/x-dtcp1",
        ".application": "application/x-ms-application",
        ".WMD": "application/x-ms-wmd",
        ".wmz": "application/x-ms-wmz",
        ".xbap": "application/x-ms-xbap",
        ".website": "application/x-mswebsite",
        ".p7b": "application/x-pkcs7-certificates",
        ".spc": "application/x-pkcs7-certificates",
        ".p7r": "application/x-pkcs7-certreqresp",
        ".sit": "application/x-stuffit",
        ".crt": "application/x-x509-ca-cert",
        ".der": "application/x-x509-ca-cert",
        ".xaml": "application/xaml+xml",
        ".xav": "application/xcap-att+xml",
        ".xca": "application/xcap-caps+xml",
        ".xdf": "application/xcap-diff+xml",
        ".xel": "application/xcap-el+xml",
        ".xer": "application/xcap-error+xml",
        ".xns": "application/xcap-ns+xml",
        ".xhtml": "application/xhtml+xml",
        ".xht": "application/xhtml+xml",
        ".xhtm": "application/xhtml+xml",
        ".xlf": "application/xliff+xml",
        ".xsd": "application/xml",
        ".asa": "application/xml",
        ".asax": "application/xml",
        ".ascx": "application/xml",
        ".ashx": "application/xml",
        ".asmx": "application/xml",
        ".aspx": "application/xml",
        ".config": "application/xml",
        ".coverage": "application/xml",
        ".datasource": "application/xml",
        ".generictest": "application/xml",
        ".master": "application/xml",
        ".mtx": "application/xml",
        ".orderedtest": "application/xml",
        ".resx": "application/xml",
        ".settings": "application/xml",
        ".shproj": "application/xml",
        ".sitemap": "application/xml",
        ".skin": "application/xml",
        ".snippet": "application/xml",
        ".targets": "application/xml",
        ".testrunconfig": "application/xml",
        ".testsettings": "application/xml",
        ".trx": "application/xml",
        ".uitest": "application/xml",
        ".vsmdi": "application/xml",
        ".xdr": "application/xml",
        ".xsc": "application/xml",
        ".xss": "application/xml",
        ".dtd": "application/xml-dtd",
        ".xop": "application/xop+xml",
        ".xslt": "application/xslt+xml",
        ".mxml": "application/xv+xml",
        ".xhvml": "application/xv+xml",
        ".xvml": "application/xv+xml",
        ".xvm": "application/xv+xml",
        ".yang": "application/yang",
        ".yin": "application/yin+xml",
        ".zst": "application/zstd",
        ".726": "audio/32kadpcm",
        ".amr": "audio/AMR",
        ".awb": "audio/AMR-WB",
        ".aal": "audio/ATRAC-ADVANCED-LOSSLESS",
        ".atx": "audio/ATRAC-X",
        ".at3": "audio/ATRAC3",
        ".aa3": "audio/ATRAC3",
        ".omg": "audio/ATRAC3",
        ".evc": "audio/EVRC",
        ".evb": "audio/EVRCB",
        ".enw": "audio/EVRCNW",
        ".evw": "audio/EVRCWB",
        ".l16": "audio/L16",
        ".qcp": "audio/QCELP",
        ".smv": "audio/SMV",
        ".aac": "audio/aac",
        ".ass": "audio/aac",
        ".ac3": "audio/ac3",
        ".acn": "audio/asc",
        ".dls": "audio/dls",
        ".ec3": "audio/ec3",
        ".lbc": "audio/iLBC",
        ".lpcm": "audio/l16",
        ".mhas": "audio/mhas",
        ".rmi": "audio/mid",
        ".mid": "audio/midi",
        ".midi": "audio/midi",
        ".mxmf": "audio/mobile-xmf",
        ".m4a": "audio/mp4",
        ".mpga": "audio/mpeg",
        ".mp1": "audio/mpeg",
        ".oga": "audio/ogg",
        ".ogg": "audio/ogg",
        ".opus": "audio/ogg",
        ".spx": "audio/ogg",
        ".sid": "audio/prs.sid",
        ".psid": "audio/prs.sid",
        ".sofa": "audio/sofa",
        ".loas": "audio/usac",
        ".xhe": "audio/usac",
        ".koz": "audio/vnd.audiokoz",
        ".uva": "audio/vnd.dece.audio",
        ".uvva": "audio/vnd.dece.audio",
        ".eol": "audio/vnd.digital-winds",
        ".adt": "audio/vnd.dlna.adts",
        ".mlp": "audio/vnd.dolby.mlp",
        ".dts": "audio/vnd.dts",
        ".dtshd": "audio/vnd.dts.hd",
        ".plj": "audio/vnd.everad.plj",
        ".lvp": "audio/vnd.lucent.voice",
        ".pya": "audio/vnd.ms-playready.media.pya",
        ".vbk": "audio/vnd.nortel.vbk",
        ".ecelp4800": "audio/vnd.nuera.ecelp4800",
        ".ecelp7470": "audio/vnd.nuera.ecelp7470",
        ".ecelp9600": "audio/vnd.nuera.ecelp9600",
        ".multitrack": "audio/vnd.presonus.multitrack",
        ".rip": "audio/vnd.rip",
        ".smp3": "audio/vnd.sealedmedia.softseal.mpeg",
        ".smp": "audio/vnd.sealedmedia.softseal.mpeg",
        ".s1m": "audio/vnd.sealedmedia.softseal.mpeg",
        ".weba": "audio/webm",
        ".flac": "audio/x-flac",
        ".mka": "audio/x-matroska",
        ".mod": "audio/x-mod",
        ".wax": "audio/x-ms-wax",
        ".wma": "audio/x-ms-wma",
        ".ttc": "font/collection",
        ".otf": "font/otf",
        ".ttf": "font/ttf",
        ".woff": "font/woff",
        ".woff2": "font/woff2",
        ".3fr": "image/3FR",
        ".ari": "image/ARI",
        ".arw": "image/ARW",
        ".bay": "image/BAY",
        ".cr2": "image/CR2",
        ".cr3": "image/CR3",
        ".ori": "image/CR3",
        ".crw": "image/CRW",
        ".dcs": "image/DCS",
        ".dng": "image/DNG",
        ".drf": "image/DRF",
        ".eip": "image/EIP",
        ".erf": "image/ERF",
        ".fff": "image/FFF",
        ".iiq": "image/IIQ",
        ".k25": "image/K25",
        ".kdc": "image/KDC",
        ".mef": "image/MEF",
        ".mos": "image/MOS",
        ".mrw": "image/MRW",
        ".nef": "image/NEF",
        ".nrw": "image/NRW",
        ".orf": "image/ORF",
        ".pef": "image/PEF",
        ".ptx": "image/PTX",
        ".pxn": "image/PXN",
        ".raf": "image/RAF",
        ".raw": "image/RAW",
        ".rw2": "image/RW2",
        ".rwl": "image/RWL",
        ".sr2": "image/SR2",
        ".srw": "image/SRW",
        ".x3f": "image/X3F",
        ".exr": "image/aces",
        ".avci": "image/avci",
        ".avcs": "image/avcs",
        ".avif": "image/avif",
        ".hif": "image/avif",
        ".dib": "image/bmp",
        ".cgm": "image/cgm",
        ".drle": "image/dicom-rle",
        ".fits": "image/fits",
        ".fit": "image/fits",
        ".fts": "image/fits",
        ".heic": "image/heic",
        ".heics": "image/heic-sequence",
        ".heif": "image/heif",
        ".heifs": "image/heif-sequence",
        ".hej2": "image/hej2k",
        ".hsj2": "image/hsj2",
        ".jls": "image/jls",
        ".jp2": "image/jp2",
        ".jpg2": "image/jp2",
        ".jfif": "image/jpeg",
        ".jph": "image/jph",
        ".jhc": "image/jphc",
        ".jpm": "image/jpm",
        ".jpgm": "image/jpm",
        ".jpx": "image/jpx",
        ".jpf": "image/jpx",
        ".jxl": "image/jxl",
        ".jxra": "image/jxrA",
        ".jxrs": "image/jxrS",
        ".jxs": "image/jxs",
        ".jxsc": "image/jxsc",
        ".jxsi": "image/jxsi",
        ".jxss": "image/jxss",
        ".ktx": "image/ktx",
        ".ktx2": "image/ktx2",
        ".btif": "image/prs.btif",
        ".btf": "image/prs.btif",
        ".pti": "image/prs.pti",
        ".svgz": "image/svg+xml",
        ".t38": "image/t38",
        ".tfx": "image/tiff-fx",
        ".psd": "image/vnd.adobe.photoshop",
        ".azv": "image/vnd.airzip.accelerator.azv",
        ".uvi": "image/vnd.dece.graphic",
        ".uvvi": "image/vnd.dece.graphic",
        ".uvg": "image/vnd.dece.graphic",
        ".uvvg": "image/vnd.dece.graphic",
        ".djvu": "image/vnd.djvu",
        ".djv": "image/vnd.djvu",
        ".dwg": "image/vnd.dwg",
        ".dxf": "image/vnd.dxf",
        ".fbs": "image/vnd.fastbidsheet",
        ".fpx": "image/vnd.fpx",
        ".fst": "image/vnd.fst",
        ".mmr": "image/vnd.fujixerox.edmics-mmr",
        ".rlc": "image/vnd.fujixerox.edmics-rlc",
        ".pgb": "image/vnd.globalgraphics.pgb",
        ".apng": "image/vnd.mozilla.apng",
        ".dds": "image/vnd.ms-dds",
        ".mdi": "image/vnd.ms-modi",
        ".wdp": "image/vnd.ms-photo",
        ".b16": "image/vnd.pco.b16",
        ".hdr": "image/vnd.radiance",
        ".rgbe": "image/vnd.radiance",
        ".xyze": "image/vnd.radiance",
        ".spng": "image/vnd.sealed.png",
        ".spn": "image/vnd.sealed.png",
        ".s1n": "image/vnd.sealed.png",
        ".sgif": "image/vnd.sealedmedia.softseal.gif",
        ".sgi": "image/vnd.sealedmedia.softseal.gif",
        ".s1g": "image/vnd.sealedmedia.softseal.gif",
        ".sjpg": "image/vnd.sealedmedia.softseal.jpg",
        ".sjp": "image/vnd.sealedmedia.softseal.jpg",
        ".s1j": "image/vnd.sealedmedia.softseal.jpg",
        ".tap": "image/vnd.tencent.tap",
        ".vtf": "image/vnd.valve.source.texture",
        ".wbmp": "image/vnd.wap.wbmp",
        ".xif": "image/vnd.xiff",
        ".pcx": "image/vnd.zbrush.pcx",
        ".wmf": "image/wmf",
        ".u8msg": "message/global",
        ".u8dsn": "message/global-delivery-status",
        ".u8mdn": "message/global-disposition-notification",
        ".u8hdr": "message/global-headers",
        ".mail": "message/rfc822",
        ".art": "message/rfc822",
        ".gltf": "model/gltf+json",
        ".glb": "model/gltf-binary",
        ".igs": "model/iges",
        ".iges": "model/iges",
        ".msh": "model/mesh",
        ".mesh": "model/mesh",
        ".silo": "model/mesh",
        ".mtl": "model/mtl",
        ".stl": "model/stl",
        ".dae": "model/vnd.collada+xml",
        ".dwf": "model/vnd.dwf",
        ".gdl": "model/vnd.gdl",
        ".gsm": "model/vnd.gdl",
        ".win": "model/vnd.gdl",
        ".dor": "model/vnd.gdl",
        ".lmp": "model/vnd.gdl",
        ".rsm": "model/vnd.gdl",
        ".msm": "model/vnd.gdl",
        ".ism": "model/vnd.gdl",
        ".gtw": "model/vnd.gtw",
        ".moml": "model/vnd.moml+xml",
        ".ogex": "model/vnd.opengex",
        ".x_b": "model/vnd.parasolid.transmit.binary",
        ".xmt_bin": "model/vnd.parasolid.transmit.binary",
        ".x_t": "model/vnd.parasolid.transmit.text",
        ".xmt_txt": "model/vnd.parasolid.transmit.text",
        ".pyox": "model/vnd.pytha.pyox",
        ".vds": "model/vnd.sap.vds",
        ".usdz": "model/vnd.usdz+zip",
        ".bsp": "model/vnd.valve.source.compiled-map",
        ".vtu": "model/vnd.vtu",
        ".wrl": "model/vrml",
        ".vrml": "model/vrml",
        ".x3db": "model/x3d+xml",
        ".x3dv": "model/x3d-vrml",
        ".x3dvz": "model/x3d-vrml",
        ".bmed": "multipart/vnd.bint.med-plus",
        ".vpm": "multipart/voice-message",
        ".appcache": "text/cache-manifest",
        ".manifest": "text/cache-manifest",
        ".ics": "text/calendar",
        ".ifb": "text/calendar",
        ".CQL": "text/cql",
        ".csvs": "text/csv-schema",
        ".soa": "text/dns",
        ".zone": "text/dns",
        ".gff3": "text/gff3",
        ".shtml": "text/html",
        ".cnd": "text/jcr-cnd",
        ".markdown": "text/markdown",
        ".md": "text/markdown",
        ".miz": "text/mizar",
        ".n3": "text/n3",
        ".hh": "text/plain",
        ".cc": "text/plain",
        ".cxx": "text/plain",
        ".hxx": "text/plain",
        ".asm": "text/plain",
        ".cod": "text/plain",
        ".cpp": "text/plain",
        ".cppm": "text/plain",
        ".cs": "text/plain",
        ".cshader": "text/plain",
        ".csproj": "text/plain",
        ".def": "text/plain",
        ".dsh": "text/plain",
        ".dshader": "text/plain",
        ".dsp": "text/plain",
        ".dsw": "text/plain",
        ".filters": "text/plain",
        ".fx": "text/plain",
        ".gitattributes": "text/plain",
        ".gitignore": "text/plain",
        ".gitmodules": "text/plain",
        ".gsh": "text/plain",
        ".gshader": "text/plain",
        ".hlsl": "text/plain",
        ".hlsli": "text/plain",
        ".hpp": "text/plain",
        ".hsh": "text/plain",
        ".hshader": "text/plain",
        ".i": "text/plain",
        ".idl": "text/plain",
        ".inc": "text/plain",
        ".inl": "text/plain",
        ".ipp": "text/plain",
        ".iss": "text/plain",
        ".ixx": "text/plain",
        ".jsproj": "text/plain",
        ".lst": "text/plain",
        ".mak": "text/plain",
        ".map": "text/plain",
        ".mdp": "text/plain",
        ".mk": "text/plain",
        ".odh": "text/plain",
        ".odl": "text/plain",
        ".pkgdef": "text/plain",
        ".pkgundef": "text/plain",
        ".psh": "text/plain",
        ".pshader": "text/plain",
        ".rc": "text/plain",
        ".rc2": "text/plain",
        ".res": "text/plain",
        ".rgs": "text/plain",
        ".s": "text/plain",
        ".sln": "text/plain",
        ".slnf": "text/plain",
        ".srf": "text/plain",
        ".tlh": "text/plain",
        ".tli": "text/plain",
        ".tt": "text/plain",
        ".user": "text/plain",
        ".vb": "text/plain",
        ".vbproj": "text/plain",
        ".vcp": "text/plain",
        ".vcw": "text/plain",
        ".vsh": "text/plain",
        ".vshader": "text/plain",
        ".asc": "text/plain",
        ".text": "text/plain",
        ".pm": "text/plain",
        ".el": "text/plain",
        ".f90": "text/plain",
        ".conf": "text/plain",
        ".log": "text/plain",
        ".provn": "text/provenance-notation",
        ".rst": "text/prs.fallenstein.rst",
        ".tag": "text/prs.lines.tag",
        ".dsc": "text/prs.lines.tag",
        ".sct": "text/scriptlet",
        ".shaclc": "text/shaclc",
        ".htc": "text/x-component",
        ".contact": "text/x-ms-contact",
        ".group": "text/x-ms-group",
        ".iqy": "text/x-ms-iqy",
        ".natvis": "text/xml",
        ".vsct": "text/xml",
        ".vsixlangpack": "text/xml",
        ".vsixmanifest": "text/xml",
        ".vssettings": "text/xml",
        ".vstemplate": "text/xml",
        ".xrm-ms": "text/xml",
        ".3gpp": "video/3gpp",
        ".3gp": "video/3gpp",
        ".3g2": "video/3gpp2",
        ".3gp2": "video/3gpp2",
        ".m4v": "video/mp4",
        ".mp4v": "video/mp4",
        ".m2v": "video/mpeg",
        ".mp2v": "video/mpeg",
        ".mpv2": "video/mpeg",
        ".tod": "video/mpeg",
        ".ogv": "video/ogg",
        ".ogm": "video/ogg",
        ".uvu": "video/vnd.dece.mp4",
        ".m2t": "video/vnd.dlna.mpeg-tts",
        ".m2ts": "video/vnd.dlna.mpeg-tts",
        ".tts": "video/vnd.dlna.mpeg-tts",
        ".mkv": "video/x-matroska",
        ".avi": "video/x-msvideo",
        ".asx": "video/x-ms-asf",
        ".dvr-ms": "video/x-ms-dvr",
        ".wm": "video/x-ms-wm",
        ".wmv": "video/x-ms-wmv",
        ".wmx": "video/x-ms-wmx",
        ".wvx": "video/x-ms-wvx",
    }.items():
        m.add_type(mime, ext, strict=False)

    # Load OS mimes like init() in the default module.
    # NOTE: These will *not* replace or override matching mimetypes already in the map.
    m.read_windows_registry(strict=False)
    for file in knownfiles:
        if os.path.isfile(file):
            m.read(file, strict=False)

    return m


nano_mimetypes = _create_opinionated_mimetypes()
