BarterDEX/gui/js/charts/detectizr.min.js

3 lines
7.9 KiB
JavaScript
Raw Normal View History

/*! Detectizr v2.2.0 | (c) 2012 Baris Aydinoglu | Licensed */
window.Detectizr=function(a,b,c,d){var e={},f=a.Modernizr,g=["tv","tablet","mobile","desktop"],h={addAllFeaturesAsClass:!1,detectDevice:!0,detectDeviceModel:!0,detectScreen:!0,detectOS:!0,detectBrowser:!0,detectPlugins:!0},i=[{name:"adobereader",substrs:["Adobe","Acrobat"],progIds:["AcroPDF.PDF","PDF.PDFCtrl.5"]},{name:"flash",substrs:["Shockwave Flash"],progIds:["ShockwaveFlash.ShockwaveFlash.1"]},{name:"wmplayer",substrs:["Windows Media"],progIds:["wmplayer.ocx"]},{name:"silverlight",substrs:["Silverlight"],progIds:["AgControl.AgControl"]},{name:"quicktime",substrs:["QuickTime"],progIds:["QuickTime.QuickTime"]}],j=/[\t\r\n]/g,k=c.documentElement,l,m;function n(a,b){var c,d,e;if(arguments.length>2)for(c=1,d=arguments.length;d>c;c+=1)n(a,arguments[c]);else for(e in b)b.hasOwnProperty(e)&&(a[e]=b[e]);return a}function o(a){return e.browser.userAgent.indexOf(a)>-1}function p(a){return a.test(e.browser.userAgent)}function q(a){return a.exec(e.browser.userAgent)}function r(a){return a.replace(/^\s+|\s+$/g,"")}function s(a){return null===a||a===d?"":String(a).replace(/((\s|\-|\.)+[a-z0-9])/g,function(a){return a.toUpperCase().replace(/(\s|\-|\.)/g,"")})}function t(a,b){var c=b||"",d=1===a.nodeType&&(a.className?(" "+a.className+" ").replace(j," "):"");if(d){while(d.indexOf(" "+c+" ")>=0)d=d.replace(" "+c+" "," ");a.className=b?r(d):""}}function u(a,b,c){a&&(a=s(a),b&&(b=s(b),v(a+b,!0),c&&v(a+b+"_"+c,!0)))}function v(a,b){a&&f&&(h.addAllFeaturesAsClass?f.addTest(a,b):(b="function"==typeof b?b():b,b?f.addTest(a,!0):(delete f[a],t(k,a))))}function w(a,b){a.version=b;var c=b.split(".");c.length>0?(c=c.reverse(),a.major=c.pop(),c.length>0?(a.minor=c.pop(),c.length>0?(c=c.reverse(),a.patch=c.join(".")):a.patch="0"):a.minor="0"):a.major="0"}function x(){a.clearTimeout(l),l=a.setTimeout(function(){m=e.device.orientation,a.innerHeight>a.innerWidth?e.device.orientation="portrait":e.device.orientation="landscape",v(e.device.orientation,!0),m!==e.device.orientation&&v(m,!1)},10)}function y(a){var c=b.plugins,d,e,f,g,h;for(g=c.length-1;g>=0;g--){for(d=c[g],e=d.name+d.description,f=0,h=a.length;h>=0;h--)-1!==e.indexOf(a[h])&&(f+=1);if(f===a.length)return!0}return!1}function z(a){var b;for(b=a.length-1;b>=0;b--)try{new ActiveXObject(a[b])}catch(c){}return!1}function A(d){var j,k,l,m,r,t,A;if(h=n({},h,d||{}),h.detectDevice){for(e.device={type:"",model:"",orientation:""},l=e.device,p(/googletv|smarttv|smart-tv|internet.tv|netcast|nettv|appletv|boxee|kylo|roku|dlnadoc|roku|pov_tv|hbbtv|ce\-html/)?(l.type=g[0],l.model="smartTv"):p(/xbox|playstation.3|wii/)?(l.type=g[0],l.model="gameConsole"):p(/ip(a|ro)d/)?(l.type=g[1],l.model="ipad"):p(/tablet/)&&!p(/rx-34/)||p(/folio/)?(l.type=g[1],l.model=String(q(/playbook/)||"")):p(/linux/)&&p(/android/)&&!p(/fennec|mobi|htc.magic|htcX06ht|nexus.one|sc-02b|fone.945/)?(l.type=g[1],l.model="android"):p(/kindle/)||p(/mac.os/)&&p(/silk/)?(l.type=g[1],l.model="kindle"):p(/gt-p10|sc-01c|shw-m180s|sgh-t849|sch-i800|shw-m180l|sph-p100|sgh-i987|zt180|htc(.flyer|\_flyer)|sprint.atp51|viewpad7|pandigital(sprnova|nova)|ideos.s7|dell.streak.7|advent.vega|a101it|a70bht|mid7015|next2|nook/)||p(/mb511/)&&p(/rutem/)?(l.type=g[1],l.model="android"):p(/bb10/)?(l.type=g[1],l.model="blackberry"):(l.model=q(/iphone|ipod|android|blackberry|opera mini|opera mobi|skyfire|maemo|windows phone|palm|iemobile|symbian|symbianos|fennec|j2me/),null!==l.model?(l.type=g[2],l.model=String(l.model)):(l.model="",p(/bolt|fennec|iris|maemo|minimo|mobi|mowser|netfront|novarra|prism|rx-34|skyfire|tear|xv6875|xv6975|google.wireless.transcoder/)?l.type=g[2]:p(/opera/)&&p(/windows.nt.5/)&&p(/htc|xda|mini|vario|samsung\-gt\-i8000|samsung\-sgh\-i9/)?l.type=g[2]:p(/windows.(nt|xp|me|9)/)&&!p(/phone/)||p(/win(9|.9|nt)/)||p(/\(windows 8\)/)?l.type=g[3]:p(/macintosh|powerpc/)&&!p(/silk/)?(l.type=g[3],l.model="mac"):p(/linux/)&&p(/x11/)?l.type=g[3]:p(/solaris|sunos|bsd/)?l.type=g[3]:p(/cros/)?l.type=g[3]:p(/bot|crawler|spider|yahoo|ia_archiver|covario-ids|findlinks|dataparksearch|larbin|mediapartners-google|ng-search|snappy|teoma|jeeves|tineye/)&&!p(/mobil