@payai/x402-solana-react 0.1.0-beta.6 → 1.0.0
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.
- package/README.md +4 -4
- package/dist/components/PaymentButton.d.ts +1 -1
- package/dist/components/PaymentButton.d.ts.map +1 -1
- package/dist/components/WalletSection.d.ts +1 -1
- package/dist/components/WalletSection.d.ts.map +1 -1
- package/dist/components/X402Paywall.d.ts +1 -1
- package/dist/components/X402Paywall.d.ts.map +1 -1
- package/dist/components/ui/button.d.ts +1 -1
- package/dist/demo/App.d.ts.map +1 -1
- package/dist/hooks/useX402Payment.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2001 -935
- package/dist/index.mjs.map +1 -1
- package/dist/lib/balance.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/paywall.d.ts +9 -1
- package/dist/types/paywall.d.ts.map +1 -1
- package/dist/types/theme.d.ts +1 -1
- package/dist/types/theme.d.ts.map +1 -1
- package/package.json +9 -7
package/README.md
CHANGED
|
@@ -111,7 +111,7 @@ The component comes with built-in Solana-themed styles. You can customize using
|
|
|
111
111
|
amount={5.00}
|
|
112
112
|
description="Premium Features"
|
|
113
113
|
wallet={wallet}
|
|
114
|
-
theme="
|
|
114
|
+
theme="seeker-2"
|
|
115
115
|
classNames={{
|
|
116
116
|
container: "bg-gradient-to-r from-purple-600 to-blue-600",
|
|
117
117
|
button: "bg-white text-purple-600 hover:bg-gray-50 font-bold"
|
|
@@ -137,7 +137,7 @@ The component comes with built-in Solana-themed styles. You can customize using
|
|
|
137
137
|
| `rpcUrl` | `string` | ❌ | - | Custom RPC URL |
|
|
138
138
|
| `treasuryAddress` | `string` | ❌ | - | Custom treasury address |
|
|
139
139
|
| `facilitatorUrl` | `string` | ❌ | - | Custom facilitator URL |
|
|
140
|
-
| `theme` | `'solana' \| 'dark' \| 'light' \| '
|
|
140
|
+
| `theme` | `'solana' \| 'dark' \| 'light' \| 'seeker-2'` | ❌ | `'solana'` | Visual theme |
|
|
141
141
|
| `showBalance` | `boolean` | ❌ | `true` | Show wallet balance |
|
|
142
142
|
| `showNetworkInfo` | `boolean` | ❌ | `true` | Show network info |
|
|
143
143
|
| `maxPaymentAmount` | `number` | ❌ | - | Maximum payment amount |
|
|
@@ -229,8 +229,8 @@ MIT License
|
|
|
229
229
|
|
|
230
230
|
## 🔗 Related Projects
|
|
231
231
|
|
|
232
|
-
- [x402-solana](
|
|
233
|
-
- [x402](
|
|
232
|
+
- [x402-solana](https://github.com/payainetwork/x402-solana) - Base Solana payment protocol implementation
|
|
233
|
+
- [x402](https://github.com/payainetwork/x402) - Core x402 payment protocol
|
|
234
234
|
- [PayAI Network](https://payai.network) - x402 payment infrastructure
|
|
235
235
|
|
|
236
236
|
---
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { PaymentButtonProps } from '../types';
|
|
2
|
-
import * as React from
|
|
2
|
+
import * as React from "react";
|
|
3
3
|
export declare const PaymentButton: React.ForwardRefExoticComponent<PaymentButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
4
4
|
//# sourceMappingURL=PaymentButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaymentButton.d.ts","sourceRoot":"","sources":["../../src/components/PaymentButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAG7C,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"PaymentButton.d.ts","sourceRoot":"","sources":["../../src/components/PaymentButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAG7C,eAAO,MAAM,aAAa,8FAwDzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WalletSection.d.ts","sourceRoot":"","sources":["../../src/components/WalletSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAG7C,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,
|
|
1
|
+
{"version":3,"file":"WalletSection.d.ts","sourceRoot":"","sources":["../../src/components/WalletSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAG7C,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAkHtD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"X402Paywall.d.ts","sourceRoot":"","sources":["../../src/components/X402Paywall.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"X402Paywall.d.ts","sourceRoot":"","sources":["../../src/components/X402Paywall.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAyB/B,OAAO,EAAE,gBAAgB,EAAiB,MAAM,SAAS,CAAC;AA27C1D,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAsClD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
|
-
variant?: "
|
|
4
|
+
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
5
5
|
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
7
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
package/dist/demo/App.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../src/demo/App.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../src/demo/App.tsx"],"names":[],"mappings":"AAYA,OAAO,4CAA4C,CAAC;AAmHpD,iBAAS,GAAG,4CAEX;AAED,eAAe,GAAG,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useX402Payment.d.ts","sourceRoot":"","sources":["../../src/hooks/useX402Payment.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAEtE,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,aAAa,CAAC;IACtB,OAAO,EAAE,aAAa,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,aAAa;IAC5B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,MAAM,EAAE,aAAa,CAAC;IACtB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACrE,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,aAAa,CAAC;IACtB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,aAAa,GAAG,oBAAoB,
|
|
1
|
+
{"version":3,"file":"useX402Payment.d.ts","sourceRoot":"","sources":["../../src/hooks/useX402Payment.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAEtE,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,aAAa,CAAC;IACtB,OAAO,EAAE,aAAa,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,aAAa;IAC5B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,MAAM,EAAE,aAAa,CAAC;IACtB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACrE,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,aAAa,CAAC;IACtB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,aAAa,GAAG,oBAAoB,CAqI1E"}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var Ee=Object.defineProperty;var ze=(e,r,t)=>r in e?Ee(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t;var fe=(e,r,t)=>ze(e,typeof r!="symbol"?r+"":r,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),z=require("react"),N=require("@solana/web3.js"),L=require("@solana/spl-token");function Me(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const j=Me(z);function Ie(e){return e==="solana"?"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v":"4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU"}function Te(e){return e==="solana"?"https://api.mainnet-beta.solana.com":"https://api.devnet.solana.com"}async function Re(e,r,t){try{const n=t||Te(r),o=new N.Connection(n,"confirmed"),s=new N.PublicKey(e),l=new N.PublicKey(Ie(r)),i=await L.getAssociatedTokenAddress(l,s),d=await L.getAccount(o,i);return(Number(d.amount)/1e6).toFixed(2)}catch(n){return console.error("Error fetching USDC balance:",n),"0.00"}}function ye(e){var r,t,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(r=0;r<o;r++)e[r]&&(t=ye(e[r]))&&(n&&(n+=" "),n+=t)}else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function we(){for(var e,r,t=0,n="",o=arguments.length;t<o;t++)(e=arguments[t])&&(r=ye(e))&&(n&&(n+=" "),n+=r);return n}const re="-",Be=e=>{const r=Le(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:l=>{const i=l.split(re);return i[0]===""&&i.length!==1&&i.shift(),ve(i,r)||Ge(l)},getConflictingClassGroupIds:(l,i)=>{const d=t[l]||[];return i&&n[l]?[...d,...n[l]]:d}}},ve=(e,r)=>{var l;if(e.length===0)return r.classGroupId;const t=e[0],n=r.nextPart.get(t),o=n?ve(e.slice(1),n):void 0;if(o)return o;if(r.validators.length===0)return;const s=e.join(re);return(l=r.validators.find(({validator:i})=>i(s)))==null?void 0:l.classGroupId},be=/^\[(.+)\]$/,Ge=e=>{if(be.test(e)){const r=be.exec(e)[1],t=r==null?void 0:r.substring(0,r.indexOf(":"));if(t)return"arbitrary.."+t}},Le=e=>{const{theme:r,prefix:t}=e,n={nextPart:new Map,validators:[]};return _e(Object.entries(e.classGroups),t).forEach(([s,l])=>{te(l,n,s,r)}),n},te=(e,r,t,n)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?r:ge(r,o);s.classGroupId=t;return}if(typeof o=="function"){if(Oe(o)){te(o(n),r,t,n);return}r.validators.push({validator:o,classGroupId:t});return}Object.entries(o).forEach(([s,l])=>{te(l,ge(r,s),t,n)})})},ge=(e,r)=>{let t=e;return r.split(re).forEach(n=>{t.nextPart.has(n)||t.nextPart.set(n,{nextPart:new Map,validators:[]}),t=t.nextPart.get(n)}),t},Oe=e=>e.isThemeGetter,_e=(e,r)=>r?e.map(([t,n])=>{const o=n.map(s=>typeof s=="string"?r+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([l,i])=>[r+l,i])):s);return[t,o]}):e,Ue=e=>{if(e<1)return{get:()=>{},set:()=>{}};let r=0,t=new Map,n=new Map;const o=(s,l)=>{t.set(s,l),r++,r>e&&(r=0,n=t,t=new Map)};return{get(s){let l=t.get(s);if(l!==void 0)return l;if((l=n.get(s))!==void 0)return o(s,l),l},set(s,l){t.has(s)?t.set(s,l):o(s,l)}}},je="!",Ve=e=>{const{separator:r,experimentalParseClassName:t}=e,n=r.length===1,o=r[0],s=r.length,l=i=>{const d=[];let c=0,p=0,m;for(let g=0;g<i.length;g++){let y=i[g];if(c===0){if(y===o&&(n||i.slice(g,g+s)===r)){d.push(i.slice(p,g)),p=g+s;continue}if(y==="/"){m=g;continue}}y==="["?c++:y==="]"&&c--}const u=d.length===0?i:i.substring(p),f=u.startsWith(je),v=f?u.substring(1):u,h=m&&m>p?m-p:void 0;return{modifiers:d,hasImportantModifier:f,baseClassName:v,maybePostfixModifierPosition:h}};return t?i=>t({className:i,parseClassName:l}):l},We=e=>{if(e.length<=1)return e;const r=[];let t=[];return e.forEach(n=>{n[0]==="["?(r.push(...t.sort(),n),t=[]):t.push(n)}),r.push(...t.sort()),r},De=e=>({cache:Ue(e.cacheSize),parseClassName:Ve(e),...Be(e)}),$e=/\s+/,Fe=(e,r)=>{const{parseClassName:t,getClassGroupId:n,getConflictingClassGroupIds:o}=r,s=[],l=e.trim().split($e);let i="";for(let d=l.length-1;d>=0;d-=1){const c=l[d],{modifiers:p,hasImportantModifier:m,baseClassName:u,maybePostfixModifierPosition:f}=t(c);let v=!!f,h=n(v?u.substring(0,f):u);if(!h){if(!v){i=c+(i.length>0?" "+i:i);continue}if(h=n(u),!h){i=c+(i.length>0?" "+i:i);continue}v=!1}const g=We(p).join(":"),y=m?g+je:g,C=y+h;if(s.includes(C))continue;s.push(C);const A=o(h,v);for(let S=0;S<A.length;++S){const M=A[S];s.push(y+M)}i=c+(i.length>0?" "+i:i)}return i};function Ke(){let e=0,r,t,n="";for(;e<arguments.length;)(r=arguments[e++])&&(t=Ce(r))&&(n&&(n+=" "),n+=t);return n}const Ce=e=>{if(typeof e=="string")return e;let r,t="";for(let n=0;n<e.length;n++)e[n]&&(r=Ce(e[n]))&&(t&&(t+=" "),t+=r);return t};function He(e,...r){let t,n,o,s=l;function l(d){const c=r.reduce((p,m)=>m(p),e());return t=De(c),n=t.cache.get,o=t.cache.set,s=i,i(d)}function i(d){const c=n(d);if(c)return c;const p=Fe(d,t);return o(d,p),p}return function(){return s(Ke.apply(null,arguments))}}const w=e=>{const r=t=>t[e]||[];return r.isThemeGetter=!0,r},ke=/^\[(?:([a-z-]+):)?(.+)\]$/i,Xe=/^\d+\/\d+$/,Je=new Set(["px","full","screen"]),Ze=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ye=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,qe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Qe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,et=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,G=e=>$(e)||Je.has(e)||Xe.test(e),O=e=>F(e,"length",lt),$=e=>!!e&&!Number.isNaN(Number(e)),ee=e=>F(e,"number",$),H=e=>!!e&&Number.isInteger(Number(e)),tt=e=>e.endsWith("%")&&$(e.slice(0,-1)),b=e=>ke.test(e),_=e=>Ze.test(e),rt=new Set(["length","size","percentage"]),nt=e=>F(e,rt,Ne),ot=e=>F(e,"position",Ne),st=new Set(["image","url"]),at=e=>F(e,st,dt),it=e=>F(e,"",ct),X=()=>!0,F=(e,r,t)=>{const n=ke.exec(e);return n?n[1]?typeof r=="string"?n[1]===r:r.has(n[1]):t(n[2]):!1},lt=e=>Ye.test(e)&&!qe.test(e),Ne=()=>!1,ct=e=>Qe.test(e),dt=e=>et.test(e),ut=()=>{const e=w("colors"),r=w("spacing"),t=w("blur"),n=w("brightness"),o=w("borderColor"),s=w("borderRadius"),l=w("borderSpacing"),i=w("borderWidth"),d=w("contrast"),c=w("grayscale"),p=w("hueRotate"),m=w("invert"),u=w("gap"),f=w("gradientColorStops"),v=w("gradientColorStopPositions"),h=w("inset"),g=w("margin"),y=w("opacity"),C=w("padding"),A=w("saturate"),S=w("scale"),M=w("sepia"),I=w("skew"),E=w("space"),U=w("translate"),R=()=>["auto","contain","none"],T=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto",b,r],x=()=>[b,r],Z=()=>["",G,O],W=()=>["auto",$,b],D=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],V=()=>["solid","dashed","dotted","double","none"],ue=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Q=()=>["start","end","center","between","around","evenly","stretch"],K=()=>["","0",b],pe=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>[$,b];return{cacheSize:500,separator:":",theme:{colors:[X],spacing:[G,O],blur:["none","",_,b],brightness:B(),borderColor:[e],borderRadius:["none","","full",_,b],borderSpacing:x(),borderWidth:Z(),contrast:B(),grayscale:K(),hueRotate:B(),invert:K(),gap:x(),gradientColorStops:[e],gradientColorStopPositions:[tt,O],inset:P(),margin:P(),opacity:B(),padding:x(),saturate:B(),scale:B(),sepia:K(),skew:B(),space:x(),translate:x()},classGroups:{aspect:[{aspect:["auto","square","video",b]}],container:["container"],columns:[{columns:[_]}],"break-after":[{"break-after":pe()}],"break-before":[{"break-before":pe()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...D(),b]}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",H,b]}],basis:[{basis:P()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",b]}],grow:[{grow:K()}],shrink:[{shrink:K()}],order:[{order:["first","last","none",H,b]}],"grid-cols":[{"grid-cols":[X]}],"col-start-end":[{col:["auto",{span:["full",H,b]},b]}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":[X]}],"row-start-end":[{row:["auto",{span:[H,b]},b]}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",b]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",b]}],gap:[{gap:[u]}],"gap-x":[{"gap-x":[u]}],"gap-y":[{"gap-y":[u]}],"justify-content":[{justify:["normal",...Q()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Q(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Q(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[C]}],px:[{px:[C]}],py:[{py:[C]}],ps:[{ps:[C]}],pe:[{pe:[C]}],pt:[{pt:[C]}],pr:[{pr:[C]}],pb:[{pb:[C]}],pl:[{pl:[C]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",b,r]}],"min-w":[{"min-w":[b,r,"min","max","fit"]}],"max-w":[{"max-w":[b,r,"none","full","min","max","fit","prose",{screen:[_]},_]}],h:[{h:[b,r,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[b,r,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[b,r,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[b,r,"auto","min","max","fit"]}],"font-size":[{text:["base",_,O]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ee]}],"font-family":[{font:[X]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",b]}],"line-clamp":[{"line-clamp":["none",$,ee]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",G,b]}],"list-image":[{"list-image":["none",b]}],"list-style-type":[{list:["none","disc","decimal",b]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...V(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",G,O]}],"underline-offset":[{"underline-offset":["auto",G,b]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:x()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",b]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",b]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...D(),ot]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",nt]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},at]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...V(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:V()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...V()]}],"outline-offset":[{"outline-offset":[G,b]}],"outline-w":[{outline:[G,O]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[G,O]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",_,it]}],"shadow-color":[{shadow:[X]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...ue(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ue()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[n]}],contrast:[{contrast:[d]}],"drop-shadow":[{"drop-shadow":["","none",_,b]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[m]}],saturate:[{saturate:[A]}],sepia:[{sepia:[M]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[d]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[A]}],"backdrop-sepia":[{"backdrop-sepia":[M]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",b]}],duration:[{duration:B()}],ease:[{ease:["linear","in","out","in-out",b]}],delay:[{delay:B()}],animate:[{animate:["none","spin","ping","pulse","bounce",b]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[H,b]}],"translate-x":[{"translate-x":[U]}],"translate-y":[{"translate-y":[U]}],"skew-x":[{"skew-x":[I]}],"skew-y":[{"skew-y":[I]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",b]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",b]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":x()}],"scroll-mx":[{"scroll-mx":x()}],"scroll-my":[{"scroll-my":x()}],"scroll-ms":[{"scroll-ms":x()}],"scroll-me":[{"scroll-me":x()}],"scroll-mt":[{"scroll-mt":x()}],"scroll-mr":[{"scroll-mr":x()}],"scroll-mb":[{"scroll-mb":x()}],"scroll-ml":[{"scroll-ml":x()}],"scroll-p":[{"scroll-p":x()}],"scroll-px":[{"scroll-px":x()}],"scroll-py":[{"scroll-py":x()}],"scroll-ps":[{"scroll-ps":x()}],"scroll-pe":[{"scroll-pe":x()}],"scroll-pt":[{"scroll-pt":x()}],"scroll-pr":[{"scroll-pr":x()}],"scroll-pb":[{"scroll-pb":x()}],"scroll-pl":[{"scroll-pl":x()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",b]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[G,O,ee]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},pt=He(ut);function k(...e){return pt(we(e))}const Y=j.forwardRef(({className:e,...r},t)=>a.jsx("div",{ref:t,className:k("rounded-xl border bg-card text-card-foreground shadow",e),...r}));Y.displayName="Card";const ne=j.forwardRef(({className:e,...r},t)=>a.jsx("div",{ref:t,className:k("flex flex-col space-y-1.5 p-6",e),...r}));ne.displayName="CardHeader";const oe=j.forwardRef(({className:e,...r},t)=>a.jsx("div",{ref:t,className:k("font-semibold leading-none tracking-tight",e),...r}));oe.displayName="CardTitle";const se=j.forwardRef(({className:e,...r},t)=>a.jsx("div",{ref:t,className:k("text-sm text-muted-foreground",e),...r}));se.displayName="CardDescription";const q=j.forwardRef(({className:e,...r},t)=>a.jsx("div",{ref:t,className:k("p-6 pt-0",e),...r}));q.displayName="CardContent";const ft=j.forwardRef(({className:e,...r},t)=>a.jsx("div",{ref:t,className:k("flex items-center p-6 pt-0",e),...r}));ft.displayName="CardFooter";function me(e,r){if(typeof e=="function")return e(r);e!=null&&(e.current=r)}function bt(...e){return r=>{let t=!1;const n=e.map(o=>{const s=me(o,r);return!t&&typeof s=="function"&&(t=!0),s});if(t)return()=>{for(let o=0;o<n.length;o++){const s=n[o];typeof s=="function"?s():me(e[o],null)}}}}function gt(e){const r=ht(e),t=j.forwardRef((n,o)=>{const{children:s,...l}=n,i=j.Children.toArray(s),d=i.find(yt);if(d){const c=d.props.children,p=i.map(m=>m===d?j.Children.count(c)>1?j.Children.only(null):j.isValidElement(c)?c.props.children:null:m);return a.jsx(r,{...l,ref:o,children:j.isValidElement(c)?j.cloneElement(c,void 0,p):null})}return a.jsx(r,{...l,ref:o,children:s})});return t.displayName=`${e}.Slot`,t}var mt=gt("Slot");function ht(e){const r=j.forwardRef((t,n)=>{const{children:o,...s}=t;if(j.isValidElement(o)){const l=vt(o),i=wt(s,o.props);return o.type!==j.Fragment&&(i.ref=n?bt(n,l):l),j.cloneElement(o,i)}return j.Children.count(o)>1?j.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var xt=Symbol("radix.slottable");function yt(e){return j.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===xt}function wt(e,r){const t={...r};for(const n in r){const o=e[n],s=r[n];/^on[A-Z]/.test(n)?o&&s?t[n]=(...i)=>{const d=s(...i);return o(...i),d}:o&&(t[n]=o):n==="style"?t[n]={...o,...s}:n==="className"&&(t[n]=[o,s].filter(Boolean).join(" "))}return{...e,...t}}function vt(e){var n,o;let r=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,t=r&&"isReactWarning"in r&&r.isReactWarning;return t?e.ref:(r=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,t=r&&"isReactWarning"in r&&r.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}const he=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,xe=we,Ae=(e,r)=>t=>{var n;if((r==null?void 0:r.variants)==null)return xe(e,t==null?void 0:t.class,t==null?void 0:t.className);const{variants:o,defaultVariants:s}=r,l=Object.keys(o).map(c=>{const p=t==null?void 0:t[c],m=s==null?void 0:s[c];if(p===null)return null;const u=he(p)||he(m);return o[c][u]}),i=t&&Object.entries(t).reduce((c,p)=>{let[m,u]=p;return u===void 0||(c[m]=u),c},{}),d=r==null||(n=r.compoundVariants)===null||n===void 0?void 0:n.reduce((c,p)=>{let{class:m,className:u,...f}=p;return Object.entries(f).every(v=>{let[h,g]=v;return Array.isArray(g)?g.includes({...s,...i}[h]):{...s,...i}[h]===g})?[...c,m,u]:c},[]);return xe(e,l,d,t==null?void 0:t.class,t==null?void 0:t.className)},jt=Ae("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),ae=j.forwardRef(({className:e,variant:r,size:t,asChild:n=!1,...o},s)=>{const l=n?mt:"button";return a.jsx(l,{className:k(jt({variant:r,size:t,className:e})),ref:s,...o})});ae.displayName="Button";const J=j.forwardRef(({className:e,size:r="md",variant:t="default",...n},o)=>{const s={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},l={default:"border-gray-200 border-t-gray-900",solana:"border-gray-200 border-t-solana-primary"};return a.jsx("div",{ref:o,className:k("inline-block animate-spin rounded-full border-2",s[r],l[t],e),role:"status","aria-label":"Loading",...n,children:a.jsx("span",{className:"sr-only",children:"Loading..."})})});J.displayName="Spinner";const ie=j.forwardRef(({amount:e,description:r,onClick:t,disabled:n=!1,loading:o=!1,className:s,style:l,...i},d)=>{const c=p=>new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2}).format(p);return a.jsx(ae,{ref:d,onClick:t,disabled:n||o,className:k("w-full bg-solana-gradient hover:opacity-90 text-white font-semibold shadow-lg hover:shadow-xl transition-all duration-200 transform hover:scale-[1.02] rounded-xl",n||o?"opacity-50 cursor-not-allowed":"",s),style:l,...i,children:o?a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(J,{size:"sm",variant:"default",className:"border-white/30 border-t-white"}),a.jsx("span",{children:"Processing Payment..."})]}):a.jsxs("div",{className:"flex items-center justify-center gap-3",children:[a.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm3.5 6L12 10.5 8.5 8 12 5.5 15.5 8zM8.5 16L12 13.5 15.5 16 12 18.5 8.5 16z"})}),a.jsxs("span",{children:["Pay ",c(e)," USDC"]})]})})});ie.displayName="PaymentButton";const Ct=Ae("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function le({className:e,variant:r,...t}){return a.jsx("div",{className:k(Ct({variant:r}),e),...t})}const ce=({status:e,message:r,progress:t,className:n,style:o})=>{const l=(()=>{switch(e){case"idle":return{label:"Ready",color:"bg-gray-100 text-gray-800",icon:null};case"connecting":return{label:"Connecting",color:"bg-blue-100 text-blue-800",icon:a.jsx(J,{size:"sm",variant:"default"})};case"pending":return{label:"Processing",color:"bg-yellow-100 text-yellow-800",icon:a.jsx(J,{size:"sm",variant:"solana"})};case"success":return{label:"Paid",color:"bg-green-100 text-green-800",icon:a.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})};case"error":return{label:"Failed",color:"bg-red-100 text-red-800",icon:a.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})};default:return{label:"Unknown",color:"bg-gray-100 text-gray-800",icon:null}}})();return a.jsxs("div",{className:k("flex flex-col gap-2",n),style:o,children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs(le,{className:k("flex items-center gap-1.5",l.color),children:[l.icon,a.jsx("span",{children:l.label})]}),r&&a.jsx("span",{className:"text-sm text-muted-foreground",children:r})]}),t!==void 0&&t>0&&a.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2 overflow-hidden",children:a.jsx("div",{className:"bg-solana-gradient h-full transition-all duration-300",style:{width:`${t}%`}})})]})};ce.displayName="PaymentStatus";const de=({wallet:e,balance:r,network:t,showBalance:n=!0,className:o,style:s})=>{var c;const l=((c=e==null?void 0:e.publicKey)==null?void 0:c.toString())||(e==null?void 0:e.address),i=p=>`${p.slice(0,4)}...${p.slice(-4)}`,d=()=>t==="solana"?"Mainnet":"Devnet";return!e||!l?a.jsx(Y,{className:k("border-dashed",o),style:s,children:a.jsx(q,{className:"p-4 text-center text-muted-foreground",children:a.jsx("p",{className:"text-sm",children:"No wallet connected"})})}):a.jsx("div",{className:k("bg-slate-50 rounded-lg p-4 border border-slate-200",o),style:s,children:a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),a.jsx("span",{className:"text-sm font-medium text-slate-600",children:"Connected Wallet"})]}),a.jsx("code",{className:"text-sm font-mono bg-white px-3 py-1.5 rounded-md border border-slate-300 text-slate-800",children:i(l)})]}),n&&r&&a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("span",{className:"text-sm font-medium text-slate-600",children:"USDC Balance"}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-lg font-bold text-slate-900",children:r}),a.jsx("span",{className:"text-xs font-semibold text-slate-500 bg-slate-200 px-2 py-1 rounded-md",children:"USDC"})]})]}),t&&a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("span",{className:"text-sm font-medium text-slate-600",children:"Network"}),a.jsx(le,{variant:"outline",className:"text-xs border-slate-300 text-slate-700",children:d()})]})]})})};de.displayName="WalletSection";function kt(e,r,t){const n=Buffer.from(e.serialize()).toString("base64"),o={x402Version:t,scheme:r.scheme,network:r.network,payload:{transaction:n}};return Buffer.from(JSON.stringify(o)).toString("base64")}function Nt(e){if(e==="solana")return"https://api.mainnet-beta.solana.com";if(e==="solana-devnet")return"https://api.devnet.solana.com";throw new Error(`Unexpected network: ${e}`)}async function At(e,r,t,n){var U,R,T;const o=new N.Connection(n,"confirmed"),s=(U=t==null?void 0:t.extra)==null?void 0:U.feePayer;if(typeof s!="string"||!s)throw new Error("Missing facilitator feePayer in payment requirements (extra.feePayer).");const l=new N.PublicKey(s),i=((R=e==null?void 0:e.publicKey)==null?void 0:R.toString())||(e==null?void 0:e.address);if(!i)throw new Error("Missing connected Solana wallet address or publicKey");const d=new N.PublicKey(i);if(!(t!=null&&t.payTo))throw new Error("Missing payTo in payment requirements");const c=new N.PublicKey(t.payTo),p=[];if(p.push(N.ComputeBudgetProgram.setComputeUnitLimit({units:4e4})),p.push(N.ComputeBudgetProgram.setComputeUnitPrice({microLamports:1})),!t.asset)throw new Error("Missing token mint for SPL transfer");const m=new N.PublicKey(t.asset),u=await o.getAccountInfo(m,"confirmed"),f=((T=u==null?void 0:u.owner)==null?void 0:T.toBase58())===L.TOKEN_2022_PROGRAM_ID.toBase58()?L.TOKEN_2022_PROGRAM_ID:L.TOKEN_PROGRAM_ID,v=await L.getMint(o,m,void 0,f),h=await L.getAssociatedTokenAddress(m,d,!1,f),g=await L.getAssociatedTokenAddress(m,c,!1,f);if(!await o.getAccountInfo(h,"confirmed"))throw new Error(`User does not have an Associated Token Account for ${t.asset}. Please create one first or ensure you have the required token.`);if(!await o.getAccountInfo(g,"confirmed")){const P=new N.PublicKey("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"),x=new N.TransactionInstruction({keys:[{pubkey:l,isSigner:!0,isWritable:!0},{pubkey:g,isSigner:!1,isWritable:!0},{pubkey:c,isSigner:!1,isWritable:!1},{pubkey:m,isSigner:!1,isWritable:!1},{pubkey:N.SystemProgram.programId,isSigner:!1,isWritable:!1},{pubkey:f,isSigner:!1,isWritable:!1}],programId:P,data:Buffer.from([0])});p.push(x)}const A=BigInt(t.maxAmountRequired);p.push(L.createTransferCheckedInstruction(h,m,g,d,A,v.decimals,[],f));const{blockhash:S}=await o.getLatestBlockhash("confirmed"),M=new N.TransactionMessage({payerKey:l,recentBlockhash:S,instructions:p}).compileToV0Message(),I=new N.VersionedTransaction(M);if(typeof(e==null?void 0:e.signTransaction)!="function")throw new Error("Connected wallet does not support signTransaction");const E=await e.signTransaction(I);return kt(E,t,r)}function Pt(e,r,t,n=BigInt(0)){return async(o,s)=>{const l=await e(o,s);if(l.status!==402)return l;const i=await l.json(),d=i.x402Version,c=i.accepts||[],p=c.find(f=>f.scheme==="exact"&&(f.network==="solana-devnet"||f.network==="solana"));if(!p)throw console.error("❌ No suitable Solana payment requirements found. Available networks:",c.map(f=>f.network)),new Error("No suitable Solana payment requirements found");if(n>BigInt(0)&&BigInt(p.maxAmountRequired)>n)throw new Error("Payment amount exceeds maximum allowed");const m=await At(r,d,p,t),u={...s,headers:{...(s==null?void 0:s.headers)||{},"X-PAYMENT":m,"Access-Control-Expose-Headers":"X-PAYMENT-RESPONSE"}};return await e(o,u)}}var St=class{constructor(e){fe(this,"paymentFetch");const r=e.rpcUrl||Nt(e.network);this.paymentFetch=Pt(fetch.bind(window),e.wallet,r,e.maxPaymentAmount||BigInt(0))}async fetch(e,r){return this.paymentFetch(e,r)}};function Et(e){return new St(e)}function Pe(e){const[r,t]=z.useState("idle"),[n,o]=z.useState(null),[s,l]=z.useState(null),[i,d]=z.useState(!1),c=z.useCallback(()=>{t("idle"),o(null),l(null),d(!1)},[]);return{pay:z.useCallback(async(m,u)=>{var f;try{if(d(!0),t("pending"),o(null),e.maxPaymentAmount&&m>e.maxPaymentAmount)throw new Error(`Payment amount ${m} exceeds maximum allowed ${e.maxPaymentAmount}`);const v=((f=e.wallet.publicKey)==null?void 0:f.toString())||e.wallet.address;if(!v)throw new Error("Wallet not connected");const h=Et({wallet:e.wallet,network:e.network,rpcUrl:e.rpcUrl,maxPaymentAmount:e.maxPaymentAmount?BigInt(Math.floor(e.maxPaymentAmount*1e6)):void 0}),g="https://x402.payai.network/api/solana/paid-content",y=e.apiEndpoint||g;console.log("Initiating x402 payment:",{endpoint:y,isDemo:y===g,amount:m,description:u,wallet:v,network:e.network});const A=await h.fetch(y,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:u,amount:m})});if(!A.ok)throw new Error(`Payment request failed: ${A.statusText}`);const S=await A.json();console.log("Payment successful:",S);const M=A.headers.get("X-PAYMENT-RESPONSE");let I=`tx_${Date.now()}`;if(M)try{const E=JSON.parse(atob(M));I=E.transactionId||E.signature||I,console.log("Payment details:",E)}catch(E){console.warn("Could not decode payment response:",E)}return l(I),t("success"),d(!1),I}catch(v){const h=v instanceof Error?v:new Error("Payment failed");return o(h),t("error"),d(!1),null}},[e]),isLoading:i,status:r,error:n,transactionId:s,reset:c}}const Se=({amount:e,description:r,wallet:t,network:n="solana-devnet",rpcUrl:o,apiEndpoint:s,treasuryAddress:l,facilitatorUrl:i,theme:d="solana",showBalance:c=!0,showNetworkInfo:p=!0,showPaymentDetails:m=!0,classNames:u,customStyles:f,maxPaymentAmount:v,onPaymentStart:h,onPaymentSuccess:g,onPaymentError:y,onWalletConnect:C,children:A})=>{const[S,M]=z.useState(!1),[I,E]=z.useState("0.00"),{pay:U,isLoading:R,status:T,error:P,transactionId:x}=Pe({wallet:t,network:n,rpcUrl:o,apiEndpoint:s,treasuryAddress:l,facilitatorUrl:i,maxPaymentAmount:v});z.useEffect(()=>{var V;const D=((V=t.publicKey)==null?void 0:V.toString())||t.address;D&&(C==null||C(D),Re(D,n,o).then(E))},[t,n,C]),z.useEffect(()=>{T==="success"&&x&&(M(!0),g==null||g(x))},[T,x,g]),z.useEffect(()=>{P&&(y==null||y(P))},[P,y]);const Z=async()=>{h==null||h(),await U(e,r)};if(S)return a.jsx(a.Fragment,{children:A});const W=()=>{switch(d){case"solana":return"border-solana-primary/20";case"dark":return"bg-card";case"light":return"bg-background";default:return""}};return a.jsx("div",{className:k("flex items-center justify-center min-h-screen p-4","bg-gradient-to-br from-slate-900 via-slate-800 to-slate-900",u==null?void 0:u.container),style:f==null?void 0:f.container,children:a.jsxs(Y,{className:k("w-full max-w-lg shadow-2xl border-0 bg-white/95 backdrop-blur-sm",W(),u==null?void 0:u.card),style:f==null?void 0:f.card,children:[a.jsxs(ne,{className:"text-center pb-6",children:[a.jsx("div",{className:"mx-auto w-16 h-16 bg-solana-gradient rounded-full flex items-center justify-center mb-4",children:a.jsx("svg",{className:"w-8 h-8 text-white",fill:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})})}),a.jsx(oe,{className:k("text-3xl font-bold bg-solana-gradient bg-clip-text text-transparent",u==null?void 0:u.text),style:f==null?void 0:f.text,children:"Unlock Premium Access"}),a.jsx(se,{className:"text-lg text-slate-600 mt-2",children:r})]}),a.jsxs(q,{className:"space-y-6",children:[a.jsx(de,{wallet:t,balance:c?I:void 0,network:p?n:void 0,showBalance:c}),m&&a.jsxs("div",{className:"bg-gradient-to-r from-slate-50 to-slate-100 rounded-xl p-6 border border-slate-200",children:[a.jsxs("div",{className:"flex justify-between items-center mb-2",children:[a.jsx("span",{className:"text-sm font-medium text-slate-600",children:"Payment Amount"}),a.jsxs("span",{className:"text-2xl font-bold text-slate-900",children:["$",e.toFixed(2)]})]}),a.jsxs("div",{className:"flex justify-between items-center",children:[a.jsx("span",{className:"text-xs text-slate-500",children:"Currency"}),a.jsx("span",{className:"text-sm font-semibold text-slate-700 bg-slate-200 px-2 py-1 rounded-md",children:"USDC"})]}),v&&a.jsxs("div",{className:"flex justify-between items-center mt-2",children:[a.jsx("span",{className:"text-xs text-slate-500",children:"Maximum Amount"}),a.jsxs("span",{className:"text-xs text-slate-600",children:["$",v.toFixed(2)]})]})]}),T!=="idle"&&a.jsx(ce,{status:T,message:P==null?void 0:P.message,className:u==null?void 0:u.status,style:f==null?void 0:f.status}),a.jsx(ie,{amount:e,description:r,onClick:Z,loading:R,disabled:R,className:k("w-full h-12 text-lg font-semibold",u==null?void 0:u.button),style:f==null?void 0:f.button}),P&&a.jsx("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4",children:a.jsxs("p",{className:"text-sm text-red-800 text-center",children:[a.jsx("span",{className:"font-semibold",children:"Payment Error:"})," ",P.message]})}),a.jsx("div",{className:"bg-amber-50 border border-amber-200 rounded-lg p-4",children:a.jsxs("p",{className:"text-xs text-amber-800 text-center",children:[a.jsx("span",{className:"font-semibold",children:"Live Payments:"})," Uses PayAI facilitator on Solana Mainnet.",a.jsx("br",{}),"Requires real USDC balance. Test payments are refunded automatically."]})})]})]})})};Se.displayName="X402Paywall";exports.Badge=le;exports.Button=ae;exports.Card=Y;exports.CardContent=q;exports.CardDescription=se;exports.CardHeader=ne;exports.CardTitle=oe;exports.PaymentButton=ie;exports.PaymentStatus=ce;exports.Spinner=J;exports.WalletSection=de;exports.X402Paywall=Se;exports.cn=k;exports.useX402Payment=Pe;
|
|
1
|
+
"use strict";var Ke=Object.defineProperty;var Oe=(r,a,n)=>a in r?Ke(r,a,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[a]=n;var ke=(r,a,n)=>Oe(r,typeof a!="symbol"?a+"":a,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),A=require("react"),ce=require("@solana/wallet-adapter-react"),Te=require("@solana/wallet-adapter-react-ui"),ve=require("@solana/wallet-adapter-base"),ye=require("@solana/wallet-adapter-wallets"),T=require("@solana/web3.js"),U=require("@solana/spl-token");function _e(r){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const n in r)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(a,n,o.get?o:{enumerable:!0,get:()=>r[n]})}}return a.default=r,Object.freeze(a)}const C=_e(A);function We(r){return r==="solana"?"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v":"4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU"}function Ve(r){return r==="solana"?`https://mainnet.helius-rpc.com/?api-key=${process.env.VITE_HELIUS_API_KEY}`:"https://api.devnet.solana.com"}async function He(r,a,n){try{const o=n||Ve(a),i=new T.Connection(o,"confirmed"),l=new T.PublicKey(r),c=new T.PublicKey(We(a)),u=await U.getAssociatedTokenAddress(c,l),e=await U.getAccount(i,u);return(Number(e.amount)/1e6).toFixed(2)}catch(o){return console.error("Error fetching USDC balance:",o),"0.00"}}function Ee(r){var a,n,o="";if(typeof r=="string"||typeof r=="number")o+=r;else if(typeof r=="object")if(Array.isArray(r)){var i=r.length;for(a=0;a<i;a++)r[a]&&(n=Ee(r[a]))&&(o&&(o+=" "),o+=n)}else for(n in r)r[n]&&(o&&(o+=" "),o+=n);return o}function Pe(){for(var r,a,n=0,o="",i=arguments.length;n<i;n++)(r=arguments[n])&&(a=Ee(r))&&(o&&(o+=" "),o+=a);return o}const be="-",Xe=r=>{const a=qe(r),{conflictingClassGroups:n,conflictingClassGroupModifiers:o}=r;return{getClassGroupId:c=>{const u=c.split(be);return u[0]===""&&u.length!==1&&u.shift(),De(u,a)||Se(c)},getConflictingClassGroupIds:(c,u)=>{const e=n[c]||[];return u&&o[c]?[...e,...o[c]]:e}}},De=(r,a)=>{var c;if(r.length===0)return a.classGroupId;const n=r[0],o=a.nextPart.get(n),i=o?De(r.slice(1),o):void 0;if(i)return i;if(a.validators.length===0)return;const l=r.join(be);return(c=a.validators.find(({validator:u})=>u(l)))==null?void 0:c.classGroupId},je=/^\[(.+)\]$/,Se=r=>{if(je.test(r)){const a=je.exec(r)[1],n=a==null?void 0:a.substring(0,a.indexOf(":"));if(n)return"arbitrary.."+n}},qe=r=>{const{theme:a,prefix:n}=r,o={nextPart:new Map,validators:[]};return Ye(Object.entries(r.classGroups),n).forEach(([l,c])=>{ue(c,o,l,a)}),o},ue=(r,a,n,o)=>{r.forEach(i=>{if(typeof i=="string"){const l=i===""?a:Ne(a,i);l.classGroupId=n;return}if(typeof i=="function"){if(Je(i)){ue(i(o),a,n,o);return}a.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([l,c])=>{ue(c,Ne(a,l),n,o)})})},Ne=(r,a)=>{let n=r;return a.split(be).forEach(o=>{n.nextPart.has(o)||n.nextPart.set(o,{nextPart:new Map,validators:[]}),n=n.nextPart.get(o)}),n},Je=r=>r.isThemeGetter,Ye=(r,a)=>a?r.map(([n,o])=>{const i=o.map(l=>typeof l=="string"?a+l:typeof l=="object"?Object.fromEntries(Object.entries(l).map(([c,u])=>[a+c,u])):l);return[n,i]}):r,Ze=r=>{if(r<1)return{get:()=>{},set:()=>{}};let a=0,n=new Map,o=new Map;const i=(l,c)=>{n.set(l,c),a++,a>r&&(a=0,o=n,n=new Map)};return{get(l){let c=n.get(l);if(c!==void 0)return c;if((c=o.get(l))!==void 0)return i(l,c),c},set(l,c){n.has(l)?n.set(l,c):i(l,c)}}},ze="!",Qe=r=>{const{separator:a,experimentalParseClassName:n}=r,o=a.length===1,i=a[0],l=a.length,c=u=>{const e=[];let g=0,p=0,b;for(let h=0;h<u.length;h++){let y=u[h];if(g===0){if(y===i&&(o||u.slice(h,h+l)===a)){e.push(u.slice(p,h)),p=h+l;continue}if(y==="/"){b=h;continue}}y==="["?g++:y==="]"&&g--}const s=e.length===0?u:u.substring(p),v=s.startsWith(ze),N=v?s.substring(1):s,w=b&&b>p?b-p:void 0;return{modifiers:e,hasImportantModifier:v,baseClassName:N,maybePostfixModifierPosition:w}};return n?u=>n({className:u,parseClassName:c}):c},er=r=>{if(r.length<=1)return r;const a=[];let n=[];return r.forEach(o=>{o[0]==="["?(a.push(...n.sort(),o),n=[]):n.push(o)}),a.push(...n.sort()),a},rr=r=>({cache:Ze(r.cacheSize),parseClassName:Qe(r),...Xe(r)}),tr=/\s+/,nr=(r,a)=>{const{parseClassName:n,getClassGroupId:o,getConflictingClassGroupIds:i}=a,l=[],c=r.trim().split(tr);let u="";for(let e=c.length-1;e>=0;e-=1){const g=c[e],{modifiers:p,hasImportantModifier:b,baseClassName:s,maybePostfixModifierPosition:v}=n(g);let N=!!v,w=o(N?s.substring(0,v):s);if(!w){if(!N){u=g+(u.length>0?" "+u:u);continue}if(w=o(s),!w){u=g+(u.length>0?" "+u:u);continue}N=!1}const h=er(p).join(":"),y=b?h+ze:h,M=y+w;if(l.includes(M))continue;l.push(M);const m=i(w,N);for(let x=0;x<m.length;++x){const z=m[x];l.push(y+z)}u=g+(u.length>0?" "+u:u)}return u};function ar(){let r=0,a,n,o="";for(;r<arguments.length;)(a=arguments[r++])&&(n=Ie(a))&&(o&&(o+=" "),o+=n);return o}const Ie=r=>{if(typeof r=="string")return r;let a,n="";for(let o=0;o<r.length;o++)r[o]&&(a=Ie(r[o]))&&(n&&(n+=" "),n+=a);return n};function or(r,...a){let n,o,i,l=c;function c(e){const g=a.reduce((p,b)=>b(p),r());return n=rr(g),o=n.cache.get,i=n.cache.set,l=u,u(e)}function u(e){const g=o(e);if(g)return g;const p=nr(e,n);return i(e,p),p}return function(){return l(ar.apply(null,arguments))}}const j=r=>{const a=n=>n[r]||[];return a.isThemeGetter=!0,a},Re=/^\[(?:([a-z-]+):)?(.+)\]$/i,sr=/^\d+\/\d+$/,ir=new Set(["px","full","screen"]),lr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,dr=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,cr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,ur=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,br=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,$=r=>S(r)||ir.has(r)||sr.test(r),_=r=>q(r,"length",kr),S=r=>!!r&&!Number.isNaN(Number(r)),de=r=>q(r,"number",S),Y=r=>!!r&&Number.isInteger(Number(r)),xr=r=>r.endsWith("%")&&S(r.slice(0,-1)),f=r=>Re.test(r),W=r=>lr.test(r),gr=new Set(["length","size","percentage"]),pr=r=>q(r,gr,Le),fr=r=>q(r,"position",Le),hr=new Set(["image","url"]),wr=r=>q(r,hr,yr),mr=r=>q(r,"",vr),Z=()=>!0,q=(r,a,n)=>{const o=Re.exec(r);return o?o[1]?typeof a=="string"?o[1]===a:a.has(o[1]):n(o[2]):!1},kr=r=>dr.test(r)&&!cr.test(r),Le=()=>!1,vr=r=>ur.test(r),yr=r=>br.test(r),jr=()=>{const r=j("colors"),a=j("spacing"),n=j("blur"),o=j("brightness"),i=j("borderColor"),l=j("borderRadius"),c=j("borderSpacing"),u=j("borderWidth"),e=j("contrast"),g=j("grayscale"),p=j("hueRotate"),b=j("invert"),s=j("gap"),v=j("gradientColorStops"),N=j("gradientColorStopPositions"),w=j("inset"),h=j("margin"),y=j("opacity"),M=j("padding"),m=j("saturate"),x=j("scale"),z=j("sepia"),R=j("skew"),P=j("space"),E=j("translate"),L=()=>["auto","contain","none"],G=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto",f,a],k=()=>[f,a],D=()=>["",$,_],K=()=>["auto",S,f],ne=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],V=()=>["solid","dashed","dotted","double","none"],ae=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],H=()=>["start","end","center","between","around","evenly","stretch"],O=()=>["","0",f],le=()=>["auto","avoid","all","avoid-page","page","left","right","column"],F=()=>[S,f];return{cacheSize:500,separator:":",theme:{colors:[Z],spacing:[$,_],blur:["none","",W,f],brightness:F(),borderColor:[r],borderRadius:["none","","full",W,f],borderSpacing:k(),borderWidth:D(),contrast:F(),grayscale:O(),hueRotate:F(),invert:O(),gap:k(),gradientColorStops:[r],gradientColorStopPositions:[xr,_],inset:I(),margin:I(),opacity:F(),padding:k(),saturate:F(),scale:F(),sepia:O(),skew:F(),space:k(),translate:k()},classGroups:{aspect:[{aspect:["auto","square","video",f]}],container:["container"],columns:[{columns:[W]}],"break-after":[{"break-after":le()}],"break-before":[{"break-before":le()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...ne(),f]}],overflow:[{overflow:G()}],"overflow-x":[{"overflow-x":G()}],"overflow-y":[{"overflow-y":G()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[w]}],"inset-x":[{"inset-x":[w]}],"inset-y":[{"inset-y":[w]}],start:[{start:[w]}],end:[{end:[w]}],top:[{top:[w]}],right:[{right:[w]}],bottom:[{bottom:[w]}],left:[{left:[w]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Y,f]}],basis:[{basis:I()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",f]}],grow:[{grow:O()}],shrink:[{shrink:O()}],order:[{order:["first","last","none",Y,f]}],"grid-cols":[{"grid-cols":[Z]}],"col-start-end":[{col:["auto",{span:["full",Y,f]},f]}],"col-start":[{"col-start":K()}],"col-end":[{"col-end":K()}],"grid-rows":[{"grid-rows":[Z]}],"row-start-end":[{row:["auto",{span:[Y,f]},f]}],"row-start":[{"row-start":K()}],"row-end":[{"row-end":K()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",f]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",f]}],gap:[{gap:[s]}],"gap-x":[{"gap-x":[s]}],"gap-y":[{"gap-y":[s]}],"justify-content":[{justify:["normal",...H()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...H(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...H(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[M]}],px:[{px:[M]}],py:[{py:[M]}],ps:[{ps:[M]}],pe:[{pe:[M]}],pt:[{pt:[M]}],pr:[{pr:[M]}],pb:[{pb:[M]}],pl:[{pl:[M]}],m:[{m:[h]}],mx:[{mx:[h]}],my:[{my:[h]}],ms:[{ms:[h]}],me:[{me:[h]}],mt:[{mt:[h]}],mr:[{mr:[h]}],mb:[{mb:[h]}],ml:[{ml:[h]}],"space-x":[{"space-x":[P]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[P]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",f,a]}],"min-w":[{"min-w":[f,a,"min","max","fit"]}],"max-w":[{"max-w":[f,a,"none","full","min","max","fit","prose",{screen:[W]},W]}],h:[{h:[f,a,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[f,a,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[f,a,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[f,a,"auto","min","max","fit"]}],"font-size":[{text:["base",W,_]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",de]}],"font-family":[{font:[Z]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",f]}],"line-clamp":[{"line-clamp":["none",S,de]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",$,f]}],"list-image":[{"list-image":["none",f]}],"list-style-type":[{list:["none","disc","decimal",f]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[r]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[r]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...V(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",$,_]}],"underline-offset":[{"underline-offset":["auto",$,f]}],"text-decoration-color":[{decoration:[r]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",f]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",f]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ne(),fr]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",pr]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},wr]}],"bg-color":[{bg:[r]}],"gradient-from-pos":[{from:[N]}],"gradient-via-pos":[{via:[N]}],"gradient-to-pos":[{to:[N]}],"gradient-from":[{from:[v]}],"gradient-via":[{via:[v]}],"gradient-to":[{to:[v]}],rounded:[{rounded:[l]}],"rounded-s":[{"rounded-s":[l]}],"rounded-e":[{"rounded-e":[l]}],"rounded-t":[{"rounded-t":[l]}],"rounded-r":[{"rounded-r":[l]}],"rounded-b":[{"rounded-b":[l]}],"rounded-l":[{"rounded-l":[l]}],"rounded-ss":[{"rounded-ss":[l]}],"rounded-se":[{"rounded-se":[l]}],"rounded-ee":[{"rounded-ee":[l]}],"rounded-es":[{"rounded-es":[l]}],"rounded-tl":[{"rounded-tl":[l]}],"rounded-tr":[{"rounded-tr":[l]}],"rounded-br":[{"rounded-br":[l]}],"rounded-bl":[{"rounded-bl":[l]}],"border-w":[{border:[u]}],"border-w-x":[{"border-x":[u]}],"border-w-y":[{"border-y":[u]}],"border-w-s":[{"border-s":[u]}],"border-w-e":[{"border-e":[u]}],"border-w-t":[{"border-t":[u]}],"border-w-r":[{"border-r":[u]}],"border-w-b":[{"border-b":[u]}],"border-w-l":[{"border-l":[u]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...V(),"hidden"]}],"divide-x":[{"divide-x":[u]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[u]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:V()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...V()]}],"outline-offset":[{"outline-offset":[$,f]}],"outline-w":[{outline:[$,_]}],"outline-color":[{outline:[r]}],"ring-w":[{ring:D()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[r]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[$,_]}],"ring-offset-color":[{"ring-offset":[r]}],shadow:[{shadow:["","inner","none",W,mr]}],"shadow-color":[{shadow:[Z]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...ae(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ae()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[o]}],contrast:[{contrast:[e]}],"drop-shadow":[{"drop-shadow":["","none",W,f]}],grayscale:[{grayscale:[g]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[b]}],saturate:[{saturate:[m]}],sepia:[{sepia:[z]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[e]}],"backdrop-grayscale":[{"backdrop-grayscale":[g]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[b]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[m]}],"backdrop-sepia":[{"backdrop-sepia":[z]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",f]}],duration:[{duration:F()}],ease:[{ease:["linear","in","out","in-out",f]}],delay:[{delay:F()}],animate:[{animate:["none","spin","ping","pulse","bounce",f]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[Y,f]}],"translate-x":[{"translate-x":[E]}],"translate-y":[{"translate-y":[E]}],"skew-x":[{"skew-x":[R]}],"skew-y":[{"skew-y":[R]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",f]}],accent:[{accent:["auto",r]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",f]}],"caret-color":[{caret:[r]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",f]}],fill:[{fill:[r,"none"]}],"stroke-w":[{stroke:[$,_,de]}],stroke:[{stroke:[r,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},Nr=or(jr);function d(...r){return Nr(Pe(r))}const ee=C.forwardRef(({className:r,...a},n)=>t.jsx("div",{ref:n,className:d("rounded-xl border bg-card text-card-foreground shadow",r),...a}));ee.displayName="Card";const oe=C.forwardRef(({className:r,...a},n)=>t.jsx("div",{ref:n,className:d("flex flex-col space-y-1.5 p-6",r),...a}));oe.displayName="CardHeader";const se=C.forwardRef(({className:r,...a},n)=>t.jsx("div",{ref:n,className:d("font-semibold leading-none tracking-tight",r),...a}));se.displayName="CardTitle";const ie=C.forwardRef(({className:r,...a},n)=>t.jsx("div",{ref:n,className:d("text-sm text-muted-foreground",r),...a}));ie.displayName="CardDescription";const re=C.forwardRef(({className:r,...a},n)=>t.jsx("div",{ref:n,className:d("p-6 pt-0",r),...a}));re.displayName="CardContent";const Cr=C.forwardRef(({className:r,...a},n)=>t.jsx("div",{ref:n,className:d("flex items-center p-6 pt-0",r),...a}));Cr.displayName="CardFooter";function Ce(r,a){if(typeof r=="function")return r(a);r!=null&&(r.current=a)}function Fr(...r){return a=>{let n=!1;const o=r.map(i=>{const l=Ce(i,a);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let i=0;i<o.length;i++){const l=o[i];typeof l=="function"?l():Ce(r[i],null)}}}}function Ar(r){const a=Tr(r),n=C.forwardRef((o,i)=>{const{children:l,...c}=o,u=C.Children.toArray(l),e=u.find(Pr);if(e){const g=e.props.children,p=u.map(b=>b===e?C.Children.count(g)>1?C.Children.only(null):C.isValidElement(g)?g.props.children:null:b);return t.jsx(a,{...c,ref:i,children:C.isValidElement(g)?C.cloneElement(g,void 0,p):null})}return t.jsx(a,{...c,ref:i,children:l})});return n.displayName=`${r}.Slot`,n}var Mr=Ar("Slot");function Tr(r){const a=C.forwardRef((n,o)=>{const{children:i,...l}=n;if(C.isValidElement(i)){const c=zr(i),u=Dr(l,i.props);return i.type!==C.Fragment&&(u.ref=o?Fr(o,c):c),C.cloneElement(i,u)}return C.Children.count(i)>1?C.Children.only(null):null});return a.displayName=`${r}.SlotClone`,a}var Er=Symbol("radix.slottable");function Pr(r){return C.isValidElement(r)&&typeof r.type=="function"&&"__radixId"in r.type&&r.type.__radixId===Er}function Dr(r,a){const n={...a};for(const o in a){const i=r[o],l=a[o];/^on[A-Z]/.test(o)?i&&l?n[o]=(...u)=>{const e=l(...u);return i(...u),e}:i&&(n[o]=i):o==="style"?n[o]={...i,...l}:o==="className"&&(n[o]=[i,l].filter(Boolean).join(" "))}return{...r,...n}}function zr(r){var o,i;let a=(o=Object.getOwnPropertyDescriptor(r.props,"ref"))==null?void 0:o.get,n=a&&"isReactWarning"in a&&a.isReactWarning;return n?r.ref:(a=(i=Object.getOwnPropertyDescriptor(r,"ref"))==null?void 0:i.get,n=a&&"isReactWarning"in a&&a.isReactWarning,n?r.props.ref:r.props.ref||r.ref)}const Fe=r=>typeof r=="boolean"?`${r}`:r===0?"0":r,Ae=Pe,Be=(r,a)=>n=>{var o;if((a==null?void 0:a.variants)==null)return Ae(r,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:l}=a,c=Object.keys(i).map(g=>{const p=n==null?void 0:n[g],b=l==null?void 0:l[g];if(p===null)return null;const s=Fe(p)||Fe(b);return i[g][s]}),u=n&&Object.entries(n).reduce((g,p)=>{let[b,s]=p;return s===void 0||(g[b]=s),g},{}),e=a==null||(o=a.compoundVariants)===null||o===void 0?void 0:o.reduce((g,p)=>{let{class:b,className:s,...v}=p;return Object.entries(v).every(N=>{let[w,h]=N;return Array.isArray(h)?h.includes({...l,...u}[w]):{...l,...u}[w]===h})?[...g,b,s]:g},[]);return Ae(r,c,e,n==null?void 0:n.class,n==null?void 0:n.className)},Ir=Be("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),xe=C.forwardRef(({className:r,variant:a,size:n,asChild:o=!1,...i},l)=>{const c=o?Mr:"button";return t.jsx(c,{className:d(Ir({variant:a,size:n,className:r})),ref:l,...i})});xe.displayName="Button";const te=C.forwardRef(({className:r,size:a="md",variant:n="default",...o},i)=>{const l={sm:"h-4 w-4",md:"h-6 w-6",lg:"h-8 w-8"},c={default:"border-gray-200 border-t-gray-900",solana:"border-gray-200 border-t-solana-primary"};return t.jsx("div",{ref:i,className:d("inline-block animate-spin rounded-full border-2",l[a],c[n],r),role:"status","aria-label":"Loading",...o,children:t.jsx("span",{className:"sr-only",children:"Loading..."})})});te.displayName="Spinner";const Q=C.forwardRef(({amount:r,description:a,onClick:n,disabled:o=!1,loading:i=!1,className:l,style:c,customText:u,...e},g)=>{const p=b=>new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2}).format(b);return t.jsx(xe,{ref:g,onClick:n,disabled:o||i,className:d("w-full hover:opacity-90 text-white font-normal shadow-lg hover:shadow-xl transition-all duration-200 transform hover:scale-[1.02] rounded-xl",!c&&"bg-solana-gradient",o||i?"opacity-50 cursor-not-allowed":"",l),style:c,...e,children:i?t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(te,{size:"sm",variant:"default",className:"border-white/30 border-t-white"}),t.jsx("span",{children:"Processing Payment..."})]}):t.jsx("span",{children:u||`Pay ${p(r)} USDC`})})});Q.displayName="PaymentButton";const Rr=Be("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function ge({className:r,variant:a,...n}){return t.jsx("div",{className:d(Rr({variant:a}),r),...n})}const pe=({wallet:r,balance:a,network:n,showBalance:o=!0,onDisconnect:i,theme:l,className:c,style:u})=>{var b;const e=((b=r==null?void 0:r.publicKey)==null?void 0:b.toString())||(r==null?void 0:r.address),g=s=>`${s.slice(0,4)}...${s.slice(-4)}`,p=()=>n==="solana"?"Mainnet":"Devnet";return!r||!e?t.jsx(ee,{className:d("border-dashed",c),style:u,children:t.jsx(re,{className:"p-4 text-center text-muted-foreground",children:t.jsx("p",{className:"text-sm",children:"No wallet connected"})})}):t.jsx("div",{className:d("rounded-lg p-4 border",l==="seeker"||l==="seeker-2"?"border-[#FFFFFF1F]":"bg-slate-50 border-slate-200",c),style:u,children:t.jsxs("div",{className:"space-y-3",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("div",{className:"w-10 h-10 bg-gradient-to-r from-blue-500 to-purple-500 rounded-full flex items-center justify-center",children:t.jsx("span",{className:"text-white font-semibold text-sm",children:e.slice(0,2).toUpperCase()})}),t.jsxs("div",{children:[t.jsx("div",{className:d("text-xs font-medium drop-shadow-sm shadow-sm",l==="light"||l==="solana-light"?"text-[#71717A]":"text-[#FFFFFF66]"),children:"Connected Wallet"}),t.jsx("div",{className:d("text-sm font-mono",l==="light"||l==="solana-light"?"text-black":"text-white"),children:g(e)})]})]}),t.jsx("button",{onClick:i,className:d("text-sm font-medium transition-colors",l==="light"||l==="solana-light"?"text-red-500 hover:text-red-700":"text-[#FFFFFF66] hover:opacity-80"),children:"Disconnect"})]}),o&&a&&t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:"text-sm font-medium text-slate-600",children:"USDC Balance"}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("span",{className:"text-lg font-bold text-slate-900",children:a}),t.jsx("span",{className:"text-xs font-semibold text-slate-500 bg-slate-200 px-2 py-1 rounded-md",children:"USDC"})]})]}),n&&t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:"text-sm font-medium text-slate-600",children:"Network"}),t.jsx(ge,{variant:"outline",className:"text-xs border-slate-300 text-slate-700",children:p()})]})]})})};pe.displayName="WalletSection";function Lr(r,a,n){const o=Buffer.from(r.serialize()).toString("base64"),i={x402Version:n,scheme:a.scheme,network:a.network,payload:{transaction:o}};return Buffer.from(JSON.stringify(i)).toString("base64")}function Br(r){if(r==="solana")return"https://api.mainnet-beta.solana.com";if(r==="solana-devnet")return"https://api.devnet.solana.com";throw new Error(`Unexpected network: ${r}`)}async function $r(r,a,n,o){var E,L,G;const i=new T.Connection(o,"confirmed"),l=(E=n==null?void 0:n.extra)==null?void 0:E.feePayer;if(typeof l!="string"||!l)throw new Error("Missing facilitator feePayer in payment requirements (extra.feePayer).");const c=new T.PublicKey(l),u=((L=r==null?void 0:r.publicKey)==null?void 0:L.toString())||(r==null?void 0:r.address);if(!u)throw new Error("Missing connected Solana wallet address or publicKey");const e=new T.PublicKey(u);if(!(n!=null&&n.payTo))throw new Error("Missing payTo in payment requirements");const g=new T.PublicKey(n.payTo),p=[];if(p.push(T.ComputeBudgetProgram.setComputeUnitLimit({units:4e4})),p.push(T.ComputeBudgetProgram.setComputeUnitPrice({microLamports:1})),!n.asset)throw new Error("Missing token mint for SPL transfer");const b=new T.PublicKey(n.asset),s=await i.getAccountInfo(b,"confirmed"),v=((G=s==null?void 0:s.owner)==null?void 0:G.toBase58())===U.TOKEN_2022_PROGRAM_ID.toBase58()?U.TOKEN_2022_PROGRAM_ID:U.TOKEN_PROGRAM_ID,N=await U.getMint(i,b,void 0,v),w=await U.getAssociatedTokenAddress(b,e,!1,v),h=await U.getAssociatedTokenAddress(b,g,!1,v);if(!await i.getAccountInfo(w,"confirmed"))throw new Error(`User does not have an Associated Token Account for ${n.asset}. Please create one first or ensure you have the required token.`);if(!await i.getAccountInfo(h,"confirmed")){const I=new T.PublicKey("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"),k=new T.TransactionInstruction({keys:[{pubkey:c,isSigner:!0,isWritable:!0},{pubkey:h,isSigner:!1,isWritable:!0},{pubkey:g,isSigner:!1,isWritable:!1},{pubkey:b,isSigner:!1,isWritable:!1},{pubkey:T.SystemProgram.programId,isSigner:!1,isWritable:!1},{pubkey:v,isSigner:!1,isWritable:!1}],programId:I,data:Buffer.from([0])});p.push(k)}const m=BigInt(n.maxAmountRequired);p.push(U.createTransferCheckedInstruction(w,b,h,e,m,N.decimals,[],v));const{blockhash:x}=await i.getLatestBlockhash("confirmed"),z=new T.TransactionMessage({payerKey:c,recentBlockhash:x,instructions:p}).compileToV0Message(),R=new T.VersionedTransaction(z);if(typeof(r==null?void 0:r.signTransaction)!="function")throw new Error("Connected wallet does not support signTransaction");const P=await r.signTransaction(R);return Lr(P,n,a)}function Ur(r,a,n,o=BigInt(0)){return async(i,l)=>{const c=await r(i,l);if(c.status!==402)return c;const u=await c.json(),e=u.x402Version,g=u.accepts||[],p=g.find(v=>v.scheme==="exact"&&(v.network==="solana-devnet"||v.network==="solana"));if(!p)throw console.error("❌ No suitable Solana payment requirements found. Available networks:",g.map(v=>v.network)),new Error("No suitable Solana payment requirements found");if(o>BigInt(0)&&BigInt(p.maxAmountRequired)>o)throw new Error("Payment amount exceeds maximum allowed");const b=await $r(a,e,p,n),s={...l,headers:{...(l==null?void 0:l.headers)||{},"X-PAYMENT":b,"Access-Control-Expose-Headers":"X-PAYMENT-RESPONSE"}};return await r(i,s)}}var Gr=class{constructor(r){ke(this,"paymentFetch");const a=r.rpcUrl||Br(r.network);this.paymentFetch=Ur(fetch.bind(window),r.wallet,a,r.maxPaymentAmount||BigInt(0))}async fetch(r,a){return this.paymentFetch(r,a)}};function Kr(r){return new Gr(r)}function $e(r){const[a,n]=A.useState("idle"),[o,i]=A.useState(null),[l,c]=A.useState(null),[u,e]=A.useState(!1),g=A.useCallback(()=>{n("idle"),i(null),c(null),e(!1)},[]);return{pay:A.useCallback(async(b,s)=>{var v;try{if(e(!0),n("pending"),i(null),r.maxPaymentAmount&&b>r.maxPaymentAmount)throw new Error(`Payment amount ${b} exceeds maximum allowed ${r.maxPaymentAmount}`);const N=((v=r.wallet.publicKey)==null?void 0:v.toString())||r.wallet.address;if(!N)throw new Error("Wallet not connected");const w=Kr({wallet:r.wallet,network:r.network,rpcUrl:r.rpcUrl,maxPaymentAmount:r.maxPaymentAmount?BigInt(Math.floor(r.maxPaymentAmount*1e6)):void 0}),h="https://x402.payai.network/api/solana/paid-content",y=r.apiEndpoint||h;console.log("Initiating x402 payment:",{endpoint:y,isDemo:y===h,amount:b,description:s,wallet:N,network:r.network});const m=await w.fetch(y,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:s,amount:b})});if(!m.ok)throw new Error(`Payment request failed: ${m.statusText}`);let x;const z=m.headers.get("content-type");z&&z.includes("application/json")?x=await m.json():x={content:await m.text()},console.log("Payment successful:",x);const R=m.headers.get("X-PAYMENT-RESPONSE");let P=`tx_${Date.now()}`;if(R)try{const E=JSON.parse(atob(R));P=E.transactionId||E.signature||P,console.log("Payment details:",E)}catch(E){console.warn("Could not decode payment response:",E)}return c(P),n("success"),e(!1),P}catch(N){const w=N instanceof Error?N:new Error("Payment failed");return i(w),n("error"),e(!1),null}},[r]),isLoading:u,status:a,error:o,transactionId:l,reset:g}}const Me=({amount:r,description:a,wallet:n,network:o="solana-devnet",rpcUrl:i,apiEndpoint:l,treasuryAddress:c,facilitatorUrl:u,theme:e="solana-light",showPaymentDetails:g=!0,onDisconnect:p,classNames:b,customStyles:s,maxPaymentAmount:v,onPaymentStart:N,onPaymentSuccess:w,onPaymentError:h,onWalletConnect:y,children:M})=>{var fe,he,we;const m=ce.useWallet(),x=A.useMemo(()=>n||{publicKey:m.publicKey?{toString:()=>m.publicKey.toString()}:void 0,signTransaction:m.signTransaction},[n,m.publicKey,m.signTransaction]),[z,R]=A.useState(!1),[P,E]=A.useState("0.00"),L=A.useRef(null),{pay:G,isLoading:I,status:k,error:D,transactionId:K,reset:ne}=$e({wallet:x,network:o,rpcUrl:i,apiEndpoint:l,treasuryAddress:c,facilitatorUrl:u,maxPaymentAmount:v}),V=()=>{p?p():!n&&m.disconnect&&m.disconnect()},ae=n?n.publicKey||n.address:m.connected&&m.publicKey;A.useEffect(()=>(document.body.className=document.body.className.replace(/wallet-modal-theme-\w+/g,"").replace(/\s+/g," ").trim(),e&&(document.body.className+=` wallet-modal-theme-${e}`),()=>{document.body.className=document.body.className.replace(/wallet-modal-theme-\w+/g,"").replace(/\s+/g," ").trim()}),[e]),A.useEffect(()=>{var B,X;const J=((B=m.publicKey)==null?void 0:B.toString())||((X=n==null?void 0:n.publicKey)==null?void 0:X.toString())||(n==null?void 0:n.address);J&&m.connected&&(console.log("Wallet connected:",J),y==null||y(J),He(J,o,i).then(E)),!m.connected&&!n&&E("0.00")},[m.publicKey,m.connected,m.connecting,n,o,i,y]),A.useEffect(()=>{k==="success"&&K&&(R(!0),w==null||w(K))},[k,K,w]),A.useEffect(()=>{D&&(h==null||h(D))},[D,h]);const H=async()=>{N==null||N(),await G(r,a)};if(z)return t.jsx(t.Fragment,{children:M});const O=D&&(e==="dark"||e==="solana-dark"||e==="light"||e==="solana-light"||e==="seeker"||e==="seeker-2"),F=(()=>{switch(e){case"solana-dark":return{container:"",card:"!bg-[#171719] border-0 text-white rounded-xl",icon:"bg-slate-600",title:"",button:"bg-solana-gradient hover:opacity-90 text-white rounded-full",paymentDetails:"bg-[#0000001F] border-slate-600 text-white rounded-lg",walletSection:"bg-[#0000001F] border-slate-600 text-white rounded-lg",notice:"bg-amber-900/50 border-amber-700 text-white rounded-lg",securityMessage:"text-slate-400",helperText:"text-white",helperLink:void 0};case"seeker":return{container:"",card:"backdrop-blur-sm border-emerald-200 rounded-xl",icon:"bg-gradient-to-r from-emerald-500 to-teal-500",title:"text-white",button:"bg-gradient-to-r from-emerald-500 to-teal-500 hover:from-emerald-600 hover:to-teal-600 text-white rounded-full",paymentDetails:"rounded-lg",notice:"bg-cyan-50 border-cyan-200 text-cyan-800 rounded-lg",securityMessage:"text-white",helperText:"text-white"};case"seeker-2":return{container:"",card:"backdrop-blur-sm border-emerald-200 rounded-xl",icon:"bg-gradient-to-r from-emerald-500 to-teal-500",title:"text-white",button:"bg-gradient-to-r from-emerald-500 to-teal-500 hover:from-emerald-600 hover:to-teal-600 text-white rounded-full",paymentDetails:"rounded-lg",notice:"bg-cyan-50 border-cyan-200 text-cyan-800 rounded-lg",securityMessage:"text-white",helperText:"text-white"};case"terminal":return{container:"bg-gradient-to-br from-gray-900 via-black to-gray-800",card:"bg-black/90 backdrop-blur-sm border-green-400/30 text-green-400 rounded-xl",icon:"bg-green-400 text-black",title:"text-green-400 font-mono",button:"bg-green-400 text-black hover:bg-green-300 font-mono rounded-full",paymentDetails:"bg-gray-900/50 border-green-400/20 text-green-300 rounded-lg",notice:"bg-yellow-900/50 border-yellow-400/30 text-yellow-300 rounded-lg"};case"solana-light":return{container:"bg-gradient-to-b from-white via-pink-50 via-purple-50 via-blue-50 to-cyan-50",card:"bg-white/95 backdrop-blur-sm border border-slate-200 shadow-2xl rounded-2xl",icon:"bg-gradient-to-r from-blue-600 to-purple-600",title:"text-slate-900",button:"bg-solana-gradient hover:opacity-90 text-white font-light rounded-full",paymentDetails:"bg-slate-50 border border-slate-200 rounded-xl",notice:"text-slate-600",walletSection:"bg-slate-50 border border-slate-200 rounded-xl",securityMessage:"text-slate-600",helperText:"text-slate-600",helperLink:"text-purple-600 underline"};case"dark":return{container:"",card:"!bg-[#171719] border-slate-700 text-white rounded-xl",icon:"bg-slate-600",title:"",button:"bg-slate-600 hover:bg-slate-700 rounded-full",paymentDetails:"bg-[#0000001F] border-slate-600 text-white rounded-lg",walletSection:"bg-[#0000001F] border-slate-600 text-white rounded-lg",notice:"bg-amber-900/50 border-amber-700 text-white rounded-lg",securityMessage:"text-slate-400",helperText:"text-white",helperLink:void 0};case"light":return{container:"bg-gradient-to-b from-white via-pink-50 via-purple-50 via-blue-50 to-cyan-50",card:"bg-white/95 backdrop-blur-sm border border-slate-200 shadow-2xl rounded-2xl",icon:"bg-gradient-to-r from-blue-600 to-purple-600",title:"text-slate-900",button:"bg-black hover:bg-gray-800 text-white font-light rounded-full",paymentDetails:"bg-slate-50 border border-slate-200 rounded-xl",notice:"text-slate-600",walletSection:"bg-slate-50 border border-slate-200 rounded-xl",securityMessage:"text-slate-600",helperText:"text-slate-600",helperLink:"text-purple-600 underline"};default:return{container:"bg-gradient-to-br from-slate-900 via-slate-800 to-slate-900",card:"bg-white/95 backdrop-blur-sm rounded-xl",icon:"bg-slate-600",title:"text-slate-900",button:"bg-slate-600 hover:bg-slate-700 text-white rounded-full",paymentDetails:"bg-slate-50 border-slate-200 rounded-lg",notice:"bg-amber-50 border-amber-200 text-amber-800 rounded-lg"}}})();if(!ae){const B=(()=>{switch(e){case"solana-dark":return{container:"",card:"!bg-[#171719] border-0 text-white rounded-xl",button:"bg-solana-gradient hover:opacity-90 text-white rounded-full",paymentDetails:"bg-[#0000001F] border-slate-600 text-white rounded-lg",securityMessage:"text-slate-400",helperText:"text-white"};case"seeker":return{container:"",card:"backdrop-blur-sm border-emerald-200 rounded-xl",button:"bg-gradient-to-r from-emerald-500 to-teal-500 hover:from-emerald-600 hover:to-teal-600 text-white rounded-full",paymentDetails:"rounded-lg",securityMessage:"text-white",helperText:"text-white"};case"seeker-2":return{container:"",card:"backdrop-blur-sm border-emerald-200 rounded-xl",button:"bg-gradient-to-r from-emerald-500 to-teal-500 hover:from-emerald-600 hover:to-teal-600 text-white rounded-full",paymentDetails:"rounded-lg",securityMessage:"text-white",helperText:"text-white"};case"terminal":return{container:"bg-gradient-to-br from-gray-900 via-black to-gray-800",card:"bg-black/90 backdrop-blur-sm border-green-400/30 text-green-400 rounded-xl",button:"bg-green-400 text-black hover:bg-green-300 font-mono rounded-full",paymentDetails:"bg-gray-900/50 border-green-400/20 text-green-300 rounded-lg",securityMessage:"text-green-300",helperText:"text-green-300"};case"solana-light":return{container:"bg-gradient-to-b from-white via-pink-50 via-purple-50 via-blue-50 to-cyan-50",card:"bg-white/95 backdrop-blur-sm border border-slate-200 shadow-2xl rounded-2xl",button:"bg-solana-gradient hover:opacity-90 text-white font-light rounded-full",paymentDetails:"bg-slate-50 border border-slate-200 rounded-xl",securityMessage:"text-slate-600",helperText:"text-slate-600"};case"dark":return{container:"",card:"!bg-[#171719] border-slate-700 text-white rounded-xl",button:"bg-slate-600 hover:bg-slate-700 rounded-full",paymentDetails:"bg-[#0000001F] border-slate-600 text-white rounded-lg",securityMessage:"text-slate-400",helperText:"text-white"};case"light":return{container:"bg-gradient-to-b from-white via-pink-50 via-purple-50 via-blue-50 to-cyan-50",card:"bg-white/95 backdrop-blur-sm border border-slate-200 shadow-2xl rounded-2xl",button:"bg-black hover:bg-gray-800 text-white font-light rounded-full",paymentDetails:"bg-slate-50 border border-slate-200 rounded-xl",securityMessage:"text-slate-600",helperText:"text-slate-600"};default:return{container:"bg-gradient-to-b from-white via-pink-50 via-purple-50 via-blue-50 to-cyan-50",card:"bg-white/95 backdrop-blur-sm border border-slate-200 shadow-2xl rounded-2xl",button:"bg-solana-gradient hover:opacity-90 text-white font-light rounded-full",paymentDetails:"bg-slate-50 border border-slate-200 rounded-xl",securityMessage:"text-slate-600",helperText:"text-slate-600"}}})();return t.jsx("div",{className:d("flex items-center justify-center min-h-screen p-4",B.container,b==null?void 0:b.container),style:e==="dark"?{background:"linear-gradient(to bottom left, #db2777 0%, #9333ea 50%, #1e40af 100%)",...s==null?void 0:s.container}:e==="light"?{background:"linear-gradient(135deg, rgba(255, 255, 255, 0.6) 0%, rgba(236, 72, 153, 0.4) 33%, rgba(147, 51, 234, 0.4) 66%, rgba(34, 211, 238, 0.4) 100%)",...s==null?void 0:s.container}:e==="seeker"?{background:"radial-gradient(25% 200% at 50% 50%, #6CCEC6 0%, rgba(19, 77, 128, 0) 30%), radial-gradient(20% 20% at 50% 100%, rgba(66, 202, 189, 0.8) 0%, rgba(33, 100, 94, 0.8) 0%), linear-gradient(180deg, #001214 5%, #0D2734 100%)",...s==null?void 0:s.container}:e==="seeker-2"?{background:"radial-gradient(25% 200% at 50% 50%, #6CCEC6 0%, rgba(19, 77, 128, 0) 30%), radial-gradient(20% 20% at 50% 100%, rgba(66, 202, 189, 0.8) 0%, rgba(33, 100, 94, 0.8) 0%), linear-gradient(180deg, #001214 5%, #0D2734 100%)",...s==null?void 0:s.container}:s==null?void 0:s.container,children:t.jsxs(ee,{className:d("w-full max-w-lg shadow-2xl border-0",B.card,b==null?void 0:b.card),style:e==="seeker"?{backgroundColor:"#171719",...s==null?void 0:s.card}:e==="seeker-2"?{backgroundColor:"rgba(29, 35, 35, 1)",backdropFilter:"blur(12px)",...s==null?void 0:s.card}:s==null?void 0:s.card,children:[t.jsxs(oe,{className:"pb-6",children:[t.jsxs("div",{className:"flex items-center space-x-4 mb-6",children:[t.jsx("div",{className:"w-auto h-auto rounded-full p-[2px] flex items-center justify-center overflow-hidden",children:t.jsx("div",{className:"w-full h-full rounded-full flex items-center justify-center",children:t.jsx("img",{src:"/src/components/ui/SolanaLogo.svg",alt:"Solana",className:"w-12 h-auto"})})}),t.jsxs("div",{children:[t.jsx(se,{className:d("text-l fw-bold pb-1",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":e==="terminal"?"text-green-400 font-mono":"text-slate-900",b==null?void 0:b.text),children:"Premium Content XYZ"}),t.jsx(ie,{className:d("text-sm font-light",e==="terminal"?"text-green-300":e==="seeker"||e==="seeker-2"||e==="dark"||e==="solana-dark"?"text-white":"text-[#71717A]",b==null?void 0:b.text),children:"content.xyz"})]})]}),t.jsx("div",{className:d("border-b mb-6",e==="dark"||e==="solana-dark"?"border-slate-600":e==="seeker"||e==="seeker-2"?"":"border-slate-200"),style:e==="seeker"||e==="seeker-2"?{borderBottom:"1px solid #FFFFFF1F"}:void 0}),t.jsxs("div",{className:"text-center",children:[t.jsx("h2",{className:d("text-2xl font-normal mb-2",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":e==="terminal"?"text-green-400 font-mono":"text-slate-900"),children:"Payment Required"}),t.jsxs("p",{className:d("text-sm font-light",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":e==="terminal"?"text-green-300":"text-slate-600"),children:["Access to protected content. To access this content, please pay $",r.toFixed(2)," USDC"]})]})]}),t.jsxs(re,{className:"space-y-6",children:[t.jsxs("div",{className:d("p-6",B.paymentDetails),style:e==="seeker"||e==="seeker-2"?{backgroundColor:"rgba(0, 0, 0, 0.12)"}:e==="dark"||e==="solana-dark"?{boxShadow:"0px 0px 16px 4px #000000 inset"}:void 0,children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsx("span",{className:d("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":e==="terminal"?"text-green-300":"text-slate-900"),children:"Amount"}),t.jsxs("div",{className:d("text-xl font-bold",e==="light"||e==="solana-light"?"text-purple-600":e==="seeker"||e==="seeker-2"?"":e==="terminal"?"text-green-400":"text-[#21ECAB]"),style:e==="seeker"||e==="seeker-2"?{color:"#95D2E6"}:void 0,children:["$",r.toFixed(2)]})]}),t.jsx("div",{className:d("border-t mb-4",e==="dark"||e==="solana-dark"?"border-slate-600":e==="seeker"||e==="seeker-2"?"":e==="terminal"?"border-green-400/20":"border-slate-200"),style:e==="seeker"||e==="seeker-2"?{borderTop:"1px solid #FFFFFF1F"}:void 0}),t.jsxs("div",{className:"space-y-3",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:d("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":e==="terminal"?"text-green-300":"text-slate-900"),children:"Currency"}),t.jsx("div",{className:d("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":e==="terminal"?"text-green-300":"text-slate-900"),children:"USDC"})]}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:d("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":e==="terminal"?"text-green-300":"text-slate-900"),children:"Network"}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"w-2 h-2 rounded-full bg-green-500"}),t.jsx("span",{className:d("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":e==="terminal"?"text-green-300":"text-slate-900"),children:o==="solana"?"Mainnet":"Devnet"})]})]})]})]}),t.jsxs("div",{className:"flex items-center justify-center space-x-2",children:[t.jsxs("svg",{className:"w-4 h-4 text-green-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:"2",children:[t.jsx("path",{d:"M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4z"}),t.jsx("path",{d:"M9 12l2 2 4-4",strokeLinecap:"round",strokeLinejoin:"round"})]}),t.jsx("span",{className:d("text-sm",B.securityMessage),children:"Secure payment powered by Solana"})]}),t.jsxs("div",{className:"relative",children:[t.jsx("div",{ref:L,className:"absolute opacity-0 pointer-events-none -z-10",children:t.jsx(Te.WalletMultiButton,{})}),t.jsx(Q,{amount:r,description:a,customText:"Connect Wallet",onClick:()=>{var me;const X=(me=L.current)==null?void 0:me.querySelector("button");X==null||X.click()},className:d("w-full h-12",B.button),style:e==="dark"?{backgroundColor:"#FFFFFF1F",boxShadow:"0 1px 0 0 rgba(255, 255, 255, 0.3) inset"}:e==="seeker"||e==="seeker-2"?{background:"linear-gradient(0deg, #39A298, #39A298), radial-gradient(101.17% 101.67% at 50.28% 134.17%, rgba(255, 255, 255, 0.6) 0%, rgba(22, 188, 174, 0.6) 100%)",backgroundColor:"transparent"}:void 0})]}),t.jsx("div",{className:"text-center",children:t.jsxs("p",{className:d("text-sm",B.helperText),children:["Don't have USDC?"," ",t.jsxs("a",{href:"#",className:"font-medium text-[#4ADE80] underline",children:["Get it here",t.jsx("svg",{className:"inline w-3 h-3 ml-1 text-[#4ADE80]",fill:"currentColor",viewBox:"0 0 20 20",children:t.jsx("path",{fillRule:"evenodd",d:"M10.293 3.293a1 1 0 011.414 0l6 6a1 1 0 010 1.414l-6 6a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-4.293-4.293a1 1 0 010-1.414z",clipRule:"evenodd"})})]})]})})]})]})})}return t.jsx("div",{className:d("flex items-center justify-center min-h-screen p-4",F.container,b==null?void 0:b.container),style:e==="dark"?{background:"radial-gradient(circle at center, #ec4899 0%, #3b82f6 50%, #9333ea 100%)",...s==null?void 0:s.container}:e==="light"?{background:"linear-gradient(135deg, rgba(255, 255, 255, 0.6) 0%, rgba(236, 72, 153, 0.4) 33%, rgba(147, 51, 234, 0.4) 66%, rgba(34, 211, 238, 0.4) 100%)",...s==null?void 0:s.container}:e==="seeker"?{background:"radial-gradient(25% 200% at 50% 50%, #6CCEC6 0%, rgba(19, 77, 128, 0) 30%), radial-gradient(20% 20% at 50% 100%, rgba(66, 202, 189, 0.8) 0%, rgba(33, 100, 94, 0.8) 0%), linear-gradient(180deg, #001214 5%, #0D2734 100%)",...s==null?void 0:s.container}:e==="seeker-2"?{background:"radial-gradient(25% 200% at 50% 50%, #6CCEC6 0%, rgba(19, 77, 128, 0) 30%), radial-gradient(20% 20% at 50% 100%, rgba(66, 202, 189, 0.8) 0%, rgba(33, 100, 94, 0.8) 0%), linear-gradient(180deg, #001214 5%, #0D2734 100%)",...s==null?void 0:s.container}:s==null?void 0:s.container,children:t.jsxs(ee,{className:d("w-full max-w-lg shadow-2xl border-0",F.card,b==null?void 0:b.card),style:e==="seeker"?{backgroundColor:"#171719",...s==null?void 0:s.card}:e==="seeker-2"?{backgroundColor:"rgba(29, 35, 35, 1)",backdropFilter:"blur(12px)",...s==null?void 0:s.card}:s==null?void 0:s.card,children:[t.jsxs(oe,{className:"pb-6",children:[t.jsxs("div",{className:"flex items-center space-x-4 mb-6",children:[t.jsx("div",{className:"w-auto h-auto rounded-full p-[2px] flex items-center justify-center overflow-hidden",children:t.jsx("div",{className:"w-full h-full rounded-full flex items-center justify-center",children:t.jsx("img",{src:"/src/components/ui/SolanaLogo.svg",alt:"Solana",className:"w-12 h-auto"})})}),t.jsxs("div",{children:[t.jsx(se,{className:d("text-l fw-bold pb-1",F.title,b==null?void 0:b.text),style:s==null?void 0:s.text,children:"Premium Content XYZ"}),t.jsx(ie,{className:d("text-sm font-light",e==="terminal"?"text-green-300":e==="seeker"||e==="seeker-2"?"text-white":"text-[#71717A]"),children:"content.xyz"})]})]}),t.jsx("div",{className:d("border-b mb-6",e==="dark"||e==="solana-dark"?"border-slate-600":e==="seeker"||e==="seeker-2"?"":"border-slate-200"),style:e==="seeker"?{borderBottom:"1px solid #FFFFFF1F"}:e==="seeker-2"?{borderBottom:"1px solid #FFFFFF1F"}:void 0}),!O&&t.jsxs("div",{className:"text-center",children:[t.jsx("h2",{className:d("text-2xl font-normal mb-2",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":"text-slate-900"),children:"Payment Required"}),t.jsx("p",{className:d("text-sm font-light",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":"text-slate-600"),children:"Access to protected content on base-sepolia. To access this content, please pay $0.01 Base Sepolia USDC"})]})]}),t.jsx(re,{className:"space-y-6",children:O?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"flex justify-center mb-4",children:t.jsx("div",{className:"w-16 h-16 rounded-full bg-red-500 flex items-center justify-center",children:t.jsx("svg",{className:"w-8 h-8 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:"3",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})}),t.jsx("div",{className:"text-center mb-2",children:t.jsx("h3",{className:d("text-2xl font-semibold",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":"text-slate-900"),children:"Payment Failed"})}),t.jsx("p",{className:d("text-center text-sm mb-6",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-gray-400":"text-slate-600"),children:(D==null?void 0:D.message)||"It looks like your wallet doesn't have enough funds or the transaction was declined. Please review the details and try again."}),t.jsx("div",{className:d("rounded-lg p-6",e==="dark"||e==="solana-dark"?"bg-[#0000001F] border border-slate-600":e==="seeker"||e==="seeker-2"?"bg-[rgba(0,0,0,0.12)] border border-white/10":"bg-slate-50 border border-slate-200"),children:t.jsxs("div",{className:"space-y-3",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:d("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":"text-slate-900"),children:"Amount Paid"}),t.jsxs("span",{className:d("text-sm font-semibold",e==="light"||e==="solana-light"?"text-purple-600":"text-green-500"),children:["$",r.toFixed(2)]})]}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:d("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":"text-slate-900"),children:"Wallet"}),t.jsx("span",{className:d("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":"text-slate-900"),children:(fe=x==null?void 0:x.publicKey)!=null&&fe.toString()?`${x.publicKey.toString().slice(0,6)}...${x.publicKey.toString().slice(-4)}`:x!=null&&x.address?`${x.address.slice(0,6)}...${x.address.slice(-4)}`:"Not connected"})]}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:d("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":"text-slate-900"),children:"Available Balance"}),t.jsxs("span",{className:d("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":"text-slate-900"),children:["$",P]})]}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:d("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":"text-slate-900"),children:"Currency"}),t.jsx("span",{className:d("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":"text-slate-900"),children:"USDC"})]}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:d("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":"text-slate-900"),children:"Network"}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"w-2 h-2 rounded-full bg-green-500"}),t.jsx("span",{className:d("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":"text-slate-900"),children:"Solana"})]})]})]})}),t.jsxs("div",{className:d("rounded-lg p-4 flex items-start space-x-3",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"bg-orange-900/50 border border-orange-700":"bg-orange-50 border border-orange-200"),children:[t.jsx("div",{className:"flex-shrink-0",children:t.jsx("div",{className:"w-6 h-6 rounded-full bg-orange-500 flex items-center justify-center",children:t.jsx("svg",{className:"w-4 h-4 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:"2",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})})}),t.jsx("p",{className:d("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":"text-orange-800"),children:"Make sure your Solana wallet has enough USDC to cover the amount before retrying the transaction."})]}),t.jsx(Q,{amount:r,description:a,onClick:()=>{ne(),H()},loading:I,disabled:I||!(x!=null&&x.publicKey),className:d("w-full h-12",e==="dark"||e==="solana-dark"?e==="dark"?"bg-[#FFFFFF1F] rounded-full":"bg-solana-gradient rounded-full":e==="light"?"bg-black hover:bg-gray-800 text-white font-light rounded-full":e==="solana-light"?"bg-solana-gradient hover:opacity-90 text-white font-light rounded-full":e==="seeker"||e==="seeker-2"?"bg-gradient-to-r from-emerald-500 to-teal-500 hover:from-emerald-600 hover:to-teal-600 text-white rounded-full":"bg-solana-gradient rounded-full",b==null?void 0:b.button),style:e==="dark"?{backgroundColor:"#FFFFFF1F",boxShadow:"0 1px 0 0 rgba(255, 255, 255, 0.3) inset",...s==null?void 0:s.button}:e==="light"||e==="solana-light"?s==null?void 0:s.button:e==="seeker"?{background:"linear-gradient(0deg, #39A298, #39A298), radial-gradient(101.17% 101.67% at 50.28% 134.17%, rgba(255, 255, 255, 0.6) 0%, rgba(22, 188, 174, 0.6) 100%)",backgroundColor:"transparent",...s==null?void 0:s.button}:e==="seeker-2"?{background:"linear-gradient(0deg, #39A298, #39A298), radial-gradient(101.17% 101.67% at 50.28% 134.17%, rgba(255, 255, 255, 0.6) 0%, rgba(22, 188, 174, 0.6) 100%)",backgroundColor:"transparent",...s==null?void 0:s.button}:s==null?void 0:s.button,customText:"Try Again"}),t.jsx("div",{className:"text-center",children:t.jsxs("p",{className:d("text-sm",e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-white":"text-slate-900"),children:[t.jsx("span",{className:d(e==="dark"||e==="solana-dark"||e==="seeker"||e==="seeker-2"?"text-gray-400":"text-slate-600"),children:"Don't have USDC? "}),t.jsxs("a",{href:"https://www.coinbase.com/how-to-buy/usdc",target:"_blank",rel:"noopener noreferrer",className:d("font-medium hover:opacity-80",e==="light"||e==="solana-light"?"text-purple-600":"text-green-400 hover:text-green-300"),children:["Get it here",t.jsx("svg",{className:d("inline w-3 h-3 ml-1",e==="light"||e==="solana-light"?"text-purple-600":"text-green-400"),fill:"currentColor",viewBox:"0 0 20 20",children:t.jsx("path",{fillRule:"evenodd",d:"M10.293 3.293a1 1 0 011.414 0l6 6a1 1 0 010 1.414l-6 6a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-4.293-4.293a1 1 0 010-1.414z",clipRule:"evenodd"})})]})]})})]}):t.jsxs(t.Fragment,{children:[t.jsx(pe,{wallet:x,onDisconnect:V,theme:e,className:d("mb-4",(e==="dark"||e==="solana-dark")&&"bg-[#0000001F] border-slate-600 text-white"),style:e==="dark"||e==="solana-dark"?{boxShadow:"0px 0px 16px 4px #000000 inset"}:void 0}),g&&(e==="seeker"||e==="seeker-2"?t.jsxs("div",{className:d("p-6",F.paymentDetails),style:{backgroundColor:"rgba(0, 0, 0, 0.12)"},children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsx("span",{className:"text-sm text-white",children:"Amount"}),t.jsx("div",{className:"text-xl font-bold",style:{color:"#95D2E6"},children:r.toFixed(2)})]}),t.jsx("div",{className:"border-t mb-4",style:{borderTop:"1px solid #FFFFFF1F"}}),t.jsxs("div",{className:"space-y-3",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:"text-sm text-white",children:"Wallet"}),t.jsx("div",{className:"text-sm text-white",children:(he=x==null?void 0:x.publicKey)!=null&&he.toString()?`${x.publicKey.toString().slice(0,6)}...${x.publicKey.toString().slice(-4)}`:x!=null&&x.address?`${x.address.slice(0,6)}...${x.address.slice(-4)}`:"Not connected"})]}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:"text-sm text-white",children:"Available Balance"}),t.jsxs("div",{className:"text-sm text-white",children:["$",P]})]}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:"text-sm text-white",children:"Currency"}),t.jsx("div",{className:"text-sm text-white",children:"USDC"})]}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:"text-sm text-white",children:"Network"}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:"#95D2E6"}}),t.jsx("span",{className:"text-sm text-white",children:"Solana"})]})]})]})]}):t.jsxs("div",{className:d("p-6",F.paymentDetails),style:e==="dark"||e==="solana-dark"?{boxShadow:"0px 0px 16px 4px #000000 inset"}:void 0,children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsx("span",{className:d("text-sm",e==="dark"||e==="solana-dark"?"text-white":"text-black"),children:"Amount"}),t.jsxs("div",{className:d("text-xl font-bold",e==="light"||e==="solana-light"?"text-purple-600":"text-[#21ECAB]"),children:["$",r.toFixed(2)]})]}),t.jsx("div",{className:d("border-t mb-4",e==="dark"||e==="solana-dark"?"border-slate-600":"border-slate-200")}),t.jsxs("div",{className:"space-y-3",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:d("text-sm",e==="dark"||e==="solana-dark"?"text-white":"text-black"),children:"Wallet"}),t.jsx("div",{className:d("text-sm",e==="dark"||e==="solana-dark"?"text-white":"text-slate-900"),children:(we=x==null?void 0:x.publicKey)!=null&&we.toString()?`${x.publicKey.toString().slice(0,6)}...${x.publicKey.toString().slice(-4)}`:x!=null&&x.address?`${x.address.slice(0,6)}...${x.address.slice(-4)}`:"Not connected"})]}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:d("text-sm",e==="dark"||e==="solana-dark"?"text-white":"text-black"),children:"Available Balance"}),t.jsxs("div",{className:d("text-sm",e==="dark"||e==="solana-dark"?"text-white":"text-slate-900"),children:["$",P]})]}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:d("text-sm",e==="dark"||e==="solana-dark"?"text-white":"text-black"),children:"Currency"}),t.jsx("div",{className:d("text-sm",e==="dark"||e==="solana-dark"?"text-white":"text-slate-900"),children:"USDC"})]}),t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:d("text-sm",e==="dark"||e==="solana-dark"?"text-white":"text-black"),children:"Network"}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("div",{className:d("w-2 h-2 rounded-full","bg-green-500")}),t.jsx("span",{className:d("text-sm",e==="dark"||e==="solana-dark"?"text-white":"text-slate-900"),children:"Solana"})]})]})]})]})),t.jsxs("div",{className:"flex items-center justify-center space-x-2",children:[t.jsxs("svg",{className:"w-4 h-4 text-green-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:"2",children:[t.jsx("path",{d:"M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4z"}),t.jsx("path",{d:"M9 12l2 2 4-4",strokeLinecap:"round",strokeLinejoin:"round"})]}),t.jsx("span",{className:d("text-sm",F.securityMessage),style:e==="seeker"?{color:"#FFFFFF66"}:e==="seeker-2"?{color:"#FFFFFF66"}:void 0,children:"Secure payment powered by Solana"})]}),t.jsx(Q,{amount:r,description:a,onClick:H,loading:I,disabled:I||!(x!=null&&x.publicKey),className:d("w-full h-12",e==="dark"||e==="solana-dark"?e==="dark"?"bg-[#FFFFFF1F] rounded-full":"bg-solana-gradient rounded-full":F.button,b==null?void 0:b.button),style:e==="dark"?{backgroundColor:"#FFFFFF1F",boxShadow:"0 1px 0 0 rgba(255, 255, 255, 0.3) inset",...s==null?void 0:s.button}:e==="seeker"?{background:"linear-gradient(0deg, #39A298, #39A298), radial-gradient(101.17% 101.67% at 50.28% 134.17%, rgba(255, 255, 255, 0.6) 0%, rgba(22, 188, 174, 0.6) 100%)",backgroundColor:"transparent",...s==null?void 0:s.button}:e==="seeker-2"?{background:"linear-gradient(0deg, #39A298, #39A298), radial-gradient(101.17% 101.67% at 50.28% 134.17%, rgba(255, 255, 255, 0.6) 0%, rgba(22, 188, 174, 0.6) 100%)",backgroundColor:"transparent",...s==null?void 0:s.button}:s==null?void 0:s.button}),D&&t.jsx("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4",children:t.jsxs("p",{className:"text-sm text-red-800 text-center",children:[t.jsx("span",{className:"font-semibold",children:"Payment Error:"})," ",D.message]})}),t.jsx("div",{className:"text-center",children:t.jsxs("p",{className:d("text-sm",F.helperText),children:[t.jsxs("span",{style:e==="seeker"?{color:"#FFFFFF66"}:e==="seeker-2"?{color:"#FFFFFF66"}:void 0,children:["Don't have USDC?"," "]}),t.jsxs("a",{href:"#",className:d("font-medium",e==="seeker"||e==="seeker-2"?"text-[#4ADE80]":F.helperLink||"text-[#4ADE80]"),style:e==="seeker"?{color:"#4ADE80"}:e==="seeker-2"?{color:"#4ADE80"}:void 0,children:["Get it here",t.jsx("svg",{className:d("inline w-3 h-3 ml-1",e==="light"?"text-purple-600":"text-[#4ADE80]"),fill:"currentColor",viewBox:"0 0 20 20",children:t.jsx("path",{fillRule:"evenodd",d:"M10.293 3.293a1 1 0 011.414 0l6 6a1 1 0 010 1.414l-6 6a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-4.293-4.293a1 1 0 010-1.414z",clipRule:"evenodd"})})]})]})})]})})]})})},Ue=({autoSetupProviders:r=!0,providerNetwork:a,providerEndpoint:n,...o})=>{const i=a??(o.network==="solana"?ve.WalletAdapterNetwork.Mainnet:ve.WalletAdapterNetwork.Devnet);if(r){const l=A.useMemo(()=>n||o.rpcUrl||T.clusterApiUrl(i),[n,o.rpcUrl,i]),c=A.useMemo(()=>[new ye.PhantomWalletAdapter,new ye.SolflareWalletAdapter],[]);return t.jsx(ce.ConnectionProvider,{endpoint:l,children:t.jsx(ce.WalletProvider,{wallets:c,autoConnect:!1,children:t.jsx(Te.WalletModalProvider,{children:t.jsx(Me,{...o})})})})}return t.jsx(Me,{...o})};Ue.displayName="X402Paywall";const Ge=({status:r,message:a,progress:n,className:o,style:i})=>{const c=(()=>{switch(r){case"idle":return{label:"Ready",color:"bg-gray-100 text-gray-800",icon:null};case"connecting":return{label:"Connecting",color:"bg-blue-100 text-blue-800",icon:t.jsx(te,{size:"sm",variant:"default"})};case"pending":return{label:"Processing",color:"bg-yellow-100 text-yellow-800",icon:t.jsx(te,{size:"sm",variant:"solana"})};case"success":return{label:"Paid",color:"bg-green-100 text-green-800",icon:t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})};case"error":return{label:"Failed",color:"bg-red-100 text-red-800",icon:t.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})};default:return{label:"Unknown",color:"bg-gray-100 text-gray-800",icon:null}}})();return t.jsxs("div",{className:d("flex flex-col gap-2",o),style:i,children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsxs(ge,{className:d("flex items-center gap-1.5",c.color),children:[c.icon,t.jsx("span",{children:c.label})]}),a&&t.jsx("span",{className:"text-sm text-muted-foreground",children:a})]}),n!==void 0&&n>0&&t.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2 overflow-hidden",children:t.jsx("div",{className:"bg-solana-gradient h-full transition-all duration-300",style:{width:`${n}%`}})})]})};Ge.displayName="PaymentStatus";exports.Badge=ge;exports.Button=xe;exports.Card=ee;exports.CardContent=re;exports.CardDescription=ie;exports.CardHeader=oe;exports.CardTitle=se;exports.PaymentButton=Q;exports.PaymentStatus=Ge;exports.Spinner=te;exports.WalletSection=pe;exports.X402Paywall=Ue;exports.cn=d;exports.useX402Payment=$e;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|