1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,533418,e=>{"use strict";var t=e.i(271645);let r=({size:e=24,color:r="currentColor",...n})=>t.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:r,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},t.createElement("path",{d:"M22 8.5H2m0 4h3.547c.54 0 .81 0 1.071.047.232.04.458.11.674.204.243.106.468.256.917.555l.582.388c.45.3.674.45.917.555.216.095.442.163.674.204.261.047.531.047 1.071.047h1.094c.54 0 .81 0 1.071-.047.232-.04.458-.11.674-.204.243-.106.468-.256.917-.555l.582-.388c.45-.3.674-.45.917-.555.216-.095.442-.163.674-.204.261-.047.531-.047 1.071-.047H22M2 7.2v9.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C3.52 20 4.08 20 5.2 20h13.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C22 18.48 22 17.92 22 16.8V7.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C20.48 4 19.92 4 18.8 4H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 5.52 2 6.08 2 7.2Z"}));r.displayName="Wallet01",e.s(["Wallet01",0,r])},170149,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(949379),a=e.i(681307),o=e.i(653533);let l=e=>"taostats"===e||"taostats-dev"===e||"taostats-internal"===e,s="wallet-auto-enable-extensions",i="wallet-auto-enable-migrated",c=a.z.array(a.z.string()),u=new Map,d=()=>{let e=window?.injectedWeb3;return e?Object.entries(e).filter(([,e])=>!!(e.connect||e.enable)).map(([e,t])=>({name:e,version:t.version??"unknown"})).sort((e,t)=>e.name.localeCompare(t.name)):[]},m=()=>{if("u"<typeof localStorage)return[];let e=localStorage.getItem(s);if(!e)return[];try{let t=c.safeParse(JSON.parse(e));return t.success?t.data:[]}catch{return[]}},p=e=>{let t=[...new Set(e)];localStorage.setItem(s,JSON.stringify(t))}
1,h=e=>{let t=m();t.includes(e)&&p(t.filter(t=>t!==e))},f=(e,t)=>t.filter(e=>!e.address.startsWith("0x")).map(t=>({address:t.address,type:t.type,meta:{name:t.name??"unknown",source:e}})),g=e=>{u.delete(e)},x=async(e,t)=>{try{return await t.accounts.get(),!0}catch{return g(e),!1}},v=async(e,t=o.DAPP_NAME)=>{let r=u.get(e);if(r&&await x(e,r))return r;let n=window?.injectedWeb3?.[e];if(!n?.connect&&!n?.enable)throw Error(`Extension "${e}" is not available`);try{let r,a;if(n.connect)r=await n.connect(t);else if(n.enable)r=await n.enable(t);else throw Error(`Extension "${e}" is not available`);if(u.set(e,r),!await x(e,r))throw Error(`Extension "${e}" is not authorized for this site`);return(a=m()).includes(e)||p([...a,e]),r}catch(t){throw g(e),t instanceof Error&&"Rejected"===t.message&&h(e),t}},y=async(e,t,r=o.DAPP_NAME)=>{let n=await v(e,r);return n.accounts.subscribe?n.accounts.subscribe(r=>{t(f(e,r))}):()=>void 0},w=async(e,t=o.DAPP_NAME)=>{let r=await v(e,t);return f(e,await r.accounts.get())},C=async(e,t=o.DAPP_NAME)=>{let r=await Promise.all(e.map(async e=>{try{return await w(e,t)}catch{return[]}})),n=new Set;return r.flat().filter(e=>{let t=`${e.meta.source}:${e.address.toLowerCase()}`;return!n.has(t)&&(n.add(t),!0)})},b=async(e,t=o.DAPP_NAME)=>(await v(e,t)).signer,E=(0,r.createContext)(void 0),N={keyringState:null,accounts:[],currentAccount:null,currentSigner:void 0},S=(e,t)=>{let r=e.currentAccount,a=null!==r&&t.some(e=>e.address===r.address&&e.meta.source===r.meta.source);return r&&!a&&((0,n.clearLastConnectedFromLocalStorage)(),r.meta.source&&g(r.meta.source)),{...e,accounts:(e=>{let t=[],r=[];for(let n of e)l(n.meta.source)?t.push(n):r.push(n);return[...t,...r]})(t),keyringState:"READY",currentAccount:a?r:null,currentSigner:a?e.currentSigner:void 0}},k=(e,t)=>{switch(t.type){case"LOAD_KEYRING":return{...e,keyringState:"LOADING"};case"KEYRING_ERROR":return{...e,keyringState:"ERROR"};case"KEYRING_ERROR_NO_EXTENSIONS":return{...e,keyringState:"ERROR_NO_EXTENSIONS"};case"SET_CURRENT_ACCOUNT":return{...e,currentAccount:t.payload};case"SET_CURRENT_SIGNER":return{...e,currentSigner:t.payload};case"SET_ACCOUNTS":return S(e,t.payload);case"MERGE_ACCOUNTS_BY_SOURCE":{let{source:r,accounts:n}=t.payload;return S(e,((e,t,r)=>{let n=[],a=!1;for(let o of e){if(o.meta.source!==t){n.push(o);continue}a||(n.push(...r),a=!0)}return a||n.push(...r),n})(e.accounts,r,n))}case"DISCONNECT":return(0,n.clearLastConnectedFromLocalStorage)(),{...e,currentAccount:null,currentSigner:void 0};case"FORGET_EXTENSION":{let{source:r}=t.payload,n=e.accounts.filter(e=>e.meta.source!==r);return S(e,n)}case"RESET":return N;default:throw Error(`Unknown type from action: ${JSON.stringify(t)}`)}},T=({children:e})=>{let[a,o]=(0,r.useReducer)(k,N),[l,s]=(0,r.useState)([]),[c,u]=(0,r.useState)([]),[f,x]=(0,r.useState)(!1),[w,S]=(0,r.useState)(null),[T,j]=(0,r.useState)(!1),A=(0,r.useRef)(!1),R=(0,r.useCallback)(()=>{var e;let t,r,a,o=d(),l=((()=>{if("u"<typeof localStorage||"true"===localStorage.getItem(i)||(localStorage.setItem(i,"true"),m().length>0))return;let e=(0,n.getLastConnectedFromLocalStorage)();e?.source&&p([e.source])})(),t=d().map(e=>e.name),e=m(),r=new Set(t),p(a=e.filter(e=>r.has(e))),a);return s(o),u(l),{detected:o,allowlist:l}},[]),_=(0,r.useCallback)(async e=>{if(!e.length)return o({type:"SET_ACCOUNTS",payload:[]}),[];o({type:"LOAD_KEYRING"});let t=await C(e);return o({type:"SET_ACCOUNTS",payload:t}),t},[]),I=(0,r.useCallback)(async()=>{x(!0);try{let{allowlist:e}=R();await _(e),R()}catch{o({type:"KEYRING_ERROR"})}finally{x(!1)}},[_,R]),L=(0,r.useCallback)(async e=>{S(e);try{await v(e);let{allowlist:t}=R();await _(t)}catch{R()}finally{S(null)}},[_,R]),O=(0,r.useCallback)(()=>{I()},[I]);(0,r.useEffect)(()=>{let{detected:e}=R();e.length||o({type:"KEYRING_ERROR_NO_EXTENSIONS"}),j(!!(0,n.getLastConnectedFromLocalStorage)())},[R]),(0,r.useEffect)(()=>{if(!T||A.current)return;let e=(0,n.getLastConnectedFromLocalStorage)();e&&(A.current=!0,(async()=>{o({type:"LOAD_KEYRING"});try{let t,r,{allowlist:a}=R();if(!a.includes(e.source)){o({type:"SET_CURRENT_ACCOUNT",payload:null}),o({type:"SET_ACCOUNTS",payload:[]});return}let l=await C(a);o({type:"SET_ACCOUNTS",payload:l});let s=(t=e.address,r=e.source,l.find(e=>e.address===t&&(void 0===r||e.meta.source===r)));s?o({type:"SET_CURRENT_ACCOUNT",payload:s}):((0,n.clearLastConnectedFromLocalStorage)(),o({type:"SET_CURRENT_ACCOUNT",payload:null}))}catch{o({type:"KEYRING_ERROR"})}})())},[R,T]),(0,r.useEffect)(()=>{(async()=>{let e=a.currentAccount;if(e)try{let t=await b(e.meta.source);o({type:"SET_CURRENT_SIGNER",payload:t})}catch{(0,n.clearLastConnectedFromLocalStorage)(),e.meta.source&&g(e.meta.source),o({type:"DISCONNECT"})}})()},[a.currentAccount]),(0,r.useEffect)(()=>{let e,t=a.currentAccount;if(!t?.meta.source)return;let r=!1;return(async()=>{try{let n=await y(t.meta.source,e=>{o({type:"MERGE_ACCOUNTS_BY_SOURCE",payload:{source:t.meta.source,accounts:e}})});if(r)return void n();e=n}catch{r||((0,n.clearLastConnectedFromLocalStorage)(),g(t.meta.source),o({type:"DISCONNECT"}))}})(),()=>{r=!0,e?.()}},[a.currentAccount]);let P="LOADING"===a.keyringState||f||null!==w||T&&!A.current&&null===a.keyringState,{isError:D,errorType:F}=(0,n.useErrorState)(a),M=(0,r.useMemo)(()=>{let e;return e=new Set(c),l.filter(t=>!e.has(t.name))},[c,l]),B=(0,r.useMemo)(()=>{let e;return e=new Set(c),l.filter(t=>e.has(t.name))},[c,l]),U=(0,r.useCallback)(e=>{h(e),g(e),o({type:"FORGET_EXTENSION",payload:{source:e}}),R()},[R]),z=(0,r.useMemo)(()=>({state:a,connectWallet:O,setCurrentAccount:function(e){(0,n.setLastConnectedInLocalStorage)({address:e.address||"",source:e.meta.source||""}),o({type:"SET_CURRENT_ACCOUNT",payload:e})},disconnectWallet:()=>{(0,n.disconnect)(o),R(),I()},detectedExtensions:l,enabledExtensions:B,extensionsPendingEnable:M,enableExtension:L,forgetExtension:U,refreshAccounts:I,isRefreshingAccounts:f,enablingExtension:w,isLoading:P,isError:D,isConnected:!!a.currentAccount,errorType:D?F:null}),[a,O,l,L,B,w,F,M,U,D,P,f,I,R]);return(0,t.jsx)(E.Provider,{value:z,children:e})},j=()=>{let e=(0,r.useContext)(E);if(void 0===e)throw Error("useChainAndWalletContext must be used within a ChainAndWalletContextProvider");return e};e.s(["BrowserDappContextProvider",0,T,"default",0,{BrowserDappContextProvider:T,useChainAndWalletContext:j},"useChainAndWalletContext",0,j],170149)},949379,e=>{"use strict";var t=e.i(681307),r=e.i(502752),n=e.i(620291),a=e.i(653533);let o=t.z.object({address:t.z.string(),source:t.z.string()}),l=e=>{(0,n.log)(`Error in ${e.section}::${e.name}: ${e.docs}`)},s=e=>({section:"Unknown",name:"Unknown",docs:e??"An unknown error occurred"});e.s(["clearLastConnectedFromLocalStorage",0,()=>{localStorage.removeItem(a.LOCAL_STORAGE_LAST_CONNECTED_ACCOUNT)},"disconnect",0,e=>{e({type:"DISCONNECT"})},"formatDecodedChainErrorForUser",0,function(e){return e?"StakeRateLimitExceeded"===e.name?a.RATE_LIMIT_ERROR_MESSAGE:e.docs||`${e.section}.${e.name}`:"Transaction failed on chain"},"getLastConnectedFromLocalStorage",0,()=>{let e,t=localStorage.getItem(a.LOCAL_STORAGE_LAST_CONNECTED_ACCOUNT);if(!t)return null;try{e=JSON.parse(t)}catch{return null}let r=o.safeParse(e);return r.success?r.data:null},"setLastConnectedInLocalStorage",0,e=>{localStorage.setItem(a.LOCAL_STORAGE_LAST_CONNECTED_ACCOUNT,JSON.stringify(e))},"useErrorState",0,e=>({isError:"ERROR"===e.keyringState||"ERROR_NO_EXTENSIONS"===e.keyringState,errorType:"ERROR_NO_EXTENSIONS"===e.keyringState?"noExtensions":"ERROR"===e.keyringState?"walletError":null}),"useTransactionErrorDecoder",0,e=>{let t=t=>{var r;let n;return l(n={section:(r=e?.registry.findMetaError(t)).section,name:r.name,docs:r.docs.join(" ")}),n},n=e=>{let t=e.toLowerCase().trim();return t.includes("custom error: 0")?"Your coldkey is set to be swapped. No transfer operations are possible.":t.includes("custom error: 1")?`The amount you are staking/unstaking/moving is below the minimum allowed threshold of ${r.TAO_CURRENCY}${a.MIN_STAKING_AMOUNT_TAO}`:t.includes("custom error: 2")?"You are trying to stake more than you have available. This could be due to a price change. Please reset and try again.":t.includes("custom error: 3")?"This subnet does not exist.":t.includes("custom error: 4")?"Hotkey is not registered on Bittensor network.":t.includes("custom error: 5")?"You do not have enough TAO equivalent stake to remove/move/transfer, including the unstake fee.":t.includes("custom error: 6")?"Rate limit exceeded. Please try again later.":t.includes("custom error: 7")?"You do not have enough TAO equivalent stake to remove/move/transfer, including the unstake fee.":t.includes("custom error: 8")?"The slippage is higher than you have set the limit at. Either increase your slippage, or decrease the amount.":t.includes("custom error: 9")?"This subnet does not allow stake transfer.":t.includes("custom error: 10")?"The hotkey is not registered in the selected subnet.":e};return{decodeExtrinsicFailedEvent:e=>{try{if(e.isModule)return t(e.asModule);return console.error("dispatchError is not a module. Returning string error: ",e.toString()),s(`An unknown error occurred: ${e.toString()}`)}catch(t){return console.error("Error decoding dispatchError:",{dispatchError:e,error:t}),s("An unknown error occurred while decoding dispatchError")}},decodeError:e=>{if(e?.message==="Cancelled"||e?.message==="Rejected by user")return{section:"Cancelled",name:"Cancelled",docs:"The transaction was cancelled"};try{if(e?.message)return{section:"General",name:"General",docs:n(e.message)};if(e?.data)return{section:e?.name??"Unknown",name:e?.name??"Unknown",docs:n(e.data)};let{error:r,index:a}=e.value;if(!r||!a)return console.error("Invalid errorData:",e,r,a),s();let o=new Uint8Array([a,parseInt(r.slice(2,4),16)]);return t(o)}catch(t){if(e?.data)return{section:e?.name??"Unknown",name:e?.name??"Unknown",docs:n(e.data)};return console.error("Error decoding errorData:",{errorData:e,error:t}),s()}}}}])},494235,e=>{"use strict";var t=e.i(271645),r=e.i(828073),n=e.i(681307),a=e.i(620291),o=e.i(949379);let l=n.z.object({success:n.z.literal(!0),txHash:n.z.string().optional()}),s=n.z.object({success:n.z.literal(!1),error:n.z.string()}),i=n.z.union([l,s]);e.s(["useTransactionSubmitter",0,(e,n,l)=>{var s;let{api:c,currentAccount:u,signerOrKeyringPair:d}=e,{fetchInfo:m}=n,{decodeExtrinsicFailedEvent:p,decodeError:h}=(0,o.useTransactionErrorDecoder)(c),f=(s=l?.trackEvent)?s:()=>void 0,[g,x]=(0,t.useState)(!1),[v,y]=(0,t.useState)(null),w=(e,t)=>{y(r=>null===e?null:r?.status!=="Error"?((e,t="")=>({status:e,message:t}))(e,t):r)},C=async(e,{doFullRefetchOnSuccess:t=!0,onSuccessCallback:r,onErrorCallback:n,waitForFinalised:l=!1},s)=>{let{status:i,events:c,dispatchError:u}=e;w(i.type);let d=async e=>{"error"!==s.outcome&&(s.outcome="success",w("Success"),t&&await m(),r&&r(e))},h=async()=>{for(let e of c)(0,a.log)("ð",i.isInBlock?"isInBlock":i.isFinalized?"isFinalized":i.type,{e,method:e.event.method,human:e.toHuman()});let t=c.find(e=>"ExtrinsicSuccess"===e.event.method);if(void 0!==c.find(e=>"ExtrinsicFailed"===e.event.method)){s.outcome="error";let e="Transaction failed";if(u){let t=p(u);w("Error",e=(0,o.formatDecodedChainErrorForUser)(t)),f("submit_tx_error",{errorMessage:e})}else w("Error",e),f("submit_tx_error",{errorMessage:"No dispatchError received"});n?.(e),x(!1)}else if(void 0!==t){s.terminalHandlerInProgress=!0;try{await d((e=>{let t={};e.txHash&&(t.txHash=e.txHash.toString());let{status:r}=e;return r.isInBlock?t.blockHash=r.asInBlock.toString():r.isFinalized&&(t.blockHash=r.asFinalized.toString()),t})(e))}finally{s.terminalHandlerInProgress=!1,x(!1)}}};!l&&i.isInBlock&&await h(),i.isFinalized&&((0,a.log)("â
isFinalized"),"pending"===s.outcome&&((0,a.log)("ð outcome pending, re-running statusReceivedLogic"),await h()),s.terminalHandlerInProgress||x(!1))},b=async e=>({addressOrPair:"function"==typeof d?await d():e,signer:"function"==typeof d?void 0:d}),E=async(e,t,r="",n="/api/mevshield/submit",a)=>{x(!0);try{let o,l=r.replace(/\/$/,""),s=n.startsWith("/")?n:`/${n}`,c=`${l}${s}`,u={signedInnerTxHex:e};a?.backendConfig&&(u.config=a.backendConfig);let d=await fetch(c,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(u)});try{o=await d.json()}catch{return w("Error","Invalid response from server"),f("submit_tx_error",{errorMessage:"Invalid response"}),{type:"error",error:"Invalid response from server"}}let p=i.safeParse(o);if(!p.success){let e=`Invalid response format: ${p.error.message}`;return w("Error",e),f("submit_tx_error",{errorMessage:e}
1),{type:"error",error:e}}let h=p.data;if(!d.ok||!h.success){let e=h.success?"Failed to submit MEV shield transaction":h.error;return w("Error",e),f("submit_tx_error",{errorMessage:e}),{type:"error",error:e}}return t.afterSuccess&&(w("AwaitingVerification","Transaction submitted, awaiting verification"),await t.afterSuccess()),w("Success"),t.doFullRefetchOnSuccess&&await m(),t.onSuccessCallback&&t.onSuccessCallback({txHash:h.txHash}),{type:"success",message:"Transaction submitted"}}catch(t){let e=t instanceof Error?t.message:"An unknown error occurred";return w("Error",e),f("submit_tx_error",{errorMessage:e}),{type:"error",error:e}}finally{x(!1)}},N=async(e,t)=>{if(!e)return{type:"error",error:"Could not build transaction to submit"};if(!u)return{type:"error",error:"No current account"};if(w(null),x(!0),!c)return{type:"error",error:"No API found"};let{addressOrPair:r,signer:n}=await b(u.address);t.shouldDelayForPolkadotJs&&await new Promise(e=>{setTimeout(e,3e3)});let a={signer:n,withSignedTransaction:!0,..."mevShield"===e.method.section&&"submitEncrypted"===e.method.method?{era:8}:{}},l={outcome:"pending",terminalHandlerInProgress:!1},s=await e.signAndSend(r,a,e=>C(e,t,l)).then(()=>null).catch(e=>(e=>{try{let t=h(e);if("Cancelled"===t.name)return f("submit_tx_cancelled"),x(!1),{cancelled:!0,errorMessage:"Cancelled"};x(!1);let r=(0,o.formatDecodedChainErrorForUser)(t);return f("submit_tx_error",{errorMessage:r}),w("Error",r),{cancelled:!1,errorMessage:r}}catch(t){console.error("Error handling transaction error:",t),x(!1);let e="An unexpected error occurred while processing the transaction error.";return w("Error",e),f("submit_tx_error_unknown"),{cancelled:!1,errorMessage:e}}})(e));return s?{type:"error",error:s.errorMessage}:{type:"success",message:"Transaction submitted"}};return{calculateTransactionFee:(0,t.useCallback)(async e=>{if(!u)return{type:"error",error:"No current account found. Can not calculate transaction fee."};try{let t=(await e.paymentInfo(u.address)).partialFee.toString(),n=(0,r.BigNumber)(t).shiftedBy(-9).toNumber();return{type:"success",feeInTao:n}}catch(e){return console.error("Error calculating transaction fee:",e),{type:"error",error:"Error calculating transaction fee"}}},[u]),submitTx:N,submitMevShieldViaApi:E,isPending:g,txStatus:v,resetTxState:()=>{w(null),x(!1)},getSigners:b,setAwaitingStatus:e=>{w("AwaitingVerification",e),x(!0)},setPending:e=>{x(e)}}}])},385089,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(912598),a=e.i(828073),o=e.i(392818),l=e.i(620291),s=e.i(465526),i=e.i(157555);a.BigNumber.config({EXPONENTIAL_AT:1e9});let c=(e,t)=>{switch(t.type){case"LOAD":return{...e,loading:!0};case"SET_BALANCE":return{...e,availableBalance:t.payload.availableBalance,reservedBalance:t.payload.reservedBalance};case"SET_PROXIES":return{...e,proxies:t.payload};case"FINISH":return{...e,delegateBalances:t.payload,loading:!1,hasFetched:!0,fetchFailed:!!t.failed};case"FAIL":return{...e,loading:!1,fetchFailed:!0};case"DISCONNECT":return o.initialState;default:throw Error(`Unknown type in account context: ${JSON.stringify(t)}`)}},u=(0,r.createContext)(void 0);e.s(["AccountContextProvider",0,e=>{let{api:d,isConnectedToChain:m,currentAccount:p,selectedNetwork:h,disconnectWallet:f,resetOnAccountChange:g=!1}=e,[x,v]=(0,r.useReducer)(c,o.initialState),y=(0,r.useRef)(h.id),w=(0,n.useQueryClient)(),C=(0,s.use
1SubnetPoolsFromChain)(d,h.id),b=p?.address,E=(0,r.useRef)(b),N=(0,r.useCallback)(async()=>{if(!d||!p)return;let{address:e}=p;await (0,i.getCurrentPosition)(d,e,t=>{g&&E.current!==e||v(t)},()=>w.ensureQueryData((0,s.subnetPoolsFromChainQueryOptions)(d,h.id)))},[d,p,w,h.id,g]);(0,r.useEffect)(()=>{y.current!==h.id&&((0,l.log)("ð Network changed in AccountContext, clearing account data..."),v({type:"DISCONNECT"}),y.current=h.id)},[h.id]),(0,r.useEffect)(()=>{E.current!==b&&(E.current=b,g&&v({type:"DISCONNECT"}))},[b,g]),(0,r.useEffect)(()=>{d&&m&&p&&N()},[d,m,p,N]);let S=(0,r.useCallback)(()=>{v({type:"DISCONNECT"}),f()},[f]),k=(0,r.useMemo)(()=>x.delegateBalances.filter(e=>(0,a.BigNumber)(e.taoAmount).isGreaterThan(5e-4)).reduce((e,t)=>e+t.taoAmount,0),[x.delegateBalances]),T=(0,r.useMemo)(()=>({...x,currentAccount:p,subnetPoolsMap:C.data??{}}),[x,p,C.data]),j=(0,r.useMemo)(()=>({state:T,selectedNetwork:h,fetchInfo:N,disconnect:S,delegatedTotalTao:k}),[T,h,N,S,k]);return(0,t.jsx)(u.Provider,{value:j,children:e.children})},"AccountContextWithValue",0,({children:e,value:r})=>(0,t.jsx)(u.Provider,{value:r,children:e}),"reducer",0,c,"useAccountContext",0,()=>{let e=(0,r.useContext)(u);if(void 0===e)throw Error("useAccount must be used within an AccountContextProvider");return e}])},954502,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(833401),a=e.i(503975),o=e.i(767683),l=e.i(348099),s=e.i(310844),i=e.i(369845);let c=(0,r.memo)(function({value:e}){return(0,t.jsx)("span",{className:"truncate text-sm",children:e})});e.s(["Combobox",0,function({options:e,value:u,onChange:d,placeholder:m="Select option...",searchPlaceholder:p="Search...",emptyMessage:h="No option found.",className:f,canSearch:g=!0,disabled:x=!1,leftContent:v,leftContentClassName:y,constrainOptionsWidth:w=!0,alignOptions:C,popoverContentClassName:b}){let E,[N,S]=r.useState(!1),[k,T]=r.useState(""),j=u??k,A=d??T,R=(j?e.find(e=>e.value===j)?.label:m)??"",_=(E=r.useRef(null),(0,r.useLayoutEffect)(()=>{requestAnimationFrame(()=>{E.current&&E.current.scrollIntoView({block:"nearest"})})},[N,j]),E);return(0,t.jsxs)(i.Popover,{open:N,onOpenChange:S,children:[(0,t.jsx)(i.PopoverTrigger,{asChild:!0,children:(0,t.jsxs)(l.Button,{variant:o.isNewLookEnabled?"outline":"outline2",role:"combobox","aria-expanded":N,className:(0,a.cn)("w-[300px] justify-between truncate",x&&"opacity-50",f),disabled:x,children:[v?(0,t.jsxs)("div",{className:(0,a.cn)("flex flex-1 flex-row gap-2",y),children:[v,(0,t.jsx)(c,{value:R})]}):(0,t.jsx)(c,{value:R}),(0,t.jsx)(n.BiChevronDown,{className:"ml-2 h-6 w-6 shrink-0 opacity-50"})]})}),(0,t.jsx)(i.PopoverContent,{align:C,className:(0,a.cn)("z-[100] w-80 p-0",b),style:{width:w?"var(--radix-popover-trigger-width)":void 0,pointerEvents:"auto"},children:(0,t.jsxs)(s.Command,{filter:(e,t,r=[])=>+!!`${e} ${r.join(" ")}`.toLowerCase().includes(t.toLowerCase()),children:[g?(0,t.jsx)(s.CommandInput,{placeholder:p}):null,(0,t.jsxs)(s.CommandList,{className:"max-h-[200px] overflow-y-auto",onWheel:e=>{e.stopPropagation()},onTouchMove:e=>{e.stopPropagation()},children:[(0,t.jsx)(s.CommandEmpty,{children:h}),(0,t.jsx)(s.CommandGroup,{children:e.map(e=>(0,t.jsx)(s.CommandItem,{value:e.value,ref:e.value===j?_:void 0,onSelect:e=>{A(e===j?"":e),S(!1)},keywords:[e.label],children:(0,t.jsxs)("div",{className:"flex w-full flex-col",children:[(0,t.jsxs)("div",{className:(0,a.cn)("flex w-full flex-row gap-2",e.className),children:[e.prefixNode?(0,t.jsx)("div",{children:e.prefixNode}):null,e.label,e.suffixNode?(0,t.jsx)("div",{children:e.suffixNode}):null,(0,t.jsx)(n.BiCheck,{className:(0,a.cn)("ml-auto",j===e.value?"opacity-100":"opacity-0")})]}),e.subLabel?(0,t.jsx)("span",{className:"text-xxs block w-full overflow-hidden text-ellipsis whitespace-nowrap text-gray-500",title:e.subLabel,children:e.subLabel}):null]})},e.value))})]})]})})]})}])},310844,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=/[\\\/_+.#"@\[\(\{&]/,a=/[\\\/_+.#"@\[\(\{&]/g,o=/[\s-]/,l=/[\s-]/g;function s(e){return e.toLowerCase().replace(l," ")}var i=e.i(326999),c=e.i(248425),u=e.i(610772),d=e.i(820783),m='[cmdk-group=""]',p='[cmdk-group-items=""]',h='[cmdk-item=""]',f=`${h}:not([aria-disabled="true"])`,g="cmdk-item-select",x="data-value",v=(e,t,r)=>{var i;return i=e,function e(t,r,s,i,c,u,d){if(u===r.length)return c===t.length?1:.99;var m=`${c},${u}`;if(void 0!==d[m])return d[m];for(var p,h,f,g,x=i.charAt(u),v=s.indexOf(x,c),y=0;v>=0;)(p=e(t,r,s,i,v+1,u+1,d))>y&&(v===c?p*=1:n.test(t.charAt(v-1))?(p*=.8,(f=t.slice(c,v-1).match(a))&&c>0&&(p*=Math.pow(.999,f.length))):o.test(t.charAt(v-1))?(p*=.9,(g=t.slice(c,v-1).match(l))&&c>0&&(p*=Math.pow(.999,g.length))):(p*=.17,c>0&&(p*=Math.pow(.999,v-c))),t.charAt(v)!==r.charAt(u)&&(p*=.9999)),(p<.1&&s.charAt(v-1)===i.charAt(u+1)||i.charAt(u+1)===i.charAt(u)&&s.charAt(v-1)!==i.charAt(u))&&.1*(h=e(t,r,s,i,v+1,u+2,d))>p&&(p=.1*h),p>y&&(y=p),v=s.indexOf(x,v+1);return d[m]=y,y}(i=r&&r.length>0?`${i+" "+r.join(" ")}`:i,t,s(i),s(t),0,0,{})},y=r.createContext(void 0),w=r.createContext(void 0),C=r.createContext(void 0),b=r.forwardRef((e,t)=>
1{let n=I(()=>{var t,r;return{search:"",value:null!=(r=null!=(t=e.value)?t:e.defaultValue)?r:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),a=I(()=>new Set),o=I(()=>new Map),l=I(()=>new Map),s=I(()=>new Set),i=R(e),{label:d,children:C,value:b,onValueChange:E,filter:N,shouldFilter:S,loop:k,disablePointerSelection:T=!1,vimBindings:j=!0,...A}=e,L=(0,u.useId)(),O=(0,u.useId)(),M=(0,u.useId)(),B=r.useRef(null),U=P();_(()=>{if(void 0!==b){let e=b.trim();n.current.value=e,z.emit()}},[b]),_(()=>{U(6,V)},[]);let z=r.useMemo(()=>({subscribe:e=>(s.current.add(e),()=>s.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var a,o,l,s;if(!Object.is(n.current[e],t)){if(n.current[e]=t,"search"===e)K(),G(),U(1,H);else if("value"===e){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let e=document.getElementById(M);e?e.focus():null==(a=document.getElementById(L))||a.focus()}if(U(7,()=>{var e;n.current.selectedItemId=null==(e=Y())?void 0:e.id,z.emit()}),r||U(5,V),(null==(o=i.current)?void 0:o.value)!==void 0){null==(s=(l=i.current).onValueChange)||s.call(l,null!=t?t:"");return}}z.emit()}},emit:()=>{s.current.forEach(e=>e())}}),[]),W=r.useMemo(()=>({value:(e,t,r)=>{var a;t!==(null==(a=l.current.get(e))?void 0:a.value)&&(l.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,$(t,r)),U(2,()=>{G(),z.emit()}))},item:(e,t)=>(a.current.add(e),t&&(o.current.has(t)?o.current.get(t).add(e):o.current.set(t,new Set([e]))),U(3,()=>{K(),G(),n.current.value||H(),z.emit()}),()=>{l.current.delete(e),a.current.delete(e),n.current.filtered.items.delete(e);let t=Y();U(4,()=>{K(),(null==t?void 0:t.getAttribute("id"))===e&&H(),z.emit()})}),group:e=>(o.current.has(e)||o.current.set(e,new Set),()=>{l.current.delete(e),o.current.delete(e)}),filter:()=>i.current.shouldFilter,label:d||e["aria-label"],getDisablePointerSelection:()=>i.current.disablePointerSelection,listId:L,inputId:M,labelId:O,listInnerRef:B}),[]);function $(e,t){var r,a;let o=null!=(a=null==(r=i.current)?void 0:r.filter)?a:v;return e?o(e,n.current.search,t):0}function G(){if(!n.current.search||!1===i.current.shouldFilter)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(r=>{let n=o.current.get(r),a=0;n.forEach(t=>{a=Math.max(e.get(t),a)}),t.push([r,a])});let r=B.current;q().sort((t,r)=>{var n,a;let o=t.getAttribute("id"),l=r.getAttribute("id");return(null!=(n=e.get(l))?n:0)-(null!=(a=e.get(o))?a:0)}).forEach(e=>{let t=e.closest(p);t?t.appendChild(e.parentElement===t?e:e.closest(`${p} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${p} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{var t;let r=null==(t=B.current)?void 0:t.querySelector(`${m}[${x}="${encodeURIComponent(e[0])}"]`);null==r||r.parentElement.appendChild(r)})}function H(){let e=q().find(e=>"true"!==e.getAttribute("aria-disabled")),t=null==e?void 0:e.getAttribute(x);z.setState("value",t||void 0)}function K(){var e,t,r,s;if(!n.current.search||!1===i.current.shouldFilter){n.current.filtered.count=a.current.size;return}n.current.filtered.groups=new Set;let c=0;for(let o of a.current){let a=$(null!=(t=null==(e=l.current.get(o))?void 0:e.value)?t:"",null!=(s=null==(r=l.current.get(o))?void 0:r.keywords)?s:[]);n.current.filtered.items.set(o,a),a>0&&c++}for(let[e,t]of o.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=c}function V(){var e,t,r;let n=Y();n&&((null==(e=n.parentElement)?void 0:e.firstChild)===n&&(null==(r=null==(t=n.closest(m))?void 0:t.querySelector('[cmdk-group-heading=""]'))||r.scrollIntoView({block:"nearest"})),n.scrollIntoView({block:"nearest"}))}function Y(){var e;return null==(e=B.current)?void 0:e.querySelector(`${h}[aria-selected="true"]`)}function q(){var e;return Array.from((null==(e=B.current)?void 0:e.querySelectorAll(f))||[])}function X(e){let t=q()[e];t&&z.setState("value",t.getAttribute(x))}function J(e){var t;let r=Y(),n=q(),a=n.findIndex(e=>e===r),o=n[a+e];null!=(t=i.current)&&t.loop&&(o=a+e<0?n[n.length-1]:a+e===n.length?n[0]:n[a+e]),o&&z.setState("value",o.getAttribute(x))}function Q(e){let t=Y(),r=null==t?void 0:t.closest(m),n;for(;r&&!n;)n=null==(r=e>0?function(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}(r,m):function(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}(r,m))?void 0:r.querySelector(f);n?z.setState("value",n.getAttribute(x)):J(e)}let Z=()=>X(q().length-1),ee=e=>{e.preventDefault(),e.metaKey?Z():e.altKey?Q(1):J(1)},et=e=>{e.preventDefault(),e.metaKey?X(0):e.altKey?Q(-1):J(-1)};return r.createElement(c.Primitive.div,{ref:t,tabIndex:-1,...A,"cmdk-root":"",onKeyDown:e=>{var t;null==(t=A.onKeyDown)||t.call(A,e);let r=e.nativeEvent.isComposing||229===e.keyCode;if(!(e.defaultPrevented||r))switch(e.key){case"n":case"j":j&&e.ctrlKey&&ee(e);break;case"ArrowDown":ee(e);break;case"p":case"k":j&&e.ctrlKey&&et(e);break;case"ArrowUp":et(e);break;case"Home":e.preventDefault(),X(0);break;case"End":e.preventDefault(),Z();break;case"Enter":{e.preventDefault();let t=Y();if(t){let e=new Event(g);t.dispatchEvent(e)}}}}},r.createElement("label",{"cmdk-label":"",htmlFor:W.inputId,id:W.labelId,style:F},d),D(e,e=>r.createElement(w.Provider,{value:z},r.createElement(y.Provider,{value:W},e))))}),E=r.forwardRef((e,t)=>
1{var n,a;let o=(0,u.useId)(),l=r.useRef(null),s=r.useContext(C),i=r.useContext(y),m=R(e),p=null!=(a=null==(n=m.current)?void 0:n.forceMount)?a:null==s?void 0:s.forceMount;_(()=>{if(!p)return i.item(o,null==s?void 0:s.id)},[p]);let h=O(o,l,[e.value,e.children,l],e.keywords),f=r.useContext(w),x=L(e=>e.value&&e.value===h.current),v=L(e=>!!p||!1===i.filter()||!e.search||e.filtered.items.get(o)>0);function b(){var e,t;E(),null==(t=(e=m.current).onSelect)||t.call(e,h.current)}function E(){f.setState("value",h.current,!0)}if(r.useEffect(()=>{let t=l.current;if(!(!t||e.disabled))return t.addEventListener(g,b),()=>t.removeEventListener(g,b)},[v,e.onSelect,e.disabled]),!v)return null;let{disabled:N,value:S,onSelect:k,forceMount:T,keywords:j,...A}=e;return r.createElement(c.Primitive.div,{ref:(0,d.composeRefs)(l,t),...A,id:o,"cmdk-item":"",role:"option","aria-disabled":!!N,"aria-selected":!!x,"data-disabled":!!N,"data-selected":!!x,onPointerMove:N||i.getDisablePointerSelection()?void 0:E,onClick:N?void 0:b},e.children)}),N=r.forwardRef((e,t)=>{let{heading:n,children:a,forceMount:o,...l}=e,s=(0,u.useId)(),i=r.useRef(null),m=r.useRef(null),p=(0,u.useId)(),h=r.useContext(y),f=L(e=>!!o||!1===h.filter()||!e.search||e.filtered.groups.has(s));_(()=>h.group(s),[]),O(s,i,[e.value,e.heading,m]);let g=r.useMemo(()=>({id:s,forceMount:o}),[o]);return r.createElement(c.Primitive.div,{ref:(0,d.composeRefs)(i,t),...l,"cmdk-group":"",role:"presentation",hidden:!f||void 0},n&&r.createElement("div",{ref:m,"cmdk-group-heading":"","aria-hidden":!0,id:p},n),D(e,e=>r.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?p:void 0},r.createElement(C.Provider,{value:g},e))))}),S=r.forwardRef((e,t)=>{let{alwaysRender:n,...a}=e,o=r.useRef(null),l=L(e=>!e.search);return n||l?r.createElement(c.Primitive.div,{ref:(0,d.composeRefs)(o,t),...a,"cmdk-separator":"",role:"separator"}):null}),k=r.forwardRef((e,t)=>{let{onValueChange:n,...a}=e,o=null!=e.value,l=r.useContext(w),s=L(e=>e.search),i=L(e=>e.selectedItemId),u=r.useContext(y);return r.useEffect(()=>{null!=e.value&&l.setState("search",e.value)},[e.value]),r.createElement(c.Primitive.input,{ref:t,...a,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":u.listId,"aria-labelledby":u.labelId,"aria-activedescendant":i,id:u.inputId,type:"text",value:o?e.value:s,onChange:e=>{o||l.setState("search",e.target.value),null==n||n(e.target.value)}})}),T=r.forwardRef((e,t)=>{let{children:n,label:a="Suggestions",...o}=e,l=r.useRef(null),s=r.useRef(null),i=L(e=>e.selectedItemId),u=r.useContext(y);return r.useEffect(()=>{if(s.current&&l.current){let e=s.current,t=l.current,r,n=new ResizeObserver(()=>{r=requestAnimationFrame(()=>{let r=e.offsetHeight;t.style.setProperty("--cmdk-list-height",r.toFixed(1)+"px")})});return n.observe(e),()=>{cancelAnimationFrame(r),n.unobserve(e)}}},[]),r.createElement(c.Primitive.div,{ref:(0,d.composeRefs)(l,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":i,"aria-label":a,id:u.listId},D(e,e=>r.createElement("div",{ref:(0,d.composeRefs)(s,u.listInnerRef),"cmdk-list-sizer":""},e)))}),j=r.forwardRef((e,t)=>{let{open:n,onOpenChange:a,overlayClassName:o,contentClassName:l,container:s,...c}=e;return r.createElement(i.Root,{open:n,onOpenChange:a},r.createElement(i.Portal,{container:s},r.createElement(i.Overlay,{"cmdk-overlay":"",className:o}),r.createElement(i.Content,{"aria-label":e.label,"cmdk-dialog":"",className:l},r.createElement(b,{ref:t,...c}))))}),A=Object.assign(b,{List:T,Item:E,Input:k,Group:N,Separator:S,Dialog:j,Empty:r.forwardRef((e,t)=>L(e=>0===e.filtered.count)?r.createElement(c.Primitive.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Loading:r.forwardRef((e,t)=>{let{progress:n,children:a,label:o="Loading...",...l}=e;return r.createElement(c.Primitive.div,{ref:t,...l,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},D(e,e=>r.createElement("div",{"aria-hidden":!0},e)))})});function R(e){let t=r.useRef(e);return _(()=>{t.current=e}),t}var _="u"<typeof window?r.useEffect:r.useLayoutEffect;function I(e){let t=r.useRef();return void 0===t.current&&(t.current=e()),t}function L(e){let t=r.useContext(w),n=()=>e(t.snapshot());return r.useSyncExternalStore(t.subscribe,n,n)}function O(e,t,n,a=[]){let o=r.useRef(),l=r.useContext(y);return _(()=>{var r;let s=(()=>{var e;
1for(let t of n){if("string"==typeof t)return t.trim();if("object"==typeof t&&"current"in t)return t.current?null==(e=t.current.textContent)?void 0:e.trim():o.current}})(),i=a.map(e=>e.trim());l.value(e,s,i),null==(r=t.current)||r.setAttribute(x,s),o.current=s}),o}var P=()=>{let[e,t]=r.useState(),n=I(()=>new Map);return _(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function D({asChild:e,children:t},n){let a;return e&&r.isValidElement(t)?r.cloneElement("function"==typeof(a=t.type)?a(t.props):"render"in a?a.render(t.props):t,{ref:t.ref},n(t.props.children)):n(t)}var F={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"},M=e.i(833401),B=e.i(503975),U=e.i(481972);let z=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(A,{ref:n,className:(0,B.cn)("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...r}));z.displayName=A.displayName;let W=r.forwardRef(({className:e,trailing:r,...n},a)=>(0,t.jsxs)("div",{className:"flex items-center border-b border-b-white/30 px-3","data-cmdk-input-wrapper":"",children:[(0,t.jsx)(M.BiSearch,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,t.jsx)(A.Input,{ref:a,className:(0,B.cn)("placeholder:text-muted-foreground flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50",e),...n}),r]}));W.displayName=A.Input.displayName;let $=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(A.List,{ref:n,className:(0,B.cn)("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...r}));$.displayName=A.List.displayName;let G=r.forwardRef((e,r)=>(0,t.jsx)(A.Empty,{ref:r,className:"py-6 text-center text-sm",...e}));G.displayName=A.Empty.displayName;let H=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(A.Group,{ref:n,className:(0,B.cn)("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...r}));H.displayName=A.Group.displayName;let K=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(A.Separator,{ref:n,className:(0,B.cn)("bg-border -mx-1 h-px",e),...r}));K.displayName=A.Separator.displayName;let V=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(A.Item,{ref:n,className:(0,B.cn)("data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...r}));V.displayName=A.Item.displayName;let Y=({className:e,...r})=>(0,t.jsx)("span",{className:(0,B.cn)("text-muted-foreground ml-auto text-xs tracking-widest",e),...r});Y.displayName="CommandShortcut",e.s(["Command",0,z,"CommandDialog",0,({children:e,...r})=>(0,t.jsx)(U.DialogRoot,{...r,children:(0,t.jsx)(U.DialogContent,{className:"overflow-hidden p-0 shadow-lg",children:(0,t.jsx)(z,{className:"[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),"CommandEmpty",0,G,"CommandGroup",0,H,"CommandInput",0,W,"CommandItem",0,V,"CommandList",0,$,"CommandSeparator",0,K,"CommandShortcut",0,Y],310844)},44194,e=>{"use strict";var t=e.i(843476),r=e.i(657688),n=e.i(503975),a=e.i(927231),o=e.i(456466);let l={ios:{href:a.taostatsIosAppStoreUrl,imageSrc:"/images/app/ios-download-logo.svg",imageAlt:"Download on the App Store"},android:{href:a.taostatsAndroidAppStoreUrl,imageSrc:"/images/app/android-download-logo.svg",imageAlt:"Get it on Google Play"}};e.s(["TaostatsStoreBadgeLink",0,({store:e,href:a,className:s,imageClassName:i})=>{let c=l[e];return(0,t.jsx)(o.Link,{href:a??c.href,target:"_blank",rel:"noopener noreferrer",className:(0,n.cn)("inline-flex",
1s),children:(0,t.jsx)(r.default,{src:c.imageSrc,alt:c.imageAlt,width:180,height:60,className:(0,n.cn)("h-[52px] w-[156px] sm:h-[60px] sm:w-[180px]",i)})})}])},440712,e=>{"use strict";var t=e.i(843476),r=e.i(481355),n=e.i(833401),a=e.i(503975),o=e.i(519069),l=e.i(767683),s=e.i(640602),i=e.i(348099),c=e.i(539910),u=e.i(456466);e.s(["TransactionSuccessContent",0,function({successDetails:e,onClose:d,closeButtonVariant:m="cta2"}){let p=e?.txHash;return(0,t.jsxs)(c.Flex,{col:!0,className:"w-full min-w-0 gap-3",children:[(0,t.jsx)("span",{className:l.isNewLookEnabled?"text-fg-secondary text-sm":"text-white/60",children:"Thanks, your transaction was successful."}),p?(0,t.jsxs)(u.Link,{href:o.appRoutes.blockchain.extrinsicDetail(p),target:"_blank",rel:"noopener noreferrer","aria-label":"View extrinsic on taostats",className:(0,a.cn)("flex w-full min-w-0 items-start gap-2 overflow-hidden rounded-md border transition-colors",l.isNewLookEnabled?"border-primary bg-secondary hover:bg-secondary/80 px-lg py-sm text-fg-primary":"border-white/20 bg-white/5 px-3 py-2 text-white/80 hover:bg-white/10 hover:text-white"),children:[l.isNewLookEnabled?(0,t.jsx)(r.LinkExternal01,{size:16,className:"text-fg-brand mt-0.5 shrink-0"}):(0,t.jsx)(n.BiLinkExternal,{size:16,className:"mt-0.5 shrink-0"}),(0,t.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col gap-1 overflow-hidden sm:flex-row",children:[(0,t.jsx)("span",{className:(0,a.cn)("text-xs"),children:"View extrinsic"}),(0,t.jsx)("span",{className:"hidden text-xs sm:block",children:" · "}),(0,t.jsx)("span",{className:(0,a.cn)("min-w-0 truncate font-mono text-xs",l.isNewLookEnabled&&"font-mono-num"),children:(0,s.walletFormat)(p)})]})]}):null,(0,t.jsx)(i.Button,{variant:m,size:"sm",className:"w-fit",onClick:d,children:"Close"})]})}])},366550,e=>{"use strict";var t=e.i(639372),r=e.i(672464),n=e.i(265172);let a=(0,t.atom)(!1),o=(0,t.atom)(null),l=(0,n.atomWithStorage)("wallet-connector:show-wallet-name",!1,void 0,{getOnInit:!0});e.s(["useWalletConfigState",0,()=>{let[e,t]=(0,r.useAtom)(a),[n,l]=(0,r.useAtom)(o);return{triggerButtonRef:n,isWalletConfigOpen:e,openWalletConfigDialog:e=>{e&&l(e.current),t(!0)},closeWalletConfigDialog:()=>{t(!1),n&&(setTimeout(()=>{n.blur()},300),l(null))}}},"useWalletConnectorDisplaySettings",0,()=>{let[e,t]=(0,r.useAtom)(l);return{showWalletNameInTopBar:e,setShowWalletNameInTopBar:t}}])},926082,e=>{"use strict";var t=e.i(843476),r=e.i(503975),n=e.i(927231),a=e.i(456466);let o={sm:"min-h-12 rounded-xl px-4 py-2 text-[18px] leading-6",md:"min-h-16 rounded-2xl px-6 py-3 text-[24px] leading-9"};e.s(["TaostatsWalletInstallButton",0,({label:e="Download Taostats Wallet",size:l="md",className:s})=>(0,t.jsxs)(a.Link,{href:n.taostatsChromeWalletUrl,target:"_blank",rel:"noopener noreferrer",className:(0,r.cn)("inline-flex w-full items-center justify-between gap-3 border border-black/10 bg-white font-medium tracking-[-0.04em] text-black/80 shadow-[0px_5px_23.8px_0px_rgba(0,219,188,0.25)] transition-transform duration-300 hover:scale-[1.01]",o[l],s),children:[(0,t.jsx)("span",{children:e}),(0,t.jsx)("img",{src:"/images/chrome-extension/chrome-logo.png",alt:"Chrome",width:56,height:56,className:"h-10 w-10 shrink-0"})]})])},728129,e=>{"use strict";e.s(["walletChainStatusIndicatorClassName",0,function(e,t){return e&&t?"bg-accent-1":e||t?"bg-amber-500":"bg-accent-2"}])},706089,e=>{"use strict";var t=e.i(843476),r=e.i(271645);let n=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"m12.708 18.364-1.415 1.414a5 5 0 1 1-7.07-7.07l1.413-1.415m12.728 1.414 1.415-1.414a5 5 0 0 0-7.071-7.071l-1.415 1.414M8.5 15.5l7-7"}));n.displayName="Link01";let a=({size:e=24,color:t="currentColor",...n})=>r.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},r.createElement("path",{d:"M9 4V2m6 18v2M4 9H2m18 6h2M4.914 4.914 3.5 3.5m15.586 15.586L20.5 20.5M12 17.657l-2.121 2.121a4 4 0 1 1-5.657-5.657L6.343 12m11.314 0 2.121-2.121a4 4 0 1 0-5.657-5.657L12 6.343"}));a.displayName="LinkBroken01";var o=e.i(481355),l=e.i(985889),s=e.i(533418),i=e.i(948148),c=e.i(833401),u=e.i(386173),d=e.i(503975),m=e.i(767683),p=e.i(320158),h=e.i(640602),f=e.i(348099),g=e.i(854761),x=e.i(450188),v=e.i(539910),y=e.i(456466),w=e.i(44194),C=e.i(447721),b=e.i(545500),E=e.i(366550),N=e.i(926082),S=e.i(728129),k=e.i(612649);let T=(e,t)=>
1m.isNewLookEnabled?e:t,j=()=>m.isNewLookEnabled?(0,t.jsx)(s.Wallet01,{size:16,className:"text-fg-secondary shrink-0"}):(0,t.jsx)(c.BiWallet,{size:16,className:"text-white"}),A=()=>{let e=(0,r.useRef)(null),{openWalletConfigDialog:n}=(0,E.useWalletConfigState)(),{isConnectedToChain:a}=(0,u.useChainApi)(),o=(0,k.useWalletInstallCta)(),l=(0,i.useTranslations)("walletCta"),s=(0,i.useTranslations)("walletConnector.inline"),c=l("extensionDescription"),p=l("mobileDescription"),h=l("title"),g=l("installButtonLabel");return(0,t.jsxs)(v.Flex,{col:!0,children:[(0,t.jsx)(v.Flex,{className:"items-center gap-2",children:(0,t.jsxs)(b.Tooltip,{children:[(0,t.jsx)(b.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)(f.Button,{ref:e,variant:"link",className:"flex flex-row items-center gap-2 p-0",onClick:()=>{n(e)},children:[(0,t.jsx)("div",{className:(0,d.cn)("h-2 w-2 shrink-0 rounded-full",(0,S.walletChainStatusIndicatorClassName)(!1,a))}),(0,t.jsx)(j,{}),(0,t.jsx)(C.Text,{level:m.isNewLookEnabled?"TextSmMedium":void 0,className:T("text-fg-primary",""),children:s("connectWallet")})]})}),(0,t.jsx)(b.TooltipContent,{children:(0,t.jsx)(v.Flex,{col:!0,className:"items-center",children:(0,t.jsxs)(C.Text,{children:[s("notConnectedTooltipLine1"),(0,t.jsx)("br",{}),s("notConnectedTooltipLine2"),(0,t.jsx)("br",{}),s("notConnectedTooltipLine3")]})})})]})}),o?.kind==="chrome-extension"?(0,t.jsxs)(v.Flex,{col:!0,className:T("mt-md gap-md border-primary bg-secondary p-lg rounded-xl border","mt-2 gap-2 rounded-xl border border-white/10 bg-white/5 p-3"),children:[(0,t.jsxs)(v.Flex,{col:!0,className:"gap-0.5",children:[(0,t.jsx)(C.Text,{level:"bodySmall",className:T("text-fg-primary","text-white"),children:h}),(0,t.jsx)(C.Text,{level:"xs",className:T("text-fg-secondary","text-white/70"),children:c})]}),(0,t.jsx)(N.TaostatsWalletInstallButton,{label:g,size:"sm",className:"w-full text-[16px]"})]}):o?.kind==="ios-app"||o?.kind==="android-app"?(0,t.jsxs)(v.Flex,{col:!0,className:T("mt-md gap-md border-primary bg-secondary p-lg rounded-xl border","mt-2 gap-2 rounded-xl border border-white/10 bg-white/5 p-3"),children:[(0,t.jsxs)(v.Flex,{col:!0,className:"gap-0.5",children:[(0,t.jsx)(C.Text,{level:"bodySmall",className:T("text-fg-primary","text-white"),children:h}),(0,t.jsx)(C.Text,{level:"xs",className:T("text-fg-secondary","text-white/70"),children:p})]}),(0,t.jsx)(w.TaostatsStoreBadgeLink,{store:"ios-app"===o.kind?"ios":"android",href:o.href})]}):null]})},R=()=>{let{isConnecting:e}=(0,u.useChainApi)();return m.isNewLookEnabled?e?(0,t.jsx)(l.Loading02,{size:16,className:"animate-spin"}):(0,t.jsx)(n,{size:16}):e?(0,t.jsx)(c.BiLoaderCircle,{size:16,className:"animate-spin"}):(0,t.jsx)(c.BiLink,{size:16,color:"white"})};e.s(["WalletConnectorInline",0,({walletContext:e,showDisconnectedUi:n=!0,shortAddressTooltip:l=!1,showExternalLink:s=!0,externalAccountUrlBase:w="https://taostats.io/account/",hideDisconnectButton:N=!1})=>{let k=(0,i.useTranslations)("walletConnector.inline"),_=e.state.currentAccount,{openWalletConfigDialog:I}=(0,E.useWalletConfigState)(),L=(0,r.useRef)(null),{isError:O,isDisconnected:P,isConnectedToChain:D,reconnect:F}=(0,u.useChainApi)(),M=()=>{F()};return O||P?(0,t.jsxs)("div",{className:T("gap-lg text-fg-secondary flex flex-row items-center","flex flex-row items-center gap-3"),children:[k(P?"chainLostConnection":"chainConnectionProblem")," ",m.isNewLookEnabled?(0,t.jsx)(g.NewLookButton,{hierarchy:"secondary-gray",size:"sm",iconTrailing:(0,t.jsx)(R,{}),onClick:M,children:k("tryAgain")}):(0,t.jsxs)(f.Button,{className:(0,d.cn)("flex h-10 w-max flex-row gap-1 rounded-md border px-3 py-1 text-white","border-[#323232] bg-[#1D1D1D] opacity-60 hover:bg-[#1D1D1D1A]"),onClick:M,children:[(0,t.jsx)(C.Text,{level:"sm",className:(0,d.cn)("font-medium","text-white"),children:k("tryAgain")}),(0,t.jsx)(R,{})]})]}):(0,t.jsx)(t.Fragment,{children:_?(0,t.jsx)(v.Flex,{col:!0,children:(0,t.jsxs)(v.Flex,{className:"items-center gap-3",children:[(0,t.jsxs)(b.Tooltip,{children:[(0,t.jsx)(b.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)(f.Button,{ref:L,variant:"link",className:"flex flex-row items-center gap-2 p-0",onClick:()=>{I(L)},children:[(0,t.jsx)("div",{className:(0,d.cn)("h-2 w-2 shrink-0 rounded-full",(0,S.walletChainStatusIndicatorClassName)(!0,D))}),(0,t.jsx)(j,{}),(0,t.jsx)(C.Text,{level:m.isNewLookEnabled?"TextSmMedium":void 0,className:T("text-fg-primary",""),children:_.meta.name})]})}),(0,t.jsx)(b.TooltipContent,{children:(0,t.jsxs)(v.Flex,{col:!0,className:"items-center",children:[(0,t.jsx)(C.Text,{children:k("walletAddress")}),(0,t.jsx)(C.Text,{level:"xs",className:T("text-fg-tertiary truncate font-mono","truncate font-mono text-white/60"),children:l?(0,p.truncateKey)(_.address):_.address})]})})]}),(0,t.jsx)(x.CopyButton,{size:14,value:_.address,className:T("text-fg-secondary hover:text-fg-primary transition-colors duration-500","text-white"),confirmationMessage:k("addressCopiedConfirmation"),tooltipProps:{content:(0,t.jsxs)(v.Flex,{col:!0,className:"items-center",children:[(0,t.jsx)(C.Text,{children:k("copyWalletAddress")}),(0,t.jsx)(C.Text,{level:"xs",className:T("text-fg-tertiary truncate font-mono","truncate font-mono text-white/60"),children:(0,h.truncateString)(_.address,10)})]})}}),s?(0,t.jsxs)(b.Tooltip,{children:[(0,t.jsx)(b.TooltipTrigger,{asChild:!0,children:(0,t.jsx)(y.Link,{href:`${w}${_.address}`,target:"_blank",className:T("hover:text-fg-brand text-fg-secondary p-0 transition-colors duration-500","hover:text-accent-1 p-0 text-white transition-colors duration-500"),children:m.isNewLookEnabled?(0,t.jsx)(o.LinkExternal01,{size:14}):(0,t.jsx)(c.BiLinkExternal,{size:14})})}),l?null:(0,t.jsx)(b.TooltipContent,{children:(0,t.jsx)(C.Text,{children:k("viewWalletInTaostats")})})]}):null,N?null:(0,t.jsxs)(b.Tooltip,{children:[(0,t.jsx)(b.TooltipTrigger,{asChild:!0,children:(0,t.jsx)(f.Button,{variant:"link",className:T("hover:text-fg-error text-fg-secondary p-0 transition-colors duration-500","hover:text-accent-2 p-0 text-white transition-colors duration-500"),onClick:()=>{e.disconnect()},children:m.isNewLookEnabled?(0,t.jsx)(a,{size:14}):(0,t.jsx)(c.BiUnlink,{size:14})})}),l?null:(0,t.jsx)(b.TooltipContent,{children:(0,t.jsx)(C.Text,{children:k("disconnectWallet")})})]})]})}):n?(0,t.jsx)(A,{}):null})}],706089)},612649,e=>{"use strict";var t=e.i(271645),r=e.i(927231);e.s(["useWalletInstallCta",0,()=>{let[e,n]=(0,t.useState)(null);return(0,t.useEffect)(()=>{let e;n(((e,t)=>{if(t)return null;let n=/Android/i.test(e),a=/iPhone|iPad|iPod/i.test(e);return n||a?n?{kind:"android-app",href:r.taostatsAndroidAppStoreUrl,label:"Get the Android app"}:a?{kind:"ios-app",href:r.taostatsIosAppStoreUrl,label:"Get the iOS app"}:null:/Chrome|Chromium|Edg|Brave|OPR/i.test(e)?{kind:"chrome-extension",href:r.taostatsChromeWalletUrl,label:"Install Taostats Wallet"}:null})(navigator.userAgent,!!((e=window.injectedWeb3)&&Object.keys(e).length>0)))},[]),e}
1])}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.