From f4249c94a0e0298aa894ecaf81d715f6f49408cf Mon Sep 17 00:00:00 2001 From: zhenghaole <89932980@qq.com> Date: Thu, 26 Sep 2024 17:22:11 +0800 Subject: [PATCH] =?UTF-8?q?updated=20=E6=B5=8F=E8=A7=88=E5=99=A8=E5=AE=8C?= =?UTF-8?q?=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/browser.min.js | 4 ++-- dist/browser.min.mjs | 4 ++-- src/module/browser-parser.js | 3 +++ src/module/language-parser.js | 2 +- src/module/screen-parser.js | 8 ++++++-- static/script/index.js | 26 ++++++++++++++++++++++++++ 6 files changed, 40 insertions(+), 7 deletions(-) diff --git a/dist/browser.min.js b/dist/browser.min.js index 63fc6e0..60f6623 100644 --- a/dist/browser.min.js +++ b/dist/browser.min.js @@ -8,6 +8,6 @@ * Released under the MIT License * https://github.com/mumuy/browser * - * Created on: 2024-09-23 + * Created on: 2024-09-26 */ -!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).browser=n()}(this,(function(){"use strict";let e={};"undefined"!=typeof globalThis?e=globalThis:"undefined"!=typeof self?e=self:"undefined"!=typeof window?e=window:"undefined"!=typeof global&&(e=global);var n,i=e,r=null==i||null===(n=i.navigator)||void 0===n?void 0:n.userAgent,a={name:"Safari",parse(e=r){var n;return{is:e.includes("Safari"),version:(null===(n=e.match(/Version\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},o={name:"Chrome",parse(e=r){var n,i;return{is:e.includes("Chrome")||e.includes("CriOS"),version:(null===(n=e.match(/Chrome\/([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/CriOS\/([\d.]+)/))||void 0===i?void 0:i[1])||""}}},s={name:"Edge",parse(e=r){var n,i,a,o;return{is:e.includes("Edge")||e.includes("Edg/")||e.includes("EdgA")||e.includes("EdgiOS"),version:(null===(n=e.match(/Edge\/([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/Edg\/([\d.]+)/))||void 0===i?void 0:i[1])||(null===(a=e.match(/EdgA\/([\d.]+)/))||void 0===a?void 0:a[1])||(null===(o=e.match(/EdgiOS\/([\d.]+)/))||void 0===o?void 0:o[1])||""}}},l={name:"IE",parse(e=r){var n,i;return{is:e.includes("MSIE")||e.includes("Trident"),version:(null===(n=e.match(/MSIE ([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/rv:([\d.]+)/))||void 0===i?void 0:i[1])||""}}},t={name:"Firefox",parse(e=r){var n,i;return{is:e.includes("Firefox")||e.includes("FxiOS"),version:(null===(n=e.match(/Firefox\/([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/FxiOS\/([\d.]+)/))||void 0===i?void 0:i[1])||""}}},d={name:"Firefox Focus",parse(e=r){var n;return{is:e.includes("Focus"),version:(null===(n=e.match(/Focus\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},u={name:"Chromium",parse(e=r){var n;return{is:e.includes("Chromium"),version:(null===(n=e.match(/Chromium\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},v={name:"Opera",parse(e=r){var n,i;return{is:e.includes("Opera")||e.includes("OPR"),version:(null===(n=e.match(/Opera\/([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/OPR\/([\d.]+)/))||void 0===i?void 0:i[1])||""}}},c={name:"Opera GX",parse(e=r){let n=!1;return v.parse(e).is&&(n=e.includes("Edition GX")),{is:n,version:v.parse(e).version}}},m={name:"Vivaldi",parse(e=r){var n,i;return{is:e.includes("Vivaldi"),version:(null===(n=e.match(/Vivaldi\/([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/Chrome\/([\d.]+)/))||void 0===i?void 0:i[1])||""}},async is(){let e=this.parse().is;return new Promise((function(n){e?n(!1):fetch("chrome-extension://jffbochibkahlbbmanpmndnhmeliecah/config.json").then((function(){n(!0)})).catch((function(){n(!1)}))}))}},p={name:"Yandex",parse(e=r){var n;return{is:e.includes("YaBrowser"),version:(null===(n=e.match(/YaBrowser\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},h={name:"Brave",parse(e=r){var n;return{is:e.includes("Brave"),version:(null===(n=e.match(/Chrome\/([\d.]+)/))||void 0===n?void 0:n[1])||""}},is:async function(){var e;return!!(this.parse().is||null!=i&&null!==(e=i.navigator)&&void 0!==e&&e.brave)}},g={name:"Arora",parse(e=r){var n;return{is:e.includes("Arora"),version:(null===(n=e.match(/Arora\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},f={name:"Lunascape",parse(e=r){var n;return{is:e.includes("Lunascape"),version:(null===(n=e.match(/Lunascape[\/\s]([\d.]+)/))||void 0===n?void 0:n[1])||""}}},w={name:"QupZilla",parse(e=r){var n;return{is:e.includes("QupZilla"),version:(null===(n=e.match(/QupZilla[\/\s]([\d.]+)/))||void 0===n?void 0:n[1])||""}}},b={name:"Coc Coc",parse(e=r){var n;return{is:e.includes("coc_coc_browser"),version:(null===(n=e.match(/coc_coc_browser\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},y={name:"Kindle",parse(e=r){var n;return{is:e.includes("Kindle")||e.includes("Silk/"),version:(null===(n=e.match(/Version\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},B={name:"Iceweasel",parse(e=r){var n;return{is:e.includes("Iceweasel"),version:(null===(n=e.match(/Iceweasel\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},S={name:"Konqueror",parse(e=r){var n;return{is:e.includes("Konqueror"),version:(null===(n=e.match(/Konqueror\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},E={name:"SeaMonkey",parse(e=r){var n;return{is:e.includes("SeaMonkey"),version:(null===(n=e.match(/SeaMonkey\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},A={name:"Epiphany",parse(e=r){var n;return{is:e.includes("Epiphany"),version:(null===(n=e.match(/Epiphany\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},T={name:"Huawei",parse(e=r){var n,i,a;return{is:e.includes("HuaweiBrowser")||e.includes("HBPC/"),version:(null===(n=e.match(/HuaweiBrowser\/([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/HBPC\/([\d.]+)/))||void 0===i?void 0:i[1])||(null===(a=e.match(/Version\/([\d.]+)/))||void 0===a?void 0:a[1])||""}}},x={name:"OPPO",parse(e=r){var n;return{is:e.includes("HeyTapBrowser")||e.includes("OPPO"),version:(null===(n=e.match(/HeyTapBrowser\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},M={name:"Vivo",parse(e=r){var n;return{is:e.includes("VivoBrowser"),version:(null===(n=e.match(/VivoBrowser\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},I={name:"Xiaomi",parse(e=r){var n;return{is:e.includes("MiuiBrowser"),version:(null===(n=e.match(/115Browser\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},O={name:"Meizu",parse(e=r){var n;return{is:e.includes("MZBrowser"),version:(null===(n=e.match(/MZBrowser\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},C={name:"OnePlus",parse:(e=r)=>({is:e.includes("ONEPLUS"),version:""})},P={name:"Samsung",parse(e=r){var n;return{is:e.includes("SamsungBrowser"),version:(null===(n=e.match(/SamsungBrowser\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}};function k(e,n){var i;let r=null===globalThis||void 0===globalThis||null===(i=globalThis.navigator)||void 0===i?void 0:i.mimeTypes;for(let i in r)if(r[i][e]&&r[i][e]==n)return r[i];return null}var W={name:"360",parse(e=r){var n,i;return{is:e.includes("QihooBrowser")||e.includes("QHBrowser")||e.includes(" 360 "),version:(null===(n=e.match(/QihooBrowser(HD)?\/([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/Browser \(v([\d.]+)/))||void 0===i?void 0:i[1])||""}},async is(){let e=this.parse().is;if(null!=i&&i.chrome){let n=parseInt(o.parse().version);k("type","application/360softmgrplugin")||k("type","application/mozilla-npqihooquicklogin")||k("type","application/npjlgplayer3-chrome-jlp")||n>36&&null!=i&&i.showModalDialog?e=!0:n>45&&(e=k("type","application/vnd.chromium.remoting-viewer"),!e&&n>=69&&(e=k("type","application/asx")))}return e}},D={name:"360SE",parse(e=r){let n=parseInt(o.parse(e).version);return{is:e.includes("360SE"),version:{122:"15.3",114:"15.0",108:"14.0",86:"13.0",78:"12.0",69:"11.0",63:"10.0",55:"9.1",45:"8.1",42:"8.0",31:"7.0",21:"6.3"}[n]||""}},async is(){let e=!1;var n;await W.is()&&((k("type","application/gameplugin")||null!=i&&null!==(n=i.navigator)&&void 0!==n&&null!==(n=n.userAgentData)&&void 0!==n&&n.brands.filter((e=>"Not.A/Brand"==e.brand)).length)&&(e=!0));return e||new Promise((function(e){fetch("chrome-extension://fjbbmgamncjadhlpmffehlmmkdnkiadk/css/content.css").then((function(){e(!0)})).catch((function(){e(!1)}))}))}},H={name:"360EE",parse(e=r){var n;let i=parseInt(o.parse(e).version);return{is:e.includes("360EE"),version:(null===(n=e.match(/Browser \(v([\d.]+)/))||void 0===n?void 0:n[1])||{122:"22.3",119:"22.0",108:"14.0",95:"21.0",86:"13.0",78:"12.0",69:"11.0",63:"9.5",55:"9.0",50:"8.7",30:"7.5"}[i]||""}},async is(){let e=this.parse().is;if(k("type","application/cenroll.cenroll.version.1")||k("type","application/hwepass2001.installepass2001"))e=!0;else if(await W.is()){var n;null!==globalThis&&void 0!==globalThis&&null!==(n=globalThis.navigator)&&void 0!==n&&null!==(n=n.userAgentData)&&void 0!==n&&n.brands.find((e=>"Not A(Brand"==e.brand||"Not?A_Brand"==e.brand))&&(e=!0)}return e}},L={name:"360AI",parse(e=r){let n=parseInt(o.parse(e).version);return{is:e.includes("360SEAI"),version:{114:"1.0"}[n]||""}},async is(){let e=this.parse().is;var n;await W.is()&&(null!=i&&null!==(n=i.navigator)&&void 0!==n&&null!==(n=n.userAgentData)&&void 0!==n&&n.brands.filter((e=>"Not.A/Brand"==e.brand)).length&&!k("type","application/gameplugin")&&(e=!0));return e}},Q={name:"360AI",parse(e=r){var n;return{is:e.includes("360EEAI"),version:(null===(n=e.match(/360EE\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}};const V=()=>new Promise((e=>{var n;const r=`cv_${(new Date).getTime()%1e5}${100*Math.floor(Math.random())}`,a={key:"GetDeviceInfo",data:{},callback:r},o=JSON.stringify(a);if(null==i||null===(n=i.webkit)||void 0===n||!n.messageHandlers)return e({});i.webkit.messageHandlers.excuteCmd.postMessage(o),i[r]=function(n){delete i[r],e(JSON.parse(n||"{}"))}}));var _={name:"360EE",parse:()=>({is:!1,version:""}),is:async()=>V().then((function(e){return"360csexm"==(null==e?void 0:e.pid)||!1})),version:async()=>V().then((function(e){return(null==e?void 0:e.module_version)||""}))},R={name:"360ENT",parse(e=r){var n;let i=parseInt(o.parse(e).version);return{is:e.includes("360ENT"),version:(null===(n=e.match(/Browser \(v([\d.]+)/))||void 0===n?void 0:n[1])||{86:"13.0",78:"12.0",69:"11.0",63:"9.5",55:"9.0",50:"8.7",30:"7.5"}[i]||""}}},F={name:"UC",parse(e=r){var n;return{is:e.includes("UCBrowser")||e.includes(" UBrowser")||e.includes("UCWEB"),version:(null===(n=e.match(/UC?Browser\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},N={name:"QQBrowser",parse(e=r){var n;return{is:e.includes("QQBrowser"),version:(null===(n=e.match(/QQBrowser\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},U={name:"QQ",parse(e=r){var n;return{is:e.includes("QQ/"),version:(null===(n=e.match(/QQ\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},Y={name:"Baidu",parse(e=r){var n,i;return{is:e.includes("Baidu")||e.includes("BIDUBrowser")||e.includes("baidubrowser")||e.includes("baiduboxapp")||e.includes("BaiduD"),version:(null===(n=e.match(/BIDUBrowser[\s\/]([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/baiduboxapp\/([\d.]+)/))||void 0===i?void 0:i[1])||""}}},G={name:"Maxthon",parse(e=r){var n,i;let a=parseInt(o.parse(e).version);return{is:e.includes("Maxthon"),version:(null===(n=e.match(/Maxthon\/([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/Version\/([\d.]+)/))||void 0===i?void 0:i[1])||{109:"7.0",78:"6.0"}[a]||""}},is(){return this.parse().is||(null==i?void 0:i.maxthon)}},j={name:"Sogou",parse(e=r){var n,i,a=parseInt(o.parse(e).version);return{is:e.includes("MetaSr")||e.includes("Sogou"),version:(null===(n=e.match(/SogouMobileBrowser\/([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/SogouMSE\/([\d.]+)/))||void 0===i?void 0:i[1])||{94:"12.0",80:"11.0"}[a]||""}}},q={name:"Liebao",parse(e=r){var n;let i=parseInt(o.parse(e).version);return{is:e.includes("LBBROWSER")||e.includes("LieBaoFast"),version:(null===(n=e.match(/LieBaoFast\/([\d.]+)/))||void 0===n?void 0:n[1])||{112:"9.0",79:"8.0",57:"6.5",49:"6.0",46:"5.9",42:"5.3",39:"5.2",34:"5.0",29:"4.5",21:"4.0"}[i]||""}},is(){return this.parse().is||(null==i?void 0:i.liebao)}},K={name:"2345Explorer",parse(e=r){var n,i;let a=parseInt(o.parse(e).version);return{is:e.includes("2345Explorer")||e.includes("Mb2345Browser")||e.includes("2345chrome"),version:(null===(n=e.match(/2345Explorer\/([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/Mb2345Browser\/([\d.]+)/))||void 0===i?void 0:i[1])||{109:"13.0",69:"10.0",55:"9.9"}[a]||""}},async is(){let e=this.parse().is;var n,r;e||(e=(null==i?void 0:i.chrome)&&((null==i||null===(n=i.chrome)||void 0===n?void 0:n.adblock2345)||(null==i||null===(r=i.chrome)||void 0===r?void 0:r.common2345)));return e}},z={name:"115Browser",parse(e=r){var n;return{is:e.includes("115Browser"),version:(null===(n=e.match(/115Browser\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},X={name:"TheWorld",parse(e=r){var n;return{is:e.includes("TheWorld"),version:(null===(n=e.match(/TheWorld ([\d.]+)/))||void 0===n?void 0:n[1])||""}}},$={name:"Quark",parse(e=r){var n,i;return{is:e.includes("Quark"),version:(null===(n=e.match(/Quark\/([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/QuarkPC\/([\d.]+)/))||void 0===i?void 0:i[1])||""}}},Z={name:"Qiyu",parse(e=r){var n;return{is:e.includes("Qiyu"),version:(null===(n=e.match(/Qiyu\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},J={name:"Lenovo",parse(e=r){var n;return{is:e.includes("SLBrowser"),version:(null===(n=e.match(/SLBrowser\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},ee={name:"Wechat",parse(e=r){var n;return{is:e.includes("MicroMessenger"),version:(null===(n=e.match(/MicroMessenger\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},ne={name:"WechatWork",parse(e=r){var n;return{is:e.includes("wxwork"),version:(null===(n=e.match(/wxwork\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},ie={name:"Taobao",parse(e=r){var n;return{is:e.includes("AliApp(TB"),version:(null===(n=e.match(/AliApp\(TB\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},re={name:"Alipay",parse(e=r){var n;return{is:e.includes("AliApp(AP"),version:(null===(n=e.match(/AliApp\(AP\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},ae={name:"Weibo",parse(e=r){var n;return{is:e.includes("Weibo"),version:(null===(n=e.match(/weibo__([\d.]+)/))||void 0===n?void 0:n[1])||""}}},oe={name:"Douban",parse(e=r){var n;return{is:e.includes("com.douban.frodo"),version:(null===(n=e.match(/com.douban.frodo\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},se={name:"Toutiao",parse(e=r){var n;return{is:e.includes("NewsArticle"),version:(null===(n=e.match(/NewsArticle\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},le={name:"WebKit",parse:(e=r)=>({is:e.includes("AppleWebKit")})},te={name:"Trident",parse:(e=r)=>({is:e.includes("Trident")||e.includes("NET CLR")})},de={name:"Gecko",parse:(e=r)=>({is:e.includes("Gecko/")})},ue={name:"Servo",parse:(e=r)=>({is:e.includes("Servo/")})},ve={name:"Presto",parse:(e=r)=>({is:e.includes("Presto")})},ce={name:"KHTML",parse:(e=r)=>({is:e.includes("KHTML/")})};let me=[a,o,s,l,t,d,u,v,c,m,p,h,g,f,w,b,y,B,S,E,A,T,x,M,I,O,C,P,W,H,D,_,L,Q,R,F,N,U,Y,G,j,q,K,z,X,$,Z,J,ee,ne,ie,re,ae,oe,{name:"Suning",parse(e=r){var n;return{is:e.includes("SNEBUY-APP"),version:(null===(n=e.match(/SNEBUY-APP([\d.]+)/))||void 0===n?void 0:n[1])||""}}},{name:"iQIYI",parse(e=r){var n;return{is:e.includes("IqiyiApp"),version:(null===(n=e.match(/IqiyiVersion\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},{name:"DingTalk",parse(e=r){var n;return{is:e.includes("DingTalk"),version:(null===(n=e.match(/DingTalk\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},{name:"Douyin",parse(e=r){var n;return{is:e.includes("aweme"),version:(null===(n=e.match(/app_version\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},se,{name:"Googlebot",parse(e=r){var n;return{is:e.includes("Googlebot"),version:(null===(n=e.match(/Googlebot\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},{name:"Baiduspider",parse(e=r){var n;return{is:e.includes("Baiduspider"),version:(null===(n=e.match(/Baiduspider(-render)?\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},{name:"Sogouspider",parse(e=r){var n;return{is:e.match(/Sogou (\S+) Spider\/([\d.]+)/i),version:(null===(n=e.match(/Sogou (\S+) Spider\/([\d.]+)/i))||void 0===n?void 0:n[1])||""}}},{name:"Bingbot",parse(e=r){var n;return{is:e.includes("bingbot"),version:(null===(n=e.match(/bingbot\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},{name:"360Spider",parse:(e=r)=>({is:e.includes("360Spider")||e.includes("HaosouSpider"),version:""})},{name:"Bytespider",parse:(e=r)=>({is:e.includes("Bytespider"),version:""})},{name:"YisouSpider",parse(e=r){var n;return{is:e.includes("YisouSpider"),version:(null===(n=e.match(/YisouSpider\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},{name:"YodaoBot",parse(e=r){var n;return{is:e.includes("YodaoBot"),version:(null===(n=e.match(/YodaoBot\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},{name:"YandexBot",parse(e=r){var n;return{is:e.includes("YandexBot"),version:(null===(n=e.match(/YandexBot\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},{name:"Headless",parse(e=r){var n;return{is:e.includes("HeadlessChrome/"),version:(null===(n=e.match(/HeadlessChrome\/([\d.]+)/))||void 0===n?void 0:n[1])||""}},async is(){return this.parse().is??""==(null==i?void 0:i.navigator)}}];me.forEach((e=>{e.is||(e.is=async function(){return e.parse().is}),e.version||(e.version=async function(){return e.parse().version})}));let pe=[le,te,de,ue,ve,ce];pe.forEach((e=>{e.is||(e.is=async function(){return e.parse().is})}));var he={name:"browser",parse(e=r){let n="",i="";me.forEach((function(r){r.parse(e).is&&(n=r.name,i=r.parse(e).version)}));let a="";var l,t;(pe.forEach((function(n){n.parse(e).is&&(a=n.name)})),"Chrome"==n&&e.match(/\S+Browser/)&&(n=e.match(/\S+Browser/)[0]),"Chrome"==n&&e.match(/\S+Browser/))&&(i=(null===(l=e.replace(/^.*Browser\/([\d.]+).*$/))||void 0===l?void 0:l[1])||"");i||(i=(null===(t=e.match(/Version\/([\d.]+)/))||void 0===t?void 0:t[1])||"");s.parse(e).is?a=parseInt(s.parse(e).version)>75?"Blink":"EdgeHTML":o.parse(e).is&&parseInt(o.parse(e).version)>27&&(a="Blink");let d=e.includes("; wv)"),u=["Googlebot","Baiduspider","Sogouspider","Bingbot","360Spider","Bytespider","YandexBot"].includes(n);return{browser:n,browserVersion:i,engine:a,isWebview:d,isRobot:u}},async getInfo(){let{browser:e,browserVersion:n,engine:i,isWebview:a,isRobot:o}=this.parse();for(let i of me)await i.is()&&(e=i.name,n=await i.version());let s=r;var l,t;("Chrome"==e&&s.match(/\S+Browser/)&&(e=s.match(/\S+Browser/)[0]),"Chrome"==e&&s.match(/\S+Browser/))&&(n=(null===(l=s.replace(/^.*Browser\/([\d.]+).*$/))||void 0===l?void 0:l[1])||"");n||(n=(null===(t=s.match(/Version\/([\d.]+)/))||void 0===t?void 0:t[1])||"");return{browser:e,browserVersion:n,engine:i,isWebview:a,isRobot:o,userAgent:s}}},ge={name:"Windows",parse(e=r){var n;let i=(null===(n=e.match(/^Mozilla\/\d.0 \(Windows NT ([\d.]+)[;)].*$/))||void 0===n?void 0:n[1])||"";return{is:e.includes("Windows"),version:{"10.0":"10",6.4:"10 Technical Preview",6.3:"8.1",6.2:"8",6.1:"7","6.0":"Vista",5.2:"XP 64-bit",5.1:"XP",5.01:"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"}[i]||i}},async version(){let e=this.parse().version;return new Promise((function(n){var r;null!=i&&null!==(r=i.navigator)&&void 0!==r&&r.userAgentData?i.navigator.userAgentData.getHighEntropyValues(["platformVersion"]).then((function(e){let r="";if("Windows"===i.navigator.userAgentData.platform){r=parseInt(e.platformVersion.split(".")[0])>=13?"11":"10"}n(r)})):n(e)}))}};let fe=[ge,{name:"Linux",parse:(e=r)=>({is:e.includes("Linux")||e.includes("X11"),version:""})},{name:"macOS",parse(e=r){var n;return{is:e.includes("Macintosh"),version:(null===(n=e.match(/Mac OS X -?([\d_]+)/))||void 0===n?void 0:n[1].replace(/_/g,"."))||""}}},{name:"Android",parse(e=r){var n;return{is:e.includes("Android")||e.includes("Adr"),version:(null===(n=e.match(/Android ([\d.]+);/))||void 0===n?void 0:n[1])||""}}},{name:"HarmonyOS",parse(e=r){var n;let i=(null===(n=e.match(/HarmonyOS (\d+.\d+)/))||void 0===n?void 0:n[1])||"";if(!i){var a,o;let n=+(null===(a=e.match(/HMSCore (\d+.\d+)/))||void 0===a?void 0:a[1])||0;n>=6.1?i="4.0":n>=6?i="3.0":n>=5?i="2.0":n>=4&&(i="1.0"),i={10:"3.0",12:"4.0"}[(null===(o=e.match(/Android (\d+);/))||void 0===o?void 0:o[1])||0]??i}return{is:e.includes("HarmonyOS")||e.includes("ArkWeb"),version:i}}},{name:"Ubuntu",parse:(e=r)=>({is:e.includes("Ubuntu"),version:""})},{name:"FreeBSD",parse:(e=r)=>({is:e.includes("FreeBSD"),version:""})},{name:"Debian",parse(e=r){var n;return{is:e.includes("Debian"),version:(null===(n=e.match(/Debian\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},{name:"iOS",parse(e=r){var n;return{is:e.includes("like Mac OS X"),version:(null===(n=e.match(/OS ([\d_]+) like/))||void 0===n?void 0:n[1].replace(/_/g,"."))||""}}},{name:"Windows Phone",parse(e=r){var n;return{is:e.includes("IEMobile")||e.includes("Windows Phone"),version:(null===(n=e.match(/Windows Phone( OS)? ([\d.]+);/))||void 0===n?void 0:n[2])||""}}},{name:"BlackBerry",parse:(e=r)=>({is:e.includes("BlackBerry")||e.includes("RIM"),version:""})},{name:"MeeGo",parse:(e=r)=>({is:e.includes("MeeGo"),version:""})},{name:"Symbian",parse(e=r){var n;return{is:e.includes("Symbian"),version:(null===(n=e.match(/Series60\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},{name:"Chrome OS",parse(e=r){var n,i;return{is:e.includes("CrOS"),version:(null===(n=e.match(/MSIE ([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/rv:([\d.]+)/))||void 0===i?void 0:i[1])||""}}},{name:"WebOS",parse(e=r){var n;return{is:e.includes("hpwOS"),version:(null===(n=e.match(/hpwOS\/([\d.]+);/))||void 0===n?void 0:n[1])||""}}},{name:"UOS",parse(e=r){var n;return{is:e.includes("UOS"),version:(null===(n=e.match(/UOS\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}}];fe.forEach((e=>{e.is||(e.is=async function(){return e.parse().is}),e.version||(e.version=async function(){return e.parse().version})}));var we={name:"system",parse(e=r){let n="",i="";fe.forEach((function(r){r.parse(e).is&&(n=r.name,i=r.parse(e).version)}));let a="";e.match(/(Win64|x64|WOW64|x86_64)/i)?a="Win64":e.match(/(Win32|x86|WOW32)/i)?a="Win32":e.match(/aarch64|arm64/)?a="ARM64":e.match(/arm32/)&&(a="ARM32");let o="",s=e+"|"+a;o=s.match(/armv?\d+/i)||s.match(/aarch64/)?"arm":s.match(/loongarch64/)?"loongarch":"x86";let l=e.match(/Win64|x64|WOW64|x86_64|aarch64|arm64|loongarch64/i)?64:32;return{system:n,systemVersion:i,platform:a,architecture:o,bitness:l}},async getInfo(){var e,n;let{system:r,systemVersion:a,platform:o,architecture:s,bitness:l}=this.parse();for(let e of fe)await e.is()&&(r=e.name,a=await e.version());var t,d;(null!=i&&null!==(e=i.navigator)&&void 0!==e&&e.platform&&(o=i.navigator.platform),null!=i&&null!==(n=i.navigator)&&void 0!==n&&n.userAgentData)&&(s=await(null===(t=i.navigator.userAgentData)||void 0===t?void 0:t.getHighEntropyValues(["architecture"]).then((e=>e.architecture||s))),l=await(null===(d=i.navigator.userAgentData)||void 0===d?void 0:d.getHighEntropyValues(["bitness"]).then((e=>+e.bitness||l))));return{system:r,systemVersion:a,platform:o,architecture:s,bitness:l}}};let be=[{name:"Mobile",parse:(e=r)=>({is:e.includes("Mobi")||e.includes("iPh")||e.includes("480")})},{name:"Tablet",parse:(e=r)=>({is:e.includes("Tablet")||e.includes("Pad")||e.includes("Nexus 7")}),async is(){return this.parse().is||"MacIntel"===(null==i?void 0:i.navigator.platform)&&(null==i?void 0:i.navigator.maxTouchPoints)>1}}];be.forEach((e=>{e.is||(e.is=async function(){return e.parse().is})}));var ye={name:"device",parse(e=r){let n="Desktop";return be.forEach((function(i){i.parse(e).is&&(n=i.name)})),{device:n}},async getInfo(){var e;let n=(null===globalThis||void 0===globalThis?void 0:globalThis.devicePixelRatio)||1,i=(null===globalThis||void 0===globalThis||null===(e=globalThis.navigator)||void 0===e?void 0:e.deviceMemory)||4;return Object.assign({devicePixelRatio:n,deviceMemory:i},this.parse())}},Be={name:"gpu",parse:()=>({}),async getInfo(){let e="",n="";if(null!=i&&i.document){let o=i.document.createElement("canvas").getContext("experimental-webgl");if(o){var r,a;let i=o.getExtension("WEBGL_debug_renderer_info"),s=o.getParameter(i.UNMASKED_RENDERER_WEBGL);e=(null===(r=s.match(/ANGLE \((.+?),/))||void 0===r?void 0:r[1])||"",n=(null===(a=s.match(/, (.+?) (\(|vs_)/))||void 0===a?void 0:a[1])||""}}return{gpu:e,gpuModel:n}}};const Se=/\b((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b/,Ee=/\b(?:[A-F0-9]{1,4}:){7}[A-F0-9]{1,4}\b/i;let Ae=globalThis.RTCPeerConnection||globalThis.mozRTCPeerConnection||globalThis.webkitRTCPeerConnection;var Te={name:"network",parse:()=>({}),async getInfo(){var e,n;let r="unknown",a=null==i||null===(e=i.navigator)||void 0===e?void 0:e.connection;return a&&(r=a.type||a.effectiveType,"2"!=r&&"unknown"!=r||(r="wifi")),{network:r,isOnline:(null==i||null===(n=i.navigator)||void 0===n?void 0:n.onLine)||!1,ip:await(async()=>{const e=new Set,n=n=>{var i;const r=null==n||null===(i=n.candidate)||void 0===i?void 0:i.candidate;if(r)for(const n of[Se,Ee]){const i=r.match(n);i&&e.add(i[0])}};return new Promise((function(i,r){const a=new Ae({iceServers:[{urls:"stun:stun.l.google.com:19302"},{urls:"stun:stun.services.mozilla.com"}]});a.addEventListener("icecandidate",n),a.createDataChannel(""),a.createOffer().then((e=>a.setLocalDescription(e)),r);let o=20,s=null,l=function(){try{a.removeEventListener("icecandidate",n),a.close()}catch{}s&&clearInterval(s)};s=setInterval((function(){let n=[...e];n.length?(l(),i(n[0])):o?o--:(l(),i(""))}),100)}))})()}}},xe={name:"battery",parse:()=>({}),async getInfo(){var e;let n=!0,r=1;return null!=i&&null!==(e=i.navigator)&&void 0!==e&&e.getBattery&&(n=await i.navigator.getBattery().then((e=>null==e?void 0:e.charging)),r=await i.navigator.getBattery().then((e=>+(null==e?void 0:e.level)||-1))),{isCharging:n,battery:r}}};var Me={name:"screen",parse:()=>({}),async getInfo(){var e,n,r,a,o;return{screenWidth:(null==i||null===(e=i.screen)||void 0===e?void 0:e.width)||0,screenHeight:(null==i||null===(n=i.screen)||void 0===n?void 0:n.height)||0,clientWidth:(null==i||null===(r=i.document)||void 0===r||null===(r=r.documentElement)||void 0===r?void 0:r.clientWidth)||0,clientHeight:(null==i||null===(a=i.document)||void 0===a||null===(a=a.documentElement)||void 0===a?void 0:a.clientHeight)||0,screenFPS:await async function(){return new Promise((function(e){let n=0,i=1,r=[],a=function(o){if(n>0)if(i<12)r.push(o-n),n=o,i++,requestAnimationFrame(a);else{r.sort(),r=r.slice(1,11);let n=r.reduce(((e,n)=>e+n));const i=10*Math.round(1e4/n/10);e(i)}else n=o,requestAnimationFrame(a)};requestAnimationFrame(a)}))}(),isTouch:(null==i||null===(o=i.navigator)||void 0===o?void 0:o.maxTouchPoints)>0||!1}}},Ie={name:"language",parse:()=>({}),async getInfo(){var e,n;let r=(null==i||null===(e=i.navigator)||void 0===e?void 0:e.language)||(null==i||null===(n=i.navigator)||void 0===n?void 0:n.browserLanguage);if("string"!=typeof r)return"Unknown language";let a=r.split("-");return a[1]&&(a[1]=a[1].toUpperCase()),{language:a.join("_")}}},Oe={name:"timezone",parse:()=>({}),async getInfo(){var e;return{timezone:null===(e=Intl)||void 0===e||null===(e=e.DateTimeFormat())||void 0===e||null===(e=e.resolvedOptions())||void 0===e?void 0:e.timeZone}}},Ce={name:"font-family",is(e="Arial"){if("string"!=typeof e||null==i||!i.document)return!1;let n="Arial",r=100,a=100,o=i.document.createElement("canvas"),s=o.getContext("2d",{willReadFrequently:!0});o.width=r,o.height=a,s.textAlign="center",s.fillStyle="black",s.textBaseline="middle";let l=function(e){s.clearRect(0,0,r,a),s.font=`100px ${e}, ${n}`,s.fillText("永",50,50);let i=s.getImageData(0,0,r,a).data;return[].slice.call(i).filter((function(e){return 0!=e}))};return l(n).join("")!==l(e).join("")}},Pe={name:"webgl",is(){if(null==i||!i.document)return!1;const e=i.document.createElement("canvas"),n=e.getContext("webgl")||e.getContext("experimental-webgl");return n&&n instanceof WebGLRenderingContext}};return{parse(e){let n={};return[he,we,ye].forEach((i=>{n=Object.assign(n,i.parse(e))})),n},async getInfo(e=["browser","system","device","gpu","network","battery","screen","language","timezone"]){let n={},i=[he,we,ye,Be,Te,xe,Me,Ie,Oe].filter((n=>e.includes(n.name)));for(let e of i)n=Object.assign(n,await e.getInfo());return n},isSupport(e,n){let i=[Ce,Pe].find((n=>e==n.name));return!!i&&i.is(n)}}})); +!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).browser=n()}(this,(function(){"use strict";let e={};"undefined"!=typeof globalThis?e=globalThis:"undefined"!=typeof self?e=self:"undefined"!=typeof window?e=window:"undefined"!=typeof global&&(e=global);var n,i=e,r=null==i||null===(n=i.navigator)||void 0===n?void 0:n.userAgent,a={name:"Safari",parse(e=r){var n;return{is:e.includes("Safari"),version:(null===(n=e.match(/Version\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},o={name:"Chrome",parse(e=r){var n,i;return{is:e.includes("Chrome")||e.includes("CriOS"),version:(null===(n=e.match(/Chrome\/([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/CriOS\/([\d.]+)/))||void 0===i?void 0:i[1])||""}}},s={name:"Edge",parse(e=r){var n,i,a,o;return{is:e.includes("Edge")||e.includes("Edg/")||e.includes("EdgA")||e.includes("EdgiOS"),version:(null===(n=e.match(/Edge\/([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/Edg\/([\d.]+)/))||void 0===i?void 0:i[1])||(null===(a=e.match(/EdgA\/([\d.]+)/))||void 0===a?void 0:a[1])||(null===(o=e.match(/EdgiOS\/([\d.]+)/))||void 0===o?void 0:o[1])||""}}},l={name:"IE",parse(e=r){var n,i;return{is:e.includes("MSIE")||e.includes("Trident"),version:(null===(n=e.match(/MSIE ([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/rv:([\d.]+)/))||void 0===i?void 0:i[1])||""}}},t={name:"Firefox",parse(e=r){var n,i;return{is:e.includes("Firefox")||e.includes("FxiOS"),version:(null===(n=e.match(/Firefox\/([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/FxiOS\/([\d.]+)/))||void 0===i?void 0:i[1])||""}}},d={name:"Firefox Focus",parse(e=r){var n;return{is:e.includes("Focus"),version:(null===(n=e.match(/Focus\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},u={name:"Chromium",parse(e=r){var n;return{is:e.includes("Chromium"),version:(null===(n=e.match(/Chromium\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},v={name:"Opera",parse(e=r){var n,i;return{is:e.includes("Opera")||e.includes("OPR"),version:(null===(n=e.match(/Opera\/([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/OPR\/([\d.]+)/))||void 0===i?void 0:i[1])||""}}},c={name:"Opera GX",parse(e=r){let n=!1;return v.parse(e).is&&(n=e.includes("Edition GX")),{is:n,version:v.parse(e).version}}},m={name:"Vivaldi",parse(e=r){var n,i;return{is:e.includes("Vivaldi"),version:(null===(n=e.match(/Vivaldi\/([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/Chrome\/([\d.]+)/))||void 0===i?void 0:i[1])||""}},async is(){let e=this.parse().is;return new Promise((function(n){e?n(!1):fetch("chrome-extension://jffbochibkahlbbmanpmndnhmeliecah/config.json").then((function(){n(!0)})).catch((function(){n(!1)}))}))}},p={name:"Yandex",parse(e=r){var n;return{is:e.includes("YaBrowser"),version:(null===(n=e.match(/YaBrowser\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},h={name:"Brave",parse(e=r){var n;return{is:e.includes("Brave"),version:(null===(n=e.match(/Chrome\/([\d.]+)/))||void 0===n?void 0:n[1])||""}},is:async function(){var e;return!!(this.parse().is||null!=i&&null!==(e=i.navigator)&&void 0!==e&&e.brave)}},g={name:"Arora",parse(e=r){var n;return{is:e.includes("Arora"),version:(null===(n=e.match(/Arora\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},f={name:"Lunascape",parse(e=r){var n;return{is:e.includes("Lunascape"),version:(null===(n=e.match(/Lunascape[\/\s]([\d.]+)/))||void 0===n?void 0:n[1])||""}}},b={name:"QupZilla",parse(e=r){var n;return{is:e.includes("QupZilla"),version:(null===(n=e.match(/QupZilla[\/\s]([\d.]+)/))||void 0===n?void 0:n[1])||""}}},w={name:"Coc Coc",parse(e=r){var n;return{is:e.includes("coc_coc_browser"),version:(null===(n=e.match(/coc_coc_browser\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},y={name:"Kindle",parse(e=r){var n;return{is:e.includes("Kindle")||e.includes("Silk/"),version:(null===(n=e.match(/Version\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},B={name:"Iceweasel",parse(e=r){var n;return{is:e.includes("Iceweasel"),version:(null===(n=e.match(/Iceweasel\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},S={name:"Konqueror",parse(e=r){var n;return{is:e.includes("Konqueror"),version:(null===(n=e.match(/Konqueror\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},E={name:"SeaMonkey",parse(e=r){var n;return{is:e.includes("SeaMonkey"),version:(null===(n=e.match(/SeaMonkey\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},A={name:"Epiphany",parse(e=r){var n;return{is:e.includes("Epiphany"),version:(null===(n=e.match(/Epiphany\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},T={name:"Huawei",parse(e=r){var n,i,a;return{is:e.includes("HuaweiBrowser")||e.includes("HBPC/"),version:(null===(n=e.match(/HuaweiBrowser\/([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/HBPC\/([\d.]+)/))||void 0===i?void 0:i[1])||(null===(a=e.match(/Version\/([\d.]+)/))||void 0===a?void 0:a[1])||""}}},x={name:"OPPO",parse(e=r){var n;return{is:e.includes("HeyTapBrowser")||e.includes("OPPO"),version:(null===(n=e.match(/HeyTapBrowser\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},M={name:"Vivo",parse(e=r){var n;return{is:e.includes("VivoBrowser"),version:(null===(n=e.match(/VivoBrowser\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},I={name:"Xiaomi",parse(e=r){var n;return{is:e.includes("MiuiBrowser"),version:(null===(n=e.match(/115Browser\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},O={name:"Meizu",parse(e=r){var n;return{is:e.includes("MZBrowser"),version:(null===(n=e.match(/MZBrowser\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},C={name:"OnePlus",parse:(e=r)=>({is:e.includes("ONEPLUS"),version:""})},k={name:"Samsung",parse(e=r){var n;return{is:e.includes("SamsungBrowser"),version:(null===(n=e.match(/SamsungBrowser\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}};function P(e,n){var i;let r=null===globalThis||void 0===globalThis||null===(i=globalThis.navigator)||void 0===i?void 0:i.mimeTypes;for(let i in r)if(r[i][e]&&r[i][e]==n)return r[i];return null}var W={name:"360",parse(e=r){var n,i;return{is:e.includes("QihooBrowser")||e.includes("QHBrowser")||e.includes(" 360 "),version:(null===(n=e.match(/QihooBrowser(HD)?\/([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/Browser \(v([\d.]+)/))||void 0===i?void 0:i[1])||""}},async is(){let e=this.parse().is;if(null!=i&&i.chrome){let n=parseInt(o.parse().version);P("type","application/360softmgrplugin")||P("type","application/mozilla-npqihooquicklogin")||P("type","application/npjlgplayer3-chrome-jlp")||n>36&&null!=i&&i.showModalDialog?e=!0:n>45&&(e=P("type","application/vnd.chromium.remoting-viewer"),!e&&n>=69&&(e=P("type","application/asx")))}return e}},D={name:"360SE",parse(e=r){let n=parseInt(o.parse(e).version);return{is:e.includes("360SE"),version:{122:"15.3",114:"15.0",108:"14.0",86:"13.0",78:"12.0",69:"11.0",63:"10.0",55:"9.1",45:"8.1",42:"8.0",31:"7.0",21:"6.3"}[n]||""}},async is(){let e=!1;var n;await W.is()&&((P("type","application/gameplugin")||null!=i&&null!==(n=i.navigator)&&void 0!==n&&null!==(n=n.userAgentData)&&void 0!==n&&n.brands.filter((e=>"Not.A/Brand"==e.brand)).length)&&(e=!0));return e||new Promise((function(e){fetch("chrome-extension://fjbbmgamncjadhlpmffehlmmkdnkiadk/css/content.css").then((function(){e(!0)})).catch((function(){e(!1)}))}))}},H={name:"360EE",parse(e=r){var n;let i=parseInt(o.parse(e).version);return{is:e.includes("360EE"),version:(null===(n=e.match(/Browser \(v([\d.]+)/))||void 0===n?void 0:n[1])||{122:"22.3",119:"22.0",108:"14.0",95:"21.0",86:"13.0",78:"12.0",69:"11.0",63:"9.5",55:"9.0",50:"8.7",30:"7.5"}[i]||""}},async is(){let e=this.parse().is;if(P("type","application/cenroll.cenroll.version.1")||P("type","application/hwepass2001.installepass2001"))e=!0;else if(await W.is()){var n;null!==globalThis&&void 0!==globalThis&&null!==(n=globalThis.navigator)&&void 0!==n&&null!==(n=n.userAgentData)&&void 0!==n&&n.brands.find((e=>"Not A(Brand"==e.brand||"Not?A_Brand"==e.brand))&&(e=!0)}return e}},L={name:"360AI",parse(e=r){let n=parseInt(o.parse(e).version);return{is:e.includes("360SEAI"),version:{114:"1.0"}[n]||""}},async is(){let e=this.parse().is;var n;await W.is()&&(null!=i&&null!==(n=i.navigator)&&void 0!==n&&null!==(n=n.userAgentData)&&void 0!==n&&n.brands.filter((e=>"Not.A/Brand"==e.brand)).length&&!P("type","application/gameplugin")&&(e=!0));return e}},Q={name:"360AI",parse(e=r){var n;return{is:e.includes("360EEAI"),version:(null===(n=e.match(/360EE\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}};const V=()=>new Promise((e=>{var n;const r=`cv_${(new Date).getTime()%1e5}${100*Math.floor(Math.random())}`,a={key:"GetDeviceInfo",data:{},callback:r},o=JSON.stringify(a);if(null==i||null===(n=i.webkit)||void 0===n||!n.messageHandlers)return e({});i.webkit.messageHandlers.excuteCmd.postMessage(o),i[r]=function(n){delete i[r],e(JSON.parse(n||"{}"))}}));var _={name:"360EE",parse:()=>({is:!1,version:""}),is:async()=>V().then((function(e){return"360csexm"==(null==e?void 0:e.pid)||!1})),version:async()=>V().then((function(e){return(null==e?void 0:e.module_version)||""}))},R={name:"360ENT",parse(e=r){var n;let i=parseInt(o.parse(e).version);return{is:e.includes("360ENT"),version:(null===(n=e.match(/Browser \(v([\d.]+)/))||void 0===n?void 0:n[1])||{86:"13.0",78:"12.0",69:"11.0",63:"9.5",55:"9.0",50:"8.7",30:"7.5"}[i]||""}}},F={name:"UC",parse(e=r){var n;return{is:e.includes("UCBrowser")||e.includes(" UBrowser")||e.includes("UCWEB"),version:(null===(n=e.match(/UC?Browser\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},N={name:"QQBrowser",parse(e=r){var n;return{is:e.includes("QQBrowser"),version:(null===(n=e.match(/QQBrowser\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},U={name:"QQ",parse(e=r){var n;return{is:e.includes("QQ/"),version:(null===(n=e.match(/QQ\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},Y={name:"Baidu",parse(e=r){var n,i;return{is:e.includes("Baidu")||e.includes("BIDUBrowser")||e.includes("baidubrowser")||e.includes("baiduboxapp")||e.includes("BaiduD"),version:(null===(n=e.match(/BIDUBrowser[\s\/]([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/baiduboxapp\/([\d.]+)/))||void 0===i?void 0:i[1])||""}}},G={name:"Maxthon",parse(e=r){var n,i;let a=parseInt(o.parse(e).version);return{is:e.includes("Maxthon"),version:(null===(n=e.match(/Maxthon\/([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/Version\/([\d.]+)/))||void 0===i?void 0:i[1])||{109:"7.0",78:"6.0"}[a]||""}},is(){return this.parse().is||(null==i?void 0:i.maxthon)}},j={name:"Sogou",parse(e=r){var n,i,a=parseInt(o.parse(e).version);return{is:e.includes("MetaSr")||e.includes("Sogou"),version:(null===(n=e.match(/SogouMobileBrowser\/([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/SogouMSE\/([\d.]+)/))||void 0===i?void 0:i[1])||{94:"12.0",80:"11.0"}[a]||""}}},q={name:"Liebao",parse(e=r){var n;let i=parseInt(o.parse(e).version);return{is:e.includes("LBBROWSER")||e.includes("LieBaoFast"),version:(null===(n=e.match(/LieBaoFast\/([\d.]+)/))||void 0===n?void 0:n[1])||{112:"9.0",79:"8.0",57:"6.5",49:"6.0",46:"5.9",42:"5.3",39:"5.2",34:"5.0",29:"4.5",21:"4.0"}[i]||""}},is(){return this.parse().is||(null==i?void 0:i.liebao)}},K={name:"2345Explorer",parse(e=r){var n,i;let a=parseInt(o.parse(e).version);return{is:e.includes("2345Explorer")||e.includes("Mb2345Browser")||e.includes("2345chrome"),version:(null===(n=e.match(/2345Explorer\/([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/Mb2345Browser\/([\d.]+)/))||void 0===i?void 0:i[1])||{109:"13.0",69:"10.0",55:"9.9"}[a]||""}},async is(){let e=this.parse().is;var n,r;e||(e=(null==i?void 0:i.chrome)&&((null==i||null===(n=i.chrome)||void 0===n?void 0:n.adblock2345)||(null==i||null===(r=i.chrome)||void 0===r?void 0:r.common2345)));return e}},z={name:"115Browser",parse(e=r){var n;return{is:e.includes("115Browser"),version:(null===(n=e.match(/115Browser\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},X={name:"TheWorld",parse(e=r){var n;return{is:e.includes("TheWorld"),version:(null===(n=e.match(/TheWorld ([\d.]+)/))||void 0===n?void 0:n[1])||""}}},$={name:"Quark",parse(e=r){var n,i;return{is:e.includes("Quark"),version:(null===(n=e.match(/Quark\/([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/QuarkPC\/([\d.]+)/))||void 0===i?void 0:i[1])||""}}},Z={name:"Qiyu",parse(e=r){var n;return{is:e.includes("Qiyu"),version:(null===(n=e.match(/Qiyu\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},J={name:"Lenovo",parse(e=r){var n;return{is:e.includes("SLBrowser"),version:(null===(n=e.match(/SLBrowser\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},ee={name:"Wechat",parse(e=r){var n;return{is:e.includes("MicroMessenger"),version:(null===(n=e.match(/MicroMessenger\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},ne={name:"WechatWork",parse(e=r){var n;return{is:e.includes("wxwork"),version:(null===(n=e.match(/wxwork\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},ie={name:"Taobao",parse(e=r){var n;return{is:e.includes("AliApp(TB"),version:(null===(n=e.match(/AliApp\(TB\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},re={name:"Alipay",parse(e=r){var n;return{is:e.includes("AliApp(AP"),version:(null===(n=e.match(/AliApp\(AP\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},ae={name:"Weibo",parse(e=r){var n;return{is:e.includes("Weibo"),version:(null===(n=e.match(/weibo__([\d.]+)/))||void 0===n?void 0:n[1])||""}}},oe={name:"Douban",parse(e=r){var n;return{is:e.includes("com.douban.frodo"),version:(null===(n=e.match(/com.douban.frodo\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},se={name:"Toutiao",parse(e=r){var n;return{is:e.includes("NewsArticle"),version:(null===(n=e.match(/NewsArticle\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},le={name:"WebKit",parse:(e=r)=>({is:e.includes("AppleWebKit")})},te={name:"Trident",parse:(e=r)=>({is:e.includes("Trident")||e.includes("NET CLR")})},de={name:"Gecko",parse:(e=r)=>({is:e.includes("Gecko/")})},ue={name:"Servo",parse:(e=r)=>({is:e.includes("Servo/")})},ve={name:"Presto",parse:(e=r)=>({is:e.includes("Presto")})},ce={name:"KHTML",parse:(e=r)=>({is:e.includes("KHTML/")})};let me=[a,o,s,l,t,d,u,v,c,m,p,h,g,f,b,w,y,B,S,E,A,T,x,M,I,O,C,k,W,H,D,_,L,Q,R,F,N,U,Y,G,j,q,K,z,X,$,Z,J,ee,ne,ie,re,ae,oe,{name:"Suning",parse(e=r){var n;return{is:e.includes("SNEBUY-APP"),version:(null===(n=e.match(/SNEBUY-APP([\d.]+)/))||void 0===n?void 0:n[1])||""}}},{name:"iQIYI",parse(e=r){var n;return{is:e.includes("IqiyiApp"),version:(null===(n=e.match(/IqiyiVersion\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},{name:"DingTalk",parse(e=r){var n;return{is:e.includes("DingTalk"),version:(null===(n=e.match(/DingTalk\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},{name:"Douyin",parse(e=r){var n;return{is:e.includes("aweme"),version:(null===(n=e.match(/app_version\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},se,{name:"Googlebot",parse(e=r){var n;return{is:e.includes("Googlebot"),version:(null===(n=e.match(/Googlebot\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},{name:"Baiduspider",parse(e=r){var n;return{is:e.includes("Baiduspider"),version:(null===(n=e.match(/Baiduspider(-render)?\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},{name:"Sogouspider",parse(e=r){var n;return{is:e.match(/Sogou (\S+) Spider\/([\d.]+)/i),version:(null===(n=e.match(/Sogou (\S+) Spider\/([\d.]+)/i))||void 0===n?void 0:n[1])||""}}},{name:"Bingbot",parse(e=r){var n;return{is:e.includes("bingbot"),version:(null===(n=e.match(/bingbot\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},{name:"360Spider",parse:(e=r)=>({is:e.includes("360Spider")||e.includes("HaosouSpider"),version:""})},{name:"Bytespider",parse:(e=r)=>({is:e.includes("Bytespider"),version:""})},{name:"YisouSpider",parse(e=r){var n;return{is:e.includes("YisouSpider"),version:(null===(n=e.match(/YisouSpider\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},{name:"YodaoBot",parse(e=r){var n;return{is:e.includes("YodaoBot"),version:(null===(n=e.match(/YodaoBot\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},{name:"YandexBot",parse(e=r){var n;return{is:e.includes("YandexBot"),version:(null===(n=e.match(/YandexBot\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},{name:"Headless",parse(e=r){var n;return{is:e.includes("HeadlessChrome/"),version:(null===(n=e.match(/HeadlessChrome\/([\d.]+)/))||void 0===n?void 0:n[1])||""}},async is(){return this.parse().is??""==(null==i?void 0:i.navigator)}}];me.forEach((e=>{e.is||(e.is=async function(){return e.parse().is}),e.version||(e.version=async function(){return e.parse().version})}));let pe=[le,te,de,ue,ve,ce];pe.forEach((e=>{e.is||(e.is=async function(){return e.parse().is})}));var he={name:"browser",parse(e=r){let n="",i="";me.forEach((function(r){r.parse(e).is&&(n=r.name,i=r.parse(e).version)}));let a="";var l,t;(pe.forEach((function(n){n.parse(e).is&&(a=n.name)})),"Chrome"==n&&e.match(/\S+Browser/)&&(n=e.match(/\S+Browser/)[0]),"Chrome"==n&&e.match(/\S+Browser/))&&(i=(null===(l=e.replace(/^.*Browser\/([\d.]+).*$/))||void 0===l?void 0:l[1])||"");i||(i=(null===(t=e.match(/Version\/([\d.]+)/))||void 0===t?void 0:t[1])||"");s.parse(e).is?a=parseInt(s.parse(e).version)>75?"Blink":"EdgeHTML":o.parse(e).is&&parseInt(o.parse(e).version)>27&&(a="Blink");let d=e.includes("; wv)"),u=["Googlebot","Baiduspider","Sogouspider","Bingbot","360Spider","Bytespider","YandexBot"].includes(n);return{browser:n,browserVersion:i,engine:a,isWebview:d,isRobot:u}},async getInfo(){var e;let{browser:n,browserVersion:i,engine:a,isWebview:o,isRobot:s}=this.parse();for(let e of me)await e.is()&&(n=e.name,i=await e.version());let l=r;var t,d;("Chrome"==n&&l.match(/\S+Browser/)&&(n=l.match(/\S+Browser/)[0]),"Chrome"==n&&l.match(/\S+Browser/))&&(i=(null===(t=l.replace(/^.*Browser\/([\d.]+).*$/))||void 0===t?void 0:t[1])||"");i||(i=(null===(d=l.match(/Version\/([\d.]+)/))||void 0===d?void 0:d[1])||"");return{browser:n,browserVersion:i,engine:a,isWebview:o,isRobot:s,cookieEnabled:null===globalThis||void 0===globalThis||null===(e=globalThis.navigator)||void 0===e?void 0:e.cookieEnabled,userAgent:l}}},ge={name:"Windows",parse(e=r){var n;let i=(null===(n=e.match(/^Mozilla\/\d.0 \(Windows NT ([\d.]+)[;)].*$/))||void 0===n?void 0:n[1])||"";return{is:e.includes("Windows"),version:{"10.0":"10",6.4:"10 Technical Preview",6.3:"8.1",6.2:"8",6.1:"7","6.0":"Vista",5.2:"XP 64-bit",5.1:"XP",5.01:"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"}[i]||i}},async version(){let e=this.parse().version;return new Promise((function(n){var r;null!=i&&null!==(r=i.navigator)&&void 0!==r&&r.userAgentData?i.navigator.userAgentData.getHighEntropyValues(["platformVersion"]).then((function(e){let r="";if("Windows"===i.navigator.userAgentData.platform){r=parseInt(e.platformVersion.split(".")[0])>=13?"11":"10"}n(r)})):n(e)}))}};let fe=[ge,{name:"Linux",parse:(e=r)=>({is:e.includes("Linux")||e.includes("X11"),version:""})},{name:"macOS",parse(e=r){var n;return{is:e.includes("Macintosh"),version:(null===(n=e.match(/Mac OS X -?([\d_]+)/))||void 0===n?void 0:n[1].replace(/_/g,"."))||""}}},{name:"Android",parse(e=r){var n;return{is:e.includes("Android")||e.includes("Adr"),version:(null===(n=e.match(/Android ([\d.]+);/))||void 0===n?void 0:n[1])||""}}},{name:"HarmonyOS",parse(e=r){var n;let i=(null===(n=e.match(/HarmonyOS (\d+.\d+)/))||void 0===n?void 0:n[1])||"";if(!i){var a,o;let n=+(null===(a=e.match(/HMSCore (\d+.\d+)/))||void 0===a?void 0:a[1])||0;n>=6.1?i="4.0":n>=6?i="3.0":n>=5?i="2.0":n>=4&&(i="1.0"),i={10:"3.0",12:"4.0"}[(null===(o=e.match(/Android (\d+);/))||void 0===o?void 0:o[1])||0]??i}return{is:e.includes("HarmonyOS")||e.includes("ArkWeb"),version:i}}},{name:"Ubuntu",parse:(e=r)=>({is:e.includes("Ubuntu"),version:""})},{name:"FreeBSD",parse:(e=r)=>({is:e.includes("FreeBSD"),version:""})},{name:"Debian",parse(e=r){var n;return{is:e.includes("Debian"),version:(null===(n=e.match(/Debian\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},{name:"iOS",parse(e=r){var n;return{is:e.includes("like Mac OS X"),version:(null===(n=e.match(/OS ([\d_]+) like/))||void 0===n?void 0:n[1].replace(/_/g,"."))||""}}},{name:"Windows Phone",parse(e=r){var n;return{is:e.includes("IEMobile")||e.includes("Windows Phone"),version:(null===(n=e.match(/Windows Phone( OS)? ([\d.]+);/))||void 0===n?void 0:n[2])||""}}},{name:"BlackBerry",parse:(e=r)=>({is:e.includes("BlackBerry")||e.includes("RIM"),version:""})},{name:"MeeGo",parse:(e=r)=>({is:e.includes("MeeGo"),version:""})},{name:"Symbian",parse(e=r){var n;return{is:e.includes("Symbian"),version:(null===(n=e.match(/Series60\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},{name:"Chrome OS",parse(e=r){var n,i;return{is:e.includes("CrOS"),version:(null===(n=e.match(/MSIE ([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/rv:([\d.]+)/))||void 0===i?void 0:i[1])||""}}},{name:"WebOS",parse(e=r){var n;return{is:e.includes("hpwOS"),version:(null===(n=e.match(/hpwOS\/([\d.]+);/))||void 0===n?void 0:n[1])||""}}},{name:"UOS",parse(e=r){var n;return{is:e.includes("UOS"),version:(null===(n=e.match(/UOS\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}}];fe.forEach((e=>{e.is||(e.is=async function(){return e.parse().is}),e.version||(e.version=async function(){return e.parse().version})}));var be={name:"system",parse(e=r){let n="",i="";fe.forEach((function(r){r.parse(e).is&&(n=r.name,i=r.parse(e).version)}));let a="";e.match(/(Win64|x64|WOW64|x86_64)/i)?a="Win64":e.match(/(Win32|x86|WOW32)/i)?a="Win32":e.match(/aarch64|arm64/)?a="ARM64":e.match(/arm32/)&&(a="ARM32");let o="",s=e+"|"+a;o=s.match(/armv?\d+/i)||s.match(/aarch64/)?"arm":s.match(/loongarch64/)?"loongarch":"x86";let l=e.match(/Win64|x64|WOW64|x86_64|aarch64|arm64|loongarch64/i)?64:32;return{system:n,systemVersion:i,platform:a,architecture:o,bitness:l}},async getInfo(){var e,n;let{system:r,systemVersion:a,platform:o,architecture:s,bitness:l}=this.parse();for(let e of fe)await e.is()&&(r=e.name,a=await e.version());var t,d;(null!=i&&null!==(e=i.navigator)&&void 0!==e&&e.platform&&(o=i.navigator.platform),null!=i&&null!==(n=i.navigator)&&void 0!==n&&n.userAgentData)&&(s=await(null===(t=i.navigator.userAgentData)||void 0===t?void 0:t.getHighEntropyValues(["architecture"]).then((e=>e.architecture||s))),l=await(null===(d=i.navigator.userAgentData)||void 0===d?void 0:d.getHighEntropyValues(["bitness"]).then((e=>+e.bitness||l))));return{system:r,systemVersion:a,platform:o,architecture:s,bitness:l}}};let we=[{name:"Mobile",parse:(e=r)=>({is:e.includes("Mobi")||e.includes("iPh")||e.includes("480")})},{name:"Tablet",parse:(e=r)=>({is:e.includes("Tablet")||e.includes("Pad")||e.includes("Nexus 7")}),async is(){return this.parse().is||"MacIntel"===(null==i?void 0:i.navigator.platform)&&(null==i?void 0:i.navigator.maxTouchPoints)>1}}];we.forEach((e=>{e.is||(e.is=async function(){return e.parse().is})}));var ye={name:"device",parse(e=r){let n="Desktop";return we.forEach((function(i){i.parse(e).is&&(n=i.name)})),{device:n}},async getInfo(){var e;let n=(null===globalThis||void 0===globalThis?void 0:globalThis.devicePixelRatio)||1,i=(null===globalThis||void 0===globalThis||null===(e=globalThis.navigator)||void 0===e?void 0:e.deviceMemory)||4;return Object.assign({devicePixelRatio:n,deviceMemory:i},this.parse())}},Be={name:"gpu",parse:()=>({}),async getInfo(){let e="",n="";if(null!=i&&i.document){let o=i.document.createElement("canvas").getContext("experimental-webgl");if(o){var r,a;let i=o.getExtension("WEBGL_debug_renderer_info"),s=o.getParameter(i.UNMASKED_RENDERER_WEBGL);e=(null===(r=s.match(/ANGLE \((.+?),/))||void 0===r?void 0:r[1])||"",n=(null===(a=s.match(/, (.+?) (\(|vs_)/))||void 0===a?void 0:a[1])||""}}return{gpu:e,gpuModel:n}}};const Se=/\b((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b/,Ee=/\b(?:[A-F0-9]{1,4}:){7}[A-F0-9]{1,4}\b/i;let Ae=globalThis.RTCPeerConnection||globalThis.mozRTCPeerConnection||globalThis.webkitRTCPeerConnection;var Te={name:"network",parse:()=>({}),async getInfo(){var e,n;let r="unknown",a=null==i||null===(e=i.navigator)||void 0===e?void 0:e.connection;return a&&(r=a.type||a.effectiveType,"2"!=r&&"unknown"!=r||(r="wifi")),{network:r,isOnline:(null==i||null===(n=i.navigator)||void 0===n?void 0:n.onLine)||!1,ip:await(async()=>{const e=new Set,n=n=>{var i;const r=null==n||null===(i=n.candidate)||void 0===i?void 0:i.candidate;if(r)for(const n of[Se,Ee]){const i=r.match(n);i&&e.add(i[0])}};return new Promise((function(i,r){const a=new Ae({iceServers:[{urls:"stun:stun.l.google.com:19302"},{urls:"stun:stun.services.mozilla.com"}]});a.addEventListener("icecandidate",n),a.createDataChannel(""),a.createOffer().then((e=>a.setLocalDescription(e)),r);let o=20,s=null,l=function(){try{a.removeEventListener("icecandidate",n),a.close()}catch{}s&&clearInterval(s)};s=setInterval((function(){let n=[...e];n.length?(l(),i(n[0])):o?o--:(l(),i(""))}),100)}))})()}}},xe={name:"battery",parse:()=>({}),async getInfo(){var e;let n=!0,r=1;return null!=i&&null!==(e=i.navigator)&&void 0!==e&&e.getBattery&&(n=await i.navigator.getBattery().then((e=>null==e?void 0:e.charging)),r=await i.navigator.getBattery().then((e=>+(null==e?void 0:e.level)||-1))),{isCharging:n,battery:r}}};var Me={name:"screen",parse:()=>({}),async getInfo(){var e,n,r,a,o,s,l;return{screenWidth:(null==i||null===(e=i.screen)||void 0===e?void 0:e.width)||0,screenHeight:(null==i||null===(n=i.screen)||void 0===n?void 0:n.height)||0,clientWidth:(null==i||null===(r=i.document)||void 0===r||null===(r=r.documentElement)||void 0===r?void 0:r.clientWidth)||(null==i||null===(a=i.document)||void 0===a||null===(a=a.body)||void 0===a?void 0:a.clientWidth)||0,clientHeight:(null==i||null===(o=i.document)||void 0===o||null===(o=o.documentElement)||void 0===o?void 0:o.clientHeight)||(null==i||null===(s=i.document)||void 0===s||null===(s=s.body)||void 0===s?void 0:s.clientHeight)||0,screenFPS:await async function(){return new Promise((function(e){let n=0,i=1,r=[],a=function(o){if(n>0)if(i<12)r.push(o-n),n=o,i++,requestAnimationFrame(a);else{r.sort(),r=r.slice(1,11);let n=r.reduce(((e,n)=>e+n));const i=10*Math.round(1e4/n/10);e(i)}else n=o,requestAnimationFrame(a)};requestAnimationFrame(a)}))}(),screenColorDepth:null==i?void 0:i.screen.colorDepth,screenPixelDepth:null==i?void 0:i.screen.pixelDepth,isTouch:(null==i||null===(l=i.navigator)||void 0===l?void 0:l.maxTouchPoints)>0||!1}}},Ie={name:"language",parse:()=>({}),async getInfo(){var e,n,r;let a=(null==i||null===(e=i.navigator)||void 0===e?void 0:e.language)||(null==i||null===(n=i.navigator)||void 0===n?void 0:n.browserLanguage)||(null==i||null===(r=i.navigator)||void 0===r?void 0:r.systemLanguage);if("string"!=typeof a)return"Unknown language";let o=a.split("-");return o[1]&&(o[1]=o[1].toUpperCase()),{language:o.join("_")}}},Oe={name:"timezone",parse:()=>({}),async getInfo(){var e;return{timezone:null===(e=Intl)||void 0===e||null===(e=e.DateTimeFormat())||void 0===e||null===(e=e.resolvedOptions())||void 0===e?void 0:e.timeZone}}},Ce={name:"font-family",is(e="Arial"){if("string"!=typeof e||null==i||!i.document)return!1;let n="Arial",r=100,a=100,o=i.document.createElement("canvas"),s=o.getContext("2d",{willReadFrequently:!0});o.width=r,o.height=a,s.textAlign="center",s.fillStyle="black",s.textBaseline="middle";let l=function(e){s.clearRect(0,0,r,a),s.font=`100px ${e}, ${n}`,s.fillText("永",50,50);let i=s.getImageData(0,0,r,a).data;return[].slice.call(i).filter((function(e){return 0!=e}))};return l(n).join("")!==l(e).join("")}},ke={name:"webgl",is(){if(null==i||!i.document)return!1;const e=i.document.createElement("canvas"),n=e.getContext("webgl")||e.getContext("experimental-webgl");return n&&n instanceof WebGLRenderingContext}};return{parse(e){let n={};return[he,be,ye].forEach((i=>{n=Object.assign(n,i.parse(e))})),n},async getInfo(e=["browser","system","device","gpu","network","battery","screen","language","timezone"]){let n={},i=[he,be,ye,Be,Te,xe,Me,Ie,Oe].filter((n=>e.includes(n.name)));for(let e of i)n=Object.assign(n,await e.getInfo());return n},isSupport(e,n){let i=[Ce,ke].find((n=>e==n.name));return!!i&&i.is(n)}}})); diff --git a/dist/browser.min.mjs b/dist/browser.min.mjs index b284323..e748e2e 100644 --- a/dist/browser.min.mjs +++ b/dist/browser.min.mjs @@ -8,6 +8,6 @@ * Released under the MIT License * https://github.com/mumuy/browser * - * Created on: 2024-09-23 + * Created on: 2024-09-26 */ -let e={};"undefined"!=typeof globalThis?e=globalThis:"undefined"!=typeof self?e=self:"undefined"!=typeof window?e=window:"undefined"!=typeof global&&(e=global);var n,i=e,r=null==i||null===(n=i.navigator)||void 0===n?void 0:n.userAgent,a={name:"Safari",parse(e=r){var n;return{is:e.includes("Safari"),version:(null===(n=e.match(/Version\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},o={name:"Chrome",parse(e=r){var n,i;return{is:e.includes("Chrome")||e.includes("CriOS"),version:(null===(n=e.match(/Chrome\/([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/CriOS\/([\d.]+)/))||void 0===i?void 0:i[1])||""}}},s={name:"Edge",parse(e=r){var n,i,a,o;return{is:e.includes("Edge")||e.includes("Edg/")||e.includes("EdgA")||e.includes("EdgiOS"),version:(null===(n=e.match(/Edge\/([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/Edg\/([\d.]+)/))||void 0===i?void 0:i[1])||(null===(a=e.match(/EdgA\/([\d.]+)/))||void 0===a?void 0:a[1])||(null===(o=e.match(/EdgiOS\/([\d.]+)/))||void 0===o?void 0:o[1])||""}}},l={name:"IE",parse(e=r){var n,i;return{is:e.includes("MSIE")||e.includes("Trident"),version:(null===(n=e.match(/MSIE ([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/rv:([\d.]+)/))||void 0===i?void 0:i[1])||""}}},t={name:"Firefox",parse(e=r){var n,i;return{is:e.includes("Firefox")||e.includes("FxiOS"),version:(null===(n=e.match(/Firefox\/([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/FxiOS\/([\d.]+)/))||void 0===i?void 0:i[1])||""}}},d={name:"Firefox Focus",parse(e=r){var n;return{is:e.includes("Focus"),version:(null===(n=e.match(/Focus\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},u={name:"Chromium",parse(e=r){var n;return{is:e.includes("Chromium"),version:(null===(n=e.match(/Chromium\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},v={name:"Opera",parse(e=r){var n,i;return{is:e.includes("Opera")||e.includes("OPR"),version:(null===(n=e.match(/Opera\/([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/OPR\/([\d.]+)/))||void 0===i?void 0:i[1])||""}}},c={name:"Opera GX",parse(e=r){let n=!1;return v.parse(e).is&&(n=e.includes("Edition GX")),{is:n,version:v.parse(e).version}}},m={name:"Vivaldi",parse(e=r){var n,i;return{is:e.includes("Vivaldi"),version:(null===(n=e.match(/Vivaldi\/([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/Chrome\/([\d.]+)/))||void 0===i?void 0:i[1])||""}},async is(){let e=this.parse().is;return new Promise((function(n){e?n(!1):fetch("chrome-extension://jffbochibkahlbbmanpmndnhmeliecah/config.json").then((function(){n(!0)})).catch((function(){n(!1)}))}))}},p={name:"Yandex",parse(e=r){var n;return{is:e.includes("YaBrowser"),version:(null===(n=e.match(/YaBrowser\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},h={name:"Brave",parse(e=r){var n;return{is:e.includes("Brave"),version:(null===(n=e.match(/Chrome\/([\d.]+)/))||void 0===n?void 0:n[1])||""}},is:async function(){var e;return!!(this.parse().is||null!=i&&null!==(e=i.navigator)&&void 0!==e&&e.brave)}},g={name:"Arora",parse(e=r){var n;return{is:e.includes("Arora"),version:(null===(n=e.match(/Arora\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},f={name:"Lunascape",parse(e=r){var n;return{is:e.includes("Lunascape"),version:(null===(n=e.match(/Lunascape[\/\s]([\d.]+)/))||void 0===n?void 0:n[1])||""}}},w={name:"QupZilla",parse(e=r){var n;return{is:e.includes("QupZilla"),version:(null===(n=e.match(/QupZilla[\/\s]([\d.]+)/))||void 0===n?void 0:n[1])||""}}},b={name:"Coc Coc",parse(e=r){var n;return{is:e.includes("coc_coc_browser"),version:(null===(n=e.match(/coc_coc_browser\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},y={name:"Kindle",parse(e=r){var n;return{is:e.includes("Kindle")||e.includes("Silk/"),version:(null===(n=e.match(/Version\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},B={name:"Iceweasel",parse(e=r){var n;return{is:e.includes("Iceweasel"),version:(null===(n=e.match(/Iceweasel\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},S={name:"Konqueror",parse(e=r){var n;return{is:e.includes("Konqueror"),version:(null===(n=e.match(/Konqueror\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},E={name:"SeaMonkey",parse(e=r){var n;return{is:e.includes("SeaMonkey"),version:(null===(n=e.match(/SeaMonkey\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},A={name:"Epiphany",parse(e=r){var n;return{is:e.includes("Epiphany"),version:(null===(n=e.match(/Epiphany\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},T={name:"Huawei",parse(e=r){var n,i,a;return{is:e.includes("HuaweiBrowser")||e.includes("HBPC/"),version:(null===(n=e.match(/HuaweiBrowser\/([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/HBPC\/([\d.]+)/))||void 0===i?void 0:i[1])||(null===(a=e.match(/Version\/([\d.]+)/))||void 0===a?void 0:a[1])||""}}},x={name:"OPPO",parse(e=r){var n;return{is:e.includes("HeyTapBrowser")||e.includes("OPPO"),version:(null===(n=e.match(/HeyTapBrowser\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},M={name:"Vivo",parse(e=r){var n;return{is:e.includes("VivoBrowser"),version:(null===(n=e.match(/VivoBrowser\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},I={name:"Xiaomi",parse(e=r){var n;return{is:e.includes("MiuiBrowser"),version:(null===(n=e.match(/115Browser\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},O={name:"Meizu",parse(e=r){var n;return{is:e.includes("MZBrowser"),version:(null===(n=e.match(/MZBrowser\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},C={name:"OnePlus",parse:(e=r)=>({is:e.includes("ONEPLUS"),version:""})},P={name:"Samsung",parse(e=r){var n;return{is:e.includes("SamsungBrowser"),version:(null===(n=e.match(/SamsungBrowser\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}};function k(e,n){var i;let r=null===globalThis||void 0===globalThis||null===(i=globalThis.navigator)||void 0===i?void 0:i.mimeTypes;for(let i in r)if(r[i][e]&&r[i][e]==n)return r[i];return null}var W={name:"360",parse(e=r){var n,i;return{is:e.includes("QihooBrowser")||e.includes("QHBrowser")||e.includes(" 360 "),version:(null===(n=e.match(/QihooBrowser(HD)?\/([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/Browser \(v([\d.]+)/))||void 0===i?void 0:i[1])||""}},async is(){let e=this.parse().is;if(null!=i&&i.chrome){let n=parseInt(o.parse().version);k("type","application/360softmgrplugin")||k("type","application/mozilla-npqihooquicklogin")||k("type","application/npjlgplayer3-chrome-jlp")||n>36&&null!=i&&i.showModalDialog?e=!0:n>45&&(e=k("type","application/vnd.chromium.remoting-viewer"),!e&&n>=69&&(e=k("type","application/asx")))}return e}},D={name:"360SE",parse(e=r){let n=parseInt(o.parse(e).version);return{is:e.includes("360SE"),version:{122:"15.3",114:"15.0",108:"14.0",86:"13.0",78:"12.0",69:"11.0",63:"10.0",55:"9.1",45:"8.1",42:"8.0",31:"7.0",21:"6.3"}[n]||""}},async is(){let e=!1;var n;await W.is()&&((k("type","application/gameplugin")||null!=i&&null!==(n=i.navigator)&&void 0!==n&&null!==(n=n.userAgentData)&&void 0!==n&&n.brands.filter((e=>"Not.A/Brand"==e.brand)).length)&&(e=!0));return e||new Promise((function(e){fetch("chrome-extension://fjbbmgamncjadhlpmffehlmmkdnkiadk/css/content.css").then((function(){e(!0)})).catch((function(){e(!1)}))}))}},H={name:"360EE",parse(e=r){var n;let i=parseInt(o.parse(e).version);return{is:e.includes("360EE"),version:(null===(n=e.match(/Browser \(v([\d.]+)/))||void 0===n?void 0:n[1])||{122:"22.3",119:"22.0",108:"14.0",95:"21.0",86:"13.0",78:"12.0",69:"11.0",63:"9.5",55:"9.0",50:"8.7",30:"7.5"}[i]||""}},async is(){let e=this.parse().is;if(k("type","application/cenroll.cenroll.version.1")||k("type","application/hwepass2001.installepass2001"))e=!0;else if(await W.is()){var n;null!==globalThis&&void 0!==globalThis&&null!==(n=globalThis.navigator)&&void 0!==n&&null!==(n=n.userAgentData)&&void 0!==n&&n.brands.find((e=>"Not A(Brand"==e.brand||"Not?A_Brand"==e.brand))&&(e=!0)}return e}},L={name:"360AI",parse(e=r){let n=parseInt(o.parse(e).version);return{is:e.includes("360SEAI"),version:{114:"1.0"}[n]||""}},async is(){let e=this.parse().is;var n;await W.is()&&(null!=i&&null!==(n=i.navigator)&&void 0!==n&&null!==(n=n.userAgentData)&&void 0!==n&&n.brands.filter((e=>"Not.A/Brand"==e.brand)).length&&!k("type","application/gameplugin")&&(e=!0));return e}},Q={name:"360AI",parse(e=r){var n;return{is:e.includes("360EEAI"),version:(null===(n=e.match(/360EE\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}};const V=()=>new Promise((e=>{var n;const r=`cv_${(new Date).getTime()%1e5}${100*Math.floor(Math.random())}`,a={key:"GetDeviceInfo",data:{},callback:r},o=JSON.stringify(a);if(null==i||null===(n=i.webkit)||void 0===n||!n.messageHandlers)return e({});i.webkit.messageHandlers.excuteCmd.postMessage(o),i[r]=function(n){delete i[r],e(JSON.parse(n||"{}"))}}));var _={name:"360EE",parse:()=>({is:!1,version:""}),is:async()=>V().then((function(e){return"360csexm"==(null==e?void 0:e.pid)||!1})),version:async()=>V().then((function(e){return(null==e?void 0:e.module_version)||""}))},R={name:"360ENT",parse(e=r){var n;let i=parseInt(o.parse(e).version);return{is:e.includes("360ENT"),version:(null===(n=e.match(/Browser \(v([\d.]+)/))||void 0===n?void 0:n[1])||{86:"13.0",78:"12.0",69:"11.0",63:"9.5",55:"9.0",50:"8.7",30:"7.5"}[i]||""}}},F={name:"UC",parse(e=r){var n;return{is:e.includes("UCBrowser")||e.includes(" UBrowser")||e.includes("UCWEB"),version:(null===(n=e.match(/UC?Browser\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},N={name:"QQBrowser",parse(e=r){var n;return{is:e.includes("QQBrowser"),version:(null===(n=e.match(/QQBrowser\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},U={name:"QQ",parse(e=r){var n;return{is:e.includes("QQ/"),version:(null===(n=e.match(/QQ\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},Y={name:"Baidu",parse(e=r){var n,i;return{is:e.includes("Baidu")||e.includes("BIDUBrowser")||e.includes("baidubrowser")||e.includes("baiduboxapp")||e.includes("BaiduD"),version:(null===(n=e.match(/BIDUBrowser[\s\/]([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/baiduboxapp\/([\d.]+)/))||void 0===i?void 0:i[1])||""}}},G={name:"Maxthon",parse(e=r){var n,i;let a=parseInt(o.parse(e).version);return{is:e.includes("Maxthon"),version:(null===(n=e.match(/Maxthon\/([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/Version\/([\d.]+)/))||void 0===i?void 0:i[1])||{109:"7.0",78:"6.0"}[a]||""}},is(){return this.parse().is||(null==i?void 0:i.maxthon)}},j={name:"Sogou",parse(e=r){var n,i,a=parseInt(o.parse(e).version);return{is:e.includes("MetaSr")||e.includes("Sogou"),version:(null===(n=e.match(/SogouMobileBrowser\/([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/SogouMSE\/([\d.]+)/))||void 0===i?void 0:i[1])||{94:"12.0",80:"11.0"}[a]||""}}},q={name:"Liebao",parse(e=r){var n;let i=parseInt(o.parse(e).version);return{is:e.includes("LBBROWSER")||e.includes("LieBaoFast"),version:(null===(n=e.match(/LieBaoFast\/([\d.]+)/))||void 0===n?void 0:n[1])||{112:"9.0",79:"8.0",57:"6.5",49:"6.0",46:"5.9",42:"5.3",39:"5.2",34:"5.0",29:"4.5",21:"4.0"}[i]||""}},is(){return this.parse().is||(null==i?void 0:i.liebao)}},K={name:"2345Explorer",parse(e=r){var n,i;let a=parseInt(o.parse(e).version);return{is:e.includes("2345Explorer")||e.includes("Mb2345Browser")||e.includes("2345chrome"),version:(null===(n=e.match(/2345Explorer\/([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/Mb2345Browser\/([\d.]+)/))||void 0===i?void 0:i[1])||{109:"13.0",69:"10.0",55:"9.9"}[a]||""}},async is(){let e=this.parse().is;var n,r;e||(e=(null==i?void 0:i.chrome)&&((null==i||null===(n=i.chrome)||void 0===n?void 0:n.adblock2345)||(null==i||null===(r=i.chrome)||void 0===r?void 0:r.common2345)));return e}},z={name:"115Browser",parse(e=r){var n;return{is:e.includes("115Browser"),version:(null===(n=e.match(/115Browser\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},X={name:"TheWorld",parse(e=r){var n;return{is:e.includes("TheWorld"),version:(null===(n=e.match(/TheWorld ([\d.]+)/))||void 0===n?void 0:n[1])||""}}},$={name:"Quark",parse(e=r){var n,i;return{is:e.includes("Quark"),version:(null===(n=e.match(/Quark\/([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/QuarkPC\/([\d.]+)/))||void 0===i?void 0:i[1])||""}}},Z={name:"Qiyu",parse(e=r){var n;return{is:e.includes("Qiyu"),version:(null===(n=e.match(/Qiyu\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},J={name:"Lenovo",parse(e=r){var n;return{is:e.includes("SLBrowser"),version:(null===(n=e.match(/SLBrowser\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},ee={name:"Wechat",parse(e=r){var n;return{is:e.includes("MicroMessenger"),version:(null===(n=e.match(/MicroMessenger\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},ne={name:"WechatWork",parse(e=r){var n;return{is:e.includes("wxwork"),version:(null===(n=e.match(/wxwork\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},ie={name:"Taobao",parse(e=r){var n;return{is:e.includes("AliApp(TB"),version:(null===(n=e.match(/AliApp\(TB\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},re={name:"Alipay",parse(e=r){var n;return{is:e.includes("AliApp(AP"),version:(null===(n=e.match(/AliApp\(AP\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},ae={name:"Weibo",parse(e=r){var n;return{is:e.includes("Weibo"),version:(null===(n=e.match(/weibo__([\d.]+)/))||void 0===n?void 0:n[1])||""}}},oe={name:"Douban",parse(e=r){var n;return{is:e.includes("com.douban.frodo"),version:(null===(n=e.match(/com.douban.frodo\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},se={name:"Toutiao",parse(e=r){var n;return{is:e.includes("NewsArticle"),version:(null===(n=e.match(/NewsArticle\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},le={name:"WebKit",parse:(e=r)=>({is:e.includes("AppleWebKit")})},te={name:"Trident",parse:(e=r)=>({is:e.includes("Trident")||e.includes("NET CLR")})},de={name:"Gecko",parse:(e=r)=>({is:e.includes("Gecko/")})},ue={name:"Servo",parse:(e=r)=>({is:e.includes("Servo/")})},ve={name:"Presto",parse:(e=r)=>({is:e.includes("Presto")})},ce={name:"KHTML",parse:(e=r)=>({is:e.includes("KHTML/")})};let me=[a,o,s,l,t,d,u,v,c,m,p,h,g,f,w,b,y,B,S,E,A,T,x,M,I,O,C,P,W,H,D,_,L,Q,R,F,N,U,Y,G,j,q,K,z,X,$,Z,J,ee,ne,ie,re,ae,oe,{name:"Suning",parse(e=r){var n;return{is:e.includes("SNEBUY-APP"),version:(null===(n=e.match(/SNEBUY-APP([\d.]+)/))||void 0===n?void 0:n[1])||""}}},{name:"iQIYI",parse(e=r){var n;return{is:e.includes("IqiyiApp"),version:(null===(n=e.match(/IqiyiVersion\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},{name:"DingTalk",parse(e=r){var n;return{is:e.includes("DingTalk"),version:(null===(n=e.match(/DingTalk\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},{name:"Douyin",parse(e=r){var n;return{is:e.includes("aweme"),version:(null===(n=e.match(/app_version\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},se,{name:"Googlebot",parse(e=r){var n;return{is:e.includes("Googlebot"),version:(null===(n=e.match(/Googlebot\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},{name:"Baiduspider",parse(e=r){var n;return{is:e.includes("Baiduspider"),version:(null===(n=e.match(/Baiduspider(-render)?\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},{name:"Sogouspider",parse(e=r){var n;return{is:e.match(/Sogou (\S+) Spider\/([\d.]+)/i),version:(null===(n=e.match(/Sogou (\S+) Spider\/([\d.]+)/i))||void 0===n?void 0:n[1])||""}}},{name:"Bingbot",parse(e=r){var n;return{is:e.includes("bingbot"),version:(null===(n=e.match(/bingbot\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},{name:"360Spider",parse:(e=r)=>({is:e.includes("360Spider")||e.includes("HaosouSpider"),version:""})},{name:"Bytespider",parse:(e=r)=>({is:e.includes("Bytespider"),version:""})},{name:"YisouSpider",parse(e=r){var n;return{is:e.includes("YisouSpider"),version:(null===(n=e.match(/YisouSpider\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},{name:"YodaoBot",parse(e=r){var n;return{is:e.includes("YodaoBot"),version:(null===(n=e.match(/YodaoBot\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},{name:"YandexBot",parse(e=r){var n;return{is:e.includes("YandexBot"),version:(null===(n=e.match(/YandexBot\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},{name:"Headless",parse(e=r){var n;return{is:e.includes("HeadlessChrome/"),version:(null===(n=e.match(/HeadlessChrome\/([\d.]+)/))||void 0===n?void 0:n[1])||""}},async is(){return this.parse().is??""==(null==i?void 0:i.navigator)}}];me.forEach((e=>{e.is||(e.is=async function(){return e.parse().is}),e.version||(e.version=async function(){return e.parse().version})}));let pe=[le,te,de,ue,ve,ce];pe.forEach((e=>{e.is||(e.is=async function(){return e.parse().is})}));var he={name:"browser",parse(e=r){let n="",i="";me.forEach((function(r){r.parse(e).is&&(n=r.name,i=r.parse(e).version)}));let a="";var l,t;(pe.forEach((function(n){n.parse(e).is&&(a=n.name)})),"Chrome"==n&&e.match(/\S+Browser/)&&(n=e.match(/\S+Browser/)[0]),"Chrome"==n&&e.match(/\S+Browser/))&&(i=(null===(l=e.replace(/^.*Browser\/([\d.]+).*$/))||void 0===l?void 0:l[1])||"");i||(i=(null===(t=e.match(/Version\/([\d.]+)/))||void 0===t?void 0:t[1])||"");s.parse(e).is?a=parseInt(s.parse(e).version)>75?"Blink":"EdgeHTML":o.parse(e).is&&parseInt(o.parse(e).version)>27&&(a="Blink");let d=e.includes("; wv)"),u=["Googlebot","Baiduspider","Sogouspider","Bingbot","360Spider","Bytespider","YandexBot"].includes(n);return{browser:n,browserVersion:i,engine:a,isWebview:d,isRobot:u}},async getInfo(){let{browser:e,browserVersion:n,engine:i,isWebview:a,isRobot:o}=this.parse();for(let i of me)await i.is()&&(e=i.name,n=await i.version());let s=r;var l,t;("Chrome"==e&&s.match(/\S+Browser/)&&(e=s.match(/\S+Browser/)[0]),"Chrome"==e&&s.match(/\S+Browser/))&&(n=(null===(l=s.replace(/^.*Browser\/([\d.]+).*$/))||void 0===l?void 0:l[1])||"");n||(n=(null===(t=s.match(/Version\/([\d.]+)/))||void 0===t?void 0:t[1])||"");return{browser:e,browserVersion:n,engine:i,isWebview:a,isRobot:o,userAgent:s}}},ge={name:"Windows",parse(e=r){var n;let i=(null===(n=e.match(/^Mozilla\/\d.0 \(Windows NT ([\d.]+)[;)].*$/))||void 0===n?void 0:n[1])||"";return{is:e.includes("Windows"),version:{"10.0":"10",6.4:"10 Technical Preview",6.3:"8.1",6.2:"8",6.1:"7","6.0":"Vista",5.2:"XP 64-bit",5.1:"XP",5.01:"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"}[i]||i}},async version(){let e=this.parse().version;return new Promise((function(n){var r;null!=i&&null!==(r=i.navigator)&&void 0!==r&&r.userAgentData?i.navigator.userAgentData.getHighEntropyValues(["platformVersion"]).then((function(e){let r="";if("Windows"===i.navigator.userAgentData.platform){r=parseInt(e.platformVersion.split(".")[0])>=13?"11":"10"}n(r)})):n(e)}))}};let fe=[ge,{name:"Linux",parse:(e=r)=>({is:e.includes("Linux")||e.includes("X11"),version:""})},{name:"macOS",parse(e=r){var n;return{is:e.includes("Macintosh"),version:(null===(n=e.match(/Mac OS X -?([\d_]+)/))||void 0===n?void 0:n[1].replace(/_/g,"."))||""}}},{name:"Android",parse(e=r){var n;return{is:e.includes("Android")||e.includes("Adr"),version:(null===(n=e.match(/Android ([\d.]+);/))||void 0===n?void 0:n[1])||""}}},{name:"HarmonyOS",parse(e=r){var n;let i=(null===(n=e.match(/HarmonyOS (\d+.\d+)/))||void 0===n?void 0:n[1])||"";if(!i){var a,o;let n=+(null===(a=e.match(/HMSCore (\d+.\d+)/))||void 0===a?void 0:a[1])||0;n>=6.1?i="4.0":n>=6?i="3.0":n>=5?i="2.0":n>=4&&(i="1.0"),i={10:"3.0",12:"4.0"}[(null===(o=e.match(/Android (\d+);/))||void 0===o?void 0:o[1])||0]??i}return{is:e.includes("HarmonyOS")||e.includes("ArkWeb"),version:i}}},{name:"Ubuntu",parse:(e=r)=>({is:e.includes("Ubuntu"),version:""})},{name:"FreeBSD",parse:(e=r)=>({is:e.includes("FreeBSD"),version:""})},{name:"Debian",parse(e=r){var n;return{is:e.includes("Debian"),version:(null===(n=e.match(/Debian\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},{name:"iOS",parse(e=r){var n;return{is:e.includes("like Mac OS X"),version:(null===(n=e.match(/OS ([\d_]+) like/))||void 0===n?void 0:n[1].replace(/_/g,"."))||""}}},{name:"Windows Phone",parse(e=r){var n;return{is:e.includes("IEMobile")||e.includes("Windows Phone"),version:(null===(n=e.match(/Windows Phone( OS)? ([\d.]+);/))||void 0===n?void 0:n[2])||""}}},{name:"BlackBerry",parse:(e=r)=>({is:e.includes("BlackBerry")||e.includes("RIM"),version:""})},{name:"MeeGo",parse:(e=r)=>({is:e.includes("MeeGo"),version:""})},{name:"Symbian",parse(e=r){var n;return{is:e.includes("Symbian"),version:(null===(n=e.match(/Series60\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},{name:"Chrome OS",parse(e=r){var n,i;return{is:e.includes("CrOS"),version:(null===(n=e.match(/MSIE ([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/rv:([\d.]+)/))||void 0===i?void 0:i[1])||""}}},{name:"WebOS",parse(e=r){var n;return{is:e.includes("hpwOS"),version:(null===(n=e.match(/hpwOS\/([\d.]+);/))||void 0===n?void 0:n[1])||""}}},{name:"UOS",parse(e=r){var n;return{is:e.includes("UOS"),version:(null===(n=e.match(/UOS\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}}];fe.forEach((e=>{e.is||(e.is=async function(){return e.parse().is}),e.version||(e.version=async function(){return e.parse().version})}));var we={name:"system",parse(e=r){let n="",i="";fe.forEach((function(r){r.parse(e).is&&(n=r.name,i=r.parse(e).version)}));let a="";e.match(/(Win64|x64|WOW64|x86_64)/i)?a="Win64":e.match(/(Win32|x86|WOW32)/i)?a="Win32":e.match(/aarch64|arm64/)?a="ARM64":e.match(/arm32/)&&(a="ARM32");let o="",s=e+"|"+a;o=s.match(/armv?\d+/i)||s.match(/aarch64/)?"arm":s.match(/loongarch64/)?"loongarch":"x86";let l=e.match(/Win64|x64|WOW64|x86_64|aarch64|arm64|loongarch64/i)?64:32;return{system:n,systemVersion:i,platform:a,architecture:o,bitness:l}},async getInfo(){var e,n;let{system:r,systemVersion:a,platform:o,architecture:s,bitness:l}=this.parse();for(let e of fe)await e.is()&&(r=e.name,a=await e.version());var t,d;(null!=i&&null!==(e=i.navigator)&&void 0!==e&&e.platform&&(o=i.navigator.platform),null!=i&&null!==(n=i.navigator)&&void 0!==n&&n.userAgentData)&&(s=await(null===(t=i.navigator.userAgentData)||void 0===t?void 0:t.getHighEntropyValues(["architecture"]).then((e=>e.architecture||s))),l=await(null===(d=i.navigator.userAgentData)||void 0===d?void 0:d.getHighEntropyValues(["bitness"]).then((e=>+e.bitness||l))));return{system:r,systemVersion:a,platform:o,architecture:s,bitness:l}}};let be=[{name:"Mobile",parse:(e=r)=>({is:e.includes("Mobi")||e.includes("iPh")||e.includes("480")})},{name:"Tablet",parse:(e=r)=>({is:e.includes("Tablet")||e.includes("Pad")||e.includes("Nexus 7")}),async is(){return this.parse().is||"MacIntel"===(null==i?void 0:i.navigator.platform)&&(null==i?void 0:i.navigator.maxTouchPoints)>1}}];be.forEach((e=>{e.is||(e.is=async function(){return e.parse().is})}));var ye={name:"device",parse(e=r){let n="Desktop";return be.forEach((function(i){i.parse(e).is&&(n=i.name)})),{device:n}},async getInfo(){var e;let n=(null===globalThis||void 0===globalThis?void 0:globalThis.devicePixelRatio)||1,i=(null===globalThis||void 0===globalThis||null===(e=globalThis.navigator)||void 0===e?void 0:e.deviceMemory)||4;return Object.assign({devicePixelRatio:n,deviceMemory:i},this.parse())}},Be={name:"gpu",parse:()=>({}),async getInfo(){let e="",n="";if(null!=i&&i.document){let o=i.document.createElement("canvas").getContext("experimental-webgl");if(o){var r,a;let i=o.getExtension("WEBGL_debug_renderer_info"),s=o.getParameter(i.UNMASKED_RENDERER_WEBGL);e=(null===(r=s.match(/ANGLE \((.+?),/))||void 0===r?void 0:r[1])||"",n=(null===(a=s.match(/, (.+?) (\(|vs_)/))||void 0===a?void 0:a[1])||""}}return{gpu:e,gpuModel:n}}};const Se=/\b((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b/,Ee=/\b(?:[A-F0-9]{1,4}:){7}[A-F0-9]{1,4}\b/i;let Ae=globalThis.RTCPeerConnection||globalThis.mozRTCPeerConnection||globalThis.webkitRTCPeerConnection;var Te={name:"network",parse:()=>({}),async getInfo(){var e,n;let r="unknown",a=null==i||null===(e=i.navigator)||void 0===e?void 0:e.connection;return a&&(r=a.type||a.effectiveType,"2"!=r&&"unknown"!=r||(r="wifi")),{network:r,isOnline:(null==i||null===(n=i.navigator)||void 0===n?void 0:n.onLine)||!1,ip:await(async()=>{const e=new Set,n=n=>{var i;const r=null==n||null===(i=n.candidate)||void 0===i?void 0:i.candidate;if(r)for(const n of[Se,Ee]){const i=r.match(n);i&&e.add(i[0])}};return new Promise((function(i,r){const a=new Ae({iceServers:[{urls:"stun:stun.l.google.com:19302"},{urls:"stun:stun.services.mozilla.com"}]});a.addEventListener("icecandidate",n),a.createDataChannel(""),a.createOffer().then((e=>a.setLocalDescription(e)),r);let o=20,s=null,l=function(){try{a.removeEventListener("icecandidate",n),a.close()}catch{}s&&clearInterval(s)};s=setInterval((function(){let n=[...e];n.length?(l(),i(n[0])):o?o--:(l(),i(""))}),100)}))})()}}},xe={name:"battery",parse:()=>({}),async getInfo(){var e;let n=!0,r=1;return null!=i&&null!==(e=i.navigator)&&void 0!==e&&e.getBattery&&(n=await i.navigator.getBattery().then((e=>null==e?void 0:e.charging)),r=await i.navigator.getBattery().then((e=>+(null==e?void 0:e.level)||-1))),{isCharging:n,battery:r}}};var Me={name:"screen",parse:()=>({}),async getInfo(){var e,n,r,a,o;return{screenWidth:(null==i||null===(e=i.screen)||void 0===e?void 0:e.width)||0,screenHeight:(null==i||null===(n=i.screen)||void 0===n?void 0:n.height)||0,clientWidth:(null==i||null===(r=i.document)||void 0===r||null===(r=r.documentElement)||void 0===r?void 0:r.clientWidth)||0,clientHeight:(null==i||null===(a=i.document)||void 0===a||null===(a=a.documentElement)||void 0===a?void 0:a.clientHeight)||0,screenFPS:await async function(){return new Promise((function(e){let n=0,i=1,r=[],a=function(o){if(n>0)if(i<12)r.push(o-n),n=o,i++,requestAnimationFrame(a);else{r.sort(),r=r.slice(1,11);let n=r.reduce(((e,n)=>e+n));const i=10*Math.round(1e4/n/10);e(i)}else n=o,requestAnimationFrame(a)};requestAnimationFrame(a)}))}(),isTouch:(null==i||null===(o=i.navigator)||void 0===o?void 0:o.maxTouchPoints)>0||!1}}},Ie={name:"language",parse:()=>({}),async getInfo(){var e,n;let r=(null==i||null===(e=i.navigator)||void 0===e?void 0:e.language)||(null==i||null===(n=i.navigator)||void 0===n?void 0:n.browserLanguage);if("string"!=typeof r)return"Unknown language";let a=r.split("-");return a[1]&&(a[1]=a[1].toUpperCase()),{language:a.join("_")}}},Oe={name:"timezone",parse:()=>({}),async getInfo(){var e;return{timezone:null===(e=Intl)||void 0===e||null===(e=e.DateTimeFormat())||void 0===e||null===(e=e.resolvedOptions())||void 0===e?void 0:e.timeZone}}},Ce={name:"font-family",is(e="Arial"){if("string"!=typeof e||null==i||!i.document)return!1;let n="Arial",r=100,a=100,o=i.document.createElement("canvas"),s=o.getContext("2d",{willReadFrequently:!0});o.width=r,o.height=a,s.textAlign="center",s.fillStyle="black",s.textBaseline="middle";let l=function(e){s.clearRect(0,0,r,a),s.font=`100px ${e}, ${n}`,s.fillText("永",50,50);let i=s.getImageData(0,0,r,a).data;return[].slice.call(i).filter((function(e){return 0!=e}))};return l(n).join("")!==l(e).join("")}},Pe={name:"webgl",is(){if(null==i||!i.document)return!1;const e=i.document.createElement("canvas"),n=e.getContext("webgl")||e.getContext("experimental-webgl");return n&&n instanceof WebGLRenderingContext}},ke={parse(e){let n={};return[he,we,ye].forEach((i=>{n=Object.assign(n,i.parse(e))})),n},async getInfo(e=["browser","system","device","gpu","network","battery","screen","language","timezone"]){let n={},i=[he,we,ye,Be,Te,xe,Me,Ie,Oe].filter((n=>e.includes(n.name)));for(let e of i)n=Object.assign(n,await e.getInfo());return n},isSupport(e,n){let i=[Ce,Pe].find((n=>e==n.name));return!!i&&i.is(n)}};export{ke as default}; +let e={};"undefined"!=typeof globalThis?e=globalThis:"undefined"!=typeof self?e=self:"undefined"!=typeof window?e=window:"undefined"!=typeof global&&(e=global);var n,i=e,r=null==i||null===(n=i.navigator)||void 0===n?void 0:n.userAgent,a={name:"Safari",parse(e=r){var n;return{is:e.includes("Safari"),version:(null===(n=e.match(/Version\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},o={name:"Chrome",parse(e=r){var n,i;return{is:e.includes("Chrome")||e.includes("CriOS"),version:(null===(n=e.match(/Chrome\/([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/CriOS\/([\d.]+)/))||void 0===i?void 0:i[1])||""}}},s={name:"Edge",parse(e=r){var n,i,a,o;return{is:e.includes("Edge")||e.includes("Edg/")||e.includes("EdgA")||e.includes("EdgiOS"),version:(null===(n=e.match(/Edge\/([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/Edg\/([\d.]+)/))||void 0===i?void 0:i[1])||(null===(a=e.match(/EdgA\/([\d.]+)/))||void 0===a?void 0:a[1])||(null===(o=e.match(/EdgiOS\/([\d.]+)/))||void 0===o?void 0:o[1])||""}}},l={name:"IE",parse(e=r){var n,i;return{is:e.includes("MSIE")||e.includes("Trident"),version:(null===(n=e.match(/MSIE ([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/rv:([\d.]+)/))||void 0===i?void 0:i[1])||""}}},t={name:"Firefox",parse(e=r){var n,i;return{is:e.includes("Firefox")||e.includes("FxiOS"),version:(null===(n=e.match(/Firefox\/([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/FxiOS\/([\d.]+)/))||void 0===i?void 0:i[1])||""}}},d={name:"Firefox Focus",parse(e=r){var n;return{is:e.includes("Focus"),version:(null===(n=e.match(/Focus\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},u={name:"Chromium",parse(e=r){var n;return{is:e.includes("Chromium"),version:(null===(n=e.match(/Chromium\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},v={name:"Opera",parse(e=r){var n,i;return{is:e.includes("Opera")||e.includes("OPR"),version:(null===(n=e.match(/Opera\/([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/OPR\/([\d.]+)/))||void 0===i?void 0:i[1])||""}}},c={name:"Opera GX",parse(e=r){let n=!1;return v.parse(e).is&&(n=e.includes("Edition GX")),{is:n,version:v.parse(e).version}}},m={name:"Vivaldi",parse(e=r){var n,i;return{is:e.includes("Vivaldi"),version:(null===(n=e.match(/Vivaldi\/([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/Chrome\/([\d.]+)/))||void 0===i?void 0:i[1])||""}},async is(){let e=this.parse().is;return new Promise((function(n){e?n(!1):fetch("chrome-extension://jffbochibkahlbbmanpmndnhmeliecah/config.json").then((function(){n(!0)})).catch((function(){n(!1)}))}))}},p={name:"Yandex",parse(e=r){var n;return{is:e.includes("YaBrowser"),version:(null===(n=e.match(/YaBrowser\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},h={name:"Brave",parse(e=r){var n;return{is:e.includes("Brave"),version:(null===(n=e.match(/Chrome\/([\d.]+)/))||void 0===n?void 0:n[1])||""}},is:async function(){var e;return!!(this.parse().is||null!=i&&null!==(e=i.navigator)&&void 0!==e&&e.brave)}},g={name:"Arora",parse(e=r){var n;return{is:e.includes("Arora"),version:(null===(n=e.match(/Arora\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},f={name:"Lunascape",parse(e=r){var n;return{is:e.includes("Lunascape"),version:(null===(n=e.match(/Lunascape[\/\s]([\d.]+)/))||void 0===n?void 0:n[1])||""}}},w={name:"QupZilla",parse(e=r){var n;return{is:e.includes("QupZilla"),version:(null===(n=e.match(/QupZilla[\/\s]([\d.]+)/))||void 0===n?void 0:n[1])||""}}},b={name:"Coc Coc",parse(e=r){var n;return{is:e.includes("coc_coc_browser"),version:(null===(n=e.match(/coc_coc_browser\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},y={name:"Kindle",parse(e=r){var n;return{is:e.includes("Kindle")||e.includes("Silk/"),version:(null===(n=e.match(/Version\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},B={name:"Iceweasel",parse(e=r){var n;return{is:e.includes("Iceweasel"),version:(null===(n=e.match(/Iceweasel\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},S={name:"Konqueror",parse(e=r){var n;return{is:e.includes("Konqueror"),version:(null===(n=e.match(/Konqueror\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},E={name:"SeaMonkey",parse(e=r){var n;return{is:e.includes("SeaMonkey"),version:(null===(n=e.match(/SeaMonkey\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},A={name:"Epiphany",parse(e=r){var n;return{is:e.includes("Epiphany"),version:(null===(n=e.match(/Epiphany\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},T={name:"Huawei",parse(e=r){var n,i,a;return{is:e.includes("HuaweiBrowser")||e.includes("HBPC/"),version:(null===(n=e.match(/HuaweiBrowser\/([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/HBPC\/([\d.]+)/))||void 0===i?void 0:i[1])||(null===(a=e.match(/Version\/([\d.]+)/))||void 0===a?void 0:a[1])||""}}},x={name:"OPPO",parse(e=r){var n;return{is:e.includes("HeyTapBrowser")||e.includes("OPPO"),version:(null===(n=e.match(/HeyTapBrowser\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},M={name:"Vivo",parse(e=r){var n;return{is:e.includes("VivoBrowser"),version:(null===(n=e.match(/VivoBrowser\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},I={name:"Xiaomi",parse(e=r){var n;return{is:e.includes("MiuiBrowser"),version:(null===(n=e.match(/115Browser\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},O={name:"Meizu",parse(e=r){var n;return{is:e.includes("MZBrowser"),version:(null===(n=e.match(/MZBrowser\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},C={name:"OnePlus",parse:(e=r)=>({is:e.includes("ONEPLUS"),version:""})},k={name:"Samsung",parse(e=r){var n;return{is:e.includes("SamsungBrowser"),version:(null===(n=e.match(/SamsungBrowser\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}};function P(e,n){var i;let r=null===globalThis||void 0===globalThis||null===(i=globalThis.navigator)||void 0===i?void 0:i.mimeTypes;for(let i in r)if(r[i][e]&&r[i][e]==n)return r[i];return null}var W={name:"360",parse(e=r){var n,i;return{is:e.includes("QihooBrowser")||e.includes("QHBrowser")||e.includes(" 360 "),version:(null===(n=e.match(/QihooBrowser(HD)?\/([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/Browser \(v([\d.]+)/))||void 0===i?void 0:i[1])||""}},async is(){let e=this.parse().is;if(null!=i&&i.chrome){let n=parseInt(o.parse().version);P("type","application/360softmgrplugin")||P("type","application/mozilla-npqihooquicklogin")||P("type","application/npjlgplayer3-chrome-jlp")||n>36&&null!=i&&i.showModalDialog?e=!0:n>45&&(e=P("type","application/vnd.chromium.remoting-viewer"),!e&&n>=69&&(e=P("type","application/asx")))}return e}},D={name:"360SE",parse(e=r){let n=parseInt(o.parse(e).version);return{is:e.includes("360SE"),version:{122:"15.3",114:"15.0",108:"14.0",86:"13.0",78:"12.0",69:"11.0",63:"10.0",55:"9.1",45:"8.1",42:"8.0",31:"7.0",21:"6.3"}[n]||""}},async is(){let e=!1;var n;await W.is()&&((P("type","application/gameplugin")||null!=i&&null!==(n=i.navigator)&&void 0!==n&&null!==(n=n.userAgentData)&&void 0!==n&&n.brands.filter((e=>"Not.A/Brand"==e.brand)).length)&&(e=!0));return e||new Promise((function(e){fetch("chrome-extension://fjbbmgamncjadhlpmffehlmmkdnkiadk/css/content.css").then((function(){e(!0)})).catch((function(){e(!1)}))}))}},H={name:"360EE",parse(e=r){var n;let i=parseInt(o.parse(e).version);return{is:e.includes("360EE"),version:(null===(n=e.match(/Browser \(v([\d.]+)/))||void 0===n?void 0:n[1])||{122:"22.3",119:"22.0",108:"14.0",95:"21.0",86:"13.0",78:"12.0",69:"11.0",63:"9.5",55:"9.0",50:"8.7",30:"7.5"}[i]||""}},async is(){let e=this.parse().is;if(P("type","application/cenroll.cenroll.version.1")||P("type","application/hwepass2001.installepass2001"))e=!0;else if(await W.is()){var n;null!==globalThis&&void 0!==globalThis&&null!==(n=globalThis.navigator)&&void 0!==n&&null!==(n=n.userAgentData)&&void 0!==n&&n.brands.find((e=>"Not A(Brand"==e.brand||"Not?A_Brand"==e.brand))&&(e=!0)}return e}},L={name:"360AI",parse(e=r){let n=parseInt(o.parse(e).version);return{is:e.includes("360SEAI"),version:{114:"1.0"}[n]||""}},async is(){let e=this.parse().is;var n;await W.is()&&(null!=i&&null!==(n=i.navigator)&&void 0!==n&&null!==(n=n.userAgentData)&&void 0!==n&&n.brands.filter((e=>"Not.A/Brand"==e.brand)).length&&!P("type","application/gameplugin")&&(e=!0));return e}},Q={name:"360AI",parse(e=r){var n;return{is:e.includes("360EEAI"),version:(null===(n=e.match(/360EE\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}};const V=()=>new Promise((e=>{var n;const r=`cv_${(new Date).getTime()%1e5}${100*Math.floor(Math.random())}`,a={key:"GetDeviceInfo",data:{},callback:r},o=JSON.stringify(a);if(null==i||null===(n=i.webkit)||void 0===n||!n.messageHandlers)return e({});i.webkit.messageHandlers.excuteCmd.postMessage(o),i[r]=function(n){delete i[r],e(JSON.parse(n||"{}"))}}));var _={name:"360EE",parse:()=>({is:!1,version:""}),is:async()=>V().then((function(e){return"360csexm"==(null==e?void 0:e.pid)||!1})),version:async()=>V().then((function(e){return(null==e?void 0:e.module_version)||""}))},R={name:"360ENT",parse(e=r){var n;let i=parseInt(o.parse(e).version);return{is:e.includes("360ENT"),version:(null===(n=e.match(/Browser \(v([\d.]+)/))||void 0===n?void 0:n[1])||{86:"13.0",78:"12.0",69:"11.0",63:"9.5",55:"9.0",50:"8.7",30:"7.5"}[i]||""}}},F={name:"UC",parse(e=r){var n;return{is:e.includes("UCBrowser")||e.includes(" UBrowser")||e.includes("UCWEB"),version:(null===(n=e.match(/UC?Browser\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},N={name:"QQBrowser",parse(e=r){var n;return{is:e.includes("QQBrowser"),version:(null===(n=e.match(/QQBrowser\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},U={name:"QQ",parse(e=r){var n;return{is:e.includes("QQ/"),version:(null===(n=e.match(/QQ\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},Y={name:"Baidu",parse(e=r){var n,i;return{is:e.includes("Baidu")||e.includes("BIDUBrowser")||e.includes("baidubrowser")||e.includes("baiduboxapp")||e.includes("BaiduD"),version:(null===(n=e.match(/BIDUBrowser[\s\/]([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/baiduboxapp\/([\d.]+)/))||void 0===i?void 0:i[1])||""}}},G={name:"Maxthon",parse(e=r){var n,i;let a=parseInt(o.parse(e).version);return{is:e.includes("Maxthon"),version:(null===(n=e.match(/Maxthon\/([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/Version\/([\d.]+)/))||void 0===i?void 0:i[1])||{109:"7.0",78:"6.0"}[a]||""}},is(){return this.parse().is||(null==i?void 0:i.maxthon)}},j={name:"Sogou",parse(e=r){var n,i,a=parseInt(o.parse(e).version);return{is:e.includes("MetaSr")||e.includes("Sogou"),version:(null===(n=e.match(/SogouMobileBrowser\/([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/SogouMSE\/([\d.]+)/))||void 0===i?void 0:i[1])||{94:"12.0",80:"11.0"}[a]||""}}},q={name:"Liebao",parse(e=r){var n;let i=parseInt(o.parse(e).version);return{is:e.includes("LBBROWSER")||e.includes("LieBaoFast"),version:(null===(n=e.match(/LieBaoFast\/([\d.]+)/))||void 0===n?void 0:n[1])||{112:"9.0",79:"8.0",57:"6.5",49:"6.0",46:"5.9",42:"5.3",39:"5.2",34:"5.0",29:"4.5",21:"4.0"}[i]||""}},is(){return this.parse().is||(null==i?void 0:i.liebao)}},K={name:"2345Explorer",parse(e=r){var n,i;let a=parseInt(o.parse(e).version);return{is:e.includes("2345Explorer")||e.includes("Mb2345Browser")||e.includes("2345chrome"),version:(null===(n=e.match(/2345Explorer\/([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/Mb2345Browser\/([\d.]+)/))||void 0===i?void 0:i[1])||{109:"13.0",69:"10.0",55:"9.9"}[a]||""}},async is(){let e=this.parse().is;var n,r;e||(e=(null==i?void 0:i.chrome)&&((null==i||null===(n=i.chrome)||void 0===n?void 0:n.adblock2345)||(null==i||null===(r=i.chrome)||void 0===r?void 0:r.common2345)));return e}},z={name:"115Browser",parse(e=r){var n;return{is:e.includes("115Browser"),version:(null===(n=e.match(/115Browser\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},X={name:"TheWorld",parse(e=r){var n;return{is:e.includes("TheWorld"),version:(null===(n=e.match(/TheWorld ([\d.]+)/))||void 0===n?void 0:n[1])||""}}},$={name:"Quark",parse(e=r){var n,i;return{is:e.includes("Quark"),version:(null===(n=e.match(/Quark\/([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/QuarkPC\/([\d.]+)/))||void 0===i?void 0:i[1])||""}}},Z={name:"Qiyu",parse(e=r){var n;return{is:e.includes("Qiyu"),version:(null===(n=e.match(/Qiyu\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},J={name:"Lenovo",parse(e=r){var n;return{is:e.includes("SLBrowser"),version:(null===(n=e.match(/SLBrowser\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},ee={name:"Wechat",parse(e=r){var n;return{is:e.includes("MicroMessenger"),version:(null===(n=e.match(/MicroMessenger\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},ne={name:"WechatWork",parse(e=r){var n;return{is:e.includes("wxwork"),version:(null===(n=e.match(/wxwork\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},ie={name:"Taobao",parse(e=r){var n;return{is:e.includes("AliApp(TB"),version:(null===(n=e.match(/AliApp\(TB\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},re={name:"Alipay",parse(e=r){var n;return{is:e.includes("AliApp(AP"),version:(null===(n=e.match(/AliApp\(AP\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},ae={name:"Weibo",parse(e=r){var n;return{is:e.includes("Weibo"),version:(null===(n=e.match(/weibo__([\d.]+)/))||void 0===n?void 0:n[1])||""}}},oe={name:"Douban",parse(e=r){var n;return{is:e.includes("com.douban.frodo"),version:(null===(n=e.match(/com.douban.frodo\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},se={name:"Toutiao",parse(e=r){var n;return{is:e.includes("NewsArticle"),version:(null===(n=e.match(/NewsArticle\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},le={name:"WebKit",parse:(e=r)=>({is:e.includes("AppleWebKit")})},te={name:"Trident",parse:(e=r)=>({is:e.includes("Trident")||e.includes("NET CLR")})},de={name:"Gecko",parse:(e=r)=>({is:e.includes("Gecko/")})},ue={name:"Servo",parse:(e=r)=>({is:e.includes("Servo/")})},ve={name:"Presto",parse:(e=r)=>({is:e.includes("Presto")})},ce={name:"KHTML",parse:(e=r)=>({is:e.includes("KHTML/")})};let me=[a,o,s,l,t,d,u,v,c,m,p,h,g,f,w,b,y,B,S,E,A,T,x,M,I,O,C,k,W,H,D,_,L,Q,R,F,N,U,Y,G,j,q,K,z,X,$,Z,J,ee,ne,ie,re,ae,oe,{name:"Suning",parse(e=r){var n;return{is:e.includes("SNEBUY-APP"),version:(null===(n=e.match(/SNEBUY-APP([\d.]+)/))||void 0===n?void 0:n[1])||""}}},{name:"iQIYI",parse(e=r){var n;return{is:e.includes("IqiyiApp"),version:(null===(n=e.match(/IqiyiVersion\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},{name:"DingTalk",parse(e=r){var n;return{is:e.includes("DingTalk"),version:(null===(n=e.match(/DingTalk\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},{name:"Douyin",parse(e=r){var n;return{is:e.includes("aweme"),version:(null===(n=e.match(/app_version\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},se,{name:"Googlebot",parse(e=r){var n;return{is:e.includes("Googlebot"),version:(null===(n=e.match(/Googlebot\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},{name:"Baiduspider",parse(e=r){var n;return{is:e.includes("Baiduspider"),version:(null===(n=e.match(/Baiduspider(-render)?\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},{name:"Sogouspider",parse(e=r){var n;return{is:e.match(/Sogou (\S+) Spider\/([\d.]+)/i),version:(null===(n=e.match(/Sogou (\S+) Spider\/([\d.]+)/i))||void 0===n?void 0:n[1])||""}}},{name:"Bingbot",parse(e=r){var n;return{is:e.includes("bingbot"),version:(null===(n=e.match(/bingbot\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},{name:"360Spider",parse:(e=r)=>({is:e.includes("360Spider")||e.includes("HaosouSpider"),version:""})},{name:"Bytespider",parse:(e=r)=>({is:e.includes("Bytespider"),version:""})},{name:"YisouSpider",parse(e=r){var n;return{is:e.includes("YisouSpider"),version:(null===(n=e.match(/YisouSpider\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},{name:"YodaoBot",parse(e=r){var n;return{is:e.includes("YodaoBot"),version:(null===(n=e.match(/YodaoBot\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},{name:"YandexBot",parse(e=r){var n;return{is:e.includes("YandexBot"),version:(null===(n=e.match(/YandexBot\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},{name:"Headless",parse(e=r){var n;return{is:e.includes("HeadlessChrome/"),version:(null===(n=e.match(/HeadlessChrome\/([\d.]+)/))||void 0===n?void 0:n[1])||""}},async is(){return this.parse().is??""==(null==i?void 0:i.navigator)}}];me.forEach((e=>{e.is||(e.is=async function(){return e.parse().is}),e.version||(e.version=async function(){return e.parse().version})}));let pe=[le,te,de,ue,ve,ce];pe.forEach((e=>{e.is||(e.is=async function(){return e.parse().is})}));var he={name:"browser",parse(e=r){let n="",i="";me.forEach((function(r){r.parse(e).is&&(n=r.name,i=r.parse(e).version)}));let a="";var l,t;(pe.forEach((function(n){n.parse(e).is&&(a=n.name)})),"Chrome"==n&&e.match(/\S+Browser/)&&(n=e.match(/\S+Browser/)[0]),"Chrome"==n&&e.match(/\S+Browser/))&&(i=(null===(l=e.replace(/^.*Browser\/([\d.]+).*$/))||void 0===l?void 0:l[1])||"");i||(i=(null===(t=e.match(/Version\/([\d.]+)/))||void 0===t?void 0:t[1])||"");s.parse(e).is?a=parseInt(s.parse(e).version)>75?"Blink":"EdgeHTML":o.parse(e).is&&parseInt(o.parse(e).version)>27&&(a="Blink");let d=e.includes("; wv)"),u=["Googlebot","Baiduspider","Sogouspider","Bingbot","360Spider","Bytespider","YandexBot"].includes(n);return{browser:n,browserVersion:i,engine:a,isWebview:d,isRobot:u}},async getInfo(){var e;let{browser:n,browserVersion:i,engine:a,isWebview:o,isRobot:s}=this.parse();for(let e of me)await e.is()&&(n=e.name,i=await e.version());let l=r;var t,d;("Chrome"==n&&l.match(/\S+Browser/)&&(n=l.match(/\S+Browser/)[0]),"Chrome"==n&&l.match(/\S+Browser/))&&(i=(null===(t=l.replace(/^.*Browser\/([\d.]+).*$/))||void 0===t?void 0:t[1])||"");i||(i=(null===(d=l.match(/Version\/([\d.]+)/))||void 0===d?void 0:d[1])||"");return{browser:n,browserVersion:i,engine:a,isWebview:o,isRobot:s,cookieEnabled:null===globalThis||void 0===globalThis||null===(e=globalThis.navigator)||void 0===e?void 0:e.cookieEnabled,userAgent:l}}},ge={name:"Windows",parse(e=r){var n;let i=(null===(n=e.match(/^Mozilla\/\d.0 \(Windows NT ([\d.]+)[;)].*$/))||void 0===n?void 0:n[1])||"";return{is:e.includes("Windows"),version:{"10.0":"10",6.4:"10 Technical Preview",6.3:"8.1",6.2:"8",6.1:"7","6.0":"Vista",5.2:"XP 64-bit",5.1:"XP",5.01:"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"}[i]||i}},async version(){let e=this.parse().version;return new Promise((function(n){var r;null!=i&&null!==(r=i.navigator)&&void 0!==r&&r.userAgentData?i.navigator.userAgentData.getHighEntropyValues(["platformVersion"]).then((function(e){let r="";if("Windows"===i.navigator.userAgentData.platform){r=parseInt(e.platformVersion.split(".")[0])>=13?"11":"10"}n(r)})):n(e)}))}};let fe=[ge,{name:"Linux",parse:(e=r)=>({is:e.includes("Linux")||e.includes("X11"),version:""})},{name:"macOS",parse(e=r){var n;return{is:e.includes("Macintosh"),version:(null===(n=e.match(/Mac OS X -?([\d_]+)/))||void 0===n?void 0:n[1].replace(/_/g,"."))||""}}},{name:"Android",parse(e=r){var n;return{is:e.includes("Android")||e.includes("Adr"),version:(null===(n=e.match(/Android ([\d.]+);/))||void 0===n?void 0:n[1])||""}}},{name:"HarmonyOS",parse(e=r){var n;let i=(null===(n=e.match(/HarmonyOS (\d+.\d+)/))||void 0===n?void 0:n[1])||"";if(!i){var a,o;let n=+(null===(a=e.match(/HMSCore (\d+.\d+)/))||void 0===a?void 0:a[1])||0;n>=6.1?i="4.0":n>=6?i="3.0":n>=5?i="2.0":n>=4&&(i="1.0"),i={10:"3.0",12:"4.0"}[(null===(o=e.match(/Android (\d+);/))||void 0===o?void 0:o[1])||0]??i}return{is:e.includes("HarmonyOS")||e.includes("ArkWeb"),version:i}}},{name:"Ubuntu",parse:(e=r)=>({is:e.includes("Ubuntu"),version:""})},{name:"FreeBSD",parse:(e=r)=>({is:e.includes("FreeBSD"),version:""})},{name:"Debian",parse(e=r){var n;return{is:e.includes("Debian"),version:(null===(n=e.match(/Debian\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},{name:"iOS",parse(e=r){var n;return{is:e.includes("like Mac OS X"),version:(null===(n=e.match(/OS ([\d_]+) like/))||void 0===n?void 0:n[1].replace(/_/g,"."))||""}}},{name:"Windows Phone",parse(e=r){var n;return{is:e.includes("IEMobile")||e.includes("Windows Phone"),version:(null===(n=e.match(/Windows Phone( OS)? ([\d.]+);/))||void 0===n?void 0:n[2])||""}}},{name:"BlackBerry",parse:(e=r)=>({is:e.includes("BlackBerry")||e.includes("RIM"),version:""})},{name:"MeeGo",parse:(e=r)=>({is:e.includes("MeeGo"),version:""})},{name:"Symbian",parse(e=r){var n;return{is:e.includes("Symbian"),version:(null===(n=e.match(/Series60\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}},{name:"Chrome OS",parse(e=r){var n,i;return{is:e.includes("CrOS"),version:(null===(n=e.match(/MSIE ([\d.]+)/))||void 0===n?void 0:n[1])||(null===(i=e.match(/rv:([\d.]+)/))||void 0===i?void 0:i[1])||""}}},{name:"WebOS",parse(e=r){var n;return{is:e.includes("hpwOS"),version:(null===(n=e.match(/hpwOS\/([\d.]+);/))||void 0===n?void 0:n[1])||""}}},{name:"UOS",parse(e=r){var n;return{is:e.includes("UOS"),version:(null===(n=e.match(/UOS\/([\d.]+)/))||void 0===n?void 0:n[1])||""}}}];fe.forEach((e=>{e.is||(e.is=async function(){return e.parse().is}),e.version||(e.version=async function(){return e.parse().version})}));var we={name:"system",parse(e=r){let n="",i="";fe.forEach((function(r){r.parse(e).is&&(n=r.name,i=r.parse(e).version)}));let a="";e.match(/(Win64|x64|WOW64|x86_64)/i)?a="Win64":e.match(/(Win32|x86|WOW32)/i)?a="Win32":e.match(/aarch64|arm64/)?a="ARM64":e.match(/arm32/)&&(a="ARM32");let o="",s=e+"|"+a;o=s.match(/armv?\d+/i)||s.match(/aarch64/)?"arm":s.match(/loongarch64/)?"loongarch":"x86";let l=e.match(/Win64|x64|WOW64|x86_64|aarch64|arm64|loongarch64/i)?64:32;return{system:n,systemVersion:i,platform:a,architecture:o,bitness:l}},async getInfo(){var e,n;let{system:r,systemVersion:a,platform:o,architecture:s,bitness:l}=this.parse();for(let e of fe)await e.is()&&(r=e.name,a=await e.version());var t,d;(null!=i&&null!==(e=i.navigator)&&void 0!==e&&e.platform&&(o=i.navigator.platform),null!=i&&null!==(n=i.navigator)&&void 0!==n&&n.userAgentData)&&(s=await(null===(t=i.navigator.userAgentData)||void 0===t?void 0:t.getHighEntropyValues(["architecture"]).then((e=>e.architecture||s))),l=await(null===(d=i.navigator.userAgentData)||void 0===d?void 0:d.getHighEntropyValues(["bitness"]).then((e=>+e.bitness||l))));return{system:r,systemVersion:a,platform:o,architecture:s,bitness:l}}};let be=[{name:"Mobile",parse:(e=r)=>({is:e.includes("Mobi")||e.includes("iPh")||e.includes("480")})},{name:"Tablet",parse:(e=r)=>({is:e.includes("Tablet")||e.includes("Pad")||e.includes("Nexus 7")}),async is(){return this.parse().is||"MacIntel"===(null==i?void 0:i.navigator.platform)&&(null==i?void 0:i.navigator.maxTouchPoints)>1}}];be.forEach((e=>{e.is||(e.is=async function(){return e.parse().is})}));var ye={name:"device",parse(e=r){let n="Desktop";return be.forEach((function(i){i.parse(e).is&&(n=i.name)})),{device:n}},async getInfo(){var e;let n=(null===globalThis||void 0===globalThis?void 0:globalThis.devicePixelRatio)||1,i=(null===globalThis||void 0===globalThis||null===(e=globalThis.navigator)||void 0===e?void 0:e.deviceMemory)||4;return Object.assign({devicePixelRatio:n,deviceMemory:i},this.parse())}},Be={name:"gpu",parse:()=>({}),async getInfo(){let e="",n="";if(null!=i&&i.document){let o=i.document.createElement("canvas").getContext("experimental-webgl");if(o){var r,a;let i=o.getExtension("WEBGL_debug_renderer_info"),s=o.getParameter(i.UNMASKED_RENDERER_WEBGL);e=(null===(r=s.match(/ANGLE \((.+?),/))||void 0===r?void 0:r[1])||"",n=(null===(a=s.match(/, (.+?) (\(|vs_)/))||void 0===a?void 0:a[1])||""}}return{gpu:e,gpuModel:n}}};const Se=/\b((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b/,Ee=/\b(?:[A-F0-9]{1,4}:){7}[A-F0-9]{1,4}\b/i;let Ae=globalThis.RTCPeerConnection||globalThis.mozRTCPeerConnection||globalThis.webkitRTCPeerConnection;var Te={name:"network",parse:()=>({}),async getInfo(){var e,n;let r="unknown",a=null==i||null===(e=i.navigator)||void 0===e?void 0:e.connection;return a&&(r=a.type||a.effectiveType,"2"!=r&&"unknown"!=r||(r="wifi")),{network:r,isOnline:(null==i||null===(n=i.navigator)||void 0===n?void 0:n.onLine)||!1,ip:await(async()=>{const e=new Set,n=n=>{var i;const r=null==n||null===(i=n.candidate)||void 0===i?void 0:i.candidate;if(r)for(const n of[Se,Ee]){const i=r.match(n);i&&e.add(i[0])}};return new Promise((function(i,r){const a=new Ae({iceServers:[{urls:"stun:stun.l.google.com:19302"},{urls:"stun:stun.services.mozilla.com"}]});a.addEventListener("icecandidate",n),a.createDataChannel(""),a.createOffer().then((e=>a.setLocalDescription(e)),r);let o=20,s=null,l=function(){try{a.removeEventListener("icecandidate",n),a.close()}catch{}s&&clearInterval(s)};s=setInterval((function(){let n=[...e];n.length?(l(),i(n[0])):o?o--:(l(),i(""))}),100)}))})()}}},xe={name:"battery",parse:()=>({}),async getInfo(){var e;let n=!0,r=1;return null!=i&&null!==(e=i.navigator)&&void 0!==e&&e.getBattery&&(n=await i.navigator.getBattery().then((e=>null==e?void 0:e.charging)),r=await i.navigator.getBattery().then((e=>+(null==e?void 0:e.level)||-1))),{isCharging:n,battery:r}}};var Me={name:"screen",parse:()=>({}),async getInfo(){var e,n,r,a,o,s,l;return{screenWidth:(null==i||null===(e=i.screen)||void 0===e?void 0:e.width)||0,screenHeight:(null==i||null===(n=i.screen)||void 0===n?void 0:n.height)||0,clientWidth:(null==i||null===(r=i.document)||void 0===r||null===(r=r.documentElement)||void 0===r?void 0:r.clientWidth)||(null==i||null===(a=i.document)||void 0===a||null===(a=a.body)||void 0===a?void 0:a.clientWidth)||0,clientHeight:(null==i||null===(o=i.document)||void 0===o||null===(o=o.documentElement)||void 0===o?void 0:o.clientHeight)||(null==i||null===(s=i.document)||void 0===s||null===(s=s.body)||void 0===s?void 0:s.clientHeight)||0,screenFPS:await async function(){return new Promise((function(e){let n=0,i=1,r=[],a=function(o){if(n>0)if(i<12)r.push(o-n),n=o,i++,requestAnimationFrame(a);else{r.sort(),r=r.slice(1,11);let n=r.reduce(((e,n)=>e+n));const i=10*Math.round(1e4/n/10);e(i)}else n=o,requestAnimationFrame(a)};requestAnimationFrame(a)}))}(),screenColorDepth:null==i?void 0:i.screen.colorDepth,screenPixelDepth:null==i?void 0:i.screen.pixelDepth,isTouch:(null==i||null===(l=i.navigator)||void 0===l?void 0:l.maxTouchPoints)>0||!1}}},Ie={name:"language",parse:()=>({}),async getInfo(){var e,n,r;let a=(null==i||null===(e=i.navigator)||void 0===e?void 0:e.language)||(null==i||null===(n=i.navigator)||void 0===n?void 0:n.browserLanguage)||(null==i||null===(r=i.navigator)||void 0===r?void 0:r.systemLanguage);if("string"!=typeof a)return"Unknown language";let o=a.split("-");return o[1]&&(o[1]=o[1].toUpperCase()),{language:o.join("_")}}},Oe={name:"timezone",parse:()=>({}),async getInfo(){var e;return{timezone:null===(e=Intl)||void 0===e||null===(e=e.DateTimeFormat())||void 0===e||null===(e=e.resolvedOptions())||void 0===e?void 0:e.timeZone}}},Ce={name:"font-family",is(e="Arial"){if("string"!=typeof e||null==i||!i.document)return!1;let n="Arial",r=100,a=100,o=i.document.createElement("canvas"),s=o.getContext("2d",{willReadFrequently:!0});o.width=r,o.height=a,s.textAlign="center",s.fillStyle="black",s.textBaseline="middle";let l=function(e){s.clearRect(0,0,r,a),s.font=`100px ${e}, ${n}`,s.fillText("永",50,50);let i=s.getImageData(0,0,r,a).data;return[].slice.call(i).filter((function(e){return 0!=e}))};return l(n).join("")!==l(e).join("")}},ke={name:"webgl",is(){if(null==i||!i.document)return!1;const e=i.document.createElement("canvas"),n=e.getContext("webgl")||e.getContext("experimental-webgl");return n&&n instanceof WebGLRenderingContext}},Pe={parse(e){let n={};return[he,we,ye].forEach((i=>{n=Object.assign(n,i.parse(e))})),n},async getInfo(e=["browser","system","device","gpu","network","battery","screen","language","timezone"]){let n={},i=[he,we,ye,Be,Te,xe,Me,Ie,Oe].filter((n=>e.includes(n.name)));for(let e of i)n=Object.assign(n,await e.getInfo());return n},isSupport(e,n){let i=[Ce,ke].find((n=>e==n.name));return!!i&&i.is(n)}};export{Pe as default}; diff --git a/src/module/browser-parser.js b/src/module/browser-parser.js index 92ab448..5e46e74 100644 --- a/src/module/browser-parser.js +++ b/src/module/browser-parser.js @@ -174,12 +174,15 @@ export default { browserVersion = ua.match(/Version\/([\d.]+)/)?.[1]||''; } + let cookieEnabled = globalThis?.navigator?.cookieEnabled; + return { browser, browserVersion, engine, isWebview, isRobot, + cookieEnabled, userAgent:ua }; } diff --git a/src/module/language-parser.js b/src/module/language-parser.js index 263a628..34a44b6 100644 --- a/src/module/language-parser.js +++ b/src/module/language-parser.js @@ -6,7 +6,7 @@ export default { return {}; }, async getInfo(){ - let g = globalThis?.navigator?.language||globalThis?.navigator?.browserLanguage; + let g = globalThis?.navigator?.language||globalThis?.navigator?.browserLanguage||globalThis?.navigator?.systemLanguage; if (typeof g !== 'string') return 'Unknown language' let arr = g.split('-'); if (arr[1]) { diff --git a/src/module/screen-parser.js b/src/module/screen-parser.js index d483e59..823e902 100644 --- a/src/module/screen-parser.js +++ b/src/module/screen-parser.js @@ -37,10 +37,12 @@ export default { // 屏幕尺寸 let screenWidth = globalThis?.screen?.width||0; let screenHeight = globalThis?.screen?.height||0; - let clientWidth = globalThis?.document?.documentElement?.clientWidth||0; - let clientHeight = globalThis?.document?.documentElement?.clientHeight||0; + let clientWidth = globalThis?.document?.documentElement?.clientWidth||globalThis?.document?.body?.clientWidth||0; + let clientHeight = globalThis?.document?.documentElement?.clientHeight||globalThis?.document?.body?.clientHeight||0; // 屏幕刷新率 let screenFPS = await getScreenFPS(); + let screenColorDepth = globalThis?.screen.colorDepth; + let screenPixelDepth = globalThis?.screen.pixelDepth; let isTouch = globalThis?.navigator?.maxTouchPoints>0||false; return { @@ -49,6 +51,8 @@ export default { clientWidth, clientHeight, screenFPS, + screenColorDepth, + screenPixelDepth, isTouch }; } diff --git a/static/script/index.js b/static/script/index.js index 240a548..79c0698 100644 --- a/static/script/index.js +++ b/static/script/index.js @@ -187,6 +187,24 @@ let getTemplate = function(info){ FPS +
屏幕颜色深度
+Screen ColorDepth
+屏幕像素深度
+Screen PixelDepth
+处理器架构
@@ -292,6 +310,13 @@ let getTemplate = function(info){Cookie是否可用
+Cookie Enabled
+是否支持WebGL
@@ -316,6 +341,7 @@ let getTemplate = function(info){ $module.innerHTML = getTemplate(info); browser.getInfo().then(function(info){ + console.log('[getInfo()]',info); $module.innerHTML = getTemplate(info) + ` `;