@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 • 77.6 kB
JavaScript
"use strict";function e(e,t,r,i){return new(r||(r=Promise))((function(n,o){function a(e){try{u(i.next(e))}catch(e){o(e)}}function s(e){try{u(i.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((i=i.apply(e,t||[])).next())}))}function t(e,t){var r,i,n,o={label:0,sent:function(){if(1&n[0])throw n[1];return n[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,i&&(n=2&s[0]?i.return:s[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,s[1])).done)return n;switch(i=0,n&&(s=[2&s[0],n.value]),s[0]){case 0:case 1:n=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,i=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(n=o.trys,(n=n.length>0&&n[n.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!n||s[1]>n[0]&&s[1]<n[3])){o.label=s[1];break}if(6===s[0]&&o.label<n[1]){o.label=n[1],n=s;break}if(n&&o.label<n[2]){o.label=n[2],o.ops.push(s);break}n[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],i=0}finally{r=n=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}function r(e,t,r,i){return new(r||(r=Promise))((function(t,n){function o(e){try{s(i.next(e))}catch(e){n(e)}}function a(e){try{s(i.throw(e))}catch(e){n(e)}}function s(e){var i;e.done?t(e.value):(i=e.value,i instanceof r?i:new r((function(e){e(i)}))).then(o,a)}s((i=i.apply(e,[])).next())}))}function i(e,t){var r,i,n,o,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[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,i&&(n=2&s[0]?i.return:s[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,s[1])).done)return n;switch(i=0,n&&(s=[2&s[0],n.value]),s[0]){case 0:case 1:n=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,i=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((n=(n=a.trys).length>0&&n[n.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!n||s[1]>n[0]&&s[1]<n[3])){a.label=s[1];break}if(6===s[0]&&a.label<n[1]){a.label=n[1],n=s;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(s);break}n[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],i=0}finally{r=n=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 n={exclude:[],include:[],logging:!0},o={},a={timeout:"true"},s=function(e,t){"undefined"!=typeof window&&(o[e]=t)},u=function(){return Object.fromEntries(Object.entries(o).filter((function(e){var t,r=e[0];return!(null===(t=null==n?void 0:n.exclude)||void 0===t?void 0:t.includes(r))})).filter((function(e){var t,r,i,o,a=e[0];return(null===(t=null==n?void 0:n.include)||void 0===t?void 0:t.some((function(e){return e.includes(".")})))?null===(r=null==n?void 0:n.include)||void 0===r?void 0:r.some((function(e){return e.startsWith(a)})):0===(null===(i=null==n?void 0:n.include)||void 0===i?void 0:i.length)||(null===(o=null==n?void 0:n.include)||void 0===o?void 0:o.includes(a))})).map((function(e){return[e[0],(0,e[1])()]})))};function c(e){return e^=e>>>16,e=Math.imul(e,2246822507),e^=e>>>13,e=Math.imul(e,3266489909),(e^=e>>>16)>>>0}var h=new Uint32Array([597399067,2869860233,951274213,2716044179]);function f(e,t){return e<<t|e>>>32-t}function l(e,t){var r;if(void 0===t&&(t=0),t=t?0|t:0,"string"==typeof e&&(r=e,e=(new TextEncoder).encode(r).buffer),!(e instanceof ArrayBuffer))throw new TypeError("Expected key to be ArrayBuffer or string");var i=new Uint32Array([t,t,t,t]);!function(e,t){for(var r=e.byteLength/16|0,i=new Uint32Array(e,0,4*r),n=0;n<r;n++){var o=i.subarray(4*n,4*(n+1));o[0]=Math.imul(o[0],h[0]),o[0]=f(o[0],15),o[0]=Math.imul(o[0],h[1]),t[0]=t[0]^o[0],t[0]=f(t[0],19),t[0]=t[0]+t[1],t[0]=Math.imul(t[0],5)+1444728091,o[1]=Math.imul(o[1],h[1]),o[1]=f(o[1],16),o[1]=Math.imul(o[1],h[2]),t[1]=t[1]^o[1],t[1]=f(t[1],17),t[1]=t[1]+t[2],t[1]=Math.imul(t[1],5)+197830471,o[2]=Math.imul(o[2],h[2]),o[2]=f(o[2],17),o[2]=Math.imul(o[2],h[3]),t[2]=t[2]^o[2],t[2]=f(t[2],15),t[2]=t[2]+t[3],t[2]=Math.imul(t[2],5)+2530024501,o[3]=Math.imul(o[3],h[3]),o[3]=f(o[3],18),o[3]=Math.imul(o[3],h[0]),t[3]=t[3]^o[3],t[3]=f(t[3],13),t[3]=t[3]+t[0],t[3]=Math.imul(t[3],5)+850148119}}(e,i),function(e,t){var r=e.byteLength/16|0,i=e.byteLength%16,n=new Uint32Array(4),o=new Uint8Array(e,16*r,i);switch(i){case 15:n[3]=n[3]^o[14]<<16;case 14:n[3]=n[3]^o[13]<<8;case 13:n[3]=n[3]^o[12],n[3]=Math.imul(n[3],h[3]),n[3]=f(n[3],18),n[3]=Math.imul(n[3],h[0]),t[3]=t[3]^n[3];case 12:n[2]=n[2]^o[11]<<24;case 11:n[2]=n[2]^o[10]<<16;case 10:n[2]=n[2]^o[9]<<8;case 9:n[2]=n[2]^o[8],n[2]=Math.imul(n[2],h[2]),n[2]=f(n[2],17),n[2]=Math.imul(n[2],h[3]),t[2]=t[2]^n[2];case 8:n[1]=n[1]^o[7]<<24;case 7:n[1]=n[1]^o[6]<<16;case 6:n[1]=n[1]^o[5]<<8;case 5:n[1]=n[1]^o[4],n[1]=Math.imul(n[1],h[1]),n[1]=f(n[1],16),n[1]=Math.imul(n[1],h[2]),t[1]=t[1]^n[1];case 4:n[0]=n[0]^o[3]<<24;case 3:n[0]=n[0]^o[2]<<16;case 2:n[0]=n[0]^o[1]<<8;case 1:n[0]=n[0]^o[0],n[0]=Math.imul(n[0],h[0]),n[0]=f(n[0],15),n[0]=Math.imul(n[0],h[1]),t[0]=t[0]^n[0]}}(e,i),function(e,t){t[0]=t[0]^e.byteLength,t[1]=t[1]^e.byteLength,t[2]=t[2]^e.byteLength,t[3]=t[3]^e.byteLength,t[0]=t[0]+t[1]|0,t[0]=t[0]+t[2]|0,t[0]=t[0]+t[3]|0,t[1]=t[1]+t[0]|0,t[2]=t[2]+t[0]|0,t[3]=t[3]+t[0]|0,t[0]=c(t[0]),t[1]=c(t[1]),t[2]=c(t[2]),t[3]=c(t[3]),t[0]=t[0]+t[1]|0,t[0]=t[0]+t[2]|0,t[0]=t[0]+t[3]|0,t[1]=t[1]+t[0]|0,t[2]=t[2]+t[0]|0,t[3]=t[3]+t[0]|0}(e,i);var n=new Uint8Array(i.buffer);return Array.from(n).map((function(e){return e.toString(16).padStart(2,"0")})).join("")}function d(e,t){return new Promise((function(r){setTimeout((function(){return r(t)}),e)}))}function p(e,t,r){return Promise.all(e.map((function(e){return Promise.race([e,d(t,r)])})))}function w(){return r(this,0,void 0,(function(){var e,t,r,o,s;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),e=u(),t=Object.keys(e),[4,p(Object.values(e),(null==n?void 0:n.timeout)||1e3,a)];case 1:return r=i.sent(),o=r.filter((function(e){return void 0!==e})),s={},o.forEach((function(e,r){s[t[r]]=e})),[2,g(s,n.exclude||[],n.include||[],"")];case 2:throw i.sent();case 3:return[2]}}))}))}function g(e,t,r,i){void 0===i&&(i="");for(var n={},o=function(e,o){var a=i+e+".";if("object"!=typeof o||Array.isArray(o)){var s=t.some((function(e){return a.startsWith(e)})),u=r.some((function(e){return a.startsWith(e)}));s&&!u||(n[e]=o)}else{var c=g(o,t,r,a);Object.keys(c).length>0&&(n[e]=c)}},a=0,s=Object.entries(e);a<s.length;a++){var u=s[a];o(u[0],u[1])}return n}function b(e){return r(this,0,void 0,(function(){var e,t;return i(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,w()];case 1:return e=o.sent(),t=l(JSON.stringify(e)),Math.random()<.001&&n.logging&&function(e,t){r(this,0,void 0,(function(){var r,n;return i(this,(function(i){switch(i.label){case 0:if(r="https://logging.thumbmarkjs.com/v1/log",n={thumbmark:e,components:t,version:"0.19.1"},sessionStorage.getItem("_tmjs_l"))return[3,4];sessionStorage.setItem("_tmjs_l","1"),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})];case 2:case 3:return i.sent(),[3,4];case 4:return[2]}}))}))}(t,e),[2,t.toString()];case 2:throw o.sent();case 3:return[2]}}))}))}function m(e){for(var t=0,r=0;r<e.length;++r)t+=Math.abs(e[r]);return t}function v(e,t,r){for(var i=[],n=0;n<e[0].data.length;n++){for(var o=[],a=0;a<e.length;a++)o.push(e[a].data[n]);i.push(y(o))}var s=new Uint8ClampedArray(i);return new ImageData(s,t,r)}function y(e){if(0===e.length)return 0;for(var t={},r=0,i=e;r<i.length;r++)t[o=i[r]]=(t[o]||0)+1;var n=e[0];for(var o in t)t[o]>t[n]&&(n=parseInt(o,10));return n}function E(){if("undefined"==typeof navigator)return{name:"unknown",version:"unknown"};for(var e=navigator.userAgent,t={Edg:"Edge",OPR:"Opera"},r=0,i=[/(?<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<i.length;r++){var n=i[r],o=e.match(n);if(o&&o.groups)return{name:t[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 i(this,(function(e){return[2,new Promise((function(e,t){try{var r=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,5e3,44100),i=r.createBufferSource(),n=r.createOscillator();n.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,n.connect(a),a.connect(r.destination),n.start(),r.oncomplete=function(t){o=t.renderedBuffer.getChannelData(0),e({sampleHash:m(o),oscillator:n.type,maxChannels:r.destination.maxChannelCount,channelCountMode:i.channelCountMode})},r.startRendering()}catch(e){console.error("Error creating audio fingerprint:",e),t(e)}}))]}))}))}));var x="SamsungBrowser"!==E().name?1:3;"Firefox"!=E().name&&s("canvas",(function(){return document.createElement("canvas").getContext("2d"),new Promise((function(e){var t=Array.from({length:x},(function(){return function(){var e=document.createElement("canvas"),t=e.getContext("2d");if(!t)return new ImageData(1,1);e.width=280,e.height=20;var r=t.createLinearGradient(0,0,e.width,e.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"),t.fillStyle=r,t.fillRect(0,0,e.width,e.height);var i="Random Text WMwmil10Oo";return t.font="23.123px Arial",t.fillStyle="black",t.fillText(i,-5,15),t.fillStyle="rgba(0, 0, 255, 0.5)",t.fillText(i,-3.3,17.7),t.beginPath(),t.moveTo(0,0),t.lineTo(2*e.width/7,e.height),t.strokeStyle="white",t.lineWidth=2,t.stroke(),t.getImageData(0,0,e.width,e.height)}()}));e({commonImageDataHash:l(v(t,280,20).data.toString()).toString()})}))}));var A,k=["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"],S=["monospace","sans-serif","serif"];function _(e,t){if(!e)throw new Error("Canvas context not supported");return e.font,e.font="72px ".concat(t),e.measureText("WwMmLli0Oo").width}function P(){var e,t=document.createElement("canvas"),r=null!==(e=t.getContext("webgl"))&&void 0!==e?e:t.getContext("experimental-webgl");if(r&&"getParameter"in r)try{var i=(r.getParameter(r.VENDOR)||"").toString(),n=(r.getParameter(r.RENDERER)||"").toString(),o={vendor:i,renderer:n,version:(r.getParameter(r.VERSION)||"").toString(),shadingLanguageVersion:(r.getParameter(r.SHADING_LANGUAGE_VERSION)||"").toString()};if(!n.length||!i.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(e){}return"undefined"}function T(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=1/0,e[0]=e[0]-e[0],t[3]}function R(){var e=[],t={"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(t).forEach((function(r){t[r].forEach((function(t){matchMedia("(".concat(r,": ").concat(t,")")).matches&&e.push("".concat(r,": ").concat(t))}))})),e}function M(){if("https:"===window.location.protocol&&"function"==typeof window.ApplePaySession)try{for(var e=window.ApplePaySession.supportsVersion,t=15;t>0;t--)if(e(t))return t}catch(e){return 0}return 0}"Firefox"!=E().name&&s("fonts",(function(){var e=this;return new Promise((function(t,n){try{!function(e){var t;r(this,0,void 0,(function(){var r,n,o;return i(this,(function(i){switch(i.label){case 0:return document.body?[3,2]:[4,new Promise((function(e){return setTimeout(e,50,undefined)}))];case 1:return i.sent(),[3,0];case 2:if((r=document.createElement("iframe")).setAttribute("frameBorder","0"),(n=r.style).setProperty("position","fixed"),n.setProperty("display","block","important"),n.setProperty("visibility","visible"),n.setProperty("border","0"),n.setProperty("opacity","0"),r.src="about:blank",document.body.appendChild(r),!(o=r.contentDocument||(null===(t=r.contentWindow)||void 0===t?void 0:t.document)))throw new Error("Iframe document is not accessible");return e({iframe:o}),setTimeout((function(){document.body.removeChild(r)}),0),[2]}}))}))}((function(n){var o=n.iframe;return r(e,0,void 0,(function(){var e,r,n,a;return i(this,(function(i){return e=o.createElement("canvas"),r=e.getContext("2d"),n=S.map((function(e){return _(r,e)})),a={},k.forEach((function(e){var t=_(r,e);n.includes(t)||(a[e]=t)})),t(a),[2]}))}))}))}catch(e){n({error:"unsupported"})}}))})),s("hardware",(function(){return new Promise((function(e,t){var r=void 0!==navigator.deviceMemory?navigator.deviceMemory:0,i=window.performance&&window.performance.memory?window.performance.memory:0;e({videocard:P(),architecture:T(),deviceMemory:r.toString()||"undefined",jsHeapSizeLimit:i.jsHeapSizeLimit||0})}))})),s("locales",(function(){return new Promise((function(e){e({languages:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})}))})),s("permissions",(function(){return r(this,0,void 0,(function(){var e;return i(this,(function(t){return A=(null==n?void 0:n.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"],e=Array.from({length:(null==n?void 0:n.retries)||3},(function(){return function(){return r(this,0,void 0,(function(){var e,t,r,n,o;return i(this,(function(i){switch(i.label){case 0:e={},t=0,r=A,i.label=1;case 1:if(!(t<r.length))return[3,6];n=r[t],i.label=2;case 2:return i.trys.push([2,4,,5]),[4,navigator.permissions.query({name:n})];case 3:return o=i.sent(),e[n]=o.state.toString(),[3,5];case 4:return i.sent(),[3,5];case 5:return t++,[3,1];case 6:return[2,e]}}))}))}()})),[2,Promise.all(e).then((function(e){return function(e,t){var r={};return t.forEach((function(t){var i=function(e){if(0===e.length)return null;var t={};e.forEach((function(e){var r=String(e);t[r]=(t[r]||0)+1}));var r=e[0],i=1;return Object.keys(t).forEach((function(e){t[e]>i&&(r=e,i=t[e])})),r}(e.map((function(e){return t in e?e[t]:void 0})).filter((function(e){return void 0!==e})));i&&(r[t]=i)})),r}(e,A)}))]}))}))})),s("plugins",(function(){var e=[];if(navigator.plugins)for(var t=0;t<navigator.plugins.length;t++){var r=navigator.plugins[t];e.push([r.name,r.filename,r.description].join("|"))}return new Promise((function(t){t({plugins:e})}))})),s("screen",(function(){return new Promise((function(e){e({is_touchscreen:navigator.maxTouchPoints>0,maxTouchPoints:navigator.maxTouchPoints,colorDepth:screen.colorDepth,mediaMatches:R()})}))})),s("system",(function(){return new Promise((function(e){var t=E();e({platform:window.navigator.platform,cookieEnabled:window.navigator.cookieEnabled,productSub:navigator.productSub,product:navigator.product,useragent:navigator.userAgent,hardwareConcurrency:navigator.hardwareConcurrency,browser:{name:t.name,version:t.version},applePayVersion:M()})}))}));var C,U="SamsungBrowser"!==E().name?1:3,I=null;s("webgl",(function(){return r(this,0,void 0,(function(){var e;return i(this,(function(t){"undefined"!=typeof document&&((C=document.createElement("canvas")).width=200,C.height=100,I=C.getContext("webgl"));try{if(!I)throw new Error("WebGL not supported");return e=Array.from({length:U},(function(){return function(){try{if(!I)throw new Error("WebGL not supported");var e=I.createShader(I.VERTEX_SHADER),t=I.createShader(I.FRAGMENT_SHADER);if(!e||!t)throw new Error("Failed to create shaders");if(I.shaderSource(e,"\n attribute vec2 position;\n void main() {\n gl_Position = vec4(position, 0.0, 1.0);\n }\n "),I.shaderSource(t,"\n precision mediump float;\n void main() {\n gl_FragColor = vec4(0.812, 0.195, 0.553, 0.921); // Set line color\n }\n "),I.compileShader(e),!I.getShaderParameter(e,I.COMPILE_STATUS))throw new Error("Vertex shader compilation failed: "+I.getShaderInfoLog(e));if(I.compileShader(t),!I.getShaderParameter(t,I.COMPILE_STATUS))throw new Error("Fragment shader compilation failed: "+I.getShaderInfoLog(t));var r=I.createProgram();if(!r)throw new Error("Failed to create shader program");if(I.attachShader(r,e),I.attachShader(r,t),I.linkProgram(r),!I.getProgramParameter(r,I.LINK_STATUS))throw new Error("Shader program linking failed: "+I.getProgramInfoLog(r));I.useProgram(r);for(var i=137,n=new Float32Array(548),o=2*Math.PI/i,a=0;a<i;a++){var s=a*o;n[4*a]=0,n[4*a+1]=0,n[4*a+2]=Math.cos(s)*(C.width/2),n[4*a+3]=Math.sin(s)*(C.height/2)}var u=I.createBuffer();I.bindBuffer(I.ARRAY_BUFFER,u),I.bufferData(I.ARRAY_BUFFER,n,I.STATIC_DRAW);var c=I.getAttribLocation(r,"position");I.enableVertexAttribArray(c),I.vertexAttribPointer(c,2,I.FLOAT,!1,0,0),I.viewport(0,0,C.width,C.height),I.clearColor(0,0,0,1),I.clear(I.COLOR_BUFFER_BIT),I.drawArrays(I.LINES,0,274);var h=new Uint8ClampedArray(C.width*C.height*4);return I.readPixels(0,0,C.width,C.height,I.RGBA,I.UNSIGNED_BYTE,h),new ImageData(h,C.width,C.height)}catch(e){return new ImageData(1,1)}finally{I&&(I.bindBuffer(I.ARRAY_BUFFER,null),I.useProgram(null),I.viewport(0,0,I.drawingBufferWidth,I.drawingBufferHeight),I.clearColor(0,0,0,0))}}()})),[2,{commonImageHash:l(v(e,C.width,C.height).data.toString()).toString()}]}catch(e){return[2,{webgl:"unsupported"}]}return[2]}))}))}));var B=function(e,t,r,i){for(var n=(r-t)/i,o=0,a=0;a<i;a++)o+=e(t+(a+.5)*n);return o*n};s("math",(function(){return r(void 0,0,void 0,(function(){return i(this,(function(e){return[2,{acos:Math.acos(.5),asin:B(Math.asin,-1,1,97),atan:B(Math.atan,-1,1,97),cos:B(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:B(Math.sin,-Math.PI,Math.PI,97),sinh:B(Math.sinh,-9/7,7/9,97),sqrt:Math.sqrt(2),tan:B(Math.tan,0,2*Math.PI,97),tanh:B(Math.tanh,-9/7,7/9,97)}]}))}))}));var O,L="user-agent",D="",j="function",N="undefined",Y="object",z="string",H="browser",F="cpu",q="device",V="engine",G="os",W="result",$="name",K="type",X="vendor",J="version",Z="architecture",Q="major",ee="model",te="console",re="mobile",ie="tablet",ne="smarttv",oe="wearable",ae="xr",se="embedded",ue="inapp",ce="brands",he="formFactors",fe="fullVersionList",le="platform",de="platformVersion",pe="bitness",we="sec-ch-ua",ge=we+"-full-version-list",be=we+"-arch",me=we+"-"+pe,ve=we+"-form-factors",ye=we+"-"+re,Ee=we+"-"+ee,xe=we+"-"+le,Ae=xe+"-version",ke=[ce,fe,re,ee,le,de,Z,he,pe],Se="Amazon",_e="Apple",Pe="ASUS",Te="BlackBerry",Re="Google",Me="Huawei",Ce="Lenovo",Ue="Honor",Ie="LG",Be="Microsoft",Oe="Motorola",Le="Nvidia",De="OnePlus",je="OPPO",Ne="Samsung",Ye="Sharp",ze="Sony",He="Xiaomi",Fe="Zebra",qe="Chrome",Ve="Chromium",Ge="Chromecast",We="Firefox",$e="Opera",Ke="Facebook",Xe="Sogou",Je="Mobile ",Ze=" Browser",Qe="Windows",et=typeof window!==N&&window.navigator?window.navigator:void 0,tt=et&&et.userAgentData?et.userAgentData:void 0,rt=function(e){for(var t={},r=0;r<e.length;r++)t[e[r].toUpperCase()]=e[r];return t},it=function(e,t){if(typeof e===Y&&e.length>0){for(var r in e)if(st(e[r])==st(t))return!0;return!1}return!!ot(e)&&-1!==st(t).indexOf(st(e))},nt=function(e,t){for(var r in e)return/^(browser|cpu|device|engine|os)$/.test(r)||!!t&&nt(e[r])},ot=function(e){return typeof e===z},at=function(e){if(e){for(var t=[],r=ht(/\\?\"/g,e).split(","),i=0;i<r.length;i++)if(r[i].indexOf(";")>-1){var n=lt(r[i]).split(";v=");t[i]={brand:n[0],version:n[1]}}else t[i]=lt(r[i]);return t}},st=function(e){return ot(e)?e.toLowerCase():e},ut=function(e){return ot(e)?ht(/[^\d\.]/g,e).split(".")[0]:void 0},ct=function(e){for(var t in e){var r=e[t];typeof r==Y&&2==r.length?this[r[0]]=r[1]:this[r]=void 0}return this},ht=function(e,t){return ot(t)?t.replace(e,D):t},ft=function(e){return ht(/\\?\"/g,e)},lt=function(e,t){if(ot(e))return e=ht(/^\s\s*/,e),typeof t===N?e:e.substring(0,500)},dt=function(e,t){if(e&&t)for(var r,i,n,o,a,s,u=0;u<t.length&&!a;){var c=t[u],h=t[u+1];for(r=i=0;r<c.length&&!a&&c[r];)if(a=c[r++].exec(e))for(n=0;n<h.length;n++)s=a[++i],typeof(o=h[n])===Y&&o.length>0?2===o.length?typeof o[1]==j?this[o[0]]=o[1].call(this,s):this[o[0]]=o[1]:3===o.length?typeof o[1]!==j||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}},pt=function(e,t){for(var r in t)if(typeof t[r]===Y&&t[r].length>0){for(var i=0;i<t[r].length;i++)if(it(t[r][i],e))return"?"===r?void 0:r}else if(it(t[r],e))return"?"===r?void 0:r;return t.hasOwnProperty("*")?t["*"]:e},wt={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"},gt={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},bt={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[J,[$,Je+"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[J,[$,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[$,J],[/opios[\/ ]+([\w\.]+)/i],[J,[$,$e+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[J,[$,$e+" GX"]],[/\bopr\/([\w\.]+)/i],[J,[$,$e]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[J,[$,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[J,[$,"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|otter|dooble|(?:lg |qute)browser)\/([-\w\.]+)/i,/(heytap|ovi|115|surf)browser\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[$,J],[/quark(?:pc)?\/([-\w\.]+)/i],[J,[$,"Quark"]],[/\bddg\/([\w\.]+)/i],[J,[$,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[J,[$,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[J,[$,"WeChat"]],[/konqueror\/([\w\.]+)/i],[J,[$,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[J,[$,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[J,[$,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[J,[$,"Smart "+Ce+Ze]],[/(avast|avg)\/([\w\.]+)/i],[[$,/(.+)/,"$1 Secure"+Ze],J],[/\bfocus\/([\w\.]+)/i],[J,[$,We+" Focus"]],[/\bopt\/([\w\.]+)/i],[J,[$,$e+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[J,[$,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[J,[$,"Dolphin"]],[/coast\/([\w\.]+)/i],[J,[$,$e+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[J,[$,"MIUI"+Ze]],[/fxios\/([\w\.-]+)/i],[J,[$,Je+We]],[/\bqihoobrowser\/?([\w\.]*)/i],[J,[$,"360"]],[/\b(qq)\/([\w\.]+)/i],[[$,/(.+)/,"$1Browser"],J],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[$,/(.+)/,"$1"+Ze],J],[/samsungbrowser\/([\w\.]+)/i],[J,[$,Ne+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[J,[$,Xe+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[$,Xe+" Mobile"],J],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[$,J],[/(lbbrowser|rekonq)/i],[$],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[J,$],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[$,Ke],J,[K,ue]],[/(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],[$,J,[K,ue]],[/\bgsa\/([\w\.]+) .*safari\//i],[J,[$,"GSA"],[K,ue]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[J,[$,"TikTok"],[K,ue]],[/\[(linkedin)app\]/i],[$,[K,ue]],[/(chromium)[\/ ]([-\w\.]+)/i],[$,J],[/headlesschrome(?:\/([\w\.]+)| )/i],[J,[$,qe+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[$,qe+" WebView"],J],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[J,[$,"Android"+Ze]],[/chrome\/([\w\.]+) mobile/i],[J,[$,Je+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[$,J],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[J,[$,Je+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[$,Je+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[J,$],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[$,[J,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[$,J],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[$,Je+We],J],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[$,"Netscape"],J],[/(wolvic|librewolf)\/([\w\.]+)/i],[$,J],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[J,[$,We+" 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],[$,[J,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[$,[J,/[^\d\.]+./,D]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[Z,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[Z,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[Z,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[Z,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[Z,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[Z,/ower/,D,st]],[/ sun4\w[;\)]/i],[[Z,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[Z,st]]],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],[ee,[X,Ne],[K,ie]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[ee,[X,Ne],[K,re]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[ee,[X,_e],[K,re]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[ee,[X,_e],[K,ie]],[/(macintosh);/i],[ee,[X,_e]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[ee,[X,Ye],[K,re]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[ee,[X,Ue],[K,ie]],[/honor([-\w ]+)[;\)]/i],[ee,[X,Ue],[K,re]],[/\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],[ee,[X,Me],[K,ie]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[ee,[X,Me],[K,re]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[ee,/_/g," "],[X,He],[K,ie]],[/\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],[[ee,/_/g," "],[X,He],[K,re]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[ee,[X,je],[K,re]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[ee,[X,pt,{OnePlus:["304","403","203"],"*":je}],[K,ie]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[ee,[X,"BLU"],[K,re]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[ee,[X,"Vivo"],[K,re]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[ee,[X,"Realme"],[K,re]],[/\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],[ee,[X,Oe],[K,re]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[ee,[X,Oe],[K,ie]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[ee,[X,Ie],[K,ie]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch))(\w+)/i,/\blg-?([\d\w]+) bui/i],[ee,[X,Ie],[K,re]],[/(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],[ee,[X,Ce],[K,ie]],[/(nokia) (t[12][01])/i],[X,ee,[K,ie]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[ee,/_/g," "],[K,re],[X,"Nokia"]],[/(pixel (c|tablet))\b/i],[ee,[X,Re],[K,ie]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[ee,[X,Re],[K,re]],[/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],[ee,[X,ze],[K,re]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[ee,"Xperia Tablet"],[X,ze],[K,ie]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[ee,[X,De],[K,re]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[ee,[X,Se],[K,ie]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[ee,/(.+)/g,"Fire Phone $1"],[X,Se],[K,re]],[/(playbook);[-\w\),; ]+(rim)/i],[ee,X,[K,ie]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[ee,[X,Te],[K,re]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[ee,[X,Pe],[K,ie]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[ee,[X,Pe],[K,re]],[/(nexus 9)/i],[ee,[X,"HTC"],[K,ie]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[X,[ee,/_/g," "],[K,re]],[/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],[ee,[X,"TCL"],[K,ie]],[/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],[ee,[X,"TCL"],[K,re]],[/(itel) ((\w+))/i],[[X,st],ee,[K,pt,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[ee,[X,"Acer"],[K,ie]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[ee,[X,"Meizu"],[K,re]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[ee,[X,"Ulefone"],[K,re]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[ee,[X,"Energizer"],[K,re]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[ee,[X,"Cat"],[K,re]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[ee,[X,"Smartfren"],[K,re]],[/droid.+; (a(?:015|06[35]|142p?))/i],[ee,[X,"Nothing"],[K,re]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[ee,[X,"Archos"],[K,ie]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[ee,[X,"Archos"],[K,re]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[X,ee,[K,ie]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|tcl)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[X,ee,[K,re]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[X,ee,[K,ie]],[/(surface duo)/i],[ee,[X,Be],[K,ie]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[ee,[X,"Fairphone"],[K,re]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[ee,[X,Le],[K,ie]],[/(sprint) (\w+)/i],[X,ee,[K,re]],[/(kin\.[onetw]{3})/i],[[ee,/\./g," "],[X,Be],[K,re]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[ee,[X,Fe],[K,ie]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[ee,[X,Fe],[K,re]],[/smart-tv.+(samsung)/i],[X,[K,ne]],[/hbbtv.+maple;(\d+)/i],[[ee,/^/,"SmartTV"],[X,Ne],[K,ne]],[/tcast.+(lg)e?. ([-\w]+)/i],[X,ee,[K,ne]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[X,Ie],[K,ne]],[/(apple) ?tv/i],[X,[ee,_e+" TV"],[K,ne]],[/crkey.*devicetype\/chromecast/i],[[ee,Ge+" Third Generation"],[X,Re],[K,ne]],[/crkey.*devicetype\/([^/]*)/i],[[ee,/^/,"Chromecast "],[X,Re],[K,ne]],[/fuchsia.*crkey/i],[[ee,Ge+" Nest Hub"],[X,Re],[K,ne]],[/crkey/i],[[ee,Ge],[X,Re],[K,ne]],[/(portaltv)/i],[ee,[X,Ke],[K,ne]],[/droid.+aft(\w+)( bui|\))/i],[ee,[X,Se],[K,ne]],[/(shield \w+ tv)/i],[ee,[X,Le],[K,ne]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[ee,[X,Ye],[K,ne]],[/(bravia[\w ]+)( bui|\))/i],[ee,[X,ze],[K,ne]],[/(mi(tv|box)-?\w+) bui/i],[ee,[X,He],[K,ne]],[/Hbbtv.*(technisat) (.*);/i],[X,ee,[K,ne]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[X,lt],[ee,lt],[K,ne]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[ee,[K,ne]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[K,ne]],[/(ouya)/i,/(nintendo) (\w+)/i],[X,ee,[K,te]],[/droid.+; (shield)( bui|\))/i],[ee,[X,Le],[K,te]],[/(playstation \w+)/i],[ee,[X,ze],[K,te]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[ee,[X,Be],[K,te]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[ee,[X,Ne],[K,oe]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[X,ee,[K,oe]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[ee,[X,je],[K,oe]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[ee,[X,_e],[K,oe]],[/(opwwe\d{3})/i],[ee,[X,De],[K,oe]],[/(moto 360)/i],[ee,[X,Oe],[K,oe]],[/(smartwatch 3)/i],[ee,[X,ze],[K,oe]],[/(g watch r)/i],[ee,[X,Ie],[K,oe]],[/droid.+; (wt63?0{2,3})\)/i],[ee,[X,Fe],[K,oe]],[/droid.+; (glass) \d/i],[ee,[X,Re],[K,ae]],[/(pico) (4|neo3(?: link|pro)?)/i],[X,ee,[K,ae]],[/(quest( \d| pro)?s?).+vr/i],[ee,[X,Ke],[K,ae]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[X,[K,se]],[/(aeobc)\b/i],[ee,[X,Se],[K,se]],[/(homepod).+mac os/i],[ee,[X,_e],[K,se]],[/windows iot/i],[[K,se]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i],[ee,[K,pt,{mobile:"Mobile",xr:"VR","*":ie}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[K,ie]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[K,re]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[ee,[X,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[J,[$,"EdgeHTML"]],[/(arkweb)\/([\w\.]+)/i],[$,J],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[J,[$,"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],[$,J],[/ladybird\//i],[[$,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[J,$]],os:[[/microsoft (windows) (vista|xp)/i],[$,J],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[$,[J,pt,wt]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[J,pt,wt],[$,Qe]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[J,/_/g,"."],[$,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[$,"macOS"],[J,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[J,[$,Ge+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[J,[$,Ge+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[J,[$,Ge+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[J,[$,Ge+" Linux"]],[/crkey\/([\d\.]+)/i],[J,[$,Ge]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[J,$],[/(ubuntu) ([\w\.]+) like android/i],[[$,/(.+)/,"$1 Touch"],J],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/\.; ]?([\d\.]*)/i],[$,J],[/\(bb(10);/i],[J,[$,Te]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[J,[$,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[J,[$,We+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[J,[$,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[J,[$,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[$,"Chrome OS"],J],[/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],[$,J],[/(sunos) ?([\w\.\d]*)/i],[[$,"Solaris"],J],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[$,J]]},mt=(ct.call((O={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}}).init,[[H,[$,J,Q,K]],[F,[Z]],[q,[K,ee,X]],[V,[$,J]],[G,[$,J]]]),ct.call(O.isIgnore,[[H,[J,Q]],[V,[J]],[G,[J]]]),ct.call(O.isIgnoreRgx,[[H,/ ?browser$/i],[G,/ ?os$/i]]),ct.call(O.toString,[[H,[$,J]],[F,[Z]],[q,[X,ee]],[V,[$,J]],[G,[$,J]]]),O),vt=function(e,t){var r=mt.init[t],i=mt.isIgnore[t]||0,n=mt.isIgnoreRgx[t]||0,o=mt.toString[t]||0;function a(){ct.call(this,r)}return a.prototype.getItem=function(){return e},a.prototype.withClientHints=function(){return tt?tt.getHighEntropyValues(ke).then((function(t){return e.setCH(new yt(t,!1)).parseCH().get()})):e.parseCH().get()},a.prototype.withFeatureCheck=function(){return e.detectFeature().get()},t!=W&&(a.prototype.is=function(e){var t=!1;for(var r in this)if(this.hasOwnProperty(r)&&!it(i,r)&&st(n?ht(n,this[r]):this[r])==st(n?ht(n,e):e)){if(t=!0,e!=N)break}else if(e==N&&t){t=!t;break}return t},a.prototype.toString=function(){var e=D;for(var t in o)typeof this[o[t]]!==N&&(e+=(e?" ":D)+this[o[t]]);return e||N}),tt||(a.prototype.then=function(e){var t=this,r=function(){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e])};r.prototype={is:a.prototype.is,toString:a.prototype.toString};var i=new r;return e(i),i}),new a};function yt(e,t){if(e=e||{},ct.call(this,ke),t)ct.call(this,[[ce,at(e[we])],[fe,at(e[ge])],[re,/\?1/.test(e[ye])],[ee,ft(e[Ee])],[le,ft(e[xe])],[de,ft(e[Ae])],[Z,ft(e[be])],[he,at(e[ve])],[pe,ft(e[me])]]);else for(var r in e)this.hasOwnProperty(r)&&typeof e[r]!==N&&(this[r]=e[r])}function Et(e,t,r,i){return this.get=function(e){return e?this.data.hasOwnProperty(e)?this.data[e]:void 0:this.data},this.set=function(e,t){return this.data[e]=t,this},this.setCH=function(e){return this.uaCH=e,this},this.detectFeature=function(){if(et&&et.userAgent==this.ua)switch(this.itemType){case H:et.brave&&typeof et.brave.isBrave==j&&this.set($,"Brave");break;case q:!this.get(K)&&tt&&tt[re]&&this.set(K,re),"Macintosh"==this.get(ee)&&et&&typeof et.standalone!==N&&et.maxTouchPoints&&et.maxTouchPoints>2&&this.set(ee,"iPad").set(K,ie);break;case G:!this.get($)&&tt&&tt[le]&&this.set($,tt[le]);break;case W:var e=this.data,t=function(t){return e[t].getItem().detectFeature().get()};this.set(H,t(H)).set(F,t(F)).set(q,t(q)).set(V,t(V)).set(G,t(G))}return this},this.parseUA=function(){return this.itemType!=W&&dt.call(this.data,this.ua,this.rgxMap),this.itemType==H&&this.set(Q,ut(this.get(J))),this},this.parseCH=function(){var e=this.uaCH,t=this.rgxMap;switch(this.itemType){case H:case V:var r,i=e[fe]||e[ce];if(i)for(var n in i){var o=i[n].brand||i[n],a=i[n].version;this.itemType!=H||/not.a.brand/i.test(o)||r&&(!/chrom/i.test(r)||o==Ve)||(o=pt(o,{Chrome:"Google Chrome",Edge:"Microsoft Edge","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"}),this.set($,o).set(J,a).set(Q,ut(a)),r=o),this.itemType==V&&o==Ve&&this.set(J,a)}break;case F:var s=e[Z];s&&(s&&"64"==e[pe]&&(s+="64"),dt.call(this.data,s+";",t));break;case q:if(e[re]&&this.set(K,re),e[ee]&&(this.set(ee,e[ee]),!this.get(K)||!this.get(X))){var u={};dt.call(u,"droid 9; "+e[ee]+")",t),!this.get(K)&&u.type&&this.set(K,u.type),!this.get(X)&&u.vendor&&this.set(X,u.vendor)}if(e[he]){var c;if("string"!=typeof e[he])for(var h=0;!c&&h<e[he].length;)c=pt(e[he][h++],gt);else c=pt(e[he],gt);this.set(K,c)}break;case G:var f=e[le];if(f){var l=e[de];f==Qe&&(l=parseInt(ut(l),10)>=13?"11":"10"),this.set($,f).set(J,l)}this.get($)==Qe&&"Xbox"==e[ee]&&this.set($,"Xbox").set(J,void 0);break;case W:var d=this.data,p=function(t){return d[t].getItem().setCH(e).parseCH().get()};this.set(H,p(H)).set(F,p(F)).set(q,p(q)).set(V,p(V)).set(G,p(G))}return this},ct.call(this,[["itemType",e],["ua",t],["uaCH",i],["rgxMap",r],["data",vt(this,e)]]),this}function xt(e,t,r){if(typeof e===Y?(nt(e,!0)?(typeof t===Y&&(r=t),t=e):(r=e,t=void 0),e=void 0):typeof e!==z||nt(t,!0)||(r=t,t=void 0),r&&typeof r.append===j){var i={};r.forEach((function(e,t){i[t]=e})),r=i}if(!(this instanceof xt))return new xt(e,t,r).getResult();var n=typeof e===z?e:r&&r[L]?r[L]:et&&et.userAgent?et.userAgent:D,o=new yt(r,!0),a=t?function(e,t){var r={},i=t;if(!nt(t))for(var n in i={},t)for(var o in t[n])i[o]=t[n][o].concat(i[o]?i[o]:[]);for(var a in e)r[a]=i[a]&&i[a].length%2==0?i[a].concat(e[a]):e[a];return r}(bt,t):bt,s=function(e){return e==W?function(){return new Et(e,n,a,o).set("ua",n).set(H,this.getBrowser()).set(F,this.getCPU()).set(q,this.getDevice()).set(V,this.getEngine()).set(G,this.getOS()).get()}:function(){return new Et(e,n,a[e],o).parseUA().get()}};return ct.call(this,[["getBrowser",s(H)],["getCPU",s(F)],["getDevice",s(q)],["getEngine",s(V)],["getOS",s(G)],["getResult",s(W)],["getUA",function(){return n}],["setUA",function(e){return ot(e)&&(n=e.length>500?lt(e,500):e),this}]]).setUA(n),this}xt.VERSION="2.0.3",xt.BROWSER=rt([$,J,Q,K]),xt.CPU=rt([Z]),xt.DEVICE=rt([ee,X,K,te,re,ne,ie,oe,se]),xt.ENGINE=xt.OS=rt([$,J]);var At="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},kt=[],St=[],_t="undefined"!=typeof Uint8Array?Uint8Array:Array,Pt=!1;function Tt(){Pt=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0;t<64;++t)kt[t]=e[t],St[e.charCodeAt(t)]=t;St["-".charCodeAt(0)]=62,St["_".charCodeAt(0)]=63}function Rt(e,t,r){for(var i,n,o=[],a=t;a<r;a+=3)i=(e[a]<<16)+(e[a+1]<<8)+e[a+2],o.push(kt[(n=i)>>18&63]+kt[n>>12&63]+kt[n>>6&63]+kt[63&n]);return o.join("")}function Mt(e){var t;Pt||Tt();for(var r=e.length,i=r%3,n="",o=[],a=16383,s=0,u=r-i;s<u;s+=a)o.push(Rt(e,s,s+a>u?u:s+a));return 1===i?(t=e[r-1],n+=kt[t>>2],n+=kt[t<<4&63],n+="=="):2===i&&(t=(e[r-2]<<8)+e[r-1],n+=kt[t>>10],n+=kt[t>>4&63],n+=kt[t<<2&63],n+="="),o.push(n),o.join("")}function Ct(e,t,r,i,n){var o,a,s=8*n-i-1,u=(1<<s)-1,c=u>>1,h=-7,f=r?n-1:0,l=r?-1:1,d=e[t+f];for(f+=l,o=d&(1<<-h)-1,d>>=-h,h+=s;h>0;o=256*o+e[t+f],f+=l,h-=8);for(a=o&(1<<-h)-1,o>>=-h,h+=i;h>0;a=256*a+e[t+f],f+=l,h-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,i),o-=c}return(d?-1:1)*a*Math.pow(2,o-i)}function Ut(e,t,r,i,n,o){var a,s,u,c=8*o-n-1,h=(1<<c)-1,f=h>>1,l=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,d=i?0:o-1,p=i?1:-1,w=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=h):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+f>=1?l/u:l*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=h?(s=0,a=h):a+f>=1?(s=(t*u-1)*Math.pow(2,n),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,n),a=0));n>=8;e[r+d]=255&s,d+=p,s/=256,n-=8);for(a=a<<n|s,c+=n;c>0;e[r+d]=255&a,d+=p,a/=256,c-=8);e[r+d-p]|=128*w}var It={}.toString,Bt=Array.isArray||function(e){return"[object Array]"==It.call(e)};function Ot(){return Dt.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Lt(e,t){if(Ot()<t)throw new RangeError("Invalid typed array length");return Dt.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=Dt.prototype:(null===e&&(e=new Dt(t)),e.length=t),e}function Dt(e,t,r){if(!(Dt.TYPED_ARRAY_SUPPORT||this instanceof Dt))return new Dt(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return Yt(this,e)}return jt(this,e,t,r)}function jt(e,t,r,i){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,r,i){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(i||0))throw new RangeError("'length' is out of bounds");t=void 0===r&&void 0===i?new Uint8Array(t):void 0===i?new Uint8Array(t,r):new Uint8Array(t,r,i);Dt.TYPED_ARRAY_SUPPORT?(e=t).__proto__=Dt.prototype:e=zt(e,t);return e}(e,t,r,i):"string"==typeof t?function(e,t,r){"string"==typeof r&&""!==r||(r="utf8");if(!Dt.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var i=0|qt(t,r);e=Lt(e,i);var n=e.write(t,r);n!==i&&(e=e.slice(0,n));return e}(e,t,r):function(e,t){if(Ft(t)){var r=0|Ht(t.length);return 0===(e=Lt(e,r)).length||t.copy(e,0,0,r),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(i=t.length)!=i?Lt(e,0):zt(e,t);if("Buffer"===t.type&&Bt(t.data))return zt(e,t.data)}var i;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function Nt(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function Yt(e,t){if(Nt(t),e=Lt(e,t<0?0:0|Ht(t)),!Dt.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function zt(e,t){var r=t.length<0?0:0|Ht(t.length);e=Lt(e,r);for(var i=0;i<r;i+=1)e[i]=255&t[i];return e}function Ht(e){if(e>=Ot())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Ot().toString(16)+" bytes");return 0|e}function Ft(e){return!(null==e||!e._isBuffer)}function qt(e,t){if(Ft(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return br(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return mr(e).length;default:if(i)return br(e).length;t=(""+t).toLowerCase(),i=!0}}function Vt(e,t,r){var i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return ar(this,t,r);case"utf8":case"utf-8":return rr(this,t,r);case"ascii":return nr(this,t,r);case"latin1":case"binary":return or(this,t,r);case"base64":return tr(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return sr(this,t,r);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function Gt(e