PageSourceSearch

https://chat.cherry.fun/_next/static/chunks/3523-b376da680cdc3fcd.js

js cherry.fun collected 2026-10-07 08:46:59 UTC 15,047 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3523],{59524:(e,t,n)=>{n.d(t,{U:()=>a});var r=n(77369),i=n(26372);let o=new r.J3(i.EK),l=new Map;function a(e,t){let n,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i.x5,s="".concat(e,":").concat(t,":").concat(a),u=l.get(s);if(void 0!==u)return u;try{let[i]=r.J3.findProgramAddressSync([new r.J3(e).toBytes(),new r.J3(a).toBytes(),new r.J3(t).toBytes()],o);n=i.toBase58()}catch(e){n=null}return l.size>512&&l.clear(),l.set(s,n),n}},33919:(e,t,n)=>{n.d(t,{Be:()=>_,EH:()=>L,Jr:()=>E,Lc:()=>I,Nj:()=>v,QQ:()=>N,SO:()=>m,cf:()=>S,hL:()=>T,hl:()=>b,tu:()=>C});var r=n(68177),i=n(59524),o=n(26372);let l=BigInt(0),a="Not enough funds in your Cherry Wallet for this payment.",s=BigInt(890880),u=BigInt(105e3),d=BigInt(1e7);function c(e){return"bigint"==typeof e?e>l?e:l:"number"==typeof e&&Number.isFinite(e)&&e>0?BigInt(Math.trunc(e)):"string"==typeof e&&/^\d+$/.test(e)?BigInt(e):l}function f(e){var t,n;let r=new Map;for(let i of null!==(t=e.tokens)&&void 0!==t?t:[])r.set(i.mint,(null!==(n=r.get(i.mint))&&void 0!==n?n:l)+c(i.amount));return{lamports:c(e.solLamports),tokens:r}}function y(e){var t,n,r;let{needed:i,held:o}=e,u=l,d=i.lamports;if(i.lamports>l){let e=o.lamports-i.lamports;e<l?u=-e:e>l&&e<s&&o.lamports>=s&&(u=s-e,d=i.lamports+u)}let c=null;for(let[e,n]of i.tokens){if(n<=l)continue;let r=null!==(t=o.tokens.get(e))&&void 0!==t?t:l;if(r<n){c={mint:e,required:n,available:r,missing:n-r};break}}if(u===l&&!c)return null;let f=(e,t)=>({lamports:Number(e),...c&&void 0!==t?{token:{mint:c.mint,baseUnits:Number(t)}}:{}});return{code:"INSUFFICIENT_FUNDS",message:null!==(n=e.message)&&void 0!==n?n:a,wallet:e.wallet,required:f(d,null==c?void 0:c.required),available:f(o.lamports,null==c?void 0:c.available),missing:f(u,null==c?void 0:c.missing),fee:{lamports:Number(null!==(r=e.feeLamports)&&void 0!==r?r:l)},topUp:{address:e.wallet}}}function h(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a;return{code:"INSUFFICIENT_FUNDS",message:t,wallet:e,required:{lamports:0},available:{lamports:0},missing:{lamports:0},fee:{lamports:0},topUp:{address:e}}}function m(e){var t,n,r;return!!e&&c(null===(t=e.missing)||void 0===t?void 0:t.lamports)===l&&c(null===(r=e.missing)||void 0===r?void 0:null===(n=r.token)||void 0===n?void 0:n.baseUnits)===l}let p=/check your .*balance/i,g=/insufficient|not enough/i;function w(e,t){return e&&"object"==typeof e?e[t]:void 0}function v(e){var t;if(!e||"object"!=typeof e)return!1;let n=w(e,"code"),i="string"==typeof w(e,"message")?w(e,"message"):"",o=w(e,"body"),l=null!==(t=w(e,"reason"))&&void 0!==t?t:w(o,"reason");return"SIMULATION_FAILED"===n?p.test(i)||(0,r.d1)(e):"CHARGE_FAILED"===n?"insufficient_funds"===l||g.test(i):!("string"==typeof n&&/^[A-Z][A-Z0-9_]+$/.test(n))&&(0,r.d1)(e)}function N(e,t){return t&&v(e)?h(t):null}function A(e,t){let n=l,r=new Map;for(let s of e){let e=(0,o.s4)(s,{payer:t,deriveAta:i.U});for(let t of e.outflows)if(null===t.mint)n+=t.baseUnits;else{var a;if((0,o.Dd)(t))continue;r.set(t.mint,(null!==(a=r.get(t.mint))&&void 0!==a?a:l)+t.baseUnits)}e.feePayer===t&&null!==e.networkFeeLamports&&(n+=e.networkFeeLamports)}return{lamports:n,tokens:r}}let E="Not enough funds in your Cherry Wallet for this transaction. Nothing was signed.";async function C(e){let t;try{t=A(e.transactions,e.address)}catch(e){return"unchecked"}if(t.lamports<=l&&[...t.tokens.values()].every(e=>e<=l))return"enough";let n=async()=>{try{let n=f(await e.balance());return y({wallet:e.address,needed:t,held:n,message:E})}catch(e){return"unread"}},r=await n();if("unread"===r)return"unchecked";if(null===r)return"enough";for(let t=0;t<3&&await e.topUp(r);t+=1){let e=await n();if("unread"===e||null===e)return"topped-up";r=e}return"declined"}function I(e,t){var n;return!!e&&("string"==typeof t.cherryWallet&&t.cherryWallet===e||(null!==(n=t.wallets)&&void 0!==n?n:[]).some(t=>t.address===e&&!0===t.appHeld))}function T(e){let{session:t}=e;return t&&I(t,e.account)?e.adapterAddress===t?null:t:null}function _(e){var t;if(e.amount<=l)return null;let n="So11111111111111111111111111111111111111112"===e.inputMint,r=null!==(t=e.rentAccounts)&&void 0!==t?t:n?2:1,i=o.dV*BigInt(Math.max(0,Math.trunc(r))),a={lamports:(n?e.amount:l)+u+i,tokens:n?new Map:new Map([[e.inputMint,e.amount]])},s={lamports:e.solLamports,tokens:n?new Map:new Map([[e.inputMint,e.inputHeld]])};return y({wallet:e.wallet,needed:a,held:s,feeLamports:u})}function L(e,t){return t?Math.max(0,e-Number(d)/1e9):e}let k="cherryShortfall";function S(e){if(!e||"object"!=typeof e)return null;let t=e[k];return t&&"object"==typeof t?t:null}async function b(e,t){if(!e||"object"!=typeof e||!(0,r.d1)(e))return e;let n=null;try{n=y({wallet:t.address,needed:A(t.transactions,t.address),held:f(await t.balance()),message:E})}catch(e){n=null}return e[k]=null!=n?n:h(t.address,E),e}},98117:(e,t,n)=>{n.d(t,{$K:()=>m,BZ:()=>w,Hq:()=>A,Nf:()=>g,Ub:()=>v,Ue:()=>s,_F:()=>N,fY:()=>l,kw:()=>p,rG:()=>u,xB:()=>a});var r=n(51626),i=n(4825),o=n(84958);let l="Confirm it's you",a={pay:"Sign in once more to pay from your Cherry Wallet. Your chats stay open.",create:"Sign in once more to create your Cherry Wallet."},s="Continue",u="Not now",d=(0,i.VF)("SESSION_ACCOUNT_MISMATCH"),c="That did not work. Try again, or choose Not now.",f="For your security, sign out and sign in again, then try once more.",y=null,h=null;function m(e){return y=e,()=>{y===e&&(y=null,g("declined"))}}function p(e){let t;if(h)return h.promise;if(!y)return Promise.resolve("declined");let n=new Promise(e=>{t=e});return h={promise:n,resolve:t},y({purpose:e}),n}function g(e){let t=h;h=null,null==t||t.resolve(e)}function w(e){return"wallet"===e.authMethod?{kind:"wallet"}:"social"===e.authMethod&&e.socialProvider?{kind:"social",provider:e.socialProvider}:{kind:"none"}}async function v(e){var t;return!0!==e.grantRequired?"password":!0!==(t={grantRequired:!0,grant:await e.loadGrant().catch(()=>null)}).grantRequired||t.grant?"password":await e.confirm()==="confirmed"?"password":"leave"}
1class N extends Error{constructor(){super(f),this.name="ConfirmItsYouUnavailableError"}}async function A(e){let t=e.expectedCherryId;if(!t||"none"===e.method.kind)return{kind:"error",text:f};if("social"===e.method.kind){try{await e.redirectToSocial(e.method.provider,t)}catch(t){let e=null==t?void 0:t.code;return{kind:"error",text:"string"==typeof e?(0,i.VF)(e):c}}return{kind:"redirecting"}}try{return await e.signInWithWallet(t),{kind:"confirmed"}}catch(e){var n;if((null==e?void 0:e.code)==="SESSION_ACCOUNT_MISMATCH")return{kind:"error",text:d};if((0,r.lr)(e))return{kind:"declined"};return{kind:"error",text:null!==(n=(e instanceof o.fc||e instanceof o.Px||e instanceof N)&&e.message.length>0?e.message:null)&&void 0!==n?n:c}}}},41242:(e,t,n)=>{n.d(t,{Dr:()=>a,Fn:()=>u,Jx:()=>r,Mr:()=>s,_G:()=>d,fK:()=>c});let r="cherry-wallet",i="create",o=null,l=null;function a(e){return o=e,()=>{o===e&&(o=null,d("declined"))}}function s(){if(o){o();return}window.location.assign("/?".concat(r,"=").concat(i))}function u(){let e;if(l)return l.promise;if(!o)return s(),Promise.resolve("declined");let t=new Promise(t=>{e=t});return l={promise:t,resolve:e},o(),t}function d(e){let t=l;l=null,null==t||t.resolve(e)}function c(){let e=new URL(window.location.href);return e.searchParams.get(r)===i&&(e.searchParams.delete(r),window.history.replaceState(window.history.state,"",e.toString()),!0)}},17706:(e,t,n)=>{n.d(t,{BT:()=>l,EH:()=>c,YW:()=>u});var r=n(51504),i=n(26372);function o(e){return(null==e?void 0:e.name)==="PaymentRefusedError"}function l(e){var t,n,r,i;if(o(e))return null;let l=(null==e?void 0:e.body)&&"object"==typeof e.body?e.body:null;switch(function(e){let t=null==e?void 0:e.code;return"string"==typeof t?t:void 0}(e)){case"INSUFFICIENT_FUNDS":{let i=null!==(n=null==e?void 0:e.insufficientFunds)&&void 0!==n?n:l,o=null!==(r=null==i?void 0:null===(t=i.topUp)||void 0===t?void 0:t.address)&&void 0!==r?r:null==i?void 0:i.wallet;return i&&"string"==typeof o&&o.length>0?{kind:"insufficientFunds",funds:{...i,topUp:{address:o}}}:null}case"DAILY_LIMIT_REACHED":{let t=null!==(i=null==e?void 0:e.resetAt)&&void 0!==i?i:null==l?void 0:l.resetAt;return{kind:"dailyLimit",resetAt:"string"==typeof t?t:null}}case"NO_CHERRY_WALLET":return{kind:"noCherryWallet"};default:return null}}let a="Your Cherry Wallet has reached its daily payment limit.";function s(e){return"number"==typeof e&&Number.isFinite(e)&&e>0?BigInt(Math.trunc(e)):"string"==typeof e&&/^\d+$/.test(e)?BigInt(e):BigInt(0)}function u(e){var t,n;let r=[],o=BigInt(0),l=s(null==e?void 0:e.lamports);l>o&&r.push("".concat((0,i.Js)(l,9)," SOL"));let a=s(null==e?void 0:null===(t=e.token)||void 0===t?void 0:t.baseUnits),u="string"==typeof(null==e?void 0:null===(n=e.token)||void 0===n?void 0:n.mint)?e.token.mint:null;if(a>o){let e=u?i.t7[u]:void 0;r.push(e?"".concat((0,i.Js)(a,e.decimals)," ").concat(e.symbol):"".concat(a.toString()," token units"))}return r.length>0?r.join(" + "):"0 SOL"}class d extends Error{constructor(e,t){super(t),this.name="PaymentRefusedError",this.code=e}}async function c(e,t){let n=!1;for(let s=0;;s+=1)try{return await e()}catch(u){var i;let e=null!==(i=l(u))&&void 0!==i?i:function(e,t){if(o(e)||!t.shortfallOf)return null;let n=t.shortfallOf(e);return n?{kind:"insufficientFunds",funds:n}:null}(u,t);if(!e)throw u;switch(e.kind){case"noCherryWallet":if(!n&&(n=!0,await t.createCherryWallet()))continue;throw new d("NO_CHERRY_WALLET",r.e$);case"dailyLimit":throw new d("DAILY_LIMIT_REACHED",function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date,n=e?new Date(e):null;if(!n||Number.isNaN(n.getTime()))return"".concat(a," Try again tomorrow.");let r=String(n.getUTCHours()).padStart(2,"0"),i=String(n.getUTCMinutes()).padStart(2,"0"),o=Math.ceil((n.getTime()-t.getTime())/6e4);if(o<=0)return"".concat(a," It has just reset — try again.");let l=o<60?"".concat(o," min"):"".concat(Math.ceil(o/60)," h");return"".concat(a," It resets at ").concat(r,":").concat(i," UTC, in ").concat(l,".")}(e.resetAt));case"insufficientFunds":if(!(s<5&&await t.topUp(e.funds)))throw new d("INSUFFICIENT_FUNDS","Not paid — top up your Cherry Wallet, then try again.");continue}}}}
1,51504:(e,t,n)=>{n.d(t,{N_:()=>f,No:()=>s,QX:()=>o,Zm:()=>d,e$:()=>i,fd:()=>c,mt:()=>l,rf:()=>r,vI:()=>u});let r="cherry-wallet-pay",i="Create your Cherry Wallet to pay";function o(e){var t,n;return(null===(t=e.sessionCaps)||void 0===t?void 0:t.includes(r))?"string"==typeof e.cherryWallet&&e.cherryWallet.length>0?{kind:"cherry",address:e.cherryWallet}:(null===(n=e.primary)||void 0===n?void 0:n.appHeld)?{kind:"cherry",address:e.primary.address}:"ready"===e.linksState&&null!==e.cherryId&&null===e.cherryWallet?{kind:"noCherryWallet"}:{kind:"pending"}:{kind:"legacy"}}function l(e){let{mode:t,signers:n,adapterAddress:r}=e;return"legacy"===t.kind?{kind:"adapter"}:"cherry"===t.kind&&n.includes(t.address)?{kind:"cherry",address:t.address}:null!==r&&n.includes(r)?{kind:"adapter"}:"noCherryWallet"===t.kind?{kind:"refuse",reason:"NO_CHERRY_WALLET"}:"pending"===t.kind?{kind:"refuse",reason:"ACCOUNT_LOADING"}:null===r?{kind:"refuse",reason:"CONNECT_WALLET"}:{kind:"refuse",reason:"NOT_A_SIGNER"}}let a={NO_CHERRY_WALLET:i,ACCOUNT_LOADING:"Your account is still loading. Try again in a moment.",ACCOUNT_UNAVAILABLE:"Some account features are unavailable right now. Try again in a moment.",SIGN_IN_AGAIN:"For your security, sign out and sign in again, then try once more.",CONNECT_WALLET:"Please connect your wallet first.",NOT_A_SIGNER:"This payment is for a wallet this device cannot sign for."};class s extends Error{constructor(e){super(a[e]),this.name="PaymentSignerRefusedError",this.code=e}}let u="This swap route can't be signed from your Cherry Wallet. Try again or change the amount.";function d(e){return(null==e?void 0:e.name)==="CherryWalletRefusedError"&&("DANGEROUS_INSTRUCTION"===e.code||"UNSTATED_ROLE"===e.code)}function c(e,t){let n=[];for(let[r,i]of e)(i.cherryId!==t.cherryId||i.identityAddress!==t.identityAddress)&&n.push(r);return n}async function f(e,t){try{return await e.ensurePayer()}catch(e){return t(e instanceof Error?e.message:String(e)),!1}}},23791:(e,t,n)=>{n.d(t,{W:()=>r,d:()=>i});class r extends Error{constructor(e,t,n){super(t),this.code=e,this.data=n,this.name="MiniappBridgeError"}}function i(e){if(e instanceof r)return{code:e.code,message:e.message,...e.data?{data:e.data}:{}};if(!e||"string"!=typeof e.message)return null;switch(e.name){case"CherryWalletRefusedError":switch(e.code){case"NOT_A_SIGNER":case"DANGEROUS_INSTRUCTION":case"UNSTATED_ROLE":case"RESERVED_PAYLOAD":return{code:e.code,message:e.message};default:return{code:"WALLET_UNAVAILABLE",message:e.message}}case"PaymentCancelledError":return{code:"USER_REJECTED",message:e.message};case"PaymentBusyError":case"NoPayHostError":return{code:"WALLET_UNAVAILABLE",message:e.message};default:return null}}},68177:(e,t,n)=>{n.d(t,{Dc:()=>f,I8:()=>u,MH:()=>w,Nc:()=>g,Pb:()=>a,d1:()=>m,fA:()=>s,h1:()=>d,x6:()=>l,xH:()=>c});var r=n(52271),i=n(84387),o=n(23791);function l(e){if("string"==typeof e?(0,r.Cd)(e):(0,r.z7)(e))throw new o.W("RESERVED_PAYLOAD",r.$W)}let a="Sign in to Cherry again to sign.",s="Connect your wallet to sign.",u="Your account details are still loading. Try again in a moment.";function d(e,t){var n,r;return(null===(n=e.role)||void 0===n?void 0:n.appHeld)===!0&&(null===(r=e.role)||void 0===r?void 0:r.primary)!==!0&&!0!==e.cherryWallet&&e.address!==t}function c(e){if(!e.sessionWallet)throw new o.W("WALLET_UNAVAILABLE",a);if(!e.wallet)throw new o.W("WALLET_NOT_CONNECTED",s);let t=function(e){let{wallet:t,sessionWallet:n}=e;if(!t||!n)return!1;if(t===n)return!0;if(!e.walletSwitch)return!1;if(null===e.accountWallets)return null;let r=e.accountWallets.find(e=>{var n;return e.address===t&&(null===(n=e.role)||void 0===n?void 0:n.custodial)!==!0});return!!r&&(!d(r,e.cherryWalletAddress)||"absorbed")}(e);if(!0!==t){if("absorbed"===t)throw new o.W("WALLET_NOT_IN_ACCOUNT","A wallet from a merged account can’t sign in apps. Choose another wallet.");if(null===t)throw new o.W("WALLET_UNAVAILABLE",u);throw new o.W("WALLET_NOT_IN_ACCOUNT",e.walletSwitch?"This wallet is not linked to your account.":"Sign with ".concat(f(e.sessionWallet),", the wallet you are signed in with. Nothing was signed."))}}function f(e){return(0,i.vz)(e)}let y=/insufficient (lamports|funds)|insufficient funds for rent|debit an account but found no record of a prior credit/i,h=/custom program error:\s*0x1\b/i;function m(e){let t=function(e){if(!e||"object"!=typeof e)return"string"==typeof e?e:"";let t=[],n=e.message;"string"==typeof n&&t.push(n);let r=e.logs;
1if(Array.isArray(r))for(let e of r)"string"==typeof e&&t.push(e);return t.join("\n")}(e);return!!y.test(t)||h.test(t)&&t.includes("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA")}let p="cherrySignerRoute";function g(e){return e&&"object"==typeof e&&(e[p]="app-held"),e}function w(e){return!!e&&"object"==typeof e&&"app-held"===e[p]}}}]);

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.