keyring-chatbot-agent-sdk-test 0.3.36 → 0.3.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,7 +14,7 @@ return e(t,{children:Cf(r||"")&&/* @__PURE__ */n("div",{className:"chat-user-inf
14
14
  /* @__PURE__ */e("div",{className:"action-form-fields",children:p.fields.map(i=>i.hidden||"amount"===i.key&&"send_nft"===t&&"ERC1155"!==m.token_standard?.toUpperCase()||["decimals"].includes(i.key)&&"send_token"===t&&r.decimals?null:/* @__PURE__ */n("div",{className:"action-form-field",children:[
15
15
  /* @__PURE__ */n("div",{className:"action-form-field-header",children:[
16
16
  /* @__PURE__ */n("div",{className:"action-form-field-label",children:[f(i.label),i.required&&" *"]}),"amount"===i.key&&u&&"send_nft"!==t&&/* @__PURE__ */n("div",{className:"action-form-pct-btns",children:[[25,50,75].map(e=>/* @__PURE__ */n("button",{type:"button",className:"action-form-pct-btn",onClick:()=>A("amount",ih(u.balanceFormatted).multipliedBy(e).dividedBy(100).decimalPlaces(u.decimals,ih.ROUND_DOWN).toFixed()),disabled:c||d,children:[e,"%"]},e)),
17
- /* @__PURE__ */e("button",{type:"button",className:"action-form-pct-btn action-form-max-btn",onClick:()=>A("amount",u.balanceFormatted),disabled:c||d,children:f("formMax")})]})]}),(()=>{const t=!1===i.editable&&!!r[i.key]||d,n=c||t,o=[y[i.key]?"error":"",t?"readonly":""].filter(Boolean).join(" ");return"address"===i.type?/* @__PURE__ */e("textarea",{rows:2,placeholder:i.placeholder,value:m[i.key]||"",onChange:e=>A(i.key,e.target.value),className:o,disabled:n||d}):/* @__PURE__ */e("input",{type:"number"===i.type?"number":"text",placeholder:i.placeholder,value:m[i.key]||"",onChange:e=>A(i.key,e.target.value),className:o,disabled:n||d})})(),y[i.key]&&/* @__PURE__ */e("span",{className:"field-error",children:y[i.key]})]},i.key))}),!d&&/* @__PURE__ */n("div",{className:"action-form-actions",children:[
17
+ /* @__PURE__ */e("button",{type:"button",className:"action-form-pct-btn action-form-max-btn",onClick:()=>A("amount",u.balanceFormatted),disabled:c||d,children:f("formMax")})]}),"amount"===i.key&&"send_nft"===t&&l&&/* @__PURE__ */e("div",{className:"action-form-pct-btns",children:/* @__PURE__ */e("button",{type:"button",className:"action-form-pct-btn action-form-max-btn",onClick:()=>A("amount",r.maxAmount||""),disabled:c||d,children:f("formMax")})})]}),(()=>{const t=!1===i.editable&&!!r[i.key]||d,n=c||t,o=[y[i.key]?"error":"",t?"readonly":""].filter(Boolean).join(" ");return"address"===i.type?/* @__PURE__ */e("textarea",{rows:2,placeholder:i.placeholder,value:m[i.key]||"",onChange:e=>A(i.key,e.target.value),className:o,disabled:n||d}):/* @__PURE__ */e("input",{type:"number"===i.type?"number":"text",placeholder:i.placeholder,value:m[i.key]||"",onChange:e=>A(i.key,e.target.value),className:o,disabled:n||d})})(),y[i.key]&&/* @__PURE__ */e("span",{className:"field-error",children:y[i.key]})]},i.key))}),!d&&/* @__PURE__ */n("div",{className:"action-form-actions",children:[
18
18
  /* @__PURE__ */e("button",{className:"message-button",onClick:s,type:"button",disabled:c,children:f("formCancel")}),
19
19
  /* @__PURE__ */e("button",{className:"message-button",onClick:x,type:"button",disabled:c,children:f(c?"formProcessing":"formExecute")})]})]}):null},yh=({scrollContainerRef:t,threshold:n=200})=>{const[r,a]=i(!1);return o(()=>{const e=t.current;if(!e)return;const r=()=>{const{scrollTop:t,scrollHeight:r,clientHeight:i}=e;a(r-t-i>n)};return e.addEventListener("scroll",r,{passive:!0}),r(),()=>{e.removeEventListener("scroll",r)}},[t,n]),r?/* @__PURE__ */e("button",{className:"scroll-to-bottom-btn",onClick:()=>{t.current?.scrollTo({top:t.current.scrollHeight,behavior:"smooth"})},"aria-label":"Scroll to bottom",type:"button",children:/* @__PURE__ */e("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:/* @__PURE__ */e("path",{d:"M9 3V15M9 15L4 10M9 15L14 10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}):null},vh=e=>e?`**CRITICAL - LANGUAGE**: Respond in the specified language: "${e||"detect from current question"}". Do NOT follow language from conversation history.`:"**CRITICAL - LANGUAGE**: You MUST detect the language of the user's CURRENT question and respond ONLY in that exact language. Ignore the language of previous messages in conversation history — only the current question matters. If the current question is in English, respond in English. If in Vietnamese, respond in Vietnamese. NEVER default to Chinese or any other language.",Ah={1:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",10:"0x4200000000000000000000000000000000000006",56:"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",137:"0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",8453:"0x4200000000000000000000000000000000000006",42161:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"},kh=[{name:"transfer",type:"function",stateMutability:"nonpayable",inputs:[{name:"to",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{name:"approve",type:"function",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{name:"allowance",type:"function",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{name:"",type:"uint256"}]}],xh=[{name:"deposit",type:"function",stateMutability:"payable",inputs:[],outputs:[]},{name:"withdraw",type:"function",stateMutability:"nonpayable",inputs:[{name:"wad",type:"uint256"}],outputs:[]}],Eh=[{name:"safeTransferFrom",type:"function",stateMutability:"nonpayable",inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"tokenId",type:"uint256"}],outputs:[]}],Th=[{name:"safeTransferFrom",type:"function",stateMutability:"nonpayable",inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"id",type:"uint256"},{name:"amount",type:"uint256"},{name:"data",type:"bytes"}],outputs:[]}];function Ch(e,t){if(t)return t;const n=wr[e];return n?.rpcUrls?.default?.http?.[0]}async function Ih(e){const{transactionHash:t,chainId:n,pollingInterval:r=3e3,timeout:i=12e4,rpcUrl:o}=e,a=Ch(n,o);if(!a)throw new Error(`No RPC endpoint for chain ${n}`);const s=Date.now();for(;Date.now()-s<i;){try{const e=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"eth_getTransactionReceipt",params:[t]})}),n=await e.json();if(n.result){const e=n.result;return{status:"0x1"===e.status?"success":"fail",blockNumber:e.blockNumber,gasUsed:e.gasUsed,effectiveGasPrice:e.effectiveGasPrice}}}catch(c){}await new Promise(e=>setTimeout(e,r))}throw new Error(`Transaction ${t} was not mined within ${i/1e3}s`)}async function Sh(e){const{tokenAddress:t,ownerAddress:n,spenderAddress:r,chainId:i,rpcUrl:o}=e,a=Ch(i,o);if(!a)return BigInt(0);try{const e=Bt({abi:kh,functionName:"allowance",args:[n,r]}),i=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"eth_call",params:[{to:t,data:e},"latest"]})}),o=await i.json();return o.result&&"0x"!==o.result?BigInt(o.result):BigInt(0)}catch(s){return BigInt(0)}}function Nh(e){const{tokenAddress:t,spenderAddress:n,fromAddress:r,chainId:i,tokenSymbol:o,amount:a}=e,s=a&&BigInt(a)>0n?BigInt(a):hn;return{from:r,to:t,data:Bt({abi:kh,functionName:"approve",args:[n,s]}),value:"0",chainId:i,description:`Approve ${o||"token"} for swap`}}async function Bh(e){const{address:t,chainId:n,rpcUrl:r}=e,i=Ch(n,r);if(!i)return new ih(0);try{const e=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"eth_getBalance",params:[t,"latest"]})}),n=await e.json();return n.result&&"0x"!==n.result?new ih(BigInt(n.result).toString()):new ih(0)}catch(o){return new ih(0)}}async function Mh(e){const{from:t,to:n,data:r,value:i,chainId:o,rpcUrl:a}=e,s=Ch(o,a);if(!s)return new ih(0);try{const[e,o]=await Promise.all([fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"eth_estimateGas",params:[{from:t,to:n,data:r,...i&&"0"!==i?{value:i}:{}}]})}),fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:2,method:"eth_gasPrice",params:[]})})]),[a,c]=await Promise.all([e.json(),o.json()]),u=a.result?new ih(BigInt(a.result).toString()):new ih(0),l=c.result?new ih(BigInt(c.result).toString()):new ih(0);return u.times(l).times(1.1)}catch(c){return new ih(0)}}async function Rh(e){const{chainId:t,rpcUrl:n}=e,r=Ch(t,n);if(!r)return new ih(0);try{const e=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",id:1,method:"eth_gasPrice",params:[]})}),t=await e.json();return t.result&&"0x"!==t.result?new ih(BigInt(t.result).toString()):new ih(0)}catch(i){return new ih(0)}}var Oh,Uh,Fh={},Dh={exports:{}},Lh=Dh.exports;var Ph=function(){if(Uh)return Fh;Uh=1,Object.defineProperty(Fh,"u",{value:!0});var e,t,n,i=r,o=(e=i)&&"object"==typeof e&&"default"in e?e.default:e,a=(Oh||(Oh=1,t=Dh,n=Dh.exports,function(e,r){var i="function",o="undefined",a="object",s="string",c="major",u="model",l="name",d="type",f="vendor",h="version",p="architecture",m="console",w="mobile",b="tablet",g="smarttv",y="wearable",v="embedded",A="Amazon",k="Apple",x="ASUS",E="BlackBerry",T="Browser",C="Chrome",I="Firefox",S="Google",N="Honor",B="Huawei",M="LG",R="Microsoft",O="Motorola",U="Nvidia",F="OnePlus",D="Opera",L="OPPO",P="Samsung",H="Sharp",j="Sony",z="Xiaomi",J="Zebra",q="Facebook",V="Chromium OS",Y="Mac OS",G=" Browser",W=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},X=function(e,t){return typeof e===s&&-1!==K(t).indexOf(K(e))},K=function(e){return e.toLowerCase()},Q=function(e,t){if(typeof e===s)return e=e.replace(/^\s\s*/,""),typeof t===o?e:e.substring(0,500)},Z=function(e,t){for(var n,o,s,c,u,l,d=0;d<t.length&&!u;){var f=t[d],h=t[d+1];for(n=o=0;n<f.length&&!u&&f[n];)if(u=f[n++].exec(e))for(s=0;s<h.length;s++)l=u[++o],typeof(c=h[s])===a&&c.length>0?2===c.length?typeof c[1]==i?this[c[0]]=c[1].call(this,l):this[c[0]]=c[1]:3===c.length?typeof c[1]!==i||c[1].exec&&c[1].test?this[c[0]]=l?l.replace(c[1],c[2]):r:this[c[0]]=l?c[1].call(this,l,c[2]):r:4===c.length&&(this[c[0]]=l?c[3].call(this,l.replace(c[1],c[2])):r):this[c]=l||r;d+=2}},_=function(e,t){for(var n in t)if(typeof t[n]===a&&t[n].length>0){for(var i=0;i<t[n].length;i++)if(X(t[n][i],e))return"?"===n?r:n}else if(X(t[n],e))return"?"===n?r:n;return t.hasOwnProperty("*")?t["*"]:e},$={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"},ee={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[h,[l,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[h,[l,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[l,h],[/opios[\/ ]+([\w\.]+)/i],[h,[l,D+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[h,[l,D+" GX"]],[/\bopr\/([\w\.]+)/i],[h,[l,D]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[h,[l,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[h,[l,"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],[l,h],[/quark(?:pc)?\/([-\w\.]+)/i],[h,[l,"Quark"]],[/\bddg\/([\w\.]+)/i],[h,[l,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[h,[l,"UC"+T]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[h,[l,"WeChat"]],[/konqueror\/([\w\.]+)/i],[h,[l,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[h,[l,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[h,[l,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[h,[l,"Smart Lenovo "+T]],[/(avast|avg)\/([\w\.]+)/i],[[l,/(.+)/,"$1 Secure "+T],h],[/\bfocus\/([\w\.]+)/i],[h,[l,I+" Focus"]],[/\bopt\/([\w\.]+)/i],[h,[l,D+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[h,[l,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[h,[l,"Dolphin"]],[/coast\/([\w\.]+)/i],[h,[l,D+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[h,[l,"MIUI"+G]],[/fxios\/([\w\.-]+)/i],[h,[l,I]],[/\bqihoobrowser\/?([\w\.]*)/i],[h,[l,"360"]],[/\b(qq)\/([\w\.]+)/i],[[l,/(.+)/,"$1Browser"],h],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[l,/(.+)/,"$1"+G],h],[/samsungbrowser\/([\w\.]+)/i],[h,[l,P+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[h,[l,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[l,"Sogou Mobile"],h],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[l,h],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[l],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[h,l],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[l,q],h],[/(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,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[l,h],[/\bgsa\/([\w\.]+) .*safari\//i],[h,[l,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[h,[l,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[h,[l,C+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[l,C+" WebView"],h],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[h,[l,"Android "+T]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[l,h],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[h,[l,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[h,l],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[l,[h,_,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[l,h],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[l,"Netscape"],h],[/(wolvic|librewolf)\/([\w\.]+)/i],[l,h],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[h,[l,I+" 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],[l,[h,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[l,[h,/master.|lts./,""]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[p,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[p,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[p,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[p,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[p,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[p,/ower/,"",K]],[/ sun4\w[;\)]/i],[[p,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[p,K]]],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],[u,[f,P],[d,b]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[u,[f,P],[d,w]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[u,[f,k],[d,w]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[f,k],[d,b]],[/(macintosh);/i],[u,[f,k]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[f,H],[d,w]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[u,[f,N],[d,b]],[/honor([-\w ]+)[;\)]/i],[u,[f,N],[d,w]],[/\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],[u,[f,B],[d,b]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[f,B],[d,w]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[u,/_/g," "],[f,z],[d,b]],[/\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],[[u,/_/g," "],[f,z],[d,w]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[u,[f,L],[d,w]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[u,[f,_,{OnePlus:["304","403","203"],"*":L}],[d,b]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[f,"Vivo"],[d,w]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[u,[f,"Realme"],[d,w]],[/\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],[u,[f,O],[d,w]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[f,O],[d,b]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[f,M],[d,b]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[f,M],[d,w]],[/(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],[u,[f,"Lenovo"],[d,b]],[/(nokia) (t[12][01])/i],[f,u,[d,b]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[u,/_/g," "],[d,w],[f,"Nokia"]],[/(pixel (c|tablet))\b/i],[u,[f,S],[d,b]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[f,S],[d,w]],[/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],[u,[f,j],[d,w]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[f,j],[d,b]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[f,F],[d,w]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[f,A],[d,b]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[f,A],[d,w]],[/(playbook);[-\w\),; ]+(rim)/i],[u,f,[d,b]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[f,E],[d,w]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[f,x],[d,b]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[f,x],[d,w]],[/(nexus 9)/i],[u,[f,"HTC"],[d,b]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[f,[u,/_/g," "],[d,w]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[u,[f,"TCL"],[d,b]],[/(itel) ((\w+))/i],[[f,K],u,[d,_,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[f,"Acer"],[d,b]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[f,"Meizu"],[d,w]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[u,[f,"Ulefone"],[d,w]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[u,[f,"Energizer"],[d,w]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[u,[f,"Cat"],[d,w]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[u,[f,"Smartfren"],[d,w]],[/droid.+; (a(?:015|06[35]|142p?))/i],[u,[f,"Nothing"],[d,w]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[u,[f,"Archos"],[d,b]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[u,[f,"Archos"],[d,w]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[f,u,[d,b]],[/(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],[f,u,[d,w]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[f,u,[d,b]],[/(surface duo)/i],[u,[f,R],[d,b]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[f,"Fairphone"],[d,w]],[/(u304aa)/i],[u,[f,"AT&T"],[d,w]],[/\bsie-(\w*)/i],[u,[f,"Siemens"],[d,w]],[/\b(rct\w+) b/i],[u,[f,"RCA"],[d,b]],[/\b(venue[\d ]{2,7}) b/i],[u,[f,"Dell"],[d,b]],[/\b(q(?:mv|ta)\w+) b/i],[u,[f,"Verizon"],[d,b]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[f,"Barnes & Noble"],[d,b]],[/\b(tm\d{3}\w+) b/i],[u,[f,"NuVision"],[d,b]],[/\b(k88) b/i],[u,[f,"ZTE"],[d,b]],[/\b(nx\d{3}j) b/i],[u,[f,"ZTE"],[d,w]],[/\b(gen\d{3}) b.+49h/i],[u,[f,"Swiss"],[d,w]],[/\b(zur\d{3}) b/i],[u,[f,"Swiss"],[d,b]],[/\b((zeki)?tb.*\b) b/i],[u,[f,"Zeki"],[d,b]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[f,"Dragon Touch"],u,[d,b]],[/\b(ns-?\w{0,9}) b/i],[u,[f,"Insignia"],[d,b]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[f,"NextBook"],[d,b]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[f,"Voice"],u,[d,w]],[/\b(lvtel\-)?(v1[12]) b/i],[[f,"LvTel"],u,[d,w]],[/\b(ph-1) /i],[u,[f,"Essential"],[d,w]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[f,"Envizen"],[d,b]],[/\b(trio[-\w\. ]+) b/i],[u,[f,"MachSpeed"],[d,b]],[/\btu_(1491) b/i],[u,[f,"Rotor"],[d,b]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[u,[f,U],[d,b]],[/(sprint) (\w+)/i],[f,u,[d,w]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[f,R],[d,w]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[f,J],[d,b]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[f,J],[d,w]],[/smart-tv.+(samsung)/i],[f,[d,g]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[f,P],[d,g]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[f,M],[d,g]],[/(apple) ?tv/i],[f,[u,k+" TV"],[d,g]],[/crkey/i],[[u,C+"cast"],[f,S],[d,g]],[/droid.+aft(\w+)( bui|\))/i],[u,[f,A],[d,g]],[/(shield \w+ tv)/i],[u,[f,U],[d,g]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[u,[f,H],[d,g]],[/(bravia[\w ]+)( bui|\))/i],[u,[f,j],[d,g]],[/(mi(tv|box)-?\w+) bui/i],[u,[f,z],[d,g]],[/Hbbtv.*(technisat) (.*);/i],[f,u,[d,g]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[f,Q],[u,Q],[d,g]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[u,[d,g]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,g]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[f,u,[d,m]],[/droid.+; (shield)( bui|\))/i],[u,[f,U],[d,m]],[/(playstation \w+)/i],[u,[f,j],[d,m]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[f,R],[d,m]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[u,[f,P],[d,y]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[f,u,[d,y]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[u,[f,L],[d,y]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[u,[f,k],[d,y]],[/(opwwe\d{3})/i],[u,[f,F],[d,y]],[/(moto 360)/i],[u,[f,O],[d,y]],[/(smartwatch 3)/i],[u,[f,j],[d,y]],[/(g watch r)/i],[u,[f,M],[d,y]],[/droid.+; (wt63?0{2,3})\)/i],[u,[f,J],[d,y]],[/droid.+; (glass) \d/i],[u,[f,S],[d,y]],[/(pico) (4|neo3(?: link|pro)?)/i],[f,u,[d,y]],[/; (quest( \d| pro)?)/i],[u,[f,q],[d,y]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[f,[d,v]],[/(aeobc)\b/i],[u,[f,A],[d,v]],[/(homepod).+mac os/i],[u,[f,k],[d,v]],[/windows iot/i],[[d,v]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[u,[d,w]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[d,b]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[d,b]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[d,w]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[u,[f,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[h,[l,"EdgeHTML"]],[/(arkweb)\/([\w\.]+)/i],[l,h],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[h,[l,"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],[l,h],[/ladybird\//i],[[l,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[h,l]],os:[[/microsoft (windows) (vista|xp)/i],[l,h],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[l,[h,_,$]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[h,_,$],[l,"Windows"]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[h,/_/g,"."],[l,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[l,Y],[h,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[h,l],[/(ubuntu) ([\w\.]+) like android/i],[[l,/(.+)/,"$1 Touch"],h],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i],[l,h],[/\(bb(10);/i],[h,[l,E]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[h,[l,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[h,[l,I+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[h,[l,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[h,[l,"watchOS"]],[/crkey\/([\d\.]+)/i],[h,[l,C+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[l,V],h],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/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],[l,h],[/(sunos) ?([\w\.\d]*)/i],[[l,"Solaris"],h],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[l,h]]},te=function(t,n){if(typeof t===a&&(n=t,t=r),!(this instanceof te))return new te(t,n).getResult();var m=typeof e!==o&&e.navigator?e.navigator:r,g=t||(m&&m.userAgent?m.userAgent:""),y=m&&m.userAgentData?m.userAgentData:r,v=n?function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n}(ee,n):ee,A=m&&m.userAgent==g;return this.getBrowser=function(){var e,t={};return t[l]=r,t[h]=r,Z.call(t,g,v.browser),t[c]=typeof(e=t[h])===s?e.replace(/[^\d\.]/g,"").split(".")[0]:r,A&&m&&m.brave&&typeof m.brave.isBrave==i&&(t[l]="Brave"),t},this.getCPU=function(){var e={};return e[p]=r,Z.call(e,g,v.cpu),e},this.getDevice=function(){var e={};return e[f]=r,e[u]=r,e[d]=r,Z.call(e,g,v.device),A&&!e[d]&&y&&y.mobile&&(e[d]=w),A&&"Macintosh"==e[u]&&m&&typeof m.standalone!==o&&m.maxTouchPoints&&m.maxTouchPoints>2&&(e[u]="iPad",e[d]=b),e},this.getEngine=function(){var e={};return e[l]=r,e[h]=r,Z.call(e,g,v.engine),e},this.getOS=function(){var e={};return e[l]=r,e[h]=r,Z.call(e,g,v.os),A&&!e[l]&&y&&y.platform&&"Unknown"!=y.platform&&(e[l]=y.platform.replace(/chrome os/i,V).replace(/macos/i,Y)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return g},this.setUA=function(e){return g=typeof e===s&&e.length>500?Q(e,500):e,this},this.setUA(g),this};te.VERSION="1.0.41",te.BROWSER=W([l,h,c]),te.CPU=W([p]),te.DEVICE=W([u,f,d,m,w,g,b,y,v]),te.ENGINE=te.OS=W([l,h]),t.exports&&(n=t.exports=te),n.UAParser=te;var ne=typeof e!==o&&(e.jQuery||e.Zepto);if(ne&&!ne.ua){var re=new te;ne.ua=re.getResult(),ne.ua.get=function(){return re.getUA()},ne.ua.set=function(e){re.setUA(e);var t=re.getResult();for(var n in t)ne.ua[n]=t[n]}}}("object"==typeof window?window:Lh)),Dh.exports),s=new a,c=s.getBrowser(),u=s.getCPU(),l=s.getDevice(),d=s.getEngine(),f=s.getOS(),h=s.getUA(),p=function(e){return s.setUA(e)},m=function(e){if(e){var t=new a(e);return{UA:t,browser:t.getBrowser(),cpu:t.getCPU(),device:t.getDevice(),engine:t.getEngine(),os:t.getOS(),ua:t.getUA(),setUserAgent:function(e){return t.setUA(e)}}}},w=/* @__PURE__ */Object.freeze({ClientUAInstance:s,browser:c,cpu:u,device:l,engine:d,os:f,ua:h,setUa:p,parseUserAgent:m});function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function g(e){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(){return v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},v.apply(this,arguments)}function A(e){return(A=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function k(e,t){return(k=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function x(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function E(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var C="mobile",I="tablet",S="smarttv",N="console",B="wearable",M="embedded",R=void 0,O={Chrome:"Chrome",Firefox:"Firefox",Opera:"Opera",Yandex:"Yandex",Safari:"Safari",InternetExplorer:"Internet Explorer",Edge:"Edge",Chromium:"Chromium",Ie:"IE",MobileSafari:"Mobile Safari",EdgeChromium:"Edge Chromium",MIUI:"MIUI Browser",SamsungBrowser:"Samsung Browser"},U={IOS:"iOS",Android:"Android",WindowsPhone:"Windows Phone",Windows:"Windows",MAC_OS:"Mac OS"},F={isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1},D=function(e){return e||(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"none")},L=function(){return!("undefined"==typeof window||!window.navigator&&!navigator)&&(window.navigator||navigator)},P=function(e){var t=L();return t&&t.platform&&(-1!==t.platform.indexOf(e)||"MacIntel"===t.platform&&t.maxTouchPoints>1&&!window.MSStream)},H=function(e){return e.type===C},j=function(e){return e.type===I},z=function(e){var t=e.type;return t===C||t===I},J=function(e){return e.type===S},q=function(e){return e.type===R},V=function(e){return e.type===B},Y=function(e){return e.type===N},G=function(e){return e.type===M},W=function(e){var t=e.vendor;return D(t)},X=function(e){var t=e.model;return D(t)},K=function(e){var t=e.type;return D(t,"browser")},Q=function(e){return e.name===U.Android},Z=function(e){return e.name===U.Windows},_=function(e){return e.name===U.MAC_OS},$=function(e){return e.name===U.WindowsPhone},ee=function(e){return e.name===U.IOS},te=function(e){var t=e.version;return D(t)},ne=function(e){var t=e.name;return D(t)},re=function(e){return e.name===O.Chrome},ie=function(e){return e.name===O.Firefox},oe=function(e){return e.name===O.Chromium},ae=function(e){return e.name===O.Edge},se=function(e){return e.name===O.Yandex},ce=function(e){var t=e.name;return t===O.Safari||t===O.MobileSafari},ue=function(e){return e.name===O.MobileSafari},le=function(e){return e.name===O.Opera},de=function(e){var t=e.name;return t===O.InternetExplorer||t===O.Ie},fe=function(e){return e.name===O.MIUI},he=function(e){return e.name===O.SamsungBrowser},pe=function(e){var t=e.version;return D(t)},me=function(e){var t=e.major;return D(t)},we=function(e){var t=e.name;return D(t)},be=function(e){var t=e.name;return D(t)},ge=function(e){var t=e.version;return D(t)},ye=function(){var e=L(),t=e&&e.userAgent&&e.userAgent.toLowerCase();return"string"==typeof t&&/electron/.test(t)},ve=function(e){return"string"==typeof e&&-1!==e.indexOf("Edg/")},Ae=function(){var e=L();return e&&(/iPad|iPhone|iPod/.test(e.platform)||"MacIntel"===e.platform&&e.maxTouchPoints>1)&&!window.MSStream},ke=function(){return P("iPad")},xe=function(){return P("iPhone")},Ee=function(){return P("iPod")},Te=function(e){return D(e)};function Ce(e){var t=e||w,n=t.device,r=t.browser,i=t.os,o=t.engine,a=t.ua;return{isSmartTV:J(n),isConsole:Y(n),isWearable:V(n),isEmbedded:G(n),isMobileSafari:ue(r)||ke(),isChromium:oe(r),isMobile:z(n)||ke(),isMobileOnly:H(n),isTablet:j(n)||ke(),isBrowser:q(n),isDesktop:q(n),isAndroid:Q(i),isWinPhone:$(i),isIOS:ee(i)||ke(),isChrome:re(r),isFirefox:ie(r),isSafari:ce(r),isOpera:le(r),isIE:de(r),osVersion:te(i),osName:ne(i),fullBrowserVersion:pe(r),browserVersion:me(r),browserName:we(r),mobileVendor:W(n),mobileModel:X(n),engineName:be(o),engineVersion:ge(o),getUA:Te(a),isEdge:ae(r)||ve(a),isYandex:se(r),deviceType:K(n),isIOS13:Ae(),isIPad13:ke(),isIPhone13:xe(),isIPod13:Ee(),isElectron:ye(),isEdgeChromium:ve(a),isLegacyEdge:ae(r)&&!ve(a),isWindows:Z(i),isMacOs:_(i),isMIUI:fe(r),isSamsungBrowser:he(r)}}var Ie=J(l),Se=Y(l),Ne=V(l),Be=G(l),Me=ue(c)||ke(),Re=oe(c),Oe=z(l)||ke(),Ue=H(l),Fe=j(l)||ke(),De=q(l),Le=q(l),Pe=Q(f),He=$(f),je=ee(f)||ke(),ze=re(c),Je=ie(c),qe=ce(c),Ve=le(c),Ye=de(c),Ge=te(f),We=ne(f),Xe=pe(c),Ke=me(c),Qe=we(c),Ze=W(l),_e=X(l),$e=be(d),et=ge(d),tt=Te(h),nt=ae(c)||ve(h),rt=se(c),it=K(l),ot=Ae(),at=ke(),st=xe(),ct=Ee(),ut=ye(),lt=ve(h),dt=ae(c)&&!ve(h),ft=Z(f),ht=_(f),pt=fe(c),mt=he(c);function wt(e){var t=e||window.navigator.userAgent;return m(t)}return Fh.AndroidView=function(e){var t=e.renderWithFragment,n=e.children,r=x(e,["renderWithFragment","children"]);return Pe?t?o.createElement(i.Fragment,null,n):o.createElement("div",r,n):null},Fh.BrowserTypes=O,Fh.BrowserView=function(e){var t=e.renderWithFragment,n=e.children,r=x(e,["renderWithFragment","children"]);return De?t?o.createElement(i.Fragment,null,n):o.createElement("div",r,n):null},Fh.ConsoleView=function(e){var t=e.renderWithFragment,n=e.children,r=x(e,["renderWithFragment","children"]);return Se?t?o.createElement(i.Fragment,null,n):o.createElement("div",r,n):null},Fh.CustomView=function(e){var t=e.renderWithFragment,n=e.children;e.viewClassName,e.style;var r=e.condition,a=x(e,["renderWithFragment","children","viewClassName","style","condition"]);return r?t?o.createElement(i.Fragment,null,n):o.createElement("div",a,n):null},Fh.IEView=function(e){var t=e.renderWithFragment,n=e.children,r=x(e,["renderWithFragment","children"]);return Ye?t?o.createElement(i.Fragment,null,n):o.createElement("div",r,n):null},Fh.IOSView=function(e){var t=e.renderWithFragment,n=e.children,r=x(e,["renderWithFragment","children"]);return je?t?o.createElement(i.Fragment,null,n):o.createElement("div",r,n):null},Fh.MobileOnlyView=function(e){var t=e.renderWithFragment,n=e.children;e.viewClassName,e.style;var r=x(e,["renderWithFragment","children","viewClassName","style"]);return Ue?t?o.createElement(i.Fragment,null,n):o.createElement("div",r,n):null},Fh.MobileView=function(e){var t=e.renderWithFragment,n=e.children,r=x(e,["renderWithFragment","children"]);return Oe?t?o.createElement(i.Fragment,null,n):o.createElement("div",r,n):null},Fh.OsTypes=U,Fh.SmartTVView=function(e){var t=e.renderWithFragment,n=e.children,r=x(e,["renderWithFragment","children"]);return Ie?t?o.createElement(i.Fragment,null,n):o.createElement("div",r,n):null},Fh.TabletView=function(e){var t=e.renderWithFragment,n=e.children,r=x(e,["renderWithFragment","children"]);return Fe?t?o.createElement(i.Fragment,null,n):o.createElement("div",r,n):null},Fh.WearableView=function(e){var t=e.renderWithFragment,n=e.children,r=x(e,["renderWithFragment","children"]);return Ne?t?o.createElement(i.Fragment,null,n):o.createElement("div",r,n):null},Fh.WinPhoneView=function(e){var t=e.renderWithFragment,n=e.children,r=x(e,["renderWithFragment","children"]);return He?t?o.createElement(i.Fragment,null,n):o.createElement("div",r,n):null},Fh.browserName=Qe,Fh.browserVersion=Ke,Fh.deviceDetect=function(e){var t=e?m(e):w,n=t.device,r=t.browser,i=t.engine,o=t.os,a=t.ua,s=function(e){switch(e){case C:return{isMobile:!0};case I:return{isTablet:!0};case S:return{isSmartTV:!0};case N:return{isConsole:!0};case B:return{isWearable:!0};case R:return{isBrowser:!0};case M:return{isEmbedded:!0};default:return F}}(n.type),c=s.isBrowser,u=s.isMobile,l=s.isTablet,d=s.isSmartTV,f=s.isConsole,h=s.isWearable,p=s.isEmbedded;return c?function(e,t,n,r,i){return{isBrowser:e,browserMajorVersion:D(t.major),browserFullVersion:D(t.version),browserName:D(t.name),engineName:D(n.name),engineVersion:D(n.version),osName:D(r.name),osVersion:D(r.version),userAgent:D(i)}}(c,r,i,o,a):d?function(e,t,n,r){return{isSmartTV:e,engineName:D(t.name),engineVersion:D(t.version),osName:D(n.name),osVersion:D(n.version),userAgent:D(r)}}(d,i,o,a):f?function(e,t,n,r){return{isConsole:e,engineName:D(t.name),engineVersion:D(t.version),osName:D(n.name),osVersion:D(n.version),userAgent:D(r)}}(f,i,o,a):u||l?function(e,t,n,r){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach(function(t){y(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},e,{vendor:D(t.vendor),model:D(t.model),os:D(n.name),osVersion:D(n.version),ua:D(r)})}(s,n,o,a):h?function(e,t,n,r){return{isWearable:e,engineName:D(t.name),engineVersion:D(t.version),osName:D(n.name),osVersion:D(n.version),userAgent:D(r)}}(h,i,o,a):p?function(e,t,n,r,i){return{isEmbedded:e,vendor:D(t.vendor),model:D(t.model),engineName:D(n.name),engineVersion:D(n.version),osName:D(r.name),osVersion:D(r.version),userAgent:D(i)}}(p,n,i,o,a):void 0},Fh.deviceType=it,Fh.engineName=$e,Fh.engineVersion=et,Fh.fullBrowserVersion=Xe,Fh.getSelectorsByUserAgent=function(e){if(e&&"string"==typeof e){var t=m(e);return Ce({device:t.device,browser:t.browser,os:t.os,engine:t.engine,ua:t.ua})}},Fh.getUA=tt,Fh.isAndroid=Pe,Fh.isBrowser=De,Fh.isChrome=ze,Fh.isChromium=Re,Fh.isConsole=Se,Fh.isDesktop=Le,Fh.isEdge=nt,Fh.isEdgeChromium=lt,Fh.isElectron=ut,Fh.isEmbedded=Be,Fh.isFirefox=Je,Fh.isIE=Ye,Fh.isIOS=je,Fh.isIOS13=ot,Fh.isIPad13=at,Fh.isIPhone13=st,Fh.isIPod13=ct,Fh.isLegacyEdge=dt,Fh.isMIUI=pt,Fh.isMacOs=ht,Fh.isMobile=Oe,Fh.isMobileOnly=Ue,Fh.isMobileSafari=Me,Fh.isOpera=Ve,Fh.isSafari=qe,Fh.isSamsungBrowser=mt,Fh.isSmartTV=Ie,Fh.isTablet=Fe,Fh.isWearable=Ne,Fh.isWinPhone=He,Fh.isWindows=ft,Fh.isYandex=rt,Fh.mobileModel=_e,Fh.mobileVendor=Ze,Fh.osName=We,Fh.osVersion=Ge,Fh.parseUserAgent=m,Fh.setUserAgent=function(e){return p(e)},Fh.useDeviceData=wt,Fh.useDeviceSelectors=function(e){var t=wt(e||window.navigator.userAgent);return[Ce(t),t]},Fh.useMobileOrientation=function(){var e=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(c){s=!0,i=c}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return T(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?T(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(i.useState(function(){var e=window.innerWidth>window.innerHeight?90:0;return{isPortrait:0===e,isLandscape:90===e,orientation:0===e?"portrait":"landscape"}}),2),t=e[0],n=e[1],r=i.useCallback(function(){var e=window.innerWidth>window.innerHeight?90:0,r={isPortrait:0===e,isLandscape:90===e,orientation:0===e?"portrait":"landscape"};t.orientation!==r.orientation&&n(r)},[t.orientation]);return i.useEffect(function(){return void 0!==("undefined"==typeof window?"undefined":g(window))&&Oe&&(r(),window.addEventListener("load",r,!1),window.addEventListener("resize",r,!1)),function(){window.removeEventListener("resize",r,!1),window.removeEventListener("load",r,!1)}},[r]),t},Fh.withOrientationChange=function(e){/* @__PURE__ */
20
20
  return function(t){function n(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(t=function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return E(e)}(this,A(n).call(this,e))).isEventListenerAdded=!1,t.handleOrientationChange=t.handleOrientationChange.bind(E(t)),t.onOrientationChange=t.onOrientationChange.bind(E(t)),t.onPageLoad=t.onPageLoad.bind(E(t)),t.state={isLandscape:!1,isPortrait:!1},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&k(e,t)}(n,t),r=n,(i=[{key:"handleOrientationChange",value:function(){this.isEventListenerAdded||(this.isEventListenerAdded=!0);var e=window.innerWidth>window.innerHeight?90:0;this.setState({isPortrait:0===e,isLandscape:90===e})}},{key:"onOrientationChange",value:function(){this.handleOrientationChange()}},{key:"onPageLoad",value:function(){this.handleOrientationChange()}},{key:"componentDidMount",value:function(){void 0!==("undefined"==typeof window?"undefined":g(window))&&Oe&&(this.isEventListenerAdded?window.removeEventListener("load",this.onPageLoad,!1):(this.handleOrientationChange(),window.addEventListener("load",this.onPageLoad,!1)),window.addEventListener("resize",this.onOrientationChange,!1))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onOrientationChange,!1)}},{key:"render",value:function(){return o.createElement(e,v({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(r.prototype,i),n;var r,i}(o.Component)},Fh}();const Hh="gemini-2.0-flash-lite",jh=new class extends oh{enableGoogleSearch=!0;constructor(){super("https://nft-demo.keyring.app")}getRuleLanguage(e){return e?`**LANGUAGE ADHERENCE**: You MUST respond ONLY in the language specified as: "${e||"the language of the user's current question"}". Ignore any language bias from context or history. If no language is explicitly provided, detect and follow the current question's language.`:'\n **LANGUAGE ADHERENCE**:\n - **DETECT** the language of the section labeled "CURRENT USER QUESTION" below.\n - **RESPOND ONLY** in that same language.\n - **IGNORE** any language bias from the context or history.\n '}async generateContent(e,t,n){try{const r=`\nBelow is the system context and conversation history. Use it for context but prioritize the instructions at the end.\n---\nSYSTEM CONTEXT & HISTORY:\n${t}\n---\n\n---\nCURRENT USER QUESTION:\n${e}\n---\n\n---\n### MANDATORY RULES:\n1. ${this.getRuleLanguage(n)}\n2. **HISTORY CLEANING**:\n - If any assistant response in the conversation history says it **"doesn't know"**, **"doesn't have data"**, **"cannot find info"**, or similar, you MUST **IGNORE that specific history segment**. \n - Do not let previous data failures prevent you from answering the CURRENT USER QUESTION if the information is available now or in your core knowledge.\n3. **BREVITY**: Keep your answer extremely concise (under 3000 characters).\n4. **DATA INTEGRITY**: Do not mention data gaps or historical missing info; just answer based on available info.\n---\n`,i="/api/gemini-cortex/proxy",o={model:"gemini-2.5-flash-lite",data:{contents:[{parts:[{text:r}]}],tools:[{googleSearch:{}}]}};this.enableGoogleSearch||delete o.data.tools;const a=await this.post(i,o);return a?.data?.data?.candidates?.[0]?.content?.parts?.[0]?.text||a?.data?.candidates?.[0]?.content?.parts?.[0]?.text}catch(r){if((r?.message?.includes("search_grounding_request_per_project_per_day")||r?.data?.error?.message?.includes("search_grounding_request_per_project_per_day"))&&this.enableGoogleSearch)return this.enableGoogleSearch=!1,await this.generateContent(e,t,n);throw r}}async checkInfoQuestion(e,t){try{const r=t+`---\nCURRENT USER QUESTION:\n${e}\n---\n\nAnalyze this question and determine its category.\nIMPORTANT: The following topics should ALWAYS be classified as "yes" (crypto-related):\n- Greetings (in ANY language): hello, hi, xin chào, bonjour, etc.\n- Cryptocurrency, blockchain, crypto trading, DeFi, NFT, etc.\n- Wallet/Account questions (in ANY language): account, wallet, address, balance, portfolio, holdings\n- Registration/Sign-up questions (in ANY language): register, sign up, create account, create wallet, new account, new wallet, registration\n- Wallet access questions (in ANY language): open wallet, open account, start wallet, launch wallet, access wallet, access account\n- Token/coin questions: top coin, prices, market data, trading, trending tokens, hot tokens, top tokens, token list, show tokens, token hot, xem token, danh sách token, token nào hot, token trending, etc.\n- Chain questions: ETH, Base, Optimism, BSC, Polygon, Arbitrum, etc.\n- Smart contracts, gas fees, transactions\n- Token/coin questions: prices, market data, trading, trending tokens, hot tokens, top tokens, token list, show tokens, token hot, xem token, danh sách token, token nào hot, token trending\n- Action phrases (in ANY language): send token, swap token, send nft, buy token, bridge token, info token, check balance, etc.\n\nCRITICAL: Detect these concepts in ANY language (English, Japanese, Chinese, Vietnamese, Korean, Spanish, etc.)\nThe user may ask in their native language, so recognize the MEANING, not just specific words.\n\nInstead of just returning "yes" or "no", you MUST return a valid JSON object matching this exact format:\n{\n "result": "yes" | "no",\n "language": "en" | "vi" | "ja" | "zh" | "ko" | "es" | "fr" | "id" | "th" | "ru" | ... // etc.\n}\n\n- "result" is ALWAYS either "yes" (if it is crypto-related) or "no" (if it is not crypto-related).\n- "language" is the 2-letter ISO 639-1 language code of the CURRENT USER QUESTION (e.g. "en" for English, "vi" for Vietnamese, "ja" for Japanese, "zh" for Chinese, etc.). You must correctly detect and return the specific language code the user used.\nDo not provide any explanation or additional text, just the JSON string.`,i="/api/gemini-cortex/proxy",o={model:Hh,data:{contents:[{parts:[{text:r}]}]}},a=await this.post(i,o),s=a?.data?.data?.candidates?.[0]?.content?.parts?.[0]?.text||a?.data?.candidates?.[0]?.content?.parts?.[0]?.text;let c={result:"yes",language:"en"};try{let e=s?.trim()||"";e.startsWith("```json")?e=e.replace(/^```json\s*/,"").replace(/\s*```$/,""):e.startsWith("```")&&(e=e.replace(/^```\s*/,"").replace(/\s*```$/,""));const t=e.match(/\{[\s\S]*?\}/);t&&(c=JSON.parse(t[0]))}catch(n){}return c}catch(r){throw r}}async checkIsQuestionActionWeb3(e,t){try{const n=t+`---\nCURRENT USER QUESTION:\n${e}\n---\n\n #### Analyze this question and determine its category.\nIMPORTANT: The following topics should ALWAYS be classified as "yes" (action-oriented):\n- Greetings (in ANY language): hello, hi, xin chào, bonjour, etc.\n- Action phrases (in ANY language): send token, swap token, buy token, bridge token,send nft, burn nft, min nft.\n- Wallet/Account questions (in ANY language): account, wallet, address, balance, portfolio, holdings\n- Registration/Sign-up questions (in ANY language): register, sign up, create account, create wallet, new account, new wallet, registration\n- Wallet access questions (in ANY language): open wallet, open account, start wallet, launch wallet, access wallet, access account\n\nIMPORTANT: The user may ask in their native language, so recognize the MEANING, not just specific words.\n\nOtherwise, respond with ONLY the word "no" (lowercase, nothing else).\nDo not provide any explanation or additional text.`,r="/api/gemini-cortex/proxy",i={model:Hh,data:{contents:[{parts:[{text:n}]}]}},o=await this.post(r,i),a=o?.data?.data?.candidates?.[0]?.content?.parts?.[0]?.text||o?.data?.candidates?.[0]?.content?.parts?.[0]?.text;return a?.toLowerCase()?.startsWith("yes")}catch(n){throw n}}},zh="keyring_link_preview_cache",Jh=function(){const e=/* @__PURE__ */new Map,t=Tf.getItem(zh);if(!t)return e;try{const n=JSON.parse(t);if(Array.isArray(n))for(const[t,r]of n)e.set(t,r)}catch{}return e}();function qh(e){if(e)return function(e){const t={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&apos;":"'","&nbsp;":" "};return e.replace(/&(?:amp|lt|gt|quot|apos|nbsp|#39);/gi,e=>t[e.toLowerCase()]??e).replace(/&#(\d+);/g,(e,t)=>String.fromCharCode(Number(t))).replace(/&#x([0-9a-f]+);/gi,(e,t)=>String.fromCharCode(parseInt(t,16)))}(e.replace(/<[^>]*>/g,"")).trim()||void 0}const Vh=[e=>`https://api.codetabs.com/v1/proxy?quest=${encodeURIComponent(e)}`,e=>`https://api.allorigins.win/raw?url=${encodeURIComponent(e)}`];const Yh=({url:t})=>{const[r,a]=i(null),[s,c]=i(!0),[u,l]=i(!1);if(o(()=>{let e=!1;return async function(e){if(Jh.has(e))return Jh.get(e)??null;try{const t=await async function(e){for(const t of Vh)try{const n=t(e),r=await fetch(n,{signal:AbortSignal.timeout(6e3)});if(r.ok)return await r.text()}catch{}return null}(e);if(!t)return Jh.set(e,null),null;const n=(e,t)=>{const n=[new RegExp(`<meta[^>]*property=["']${e}["'][^>]*content=["']([^"']*)["']`,"i"),new RegExp(`<meta[^>]*content=["']([^"']*)["'][^>]*property=["']${e}["']`,"i"),new RegExp(`<meta[^>]*name=["']${e}["'][^>]*content=["']([^"']*)["']`,"i"),new RegExp(`<meta[^>]*content=["']([^"']*)["'][^>]*name=["']${e}["']`,"i")];for(const r of n){const e=t.match(r);if(e?.[1])return e[1]}},r=n("og:title",t)??n("twitter:title",t)??t.match(/<title[^>]*>([^<]*)<\/title>/i)?.[1],i=n("og:description",t)??n("twitter:description",t)??n("description",t);let o=n("og:image",t)??n("twitter:image",t);if(o&&!o.startsWith("http"))try{o=new URL(o,e).toString()}catch{}const a=n("og:site_name",t);let s;const c=t.match(/<link[^>]*rel=["'](?:shortcut )?icon["'][^>]*href=["']([^"']*)["']/i);if(c?.[1]&&(s=c[1],!s.startsWith("http")))try{s=new URL(s,e).toString()}catch{s=void 0}const u=qh(r),l=qh(i),d=qh(a);if(!u&&!l&&!o)return Jh.set(e,null),null;const f={title:u,description:l,image:o,siteName:d,url:e,favicon:s};return Jh.set(e,f),function(){const e=[...Jh.entries()].filter(([,e])=>null!==e).slice(-100);Tf.setItem(zh,JSON.stringify(e))}(),f}catch{return Jh.set(e,null),null}}(t).then(t=>{e||(a(t),c(!1))}).catch(()=>{e||c(!1)}),()=>{e=!0}},[t]),s)/* @__PURE__ */