{
    "version": "148.0.7778.97",
    "description": "Fast, secure, and free web browser, built for the modern web.",
    "homepage": "https://www.google.com/chrome/",
    "license": {
        "identifier": "Freeware",
        "url": "https://www.google.com/chrome/terms/"
    },
    "architecture": {
        "64bit": {
            "url": "https://dl.google.com/release2/chrome/ad7zgfslmzq6ji2pjtw77iwzqifa_148.0.7778.97/148.0.7778.97_chrome_installer_uncompressed.exe#/dl.7z",
            "hash": "35e673627774b1f13355dcd19c7b881446785b60b8bcc54f8022075ffe7ac828"
        },
        "32bit": {
            "url": "https://dl.google.com/release2/chrome/ad4fbq6a27ud5kpnludndpgaopoq_148.0.7778.97/148.0.7778.97_chrome_installer_uncompressed.exe#/dl.7z",
            "hash": "94c2ca9daa0c02ef6320155ca3cc75642871d59922696893e754f850a7906c2a"
        },
        "arm64": {
            "url": "https://dl.google.com/release2/chrome/icxnicdqhid7jng4xpzbpjmghm_148.0.7778.97/148.0.7778.97_chrome_installer_uncompressed.exe#/dl.7z",
            "hash": "fb43a6c810358d5a573ae3611aac98842e5121da6a122fcc51bfde85e22d7421"
        }
    },
    "extract_dir": "Chrome-bin",
    "bin": [
        [
            "chrome.exe",
            "chrome"
        ]
    ],
    "shortcuts": [
        [
            "chrome.exe",
            "Google Chrome"
        ]
    ],
    "env_set": {
        "CHROME_EXECUTABLE": "$dir\\chrome.exe"
    },
    "checkver": {
        "script": [
            "$AppID = '{8A69D345-D564-463C-AFF1-A69D9E530F96}'",
            "$ArchParams  = @{",
            "    'x64'   ='x64-stable'",
            "    'x86'   ='x86-stable'",
            "    'arm64' ='arm64-stable'",
            "}",
            "$BodyTemplate = @(",
            "    '<?xml version=\"1.0\" encoding=\"utf-8\"?>',",
            "    '<request protocol=\"3.0\">',",
            "    '  <os platform=\"win\" version=\"10.0.22000\" arch=\"{0}\"/>',",
            "    '  <app appid=\"{1}\" ap=\"{2}\" version=\"\">',",
            "    '    <updatecheck/>',",
            "    '  </app>',",
            "    '</request>'",
            ") -join \"`n\"",
            "$ArchURLs = @{}",
            "$Version = $null",
            "forEach ($Arch in $ArchParams.Keys) {",
            "    $Body = $BodyTemplate -f $Arch, $AppID, $ArchParams[$Arch]",
            "    $Response = Invoke-RestMethod -Uri 'https://update.googleapis.com/service/update2' -Method Post -Body $Body",
            "    if ($Arch -eq 'x64') {",
            "        $Version = $Response.response.app.updatecheck.manifest.version",
            "    }",
            "    $BaseURL = $Response.SelectSingleNode(\"//url[starts-with(@codebase, 'https://dl.google.com/release2/chrome/')]\")",
            "    $BaseURL.GetAttribute('codebase') -match '^https://dl\\.google\\.com/release2/chrome/(?<URL>[^/]+)/'",
            "    $FileName = $Response.SelectSingleNode('//package').GetAttribute('name')",
            "    $ArchURLs[$Arch] = \"$($Matches['URL'])/$FileName\"",
            "}",
            "Write-Output \"$Version,$($ArchURLs['x64']),$($ArchURLs['x86']),$($ArchURLs['arm64'])\""
        ],
        "regex": "(?<version>[\\d.]+),(?<archx64>[^,]+),(?<archx86>[^,]+),(?<archarm64>[^,]+)"
    },
    "autoupdate": {
        "architecture": {
            "64bit": {
                "url": "https://dl.google.com/release2/chrome/$matchArchx64#/dl.7z"
            },
            "32bit": {
                "url": "https://dl.google.com/release2/chrome/$matchArchx86#/dl.7z"
            },
            "arm64": {
                "url": "https://dl.google.com/release2/chrome/$matchArcharm64#/dl.7z"
            }
        }
    }
}
