1__d(function(g,r,i,_a,m,e,d){var t=r(d[0]).default,n=r(d[1]).default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){const t=(0,r(d[10]).useRouter)(),{coachId:n,loading:s,refresh:S}=(0,r(d[11]).useCoachWorkspace)(),C=(0,r(d[12]).useCoachEarningsSummary)(),[w,F]=(0,o.useState)('month'),[k,v]=(0,o.useState)(null),[A,E]=(0,o.useState)(!0),[z,D]=(0,o.useState)(0),[I,P]=(0,o.useState)(0),[R,W]=(0,o.useState)('usd'),[L,H]=(0,o.useState)(!0),[_,V]=(0,o.useState)(!1),[N,M]=(0,o.useState)([]),[q,U]=(0,o.useState)(!0),[$,O]=(0,o.useState)(!1),[Y,G]=(0,o.useState)(!1),J=C.data,K=s||!J&&(C.isLoading||C.isFetching),Q=!!n,X=k?.connected&&k?.detailsSubmitted&&k?.payoutsEnabled,Z=(0,o.useCallback)(async()=>{if(n){E(!0),H(!0),U(!0),V(!1);try{const[t,o]=await Promise.all([r(d[13],"../../services/StripeConnectService").StripeConnectService.getConnectStatus(n),r(d[13],"../../services/StripeConnectService").StripeConnectService.getPayoutHistory(n)]);v(t),M(o);try{const t=await r(d[13],"../../services/StripeConnectService").StripeConnectService.getAvailableBalance(n);D(t.available),P(t.pending),W(t.currency)}catch(t){console.error('Balance unavailable:',t),V(!0)}}catch(t){console.error('Error loading Stripe data:',t)}finally{E(!1),H(!1),U(!1)}}},[n]);(0,o.useEffect)(()=>{n&&Z()},[n,Z]);const ee=(0,o.useCallback)(async()=>{await Promise.all([C.refetch(),Z()])},[C,Z]),te=(0,o.useCallback)(()=>{if(!n||z<=0)return;const t=T(z,R);(0,r(d[14]).showConfirm)('Request Payout',`Transfer ${t}
1 to your bank account? Funds typically arrive within 2 business days.`,async()=>{O(!0);try{const t=await r(d[13],"../../services/StripeConnectService").StripeConnectService.requestPayout(n);if(t.success){const n=t.estimated_arrival?b(t.estimated_arrival):'within 2 business days';(0,r(d[14]).showAlert)('Payout initiated',`${T(t.amount||0,t.currency||R)} is on its way. Estimated arrival: ${n}.`),await Z()}else'payout_in_progress'===t.code&&t.existing_payout?(0,r(d[14]).showAlert)('Payout already in progress',`A payout of ${T(t.existing_payout.amount,t.existing_payout.currency)} is already being processed.`):'insufficient_balance'===t.code?(0,r(d[14]).showAlert)('No funds available',t.error||'No funds available for payout.'):'account_restricted'===t.code?(0,r(d[14]).showAlert)('Account restricted','Your Stripe account has restrictions. Please visit your Stripe dashboard to resolve any issues.'):(0,r(d[14]).showAlert)('Payout failed',t.error||'Unable to process payout. Please try again.')}catch(t){(0,r(d[14]).showAlert)('Error',t.message||'An unexpected error occurred.')}finally{O(!1)}},{confirmText:'Confirm Payout'})},[n,z,R,Z]),ne=(0,o.useCallback)(async()=>{if(n){G(!0);try{const t=await r(d[13],"../../services/StripeConnectService").StripeConnectService.startOnboarding(n);if(t.success&&t.url){const n=(0,r(d[15]).getSafeExternalUrl)(t.url);if(!n)throw new Error('Stripe returned an invalid onboarding link.');window.location.assign(n)}else(0,r(d[14]).showAlert)('Error',t.error||'Failed to start Stripe setup.')}catch(t){(0,r(d[14]).showAlert)('Error',t.message||'Failed to start Stripe setup.')}finally{G(!1)}}},[n]),re=(0,o.useCallback)(async()=>{if(n)try{const t=await r(d[13],"../../services/StripeConnectService").StripeConnectService.getDashboardLink(n);if(t.success&&t.url){const n=(0,r(d[15]).getSafeExternalUrl)(t.url);if(!n)throw new Error('Stripe returned an invalid dashboard link.');'undefined'!=typeof window?window.open(n,'_blank','noopener,noreferrer'):await(0,r(d[15]).openSafeExternalUrl)(n)}else(0,r(d[14]).showAlert)('Error',t.error||'Failed to open Stripe dashboard.')}catch(t){(0,r(d[14]).showAlert)('Error',t.message||'Failed to open Stripe dashboard.')}},[n]),oe=(0,o.useMemo)(()=>{if(!J)return{current:0,previous:0,sessions:0,average:0};const t=J.period[w];return{current:t.current.total,previous:t.previous.total,sessions:t.current.sessions,average:t.current.averagePerSession}},[w,J]),ie=j(oe.current,oe.previous),ae=J?.transactions[0]?.currency||R||'USD',se=(0,o.useMemo)(()=>{if(!J)return[];return Object.entries(J.breakdown||{}).filter(([,t])=>t>0).map(([t,n])=>({label:x[t]||y(t.replace(/_/g,' ')),value:n})).sort((t,n)=>n.value-t.value).slice(0,4)},[J]);if(!Q&&!s)return(0,r(d[16]).jsx)(r(d[19]).ThemedView,{style:B.container,children:(0,r(d[16]).jsxs)(a.default,{style:B.missingContainer,children:[(0,r(d[16]).jsx)(r(d[17]).Ionicons,{name:"wallet-outline",size:48,color:"#94A3B8"}),(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.missingTitle,children:"Connect Your Coach Workspace"}),(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.missingDescription,children:"Earnings unlock after we confirm your coach profile. Refresh the connection or finish onboarding to continue."}),(0,r(d[16]).jsx)(c.default,{style:B.retryButton,onPress:S,children:(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.retryButtonText,children:"Retry Connection"})})]})});if(K)return(0,r(d[16]).jsx)(r(d[19]).ThemedView,{style:B.container,children:(0,r(d[16]).jsxs)(a.default,{style:B.loadingContainer,children:[(0,r(d[16]).jsx)(h.default,{size:"large",color:"#007AFF"}),(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.loadingText,children:"Loading earnings..."})]})});if(C.isError)return(0,r(d[16]).jsx)(r(d[19]).ThemedView,{style:B.container,children:(0,r(d[16]).jsxs)(a.default,{style:B.errorContainer,children:[(0,r(d[16]).jsx)(r(d[17]).Ionicons,{name:"alert-circle",size:40,color:"#EF4444"}),(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.errorTitle,children:"Unable to load earnings"}),(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.errorDescription,children:C.error instanceof Error?C.error.message:'Please try again in a moment.'}),(0,r(d[16]).jsx)(c.default,{style:B.retryButton,onPress:()=>C.refetch(),children:(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.retryButtonText,children:"Try Again"})})]})});return(0,r(d[16]).jsx)(r(d[19]).ThemedView,{style:B.container,children:(0,r(d[16]).jsxs)(l.default,{showsVerticalScrollIndicator:!1,refreshControl:(0,r(d[16]).jsx)(u.default,{refreshing:C.isRefetching,onRefresh:ee}),children:[(0,r(d[16]).jsx)(a.default,{style:B.header,children:(0,r(d[16]).jsxs)(a.default,{children:[(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.title,children:"Earnings"}),(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.subtitle,children:"Track payouts, income, and recent sessions"})]})}),(()=>{if(A)return null;if(X)return null;const t=!k?.connected||k?.needsOnboarding,n=k?.connected&&!k?.payoutsEnabled;return(0,r(d[16]).jsxs)(a.default,{style:[B.stripeBanner,n&&B.stripeBannerWarning],children:[(0,r(d[16]).jsx)(a.default,{style:[B.stripeBannerIcon,n&&B.stripeBannerIconWarning],children:(0,r(d[16]).jsx)(r(d[17]).Ionicons,{name:t?'card-outline':'alert-circle-outline',size:24,color:t?'#2563EB':'#92400E'})}),(0,r(d[16]).jsxs)(a.default,{style:B.stripeBannerContent,children:[(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.stripeBannerTitle,children:t?'Set up payouts to receive your earnings':'Complete your payout setup'}),(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.stripeBannerDescription,children:t?'Connect your bank account through Stripe to start receiving payouts for your coaching sessions.':'Your Stripe account needs additional information before payouts can be enabled.'})]}),(0,r(d[16]).jsx)(c.default,{style:[B.stripeBannerButton,n&&B.stripeBannerButtonWarning],onPress:ne,disabled:Y,children:Y?(0,r(d[16]).jsx)(h.default,{size:"small",color:"#fff"}):(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.stripeBannerButtonText,children:t?'Set Up':'Complete Setup'})})]})})(),X?(0,r(d[16]).jsxs)(a.default,{style:B.payoutCard,children:[(0,r(d[16]).jsxs)(a.default,{style:B.payoutCardHeader,children:[(0,r(d[16]).jsxs)(a.default,{children:[(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.payoutLabel,children:"Available for payout"}),L?(0,r(d[16]).jsx)(h.default,{size:"small",color:"#007AFF",style:{marginTop:8}}):_?(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.balanceUnavailableText,children:"Balance temporarily unavailable"}):(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.payoutAmount,children:T(z,R)})]}),(0,r(d[16]).jsx)(c.default,{style:[B.payoutButton,(z<=0||$||L||_)&&B.payoutButtonDisabled],onPress:te,disabled:z<=0||$||L||_,children:$?(0,r(d[16]).jsx)(h.default,{size:"small",color:"#fff"}):(0,r(d[16]).jsxs)(r(d[16]).Fragment,{children:[(0,r(d[16]).jsx)(r(d[17]).Ionicons,{name:"cash-outline",size:18,color:"#fff"}),(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.payoutButtonText,children:"Request Payout"})]})})]}),!L&&I>0&&z<=0&&(0,r(d[16]).jsxs)(a.default,{style:B.pendingNotice,children:[(0,r(d[16]).jsx)(r(d[17]).Ionicons,{name:"time-outline",size:16,color:"#92400E"}),(0,r(d[16]).jsxs)(r(d[18]).ThemedText,{style:B.pendingNoticeText,children:[T(I,R)," pending \u2014 funds become available after Stripe's standard holding period"]})]}),!L&&z<=0&&I<=0&&(0,r(d[16]).jsx)(a.default,{style:B.noFundsNotice,children:(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.noFundsText,children:"No funds available for payout"})}),(0,r(d[16]).jsxs)(c.default,{style:B.stripeDashboardLink,onPress:re,children:[(0,r(d[16]).jsx)(r(d[17]).Ionicons,{name:"open-outline",size:14,color:"#6366F1"}),(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.stripeDashboardLinkText,children:"Open Stripe Dashboard"})]})]}):null,(0,r(d[16]).jsx)(a.default,{style:B.periodSelector,children:Object.keys(f).map(t=>
1(0,r(d[16]).jsx)(c.default,{style:[B.periodButton,w===t&&B.periodButtonActive],onPress:()=>F(t),children:(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:[B.periodButtonText,w===t&&B.periodButtonTextActive],children:f[t]})},t))}),J&&(0,r(d[16]).jsxs)(r(d[16]).Fragment,{children:[(0,r(d[16]).jsxs)(a.default,{style:B.summaryCard,children:[(0,r(d[16]).jsxs)(a.default,{style:B.summaryHeader,children:[(0,r(d[16]).jsxs)(a.default,{children:[(0,r(d[16]).jsxs)(r(d[18]).ThemedText,{style:B.summaryLabel,children:["Earnings ",f[w].toLowerCase()]}),(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.summaryValue,children:T(oe.current,ae)})]}),(0,r(d[16]).jsx)(a.default,{style:B.summaryIcon,children:(0,r(d[16]).jsx)(r(d[17]).Ionicons,{name:"trending-up",size:22,color:"#10B981"})})]}),(0,r(d[16]).jsxs)(a.default,{style:B.summaryMetaRow,children:[(0,r(d[16]).jsxs)(a.default,{children:[(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.summaryMetaLabel,children:"Sessions"}),(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.summaryMetaValue,children:oe.sessions})]}),(0,r(d[16]).jsxs)(a.default,{children:[(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.summaryMetaLabel,children:"Avg / session"}),(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.summaryMetaValue,children:T(oe.average,ae)})]}),(0,r(d[16]).jsxs)(a.default,{children:[(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.summaryMetaLabel,children:"Change"}),(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:[B.trendValue,null===ie?B.trendNeutral:ie>=0?B.trendPositive:B.trendNegative],children:null===ie?'\u2014':`${ie>=0?'+':''}${ie.toFixed(1)}%`})]})]})]}),(0,r(d[16]).jsxs)(a.default,{style:B.quickStatsContainer,children:[(0,r(d[16]).jsxs)(a.default,{style:B.quickStatCard,children:[(0,r(d[16]).jsx)(r(d[17]).Ionicons,{name:"hourglass-outline",size:18,color:"#F97316"}),(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.quickStatLabel,children:"Pending payouts"}),(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.quickStatValue,children:T(J.totals.pendingPayouts,ae)})]}),(0,r(d[16]).jsxs)(a.default,{style:B.quickStatCard,children:[(0,r(d[16]).jsx)(r(d[17]).Ionicons,{name:"wallet-outline",size:18,color:"#0EA5E9"}),(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.quickStatLabel,children:"Lifetime"}),(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.quickStatValue,children:T(J.totals.lifetime,ae)})]}),(0,r(d[16]).jsxs)(a.default,{style:B.quickStatCard,children:[(0,r(d[16]).jsx)(r(d[17]).Ionicons,{name:"people-outline",size:18,color:"#10B981"}),(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.quickStatLabel,children:"Sessions"}),(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.quickStatValue,children:J.totals.sessions})]})]}),(0,r(d[16]).jsxs)(c.default,{style:B.managePricingCard,onPress:()=>t.push('/coach/pricing'),children:[(0,r(d[16]).jsxs)(a.default,{style:B.managePricingContent,children:[(0,r(d[16]).jsx)(a.default,{style:B.managePricingIcon,children:(0,r(d[16]).jsx)(r(d[17]).Ionicons,{name:"pricetag-outline",size:20,color:"#007AFF"})}),(0,r(d[16]).jsxs)(a.default,{style:B.managePricingText,children:[(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.managePricingTitle,children:"Manage Pricing"}),(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.managePricingSubtitle,children:"Update rates, custom charges, and packages"})]})]}),(0,r(d[16]).jsx)(r(d[17]).Ionicons,{name:"chevron-forward",size:20,color:"#C7C7CC"})]}),(0,r(d[16]).jsxs)(a.default,{style:B.breakdownCard,children:[(0,r(d[16]).jsx)(a.default,{style:B.sectionHeader,children:(0,r(d[16]).jsxs)(a.default,{children:[(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.sectionTitle,children:"Revenue breakdown"}),(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.sectionSubtitle,children:"Top services driving payouts"})]})}),0===se.length?(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.emptyText,children:"No paid sessions yet"}):se.map((t,n)=>{const o=se[0]?.value||1,s=o>0?Math.min(100,t.value/o*100):0;return(0,r(d[16]).jsxs)(a.default,{style:B.breakdownRow,children:[(0,r(d[16]).jsxs)(a.default,{style:B.breakdownRowHeader,children:[(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.breakdownLabel,children:t.label}),(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.breakdownValue,children:T(t.value,ae)})]}),(0,r(d[16]).jsx)(a.default,{style:B.breakdownBarTrack,children:(0,r(d[16]).jsx)(a.default,{style:[B.breakdownBar,{width:`${s}%`}]})})]},`${t.label}-${n}`)})]}),X?(0,r(d[16]).jsxs)(a.default,{style:B.section,children:[(0,r(d[16]).jsx)(a.default,{style:B.sectionHeader,children:(0,r(d[16]).jsxs)(a.default,{children:[(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.sectionTitle,children:"Payout history"}),(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.sectionSubtitle,children:"Recent bank transfers"})]})}),q?(0,r(d[16]).jsx)(h.default,{size:"small",color:"#94A3B8",style:{marginTop:8}}):0===N.length?(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.emptyText,children:"No payouts yet"}):N.map(t=>{const n=p(t.status);return(0,r(d[16]).jsxs)(a.default,{style:B.transactionRow,children:[(0,r(d[16]).jsx)(a.default,{style:B.payoutHistoryIcon,children:(0,r(d[16]).jsx)(r(d[17]).Ionicons,{name:'paid'===t.status?'checkmark-circle-outline':'arrow-forward-circle-outline',size:18,color:'paid'===t.status?'#16A34A':'#2563EB'})}),(0,r(d[16]).jsxs)(a.default,{style:B.transactionContent,children:[(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.transactionTitle,children:t.description||'Bank transfer'}),(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.transactionSubtitle,children:t.arrival_date?`Arrives ${b(t.arrival_date)}`:`Created ${b(t.created)}`})]}),(0,r(d[16]).jsx)(a.default,{style:B.transactionMeta,children:(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.transactionAmount,children:T(t.amount,t.currency||ae)})}),(0,r(d[16]).jsx)(a.default,{style:[B.statusPillBase,{backgroundColor:n.backgroundColor}],children:(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:[B.statusPillLabel,{color:n.color}],children:t.status.replace(/_/g,' ')})})]},t.id)})]}):null,(0,r(d[16]).jsxs)(a.default,{style:B.section,children:[(0,r(d[16]).jsx)(a.default,{style:B.sectionHeader,children:(0,r(d[16]).jsxs)(a.default,{children:[(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.sectionTitle,children:"Pending payouts"}),(0,r(d[16]).jsxs)(r(d[18]).ThemedText,{style:B.sectionSubtitle,children:["Next transfer ETA ",b(J.totals.nextPayoutDate)]})]})}),0===J.pendingTransactions.length?(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.emptyText,children:"Nothing waiting on payouts right now."}):J.pendingTransactions.map(t=>(0,r(d[16]).jsxs)(a.default,{style:B.transactionRow,children:[(0,r(d[16]).jsx)(a.default,{style:B.transactionIconPending,children:(0,r(d[16]).jsx)(r(d[17]).Ionicons,{name:"time-outline",size:18,color:"#F97316"})}),(0,r(d[16]).jsxs)(a.default,{style:B.transactionContent,children:[(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.transactionTitle,children:t.clientName}),(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.transactionSubtitle,children:t.sessionType})]}),(0,r(d[16]).jsxs)(a.default,{style:B.transactionMeta,children:[(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.transactionAmount,children:T(t.amount,t.currency||ae)}),(0,r(d[16]).jsxs)(r(d[18]).ThemedText,{style:B.transactionDate,children:["Payout ",b(t.payoutDate)]})]})]},t.id))]}),(0,r(d[16]).jsxs)(a.default,{style:B.section,children:[(0,r(d[16]).jsx)(a.default,{style:B.sectionHeader,children:(0,r(d[16]).jsxs)(a.default,{children:[(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.sectionTitle,children:"Recent transactions"}),(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.sectionSubtitle,children:"Latest 30 coaching sessions"})]})}),0===J.transactions.length?(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.emptyText,children:"No transactions yet."}):J.transactions.map(t=>{const n=p(t.status);return(0,r(d[16]).jsxs)(a.default,{style:B.transactionRow,children:[(0,r(d[16]).jsx)(a.default,{style:B.transactionIcon,children:(0,r(d[16]).jsx)(r(d[17]).Ionicons,{name:"receipt-outline",size:18,color:"#007AFF"})}),(0,r(d[16]).jsxs)(a.default,{style:B.transactionContent,children:[(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.transactionTitle,children:t.clientName}),(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.transactionSubtitle,children:t.sessionType})]}),(0,r(d[16]).jsxs)(a.default,{style:B.transactionMeta,children:[(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.transactionAmount,children:T(t.amount,t.currency||ae)}),(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:B.transactionDate,children:b(t.date)})]}),(0,r(d[16]).jsx)(a.default,{style:[B.statusPillBase,{backgroundColor:n.backgroundColor}],children:(0,r(d[16]).jsx)(r(d[18]).ThemedText,{style:[B.statusPillLabel,{color:n.color}],children:t.status.replace(/_/g,' ')})})]},t.id)})]})]})]})})};var o=n(r(d[2])),a=t(r(d[3])),s=t(r(d[4])),l=t(r(d[5])),c=t(r(d[6])),u=t(r(d[7])),h=t(r(d[8]));t(r(d[9]));const f={week:'This Week',month:'This Month',year:'This Year'},x={on_water:'On-Water',video_review:'Video Review',strategy_session:'Strategy Session',race_support:'Race Support',boat_setup:'Boat Setup',fitness:'Fitness'},y=t=>t.replace(/\b\w/g,t=>t.toUpperCase()),p=t=>{switch(t){case'pending':return{backgroundColor:'#FEF3C7',color:'#92400E'};case'paid':return{backgroundColor:'#DCFCE7',color:'#166534'};case'in_transit':return{backgroundColor:'#DBEAFE',color:'#1E40AF'};case'refunded':case'failed':return{backgroundColor:'#FEE2E2',color:'#991B1B'};case'requires_action':return{backgroundColor:'#FDE68A',color:'#92400E'};default:return{backgroundColor:'#E2E8F0',color:'#1E293B'}}},T=(t,n="USD")=>{const o=t/100;try{return new Intl.NumberFormat('en-US',{style:'currency',currency:n,minimumFractionDigits:2}
1).format(o)}catch{return`$${o.toFixed(2)}`}},b=t=>{if(!t)return'TBD';return('number'==typeof t?new Date(1e3*t):new Date(t)).toLocaleDateString(void 0,{month:'short',day:'numeric'})},j=(t,n)=>{if(n<=0)return null;return(t-n)/n*100},S=({webShadow:t,ios:n,androidElevation:o=0})=>{const a={};return a.boxShadow=t,a},C=S({webShadow:'0px 10px 20px rgba(15, 23, 42, 0.08)',ios:{color:'#0f172a',opacity:.08,radius:20,offset:{width:0,height:10}},androidElevation:4}),w=S({webShadow:'0px 6px 12px rgba(15, 23, 42, 0.05)',ios:{color:'#0f172a',opacity:.03,radius:12,offset:{width:0,height:6}},androidElevation:2});const B=s.default.create({container:{flex:1},header:{padding:20,paddingTop:10,flexDirection:'row',justifyContent:'space-between',alignItems:'flex-start',gap:12},title:{fontSize:28,fontWeight:'700',marginBottom:6},subtitle:{fontSize:15,color:'#64748B'},periodSelector:{flexDirection:'row',paddingHorizontal:16,gap:8},periodButton:{flex:1,paddingVertical:10,borderWidth:1,borderColor:'#E2E8F0',borderRadius:12,alignItems:'center'},periodButtonActive:{backgroundColor:'#EEF2FF',borderColor:'#6366F1'},periodButtonText:{fontWeight:'600',color:'#475569'},periodButtonTextActive:{color:'#4338CA'},summaryCard:Object.assign({margin:16,marginTop:20,backgroundColor:'#fff',borderRadius:20,padding:20},C),summaryHeader:{flexDirection:'row',justifyContent:'space-between',alignItems:'center',marginBottom:16},summaryLabel:{fontSize:14,color:'#94A3B8',marginBottom:6},summaryValue:{fontSize:34,fontWeight:'700',color:'#111827'},summaryIcon:{width:48,height:48,borderRadius:12,backgroundColor:'#DCFCE7',alignItems:'center',justifyContent:'center'},summaryMetaRow:{flexDirection:'row',justifyContent:'space-between'},summaryMetaLabel:{fontSize:12,color:'#94A3B8'},summaryMetaValue:{fontSize:16,fontWeight:'600',color:'#0F172A',marginTop:4},trendValue:{marginTop:4,fontSize:16,fontWeight:'600'},trendPositive:{color:'#16A34A'},trendNegative:{color:'#DC2626'},trendNeutral:{color:'#94A3B8'},quickStatsContainer:{flexDirection:'row',gap:12,paddingHorizontal:16,marginBottom:16},quickStatCard:Object.assign({flex:1,backgroundColor:'#fff',borderRadius:16,padding:16,gap:6},w),quickStatLabel:{fontSize:13,color:'#475569'},quickStatValue:{fontSize:18,fontWeight:'600',color:'#0F172A'},breakdownCard:{marginHorizontal:16,marginBottom:16,backgroundColor:'#fff',borderRadius:20,padding:20,gap:12},section:{marginHorizontal:16,marginBottom:20,backgroundColor:'#fff',borderRadius:20,padding:20},sectionHeader:{flexDirection:'row',justifyContent:'space-between',marginBottom:12},sectionTitle:{fontSize:18,fontWeight:'600',color:'#0F172A'},sectionSubtitle:{fontSize:14,color:'#94A3B8',marginTop:2},breakdownRow:{marginTop:12},breakdownRowHeader:{flexDirection:'row',justifyContent:'space-between',marginBottom:6},breakdownLabel:{fontSize:14,color:'#0F172A',fontWeight:'500'},breakdownValue:{fontSize:14,color:'#0F172A',fontWeight:'600'},breakdownBarTrack:{height:6,borderRadius:999,backgroundColor:'#F1F5F9',overflow:'hidden'},breakdownBar:{height:6,borderRadius:999,backgroundColor:'#6366F1'},transactionRow:{flexDirection:'row',alignItems:'center',paddingVertical:12,gap:12,borderBottomWidth:1,borderBottomColor:'#F1F5F9'},transactionIcon:{width:40,height:40,borderRadius:12,backgroundColor:'#E0F2FE',alignItems:'center',justifyContent:'center'},transactionIconPending:{width:40,height:40,borderRadius:12,backgroundColor:'#FFEDD5',alignItems:'center',justifyContent:'center'},payoutHistoryIcon:{width:40,height:40,borderRadius:12,backgroundColor:'#F0FDF4',alignItems:'center',justifyContent:'center'},transactionContent:{flex:1},transactionMeta:{alignItems:'flex-end'},transactionTitle:{fontSize:15,fontWeight:'600',color:'#0F172A'},transactionSubtitle:{fontSize:13,color:'#94A3B8',marginTop:2},transactionAmount:{fontSize:15,fontWeight:'600',color:'#0F172A'},transactionDate:{fontSize:12,color:'#94A3B8'},emptyText:{fontSize:14,color:'#94A3B8',marginTop:4},loadingContainer:{flex:1,alignItems:'center',justifyContent:'center'},loadingText:{marginTop:12,color:'#475569'},missingContainer:{flex:1,alignItems:'center',justifyContent:'center',padding:32,gap:16},missingTitle:{fontSize:20,fontWeight:'600',color:'#0F172A'},missingDescription:{fontSize:14,textAlign:'center',color:'#94A3B8'},retryButton:{backgroundColor:'#1D4ED8',paddingHorizontal:20,paddingVertical:12,borderRadius:999},retryButtonText:{color:'#fff',fontWeight:'600'},errorContainer:{flex:1,padding:32,alignItems:'center',justifyContent:'center',gap:12},errorTitle:{fontSize:18,fontWeight:'600',color:'#0F172A'},errorDescription:{fontSize:14,color:'#94A3B8',textAlign:'center'},statusPillBase:{paddingHorizontal:10,paddingVertical:4,borderRadius:999},statusPillLabel:{fontSize:11,fontWeight:'600',textTransform:'capitalize',color:'#0F172A'},managePricingCard:{marginHorizontal:16,marginBottom:16,backgroundColor:'#fff',borderRadius:16,padding:16,flexDirection:'row',alignItems:'center',justifyContent:'space-between',borderWidth:1,borderColor:'#E5F1FF'},managePricingContent:{flexDirection:'row',alignItems:'center',gap:12},managePricingIcon:{width:40,height:40,borderRadius:10,backgroundColor:'#E5F1FF',alignItems:'center',justifyContent:'center'},managePricingText:{gap:2},managePricingTitle:{fontSize:15,fontWeight:'600',color:'#0F172A'},managePricingSubtitle:{fontSize:13,color:'#64748B'},stripeBanner:{marginHorizontal:16,marginBottom:16,backgroundColor:'#EFF6FF',borderRadius:16,padding:16,flexDirection:'row',alignItems:'center',gap:12,borderWidth:1,borderColor:'#BFDBFE'},stripeBannerWarning:{backgroundColor:'#FFFBEB',borderColor:'#FDE68A'},stripeBannerIcon:{width:44,height:44,borderRadius:12,backgroundColor:'#DBEAFE',alignItems:'center',justifyContent:'center'},stripeBannerIconWarning:{backgroundColor:'#FEF3C7'},stripeBannerContent:{flex:1,gap:4},stripeBannerTitle:{fontSize:15,fontWeight:'600',color:'#1E3A5F'},stripeBannerDescription:{fontSize:13,color:'#64748B',lineHeight:18},stripeBannerButton:{backgroundColor:'#007AFF',paddingHorizontal:16,paddingVertical:10,borderRadius:999,minWidth:80,alignItems:'center'},stripeBannerButtonWarning:{backgroundColor:'#F59E0B'},stripeBannerButtonText:{color:'#fff',fontWeight:'600',fontSize:14},payoutCard:Object.assign({marginHorizontal:16,marginBottom:16,backgroundColor:'#fff',borderRadius:20,padding:20},C),payoutCardHeader:{flexDirection:'row',justifyContent:'space-between',alignItems:'center'},payoutLabel:{fontSize:14,color:'#94A3B8',marginBottom:4},payoutAmount:{fontSize:28,fontWeight:'700',color:'#111827'},balanceUnavailableText:{fontSize:16,fontWeight:'500',color:'#94A3B8',marginTop:4,fontStyle:'italic'},payoutButton:{flexDirection:'row',backgroundColor:'#007AFF',paddingHorizontal:16,paddingVertical:12,borderRadius:999,alignItems:'center',gap:6},payoutButtonDisabled:{backgroundColor:'#94A3B8',opacity:.6},payoutButtonText:{color:'#fff',fontWeight:'600'},pendingNotice:{flexDirection:'row',alignItems:'center',gap:8,marginTop:12,backgroundColor:'#FEF3C7',borderRadius:10,padding:12},pendingNoticeText:{flex:1,fontSize:13,color:'#92400E',lineHeight:18},noFundsNotice:{marginTop:12},noFundsText:{fontSize:13,color:'#94A3B8'},stripeDashboardLink:{flexDirection:'row',alignItems:'center',gap:6,marginTop:14,paddingTop:14,borderTopWidth:1,borderTopColor:'#F1F5F9'},stripeDashboardLinkText:{fontSize:14,color:'#6366F1',fontWeight:'500'}})},1223,[2,4,7,22,29,109,724,108,722,16,1681,1844,1869,1729,1707,1730,914,1727,1851,1850]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.