"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[672],{49354:function(e,n,o){o.d(n,{cn:function(){return i}});var t=o(44839),r=o(96164);function i(){for(var e=arguments.length,n=Array(e),o=0;o{this.resolve=e,this.reject=n})}}},62052:function(e,n,o){o.d(n,{$5:function(){return a},HQ:function(){return l},hu:function(){return u}});var t=o(36393),r=o(22170),i=o.n(r);let c=(0,o(89028).ri)().loggerSettings,a={llmEngine:{main:"background: #f0f8ff; color: #1e90ff; font-weight: bold;",worker:"background: #f0f8ff; color: #87cefa;"},embeddingEngine:{main:"background: #f0fff0; color: #2e8b57; font-weight: bold;",worker:"background: #f0fff0; color: #90ee90;"},theDomain:"background: #fff0f5; color: #ff69b4; font-weight: bold;",consensusCore:"background: #f5f5f5; color: #4682b4; font-weight: bold;",databases:{inferenceDB:"background: #f5f5f5; color: #a9a9a9;",packetDB:"background: #f5f5f5; color: #708090;",peerDB:"background: #f5f5f5; color: #778899;",quorumDB:"background: #f5f5f5; color: #696969;"},p2pNetworks:{nkn:"background: #fffacd; color: #ffa500;",torrent:"background: #fffacd; color: #ff8c00;",pewpewdb:"background: #fffacd; color: #ff7f50;",nostr:"background: #fffacd; color: #ff6347;"}},s=0;class l extends t.Z{static getInstance(){return l.instance||(l.instance=new l),l.instance}static addLog(e,n,o){l.getInstance().logs.push({at:new Date,logger:e,type:n,id:s++,message:o}),l.getInstance().logs=l.getInstance().logs.slice(-c.maxLogsInMemory).sort((e,n)=>n.at.getTime()-e.at.getTime()),l.getInstance().emitNewLogs()}constructor(){super(),this.logs=[],this.emitNewLogs=i()(()=>{this.emit("newLog")},c.newLogEventDebounceMs)}}function u(e,n){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return!o&&window&&(window.blockedLogLevels=localStorage.getItem("blockedLogLevels")||[],window.blockedLoggers=localStorage.getItem("blockedLoggers")||[]),{trace:function(t){for(var r,i,c,a,s=arguments.length,l=Array(s>1?s-1:0),u=1;u1?u-1:0),g=1;g1?u-1:0),g=1;g1?u-1:0),g=1;g1?u-1:0),g=1;ge.toString(16).padStart(2,"0")).join("")}async function d(e){let n=new TextEncoder().encode(e);return Array.from(new Uint8Array(await crypto.subtle.digest("SHA-256",n))).map(e=>e.toString(16).padStart(2,"0")).join("")}function g(e,n,o){let t=JSON.stringify(o),i=new Uint8Array(new TextEncoder().encode(t));return r.T(n,i,e)}function f(e,n){let o=JSON.stringify(n),t=new Uint8Array(new TextEncoder().encode(o)),i=r.Xx(t,e);return r.UG.bytesToHex(i)}async function w(e,n){console.time("Encrypting info for storage");let o=new TextEncoder,r=o.encode(n),i=crypto.getRandomValues(new Uint8Array(16)),c=crypto.getRandomValues(new Uint8Array(12)),a=await crypto.subtle.importKey("raw",r,{name:"PBKDF2"},!1,["deriveKey"]),s=await crypto.subtle.deriveKey({name:"PBKDF2",salt:i,iterations:1e5,hash:"SHA-256"},a,{name:"AES-GCM",length:256},!1,["encrypt"]),l=o.encode(JSON.stringify(e)),u=await crypto.subtle.encrypt({name:"AES-GCM",iv:c},s,l),d=t.Buffer.from(u).toString("base64"),g=t.Buffer.from(c).toString("hex"),f=t.Buffer.from(i).toString("hex");return console.timeEnd("Encrypting info for storage"),"".concat(d,".").concat(g,".").concat(f)}async function m(e,n){console.time("Decrypting info from storage");let[o,r,i]=e.split("."),c=t.Buffer.from(o,"base64"),a=t.Buffer.from(r,"hex"),s=t.Buffer.from(i,"hex"),l=new TextEncoder().encode(n),u=await crypto.subtle.importKey("raw",l,{name:"PBKDF2"},!1,["deriveKey"]),d=await crypto.subtle.deriveKey({name:"PBKDF2",salt:s,iterations:1e5,hash:"SHA-256"},u,{name:"AES-GCM",length:256},!1,["decrypt"]),g=await crypto.subtle.decrypt({name:"AES-GCM",iv:a},d,c),f=new TextDecoder().decode(g);return console.timeEnd("Decrypting info from storage"),JSON.parse(f)}r.UG.sha512Sync=function(){for(var e=arguments.length,n=Array(e),o=0;o0?"-":"+").concat(t,":").concat(r)}function r(){return"undefined"==typeof navigator||"undefined"==typeof screen?"not-client":window.disableAnalytics?"disabled-analytics":Object.values({userAgent:navigator.userAgent,browserVersion:navigator.appVersion,platform:navigator.platform,language:navigator.language,screenWidth:screen.width,screenHeight:screen.height,colorDepth:screen.colorDepth,timezoneOffset:new Date().getTimezoneOffset(),cpuCores:navigator.hardwareConcurrency,touchSupport:"ontouchstart"in window}).map(e=>"".concat(e)).join("#")}async function i(e){return new Promise(n=>{setTimeout(()=>n("timeout"),e)})}function c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:6,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",o="";for(let t=0;t