1 line
15 KiB
JavaScript
1 line
15 KiB
JavaScript
|
(function(r,d){"use strict";var M="0.7.31",n="",P="?",u="function",t="undefined",c="object",s="string",V="major",b="model",w="name",l="type",p="vendor",m="version",f="architecture",i="console",e="mobile",o="tablet",a="smarttv",h="wearable",B="embedded",v=255;var g="Amazon",x="Apple",D="ASUS",I="BlackBerry",k="Browser",y="Chrome",W="Edge",_="Firefox",T="Google",F="Huawei",S="LG",N="Microsoft",G="Motorola",q="Opera",z="Samsung",A="Sony",L="Xiaomi",Z="Zebra",$="Facebook";var H=function(i,e){var o={};for(var a in i){if(e[a]&&e[a].length%2===0){o[a]=e[a].concat(i[a])}else{o[a]=i[a]}}return o},C=function(i){var e={};for(var o=0;o<i.length;o++){e[i[o].toUpperCase()]=i[o]}return e},X=function(i,e){return typeof i===s?E(e).indexOf(E(i))!==-1:false},E=function(i){return i.toLowerCase()},K=function(i){return typeof i===s?i.replace(/[^\d\.]/g,n).split(".")[0]:d},Q=function(i,e){if(typeof i===s){i=i.replace(/^\s\s*/,n).replace(/\s\s*$/,n);return typeof e===t?i:i.substring(0,v)}};var O=function(i,e){var o=0,a,r,n,t,s,b;while(o<e.length&&!s){var w=e[o],l=e[o+1];a=r=0;while(a<w.length&&!s){s=w[a++].exec(i);if(!!s){for(n=0;n<l.length;n++){b=s[++r];t=l[n];if(typeof t===c&&t.length>0){if(t.length===2){if(typeof t[1]==u){this[t[0]]=t[1].call(this,b)}else{this[t[0]]=t[1]}}else if(t.length===3){if(typeof t[1]===u&&!(t[1].exec&&t[1].test)){this[t[0]]=b?t[1].call(this,b,t[2]):d}else{this[t[0]]=b?b.replace(t[1],t[2]):d}}else if(t.length===4){this[t[0]]=b?t[3].call(this,b.replace(t[1],t[2])):d}}else{this[t]=b?b:d}}}}o+=2}},Y=function(i,e){for(var o in e){if(typeof e[o]===c&&e[o].length>0){for(var a=0;a<e[o].length;a++){if(X(e[o][a],i)){return o===P?d:o}}}else if(X(e[o],i)){return o===P?d:o}}return i};var J={"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},ii={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"],11:"NT 11.0",RT:"ARM"};var ei={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[m,[w,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[m,[w,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[w,m],[/opios[\/ ]+([\w\.]+)/i],[m,[w,q+" Mini"]],[/\bopr\/([\w\.]+)/i],[m,[w,q]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[w,m],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[m,[w,"UC"+k]],[/\bqbcore\/([\w\.]+)/i],[m,[w,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[m,[w,"WeChat"]],[/konqueror\/([\w\.]+)/i],[m,[w,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[m,[w,"IE"]],[/yabrowser\/([\w\.]+)/i],[m,[w,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[w,/(.+)/,"$1 Secure "+k],m],[/\bfocus\/([\w\.]+)/i],[m,[w,_+" Focus"]],[/\bopt\/([\w\.]+)/i],[m,[w,q+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[m,[w,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[m,[w,"Dolphin"]],[/coast\/([\w\.]+)/i],[m,[w,q+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[m,[w,"MIUI "+k]],[/fxios\/([-\w\.]+)/i],[m,[w,_]],[/\bqihu|(qi?ho?o?|360)browser/i],[[w,"360 "+k]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[w,/(.+)/,"$1 "+k],m],[/(comodo_dragon)\/([\w\.]+)/i],[[w,/_/g," "],m],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[w,m],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i],[w],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[w,$],m],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[w,m],[/\bgsa\/([\w\.]+) .*safari\//i],[m,[w,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[m,[w,y+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[w,y+" WebView"],m],[/droid
|