ua-parser-js 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  ///////////////////////////////////////////////
2
- /* Extensions for UAParser.js v2.0.0
2
+ /* Extensions for UAParser.js v2.0.1
3
3
  https://github.com/faisalman/ua-parser-js
4
4
  Author: Faisal Salman <f@faisalman.com>
5
5
  AGPLv3 License */
@@ -161,7 +161,7 @@ const ExtraDevices = Object.freeze({
161
161
  /\b(zur\d{3}) b/i // Swiss ZUR Tablet
162
162
  ], [MODEL, [VENDOR, 'Swiss'], [TYPE, TABLET]], [
163
163
 
164
- /\b((zeki)?tb.*\b) b/i // Zeki Tablets
164
+ /^((zeki)?tb.*\b) b/i // Zeki Tablets
165
165
  ], [MODEL, [VENDOR, 'Zeki'], [TYPE, TABLET]], [
166
166
 
167
167
  /\b([yr]\d{2}) b/i,
@@ -218,31 +218,25 @@ const Fetchers = Object.freeze({
218
218
  // ChatGPT-User - https://platform.openai.com/docs/plugins/bot
219
219
  // DuckAssistBot - https://duckduckgo.com/duckassistbot/
220
220
  // BingPreview / Mastodon / Pinterestbot / Redditbot / Rogerbot / Telegrambot / Twitterbot / UptimeRobot
221
- /(ahrefssiteaudit|bingpreview|chatgpt-user|mastodon|(?:discord|duckassist|linkedin|pinterest|reddit|roger|telegram|twitter|uptimero)bot)\/([\w\.]+)/i,
222
-
223
- // Google Site Verifier
224
- /(google-site-verification)\/([\w\.]+)/i,
221
+ // Google Site Verifier / Meta / Yahoo! Japan
222
+ // Yandex Bots - https://yandex.com/bots
223
+ /(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,
225
224
 
226
- // Meta
227
- /(meta-externalfetcher)\/([\w\.]+)/i,
225
+ // Bluesky
226
+ /(bluesky) cardyb\/([\w\.]+)/i,
228
227
 
229
228
  // Slackbot - https://api.slack.com/robots
230
229
  /(slack(?:bot)?(?:-imgproxy|-linkexpanding)?) ([\w\.]+)/i,
231
230
 
232
231
  // WhatsApp
233
- /(whatsapp)\/([\w\.]+)[\/ ][ianw]/i,
234
-
235
- // Yahoo! Japan
236
- /(y!?j-dlc)\/([\w\.]+)/i,
237
-
238
- // Yandex Bots - https://yandex.com/bots
239
- /(yandex(?:calendar|direct(?:dyn)?|searchshop)|yadirectfetcher)\/([\w\.]+)/i,
240
- /(yandex(?:sitelinks|userproxy))/i
232
+ /(whatsapp)\/([\w\.]+)[\/ ][ianw]/i
241
233
  ],
242
234
  [NAME, VERSION, [TYPE, FETCHER]],
243
235
 
244
- // Google Bots / Cohere / Snapchat / Vercelbot
245
- [/(cohere-ai|vercelbot|feedfetcher-google|google(?:-read-aloud|producer)|(?=bot; )snapchat)/i],
236
+ [
237
+ // Google Bots / Cohere / Snapchat / Vercelbot / Yandex Bots
238
+ /(cohere-ai|vercelbot|feedfetcher-google|google(?:-read-aloud|producer)|(?=bot; )snapchat|yandex(?:sitelinks|userproxy))/i
239
+ ],
246
240
  [NAME, [TYPE, FETCHER]],
247
241
  ]
248
242
  });
@@ -267,104 +261,48 @@ const InApps = Object.freeze({
267
261
 
268
262
  const MediaPlayers = Object.freeze({
269
263
  browser : [[
270
-
271
- /(apple(?:coremedia|))\/([\w\._]+)/i, // Generic Apple CoreMedia
272
- /(coremedia) v([\w\._]+)/i
273
- ], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
274
-
275
- /(aqualung|lyssna|bsplayer)\/([\w\.-]+)/i // Aqualung/Lyssna/BSPlayer
276
- ], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
277
-
278
- /(ares|ossproxy)\s([\w\.-]+)/i // Ares/OSSProxy
279
- ], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
280
-
281
- /(audacious|audimusicstream|amarok|bass|core|dalvik|gnomemplayer|music on console|nsplayer|psp-internetradioplayer|videos)\/([\w\.-]+)/i,
282
- // Audacious/AudiMusicStream/Amarok/BASS/OpenCORE/Dalvik/GnomeMplayer/MoC
264
+ /(apple(?:coremedia|tv))\/([\w\._]+)/i, // Generic Apple CoreMedia
265
+ /(coremedia) v([\w\._]+)/i,
266
+ // Ares/Nexplayer/OSSProxy
267
+ /(ares|clementine|music player daemon|nexplayer|ossproxy) ([\w\.-]+)/i,
268
+ // Aqualung/Lyssna/BSPlayer/Clementine/MPD
269
+ // Audacious/AudiMusicStream/Amarok/BASS/OpenCORE/GnomeMplayer/MoC
283
270
  // NSPlayer/PSP-InternetRadioPlayer/Videos
284
- /(clementine|music player daemon)\s([\w\.-]+)/i, // Clementine/MPD
285
- /(lg player|nexplayer)\s([\d\.]+)/i,
286
- /player\/(nexplayer|lg player)\s([\w\.-]+)/i // NexPlayer/LG Player
287
- ], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
288
- /(nexplayer)\s([\w\.-]+)/i // Nexplayer
271
+ // Nero Home/Nero Scout/Nokia
272
+ // QuickTime/RealMedia/RadioApp/RadioClientApplication/
273
+ // SoundTap/Totem/Stagefright/Streamium
274
+ // XBMC/gvfs/Xine/XMMS/irapp
275
+ /^(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,
276
+ /(lg player|nexplayer) ([\d\.]+)/i,
277
+ /player\/(nexplayer|lg player) ([\w\.-]+)/i, // NexPlayer/LG Player
278
+ /(gstreamer) souphttpsrc.+libsoup\/([\w\.-]+)/i, // Gstreamer
279
+ /(htc streaming player) [\w_]+ \/ ([\d\.]+)/i, // HTC Streaming Player
280
+ /(lavf)([\d\.]+)/i, // Lavf (FFMPEG)
281
+ // MPlayer SVN
282
+ /(mplayer)(?: |\/)(?:(?:sherpya-){0,1}svn)(?:-| )(r\d+(?:-\d+[\w\.-]+))/i,
283
+ / (songbird)\/([\w\.-]+)/i, // Songbird/Philips-Songbird
284
+ /(winamp)(?:3 version|mpeg| ) ([\w\.-]+)/i, // Winamp
285
+ /(vlc)(?:\/| media player - version )([\w\.-]+)/i, // VLC Videolan
286
+ /^(foobar2000|itunes|smp)\/([\d\.]+)/i, // Foobar2000/iTunes/SMP
287
+ /com\.(riseupradioalarm)\/([\d\.]*)/i, // RiseUP Radio Alarm
288
+ /(mplayer)(?:\s|\/| unknown-)([\w\.\-]+)/i, // MPlayer
289
+ // Windows Media Server
290
+ /(windows)\/([\w\.-]+) upnp\/[\d\.]+ dlnadoc\/[\d\.]+ home media server/i
289
291
  ], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
290
292
 
291
293
  /(flrp)\/([\w\.-]+)/i // Flip Player
292
294
  ], [[NAME, 'Flip Player'], VERSION, [TYPE, MEDIAPLAYER]], [
293
-
294
- /(fstream|nativehost|queryseekspider)/i
295
295
  // FStream/NativeHost/QuerySeekSpider
296
+ // MPlayer (no other info)/Media Player Classic/Nero ShowTime
297
+ // OCMS-bot/tap in radio/tunein/unknown/winamp (no other info)
298
+ // inlight radio / YourMuze
299
+ /(fstream|media player classic|inlight radio|mplayer|nativehost|nero showtime|ocms-bot|queryseekspider|tapinradio|tunein radio|winamp|yourmuze)/i
296
300
  ], [NAME, [TYPE, MEDIAPLAYER]], [
297
301
 
298
- /(gstreamer) souphttpsrc.+libsoup\/([\w\.-]+)/i
299
- // Gstreamer
300
- ], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
301
-
302
- /(htc streaming player)\s[\w_]+\s\/\s([\d\.]+)/i, // HTC Streaming Player
303
- /(lavf)([\d\.]+)/i // Lavf (FFMPEG)
304
- ], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
305
-
306
- /(htc_one_s)\/([\d\.]+)/i, // HTC One S
307
- ], [[NAME, /_/g, ' '], VERSION, [TYPE, MEDIAPLAYER]], [
302
+ /(htc_one_s|windows-media-player|wmplayer)\/([\w\.-]+)/i, // HTC One S / Windows Media Player
303
+ ], [[NAME, /[_-]/g, ' '], VERSION, [TYPE, MEDIAPLAYER]], [
308
304
 
309
- /(mplayer)(?:\s|\/)(?:(?:sherpya-){0,1}svn)(?:-|\s)(r\d+(?:-\d+[\w\.-]+))/i,
310
- // MPlayer SVN
311
- ], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
312
-
313
- /(mplayer)(?:\s|\/)([\w\.-]+)/i, // MPlayer
314
- /(mplayer) unknown-([\w\.\-]+)/i // MPlayer UNKNOWN
315
- ], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
316
-
317
- /(mplayer)/i, // MPlayer (no other info)
318
- /(yourmuze)/i, // YourMuze
319
- /(media player classic|nero showtime)/i // Media Player Classic/Nero ShowTime
320
- ], [NAME, [TYPE, MEDIAPLAYER]], [
321
-
322
- /(nero (?:home|scout))\/([\w\.-]+)/i // Nero Home/Nero Scout
323
- ], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
324
-
325
- /(nokia\d+)\/([\w\.-]+)/i // Nokia
326
- ], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
327
-
328
- /\s(songbird)\/([\w\.-]+)/i // Songbird/Philips-Songbird
329
- ], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
330
-
331
- /(winamp)3 version ([\w\.-]+)/i, // Winamp
332
- /(winamp)\s([\w\.-]+)/i,
333
- /(winamp)mpeg\/([\w\.-]+)/i
334
- ], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
335
-
336
- /(ocms-bot|tapinradio|tunein radio|unknown|winamp|inlight radio)/i // OCMS-bot/tap in radio/tunein/unknown/winamp (no other info)
337
- // inlight radio
338
- ], [NAME, [TYPE, MEDIAPLAYER]], [
339
-
340
- /(quicktime|rma|radioapp|radioclientapplication|soundtap|totem|stagefright|streamium)\/([\w\.-]+)/i
341
- // QuickTime/RealMedia/RadioApp/RadioClientApplication/
342
- // SoundTap/Totem/Stagefright/Streamium
343
- ], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
344
-
345
- /(smp)([\d\.]+)/i // SMP
346
- ], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
347
-
348
- /(vlc) media player - version ([\w\.]+)/i, // VLC Videolan
349
- /(vlc)\/([\w\.-]+)/i,
350
- /(xbmc|gvfs|xine|xmms|irapp)\/([\w\.-]+)/i, // XBMC/gvfs/Xine/XMMS/irapp
351
- /(foobar2000)\/([\d\.]+)/i, // Foobar2000
352
- /(itunes)\/([\d\.]+)/i // iTunes
353
- ], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
354
-
355
- /(wmplayer)\/([\w\.-]+)/i, // Windows Media Player
356
- /(windows-media-player)\/([\w\.-]+)/i
357
- ], [[NAME, /-/g, ' '], VERSION, [TYPE, MEDIAPLAYER]], [
358
-
359
- /windows\/([\w\.-]+) upnp\/[\d\.]+ dlnadoc\/[\d\.]+ (home media server)/i,
360
- // Windows Media Server
361
- ], [VERSION, [NAME, 'Windows'], [TYPE, MEDIAPLAYER]], [
362
-
363
- /(com\.riseupradioalarm)\/([\d\.]*)/i // RiseUP Radio Alarm
364
- ], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
365
-
366
- /(rad.io)\s([\d\.]+)/i, // Rad.io
367
- /(radio.(?:de|at|fr))\s([\d\.]+)/i
305
+ /(rad.io|radio.(?:de|at|fr)) ([\d\.]+)/i // Rad.io
368
306
  ], [[NAME, 'rad.io'], VERSION, [TYPE, MEDIAPLAYER]]
