UNPKG

@trustpath/device-intelligence-js-sdk

Version:

A JavaScript SDK for collecting and analyzing device/browser data, enabling enhanced analytics and insights for web applications.

1 lines 73.4 kB
function t(t,e,r,n){return new(r||(r=Promise))((function(i,o){function a(t){try{u(n.next(t))}catch(t){o(t)}}function s(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))}function e(t,e){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(u){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(t){s=[6,t],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}function r(t,e,r,n){return new(r||(r=Promise))((function(e,i){function o(t){try{s(n.next(t))}catch(t){i(t)}}function a(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var n;t.done?e(t.value):(n=t.value,n instanceof r?n:new r((function(t){t(n)}))).then(o,a)}s((n=n.apply(t,[])).next())}))}function n(t,e){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(u){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}"function"==typeof SuppressedError&&SuppressedError,"function"==typeof SuppressedError&&SuppressedError;var i={exclude:[],include:[],logging:!0},o={},a={timeout:"true"},s=function(t,e){"undefined"!=typeof window&&(o[t]=e)},u=function(){return Object.fromEntries(Object.entries(o).filter((function(t){var e,r=t[0];return!(null===(e=null==i?void 0:i.exclude)||void 0===e?void 0:e.includes(r))})).filter((function(t){var e,r,n,o,a=t[0];return(null===(e=null==i?void 0:i.include)||void 0===e?void 0:e.some((function(t){return t.includes(".")})))?null===(r=null==i?void 0:i.include)||void 0===r?void 0:r.some((function(t){return t.startsWith(a)})):0===(null===(n=null==i?void 0:i.include)||void 0===n?void 0:n.length)||(null===(o=null==i?void 0:i.include)||void 0===o?void 0:o.includes(a))})).map((function(t){return[t[0],(0,t[1])()]})))};function h(t){return t^=t>>>16,t=Math.imul(t,2246822507),t^=t>>>13,t=Math.imul(t,3266489909),(t^=t>>>16)>>>0}var f=new Uint32Array([597399067,2869860233,951274213,2716044179]);function c(t,e){return t<<e|t>>>32-e}function l(t,e){var r;if(void 0===e&&(e=0),e=e?0|e:0,"string"==typeof t&&(r=t,t=(new TextEncoder).encode(r).buffer),!(t instanceof ArrayBuffer))throw new TypeError("Expected key to be ArrayBuffer or string");var n=new Uint32Array([e,e,e,e]);!function(t,e){for(var r=t.byteLength/16|0,n=new Uint32Array(t,0,4*r),i=0;i<r;i++){var o=n.subarray(4*i,4*(i+1));o[0]=Math.imul(o[0],f[0]),o[0]=c(o[0],15),o[0]=Math.imul(o[0],f[1]),e[0]=e[0]^o[0],e[0]=c(e[0],19),e[0]=e[0]+e[1],e[0]=Math.imul(e[0],5)+1444728091,o[1]=Math.imul(o[1],f[1]),o[1]=c(o[1],16),o[1]=Math.imul(o[1],f[2]),e[1]=e[1]^o[1],e[1]=c(e[1],17),e[1]=e[1]+e[2],e[1]=Math.imul(e[1],5)+197830471,o[2]=Math.imul(o[2],f[2]),o[2]=c(o[2],17),o[2]=Math.imul(o[2],f[3]),e[2]=e[2]^o[2],e[2]=c(e[2],15),e[2]=e[2]+e[3],e[2]=Math.imul(e[2],5)+2530024501,o[3]=Math.imul(o[3],f[3]),o[3]=c(o[3],18),o[3]=Math.imul(o[3],f[0]),e[3]=e[3]^o[3],e[3]=c(e[3],13),e[3]=e[3]+e[0],e[3]=Math.imul(e[3],5)+850148119}}(t,n),function(t,e){var r=t.byteLength/16|0,n=t.byteLength%16,i=new Uint32Array(4),o=new Uint8Array(t,16*r,n);switch(n){case 15:i[3]=i[3]^o[14]<<16;case 14:i[3]=i[3]^o[13]<<8;case 13:i[3]=i[3]^o[12],i[3]=Math.imul(i[3],f[3]),i[3]=c(i[3],18),i[3]=Math.imul(i[3],f[0]),e[3]=e[3]^i[3];case 12:i[2]=i[2]^o[11]<<24;case 11:i[2]=i[2]^o[10]<<16;case 10:i[2]=i[2]^o[9]<<8;case 9:i[2]=i[2]^o[8],i[2]=Math.imul(i[2],f[2]),i[2]=c(i[2],17),i[2]=Math.imul(i[2],f[3]),e[2]=e[2]^i[2];case 8:i[1]=i[1]^o[7]<<24;case 7:i[1]=i[1]^o[6]<<16;case 6:i[1]=i[1]^o[5]<<8;case 5:i[1]=i[1]^o[4],i[1]=Math.imul(i[1],f[1]),i[1]=c(i[1],16),i[1]=Math.imul(i[1],f[2]),e[1]=e[1]^i[1];case 4:i[0]=i[0]^o[3]<<24;case 3:i[0]=i[0]^o[2]<<16;case 2:i[0]=i[0]^o[1]<<8;case 1:i[0]=i[0]^o[0],i[0]=Math.imul(i[0],f[0]),i[0]=c(i[0],15),i[0]=Math.imul(i[0],f[1]),e[0]=e[0]^i[0]}}(t,n),function(t,e){e[0]=e[0]^t.byteLength,e[1]=e[1]^t.byteLength,e[2]=e[2]^t.byteLength,e[3]=e[3]^t.byteLength,e[0]=e[0]+e[1]|0,e[0]=e[0]+e[2]|0,e[0]=e[0]+e[3]|0,e[1]=e[1]+e[0]|0,e[2]=e[2]+e[0]|0,e[3]=e[3]+e[0]|0,e[0]=h(e[0]),e[1]=h(e[1]),e[2]=h(e[2]),e[3]=h(e[3]),e[0]=e[0]+e[1]|0,e[0]=e[0]+e[2]|0,e[0]=e[0]+e[3]|0,e[1]=e[1]+e[0]|0,e[2]=e[2]+e[0]|0,e[3]=e[3]+e[0]|0}(t,n);var i=new Uint8Array(n.buffer);return Array.from(i).map((function(t){return t.toString(16).padStart(2,"0")})).join("")}function d(t,e){return new Promise((function(r){setTimeout((function(){return r(e)}),t)}))}function p(t,e,r){return Promise.all(t.map((function(t){return Promise.race([t,d(e,r)])})))}function w(){return r(this,0,void 0,(function(){var t,e,r,o,s;return n(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),t=u(),e=Object.keys(t),[4,p(Object.values(t),(null==i?void 0:i.timeout)||1e3,a)];case 1:return r=n.sent(),o=r.filter((function(t){return void 0!==t})),s={},o.forEach((function(t,r){s[e[r]]=t})),[2,g(s,i.exclude||[],i.include||[],"")];case 2:throw n.sent();case 3:return[2]}}))}))}function g(t,e,r,n){void 0===n&&(n="");for(var i={},o=function(t,o){var a=n+t+".";if("object"!=typeof o||Array.isArray(o)){var s=e.some((function(t){return a.startsWith(t)})),u=r.some((function(t){return a.startsWith(t)}));s&&!u||(i[t]=o)}else{var h=g(o,e,r,a);Object.keys(h).length>0&&(i[t]=h)}},a=0,s=Object.entries(t);a<s.length;a++){var u=s[a];o(u[0],u[1])}return i}function b(t){for(var e=0,r=0;r<t.length;++r)e+=Math.abs(t[r]);return e}function m(t,e,r){for(var n=[],i=0;i<t[0].data.length;i++){for(var o=[],a=0;a<t.length;a++)o.push(t[a].data[i]);n.push(v(o))}var s=new Uint8ClampedArray(n);return new ImageData(s,e,r)}function v(t){if(0===t.length)return 0;for(var e={},r=0,n=t;r<n.length;r++)e[o=n[r]]=(e[o]||0)+1;var i=t[0];for(var o in e)e[o]>e[i]&&(i=parseInt(o,10));return i}function y(){if("undefined"==typeof navigator)return{name:"unknown",version:"unknown"};for(var t=navigator.userAgent,e={Edg:"Edge",OPR:"Opera"},r=0,n=[/(?<name>Edge|Edg)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Chrome|Chromium|OPR|Opera|Vivaldi|Brave))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Firefox|Waterfox|Iceweasel|IceCat))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>Safari)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>MSIE|Trident|IEMobile).+?(?<version>\d+(?:\.\d+)?)/,/(?<name>[A-Za-z]+)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>SamsungBrowser)\/(?<version>\d+(?:\.\d+)?)/];r<n.length;r++){var i=n[r],o=t.match(i);if(o&&o.groups)return{name:e[o.groups.name]||o.groups.name,version:o.groups.version}}return{name:"unknown",version:"unknown"}}s("audio",(function(){return r(this,0,void 0,(function(){return n(this,(function(t){return[2,new Promise((function(t,e){try{var r=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,5e3,44100),n=r.createBufferSource(),i=r.createOscillator();i.frequency.value=1e3;var o,a=r.createDynamicsCompressor();a.threshold.value=-50,a.knee.value=40,a.ratio.value=12,a.attack.value=0,a.release.value=.2,i.connect(a),a.connect(r.destination),i.start(),r.oncomplete=function(e){o=e.renderedBuffer.getChannelData(0),t({sampleHash:b(o),oscillator:i.type,maxChannels:r.destination.maxChannelCount,channelCountMode:n.channelCountMode})},r.startRendering()}catch(t){console.error("Error creating audio fingerprint:",t),e(t)}}))]}))}))}));var E="SamsungBrowser"!==y().name?1:3;"Firefox"!=y().name&&s("canvas",(function(){return document.createElement("canvas").getContext("2d"),new Promise((function(t){var e=Array.from({length:E},(function(){return function(){var t=document.createElement("canvas"),e=t.getContext("2d");if(!e)return new ImageData(1,1);t.width=280,t.height=20;var r=e.createLinearGradient(0,0,t.width,t.height);r.addColorStop(0,"red"),r.addColorStop(1/6,"orange"),r.addColorStop(2/6,"yellow"),r.addColorStop(.5,"green"),r.addColorStop(4/6,"blue"),r.addColorStop(5/6,"indigo"),r.addColorStop(1,"violet"),e.fillStyle=r,e.fillRect(0,0,t.width,t.height);var n="Random Text WMwmil10Oo";return e.font="23.123px Arial",e.fillStyle="black",e.fillText(n,-5,15),e.fillStyle="rgba(0, 0, 255, 0.5)",e.fillText(n,-3.3,17.7),e.beginPath(),e.moveTo(0,0),e.lineTo(2*t.width/7,t.height),e.strokeStyle="white",e.lineWidth=2,e.stroke(),e.getImageData(0,0,t.width,t.height)}()}));t({commonImageDataHash:l(m(e,280,20).data.toString()).toString()})}))}));var A,S=["Arial","Arial Black","Arial Narrow","Arial Rounded MT","Arimo","Archivo","Barlow","Bebas Neue","Bitter","Bookman","Calibri","Cabin","Candara","Century","Century Gothic","Comic Sans MS","Constantia","Courier","Courier New","Crimson Text","DM Mono","DM Sans","DM Serif Display","DM Serif Text","Dosis","Droid Sans","Exo","Fira Code","Fira Sans","Franklin Gothic Medium","Garamond","Geneva","Georgia","Gill Sans","Helvetica","Impact","Inconsolata","Indie Flower","Inter","Josefin Sans","Karla","Lato","Lexend","Lucida Bright","Lucida Console","Lucida Sans Unicode","Manrope","Merriweather","Merriweather Sans","Montserrat","Myriad","Noto Sans","Nunito","Nunito Sans","Open Sans","Optima","Orbitron","Oswald","Pacifico","Palatino","Perpetua","PT Sans","PT Serif","Poppins","Prompt","Public Sans","Quicksand","Rajdhani","Recursive","Roboto","Roboto Condensed","Rockwell","Rubik","Segoe Print","Segoe Script","Segoe UI","Sora","Source Sans Pro","Space Mono","Tahoma","Taviraj","Times","Times New Roman","Titillium Web","Trebuchet MS","Ubuntu","Varela Round","Verdana","Work Sans"],x=["monospace","sans-serif","serif"];function k(t,e){if(!t)throw new Error("Canvas context not supported");return t.font,t.font="72px ".concat(e),t.measureText("WwMmLli0Oo").width}function _(){var t,e=document.createElement("canvas"),r=null!==(t=e.getContext("webgl"))&&void 0!==t?t:e.getContext("experimental-webgl");if(r&&"getParameter"in r)try{var n=(r.getParameter(r.VENDOR)||"").toString(),i=(r.getParameter(r.RENDERER)||"").toString(),o={vendor:n,renderer:i,version:(r.getParameter(r.VERSION)||"").toString(),shadingLanguageVersion:(r.getParameter(r.SHADING_LANGUAGE_VERSION)||"").toString()};if(!i.length||!n.length){var a=r.getExtension("WEBGL_debug_renderer_info");if(a){var s=(r.getParameter(a.UNMASKED_VENDOR_WEBGL)||"").toString(),u=(r.getParameter(a.UNMASKED_RENDERER_WEBGL)||"").toString();s&&(o.vendorUnmasked=s),u&&(o.rendererUnmasked=u)}}return o}catch(t){}return"undefined"}function P(){var t=new Float32Array(1),e=new Uint8Array(t.buffer);return t[0]=1/0,t[0]=t[0]-t[0],e[3]}function R(){var t=[],e={"prefers-contrast":["high","more","low","less","forced","no-preference"],"any-hover":["hover","none"],"any-pointer":["none","coarse","fine"],pointer:["none","coarse","fine"],hover:["hover","none"],update:["fast","slow"],"inverted-colors":["inverted","none"],"prefers-reduced-motion":["reduce","no-preference"],"prefers-reduced-transparency":["reduce","no-preference"],scripting:["none","initial-only","enabled"],"forced-colors":["active","none"]};return Object.keys(e).forEach((function(r){e[r].forEach((function(e){matchMedia("(".concat(r,": ").concat(e,")")).matches&&t.push("".concat(r,": ").concat(e))}))})),t}function T(){if("https:"===window.location.protocol&&"function"==typeof window.ApplePaySession)try{for(var t=window.ApplePaySession.supportsVersion,e=15;e>0;e--)if(t(e))return e}catch(t){return 0}return 0}"Firefox"!=y().name&&s("fonts",(function(){var t=this;return new Promise((function(e,i){try{!function(t){var e;r(this,0,void 0,(function(){var r,i,o;return n(this,(function(n){switch(n.label){case 0:return document.body?[3,2]:[4,new Promise((function(t){return setTimeout(t,50,undefined)}))];case 1:return n.sent(),[3,0];case 2:if((r=document.createElement("iframe")).setAttribute("frameBorder","0"),(i=r.style).setProperty("position","fixed"),i.setProperty("display","block","important"),i.setProperty("visibility","visible"),i.setProperty("border","0"),i.setProperty("opacity","0"),r.src="about:blank",document.body.appendChild(r),!(o=r.contentDocument||(null===(e=r.contentWindow)||void 0===e?void 0:e.document)))throw new Error("Iframe document is not accessible");return t({iframe:o}),setTimeout((function(){document.body.removeChild(r)}),0),[2]}}))}))}((function(i){var o=i.iframe;return r(t,0,void 0,(function(){var t,r,i,a;return n(this,(function(n){return t=o.createElement("canvas"),r=t.getContext("2d"),i=x.map((function(t){return k(r,t)})),a={},S.forEach((function(t){var e=k(r,t);i.includes(e)||(a[t]=e)})),e(a),[2]}))}))}))}catch(t){i({error:"unsupported"})}}))})),s("hardware",(function(){return new Promise((function(t,e){var r=void 0!==navigator.deviceMemory?navigator.deviceMemory:0,n=window.performance&&window.performance.memory?window.performance.memory:0;t({videocard:_(),architecture:P(),deviceMemory:r.toString()||"undefined",jsHeapSizeLimit:n.jsHeapSizeLimit||0})}))})),s("locales",(function(){return new Promise((function(t){t({languages:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})}))})),s("permissions",(function(){return r(this,0,void 0,(function(){var t;return n(this,(function(e){return A=(null==i?void 0:i.permissions_to_check)||["accelerometer","accessibility","accessibility-events","ambient-light-sensor","background-fetch","background-sync","bluetooth","camera","clipboard-read","clipboard-write","device-info","display-capture","gyroscope","geolocation","local-fonts","magnetometer","microphone","midi","nfc","notifications","payment-handler","persistent-storage","push","speaker","storage-access","top-level-storage-access","window-management","query"],t=Array.from({length:(null==i?void 0:i.retries)||3},(function(){return function(){return r(this,0,void 0,(function(){var t,e,r,i,o;return n(this,(function(n){switch(n.label){case 0:t={},e=0,r=A,n.label=1;case 1:if(!(e<r.length))return[3,6];i=r[e],n.label=2;case 2:return n.trys.push([2,4,,5]),[4,navigator.permissions.query({name:i})];case 3:return o=n.sent(),t[i]=o.state.toString(),[3,5];case 4:return n.sent(),[3,5];case 5:return e++,[3,1];case 6:return[2,t]}}))}))}()})),[2,Promise.all(t).then((function(t){return function(t,e){var r={};return e.forEach((function(e){var n=function(t){if(0===t.length)return null;var e={};t.forEach((function(t){var r=String(t);e[r]=(e[r]||0)+1}));var r=t[0],n=1;return Object.keys(e).forEach((function(t){e[t]>n&&(r=t,n=e[t])})),r}(t.map((function(t){return e in t?t[e]:void 0})).filter((function(t){return void 0!==t})));n&&(r[e]=n)})),r}(t,A)}))]}))}))})),s("plugins",(function(){var t=[];if(navigator.plugins)for(var e=0;e<navigator.plugins.length;e++){var r=navigator.plugins[e];t.push([r.name,r.filename,r.description].join("|"))}return new Promise((function(e){e({plugins:t})}))})),s("screen",(function(){return new Promise((function(t){t({is_touchscreen:navigator.maxTouchPoints>0,maxTouchPoints:navigator.maxTouchPoints,colorDepth:screen.colorDepth,mediaMatches:R()})}))})),s("system",(function(){return new Promise((function(t){var e=y();t({platform:window.navigator.platform,cookieEnabled:window.navigator.cookieEnabled,productSub:navigator.productSub,product:navigator.product,useragent:navigator.userAgent,hardwareConcurrency:navigator.hardwareConcurrency,browser:{name:e.name,version:e.version},applePayVersion:T()})}))}));var M,C="SamsungBrowser"!==y().name?1:3,U=null;s("webgl",(function(){return r(this,0,void 0,(function(){var t;return n(this,(function(e){"undefined"!=typeof document&&((M=document.createElement("canvas")).width=200,M.height=100,U=M.getContext("webgl"));try{if(!U)throw new Error("WebGL not supported");return t=Array.from({length:C},(function(){return function(){try{if(!U)throw new Error("WebGL not supported");var t=U.createShader(U.VERTEX_SHADER),e=U.createShader(U.FRAGMENT_SHADER);if(!t||!e)throw new Error("Failed to create shaders");if(U.shaderSource(t,"\n attribute vec2 position;\n void main() {\n gl_Position = vec4(position, 0.0, 1.0);\n }\n "),U.shaderSource(e,"\n precision mediump float;\n void main() {\n gl_FragColor = vec4(0.812, 0.195, 0.553, 0.921); // Set line color\n }\n "),U.compileShader(t),!U.getShaderParameter(t,U.COMPILE_STATUS))throw new Error("Vertex shader compilation failed: "+U.getShaderInfoLog(t));if(U.compileShader(e),!U.getShaderParameter(e,U.COMPILE_STATUS))throw new Error("Fragment shader compilation failed: "+U.getShaderInfoLog(e));var r=U.createProgram();if(!r)throw new Error("Failed to create shader program");if(U.attachShader(r,t),U.attachShader(r,e),U.linkProgram(r),!U.getProgramParameter(r,U.LINK_STATUS))throw new Error("Shader program linking failed: "+U.getProgramInfoLog(r));U.useProgram(r);for(var n=137,i=new Float32Array(548),o=2*Math.PI/n,a=0;a<n;a++){var s=a*o;i[4*a]=0,i[4*a+1]=0,i[4*a+2]=Math.cos(s)*(M.width/2),i[4*a+3]=Math.sin(s)*(M.height/2)}var u=U.createBuffer();U.bindBuffer(U.ARRAY_BUFFER,u),U.bufferData(U.ARRAY_BUFFER,i,U.STATIC_DRAW);var h=U.getAttribLocation(r,"position");U.enableVertexAttribArray(h),U.vertexAttribPointer(h,2,U.FLOAT,!1,0,0),U.viewport(0,0,M.width,M.height),U.clearColor(0,0,0,1),U.clear(U.COLOR_BUFFER_BIT),U.drawArrays(U.LINES,0,274);var f=new Uint8ClampedArray(M.width*M.height*4);return U.readPixels(0,0,M.width,M.height,U.RGBA,U.UNSIGNED_BYTE,f),new ImageData(f,M.width,M.height)}catch(t){return new ImageData(1,1)}finally{U&&(U.bindBuffer(U.ARRAY_BUFFER,null),U.useProgram(null),U.viewport(0,0,U.drawingBufferWidth,U.drawingBufferHeight),U.clearColor(0,0,0,0))}}()})),[2,{commonImageHash:l(m(t,M.width,M.height).data.toString()).toString()}]}catch(t){return[2,{webgl:"unsupported"}]}return[2]}))}))}));var I=function(t,e,r,n){for(var i=(r-e)/n,o=0,a=0;a<n;a++)o+=t(e+(a+.5)*i);return o*i};s("math",(function(){return r(void 0,0,void 0,(function(){return n(this,(function(t){return[2,{acos:Math.acos(.5),asin:I(Math.asin,-1,1,97),atan:I(Math.atan,-1,1,97),cos:I(Math.cos,0,Math.PI,97),cosh:Math.cosh(9/7),e:Math.E,largeCos:Math.cos(1e20),largeSin:Math.sin(1e20),largeTan:Math.tan(1e20),log:Math.log(1e3),pi:Math.PI,sin:I(Math.sin,-Math.PI,Math.PI,97),sinh:I(Math.sinh,-9/7,7/9,97),sqrt:Math.sqrt(2),tan:I(Math.tan,0,2*Math.PI,97),tanh:I(Math.tanh,-9/7,7/9,97)}]}))}))}));var B,O="user-agent",L="",D="function",N="undefined",Y="object",H="string",j="browser",F="cpu",z="device",q="engine",V="os",G="result",W="name",$="type",K="vendor",X="version",J="architecture",Z="major",Q="model",tt="console",et="mobile",rt="tablet",nt="smarttv",it="wearable",ot="xr",at="embedded",st="inapp",ut="brands",ht="formFactors",ft="fullVersionList",ct="platform",lt="platformVersion",dt="bitness",pt="sec-ch-ua",wt=pt+"-full-version-list",gt=pt+"-arch",bt=pt+"-"+dt,mt=pt+"-form-factors",vt=pt+"-"+et,yt=pt+"-"+Q,Et=pt+"-"+ct,At=Et+"-version",St=[ut,ft,et,Q,ct,lt,J,ht,dt],xt="Amazon",kt="Apple",_t="ASUS",Pt="BlackBerry",Rt="Google",Tt="Huawei",Mt="Lenovo",Ct="Honor",Ut="LG",It="Microsoft",Bt="Motorola",Ot="Nvidia",Lt="OnePlus",Dt="OPPO",Nt="Samsung",Yt="Sharp",Ht="Sony",jt="Xiaomi",Ft="Zebra",zt="Chrome",qt="Chromium",Vt="Chromecast",Gt="Firefox",Wt="Opera",$t="Facebook",Kt="Sogou",Xt="Mobile ",Jt=" Browser",Zt="Windows",Qt=typeof window!==N&&window.navigator?window.navigator:void 0,te=Qt&&Qt.userAgentData?Qt.userAgentData:void 0,ee=function(t){for(var e={},r=0;r<t.length;r++)e[t[r].toUpperCase()]=t[r];return e},re=function(t,e){if(typeof t===Y&&t.length>0){for(var r in t)if(ae(t[r])==ae(e))return!0;return!1}return!!ie(t)&&-1!==ae(e).indexOf(ae(t))},ne=function(t,e){for(var r in t)return/^(browser|cpu|device|engine|os)$/.test(r)||!!e&&ne(t[r])},ie=function(t){return typeof t===H},oe=function(t){if(t){for(var e=[],r=he(/\\?\"/g,t).split(","),n=0;n<r.length;n++)if(r[n].indexOf(";")>-1){var i=ce(r[n]).split(";v=");e[n]={brand:i[0],version:i[1]}}else e[n]=ce(r[n]);return e}},ae=function(t){return ie(t)?t.toLowerCase():t},se=function(t){return ie(t)?he(/[^\d\.]/g,t).split(".")[0]:void 0},ue=function(t){for(var e in t){var r=t[e];typeof r==Y&&2==r.length?this[r[0]]=r[1]:this[r]=void 0}return this},he=function(t,e){return ie(e)?e.replace(t,L):e},fe=function(t){return he(/\\?\"/g,t)},ce=function(t,e){if(ie(t))return t=he(/^\s\s*/,t),typeof e===N?t:t.substring(0,500)},le=function(t,e){if(t&&e)for(var r,n,i,o,a,s,u=0;u<e.length&&!a;){var h=e[u],f=e[u+1];for(r=n=0;r<h.length&&!a&&h[r];)if(a=h[r++].exec(t))for(i=0;i<f.length;i++)s=a[++n],typeof(o=f[i])===Y&&o.length>0?2===o.length?typeof o[1]==D?this[o[0]]=o[1].call(this,s):this[o[0]]=o[1]:3===o.length?typeof o[1]!==D||o[1].exec&&o[1].test?this[o[0]]=s?s.replace(o[1],o[2]):void 0:this[o[0]]=s?o[1].call(this,s,o[2]):void 0:4===o.length&&(this[o[0]]=s?o[3].call(this,s.replace(o[1],o[2])):void 0):this[o]=s||void 0;u+=2}},de=function(t,e){for(var r in e)if(typeof e[r]===Y&&e[r].length>0){for(var n=0;n<e[r].length;n++)if(re(e[r][n],t))return"?"===r?void 0:r}else if(re(e[r],t))return"?"===r?void 0:r;return e.hasOwnProperty("*")?e["*"]:t},pe={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},we={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},ge={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[X,[W,Xt+"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[X,[W,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[W,X],[/opios[\/ ]+([\w\.]+)/i],[X,[W,Wt+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[X,[W,Wt+" GX"]],[/\bopr\/([\w\.]+)/i],[X,[W,Wt]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[X,[W,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[X,[W,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[W,X],[/quark(?:pc)?\/([-\w\.]+)/i],[X,[W,"Quark"]],[/\bddg\/([\w\.]+)/i],[X,[W,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[X,[W,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[X,[W,"WeChat"]],[/konqueror\/([\w\.]+)/i],[X,[W,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[X,[W,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[X,[W,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[X,[W,"Smart "+Mt+Jt]],[/(avast|avg)\/([\w\.]+)/i],[[W,/(.+)/,"$1 Secure"+Jt],X],[/\bfocus\/([\w\.]+)/i],[X,[W,Gt+" Focus"]],[/\bopt\/([\w\.]+)/i],[X,[W,Wt+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[X,[W,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[X,[W,"Dolphin"]],[/coast\/([\w\.]+)/i],[X,[W,Wt+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[X,[W,"MIUI"+Jt]],[/fxios\/([\w\.-]+)/i],[X,[W,Xt+Gt]],[/\bqihoobrowser\/?([\w\.]*)/i],[X,[W,"360"]],[/\b(qq)\/([\w\.]+)/i],[[W,/(.+)/,"$1Browser"],X],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[W,/(.+)/,"$1"+Jt],X],[/samsungbrowser\/([\w\.]+)/i],[X,[W,Nt+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[X,[W,Kt+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[W,Kt+" Mobile"],X],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[W,X],[/(lbbrowser|rekonq)/i],[W],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[X,W],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[W,$t],X,[$,st]],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(instagram|snapchat)[\/ ]([-\w\.]+)/i],[W,X,[$,st]],[/\bgsa\/([\w\.]+) .*safari\//i],[X,[W,"GSA"],[$,st]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[X,[W,"TikTok"],[$,st]],[/\[(linkedin)app\]/i],[W,[$,st]],[/(chromium)[\/ ]([-\w\.]+)/i],[W,X],[/headlesschrome(?:\/([\w\.]+)| )/i],[X,[W,zt+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[W,zt+" WebView"],X],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[X,[W,"Android"+Jt]],[/chrome\/([\w\.]+) mobile/i],[X,[W,Xt+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[W,X],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[X,[W,Xt+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[W,Xt+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[X,W],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[W,[X,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[W,X],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[W,Xt+Gt],X],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[W,"Netscape"],X],[/(wolvic|librewolf)\/([\w\.]+)/i],[W,X],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[X,[W,Gt+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[W,[X,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[W,[X,/[^\d\.]+./,L]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[J,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[J,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[J,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[J,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[J,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[J,/ower/,L,ae]],[/ sun4\w[;\)]/i],[[J,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[J,ae]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[Q,[K,Nt],[$,rt]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[Q,[K,Nt],[$,et]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[Q,[K,kt],[$,et]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[Q,[K,kt],[$,rt]],[/(macintosh);/i],[Q,[K,kt]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[Q,[K,Yt],[$,et]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[Q,[K,Ct],[$,rt]],[/honor([-\w ]+)[;\)]/i],[Q,[K,Ct],[$,et]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[Q,[K,Tt],[$,rt]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[Q,[K,Tt],[$,et]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[Q,/_/g," "],[K,jt],[$,rt]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[Q,/_/g," "],[K,jt],[$,et]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[Q,[K,Dt],[$,et]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[Q,[K,de,{OnePlus:["304","403","203"],"*":Dt}],[$,rt]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[Q,[K,"Vivo"],[$,et]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[Q,[K,"Realme"],[$,et]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[Q,[K,Bt],[$,et]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[Q,[K,Bt],[$,rt]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[Q,[K,Ut],[$,rt]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,/\blg-?([\d\w]+) bui/i],[Q,[K,Ut],[$,et]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[Q,[K,Mt],[$,rt]],[/(nokia) (t[12][01])/i],[K,Q,[$,rt]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[Q,/_/g," "],[$,et],[K,"Nokia"]],[/(pixel (c|tablet))\b/i],[Q,[K,Rt],[$,rt]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[Q,[K,Rt],[$,et]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[Q,[K,Ht],[$,et]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[Q,"Xperia Tablet"],[K,Ht],[$,rt]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[Q,[K,Lt],[$,et]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[Q,[K,xt],[$,rt]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[Q,/(.+)/g,"Fire Phone $1"],[K,xt],[$,et]],[/(playbook);[-\w\),; ]+(rim)/i],[Q,K,[$,rt]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[Q,[K,Pt],[$,et]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[Q,[K,_t],[$,rt]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[Q,[K,_t],[$,et]],[/(nexus 9)/i],[Q,[K,"HTC"],[$,rt]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[K,[Q,/_/g," "],[$,et]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[Q,[K,"TCL"],[$,rt]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[Q,[K,"TCL"],[$,et]],[/(itel) ((\w+))/i],[[K,ae],Q,[$,de,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[Q,[K,"Acer"],[$,rt]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[Q,[K,"Meizu"],[$,et]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[Q,[K,"Ulefone"],[$,et]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[Q,[K,"Energizer"],[$,et]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[Q,[K,"Cat"],[$,et]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[Q,[K,"Smartfren"],[$,et]],[/droid.+; (a(?:015|06[35]|142p?))/i],[Q,[K,"Nothing"],[$,et]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[K,Q,[$,rt]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (hmd|imo) ([\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[K,Q,[$,et]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[K,Q,[$,rt]],[/(surface duo)/i],[Q,[K,It],[$,rt]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[Q,[K,"Fairphone"],[$,et]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[Q,[K,Ot],[$,rt]],[/(sprint) (\w+)/i],[K,Q,[$,et]],[/(kin\.[onetw]{3})/i],[[Q,/\./g," "],[K,It],[$,et]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[Q,[K,Ft],[$,rt]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[Q,[K,Ft],[$,et]],[/smart-tv.+(samsung)/i],[K,[$,nt]],[/hbbtv.+maple;(\d+)/i],[[Q,/^/,"SmartTV"],[K,Nt],[$,nt]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[K,Ut],[$,nt]],[/(apple) ?tv/i],[K,[Q,kt+" TV"],[$,nt]],[/crkey.*devicetype\/chromecast/i],[[Q,Vt+" Third Generation"],[K,Rt],[$,nt]],[/crkey.*devicetype\/([^/]*)/i],[[Q,/^/,"Chromecast "],[K,Rt],[$,nt]],[/fuchsia.*crkey/i],[[Q,Vt+" Nest Hub"],[K,Rt],[$,nt]],[/crkey/i],[[Q,Vt],[K,Rt],[$,nt]],[/droid.+aft(\w+)( bui|\))/i],[Q,[K,xt],[$,nt]],[/(shield \w+ tv)/i],[Q,[K,Ot],[$,nt]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[Q,[K,Yt],[$,nt]],[/(bravia[\w ]+)( bui|\))/i],[Q,[K,Ht],[$,nt]],[/(mi(tv|box)-?\w+) bui/i],[Q,[K,jt],[$,nt]],[/Hbbtv.*(technisat) (.*);/i],[K,Q,[$,nt]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[K,ce],[Q,ce],[$,nt]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[Q,[$,nt]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[$,nt]],[/(ouya)/i,/(nintendo) (\w+)/i],[K,Q,[$,tt]],[/droid.+; (shield)( bui|\))/i],[Q,[K,Ot],[$,tt]],[/(playstation \w+)/i],[Q,[K,Ht],[$,tt]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[Q,[K,It],[$,tt]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[Q,[K,Nt],[$,it]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[K,Q,[$,it]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[Q,[K,Dt],[$,it]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[Q,[K,kt],[$,it]],[/(opwwe\d{3})/i],[Q,[K,Lt],[$,it]],[/(moto 360)/i],[Q,[K,Bt],[$,it]],[/(smartwatch 3)/i],[Q,[K,Ht],[$,it]],[/(g watch r)/i],[Q,[K,Ut],[$,it]],[/droid.+; (wt63?0{2,3})\)/i],[Q,[K,Ft],[$,it]],[/droid.+; (glass) \d/i],[Q,[K,Rt],[$,ot]],[/(pico) (4|neo3(?: link|pro)?)/i],[K,Q,[$,ot]],[/; (quest( \d| pro)?)/i],[Q,[K,$t],[$,ot]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[K,[$,at]],[/(aeobc)\b/i],[Q,[K,xt],[$,at]],[/(homepod).+mac os/i],[Q,[K,kt],[$,at]],[/windows iot/i],[[$,at]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i],[Q,[$,de,{mobile:"Mobile",xr:"VR","*":rt}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[$,rt]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[$,et]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[Q,[K,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[X,[W,"EdgeHTML"]],[/(arkweb)\/([\w\.]+)/i],[W,X],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[X,[W,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[W,X],[/ladybird\//i],[[W,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[X,W]],os:[[/microsoft (windows) (vista|xp)/i],[W,X],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[W,[X,de,pe]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[X,de,pe],[W,Zt]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[X,/_/g,"."],[W,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[W,"macOS"],[X,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[X,[W,Vt+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[X,[W,Vt+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[X,[W,Vt+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[X,[W,Vt+" Linux"]],[/crkey\/([\d\.]+)/i],[X,[W,Vt]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[X,W],[/(ubuntu) ([\w\.]+) like android/i],[[W,/(.+)/,"$1 Touch"],X],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i],[W,X],[/\(bb(10);/i],[X,[W,Pt]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[X,[W,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[X,[W,Gt+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[X,[W,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[X,[W,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[W,"Chrome OS"],X],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[W,X],[/(sunos) ?([\w\.\d]*)/i],[[W,"Solaris"],X],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[W,X]]},be=(ue.call((B={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}}).init,[[j,[W,X,Z,$]],[F,[J]],[z,[$,Q,K]],[q,[W,X]],[V,[W,X]]]),ue.call(B.isIgnore,[[j,[X,Z]],[q,[X]],[V,[X]]]),ue.call(B.isIgnoreRgx,[[j,/ ?browser$/i],[V,/ ?os$/i]]),ue.call(B.toString,[[j,[W,X]],[F,[J]],[z,[K,Q]],[q,[W,X]],[V,[W,X]]]),B),me=function(t,e){var r=be.init[e],n=be.isIgnore[e]||0,i=be.isIgnoreRgx[e]||0,o=be.toString[e]||0;function a(){ue.call(this,r)}return a.prototype.getItem=function(){return t},a.prototype.withClientHints=function(){return te?te.getHighEntropyValues(St).then((function(e){return t.setCH(new ve(e,!1)).parseCH().get()})):t.parseCH().get()},a.prototype.withFeatureCheck=function(){return t.detectFeature().get()},e!=G&&(a.prototype.is=function(t){var e=!1;for(var r in this)if(this.hasOwnProperty(r)&&!re(n,r)&&ae(i?he(i,this[r]):this[r])==ae(i?he(i,t):t)){if(e=!0,t!=N)break}else if(t==N&&e){e=!e;break}return e},a.prototype.toString=function(){var t=L;for(var e in o)typeof this[o[e]]!==N&&(t+=(t?" ":L)+this[o[e]]);return t||N}),te||(a.prototype.then=function(t){var e=this,r=function(){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])};r.prototype={is:a.prototype.is,toString:a.prototype.toString};var n=new r;return t(n),n}),new a};function ve(t,e){if(t=t||{},ue.call(this,St),e)ue.call(this,[[ut,oe(t[pt])],[ft,oe(t[wt])],[et,/\?1/.test(t[vt])],[Q,fe(t[yt])],[ct,fe(t[Et])],[lt,fe(t[At])],[J,fe(t[gt])],[ht,oe(t[mt])],[dt,fe(t[bt])]]);else for(var r in t)this.hasOwnProperty(r)&&typeof t[r]!==N&&(this[r]=t[r])}function ye(t,e,r,n){return this.get=function(t){return t?this.data.hasOwnProperty(t)?this.data[t]:void 0:this.data},this.set=function(t,e){return this.data[t]=e,this},this.setCH=function(t){return this.uaCH=t,this},this.detectFeature=function(){if(Qt&&Qt.userAgent==this.ua)switch(this.itemType){case j:Qt.brave&&typeof Qt.brave.isBrave==D&&this.set(W,"Brave");break;case z:!this.get($)&&te&&te[et]&&this.set($,et),"Macintosh"==this.get(Q)&&Qt&&typeof Qt.standalone!==N&&Qt.maxTouchPoints&&Qt.maxTouchPoints>2&&this.set(Q,"iPad").set($,rt);break;case V:!this.get(W)&&te&&te[ct]&&this.set(W,te[ct]);break;case G:var t=this.data,e=function(e){return t[e].getItem().detectFeature().get()};this.set(j,e(j)).set(F,e(F)).set(z,e(z)).set(q,e(q)).set(V,e(V))}return this},this.parseUA=function(){return this.itemType!=G&&le.call(this.data,this.ua,this.rgxMap),this.itemType==j&&this.set(Z,se(this.get(X))),this},this.parseCH=function(){var t=this.uaCH,e=this.rgxMap;switch(this.itemType){case j:case q:var r,n=t[ft]||t[ut];if(n)for(var i in n){var o=n[i].brand||n[i],a=n[i].version;this.itemType!=j||/not.a.brand/i.test(o)||r&&(!/chrom/i.test(r)||o==qt)||(o=de(o,{Chrome:"Google Chrome",Edge:"Microsoft Edge","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome"}),this.set(W,o).set(X,a).set(Z,se(a)),r=o),this.itemType==q&&o==qt&&this.set(X,a)}break;case F:var s=t[J];s&&(s&&"64"==t[dt]&&(s+="64"),le.call(this.data,s+";",e));break;case z:if(t[et]&&this.set($,et),t[Q]&&(this.set(Q,t[Q]),!this.get($)||!this.get(K))){var u={};le.call(u,"droid 9; "+t[Q]+")",e),!this.get($)&&u.type&&this.set($,u.type),!this.get(K)&&u.vendor&&this.set(K,u.vendor)}if(t[ht]){var h;if("string"!=typeof t[ht])for(var f=0;!h&&f<t[ht].length;)h=de(t[ht][f++],we);else h=de(t[ht],we);this.set($,h)}break;case V:var c=t[ct];if(c){var l=t[lt];c==Zt&&(l=parseInt(se(l),10)>=13?"11":"10"),this.set(W,c).set(X,l)}this.get(W)==Zt&&"Xbox"==t[Q]&&this.set(W,"Xbox").set(X,void 0);break;case G:var d=this.data,p=function(e){return d[e].getItem().setCH(t).parseCH().get()};this.set(j,p(j)).set(F,p(F)).set(z,p(z)).set(q,p(q)).set(V,p(V))}return this},ue.call(this,[["itemType",t],["ua",e],["uaCH",n],["rgxMap",r],["data",me(this,t)]]),this}function Ee(t,e,r){if(typeof t===Y?(ne(t,!0)?(typeof e===Y&&(r=e),e=t):(r=t,e=void 0),t=void 0):typeof t!==H||ne(e,!0)||(r=e,e=void 0),r&&typeof r.append===D){var n={};r.forEach((function(t,e){n[e]=t})),r=n}if(!(this instanceof Ee))return new Ee(t,e,r).getResult();var i=typeof t===H?t:r&&r[O]?r[O]:Qt&&Qt.userAgent?Qt.userAgent:L,o=new ve(r,!0),a=e?function(t,e){var r={},n=e;if(!ne(e))for(var i in n={},e)for(var o in e[i])n[o]=e[i][o].concat(n[o]?n[o]:[]);for(var a in t)r[a]=n[a]&&n[a].length%2==0?n[a].concat(t[a]):t[a];return r}(ge,e):ge,s=function(t){return t==G?function(){return new ye(t,i,a,o).set("ua",i).set(j,this.getBrowser()).set(F,this.getCPU()).set(z,this.getDevice()).set(q,this.getEngine()).set(V,this.getOS()).get()}:function(){return new ye(t,i,a[t],o).parseUA().get()}};return ue.call(this,[["getBrowser",s(j)],["getCPU",s(F)],["getDevice",s(z)],["getEngine",s(q)],["getOS",s(V)],["getResult",s(G)],["getUA",function(){return i}],["setUA",function(t){return ie(t)&&(i=t.length>500?ce(t,500):t),this}]]).setUA(i),this}Ee.VERSION="2.0.2",Ee.BROWSER=ee([W,X,Z,$]),Ee.CPU=ee([J]),Ee.DEVICE=ee([Q,K,$,tt,et,nt,rt,it,at]),Ee.ENGINE=Ee.OS=ee([W,X]);var Ae="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},Se=[],xe=[],ke="undefined"!=typeof Uint8Array?Uint8Array:Array,_e=!1;function Pe(){_e=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0;e<64;++e)Se[e]=t[e],xe[t.charCodeAt(e)]=e;xe["-".charCodeAt(0)]=62,xe["_".charCodeAt(0)]=63}function Re(t,e,r){for(var n,i,o=[],a=e;a<r;a+=3)n=(t[a]<<16)+(t[a+1]<<8)+t[a+2],o.push(Se[(i=n)>>18&63]+Se[i>>12&63]+Se[i>>6&63]+Se[63&i]);return o.join("")}function Te(t){var e;_e||Pe();for(var r=t.length,n=r%3,i="",o=[],a=16383,s=0,u=r-n;s<u;s+=a)o.push(Re(t,s,s+a>u?u:s+a));return 1===n?(e=t[r-1],i+=Se[e>>2],i+=Se[e<<4&63],i+="=="):2===n&&(e=(t[r-2]<<8)+t[r-1],i+=Se[e>>10],i+=Se[e>>4&63],i+=Se[e<<2&63],i+="="),o.push(i),o.join("")}function Me(t,e,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,h=u>>1,f=-7,c=r?i-1:0,l=r?-1:1,d=t[e+c];for(c+=l,o=d&(1<<-f)-1,d>>=-f,f+=s;f>0;o=256*o+t[e+c],c+=l,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=n;f>0;a=256*a+t[e+c],c+=l,f-=8);if(0===o)o=1-h;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),o-=h}return(d?-1:1)*a*Math.pow(2,o-n)}function Ce(t,e,r,n,i,o){var a,s,u,h=8*o-i-1,f=(1<<h)-1,c=f>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,w=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=f):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+c>=1?l/u:l*Math.pow(2,1-c))*u>=2&&(a++,u/=2),a+c>=f?(s=0,a=f):a+c>=1?(s=(e*u-1)*Math.pow(2,i),a+=c):(s=e*Math.pow(2,c-1)*Math.pow(2,i),a=0));i>=8;t[r+d]=255&s,d+=p,s/=256,i-=8);for(a=a<<i|s,h+=i;h>0;t[r+d]=255&a,d+=p,a/=256,h-=8);t[r+d-p]|=128*w}var Ue={}.toString,Ie=Array.isArray||function(t){return"[object Array]"==Ue.call(t)};function Be(){return Le.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Oe(t,e){if(Be()<e)throw new RangeError("Invalid typed array length");return Le.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=Le.prototype:(null===t&&(t=new Le(e)),t.length=e),t}function Le(t,e,r){if(!(Le.TYPED_ARRAY_SUPPORT||this instanceof Le))return new Le(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return Ye(this,t)}return De(this,t,e,r)}function De(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);Le.TYPED_ARRAY_SUPPORT?(t=e).__proto__=Le.prototype:t=He(t,e);return t}(t,e,r,n):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!Le.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|ze(e,r);t=Oe(t,n);var i=t.write(e,r);i!==n&&(t=t.slice(0,i));return t}(t,e,r):function(t,e){if(Fe(e)){var r=0|je(e.length);return 0===(t=Oe(t,r)).length||e.copy(t,0,0,r),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(n=e.length)!=n?Oe(t,0):He(t,e);if("Buffer"===e.type&&Ie(e.data))return He(t,e.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function Ne(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function Ye(t,e){if(Ne(e),t=Oe(t,e<0?0:0|je(e)),!Le.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function He(t,e){var r=e.length<0?0:0|je(e.length);t=Oe(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function je(t){if(t>=Be())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Be().toString(16)+" bytes");return 0|t}function Fe(t){return!(null==t||!t._isBuffer)}function ze(t,e){if(Fe(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return gr(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return br(t).length;default:if(n)return gr(t).length;e=(""+e).toLowerCase(),n=!0}}function qe(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return or(this,e,r);case"utf8":case"utf-8":return er(this,e,r);case"ascii":return nr(this,e,r);case"latin1":case"binary":return ir(this,e,r);case"base64":return tr(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ar(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function Ve(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function Ge(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=Le.from(e,n)),Fe(e))return 0===e.length?-1:We(t,e,r,n,i);if("number"==typeof e)return e&=255,Le.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):We(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function We(t,e,r,n,i){var o,a=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,r/=2}function h(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var f=-1;for(o=r;o<s;o++)if(h(t,o)===h(e,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===u)return f*a}else-1!==f&&(o-=o-f),f=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){for(var c=!0,l=0;l<u;l++)if(h(t,o+l)!==h(e,l)){c=!1;break}if(c)return o}return-1}function $e(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a<n;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[r+a]=s}return a}function Ke(t,e,r,n){return