Socket
Socket
Sign inDemoInstall

detect-gpu

Package Overview
Dependencies
Maintainers
2
Versions
193
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

detect-gpu - npm Package Compare versions

Comparing version 4.0.50 to 5.0.1

dist/benchmarks/m-samsung.json

11

dist/benchmarks/d-adreno.json
[
"4.0.50",
"5.0.1",
[
"qualcomm adreno 540",
"540",
"540 adreno qualcomm",
0,

@@ -18,2 +19,3 @@ [

"540",
"540 adreno gpu qualcomm",
0,

@@ -31,2 +33,3 @@ [

"618",
"618 adreno gpu qualcomm",
0,

@@ -44,2 +47,3 @@ [

"630",
"630 adreno gpu qualcomm",
0,

@@ -57,2 +61,3 @@ [

"675",
"675 adreno gpu qualcomm",
0,

@@ -70,2 +75,3 @@ [

"680",
"680 adreno gpu qualcomm",
0,

@@ -83,2 +89,3 @@ [

"685",
"685 adreno gpu qualcomm",
0,

@@ -101,2 +108,3 @@ [

"690",
"690 adreno gpu qualcomm",
0,

@@ -114,2 +122,3 @@ [

"8",
"3 8cx adreno gen qualcomm",
0,

@@ -116,0 +125,0 @@ [

[
"4.0.50",
"5.0.1",
[
"apple a14",
"14",
"a14 apple",
0,

@@ -18,2 +19,3 @@ [

"1",
"apple m1",
0,

@@ -31,2 +33,3 @@ [

"1",
"apple m1 max",
0,

@@ -44,2 +47,3 @@ [

"1",
"apple m1 pro",
0,

@@ -57,2 +61,3 @@ [

"1",
"apple m1 ultra",
0,

@@ -70,2 +75,3 @@ [

"2",
"apple m2",
0,

@@ -88,2 +94,3 @@ [

"",
"apple device paravirtual",
0,

@@ -90,0 +97,0 @@ [

[
"4.0.50",
"5.0.1",
[
"intel",
"",
"intel",
0,

@@ -18,2 +19,3 @@ [

"0",
"0x496e74656c2048442047726170686963000732034343 intel",
0,

@@ -31,2 +33,3 @@ [

"350",
"a350m arc intel",
0,

@@ -44,2 +47,3 @@ [

"370",
"a370m arc intel",
0,

@@ -62,2 +66,3 @@ [

"380",
"a380 arc intel",
0,

@@ -80,2 +85,3 @@ [

"550",
"a550m arc intel",
0,

@@ -93,2 +99,3 @@ [

"580",
"a580 arc intel",
0,

@@ -106,2 +113,3 @@ [

"730",
"a730m arc intel",
0,

@@ -119,2 +127,3 @@ [

"750",
"a750 arc intel",
0,

@@ -132,2 +141,3 @@ [

"770",
"a770 arc intel",
0,

@@ -150,2 +160,3 @@ [

"770",
"a770m arc intel",
0,

@@ -157,2 +168,7 @@ [

714
],
[
2560,
1600,
60
]

@@ -164,2 +180,3 @@ ]

"p",
"broxton-p hd intel",
0,

@@ -177,2 +194,3 @@ [

"hd",
"cherryview hd intel",
0,

@@ -190,2 +208,3 @@ [

"uhd",
"coffee intel lake uhd",
0,

@@ -203,2 +222,3 @@ [

"2",
" 630 coffeelake-h graphics gt2 intel uhd",
0,

@@ -216,2 +236,3 @@ [

"630",
"630 cometlake graphics intel uhd",
0,

@@ -229,2 +250,3 @@ [

"2",
"2nd controller core corporation family gen graphics integrated intel processor",
0,

@@ -242,2 +264,3 @@ [

"2",
"2nd controller core corporation family generation graphics integrated intel processor",
0,

@@ -255,2 +278,3 @@ [

"3",
"3rd controller core corporation gen graphics intel processor",
0,

@@ -268,2 +292,3 @@ [

"8",
"8th core corporation gaussian gen intel mixture model processor",
0,

@@ -281,2 +306,3 @@ [

"36",
"& atom corporation display graphics intel processor series z36xxx z37xxx",
0,

@@ -299,2 +325,3 @@ [

"4200",
"atom celeron controller corporation graphics integrated intel n4200 pentium processor series",
0,

@@ -312,2 +339,3 @@ [

"5",
"atom celeron controller corporation graphics integrated intel pentium processor x5-e8000",
0,

@@ -325,2 +353,3 @@ [

"5",
"atom celeron configuration corporation intel pci pentium processor registers series x5-e8000",
0,

@@ -338,2 +367,3 @@ [

"u",
"broadwell-u corporation integrated intel",
0,

@@ -351,2 +381,3 @@ [

"3350",
"atom celeron controller corporation e3900 graphics integrated intel n3350 n4200 series",
0,

@@ -364,2 +395,3 @@ [

"2",
" 630 coffeelake-h corporation graphics gt2 intel uhd",
0,

@@ -377,2 +409,3 @@ [

"2",
" cometlake-h corporation graphics gt2 intel uhd",
0,

@@ -390,2 +423,3 @@ [

"2",
" 630 cometlake-s corporation graphics gt2 intel uhd",
0,

@@ -403,2 +437,3 @@ [

"2",
" cometlake-u corporation graphics gt2 intel uhd",
0,

@@ -416,2 +451,3 @@ [

"",
"corporation device intel",
0,

@@ -429,2 +465,3 @@ [

"600",
" 600 corporation geminilake graphics intel uhd",
0,

@@ -442,2 +479,3 @@ [

"ult",
"controller corporation graphics haswell-ult integrated intel",
0,

@@ -455,2 +493,3 @@ [

"hd",
"corporation hd intel",
0,

@@ -468,2 +507,3 @@ [

"500",
"500 corporation graphics hd intel",
0,

@@ -481,2 +521,3 @@ [

"510",
"510 corporation graphics hd intel",
0,

@@ -494,2 +535,3 @@ [

"515",
"515 corporation graphics hd intel",
0,

@@ -507,2 +549,3 @@ [

"520",
"520 corporation graphics hd intel",
0,

@@ -520,2 +563,3 @@ [

"530",
"530 corporation graphics hd intel",
0,

@@ -533,2 +577,3 @@ [

"5300",
"5300 corporation graphics hd intel",
0,

@@ -546,2 +591,3 @@ [

"5500",
"5500 corporation graphics hd intel",
0,

@@ -559,2 +605,3 @@ [

"610",
"610 corporation graphics hd intel",
0,

@@ -572,2 +619,3 @@ [

"620",
"620 corporation graphics hd intel",
0,

@@ -590,2 +638,3 @@ [

"630",
"630 corporation graphics hd intel",
0,

@@ -603,2 +652,3 @@ [

"540",
"540 corporation graphics intel iris",
0,

@@ -616,2 +666,3 @@ [

"6100",
"6100 corporation graphics intel iris",
0,

@@ -629,2 +680,3 @@ [

"650",
"650 corporation graphics intel iris plus",
0,

@@ -642,2 +694,3 @@ [

"655",
"655 corporation graphics intel iris plus",
0,

@@ -655,2 +708,3 @@ [

"1",
"corporation g1 graphics intel iris plus",
0,

@@ -668,2 +722,3 @@ [

"7",
"corporation g7 graphics intel iris plus",
0,

@@ -681,2 +736,3 @@ [

"580",
"580 corporation graphics intel iris pro",
0,

@@ -694,2 +750,3 @@ [

"6200",
"6200 corporation graphics intel iris pro",
0,

@@ -707,2 +764,3 @@ [

"xe",
"corporation intel iris xe",
0,

@@ -720,2 +778,3 @@ [

"sky",
"corporation integrated intel lake sky",
0,

@@ -733,2 +792,3 @@ [

"2",
" 520 corporation graphics gt2 hd intel skylake",
0,

@@ -751,2 +811,3 @@ [

"",
"corporation integrated intel skylake",
0,

@@ -764,2 +825,3 @@ [

"2",
" corporation graphics gt2 intel iris tigerlake xe",
0,

@@ -777,2 +839,3 @@ [

"2",
" corporation graphics gt2 intel iris tigerlake-lp xe",
0,

@@ -790,2 +853,3 @@ [

"uhd",
"corporation intel uhd",
0,

@@ -803,2 +867,3 @@ [

"605",
"605 corporation graphics intel uhd",
0,

@@ -816,2 +881,3 @@ [

"615",
"615 corporation graphics intel uhd",
0,

@@ -829,2 +895,3 @@ [

"620",
"620 corporation graphics intel uhd",
0,

@@ -842,2 +909,3 @@ [

"630",
"630 corporation graphics intel uhd",
0,

@@ -855,2 +923,3 @@ [

"2",
" 620 corporation graphics gt2 intel uhd whiskeylake-u",
0,

@@ -868,2 +937,3 @@ [

"3",
"controller core corporation e3-1200 gen graphics intel processor v2 xeon",
0,

@@ -881,2 +951,3 @@ [

"3",
"controller core corporation e3-1200 gen graphics integrated intel processor v3 xeon",
0,

@@ -909,2 +980,3 @@ [

"655",
" 655 chipset corporation graphics intel iris plus series",
0,

@@ -922,2 +994,3 @@ [

"960",
"960 geforce gtx intel",
0,

@@ -935,2 +1008,3 @@ [

"12",
"controller desktop gen12 graphics intel",
0,

@@ -948,2 +1022,3 @@ [

"1",
"dch gfx-driver-user-feature_dg1_poweron-27723 graphics intel releaseinternal",
0,

@@ -959,4 +1034,18 @@ [

[
"intel graphics hd 4600",
"4600",
"4600 graphics hd intel",
0,
[
[
1920,
1080,
35
]
]
],
[
"intel hd",
"hd",
"hd intel",
0,

@@ -1009,2 +1098,3 @@ [

"4000",
"4000 hd intel",
0,

@@ -1022,2 +1112,3 @@ [

"530",
"530 hd intel",
0,

@@ -1035,2 +1126,3 @@ [

"3000",
"3000 graphics hd intel",
0,

@@ -1053,2 +1145,3 @@ [

"4000",
"4000 graphics hd intel",
0,

@@ -1096,2 +1189,3 @@ [

"4000",
" 4000 graphics hd intel",
0,

@@ -1109,2 +1203,3 @@ [

"4400",
"4400 graphics hd intel",
0,

@@ -1142,2 +1237,3 @@ [

"4600",
"4600 graphics hd intel",
0,

@@ -1195,2 +1291,3 @@ [

"500",
"500 graphics hd intel",
0,

@@ -1213,2 +1310,3 @@ [

"5000",
"5000 graphics hd intel",
0,

@@ -1256,2 +1354,3 @@ [

"505",
"505 graphics hd intel",
0,

@@ -1274,2 +1373,3 @@ [

"510",
"510 graphics hd intel",
0,

@@ -1280,3 +1380,3 @@ [

768,
29
46
],

@@ -1296,3 +1396,3 @@ [

1080,
27
26
]

@@ -1304,2 +1404,3 @@ ]

"515",
"515 graphics hd intel",
0,

@@ -1352,2 +1453,3 @@ [

"520",
"520 graphics hd intel",
0,

@@ -1380,2 +1482,3 @@ [

"530",
"530 graphics hd intel",
0,

@@ -1418,2 +1521,3 @@ [

"5300",
"5300 graphics hd intel",
0,

@@ -1441,2 +1545,3 @@ [

"5500",
"5500 graphics hd intel",
0,

@@ -1459,2 +1564,3 @@ [

"5600",
"5600 graphics hd intel",
0,

@@ -1482,2 +1588,3 @@ [

"6000",
"6000 graphics hd intel",
0,

@@ -1505,2 +1612,3 @@ [

"610",
"610 graphics hd intel",
0,

@@ -1533,2 +1641,3 @@ [

"615",
"615 graphics hd intel",
0,

@@ -1576,2 +1685,3 @@ [

"620",
"620 graphics hd intel",
0,

@@ -1582,3 +1692,3 @@ [

1080,
26
37
],

@@ -1605,2 +1715,3 @@ [

"620",
"620 graphics hd intel macos",
0,

@@ -1618,2 +1729,3 @@ [

"630",
"630 graphics hd intel",
0,

@@ -1656,2 +1768,3 @@ [

"630",
"630 graphics gt2 hd intel",
0,

@@ -1674,2 +1787,3 @@ [

"hdcfl",
"cfl crb graphics hd intel",
0,

@@ -1687,2 +1801,3 @@ [

"hd",
"family graphics hd intel",
0,

@@ -1700,2 +1815,3 @@ [

"hdicl",
"graphics hd icl intel rvp",
0,

@@ -1713,2 +1829,3 @@ [

"hdicl",
"bigsur graphics hd icl intel rvp",
0,

@@ -1726,2 +1843,3 @@ [

"hdkbl",
"crb graphics hd intel kbl",
0,

@@ -1744,2 +1862,3 @@ [

"4600",
"graphics hd intel p4600",
0,

@@ -1767,2 +1886,3 @@ [

"530",
"graphics hd intel p530",
0,

@@ -1785,2 +1905,3 @@ [

"630",
"graphics hd intel p630",
0,

@@ -1803,2 +1924,3 @@ [

"10",
" gen10 graphics hd intel",
0,

@@ -1816,2 +1938,3 @@ [

"5500",
"broadwell hd5500 intel pg7",
0,

@@ -1829,2 +1952,3 @@ [

"5500",
"graphics hd5500 intel pg7",
0,

@@ -1842,2 +1966,3 @@ [

"",
"intel iris",
0,

@@ -1870,2 +1995,3 @@ [

"5100",
"5100 graphics intel iris",
0,

@@ -1888,2 +2014,3 @@ [

"540",
"540 graphics intel iris",
0,

@@ -1921,2 +2048,3 @@ [

"550",
"550 graphics intel iris",
0,

@@ -1954,2 +2082,3 @@ [

"6100",
"6100 graphics intel iris",
0,

@@ -1977,2 +2106,3 @@ [

"6200",
"6200 graphics intel iris",
0,

@@ -1990,2 +2120,3 @@ [

"640",
"640 graphics intel iris",
0,

@@ -2008,2 +2139,3 @@ [

"650",
"650 graphics intel iris",
0,

@@ -2021,2 +2153,3 @@ [

"580",
"graphics intel iris p580",
0,

@@ -2034,2 +2167,3 @@ [

"",
"intel iris plus",
0,

@@ -2072,2 +2206,3 @@ [

"640",
"640 graphics intel iris plus",
0,

@@ -2125,2 +2260,3 @@ [

"645",
"645 graphics intel iris plus",
0,

@@ -2148,2 +2284,3 @@ [

"650",
"650 graphics intel iris plus",
0,

@@ -2176,2 +2313,3 @@ [

"655",
"655 graphics intel iris plus",
0,

@@ -2204,2 +2342,3 @@ [

"1",
"g1 graphics intel iris plus",
0,

@@ -2217,2 +2356,3 @@ [

"7",
"g7 graphics intel iris plus",
0,

@@ -2230,2 +2370,3 @@ [

"pro",
"intel iris pro",
0,

@@ -2243,2 +2384,3 @@ [

"5200",
"5200 graphics intel iris pro",
0,

@@ -2271,2 +2413,3 @@ [

"580",
"580 graphics intel iris pro",
0,

@@ -2299,2 +2442,3 @@ [

"6200",
"6200 graphics intel iris pro",
0,

@@ -2332,2 +2476,3 @@ [

"580",
"graphics intel iris p580 pro",
0,

@@ -2355,2 +2500,3 @@ [

"6300",
"graphics intel iris p6300 pro",
0,

@@ -2378,2 +2524,3 @@ [

"xe",
"intel iris xe",
0,

@@ -2391,2 +2538,3 @@ [

"xe",
"graphics intel iris releaseinternal xe",
0,

@@ -2404,2 +2552,3 @@ [

"xeri",
"graphics intel iris ri xe",
0,

@@ -2417,2 +2566,3 @@ [

"xe",
"intel iris max xe",
0,

@@ -2435,2 +2585,3 @@ [

"2",
"graphics gt2 hd intel kabylake ult",
0,

@@ -2448,2 +2599,3 @@ [

"2",
"graphics gt2 hd intel kabylake ulx",
0,

@@ -2466,2 +2618,3 @@ [

"kbl",
"intel kbl unknown",
0,

@@ -2479,2 +2632,3 @@ [

"dribay",
"bay dri intel mesa trail",
0,

@@ -2492,2 +2646,3 @@ [

"dri",
"dri haswell intel mesa mobile",
0,

@@ -2505,2 +2660,3 @@ [

"drihd",
"dri hd intel mesa",
0,

@@ -2518,2 +2674,3 @@ [

"400",
"400 dri graphics hd intel mesa",
0,

@@ -2531,2 +2688,3 @@ [

"505",
"505 dri graphics hd intel mesa",
0,

@@ -2544,2 +2702,3 @@ [

"520",
"520 dri graphics hd intel mesa",
0,

@@ -2562,2 +2721,3 @@ [

"530",
"530 dri graphics hd intel mesa",
0,

@@ -2575,2 +2735,3 @@ [

"5500",
"5500 dri graphics hd intel mesa",
0,

@@ -2588,2 +2749,3 @@ [

"620",
"620 dri graphics hd intel mesa",
0,

@@ -2601,2 +2763,3 @@ [

"630",
"630 dri graphics hd intel mesa",
0,

@@ -2614,2 +2777,3 @@ [

"4000",
"dri graphics hd intel mesa p4000",
0,

@@ -2627,2 +2791,3 @@ [

"540",
"540 dri graphics intel iris mesa",
0,

@@ -2640,2 +2805,3 @@ [

"dri",
"desktop dri intel ivybridge mesa",
0,

@@ -2653,2 +2819,3 @@ [

"dri",
"dri intel ivybridge mesa mobile",
0,

@@ -2666,2 +2833,3 @@ [

"2",
"dri gt2 intel kabylake mesa",
0,

@@ -2679,2 +2847,3 @@ [

"dri",
"desktop dri intel mesa sandybridge",
0,

@@ -2692,2 +2861,3 @@ [

"dri",
"dri intel mesa mobile sandybridge",
0,

@@ -2705,2 +2875,3 @@ [

"620",
"620 dri graphics intel mesa uhd",
0,

@@ -2718,2 +2889,3 @@ [

"630",
"630 dri graphics intel mesa uhd",
0,

@@ -2731,2 +2903,3 @@ [

"520",
"520 graphics hd intel mesa",
0,

@@ -2744,2 +2917,3 @@ [

"530",
"530 graphics hd intel mesa",
0,

@@ -2757,2 +2931,3 @@ [

"4",
"4 intel ivy phdgd",
0,

@@ -2770,2 +2945,3 @@ [

"16",
"16 intel pro radeon vega",
0,

@@ -2783,2 +2959,3 @@ [

"0",
"0 4 amd bonaire intel on radeong",
0,

@@ -2796,2 +2973,3 @@ [

"0",
"0 4 amd cape intel on radeong verde",
0,

@@ -2809,2 +2987,3 @@ [

"0",
"0 4 amd intel on polaris10 radeong",
0,

@@ -2822,2 +3001,3 @@ [

"0",
"0 4 amd intel on radeong tonga",
0,

@@ -2835,2 +3015,3 @@ [

"skl",
"intel skl unknown",
0,

@@ -2848,2 +3029,3 @@ [

"2",
" 520 graphics gt2 hd intel skylake",
0,

@@ -2861,2 +3043,3 @@ [

"uhd",
"intel uhd",
0,

@@ -2894,2 +3077,3 @@ [

"630",
"630 intel uhd",
0,

@@ -2907,2 +3091,3 @@ [

"600",
"600 graphics intel uhd",
0,

@@ -2940,2 +3125,3 @@ [

"600",
"600 graphics intel uhd universal",
0,

@@ -2953,2 +3139,3 @@ [

"605",
"605 graphics intel uhd",
0,

@@ -2965,2 +3152,7 @@ [

37
],
[
3840,
2160,
10
]

@@ -2972,2 +3164,3 @@ ]

"610",
"610 graphics intel uhd",
0,

@@ -3000,2 +3193,3 @@ [

"615",
"615 graphics intel uhd",
0,

@@ -3023,2 +3217,3 @@ [

"617",
"617 graphics intel uhd",
0,

@@ -3051,2 +3246,3 @@ [

"620",
"620 graphics intel uhd",
0,

@@ -3074,2 +3270,3 @@ [

"630",
"630 graphics intel uhd",
0,

@@ -3105,3 +3302,3 @@ [

1440,
25
22
],

@@ -3126,4 +3323,18 @@ [

[
"intel uhd graphics 710",
"710",
"710 graphics intel uhd",
0,
[
[
1920,
1080,
46
]
]
],
[
"intel uhd graphics 730",
"730",
"730 graphics intel uhd",
0,

@@ -3141,2 +3352,3 @@ [

"750",
"750 graphics intel uhd",
0,

@@ -3159,2 +3371,3 @@ [

"770",
"770 graphics intel uhd",
0,

@@ -3165,3 +3378,3 @@ [

1080,
114
58
],

@@ -3178,2 +3391,3 @@ [

"23599",
"gfx-driver-user-comp_core-23599 graphics intel uhd",
0,

@@ -3191,2 +3405,3 @@ [

"630",
"graphics intel p630 uhd",
0,

@@ -3209,2 +3424,3 @@ [

"uhd",
"graphics intel releaseinternal uhd",
0,

@@ -3227,2 +3443,3 @@ [

"uhdri",
"graphics intel ri uhd",
0,

@@ -3240,2 +3457,3 @@ [

"11",
" gen11 graphics intel lp uhd",
0,

@@ -3253,2 +3471,3 @@ [

"12",
" gen12 graphics intel lp releaseinternal uhd",
0,

@@ -3266,2 +3485,3 @@ [

"uhdlkf",
" graphics intel lkf uhd",
0,

@@ -3279,2 +3499,3 @@ [

"",
"intel unknown",
0,

@@ -3292,2 +3513,3 @@ [

"xe",
"intel xe",
0,

@@ -3310,2 +3532,3 @@ [

"xe",
"graphics intel releaseinternal xe",
0,

@@ -3323,2 +3546,3 @@ [

"3",
"controller core e3-1200 gen graphics integrated intel processor v3 xeon",
0,

@@ -3325,0 +3549,0 @@ [

[
"4.0.50",
"5.0.1",
[
"adreno 506",
"506",
"506 adreno",
0,

@@ -19,2 +20,3 @@ [

"530",
"530 adreno",
0,

@@ -39,2 +41,3 @@ [

"615",
"615 adreno",
0,

@@ -53,2 +56,3 @@ [

"618",
"618 adreno",
0,

@@ -67,2 +71,3 @@ [

"620",
"620 adreno",
0,

@@ -81,2 +86,3 @@ [

"630",
"630 adreno",
0,

@@ -95,2 +101,3 @@ [

"640",
"640 adreno",
0,

@@ -109,2 +116,3 @@ [

"205",
"205 adreno qualcomm",
0,

@@ -123,2 +131,3 @@ [

"304",
"304 adreno qualcomm",
0,

@@ -251,2 +260,3 @@ [

"305",
"305 adreno qualcomm",
0,

@@ -493,2 +503,3 @@ [

"306",
"306 adreno qualcomm",
0,

@@ -663,2 +674,3 @@ [

"308",
"308 adreno qualcomm",
0,

@@ -761,2 +773,3 @@ [

"320",
"320 adreno qualcomm",
0,

@@ -841,2 +854,3 @@ [

"330",
"330 adreno qualcomm",
0,

@@ -999,2 +1013,3 @@ [

"405",
"405 adreno qualcomm",
0,

@@ -1127,2 +1142,3 @@ [

"418",
"418 adreno qualcomm",
0,

@@ -1189,2 +1205,3 @@ [

"420",
"420 adreno qualcomm",
0,

@@ -1245,2 +1262,3 @@ [

"430",
"430 adreno qualcomm",
0,

@@ -1313,2 +1331,3 @@ [

"505",
"505 adreno qualcomm",
0,

@@ -1435,2 +1454,3 @@ [

"506",
"506 adreno qualcomm",
0,

@@ -1533,2 +1553,3 @@ [

"508",
"508 adreno qualcomm",
0,

@@ -1565,2 +1586,3 @@ [

"509",
"509 adreno qualcomm",
0,

@@ -1585,2 +1607,3 @@ [

"510",
"510 adreno qualcomm",
0,

@@ -1677,2 +1700,3 @@ [

"512",
"512 adreno qualcomm",
0,

@@ -1721,2 +1745,3 @@ [

"530",
"530 adreno qualcomm",
0,

@@ -1813,2 +1838,3 @@ [

"540",
"540 adreno qualcomm",
0,

@@ -1911,2 +1937,3 @@ [

"612",
"612 adreno qualcomm",
0,

@@ -1925,2 +1952,3 @@ [

"615",
"615 adreno qualcomm",
0,

@@ -1945,2 +1973,3 @@ [

"616",
"616 adreno qualcomm",
0,

@@ -1959,2 +1988,3 @@ [

"618",
"618 adreno qualcomm",
0,

@@ -1981,8 +2011,14 @@ [

[
2340,
1036,
33,
2210,
1080,
32,
"xiaomi mi 9t"
],
[
2314,
1044,
31,
"samsung galaxy a72 (sm-a725m)"
],
[
2274,

@@ -1998,2 +2034,3 @@ 1080,

"619",
"619 adreno qualcomm",
0,

@@ -2012,2 +2049,3 @@ [

"620",
"620 adreno qualcomm",
0,

@@ -2026,2 +2064,3 @@ [

"630",
"630 adreno qualcomm",
0,

@@ -2046,2 +2085,3 @@ [

"640",
"640 adreno qualcomm",
0,

@@ -2138,2 +2178,3 @@ [

"642",
"642l adreno qualcomm",
0,

@@ -2152,2 +2193,3 @@ [

"644",
"644 adreno qualcomm",
0,

@@ -2166,2 +2208,3 @@ [

"650",
"650 adreno qualcomm",
0,

@@ -2216,2 +2259,3 @@ [

"660",
"660 adreno qualcomm",
0,

@@ -2236,2 +2280,3 @@ [

"702",
"702 adreno qualcomm",
0,

@@ -2250,2 +2295,3 @@ [

"730",
"730 adreno qualcomm",
0,

@@ -2278,5 +2324,5 @@ [

[
2988,
1384,
75,
2820,
1440,
77,
"samsung galaxy s22 ultra (sm-s908e)"

@@ -2283,0 +2329,0 @@ ],

[
"4.0.50",
"5.0.1",
[
"apple a10 gpu",
"10",
"a10 apple gpu",
0,

@@ -25,2 +26,3 @@ [

"10",
"a10x apple gpu",
0,

@@ -51,2 +53,3 @@ [

"12",
"a12 apple gpu",
0,

@@ -77,2 +80,3 @@ [

"12",
"a12x apple gpu",
0,

@@ -97,2 +101,3 @@ [

"12",
"a12z apple gpu",
0,

@@ -117,2 +122,3 @@ [

"13",
"a13 apple gpu",
0,

@@ -131,2 +137,3 @@ [

"14",
"a14 apple gpu",
0,

@@ -138,3 +145,3 @@ [

60,
"apple ipad (10th generation)"
"apple ipad air (4th generation)"
],

@@ -152,2 +159,3 @@ [

"15",
"a15 apple gpu",
0,

@@ -172,2 +180,3 @@ [

"7",
"a7 apple gpu",
0,

@@ -186,2 +195,3 @@ [

"8",
"a8 apple gpu",
0,

@@ -200,2 +210,3 @@ [

"8",
"a8x apple gpu",
0,

@@ -214,2 +225,3 @@ [

"9",
"a9 apple gpu",
0,

@@ -228,2 +240,3 @@ [

"9",
"a9x apple gpu",
0,

@@ -248,2 +261,3 @@ [

"1",
"apple gpu m1",
0,

@@ -274,2 +288,3 @@ [

"2",
"apple gpu m2",
0,

@@ -276,0 +291,0 @@ [

20

dist/benchmarks/m-apple.json
[
"4.0.50",
"5.0.1",
[
"apple a10 gpu",
"10",
"a10 apple gpu",
0,

@@ -31,2 +32,3 @@ [

"11",
"a11 apple gpu",
0,

@@ -51,2 +53,3 @@ [

"12",
"a12 apple gpu",
0,

@@ -64,3 +67,3 @@ [

60,
"apple iphone xs"
"apple iphone xs max"
],

@@ -78,2 +81,3 @@ [

"13",
"a13 apple gpu",
0,

@@ -90,3 +94,3 @@ [

828,
60,
66,
"apple iphone 11"

@@ -111,2 +115,3 @@ ],

"14",
"a14 apple gpu",
0,

@@ -137,2 +142,3 @@ [

"15",
"a15 apple gpu",
0,

@@ -162,3 +168,3 @@ [

60,
"apple iphone 14 plus"
"apple iphone 13 pro max"
]

@@ -170,2 +176,3 @@ ]

"16",
"a16 apple gpu",
0,

@@ -176,3 +183,3 @@ [

1170,
59,
60,
"apple iphone 14 pro"

@@ -191,2 +198,3 @@ ],

"7",
"a7 apple gpu",
0,

@@ -205,2 +213,3 @@ [

"8",
"a8 apple gpu",
0,

@@ -231,2 +240,3 @@ [

"9",
"a9 apple gpu",
0,

@@ -233,0 +243,0 @@ [

[
"4.0.50",
"5.0.1",
[
"intel intel hd graphics for atom x5",
"5",
"atom for graphics hd intel x5",
0,

@@ -163,2 +164,3 @@ [

"hdfor",
"baytrail for graphics hd intel",
0,

@@ -291,2 +293,3 @@ [

"dribay",
"bay dri intel mesa trail",
0,

@@ -305,2 +308,3 @@ [

"drihd",
"dri hd intel mesa",
0,

@@ -337,2 +341,3 @@ [

"400",
"400 dri graphics hd intel mesa",
0,

@@ -381,2 +386,3 @@ [

"510",
"510 dri graphics hd intel mesa",
0,

@@ -401,2 +407,3 @@ [

"515",
"515 dri graphics hd intel mesa",
0,

@@ -439,2 +446,3 @@ [

"520",
"520 dri graphics hd intel mesa",
0,

@@ -453,2 +461,3 @@ [

"5500",
"5500 dri graphics hd intel mesa",
0,

@@ -479,2 +488,3 @@ [

"615",
"615 dri graphics hd intel mesa",
0,

@@ -505,2 +515,3 @@ [

"2",
"dri gt2 intel kabylake mesa",
0,

@@ -507,0 +518,0 @@ [

[
"4.0.50",
"5.0.1",
[
"arm mali-t604 mp4",
"604",
"arm mali-t604 mp4",
0,

@@ -19,2 +20,3 @@ [

"622",
"arm mali-t622",
0,

@@ -39,2 +41,3 @@ [

"624",
"arm mali-t624",
0,

@@ -95,2 +98,3 @@ [

"624",
"arm mali-t624 mp2",
0,

@@ -109,2 +113,3 @@ [

"624",
"arm mali-t624 mp4",
0,

@@ -123,2 +128,3 @@ [

"628",
"arm mali-t628",
0,

@@ -143,2 +149,3 @@ [

"628",
"arm mali-t628 mp2",
0,

@@ -157,2 +164,3 @@ [

"628",
"arm mali-t628 mp6",
0,

@@ -195,2 +203,3 @@ [

"720",
"arm mali-t720",
0,

@@ -515,2 +524,3 @@ [

"760",
"arm mali-t760",
0,

@@ -637,2 +647,3 @@ [

"760",
"arm mali-t760 mp6",
0,

@@ -669,2 +680,3 @@ [

"760",
"arm mali-t760 mp8",
0,

@@ -707,2 +719,3 @@ [

"764",
"arm mali-t764",
0,

@@ -799,2 +812,3 @@ [

"820",
"arm mali-t820",
0,

@@ -831,2 +845,3 @@ [

"830",
"arm mali-t830",
0,

@@ -887,2 +902,3 @@ [

"860",
"arm mali-t860",
0,

@@ -949,2 +965,3 @@ [

"860",
"arm mali-t860 mp2",
0,

@@ -1065,2 +1082,3 @@ [

"880",
"arm mali-t880",
0,

@@ -1157,2 +1175,3 @@ [

"880",
"arm mali-t880 mp12",
0,

@@ -1177,2 +1196,3 @@ [

"880",
"arm mali-t880 mp2",
0,

@@ -1215,2 +1235,3 @@ [

"880",
"arm mali-t880 mp4",
0,

@@ -1289,2 +1310,3 @@ [

"830",
"mali-t830",
0,

@@ -1291,0 +1313,0 @@ [

[
"4.0.50",
"5.0.1",
[
"arm mali-g31",
"31",
"arm mali-g31",
0,

@@ -19,2 +20,3 @@ [

"51",
"arm mali-g51",
0,

@@ -39,2 +41,3 @@ [

"52",
"arm mali-g52",
0,

@@ -53,2 +56,3 @@ [

"52",
"arm mali-g52 mc1",
0,

@@ -67,2 +71,3 @@ [

"52",
"arm mali-g52 mc2",
0,

@@ -105,2 +110,3 @@ [

"57",
"arm mali-g57",
0,

@@ -119,2 +125,3 @@ [

"57",
"arm mali-g57 mc2",
0,

@@ -139,2 +146,3 @@ [

"57",
"arm mali-g57 mc3",
0,

@@ -153,2 +161,3 @@ [

"71",
"arm mali-g71",
0,

@@ -239,2 +248,3 @@ [

"72",
"arm mali-g72",
0,

@@ -289,2 +299,3 @@ [

"72",
"arm mali-g72 mp3",
0,

@@ -303,2 +314,3 @@ [

"76",
"arm mali-g76",
0,

@@ -401,2 +413,3 @@ [

"76",
"arm mali-g76 mc4",
0,

@@ -415,2 +428,3 @@ [

"77",
"arm mali-g77",
0,

@@ -453,2 +467,3 @@ [

"77",
"arm mali-g77 mc9",
0,

@@ -479,2 +494,3 @@ [

"78",
"arm mali-g78",
0,

@@ -505,2 +521,3 @@ [

"604",
"arm mali-t604 mp4",
0,

@@ -519,2 +536,3 @@ [

"622",
"arm mali-t622",
0,

@@ -539,2 +557,3 @@ [

"624",
"arm mali-t624",
0,

@@ -595,2 +614,3 @@ [

"624",
"arm mali-t624 mp2",
0,

@@ -609,2 +629,3 @@ [

"624",
"arm mali-t624 mp4",
0,

@@ -623,2 +644,3 @@ [

"628",
"arm mali-t628",
0,

@@ -643,2 +665,3 @@ [

"628",
"arm mali-t628 mp2",
0,

@@ -657,2 +680,3 @@ [

"628",
"arm mali-t628 mp6",
0,

@@ -695,2 +719,3 @@ [

"720",
"arm mali-t720",
0,

@@ -1015,2 +1040,3 @@ [

"760",
"arm mali-t760",
0,

@@ -1137,2 +1163,3 @@ [

"760",
"arm mali-t760 mp6",
0,

@@ -1169,2 +1196,3 @@ [

"760",
"arm mali-t760 mp8",
0,

@@ -1207,2 +1235,3 @@ [

"764",
"arm mali-t764",
0,

@@ -1299,2 +1328,3 @@ [

"820",
"arm mali-t820",
0,

@@ -1331,2 +1361,3 @@ [

"830",
"arm mali-t830",
0,

@@ -1387,2 +1418,3 @@ [

"860",
"arm mali-t860",
0,

@@ -1449,2 +1481,3 @@ [

"860",
"arm mali-t860 mp2",
0,

@@ -1565,2 +1598,3 @@ [

"880",
"arm mali-t880",
0,

@@ -1657,2 +1691,3 @@ [

"880",
"arm mali-t880 mp12",
0,

@@ -1677,2 +1712,3 @@ [

"880",
"arm mali-t880 mp2",
0,

@@ -1715,2 +1751,3 @@ [

"880",
"arm mali-t880 mp4",
0,

@@ -1789,2 +1826,3 @@ [

"71",
"mali-g71",
0,

@@ -1803,2 +1841,3 @@ [

"72",
"mali-g72",
0,

@@ -1817,2 +1856,3 @@ [

"830",
"mali-t830",
0,

@@ -1819,0 +1859,0 @@ [

[
"4.0.50",
"5.0.1",
[
"nvidia tegra",
"",
"nvidia tegra",
0,

@@ -19,2 +20,3 @@ [

"1",
"k1 nvidia tegra",
0,

@@ -63,2 +65,3 @@ [

"1",
"nvidia tegra x1",
0,

@@ -65,0 +68,0 @@ [

[
"4.0.50",
"5.0.1",
[
"powervr rogue g6110",
"6110",
"g6110 powervr rogue",
0,

@@ -61,2 +62,3 @@ [

"6200",
"g6200 powervr rogue",
0,

@@ -123,2 +125,3 @@ [

"6230",
"g6230 powervr rogue",
0,

@@ -155,2 +158,3 @@ [

"6400",
"g6400 powervr rogue",
0,

@@ -175,2 +179,3 @@ [

"6430",
"g6430 powervr rogue",
0,

@@ -237,2 +242,3 @@ [

"8100",
"ge8100 powervr rogue",
0,

@@ -269,2 +275,3 @@ [

"8300",
"ge8300 powervr rogue",
0,

@@ -295,2 +302,3 @@ [

"6250",
"gx6250 powervr rogue",
0,

@@ -369,2 +377,3 @@ [

"6650",
"gx6650 powervr rogue",
0,

@@ -389,2 +398,3 @@ [

"han",
"han powervr rogue",
0,

@@ -421,2 +431,3 @@ [

"",
"hood powervr rogue",
0,

@@ -447,2 +458,3 @@ [

"",
"lando powervr rogue",
0,

@@ -461,2 +473,3 @@ [

"",
"marlowe powervr rogue",
0,

@@ -463,0 +476,0 @@ [

@@ -1,2 +0,2 @@

function e(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{d(n.next(e))}catch(e){a(e)}}function c(e){try{d(n.throw(e))}catch(e){a(e)}}function d(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,c)}d((n=n.apply(e,t||[])).next())}))}const t=["geforce 320m","geforce 8600","geforce 8600m gt","geforce 8800 gs","geforce 8800 gt","geforce 9400","geforce 9400m g","geforce 9400m","geforce 9600m gt","geforce 9600m","geforce fx go5200","geforce gt 120","geforce gt 130","geforce gt 330m","geforce gtx 285","google swiftshader","intel g41","intel g45","intel gma 4500mhd","intel gma x3100","intel hd 3000","intel q45","legacy","mali-2","mali-3","mali-4","quadro fx 1500","quadro fx 4","quadro fx 5","radeon hd 2400","radeon hd 2600","radeon hd 4670","radeon hd 4850","radeon hd 4870","radeon hd 5670","radeon hd 5750","radeon hd 6290","radeon hd 6300","radeon hd 6310","radeon hd 6320","radeon hd 6490m","radeon hd 6630m","radeon hd 6750m","radeon hd 6770m","radeon hd 6970m","sgx 543","sgx543"];function r(e){return e=e.toLowerCase().replace(/^angle ?\((.+)\)*$/,"$1").replace(/\s(\d{1,2}gb|direct3d.+$)|\(r\)| \([^)]+\)$/g,"").replace(/(?:vulkan|opengl) \d+\.\d+(?:\.\d+)?(?: \((.*)\))?/,"$1")}const n="undefined"==typeof window,o=(()=>{if(n)return;const{userAgent:e,platform:t,maxTouchPoints:r}=window.navigator,o=/(iphone|ipod|ipad)/i.test(e),a="iPad"===t||"MacIntel"===t&&r>0&&!window.MSStream;return{isIpad:a,isMobile:/android/i.test(e)||o||a,isSafari12:/Version\/12.+Safari/.test(e)}})();function a(e,t,r){if(!r)return[t];const n=function(e){const t="\n precision highp float;\n attribute vec3 aPosition;\n varying float vvv;\n void main() {\n vvv = 0.31622776601683794;\n gl_Position = vec4(aPosition, 1.0);\n }\n ",r="\n precision highp float;\n varying float vvv;\n void main() {\n vec4 enc = vec4(1.0, 255.0, 65025.0, 16581375.0) * vvv;\n enc = fract(enc);\n enc -= enc.yzww * vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0);\n gl_FragColor = enc;\n }\n ",n=e.createShader(35633),o=e.createShader(35632),a=e.createProgram();if(!(o&&n&&a))return;e.shaderSource(n,t),e.shaderSource(o,r),e.compileShader(n),e.compileShader(o),e.attachShader(a,n),e.attachShader(a,o),e.linkProgram(a),e.detachShader(a,n),e.detachShader(a,o),e.deleteShader(n),e.deleteShader(o),e.useProgram(a);const i=e.createBuffer();e.bindBuffer(34962,i),e.bufferData(34962,new Float32Array([-1,-1,0,3,-1,0,-1,3,0]),35044);const c=e.getAttribLocation(a,"aPosition");e.vertexAttribPointer(c,3,5126,!1,0,0),e.enableVertexAttribArray(c),e.clearColor(1,1,1,1),e.clear(16384),e.viewport(0,0,1,1),e.drawArrays(4,0,3);const d=new Uint8Array(4);return e.readPixels(0,0,1,1,6408,5121,d),e.deleteProgram(a),e.deleteBuffer(i),d.join("")}(e),a="801621810",i="8016218135",c="80162181161",d=(null==o?void 0:o.isIpad)?[["a7",c,12],["a8",i,15],["a8x",i,15],["a9",i,15],["a9x",i,15],["a10",i,15],["a10x",i,15],["a12",a,15],["a12x",a,15],["a12z",a,15],["a14",a,15],["m1",a,15]]:[["a7",c,12],["a8",i,12],["a9",i,15],["a10",i,15],["a11",a,15],["a12",a,15],["a13",a,15],["a14",a,15]];let l;"80162181255"===n?l=d.filter((([,,e])=>e>=14)):(l=d.filter((([,e])=>e===n)),l.length||(l=d));return l.map((([e])=>`apple ${e} gpu`))}const i=[],c=[];function d(e,t){if(e===t)return 0;const r=e;e.length>t.length&&(e=t,t=r);let n=e.length,o=t.length;for(;n>0&&e.charCodeAt(~-n)===t.charCodeAt(~-o);)n--,o--;let a,d=0;for(;d<n&&e.charCodeAt(d)===t.charCodeAt(d);)d++;if(n-=d,o-=d,0===n)return o;let l,s,f=0,u=0,h=0;for(;u<n;)c[u]=e.charCodeAt(d+u),i[u]=++u;for(;h<o;)for(a=t.charCodeAt(d+h),l=h++,f=h,u=0;u<n;u++)s=a===c[u]?l:l+1,l=i[u],f=i[u]=l>f?s>f?f+1:s:s>l?l+1:s;return f}function l(e){return null!=e}class s extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}}const f=({mobileTiers:i=[0,15,30,60],desktopTiers:c=[0,15,30,60],override:f={},glContext:u,failIfMajorPerformanceCaveat:h=!1,benchmarksURL:g="https://unpkg.com/detect-gpu@4.0.50/dist/benchmarks"}={})=>e(void 0,void 0,void 0,(function*(){const p={};if(n)return{tier:0,type:"SSR"};const{isIpad:m=!!(null==o?void 0:o.isIpad),isMobile:v=!!(null==o?void 0:o.isMobile),screenSize:w=window.screen,loadBenchmarks:x=(t=>e(void 0,void 0,void 0,(function*(){const e=yield fetch(`${g}/${t}`).then((e=>e.json()));if(parseInt(e.shift().split(".")[0],10)<4)throw new s("Detect GPU benchmark data is out of date. Please update to version 4x");return e})))}=f;let{renderer:A}=f;const P=(e,t,r,n,o)=>({device:o,fps:n,gpu:r,isMobile:v,tier:e,type:t});let b,S="";if(A)A=r(A),b=[A];else{const e=u||function(e,t=!1){const r={alpha:!1,antialias:!1,depth:!1,failIfMajorPerformanceCaveat:t,powerPreference:"high-performance",stencil:!1};e&&delete r.powerPreference;const n=window.document.createElement("canvas"),o=n.getContext("webgl",r)||n.getContext("experimental-webgl",r);return null!=o?o:void 0}(null==o?void 0:o.isSafari12,h);if(!e)return P(0,"WEBGL_UNSUPPORTED");const t=e.getExtension("WEBGL_debug_renderer_info");if(t&&(A=e.getParameter(t.UNMASKED_RENDERER_WEBGL)),!A)return P(1,"FALLBACK");S=A,A=r(A),b=function(e,t,r){return"apple gpu"===t?a(e,t,r):[t]}(e,A,v)}const y=(yield Promise.all(b.map((function(t){var r;return e(this,void 0,void 0,(function*(){const e=(e=>{const t=v?["adreno","apple","mali-t","mali","nvidia","powervr"]:["intel","apple","amd","radeon","nvidia","geforce"];for(const r of t)if(e.includes(r))return r})(t);if(!e)return;const n=`${v?"m":"d"}-${e}${m?"-ipad":""}.json`,o=p[n]=null!==(r=p[n])&&void 0!==r?r:x(n);let a;try{a=yield o}catch(e){if(e instanceof s)throw e;return}const i=function(e){var t;const r=(e=e.replace(/\([^)]+\)/,"")).match(/\d+/)||e.match(/(\W|^)([A-Za-z]{1,3})(\W|$)/g);return null!==(t=null==r?void 0:r.join("").replace(/\W|amd/g,""))&&void 0!==t?t:""}(t);let c=a.filter((([,e])=>e===i));c.length||(c=a.filter((([e])=>e.includes(t))));const l=c.length;if(0===l)return;let f,[u,,,h]=l>1?c.map((e=>[e,d(t,e[0])])).sort((([,e],[,t])=>e-t))[0][0]:c[0],g=Number.MAX_VALUE;const{devicePixelRatio:A}=window,P=w.width*A*w.height*A;for(const e of h){const[t,r]=e,n=t*r,o=Math.abs(P-n);o<g&&(g=o,f=e)}if(!f)return;const[,,b,S]=f;return[g,b,u,S]}))})))).filter(l).sort((([e=Number.MAX_VALUE,t],[r=Number.MAX_VALUE,n])=>e===r?t-n:e-r));if(!y.length){const e=t.find((e=>A.includes(e)));return e?P(0,"BLOCKLISTED",e):P(1,"FALLBACK",`${A} (${S})`)}const[,C,E,L]=y[0];if(-1===C)return P(0,"BLOCKLISTED",E,C,L);const M=v?i:c;let $=0;for(let e=0;e<M.length;e++)C>=M[e]&&($=e);return P($,"BENCHMARK",E,C,L)}));export{f as getGPUTier};
function e(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{d(r.next(e))}catch(e){a(e)}}function c(e){try{d(r.throw(e))}catch(e){a(e)}}function d(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,c)}d((r=r.apply(e,t||[])).next())}))}const t=["geforce 320m","geforce 8600","geforce 8600m gt","geforce 8800 gs","geforce 8800 gt","geforce 9400","geforce 9400m g","geforce 9400m","geforce 9600m gt","geforce 9600m","geforce fx go5200","geforce gt 120","geforce gt 130","geforce gt 330m","geforce gtx 285","google swiftshader","intel g41","intel g45","intel gma 4500mhd","intel gma x3100","intel hd 3000","intel q45","legacy","mali-2","mali-3","mali-4","quadro fx 1500","quadro fx 4","quadro fx 5","radeon hd 2400","radeon hd 2600","radeon hd 4670","radeon hd 4850","radeon hd 4870","radeon hd 5670","radeon hd 5750","radeon hd 6290","radeon hd 6300","radeon hd 6310","radeon hd 6320","radeon hd 6490m","radeon hd 6630m","radeon hd 6750m","radeon hd 6770m","radeon hd 6970m","sgx 543","sgx543"];function n(e){return e=e.toLowerCase().replace(/.*angle ?\((.+)\)(?: on vulkan [0-9.]+)?$/i,"$1").replace(/\s(\d{1,2}gb|direct3d.+$)|\(r\)| \([^)]+\)$/g,"").replace(/(?:vulkan|opengl) \d+\.\d+(?:\.\d+)?(?: \((.*)\))?/,"$1")}const r="undefined"==typeof window,o=(()=>{if(r)return;const{userAgent:e,platform:t,maxTouchPoints:n}=window.navigator,o=/(iphone|ipod|ipad)/i.test(e),a="iPad"===t||"MacIntel"===t&&n>0&&!window.MSStream;return{isIpad:a,isMobile:/android/i.test(e)||o||a,isSafari12:/Version\/12.+Safari/.test(e)}})();function a(e,t,n){if(!n)return[t];const r=function(e){const t="\n precision highp float;\n attribute vec3 aPosition;\n varying float vvv;\n void main() {\n vvv = 0.31622776601683794;\n gl_Position = vec4(aPosition, 1.0);\n }\n ",n="\n precision highp float;\n varying float vvv;\n void main() {\n vec4 enc = vec4(1.0, 255.0, 65025.0, 16581375.0) * vvv;\n enc = fract(enc);\n enc -= enc.yzww * vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0);\n gl_FragColor = enc;\n }\n ",r=e.createShader(35633),o=e.createShader(35632),a=e.createProgram();if(!(o&&r&&a))return;e.shaderSource(r,t),e.shaderSource(o,n),e.compileShader(r),e.compileShader(o),e.attachShader(a,r),e.attachShader(a,o),e.linkProgram(a),e.detachShader(a,r),e.detachShader(a,o),e.deleteShader(r),e.deleteShader(o),e.useProgram(a);const i=e.createBuffer();e.bindBuffer(34962,i),e.bufferData(34962,new Float32Array([-1,-1,0,3,-1,0,-1,3,0]),35044);const c=e.getAttribLocation(a,"aPosition");e.vertexAttribPointer(c,3,5126,!1,0,0),e.enableVertexAttribArray(c),e.clearColor(1,1,1,1),e.clear(16384),e.viewport(0,0,1,1),e.drawArrays(4,0,3);const d=new Uint8Array(4);return e.readPixels(0,0,1,1,6408,5121,d),e.deleteProgram(a),e.deleteBuffer(i),d.join("")}(e),a="801621810",i="8016218135",c="80162181161",d=(null==o?void 0:o.isIpad)?[["a7",c,12],["a8",i,15],["a8x",i,15],["a9",i,15],["a9x",i,15],["a10",i,15],["a10x",i,15],["a12",a,15],["a12x",a,15],["a12z",a,15],["a14",a,15],["m1",a,15]]:[["a7",c,12],["a8",i,12],["a9",i,15],["a10",i,15],["a11",a,15],["a12",a,15],["a13",a,15],["a14",a,15]];let l;"80162181255"===r?l=d.filter((([,,e])=>e>=14)):(l=d.filter((([,e])=>e===r)),l.length||(l=d));return l.map((([e])=>`apple ${e} gpu`))}class i extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}}const c=[],d=[];function l(e,t){if(e===t)return 0;const n=e;e.length>t.length&&(e=t,t=n);let r=e.length,o=t.length;for(;r>0&&e.charCodeAt(~-r)===t.charCodeAt(~-o);)r--,o--;let a,i=0;for(;i<r&&e.charCodeAt(i)===t.charCodeAt(i);)i++;if(r-=i,o-=i,0===r)return o;let l,s,f=0,u=0,h=0;for(;u<r;)d[u]=e.charCodeAt(i+u),c[u]=++u;for(;h<o;)for(a=t.charCodeAt(i+h),l=h++,f=h,u=0;u<r;u++)s=a===d[u]?l:l+1,l=c[u],f=c[u]=l>f?s>f?f+1:s:s>l?l+1:s;return f}function s(e){return null!=e}const f=({mobileTiers:c=[0,15,30,60],desktopTiers:d=[0,15,30,60],override:f={},glContext:u,failIfMajorPerformanceCaveat:h=!1,benchmarksURL:g="https://unpkg.com/detect-gpu@5.0.1/dist/benchmarks"}={})=>e(void 0,void 0,void 0,(function*(){const p={};if(r)return{tier:0,type:"SSR"};const{isIpad:m=!!(null==o?void 0:o.isIpad),isMobile:v=!!(null==o?void 0:o.isMobile),screenSize:w=window.screen,loadBenchmarks:x=(t=>e(void 0,void 0,void 0,(function*(){const e=yield fetch(`${g}/${t}`).then((e=>e.json()));if(parseInt(e.shift().split(".")[0],10)<4)throw new i("Detect GPU benchmark data is out of date. Please update to version 4x");return e})))}=f;let{renderer:A}=f;const P=(e,t,n,r,o)=>({device:o,fps:r,gpu:n,isMobile:v,tier:e,type:t});let b,S="";if(A)A=n(A),b=[A];else{const e=u||function(e,t=!1){const n={alpha:!1,antialias:!1,depth:!1,failIfMajorPerformanceCaveat:t,powerPreference:"high-performance",stencil:!1};e&&delete n.powerPreference;const r=window.document.createElement("canvas"),o=r.getContext("webgl",n)||r.getContext("experimental-webgl",n);return null!=o?o:void 0}(null==o?void 0:o.isSafari12,h);if(!e)return P(0,"WEBGL_UNSUPPORTED");const t=e.getExtension("WEBGL_debug_renderer_info");if(t&&(A=e.getParameter(t.UNMASKED_RENDERER_WEBGL)),!A)return P(1,"FALLBACK");S=A,A=n(A),b=function(e,t,n){return"apple gpu"===t?a(e,t,n):[t]}(e,A,v)}const y=(yield Promise.all(b.map((function(t){var n;return e(this,void 0,void 0,(function*(){const e=(e=>{const t=v?["adreno","apple","mali-t","mali","nvidia","powervr","samsung"]:["intel","apple","amd","radeon","nvidia","geforce"];for(const n of t)if(e.includes(n))return n})(t);if(!e)return;const r=`${v?"m":"d"}-${e}${m?"-ipad":""}.json`,o=p[r]=null!==(n=p[r])&&void 0!==n?n:x(r);let a;try{a=yield o}catch(e){if(e instanceof i)throw e;return}const c=function(e){var t;const n=(e=e.replace(/\([^)]+\)/,"")).match(/\d+/)||e.match(/(\W|^)([A-Za-z]{1,3})(\W|$)/g);return null!==(t=null==n?void 0:n.join("").replace(/\W|amd/g,""))&&void 0!==t?t:""}(t);let d=a.filter((([,e])=>e===c));d.length||(d=a.filter((([e])=>e.includes(t))));const s=d.length;if(0===s)return;const f=t.split(/[.,()\[\]/\s]/g).sort().filter(((e,t,n)=>0===t||e!==n[t-1])).join(" ");let u,[h,,,,g]=s>1?d.map((e=>[e,l(f,e[2])])).sort((([,e],[,t])=>e-t))[0][0]:d[0],A=Number.MAX_VALUE;const{devicePixelRatio:P}=window,b=w.width*P*w.height*P;for(const e of g){const[t,n]=e,r=t*n,o=Math.abs(b-r);o<A&&(A=o,u=e)}if(!u)return;const[,,S,y]=u;return[A,S,h,y]}))})))).filter(s).sort((([e=Number.MAX_VALUE,t],[n=Number.MAX_VALUE,r])=>e===n?t-r:e-n));if(!y.length){const e=t.find((e=>A.includes(e)));return e?P(0,"BLOCKLISTED",e):P(1,"FALLBACK",`${A} (${S})`)}const[,C,E,L]=y[0];if(-1===C)return P(0,"BLOCKLISTED",E,C,L);const M=v?c:d;let $=0;for(let e=0;e<M.length;e++)C>=M[e]&&($=e);return P($,"BENCHMARK",E,C,L)}));export{f as getGPUTier};
//# sourceMappingURL=detect-gpu.esm.js.map

@@ -1,2 +0,2 @@

!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).DetectGPU={})}(this,(function(e){"use strict";var r=function(e,n){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])})(e,n)};function n(e,r,n,t){return new(n||(n=Promise))((function(o,a){function i(e){try{u(t.next(e))}catch(e){a(e)}}function c(e){try{u(t.throw(e))}catch(e){a(e)}}function u(e){var r;e.done?o(e.value):(r=e.value,r instanceof n?r:new n((function(e){e(r)}))).then(i,c)}u((t=t.apply(e,r||[])).next())}))}function t(e,r){var n,t,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,t&&(o=2&a[0]?t.return:a[0]?t.throw||((o=t.return)&&o.call(t),0):t.next)&&!(o=o.call(t,a[1])).done)return o;switch(t=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,t=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=r.call(e,i)}catch(e){a=[6,e],t=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}var o=["geforce 320m","geforce 8600","geforce 8600m gt","geforce 8800 gs","geforce 8800 gt","geforce 9400","geforce 9400m g","geforce 9400m","geforce 9600m gt","geforce 9600m","geforce fx go5200","geforce gt 120","geforce gt 130","geforce gt 330m","geforce gtx 285","google swiftshader","intel g41","intel g45","intel gma 4500mhd","intel gma x3100","intel hd 3000","intel q45","legacy","mali-2","mali-3","mali-4","quadro fx 1500","quadro fx 4","quadro fx 5","radeon hd 2400","radeon hd 2600","radeon hd 4670","radeon hd 4850","radeon hd 4870","radeon hd 5670","radeon hd 5750","radeon hd 6290","radeon hd 6300","radeon hd 6310","radeon hd 6320","radeon hd 6490m","radeon hd 6630m","radeon hd 6750m","radeon hd 6770m","radeon hd 6970m","sgx 543","sgx543"];function a(e){return e=e.toLowerCase().replace(/^angle ?\((.+)\)*$/,"$1").replace(/\s(\d{1,2}gb|direct3d.+$)|\(r\)| \([^)]+\)$/g,"").replace(/(?:vulkan|opengl) \d+\.\d+(?:\.\d+)?(?: \((.*)\))?/,"$1")}const i=34962;var c="undefined"==typeof window,u=function(){if(!c){var e=window.navigator,r=e.userAgent,n=e.platform,t=e.maxTouchPoints,o=/(iphone|ipod|ipad)/i.test(r),a="iPad"===n||"MacIntel"===n&&t>0&&!window.MSStream;return{isIpad:a,isMobile:/android/i.test(r)||o||a,isSafari12:/Version\/12.+Safari/.test(r)}}}();function l(e,r,n){if(!n)return[r];var t,o=function(e){var r="\n precision highp float;\n attribute vec3 aPosition;\n varying float vvv;\n void main() {\n vvv = 0.31622776601683794;\n gl_Position = vec4(aPosition, 1.0);\n }\n ",n="\n precision highp float;\n varying float vvv;\n void main() {\n vec4 enc = vec4(1.0, 255.0, 65025.0, 16581375.0) * vvv;\n enc = fract(enc);\n enc -= enc.yzww * vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0);\n gl_FragColor = enc;\n }\n ",t=e.createShader(35633),o=e.createShader(35632),a=e.createProgram();if(!(o&&t&&a))return;e.shaderSource(t,r),e.shaderSource(o,n),e.compileShader(t),e.compileShader(o),e.attachShader(a,t),e.attachShader(a,o),e.linkProgram(a),e.detachShader(a,t),e.detachShader(a,o),e.deleteShader(t),e.deleteShader(o),e.useProgram(a);var c=e.createBuffer();e.bindBuffer(i,c),e.bufferData(i,new Float32Array([-1,-1,0,3,-1,0,-1,3,0]),35044);var u=e.getAttribLocation(a,"aPosition");e.vertexAttribPointer(u,3,5126,!1,0,0),e.enableVertexAttribArray(u),e.clearColor(1,1,1,1),e.clear(16384),e.viewport(0,0,1,1),e.drawArrays(4,0,3);var l=new Uint8Array(4);return e.readPixels(0,0,1,1,6408,5121,l),e.deleteProgram(a),e.deleteBuffer(c),l.join("")}(e),a="801621810",c="8016218135",l="80162181161",f=(null==u?void 0:u.isIpad)?[["a7",l,12],["a8",c,15],["a8x",c,15],["a9",c,15],["a9x",c,15],["a10",c,15],["a10x",c,15],["a12",a,15],["a12x",a,15],["a12z",a,15],["a14",a,15],["m1",a,15]]:[["a7",l,12],["a8",c,12],["a9",c,15],["a10",c,15],["a11",a,15],["a12",a,15],["a13",a,15],["a14",a,15]];return"80162181255"===o?t=f.filter((function(e){return e[2]>=14})):(t=f.filter((function(e){return e[1]===o}))).length||(t=f),t.map((function(e){var r=e[0];return"apple ".concat(r," gpu")}))}var f=[],d=[];function s(e,r){if(e===r)return 0;var n=e;e.length>r.length&&(e=r,r=n);for(var t=e.length,o=r.length;t>0&&e.charCodeAt(~-t)===r.charCodeAt(~-o);)t--,o--;for(var a,i=0;i<t&&e.charCodeAt(i)===r.charCodeAt(i);)i++;if(o-=i,0===(t-=i))return o;for(var c,u,l=0,s=0,h=0;s<t;)d[s]=e.charCodeAt(i+s),f[s]=++s;for(;h<o;)for(a=r.charCodeAt(i+h),c=h++,l=h,s=0;s<t;s++)u=a===d[s]?c:c+1,c=f[s],l=f[s]=c>l?u>l?l+1:u:u>c?c+1:u;return l}function h(e){return null!=e}var v=function(e){function n(r){var n=this.constructor,t=e.call(this,r)||this;return Object.setPrototypeOf(t,n.prototype),t}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function t(){this.constructor=e}r(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)}(n,e),n}(Error);e.getGPUTier=function(e){var r=void 0===e?{}:e,i=r.mobileTiers,f=void 0===i?[0,15,30,60]:i,d=r.desktopTiers,p=void 0===d?[0,15,30,60]:d,g=r.override,m=void 0===g?{}:g,b=r.glContext,w=r.failIfMajorPerformanceCaveat,y=void 0!==w&&w,x=r.benchmarksURL,P=void 0===x?"https://unpkg.com/detect-gpu@".concat("4.0.50","/dist/benchmarks"):x;return n(void 0,void 0,void 0,(function(){function e(e){var o;return n(this,void 0,void 0,(function(){var n,a,i,c,u,l,f,h,p,g,m,b,y,x,P,S,C,L,M,j,k,B,O,T,U;return t(this,(function(t){switch(t.label){case 0:if(!(n=E(e)))return[2];a="".concat(w?"m":"d","-").concat(n).concat(d?"-ipad":"",".json"),i=r[a]=null!==(o=r[a])&&void 0!==o?o:_(a),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,i];case 2:return c=t.sent(),[3,4];case 3:if((u=t.sent())instanceof v)throw u;return[2];case 4:if(l=function(e){var r,n=(e=e.replace(/\([^)]+\)/,"")).match(/\d+/)||e.match(/(\W|^)([A-Za-z]{1,3})(\W|$)/g);return null!==(r=null==n?void 0:n.join("").replace(/\W|amd/g,""))&&void 0!==r?r:""}(e),(f=c.filter((function(e){return e[1]===l}))).length||(f=c.filter((function(r){return r[0].includes(e)}))),0===(h=f.length))return[2];for(p=h>1?f.map((function(r){return[r,s(e,r[0])]})).sort((function(e,r){return e[1]-r[1]}))[0][0]:f[0],g=p[0],m=p[3],b=Number.MAX_VALUE,x=window.devicePixelRatio,P=A.width*x*A.height*x,S=0,C=m;S<C.length;S++)L=C[S],M=L[0],j=L[1],k=M*j,(B=Math.abs(P-k))<b&&(b=B,y=L);return y?(T=(O=y)[2],U=O[3],[2,[b,T,g,U]]):[2]}}))}))}var r,i,d,g,w,x,A,S,_,C,E,L,M,j,k,B,O,T,U,I,D,R,G,N,K;return t(this,(function(s){switch(s.label){case 0:if(r={},c)return[2,{tier:0,type:"SSR"}];if(i=m.isIpad,d=void 0===i?!!(null==u?void 0:u.isIpad):i,g=m.isMobile,w=void 0===g?!!(null==u?void 0:u.isMobile):g,x=m.screenSize,A=void 0===x?window.screen:x,S=m.loadBenchmarks,_=void 0===S?function(e){return n(void 0,void 0,void 0,(function(){var r;return t(this,(function(n){switch(n.label){case 0:return[4,fetch("".concat(P,"/").concat(e)).then((function(e){return e.json()}))];case 1:if(r=n.sent(),parseInt(r.shift().split(".")[0],10)<4)throw new v("Detect GPU benchmark data is out of date. Please update to version 4x");return[2,r]}}))}))}:S,C=m.renderer,E=function(e){for(var r=0,n=w?["adreno","apple","mali-t","mali","nvidia","powervr"]:["intel","apple","amd","radeon","nvidia","geforce"];r<n.length;r++){var t=n[r];if(e.includes(t))return t}},L=function(e,r,n,t,o){return{device:o,fps:t,gpu:n,isMobile:w,tier:e,type:r}},j="",C)C=a(C),M=[C];else{if(!(k=b||function(e,r){void 0===r&&(r=!1);var n={alpha:!1,antialias:!1,depth:!1,failIfMajorPerformanceCaveat:r,powerPreference:"high-performance",stencil:!1};e&&delete n.powerPreference;var t=window.document.createElement("canvas"),o=t.getContext("webgl",n)||t.getContext("experimental-webgl",n);return null!=o?o:void 0}(null==u?void 0:u.isSafari12,y)))return[2,L(0,"WEBGL_UNSUPPORTED")];if((B=k.getExtension("WEBGL_debug_renderer_info"))&&(C=k.getParameter(B.UNMASKED_RENDERER_WEBGL)),!C)return[2,L(1,"FALLBACK")];j=C,C=a(C),M=function(e,r,n){return"apple gpu"===r?l(e,r,n):[r]}(k,C,w)}return[4,Promise.all(M.map(e))];case 1:if(!(O=s.sent().filter(h).sort((function(e,r){var n=e[0],t=void 0===n?Number.MAX_VALUE:n,o=e[1],a=r[0],i=void 0===a?Number.MAX_VALUE:a,c=r[1];return t===i?o-c:t-i}))).length)return[2,(T=o.find((function(e){return C.includes(e)})))?L(0,"BLOCKLISTED",T):L(1,"FALLBACK","".concat(C," (").concat(j,")"))];if(U=O[0],I=U[1],D=U[2],R=U[3],-1===I)return[2,L(0,"BLOCKLISTED",D,I,R)];for(G=w?f:p,N=0,K=0;K<G.length;K++)I>=G[K]&&(N=K);return[2,L(N,"BENCHMARK",D,I,R)]}}))}))},Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).DetectGPU={})}(this,(function(e){"use strict";var r=function(e,n){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])})(e,n)};function n(e,r,n,t){return new(n||(n=Promise))((function(o,a){function i(e){try{u(t.next(e))}catch(e){a(e)}}function c(e){try{u(t.throw(e))}catch(e){a(e)}}function u(e){var r;e.done?o(e.value):(r=e.value,r instanceof n?r:new n((function(e){e(r)}))).then(i,c)}u((t=t.apply(e,r||[])).next())}))}function t(e,r){var n,t,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,t&&(o=2&a[0]?t.return:a[0]?t.throw||((o=t.return)&&o.call(t),0):t.next)&&!(o=o.call(t,a[1])).done)return o;switch(t=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,t=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=r.call(e,i)}catch(e){a=[6,e],t=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}var o=["geforce 320m","geforce 8600","geforce 8600m gt","geforce 8800 gs","geforce 8800 gt","geforce 9400","geforce 9400m g","geforce 9400m","geforce 9600m gt","geforce 9600m","geforce fx go5200","geforce gt 120","geforce gt 130","geforce gt 330m","geforce gtx 285","google swiftshader","intel g41","intel g45","intel gma 4500mhd","intel gma x3100","intel hd 3000","intel q45","legacy","mali-2","mali-3","mali-4","quadro fx 1500","quadro fx 4","quadro fx 5","radeon hd 2400","radeon hd 2600","radeon hd 4670","radeon hd 4850","radeon hd 4870","radeon hd 5670","radeon hd 5750","radeon hd 6290","radeon hd 6300","radeon hd 6310","radeon hd 6320","radeon hd 6490m","radeon hd 6630m","radeon hd 6750m","radeon hd 6770m","radeon hd 6970m","sgx 543","sgx543"];function a(e){return e=e.toLowerCase().replace(/.*angle ?\((.+)\)(?: on vulkan [0-9.]+)?$/i,"$1").replace(/\s(\d{1,2}gb|direct3d.+$)|\(r\)| \([^)]+\)$/g,"").replace(/(?:vulkan|opengl) \d+\.\d+(?:\.\d+)?(?: \((.*)\))?/,"$1")}const i=34962;var c="undefined"==typeof window,u=function(){if(!c){var e=window.navigator,r=e.userAgent,n=e.platform,t=e.maxTouchPoints,o=/(iphone|ipod|ipad)/i.test(r),a="iPad"===n||"MacIntel"===n&&t>0&&!window.MSStream;return{isIpad:a,isMobile:/android/i.test(r)||o||a,isSafari12:/Version\/12.+Safari/.test(r)}}}();function l(e,r,n){if(!n)return[r];var t,o=function(e){var r="\n precision highp float;\n attribute vec3 aPosition;\n varying float vvv;\n void main() {\n vvv = 0.31622776601683794;\n gl_Position = vec4(aPosition, 1.0);\n }\n ",n="\n precision highp float;\n varying float vvv;\n void main() {\n vec4 enc = vec4(1.0, 255.0, 65025.0, 16581375.0) * vvv;\n enc = fract(enc);\n enc -= enc.yzww * vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0);\n gl_FragColor = enc;\n }\n ",t=e.createShader(35633),o=e.createShader(35632),a=e.createProgram();if(!(o&&t&&a))return;e.shaderSource(t,r),e.shaderSource(o,n),e.compileShader(t),e.compileShader(o),e.attachShader(a,t),e.attachShader(a,o),e.linkProgram(a),e.detachShader(a,t),e.detachShader(a,o),e.deleteShader(t),e.deleteShader(o),e.useProgram(a);var c=e.createBuffer();e.bindBuffer(i,c),e.bufferData(i,new Float32Array([-1,-1,0,3,-1,0,-1,3,0]),35044);var u=e.getAttribLocation(a,"aPosition");e.vertexAttribPointer(u,3,5126,!1,0,0),e.enableVertexAttribArray(u),e.clearColor(1,1,1,1),e.clear(16384),e.viewport(0,0,1,1),e.drawArrays(4,0,3);var l=new Uint8Array(4);return e.readPixels(0,0,1,1,6408,5121,l),e.deleteProgram(a),e.deleteBuffer(c),l.join("")}(e),a="801621810",c="8016218135",l="80162181161",f=(null==u?void 0:u.isIpad)?[["a7",l,12],["a8",c,15],["a8x",c,15],["a9",c,15],["a9x",c,15],["a10",c,15],["a10x",c,15],["a12",a,15],["a12x",a,15],["a12z",a,15],["a14",a,15],["m1",a,15]]:[["a7",l,12],["a8",c,12],["a9",c,15],["a10",c,15],["a11",a,15],["a12",a,15],["a13",a,15],["a14",a,15]];return"80162181255"===o?t=f.filter((function(e){return e[2]>=14})):(t=f.filter((function(e){return e[1]===o}))).length||(t=f),t.map((function(e){var r=e[0];return"apple ".concat(r," gpu")}))}var f=function(e){function n(r){var n=this.constructor,t=e.call(this,r)||this;return Object.setPrototypeOf(t,n.prototype),t}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function t(){this.constructor=e}r(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)}(n,e),n}(Error);var d=[],s=[];function h(e,r){if(e===r)return 0;var n=e;e.length>r.length&&(e=r,r=n);for(var t=e.length,o=r.length;t>0&&e.charCodeAt(~-t)===r.charCodeAt(~-o);)t--,o--;for(var a,i=0;i<t&&e.charCodeAt(i)===r.charCodeAt(i);)i++;if(o-=i,0===(t-=i))return o;for(var c,u,l=0,f=0,h=0;f<t;)s[f]=e.charCodeAt(i+f),d[f]=++f;for(;h<o;)for(a=r.charCodeAt(i+h),c=h++,l=h,f=0;f<t;f++)u=a===s[f]?c:c+1,c=d[f],l=d[f]=c>l?u>l?l+1:u:u>c?c+1:u;return l}function v(e){return null!=e}e.getGPUTier=function(e){var r=void 0===e?{}:e,i=r.mobileTiers,d=void 0===i?[0,15,30,60]:i,s=r.desktopTiers,p=void 0===s?[0,15,30,60]:s,g=r.override,m=void 0===g?{}:g,b=r.glContext,w=r.failIfMajorPerformanceCaveat,y=void 0!==w&&w,x=r.benchmarksURL,P=void 0===x?"https://unpkg.com/detect-gpu@".concat("5.0.1","/dist/benchmarks"):x;return n(void 0,void 0,void 0,(function(){function e(e){var o;return n(this,void 0,void 0,(function(){var n,a,i,c,u,l,d,v,p,g,m,b,y,x,P,S,C,L,M,j,k,B,O,T,U,I;return t(this,(function(t){switch(t.label){case 0:if(!(n=E(e)))return[2];a="".concat(w?"m":"d","-").concat(n).concat(s?"-ipad":"",".json"),i=r[a]=null!==(o=r[a])&&void 0!==o?o:_(a),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,i];case 2:return c=t.sent(),[3,4];case 3:if((u=t.sent())instanceof f)throw u;return[2];case 4:if(l=function(e){var r,n=(e=e.replace(/\([^)]+\)/,"")).match(/\d+/)||e.match(/(\W|^)([A-Za-z]{1,3})(\W|$)/g);return null!==(r=null==n?void 0:n.join("").replace(/\W|amd/g,""))&&void 0!==r?r:""}(e),(d=c.filter((function(e){return e[1]===l}))).length||(d=c.filter((function(r){return r[0].includes(e)}))),0===(v=d.length))return[2];for(p=e.split(/[.,()\[\]/\s]/g).sort().filter((function(e,r,n){return 0===r||e!==n[r-1]})).join(" "),g=v>1?d.map((function(e){return[e,h(p,e[2])]})).sort((function(e,r){return e[1]-r[1]}))[0][0]:d[0],m=g[0],b=g[4],y=Number.MAX_VALUE,P=window.devicePixelRatio,S=A.width*P*A.height*P,C=0,L=b;C<L.length;C++)M=L[C],j=M[0],k=M[1],B=j*k,(O=Math.abs(S-B))<y&&(y=O,x=M);return x?(U=(T=x)[2],I=T[3],[2,[y,U,m,I]]):[2]}}))}))}var r,i,s,g,w,x,A,S,_,C,E,L,M,j,k,B,O,T,U,I,D,R,G,N,K;return t(this,(function(h){switch(h.label){case 0:if(r={},c)return[2,{tier:0,type:"SSR"}];if(i=m.isIpad,s=void 0===i?!!(null==u?void 0:u.isIpad):i,g=m.isMobile,w=void 0===g?!!(null==u?void 0:u.isMobile):g,x=m.screenSize,A=void 0===x?window.screen:x,S=m.loadBenchmarks,_=void 0===S?function(e){return n(void 0,void 0,void 0,(function(){var r;return t(this,(function(n){switch(n.label){case 0:return[4,fetch("".concat(P,"/").concat(e)).then((function(e){return e.json()}))];case 1:if(r=n.sent(),parseInt(r.shift().split(".")[0],10)<4)throw new f("Detect GPU benchmark data is out of date. Please update to version 4x");return[2,r]}}))}))}:S,C=m.renderer,E=function(e){for(var r=0,n=w?["adreno","apple","mali-t","mali","nvidia","powervr","samsung"]:["intel","apple","amd","radeon","nvidia","geforce"];r<n.length;r++){var t=n[r];if(e.includes(t))return t}},L=function(e,r,n,t,o){return{device:o,fps:t,gpu:n,isMobile:w,tier:e,type:r}},j="",C)C=a(C),M=[C];else{if(!(k=b||function(e,r){void 0===r&&(r=!1);var n={alpha:!1,antialias:!1,depth:!1,failIfMajorPerformanceCaveat:r,powerPreference:"high-performance",stencil:!1};e&&delete n.powerPreference;var t=window.document.createElement("canvas"),o=t.getContext("webgl",n)||t.getContext("experimental-webgl",n);return null!=o?o:void 0}(null==u?void 0:u.isSafari12,y)))return[2,L(0,"WEBGL_UNSUPPORTED")];if((B=k.getExtension("WEBGL_debug_renderer_info"))&&(C=k.getParameter(B.UNMASKED_RENDERER_WEBGL)),!C)return[2,L(1,"FALLBACK")];j=C,C=a(C),M=function(e,r,n){return"apple gpu"===r?l(e,r,n):[r]}(k,C,w)}return[4,Promise.all(M.map(e))];case 1:if(!(O=h.sent().filter(v).sort((function(e,r){var n=e[0],t=void 0===n?Number.MAX_VALUE:n,o=e[1],a=r[0],i=void 0===a?Number.MAX_VALUE:a,c=r[1];return t===i?o-c:t-i}))).length)return[2,(T=o.find((function(e){return C.includes(e)})))?L(0,"BLOCKLISTED",T):L(1,"FALLBACK","".concat(C," (").concat(j,")"))];if(U=O[0],I=U[1],D=U[2],R=U[3],-1===I)return[2,L(0,"BLOCKLISTED",D,I,R)];for(G=w?d:p,N=0,K=0;K<G.length;K++)I>=G[K]&&(N=K);return[2,L(N,"BENCHMARK",D,I,R)]}}))}))},Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=detect-gpu.umd.js.map

@@ -68,3 +68,3 @@ export interface GetGPUTier {

export declare type ModelEntryScreen = [number, number, number, string | undefined];
export declare type ModelEntry = [string, string, 0 | 1, ModelEntryScreen[]];
export declare type ModelEntry = [string, string, string, 0 | 1, ModelEntryScreen[]];
export declare const getGPUTier: ({ mobileTiers, desktopTiers, override, glContext, failIfMajorPerformanceCaveat, benchmarksURL, }?: GetGPUTier) => Promise<TierResult>;
export declare function getLevenshteinDistance(left: string, right: string): number;
export declare function tokenizeForLevenshteinDistance(str: string): string;
{
"name": "detect-gpu",
"version": "4.0.50",
"version": "5.0.1",
"description": "Classify GPU's based on their benchmark score in order to provide an adaptive experience.",

@@ -5,0 +5,0 @@ "author": "Tim van Scherpenzeel",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc