Permalink
Browse files

[minor] Compiling new device parsers

  • Loading branch information...
1 parent 143fa16 commit c7eeab5e3f7af0af226acfe881aabfa9dd507316 @3rd-Eden committed Jan 6, 2013
Showing with 24 additions and 5 deletions.
  1. +1 −1 lib/agents.js
  2. +17 −3 lib/update.js
  3. +4 −1 lib/useragent.js
  4. +2 −0 static/user_agent.after.yaml
View
2 lib/agents.js
@@ -1 +1 @@
-exports.browser = [{r:new RegExp("^(Opera)/(\\d+)\\.(\\d+) \\(Nintendo Wii"), family:"Wii"},{r:new RegExp("(SeaMonkey|Camino)/(\\d+)\\.(\\d+)\\.?([ab]?\\d+[a-z]*)")},{r:new RegExp("(Pale[Mm]oon)/(\\d+)\\.(\\d+)\\.?(\\d+)?"), family:"Pale Moon (Firefox Variant)"},{r:new RegExp("(Fennec)/(\\d+)\\.(\\d+)\\.?([ab]?\\d+[a-z]*)"), family:"Firefox Mobile"},{r:new RegExp("(Fennec)/(\\d+)\\.(\\d+)(pre)"), family:"Firefox Mobile"},{r:new RegExp("(Fennec)/(\\d+)\\.(\\d+)"), family:"Firefox Mobile"},{r:new RegExp("Mobile.*(Firefox)/(\\d+)\\.(\\d+)"), family:"Firefox Mobile"},{r:new RegExp("(Namoroka|Shiretoko|Minefield)/(\\d+)\\.(\\d+)\\.(\\d+(?:pre)?)"), family:"Firefox ($1)"},{r:new RegExp("(Firefox)/(\\d+)\\.(\\d+)(a\\d+[a-z]*)"), family:"Firefox Alpha"},{r:new RegExp("(Firefox)/(\\d+)\\.(\\d+)(b\\d+[a-z]*)"), family:"Firefox Beta"},{r:new RegExp("(Firefox)-(?:\\d+\\.\\d+)?/(\\d+)\\.(\\d+)(a\\d+[a-z]*)"), family:"Firefox Alpha"},{r:new RegExp("(Firefox)-(?:\\d+\\.\\d+)?/(\\d+)\\.(\\d+)(b\\d+[a-z]*)"), family:"Firefox Beta"},{r:new RegExp("(Namoroka|Shiretoko|Minefield)/(\\d+)\\.(\\d+)([ab]\\d+[a-z]*)?"), family:"Firefox ($1)"},{r:new RegExp("(Firefox).*Tablet browser (\\d+)\\.(\\d+)\\.(\\d+)"), family:"MicroB"},{r:new RegExp("(MozillaDeveloperPreview)/(\\d+)\\.(\\d+)([ab]\\d+[a-z]*)?")},{r:new RegExp("(Flock)/(\\d+)\\.(\\d+)(b\\d+?)")},{r:new RegExp("(RockMelt)/(\\d+)\\.(\\d+)\\.(\\d+)")},{r:new RegExp("(Navigator)/(\\d+)\\.(\\d+)\\.(\\d+)"), family:"Netscape"},{r:new RegExp("(Navigator)/(\\d+)\\.(\\d+)([ab]\\d+)"), family:"Netscape"},{r:new RegExp("(Netscape6)/(\\d+)\\.(\\d+)\\.(\\d+)"), family:"Netscape"},{r:new RegExp("(MyIBrow)/(\\d+)\\.(\\d+)"), family:"My Internet Browser"},{r:new RegExp("(Opera Tablet).*Version/(\\d+)\\.(\\d+)(?:\\.(\\d+))?")},{r:new RegExp("(Opera)/.+Opera Mobi.+Version/(\\d+)\\.(\\d+)"), family:"Opera Mobile"},{r:new RegExp("Opera Mobi"), family:"Opera Mobile"},{r:new RegExp("(Opera Mini)/(\\d+)\\.(\\d+)")},{r:new RegExp("(Opera Mini)/att/(\\d+)\\.(\\d+)")},{r:new RegExp("(Opera)/9.80.*Version/(\\d+)\\.(\\d+)(?:\\.(\\d+))?")},{r:new RegExp("(webOSBrowser)/(\\d+)\\.(\\d+)")},{r:new RegExp("(webOS)/(\\d+)\\.(\\d+)"), family:"webOSBrowser"},{r:new RegExp("(wOSBrowser).+TouchPad/(\\d+)\\.(\\d+)"), family:"webOS TouchPad"},{r:new RegExp("(luakit)"), family:"LuaKit"},{r:new RegExp("(Lightning)/(\\d+)\\.(\\d+)([ab]?\\d+[a-z]*)")},{r:new RegExp("(Firefox)/(\\d+)\\.(\\d+)\\.(\\d+(?:pre)?) \\(Swiftfox\\)"), family:"Swiftfox"},{r:new RegExp("(Firefox)/(\\d+)\\.(\\d+)([ab]\\d+[a-z]*)? \\(Swiftfox\\)"), family:"Swiftfox"},{r:new RegExp("(rekonq)/(\\d+)\\.(\\d+) Safari"), family:"Rekonq"},{r:new RegExp("rekonq"), family:"Rekonq"},{r:new RegExp("(conkeror|Conkeror)/(\\d+)\\.(\\d+)\\.?(\\d+)?"), family:"Conkeror"},{r:new RegExp("(konqueror)/(\\d+)\\.(\\d+)\\.(\\d+)"), family:"Konqueror"},{r:new RegExp("(WeTab)-Browser")},{r:new RegExp("(Comodo_Dragon)/(\\d+)\\.(\\d+)\\.(\\d+)"), family:"Comodo Dragon"},{r:new RegExp("(YottaaMonitor|BrowserMob|HttpMonitor|YandexBot|Slurp|BingPreview|PagePeeker|ThumbShotsBot|WebThumb|URL2PNG|ZooShot|GomezA|Catchpoint bot|Willow Internet Crawler|Google SketchUp|Read%20Later)")},{r:new RegExp("(Kindle)/(\\d+)\\.(\\d+)")},{r:new RegExp("(Symphony) (\\d+).(\\d+)")},{r:new RegExp("(Minimo)")},{r:new RegExp("(CrMo)/(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+)"), family:"Chrome Mobile"},{r:new RegExp("(CriOS)/(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+)"), family:"Chrome Mobile iOS"},{r:new RegExp("(Chrome)/(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+) Mobile"), family:"Chrome Mobile"},{r:new RegExp("(chromeframe)/(\\d+)\\.(\\d+)\\.(\\d+)"), family:"Chrome Frame"},{r:new RegExp("(UC Browser)(\\d+)\\.(\\d+)\\.(\\d+)")},{r:new RegExp("(SLP Browser)/(\\d+)\\.(\\d+)"), family:"Tizen Browser"},{r:new RegExp("(Epiphany)/(\\d+)\\.(\\d+).(\\d+)")},{r:new RegExp("(SE 2\\.X) MetaSr (\\d+)\\.(\\d+)"), family:"Sogou Explorer"},{r:new RegExp("(FlyFlow)/(\\d+)\\.(\\d+)"), family:"Baidu Explorer"},{r:new RegExp("(Pingdom.com_bot_version_)(\\d+)\\.(\\d+)"), family:"PingdomBot"},{r:new RegExp("(facebookexternalhit)/(\\d+)\\.(\\d+)"), family:"FacebookBot"},{r:new RegExp("(Twitterbot)/(\\d+)\\.(\\d+)"), family:"TwitterBot"},{r:new RegExp("(PyAMF)/(\\d+)\\.(\\d+)\\.(\\d+)")},{r:new RegExp("(AdobeAIR|Chromium|FireWeb|Jasmine|ANTGalio|Midori|Fresco|Lobo|PaleMoon|Maxthon|Lynx|OmniWeb|Dillo|Camino|Demeter|Fluid|Fennec|Shiira|Sunrise|Chrome|Flock|Netscape|Lunascape|WebPilot|Vodafone|NetFront|Netfront|Konqueror|SeaMonkey|Kazehakase|Vienna|Iceape|Iceweasel|IceWeasel|Iron|K-Meleon|Sleipnir|Galeon|GranParadiso|Opera Mini|iCab|NetNewsWire|ThunderBrowse|Iris|UP\\.Browser|Bunjaloo|Google Earth|Raven for Mac)/(\\d+)\\.(\\d+)\\.(\\d+)")},{r:new RegExp("(Bolt|Jasmine|IceCat|Skyfire|Midori|Maxthon|Lynx|Arora|IBrowse|Dillo|Camino|Shiira|Fennec|Phoenix|Chrome|Flock|Netscape|Lunascape|Epiphany|WebPilot|Opera Mini|Opera|Vodafone|NetFront|Netfront|Konqueror|Googlebot|SeaMonkey|Kazehakase|Vienna|Iceape|Iceweasel|IceWeasel|Iron|K-Meleon|Sleipnir|Galeon|GranParadiso|iCab|NetNewsWire|Space Bison|Stainless|Orca|Dolfin|BOLT|Minimo|Tizen Browser|Polaris|Abrowser)/(\\d+)\\.(\\d+)")},{r:new RegExp("(iRider|Crazy Browser|SkipStone|iCab|Lunascape|Sleipnir|Maemo Browser) (\\d+)\\.(\\d+)\\.(\\d+)")},{r:new RegExp("(iCab|Lunascape|Opera|Android|Jasmine|Polaris|BREW) (\\d+)\\.(\\d+)\\.?(\\d+)?")},{r:new RegExp("(Android) Donut")},{r:new RegExp("(Android) Eclair")},{r:new RegExp("(Android) Froyo")},{r:new RegExp("(Android) Gingerbread")},{r:new RegExp("(Android) Honeycomb")},{r:new RegExp("(IEMobile)[ /](\\d+)\\.(\\d+)"), family:"IE Mobile"},{r:new RegExp("(MSIE) (\\d+)\\.(\\d+).*XBLWP7"), family:"IE Large Screen"},{r:new RegExp("(Firefox)/(\\d+)\\.(\\d+)\\.(\\d+)")},{r:new RegExp("(Firefox)/(\\d+)\\.(\\d+)(pre|[ab]\\d+[a-z]*)?")},{r:new RegExp("(Obigo)InternetBrowser")},{r:new RegExp("(Obigo)\\-Browser")},{r:new RegExp("(Obigo|OBIGO)[^\\d]*(\\d+)(?:.(\\d+))?")},{r:new RegExp("(MAXTHON|Maxthon) (\\d+)\\.(\\d+)"), family:"Maxthon"},{r:new RegExp("(Maxthon|MyIE2|Uzbl|Shiira)")},{r:new RegExp("(PLAYSTATION) (\\d+)"), family:"PlayStation"},{r:new RegExp("(PlayStation Portable)[^\\d]+(\\d+).(\\d+)")},{r:new RegExp("(BrowseX) \\((\\d+)\\.(\\d+)\\.(\\d+)")},{r:new RegExp("(POLARIS)/(\\d+)\\.(\\d+)"), family:"Polaris"},{r:new RegExp("(Embider)/(\\d+)\\.(\\d+)"), family:"Polaris"},{r:new RegExp("(BonEcho)/(\\d+)\\.(\\d+)\\.(\\d+)"), family:"Bon Echo"},{r:new RegExp("(iPod).+Version/(\\d+)\\.(\\d+)\\.(\\d+)"), family:"Mobile Safari"},{r:new RegExp("(iPod).*Version/(\\d+)\\.(\\d+)"), family:"Mobile Safari"},{r:new RegExp("(iPhone).*Version/(\\d+)\\.(\\d+)\\.(\\d+)"), family:"Mobile Safari"},{r:new RegExp("(iPhone).*Version/(\\d+)\\.(\\d+)"), family:"Mobile Safari"},{r:new RegExp("(iPad).*Version/(\\d+)\\.(\\d+)\\.(\\d+)"), family:"Mobile Safari"},{r:new RegExp("(iPad).*Version/(\\d+)\\.(\\d+)"), family:"Mobile Safari"},{r:new RegExp("(iPod|iPhone|iPad);.*CPU.*OS (\\d+)(?:_\\d+)?_(\\d+).*Mobile"), family:"Mobile Safari"},{r:new RegExp("(iPod|iPhone|iPad)"), family:"Mobile Safari"},{r:new RegExp("(AvantGo) (\\d+).(\\d+)")},{r:new RegExp("(Avant)")},{r:new RegExp("(QtCarBrowser)")},{r:new RegExp("^(Nokia)"), family:"Nokia Services (WAP) Browser"},{r:new RegExp("(NokiaBrowser)/(\\d+)\\.(\\d+).(\\d+)\\.(\\d+)")},{r:new RegExp("(NokiaBrowser)/(\\d+)\\.(\\d+).(\\d+)")},{r:new RegExp("(NokiaBrowser)/(\\d+)\\.(\\d+)")},{r:new RegExp("(BrowserNG)/(\\d+)\\.(\\d+).(\\d+)"), family:"NokiaBrowser"},{r:new RegExp("(Series60)/5\\.0"), family:"NokiaBrowser"},{r:new RegExp("(Series60)/(\\d+)\\.(\\d+)"), family:"Nokia OSS Browser"},{r:new RegExp("(S40OviBrowser)/(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+)"), family:"Nokia Series 40 Ovi Browser"},{r:new RegExp("(Nokia)[EN]?(\\d+)")},{r:new RegExp("(PlayBook).+RIM Tablet OS (\\d+)\\.(\\d+)\\.(\\d+)"), family:"Blackberry WebKit"},{r:new RegExp("(Black[bB]erry).+Version/(\\d+)\\.(\\d+)\\.(\\d+)"), family:"Blackberry WebKit"},{r:new RegExp("(Black[bB]erry)\\s?(\\d+)"), family:"Blackberry"},{r:new RegExp("(OmniWeb)/v(\\d+)\\.(\\d+)")},{r:new RegExp("(Blazer)/(\\d+)\\.(\\d+)"), family:"Palm Blazer"},{r:new RegExp("(Pre)/(\\d+)\\.(\\d+)"), family:"Palm Pre"},{r:new RegExp("(Links) \\((\\d+)\\.(\\d+)")},{r:new RegExp("(QtWeb) Internet Browser/(\\d+)\\.(\\d+)")},{r:new RegExp("(Silk)/(\\d+)\\.(\\d+)(?:\\.([0-9\\-]+))?")},{r:new RegExp("(AppleWebKit)/(\\d+)\\.?(\\d+)?\\+ .* Safari"), family:"WebKit Nightly"},{r:new RegExp("(Version)/(\\d+)\\.(\\d+)(?:\\.(\\d+))?.*Safari/"), family:"Safari"},{r:new RegExp("(Safari)/\\d+")},{r:new RegExp("(OLPC)/Update(\\d+)\\.(\\d+)")},{r:new RegExp("(OLPC)/Update()\\.(\\d+)")},{r:new RegExp("(SEMC\\-Browser)/(\\d+)\\.(\\d+)")},{r:new RegExp("(Teleca)"), family:"Teleca Browser"},{r:new RegExp("(MSIE) (\\d+)\\.(\\d+)"), family:"IE"},{r:new RegExp("(Nintendo 3DS).* Version/(\\d+)\\.(\\d+)(?:\\.(\\w+))")},{r:new RegExp("(python-requests)/(\\d+)\\.(\\d+)"), family:"Python Requests"},{r:new RegExp("(Thunderbird)/(\\d+)\\.(\\d+)\\.?(\\d+)?")},{r:new RegExp("(Wget)/(\\d+)\\.(\\d+)\\.?([ab]?\\d+[a-z]*)")},{r:new RegExp("(curl)/(\\d+)\\.(\\d+)\\.(\\d+)"), family:"cURL"}];exports.os = [{r:new RegExp("(Android) (\\d+)\\.(\\d+)(?:[.\\-]([a-z0-9]+))?")},{r:new RegExp("(Android)\\-(\\d+)\\.(\\d+)(?:[.\\-]([a-z0-9]+))?")},{r:new RegExp("(Android) Donut")},{r:new RegExp("(Android) Eclair")},{r:new RegExp("(Android) Froyo")},{r:new RegExp("(Android) Gingerbread")},{r:new RegExp("(Android) Honeycomb")},{r:new RegExp("(Windows Phone 6\\.5)")},{r:new RegExp("(Windows (?:NT 5\\.2|NT 5\\.1))"), os:"Windows XP"},{r:new RegExp("(XBLWP7)"), os:"Windows Phone OS"},{r:new RegExp("(Windows NT 6\\.1)"), os:"Windows 7"},{r:new RegExp("(Windows NT 6\\.0)"), os:"Windows Vista"},{r:new RegExp("(Windows 98|Windows XP|Windows ME|Windows 95|Windows CE|Windows 7|Windows NT 4\\.0|Windows Vista|Windows 2000)")},{r:new RegExp("(Windows NT 6\\.2; ARM;)"), os:"Windows RT"},{r:new RegExp("(Windows NT 6\\.2)"), os:"Windows 8"},{r:new RegExp("(Windows NT 5\\.0)"), os:"Windows 2000"},{r:new RegExp("(Windows Phone OS) (\\d+)\\.(\\d+)")},{r:new RegExp("(Windows ?Mobile)"), os:"Windows Mobile"},{r:new RegExp("(WinNT4.0)"), os:"Windows NT 4.0"},{r:new RegExp("(Win98)"), os:"Windows 98"},{r:new RegExp("(Tizen)/(\\d+)\\.(\\d+)")},{r:new RegExp("(Mac OS X) (\\d+)[_.](\\d+)(?:[_.](\\d+))?")},{r:new RegExp("(?:PPC|Intel) (Mac OS X)")},{r:new RegExp("(CPU OS|iPhone OS) (\\d+)_(\\d+)(?:_(\\d+))?"), os:"iOS"},{r:new RegExp("(iPhone|iPad|iPod); Opera"), os:"iOS"},{r:new RegExp("(iPhone|iPad|iPod).*Mac OS X.*Version/(\\d+)\\.(\\d+)"), os:"iOS"},{r:new RegExp("(AppleTV)/(\\d+)\\.(\\d+)"), os:"ATV OS X"},{r:new RegExp("(CrOS) [a-z0-9_]+ (\\d+)\\.(\\d+)(?:\\.(\\d+))?"), os:"Chrome OS"},{r:new RegExp("(Debian)-(\\d+)\\.(\\d+)\\.(\\d+)(?:\\.(\\d+))?")},{r:new RegExp("(Linux Mint)(?:/(\\d+))?")},{r:new RegExp("(Mandriva)(?: Linux)?/(\\d+)\\.(\\d+)\\.(\\d+)(?:\\.(\\d+))?")},{r:new RegExp("(Symbian[Oo][Ss])/(\\d+)\\.(\\d+)"), os:"Symbian OS"},{r:new RegExp("(Symbian/3).+NokiaBrowser/7\\.3"), os:"Symbian^3 Anna"},{r:new RegExp("(Symbian/3).+NokiaBrowser/7\\.4"), os:"Symbian^3 Belle"},{r:new RegExp("(Symbian/3)"), os:"Symbian^3"},{r:new RegExp("(Series 60|SymbOS|S60)"), os:"Symbian OS"},{r:new RegExp("(MeeGo)")},{r:new RegExp("Symbian [Oo][Ss]"), os:"Symbian OS"},{r:new RegExp("(Black[Bb]erry)[0-9a-z]+/(\\d+)\\.(\\d+)\\.(\\d+)(?:\\.(\\d+))?"), os:"BlackBerry OS"},{r:new RegExp("(Black[Bb]erry).+Version/(\\d+)\\.(\\d+)\\.(\\d+)(?:\\.(\\d+))?"), os:"BlackBerry OS"},{r:new RegExp("(RIM Tablet OS) (\\d+)\\.(\\d+)\\.(\\d+)"), os:"BlackBerry Tablet OS"},{r:new RegExp("(Play[Bb]ook)"), os:"BlackBerry Tablet OS"},{r:new RegExp("(Black[Bb]erry)"), os:"Blackberry OS"},{r:new RegExp("(GoogleTV) (\\d+)\\.(\\d+)\\.(\\d+)")},{r:new RegExp("(GoogleTV)\\/\\d+")},{r:new RegExp("(webOS|hpwOS)/(\\d+)\\.(\\d+)(?:\\.(\\d+))?"), os:"webOS"},{r:new RegExp("(SUSE|Fedora|Red Hat|PCLinuxOS)/(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+)")},{r:new RegExp("(SUSE|Fedora|Red Hat|Puppy|PCLinuxOS|CentOS)/(\\d+)\\.(\\d+)\\.(\\d+)")},{r:new RegExp("(Ubuntu|Kindle|Bada|Lubuntu|BackTrack|Red Hat|Slackware)/(\\d+)\\.(\\d+)")},{r:new RegExp("(PlayStation Vita) (\\d+)\\.(\\d+)")},{r:new RegExp("(Windows|OpenBSD|FreeBSD|NetBSD|Ubuntu|Kubuntu|Android|Arch Linux|CentOS|WeTab|Slackware)")},{r:new RegExp("(Linux)/(\\d+)\\.(\\d+)")},{r:new RegExp("(Linux|BSD)")},{r:new RegExp("(Red Hat)")}];
+exports.browser = [{r:new RegExp("^(Opera)/(\\d+)\\.(\\d+) \\(Nintendo Wii"), family:"Wii"},{r:new RegExp("(SeaMonkey|Camino)/(\\d+)\\.(\\d+)\\.?([ab]?\\d+[a-z]*)")},{r:new RegExp("(Pale[Mm]oon)/(\\d+)\\.(\\d+)\\.?(\\d+)?"), family:"Pale Moon (Firefox Variant)"},{r:new RegExp("(Fennec)/(\\d+)\\.(\\d+)\\.?([ab]?\\d+[a-z]*)"), family:"Firefox Mobile"},{r:new RegExp("(Fennec)/(\\d+)\\.(\\d+)(pre)"), family:"Firefox Mobile"},{r:new RegExp("(Fennec)/(\\d+)\\.(\\d+)"), family:"Firefox Mobile"},{r:new RegExp("Mobile.*(Firefox)/(\\d+)\\.(\\d+)"), family:"Firefox Mobile"},{r:new RegExp("(Namoroka|Shiretoko|Minefield)/(\\d+)\\.(\\d+)\\.(\\d+(?:pre)?)"), family:"Firefox ($1)"},{r:new RegExp("(Firefox)/(\\d+)\\.(\\d+)(a\\d+[a-z]*)"), family:"Firefox Alpha"},{r:new RegExp("(Firefox)/(\\d+)\\.(\\d+)(b\\d+[a-z]*)"), family:"Firefox Beta"},{r:new RegExp("(Firefox)-(?:\\d+\\.\\d+)?/(\\d+)\\.(\\d+)(a\\d+[a-z]*)"), family:"Firefox Alpha"},{r:new RegExp("(Firefox)-(?:\\d+\\.\\d+)?/(\\d+)\\.(\\d+)(b\\d+[a-z]*)"), family:"Firefox Beta"},{r:new RegExp("(Namoroka|Shiretoko|Minefield)/(\\d+)\\.(\\d+)([ab]\\d+[a-z]*)?"), family:"Firefox ($1)"},{r:new RegExp("(Firefox).*Tablet browser (\\d+)\\.(\\d+)\\.(\\d+)"), family:"MicroB"},{r:new RegExp("(MozillaDeveloperPreview)/(\\d+)\\.(\\d+)([ab]\\d+[a-z]*)?")},{r:new RegExp("(Flock)/(\\d+)\\.(\\d+)(b\\d+?)")},{r:new RegExp("(RockMelt)/(\\d+)\\.(\\d+)\\.(\\d+)")},{r:new RegExp("(Navigator)/(\\d+)\\.(\\d+)\\.(\\d+)"), family:"Netscape"},{r:new RegExp("(Navigator)/(\\d+)\\.(\\d+)([ab]\\d+)"), family:"Netscape"},{r:new RegExp("(Netscape6)/(\\d+)\\.(\\d+)\\.(\\d+)"), family:"Netscape"},{r:new RegExp("(MyIBrow)/(\\d+)\\.(\\d+)"), family:"My Internet Browser"},{r:new RegExp("(Opera Tablet).*Version/(\\d+)\\.(\\d+)(?:\\.(\\d+))?")},{r:new RegExp("(Opera)/.+Opera Mobi.+Version/(\\d+)\\.(\\d+)"), family:"Opera Mobile"},{r:new RegExp("Opera Mobi"), family:"Opera Mobile"},{r:new RegExp("(Opera Mini)/(\\d+)\\.(\\d+)")},{r:new RegExp("(Opera Mini)/att/(\\d+)\\.(\\d+)")},{r:new RegExp("(Opera)/9.80.*Version/(\\d+)\\.(\\d+)(?:\\.(\\d+))?")},{r:new RegExp("(webOSBrowser)/(\\d+)\\.(\\d+)")},{r:new RegExp("(webOS)/(\\d+)\\.(\\d+)"), family:"webOSBrowser"},{r:new RegExp("(wOSBrowser).+TouchPad/(\\d+)\\.(\\d+)"), family:"webOS TouchPad"},{r:new RegExp("(luakit)"), family:"LuaKit"},{r:new RegExp("(Lightning)/(\\d+)\\.(\\d+)([ab]?\\d+[a-z]*)")},{r:new RegExp("(Firefox)/(\\d+)\\.(\\d+)\\.(\\d+(?:pre)?) \\(Swiftfox\\)"), family:"Swiftfox"},{r:new RegExp("(Firefox)/(\\d+)\\.(\\d+)([ab]\\d+[a-z]*)? \\(Swiftfox\\)"), family:"Swiftfox"},{r:new RegExp("(rekonq)/(\\d+)\\.(\\d+) Safari"), family:"Rekonq"},{r:new RegExp("rekonq"), family:"Rekonq"},{r:new RegExp("(conkeror|Conkeror)/(\\d+)\\.(\\d+)\\.?(\\d+)?"), family:"Conkeror"},{r:new RegExp("(konqueror)/(\\d+)\\.(\\d+)\\.(\\d+)"), family:"Konqueror"},{r:new RegExp("(WeTab)-Browser")},{r:new RegExp("(Comodo_Dragon)/(\\d+)\\.(\\d+)\\.(\\d+)"), family:"Comodo Dragon"},{r:new RegExp("(YottaaMonitor|BrowserMob|HttpMonitor|YandexBot|Slurp|BingPreview|PagePeeker|ThumbShotsBot|WebThumb|URL2PNG|ZooShot|GomezA|Catchpoint bot|Willow Internet Crawler|Google SketchUp|Read%20Later)")},{r:new RegExp("(Symphony) (\\d+).(\\d+)")},{r:new RegExp("(Minimo)")},{r:new RegExp("(CrMo)/(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+)"), family:"Chrome Mobile"},{r:new RegExp("(CriOS)/(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+)"), family:"Chrome Mobile iOS"},{r:new RegExp("(Chrome)/(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+) Mobile"), family:"Chrome Mobile"},{r:new RegExp("(chromeframe)/(\\d+)\\.(\\d+)\\.(\\d+)"), family:"Chrome Frame"},{r:new RegExp("(UC Browser)(\\d+)\\.(\\d+)\\.(\\d+)")},{r:new RegExp("(SLP Browser)/(\\d+)\\.(\\d+)"), family:"Tizen Browser"},{r:new RegExp("(Epiphany)/(\\d+)\\.(\\d+).(\\d+)")},{r:new RegExp("(SE 2\\.X) MetaSr (\\d+)\\.(\\d+)"), family:"Sogou Explorer"},{r:new RegExp("(FlyFlow)/(\\d+)\\.(\\d+)"), family:"Baidu Explorer"},{r:new RegExp("(Pingdom.com_bot_version_)(\\d+)\\.(\\d+)"), family:"PingdomBot"},{r:new RegExp("(facebookexternalhit)/(\\d+)\\.(\\d+)"), family:"FacebookBot"},{r:new RegExp("(Twitterbot)/(\\d+)\\.(\\d+)"), family:"TwitterBot"},{r:new RegExp("(PyAMF)/(\\d+)\\.(\\d+)\\.(\\d+)")},{r:new RegExp("(AdobeAIR|Chromium|FireWeb|Jasmine|ANTGalio|Midori|Fresco|Lobo|PaleMoon|Maxthon|Lynx|OmniWeb|Dillo|Camino|Demeter|Fluid|Fennec|Shiira|Sunrise|Chrome|Flock|Netscape|Lunascape|WebPilot|Vodafone|NetFront|Netfront|Konqueror|SeaMonkey|Kazehakase|Vienna|Iceape|Iceweasel|IceWeasel|Iron|K-Meleon|Sleipnir|Galeon|GranParadiso|Opera Mini|iCab|NetNewsWire|ThunderBrowse|Iris|UP\\.Browser|Bunjaloo|Google Earth|Raven for Mac)/(\\d+)\\.(\\d+)\\.(\\d+)")},{r:new RegExp("(Bolt|Jasmine|IceCat|Skyfire|Midori|Maxthon|Lynx|Arora|IBrowse|Dillo|Camino|Shiira|Fennec|Phoenix|Chrome|Flock|Netscape|Lunascape|Epiphany|WebPilot|Opera Mini|Opera|Vodafone|NetFront|Netfront|Konqueror|Googlebot|SeaMonkey|Kazehakase|Vienna|Iceape|Iceweasel|IceWeasel|Iron|K-Meleon|Sleipnir|Galeon|GranParadiso|iCab|NetNewsWire|Space Bison|Stainless|Orca|Dolfin|BOLT|Minimo|Tizen Browser|Polaris|Abrowser)/(\\d+)\\.(\\d+)")},{r:new RegExp("(iRider|Crazy Browser|SkipStone|iCab|Lunascape|Sleipnir|Maemo Browser) (\\d+)\\.(\\d+)\\.(\\d+)")},{r:new RegExp("(iCab|Lunascape|Opera|Android|Jasmine|Polaris|BREW) (\\d+)\\.(\\d+)\\.?(\\d+)?")},{r:new RegExp("(Kindle)/(\\d+)\\.(\\d+)")},{r:new RegExp("(Android) Donut")},{r:new RegExp("(Android) Eclair")},{r:new RegExp("(Android) Froyo")},{r:new RegExp("(Android) Gingerbread")},{r:new RegExp("(Android) Honeycomb")},{r:new RegExp("(IEMobile)[ /](\\d+)\\.(\\d+)"), family:"IE Mobile"},{r:new RegExp("(MSIE) (\\d+)\\.(\\d+).*XBLWP7"), family:"IE Large Screen"},{r:new RegExp("(Firefox)/(\\d+)\\.(\\d+)\\.(\\d+)")},{r:new RegExp("(Firefox)/(\\d+)\\.(\\d+)(pre|[ab]\\d+[a-z]*)?")},{r:new RegExp("(Obigo)InternetBrowser")},{r:new RegExp("(Obigo)\\-Browser")},{r:new RegExp("(Obigo|OBIGO)[^\\d]*(\\d+)(?:.(\\d+))?")},{r:new RegExp("(MAXTHON|Maxthon) (\\d+)\\.(\\d+)"), family:"Maxthon"},{r:new RegExp("(Maxthon|MyIE2|Uzbl|Shiira)")},{r:new RegExp("(PLAYSTATION) (\\d+)"), family:"PlayStation"},{r:new RegExp("(PlayStation Portable)[^\\d]+(\\d+).(\\d+)")},{r:new RegExp("(BrowseX) \\((\\d+)\\.(\\d+)\\.(\\d+)")},{r:new RegExp("(POLARIS)/(\\d+)\\.(\\d+)"), family:"Polaris"},{r:new RegExp("(Embider)/(\\d+)\\.(\\d+)"), family:"Polaris"},{r:new RegExp("(BonEcho)/(\\d+)\\.(\\d+)\\.(\\d+)"), family:"Bon Echo"},{r:new RegExp("(iPod).+Version/(\\d+)\\.(\\d+)\\.(\\d+)"), family:"Mobile Safari"},{r:new RegExp("(iPod).*Version/(\\d+)\\.(\\d+)"), family:"Mobile Safari"},{r:new RegExp("(iPhone).*Version/(\\d+)\\.(\\d+)\\.(\\d+)"), family:"Mobile Safari"},{r:new RegExp("(iPhone).*Version/(\\d+)\\.(\\d+)"), family:"Mobile Safari"},{r:new RegExp("(iPad).*Version/(\\d+)\\.(\\d+)\\.(\\d+)"), family:"Mobile Safari"},{r:new RegExp("(iPad).*Version/(\\d+)\\.(\\d+)"), family:"Mobile Safari"},{r:new RegExp("(iPod|iPhone|iPad);.*CPU.*OS (\\d+)(?:_\\d+)?_(\\d+).*Mobile"), family:"Mobile Safari"},{r:new RegExp("(iPod|iPhone|iPad)"), family:"Mobile Safari"},{r:new RegExp("(AvantGo) (\\d+).(\\d+)")},{r:new RegExp("(Avant)")},{r:new RegExp("(QtCarBrowser)")},{r:new RegExp("^(Nokia)"), family:"Nokia Services (WAP) Browser"},{r:new RegExp("(NokiaBrowser)/(\\d+)\\.(\\d+).(\\d+)\\.(\\d+)")},{r:new RegExp("(NokiaBrowser)/(\\d+)\\.(\\d+).(\\d+)")},{r:new RegExp("(NokiaBrowser)/(\\d+)\\.(\\d+)")},{r:new RegExp("(BrowserNG)/(\\d+)\\.(\\d+).(\\d+)"), family:"NokiaBrowser"},{r:new RegExp("(Series60)/5\\.0"), family:"NokiaBrowser"},{r:new RegExp("(Series60)/(\\d+)\\.(\\d+)"), family:"Nokia OSS Browser"},{r:new RegExp("(S40OviBrowser)/(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+)"), family:"Nokia Series 40 Ovi Browser"},{r:new RegExp("(Nokia)[EN]?(\\d+)")},{r:new RegExp("(BB10);"), family:"Blackberry WebKit"},{r:new RegExp("(PlayBook).+RIM Tablet OS (\\d+)\\.(\\d+)\\.(\\d+)"), family:"Blackberry WebKit"},{r:new RegExp("(Black[bB]erry).+Version/(\\d+)\\.(\\d+)\\.(\\d+)"), family:"Blackberry WebKit"},{r:new RegExp("(Black[bB]erry)\\s?(\\d+)"), family:"Blackberry"},{r:new RegExp("(OmniWeb)/v(\\d+)\\.(\\d+)")},{r:new RegExp("(Blazer)/(\\d+)\\.(\\d+)"), family:"Palm Blazer"},{r:new RegExp("(Pre)/(\\d+)\\.(\\d+)"), family:"Palm Pre"},{r:new RegExp("(Links) \\((\\d+)\\.(\\d+)")},{r:new RegExp("(QtWeb) Internet Browser/(\\d+)\\.(\\d+)")},{r:new RegExp("(Silk)/(\\d+)\\.(\\d+)(?:\\.([0-9\\-]+))?"), family:"Amazon Silk"},{r:new RegExp("(AppleWebKit)/(\\d+)\\.?(\\d+)?\\+ .* Safari"), family:"WebKit Nightly"},{r:new RegExp("(Version)/(\\d+)\\.(\\d+)(?:\\.(\\d+))?.*Safari/"), family:"Safari"},{r:new RegExp("(Safari)/\\d+")},{r:new RegExp("(OLPC)/Update(\\d+)\\.(\\d+)")},{r:new RegExp("(OLPC)/Update()\\.(\\d+)")},{r:new RegExp("(SEMC\\-Browser)/(\\d+)\\.(\\d+)")},{r:new RegExp("(Teleca)"), family:"Teleca Browser"},{r:new RegExp("(MSIE) (\\d+)\\.(\\d+)"), family:"IE"},{r:new RegExp("(Nintendo 3DS).* Version/(\\d+)\\.(\\d+)(?:\\.(\\w+))")},{r:new RegExp("(python-requests)/(\\d+)\\.(\\d+)"), family:"Python Requests"},{r:new RegExp("(Thunderbird)/(\\d+)\\.(\\d+)\\.?(\\d+)?")},{r:new RegExp("(Wget)/(\\d+)\\.(\\d+)\\.?([ab]?\\d+[a-z]*)")},{r:new RegExp("(curl)/(\\d+)\\.(\\d+)\\.(\\d+)"), family:"cURL"}];exports.os = [{r:new RegExp("(Android) (\\d+)\\.(\\d+)(?:[.\\-]([a-z0-9]+))?")},{r:new RegExp("(Android)\\-(\\d+)\\.(\\d+)(?:[.\\-]([a-z0-9]+))?")},{r:new RegExp("(Android) Donut")},{r:new RegExp("(Android) Eclair")},{r:new RegExp("(Android) Froyo")},{r:new RegExp("(Android) Gingerbread")},{r:new RegExp("(Android) Honeycomb")},{r:new RegExp("(Silk-Accelerated=[a-z]{4,5})"), os:"Android"},{r:new RegExp("(Windows Phone 6\\.5)")},{r:new RegExp("(Windows (?:NT 5\\.2|NT 5\\.1))"), os:"Windows XP"},{r:new RegExp("(XBLWP7)"), os:"Windows Phone OS"},{r:new RegExp("(Windows NT 6\\.1)"), os:"Windows 7"},{r:new RegExp("(Windows NT 6\\.0)"), os:"Windows Vista"},{r:new RegExp("(Windows 98|Windows XP|Windows ME|Windows 95|Windows CE|Windows 7|Windows NT 4\\.0|Windows Vista|Windows 2000)")},{r:new RegExp("(Windows NT 6\\.2; ARM;)"), os:"Windows RT"},{r:new RegExp("(Windows NT 6\\.2)"), os:"Windows 8"},{r:new RegExp("(Windows NT 5\\.0)"), os:"Windows 2000"},{r:new RegExp("(Windows Phone OS) (\\d+)\\.(\\d+)")},{r:new RegExp("(Windows ?Mobile)"), os:"Windows Mobile"},{r:new RegExp("(WinNT4.0)"), os:"Windows NT 4.0"},{r:new RegExp("(Win98)"), os:"Windows 98"},{r:new RegExp("(Tizen)/(\\d+)\\.(\\d+)")},{r:new RegExp("(Mac OS X) (\\d+)[_.](\\d+)(?:[_.](\\d+))?")},{r:new RegExp("(?:PPC|Intel) (Mac OS X)")},{r:new RegExp("(CPU OS|iPhone OS) (\\d+)_(\\d+)(?:_(\\d+))?"), os:"iOS"},{r:new RegExp("(iPhone|iPad|iPod); Opera"), os:"iOS"},{r:new RegExp("(iPhone|iPad|iPod).*Mac OS X.*Version/(\\d+)\\.(\\d+)"), os:"iOS"},{r:new RegExp("(AppleTV)/(\\d+)\\.(\\d+)"), os:"ATV OS X"},{r:new RegExp("(CrOS) [a-z0-9_]+ (\\d+)\\.(\\d+)(?:\\.(\\d+))?"), os:"Chrome OS"},{r:new RegExp("(Debian)-(\\d+)\\.(\\d+)\\.(\\d+)(?:\\.(\\d+))?")},{r:new RegExp("(Linux Mint)(?:/(\\d+))?")},{r:new RegExp("(Mandriva)(?: Linux)?/(\\d+)\\.(\\d+)\\.(\\d+)(?:\\.(\\d+))?")},{r:new RegExp("(Symbian[Oo][Ss])/(\\d+)\\.(\\d+)"), os:"Symbian OS"},{r:new RegExp("(Symbian/3).+NokiaBrowser/7\\.3"), os:"Symbian^3 Anna"},{r:new RegExp("(Symbian/3).+NokiaBrowser/7\\.4"), os:"Symbian^3 Belle"},{r:new RegExp("(Symbian/3)"), os:"Symbian^3"},{r:new RegExp("(Series 60|SymbOS|S60)"), os:"Symbian OS"},{r:new RegExp("(MeeGo)")},{r:new RegExp("Symbian [Oo][Ss]"), os:"Symbian OS"},{r:new RegExp("(BB10);.+Version/(\\d+)\\.(\\d+)\\.(\\d+)"), os:"BlackBerry OS"},{r:new RegExp("(Black[Bb]erry)[0-9a-z]+/(\\d+)\\.(\\d+)\\.(\\d+)(?:\\.(\\d+))?"), os:"BlackBerry OS"},{r:new RegExp("(Black[Bb]erry).+Version/(\\d+)\\.(\\d+)\\.(\\d+)(?:\\.(\\d+))?"), os:"BlackBerry OS"},{r:new RegExp("(RIM Tablet OS) (\\d+)\\.(\\d+)\\.(\\d+)"), os:"BlackBerry Tablet OS"},{r:new RegExp("(Play[Bb]ook)"), os:"BlackBerry Tablet OS"},{r:new RegExp("(Black[Bb]erry)"), os:"Blackberry OS"},{r:new RegExp("(GoogleTV) (\\d+)\\.(\\d+)\\.(\\d+)")},{r:new RegExp("(GoogleTV)\\/\\d+")},{r:new RegExp("(webOS|hpwOS)/(\\d+)\\.(\\d+)(?:\\.(\\d+))?"), os:"webOS"},{r:new RegExp("(SUSE|Fedora|Red Hat|PCLinuxOS)/(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+)")},{r:new RegExp("(SUSE|Fedora|Red Hat|Puppy|PCLinuxOS|CentOS)/(\\d+)\\.(\\d+)\\.(\\d+)")},{r:new RegExp("(Ubuntu|Kindle|Bada|Lubuntu|BackTrack|Red Hat|Slackware)/(\\d+)\\.(\\d+)")},{r:new RegExp("(PlayStation Vita) (\\d+)\\.(\\d+)")},{r:new RegExp("(Windows|OpenBSD|FreeBSD|NetBSD|Ubuntu|Kubuntu|Android|Arch Linux|CentOS|WeTab|Slackware)")},{r:new RegExp("(Linux)/(\\d+)\\.(\\d+)")},{r:new RegExp("(Linux|BSD)")},{r:new RegExp("(Red Hat)")}];exports.device = [{r:new RegExp("HTC ([A-Z][a-z0-9]+) Build"), device:"HTC $1"},{r:new RegExp("HTC ([A-Z][a-z0-9 ]+) \\d+\\.\\d+\\.\\d+\\.\\d+"), device:"HTC $1"},{r:new RegExp("HTC_Touch_([A-Za-z0-9]+)"), device:"HTC Touch ($1)"},{r:new RegExp("USCCHTC(\\d+)"), device:"HTC $1 (US Cellular)"},{r:new RegExp("Sprint APA(9292)"), device:"HTC $1 (Sprint)"},{r:new RegExp("HTC ([A-Za-z0-9]+ [A-Z])"), device:"HTC $1"},{r:new RegExp("HTC-([A-Za-z0-9]+)"), device:"HTC $1"},{r:new RegExp("HTC_([A-Za-z0-9]+)"), device:"HTC $1"},{r:new RegExp("HTC ([A-Za-z0-9]+)"), device:"HTC $1"},{r:new RegExp("(ADR[A-Za-z0-9]+)"), device:"HTC $1"},{r:new RegExp("(HTC)")},{r:new RegExp("(QtCarBrowser)"), device:"Tesla Model S"},{r:new RegExp("(SamsungSGHi560)"), device:"Samsung SGHi560"},{r:new RegExp("SonyEricsson([A-Za-z0-9]+)/"), device:"Ericsson $1"},{r:new RegExp("(KFOT Build)"), device:"Kindle Fire"},{r:new RegExp("(KFTT Build)"), device:"Kindle Fire HD"},{r:new RegExp("(KFJWI Build)"), device:"Kindle Fire HD 8.9\" WiFi"},{r:new RegExp("(KFJWA Build)"), device:"Kindle Fire HD 8.9\" 4G"},{r:new RegExp("(Kindle Fire)")},{r:new RegExp("(Kindle)")},{r:new RegExp("(Silk)/(\\d+)\\.(\\d+)(?:\\.([0-9\\-]+))?"), device:"Kindle Fire"},{r:new RegExp("Android[\\- ][\\d]+\\.[\\d]+\\; [A-Za-z]{2}\\-[A-Za-z]{2}\\; WOWMobile (.+) Build")},{r:new RegExp("Android[\\- ][\\d]+\\.[\\d]+\\.[\\d]+; [A-Za-z]{2}\\-[A-Za-z]{2}\\; (.+) Build")},{r:new RegExp("Android[\\- ][\\d]+\\.[\\d]+\\-update1\\; [A-Za-z]{2}\\-[A-Za-z]{2}\\; (.+) Build")},{r:new RegExp("Android[\\- ][\\d]+\\.[\\d]+\\; [A-Za-z]{2}\\-[A-Za-z]{2}\\; (.+) Build")},{r:new RegExp("Android[\\- ][\\d]+\\.[\\d]+\\.[\\d]+; (.+) Build")},{r:new RegExp("NokiaN([0-9]+)"), device:"Nokia N$1"},{r:new RegExp("Nokia([A-Za-z0-9\\v-]+)"), device:"Nokia $1"},{r:new RegExp("NOKIA ([A-Za-z0-9\\-]+)"), device:"Nokia $1"},{r:new RegExp("Nokia ([A-Za-z0-9\\-]+)"), device:"Nokia $1"},{r:new RegExp("Lumia ([A-Za-z0-9\\-]+)"), device:"Lumia $1"},{r:new RegExp("Symbian"), device:"Nokia"},{r:new RegExp("BB10; ([A-Za-z0-9\\- ]+)\\)"), device:"BlackBerry $1"},{r:new RegExp("(PlayBook).+RIM Tablet OS"), device:"Blackberry Playbook"},{r:new RegExp("(Black[Bb]erry [0-9]+);")},{r:new RegExp("Black[Bb]erry([0-9]+)"), device:"BlackBerry $1"},{r:new RegExp("(Pre)/(\\d+)\\.(\\d+)"), device:"Palm Pre"},{r:new RegExp("(Pixi)/(\\d+)\\.(\\d+)"), device:"Palm Pixi"},{r:new RegExp("(Touchpad)/(\\d+)\\.(\\d+)"), device:"HP Touchpad"},{r:new RegExp("HPiPAQ([A-Za-z0-9]+)/(\\d+).(\\d+)"), device:"HP iPAQ $1"},{r:new RegExp("Palm([A-Za-z0-9]+)"), device:"Palm $1"},{r:new RegExp("Treo([A-Za-z0-9]+)"), device:"Palm Treo $1"},{r:new RegExp("webOS.*(P160UNA)/(\\d+).(\\d+)"), device:"HP Veer"},{r:new RegExp("(PlayStation Portable)")},{r:new RegExp("(PlayStation Vita)")},{r:new RegExp("(AppleTV)"), device:"AppleTV"},{r:new RegExp("(iPad) Simulator;")},{r:new RegExp("(iPad);")},{r:new RegExp("(iPod);")},{r:new RegExp("(iPhone) Simulator;")},{r:new RegExp("(iPhone);")},{r:new RegExp("acer_([A-Za-z0-9]+)_"), device:"Acer $1"},{r:new RegExp("acer_([A-Za-z0-9]+)_"), device:"Acer $1"},{r:new RegExp("Amoi\\-([A-Za-z0-9]+)"), device:"Amoi $1"},{r:new RegExp("AMOI\\-([A-Za-z0-9]+)"), device:"Amoi $1"},{r:new RegExp("Asus\\-([A-Za-z0-9]+)"), device:"Asus $1"},{r:new RegExp("ASUS\\-([A-Za-z0-9]+)"), device:"Asus $1"},{r:new RegExp("BIRD\\-([A-Za-z0-9]+)"), device:"Bird $1"},{r:new RegExp("BIRD\\.([A-Za-z0-9]+)"), device:"Bird $1"},{r:new RegExp("BIRD ([A-Za-z0-9]+)"), device:"Bird $1"},{r:new RegExp("Dell ([A-Za-z0-9]+)"), device:"Dell $1"},{r:new RegExp("DoCoMo/2\\.0 ([A-Za-z0-9]+)"), device:"DoCoMo $1"},{r:new RegExp("([A-Za-z0-9]+)_W\\;FOMA"), device:"DoCoMo $1"},{r:new RegExp("([A-Za-z0-9]+)\\;FOMA"), device:"DoCoMo $1"},{r:new RegExp("vodafone([A-Za-z0-9]+)"), device:"Huawei Vodafone $1"},{r:new RegExp("i\\-mate ([A-Za-z0-9]+)"), device:"i-mate $1"},{r:new RegExp("Kyocera\\-([A-Za-z0-9]+)"), device:"Kyocera $1"},{r:new RegExp("KWC\\-([A-Za-z0-9]+)"), device:"Kyocera $1"},{r:new RegExp("Lenovo\\-([A-Za-z0-9]+)"), device:"Lenovo $1"},{r:new RegExp("Lenovo_([A-Za-z0-9]+)"), device:"Lenovo $1"},{r:new RegExp("LG/([A-Za-z0-9]+)"), device:"LG $1"},{r:new RegExp("LG-LG([A-Za-z0-9]+)"), device:"LG $1"},{r:new RegExp("LGE-LG([A-Za-z0-9]+)"), device:"LG $1"},{r:new RegExp("LGE VX([A-Za-z0-9]+)"), device:"LG $1"},{r:new RegExp("LG ([A-Za-z0-9]+)"), device:"LG $1"},{r:new RegExp("LGE LG\\-AX([A-Za-z0-9]+)"), device:"LG $1"},{r:new RegExp("LG\\-([A-Za-z0-9]+)"), device:"LG $1"},{r:new RegExp("LGE\\-([A-Za-z0-9]+)"), device:"LG $1"},{r:new RegExp("LG([A-Za-z0-9]+)"), device:"LG $1"},{r:new RegExp("(KIN)\\.One (\\d+)\\.(\\d+)"), device:"Microsoft $1"},{r:new RegExp("(KIN)\\.Two (\\d+)\\.(\\d+)"), device:"Microsoft $1"},{r:new RegExp("(Motorola)\\-([A-Za-z0-9]+)")},{r:new RegExp("MOTO\\-([A-Za-z0-9]+)"), device:"Motorola $1"},{r:new RegExp("MOT\\-([A-Za-z0-9]+)"), device:"Motorola $1"},{r:new RegExp("Philips([A-Za-z0-9]+)"), device:"Philips $1"},{r:new RegExp("Philips ([A-Za-z0-9]+)"), device:"Philips $1"},{r:new RegExp("SAMSUNG-([A-Za-z0-9\\-]+)"), device:"Samsung $1"},{r:new RegExp("SAMSUNG\\; ([A-Za-z0-9\\-]+)"), device:"Samsung $1"},{r:new RegExp("Softbank/1\\.0/([A-Za-z0-9]+)"), device:"Softbank $1"},{r:new RegExp("Softbank/2\\.0/([A-Za-z0-9]+)"), device:"Softbank $1"},{r:new RegExp("(PlayStation3 PPC)"), device:"Playstation 3"},{r:new RegExp("(hiptop|avantgo|plucker|xiino|blazer|elaine|up.browser|up.link|mmp|smartphone|midp|wap|vodafone|o2|pocket|mobile|pda)"), device:"Generic Smartphone"},{r:new RegExp("^(1207|3gso|4thp|501i|502i|503i|504i|505i|506i|6310|6590|770s|802s|a wa|acer|acs\\-|airn|alav|asus|attw|au\\-m|aur |aus |abac|acoo|aiko|alco|alca|amoi|anex|anny|anyw|aptu|arch|argo|bell|bird|bw\\-n|bw\\-u|beck|benq|bilb|blac|c55/|cdm\\-|chtm|capi|comp|cond|craw|dall|dbte|dc\\-s|dica|ds\\-d|ds12|dait|devi|dmob|doco|dopo|el49|erk0|esl8|ez40|ez60|ez70|ezos|ezze|elai|emul|eric|ezwa|fake|fly\\-|fly_|g\\-mo|g1 u|g560|gf\\-5|grun|gene|go.w|good|grad|hcit|hd\\-m|hd\\-p|hd\\-t|hei\\-|hp i|hpip|hs\\-c|htc |htc\\-|htca|htcg)"), device:"Generic Feature Phone"},{r:new RegExp("^(htcp|htcs|htct|htc_|haie|hita|huaw|hutc|i\\-20|i\\-go|i\\-ma|i230|iac|iac\\-|iac/|ig01|im1k|inno|iris|jata|java|kddi|kgt|kgt/|kpt |kwc\\-|klon|lexi|lg g|lg\\-a|lg\\-b|lg\\-c|lg\\-d|lg\\-f|lg\\-g|lg\\-k|lg\\-l|lg\\-m|lg\\-o|lg\\-p|lg\\-s|lg\\-t|lg\\-u|lg\\-w|lg/k|lg/l|lg/u|lg50|lg54|lge\\-|lge/|lynx|leno|m1\\-w|m3ga|m50/|maui|mc01|mc21|mcca|medi|meri|mio8|mioa|mo01|mo02|mode|modo|mot |mot\\-|mt50|mtp1|mtv |mate|maxo|merc|mits|mobi|motv|mozz|n100|n101|n102|n202|n203|n300|n302|n500|n502|n505|n700|n701|n710|nec\\-|nem\\-|newg|neon)"), device:"Generic Feature Phone"},{r:new RegExp("^(netf|noki|nzph|o2 x|o2\\-x|opwv|owg1|opti|oran|ot\\-s|p800|pand|pg\\-1|pg\\-2|pg\\-3|pg\\-6|pg\\-8|pg\\-c|pg13|phil|pn\\-2|pt\\-g|palm|pana|pire|pock|pose|psio|qa\\-a|qc\\-2|qc\\-3|qc\\-5|qc\\-7|qc07|qc12|qc21|qc32|qc60|qci\\-|qwap|qtek|r380|r600|raks|rim9|rove|s55/|sage|sams|sc01|sch\\-|scp\\-|sdk/|se47|sec\\-|sec0|sec1|semc|sgh\\-|shar|sie\\-|sk\\-0|sl45|slid|smb3|smt5|sp01|sph\\-|spv |spv\\-|sy01|samm|sany|sava|scoo|send|siem|smar|smit|soft|sony|t\\-mo|t218|t250|t600|t610|t618|tcl\\-|tdg\\-|telm|tim\\-|ts70|tsm\\-|tsm3|tsm5|tx\\-9|tagt)"), device:"Generic Feature Phone"},{r:new RegExp("^(talk|teli|topl|tosh|up.b|upg1|utst|v400|v750|veri|vk\\-v|vk40|vk50|vk52|vk53|vm40|vx98|virg|vite|voda|vulc|w3c |w3c\\-|wapj|wapp|wapu|wapm|wig |wapi|wapr|wapv|wapy|wapa|waps|wapt|winc|winw|wonu|x700|xda2|xdag|yas\\-|your|zte\\-|zeto|aste|audi|avan|blaz|brew|brvw|bumb|ccwa|cell|cldc|cmd\\-|dang|eml2|fetc|hipt|http|ibro|idea|ikom|ipaq|jbro|jemu|jigs|keji|kyoc|kyok|libw|m\\-cr|midp|mmef|moto|mwbp|mywa|newt|nok6|o2im|pant|pdxg|play|pluc|port|prox|rozo|sama|seri|smal|symb|treo|upsi|vx52|vx53|vx60|vx61|vx70|vx80|vx81|vx83|vx85|wap\\-|webc|whit|wmlb|xda\\-|xda_)"), device:"Generic Feature Phone"},{r:new RegExp("(bot|borg|google(^tv)|yahoo|slurp|msnbot|msrbot|openbot|archiver|netresearch|lycos|scooter|altavista|teoma|gigabot|baiduspider|blitzbot|oegp|charlotte|furlbot|http%20client|polybot|htdig|ichiro|mogimogi|larbin|pompos|scrubby|searchsight|seekbot|semanticdiscovery|silk|snappy|speedy|spider|voila|vortex|voyager|zao|zeal|fast\\-webcrawler|converacrawler|dataparksearch|findlinks)"), device:"Spider"},{r:new RegExp("(QtCarBrowser)"), device:"Tesla Model S"}];
View
20 lib/update.js
@@ -14,7 +14,8 @@ var request = require('request')
*/
module.exports = function update (fn) {
- var ua_parsers = []
+ var device_parsers = []
+ , ua_parsers = []
, os_parsers = [];
/**
@@ -47,6 +48,7 @@ module.exports = function update (fn) {
// now we can try to generate a smaller file so it will take less memory
// once we load thing in memory
var agents = parsed_yaml.user_agent_parsers
+ , devices = parsed_yaml.device_parsers
, os = parsed_yaml.os_parsers
, parser, i, l;
@@ -59,7 +61,7 @@ module.exports = function update (fn) {
// check for potential family replacements
if (agents[i].family_replacement)
- parser += ', family:"' + agents[i].family_replacement + '"';
+ parser += ', family:"' + agents[i].family_replacement.replace('"', '\\"') + '"';
if (agents[i].major_version_replacement)
parser += ', major: "' + agents[i].major_version_replacement + '"';
@@ -73,11 +75,22 @@ module.exports = function update (fn) {
// check for potential os replacements
if (os[i].os_replacement)
- parser += ', os:"' + os[i].os_replacement + '"';
+ parser += ', os:"' + os[i].os_replacement.replace('"', '\\"') + '"';
os_parsers.push('{' + parser + '}');
}
+ // generate array of device parsers
+ for (i = 0, l = devices.length; i < l; i++) {
+ parser = 'r:new RegExp('+ JSON.stringify(devices[i].regex) + ')';
+
+ // check for potential os replacements
+ if (devices[i].device_replacement)
+ parser += ', device:"' + devices[i].device_replacement.replace('"', '\\"') + '"';
+
+ device_parsers.push('{' + parser + '}');
+ }
+
agents.length = os.length = parsed_yaml = 0;
return true;
}
@@ -93,6 +106,7 @@ module.exports = function update (fn) {
// file and make it happen.
var agentjs = 'exports.browser = ['+ ua_parsers.join(',') + '];';
agentjs += 'exports.os = [' + os_parsers.join(',') + '];';
+ agentjs += 'exports.device = [' + device_parsers.join(',') + '];';
// parse down to javascript, we don't want to eval it because someone might
// have been naught with our internet and injected a require() statment in
View
5 lib/useragent.js
@@ -15,15 +15,17 @@ var agents = require('./agents');
* @param {String} minor Minor version of the browser
* @param {String} patch Patch version of the browser
* @param {String} os Operating system
+ * @param {String} device Device name
* @api public
*/
-function Agent (family, major, minor, patch, os) {
+function Agent (family, major, minor, patch, os, device) {
this.family = family || 'Other';
this.major = major || '0';
this.minor = minor || '0';
this.patch = patch || '0';
this.os = os || 'Other';
+ this.device = device || 'Computer';
}
/**
@@ -93,6 +95,7 @@ Agent.prototype.toJSON = function toJSON () {
, major: this.major
, minor: this.minor
, patch: this.patch
+ , device: this.device
, os: this.os
});
};
View
2 static/user_agent.after.yaml
@@ -10,3 +10,5 @@ user_agent_parsers:
os_parsers:
- regex: '(Red Hat)'
+
+device_parsers:

0 comments on commit c7eeab5

Please sign in to comment.