ua-parser-js
Advanced tools
Comparing version 0.7.25 to 0.7.26
{ | ||
"name": "ua-parser-js", | ||
"version": "0.7.25", | ||
"version": "0.7.26", | ||
"authors": [ | ||
@@ -5,0 +5,0 @@ "Faisal Salman <f@faisalman.com>" |
/*!@license | ||
* UAParser.js v0.7.25 | ||
* UAParser.js v0.7.26 | ||
* Lightweight JavaScript-based User-Agent string parser | ||
@@ -9,2 +9,2 @@ * https://github.com/faisalman/ua-parser-js | ||
*/ | ||
(function(window,undefined){"use strict";var LIBVERSION="0.7.25",EMPTY="",UNKNOWN="?",FUNC_TYPE="function",UNDEF_TYPE="undefined",OBJ_TYPE="object",STR_TYPE="string",MAJOR="major",MODEL="model",NAME="name",TYPE="type",VENDOR="vendor",VERSION="version",ARCHITECTURE="architecture",CONSOLE="console",MOBILE="mobile",TABLET="tablet",SMARTTV="smarttv",WEARABLE="wearable",EMBEDDED="embedded";var util={extend:function(regexes,extensions){var mergedRegexes={};for(var i in regexes){if(extensions[i]&&extensions[i].length%2===0){mergedRegexes[i]=extensions[i].concat(regexes[i])}else{mergedRegexes[i]=regexes[i]}}return mergedRegexes},has:function(str1,str2){if(typeof str1==="string"){return str2.toLowerCase().indexOf(str1.toLowerCase())!==-1}else{return false}},lowerize:function(str){return str.toLowerCase()},major:function(version){return typeof version===STR_TYPE?version.replace(/[^\d\.]/g,"").split(".")[0]:undefined},trim:function(str){return str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}};var mapper={rgx:function(ua,arrays){var i=0,j,k,p,q,matches,match;while(i<arrays.length&&!matches){var regex=arrays[i],props=arrays[i+1];j=k=0;while(j<regex.length&&!matches){matches=regex[j++].exec(ua);if(!!matches){for(p=0;p<props.length;p++){match=matches[++k];q=props[p];if(typeof q===OBJ_TYPE&&q.length>0){if(q.length==2){if(typeof q[1]==FUNC_TYPE){this[q[0]]=q[1].call(this,match)}else{this[q[0]]=q[1]}}else if(q.length==3){if(typeof q[1]===FUNC_TYPE&&!(q[1].exec&&q[1].test)){this[q[0]]=match?q[1].call(this,match,q[2]):undefined}else{this[q[0]]=match?match.replace(q[1],q[2]):undefined}}else if(q.length==4){this[q[0]]=match?q[3].call(this,match.replace(q[1],q[2])):undefined}}else{this[q]=match?match:undefined}}}}i+=2}},str:function(str,map){for(var i in map){if(typeof map[i]===OBJ_TYPE&&map[i].length>0){for(var j=0;j<map[i].length;j++){if(util.has(map[i][j],str)){return i===UNKNOWN?undefined:i}}}else if(util.has(map[i],str)){return i===UNKNOWN?undefined:i}}return str}};var maps={browser:{oldsafari:{version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}}},device:{amazon:{model:{"Fire Phone":["SD","KF"]}},sprint:{model:{"Evo Shift 4G":"7373KT"},vendor:{HTC:"APA",Sprint:"Sprint"}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"}}}};var regexes={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]{3,6}).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[NAME,VERSION],[/(opios)[\/\s]+([\w\.]+)/i],[[NAME,"Opera Mini"],VERSION],[/\s(opr)\/([\w\.]+)/i],[[NAME,"Opera"],VERSION],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|instagram)[\/\s]?([\w\.]*)/i,/(avant\s|iemobile|slim)(?:browser)?[\/\s]?([\w\.]*)/i,/(bidubrowser|baidubrowser)[\/\s]?([\w\.]+)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(rekonq)\/([\w\.]*)/i,/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon)\/([\w\.-]+)/i,/(puffin|brave|whale|qqbrowserlite|qq)\/([\w\.]+)/i],[NAME,VERSION],[/(konqueror)\/([\w\.]+)/i],[[NAME,"Konqueror"],VERSION],[/(trident).+rv[:\s]([\w\.]{1,9}).+like\sgecko/i],[[NAME,"IE"],VERSION],[/(edge|edgios|edga|edg)\/((\d+)?[\w\.]+)/i],[[NAME,"Edge"],VERSION],[/(yabrowser)\/([\w\.]+)/i],[[NAME,"Yandex"],VERSION],[/(Avast)\/([\w\.]+)/i],[[NAME,"Avast Secure Browser"],VERSION],[/(AVG)\/([\w\.]+)/i],[[NAME,"AVG Secure Browser"],VERSION],[/(focus)\/([\w\.]+)/i],[[NAME,"Firefox Focus"],VERSION],[/(opt)\/([\w\.]+)/i],[[NAME,"Opera Touch"],VERSION],[/((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[[NAME,"UCBrowser"],VERSION],[/(comodo_dragon)\/([\w\.]+)/i],[[NAME,/_/g," "],VERSION],[/((?:windowswechat)? qbcore)\/([\w\.]+).*(?:windowswechat)?/i],[[NAME,"WeChat(Win) Desktop"],VERSION],[/(micromessenger)\/([\w\.]+)/i],[[NAME,"WeChat"],VERSION],[/m?(qqbrowser|baiduboxapp|2345Explorer)[\/\s]?([\w\.]+)/i],[NAME,VERSION],[/(MetaSr)[\/\s]?([\w\.]+)/i],[NAME],[/(LBBROWSER)/i],[NAME],[/(weibo)__([\d\.]+)/i],[NAME,VERSION],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[VERSION,[NAME,"MIUI Browser"]],[/;fbav\/([\w\.]+);/i],[VERSION,[NAME,"Facebook"]],[/FBAN\/FBIOS|FB_IAB\/FB4A/i],[[NAME,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/droid.+(line)\/([\w\.]+)\/iab/i],[NAME,VERSION],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[VERSION,[NAME,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[NAME,/(.+)/,"$1 WebView"],VERSION],[/((?:oculus|samsung)browser)\/([\w\.]+)/i],[[NAME,/(.+(?:g|us))(.+)/,"$1 $2"],VERSION],[/droid.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[VERSION,[NAME,"Android Browser"]],[/(coc_coc_browser)\/([\w\.]+)/i],[[NAME,"Coc Coc"],VERSION],[/(sailfishbrowser)\/([\w\.]+)/i],[[NAME,"Sailfish Browser"],VERSION],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[NAME,VERSION],[/(dolfin)\/([\w\.]+)/i],[[NAME,"Dolphin"],VERSION],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[NAME,"360 Browser"]],[/((?:android.+)crmo|crios)\/([\w\.]+)/i],[[NAME,"Chrome"],VERSION],[/(coast)\/([\w\.]+)/i],[[NAME,"Opera Coast"],VERSION],[/fxios\/([\w\.-]+)/i],[VERSION,[NAME,"Firefox"]],[/version\/([\w\.]+)\s.*mobile\/\w+\s(safari)/i],[VERSION,[NAME,"Mobile Safari"]],[/version\/([\w\.]+)\s.*(mobile\s?safari|safari)/i],[VERSION,NAME],[/webkit.+?(gsa)\/([\w\.]+)\s.*(mobile\s?safari|safari)(\/[\w\.]+)/i],[[NAME,"GSA"],VERSION],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[NAME,[VERSION,mapper.str,maps.browser.oldsafari.version]],[/(webkit|khtml)\/([\w\.]+)/i],[NAME,VERSION],[/(navigator|netscape)\/([\w\.-]+)/i],[[NAME,"Netscape"],VERSION],[/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([\w\.-]+)$/i,/(firefox)\/([\w\.]+)\s[\w\s\-]+\/[\w\.]+$/i,/(mozilla)\/([\w\.]+)\s.+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]*)/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[NAME,VERSION]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[[ARCHITECTURE,"amd64"]],[/(ia32(?=;))/i],[[ARCHITECTURE,util.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[ARCHITECTURE,"ia32"]],[/windows\s(ce|mobile);\sppc;/i],[[ARCHITECTURE,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[[ARCHITECTURE,/ower/,"",util.lowerize]],[/(sun4\w)[;\)]/i],[[ARCHITECTURE,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+[;l]))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[[ARCHITECTURE,util.lowerize]]],device:[[/\((ipad|playbook);[\w\s\),;-]+(rim|apple)/i],[MODEL,VENDOR,[TYPE,TABLET]],[/applecoremedia\/[\w\.]+ \((ipad)/],[MODEL,[VENDOR,"Apple"],[TYPE,TABLET]],[/(apple\s{0,1}tv)/i],[[MODEL,"Apple TV"],[VENDOR,"Apple"],[TYPE,SMARTTV]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad)/i,/(hp).+(tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i],[VENDOR,MODEL,[TYPE,TABLET]],[/(alexa)webm/i,/(kf[A-z]+)(\sbuild\/|\)).+silk\//i],[MODEL,[VENDOR,"Amazon"],[TYPE,TABLET]],[/(sd|kf)[0349hijorstuw]+(\sbuild\/|\)).+silk\//i],[[MODEL,mapper.str,maps.device.amazon.model],[VENDOR,"Amazon"],[TYPE,MOBILE]],[/droid.+aft([\w])(\sbuild\/|\))/i],[MODEL,[VENDOR,"Amazon"],[TYPE,SMARTTV]],[/\((ip(?:hone|od)[\s\w]*);/i],[MODEL,[VENDOR,"Apple"],[TYPE,MOBILE]],[/(blackberry)[\s-]?(\w+)/i,/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i],[VENDOR,MODEL,[TYPE,MOBILE]],[/\(bb10;\s(\w+)/i],[MODEL,[VENDOR,"BlackBerry"],[TYPE,MOBILE]],[/droid.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone|p00c)/i],[MODEL,[VENDOR,"Asus"],[TYPE,TABLET]],[/sony\stablet\s[ps]\sbuild\//i,/(?:sony)?sgp\w+(?:\sbuild\/|\))/i],[[MODEL,"Xperia Tablet"],[VENDOR,"Sony"],[TYPE,TABLET]],[/droid.+\s([c-g]\d{4}|so[-l]\w+|xq-a\w[4-7][12])(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[MODEL,[VENDOR,"Sony"],[TYPE,MOBILE]],[/\s(ouya)\s/i,/(nintendo)\s([wids3utch]+)/i],[VENDOR,MODEL,[TYPE,CONSOLE]],[/droid.+;\s(shield)\sbuild/i],[MODEL,[VENDOR,"Nvidia"],[TYPE,CONSOLE]],[/(playstation\s[345portablevi]+)/i],[MODEL,[VENDOR,"Sony"],[TYPE,CONSOLE]],[/(sprint\s(\w+))/i],[[VENDOR,mapper.str,maps.device.sprint.vendor],[MODEL,mapper.str,maps.device.sprint.model],[TYPE,MOBILE]],[/(htc)[;_\s-]{1,2}([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[VENDOR,[MODEL,/_/g," "],[TYPE,MOBILE]],[/(nexus\s9)/i],[MODEL,[VENDOR,"HTC"],[TYPE,TABLET]],[/d\/huawei([\w\s-]+)[;\)]/i,/droid.+\s(nexus\s6p|vog-[at]?l\d\d|ane-[at]?l[x\d]\d|eml-a?l\d\da?|lya-[at]?l\d[\dc]|clt-a?l\d\di?)/i,/droid.+\s((?:A(?:GS2?|KA|LP|N[AE]|QM|RE|SK|TH)|B(?:A(?:C|H2)|G2|KL|LA|MH|Z[AKT])|C(?:AZ|DY|LT|OL|[MOR]R)|DUK|E(?:BG|DI|L[ES]|ML|V[AR])|FRD|G(?:LK|RA)|H(?:D[LN]|MA|LK|RY|WI)|INE|J(?:DN2|MM|NY|SN)|K(?:NT|OB|SA)|L(?:IO|LD|ON|[RY]A)|M(?:AR|ED|[HL]A|ON|RX|T7)|N(?:EO|TS|XT)|OXF|P(?:AR|CT|IC|LK|RA)|R(?:IO|VL)|S(?:C[ML]|EA|HT|PN|TF)|T(?:A[HS]|NY)|V(?:[CI]E|KY|OG|RD)|W(?:AS|LZ)|Y(?:635|AL))-[ATU][LN][01259][019])[;\)\s]/i],[MODEL,[VENDOR,"Huawei"],[TYPE,MOBILE]],[/droid.+(bah2?-a?[lw]\d{2})/i],[MODEL,[VENDOR,"Huawei"],[TYPE,TABLET]],[/(microsoft);\s(lumia[\s\w]+)/i],[VENDOR,MODEL,[TYPE,MOBILE]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[MODEL,[VENDOR,"Microsoft"],[TYPE,CONSOLE]],[/(kin\.[onetw]{3})/i],[[MODEL,/\./g," "],[VENDOR,"Microsoft"],[TYPE,MOBILE]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)[\w\s]+build\//i,/\smot[\s-](\w*)/i,/(moto[\s\w\(\)]+(?=\sbuild|\)))/i,/(XT\d{3,4}) build\//i,/(nexus\s6)/i],[MODEL,[VENDOR,"Motorola"],[TYPE,MOBILE]],[/droid.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[MODEL,[VENDOR,"Motorola"],[TYPE,TABLET]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[VENDOR,util.trim],[MODEL,util.trim],[TYPE,SMARTTV]],[/hbbtv.+maple;(\d+)/i],[[MODEL,/^/,"SmartTV"],[VENDOR,"Samsung"],[TYPE,SMARTTV]],[/\(dtv[\);].+(aquos)/i],[MODEL,[VENDOR,"Sharp"],[TYPE,SMARTTV]],[/droid.+((sch-i[89]0\d|shw-m380s|SM-P605|SM-P610|SM-P587|gt-p\d{4}|gt-n\d+|sgh-t8[56]9|nexus 10))/i,/((SM-T\w+))/i],[[VENDOR,"Samsung"],MODEL,[TYPE,TABLET]],[/smart-tv.+(samsung)/i],[VENDOR,[TYPE,SMARTTV],MODEL],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,/\s(sam)(?:sung)[\s-]([\w-]+)/i,/sec-((sgh\w+))/i],[[VENDOR,"Samsung"],MODEL,[TYPE,MOBILE]],[/sie-(\w*)/i],[MODEL,[VENDOR,"Siemens"],[TYPE,MOBILE]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w\.-]*)/i],[[VENDOR,"Nokia"],MODEL,[TYPE,MOBILE]],[/droid[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[MODEL,[VENDOR,"Acer"],[TYPE,TABLET]],[/droid.+([vl]k\-?\d{3})\s+build/i],[MODEL,[VENDOR,"LG"],[TYPE,TABLET]],[/droid\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[VENDOR,"LG"],MODEL,[TYPE,TABLET]],[/linux;\snetcast.+smarttv/i,/lg\snetcast\.tv-201\d/i],[[VENDOR,"LG"],MODEL,[TYPE,SMARTTV]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w*)/i,/droid.+lg(\-?[\d\w]+)\s+build/i],[MODEL,[VENDOR,"LG"],[TYPE,MOBILE]],[/(lenovo)\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+)|[\w-]+)/i],[VENDOR,MODEL,[TYPE,TABLET]],[/droid.+(ideatab[a-z0-9\-\s]+)/i],[MODEL,[VENDOR,"Lenovo"],[TYPE,TABLET]],[/(lenovo)[_\s-]?([\w-]+)/i],[VENDOR,MODEL,[TYPE,MOBILE]],[/linux;.+((jolla));/i],[VENDOR,MODEL,[TYPE,MOBILE]],[/((pebble))app\/[\d\.]+\s/i],[VENDOR,MODEL,[TYPE,WEARABLE]],[/droid.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[VENDOR,MODEL,[TYPE,MOBILE]],[/crkey/i],[[MODEL,"Chromecast"],[VENDOR,"Google"],[TYPE,SMARTTV]],[/droid.+;\s(glass)\s\d/i],[MODEL,[VENDOR,"Google"],[TYPE,WEARABLE]],[/droid.+;\s(pixel c)[\s)]/i],[MODEL,[VENDOR,"Google"],[TYPE,TABLET]],[/droid.+;\s(pixel( [2-9]a?)?( xl)?)[\s)]/i],[MODEL,[VENDOR,"Google"],[TYPE,MOBILE]],[/droid.+;\s(\w+)\s+build\/hm\1/i,/droid.+(hm[\s\-_]?note?[\s_]?(?:\d\w)?)\sbuild/i,/droid.+(redmi[\s\-_]?(?:note|k)?(?:[\s_]?[\w\s]+))(?:\sbuild|\))/i,/droid.+(mi[\s\-_]?(?:a\d|one|one[\s_]plus|note lte)?[\s_]?(?:\d?\w?)[\s_]?(?:plus)?)\sbuild/i],[[MODEL,/_/g," "],[VENDOR,"Xiaomi"],[TYPE,MOBILE]],[/droid.+(mi[\s\-_]?(?:pad)(?:[\s_]?[\w\s]+))(?:\sbuild|\))/i],[[MODEL,/_/g," "],[VENDOR,"Xiaomi"],[TYPE,TABLET]],[/droid.+;\s(m[1-5]\snote)\sbuild/i],[MODEL,[VENDOR,"Meizu"],[TYPE,MOBILE]],[/(mz)-([\w-]{2,})/i],[[VENDOR,"Meizu"],MODEL,[TYPE,MOBILE]],[/droid.+a000(1)\s+build/i,/droid.+oneplus\s(a\d{4})[\s)]/i],[MODEL,[VENDOR,"OnePlus"],[TYPE,MOBILE]],[/droid.+[;\/]\s*(RCT[\d\w]+)\s+build/i],[MODEL,[VENDOR,"RCA"],[TYPE,TABLET]],[/droid.+[;\/\s](Venue[\d\s]{2,7})\s+build/i],[MODEL,[VENDOR,"Dell"],[TYPE,TABLET]],[/droid.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[MODEL,[VENDOR,"Verizon"],[TYPE,TABLET]],[/droid.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(\S(?:.*\S)?)\s+build/i],[[VENDOR,"Barnes & Noble"],MODEL,[TYPE,TABLET]],[/droid.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[MODEL,[VENDOR,"NuVision"],[TYPE,TABLET]],[/droid.+;\s(k88)\sbuild/i],[MODEL,[VENDOR,"ZTE"],[TYPE,TABLET]],[/droid.+;\s(nx\d{3}j)\sbuild/i],[MODEL,[VENDOR,"ZTE"],[TYPE,MOBILE]],[/droid.+[;\/]\s*(gen\d{3})\s+build.*49h/i],[MODEL,[VENDOR,"Swiss"],[TYPE,MOBILE]],[/droid.+[;\/]\s*(zur\d{3})\s+build/i],[MODEL,[VENDOR,"Swiss"],[TYPE,TABLET]],[/droid.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[MODEL,[VENDOR,"Zeki"],[TYPE,TABLET]],[/(android).+[;\/]\s+([YR]\d{2})\s+build/i,/droid.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(\w{5})\sbuild/i],[[VENDOR,"Dragon Touch"],MODEL,[TYPE,TABLET]],[/droid.+[;\/]\s*(NS-?\w{0,9})\sbuild/i],[MODEL,[VENDOR,"Insignia"],[TYPE,TABLET]],[/droid.+[;\/]\s*((NXA|Next)-?\w{0,9})\s+build/i],[MODEL,[VENDOR,"NextBook"],[TYPE,TABLET]],[/droid.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i],[[VENDOR,"Voice"],MODEL,[TYPE,MOBILE]],[/droid.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i],[[VENDOR,"LvTel"],MODEL,[TYPE,MOBILE]],[/droid.+;\s(PH-1)\s/i],[MODEL,[VENDOR,"Essential"],[TYPE,MOBILE]],[/droid.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i],[MODEL,[VENDOR,"Envizen"],[TYPE,TABLET]],[/droid.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i],[VENDOR,MODEL,[TYPE,TABLET]],[/droid.+[;\/]\s*(Trio[\s\w\-\.]+)\s+build/i],[MODEL,[VENDOR,"MachSpeed"],[TYPE,TABLET]],[/droid.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[VENDOR,MODEL,[TYPE,TABLET]],[/droid.+[;\/]\s*TU_(1491)\s+build/i],[MODEL,[VENDOR,"Rotor"],[TYPE,TABLET]],[/droid.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i],[VENDOR,MODEL,[TYPE,TABLET]],[/[\s\/\(](android\stv|smart-?tv)[;\)\s]/i],[[TYPE,SMARTTV]],[/droid .+?; ([^;]+?)(?: build|\) applewebkit).+? mobile safari/i],[MODEL,[TYPE,MOBILE]],[/droid .+?;\s([^;]+?)(?: build|\) applewebkit).+?(?! mobile) safari/i],[MODEL,[TYPE,TABLET]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[TYPE,util.lowerize],VENDOR,MODEL],[/(android[\w\.\s\-]{0,9});.+build/i],[MODEL,[VENDOR,"Generic"]],[/(phone)/i],[[TYPE,MOBILE]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[VERSION,[NAME,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[VERSION,[NAME,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[NAME,VERSION],[/rv\:([\w\.]{1,9}).+(gecko)/i],[VERSION,NAME]],os:[[/(xbox);\s+xbox\s([^\);]+)/i,/microsoft\s(windows)\s(vista|xp)/i],[NAME,VERSION],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[NAME,[VERSION,mapper.str,maps.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[NAME,"Windows"],[VERSION,mapper.str,maps.os.windows.version]],[/\((bb)(10);/i],[[NAME,"BlackBerry"],VERSION],[/(blackberry)\w*\/?([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i],[NAME,VERSION],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]*)/i],[[NAME,"Symbian"],VERSION],[/\((series40);/i],[NAME],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[NAME,"Firefox OS"],VERSION],[/crkey\/([\d\.]+)/i],[VERSION,[NAME,"Chromecast"]],[/(nintendo|playstation)\s([wids345portablevuch]+)/i,/(mint)[\/\s\(]?(\w*)/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|(?=\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?(?!chrom)([\w\.-]*)/i,/(hurd|linux)\s?([\w\.]*)/i,/(gnu)\s?([\w\.]*)/i],[NAME,VERSION],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[NAME,"Chromium OS"],VERSION],[/(sunos)\s?([\w\.\d]*)/i],[[NAME,"Solaris"],VERSION],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]*)/i],[NAME,VERSION],[/(haiku)\s(\w+)/i],[NAME,VERSION],[/cfnetwork\/.+darwin/i,/ip[honead]{2,4}(?:.*os\s([\w]+)\slike\smac|;\sopera)/i],[[VERSION,/_/g,"."],[NAME,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)/i],[[NAME,"Mac OS"],[VERSION,/_/g,"."]],[/((?:open)?solaris)[\/\s-]?([\w\.]*)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.])*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms|fuchsia)/i,/(unix)\s?([\w\.]*)/i],[NAME,VERSION]]};var UAParser=function(uastring,extensions){if(typeof uastring==="object"){extensions=uastring;uastring=undefined}if(!(this instanceof UAParser)){return new UAParser(uastring,extensions).getResult()}var ua=uastring||(typeof window!=="undefined"&&window.navigator&&window.navigator.userAgent?window.navigator.userAgent:EMPTY);var rgxmap=extensions?util.extend(regexes,extensions):regexes;this.getBrowser=function(){var browser={name:undefined,version:undefined};mapper.rgx.call(browser,ua,rgxmap.browser);browser.major=util.major(browser.version);return browser};this.getCPU=function(){var cpu={architecture:undefined};mapper.rgx.call(cpu,ua,rgxmap.cpu);return cpu};this.getDevice=function(){var device={vendor:undefined,model:undefined,type:undefined};mapper.rgx.call(device,ua,rgxmap.device);return device};this.getEngine=function(){var engine={name:undefined,version:undefined};mapper.rgx.call(engine,ua,rgxmap.engine);return engine};this.getOS=function(){var os={name:undefined,version:undefined};mapper.rgx.call(os,ua,rgxmap.os);return os};this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}};this.getUA=function(){return ua};this.setUA=function(uastring){ua=uastring;return this};return this};UAParser.VERSION=LIBVERSION;UAParser.BROWSER={NAME:NAME,MAJOR:MAJOR,VERSION:VERSION};UAParser.CPU={ARCHITECTURE:ARCHITECTURE};UAParser.DEVICE={MODEL:MODEL,VENDOR:VENDOR,TYPE:TYPE,CONSOLE:CONSOLE,MOBILE:MOBILE,SMARTTV:SMARTTV,TABLET:TABLET,WEARABLE:WEARABLE,EMBEDDED:EMBEDDED};UAParser.ENGINE={NAME:NAME,VERSION:VERSION};UAParser.OS={NAME:NAME,VERSION:VERSION};if(typeof exports!==UNDEF_TYPE){if(typeof module!==UNDEF_TYPE&&module.exports){exports=module.exports=UAParser}exports.UAParser=UAParser}else{if(typeof define==="function"&&define.amd){define(function(){return UAParser})}else if(typeof window!=="undefined"){window.UAParser=UAParser}}var $=typeof window!=="undefined"&&(window.jQuery||window.Zepto);if($&&!$.ua){var parser=new UAParser;$.ua=parser.getResult();$.ua.get=function(){return parser.getUA()};$.ua.set=function(uastring){parser.setUA(uastring);var result=parser.getResult();for(var prop in result){$.ua[prop]=result[prop]}}}})(typeof window==="object"?window:this); | ||
(function(window,undefined){"use strict";var LIBVERSION="0.7.26",EMPTY="",UNKNOWN="?",FUNC_TYPE="function",UNDEF_TYPE="undefined",OBJ_TYPE="object",STR_TYPE="string",MAJOR="major",MODEL="model",NAME="name",TYPE="type",VENDOR="vendor",VERSION="version",ARCHITECTURE="architecture",CONSOLE="console",MOBILE="mobile",TABLET="tablet",SMARTTV="smarttv",WEARABLE="wearable",EMBEDDED="embedded",UA_MAX_LENGTH=255;var util={extend:function(regexes,extensions){var mergedRegexes={};for(var i in regexes){if(extensions[i]&&extensions[i].length%2===0){mergedRegexes[i]=extensions[i].concat(regexes[i])}else{mergedRegexes[i]=regexes[i]}}return mergedRegexes},has:function(str1,str2){return typeof str1===STR_TYPE?str2.toLowerCase().indexOf(str1.toLowerCase())!==-1:false},lowerize:function(str){return str.toLowerCase()},major:function(version){return typeof version===STR_TYPE?version.replace(/[^\d\.]/g,"").split(".")[0]:undefined},trim:function(str,len){str=str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");return typeof len===UNDEF_TYPE?str:str.substring(0,UA_MAX_LENGTH)}};var mapper={rgx:function(ua,arrays){var i=0,j,k,p,q,matches,match;while(i<arrays.length&&!matches){var regex=arrays[i],props=arrays[i+1];j=k=0;while(j<regex.length&&!matches){matches=regex[j++].exec(ua);if(!!matches){for(p=0;p<props.length;p++){match=matches[++k];q=props[p];if(typeof q===OBJ_TYPE&&q.length>0){if(q.length==2){if(typeof q[1]==FUNC_TYPE){this[q[0]]=q[1].call(this,match)}else{this[q[0]]=q[1]}}else if(q.length==3){if(typeof q[1]===FUNC_TYPE&&!(q[1].exec&&q[1].test)){this[q[0]]=match?q[1].call(this,match,q[2]):undefined}else{this[q[0]]=match?match.replace(q[1],q[2]):undefined}}else if(q.length==4){this[q[0]]=match?q[3].call(this,match.replace(q[1],q[2])):undefined}}else{this[q]=match?match:undefined}}}}i+=2}},str:function(str,map){for(var i in map){if(typeof map[i]===OBJ_TYPE&&map[i].length>0){for(var j=0;j<map[i].length;j++){if(util.has(map[i][j],str)){return i===UNKNOWN?undefined:i}}}else if(util.has(map[i],str)){return i===UNKNOWN?undefined:i}}return str}};var maps={browser:{oldSafari:{version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}},oldEdge:{version:{.1:"12.",21:"13.",31:"14.",39:"15.",41:"16.",42:"17.",44:"18."}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"}}}};var regexes={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[VERSION,[NAME,"Chrome"]],[/(?:edgios|edga|edg)\/([\w\.]+)/i],[VERSION,[NAME,"Edge"]],[/edge\/([\w\.]+)/i],[[VERSION,mapper.str,maps.browser.oldEdge.version],[NAME,"Edge"]],[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]{3,6})\b.+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[NAME,VERSION],[/opios[\/\s]+([\w\.]+)/i],[VERSION,[NAME,"Opera Mini"]],[/\sopr\/([\w\.]+)/i],[VERSION,[NAME,"Opera"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|instagram)[\/\s]?([\w\.]*)/i,/(avant\s|iemobile|slim)(?:browser)?[\/\s]?([\w\.]*)/i,/(ba?idubrowser)[\/\s]?([\w\.]+)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon)\/([\w\.-]+)/i,/(rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([\w\.]+)/i,/(weibo)__([\d\.]+)/i],[NAME,VERSION],[/(?:[\s\/]uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[VERSION,[NAME,"UCBrowser"]],[/(?:windowswechat)?\sqbcore\/([\w\.]+)\b.*(?:windowswechat)?/i],[VERSION,[NAME,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[VERSION,[NAME,"WeChat"]],[/konqueror\/([\w\.]+)/i],[VERSION,[NAME,"Konqueror"]],[/trident.+rv[:\s]([\w\.]{1,9})\b.+like\sgecko/i],[VERSION,[NAME,"IE"]],[/yabrowser\/([\w\.]+)/i],[VERSION,[NAME,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[NAME,/(.+)/,"$1 Secure Browser"],VERSION],[/focus\/([\w\.]+)/i],[VERSION,[NAME,"Firefox Focus"]],[/opt\/([\w\.]+)/i],[VERSION,[NAME,"Opera Touch"]],[/coc_coc_browser\/([\w\.]+)/i],[VERSION,[NAME,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[VERSION,[NAME,"Dolphin"]],[/coast\/([\w\.]+)/i],[VERSION,[NAME,"Opera Coast"]],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[VERSION,[NAME,"MIUI Browser"]],[/fxios\/([\w\.-]+)/i],[VERSION,[NAME,"Firefox"]],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[NAME,"360 Browser"]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[NAME,/(.+)/,"$1 Browser"],VERSION],[/(comodo_dragon)\/([\w\.]+)/i],[[NAME,/_/g," "],VERSION],[/m?(qqbrowser|baiduboxapp|2345Explorer)[\/\s]?([\w\.]+)/i],[NAME,VERSION],[/(MetaSr)[\/\s]?([\w\.]+)/i,/(LBBROWSER)/i],[NAME],[/;fbav\/([\w\.]+);/i],[VERSION,[NAME,"Facebook"]],[/FBAN\/FBIOS|FB_IAB\/FB4A/i],[[NAME,"Facebook"]],[/\s(electron)\/([\w\.]+)\ssafari/i,/safari\s(line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i],[NAME,VERSION],[/\bgsa\/([\w\.]+)\s.*safari\//i],[VERSION,[NAME,"GSA"]],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[VERSION,[NAME,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[NAME,"Chrome WebView"],VERSION],[/droid.+\sversion\/([\w\.]+)\b.+(?:mobile\ssafari|safari)/i],[VERSION,[NAME,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[NAME,VERSION],[/version\/([\w\.]+)\s.*mobile\/\w+\s(safari)/i],[VERSION,[NAME,"Mobile Safari"]],[/version\/([\w\.]+)\s.*(mobile\s?safari|safari)/i],[VERSION,NAME],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[NAME,[VERSION,mapper.str,maps.browser.oldSafari.version]],[/(webkit|khtml)\/([\w\.]+)/i],[NAME,VERSION],[/(navigator|netscape)\/([\w\.-]+)/i],[[NAME,"Netscape"],VERSION],[/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([\w\.-]+)$/i,/(firefox)\/([\w\.]+)\s[\w\s\-]+\/[\w\.]+$/i,/(mozilla)\/([\w\.]+)\s.+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]*)/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[NAME,VERSION]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[[ARCHITECTURE,"amd64"]],[/(ia32(?=;))/i],[[ARCHITECTURE,util.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[ARCHITECTURE,"ia32"]],[/\b(aarch64|armv?8e?l?)\b/i],[[ARCHITECTURE,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[ARCHITECTURE,"armhf"]],[/windows\s(ce|mobile);\sppc;/i],[[ARCHITECTURE,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[[ARCHITECTURE,/ower/,"",util.lowerize]],[/(sun4\w)[;\)]/i],[[ARCHITECTURE,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?:64|(?=v(?:[1-7]|[5-7]1)l?|;|eabi))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[ARCHITECTURE,util.lowerize]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-p(?:605|610|587)|sm-t\w+|gt-p\d{4}|gt-n\d+|sgh-t8[56]9|nexus\s10)/i],[MODEL,[VENDOR,"Samsung"],[TYPE,TABLET]],[/(s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+)/i,/\ssamsung[\s-]([\w-]+)/i,/sec-(sgh\w+)/i],[MODEL,[VENDOR,"Samsung"],[TYPE,MOBILE]],[/\((ip(?:hone|od)[\s\w]*);/i],[MODEL,[VENDOR,"Apple"],[TYPE,MOBILE]],[/\((ipad);[\w\s\),;-]+(apple)/i],[MODEL,VENDOR,[TYPE,TABLET]],[/applecoremedia\/[\w\.]+\s\((ipad)/i],[MODEL,[VENDOR,"Apple"],[TYPE,TABLET]],[/d\/huawei([\w\s-]+)[;\)]/i,/\b(nexus\s6p|vog-[at]?l\d\d|ane-[at]?l[x\d]\d|eml-a?l\d\da?|lya-[at]?l\d[\dc]|clt-a?l\d\di?|ele-l\d\d)/i,/\b(\w{2,4}-[atu][ln][01259][019])[;\)\s]/i],[MODEL,[VENDOR,"Huawei"],[TYPE,MOBILE]],[/\b(bah2?-a?[lw]\d{2})/i],[MODEL,[VENDOR,"Huawei"],[TYPE,TABLET]],[/\b(poco[\s\w]+)(?:\sbuild|\))/i,/\b;\s(\w+)\s+build\/hm\1/i,/\b(hm[\s\-_]?note?[\s_]?(?:\d\w)?)\sbuild/i,/\b(redmi[\s\-_]?(?:note|k)?[\w\s_]+)(?:\sbuild|\))/i,/\b(mi[\s\-_]?(?:a\d|one|one[\s_]plus|note lte)?[\s_]?(?:\d?\w?)[\s_]?(?:plus)?)\sbuild/i],[[MODEL,/_/g," "],[VENDOR,"Xiaomi"],[TYPE,MOBILE]],[/\b(mi[\s\-_]?(?:pad)(?:[\w\s_]+))(?:\sbuild|\))/i],[[MODEL,/_/g," "],[VENDOR,"Xiaomi"],[TYPE,TABLET]],[/;\s(\w+)\sbuild.+\soppo/i,/\s(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007)\b/i],[MODEL,[VENDOR,"OPPO"],[TYPE,MOBILE]],[/\svivo\s(\w+)(?:\sbuild|\))/i,/\s(v[12]\d{3}\w?[at])(?:\sbuild|;)/i],[MODEL,[VENDOR,"Vivo"],[TYPE,MOBILE]],[/\s(rmx[12]\d{3})(?:\sbuild|;)/i],[MODEL,[VENDOR,"Realme"],[TYPE,MOBILE]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)\b[\w\s]+build\//i,/\smot[\s-](\w*)/i,/(moto[\s\w\(\)]+(?=\sbuild|\)))/i,/(xt\d{3,4})\sbuild\//i,/(nexus\s6)/i],[MODEL,[VENDOR,"Motorola"],[TYPE,MOBILE]],[/\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[MODEL,[VENDOR,"Motorola"],[TYPE,TABLET]],[/((?=lg)?[vl]k\-?\d{3})\s+build|\s3\.[\s\w;-]{10}lg?-([06cv9]{3,4})/i],[MODEL,[VENDOR,"LG"],[TYPE,TABLET]],[/(nexus\s[45])/i,/lg[e;\s\/-]+((?!browser|netcast)\w+)/i,/\blg(\-?[\d\w]+)\s+build/i],[MODEL,[VENDOR,"LG"],[TYPE,MOBILE]],[/(ideatab[\w\-\s]+)/i,/lenovo\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+)|[\w-]+)/i],[MODEL,[VENDOR,"Lenovo"],[TYPE,TABLET]],[/(?:maemo|nokia).*(n900|lumia\s\d+)/i,/nokia[\s_-]?([\w\.-]*)/i],[MODEL,[VENDOR,"Nokia"],[TYPE,MOBILE]],[/droid.+;\s(pixel\sc)[\s)]/i],[MODEL,[VENDOR,"Google"],[TYPE,TABLET]],[/droid.+;\s(pixel[\s\daxl]{0,6})(?:\sbuild|\))/i],[MODEL,[VENDOR,"Google"],[TYPE,MOBILE]],[/droid.+\s([c-g]\d{4}|so[-l]\w+|xq-a\w[4-7][12])(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[MODEL,[VENDOR,"Sony"],[TYPE,MOBILE]],[/sony\stablet\s[ps]\sbuild\//i,/(?:sony)?sgp\w+(?:\sbuild\/|\))/i],[[MODEL,"Xperia Tablet"],[VENDOR,"Sony"],[TYPE,TABLET]],[/\s(kb2005|in20[12]5|be20[12][59])\b/i,/\ba000(1)\s+build/i,/\boneplus\s(a\d{4})[\s)]/i],[MODEL,[VENDOR,"OnePlus"],[TYPE,MOBILE]],[/(alexa)webm/i,/(kf[a-z]+)(\sbuild\/|\)).+silk\//i],[MODEL,[VENDOR,"Amazon"],[TYPE,TABLET]],[/(sd|kf)[0349hijorstuw]+(\sbuild\/|\)).+silk\//i],[[MODEL,"Fire Phone"],[VENDOR,"Amazon"],[TYPE,MOBILE]],[/\((playbook);[\w\s\),;-]+(rim)/i],[MODEL,VENDOR,[TYPE,TABLET]],[/\(bb10;\s(\w+)/i],[MODEL,[VENDOR,"BlackBerry"],[TYPE,MOBILE]],[/\b(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus\s7|padfone|p00c)/i],[MODEL,[VENDOR,"ASUS"],[TYPE,TABLET]],[/\s(z[es]6[027][01][km][ls]|zenfone\s\d\w?)\b/i],[MODEL,[VENDOR,"ASUS"],[TYPE,MOBILE]],[/(nexus\s9)/i],[MODEL,[VENDOR,"HTC"],[TYPE,TABLET]],[/(htc)[;_\s-]{1,2}([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[VENDOR,[MODEL,/_/g," "],[TYPE,MOBILE]],[/droid[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[MODEL,[VENDOR,"Acer"],[TYPE,TABLET]],[/droid.+;\s(m[1-5]\snote)\sbuild/i,/\bmz-([\w-]{2,})/i],[MODEL,[VENDOR,"Meizu"],[TYPE,MOBILE]],[/(blackberry)[\s-]?(\w+)/i,/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i,/(microsoft);\s(lumia[\s\w]+)/i,/(lenovo)[_\s-]?([\w-]+)/i,/linux;.+(jolla);/i,/droid.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[VENDOR,MODEL,[TYPE,MOBILE]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad)/i,/(hp).+(tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i,/[;\/]\s?(le[\s\-]+pan)[\s\-]+(\w{1,9})\sbuild/i,/[;\/]\s?(trinity)[\-\s]*(t\d{3})\sbuild/i,/\b(gigaset)[\s\-]+(q\w{1,9})\sbuild/i,/\b(vodafone)\s([\w\s]+)(?:\)|\sbuild)/i],[VENDOR,MODEL,[TYPE,TABLET]],[/\s(surface\sduo)\s/i],[MODEL,[VENDOR,"Microsoft"],[TYPE,TABLET]],[/\s(u304aa)\sbuild/i],[MODEL,[VENDOR,"AT&T"],[TYPE,MOBILE]],[/sie-(\w*)/i],[MODEL,[VENDOR,"Siemens"],[TYPE,MOBILE]],[/[;\/]\s?(rct\w+)\sbuild/i],[MODEL,[VENDOR,"RCA"],[TYPE,TABLET]],[/[;\/\s](venue[\d\s]{2,7})\sbuild/i],[MODEL,[VENDOR,"Dell"],[TYPE,TABLET]],[/[;\/]\s?(q(?:mv|ta)\w+)\sbuild/i],[MODEL,[VENDOR,"Verizon"],[TYPE,TABLET]],[/[;\/]\s(?:barnes[&\s]+noble\s|bn[rt])([\w\s\+]*)\sbuild/i],[MODEL,[VENDOR,"Barnes & Noble"],[TYPE,TABLET]],[/[;\/]\s(tm\d{3}\w+)\sbuild/i],[MODEL,[VENDOR,"NuVision"],[TYPE,TABLET]],[/;\s(k88)\sbuild/i],[MODEL,[VENDOR,"ZTE"],[TYPE,TABLET]],[/;\s(nx\d{3}j)\sbuild/i],[MODEL,[VENDOR,"ZTE"],[TYPE,MOBILE]],[/[;\/]\s?(gen\d{3})\sbuild.*49h/i],[MODEL,[VENDOR,"Swiss"],[TYPE,MOBILE]],[/[;\/]\s?(zur\d{3})\sbuild/i],[MODEL,[VENDOR,"Swiss"],[TYPE,TABLET]],[/[;\/]\s?((zeki)?tb.*\b)\sbuild/i],[MODEL,[VENDOR,"Zeki"],[TYPE,TABLET]],[/[;\/]\s([yr]\d{2})\sbuild/i,/[;\/]\s(dragon[\-\s]+touch\s|dt)(\w{5})\sbuild/i],[[VENDOR,"Dragon Touch"],MODEL,[TYPE,TABLET]],[/[;\/]\s?(ns-?\w{0,9})\sbuild/i],[MODEL,[VENDOR,"Insignia"],[TYPE,TABLET]],[/[;\/]\s?((nxa|Next)-?\w{0,9})\sbuild/i],[MODEL,[VENDOR,"NextBook"],[TYPE,TABLET]],[/[;\/]\s?(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05]))\sbuild/i],[[VENDOR,"Voice"],MODEL,[TYPE,MOBILE]],[/[;\/]\s?(lvtel\-)?(v1[12])\sbuild/i],[[VENDOR,"LvTel"],MODEL,[TYPE,MOBILE]],[/;\s(ph-1)\s/i],[MODEL,[VENDOR,"Essential"],[TYPE,MOBILE]],[/[;\/]\s?(v(100md|700na|7011|917g).*\b)\sbuild/i],[MODEL,[VENDOR,"Envizen"],[TYPE,TABLET]],[/[;\/]\s?(trio[\s\w\-\.]+)\sbuild/i],[MODEL,[VENDOR,"MachSpeed"],[TYPE,TABLET]],[/[;\/]\s?tu_(1491)\sbuild/i],[MODEL,[VENDOR,"Rotor"],[TYPE,TABLET]],[/(shield[\w\s]+)\sbuild/i],[MODEL,[VENDOR,"Nvidia"],[TYPE,TABLET]],[/(sprint)\s(\w+)/i],[VENDOR,MODEL,[TYPE,MOBILE]],[/(kin\.[onetw]{3})/i],[[MODEL,/\./g," "],[VENDOR,"Microsoft"],[TYPE,MOBILE]],[/droid\s[\d\.]+;\s(cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[MODEL,[VENDOR,"Zebra"],[TYPE,TABLET]],[/droid\s[\d\.]+;\s(ec30|ps20|tc[2-8]\d[kx])\)/i],[MODEL,[VENDOR,"Zebra"],[TYPE,MOBILE]],[/\s(ouya)\s/i,/(nintendo)\s([wids3utch]+)/i],[VENDOR,MODEL,[TYPE,CONSOLE]],[/droid.+;\s(shield)\sbuild/i],[MODEL,[VENDOR,"Nvidia"],[TYPE,CONSOLE]],[/(playstation\s[345portablevi]+)/i],[MODEL,[VENDOR,"Sony"],[TYPE,CONSOLE]],[/[\s\(;](xbox(?:\sone)?(?!;\sxbox))[\s\);]/i],[MODEL,[VENDOR,"Microsoft"],[TYPE,CONSOLE]],[/smart-tv.+(samsung)/i],[VENDOR,[TYPE,SMARTTV],MODEL],[/hbbtv.+maple;(\d+)/i],[[MODEL,/^/,"SmartTV"],[VENDOR,"Samsung"],[TYPE,SMARTTV]],[/linux;\snetcast.+smarttv/i,/lg\snetcast\.tv-201\d/i],[[VENDOR,"LG"],MODEL,[TYPE,SMARTTV]],[/(apple)\s?tv/i],[VENDOR,[MODEL,"Apple TV"],[TYPE,SMARTTV]],[/crkey/i],[[MODEL,"Chromecast"],[VENDOR,"Google"],[TYPE,SMARTTV]],[/droid.+aft([\w])(\sbuild\/|\))/i],[MODEL,[VENDOR,"Amazon"],[TYPE,SMARTTV]],[/\(dtv[\);].+(aquos)/i],[MODEL,[VENDOR,"Sharp"],[TYPE,SMARTTV]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[VENDOR,util.trim],[MODEL,util.trim],[TYPE,SMARTTV]],[/[\s\/\(](android\s|smart[-\s]?|opera\s)tv[;\)\s]/i],[[TYPE,SMARTTV]],[/((pebble))app\/[\d\.]+\s/i],[VENDOR,MODEL,[TYPE,WEARABLE]],[/droid.+;\s(glass)\s\d/i],[MODEL,[VENDOR,"Google"],[TYPE,WEARABLE]],[/droid\s[\d\.]+;\s(wt63?0{2,3})\)/i],[MODEL,[VENDOR,"Zebra"],[TYPE,WEARABLE]],[/droid .+?; ([^;]+?)(?: build|\) applewebkit).+? mobile safari/i],[MODEL,[TYPE,MOBILE]],[/droid .+?;\s([^;]+?)(?: build|\) applewebkit).+?(?! mobile) safari/i],[MODEL,[TYPE,TABLET]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[TYPE,util.lowerize]],[/(android[\w\.\s\-]{0,9});.+build/i],[MODEL,[VENDOR,"Generic"]],[/(phone)/i],[[TYPE,MOBILE]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[VERSION,[NAME,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[VERSION,[NAME,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[NAME,VERSION],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[VERSION,NAME]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[NAME,VERSION],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)(?!.+xbox)/i],[NAME,[VERSION,mapper.str,maps.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[NAME,"Windows"],[VERSION,mapper.str,maps.os.windows.version]],[/ip[honead]{2,4}\b(?:.*os\s([\w]+)\slike\smac|;\sopera)/i,/cfnetwork\/.+darwin/i],[[VERSION,/_/g,"."],[NAME,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)(?!.+haiku)/i],[[NAME,"Mac OS"],[VERSION,/_/g,"."]],[/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i],[NAME,VERSION],[/\(bb(10);/i],[VERSION,[NAME,"BlackBerry"]],[/(?:symbian\s?os|symbos|s60(?=;)|series60)[\/\s-]?([\w\.]*)/i],[VERSION,[NAME,"Symbian"]],[/\((series40);/i],[NAME],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[NAME,"Firefox OS"]],[/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[VERSION,[NAME,"webOS"]],[/crkey\/([\d\.]+)/i],[VERSION,[NAME,"Chromecast"]],[/(nintendo|playstation)\s([wids345portablevuch]+)/i,/(xbox);\s+xbox\s([^\);]+)/i,/(mint)[\/\s\(\)]?(\w*)/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?=\slinux)|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus|raspbian)(?:\sgnu\/linux)?(?:\slinux)?[\/\s-]?(?!chrom|package)([\w\.-]*)/i,/(hurd|linux)\s?([\w\.]*)/i,/(gnu)\s?([\w\.]*)/i],[NAME,VERSION],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[NAME,"Chromium OS"],VERSION],[/(sunos)\s?([\w\.\d]*)/i],[[NAME,"Solaris"],VERSION],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?(?!amd|[ix346]{1,2}86)([\w\.]*)/i],[NAME,VERSION],[/(haiku)\s(\w+)/i],[NAME,VERSION],[/((?:open)?solaris)[\/\s-]?([\w\.]*)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.])*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms|fuchsia)/i,/(unix)\s?([\w\.]*)/i],[NAME,VERSION]]};var UAParser=function(ua,extensions){if(typeof ua==="object"){extensions=ua;ua=undefined}if(!(this instanceof UAParser)){return new UAParser(ua,extensions).getResult()}var _ua=ua||(typeof window!=="undefined"&&window.navigator&&window.navigator.userAgent?window.navigator.userAgent:EMPTY);var _rgxmap=extensions?util.extend(regexes,extensions):regexes;this.getBrowser=function(){var _browser={name:undefined,version:undefined};mapper.rgx.call(_browser,_ua,_rgxmap.browser);_browser.major=util.major(_browser.version);return _browser};this.getCPU=function(){var _cpu={architecture:undefined};mapper.rgx.call(_cpu,_ua,_rgxmap.cpu);return _cpu};this.getDevice=function(){var _device={vendor:undefined,model:undefined,type:undefined};mapper.rgx.call(_device,_ua,_rgxmap.device);return _device};this.getEngine=function(){var _engine={name:undefined,version:undefined};mapper.rgx.call(_engine,_ua,_rgxmap.engine);return _engine};this.getOS=function(){var _os={name:undefined,version:undefined};mapper.rgx.call(_os,_ua,_rgxmap.os);return _os};this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}};this.getUA=function(){return _ua};this.setUA=function(ua){_ua=ua.length>UA_MAX_LENGTH?util.trim(ua,UA_MAX_LENGTH):ua;return this};this.setUA(_ua);return this};UAParser.VERSION=LIBVERSION;UAParser.BROWSER={NAME:NAME,MAJOR:MAJOR,VERSION:VERSION};UAParser.CPU={ARCHITECTURE:ARCHITECTURE};UAParser.DEVICE={MODEL:MODEL,VENDOR:VENDOR,TYPE:TYPE,CONSOLE:CONSOLE,MOBILE:MOBILE,SMARTTV:SMARTTV,TABLET:TABLET,WEARABLE:WEARABLE,EMBEDDED:EMBEDDED};UAParser.ENGINE={NAME:NAME,VERSION:VERSION};UAParser.OS={NAME:NAME,VERSION:VERSION};if(typeof exports!==UNDEF_TYPE){if(typeof module!==UNDEF_TYPE&&module.exports){exports=module.exports=UAParser}exports.UAParser=UAParser}else{if(typeof define==="function"&&define.amd){define(function(){return UAParser})}else if(typeof window!=="undefined"){window.UAParser=UAParser}}var $=typeof window!=="undefined"&&(window.jQuery||window.Zepto);if($&&!$.ua){var parser=new UAParser;$.ua=parser.getResult();$.ua.get=function(){return parser.getUA()};$.ua.set=function(uastring){parser.setUA(uastring);var result=parser.getResult();for(var prop in result){$.ua[prop]=result[prop]}}}})(typeof window==="object"?window:this); |
/*!@license | ||
* UAParser.js v0.7.25 | ||
* UAParser.js v0.7.26 | ||
* Lightweight JavaScript-based User-Agent string parser | ||
@@ -9,2 +9,2 @@ * https://github.com/faisalman/ua-parser-js | ||
*/ | ||
!function(r,u){"use strict";var c="function",i="undefined",b="object",s="model",e="name",o="type",a="vendor",n="version",d="architecture",t="console",w="mobile",l="tablet",m="smarttv",p="wearable",h={extend:function(i,s){var e,o={};for(e in i)s[e]&&s[e].length%2==0?o[e]=s[e].concat(i[e]):o[e]=i[e];return o},has:function(i,s){return"string"==typeof i&&-1!==s.toLowerCase().indexOf(i.toLowerCase())},lowerize:function(i){return i.toLowerCase()},major:function(i){return"string"==typeof i?i.replace(/[^\d\.]/g,"").split(".")[0]:u},trim:function(i){return i.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},g={rgx:function(i,s){for(var e,o,r,a,n,d=0;d<s.length&&!a;){for(var t=s[d],w=s[d+1],l=e=0;l<t.length&&!a;)if(a=t[l++].exec(i))for(o=0;o<w.length;o++)n=a[++e],typeof(r=w[o])==b&&0<r.length?2==r.length?typeof r[1]==c?this[r[0]]=r[1].call(this,n):this[r[0]]=r[1]:3==r.length?typeof r[1]!=c||r[1].exec&&r[1].test?this[r[0]]=n?n.replace(r[1],r[2]):u:this[r[0]]=n?r[1].call(this,n,r[2]):u:4==r.length&&(this[r[0]]=n?r[3].call(this,n.replace(r[1],r[2])):u):this[r]=n||u;d+=2}},str:function(i,s){for(var e in s)if(typeof s[e]==b&&0<s[e].length){for(var o=0;o<s[e].length;o++)if(h.has(s[e][o],i))return"?"===e?u:e}else if(h.has(s[e],i))return"?"===e?u:e;return i}},f={browser:{oldsafari:{version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}}},device:{amazon:{model:{"Fire Phone":["SD","KF"]}},sprint:{model:{"Evo Shift 4G":"7373KT"},vendor:{HTC:"APA",Sprint:"Sprint"}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"}}}},v={browser:[[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]{3,6}).+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[e,n],[/(opios)[\/\s]+([\w\.]+)/i],[[e,"Opera Mini"],n],[/\s(opr)\/([\w\.]+)/i],[[e,"Opera"],n],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|instagram)[\/\s]?([\w\.]*)/i,/(avant\s|iemobile|slim)(?:browser)?[\/\s]?([\w\.]*)/i,/(bidubrowser|baidubrowser)[\/\s]?([\w\.]+)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(rekonq)\/([\w\.]*)/i,/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon)\/([\w\.-]+)/i,/(puffin|brave|whale|qqbrowserlite|qq)\/([\w\.]+)/i],[e,n],[/(konqueror)\/([\w\.]+)/i],[[e,"Konqueror"],n],[/(trident).+rv[:\s]([\w\.]{1,9}).+like\sgecko/i],[[e,"IE"],n],[/(edge|edgios|edga|edg)\/((\d+)?[\w\.]+)/i],[[e,"Edge"],n],[/(yabrowser)\/([\w\.]+)/i],[[e,"Yandex"],n],[/(Avast)\/([\w\.]+)/i],[[e,"Avast Secure Browser"],n],[/(AVG)\/([\w\.]+)/i],[[e,"AVG Secure Browser"],n],[/(focus)\/([\w\.]+)/i],[[e,"Firefox Focus"],n],[/(opt)\/([\w\.]+)/i],[[e,"Opera Touch"],n],[/((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[[e,"UCBrowser"],n],[/(comodo_dragon)\/([\w\.]+)/i],[[e,/_/g," "],n],[/((?:windowswechat)? qbcore)\/([\w\.]+).*(?:windowswechat)?/i],[[e,"WeChat(Win) Desktop"],n],[/(micromessenger)\/([\w\.]+)/i],[[e,"WeChat"],n],[/m?(qqbrowser|baiduboxapp|2345Explorer)[\/\s]?([\w\.]+)/i],[e,n],[/(MetaSr)[\/\s]?([\w\.]+)/i],[e],[/(LBBROWSER)/i],[e],[/(weibo)__([\d\.]+)/i],[e,n],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[n,[e,"MIUI Browser"]],[/;fbav\/([\w\.]+);/i],[n,[e,"Facebook"]],[/FBAN\/FBIOS|FB_IAB\/FB4A/i],[[e,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/droid.+(line)\/([\w\.]+)\/iab/i],[e,n],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[n,[e,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[e,/(.+)/,"$1 WebView"],n],[/((?:oculus|samsung)browser)\/([\w\.]+)/i],[[e,/(.+(?:g|us))(.+)/,"$1 $2"],n],[/droid.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i],[n,[e,"Android Browser"]],[/(coc_coc_browser)\/([\w\.]+)/i],[[e,"Coc Coc"],n],[/(sailfishbrowser)\/([\w\.]+)/i],[[e,"Sailfish Browser"],n],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[e,n],[/(dolfin)\/([\w\.]+)/i],[[e,"Dolphin"],n],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[e,"360 Browser"]],[/((?:android.+)crmo|crios)\/([\w\.]+)/i],[[e,"Chrome"],n],[/(coast)\/([\w\.]+)/i],[[e,"Opera Coast"],n],[/fxios\/([\w\.-]+)/i],[n,[e,"Firefox"]],[/version\/([\w\.]+)\s.*mobile\/\w+\s(safari)/i],[n,[e,"Mobile Safari"]],[/version\/([\w\.]+)\s.*(mobile\s?safari|safari)/i],[n,e],[/webkit.+?(gsa)\/([\w\.]+)\s.*(mobile\s?safari|safari)(\/[\w\.]+)/i],[[e,"GSA"],n],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[e,[n,g.str,f.browser.oldsafari.version]],[/(webkit|khtml)\/([\w\.]+)/i],[e,n],[/(navigator|netscape)\/([\w\.-]+)/i],[[e,"Netscape"],n],[/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([\w\.-]+)$/i,/(firefox)\/([\w\.]+)\s[\w\s\-]+\/[\w\.]+$/i,/(mozilla)\/([\w\.]+)\s.+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]*)/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[e,n]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[[d,"amd64"]],[/(ia32(?=;))/i],[[d,h.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[d,"ia32"]],[/windows\s(ce|mobile);\sppc;/i],[[d,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[[d,/ower/,"",h.lowerize]],[/(sun4\w)[;\)]/i],[[d,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+[;l]))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i],[[d,h.lowerize]]],device:[[/\((ipad|playbook);[\w\s\),;-]+(rim|apple)/i],[s,a,[o,l]],[/applecoremedia\/[\w\.]+ \((ipad)/],[s,[a,"Apple"],[o,l]],[/(apple\s{0,1}tv)/i],[[s,"Apple TV"],[a,"Apple"],[o,m]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad)/i,/(hp).+(tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i],[a,s,[o,l]],[/(alexa)webm/i,/(kf[A-z]+)(\sbuild\/|\)).+silk\//i],[s,[a,"Amazon"],[o,l]],[/(sd|kf)[0349hijorstuw]+(\sbuild\/|\)).+silk\//i],[[s,g.str,f.device.amazon.model],[a,"Amazon"],[o,w]],[/droid.+aft([\w])(\sbuild\/|\))/i],[s,[a,"Amazon"],[o,m]],[/\((ip(?:hone|od)[\s\w]*);/i],[s,[a,"Apple"],[o,w]],[/(blackberry)[\s-]?(\w+)/i,/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i],[a,s,[o,w]],[/\(bb10;\s(\w+)/i],[s,[a,"BlackBerry"],[o,w]],[/droid.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone|p00c)/i],[s,[a,"Asus"],[o,l]],[/sony\stablet\s[ps]\sbuild\//i,/(?:sony)?sgp\w+(?:\sbuild\/|\))/i],[[s,"Xperia Tablet"],[a,"Sony"],[o,l]],[/droid.+\s([c-g]\d{4}|so[-l]\w+|xq-a\w[4-7][12])(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[s,[a,"Sony"],[o,w]],[/\s(ouya)\s/i,/(nintendo)\s([wids3utch]+)/i],[a,s,[o,t]],[/droid.+;\s(shield)\sbuild/i],[s,[a,"Nvidia"],[o,t]],[/(playstation\s[345portablevi]+)/i],[s,[a,"Sony"],[o,t]],[/(sprint\s(\w+))/i],[[a,g.str,f.device.sprint.vendor],[s,g.str,f.device.sprint.model],[o,w]],[/(htc)[;_\s-]{1,2}([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[a,[s,/_/g," "],[o,w]],[/(nexus\s9)/i],[s,[a,"HTC"],[o,l]],[/d\/huawei([\w\s-]+)[;\)]/i,/droid.+\s(nexus\s6p|vog-[at]?l\d\d|ane-[at]?l[x\d]\d|eml-a?l\d\da?|lya-[at]?l\d[\dc]|clt-a?l\d\di?)/i,/droid.+\s((?:A(?:GS2?|KA|LP|N[AE]|QM|RE|SK|TH)|B(?:A(?:C|H2)|G2|KL|LA|MH|Z[AKT])|C(?:AZ|DY|LT|OL|[MOR]R)|DUK|E(?:BG|DI|L[ES]|ML|V[AR])|FRD|G(?:LK|RA)|H(?:D[LN]|MA|LK|RY|WI)|INE|J(?:DN2|MM|NY|SN)|K(?:NT|OB|SA)|L(?:IO|LD|ON|[RY]A)|M(?:AR|ED|[HL]A|ON|RX|T7)|N(?:EO|TS|XT)|OXF|P(?:AR|CT|IC|LK|RA)|R(?:IO|VL)|S(?:C[ML]|EA|HT|PN|TF)|T(?:A[HS]|NY)|V(?:[CI]E|KY|OG|RD)|W(?:AS|LZ)|Y(?:635|AL))-[ATU][LN][01259][019])[;\)\s]/i],[s,[a,"Huawei"],[o,w]],[/droid.+(bah2?-a?[lw]\d{2})/i],[s,[a,"Huawei"],[o,l]],[/(microsoft);\s(lumia[\s\w]+)/i],[a,s,[o,w]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[s,[a,"Microsoft"],[o,t]],[/(kin\.[onetw]{3})/i],[[s,/\./g," "],[a,"Microsoft"],[o,w]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)[\w\s]+build\//i,/\smot[\s-](\w*)/i,/(moto[\s\w\(\)]+(?=\sbuild|\)))/i,/(XT\d{3,4}) build\//i,/(nexus\s6)/i],[s,[a,"Motorola"],[o,w]],[/droid.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[s,[a,"Motorola"],[o,l]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[a,h.trim],[s,h.trim],[o,m]],[/hbbtv.+maple;(\d+)/i],[[s,/^/,"SmartTV"],[a,"Samsung"],[o,m]],[/\(dtv[\);].+(aquos)/i],[s,[a,"Sharp"],[o,m]],[/droid.+((sch-i[89]0\d|shw-m380s|SM-P605|SM-P610|SM-P587|gt-p\d{4}|gt-n\d+|sgh-t8[56]9|nexus 10))/i,/((SM-T\w+))/i],[[a,"Samsung"],s,[o,l]],[/smart-tv.+(samsung)/i],[a,[o,m],s],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,/\s(sam)(?:sung)[\s-]([\w-]+)/i,/sec-((sgh\w+))/i],[[a,"Samsung"],s,[o,w]],[/sie-(\w*)/i],[s,[a,"Siemens"],[o,w]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w\.-]*)/i],[[a,"Nokia"],s,[o,w]],[/droid[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[s,[a,"Acer"],[o,l]],[/droid.+([vl]k\-?\d{3})\s+build/i],[s,[a,"LG"],[o,l]],[/droid\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[a,"LG"],s,[o,l]],[/linux;\snetcast.+smarttv/i,/lg\snetcast\.tv-201\d/i],[[a,"LG"],s,[o,m]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w*)/i,/droid.+lg(\-?[\d\w]+)\s+build/i],[s,[a,"LG"],[o,w]],[/(lenovo)\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+)|[\w-]+)/i],[a,s,[o,l]],[/droid.+(ideatab[a-z0-9\-\s]+)/i],[s,[a,"Lenovo"],[o,l]],[/(lenovo)[_\s-]?([\w-]+)/i],[a,s,[o,w]],[/linux;.+((jolla));/i],[a,s,[o,w]],[/((pebble))app\/[\d\.]+\s/i],[a,s,[o,p]],[/droid.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[a,s,[o,w]],[/crkey/i],[[s,"Chromecast"],[a,"Google"],[o,m]],[/droid.+;\s(glass)\s\d/i],[s,[a,"Google"],[o,p]],[/droid.+;\s(pixel c)[\s)]/i],[s,[a,"Google"],[o,l]],[/droid.+;\s(pixel( [2-9]a?)?( xl)?)[\s)]/i],[s,[a,"Google"],[o,w]],[/droid.+;\s(\w+)\s+build\/hm\1/i,/droid.+(hm[\s\-_]?note?[\s_]?(?:\d\w)?)\sbuild/i,/droid.+(redmi[\s\-_]?(?:note|k)?(?:[\s_]?[\w\s]+))(?:\sbuild|\))/i,/droid.+(mi[\s\-_]?(?:a\d|one|one[\s_]plus|note lte)?[\s_]?(?:\d?\w?)[\s_]?(?:plus)?)\sbuild/i],[[s,/_/g," "],[a,"Xiaomi"],[o,w]],[/droid.+(mi[\s\-_]?(?:pad)(?:[\s_]?[\w\s]+))(?:\sbuild|\))/i],[[s,/_/g," "],[a,"Xiaomi"],[o,l]],[/droid.+;\s(m[1-5]\snote)\sbuild/i],[s,[a,"Meizu"],[o,w]],[/(mz)-([\w-]{2,})/i],[[a,"Meizu"],s,[o,w]],[/droid.+a000(1)\s+build/i,/droid.+oneplus\s(a\d{4})[\s)]/i],[s,[a,"OnePlus"],[o,w]],[/droid.+[;\/]\s*(RCT[\d\w]+)\s+build/i],[s,[a,"RCA"],[o,l]],[/droid.+[;\/\s](Venue[\d\s]{2,7})\s+build/i],[s,[a,"Dell"],[o,l]],[/droid.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i],[s,[a,"Verizon"],[o,l]],[/droid.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(\S(?:.*\S)?)\s+build/i],[[a,"Barnes & Noble"],s,[o,l]],[/droid.+[;\/]\s+(TM\d{3}.*\b)\s+build/i],[s,[a,"NuVision"],[o,l]],[/droid.+;\s(k88)\sbuild/i],[s,[a,"ZTE"],[o,l]],[/droid.+;\s(nx\d{3}j)\sbuild/i],[s,[a,"ZTE"],[o,w]],[/droid.+[;\/]\s*(gen\d{3})\s+build.*49h/i],[s,[a,"Swiss"],[o,w]],[/droid.+[;\/]\s*(zur\d{3})\s+build/i],[s,[a,"Swiss"],[o,l]],[/droid.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i],[s,[a,"Zeki"],[o,l]],[/(android).+[;\/]\s+([YR]\d{2})\s+build/i,/droid.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(\w{5})\sbuild/i],[[a,"Dragon Touch"],s,[o,l]],[/droid.+[;\/]\s*(NS-?\w{0,9})\sbuild/i],[s,[a,"Insignia"],[o,l]],[/droid.+[;\/]\s*((NXA|Next)-?\w{0,9})\s+build/i],[s,[a,"NextBook"],[o,l]],[/droid.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i],[[a,"Voice"],s,[o,w]],[/droid.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i],[[a,"LvTel"],s,[o,w]],[/droid.+;\s(PH-1)\s/i],[s,[a,"Essential"],[o,w]],[/droid.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i],[s,[a,"Envizen"],[o,l]],[/droid.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i],[a,s,[o,l]],[/droid.+[;\/]\s*(Trio[\s\w\-\.]+)\s+build/i],[s,[a,"MachSpeed"],[o,l]],[/droid.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i],[a,s,[o,l]],[/droid.+[;\/]\s*TU_(1491)\s+build/i],[s,[a,"Rotor"],[o,l]],[/droid.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i],[a,s,[o,l]],[/[\s\/\(](android\stv|smart-?tv)[;\)\s]/i],[[o,m]],[/droid .+?; ([^;]+?)(?: build|\) applewebkit).+? mobile safari/i],[s,[o,w]],[/droid .+?;\s([^;]+?)(?: build|\) applewebkit).+?(?! mobile) safari/i],[s,[o,l]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[o,h.lowerize],a,s],[/(android[\w\.\s\-]{0,9});.+build/i],[s,[a,"Generic"]],[/(phone)/i],[[o,w]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[n,[e,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[n,[e,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[e,n],[/rv\:([\w\.]{1,9}).+(gecko)/i],[n,e]],os:[[/(xbox);\s+xbox\s([^\);]+)/i,/microsoft\s(windows)\s(vista|xp)/i],[e,n],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[e,[n,g.str,f.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[e,"Windows"],[n,g.str,f.os.windows.version]],[/\((bb)(10);/i],[[e,"BlackBerry"],n],[/(blackberry)\w*\/?([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i,/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i],[e,n],[/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]*)/i],[[e,"Symbian"],n],[/\((series40);/i],[e],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[e,"Firefox OS"],n],[/crkey\/([\d\.]+)/i],[n,[e,"Chromecast"]],[/(nintendo|playstation)\s([wids345portablevuch]+)/i,/(mint)[\/\s\(]?(\w*)/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|(?=\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?(?!chrom)([\w\.-]*)/i,/(hurd|linux)\s?([\w\.]*)/i,/(gnu)\s?([\w\.]*)/i],[e,n],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[e,"Chromium OS"],n],[/(sunos)\s?([\w\.\d]*)/i],[[e,"Solaris"],n],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]*)/i],[e,n],[/(haiku)\s(\w+)/i],[e,n],[/cfnetwork\/.+darwin/i,/ip[honead]{2,4}(?:.*os\s([\w]+)\slike\smac|;\sopera)/i],[[n,/_/g,"."],[e,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)/i],[[e,"Mac OS"],[n,/_/g,"."]],[/((?:open)?solaris)[\/\s-]?([\w\.]*)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.])*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms|fuchsia)/i,/(unix)\s?([\w\.]*)/i],[e,n]]},x=function(i,s){if("object"==typeof i&&(s=i,i=u),!(this instanceof x))return new x(i,s).getResult();var e=i||(void 0!==r&&r.navigator&&r.navigator.userAgent?r.navigator.userAgent:""),o=s?h.extend(v,s):v;return this.getBrowser=function(){var i={name:u,version:u};return g.rgx.call(i,e,o.browser),i.major=h.major(i.version),i},this.getCPU=function(){var i={architecture:u};return g.rgx.call(i,e,o.cpu),i},this.getDevice=function(){var i={vendor:u,model:u,type:u};return g.rgx.call(i,e,o.device),i},this.getEngine=function(){var i={name:u,version:u};return g.rgx.call(i,e,o.engine),i},this.getOS=function(){var i={name:u,version:u};return g.rgx.call(i,e,o.os),i},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return e},this.setUA=function(i){return e=i,this},this};x.VERSION="0.7.25",x.BROWSER={NAME:e,MAJOR:"major",VERSION:n},x.CPU={ARCHITECTURE:d},x.DEVICE={MODEL:s,VENDOR:a,TYPE:o,CONSOLE:t,MOBILE:w,SMARTTV:m,TABLET:l,WEARABLE:p,EMBEDDED:"embedded"},x.ENGINE={NAME:e,VERSION:n},x.OS={NAME:e,VERSION:n},typeof exports!=i?(typeof module!=i&&module.exports&&(exports=module.exports=x),exports.UAParser=x):"function"==typeof define&&define.amd?define(function(){return x}):void 0!==r&&(r.UAParser=x);var k,A=void 0!==r&&(r.jQuery||r.Zepto);A&&!A.ua&&(k=new x,A.ua=k.getResult(),A.ua.get=function(){return k.getUA()},A.ua.set=function(i){k.setUA(i);var s,e=k.getResult();for(s in e)A.ua[s]=e[s]})}("object"==typeof window?window:this); | ||
!function(r,b){"use strict";var u="function",e="undefined",c="object",o="string",i="model",s="name",a="type",n="vendor",t="version",l="architecture",w="console",d="mobile",m="tablet",p="smarttv",h="wearable",g={extend:function(i,s){var e,o={};for(e in i)s[e]&&s[e].length%2==0?o[e]=s[e].concat(i[e]):o[e]=i[e];return o},has:function(i,s){return typeof i==o&&-1!==s.toLowerCase().indexOf(i.toLowerCase())},lowerize:function(i){return i.toLowerCase()},major:function(i){return typeof i==o?i.replace(/[^\d\.]/g,"").split(".")[0]:b},trim:function(i,s){return i=i.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),typeof s==e?i:i.substring(0,255)}},f={rgx:function(i,s){for(var e,o,r,a,n,t=0;t<s.length&&!a;){for(var l=s[t],w=s[t+1],d=e=0;d<l.length&&!a;)if(a=l[d++].exec(i))for(o=0;o<w.length;o++)n=a[++e],typeof(r=w[o])==c&&0<r.length?2==r.length?typeof r[1]==u?this[r[0]]=r[1].call(this,n):this[r[0]]=r[1]:3==r.length?typeof r[1]!=u||r[1].exec&&r[1].test?this[r[0]]=n?n.replace(r[1],r[2]):b:this[r[0]]=n?r[1].call(this,n,r[2]):b:4==r.length&&(this[r[0]]=n?r[3].call(this,n.replace(r[1],r[2])):b):this[r]=n||b;t+=2}},str:function(i,s){for(var e in s)if(typeof s[e]==c&&0<s[e].length){for(var o=0;o<s[e].length;o++)if(g.has(s[e][o],i))return"?"===e?b:e}else if(g.has(s[e],i))return"?"===e?b:e;return i}},v={browser:{oldSafari:{version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}},oldEdge:{version:{.1:"12.",21:"13.",31:"14.",39:"15.",41:"16.",42:"17.",44:"18."}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"}}}},x={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[t,[s,"Chrome"]],[/(?:edgios|edga|edg)\/([\w\.]+)/i],[t,[s,"Edge"]],[/edge\/([\w\.]+)/i],[[t,f.str,v.browser.oldEdge.version],[s,"Edge"]],[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]{3,6})\b.+version\/([\w\.-]+)/i,/(opera).+version\/([\w\.]+)/i,/(opera)[\/\s]+([\w\.]+)/i],[s,t],[/opios[\/\s]+([\w\.]+)/i],[t,[s,"Opera Mini"]],[/\sopr\/([\w\.]+)/i],[t,[s,"Opera"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|instagram)[\/\s]?([\w\.]*)/i,/(avant\s|iemobile|slim)(?:browser)?[\/\s]?([\w\.]*)/i,/(ba?idubrowser)[\/\s]?([\w\.]+)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon)\/([\w\.-]+)/i,/(rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([\w\.]+)/i,/(weibo)__([\d\.]+)/i],[s,t],[/(?:[\s\/]uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[t,[s,"UCBrowser"]],[/(?:windowswechat)?\sqbcore\/([\w\.]+)\b.*(?:windowswechat)?/i],[t,[s,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[t,[s,"WeChat"]],[/konqueror\/([\w\.]+)/i],[t,[s,"Konqueror"]],[/trident.+rv[:\s]([\w\.]{1,9})\b.+like\sgecko/i],[t,[s,"IE"]],[/yabrowser\/([\w\.]+)/i],[t,[s,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[s,/(.+)/,"$1 Secure Browser"],t],[/focus\/([\w\.]+)/i],[t,[s,"Firefox Focus"]],[/opt\/([\w\.]+)/i],[t,[s,"Opera Touch"]],[/coc_coc_browser\/([\w\.]+)/i],[t,[s,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[t,[s,"Dolphin"]],[/coast\/([\w\.]+)/i],[t,[s,"Opera Coast"]],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[t,[s,"MIUI Browser"]],[/fxios\/([\w\.-]+)/i],[t,[s,"Firefox"]],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[s,"360 Browser"]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[s,/(.+)/,"$1 Browser"],t],[/(comodo_dragon)\/([\w\.]+)/i],[[s,/_/g," "],t],[/m?(qqbrowser|baiduboxapp|2345Explorer)[\/\s]?([\w\.]+)/i],[s,t],[/(MetaSr)[\/\s]?([\w\.]+)/i,/(LBBROWSER)/i],[s],[/;fbav\/([\w\.]+);/i],[t,[s,"Facebook"]],[/FBAN\/FBIOS|FB_IAB\/FB4A/i],[[s,"Facebook"]],[/\s(electron)\/([\w\.]+)\ssafari/i,/safari\s(line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i],[s,t],[/\bgsa\/([\w\.]+)\s.*safari\//i],[t,[s,"GSA"]],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[t,[s,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[s,"Chrome WebView"],t],[/droid.+\sversion\/([\w\.]+)\b.+(?:mobile\ssafari|safari)/i],[t,[s,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[s,t],[/version\/([\w\.]+)\s.*mobile\/\w+\s(safari)/i],[t,[s,"Mobile Safari"]],[/version\/([\w\.]+)\s.*(mobile\s?safari|safari)/i],[t,s],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[s,[t,f.str,v.browser.oldSafari.version]],[/(webkit|khtml)\/([\w\.]+)/i],[s,t],[/(navigator|netscape)\/([\w\.-]+)/i],[[s,"Netscape"],t],[/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([\w\.-]+)$/i,/(firefox)\/([\w\.]+)\s[\w\s\-]+\/[\w\.]+$/i,/(mozilla)\/([\w\.]+)\s.+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]*)/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[s,t]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[[l,"amd64"]],[/(ia32(?=;))/i],[[l,g.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[l,"ia32"]],[/\b(aarch64|armv?8e?l?)\b/i],[[l,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[l,"armhf"]],[/windows\s(ce|mobile);\sppc;/i],[[l,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[[l,/ower/,"",g.lowerize]],[/(sun4\w)[;\)]/i],[[l,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?:64|(?=v(?:[1-7]|[5-7]1)l?|;|eabi))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[l,g.lowerize]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-p(?:605|610|587)|sm-t\w+|gt-p\d{4}|gt-n\d+|sgh-t8[56]9|nexus\s10)/i],[i,[n,"Samsung"],[a,m]],[/(s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+)/i,/\ssamsung[\s-]([\w-]+)/i,/sec-(sgh\w+)/i],[i,[n,"Samsung"],[a,d]],[/\((ip(?:hone|od)[\s\w]*);/i],[i,[n,"Apple"],[a,d]],[/\((ipad);[\w\s\),;-]+(apple)/i],[i,n,[a,m]],[/applecoremedia\/[\w\.]+\s\((ipad)/i],[i,[n,"Apple"],[a,m]],[/d\/huawei([\w\s-]+)[;\)]/i,/\b(nexus\s6p|vog-[at]?l\d\d|ane-[at]?l[x\d]\d|eml-a?l\d\da?|lya-[at]?l\d[\dc]|clt-a?l\d\di?|ele-l\d\d)/i,/\b(\w{2,4}-[atu][ln][01259][019])[;\)\s]/i],[i,[n,"Huawei"],[a,d]],[/\b(bah2?-a?[lw]\d{2})/i],[i,[n,"Huawei"],[a,m]],[/\b(poco[\s\w]+)(?:\sbuild|\))/i,/\b;\s(\w+)\s+build\/hm\1/i,/\b(hm[\s\-_]?note?[\s_]?(?:\d\w)?)\sbuild/i,/\b(redmi[\s\-_]?(?:note|k)?[\w\s_]+)(?:\sbuild|\))/i,/\b(mi[\s\-_]?(?:a\d|one|one[\s_]plus|note lte)?[\s_]?(?:\d?\w?)[\s_]?(?:plus)?)\sbuild/i],[[i,/_/g," "],[n,"Xiaomi"],[a,d]],[/\b(mi[\s\-_]?(?:pad)(?:[\w\s_]+))(?:\sbuild|\))/i],[[i,/_/g," "],[n,"Xiaomi"],[a,m]],[/;\s(\w+)\sbuild.+\soppo/i,/\s(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007)\b/i],[i,[n,"OPPO"],[a,d]],[/\svivo\s(\w+)(?:\sbuild|\))/i,/\s(v[12]\d{3}\w?[at])(?:\sbuild|;)/i],[i,[n,"Vivo"],[a,d]],[/\s(rmx[12]\d{3})(?:\sbuild|;)/i],[i,[n,"Realme"],[a,d]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)\b[\w\s]+build\//i,/\smot[\s-](\w*)/i,/(moto[\s\w\(\)]+(?=\sbuild|\)))/i,/(xt\d{3,4})\sbuild\//i,/(nexus\s6)/i],[i,[n,"Motorola"],[a,d]],[/\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[i,[n,"Motorola"],[a,m]],[/((?=lg)?[vl]k\-?\d{3})\s+build|\s3\.[\s\w;-]{10}lg?-([06cv9]{3,4})/i],[i,[n,"LG"],[a,m]],[/(nexus\s[45])/i,/lg[e;\s\/-]+((?!browser|netcast)\w+)/i,/\blg(\-?[\d\w]+)\s+build/i],[i,[n,"LG"],[a,d]],[/(ideatab[\w\-\s]+)/i,/lenovo\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+)|[\w-]+)/i],[i,[n,"Lenovo"],[a,m]],[/(?:maemo|nokia).*(n900|lumia\s\d+)/i,/nokia[\s_-]?([\w\.-]*)/i],[i,[n,"Nokia"],[a,d]],[/droid.+;\s(pixel\sc)[\s)]/i],[i,[n,"Google"],[a,m]],[/droid.+;\s(pixel[\s\daxl]{0,6})(?:\sbuild|\))/i],[i,[n,"Google"],[a,d]],[/droid.+\s([c-g]\d{4}|so[-l]\w+|xq-a\w[4-7][12])(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[i,[n,"Sony"],[a,d]],[/sony\stablet\s[ps]\sbuild\//i,/(?:sony)?sgp\w+(?:\sbuild\/|\))/i],[[i,"Xperia Tablet"],[n,"Sony"],[a,m]],[/\s(kb2005|in20[12]5|be20[12][59])\b/i,/\ba000(1)\s+build/i,/\boneplus\s(a\d{4})[\s)]/i],[i,[n,"OnePlus"],[a,d]],[/(alexa)webm/i,/(kf[a-z]+)(\sbuild\/|\)).+silk\//i],[i,[n,"Amazon"],[a,m]],[/(sd|kf)[0349hijorstuw]+(\sbuild\/|\)).+silk\//i],[[i,"Fire Phone"],[n,"Amazon"],[a,d]],[/\((playbook);[\w\s\),;-]+(rim)/i],[i,n,[a,m]],[/\(bb10;\s(\w+)/i],[i,[n,"BlackBerry"],[a,d]],[/\b(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus\s7|padfone|p00c)/i],[i,[n,"ASUS"],[a,m]],[/\s(z[es]6[027][01][km][ls]|zenfone\s\d\w?)\b/i],[i,[n,"ASUS"],[a,d]],[/(nexus\s9)/i],[i,[n,"HTC"],[a,m]],[/(htc)[;_\s-]{1,2}([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[n,[i,/_/g," "],[a,d]],[/droid[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[i,[n,"Acer"],[a,m]],[/droid.+;\s(m[1-5]\snote)\sbuild/i,/\bmz-([\w-]{2,})/i],[i,[n,"Meizu"],[a,d]],[/(blackberry)[\s-]?(\w+)/i,/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i,/(microsoft);\s(lumia[\s\w]+)/i,/(lenovo)[_\s-]?([\w-]+)/i,/linux;.+(jolla);/i,/droid.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[n,i,[a,d]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad)/i,/(hp).+(tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i,/[;\/]\s?(le[\s\-]+pan)[\s\-]+(\w{1,9})\sbuild/i,/[;\/]\s?(trinity)[\-\s]*(t\d{3})\sbuild/i,/\b(gigaset)[\s\-]+(q\w{1,9})\sbuild/i,/\b(vodafone)\s([\w\s]+)(?:\)|\sbuild)/i],[n,i,[a,m]],[/\s(surface\sduo)\s/i],[i,[n,"Microsoft"],[a,m]],[/\s(u304aa)\sbuild/i],[i,[n,"AT&T"],[a,d]],[/sie-(\w*)/i],[i,[n,"Siemens"],[a,d]],[/[;\/]\s?(rct\w+)\sbuild/i],[i,[n,"RCA"],[a,m]],[/[;\/\s](venue[\d\s]{2,7})\sbuild/i],[i,[n,"Dell"],[a,m]],[/[;\/]\s?(q(?:mv|ta)\w+)\sbuild/i],[i,[n,"Verizon"],[a,m]],[/[;\/]\s(?:barnes[&\s]+noble\s|bn[rt])([\w\s\+]*)\sbuild/i],[i,[n,"Barnes & Noble"],[a,m]],[/[;\/]\s(tm\d{3}\w+)\sbuild/i],[i,[n,"NuVision"],[a,m]],[/;\s(k88)\sbuild/i],[i,[n,"ZTE"],[a,m]],[/;\s(nx\d{3}j)\sbuild/i],[i,[n,"ZTE"],[a,d]],[/[;\/]\s?(gen\d{3})\sbuild.*49h/i],[i,[n,"Swiss"],[a,d]],[/[;\/]\s?(zur\d{3})\sbuild/i],[i,[n,"Swiss"],[a,m]],[/[;\/]\s?((zeki)?tb.*\b)\sbuild/i],[i,[n,"Zeki"],[a,m]],[/[;\/]\s([yr]\d{2})\sbuild/i,/[;\/]\s(dragon[\-\s]+touch\s|dt)(\w{5})\sbuild/i],[[n,"Dragon Touch"],i,[a,m]],[/[;\/]\s?(ns-?\w{0,9})\sbuild/i],[i,[n,"Insignia"],[a,m]],[/[;\/]\s?((nxa|Next)-?\w{0,9})\sbuild/i],[i,[n,"NextBook"],[a,m]],[/[;\/]\s?(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05]))\sbuild/i],[[n,"Voice"],i,[a,d]],[/[;\/]\s?(lvtel\-)?(v1[12])\sbuild/i],[[n,"LvTel"],i,[a,d]],[/;\s(ph-1)\s/i],[i,[n,"Essential"],[a,d]],[/[;\/]\s?(v(100md|700na|7011|917g).*\b)\sbuild/i],[i,[n,"Envizen"],[a,m]],[/[;\/]\s?(trio[\s\w\-\.]+)\sbuild/i],[i,[n,"MachSpeed"],[a,m]],[/[;\/]\s?tu_(1491)\sbuild/i],[i,[n,"Rotor"],[a,m]],[/(shield[\w\s]+)\sbuild/i],[i,[n,"Nvidia"],[a,m]],[/(sprint)\s(\w+)/i],[n,i,[a,d]],[/(kin\.[onetw]{3})/i],[[i,/\./g," "],[n,"Microsoft"],[a,d]],[/droid\s[\d\.]+;\s(cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[i,[n,"Zebra"],[a,m]],[/droid\s[\d\.]+;\s(ec30|ps20|tc[2-8]\d[kx])\)/i],[i,[n,"Zebra"],[a,d]],[/\s(ouya)\s/i,/(nintendo)\s([wids3utch]+)/i],[n,i,[a,w]],[/droid.+;\s(shield)\sbuild/i],[i,[n,"Nvidia"],[a,w]],[/(playstation\s[345portablevi]+)/i],[i,[n,"Sony"],[a,w]],[/[\s\(;](xbox(?:\sone)?(?!;\sxbox))[\s\);]/i],[i,[n,"Microsoft"],[a,w]],[/smart-tv.+(samsung)/i],[n,[a,p],i],[/hbbtv.+maple;(\d+)/i],[[i,/^/,"SmartTV"],[n,"Samsung"],[a,p]],[/linux;\snetcast.+smarttv/i,/lg\snetcast\.tv-201\d/i],[[n,"LG"],i,[a,p]],[/(apple)\s?tv/i],[n,[i,"Apple TV"],[a,p]],[/crkey/i],[[i,"Chromecast"],[n,"Google"],[a,p]],[/droid.+aft([\w])(\sbuild\/|\))/i],[i,[n,"Amazon"],[a,p]],[/\(dtv[\);].+(aquos)/i],[i,[n,"Sharp"],[a,p]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[n,g.trim],[i,g.trim],[a,p]],[/[\s\/\(](android\s|smart[-\s]?|opera\s)tv[;\)\s]/i],[[a,p]],[/((pebble))app\/[\d\.]+\s/i],[n,i,[a,h]],[/droid.+;\s(glass)\s\d/i],[i,[n,"Google"],[a,h]],[/droid\s[\d\.]+;\s(wt63?0{2,3})\)/i],[i,[n,"Zebra"],[a,h]],[/droid .+?; ([^;]+?)(?: build|\) applewebkit).+? mobile safari/i],[i,[a,d]],[/droid .+?;\s([^;]+?)(?: build|\) applewebkit).+?(?! mobile) safari/i],[i,[a,m]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[a,g.lowerize]],[/(android[\w\.\s\-]{0,9});.+build/i],[i,[n,"Generic"]],[/(phone)/i],[[a,d]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[t,[s,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[t,[s,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[s,t],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[t,s]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[s,t],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)(?!.+xbox)/i],[s,[t,f.str,v.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[s,"Windows"],[t,f.str,v.os.windows.version]],[/ip[honead]{2,4}\b(?:.*os\s([\w]+)\slike\smac|;\sopera)/i,/cfnetwork\/.+darwin/i],[[t,/_/g,"."],[s,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)(?!.+haiku)/i],[[s,"Mac OS"],[t,/_/g,"."]],[/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i],[s,t],[/\(bb(10);/i],[t,[s,"BlackBerry"]],[/(?:symbian\s?os|symbos|s60(?=;)|series60)[\/\s-]?([\w\.]*)/i],[t,[s,"Symbian"]],[/\((series40);/i],[s],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[s,"Firefox OS"]],[/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[t,[s,"webOS"]],[/crkey\/([\d\.]+)/i],[t,[s,"Chromecast"]],[/(nintendo|playstation)\s([wids345portablevuch]+)/i,/(xbox);\s+xbox\s([^\);]+)/i,/(mint)[\/\s\(\)]?(\w*)/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?=\slinux)|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus|raspbian)(?:\sgnu\/linux)?(?:\slinux)?[\/\s-]?(?!chrom|package)([\w\.-]*)/i,/(hurd|linux)\s?([\w\.]*)/i,/(gnu)\s?([\w\.]*)/i],[s,t],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[s,"Chromium OS"],t],[/(sunos)\s?([\w\.\d]*)/i],[[s,"Solaris"],t],[/\s([frentopc-]{0,4}bsd|dragonfly)\s?(?!amd|[ix346]{1,2}86)([\w\.]*)/i],[s,t],[/(haiku)\s(\w+)/i],[s,t],[/((?:open)?solaris)[\/\s-]?([\w\.]*)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.])*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms|fuchsia)/i,/(unix)\s?([\w\.]*)/i],[s,t]]},k=function(i,s){if("object"==typeof i&&(s=i,i=b),!(this instanceof k))return new k(i,s).getResult();var e=i||(void 0!==r&&r.navigator&&r.navigator.userAgent?r.navigator.userAgent:""),o=s?g.extend(x,s):x;return this.getBrowser=function(){var i={name:b,version:b};return f.rgx.call(i,e,o.browser),i.major=g.major(i.version),i},this.getCPU=function(){var i={architecture:b};return f.rgx.call(i,e,o.cpu),i},this.getDevice=function(){var i={vendor:b,model:b,type:b};return f.rgx.call(i,e,o.device),i},this.getEngine=function(){var i={name:b,version:b};return f.rgx.call(i,e,o.engine),i},this.getOS=function(){var i={name:b,version:b};return f.rgx.call(i,e,o.os),i},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return e},this.setUA=function(i){return e=255<i.length?g.trim(i,255):i,this},this.setUA(e),this};k.VERSION="0.7.26",k.BROWSER={NAME:s,MAJOR:"major",VERSION:t},k.CPU={ARCHITECTURE:l},k.DEVICE={MODEL:i,VENDOR:n,TYPE:a,CONSOLE:w,MOBILE:d,SMARTTV:p,TABLET:m,WEARABLE:h,EMBEDDED:"embedded"},k.ENGINE={NAME:s,VERSION:t},k.OS={NAME:s,VERSION:t},typeof exports!=e?(typeof module!=e&&module.exports&&(exports=module.exports=k),exports.UAParser=k):"function"==typeof define&&define.amd?define(function(){return k}):void 0!==r&&(r.UAParser=k);var y,E=void 0!==r&&(r.jQuery||r.Zepto);E&&!E.ua&&(y=new k,E.ua=y.getResult(),E.ua.get=function(){return y.getUA()},E.ua.set=function(i){y.setUA(i);var s,e=y.getResult();for(s in e)E.ua[s]=e[s]})}("object"==typeof window?window:this); |
Package.describe({ | ||
name: 'faisalman:ua-parser-js', | ||
version: '0.7.25', | ||
version: '0.7.26', | ||
summary: 'Lightweight JavaScript-based user-agent string parser', | ||
@@ -5,0 +5,0 @@ git: 'https://github.com/faisalman/ua-parser-js.git', |
{ | ||
"title": "UAParser.js", | ||
"name": "ua-parser-js", | ||
"version": "0.7.25", | ||
"version": "0.7.26", | ||
"author": "Faisal Salman <f@faisalman.com> (http://faisalman.com)", | ||
@@ -123,2 +123,3 @@ "description": "Lightweight JavaScript-based user-agent string parser", | ||
"requirejs": "^2.3.2", | ||
"safe-regex": "^2.1.1", | ||
"uglify-js": "~3.12.0", | ||
@@ -125,0 +126,0 @@ "verup": "^1.3.x" |
@@ -41,6 +41,6 @@ <p align="center"> | ||
Chrome Headless, Chrome WebView, Chrome, Chromium, Comodo Dragon, Dillo, | ||
Dolphin, Doris, Edge, Epiphany, Facebook, Falkon, Fennec, Firebird, Firefox, | ||
Flock, GSA, GoBrowser, ICE Browser, IE, IEMobile, IceApe, IceCat, IceDragon, | ||
Iceape, Iceweasel, Instagram, Iridium, Iron, Jasmine, K-Meleon, Kindle, | ||
Konqueror, LBBROWSER, Line, Links, Lunascape, Lynx, MIUI Browser, | ||
Dolphin, Doris, Edge, Electron, Epiphany, Facebook, Falkon, Fennec, Firebird, | ||
Firefox, Flock, GSA, GoBrowser, ICE Browser, IE, IEMobile, IceApe, IceCat, | ||
IceDragon, Iceape, Iceweasel, Instagram, Iridium, Iron, Jasmine, K-Meleon, | ||
Kindle, Konqueror, LBBROWSER, Line, Links, Lunascape, Lynx, MIUI Browser, | ||
Maemo Browser, Maemo, Maxthon, MetaSr Midori, Minimo, Mobile Safari, Mosaic, | ||
@@ -65,6 +65,7 @@ Mozilla, NetFront, NetSurf, Netfront, Netscape, NokiaBrowser, Oculus Browser, | ||
# Possible 'device.vendor': | ||
Acer, Alcatel, Amazon, Apple, Archos, Asus, BenQ, BlackBerry, Dell, Essential, | ||
GeeksPhone, Google, HP, HTC, Huawei, Jolla, Lenovo, LG, Meizu, Microsoft, Motorola, | ||
Nexian, Nintendo, Nokia, Nvidia, OnePlus, Ouya, Palm, Panasonic, Pebble, Polytron, | ||
RIM, Samsung, Sharp, Siemens, Sony[Ericsson], Sprint, Xbox, Xiaomi, ZTE, ... | ||
Acer, Alcatel, Amazon, Apple, Archos, ASUS, AT&T, BenQ, BlackBerry, Dell, | ||
Essential, GeeksPhone, Google, HP, HTC, Huawei, Jolla, Lenovo, LG, Meizu, | ||
Microsoft, Motorola, Nexian, Nintendo, Nokia, Nvidia, OnePlus, OPPO, Ouya, | ||
Palm, Panasonic, Pebble, Polytron, Realme, RIM, Samsung, Sharp, Siemens, | ||
Sony[Ericsson], Sprint, Vivo, Vodafone, Xbox, Xiaomi, Zebra, ZTE, ... | ||
@@ -94,5 +95,5 @@ # 'device.model' determined dynamically | ||
Minix, Mint, Morph OS, NetBSD, Nintendo, OpenBSD, OpenVMS, OS/2, Palm, PC-BSD, | ||
PCLinuxOS, Plan9, PlayStation, QNX, RedHat, RIM Tablet OS, RISC OS, Sailfish, | ||
Series40, Slackware, Solaris, SUSE, Symbian, Tizen, Ubuntu, Unix, VectorLinux, | ||
WebOS, Windows [Phone/Mobile], Zenwalk, ... | ||
PCLinuxOS, Plan9, PlayStation, QNX, Raspbian, RedHat, RIM Tablet OS, RISC OS, | ||
Sailfish, Series40, Slackware, Solaris, SUSE, Symbian, Tizen, Ubuntu, Unix, | ||
VectorLinux, WebOS, Windows [Phone/Mobile], Zenwalk, ... | ||
@@ -107,3 +108,3 @@ # 'os.version' determined dynamically | ||
# Possible 'cpu.architecture' | ||
68k, amd64, arm[64], avr, ia[32/64], irix[64], mips[64], pa-risc, ppc, sparc[64] | ||
68k, amd64, arm[64/hf], avr, ia[32/64], irix[64], mips[64], pa-risc, ppc, sparc[64] | ||
``` | ||
@@ -110,0 +111,0 @@ |
/*!@license | ||
* UAParser.js v0.7.25 | ||
* UAParser.js v0.7.26 | ||
* Lightweight JavaScript-based User-Agent string parser | ||
@@ -19,3 +19,3 @@ * https://github.com/faisalman/ua-parser-js | ||
var LIBVERSION = '0.7.25', | ||
var LIBVERSION = '0.7.26', | ||
EMPTY = '', | ||
@@ -39,3 +39,4 @@ UNKNOWN = '?', | ||
WEARABLE = 'wearable', | ||
EMBEDDED = 'embedded'; | ||
EMBEDDED = 'embedded', | ||
UA_MAX_LENGTH = 255; | ||
@@ -61,7 +62,3 @@ | ||
has : function (str1, str2) { | ||
if (typeof str1 === "string") { | ||
return str2.toLowerCase().indexOf(str1.toLowerCase()) !== -1; | ||
} else { | ||
return false; | ||
} | ||
return typeof str1 === STR_TYPE ? str2.toLowerCase().indexOf(str1.toLowerCase()) !== -1 : false; | ||
}, | ||
@@ -74,4 +71,5 @@ lowerize : function (str) { | ||
}, | ||
trim : function (str) { | ||
return str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); | ||
trim : function (str, len) { | ||
str = str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); | ||
return typeof(len) === UNDEF_TYPE ? str : str.substring(0, UA_MAX_LENGTH); | ||
} | ||
@@ -167,3 +165,4 @@ }; | ||
browser : { | ||
oldsafari : { | ||
// Safari < 3.0 | ||
oldSafari : { | ||
version : { | ||
@@ -179,18 +178,12 @@ '1.0' : '/8', | ||
} | ||
} | ||
}, | ||
device : { | ||
amazon : { | ||
model : { | ||
'Fire Phone' : ['SD', 'KF'] | ||
} | ||
}, | ||
sprint : { | ||
model : { | ||
'Evo Shift 4G' : '7373KT' | ||
}, | ||
vendor : { | ||
'HTC' : 'APA', | ||
'Sprint' : 'Sprint' | ||
oldEdge : { | ||
version : { | ||
'0.1' : '12.', | ||
'21' : '13.', | ||
'31' : '14.', | ||
'39' : '15.', | ||
'41' : '16.', | ||
'42' : '17.', | ||
'44' : '18.' | ||
} | ||
@@ -229,92 +222,85 @@ } | ||
/\b(?:crmo|crios)\/([\w\.]+)/i // Chrome for Android/iOS | ||
], [VERSION, [NAME, 'Chrome']], [ | ||
/(?:edgios|edga|edg)\/([\w\.]+)/i // Microsoft Edge | ||
], [VERSION, [NAME, 'Edge']], [ | ||
/edge\/([\w\.]+)/i // Old Edge (Trident) | ||
], [[VERSION, mapper.str, maps.browser.oldEdge.version], [NAME, 'Edge']], [ | ||
// Presto based | ||
/(opera\smini)\/([\w\.-]+)/i, // Opera Mini | ||
/(opera\s[mobiletab]{3,6}).+version\/([\w\.-]+)/i, // Opera Mobi/Tablet | ||
/(opera\s[mobiletab]{3,6})\b.+version\/([\w\.-]+)/i, // Opera Mobi/Tablet | ||
/(opera).+version\/([\w\.]+)/i, // Opera > 9.80 | ||
/(opera)[\/\s]+([\w\.]+)/i // Opera < 9.80 | ||
], [NAME, VERSION], [ | ||
/opios[\/\s]+([\w\.]+)/i // Opera mini on iphone >= 8.0 | ||
], [VERSION, [NAME, 'Opera Mini']], [ | ||
/\sopr\/([\w\.]+)/i // Opera Webkit | ||
], [VERSION, [NAME, 'Opera']], [ | ||
/(opios)[\/\s]+([\w\.]+)/i // Opera mini on iphone >= 8.0 | ||
], [[NAME, 'Opera Mini'], VERSION], [ | ||
/\s(opr)\/([\w\.]+)/i // Opera Webkit | ||
], [[NAME, 'Opera'], VERSION], [ | ||
// Mixed | ||
/(kindle)\/([\w\.]+)/i, // Kindle | ||
/(lunascape|maxthon|netfront|jasmine|blazer|instagram)[\/\s]?([\w\.]*)/i, | ||
// Lunascape/Maxthon/Netfront/Jasmine/Blazer/Instagram | ||
/(lunascape|maxthon|netfront|jasmine|blazer|instagram)[\/\s]?([\w\.]*)/i, // Lunascape/Maxthon/Netfront/Jasmine/Blazer/Instagram | ||
// Trident based | ||
/(avant\s|iemobile|slim)(?:browser)?[\/\s]?([\w\.]*)/i, | ||
// Avant/IEMobile/SlimBrowser | ||
/(bidubrowser|baidubrowser)[\/\s]?([\w\.]+)/i, // Baidu Browser | ||
/(avant\s|iemobile|slim)(?:browser)?[\/\s]?([\w\.]*)/i, // Avant/IEMobile/SlimBrowser | ||
/(ba?idubrowser)[\/\s]?([\w\.]+)/i, // Baidu Browser | ||
/(?:ms|\()(ie)\s([\w\.]+)/i, // Internet Explorer | ||
// Webkit/KHTML based | ||
/(rekonq)\/([\w\.]*)/i, // Rekonq | ||
/(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon)\/([\w\.-]+)/i, | ||
// Chromium/Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron/Iridium/PhantomJS/Bowser/QupZilla/Falkon | ||
/(puffin|brave|whale|qqbrowserlite|qq)\/([\w\.]+)/i // Puffin/Brave/Whale/QQBrowserLite/QQ, aka ShouQ | ||
/(rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([\w\.]+)/i, // Rekonq/Puffin/Brave/Whale/QQBrowserLite/QQ, aka ShouQ | ||
/(weibo)__([\d\.]+)/i // Weibo | ||
], [NAME, VERSION], [ | ||
/(konqueror)\/([\w\.]+)/i // Konqueror | ||
], [[NAME, 'Konqueror'], VERSION], [ | ||
/(trident).+rv[:\s]([\w\.]{1,9}).+like\sgecko/i // IE11 | ||
], [[NAME, 'IE'], VERSION], [ | ||
/(edge|edgios|edga|edg)\/((\d+)?[\w\.]+)/i // Microsoft Edge | ||
], [[NAME, 'Edge'], VERSION], [ | ||
/(yabrowser)\/([\w\.]+)/i // Yandex | ||
], [[NAME, 'Yandex'], VERSION], [ | ||
/(Avast)\/([\w\.]+)/i // Avast Secure Browser | ||
], [[NAME, 'Avast Secure Browser'], VERSION], [ | ||
/(AVG)\/([\w\.]+)/i // AVG Secure Browser | ||
], [[NAME, 'AVG Secure Browser'], VERSION], [ | ||
/(focus)\/([\w\.]+)/i // Firefox Focus | ||
], [[NAME, 'Firefox Focus'], VERSION], [ | ||
/(opt)\/([\w\.]+)/i // Opera Touch | ||
], [[NAME, 'Opera Touch'], VERSION], [ | ||
/((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i // UCBrowser | ||
], [[NAME, 'UCBrowser'], VERSION], [ | ||
/(?:[\s\/]uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i // UCBrowser | ||
], [VERSION, [NAME, 'UCBrowser']], [ | ||
/(?:windowswechat)?\sqbcore\/([\w\.]+)\b.*(?:windowswechat)?/i // WeChat Desktop for Windows Built-in Browser | ||
], [VERSION, [NAME, 'WeChat(Win) Desktop']], [ | ||
/micromessenger\/([\w\.]+)/i // WeChat | ||
], [VERSION, [NAME, 'WeChat']], [ | ||
/konqueror\/([\w\.]+)/i // Konqueror | ||
], [VERSION, [NAME, 'Konqueror']], [ | ||
/trident.+rv[:\s]([\w\.]{1,9})\b.+like\sgecko/i // IE11 | ||
], [VERSION, [NAME, 'IE']], [ | ||
/yabrowser\/([\w\.]+)/i // Yandex | ||
], [VERSION, [NAME, 'Yandex']], [ | ||
/(avast|avg)\/([\w\.]+)/i // Avast/AVG Secure Browser | ||
], [[NAME, /(.+)/, '$1 Secure Browser'], VERSION], [ | ||
/focus\/([\w\.]+)/i // Firefox Focus | ||
], [VERSION, [NAME, 'Firefox Focus']], [ | ||
/opt\/([\w\.]+)/i // Opera Touch | ||
], [VERSION, [NAME, 'Opera Touch']], [ | ||
/coc_coc_browser\/([\w\.]+)/i // Coc Coc Browser | ||
], [VERSION, [NAME, 'Coc Coc']], [ | ||
/dolfin\/([\w\.]+)/i // Dolphin | ||
], [VERSION, [NAME, 'Dolphin']], [ | ||
/coast\/([\w\.]+)/i // Opera Coast | ||
], [VERSION, [NAME, 'Opera Coast']], | ||
[/xiaomi\/miuibrowser\/([\w\.]+)/i // MIUI Browser | ||
], [VERSION, [NAME, 'MIUI Browser']], [ | ||
/fxios\/([\w\.-]+)/i // Firefox for iOS | ||
], [VERSION, [NAME, 'Firefox']], [ | ||
/(qihu|qhbrowser|qihoobrowser|360browser)/i // 360 | ||
], [[NAME, '360 Browser']], [ | ||
/(oculus|samsung|sailfish)browser\/([\w\.]+)/i | ||
], [[NAME, /(.+)/, '$1 Browser'], VERSION], [ // Oculus/Samsung/Sailfish Browser | ||
/(comodo_dragon)\/([\w\.]+)/i // Comodo Dragon | ||
], [[NAME, /_/g, ' '], VERSION], [ | ||
/((?:windowswechat)? qbcore)\/([\w\.]+).*(?:windowswechat)?/i // WeChat Desktop for Windows Built-in Browser | ||
], [[NAME, 'WeChat(Win) Desktop'], VERSION], [ | ||
/(micromessenger)\/([\w\.]+)/i // WeChat | ||
], [[NAME, 'WeChat'], VERSION], [ | ||
/m?(qqbrowser|baiduboxapp|2345Explorer)[\/\s]?([\w\.]+)/i // QQBrowser/Baidu App/2345 Browser | ||
], [NAME, VERSION], [ | ||
/(MetaSr)[\/\s]?([\w\.]+)/i // SouGouBrowser | ||
], [NAME], [ | ||
/(MetaSr)[\/\s]?([\w\.]+)/i, // SouGouBrowser | ||
/(LBBROWSER)/i // LieBao Browser | ||
], [NAME], [ | ||
/(weibo)__([\d\.]+)/i // Weibo | ||
], [NAME, VERSION], [ | ||
/xiaomi\/miuibrowser\/([\w\.]+)/i // MIUI Browser | ||
], [VERSION, [NAME, 'MIUI Browser']], [ | ||
// WebView | ||
/;fbav\/([\w\.]+);/i // Facebook App for iOS & Android with version | ||
], [VERSION, [NAME, 'Facebook']], [ | ||
], [VERSION, [NAME, 'Facebook']], [ | ||
/FBAN\/FBIOS|FB_IAB\/FB4A/i // Facebook App for iOS & Android without version | ||
], [[NAME, 'Facebook']], [ | ||
/\s(electron)\/([\w\.]+)\ssafari/i, // Electron-based App | ||
/safari\s(line)\/([\w\.]+)/i, // Line App for iOS | ||
/droid.+(line)\/([\w\.]+)\/iab/i // Line App for Android | ||
/\b(line)\/([\w\.]+)\/iab/i // Line App for Android | ||
], [NAME, VERSION], [ | ||
/\bgsa\/([\w\.]+)\s.*safari\//i // Google Search Appliance on iOS | ||
], [VERSION, [NAME, 'GSA']], [ | ||
@@ -325,46 +311,16 @@ /headlesschrome(?:\/([\w\.]+)|\s)/i // Chrome Headless | ||
/\swv\).+(chrome)\/([\w\.]+)/i // Chrome WebView | ||
], [[NAME, /(.+)/, '$1 WebView'], VERSION], [ | ||
], [[NAME, 'Chrome WebView'], VERSION], [ | ||
/((?:oculus|samsung)browser)\/([\w\.]+)/i | ||
], [[NAME, /(.+(?:g|us))(.+)/, '$1 $2'], VERSION], [ // Oculus / Samsung Browser | ||
/droid.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i // Android Browser | ||
/droid.+\sversion\/([\w\.]+)\b.+(?:mobile\ssafari|safari)/i // Android Browser | ||
], [VERSION, [NAME, 'Android Browser']], [ | ||
/(coc_coc_browser)\/([\w\.]+)/i // Coc Coc Browser | ||
], [[NAME, 'Coc Coc'], VERSION], [ | ||
/(sailfishbrowser)\/([\w\.]+)/i // Sailfish Browser | ||
], [[NAME, 'Sailfish Browser'], VERSION], [ | ||
/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i | ||
// Chrome/OmniWeb/Arora/Tizen/Nokia | ||
/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i // Chrome/OmniWeb/Arora/Tizen/Nokia | ||
], [NAME, VERSION], [ | ||
/(dolfin)\/([\w\.]+)/i // Dolphin | ||
], [[NAME, 'Dolphin'], VERSION], [ | ||
/(qihu|qhbrowser|qihoobrowser|360browser)/i // 360 | ||
], [[NAME, '360 Browser']], [ | ||
/((?:android.+)crmo|crios)\/([\w\.]+)/i // Chrome for Android/iOS | ||
], [[NAME, 'Chrome'], VERSION], [ | ||
/(coast)\/([\w\.]+)/i // Opera Coast | ||
], [[NAME, 'Opera Coast'], VERSION], [ | ||
/fxios\/([\w\.-]+)/i // Firefox for iOS | ||
], [VERSION, [NAME, 'Firefox']], [ | ||
/version\/([\w\.]+)\s.*mobile\/\w+\s(safari)/i // Mobile Safari | ||
], [VERSION, [NAME, 'Mobile Safari']], [ | ||
/version\/([\w\.]+)\s.*(mobile\s?safari|safari)/i // Safari & Safari Mobile | ||
], [VERSION, NAME], [ | ||
/webkit.+?(gsa)\/([\w\.]+)\s.*(mobile\s?safari|safari)(\/[\w\.]+)/i // Google Search Appliance on iOS | ||
], [[NAME, 'GSA'], VERSION], [ | ||
/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i // Safari < 3.0 | ||
], [NAME, [VERSION, mapper.str, maps.browser.oldsafari.version]], [ | ||
], [NAME, [VERSION, mapper.str, maps.browser.oldSafari.version]], [ | ||
@@ -381,3 +337,2 @@ /(webkit|khtml)\/([\w\.]+)/i | ||
/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([\w\.-]+)$/i, | ||
// Firefox/SeaMonkey/K-Meleon/IceCat/IceApe/Firebird/Phoenix | ||
@@ -399,3 +354,3 @@ /(firefox)\/([\w\.]+)\s[\w\s\-]+\/[\w\.]+$/i, // Other Firefox-based | ||
/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i // AMD64 | ||
/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i // AMD64 (x64) | ||
], [[ARCHITECTURE, 'amd64']], [ | ||
@@ -406,5 +361,11 @@ | ||
/((?:i[346]|x)86)[;\)]/i // IA32 | ||
/((?:i[346]|x)86)[;\)]/i // IA32 (x86) | ||
], [[ARCHITECTURE, 'ia32']], [ | ||
/\b(aarch64|armv?8e?l?)\b/i // ARM64 | ||
], [[ARCHITECTURE, 'arm64']], [ | ||
/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i // ARMHF | ||
], [[ARCHITECTURE, 'armhf']], [ | ||
// PocketPC mistakenly identified as PowerPC | ||
@@ -420,3 +381,3 @@ /windows\s(ce|mobile);\sppc;/i | ||
/((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+[;l]))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i | ||
/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?:64|(?=v(?:[1-7]|[5-7]1)l?|;|eabi))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i | ||
// IA64, 68K, ARM/64, AVR/32, IRIX/64, MIPS/64, SPARC/64, PA-RISC | ||
@@ -427,271 +388,282 @@ ], [[ARCHITECTURE, util.lowerize]] | ||
device : [[ | ||
////////////////////// | ||
// MOBILES & TABLETS | ||
///////////////////// | ||
// Samsung | ||
/\b(sch-i[89]0\d|shw-m380s|sm-p(?:605|610|587)|sm-t\w+|gt-p\d{4}|gt-n\d+|sgh-t8[56]9|nexus\s10)/i, | ||
], [MODEL, [VENDOR, 'Samsung'], [TYPE, TABLET]], [ | ||
/(s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+)/i, | ||
/\ssamsung[\s-]([\w-]+)/i, | ||
/sec-(sgh\w+)/i | ||
], [MODEL, [VENDOR, 'Samsung'], [TYPE, MOBILE]], [ | ||
/\((ipad|playbook);[\w\s\),;-]+(rim|apple)/i // iPad/PlayBook | ||
// Apple | ||
/\((ip(?:hone|od)[\s\w]*);/i // iPod/iPhone | ||
], [MODEL, [VENDOR, 'Apple'], [TYPE, MOBILE]], [ | ||
/\((ipad);[\w\s\),;-]+(apple)/i // iPad | ||
], [MODEL, VENDOR, [TYPE, TABLET]], [ | ||
/applecoremedia\/[\w\.]+ \((ipad)/ // iPad | ||
/applecoremedia\/[\w\.]+\s\((ipad)/i | ||
], [MODEL, [VENDOR, 'Apple'], [TYPE, TABLET]], [ | ||
/(apple\s{0,1}tv)/i // Apple TV | ||
], [[MODEL, 'Apple TV'], [VENDOR, 'Apple'], [TYPE, SMARTTV]], [ | ||
/(archos)\s(gamepad2?)/i, // Archos | ||
/(hp).+(touchpad)/i, // HP TouchPad | ||
/(hp).+(tablet)/i, // HP Tablet | ||
/(kindle)\/([\w\.]+)/i, // Kindle | ||
/\s(nook)[\w\s]+build\/(\w+)/i, // Nook | ||
/(dell)\s(strea[kpr\s\d]*[\dko])/i // Dell Streak | ||
], [VENDOR, MODEL, [TYPE, TABLET]], [ | ||
/(alexa)webm/i, | ||
/(kf[A-z]+)(\sbuild\/|\)).+silk\//i // Kindle Fire HD | ||
], [MODEL, [VENDOR, 'Amazon'], [TYPE, TABLET]], [ | ||
/(sd|kf)[0349hijorstuw]+(\sbuild\/|\)).+silk\//i // Fire Phone | ||
], [[MODEL, mapper.str, maps.device.amazon.model], [VENDOR, 'Amazon'], [TYPE, MOBILE]], [ | ||
/droid.+aft([\w])(\sbuild\/|\))/i // Fire TV | ||
], [MODEL, [VENDOR, 'Amazon'], [TYPE, SMARTTV]], [ | ||
/\((ip(?:hone|od)[\s\w]*);/i // iPod/iPhone | ||
], [MODEL, [VENDOR, 'Apple'], [TYPE, MOBILE]], [ | ||
/(blackberry)[\s-]?(\w+)/i, // BlackBerry | ||
/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i, | ||
// BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron | ||
/(hp)\s([\w\s]+\w)/i, // HP iPAQ | ||
/(asus)-?(\w+)/i // Asus | ||
], [VENDOR, MODEL, [TYPE, MOBILE]], [ | ||
/\(bb10;\s(\w+)/i // BlackBerry 10 | ||
], [MODEL, [VENDOR, 'BlackBerry'], [TYPE, MOBILE]], [ | ||
// Asus Tablets | ||
/droid.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone|p00c)/i | ||
], [MODEL, [VENDOR, 'Asus'], [TYPE, TABLET]], [ | ||
/sony\stablet\s[ps]\sbuild\//i, // Sony | ||
/(?:sony)?sgp\w+(?:\sbuild\/|\))/i | ||
], [[MODEL, 'Xperia Tablet'], [VENDOR, 'Sony'], [TYPE, TABLET]], [ | ||
/droid.+\s([c-g]\d{4}|so[-l]\w+|xq-a\w[4-7][12])(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i | ||
], [MODEL, [VENDOR, 'Sony'], [TYPE, MOBILE]], [ | ||
/\s(ouya)\s/i, // Ouya | ||
/(nintendo)\s([wids3utch]+)/i // Nintendo | ||
], [VENDOR, MODEL, [TYPE, CONSOLE]], [ | ||
/droid.+;\s(shield)\sbuild/i // Nvidia | ||
], [MODEL, [VENDOR, 'Nvidia'], [TYPE, CONSOLE]], [ | ||
/(playstation\s[345portablevi]+)/i // Playstation | ||
], [MODEL, [VENDOR, 'Sony'], [TYPE, CONSOLE]], [ | ||
/(sprint\s(\w+))/i // Sprint Phones | ||
], [[VENDOR, mapper.str, maps.device.sprint.vendor], [MODEL, mapper.str, maps.device.sprint.model], [TYPE, MOBILE]], [ | ||
/(htc)[;_\s-]{1,2}([\w\s]+(?=\)|\sbuild)|\w+)/i, // HTC | ||
/(zte)-(\w*)/i, // ZTE | ||
/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i | ||
// Alcatel/GeeksPhone/Nexian/Panasonic/Sony | ||
], [VENDOR, [MODEL, /_/g, ' '], [TYPE, MOBILE]], [ | ||
/(nexus\s9)/i // HTC Nexus 9 | ||
], [MODEL, [VENDOR, 'HTC'], [TYPE, TABLET]], [ | ||
/d\/huawei([\w\s-]+)[;\)]/i, // Huawei | ||
/droid.+\s(nexus\s6p|vog-[at]?l\d\d|ane-[at]?l[x\d]\d|eml-a?l\d\da?|lya-[at]?l\d[\dc]|clt-a?l\d\di?)/i, | ||
/droid.+\s((?:A(?:GS2?|KA|LP|N[AE]|QM|RE|SK|TH)|B(?:A(?:C|H2)|G2|KL|LA|MH|Z[AKT])|C(?:AZ|DY|LT|OL|[MOR]R)|DUK|E(?:BG|DI|L[ES]|ML|V[AR])|FRD|G(?:LK|RA)|H(?:D[LN]|MA|LK|RY|WI)|INE|J(?:DN2|MM|NY|SN)|K(?:NT|OB|SA)|L(?:IO|LD|ON|[RY]A)|M(?:AR|ED|[HL]A|ON|RX|T7)|N(?:EO|TS|XT)|OXF|P(?:AR|CT|IC|LK|RA)|R(?:IO|VL)|S(?:C[ML]|EA|HT|PN|TF)|T(?:A[HS]|NY)|V(?:[CI]E|KY|OG|RD)|W(?:AS|LZ)|Y(?:635|AL))-[ATU][LN][01259][019])[;\)\s]/i | ||
// Huawei | ||
/d\/huawei([\w\s-]+)[;\)]/i, | ||
/\b(nexus\s6p|vog-[at]?l\d\d|ane-[at]?l[x\d]\d|eml-a?l\d\da?|lya-[at]?l\d[\dc]|clt-a?l\d\di?|ele-l\d\d)/i, | ||
/\b(\w{2,4}-[atu][ln][01259][019])[;\)\s]/i | ||
], [MODEL, [VENDOR, 'Huawei'], [TYPE, MOBILE]], [ | ||
/droid.+(bah2?-a?[lw]\d{2})/i // Huawei MediaPad | ||
/\b(bah2?-a?[lw]\d{2})/i // Huawei MediaPad | ||
], [MODEL, [VENDOR, 'Huawei'], [TYPE, TABLET]], [ | ||
/(microsoft);\s(lumia[\s\w]+)/i // Microsoft Lumia | ||
], [VENDOR, MODEL, [TYPE, MOBILE]], [ | ||
// Xiaomi | ||
/\b(poco[\s\w]+)(?:\sbuild|\))/i, // Xiaomi POCO | ||
/\b;\s(\w+)\s+build\/hm\1/i, // Xiaomi Hongmi 'numeric' models | ||
/\b(hm[\s\-_]?note?[\s_]?(?:\d\w)?)\sbuild/i, // Xiaomi Hongmi | ||
/\b(redmi[\s\-_]?(?:note|k)?[\w\s_]+)(?:\sbuild|\))/i, // Xiaomi Redmi | ||
/\b(mi[\s\-_]?(?:a\d|one|one[\s_]plus|note lte)?[\s_]?(?:\d?\w?)[\s_]?(?:plus)?)\sbuild/i // Xiaomi Mi | ||
], [[MODEL, /_/g, ' '], [VENDOR, 'Xiaomi'], [TYPE, MOBILE]], [ | ||
/\b(mi[\s\-_]?(?:pad)(?:[\w\s_]+))(?:\sbuild|\))/i // Mi Pad tablets | ||
],[[MODEL, /_/g, ' '], [VENDOR, 'Xiaomi'], [TYPE, TABLET]], [ | ||
/[\s\(;](xbox(?:\sone)?)[\s\);]/i // Microsoft Xbox | ||
], [MODEL, [VENDOR, 'Microsoft'], [TYPE, CONSOLE]], [ | ||
/(kin\.[onetw]{3})/i // Microsoft Kin | ||
], [[MODEL, /\./g, ' '], [VENDOR, 'Microsoft'], [TYPE, MOBILE]], [ | ||
// OPPO | ||
/;\s(\w+)\sbuild.+\soppo/i, | ||
/\s(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007)\b/i | ||
], [MODEL, [VENDOR, 'OPPO'], [TYPE, MOBILE]], [ | ||
// Motorola | ||
/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)[\w\s]+build\//i, | ||
// Vivo | ||
/\svivo\s(\w+)(?:\sbuild|\))/i, | ||
/\s(v[12]\d{3}\w?[at])(?:\sbuild|;)/i | ||
], [MODEL, [VENDOR, 'Vivo'], [TYPE, MOBILE]], [ | ||
// Realme | ||
/\s(rmx[12]\d{3})(?:\sbuild|;)/i | ||
], [MODEL, [VENDOR, 'Realme'], [TYPE, MOBILE]], [ | ||
// Motorola | ||
/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)\b[\w\s]+build\//i, | ||
/\smot[\s-](\w*)/i, | ||
/(moto[\s\w\(\)]+(?=\sbuild|\)))/i, | ||
/(XT\d{3,4}) build\//i, | ||
/(xt\d{3,4})\sbuild\//i, | ||
/(nexus\s6)/i | ||
], [MODEL, [VENDOR, 'Motorola'], [TYPE, MOBILE]], [ | ||
/droid.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i | ||
/\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i | ||
], [MODEL, [VENDOR, 'Motorola'], [TYPE, TABLET]], [ | ||
/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i // HbbTV devices | ||
], [[VENDOR, util.trim], [MODEL, util.trim], [TYPE, SMARTTV]], [ | ||
// LG | ||
/((?=lg)?[vl]k\-?\d{3})\s+build|\s3\.[\s\w;-]{10}lg?-([06cv9]{3,4})/i | ||
], [MODEL, [VENDOR, 'LG'], [TYPE, TABLET]], [ | ||
/(nexus\s[45])/i, | ||
/lg[e;\s\/-]+((?!browser|netcast)\w+)/i, | ||
/\blg(\-?[\d\w]+)\s+build/i | ||
], [MODEL, [VENDOR, 'LG'], [TYPE, MOBILE]], [ | ||
/hbbtv.+maple;(\d+)/i | ||
], [[MODEL, /^/, 'SmartTV'], [VENDOR, 'Samsung'], [TYPE, SMARTTV]], [ | ||
// Lenovo | ||
/(ideatab[\w\-\s]+)/i, | ||
/lenovo\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+)|[\w-]+)/i // Lenovo tablets | ||
], [MODEL, [VENDOR, 'Lenovo'], [TYPE, TABLET]], [ | ||
/\(dtv[\);].+(aquos)/i // Sharp | ||
], [MODEL, [VENDOR, 'Sharp'], [TYPE, SMARTTV]], [ | ||
// Nokia | ||
/(?:maemo|nokia).*(n900|lumia\s\d+)/i, | ||
/nokia[\s_-]?([\w\.-]*)/i | ||
], [MODEL, [VENDOR, 'Nokia'], [TYPE, MOBILE]], [ | ||
/droid.+((sch-i[89]0\d|shw-m380s|SM-P605|SM-P610|SM-P587|gt-p\d{4}|gt-n\d+|sgh-t8[56]9|nexus 10))/i, | ||
/((SM-T\w+))/i | ||
], [[VENDOR, 'Samsung'], MODEL, [TYPE, TABLET]], [ // Samsung | ||
/smart-tv.+(samsung)/i | ||
], [VENDOR, [TYPE, SMARTTV], MODEL], [ | ||
/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i, | ||
/\s(sam)(?:sung)[\s-]([\w-]+)/i, | ||
/sec-((sgh\w+))/i | ||
], [[VENDOR, 'Samsung'], MODEL, [TYPE, MOBILE]], [ | ||
/droid.+;\s(pixel\sc)[\s)]/i // Google Pixel C | ||
], [MODEL, [VENDOR, 'Google'], [TYPE, TABLET]], [ | ||
/droid.+;\s(pixel[\s\daxl]{0,6})(?:\sbuild|\))/i // Google Pixel | ||
], [MODEL, [VENDOR, 'Google'], [TYPE, MOBILE]], [ | ||
/sie-(\w*)/i // Siemens | ||
], [MODEL, [VENDOR, 'Siemens'], [TYPE, MOBILE]], [ | ||
// Sony | ||
/droid.+\s([c-g]\d{4}|so[-l]\w+|xq-a\w[4-7][12])(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i | ||
], [MODEL, [VENDOR, 'Sony'], [TYPE, MOBILE]], [ | ||
/sony\stablet\s[ps]\sbuild\//i, | ||
/(?:sony)?sgp\w+(?:\sbuild\/|\))/i | ||
], [[MODEL, 'Xperia Tablet'], [VENDOR, 'Sony'], [TYPE, TABLET]], [ | ||
/(maemo|nokia).*(n900|lumia\s\d+)/i, // Nokia | ||
/(nokia)[\s_-]?([\w\.-]*)/i | ||
], [[VENDOR, 'Nokia'], MODEL, [TYPE, MOBILE]], [ | ||
// OnePlus | ||
/\s(kb2005|in20[12]5|be20[12][59])\b/i, | ||
/\ba000(1)\s+build/i, // OnePlus | ||
/\boneplus\s(a\d{4})[\s)]/i | ||
], [MODEL, [VENDOR, 'OnePlus'], [TYPE, MOBILE]], [ | ||
/droid[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i // Acer | ||
], [MODEL, [VENDOR, 'Acer'], [TYPE, TABLET]], [ | ||
// Amazon | ||
/(alexa)webm/i, | ||
/(kf[a-z]+)(\sbuild\/|\)).+silk\//i // Kindle Fire HD | ||
], [MODEL, [VENDOR, 'Amazon'], [TYPE, TABLET]], [ | ||
/(sd|kf)[0349hijorstuw]+(\sbuild\/|\)).+silk\//i // Fire Phone | ||
], [[MODEL, 'Fire Phone'], [VENDOR, 'Amazon'], [TYPE, MOBILE]], [ | ||
/droid.+([vl]k\-?\d{3})\s+build/i // LG Tablet | ||
], [MODEL, [VENDOR, 'LG'], [TYPE, TABLET]], [ | ||
/droid\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i // LG Tablet | ||
], [[VENDOR, 'LG'], MODEL, [TYPE, TABLET]], [ | ||
/linux;\snetcast.+smarttv/i, // LG SmartTV | ||
/lg\snetcast\.tv-201\d/i | ||
], [[VENDOR, 'LG'], MODEL, [TYPE, SMARTTV]], [ | ||
/(nexus\s[45])/i, // LG | ||
/lg[e;\s\/-]+(\w*)/i, | ||
/droid.+lg(\-?[\d\w]+)\s+build/i | ||
], [MODEL, [VENDOR, 'LG'], [TYPE, MOBILE]], [ | ||
// BlackBerry | ||
/\((playbook);[\w\s\),;-]+(rim)/i // BlackBerry PlayBook | ||
], [MODEL, VENDOR, [TYPE, TABLET]], [ | ||
/\(bb10;\s(\w+)/i // BlackBerry 10 | ||
], [MODEL, [VENDOR, 'BlackBerry'], [TYPE, MOBILE]], [ | ||
// Asus | ||
/\b(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus\s7|padfone|p00c)/i | ||
], [MODEL, [VENDOR, 'ASUS'], [TYPE, TABLET]], [ | ||
/\s(z[es]6[027][01][km][ls]|zenfone\s\d\w?)\b/i | ||
], [MODEL, [VENDOR, 'ASUS'], [TYPE, MOBILE]], [ | ||
/(lenovo)\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+)|[\w-]+)/i // Lenovo tablets | ||
], [VENDOR, MODEL, [TYPE, TABLET]], [ | ||
/droid.+(ideatab[a-z0-9\-\s]+)/i // Lenovo | ||
], [MODEL, [VENDOR, 'Lenovo'], [TYPE, TABLET]], [ | ||
/(lenovo)[_\s-]?([\w-]+)/i | ||
], [VENDOR, MODEL, [TYPE, MOBILE]], [ | ||
// HTC | ||
/(nexus\s9)/i // HTC Nexus 9 | ||
], [MODEL, [VENDOR, 'HTC'], [TYPE, TABLET]], [ | ||
/(htc)[;_\s-]{1,2}([\w\s]+(?=\)|\sbuild)|\w+)/i, // HTC | ||
/linux;.+((jolla));/i // Jolla | ||
], [VENDOR, MODEL, [TYPE, MOBILE]], [ | ||
// ZTE | ||
/(zte)-(\w*)/i, | ||
/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i // Alcatel/GeeksPhone/Nexian/Panasonic/Sony | ||
], [VENDOR, [MODEL, /_/g, ' '], [TYPE, MOBILE]], [ | ||
/((pebble))app\/[\d\.]+\s/i // Pebble | ||
], [VENDOR, MODEL, [TYPE, WEARABLE]], [ | ||
// Acer | ||
/droid[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i | ||
], [MODEL, [VENDOR, 'Acer'], [TYPE, TABLET]], [ | ||
// Meizu | ||
/droid.+;\s(m[1-5]\snote)\sbuild/i, | ||
/\bmz-([\w-]{2,})/i | ||
], [MODEL, [VENDOR, 'Meizu'], [TYPE, MOBILE]], [ | ||
// MIXED | ||
/(blackberry)[\s-]?(\w+)/i, // BlackBerry | ||
/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i, | ||
// BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron | ||
/(hp)\s([\w\s]+\w)/i, // HP iPAQ | ||
/(asus)-?(\w+)/i, // Asus | ||
/(microsoft);\s(lumia[\s\w]+)/i, // Microsoft Lumia | ||
/(lenovo)[_\s-]?([\w-]+)/i, // Lenovo | ||
/linux;.+(jolla);/i, // Jolla | ||
/droid.+;\s(oppo)\s?([\w\s]+)\sbuild/i // OPPO | ||
], [VENDOR, MODEL, [TYPE, MOBILE]], [ | ||
/crkey/i // Google Chromecast | ||
], [[MODEL, 'Chromecast'], [VENDOR, 'Google'], [TYPE, SMARTTV]], [ | ||
/(archos)\s(gamepad2?)/i, // Archos | ||
/(hp).+(touchpad)/i, // HP TouchPad | ||
/(hp).+(tablet)/i, // HP Tablet | ||
/(kindle)\/([\w\.]+)/i, // Kindle | ||
/\s(nook)[\w\s]+build\/(\w+)/i, // Nook | ||
/(dell)\s(strea[kpr\s\d]*[\dko])/i, // Dell Streak | ||
/[;\/]\s?(le[\s\-]+pan)[\s\-]+(\w{1,9})\sbuild/i, // Le Pan Tablets | ||
/[;\/]\s?(trinity)[\-\s]*(t\d{3})\sbuild/i, // Trinity Tablets | ||
/\b(gigaset)[\s\-]+(q\w{1,9})\sbuild/i, // Gigaset Tablets | ||
/\b(vodafone)\s([\w\s]+)(?:\)|\sbuild)/i // Vodafone | ||
], [VENDOR, MODEL, [TYPE, TABLET]], [ | ||
/droid.+;\s(glass)\s\d/i // Google Glass | ||
], [MODEL, [VENDOR, 'Google'], [TYPE, WEARABLE]], [ | ||
/droid.+;\s(pixel c)[\s)]/i // Google Pixel C | ||
], [MODEL, [VENDOR, 'Google'], [TYPE, TABLET]], [ | ||
/droid.+;\s(pixel( [2-9]a?)?( xl)?)[\s)]/i // Google Pixel | ||
], [MODEL, [VENDOR, 'Google'], [TYPE, MOBILE]], [ | ||
/droid.+;\s(\w+)\s+build\/hm\1/i, // Xiaomi Hongmi 'numeric' models | ||
/droid.+(hm[\s\-_]?note?[\s_]?(?:\d\w)?)\sbuild/i, // Xiaomi Hongmi | ||
/droid.+(redmi[\s\-_]?(?:note|k)?(?:[\s_]?[\w\s]+))(?:\sbuild|\))/i, | ||
// Xiaomi Redmi | ||
/droid.+(mi[\s\-_]?(?:a\d|one|one[\s_]plus|note lte)?[\s_]?(?:\d?\w?)[\s_]?(?:plus)?)\sbuild/i | ||
// Xiaomi Mi | ||
], [[MODEL, /_/g, ' '], [VENDOR, 'Xiaomi'], [TYPE, MOBILE]], [ | ||
/droid.+(mi[\s\-_]?(?:pad)(?:[\s_]?[\w\s]+))(?:\sbuild|\))/i // Mi Pad tablets | ||
],[[MODEL, /_/g, ' '], [VENDOR, 'Xiaomi'], [TYPE, TABLET]], [ | ||
/droid.+;\s(m[1-5]\snote)\sbuild/i // Meizu | ||
], [MODEL, [VENDOR, 'Meizu'], [TYPE, MOBILE]], [ | ||
/(mz)-([\w-]{2,})/i | ||
], [[VENDOR, 'Meizu'], MODEL, [TYPE, MOBILE]], [ | ||
/droid.+a000(1)\s+build/i, // OnePlus | ||
/droid.+oneplus\s(a\d{4})[\s)]/i | ||
], [MODEL, [VENDOR, 'OnePlus'], [TYPE, MOBILE]], [ | ||
/droid.+[;\/]\s*(RCT[\d\w]+)\s+build/i // RCA Tablets | ||
/\s(surface\sduo)\s/i // Surface Duo | ||
], [MODEL, [VENDOR, 'Microsoft'], [TYPE, TABLET]], [ | ||
/\s(u304aa)\sbuild/i // AT&T | ||
], [MODEL, [VENDOR, 'AT&T'], [TYPE, MOBILE]], [ | ||
/sie-(\w*)/i // Siemens | ||
], [MODEL, [VENDOR, 'Siemens'], [TYPE, MOBILE]], [ | ||
/[;\/]\s?(rct\w+)\sbuild/i // RCA Tablets | ||
], [MODEL, [VENDOR, 'RCA'], [TYPE, TABLET]], [ | ||
/droid.+[;\/\s](Venue[\d\s]{2,7})\s+build/i // Dell Venue Tablets | ||
/[;\/\s](venue[\d\s]{2,7})\sbuild/i // Dell Venue Tablets | ||
], [MODEL, [VENDOR, 'Dell'], [TYPE, TABLET]], [ | ||
/droid.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i // Verizon Tablet | ||
/[;\/]\s?(q(?:mv|ta)\w+)\sbuild/i // Verizon Tablet | ||
], [MODEL, [VENDOR, 'Verizon'], [TYPE, TABLET]], [ | ||
/droid.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(\S(?:.*\S)?)\s+build/i | ||
], [[VENDOR, 'Barnes & Noble'], MODEL, [TYPE, TABLET]], [ | ||
/droid.+[;\/]\s+(TM\d{3}.*\b)\s+build/i // Barnes & Noble Tablet | ||
/[;\/]\s(?:barnes[&\s]+noble\s|bn[rt])([\w\s\+]*)\sbuild/i // Barnes & Noble Tablet | ||
], [MODEL, [VENDOR, 'Barnes & Noble'], [TYPE, TABLET]], [ | ||
/[;\/]\s(tm\d{3}\w+)\sbuild/i | ||
], [MODEL, [VENDOR, 'NuVision'], [TYPE, TABLET]], [ | ||
/droid.+;\s(k88)\sbuild/i // ZTE K Series Tablet | ||
/;\s(k88)\sbuild/i // ZTE K Series Tablet | ||
], [MODEL, [VENDOR, 'ZTE'], [TYPE, TABLET]], [ | ||
/droid.+;\s(nx\d{3}j)\sbuild/i // ZTE Nubia | ||
/;\s(nx\d{3}j)\sbuild/i // ZTE Nubia | ||
], [MODEL, [VENDOR, 'ZTE'], [TYPE, MOBILE]], [ | ||
/droid.+[;\/]\s*(gen\d{3})\s+build.*49h/i // Swiss GEN Mobile | ||
/[;\/]\s?(gen\d{3})\sbuild.*49h/i // Swiss GEN Mobile | ||
], [MODEL, [VENDOR, 'Swiss'], [TYPE, MOBILE]], [ | ||
/droid.+[;\/]\s*(zur\d{3})\s+build/i // Swiss ZUR Tablet | ||
/[;\/]\s?(zur\d{3})\sbuild/i // Swiss ZUR Tablet | ||
], [MODEL, [VENDOR, 'Swiss'], [TYPE, TABLET]], [ | ||
/droid.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i // Zeki Tablets | ||
/[;\/]\s?((zeki)?tb.*\b)\sbuild/i // Zeki Tablets | ||
], [MODEL, [VENDOR, 'Zeki'], [TYPE, TABLET]], [ | ||
/(android).+[;\/]\s+([YR]\d{2})\s+build/i, | ||
/droid.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(\w{5})\sbuild/i // Dragon Touch Tablet | ||
/[;\/]\s([yr]\d{2})\sbuild/i, | ||
/[;\/]\s(dragon[\-\s]+touch\s|dt)(\w{5})\sbuild/i // Dragon Touch Tablet | ||
], [[VENDOR, 'Dragon Touch'], MODEL, [TYPE, TABLET]], [ | ||
/droid.+[;\/]\s*(NS-?\w{0,9})\sbuild/i // Insignia Tablets | ||
/[;\/]\s?(ns-?\w{0,9})\sbuild/i // Insignia Tablets | ||
], [MODEL, [VENDOR, 'Insignia'], [TYPE, TABLET]], [ | ||
/droid.+[;\/]\s*((NXA|Next)-?\w{0,9})\s+build/i // NextBook Tablets | ||
/[;\/]\s?((nxa|Next)-?\w{0,9})\sbuild/i // NextBook Tablets | ||
], [MODEL, [VENDOR, 'NextBook'], [TYPE, TABLET]], [ | ||
/droid.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i | ||
/[;\/]\s?(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05]))\sbuild/i | ||
], [[VENDOR, 'Voice'], MODEL, [TYPE, MOBILE]], [ // Voice Xtreme Phones | ||
/droid.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i // LvTel Phones | ||
/[;\/]\s?(lvtel\-)?(v1[12])\sbuild/i // LvTel Phones | ||
], [[VENDOR, 'LvTel'], MODEL, [TYPE, MOBILE]], [ | ||
/droid.+;\s(PH-1)\s/i | ||
/;\s(ph-1)\s/i | ||
], [MODEL, [VENDOR, 'Essential'], [TYPE, MOBILE]], [ // Essential PH-1 | ||
/droid.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i // Envizen Tablets | ||
/[;\/]\s?(v(100md|700na|7011|917g).*\b)\sbuild/i // Envizen Tablets | ||
], [MODEL, [VENDOR, 'Envizen'], [TYPE, TABLET]], [ | ||
/[;\/]\s?(trio[\s\w\-\.]+)\sbuild/i // MachSpeed Tablets | ||
], [MODEL, [VENDOR, 'MachSpeed'], [TYPE, TABLET]], [ | ||
/[;\/]\s?tu_(1491)\sbuild/i // Rotor Tablets | ||
], [MODEL, [VENDOR, 'Rotor'], [TYPE, TABLET]], [ | ||
/(shield[\w\s]+)\sbuild/i // Nvidia Shield Tablets | ||
], [MODEL, [VENDOR, 'Nvidia'], [TYPE, TABLET]], [ | ||
/(sprint)\s(\w+)/i // Sprint Phones | ||
], [VENDOR, MODEL, [TYPE, MOBILE]], [ | ||
/(kin\.[onetw]{3})/i // Microsoft Kin | ||
], [[MODEL, /\./g, ' '], [VENDOR, 'Microsoft'], [TYPE, MOBILE]], [ | ||
/droid\s[\d\.]+;\s(cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i // Zebra | ||
], [MODEL, [VENDOR, 'Zebra'], [TYPE, TABLET]], [ | ||
/droid\s[\d\.]+;\s(ec30|ps20|tc[2-8]\d[kx])\)/i | ||
], [MODEL, [VENDOR, 'Zebra'], [TYPE, MOBILE]], [ | ||
/droid.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i // Le Pan Tablets | ||
], [VENDOR, MODEL, [TYPE, TABLET]], [ | ||
/////////////////// | ||
// CONSOLES | ||
/////////////////// | ||
/droid.+[;\/]\s*(Trio[\s\w\-\.]+)\s+build/i // MachSpeed Tablets | ||
], [MODEL, [VENDOR, 'MachSpeed'], [TYPE, TABLET]], [ | ||
/\s(ouya)\s/i, // Ouya | ||
/(nintendo)\s([wids3utch]+)/i // Nintendo | ||
], [VENDOR, MODEL, [TYPE, CONSOLE]], [ | ||
/droid.+;\s(shield)\sbuild/i // Nvidia | ||
], [MODEL, [VENDOR, 'Nvidia'], [TYPE, CONSOLE]], [ | ||
/(playstation\s[345portablevi]+)/i // Playstation | ||
], [MODEL, [VENDOR, 'Sony'], [TYPE, CONSOLE]], [ | ||
/[\s\(;](xbox(?:\sone)?(?!;\sxbox))[\s\);]/i // Microsoft Xbox | ||
], [MODEL, [VENDOR, 'Microsoft'], [TYPE, CONSOLE]], [ | ||
/droid.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i // Trinity Tablets | ||
], [VENDOR, MODEL, [TYPE, TABLET]], [ | ||
/////////////////// | ||
// SMARTTVS | ||
/////////////////// | ||
/droid.+[;\/]\s*TU_(1491)\s+build/i // Rotor Tablets | ||
], [MODEL, [VENDOR, 'Rotor'], [TYPE, TABLET]], [ | ||
/smart-tv.+(samsung)/i // Samsung | ||
], [VENDOR, [TYPE, SMARTTV], MODEL], [ | ||
/hbbtv.+maple;(\d+)/i | ||
], [[MODEL, /^/, 'SmartTV'], [VENDOR, 'Samsung'], [TYPE, SMARTTV]], [ | ||
/linux;\snetcast.+smarttv/i, // LG SmartTV | ||
/lg\snetcast\.tv-201\d/i | ||
], [[VENDOR, 'LG'], MODEL, [TYPE, SMARTTV]], [ | ||
/(apple)\s?tv/i // Apple TV | ||
], [VENDOR, [MODEL, 'Apple TV'], [TYPE, SMARTTV]], [ | ||
/crkey/i // Google Chromecast | ||
], [[MODEL, 'Chromecast'], [VENDOR, 'Google'], [TYPE, SMARTTV]], [ | ||
/droid.+aft([\w])(\sbuild\/|\))/i // Fire TV | ||
], [MODEL, [VENDOR, 'Amazon'], [TYPE, SMARTTV]], [ | ||
/\(dtv[\);].+(aquos)/i // Sharp | ||
], [MODEL, [VENDOR, 'Sharp'], [TYPE, SMARTTV]], [ | ||
/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i // HbbTV devices | ||
], [[VENDOR, util.trim], [MODEL, util.trim], [TYPE, SMARTTV]], [ | ||
/[\s\/\(](android\s|smart[-\s]?|opera\s)tv[;\)\s]/i // SmartTV from Unidentified Vendors | ||
], [[TYPE, SMARTTV]], [ | ||
//android.+(KS(.+))\s+build/i // Amazon Kindle Tablets | ||
//], [MODEL, [VENDOR, 'Amazon'], [TYPE, TABLET]], [ | ||
/////////////////// | ||
// WEARABLES | ||
/////////////////// | ||
/droid.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i // Gigaset Tablets | ||
], [VENDOR, MODEL, [TYPE, TABLET]], [ | ||
/((pebble))app\/[\d\.]+\s/i // Pebble | ||
], [VENDOR, MODEL, [TYPE, WEARABLE]], [ | ||
/droid.+;\s(glass)\s\d/i // Google Glass | ||
], [MODEL, [VENDOR, 'Google'], [TYPE, WEARABLE]], [ | ||
/droid\s[\d\.]+;\s(wt63?0{2,3})\)/i | ||
], [MODEL, [VENDOR, 'Zebra'], [TYPE, WEARABLE]], [ | ||
/[\s\/\(](android\stv|smart-?tv)[;\)\s]/i // SmartTV from Unidentified Vendors | ||
], [[TYPE, SMARTTV]], [ | ||
// Android Phones from Unidentified Vendors | ||
/droid .+?; ([^;]+?)(?: build|\) applewebkit).+? mobile safari/i | ||
//////////////////// | ||
// MIXED (GENERIC) | ||
/////////////////// | ||
/droid .+?; ([^;]+?)(?: build|\) applewebkit).+? mobile safari/i // Android Phones from Unidentified Vendors | ||
], [MODEL, [TYPE, MOBILE]], [ | ||
// Android Tablets from Unidentified Vendors | ||
/droid .+?;\s([^;]+?)(?: build|\) applewebkit).+?(?! mobile) safari/i | ||
/droid .+?;\s([^;]+?)(?: build|\) applewebkit).+?(?! mobile) safari/i // Android Tablets from Unidentified Vendors | ||
], [MODEL, [TYPE, TABLET]], [ | ||
/\s(tablet|tab)[;\/]/i, // Unidentifiable Tablet | ||
/\s(mobile)(?:[;\/]|\ssafari)/i // Unidentifiable Mobile | ||
], [[TYPE, util.lowerize], VENDOR, MODEL], [ | ||
], [[TYPE, util.lowerize]], [ | ||
/(android[\w\.\s\-]{0,9});.+build/i // Generic Android Device | ||
], [MODEL, [VENDOR, 'Generic']], [ | ||
/(phone)/i | ||
@@ -716,3 +688,3 @@ ], [[TYPE, MOBILE]] | ||
/rv\:([\w\.]{1,9}).+(gecko)/i // Gecko | ||
/rv\:([\w\.]{1,9})\b.+(gecko)/i // Gecko | ||
], [VERSION, NAME] | ||
@@ -723,6 +695,3 @@ ], | ||
// Xbox, consider this before other Windows-based devices | ||
/(xbox);\s+xbox\s([^\);]+)/i, // Microsoft Xbox (360, One, X, S, Series X, Series S) | ||
// Windows based | ||
// Windows | ||
/microsoft\s(windows)\s(vista|xp)/i // Windows (iTunes) | ||
@@ -732,3 +701,3 @@ ], [NAME, VERSION], [ | ||
/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i, // Windows Phone | ||
/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i | ||
/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)(?!.+xbox)/i | ||
], [NAME, [VERSION, mapper.str, maps.os.windows.version]], [ | ||
@@ -738,16 +707,26 @@ /(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i | ||
// Mobile/Embedded OS | ||
/\((bb)(10);/i // BlackBerry 10 | ||
], [[NAME, 'BlackBerry'], VERSION], [ | ||
/(blackberry)\w*\/?([\w\.]*)/i, // Blackberry | ||
/(tizen|kaios)[\/\s]([\w\.]+)/i, // Tizen/KaiOS | ||
/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i | ||
// iOS/macOS | ||
/ip[honead]{2,4}\b(?:.*os\s([\w]+)\slike\smac|;\sopera)/i, // iOS | ||
/cfnetwork\/.+darwin/i | ||
], [[VERSION, /_/g, '.'], [NAME, 'iOS']], [ | ||
/(mac\sos\sx)\s?([\w\s\.]*)/i, | ||
/(macintosh|mac(?=_powerpc)\s)(?!.+haiku)/i // Mac OS | ||
], [[NAME, 'Mac OS'], [VERSION, /_/g, '.']], [ | ||
// Mobile OSes | ||
/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i, | ||
// Android/WebOS/Palm/QNX/Bada/RIM/MeeGo/Contiki/Sailfish OS | ||
/(blackberry)\w*\/([\w\.]*)/i, // Blackberry | ||
/(tizen|kaios)[\/\s]([\w\.]+)/i // Tizen/KaiOS | ||
], [NAME, VERSION], [ | ||
/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]*)/i // Symbian | ||
], [[NAME, 'Symbian'], VERSION], [ | ||
/\(bb(10);/i // BlackBerry 10 | ||
], [VERSION, [NAME, 'BlackBerry']], [ | ||
/(?:symbian\s?os|symbos|s60(?=;)|series60)[\/\s-]?([\w\.]*)/i // Symbian | ||
], [VERSION, [NAME, 'Symbian']], [ | ||
/\((series40);/i // Series 40 | ||
], [NAME], [ | ||
/mozilla.+\(mobile;.+gecko.+firefox/i // Firefox OS | ||
], [[NAME, 'Firefox OS'], VERSION], [ | ||
], [[NAME, 'Firefox OS']], [ | ||
/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i // WebOS | ||
], [VERSION, [NAME, 'webOS']], [ | ||
@@ -760,7 +739,8 @@ // Google Chromecast | ||
/(nintendo|playstation)\s([wids345portablevuch]+)/i, // Nintendo/Playstation | ||
/(xbox);\s+xbox\s([^\);]+)/i, // Microsoft Xbox (360, One, X, S, Series X, Series S) | ||
// GNU/Linux based | ||
/(mint)[\/\s\(]?(\w*)/i, // Mint | ||
/(mint)[\/\s\(\)]?(\w*)/i, // Mint | ||
/(mageia|vectorlinux)[;\s]/i, // Mageia/VectorLinux | ||
/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|(?=\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?(?!chrom)([\w\.-]*)/i, | ||
/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?=\slinux)|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus|raspbian)(?:\sgnu\/linux)?(?:\slinux)?[\/\s-]?(?!chrom|package)([\w\.-]*)/i, | ||
// Joli/Ubuntu/Debian/SUSE/Gentoo/Arch/Slackware | ||
@@ -780,3 +760,3 @@ // Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk/Linpus | ||
// BSD based | ||
/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]*)/i // FreeBSD/NetBSD/OpenBSD/PC-BSD/DragonFly | ||
/\s([frentopc-]{0,4}bsd|dragonfly)\s?(?!amd|[ix346]{1,2}86)([\w\.]*)/i // FreeBSD/NetBSD/OpenBSD/PC-BSD/DragonFly | ||
], [NAME, VERSION],[ | ||
@@ -787,10 +767,2 @@ | ||
/cfnetwork\/.+darwin/i, | ||
/ip[honead]{2,4}(?:.*os\s([\w]+)\slike\smac|;\sopera)/i // iOS | ||
], [[VERSION, /_/g, '.'], [NAME, 'iOS']], [ | ||
/(mac\sos\sx)\s?([\w\s\.]*)/i, | ||
/(macintosh|mac(?=_powerpc)\s)/i // Mac OS | ||
], [[NAME, 'Mac OS'], [VERSION, /_/g, '.']], [ | ||
// Other | ||
@@ -810,41 +782,41 @@ /((?:open)?solaris)[\/\s-]?([\w\.]*)/i, // Solaris | ||
//////////////// | ||
var UAParser = function (uastring, extensions) { | ||
var UAParser = function (ua, extensions) { | ||
if (typeof uastring === 'object') { | ||
extensions = uastring; | ||
uastring = undefined; | ||
if (typeof ua === 'object') { | ||
extensions = ua; | ||
ua = undefined; | ||
} | ||
if (!(this instanceof UAParser)) { | ||
return new UAParser(uastring, extensions).getResult(); | ||
return new UAParser(ua, extensions).getResult(); | ||
} | ||
var _ua = ua || ((typeof window !== 'undefined' && window.navigator && window.navigator.userAgent) ? window.navigator.userAgent : EMPTY); | ||
var _rgxmap = extensions ? util.extend(regexes, extensions) : regexes; | ||
var ua = uastring || ((typeof window !== 'undefined' && window.navigator && window.navigator.userAgent) ? window.navigator.userAgent : EMPTY); | ||
var rgxmap = extensions ? util.extend(regexes, extensions) : regexes; | ||
this.getBrowser = function () { | ||
var browser = { name: undefined, version: undefined }; | ||
mapper.rgx.call(browser, ua, rgxmap.browser); | ||
browser.major = util.major(browser.version); // deprecated | ||
return browser; | ||
var _browser = { name: undefined, version: undefined }; | ||
mapper.rgx.call(_browser, _ua, _rgxmap.browser); | ||
_browser.major = util.major(_browser.version); // deprecated | ||
return _browser; | ||
}; | ||
this.getCPU = function () { | ||
var cpu = { architecture: undefined }; | ||
mapper.rgx.call(cpu, ua, rgxmap.cpu); | ||
return cpu; | ||
var _cpu = { architecture: undefined }; | ||
mapper.rgx.call(_cpu, _ua, _rgxmap.cpu); | ||
return _cpu; | ||
}; | ||
this.getDevice = function () { | ||
var device = { vendor: undefined, model: undefined, type: undefined }; | ||
mapper.rgx.call(device, ua, rgxmap.device); | ||
return device; | ||
var _device = { vendor: undefined, model: undefined, type: undefined }; | ||
mapper.rgx.call(_device, _ua, _rgxmap.device); | ||
return _device; | ||
}; | ||
this.getEngine = function () { | ||
var engine = { name: undefined, version: undefined }; | ||
mapper.rgx.call(engine, ua, rgxmap.engine); | ||
return engine; | ||
var _engine = { name: undefined, version: undefined }; | ||
mapper.rgx.call(_engine, _ua, _rgxmap.engine); | ||
return _engine; | ||
}; | ||
this.getOS = function () { | ||
var os = { name: undefined, version: undefined }; | ||
mapper.rgx.call(os, ua, rgxmap.os); | ||
return os; | ||
var _os = { name: undefined, version: undefined }; | ||
mapper.rgx.call(_os, _ua, _rgxmap.os); | ||
return _os; | ||
}; | ||
@@ -862,8 +834,9 @@ this.getResult = function () { | ||
this.getUA = function () { | ||
return ua; | ||
return _ua; | ||
}; | ||
this.setUA = function (uastring) { | ||
ua = uastring; | ||
this.setUA = function (ua) { | ||
_ua = ua.length > UA_MAX_LENGTH ? util.trim(ua, UA_MAX_LENGTH) : ua; | ||
return this; | ||
}; | ||
this.setUA(_ua); | ||
return this; | ||
@@ -870,0 +843,0 @@ }; |
@@ -1112,3 +1112,3 @@ [ | ||
{ | ||
"desc" : "Microsoft Edge", | ||
"desc" : "Microsoft Edge 0.1", | ||
"ua" : "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0", | ||
@@ -1118,7 +1118,27 @@ "expect" : | ||
"name" : "Edge", | ||
"version" : "12.0", | ||
"major" : "12" | ||
"version" : "0.1", | ||
"major" : "0" | ||
} | ||
}, | ||
{ | ||
"desc" : "Microsoft Edge 42", | ||
"ua" : "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/17.17134", | ||
"expect" : | ||
{ | ||
"name" : "Edge", | ||
"version" : "42", | ||
"major" : "42" | ||
} | ||
}, | ||
{ | ||
"desc" : "Microsoft Edge 44", | ||
"ua" : "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/18.17763", | ||
"expect" : | ||
{ | ||
"name" : "Edge", | ||
"version" : "44", | ||
"major" : "44" | ||
} | ||
}, | ||
{ | ||
"desc" : "Microsoft Edge on iOS", | ||
@@ -1308,3 +1328,13 @@ "ua" : "Mozilla/5.0 (iPhone; CPU iPhone OS 11_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.0 EdgiOS/42.1.1.0 Mobile/15F79 Safari/605.1.15", | ||
} | ||
}, | ||
{ | ||
"desc" : "Electron", | ||
"ua" : "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Atom/1.41.0 Chrome/69.0.3497.128 Electron/4.2.7 Safari/537.36", | ||
"expect" : | ||
{ | ||
"name" : "Electron", | ||
"version" : "4.2.7", | ||
"major" : "4" | ||
} | ||
} | ||
] |
@@ -43,3 +43,11 @@ [ | ||
{ | ||
"desc" : "ARMv6", | ||
"desc" : "ARM", | ||
"ua" : "Mozilla/5.0 (Mobile; Windows Phone 8.1; Android 4.0; ARM; Trident/7.0; Touch; rv:11.0; IEMobile/11.0; NOKIA; Lumia 635) like iPhone OS 7_0_3 Mac OS X AppleWebKit/537 (KHTML, like Gecko) Mobile Safari/537", | ||
"expect" : | ||
{ | ||
"architecture" : "arm" | ||
} | ||
}, | ||
{ | ||
"desc" : "ARMv61", | ||
"ua" : "Mozilla/5.0 (X11; U; Linux armv61; en-US; rv:1.9.1b2pre) Gecko/20081015 Fennec/1.0a1", | ||
@@ -53,2 +61,18 @@ "expect" : | ||
"desc" : "ARMv7", | ||
"ua" : "Mozilla/5.0 (Linux ARMv7) WebKitGTK+/3.4.9 vimprobable2", | ||
"expect" : | ||
{ | ||
"architecture" : "arm" | ||
} | ||
}, | ||
{ | ||
"desc" : "ARMv7l", | ||
"ua" : "Mozilla/5.0 (SMART-TV; X11; Linux armv7l) AppleWebKit/537.42 (KHTML, like Gecko) Chromium/25.0.1349.2 Chrome/25.0.1349.2 Safari/537.42", | ||
"expect" : | ||
{ | ||
"architecture" : "arm" | ||
} | ||
}, | ||
{ | ||
"desc" : "ARMv7l", | ||
"ua" : "Mozilla/5.0 (X11; CrOS armv7l 9765.85.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.123 Safari/537.36", | ||
@@ -61,2 +85,26 @@ "expect" : | ||
{ | ||
"desc" : "ARMEABI", | ||
"ua" : "[FBAN/FB4A;FBAV/237.0.0.44.120;FBBV/170693408;FBDM/{density=1.75,width=720,height=1280};FBLC/en_US;FBRV/172067074;FBCR/ ;FBMF/samsung;FBBD/samsung;FBPN/com.facebook.katana;FBDV/SM-S367VL;FBSV/9;FBBK/1;FBOP/19;FBCA/armeabi-v7a:armeabi;]", | ||
"expect" : | ||
{ | ||
"architecture" : "arm" | ||
} | ||
}, | ||
{ | ||
"desc" : "ARMv8", | ||
"ua" : "Mozilla/5.0 (X11; Linux armv8l; rv:45.0) Gecko/20100101 Firefox/45.0", | ||
"expect" : | ||
{ | ||
"architecture" : "arm64" | ||
} | ||
}, | ||
{ | ||
"desc" : "AARCH64", | ||
"ua" : "Mozilla/5.0 (X11; CrOS aarch64 13310.93.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.133 Safari/537.36", | ||
"expect" : | ||
{ | ||
"architecture" : "arm64" | ||
} | ||
}, | ||
{ | ||
"desc" : "Pocket PC", | ||
@@ -102,2 +150,10 @@ "ua" : "Opera/9.7 (Windows Mobile; PPC; Opera Mobi/35166; U; en) Presto/2.2.1", | ||
{ | ||
"desc" : "sparc64", | ||
"ua" : "ELinks (0.4.3; NetBSD 3.0.2PATCH sparc64; 141x19)", | ||
"expect" : | ||
{ | ||
"architecture" : "sparc64" | ||
} | ||
}, | ||
{ | ||
"desc" : "QuickTime", | ||
@@ -117,3 +173,11 @@ "ua" : "QuickTime/7.5.6 (qtver=7.5.6;cpu=IA32;os=Mac 10.5.8)", | ||
} | ||
}, | ||
{ | ||
"desc" : "IRIX64", | ||
"ua" : "Mozilla/4.8C-SGI [en] (X11; U; IRIX64 6.5 IP27", | ||
"expect" : | ||
{ | ||
"architecture" : "irix64" | ||
} | ||
} | ||
] |
@@ -157,2 +157,11 @@ [ | ||
"desc" : "Tizen", | ||
"ua" : "Mozilla/5.0 (SMART-TV; Linux; Tizen 2.3) AppleWebkit/538.1 (KHTML, like Gecko) SamsungBrowser/1.0 TV Safari/538.1", | ||
"expect" : | ||
{ | ||
"name" : "Tizen", | ||
"version" : "2.3" | ||
} | ||
}, | ||
{ | ||
"desc" : "Tizen", | ||
"ua" : "Mozilla/5.0 (Linux; Tizen 2.3; SAMSUNG SM-Z130H) AppleWebKit/537.3 (KHTML, like Gecko) Version/2.3 Mobile Safari/537.3", | ||
@@ -185,16 +194,16 @@ "expect" : | ||
"desc" : "WebOS", | ||
"ua" : "", | ||
"ua" : "Mozilla/5.0 (hp-tablet; Linux; hpwOS/3.0.5; U; en-US) AppleWebKit/534.6 (KHTML, like Gecko) wOSBrowser/234.83 Safari/534.6 TouchPad/1.0", | ||
"expect" : | ||
{ | ||
"name" : "", | ||
"version" : "" | ||
"name" : "webOS", | ||
"version" : "3.0.5" | ||
} | ||
}, | ||
{ | ||
"desc" : "Palm OS", | ||
"ua" : "", | ||
"desc" : "WebOS", | ||
"ua" : "Mozilla/5.0 (webOS/1.4.5; U; en-US) AppleWebKit/532.2 (KHTML, like Gecko) Version/1.0 Safari/532.2 Pre/1.0", | ||
"expect" : | ||
{ | ||
"name" : "", | ||
"version" : "" | ||
"name" : "webOS", | ||
"version" : "1.4.5" | ||
} | ||
@@ -204,7 +213,7 @@ }, | ||
"desc" : "QNX", | ||
"ua" : "", | ||
"ua" : "Mozilla/5.0 (Photon; U; QNX x86pc; en-US; rv:1.8.1.20) Gecko/20090127 BonEcho/2.0.0.20", | ||
"expect" : | ||
{ | ||
"name" : "", | ||
"version" : "" | ||
"name" : "QNX", | ||
"version" : "x86pc" | ||
} | ||
@@ -214,7 +223,7 @@ }, | ||
"desc" : "Bada", | ||
"ua" : "", | ||
"ua" : "Mozilla/5.0 (SAMSUNG; SAMSUNG-GT-S5253/S5253DDKC1; U; Bada/1.0; en-us) AppleWebKit/533.1 (KHTML, like Gecko) Dolfin/2.0 Mobile WQVGA SMM-MMS/1.2.0 OPN-B", | ||
"expect" : | ||
{ | ||
"name" : "", | ||
"version" : "" | ||
"name" : "Bada", | ||
"version" : "1.0" | ||
} | ||
@@ -224,7 +233,7 @@ }, | ||
"desc" : "RIM Tablet OS", | ||
"ua" : "", | ||
"ua" : "Mozilla/5.0 (PlayBook; U; RIM Tablet OS 2.1.0; en-US) AppleWebKit/536.2+ (KHTML like Gecko) Version/7.2.1.0 Safari/536.2+", | ||
"expect" : | ||
{ | ||
"name" : "", | ||
"version" : "" | ||
"name" : "RIM Tablet OS", | ||
"version" : "2.1.0" | ||
} | ||
@@ -234,7 +243,7 @@ }, | ||
"desc" : "MeeGo", | ||
"ua" : "", | ||
"ua" : "Mozilla/5.0 (MeeGo; NokiaN9) AppleWebKit/534.13 (KHTML, like Gecko) NokiaBrowser/8.5.0 Mobile Safari/534.13", | ||
"expect" : | ||
{ | ||
"name" : "", | ||
"version" : "" | ||
"name" : "MeeGo", | ||
"version" : "undefined" | ||
} | ||
@@ -244,10 +253,28 @@ }, | ||
"desc" : "Symbian", | ||
"ua" : "", | ||
"ua" : "Nokia5250/10.0.011 (SymbianOS/9.4; U; Series60/5.0 Mozilla/5.0; Profile/MIDP-2.1 Configuration/CLDC-1.1 ) AppleWebKit/525 (KHTML, like Gecko) Safari/525 3gpp-gba", | ||
"expect" : | ||
{ | ||
"name" : "", | ||
"version" : "" | ||
"name" : "Symbian", | ||
"version" : "9.4" | ||
} | ||
}, | ||
{ | ||
"desc" : "Symbian", | ||
"ua" : "Mozilla/5.0 (Symbian/3; Series60/5.2 NokiaC7-00/024.001; Profile/MIDP-2.1 Configuration/CLDC-1.1 ) AppleWebKit/533.4 (KHTML, like Gecko) NokiaBrowser/7.3.1.37 Mobile Safari/533.4 3gpp-gba", | ||
"expect" : | ||
{ | ||
"name" : "Symbian", | ||
"version" : "5.2" | ||
} | ||
}, | ||
{ | ||
"desc" : "Series40", | ||
"ua" : "Mozilla/5.0 (Series40; Nokia2055/03.20; Profile/MIDP-2.1 Configuration/CLDC-1.1) Gecko/20100401 S40OviBrowser/2.2.0.0.34", | ||
"expect" : | ||
{ | ||
"name" : "Series40", | ||
"version" : "undefined" | ||
} | ||
}, | ||
{ | ||
"desc" : "Firefox OS", | ||
@@ -280,11 +307,2 @@ "ua" : "Mozilla/5.0 (Mobile; rv:14.0) Gecko/14.0 Firefox/14.0", | ||
{ | ||
"desc" : "PlayStation", | ||
"ua" : "", | ||
"expect" : | ||
{ | ||
"name" : "", | ||
"version" : "" | ||
} | ||
}, | ||
{ | ||
"desc" : "PlayStation 4", | ||
@@ -336,19 +354,28 @@ "ua" : "Mozilla/5.0 (PlayStation 4 3.00) AppleWebKit/537.73 (KHTML, like Gecko)", | ||
"desc" : "Mint", | ||
"ua" : "", | ||
"ua" : "Opera/9.80 (X11; Linux x86_64; Edition Linux Mint) Presto/2.12.388 Version/12.16", | ||
"expect" : | ||
{ | ||
"name" : "", | ||
"version" : "" | ||
"name" : "Mint", | ||
"version" : "undefined" | ||
} | ||
}, | ||
{ | ||
"desc" : "Joli", | ||
"ua" : "", | ||
"desc" : "Mint", | ||
"ua" : "Opera/9.64 (X11; Linux i686; U; Linux Mint; nb) Presto/2.1.1", | ||
"expect" : | ||
{ | ||
"name" : "", | ||
"version" : "" | ||
"name" : "Mint", | ||
"version" : "undefined" | ||
} | ||
}, | ||
{ | ||
"desc" : "Mint", | ||
"ua" : "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.5) Gecko/2008121622 Linux Mint/6 (Felicia) Firefox/3.0.4", | ||
"expect" : | ||
{ | ||
"name" : "Mint", | ||
"version" : "6" | ||
} | ||
}, | ||
{ | ||
"desc" : "Ubuntu", | ||
@@ -372,111 +399,120 @@ "ua" : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.22+ (KHTML, like Gecko) Chromium/17.0.963.56 Chrome/17.0.963.56 Safari/535.22+ Ubuntu/12.04 (3.4.1-0ubuntu1) Epiphany/3.4.1", | ||
{ | ||
"desc" : "Kubuntu", | ||
"ua" : "Mozilla/5.0 (compatible; Konqueror/4.4; Linux 2.6.32-22-generic; X11; en_US) KHTML/4.4.3 (like Gecko) Kubuntu", | ||
"expect" : | ||
{ | ||
"name" : "Kubuntu", | ||
"version" : "undefined" | ||
} | ||
}, | ||
{ | ||
"desc" : "Debian", | ||
"ua" : "", | ||
"ua" : "Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.7 (like Gecko) (Debian)", | ||
"expect" : | ||
{ | ||
"name" : "", | ||
"version" : "" | ||
"name" : "Debian", | ||
"version" : "undefined" | ||
} | ||
}, | ||
{ | ||
"desc" : "OpenSUSE", | ||
"ua" : "", | ||
"desc" : "Debian", | ||
"ua" : "Mozilla/5.0 (X11; Linux x86_64; Debian GNU/Linux 8.1 (jessie)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.0 Maxthon/1.0.5.3 Safari/537.36", | ||
"expect" : | ||
{ | ||
"name" : "", | ||
"version" : "" | ||
"name" : "Debian", | ||
"version" : "8.1" | ||
} | ||
}, | ||
{ | ||
"desc" : "Gentoo", | ||
"ua" : "", | ||
"desc" : "Debian", | ||
"ua" : "ELinks/0.12~pre5-4 (textmode; Debian; Linux 3.2.0-4-amd64 x86_64 192x47-2)", | ||
"expect" : | ||
{ | ||
"name" : "", | ||
"version" : "" | ||
"name" : "Debian", | ||
"version" : "undefined" | ||
} | ||
}, | ||
{ | ||
"desc" : "Arch", | ||
"ua" : "", | ||
"desc" : "Debian", | ||
"ua" : "w3m/0.5.3+debian-19", | ||
"expect" : | ||
{ | ||
"name" : "", | ||
"version" : "" | ||
"name" : "debian", | ||
"version" : "19" | ||
} | ||
}, | ||
{ | ||
"desc" : "Slackware", | ||
"ua" : "", | ||
"desc" : "Debian", | ||
"ua" : "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.3) Gecko/2008092814 (Debian-3.0.1-1)", | ||
"expect" : | ||
{ | ||
"name" : "", | ||
"version" : "" | ||
"name" : "Debian", | ||
"version" : "3.0.1-1" | ||
} | ||
}, | ||
{ | ||
"desc" : "Fedora", | ||
"ua" : "", | ||
"desc" : "Debian", | ||
"ua" : "Mozilla/5.0 (compatible; Konqueror/3.5; Linux 2.6.24.4; X11) KHTML/3.5.9 (like Gecko) (Debian package 4:3.5.9.dfsg.1-2+b1)", | ||
"expect" : | ||
{ | ||
"name" : "", | ||
"version" : "" | ||
"name" : "Debian", | ||
"version" : "undefined" | ||
} | ||
}, | ||
{ | ||
"desc" : "Mandriva", | ||
"ua" : "", | ||
"desc" : "OpenSUSE", | ||
"ua" : "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110420 SUSE/3.6.17-0.2.1 Firefox/3.6.17", | ||
"expect" : | ||
{ | ||
"name" : "", | ||
"version" : "" | ||
"name" : "SUSE", | ||
"version" : "3.6.17-0.2.1" | ||
} | ||
}, | ||
{ | ||
"desc" : "CentOS", | ||
"ua" : "", | ||
"desc" : "Gentoo", | ||
"ua" : "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.16) Gecko/20080716 (Gentoo) Galeon/2.0.6", | ||
"expect" : | ||
{ | ||
"name" : "", | ||
"version" : "" | ||
"name" : "Gentoo", | ||
"version" : "undefined" | ||
} | ||
}, | ||
{ | ||
"desc" : "PCLinuxOS", | ||
"ua" : "", | ||
"desc" : "Gentoo", | ||
"ua" : "Xombrero (X11; U; Gentoo Linux amd64; en-US) Webkit/2.8.5", | ||
"expect" : | ||
{ | ||
"name" : "", | ||
"version" : "" | ||
"name" : "Gentoo", | ||
"version" : "amd64" | ||
} | ||
}, | ||
{ | ||
"desc" : "RedHat", | ||
"ua" : "", | ||
"desc" : "Gentoo", | ||
"ua" : "Xombrero/1.6.4 (Linux amd64; en; Gentoo)", | ||
"expect" : | ||
{ | ||
"name" : "", | ||
"version" : "" | ||
"name" : "Gentoo", | ||
"version" : "undefined" | ||
} | ||
}, | ||
{ | ||
"desc" : "Zenwalk", | ||
"ua" : "", | ||
"desc" : "Gentoo", | ||
"ua" : "Links (2.8; Linux 3.17.2-gentoo-x86 i686; GNU C 4.8.2; x)", | ||
"expect" : | ||
{ | ||
"name" : "", | ||
"version" : "" | ||
"name" : "gentoo", | ||
"version" : "x86" | ||
} | ||
}, | ||
{ | ||
"desc" : "Hurd", | ||
"ua" : "", | ||
"desc" : "Arch", | ||
"ua" : "Uzbl (Webkit 1.1.10) (Arch Linux)", | ||
"expect" : | ||
{ | ||
"name" : "", | ||
"version" : "" | ||
"name" : "Arch", | ||
"version" : "undefined" | ||
} | ||
}, | ||
{ | ||
"desc" : "Linux", | ||
"desc" : "Slackware", | ||
"ua" : "", | ||
@@ -490,11 +526,38 @@ "expect" : | ||
{ | ||
"desc" : "GNU", | ||
"ua" : "", | ||
"desc" : "Fedora", | ||
"ua" : "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:40.0) Gecko/20100101 Firefox/40.0", | ||
"expect" : | ||
{ | ||
"name" : "", | ||
"version" : "" | ||
"name" : "Fedora", | ||
"version" : "undefined" | ||
} | ||
}, | ||
{ | ||
"desc" : "Fedora", | ||
"ua" : "Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:2.0) Gecko/20110404 Fedora/16-dev Firefox/4.0", | ||
"expect" : | ||
{ | ||
"name" : "Fedora", | ||
"version" : "16-dev" | ||
} | ||
}, | ||
{ | ||
"desc" : "Fedora", | ||
"ua" : "Mozilla/5.0 (X11; U; Linux i686; sk; rv:1.9.0.4) Gecko/2008111217 Fedora/3.0.4-1.fc10 Firefox/3.0.4", | ||
"expect" : | ||
{ | ||
"name" : "Fedora", | ||
"version" : "3.0.4-1.fc10" | ||
} | ||
}, | ||
{ | ||
"desc" : "Mandriva", | ||
"ua" : "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.22) Gecko/20110907 Mandriva Linux/1.9.2.22-0.1mdv2010.2 (2010.2) Firefox/3.6.22", | ||
"expect" : | ||
{ | ||
"name" : "Mandriva", | ||
"version" : "1.9.2.22-0.1mdv2010.2" | ||
} | ||
}, | ||
{ | ||
"desc" : "Chromium OS", | ||
@@ -528,7 +591,7 @@ "ua" : "Mozilla/5.0 (X11; CrOS x86_64 10575.58.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36", | ||
"desc" : "FreeBSD", | ||
"ua" : "", | ||
"ua" : "Mozilla/5.0 (X11; U; FreeBSD x86_64; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.204 Safari/534.16", | ||
"expect" : | ||
{ | ||
"name" : "", | ||
"version" : "" | ||
"name" : "FreeBSD", | ||
"version" : "undefined" | ||
} | ||
@@ -538,7 +601,7 @@ }, | ||
"desc" : "OpenBSD", | ||
"ua" : "", | ||
"ua" : "Mozilla/5.0 (X11; U; OpenBSD i386; en-US; rv:1.9.1) Gecko/20090702 Firefox/3.5", | ||
"expect" : | ||
{ | ||
"name" : "", | ||
"version" : "" | ||
"name" : "OpenBSD", | ||
"version" : "undefined" | ||
} | ||
@@ -548,7 +611,7 @@ }, | ||
"desc" : "NetBSD", | ||
"ua" : "", | ||
"ua" : "ELinks (0.4.3; NetBSD 3.0.2PATCH sparc64; 141x19)", | ||
"expect" : | ||
{ | ||
"name" : "", | ||
"version" : "" | ||
"name" : "NetBSD", | ||
"version" : "3.0.2PATCH" | ||
} | ||
@@ -620,2 +683,56 @@ }, | ||
{ | ||
"desc" : "iTunes Windows Vista", | ||
"ua" : "iTunes/10.7 (Windows; Microsoft Windows Vista Home Premium Edition Service Pack 1 (Build 6001)) AppleWebKit/536.26.9", | ||
"expect" : | ||
{ | ||
"name" : "Windows", | ||
"version" : "Vista" | ||
} | ||
}, | ||
{ | ||
"desc" : "iOS BE App", | ||
"ua" : "APP-BE Test/1.0 (iPad; Apple; CPU iPhone OS 7_0_2 like Mac OS X)", | ||
"expect" : | ||
{ | ||
"name" : "iOS", | ||
"version" : "7.0.2" | ||
} | ||
}, | ||
{ | ||
"desc" : "KTB-Nexus 5", | ||
"ua" : "APP-My App/1.0 (Linux; Android 4.2.1; Nexus 5 Build/JOP40D)", | ||
"expect" : | ||
{ | ||
"name" : "Android", | ||
"version" : "4.2.1" | ||
} | ||
}, | ||
{ | ||
"desc" : "Solaris", | ||
"ua" : "NCSA Mosaic/1.0 (X11;SunOS 4.1.4 sun4m)", | ||
"expect" : | ||
{ | ||
"name" : "Solaris", | ||
"version" : "4.1.4" | ||
} | ||
}, | ||
{ | ||
"desc" : "Raspbian", | ||
"ua" : "Mozilla/5.0 (X11; Linux armv7l) AppleWebKit/537.36 (KHTML, like Gecko) Raspbian Chromium/72.0.3626.121 HeadlessChrome/72.0.3626.121 Safari/537.36", | ||
"expect" : | ||
{ | ||
"name" : "Raspbian", | ||
"version" : "undefined" | ||
} | ||
}, | ||
{ | ||
"desc" : "Raspbian", | ||
"ua" : "Mozilla/5.0 (X11; Linux armv7l) AppleWebKit/538.15 (KHTML, like Gecko) Version/8.0 Safari/538.15 Raspbian/9.0 (1:3.8.2.0-0rpi28) Epiphany/3.8.2", | ||
"expect" : | ||
{ | ||
"name" : "Raspbian", | ||
"version" : "9.0" | ||
} | ||
}, | ||
{ | ||
"desc" : "AIX", | ||
@@ -693,12 +810,12 @@ "ua" : "", | ||
{ | ||
"desc" : "iTunes Windows Vista", | ||
"ua" : "iTunes/10.7 (Windows; Microsoft Windows Vista Home Premium Edition Service Pack 1 (Build 6001)) AppleWebKit/536.26.9", | ||
"desc" : "Joli", | ||
"ua" : "", | ||
"expect" : | ||
{ | ||
"name" : "Windows", | ||
"version" : "Vista" | ||
"name" : "", | ||
"version" : "" | ||
} | ||
}, | ||
{ | ||
"desc" : "", | ||
"desc" : "CentOS", | ||
"ua" : "", | ||
@@ -712,19 +829,64 @@ "expect" : | ||
{ | ||
"desc" : "iOS BE App", | ||
"ua" : "APP-BE Test/1.0 (iPad; Apple; CPU iPhone OS 7_0_2 like Mac OS X)", | ||
"desc" : "PCLinuxOS", | ||
"ua" : "", | ||
"expect" : | ||
{ | ||
"name" : "iOS", | ||
"version" : "7.0.2" | ||
"name" : "", | ||
"version" : "" | ||
} | ||
}, | ||
{ | ||
"desc" : "KTB-Nexus 5", | ||
"ua" : "APP-My App/1.0 (Linux; Android 4.2.1; Nexus 5 Build/JOP40D)", | ||
"desc" : "RedHat", | ||
"ua" : "", | ||
"expect" : | ||
{ | ||
"name" : "Android", | ||
"version" : "4.2.1" | ||
"name" : "", | ||
"version" : "" | ||
} | ||
}, | ||
{ | ||
"desc" : "Zenwalk", | ||
"ua" : "", | ||
"expect" : | ||
{ | ||
"name" : "", | ||
"version" : "" | ||
} | ||
}, | ||
{ | ||
"desc" : "Hurd", | ||
"ua" : "", | ||
"expect" : | ||
{ | ||
"name" : "", | ||
"version" : "" | ||
} | ||
}, | ||
{ | ||
"desc" : "Linux", | ||
"ua" : "", | ||
"expect" : | ||
{ | ||
"name" : "", | ||
"version" : "" | ||
} | ||
}, | ||
{ | ||
"desc" : "GNU", | ||
"ua" : "", | ||
"expect" : | ||
{ | ||
"name" : "", | ||
"version" : "" | ||
} | ||
}, | ||
{ | ||
"desc" : "Palm OS", | ||
"ua" : "", | ||
"expect" : | ||
{ | ||
"name" : "", | ||
"version" : "" | ||
} | ||
} | ||
] |
@@ -0,1 +1,3 @@ | ||
var fs = require('fs'); | ||
var safe = require('safe-regex'); | ||
var assert = require('assert'); | ||
@@ -44,3 +46,3 @@ var requirejs = require('requirejs'); | ||
var ua = 'Mozilla/5.0 (Windows NT 6.2) AppleWebKit/536.6 (KHTML, like Gecko) Chrome/20.0.1090.0 Safari/536.6'; | ||
assert.deepEqual(UAParser(ua), new UAParser().setUA(ua).getResult()); | ||
assert.deepStrictEqual(UAParser(ua), new UAParser().setUA(ua).getResult()); | ||
}); | ||
@@ -59,3 +61,3 @@ | ||
it('should return ' + methods[i]['label'] + ' ' + m + ': ' + expect[m], function () { | ||
assert.equal(result[m], expect[m] != 'undefined' ? expect[m] : undefined); | ||
assert.strictEqual(result[m], expect[m] != 'undefined' ? expect[m] : undefined); | ||
}); | ||
@@ -72,3 +74,3 @@ }); | ||
it('getResult() should returns JSON', function(done) { | ||
assert.deepEqual(new UAParser('').getResult(), | ||
assert.deepStrictEqual(new UAParser('').getResult(), | ||
{ | ||
@@ -91,13 +93,24 @@ ua : '', | ||
var parser1 = new UAParser(uaString, {browser: myOwnBrowser}); | ||
assert.equal(parser1.getBrowser().name, 'MyOwnBrowser'); | ||
assert.equal(parser1.getBrowser().version, '1.3'); | ||
assert.equal(parser1.getBrowser().major, '1'); | ||
assert.strictEqual(parser1.getBrowser().name, 'MyOwnBrowser'); | ||
assert.strictEqual(parser1.getBrowser().version, '1.3'); | ||
assert.strictEqual(parser1.getBrowser().major, '1'); | ||
var parser2 = new UAParser({browser: myOwnBrowser}); | ||
assert.equal(parser2.getBrowser().name, undefined); | ||
assert.strictEqual(parser2.getBrowser().name, undefined); | ||
parser2.setUA(uaString); | ||
assert.equal(parser2.getBrowser().name, 'MyOwnBrowser'); | ||
assert.equal(parser1.getBrowser().version, '1.3'); | ||
assert.strictEqual(parser2.getBrowser().name, 'MyOwnBrowser'); | ||
assert.strictEqual(parser1.getBrowser().version, '1.3'); | ||
}); | ||
describe('User-agent length', function () { | ||
var UA_MAX_LENGTH = 255; | ||
// Real data from https://stackoverflow.com/questions/654921/how-big-can-a-user-agent-string-get#answer-6595973 | ||
var uaString = 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; (R1 1.6); SLCC1; .NET CLR 2.0.50727; InfoPath.2; OfficeLiveConnector.1.3; OfficeLivePatch.0.0; .NET CLR 3.5.30729; .NET CLR 3.0.30618; 66760635803; runtime 11.00294; 876906799603; 97880703; 669602703; 9778063903; 877905603; 89670803; 96690803; 8878091903; 7879040603; 999608065603; 799808803; 6666059903; 669602102803; 888809342903; 696901603; 788907703; 887806555703; 97690214703; 66760903; 968909903; 796802422703; 8868026703; 889803611803; 898706903; 977806408603; 976900799903; 9897086903; 88780803; 798802301603; 9966008603; 66760703; 97890452603; 9789064803; 96990759803; 99960107703; 8868087903; 889801155603; 78890703; 8898070603; 89970603; 89970539603; 89970488703; 8789007603; 87890903; 877904603; 9887077703; 798804903; 97890264603; 967901703; 87890703; 97690420803; 79980706603; 9867086703; 996602846703; 87690803; 6989010903; 977809603; 666601903; 876905337803; 89670603; 89970200903; 786903603; 696901911703; 788905703; 896709803; 96890703; 998601903; 88980703; 666604769703; 978806603; 7988020803; 996608803; 788903297903; 98770043603; 899708803; 66960371603; 9669088903; 69990703; 99660519903; 97780603; 888801803; 9867071703; 79780803; 9779087603; 899708603; 66960456803; 898706824603; 78890299903; 99660703; 9768079803; 977901591603; 89670605603; 787903608603; 998607934903; 799808573903; 878909603; 979808146703; 9996088603; 797803154903; 69790603; 99660565603; 7869028603; 896707703; 97980965603; 976907191703; 88680703; 888809803; 69690903; 889805523703; 899707703; 997605035603; 89970029803; 9699094903; 877906803; 899707002703; 786905857603; 69890803; 97980051903; 997603978803; 9897097903; 66960141703; 7968077603; 977804603; 88980603; 989700803; 999607887803; 78690772803; 96990560903; 98970961603; 9996032903; 9699098703; 69890655603; 978903803; 698905066803; 977806903; 9789061703; 967903747703; 976900550903; 88980934703; 8878075803; 8977028703; 97980903; 9769006603; 786900803; 98770682703; 78790903; 878906967903; 87690399603; 99860976703; 796805703; 87990603; 968906803; 967904724603; 999606603; 988705903; 989702842603; 96790603; 99760703; 88980166703; 9799038903; 98670903; 697905248603; 7968043603; 66860703; 66860127903; 9779048903; 89670123903; 78890397703; 97890603; 87890803; 8789030603; 69990603; 88880763703; 9769000603; 96990203903; 978900405903; 7869022803; 699905422903; 97890703; 87990903; 878908703; 7998093903; 898702507603; 97780637603; 966907903; 896702603; 9769004803; 7869007903; 99660158803; 7899099603; 8977055803; 99660603; 7889080903; 66660981603; 997604603; 6969089803; 899701903; 9769072703; 666603903; 99860803; 997608803; 69790903; 88680756703; 979805677903; 9986047703; 89970803; 66660603; 96690903; 8997051603; 789901209803; 8977098903; 968900326803; 87790703; 98770024803; 697901794603; 69990803; 887805925803; 968908903; 97880603; 897709148703; 877909476903; 66760197703; 977908603; 698902703; 988706504803; 977802026603; 88680964703; 8878068703; 987705107903; 978902878703; 8898069803; 9768031703; 79680803; 79980803; 669609328703; 89870238703; 99960593903; 969904218703; 78890603; 9788000703; 69690630903; 889800982903; 988709748803; 7968052803; 99960007803; 969900800803; 668604817603; 66960903; 78790734603; 8868007703; 79780034903; 8878085903; 976907603; 89670830803; 877900903; 969904889703; 7978033903; 8987043903; 99860703; 979805903; 667603803; 976805348603; 999604127603; 97790701603; 78990342903; 98770672903; 87990253903; 9877027703; 97790803; 877901895603; 8789076903; 896708595603; 997601903; 799806903; 97690603; 87790371703; 667605603; 99760303703; 97680283803; 788902750803; 787909803; 79780603; 79880866903; 9986050903; 87890543903; 979800803; 97690179703; 876901603; 699909903; 96990192603; 878904903; 877904734903; 796801446903; 977904803; 9887044803; 797805565603; 98870789703; 7869093903; 87790727703; 797801232803; 666604803; 9778071903; 9799086703; 6969000903; 89670903; 8799075903; 897708903; 88680903; 97980362603; 97980503903; 889803256703; 88980388703; 789909376803; 69690703; 6969025903; 89970309903; 96690703; 877901847803; 968901903; 96690603; 88680607603; 7889001703; 789904761803; 976807703; 976902903; 878907889703; 9897014903; 896707046603; 696909903; 666603998903; 969902703; 79680421803; 9769075603; 798800192703; 97990903; 9689024903; 668604803; 969908671903; 9996094703; 69990642703; 97890895903; 977805619903; 79980859903; 88980443803; 98970649603; 997602703; 888802169903; 699907803; 667602028803; 786903283903; 997607703; 969909803; 798809925903; 9976045603; 97790903; 9789001903; 966903603; 9789069603; 968906603; 6989091803; 896701603; 6979059803; 978803903; 997606362603; 88980803; 98970803; 88880921703; 8997065703; 899700703; 698908703; 797801027903; 7889050903; 87890603; 78690703; 99660069703; 97980309903; 976800603; 666606803; 898707703; 79880019803; 66960250803; 7978049803; 88780602603; 79680903; 88880792703; 96990903; 667608603; 87790730903; 98970903; 9699032903; 8987004803; 88880703; 89770046603; 978800803; 969908903; 9798022603; 696901903; 799803703; 989703703; 668605903; 79780903; 998601371703; 796803339703; 87890922603; 898708903; 9966061903; 66960891903; 96790903; 8779050803; 98870858803; 976909298603; 9887029903; 669608703; 979806903; 878903803; 99960703; 9789086703; 979801803; 66960008703; 979806830803; 99760212703; 786906603; 797807603; 789907297703; 96990703; 786901603; 796807766603; 896702651603; 789902585603; 66660925903; 9986085703; 66960302703; 69890703; 789900703; 89970903; 9679060703; 9789002903; 979908821603; 986708140803; 976809828703; 7988082803; 79680997903; 99960803; 9788081903; 979805703; 787908603; 66960602803; 9887098703; 978803237703; 888806804603; 999604703; 977904703; 966904635703; 97680291703; 977809345603; 8878046703; 988709803; 976900773603; 989703903; 88780198603; 87790603; 986708703; 78890604703; 87790544803; 976809850903; 887806703; 987707527603; 79880803; 9897059603; 897709820603; 97880804803; 66960026703; 9789062803; 9867090803; 669600603; 8967087703; 78890903; 89770903; 97980703; 976802687603; 66860400803; 979901288603; 96990160903; 99860228903; 966900703; 66760603; 9689035703; 9779064703; 7968023603; 87890791903; 98770870603; 9798005803; 6969087903; 9779097903; 6979065703; 699903252603; 79780989703; 87690901803; 978905763903; 977809703; 97790369703; 899703269603; 8878012703; 78790803; 87690395603; 8888042803; 667607689903; 8977041803; 6666085603; 6999080703; 69990797803; 88680721603; 99660519803; 889807603; 87890146703; 699906325903; 89770603; 669608615903; 9779028803; 88880603; 97790703; 79780703; 97680355603; 6696024803; 78790784703; 97880329903; 9699077703; 89870803; 79680227903; 976905852703; 8997098903; 896704796703; 66860598803; 9897036703; 66960703; 9699094703; 9699008703; 97780485903; 999603179903; 89770834803; 96790445603; 79680460903; 9867009603; 89870328703; 799801035803; 989702903; 66960758903; 66860150803; 6686088603; 9877092803; 96990603; 99860603; 987703663603; 98870903; 699903325603; 87790803; 97680703; 8868030703; 9799030803; 89870703; 97680803; 9669054803; 6979097603; 987708046603; 999608603; 878904803; 998607408903; 968903903; 696900703; 977907491703; 6686033803; 669601803; 99960290603; 887809169903; 979803703; 69890903; 699901447903; 8987064903; 799800603; 98770903; 8997068703; 967903603; 66760146803; 978805087903; 697908138603; 799801603; 88780964903; 989708339903; 8967048603; 88880981603; 789909703; 796806603; 977905977603; 989700603; 97780703; 9669062603; 88980714603; 897709545903; 988701916703; 667604694903; 786905664603; 877900803; 886805490903; 89970559903; 99960531803; 7998033903; 98770803; 78890418703; 669600872803; 996605216603; 78690962703; 667604903; 996600903; 999608903; 9699083803; 787901803; 97780707603; 787905312703; 977805803; 8977033703; 97890708703; 989705521903; 978800703; 698905703; 78890376903; 878907703; 999602903; 986705903; 668602719603; 979901803; 997606903; 66760393903; 987703603; 78790338903; 96890803; 97680596803; 666601603; 977902178803; 877902803; 78790038603; 8868075703; 99960060603)'; | ||
it('greater than ' + UA_MAX_LENGTH + ' should be trimmed down', function () { | ||
assert.strictEqual(UAParser(uaString).ua.length, UA_MAX_LENGTH); | ||
}); | ||
}); | ||
describe('Using Require.js', function () { | ||
@@ -113,6 +126,31 @@ it('should loaded automatically', function(done) { | ||
var parser = new ua('Dillo/1.0'); | ||
assert.deepEqual(parser.getBrowser().name, 'Dillo'); | ||
assert.deepStrictEqual(parser.getBrowser().name, 'Dillo'); | ||
done(); | ||
}); | ||
}); | ||
}); | ||
}); | ||
describe('Testing regexes', function () { | ||
var regexes; | ||
// todo: use AST-based instead of grep | ||
before('Read main js file', function (done) { | ||
fs.readFile('src/ua-parser.js', 'utf8', function (err, data) { | ||
regexes = data.match(/(\/.+\/[ig]+)(?=[,\s\n])/g); | ||
done(); | ||
}); | ||
}); | ||
describe('Begin testing', function () { | ||
it('all regexes in main file', function () { | ||
regexes.forEach(function (regex) { | ||
describe('Test against `safe-regex` : ' + regex, function () { | ||
it('should be safe from potentially vulnerable regex', function () { | ||
assert.strictEqual(safe(regex), true); | ||
}); | ||
}); | ||
}); | ||
}); | ||
}); | ||
}) |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
289129
20
6226
309
6
2