369
307
  ]
370
308
  });
@@ -375,8 +313,29 @@ const MediaPlayers = Object.freeze({
375
313
 
376
314
  const Libraries = Object.freeze({
377
315
  browser : [
378
- // Axios/jsdom/Scrapy/Java/urllib/requests
379
- [/\b(axios|jsdom|scrapy|java|python-urllib|python-requests)\/([\w\.]+)/i], [NAME, VERSION, [TYPE, LIBRARY]]
316
+ // Apache-HttpClient/Axios/go-http-client/got/GuzzleHttp/Java[-HttpClient]/jsdom/libwww-perl/lua-resty-http/Needle/node-fetch/OkHttp/PHP-SOAP/PostmanRuntime/python-urllib/python-requests/Scrapy/superagent
317
+ [
318
+ /^(apache-httpclient|axios|(?:go|java)-http-client|got|guzzlehttp|java|libwww-perl|lua-resty-http|needle|node-(?:fetch|superagent)|okhttp|php-soap|postmanruntime|python-(?:urllib|requests)|scrapy)\/([\w\.]+)/i,
319
+ /(jsdom|(?<=\()java)\/([\w\.]+)/i
320
+ ], [NAME, VERSION, [TYPE, LIBRARY]]
321
+ ]
322
+ });
323
+
324
+ /////////////
325
+ // VEHICLES
326
+ ////////////
327
+
328
+ const Vehicles = Object.freeze({
329
+ device : [
330
+ [
331
+ /dilink.+(byd) auto/i, // BYD
332
+ ], [VENDOR], [
333
+
334
+ /(rivian) (r1t)/i, // Rivian
335
+ ], [VENDOR, MODEL], [
336
+
337
+ /vcc.+netfront/i, // Volvo
338
+ ], [[VENDOR, 'Volvo']]
380
339
  ]
381
340
  });
382
341
 
@@ -402,5 +361,6 @@ module.exports = {
402
361
  Fetchers,
403
362
  InApps,
404
363
  Libraries,
405
- MediaPlayers
364
+ MediaPlayers,
365
+ Vehicles
406
366
  };
@@ -3,7 +3,7 @@
3
3
  // Source: /src/extensions/ua-parser-extensions.js
4
4
 
5
5
  ///////////////////////////////////////////////
6
- /* Extensions for UAParser.js v2.0.0
6
+ /* Extensions for UAParser.js v2.0.1
7
7
  https://github.com/faisalman/ua-parser-js
8
8
  Author: Faisal Salman <f@faisalman.com>
9
9
  AGPLv3 License */
@@ -165,7 +165,7 @@ const ExtraDevices = Object.freeze({
165
165
  /\b(zur\d{3}) b/i // Swiss ZUR Tablet
166
166
  ], [MODEL, [VENDOR, 'Swiss'], [TYPE, TABLET]], [
167
167
 
168
- /\b((zeki)?tb.*\b) b/i // Zeki Tablets
168
+ /^((zeki)?tb.*\b) b/i // Zeki Tablets
169
169
  ], [MODEL, [VENDOR, 'Zeki'], [TYPE, TABLET]], [
170
170
 
171
171
  /\b([yr]\d{2}) b/i,
@@ -222,31 +222,25 @@ const Fetchers = Object.freeze({
222
222
  // ChatGPT-User - https://platform.openai.com/docs/plugins/bot
223
223
  // DuckAssistBot - https://duckduckgo.com/duckassistbot/
224
224
  // BingPreview / Mastodon / Pinterestbot / Redditbot / Rogerbot / Telegrambot / Twitterbot / UptimeRobot
225
- /(ahrefssiteaudit|bingpreview|chatgpt-user|mastodon|(?:discord|duckassist|linkedin|pinterest|reddit|roger|telegram|twitter|uptimero)bot)\/([\w\.]+)/i,
226
-
227
- // Google Site Verifier
228
- /(google-site-verification)\/([\w\.]+)/i,
225
+ // Google Site Verifier / Meta / Yahoo! Japan
226
+ // Yandex Bots - https://yandex.com/bots
227
+ /(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,
229
228
 
230
- // Meta
231
- /(meta-externalfetcher)\/([\w\.]+)/i,
229
+ // Bluesky
230
+ /(bluesky) cardyb\/([\w\.]+)/i,
232
231
 
233
232
  // Slackbot - https://api.slack.com/robots
234
233
  /(slack(?:bot)?(?:-imgproxy|-linkexpanding)?) ([\w\.]+)/i,
235
234
 
236
235
  // WhatsApp
237
- /(whatsapp)\/([\w\.]+)[\/ ][ianw]/i,
238
-
239
- // Yahoo! Japan
240
- /(y!?j-dlc)\/([\w\.]+)/i,
241
-
242
- // Yandex Bots - https://yandex.com/bots
243
- /(yandex(?:calendar|direct(?:dyn)?|searchshop)|yadirectfetcher)\/([\w\.]+)/i,
244
- /(yandex(?:sitelinks|userproxy))/i
236
+ /(whatsapp)\/([\w\.]+)[\/ ][ianw]/i
245
237
  ],
246
238
  [NAME, VERSION, [TYPE, FETCHER]],
247
239
 
248
- // Google Bots / Cohere / Snapchat / Vercelbot
249
- [/(cohere-ai|vercelbot|feedfetcher-google|google(?:-read-aloud|producer)|(?=bot; )snapchat)/i],
240
+ [
241
+ // Google Bots / Cohere / Snapchat / Vercelbot / Yandex Bots
242
+ /(cohere-ai|vercelbot|feedfetcher-google|google(?:-read-aloud|producer)|(?=bot; )snapchat|yandex(?:sitelinks|userproxy))/i
243
+ ],
250
244
  [NAME, [TYPE, FETCHER]],
251
245
  ]
252
246
  });
@@ -271,104 +265,48 @@ const InApps = Object.freeze({
271
265
 
272
266
  const MediaPlayers = Object.freeze({
273
267
  browser : [[
274
-
275
- /(apple(?:coremedia|))\/([\w\._]+)/i, // Generic Apple CoreMedia
276
- /(coremedia) v([\w\._]+)/i
277
- ], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
278
-
279
- /(aqualung|lyssna|bsplayer)\/([\w\.-]+)/i // Aqualung/Lyssna/BSPlayer
280
- ], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
281
-
282
- /(ares|ossproxy)\s([\w\.-]+)/i // Ares/OSSProxy
283
- ], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
284
-
285
- /(audacious|audimusicstream|amarok|bass|core|dalvik|gnomemplayer|music on console|nsplayer|psp-internetradioplayer|videos)\/([\w\.-]+)/i,
286
- // Audacious/AudiMusicStream/Amarok/BASS/OpenCORE/Dalvik/GnomeMplayer/MoC
268
+ /(apple(?:coremedia|tv))\/([\w\._]+)/i, // Generic Apple CoreMedia
269
+ /(coremedia) v([\w\._]+)/i,
270
+ // Ares/Nexplayer/OSSProxy
271
+ /(ares|clementine|music player daemon|nexplayer|ossproxy) ([\w\.-]+)/i,
272
+ // Aqualung/Lyssna/BSPlayer/Clementine/MPD
273
+ // Audacious/AudiMusicStream/Amarok/BASS/OpenCORE/GnomeMplayer/MoC
287
274
  // NSPlayer/PSP-InternetRadioPlayer/Videos
288
- /(clementine|music player daemon)\s([\w\.-]+)/i, // Clementine/MPD
289
- /(lg player|nexplayer)\s([\d\.]+)/i,
290
- /player\/(nexplayer|lg player)\s([\w\.-]+)/i // NexPlayer/LG Player
291
- ], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
292
- /(nexplayer)\s([\w\.-]+)/i // Nexplayer
275
+ // Nero Home/Nero Scout/Nokia
276
+ // QuickTime/RealMedia/RadioApp/RadioClientApplication/
277
+ // SoundTap/Totem/Stagefright/Streamium
278
+ // XBMC/gvfs/Xine/XMMS/irapp
279
+ /^(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,
280
+ /(lg player|nexplayer) ([\d\.]+)/i,
281
+ /player\/(nexplayer|lg player) ([\w\.-]+)/i, // NexPlayer/LG Player
282
+ /(gstreamer) souphttpsrc.+libsoup\/([\w\.-]+)/i, // Gstreamer
283
+ /(htc streaming player) [\w_]+ \/ ([\d\.]+)/i, // HTC Streaming Player
284
+ /(lavf)([\d\.]+)/i, // Lavf (FFMPEG)
285
+ // MPlayer SVN
286
+ /(mplayer)(?: |\/)(?:(?:sherpya-){0,1}svn)(?:-| )(r\d+(?:-\d+[\w\.-]+))/i,
287
+ / (songbird)\/([\w\.-]+)/i, // Songbird/Philips-Songbird
288
+ /(winamp)(?:3 version|mpeg| ) ([\w\.-]+)/i, // Winamp
289
+ /(vlc)(?:\/| media player - version )([\w\.-]+)/i, // VLC Videolan
290
+ /^(foobar2000|itunes|smp)\/([\d\.]+)/i, // Foobar2000/iTunes/SMP
291
+ /com\.(riseupradioalarm)\/([\d\.]*)/i, // RiseUP Radio Alarm
292
+ /(mplayer)(?:\s|\/| unknown-)([\w\.\-]+)/i, // MPlayer
293
+ // Windows Media Server
294
+ /(windows)\/([\w\.-]+) upnp\/[\d\.]+ dlnadoc\/[\d\.]+ home media server/i
293
295
  ], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
294
296
 
295
297
  /(flrp)\/([\w\.-]+)/i // Flip Player
296
298
  ], [[NAME, 'Flip Player'], VERSION, [TYPE, MEDIAPLAYER]], [
297
-
298
- /(fstream|nativehost|queryseekspider)/i
299
299
  // FStream/NativeHost/QuerySeekSpider
300
+ // MPlayer (no other info)/Media Player Classic/Nero ShowTime
301
+ // OCMS-bot/tap in radio/tunein/unknown/winamp (no other info)
302
+ // inlight radio / YourMuze
303
+ /(fstream|media player classic|inlight radio|mplayer|nativehost|nero showtime|ocms-bot|queryseekspider|tapinradio|tunein radio|winamp|yourmuze)/i
300
304
  ], [NAME, [TYPE, MEDIAPLAYER]], [
301
305
 
302
- /(gstreamer) souphttpsrc.+libsoup\/([\w\.-]+)/i
303
- // Gstreamer
304
- ], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
305
-
306
- /(htc streaming player)\s[\w_]+\s\/\s([\d\.]+)/i, // HTC Streaming Player
307
- /(lavf)([\d\.]+)/i // Lavf (FFMPEG)
308
- ], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
309
-
310
- /(htc_one_s)\/([\d\.]+)/i, // HTC One S
311
- ], [[NAME, /_/g, ' '], VERSION, [TYPE, MEDIAPLAYER]], [
306
+ /(htc_one_s|windows-media-player|wmplayer)\/([\w\.-]+)/i, // HTC One S / Windows Media Player
307
+ ], [[NAME, /[_-]/g, ' '], VERSION, [TYPE, MEDIAPLAYER]], [
312
308
 
313
- /(mplayer)(?:\s|\/)(?:(?:sherpya-){0,1}svn)(?:-|\s)(r\d+(?:-\d+[\w\.-]+))/i,
314
- // MPlayer SVN
315
- ], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
316
-
317
- /(mplayer)(?:\s|\/)([\w\.-]+)/i, // MPlayer
318
- /(mplayer) unknown-([\w\.\-]+)/i // MPlayer UNKNOWN
319
- ], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
320
-
321
- /(mplayer)/i, // MPlayer (no other info)
322
- /(yourmuze)/i, // YourMuze
323
- /(media player classic|nero showtime)/i // Media Player Classic/Nero ShowTime
324
- ], [NAME, [TYPE, MEDIAPLAYER]], [
325
-
326
- /(nero (?:home|scout))\/([\w\.-]+)/i // Nero Home/Nero Scout
327
- ], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
328
-
329
- /(nokia\d+)\/([\w\.-]+)/i // Nokia
330
- ], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
331
-
332
- /\s(songbird)\/([\w\.-]+)/i // Songbird/Philips-Songbird
333
- ], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
334
-
335
- /(winamp)3 version ([\w\.-]+)/i, // Winamp
336
- /(winamp)\s([\w\.-]+)/i,
337
- /(winamp)mpeg\/([\w\.-]+)/i
338
- ], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
339
-
340
- /(ocms-bot|tapinradio|tunein radio|unknown|winamp|inlight radio)/i // OCMS-bot/tap in radio/tunein/unknown/winamp (no other info)
341
- // inlight radio
342
- ], [NAME, [TYPE, MEDIAPLAYER]], [
343
-
344
- /(quicktime|rma|radioapp|radioclientapplication|soundtap|totem|stagefright|streamium)\/([\w\.-]+)/i
345
- // QuickTime/RealMedia/RadioApp/RadioClientApplication/
346
- // SoundTap/Totem/Stagefright/Streamium
347
- ], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
348
-
349
- /(smp)([\d\.]+)/i // SMP
350
- ], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
351
-
352
- /(vlc) media player - version ([\w\.]+)/i, // VLC Videolan
353
- /(vlc)\/([\w\.-]+)/i,
354
- /(xbmc|gvfs|xine|xmms|irapp)\/([\w\.-]+)/i, // XBMC/gvfs/Xine/XMMS/irapp
355
- /(foobar2000)\/([\d\.]+)/i, // Foobar2000
356
- /(itunes)\/([\d\.]+)/i // iTunes
357
- ], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
358
-
359
- /(wmplayer)\/([\w\.-]+)/i, // Windows Media Player
360
- /(windows-media-player)\/([\w\.-]+)/i
361
- ], [[NAME, /-/g, ' '], VERSION, [TYPE, MEDIAPLAYER]], [
362
-
363
- /windows\/([\w\.-]+) upnp\/[\d\.]+ dlnadoc\/[\d\.]+ (home media server)/i,
364
- // Windows Media Server
365
- ], [VERSION, [NAME, 'Windows'], [TYPE, MEDIAPLAYER]], [
366
-
367
- /(com\.riseupradioalarm)\/([\d\.]*)/i // RiseUP Radio Alarm
368
- ], [NAME, VERSION, [TYPE, MEDIAPLAYER]], [
369
-
370
- /(rad.io)\s([\d\.]+)/i, // Rad.io
371
- /(radio.(?:de|at|fr))\s([\d\.]+)/i
309
+ /(rad.io|radio.(?:de|at|fr)) ([\d\.]+)/i // Rad.io
372
310
  ], [[NAME, 'rad.io'], VERSION, [TYPE, MEDIAPLAYER]]
