Bump version 2.0.1

This commit is contained in:
Faisal Salman
2025-02-04 21:49:28 +07:00
parent 3ca23193dd
commit 51dce55e65
19 changed files with 276 additions and 210 deletions

View File

@@ -1,4 +1,4 @@
// Type definitions for Enums submodule of UAParser.js v2.0.0
// Type definitions for Enums submodule of UAParser.js v2.0.1
// Project: https://github.com/faisalman/ua-parser-js
// Definitions by: Faisal Salman <https://github.com/faisalman>

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////
/* Enums for UAParser.js v2.0.0
/* Enums for UAParser.js v2.0.1
https://github.com/faisalman/ua-parser-js
Author: Faisal Salman <f@faisalman.com>
AGPLv3 License */

View File

@@ -3,7 +3,7 @@
// Source: /src/enums/ua-parser-enums.js
///////////////////////////////////////////////
/* Enums for UAParser.js v2.0.0
/* Enums for UAParser.js v2.0.1
https://github.com/faisalman/ua-parser-js
Author: Faisal Salman <f@faisalman.com>
AGPLv3 License */
@@ -38,6 +38,7 @@ const Browser = Object.freeze({
COBALT: 'Cobalt',
COC_COC: 'Coc Coc',
CONKEROR: 'Conkeror',
DAUM: 'Daum',
DILLO: 'Dillo',
DOLPHIN: 'Dolphin',
DORIS: 'Doris',
@@ -370,11 +371,13 @@ const OS = Object.freeze({
SYMBIAN: 'Symbian',
TIZEN: 'Tizen',
UBUNTU: 'Ubuntu',
UBUNTU_TOUCH: 'Ubuntu Touch',
UNIX: 'Unix',
VECTORLINUX: 'VectorLinux',
WATCHOS: 'watchOS',
WEBOS: 'WebOS',
WINDOWS: 'Windows',
WINDOWS_IOT: 'Windows IoT',
WINDOWS_MOBILE: 'Windows Mobile',
WINDOWS_PHONE: 'Windows Phone',
XBOX: 'Xbox',

View File

@@ -1,4 +1,4 @@
// Type definitions for Helpers submodule of UAParser.js v2.0.0
// Type definitions for Helpers submodule of UAParser.js v2.0.1
// Project: https://github.com/faisalman/ua-parser-js
// Definitions by: Faisal Salman <https://github.com/faisalman>

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////
/* Extensions for UAParser.js v2.0.0
/* Extensions for UAParser.js v2.0.1
https://github.com/faisalman/ua-parser-js
Author: Faisal Salman <f@faisalman.com>
AGPLv3 License */

View File

@@ -3,7 +3,7 @@
// Source: /src/extensions/ua-parser-extensions.js
///////////////////////////////////////////////
/* Extensions for UAParser.js v2.0.0
/* Extensions for UAParser.js v2.0.1
https://github.com/faisalman/ua-parser-js
Author: Faisal Salman <f@faisalman.com>
AGPLv3 License */
@@ -165,7 +165,7 @@ const ExtraDevices = Object.freeze({
/\b(zur\d{3}) b/i // Swiss ZUR Tablet
], [MODEL, [VENDOR, 'Swiss'], [TYPE, TABLET]], [
/\b((zeki)?tb.*\b) b/i // Zeki Tablets
/^((zeki)?tb.*\b) b/i // Zeki Tablets
], [MODEL, [VENDOR, 'Zeki'], [TYPE, TABLET]], [
/\b([yr]\d{2}) b/i,
@@ -222,31 +222,25 @@ const Fetchers = Object.freeze({
// ChatGPT-User - https://platform.openai.com/docs/plugins/bot
// DuckAssistBot - https://duckduckgo.com/duckassistbot/
// BingPreview / Mastodon / Pinterestbot / Redditbot / Rogerbot / Telegrambot / Twitterbot / UptimeRobot
/(ahrefssiteaudit|bingpreview|chatgpt-user|mastodon|(?:discord|duckassist|linkedin|pinterest|reddit|roger|telegram|twitter|uptimero)bot)\/([\w\.]+)/i,
// Google Site Verifier / Meta / Yahoo! Japan
// Yandex Bots - https://yandex.com/bots
/(ahrefssiteaudit|bingpreview|chatgpt-user|mastodon|(?:discord|duckassist|linkedin|pinterest|reddit|roger|telegram|twitter|uptimero)bot|google-site-verification|meta-externalfetcher|y!?j-dlc|yandex(?:calendar|direct(?:dyn)?|searchshop)|yadirectfetcher)\/([\w\.]+)/i,
// Google Site Verifier
/(google-site-verification)\/([\w\.]+)/i,
// Meta
/(meta-externalfetcher)\/([\w\.]+)/i,
// Bluesky
/(bluesky) cardyb\/([\w\.]+)/i,
// Slackbot - https://api.slack.com/robots
/(slack(?:bot)?(?:-imgproxy|-linkexpanding)?) ([\w\.]+)/i,
// WhatsApp
/(whatsapp)\/([\w\.]+)[\/ ][ianw]/i,
// Yahoo! Japan
/(y!?j-dlc)\/([\w\.]+)/i,
// Yandex Bots - https://yandex.com/bots
/(yandex(?:calendar|direct(?:dyn)?|searchshop)|yadirectfetcher)\/([\w\.]+)/i,
/(yandex(?:sitelinks|userproxy))/i
/(whatsapp)\/([\w\.]+)[\/ ][ianw]/i
],
[NAME, VERSION, [TYPE, FETCHER]],
// Google Bots / Cohere / Snapchat / Vercelbot
[/(cohere-ai|vercelbot|feedfetcher-google|google(?:-read-aloud|producer)|(?=bot; )snapchat)/i],
[
// Google Bots / Cohere / Snapchat / Vercelbot / Yandex Bots
/(cohere-ai|vercelbot|feedfetcher-google|google(?:-read-aloud|producer)|(?=bot; )snapchat|yandex(?:sitelinks|userproxy))/i
],
[NAME, [TYPE, FETCHER]],
]
});
@@ -271,104 +265,48 @@ const InApps = Object.freeze({
const MediaPlayers = Object.freeze({
browser : [[
/(apple(?:coremedia|))\/([\w\._]+)/i, // Generic Apple CoreMedia
/(coremedia) v([\w\._]+)/i
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
/(aqualung|lyssna|bsplayer)\/([\w\.-]+)/i // Aqualung/Lyssna/BSPlayer
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
/(ares|ossproxy)\s([\w\.-]+)/i // Ares/OSSProxy
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
/(audacious|audimusicstream|amarok|bass|core|dalvik|gnomemplayer|music on console|nsplayer|psp-internetradioplayer|videos)\/([\w\.-]+)/i,
// Audacious/AudiMusicStream/Amarok/BASS/OpenCORE/Dalvik/GnomeMplayer/MoC
/(apple(?:coremedia|tv))\/([\w\._]+)/i, // Generic Apple CoreMedia
/(coremedia) v([\w\._]+)/i,
// Ares/Nexplayer/OSSProxy
/(ares|clementine|music player daemon|nexplayer|ossproxy) ([\w\.-]+)/i,
// Aqualung/Lyssna/BSPlayer/Clementine/MPD
// Audacious/AudiMusicStream/Amarok/BASS/OpenCORE/GnomeMplayer/MoC
// NSPlayer/PSP-InternetRadioPlayer/Videos
/(clementine|music player daemon)\s([\w\.-]+)/i, // Clementine/MPD
/(lg player|nexplayer)\s([\d\.]+)/i,
/player\/(nexplayer|lg player)\s([\w\.-]+)/i // NexPlayer/LG Player
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
/(nexplayer)\s([\w\.-]+)/i // Nexplayer
// Nero Home/Nero Scout/Nokia
// QuickTime/RealMedia/RadioApp/RadioClientApplication/
// SoundTap/Totem/Stagefright/Streamium
// XBMC/gvfs/Xine/XMMS/irapp
/^(aqualung|audacious|audimusicstream|amarok|bass|bsplayer|core|gnomemplayer|gvfs|irapp|lyssna|music on console|nero (?:home|scout)|nokia\d+|nsplayer|psp-internetradioplayer|quicktime|rma|radioapp|radioclientapplication|soundtap|stagefright|streamium|totem|videos|xbmc|xine|xmms)\/([\w\.-]+)/i,
/(lg player|nexplayer) ([\d\.]+)/i,
/player\/(nexplayer|lg player) ([\w\.-]+)/i, // NexPlayer/LG Player
/(gstreamer) souphttpsrc.+libsoup\/([\w\.-]+)/i, // Gstreamer
/(htc streaming player) [\w_]+ \/ ([\d\.]+)/i, // HTC Streaming Player
/(lavf)([\d\.]+)/i, // Lavf (FFMPEG)
// MPlayer SVN
/(mplayer)(?: |\/)(?:(?:sherpya-){0,1}svn)(?:-| )(r\d+(?:-\d+[\w\.-]+))/i,
/ (songbird)\/([\w\.-]+)/i, // Songbird/Philips-Songbird
/(winamp)(?:3 version|mpeg| ) ([\w\.-]+)/i, // Winamp
/(vlc)(?:\/| media player - version )([\w\.-]+)/i, // VLC Videolan
/^(foobar2000|itunes|smp)\/([\d\.]+)/i, // Foobar2000/iTunes/SMP
/com\.(riseupradioalarm)\/([\d\.]*)/i, // RiseUP Radio Alarm
/(mplayer)(?:\s|\/| unknown-)([\w\.\-]+)/i, // MPlayer
// Windows Media Server
/(windows)\/([\w\.-]+) upnp\/[\d\.]+ dlnadoc\/[\d\.]+ home media server/i
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
/(flrp)\/([\w\.-]+)/i // Flip Player
], [[NAME, 'Flip Player'], VERSION, [TYPE, MEDIAPLAYER]], [
/(fstream|nativehost|queryseekspider)/i
// FStream/NativeHost/QuerySeekSpider
// MPlayer (no other info)/Media Player Classic/Nero ShowTime
// OCMS-bot/tap in radio/tunein/unknown/winamp (no other info)
// inlight radio / YourMuze
/(fstream|media player classic|inlight radio|mplayer|nativehost|nero showtime|ocms-bot|queryseekspider|tapinradio|tunein radio|winamp|yourmuze)/i
], [NAME, [TYPE, MEDIAPLAYER]], [
/(gstreamer) souphttpsrc.+libsoup\/([\w\.-]+)/i
// Gstreamer
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
/(htc_one_s|windows-media-player|wmplayer)\/([\w\.-]+)/i, // HTC One S / Windows Media Player
], [[NAME, /[_-]/g, ' '], VERSION, [TYPE, MEDIAPLAYER]], [
/(htc streaming player)\s[\w_]+\s\/\s([\d\.]+)/i, // HTC Streaming Player
/(lavf)([\d\.]+)/i // Lavf (FFMPEG)
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
/(htc_one_s)\/([\d\.]+)/i, // HTC One S
], [[NAME, /_/g, ' '], VERSION, [TYPE, MEDIAPLAYER]], [
/(mplayer)(?:\s|\/)(?:(?:sherpya-){0,1}svn)(?:-|\s)(r\d+(?:-\d+[\w\.-]+))/i,
// MPlayer SVN
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
/(mplayer)(?:\s|\/)([\w\.-]+)/i, // MPlayer
/(mplayer) unknown-([\w\.\-]+)/i // MPlayer UNKNOWN
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
/(mplayer)/i, // MPlayer (no other info)
/(yourmuze)/i, // YourMuze
/(media player classic|nero showtime)/i // Media Player Classic/Nero ShowTime
], [NAME, [TYPE, MEDIAPLAYER]], [
/(nero (?:home|scout))\/([\w\.-]+)/i // Nero Home/Nero Scout
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
/(nokia\d+)\/([\w\.-]+)/i // Nokia
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
/\s(songbird)\/([\w\.-]+)/i // Songbird/Philips-Songbird
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
/(winamp)3 version ([\w\.-]+)/i, // Winamp
/(winamp)\s([\w\.-]+)/i,
/(winamp)mpeg\/([\w\.-]+)/i
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
/(ocms-bot|tapinradio|tunein radio|unknown|winamp|inlight radio)/i // OCMS-bot/tap in radio/tunein/unknown/winamp (no other info)
// inlight radio
], [NAME, [TYPE, MEDIAPLAYER]], [
/(quicktime|rma|radioapp|radioclientapplication|soundtap|totem|stagefright|streamium)\/([\w\.-]+)/i
// QuickTime/RealMedia/RadioApp/RadioClientApplication/
// SoundTap/Totem/Stagefright/Streamium
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
/(smp)([\d\.]+)/i // SMP
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
/(vlc) media player - version ([\w\.]+)/i, // VLC Videolan
/(vlc)\/([\w\.-]+)/i,
/(xbmc|gvfs|xine|xmms|irapp)\/([\w\.-]+)/i, // XBMC/gvfs/Xine/XMMS/irapp
/(foobar2000)\/([\d\.]+)/i, // Foobar2000
/(itunes)\/([\d\.]+)/i // iTunes
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
/(wmplayer)\/([\w\.-]+)/i, // Windows Media Player
/(windows-media-player)\/([\w\.-]+)/i
], [[NAME, /-/g, ' '], VERSION, [TYPE, MEDIAPLAYER]], [
/windows\/([\w\.-]+) upnp\/[\d\.]+ dlnadoc\/[\d\.]+ (home media server)/i,
// Windows Media Server
], [VERSION, [NAME, 'Windows'], [TYPE, MEDIAPLAYER]], [
/(com\.riseupradioalarm)\/([\d\.]*)/i // RiseUP Radio Alarm
], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
/(rad.io)\s([\d\.]+)/i, // Rad.io
/(radio.(?:de|at|fr))\s([\d\.]+)/i
/(rad.io|radio.(?:de|at|fr)) ([\d\.]+)/i // Rad.io
], [[NAME, 'rad.io'], VERSION, [TYPE, MEDIAPLAYER]]
]
});
@@ -387,6 +325,24 @@ const Libraries = Object.freeze({
]
});
/////////////
// VEHICLES
////////////
const Vehicles = Object.freeze({
device : [
[
/dilink.+(byd) auto/i, // BYD
], [VENDOR], [
/(rivian) (r1t)/i, // Rivian
], [VENDOR, MODEL], [
/vcc.+netfront/i, // Volvo
], [[VENDOR, 'Volvo']]
]
});
//////////
// BOTS
/////////
@@ -409,5 +365,6 @@ export {
Fetchers,
InApps,
Libraries,
MediaPlayers
MediaPlayers,
Vehicles
};

View File

@@ -1,4 +1,4 @@
// Type definitions for Helpers submodule of UAParser.js v2.0.0
// Type definitions for Helpers submodule of UAParser.js v2.0.1
// Project: https://github.com/faisalman/ua-parser-js
// Definitions by: Faisal Salman <https://github.com/faisalman>

View File

@@ -1,5 +1,5 @@
///////////////////////////////////////////////
/* Helpers for UAParser.js v2.0.0
/* Helpers for UAParser.js v2.0.1
https://github.com/faisalman/ua-parser-js
Author: Faisal Salman <f@faisalman.com>
AGPLv3 License */

View File

@@ -3,7 +3,7 @@
// Source: /src/helpers/ua-parser-helpers.js
///////////////////////////////////////////////
/* Helpers for UAParser.js v2.0.0
/* Helpers for UAParser.js v2.0.1
https://github.com/faisalman/ua-parser-js
Author: Faisal Salman <f@faisalman.com>
AGPLv3 License */

View File

@@ -1,4 +1,4 @@
// Type definitions for UAParser.js v2.0.0
// Type definitions for UAParser.js v2.0.1
// Project: https://github.com/faisalman/ua-parser-js
// Definitions by: Faisal Salman <https://github.com/faisalman>

View File

@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////////
/* UAParser.js v2.0.0
/* UAParser.js v2.0.1
Copyright © 2012-2024 Faisal Salman <f@faisalman.com>
AGPLv3 License *//*
Detect Browser, Engine, OS, CPU, and Device type/model from User-Agent data.
@@ -19,7 +19,7 @@
// Constants
/////////////
var LIBVERSION = '2.0.0',
var LIBVERSION = '2.0.1',
UA_MAX_LENGTH = 500,
USER_AGENT = 'user-agent',
EMPTY = '',

View File

@@ -3,7 +3,7 @@
// Source: /src/main/ua-parser.js
/////////////////////////////////////////////////////////////////////////////////
/* UAParser.js v2.0.0
/* UAParser.js v2.0.1
Copyright © 2012-2024 Faisal Salman <f@faisalman.com>
AGPLv3 License *//*
Detect Browser, Engine, OS, CPU, and Device type/model from User-Agent data.
@@ -21,20 +21,35 @@
// Constants
/////////////
var LIBVERSION = '2.0.0',
var LIBVERSION = '2.0.1',
UA_MAX_LENGTH = 500,
USER_AGENT = 'user-agent',
EMPTY = '',
UNKNOWN = '?',
// typeof
FUNC_TYPE = 'function',
UNDEF_TYPE = 'undefined',
OBJ_TYPE = 'object',
STR_TYPE = 'string',
MAJOR = 'major',
MODEL = 'model',
// properties
UA_BROWSER = 'browser',
UA_CPU = 'cpu',
UA_DEVICE = 'device',
UA_ENGINE = 'engine',
UA_OS = 'os',
UA_RESULT = 'result',
NAME = 'name',
TYPE = 'type',
VENDOR = 'vendor',
VERSION = 'version',
ARCHITECTURE= 'architecture',
MAJOR = 'major',
MODEL = 'model',
// device types
CONSOLE = 'console',
MOBILE = 'mobile',
TABLET = 'tablet',
@@ -42,9 +57,11 @@
WEARABLE = 'wearable',
XR = 'xr',
EMBEDDED = 'embedded',
// browser types
INAPP = 'inapp',
USER_AGENT = 'user-agent',
UA_MAX_LENGTH = 500,
// client hints
BRANDS = 'brands',
FORMFACTORS = 'formFactors',
FULLVERLIST = 'fullVersionList',
@@ -61,12 +78,8 @@
CH_HEADER_PLATFORM = CH_HEADER + '-' + PLATFORM,
CH_HEADER_PLATFORM_VER = CH_HEADER_PLATFORM + '-version',
CH_ALL_VALUES = [BRANDS, FULLVERLIST, MOBILE, MODEL, PLATFORM, PLATFORMVER, ARCHITECTURE, FORMFACTORS, BITNESS],
UA_BROWSER = 'browser',
UA_CPU = 'cpu',
UA_DEVICE = 'device',
UA_ENGINE = 'engine',
UA_OS = 'os',
UA_RESULT = 'result',
// device vendors
AMAZON = 'Amazon',
APPLE = 'Apple',
ASUS = 'ASUS',
@@ -78,20 +91,29 @@
LG = 'LG',
MICROSOFT = 'Microsoft',
MOTOROLA = 'Motorola',
NVIDIA = 'Nvidia',
ONEPLUS = 'OnePlus',
OPPO = 'OPPO',
SAMSUNG = 'Samsung',
SHARP = 'Sharp',
SONY = 'Sony',
XIAOMI = 'Xiaomi',
ZEBRA = 'Zebra',
PREFIX_MOBILE = 'Mobile ',
SUFFIX_BROWSER = ' Browser',
// browsers
CHROME = 'Chrome',
CHROMIUM = 'Chromium',
CHROMECAST = 'Chromecast',
EDGE = 'Edge',
FIREFOX = 'Firefox',
OPERA = 'Opera',
FACEBOOK = 'Facebook',
SOGOU = 'Sogou',
PREFIX_MOBILE = 'Mobile ',
SUFFIX_BROWSER = ' Browser',
// os
WINDOWS = 'Windows';
var isWindow = typeof window !== UNDEF_TYPE,
@@ -401,6 +423,7 @@
/(Klarna)\/([\w\.]+)/i, // Klarna Shopping Browser for iOS & Android
/(kakao(?:talk|story))[\/ ]([\w\.]+)/i, // Kakao App
/(naver)\(.*?(\d+\.[\w\.]+).*\)/i, // Naver InApp
/(daum)apps[\/ ]([\w\.]+)/i, // Daum App
/safari (line)\/([\w\.]+)/i, // Line App for iOS
/\b(line)\/([\w\.]+)\/iab/i, // Line App for Android
/(alipay)client\/([\w\.]+)/i, // Alipay
@@ -463,8 +486,8 @@
/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i, // Mozilla
// Other
/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,
// Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf/Obigo/Mosaic/Go/ICE/UP.Browser
/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,
// Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf/Obigo/Mosaic/Go/ICE/UP.Browser/Ladybird
/\b(links) \(([\w\.]+)/i // Links
], [NAME, [VERSION, /_/g, '.']], [
@@ -474,30 +497,30 @@
cpu : [[
/\b(?:(amd|x|x86[-_]?|wow|win)64)\b/i // AMD64 (x64)
/\b((amd|x|x86[-_]?|wow|win)64)\b/i // AMD64 (x64)
], [[ARCHITECTURE, 'amd64']], [
/(ia32(?=;))/i, // IA32 (quicktime)
/((?:i[346]|x)86)[;\)]/i // IA32 (x86)
/\b((i[346]|x)86)(pc)?\b/i // IA32 (x86)
], [[ARCHITECTURE, 'ia32']], [
/\b(aarch64|arm(v?8e?l?|_?64))\b/i // ARM64
/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i // ARM64
], [[ARCHITECTURE, 'arm64']], [
/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i // ARMHF
/\b(arm(v[67])?ht?n?[fl]p?)\b/i // ARMHF
], [[ARCHITECTURE, 'armhf']], [
// PocketPC mistakenly identified as PowerPC
/windows (ce|mobile); ppc;/i
/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i
], [[ARCHITECTURE, 'arm']], [
/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i // PowerPC
/((ppc|powerpc)(64)?)( mac|;|\))/i // PowerPC
], [[ARCHITECTURE, /ower/, EMPTY, lowerize]], [
/(sun4\w)[;\)]/i // SPARC
/ sun4\w[;\)]/i // SPARC
], [[ARCHITECTURE, 'sparc']], [
/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i
/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i
// IA64, 68K, ARM/64, AVR/32, IRIX/64, MIPS/64, SPARC/64, PA-RISC
], [[ARCHITECTURE, lowerize]]
],
@@ -531,34 +554,38 @@
], [MODEL, [VENDOR, SHARP], [TYPE, MOBILE]], [
// Honor
/(?:honor)([-\w ]+)[;\)]/i
/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i
], [MODEL, [VENDOR, HONOR], [TYPE, TABLET]], [
/honor([-\w ]+)[;\)]/i
], [MODEL, [VENDOR, HONOR], [TYPE, MOBILE]], [
// Huawei
/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i
/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i
], [MODEL, [VENDOR, HUAWEI], [TYPE, TABLET]], [
/(?:huawei)([-\w ]+)[;\)]/i,
/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i
], [MODEL, [VENDOR, HUAWEI], [TYPE, MOBILE]], [
// Xiaomi
/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,
/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i // Mi Pad tablets
],[[MODEL, /_/g, ' '], [VENDOR, XIAOMI], [TYPE, TABLET]], [
/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i, // Xiaomi POCO
/\b; (\w+) build\/hm\1/i, // Xiaomi Hongmi 'numeric' models
/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i, // Xiaomi Hongmi
/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i, // Xiaomi Redmi
/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i, // Xiaomi Redmi 'numeric' models
/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i // Xiaomi Mi
/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i, // Xiaomi Mi
/ ([\w ]+) miui\/v?\d/i
], [[MODEL, /_/g, ' '], [VENDOR, XIAOMI], [TYPE, MOBILE]], [
/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i, // Redmi Pad
/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i // Mi Pad tablets
],[[MODEL, /_/g, ' '], [VENDOR, XIAOMI], [TYPE, TABLET]], [
// OPPO
/; (\w+) bui.+ oppo/i,
/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i
], [MODEL, [VENDOR, 'OPPO'], [TYPE, MOBILE]], [
/\b(opd2\d{3}a?) bui/i
], [MODEL, [VENDOR, 'OPPO'], [TYPE, TABLET]], [
], [MODEL, [VENDOR, OPPO], [TYPE, MOBILE]], [
/\b(opd2(\d{3}a?))(?: bui|\))/i
], [MODEL, [VENDOR, strMapper, { 'OnePlus' : ['304', '403', '203'], '*' : OPPO }], [TYPE, TABLET]], [
// Vivo
/vivo (\w+)(?: bui|\))/i,
@@ -572,7 +599,7 @@
// Motorola
/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,
/\bmot(?:orola)?[- ](\w*)/i,
/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i
/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i
], [MODEL, [VENDOR, MOTOROLA], [TYPE, MOBILE]], [
/\b(mz60\d|xoom[2 ]{0,2}) build\//i
], [MODEL, [VENDOR, MOTOROLA], [TYPE, TABLET]], [
@@ -581,22 +608,24 @@
/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i
], [MODEL, [VENDOR, LG], [TYPE, TABLET]], [
/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,
/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,
/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,
/\blg-?([\d\w]+) bui/i
], [MODEL, [VENDOR, LG], [TYPE, MOBILE]], [
// Lenovo
/(ideatab[-\w ]+)/i,
/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i
/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,
/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i
], [MODEL, [VENDOR, LENOVO], [TYPE, TABLET]], [
// Nokia
/(?:maemo|nokia).*(n900|lumia \d+)/i,
/nokia[-_ ]?([-\w\.]*)/i
], [[MODEL, /_/g, ' '], [VENDOR, 'Nokia'], [TYPE, MOBILE]], [
/(nokia) (t[12][01])/i
], [VENDOR, MODEL, [TYPE, TABLET]], [
/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,
/nokia[-_ ]?(([-\w\. ]*))/i
], [[MODEL, /_/g, ' '], [TYPE, MOBILE], [VENDOR, 'Nokia']], [
// Google
/(pixel c)\b/i // Google Pixel C
/(pixel (c|tablet))\b/i // Google Pixel C/Tablet
], [MODEL, [VENDOR, GOOGLE], [TYPE, TABLET]], [
/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i // Google Pixel
], [MODEL, [VENDOR, GOOGLE], [TYPE, MOBILE]], [
@@ -611,7 +640,7 @@
// OnePlus
/ (kb2005|in20[12]5|be20[12][59])\b/i,
/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i
], [MODEL, [VENDOR, 'OnePlus'], [TYPE, MOBILE]], [
], [MODEL, [VENDOR, ONEPLUS], [TYPE, MOBILE]], [
// Amazon
/(alexa)webm/i,
@@ -687,18 +716,19 @@
], [MODEL, [VENDOR, 'Nothing'], [TYPE, MOBILE]], [
// MIXED
/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,
/(imo) (tab \w+)/i, // IMO
/(infinix) (x1101b?)/i // Infinix XPad
], [VENDOR, MODEL, [TYPE, TABLET]], [
/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,
// BlackBerry/BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron/Infinix/Tecno/Micromax/Advan
/; (imo) ((?!tab)[\w ]+?)(?: bui|\))/i, // IMO
/; (hmd|imo) ([\w ]+?)(?: bui|\))/i, // HMD/IMO
/(hp) ([\w ]+\w)/i, // HP iPAQ
/(asus)-?(\w+)/i, // Asus
/(microsoft); (lumia[\w ]+)/i, // Microsoft Lumia
/(lenovo)[-_ ]?([-\w]+)/i, // Lenovo
/(jolla)/i, // Jolla
/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i, // Lenovo
/(oppo) ?([\w ]+) bui/i // OPPO
], [VENDOR, MODEL, [TYPE, MOBILE]], [
/(imo) (tab \w+)/i, // IMO
/(kobo)\s(ereader|touch)/i, // Kobo
/(archos) (gamepad2?)/i, // Archos
/(hp).+(touchpad(?!.+tablet)|tablet)/i, // HP TouchPad
@@ -709,8 +739,8 @@
], [MODEL, [VENDOR, MICROSOFT], [TYPE, TABLET]], [
/droid [\d\.]+; (fp\du?)(?: b|\))/i // Fairphone
], [MODEL, [VENDOR, 'Fairphone'], [TYPE, MOBILE]], [
/(shield[\w ]+) b/i // Nvidia Shield Tablets
], [MODEL, [VENDOR, 'Nvidia'], [TYPE, TABLET]], [
/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i // Nvidia Tablets
], [MODEL, [VENDOR, NVIDIA], [TYPE, TABLET]], [
/(sprint) (\w+)/i // Sprint Phones
], [VENDOR, MODEL, [TYPE, MOBILE]], [
/(kin\.[onetw]{3})/i // Microsoft Kin
@@ -742,19 +772,24 @@
], [[MODEL, CHROMECAST], [VENDOR, GOOGLE], [TYPE, SMARTTV]], [
/droid.+aft(\w+)( bui|\))/i // Fire TV
], [MODEL, [VENDOR, AMAZON], [TYPE, SMARTTV]], [
/(shield \w+ tv)/i // Nvidia Shield TV
], [MODEL, [VENDOR, NVIDIA], [TYPE, SMARTTV]], [
/\(dtv[\);].+(aquos)/i,
/(aquos-tv[\w ]+)\)/i // Sharp
], [MODEL, [VENDOR, SHARP], [TYPE, SMARTTV]],[
/(bravia[\w ]+)( bui|\))/i // Sony
], [MODEL, [VENDOR, SONY], [TYPE, SMARTTV]], [
/(mitv-\w{5}) bui/i // Xiaomi
/(mi(tv|box)-?\w+) bui/i // Xiaomi
], [MODEL, [VENDOR, XIAOMI], [TYPE, SMARTTV]], [
/Hbbtv.*(technisat) (.*);/i // TechniSAT
], [VENDOR, MODEL, [TYPE, SMARTTV]], [
/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i, // Roku
/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i // HbbTV devices
], [[VENDOR, trim], [MODEL, trim], [TYPE, SMARTTV]], [
/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i // SmartTV from Unidentified Vendors
// SmartTV from Unidentified Vendors
/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i
], [MODEL, [TYPE, SMARTTV]], [
/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i
], [[TYPE, SMARTTV]], [
///////////////////
@@ -764,8 +799,8 @@
/(ouya)/i, // Ouya
/(nintendo) (\w+)/i // Nintendo
], [VENDOR, MODEL, [TYPE, CONSOLE]], [
/droid.+; (shield) bui/i // Nvidia
], [MODEL, [VENDOR, 'Nvidia'], [TYPE, CONSOLE]], [
/droid.+; (shield)( bui|\))/i // Nvidia Portable
], [MODEL, [VENDOR, NVIDIA], [TYPE, CONSOLE]], [
/(playstation \w+)/i // Playstation
], [MODEL, [VENDOR, SONY], [TYPE, CONSOLE]], [
/\b(xbox(?: one)?(?!; xbox))[\); ]/i // Microsoft Xbox
@@ -775,12 +810,23 @@
// WEARABLES
///////////////////
/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i // Samsung Galaxy Watch
/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i // Samsung Galaxy Watch
], [MODEL, [VENDOR, SAMSUNG], [TYPE, WEARABLE]], [
/((pebble))app/i // Pebble
/((pebble))app/i, // Pebble
/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i // Asus ZenWatch / LG Watch / Pixel Watch
], [VENDOR, MODEL, [TYPE, WEARABLE]], [
/(ow(?:19|20)?we?[1-3]{1,3})/i // Oppo Watch
], [MODEL, [VENDOR, OPPO], [TYPE, WEARABLE]], [
/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i // Apple Watch
], [MODEL, [VENDOR, APPLE], [TYPE, WEARABLE]], [
/(opwwe\d{3})/i // OnePlus Watch
], [MODEL, [VENDOR, ONEPLUS], [TYPE, WEARABLE]], [
/(moto 360)/i // Motorola 360
], [MODEL, [VENDOR, MOTOROLA], [TYPE, WEARABLE]], [
/(smartwatch 3)/i // Sony SmartWatch
], [MODEL, [VENDOR, SONY], [TYPE, WEARABLE]], [
/(g watch r)/i // LG G Watch R
], [MODEL, [VENDOR, LG], [TYPE, WEARABLE]], [
/droid.+; (wt63?0{2,3})\)/i
], [MODEL, [VENDOR, ZEBRA], [TYPE, WEARABLE]], [
@@ -803,20 +849,22 @@
], [VENDOR, [TYPE, EMBEDDED]], [
/(aeobc)\b/i // Echo Dot
], [MODEL, [VENDOR, AMAZON], [TYPE, EMBEDDED]], [
/(homepod).+mac os/i // Apple HomePod
], [MODEL, [VENDOR, APPLE], [TYPE, EMBEDDED]], [
/windows iot/i
], [[TYPE, EMBEDDED]], [
////////////////////
// MIXED (GENERIC)
///////////////////
/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i // Android Phones from Unidentified Vendors
], [MODEL, [TYPE, MOBILE]], [
/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i // Android Tablets from Unidentified Vendors
], [MODEL, [TYPE, TABLET]], [
/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i
], [MODEL, [TYPE, strMapper, { 'mobile' : 'Mobile', 'xr' : 'VR', '*' : TABLET }]], [
/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i // Unidentifiable Tablet
], [[TYPE, TABLET]], [
/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i // Unidentifiable Mobile
], [[TYPE, MOBILE]], [
/(android[-\w\. ]{0,9});.+buil/i // Generic Android Device
/droid .+?; ([\w\. -]+)( bui|\))/i // Generic Android Device
], [MODEL, [VENDOR, 'Generic']]
],
@@ -836,8 +884,11 @@
/ekioh(flow)\/([\w\.]+)/i, // Flow
/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i, // KHTML/Tasman/Links
/(icab)[\/ ]([23]\.[\d\.]+)/i, // iCab
/\b(libweb)/i
/\b(libweb)/i // LibWeb
], [NAME, VERSION], [
/ladybird\//i
], [[NAME, 'LibWeb']], [
/rv\:([\w\.]{1,9})\b.+(gecko)/i // Gecko
], [VERSION, NAME]
@@ -848,15 +899,15 @@
// Windows
/microsoft (windows) (vista|xp)/i // Windows (iTunes)
], [NAME, VERSION], [
/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i // Windows Phone
/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i // Windows Phone
], [NAME, [VERSION, strMapper, windowsVersionMap]], [
/windows nt 6\.2; (arm)/i, // Windows RT
/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,
/windows nt 6\.2; (arm)/i, // Windows RT
/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,
/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i
], [[VERSION, strMapper, windowsVersionMap], [NAME, WINDOWS]], [
// iOS/macOS
/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i, // iOS
/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i, // iOS
/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,
/cfnetwork\/.+darwin/i
], [[VERSION, /_/g, '.'], [NAME, 'iOS']], [
@@ -878,15 +929,15 @@
// Mobile OSes
/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i // Android-x86/HarmonyOS
], [VERSION, NAME], [ // Android/WebOS/QNX/Bada/RIM/Maemo/MeeGo/Sailfish OS/OpenHarmony
/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,
/(blackberry)\w*\/([\w\.]*)/i, // Blackberry
/(tizen|kaios)[\/ ]([\w\.]+)/i, // Tizen/KaiOS
/\((series40);/i // Series 40
], [VERSION, NAME], [
/(ubuntu) ([\w\.]+) like android/i // Ubuntu Touch
], [[NAME, /(.+)/, '$1 Touch'], VERSION], [
// Android/Blackberry/WebOS/QNX/Bada/RIM/KaiOS/Maemo/MeeGo/S40/Sailfish OS/OpenHarmony/Tizen
/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i
], [NAME, VERSION], [
/\(bb(10);/i // BlackBerry 10
], [VERSION, [NAME, BLACKBERRY]], [
/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i // Symbian
/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i // Symbian
], [VERSION, [NAME, 'Symbian']], [
/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i // Firefox OS
], [VERSION, [NAME, FIREFOX+' OS']], [
@@ -916,7 +967,7 @@
/(mageia|vectorlinux)[; ]/i, // Mageia/VectorLinux
/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,
// Ubuntu/Debian/SUSE/Gentoo/Arch/Slackware/Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk/Linpus/Raspbian/Plan9/Minix/RISCOS/Contiki/Deepin/Manjaro/elementary/Sabayon/Linspire
/(hurd|linux) ?([\w\.]*)/i, // Hurd/Linux
/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i, // Hurd/Linux
/(gnu) ?([\w\.]*)/i, // GNU
/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i, // FreeBSD/NetBSD/OpenBSD/PC-BSD/GhostBSD/DragonFly
/(haiku) (\w+)/i // Haiku
@@ -1153,17 +1204,27 @@
switch (this.itemType) {
case UA_BROWSER:
case UA_ENGINE:
var brands = uaCH[FULLVERLIST] || uaCH[BRANDS], prevName;
if (brands) {
for (var i in brands) {
var brandName = strip(/(Google|Microsoft) /, brands[i].brand || brands[i]),
var brandName = brands[i].brand || brands[i],
brandVersion = brands[i].version;
if (!/not.a.brand/i.test(brandName) && (!prevName || (/chrom/i.test(prevName) && !/chromi/i.test(brandName)))) {
if (this.itemType == UA_BROWSER && !/not.a.brand/i.test(brandName) && (!prevName || (/chrom/i.test(prevName) && brandName != CHROMIUM))) {
brandName = strMapper(brandName, {
'Chrome' : 'Google Chrome',
'Edge' : 'Microsoft Edge',
'Chrome WebView' : 'Android WebView',
'Chrome Headless' : 'HeadlessChrome'
});
this.set(NAME, brandName)
.set(VERSION, brandVersion)
.set(MAJOR, majorize(brandVersion));
prevName = brandName;
}
if (this.itemType == UA_ENGINE && brandName == CHROMIUM) {
this.set(VERSION, brandVersion);
}
}
}
break;
@@ -1180,11 +1241,16 @@
}
if (uaCH[MODEL]) {
this.set(MODEL, uaCH[MODEL]);
}
// Xbox-Specific Detection
if (uaCH[MODEL] == 'Xbox') {
this.set(TYPE, CONSOLE)
.set(VENDOR, MICROSOFT);
if (!this.get(TYPE) || !this.get(VENDOR)) {
var reParse = {};
rgxMapper.call(reParse, 'droid 9; ' + uaCH[MODEL] + ')', rgxMap);
if (!this.get(TYPE) && !!reParse.type) {
this.set(TYPE, reParse.type);
}
if (!this.get(VENDOR) && !!reParse.vendor) {
this.set(VENDOR, reParse.vendor);
}
}
}
if (uaCH[FORMFACTORS]) {
var ff;