1import {bn as k$1,bm as E}from'./main-RZFK4VIC.js';var v=class extends k$1{getId(){return E(this,null,function*(){return {identifier:this.getUid()}})}getInfo(){return E(this,null,function*(){if(typeof navigator>"u"||!navigator.userAgent)throw this.unavailable("Device API not available in this browser");let e=navigator.userAgent,i=this.parseUa(e);return {model:i.model,platform:"web",operatingSystem:i.operatingSystem,osVersion:i.osVersion,manufacturer:navigator.vendor,isVirtual:false,webViewVersion:i.browserVersion}})}getBatteryInfo(){return E(this,null,function*(){if(typeof navigator>"u"||!navigator.getBattery)throw this.unavailable("Device API not available in this browser");let e={};try{e=yield navigator.getBattery();}catch{}return {batteryLevel:e.level,isCharging:e.charging}})}getLanguageCode(){return E(this,null,function*(){return {value:navigator.language.split("-")[0].toLowerCase()}})}getLanguageTag(){return E(this,null,function*(){return {value:navigator.language}})}parseUa(e){let i={},a=e.indexOf("(")+1,l=e.indexOf(") AppleWebKit");e.indexOf(") Gecko")!==-1&&(l=e.indexOf(") Gecko"));let n=e.substring(a,l);if(e.indexOf("Android")!==-1){let t=n.replace("; wv","").split("; ").pop();t&&(i.model=t.split(" Build")[0]),i.osVersion=n.split("; ")[1];}else if(i.model=n.split("; ")[0],typeof navigator<"u"&&navigator.oscpu)i.osVersion=navigator.oscpu;else if(e.indexOf("Windows")!==-1)i.osVersion=n;else {let t=n.split("; ").pop();if(t){let o=t.replace(" like Mac OS X","").split(" ");i.osVersion=o[o.length-1].replace(/_/g,".");}}/android/i.test(e)?i.operatingSystem="android":/iPad|iPhone|iPod/.test(e)&&!window.MSStream?i.operatingSystem="ios":/Win/.test(e)?i.operatingSystem="windows":/Mac/i.test(e)?i.operatingSystem="mac":i.operatingSystem="unknown";let d=!!window.ApplePaySession,w=!!window.chrome,u=/Firefox/.test(e),g=/Edg/.test(e),c=/FxiOS/.test(e),f=/CriOS/.test(e),x=/EdgiOS/.test(e);if(d||w&&!g||c||f||x){let t;c?t="FxiOS":f?t="CriOS":x?t="EdgiOS":d?t="Version":t="Chrome";let o=e.split(" ");for(let r of o)if(r.includes(t)){let m=r.split("/")[1];i.browserVersion=m;}}else if(u||g){let r=e.split("").reverse().join("").split("/")[0].split("").reverse().join("");i.browserVersion=r;}return i}getUid(){if(typeof window<"u"&&window.localStorage){let e=window.localStorage.getItem("_capuid");return e||(e=this.uuid4(),window.localStorage.setItem("_capuid",e),e)}return this.uuid4()}uuid4(){return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){let i=Math.random()*16|0;return (e==="x"?i:i&3|8).toString(16)})}};export{v as DeviceWeb};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.