373
311
  ]
374
312
  });
@@ -379,8 +317,29 @@ const MediaPlayers = Object.freeze({
379
317
 
380
318
  const Libraries = Object.freeze({
381
319
  browser : [
382
- // Axios/jsdom/Scrapy/Java/urllib/requests
383
- [/\b(axios|jsdom|scrapy|java|python-urllib|python-requests)\/([\w\.]+)/i], [NAME, VERSION, [TYPE, LIBRARY]]
320
+ // Apache-HttpClient/Axios/go-http-client/got/GuzzleHttp/Java[-HttpClient]/jsdom/libwww-perl/lua-resty-http/Needle/node-fetch/OkHttp/PHP-SOAP/PostmanRuntime/python-urllib/python-requests/Scrapy/superagent
321
+ [
322
+ /^(apache-httpclient|axios|(?:go|java)-http-client|got|guzzlehttp|java|libwww-perl|lua-resty-http|needle|node-(?:fetch|superagent)|okhttp|php-soap|postmanruntime|python-(?:urllib|requests)|scrapy)\/([\w\.]+)/i,
323
+ /(jsdom|(?<=\()java)\/([\w\.]+)/i
324
+ ], [NAME, VERSION, [TYPE, LIBRARY]]
325
+ ]
326
+ });
327
+
328
+ /////////////
329
+ // VEHICLES
330
+ ////////////
331
+
332
+ const Vehicles = Object.freeze({
333
+ device : [
334
+ [
335
+ /dilink.+(byd) auto/i, // BYD
336
+ ], [VENDOR], [
337
+
338
+ /(rivian) (r1t)/i, // Rivian
339
+ ], [VENDOR, MODEL], [
340
+
341
+ /vcc.+netfront/i, // Volvo
342
+ ], [[VENDOR, 'Volvo']]
384
343
  ]
385
344
  });
386
345
 
@@ -406,5 +365,6 @@ export {
406
365
  Fetchers,
407
366
  InApps,
408
367
  Libraries,
409
- MediaPlayers
368
+ MediaPlayers,
369
+ Vehicles
410
370
  };
@@ -1,8 +1,8 @@
1
- // Type definitions for Helpers submodule of UAParser.js v2.0.0
1
+ // Type definitions for Helpers submodule of UAParser.js v2.0.1
2
2
  // Project: https://github.com/faisalman/ua-parser-js
3
3
  // Definitions by: Faisal Salman <https://github.com/faisalman>
4
4
 
5
- import { IResult } from "../main/ua-parser";
5
+ import type { IResult } from "../main/ua-parser";
6
6
 
7
7
  declare function getDeviceVendor(model: string): string | undefined;
8
8
  declare function isAppleSilicon(resultOrUA: IResult | string): boolean;
@@ -1,5 +1,5 @@
1
1
  ///////////////////////////////////////////////
2
- /* Helpers for UAParser.js v2.0.0
2
+ /* Helpers for UAParser.js v2.0.1
3
3
  https://github.com/faisalman/ua-parser-js
4
4
  Author: Faisal Salman <f@faisalman.com>
5
5
  AGPLv3 License */
@@ -3,7 +3,7 @@
3
3
  // Source: /src/helpers/ua-parser-helpers.js
4
4
 
5
5
  ///////////////////////////////////////////////
6
- /* Helpers for UAParser.js v2.0.0
6
+ /* Helpers for UAParser.js v2.0.1
7
7
  https://github.com/faisalman/ua-parser-js
8
8
  Author: Faisal Salman <f@faisalman.com>
9
9
  AGPLv3 License */
@@ -1,7 +1,10 @@
1
- // Type definitions for UAParser.js v2.0.0
1
+ // Type definitions for UAParser.js v2.0.1
2
2
  // Project: https://github.com/faisalman/ua-parser-js
3
3
  // Definitions by: Faisal Salman <https://github.com/faisalman>
4
4
 
5
+ import type { IncomingHttpHeaders } from 'http';
6
+ import type { Headers as FetchAPIHeaders } from 'node-fetch';
7
+
5
8
  declare namespace UAParser {
6
9
 
7
10
  interface IData<T> {
@@ -50,11 +53,12 @@ declare namespace UAParser {
50
53
  type RegexMap = ((RegExp | string | (string | RegExp | Function)[])[])[];
51
54
  type UAParserProps = 'browser' | 'cpu' | 'device' | 'engine' | 'os';
52
55
  type UAParserExt = Partial<Record<UAParserProps, RegexMap>> | Partial<Record<UAParserProps, RegexMap>>[];
56
+ type UAParserHeaders = Record<string, string> | IncomingHttpHeaders | FetchAPIHeaders;
53
57
 
54
- export function UAParser(uastring?: string, extensions?: UAParserExt, headers?: Record<string, string>): IResult;
55
- export function UAParser(uastring?: string, headers?: Record<string, string>): IResult;
56
- export function UAParser(extensions?: UAParserExt, headers?: Record<string, string>): IResult;
57
- export function UAParser(headers?: Record<string, string>): IResult;
58
+ export function UAParser(uastring?: string, extensions?: UAParserExt, headers?: UAParserHeaders): IResult;
59
+ export function UAParser(uastring?: string, headers?: UAParserHeaders): IResult;
60
+ export function UAParser(extensions?: UAParserExt, headers?: UAParserHeaders): IResult;
61
+ export function UAParser(headers?: UAParserHeaders): IResult;
58
62
 
59
63
  export class UAParser {
60
64