cask "thunderbird@esr" do
  version "140.13.0esr"

  language "af" do
    sha256 "fec1143f2ee55414c896f356566c47e15c22f905baf72757ce0e89e78f183bbf"
    "af"
  end
  language "ar" do
    sha256 "b1bae39a5917d71f9d4fd22cd7cf63af5037d7c7d77de43d7003eda863de9bed"
    "ar"
  end
  language "be" do
    sha256 "d04b407e1fc73dc49274ab776a15e97dad2dcea63108e726e4430296be50cd9e"
    "be"
  end
  language "bg" do
    sha256 "fff5ecd3562d2dc34da1581fa54271b1bb5a5cca025ebe517c618b64b0fe36f3"
    "bg"
  end
  language "ca" do
    sha256 "101798323adecce96acb50b43dba6d85a39a97363308961ff3cf32e18a15919a"
    "ca"
  end
  language "cs" do
    sha256 "b2f4d553cb1d40fe968decb76a1692ec81653bcef7abcb6f9c7249e63a6ade8f"
    "cs"
  end
  language "cy" do
    sha256 "b8f68c8107f733f81389ef28b9cd23fd119727ae2577631310dd8b4bc2cd0f69"
    "cy"
  end
  language "da" do
    sha256 "81a1147fdb06456e526ffdeb1cce93214558941a56c015a5d90414e65223ea3b"
    "da"
  end
  language "de" do
    sha256 "e4f43a3f30818f1256158aee315e331db11b62991e35d0012e3b6fdbc5d68218"
    "de"
  end
  language "el" do
    sha256 "7115a0b34bb273103c04533ef324d9c5ab1f4f48d78b51638230b1612f643a72"
    "el"
  end
  language "en-CA" do
    sha256 "ba8485237171380c1d89982161b407e9c5b2f79409e772ad03c3cf284864f112"
    "en-CA"
  end
  language "en-GB" do
    sha256 "58415fae55c8ae081b75ce67bad02f76b9e57f714423cbf81f73c12ff17d9787"
    "en-GB"
  end
  language "en", default: true do
    sha256 "eba8b86505a45e9e7ec0f098d781690e561e9904add06d7cef2069c3faebac09"
    "en-US"
  end
  language "es-ES" do
    sha256 "50a9d58fc2c70cbcd5727764dada1134106bdafadc156505b3cd19946c7d44cd"
    "es-ES"
  end
  language "es-MX" do
    sha256 "63722d3338a78a745fa6dc16c5dfea701d30dfd7990f51242c7ab4cbb28df295"
    "es-MX"
  end
  language "et" do
    sha256 "78163c2b96820d02a193c11b2c60ef580ad5a454278a38b36c6b2390aba7334f"
    "et"
  end
  language "fi" do
    sha256 "018cfe046ef08dc9ce2be68da237d76ecd94c05d24b49c69dfaf1503b0385a8c"
    "fi"
  end
  language "fr" do
    sha256 "da8004c8c245afa9abb89b34388daef09010346ba2dc77dc07387ba8a4b3028a"
    "fr"
  end
  language "fy" do
    sha256 "61b03bebec7555f26ee71ffac641ae3e5c8736e184aec6902e3d47edef81eee3"
    "fy-NL"
  end
  language "ga" do
    sha256 "5a49c24f94ae39807682499ef63d731e827123812eaedeba60c754a92d526db4"
    "ga-IE"
  end
  language "gd" do
    sha256 "6a6e57ec3ebda215fb0c0dfe9ac6e2d348d794091aa70db4bdd1a1d70b4bb270"
    "gd"
  end
  language "gl" do
    sha256 "b3db220a2ea5948200aa1027fa7a1fa6664324ce81b075be1887ee58e0bbde5c"
    "gl"
  end
  language "he" do
    sha256 "7184e2cda8f67d13c60f688e1197ae93343f0835325602e1247d04c2a37e8899"
    "he"
  end
  language "hr" do
    sha256 "e92bdd27b8f0bc1ce99141bbb6aff2c37928b73cf262e561839024ec45c497ca"
    "hr"
  end
  language "hu" do
    sha256 "2259a55d824f13e6c098d1ff89d6f6d484a17c11f754f1881d81cf72002e9e5a"
    "hu"
  end
  language "hy" do
    sha256 "b8eb4cb4426f19121b42cd6c6b47811993d4a9cb6192268fc9628b326b2cb031"
    "hy-AM"
  end
  language "is" do
    sha256 "6ab399ff00eecbf3765eee9e70ad67435d677c5de708215c2a4d9141bc0f6c2c"
    "is"
  end
  language "it" do
    sha256 "e297c71a0798760c7b0dddb1584120e8e886fa0fe91fc153158532aa9945ae69"
    "it"
  end
  language "ja" do
    sha256 "9524bea10792a524d64f543b6f9824d4b315c70f1e656fdf2ebb9d29e4b5b250"
    "ja-JP-mac"
  end
  language "ka" do
    sha256 "6f7db229610ff18bbd055169c463f18be9470727bebab960cbec7bf1a6bbb410"
    "ka"
  end
  language "ko" do
    sha256 "67a3e601ba1c6c3d9a1e18a562cc612a12bff6990e6c9490040b64184979ca4b"
    "ko"
  end
  language "lt" do
    sha256 "a15ca065a1017d4bfa4ad97f4d752fa3d95cd5f33b0c51e97cd4f82e99d28671"
    "lt"
  end
  language "lv" do
    sha256 "ce53967aa9947392497ad847b6d29c54136897f0abf16ac65f47b572b2276359"
    "lv"
  end
  language "ms" do
    sha256 "29040f218560675f92089efaaed6d3d254fdd285be17173c78378471bc937948"
    "ms"
  end
  language "nb" do
    sha256 "3c88b82051dfcacfd7228462621dc3fc79b30348051af7491c14119de7d9fa41"
    "nb-NO"
  end
  language "nl" do
    sha256 "39aa0b6ae195c3c054213d2c2cb7b5a7fca29cb96602ecf0fb6997e4bdcf7ff3"
    "nl"
  end
  language "pa-IN" do
    sha256 "65ccd50a5adde6f6d58f1ba529b57f552360be822bcd767d7d7ef15bc0bc9bb1"
    "pa-IN"
  end
  language "pl" do
    sha256 "d62cddd2e10eacd273c0d48fe3f37fd036608e0f41d30c7b83feea4bdb48b7b0"
    "pl"
  end
  language "pt" do
    sha256 "25f1e7edf6330b109f3c41dd59ebf268c46623767e26f540fe1f9d0144f7112a"
    "pt-PT"
  end
  language "pt-BR" do
    sha256 "6b0e3da4aa680e5df488885bd037af7957ce710fc52ee034b58e77af22a5d41a"
    "pt-BR"
  end
  language "rm" do
    sha256 "9c6791a904838f2b31d93754cf9cfca8f06ca30b0ea58197401f8aa1e468afd4"
    "rm"
  end
  language "ro" do
    sha256 "a58730b1091b6fdd7d1adf6f86e2dec7ee575e32d7d66246a211bbc9edf0f086"
    "ro"
  end
  language "ru" do
    sha256 "6e9e0e8234fe7b0d1a6bdd43e6af769c726324ea8218ec5024cac773a7dbdb0b"
    "ru"
  end
  language "sk" do
    sha256 "575966462e0fbf5477ff717e20db037256bee6624cfc7b156cfde2df8982d288"
    "sk"
  end
  language "sl" do
    sha256 "b7a812ef98d68bfe9bb99b97a308a192c538173372d325e4669435f0297cd499"
    "sl"
  end
  language "sq" do
    sha256 "5fa3c9a4bfc94052e4bdb5d7cd918a62c3f72520117a4d0c322425c78831a155"
    "sq"
  end
  language "sr" do
    sha256 "50fd2b3fc88792bd69c24f7858ccd00b96201ff5f3e3f1a8898698ab7118a264"
    "sr"
  end
  language "sv" do
    sha256 "9cad889bf9d1460c4163bae8c09e1201eface43989c132cd7f085a69ef31e583"
    "sv-SE"
  end
  language "th" do
    sha256 "9090e689e53aca470f23211a56e4fd462f81b1dec985b8e0c0b664dd94b8e432"
    "th"
  end
  language "tr" do
    sha256 "d4c6b25f70f23253640fc8a5a54d05f09c1a3dbc44535ed14a959c184e506f65"
    "tr"
  end
  language "uk" do
    sha256 "cfcf103d35db219d3d98ed1b229e10d7129de53e18d148e525aa2862df08f1e5"
    "uk"
  end
  language "uz" do
    sha256 "f648b5007486337f31ac0a5db1df8388f9d2338c80d36afe8d3a4616ad449fd8"
    "uz"
  end
  language "vi" do
    sha256 "fb189b96852417a773e22abca5208a05d762e6beb72861075a61a5e91df8dbd7"
    "vi"
  end
  language "zh-TW" do
    sha256 "817bcd315fa97ec5e9c5b763041fd4a63d9217b1bc6cc41380e85f723019a7d8"
    "zh-TW"
  end
  language "zh" do
    sha256 "f1adb06babee24bca6687f40f6e7ee87c166c8167e414927e8c518806a29a703"
    "zh-CN"
  end

  url "https://download-installer.cdn.mozilla.net/pub/thunderbird/releases/#{version}/mac/#{language}/Thunderbird%20#{version}.dmg",
      verified: "download-installer.cdn.mozilla.net/pub/thunderbird/"
  name "Mozilla Thunderbird ESR"
  name "Mozilla Thunderbird Extended Support Release"
  desc "Customizable email client"
  homepage "https://www.thunderbird.net/#{language}/download/esr/"

  livecheck do
    url "https://product-details.mozilla.org/1.0/thunderbird_versions.json"
    strategy :json do |json|
      json["THUNDERBIRD_ESR"]
    end
  end

  auto_updates true
  conflicts_with cask: "thunderbird"
  depends_on :macos

  app "Thunderbird.app"

  zap trash: [
        "~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/org.mozilla.thunderbird*.sfl*",
        "~/Library/Caches/Mozilla/updates/Applications/Thunderbird*",
        "~/Library/Caches/Thunderbird",
        "~/Library/Preferences/org.mozilla.thunderbird*.plist",
        "~/Library/Saved Application State/org.mozilla.thunderbird*.savedState",
        "~/Library/Thunderbird",
      ],
      rmdir: "~/Library/Caches/Mozilla"
end
