(function(){"use strict";function a(a){return a=String(a),a.charAt(0).toUpperCase()+a.slice(1)}function b(a,b,c){var e={"10.0":"10",6.4:"10 Technical Preview",6.3:"8.1",6.2:"8",6.1:"Server 2008 R2 / 7","6.0":"Server 2008 / Vista",5.2:"Server 2003 / XP 64-bit",5.1:"XP",5.01:"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return b&&c&&/^Win/i.test(a)&&!/^Windows Phone /i.test(a)&&(e=e[/[\d.]+$/.exec(a)])&&(a="Windows "+e),a=String(a),b&&c&&(a=a.replace(RegExp(b,"i"),c)),a=d(a.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0])}function c(a,b){var c=-1,d=a?a.length:0;if("number"==typeof d&&d>-1&&d<=r)for(;++c3&&"WebKit"||/\bOpera\b/.test(W)&&(/\bOPR\b/.test(a)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(a)&&!/^(?:Trident|EdgeHTML)$/.test(V)&&"WebKit"||!V&&/\bMSIE\b/i.test(a)&&("Mac OS"==Z?"Tasman":"Trident")||"WebKit"==V&&/\bPlayStation\b(?! Vita\b)/i.test(W)&&"NetFront")&&(V=[A]),"IE"==W&&(A=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(a)||0)[1])?(W+=" Mobile",Z="Windows Phone "+(/\+$/.test(A)?A:A+".x"),R.unshift("desktop mode")):/\bWPDesktop\b/i.test(a)?(W="IE Mobile",Z="Windows Phone 8.x",R.unshift("desktop mode"),U||(U=(/\brv:([\d.]+)/.exec(a)||0)[1])):"IE"!=W&&"Trident"==V&&(A=/\brv:([\d.]+)/.exec(a))&&(W&&R.push("identifying as "+W+(U?" "+U:"")),W="IE",U=A[1]),T){if(g(v,"global"))if(J&&(A=J.lang.System,Q=A.getProperty("os.arch"),Z=Z||A.getProperty("os.name")+" "+A.getProperty("os.version")),C&&g(v,"system")&&(A=[v.system])[0]){Z||(Z=A[0].os||null);try{A[1]=v.require("ringo/engine").version,U=A[1].join("."),W="RingoJS"}catch(a){A[0].global.system==v.system&&(W="Narwhal")}}else"object"==typeof v.process&&!v.process.browser&&(A=v.process)?"object"==typeof A.versions?"string"==typeof A.versions.electron?(R.push("Node "+A.versions.node),W="Electron",U=A.versions.electron):"string"==typeof A.versions.nw&&(R.push("Chromium "+U,"Node "+A.versions.node),W="NW.js",U=A.versions.nw):(W="Node.js",Q=A.arch,Z=A.platform,U=/[\d.]+/.exec(A.version),U=U?U[0]:"unknown"):K&&(W="Rhino");else f(A=v.runtime)==F?(W="Adobe AIR",Z=A.flash.system.Capabilities.os):f(A=v.phantom)==I?(W="PhantomJS",U=(A=A.version||null)&&A.major+"."+A.minor+"."+A.patch):"number"==typeof N.documentMode&&(A=/\bTrident\/(\d+)/i.exec(a))?(U=[U,N.documentMode],(A=+A[1]+4)!=U[1]&&(R.push("IE "+U[1]+" mode"),V&&(V[1]=""),U[1]=A),U="IE"==W?String(U[1].toFixed(1)):U[0]):"number"==typeof N.documentMode&&/^(?:Chrome|Firefox)\b/.test(W)&&(R.push("masking as "+W+" "+U),W="IE",U="11.0",V=["Trident"],Z="Windows");Z=Z&&d(Z)}if(U&&(A=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(U)||/(?:alpha|beta)(?: ?\d)?/i.exec(a+";"+(T&&y.appMinorVersion))||/\bMinefield\b/i.test(a)&&"a")&&(S=/b/i.test(A)?"beta":"alpha",U=U.replace(RegExp(A+"\\+?$"),"")+("beta"==S?M:L)+(/\d+\+?/.exec(A)||"")),"Fennec"==W||"Firefox"==W&&/\b(?:Android|Firefox OS)\b/.test(Z))W="Firefox Mobile";else if("Maxthon"==W&&U)U=U.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(X))"Xbox 360"==X&&(Z=null),"Xbox 360"==X&&/\bIEMobile\b/.test(a)&&R.unshift("mobile mode");else if(!/^(?:Chrome|IE|Opera)$/.test(W)&&(!W||X||/Browser|Mobi/.test(W))||"Windows CE"!=Z&&!/Mobi/i.test(a))if("IE"==W&&T)try{null===v.external&&R.unshift("platform preview")}catch(a){R.unshift("embedded")}else(/\bBlackBerry\b/.test(X)||/\bBB10\b/.test(a))&&(A=(RegExp(X.replace(/ +/g," *")+"/([.\\d]+)","i").exec(a)||0)[1]||U)?(A=[A,/BB10/.test(a)],Z=(A[1]?(X=null,Y="BlackBerry"):"Device Software")+" "+A[0],U=null):this!=e&&"Wii"!=X&&(T&&O||/Opera/.test(W)&&/\b(?:MSIE|Firefox)\b/i.test(a)||"Firefox"==W&&/\bOS X (?:\d+\.){2,}/.test(Z)||"IE"==W&&(Z&&!/^Win/.test(Z)&&U>5.5||/\bWindows XP\b/.test(Z)&&U>8||8==U&&!/\bTrident\b/.test(a)))&&!s.test(A=k.call(e,a.replace(s,"")+";"))&&A.name&&(A="ing as "+A.name+((A=A.version)?" "+A:""),s.test(W)?(/\bIE\b/.test(A)&&"Mac OS"==Z&&(Z=null),A="identify"+A):(A="mask"+A,W=P?d(P.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(A)&&(Z=null),T||(U=null)),V=["Presto"],R.push(A));else W+=" Mobile";(A=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(a)||0)[1])&&(A=[parseFloat(A.replace(/\.(\d)$/,".0$1")),A],"Safari"==W&&"+"==A[1].slice(-1)?(W="WebKit Nightly",S="alpha",U=A[1].slice(0,-1)):U!=A[1]&&U!=(A[2]=(/\bSafari\/([\d.]+\+?)/i.exec(a)||0)[1])||(U=null),A[1]=(/\bChrome\/([\d.]+)/i.exec(a)||0)[1],537.36==A[0]&&537.36==A[2]&&parseFloat(A[1])>=28&&"WebKit"==V&&(V=["Blink"]),T&&(D||A[1])?(V&&(V[1]="like Chrome"),A=A[1]||(A=A[0],A<530?1:A<532?2:A<532.05?3:A<533?4:A<534.03?5:A<534.07?6:A<534.1?7:A<534.13?8:A<534.16?9:A<534.24?10:A<534.3?11:A<535.01?12:A<535.02?"13+":A<535.07?15:A<535.11?16:A<535.19?17:A<536.05?18:A<536.1?19:A<537.01?20:A<537.11?"21+":A<537.13?23:A<537.18?24:A<537.24?25:A<537.36?26:"Blink"!=V?"27":"28")):(V&&(V[1]="like Safari"),A=A[0],A=A<400?1:A<500?2:A<526?3:A<533?4:A<534?"4+":A<535?5:A<537?6:A<538?7:A<601?8:"8"),V&&(V[1]+=" "+(A+="number"==typeof A?".x":/[.+]/.test(A)?"":"+")),"Safari"==W&&(!U||parseInt(U)>45)&&(U=A)),"Opera"==W&&(A=/\bzbov|zvav$/.exec(Z))?(W+=" ",R.unshift("desktop mode"),"zvav"==A?(W+="Mini",U=null):W+="Mobile",Z=Z.replace(RegExp(" *"+A+"$"),"")):"Safari"==W&&/\bChrome\b/.exec(V&&V[1])&&(R.unshift("desktop mode"),W="Chrome Mobile",U=null,/\bOS X\b/.test(Z)?(Y="Apple",Z="iOS 4.3+"):Z=null),U&&0==U.indexOf(A=/[\d.]+$/.exec(Z))&&a.indexOf("/"+A+"-")>-1&&(Z=j(Z.replace(A,""))),V&&!/\b(?:Avant|Nook)\b/.test(W)&&(/Browser|Lunascape|Maxthon/.test(W)||"Safari"!=W&&/^iOS/.test(Z)&&/\bSafari\b/.test(V[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(W)&&V[1])&&(A=V[V.length-1])&&R.push(A),R.length&&(R=["("+R.join("; ")+")"]),Y&&X&&X.indexOf(Y)<0&&R.push("on "+Y),X&&R.push((/^on /.test(R[R.length-1])?"":"on ")+X),Z&&(A=/ ([\d.+]+)$/.exec(Z),B=A&&"/"==Z.charAt(Z.length-A[0].length-1),Z={architecture:32,family:A&&!B?Z.replace(A[0],""):Z,version:A?A[1]:null,toString:function(){var a=this.version;return this.family+(a&&!B?" "+a:"")+(64==this.architecture?" 64-bit":"")}}),(A=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Q))&&!/\bi686\b/i.test(Q)?(Z&&(Z.architecture=64,Z.family=Z.family.replace(RegExp(" *"+A),"")),W&&(/\bWOW64\b/i.test(a)||T&&/\w(?:86|32)$/.test(y.cpuClass||y.platform)&&!/\bWin64; x64\b/i.test(a))&&R.unshift("32-bit")):Z&&/^OS X/.test(Z.family)&&"Chrome"==W&&parseFloat(U)>=39&&(Z.architecture=64),a||(a=null);var $={};return $.description=a,$.layout=V&&V[0],$.manufacturer=Y,$.name=W,$.prerelease=S,$.product=X,$.ua=a,$.version=W&&U,$.os=Z||{architecture:null,family:null,version:null,toString:function(){return"null"}},$.parse=k,$.toString=u,$.version&&R.unshift(U),$.name&&R.unshift(W),Z&&W&&(Z!=String(Z).split(" ")[0]||Z!=W.split(" ")[0]&&!X)&&R.push(X?"("+Z+")":"on "+Z),R.length&&($.description=R.join(" ")),$}var l={function:!0,object:!0},m=l[typeof window]&&window||this,n=m,o=l[typeof exports]&&exports,p=l[typeof module]&&module&&!module.nodeType&&module,q=o&&p&&"object"==typeof global&&global;!q||q.global!==q&&q.window!==q&&q.self!==q||(m=q);var r=Math.pow(2,53)-1,s=/\bOpera/,t=this,u=Object.prototype,v=u.hasOwnProperty,w=u.toString,x=k();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(m.platform=x,define(function(){return x})):o&&p?e(x,function(a,b){o[b]=a}):m.platform=x}).call(this);