{
    "version": "150.0.7829.0",
    "description": "Fast, secure, and free web browser, built for the modern web.",
    "homepage": "https://www.google.com/chrome/canary",
    "license": {
        "identifier": "Freeware",
        "url": "https://www.google.com/chrome/privacy/eula_text.html"
    },
    "architecture": {
        "64bit": {
            "url": "https://dl.google.com/release2/chrome/adpyvuqqoj77guw2gxovqgptkw2q_150.0.7829.0/150.0.7829.0_chrome_installer_uncompressed.exe#/dl.7z",
            "hash": "150fca9ccf978b0174fd1a618fc530b3033c75a9d581e8ae38e1a8bc12864f07"
        },
        "32bit": {
            "url": "https://dl.google.com/release2/chrome/adkgldposmf76elaty2ay2sbealq_150.0.7829.0/150.0.7829.0_chrome_installer_uncompressed.exe#/dl.7z",
            "hash": "ad5adf69f118569ebb9282d7211a962c7572161656f2831d100fb35ed86e2850"
        },
        "arm64": {
            "url": "https://dl.google.com/release2/chrome/acpsotvpzg5gvp7emwlnvvhd3aeq_150.0.7828.0/150.0.7828.0_chrome_installer_uncompressed.exe#/dl.7z",
            "hash": "acb806688af15619b6c4327d8c9cd9086cd40aedb1db6b0975321b9bd25fe13c"
        }
    },
    "extract_dir": "Chrome-bin",
    "bin": [
        [
            "chrome.exe",
            "chrome-canary"
        ]
    ],
    "shortcuts": [
        [
            "chrome.exe",
            "Google Chrome (Canary)"
        ]
    ],
    "checkver": {
        "script": [
            "$AppID = '{4EA16AC7-FD5A-47C3-875B-DBF4A2008C20}'",
            "$ArchParams  = @{",
            "    'x64'   ='x64-statsdef_1'",
            "    'x86'   ='x86-canary'",
            "    'arm64' ='arm64-canary'",
            "}",
            "$BodyTemplate = @(",
            "    '<?xml version=\"1.0\" encoding=\"UTF-8\"?>',",
            "    '<request protocol=\"3.0\">',",
            "    '  <os platform=\"win\" version=\"10.0.22000.0\" 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"
            }
        }
    }
}
