detect-gpu
Version:
Classify GPU's based on their benchmark score in order to provide an adaptive experience.
1 lines • 19 kB
JavaScript
!function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define("DetectGPU",[],o):"object"==typeof exports?exports.DetectGPU=o():e.DetectGPU=o()}(window,function(){return function(e){var o={};function r(n){if(o[n])return o[n].exports;var a=o[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=e,r.c=o,r.d=function(e,o,n){r.o(e,o)||Object.defineProperty(e,o,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,o){if(1&o&&(e=r(e)),8&o)return e;if(4&o&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&o&&"string"!=typeof e)for(var a in e)r.d(n,a,function(o){return e[o]}.bind(null,a));return n},r.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(o,"a",o),o},r.o=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},r.p="",r(r.s=0)}([function(e,o,r){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var n=Object.assign||function(e){for(var o=1;o<arguments.length;o++){var r=arguments[o];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};o.getGPUTier=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new D(e)};var a=r(1),t=function(e){return e&&e.__esModule?e:{default:e}}(r(2)),i=r(3);var M=new t.default;function d(e){return e.toLowerCase().split("- ")[1].split(" /")[0]}function c(e){return e.replace(/[\D]/g,"")}var D=function e(){var o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}(this,e),this.mobileBenchmarkPercentages=[10,40,30,20],this.desktopBenchmarkPercentages=[10,40,30,20],this.forceRendererString=!1,this.forceMobile=!1,n(this,o);var r=M.mobile||M.tablet||this.forceMobile,t=!r,D=void 0,A=void 0,I=void 0;if(!(D=!1===this.forceRendererString?(0,i.getWebGLUnmaskedRenderer)():this.forceRendererString))return r?{tier:"GPU_MOBILE_TIER_0",type:"WEBGL_UNSUPPORTED"}:{tier:"GPU_DESKTOP_TIER_0",type:"WEBGL_UNSUPPORTED"};var R=(D=function(e){var o=e.toLowerCase();return o.includes("angle (")&&o.includes("direct3d")&&(o=o.replace("angle (","").split(" direct3d")[0]),o.includes("nvidia")&&o.includes("gb")&&(o=o.split(/\dgb/)[0]),o}(D)).replace(/[\D]/g,"");if(/(radeon hd 6970m|radeon hd 6770m|radeon hd 6490m|radeon hd 6630m|radeon hd 6750m|radeon hd 5750|radeon hd 5670|radeon hd 4850|radeon hd 4870|radeon hd 4670|geforce 9400m|geforce 320m|geforce 330m|geforce gt 130|geforce gt 120|geforce gtx 285|geforce 8600|geforce 9600m|geforce 9400m|geforce 8800 gs|geforce 8800 gt|quadro fx 5|quadro fx 4|radeon hd 2600|radeon hd 2400|radeon hd 2600|mali-4|mali-3|mali-2)/.test(D))return r?{tier:"GPU_MOBILE_TIER_0",type:"BLACKLISTED"}:{tier:"GPU_DESKTOP_TIER_0",type:"BLACKLISTED"};if(r){var l=(0,i.getBenchmarkByPercentage)(a.BENCHMARK_SCORE_MOBILE,this.mobileBenchmarkPercentages),s=D.includes("adreno"),u=D.includes("apple"),G=D.includes("mali")&&!D.includes("mali-t"),h=D.includes("mali-t"),p=D.includes("nvidia"),P=D.includes("powervr");return l.forEach(function(e,o){return e.forEach(function(e){var r=d(e),n=c(r);(r.includes("adreno")&&s||r.includes("apple")&&u||r.includes("mali")&&!r.includes("mali-t")&&G||r.includes("mali-t")&&h||r.includes("nvidia")&&p||r.includes("powervr")&&P)&&n.includes(R)&&(A="GPU_MOBILE_TIER_"+o,I="BENCHMARK - "+r)})}),A||(A="GPU_MOBILE_TIER_1",I="FALLBACK"),{tier:A,type:I}}if(t){var V=(0,i.getBenchmarkByPercentage)(a.BENCHMARK_SCORE_DESKTOP,this.desktopBenchmarkPercentages),f=D.includes("intel"),m=D.includes("amd"),N=D.includes("nvidia");return V.forEach(function(e,o){return e.forEach(function(e){var r=d(e),n=c(r);(r.includes("intel")&&f||r.includes("amd")&&m||r.includes("nvidia")&&N)&&n.includes(R)&&(A="GPU_DESKTOP_TIER_"+o,I="BENCHMARK - "+r)})}),A||(A="GPU_DESKTOP_TIER_1",I="FALLBACK"),{tier:A,type:I}}return{tier:A,type:I}}},function(e,o,r){"use strict";Object.defineProperty(o,"__esModule",{value:!0});o.BENCHMARK_SCORE_DESKTOP=["709 - AMD Radeon HD 7290","699 - AMD Radeon HD 8180","697 - AMD Radeon HD 7310","695 - AMD Radeon HD 7340","691 - Intel HD Graphics (Bay Trail)","650 - Intel HD Graphics (Ivy Bridge)","646 - AMD Radeon HD 8210","622 - AMD Radeon HD 8250","621 - AMD Radeon R6 (Mullins)","620 - AMD Radeon HD 8240","612 - AMD Radeon HD 8280","609 - Intel HD Graphics (Cherry Trail)","608 - AMD Radeon R2 (Mullins/Beema/Carrizo-L)","588 - Intel HD Graphics (Haswell)","579 - Intel HD Graphics 400 (Braswell)","578 - Intel HD Graphics (Braswell)","577 - Intel HD Graphics 405 (Braswell)","557 - Intel HD Graphics 500","556 - Intel UHD Graphics 600","555 - AMD Radeon HD 8330","554 - AMD Radeon HD 8350G","541 - AMD Radeon HD 8400","537 - AMD Radeon HD 8450G","528 - Intel HD Graphics 4200","527 - AMD Radeon R2 (Stoney Ridge)","526 - AMD Radeon R3 (Mullins/Beema)","525 - AMD Radeon R4 (Beema)","524 - AMD Radeon R5 (Beema/Carrizo-L)","522 - Intel HD Graphics (Broadwell)","521 - AMD Radeon R4 (Kaveri)","520 - AMD Radeon R4 (Stoney Ridge)","516 - Intel HD Graphics 4000","515 - AMD Radeon HD 7480D","507 - Intel HD Graphics 505","506 - Intel UHD Graphics 605","505 - Intel HD Graphics 5300","476 - Intel HD Graphics 510","475 - Intel HD Graphics 610","474 - Intel HD Graphics 4400","473 - Intel HD Graphics 515","466 - AMD Radeon HD 8470D","457 - AMD Radeon HD 8550G","441 - Intel HD Graphics 5000","438 - AMD Radeon HD 7660G","437 - NVIDIA GeForce 710M","434 - AMD Radeon R5 (Kaveri)","433 - AMD Radeon R5 (Carrizo)","432 - Intel HD Graphics 615","431 - Intel UHD Graphics 615","424 - Intel HD Graphics 5500","422 - Intel HD Graphics 4600","419 - AMD Radeon HD 8610G","417 - Intel Iris Graphics 5100","415 - NVIDIA Quadro K610M","414 - Intel HD Graphics 6000","408 - AMD Radeon R5 M420","407 - AMD Radeon R5 M315","406 - AMD Radeon R5 M230","405 - AMD Radeon R5 M320","404 - AMD Radeon R5 M240","402 - AMD Radeon R5 (Stoney Ridge)","401 - NVIDIA GeForce GT 720M","400 - Intel Iris Graphics 6100","399 - Intel HD Graphics 520","398 - AMD Radeon RX Vega 3","397 - NVIDIA GeForce 820M","396 - NVIDIA GeForce 910M","394 - AMD Radeon R5 M255","393 - AMD Radeon R5 M430","392 - AMD Radeon R5 M330","391 - AMD Radeon R5 M335","389 - AMD Radeon HD 7560D","383 - AMD Radeon HD 8650G","367 - NVIDIA Quadro K1000M","365 - AMD Radeon HD 7660D","364 - AMD Radeon R6 M255DX","357 - Intel HD Graphics 5600","347 - AMD FirePro W2100","338 - AMD Radeon R6 (Kaveri)","326 - AMD Radeon R6 (Carrizo)","325 - Intel HD Graphics 620","324 - Intel UHD Graphics 620","323 - AMD Radeon R5 (Bristol Ridge)","321 - Intel HD Graphics P530","320 - Intel HD Graphics 530","319 - Intel HD Graphics P630","318 - Intel HD Graphics 630","317 - Intel UHD Graphics 630","316 - AMD Radeon RX Vega 6","315 - AMD Radeon R6 M340DX","314 - AMD Radeon 520","313 - AMD Radeon R7 M340","312 - AMD Radeon R7 M260","306 - AMD Radeon R7 M440","305 - AMD Radeon R8 M445DX","302 - NVIDIA GeForce 920M","300 - AMD Radeon R7 M360","297 - AMD Radeon R7 M460","296 - AMD Radeon R8 M365DX","295 - AMD Radeon R7 (Kaveri)","294 - AMD Radeon R7 (Carrizo)","293 - NVIDIA GeForce GT 640M","292 - AMD Radeon R7 (Bristol Ridge)","288 - AMD Radeon R7 M265","287 - AMD Radeon R7 M270","284 - AMD FirePro M4100","281 - NVIDIA GeForce GT 730M","278 - AMD Radeon R7 M260X","271 - AMD FirePro M4000","269 - NVIDIA GeForce 825M","267 - NVIDIA GeForce GT 735M","264 - NVIDIA Quadro K2000M","260 - Intel Iris Graphics 540","259 - NVIDIA GeForce 920MX","258 - Intel Iris Plus Graphics 640","257 - NVIDIA GeForce MX110","256 - NVIDIA GeForce 830M","255 - AMD Radeon 530","254 - Intel Iris Graphics 550","253 - NVIDIA GeForce 930M","252 - Intel Iris Plus Graphics 650","251 - NVIDIA GeForce GT 740M","250 - AMD Radeon R7 384 Cores (Kaveri Desktop)","249 - Intel Iris Pro Graphics 5200","248 - AMD Radeon R7 512 Cores (Kaveri Desktop)","245 - NVIDIA GeForce GT 745M","244 - AMD Radeon R7 M275DX","243 - NVIDIA GeForce 840M","242 - NVIDIA Quadro M500M","239 - AMD Radeon R7 M370","237 - AMD Radeon R7 M445","236 - Intel Iris Plus Graphics 655","235 - AMD Radeon R9 M375","234 - AMD FirePro W4190M","233 - NVIDIA Quadro M600M","232 - NVIDIA GeForce 930MX","231 - NVIDIA GeForce 940M","230 - AMD Radeon RX Vega 8","229 - NVIDIA Quadro K1100M","228 - NVIDIA Quadro M520","227 - NVIDIA GeForce 940MX","226 - NVIDIA GeForce MX130","225 - Intel Iris Pro Graphics 6200","224 - NVIDIA GeForce GT 750M","219 - AMD FirePro W4100","218 - AMD FirePro W4170M","216 - AMD Radeon R7 M465","214 - AMD Radeon R9 M265X","211 - NVIDIA GeForce 845M","209 - NVIDIA GeForce GT 755M","208 - AMD Radeon R7 250","203 - NVIDIA Quadro K2100M","202 - AMD FirePro M5100","201 - AMD FirePro M6000","199 - NVIDIA Quadro K3000M","193 - AMD FirePro W5130M","192 - NVIDIA Maxwell GPU Surface Book (940M, GDDR5)","190 - AMD Radeon R9 M275","189 - NVIDIA GeForce GTX 760M","186 - AMD Radeon R9 M370X","185 - AMD FirePro W5170M","184 - NVIDIA Quadro K3100M","175 - AMD Radeon R9 M380","173 - AMD Radeon R9 M470","168 - Intel Iris Pro Graphics 580","167 - Intel Iris Pro Graphics P580","166 - AMD Radeon RX Vega 10","165 - NVIDIA Quadro K4000M","161 - NVIDIA Quadro P500","160 - NVIDIA GeForce GTX 765M","159 - NVIDIA GeForce 945M","154 - AMD Radeon RX Vega 11","153 - AMD Radeon R9 M280X","152 - NVIDIA Quadro M620","151 - NVIDIA Quadro M1000M","150 - NVIDIA GeForce GTX 850M","149 - AMD Radeon R9 M385X","148 - AMD Radeon R9 M470X","147 - AMD Radeon Pro 450","146 - NVIDIA GeForce GTX 950M","138 - NVIDIA GeForce GTX 860M","137 - AMD Radeon Pro WX 3100 Mobile","136 - AMD Radeon RX 540","135 - NVIDIA GeForce GTX 770M","134 - NVIDIA Quadro K4100M","133 - NVIDIA Quadro K5000M","132 - NVIDIA Quadro M2000M","131 - NVIDIA GeForce MX150","130 - NVIDIA Quadro P600","129 - NVIDIA GeForce GT 1030 (Desktop)","128 - AMD Radeon Pro 455","127 - AMD Radeon Pro 555","126 - AMD Radeon Pro 555X","125 - NVIDIA Quadro M1200","121 - AMD Radeon RX 550 (Laptop)","120 - NVIDIA GeForce GTX 750 Ti","119 - NVIDIA GeForce GTX 960M","118 - AMD Radeon Pro WX 4130","117 - AMD Radeon Pro 460","116 - AMD Radeon Pro 560","115 - AMD Radeon Pro 560X","113 - AMD FirePro M6100","112 - AMD Radeon R9 M390","109 - AMD Radeon RX 460 (Laptop)","103 - AMD Radeon R9 M290X","102 - NVIDIA GeForce GTX 870M","101 - NVIDIA Quadro M2200","100 - AMD Radeon RX 560 (Laptop)","99 - AMD Radeon RX 560X (Laptop)","98 - NVIDIA GeForce GTX 965M","96 - AMD Radeon Pro WX 4150","95 - AMD Radeon RX 460 (Desktop)","93 - NVIDIA Quadro P1000","92 - NVIDIA Quadro K5100M","91 - NVIDIA GeForce GTX 780M","90 - NVIDIA GeForce GTX 760","88 - AMD Radeon R9 270X","87 - NVIDIA GeForce GTX 950","86 - NVIDIA GeForce GTX 880M","84 - AMD Radeon R7 370","83 - AMD Radeon R9 M395","82 - AMD FirePro W7170M","81 - NVIDIA GeForce GTX 1050 Max-Q","80 - NVIDIA GeForce GTX 1050 (Notebook)","79 - NVIDIA GeForce GTX 1050 (Desktop)","78 - NVIDIA Quadro M3000M","77 - AMD Radeon R9 M390X","76 - AMD Radeon R9 M295X","75 - AMD Radeon R9 M485X","74 - AMD Radeon RX Vega M GL / 870","73 - AMD Radeon R9 M395X","68 - NVIDIA Quadro M4000M","67 - NVIDIA GeForce GTX 970M","66 - NVIDIA Quadro P2000","65 - NVIDIA GeForce GTX 1050 Ti (Desktop)","64 - NVIDIA GeForce GTX 1050 Ti Max-Q","63 - NVIDIA GeForce GTX 1050 Ti (Notebook)","62 - NVIDIA GeForce GTX 960","61 - AMD Radeon R9 380","60 - AMD Radeon R9 280X","59 - NVIDIA Quadro M5000M","58 - AMD Radeon RX Vega M GH","57 - NVIDIA GeForce GTX 980M","52 - NVIDIA GeForce GTX 965M SLI","50 - AMD Radeon R9 290X","48 - NVIDIA GeForce GTX 880M SLI","47 - AMD Radeon RX 470 (Laptop)","46 - AMD Radeon RX 570 (Laptop)","45 - AMD Radeon RX 470 (Desktop)","44 - AMD Radeon Pro WX 7100","42 - NVIDIA Quadro P3000 Max-Q","41 - NVIDIA GeForce GTX 1060 Max-Q","40 - NVIDIA GeForce GTX 970","39 - NVIDIA Quadro P3000","38 - AMD Radeon RX Vega Mobile","37 - NVIDIA GeForce GTX 780 Ti","36 - AMD Radeon RX 580 (Laptop)","35 - NVIDIA Quadro P3200","34 - NVIDIA Quadro P4000 Max-Q","33 - NVIDIA GeForce GTX 1060 (Laptop)","32 - AMD Radeon RX 480 (Desktop)","31 - NVIDIA Quadro P4000","30 - NVIDIA GeForce GTX 1060 (Desktop)","29 - NVIDIA GeForce GTX 970M SLI","28 - AMD Radeon R9 390X","27 - NVIDIA Quadro M5500","26 - NVIDIA GeForce GTX 980 (Laptop)","25 - AMD Radeon RX 580 (Desktop)","24 - NVIDIA GeForce GTX 980","23 - AMD Radeon R9 Nano","22 - AMD Radeon R9 Fury","21 - NVIDIA GeForce GTX 980M SLI","20 - NVIDIA Quadro P5000 Max-Q","19 - NVIDIA GeForce GTX 1070 Max-Q","18 - NVIDIA GeForce GTX 980 Ti","17 - NVIDIA Quadro P5000","16 - NVIDIA Quadro P4200","15 - NVIDIA GeForce GTX 1070 (Laptop)","14 - NVIDIA GeForce GTX 1080 Max-Q","13 - NVIDIA GeForce GTX 1070 (Desktop)","12 - AMD Radeon Pro Vega 56","11 - NVIDIA Quadro P5200","10 - NVIDIA GeForce GTX 980 SLI (Laptop)","9 - NVIDIA GeForce GTX 1070 Ti (Desktop)","8 - NVIDIA GeForce GTX 1080 (Laptop)","7 - AMD Radeon RX Vega 64","6 - NVIDIA GeForce GTX 1080 (Desktop)","5 - NVIDIA GeForce GTX 1070 SLI (Laptop)","4 - NVIDIA GeForce GTX 1070 SLI (Desktop)","3 - NVIDIA GeForce GTX 1080 SLI (Laptop)","2 - NVIDIA Titan X Pascal","1 - NVIDIA GeForce GTX 1080 Ti (Desktop)"],o.BENCHMARK_SCORE_MOBILE=["848 - ARM Mali-200","847 - Qualcomm Adreno 200","846 - PowerVR SGX530","845 - PowerVR SGX531","844 - PowerVR SGX535","843 - Vivante GC800","842 - Qualcomm Adreno 203","841 - Qualcomm Adreno 205","839 - PowerVR SGX540","837 - NVIDIA GeForce ULP (Tegra 2)","836 - ARM Mali-400 MP","835 - ARM Mali-400 MP2","834 - Vivante GC1000+ Dual-Core","833 - Qualcomm Adreno 220","832 - Broadcom VideoCore-IV","831 - NVIDIA GeForce ULP (Tegra 3)","830 - ARM Mali-400 MP4","829 - Vivante GC4000","828 - Qualcomm Adreno 225","820 - Qualcomm Adreno 302","819 - Vivante GC7000UL","818 - ARM Mali-T720","817 - Qualcomm Adreno 304","816 - Qualcomm Adreno 305","815 - Qualcomm Adreno 306","814 - Qualcomm Adreno 308","813 - PowerVR SGX544","812 - ARM Mali-T720 MP2","811 - PowerVR SGX544MP2","810 - PowerVR SGX545","807 - PowerVR SGX543MP2","797 - PowerVR SGX543MP3","789 - ARM Mali-T830 MP1","788 - ARM Mali-450 MP4","787 - ARM Mali-T720 MP4","786 - PowerVR GE8100","785 - ARM Mali-T760 MP2","784 - Qualcomm Adreno 320","783 - ARM Mali-T624","782 - PowerVR SGX543MP4","755 - ARM Mali-T830 MP2","754 - Qualcomm Adreno 405","753 - PowerVR G6200","752 - NVIDIA GeForce Tegra 4","747 - ARM Mali-T604 MP4","741 - ARM Mali-T830 MP3","740 - ARM Mali-T860 MP2","736 - Qualcomm Adreno 505","735 - Qualcomm Adreno 506","734 - Qualcomm Adreno 508","733 - Qualcomm Adreno 509","732 - ARM Mali-T628 MP4","731 - PowerVR SGX554MP4","693 - ARM Mali-T760 MP4","692 - ARM Mali-T628 MP6","691 - Intel HD Graphics (Bay Trail)","690 - PowerVR G6400","689 - PowerVR GX6250","688 - PowerVR G6430","687 - Qualcomm Adreno 330","686 - Qualcomm Adreno 510","685 - Qualcomm Adreno 512","610 - ARM Mali-G51 MP4","609 - Intel HD Graphics (Cherry Trail)","607 - Qualcomm Adreno 418","587 - Qualcomm Adreno 420","586 - PowerVR GX6450","576 - ARM Mali-T880 MP2","575 - ARM Mali-T760 MP6","543 - ARM Mali-T880 MP4","542 - ARM Mali-G72 MP3","523 - Qualcomm Adreno 430","518 - ARM Mali-G71 MP2","517 - ARM Mali-T760 MP8","472 - ARM Mali-T880 MP12","471 - Apple A9 / PowerVR GT7600","470 - NVIDIA Tegra K1 Kepler GPU","469 - PowerVR GXA6850","468 - Qualcomm Adreno 530","430 - ARM Mali-G71 MP8","429 - ARM Mali-G72 MP12","428 - ARM Mali-G71 MP20","427 - ARM Mali-G72 MP18","426 - Qualcomm Adreno 540","425 - Qualcomm Adreno 630","409 - Apple A10 Fusion GPU / PowerVR","322 - NVIDIA Tegra X1 Maxwell GPU","299 - Apple A9X / PowerVR Series 7XT","263 - Apple A10X Fusion GPU / PowerVR","262 - Apple A11 Bionic GPU","261 - Apple A12 Bionic GPU"]},function(e,o,r){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var n=function(){function e(e,o){for(var r=0;r<o.length;r++){var n=o[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(o,r,n){return r&&e(o.prototype,r),n&&e(o,n),o}}();var a=function(){function e(){var o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;!function(e,o){if(!(e instanceof o))throw new TypeError("Cannot call a class as a function")}(this,e),this.setUserAgent(o)}return n(e,[{key:"match",value:function(e){return this.matchCache[e]||(this.matchCache[e]=this.userAgent.indexOf(e)>-1),this.matchCache[e]}},{key:"getUserAgent",value:function(){return"undefined"!=typeof document?window.navigator.userAgent:""}},{key:"setUserAgent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.userAgent=e||this.userAgent||this.getUserAgent(),this.userAgent&&(this.matchCache={},this.userAgent=this.userAgent.toLowerCase())}},{key:"iphone",get:function(){return!this.windows&&this.match("iphone")}},{key:"ipod",get:function(){return this.match("ipod")}},{key:"ipad",get:function(){return this.match("ipad")}},{key:"android",get:function(){return!this.windows&&this.match("android")}},{key:"androidPhone",get:function(){return this.android&&this.match("mobile")}},{key:"androidTablet",get:function(){return this.android&&!this.match("mobile")}},{key:"blackberry",get:function(){return this.match("blackberry")||this.match("bb10")||this.match("rim")}},{key:"blackberryPhone",get:function(){return this.blackberry&&!this.match("tablet")}},{key:"blackberryTablet",get:function(){return this.blackberry&&this.match("tablet")}},{key:"windows",get:function(){return this.match("windows")}},{key:"windowsPhone",get:function(){return this.windows&&this.match("phone")}},{key:"windowsTablet",get:function(){return this.windows&&this.match("touch")&&!this.windowsPhone}},{key:"firefoxOS",get:function(){return(this.match("(mobile;")||this.match("(tablet;"))&&this.match("; rv:")}},{key:"firefoxOSPhone",get:function(){return this.firefoxOS&&this.match("mobile")}},{key:"firefoxOSTablet",get:function(){return this.firefoxOS&&this.match("tablet")}},{key:"mobile",get:function(){return this.androidPhone||this.iphone||this.ipod||this.windowsPhone||this.blackberryPhone||this.firefoxOSPhone}},{key:"tablet",get:function(){return this.ipad||this.androidTablet||this.blackberryTablet||this.windowsTablet||this.firefoxOSTablet}}]),e}();o.default=a},function(e,o,r){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.getWebGLUnmaskedRenderer=function(){var e={alpha:!1,stencil:!1,antialias:!1,depth:!1,failIfMajorPerformanceCaveat:!0},o=document.createElement("canvas"),r=o.getContext("webgl",e)||o.getContext("experimental-webgl",e);if(!(r&&r instanceof WebGLRenderingContext))return!1;var n=r.getExtension("WEBGL_debug_renderer_info"),a=n&&r.getParameter(n.UNMASKED_RENDERER_WEBGL);return o=void 0,r=void 0,a},o.getBenchmarkByPercentage=function(e,o){var r=0;return o.map(function(o){var n=Math.round(e.length/100*o),a=e.slice(r,r+n);return r+=n,a})}}])});