cask "tor-browser" do
  version "10.0.14"

  language "ar" do
    sha256 "2704ac47d922eb8eeb2fc083955fda10882092e5b54041405e1f656062fc737c"
    "ar"
  end
  language "ca" do
    sha256 "a6d782017aac7eedf723c36ba3842b1b7e6e7d037043891eb5e9ebcb92fb7ff1"
    "ca"
  end
  language "cs" do
    sha256 "1cf0e7e84eca6e3c102c5c4208ba7bebd443e53c694c0d2ac6c58627996c65a0"
    "cs"
  end
  language "da" do
    sha256 "f7e0b71250ec0c11b6d3781eb16257c1130e3a36c4a944cd72019c2544f6a804"
    "da"
  end
  language "de" do
    sha256 "f58335e3d89e8400e19d2665f5f5c8f177f178d14632b91318d4bb507efa0f6b"
    "de"
  end
  language "el" do
    sha256 "a5ed73199facc117a2089310eb39f2cfea4a04c5fc032f3cbea811d5066aa5e2"
    "el"
  end
  language "en", default: true do
    sha256 "c7d3bae94988a190608a137fd1b3ccdf89203011d4d940f894cdd37d1cfeac9e"
    "en-US"
  end
  language "es-AR" do
    sha256 "41fbaf8c8a2cad6976e1ae120f059ad4d4c09d8f6cde69bc56c406c88c6f5a42"
    "es-AR"
  end
  language "es-ES" do
    sha256 "f922eb164afe69d266cc510db55163746b71b46c467bfe34f52d010a6477172a"
    "es-ES"
  end
  language "fa" do
    sha256 "4afb5afdb2306c76b1e71fbf52849caa9f075b951ef2a9a52d6785ac5af0a871"
    "fa"
  end
  language "fr" do
    sha256 "5199bfcd8ae039274baa6e20df0f47f2e8bda18e5ce040e949972163418ac6ba"
    "fr"
  end
  language "ga" do
    sha256 "b5507b704a9db8f7e84ebdadae39ac9843b270045d9482fb50defa55932c93c3"
    "ga-IE"
  end
  language "he" do
    sha256 "13e191f423f34c2a3c68ce549885e6ccb4e99f9d75c489da03347dc4c9989711"
    "he"
  end
  language "hu" do
    sha256 "21a16c214f2b4d60ad6d82724d0ad77c97662685568e9475cd8a37369e24f5fa"
    "hu"
  end
  language "id" do
    sha256 "37dca21b4579b80373946e49f6148a37d8db6302f71e9efa60d7919d5b36b608"
    "id"
  end
  language "is" do
    sha256 "576ce56682450bc149ba01e8bf1a3393f794bd59ae53b5e0b264a4796332f532"
    "is"
  end
  language "it" do
    sha256 "7f656dcefe7fdee9d8828d6683304d01125887a5b1f7b7d14d2147a915b1e03a"
    "it"
  end
  language "ja" do
    sha256 "c7fe9221aa0bdf797704fad98911250f1f19215106f644cbf3030487f1b080d4"
    "ja"
  end
  language "ka" do
    sha256 "d35019c7621a1f3b61f4298e9f74bbc3f00bcb3b44473b3e5fa24832e8dd61de"
    "ka"
  end
  language "ko" do
    sha256 "05d3fe4f0e4e4cf825df4d4d26404f521ca1064a07e8261784db309cadf3cdd1"
    "ko"
  end
  language "lt" do
    sha256 "7207c9dc5674d616272fa186f0d110604dd5f50fe3e8f85b6b69fea234338129"
    "lt"
  end
  language "mk" do
    sha256 "03417e32ad170bd272f02f10b39a1ebb78a7f954df975b39184fe9f937477b0d"
    "mk"
  end
  language "ms" do
    sha256 "d0348203f96f074b29a6b76e0d8fe3bee34c82a4ae58e93a97be70fd9649cb9e"
    "ms"
  end
  language "nb" do
    sha256 "4b4a203d60ebe62a9a401c70c997f2e7b9d0d1d7d58ed849c02b5ea29e7f605a"
    "nb-NO"
  end
  language "nl" do
    sha256 "4adb2dfd44180e76c77f373c0449c18cabd5d18430a7889b71cf72f3267b1fe1"
    "nl"
  end
  language "pl" do
    sha256 "9be96e7dc2597b7c92bf1115a5c4122327d0ce080e180a28b50fb3dc0d5fcdc0"
    "pl"
  end
  language "pt" do
    sha256 "61fff685651aeb33f48c3caa52e732d67a0ea3f1a00c103db5390aef375557dd"
    "pt-BR"
  end
  language "ro" do
    sha256 "c657e697cccf80f5512c7a61cb6fe5ac1f72ae032763b5ea528630e6b481f102"
    "ro"
  end
  language "ru" do
    sha256 "6be1d6ead7416278b571bdaed12d40cf04446dffb1a73390254ea1f9fab6a9cc"
    "ru"
  end
  language "sv" do
    sha256 "0efa69ffca33ca84cb733a6fc615663210ecdada9d34b6ecc7d81d2baa67a825"
    "sv-SE"
  end
  language "th" do
    sha256 "b9d9d5bd8d99e94b6ef6664e447445234a797839e33238d1887386eaf1e23883"
    "th"
  end
  language "tr" do
    sha256 "6c6ad91fd6ff4f9f9601384474b6cfeff3452b977aba786119fbd5dc712b0a8b"
    "tr"
  end
  language "vi" do
    sha256 "1b585db0808109fdf38d3d313af44260d6f0cb4eeda9a7cbe52f98aa2ddaed7d"
    "vi"
  end
  language "zh-CN" do
    sha256 "e8676bb9b8935b5c5b6cfbd9e0df0ff77a368783ab1246240f772f7091bb0e2a"
    "zh-CN"
  end
  language "zh-TW" do
    sha256 "6fe0221fd27416a0ea9c8080e98d6b2d026be4f9ec3ea69123460153792d5ad9"
    "zh-TW"
  end

  url "https://dist.torproject.org/torbrowser/#{version}/TorBrowser-#{version}-osx64_#{language}.dmg"
  name "Tor Browser"
  desc "Web browser focusing on security"
  homepage "https://www.torproject.org/"

  livecheck do
    url "https://www.torproject.org/download/"
    strategy :page_match
    regex(%r{href=.*?/TorBrowser-(\d+(?:\.\d+)*)-osx64_.*\.dmg}i)
  end

  auto_updates true
  conflicts_with cask: "homebrew/cask-versions/tor-browser-alpha"

  app "Tor Browser.app"

  zap trash: [
    "~/Library/Application Support/TorBrowser-Data",
    "~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/org.mozilla.tor browser.sfl*",
    "~/Library/Preferences/org.mozilla.tor browser.plist",
    "~/Library/Preferences/org.torproject.torbrowser.plist",
    "~/Library/SavedApplicationState/org.torproject.torbrowser.savedState",
  ]
end
