@privy-io/expo 0.78.3 → 0.80.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/dist/cards.js CHANGED
@@ -1,8 +1,8 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkMFUJ4B5Hjs = require('./chunk-MFUJ4B5H.js');var _chunkAPBCP6B2js = require('./chunk-APBCP6B2.js');require('./chunk-F7DR7TVR.js');require('./chunk-3HF374LL.js');var _chunkC5WYSLQFjs = require('./chunk-C5WYSLQF.js');var _react = require('react'); var _react2 = _interopRequireDefault(_react);var _jssdkcore = require('@privy-io/js-sdk-core');var Mr=()=>{let e=_chunkAPBCP6B2js.o.call(void 0, );return _react.useMemo.call(void 0, ()=>({getCardsForUser:r=>_jssdkcore.listCards.call(void 0, e,r)}),[e])};var Br=()=>{let e=_chunkAPBCP6B2js.o.call(void 0, ),r=_chunkMFUJ4B5Hjs.X.call(void 0, n=>n!==null),t=_react.useCallback.call(void 0, n=>_chunkC5WYSLQFjs.e.call(void 0, void 0,null,function*(){var g;if(_chunkMFUJ4B5Hjs.N.call(void 0, ),_chunkMFUJ4B5Hjs.X.getState())throw new (0, _chunkMFUJ4B5Hjs.L)("existing_ui_flow_in_progress","Card sign-up is already in progress");let f=n.environment==="production"?n.spendApproval:void 0;if(((g=_jssdkcore.getSpendApproval.call(void 0, n.chainId,f))==null?void 0:g.kind)!=="evm")throw new (0, _chunkMFUJ4B5Hjs.L)("chain_not_supported",`Card spending is not supported on ${n.chainId}`);let d={environment:n.environment,chainId:n.chainId,asset:n.asset},a=new AbortController,l=m=>{let v=_chunkMFUJ4B5Hjs.X.getState();if((v==null?void 0:v.controller)!==a)return!1;let S=v.step.status;return _chunkMFUJ4B5Hjs.Z.call(void 0, ),e.track({name:"sdk_card_signup_closed",properties:_chunkC5WYSLQFjs.b.call(void 0, _chunkC5WYSLQFjs.c.call(void 0, _chunkC5WYSLQFjs.b.call(void 0, {},d),{status:S}),m?{cardId:m}:{})}),!0};return yield new Promise((m,v)=>{_chunkMFUJ4B5Hjs.X.setState({options:n,step:{status:"loading"},controller:a,onSuccess:S=>{l(S.id)&&m(S)},onFailure:S=>{l()&&v(S)}}),e.track({name:"sdk_card_signup_started",properties:d})})}),[e]),s=_react.useCallback.call(void 0, ()=>{let n=_chunkMFUJ4B5Hjs.X.getState();n&&_jssdkcore.handleSignUpClose.call(void 0, {step:n.step,onSuccess:n.onSuccess,onFailure:n.onFailure})},[]);return _react.useMemo.call(void 0, ()=>({signUp:t,close:s,isOpen:r}),[t,s,r])};var _reactnative = require('react-native');var Gr={credit:{label:"Credit",tone:"success"},pending:{label:"Pending",tone:"neutral"},declined:{label:"Declined",tone:"error"},expired:{label:"Expired",tone:"neutral"},reversed:{label:"Reversed",tone:"neutral"}};function rr({transaction:e,onPress:r}){let{colors:t}=_chunkMFUJ4B5Hjs.b.call(void 0, ),{text:s,isCredit:n}=_jssdkcore.formatSignedTransactionAmount.call(void 0, e),f=_jssdkcore.getTransactionBadge.call(void 0, e),d=f?Gr[f]:null,a=(d==null?void 0:d.tone)==="success"?t.success:(d==null?void 0:d.tone)==="error"?t.error:t.textMuted;return _react2.default.createElement(_reactnative.Pressable,{onPress:()=>r(e),accessibilityRole:"button",style:M.row},_react2.default.createElement(_reactnative.View,{style:[M.merchantIcon,{backgroundColor:t.backgroundSecondary}]},_react2.default.createElement(_chunkMFUJ4B5Hjs.J,{size:16,color:t.iconSubtle})),_react2.default.createElement(_reactnative.View,{style:M.text},_react2.default.createElement(_reactnative.Text,{numberOfLines:1,style:[M.merchant,{color:t.text}]},e.merchant.name),_react2.default.createElement(_reactnative.Text,{style:[M.date,{color:t.textMuted}]},_jssdkcore.formatTransactionDate.call(void 0, {unixSeconds:e.created}))),d?_react2.default.createElement(_reactnative.Text,{style:[M.badge,{color:a,backgroundColor:t.backgroundSecondary}]},d.label):null,_react2.default.createElement(_reactnative.Text,{style:[M.amount,{color:n?t.success:t.text}]},s))}function tr({hasMore:e,isLoadingMore:r,loadMoreError:t,onLoadMore:s}){let{colors:n}=_chunkMFUJ4B5Hjs.b.call(void 0, );return t?_react2.default.createElement(_reactnative.View,{style:M.loaderRow},_react2.default.createElement(_reactnative.Text,{style:[M.date,{color:n.error}]},t),_react2.default.createElement(_reactnative.Pressable,{onPress:s,accessibilityRole:"button"},_react2.default.createElement(_reactnative.Text,{style:[M.retry,{color:n.interactive}]},"Try again"))):r?_react2.default.createElement(_reactnative.View,{style:M.loaderRow},_react2.default.createElement(_reactnative.ActivityIndicator,{color:n.iconSubtle})):e?_react2.default.createElement(_reactnative.View,{style:M.loaderRow},_react2.default.createElement(_reactnative.Pressable,{onPress:s,accessibilityRole:"button"},_react2.default.createElement(_reactnative.Text,{style:[M.retry,{color:n.interactive}]},"Load more"))):null}var M=_reactnative.StyleSheet.create({row:{flexDirection:"row",alignItems:"center",gap:12,paddingVertical:10},merchantIcon:{width:36,height:36,borderRadius:18,alignItems:"center",justifyContent:"center"},text:{flex:1,gap:2},merchant:{fontFamily:_chunkMFUJ4B5Hjs.R.medium,fontSize:14,lineHeight:20},date:{fontFamily:_chunkMFUJ4B5Hjs.R.regular,fontSize:12,lineHeight:18},badge:{fontFamily:_chunkMFUJ4B5Hjs.R.medium,fontSize:12,lineHeight:18,paddingHorizontal:8,paddingVertical:2,borderRadius:6,overflow:"hidden"},amount:{fontFamily:_chunkMFUJ4B5Hjs.R.medium,fontSize:14,lineHeight:20},loaderRow:{alignItems:"center",gap:8,paddingVertical:16},retry:{fontFamily:_chunkMFUJ4B5Hjs.R.medium,fontSize:14}});var Jr=new Intl.NumberFormat(void 0,{style:"currency",currency:"USD"});function nr(e){if(e===null)return"\u2014";let r=Number(e);return Number.isFinite(r)?Jr.format(r):e}function or({isLoading:e,balance:r,assetSymbol:t,cardTitle:s,last4:n,cardColor:f,onViewDetails:d}){let{colors:a}=_chunkMFUJ4B5Hjs.b.call(void 0, );return _react2.default.createElement(_reactnative.View,{style:[H.container,{borderColor:a.border}]},_react2.default.createElement(_reactnative.View,{style:H.balance},_react2.default.createElement(_reactnative.Text,{style:[H.label,{color:a.textMuted}]},"Spending balance"),e?_react2.default.createElement(_reactnative.ActivityIndicator,{style:H.amountLoader,color:a.iconSubtle}):_react2.default.createElement(_reactnative.Text,{style:[H.amount,{color:a.textTitle}]},r),t&&!e?_react2.default.createElement(_reactnative.Text,{style:[H.asset,{color:a.text,backgroundColor:a.backgroundSecondary}]},t):null),_react2.default.createElement(_reactnative.View,{style:[H.divider,{backgroundColor:a.border}]}),_react2.default.createElement(_reactnative.Pressable,{onPress:d,disabled:!d,accessibilityRole:d?"button":void 0,style:H.cardRow},_react2.default.createElement(_reactnative.View,{style:[H.thumbnail,{backgroundColor:f}]}),_react2.default.createElement(_reactnative.View,{style:H.cardText},_react2.default.createElement(_reactnative.Text,{style:[H.cardTitle,{color:a.text}]},s),n?_react2.default.createElement(_reactnative.Text,{style:[H.last4,{color:a.textMuted}]},"****",n):null),d?_react2.default.createElement(_chunkMFUJ4B5Hjs.i,{size:20,color:a.iconSubtle}):null))}var H=_reactnative.StyleSheet.create({container:{borderWidth:1,borderRadius:16},balance:{alignItems:"center",gap:4,paddingVertical:24},label:{fontFamily:_chunkMFUJ4B5Hjs.R.medium,fontSize:14,lineHeight:20},amount:{fontFamily:_chunkMFUJ4B5Hjs.R.semibold,fontSize:36,lineHeight:44},amountLoader:{height:44},asset:{fontFamily:_chunkMFUJ4B5Hjs.R.medium,fontSize:12,lineHeight:18,paddingHorizontal:8,paddingVertical:2,borderRadius:999,overflow:"hidden"},divider:{height:1},cardRow:{flexDirection:"row",alignItems:"center",gap:12,padding:16},thumbnail:{width:40,height:26,borderRadius:4},cardText:{flex:1,gap:2},cardTitle:{fontFamily:_chunkMFUJ4B5Hjs.R.medium,fontSize:14,lineHeight:20},last4:{fontFamily:_chunkMFUJ4B5Hjs.R.regular,fontSize:13,lineHeight:18}});function ve({visible:e,title:r,description:t,confirmLabel:s,confirmDisabled:n=!1,dismissLabel:f="Never mind",destructive:d=!1,onConfirm:a,onDismiss:l,children:g}){let{colors:m}=_chunkMFUJ4B5Hjs.b.call(void 0, );return _react2.default.createElement(_reactnative.Modal,{transparent:!0,animationType:"fade",visible:e,onRequestClose:l},_react2.default.createElement(_reactnative.View,{style:se.backdrop},_react2.default.createElement(_reactnative.View,{style:[se.dialog,{backgroundColor:m.background}]},_react2.default.createElement(_reactnative.Text,{style:[se.title,{color:m.textTitle}]},r),t?_react2.default.createElement(_reactnative.Text,{style:[se.description,{color:m.text}]},t):null,g,_react2.default.createElement(_reactnative.View,{style:se.actions},_react2.default.createElement(_chunkMFUJ4B5Hjs.c,{title:s,destroy:d,disabled:n,style:n?se.confirmDisabled:void 0,onPress:a}),_react2.default.createElement(_chunkMFUJ4B5Hjs.c,{variant:"tertiary",title:f,onPress:l})))))}var se=_reactnative.StyleSheet.create({backdrop:{flex:1,justifyContent:"center",padding:24,backgroundColor:"rgba(0, 0, 0, 0.4)"},dialog:{gap:12,padding:24,borderRadius:16},title:{fontFamily:_chunkMFUJ4B5Hjs.R.semibold,fontSize:18,lineHeight:24},description:{fontFamily:_chunkMFUJ4B5Hjs.R.regular,fontSize:16,lineHeight:24},confirmDisabled:{opacity:.4},actions:{gap:4,marginTop:8}});var _reactnativewebview = require('react-native-webview'); var _reactnativewebview2 = _interopRequireDefault(_reactnativewebview);var Qr={primary:"#FFFFFF",secondary:"rgba(255, 255, 255, 0.75)"},et={primary:"#0D0F1C",secondary:"rgba(13, 15, 28, 0.64)"};function we(e){return rt(e)?et:Qr}function rt(e){let r=tt(e);return r?(r.r*299+r.g*587+r.b*114)/1e3>=128:!1}function tt(e){let r=e.trim().replace(/^#/,""),t=r.length===3?r.replace(/./g,s=>s+s):r.slice(0,6);return/^[0-9a-fA-F]{6}$/.test(t)?{r:Number.parseInt(t.slice(0,2),16),g:Number.parseInt(t.slice(2,4),16),b:Number.parseInt(t.slice(4,6),16)}:null}var Se="https://card-details.privy.invalid",xe="__privyMountCardDetails",nt=/^pk_(test|live)_[A-Za-z0-9]+$/,ot=/^acct_[A-Za-z0-9]+$/,it=/^ic_[A-Za-z0-9]+$/,st=/^ek_(test|live)_[A-Za-z0-9_]+$/,sr=e=>nt.test(e),ar=e=>ot.test(e),lr=e=>it.test(e),dr=e=>st.test(e);function cr(e){let r;try{r=JSON.parse(e)}catch(t){return null}if(typeof r!="object"||r===null||!("type"in r))return null;switch(r.type){case"nonce":return"nonce"in r&&typeof r.nonce=="string"&&r.nonce?{type:"nonce",nonce:r.nonce}:null;case"ready":case"error":return{type:r.type};default:return null}}function ur(e){return`window.${xe} && window.${xe}(${JSON.stringify(e)}); true;`}function pr({publishableKey:e,issuingCard:r,stripeAccount:t,scriptNonce:s,textColor:n}){let f=JSON.stringify({publishableKey:e,issuingCard:r,stripeAccount:t,textColor:n}).replace(/</g,"\\u003c");return`<!DOCTYPE html>
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkKS4KXE4Vjs = require('./chunk-KS4KXE4V.js');var _chunkMZRVLBIFjs = require('./chunk-MZRVLBIF.js');require('./chunk-F7DR7TVR.js');require('./chunk-3HF374LL.js');var _chunkC5WYSLQFjs = require('./chunk-C5WYSLQF.js');var _react = require('react'); var _react2 = _interopRequireDefault(_react);var _jssdkcore = require('@privy-io/js-sdk-core');var Rt=()=>{let e=_chunkMZRVLBIFjs.o.call(void 0, );return _react.useMemo.call(void 0, ()=>({getCardsForUser:t=>_jssdkcore.listCards.call(void 0, e,t)}),[e])};var qt=()=>{let e=_chunkMZRVLBIFjs.o.call(void 0, ),t=_chunkKS4KXE4Vjs.X.call(void 0, n=>n!==null),r=_react.useCallback.call(void 0, n=>_chunkC5WYSLQFjs.e.call(void 0, void 0,null,function*(){var y;if(_chunkKS4KXE4Vjs.N.call(void 0, ),_chunkKS4KXE4Vjs.X.getState())throw new (0, _chunkKS4KXE4Vjs.L)("existing_ui_flow_in_progress","Card sign-up is already in progress");let g=n.environment==="production"?n.spendApproval:void 0;if(((y=_jssdkcore.getSpendApproval.call(void 0, n.chainId,g))==null?void 0:y.kind)!=="evm")throw new (0, _chunkKS4KXE4Vjs.L)("chain_not_supported",`Card spending is not supported on ${n.chainId}`);let c={environment:n.environment,chainId:n.chainId,asset:n.asset},p=new AbortController,f=o=>{let k=_chunkKS4KXE4Vjs.X.getState();if((k==null?void 0:k.controller)!==p)return!1;let v=k.step.status;return _chunkKS4KXE4Vjs.Z.call(void 0, ),e.track({name:"sdk_card_signup_closed",properties:_chunkC5WYSLQFjs.b.call(void 0, _chunkC5WYSLQFjs.c.call(void 0, _chunkC5WYSLQFjs.b.call(void 0, {},c),{status:v}),o?{cardId:o}:{})}),!0};return yield new Promise((o,k)=>{_chunkKS4KXE4Vjs.X.setState({options:n,step:{status:"loading"},controller:p,onSuccess:v=>{f(v.id)&&o(v)},onFailure:v=>{f()&&k(v)}}),e.track({name:"sdk_card_signup_started",properties:c})})}),[e]),d=_react.useCallback.call(void 0, ()=>{let n=_chunkKS4KXE4Vjs.X.getState();n&&_jssdkcore.handleSignUpClose.call(void 0, {step:n.step,onSuccess:n.onSuccess,onFailure:n.onFailure})},[]);return _react.useMemo.call(void 0, ()=>({signUp:r,close:d,isOpen:t}),[r,d,t])};var _reactnative = require('react-native');var er={credit:{label:"Credit",tone:"success"},pending:{label:"Pending",tone:"neutral"},declined:{label:"Declined",tone:"error"},expired:{label:"Expired",tone:"neutral"},reversed:{label:"Reversed",tone:"neutral"}};function st({transaction:e,onPress:t}){let{colors:r}=_chunkKS4KXE4Vjs.b.call(void 0, ),{text:d,isCredit:n}=_jssdkcore.formatSignedTransactionAmount.call(void 0, e),g=_jssdkcore.getTransactionBadge.call(void 0, e),c=g?er[g]:null,p=(c==null?void 0:c.tone)==="success"?r.success:(c==null?void 0:c.tone)==="error"?r.error:r.textMuted;return _react2.default.createElement(_reactnative.Pressable,{onPress:()=>t(e),accessibilityRole:"button",style:O.row},_react2.default.createElement(_reactnative.View,{style:[O.merchantIcon,{backgroundColor:r.backgroundSecondary}]},_react2.default.createElement(_chunkKS4KXE4Vjs.J,{size:16,color:r.iconSubtle})),_react2.default.createElement(_reactnative.View,{style:O.text},_react2.default.createElement(_reactnative.Text,{numberOfLines:1,style:[O.merchant,{color:r.text}]},e.merchant.name),_react2.default.createElement(_reactnative.Text,{style:[O.date,{color:r.textMuted}]},_jssdkcore.formatTransactionDate.call(void 0, {unixSeconds:e.created}))),c?_react2.default.createElement(_reactnative.Text,{style:[O.badge,{color:p,backgroundColor:r.backgroundSecondary}]},c.label):null,_react2.default.createElement(_reactnative.Text,{style:[O.amount,{color:n?r.success:r.text}]},d))}function lt({hasMore:e,isLoadingMore:t,loadMoreError:r,onLoadMore:d}){let{colors:n}=_chunkKS4KXE4Vjs.b.call(void 0, );return r?_react2.default.createElement(_reactnative.View,{style:O.loaderRow},_react2.default.createElement(_reactnative.Text,{style:[O.date,{color:n.error}]},r),_react2.default.createElement(_reactnative.Pressable,{onPress:d,accessibilityRole:"button"},_react2.default.createElement(_reactnative.Text,{style:[O.retry,{color:n.interactive}]},"Try again"))):t?_react2.default.createElement(_reactnative.View,{style:O.loaderRow},_react2.default.createElement(_reactnative.ActivityIndicator,{color:n.iconSubtle})):e?_react2.default.createElement(_reactnative.View,{style:O.loaderRow},_react2.default.createElement(_reactnative.Pressable,{onPress:d,accessibilityRole:"button"},_react2.default.createElement(_reactnative.Text,{style:[O.retry,{color:n.interactive}]},"Load more"))):null}var O=_reactnative.StyleSheet.create({row:{flexDirection:"row",alignItems:"center",gap:12,paddingVertical:10},merchantIcon:{width:36,height:36,borderRadius:18,alignItems:"center",justifyContent:"center"},text:{flex:1,gap:2},merchant:{fontFamily:_chunkKS4KXE4Vjs.R.medium,fontSize:14,lineHeight:20},date:{fontFamily:_chunkKS4KXE4Vjs.R.regular,fontSize:12,lineHeight:18},badge:{fontFamily:_chunkKS4KXE4Vjs.R.medium,fontSize:12,lineHeight:18,paddingHorizontal:8,paddingVertical:2,borderRadius:6,overflow:"hidden"},amount:{fontFamily:_chunkKS4KXE4Vjs.R.medium,fontSize:14,lineHeight:20},loaderRow:{alignItems:"center",gap:8,paddingVertical:16},retry:{fontFamily:_chunkKS4KXE4Vjs.R.medium,fontSize:14}});var or=new Intl.NumberFormat(void 0,{style:"currency",currency:"USD"});function dt(e){if(e===null)return"\u2014";let t=Number(e);return Number.isFinite(t)?or.format(t):e}function ct({isLoading:e,balance:t,assetSymbol:r,cardTitle:d,last4:n,cardColor:g,onViewDetails:c}){let{colors:p}=_chunkKS4KXE4Vjs.b.call(void 0, );return _react2.default.createElement(_reactnative.View,{style:[W.container,{borderColor:p.border}]},_react2.default.createElement(_reactnative.View,{style:W.balance},_react2.default.createElement(_reactnative.Text,{style:[W.label,{color:p.textMuted}]},"Spending balance"),e?_react2.default.createElement(_reactnative.ActivityIndicator,{style:W.amountLoader,color:p.iconSubtle}):_react2.default.createElement(_reactnative.Text,{style:[W.amount,{color:p.textTitle}]},t),r&&!e?_react2.default.createElement(_reactnative.Text,{style:[W.asset,{color:p.text,backgroundColor:p.backgroundSecondary}]},r):null),_react2.default.createElement(_reactnative.View,{style:[W.divider,{backgroundColor:p.border}]}),_react2.default.createElement(_reactnative.Pressable,{onPress:c,disabled:!c,accessibilityRole:c?"button":void 0,style:W.cardRow},_react2.default.createElement(_reactnative.View,{style:[W.thumbnail,{backgroundColor:g}]}),_react2.default.createElement(_reactnative.View,{style:W.cardText},_react2.default.createElement(_reactnative.Text,{style:[W.cardTitle,{color:p.text}]},d),n?_react2.default.createElement(_reactnative.Text,{style:[W.last4,{color:p.textMuted}]},"****",n):null),c?_react2.default.createElement(_chunkKS4KXE4Vjs.i,{size:20,color:p.iconSubtle}):null))}var W=_reactnative.StyleSheet.create({container:{borderWidth:1,borderRadius:16},balance:{alignItems:"center",gap:4,paddingVertical:24},label:{fontFamily:_chunkKS4KXE4Vjs.R.medium,fontSize:14,lineHeight:20},amount:{fontFamily:_chunkKS4KXE4Vjs.R.semibold,fontSize:36,lineHeight:44},amountLoader:{height:44},asset:{fontFamily:_chunkKS4KXE4Vjs.R.medium,fontSize:12,lineHeight:18,paddingHorizontal:8,paddingVertical:2,borderRadius:999,overflow:"hidden"},divider:{height:1},cardRow:{flexDirection:"row",alignItems:"center",gap:12,padding:16},thumbnail:{width:40,height:26,borderRadius:4},cardText:{flex:1,gap:2},cardTitle:{fontFamily:_chunkKS4KXE4Vjs.R.medium,fontSize:14,lineHeight:20},last4:{fontFamily:_chunkKS4KXE4Vjs.R.regular,fontSize:13,lineHeight:18}});function Pe({visible:e,title:t,description:r,confirmLabel:d,confirmDisabled:n=!1,dismissLabel:g="Never mind",destructive:c=!1,onConfirm:p,onDismiss:f,children:y}){let{colors:o}=_chunkKS4KXE4Vjs.b.call(void 0, );return _react2.default.createElement(_reactnative.Modal,{transparent:!0,animationType:"fade",visible:e,onRequestClose:f},_react2.default.createElement(_reactnative.View,{style:pe.backdrop},_react2.default.createElement(_reactnative.View,{style:[pe.dialog,{backgroundColor:o.background}]},_react2.default.createElement(_reactnative.Text,{style:[pe.title,{color:o.textTitle}]},t),r?_react2.default.createElement(_reactnative.Text,{style:[pe.description,{color:o.text}]},r):null,y,_react2.default.createElement(_reactnative.View,{style:pe.actions},_react2.default.createElement(_chunkKS4KXE4Vjs.c,{title:d,destroy:c,disabled:n,style:n?pe.confirmDisabled:void 0,onPress:p}),_react2.default.createElement(_chunkKS4KXE4Vjs.c,{variant:"tertiary",title:g,onPress:f})))))}var pe=_reactnative.StyleSheet.create({backdrop:{flex:1,justifyContent:"center",padding:24,backgroundColor:"rgba(0, 0, 0, 0.4)"},dialog:{gap:12,padding:24,borderRadius:16},title:{fontFamily:_chunkKS4KXE4Vjs.R.semibold,fontSize:18,lineHeight:24},description:{fontFamily:_chunkKS4KXE4Vjs.R.regular,fontSize:16,lineHeight:24},confirmDisabled:{opacity:.4},actions:{gap:4,marginTop:8}});var _reactnativesvg = require('react-native-svg'); var _reactnativesvg2 = _interopRequireDefault(_reactnativesvg);var pt="paint0_linear_2897_3420";function mt({width:e}){return _react2.default.createElement(_reactnativesvg2.default,{width:e,height:e*_jssdkcore.CARD_CHIP.height/_jssdkcore.CARD_CHIP.width,viewBox:`0 0 ${_jssdkcore.CARD_CHIP.width} ${_jssdkcore.CARD_CHIP.height}`,fill:"none",accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants"},_jssdkcore.CARD_CHIP.paths.map(({d:t,fill:r})=>_react2.default.createElement(_reactnativesvg.Path,{key:t,d:t,fill:r==="gradient"?`url(#${pt})`:r})),_react2.default.createElement(_reactnativesvg.Defs,null,_react2.default.createElement(_reactnativesvg.LinearGradient,{id:pt,x1:_jssdkcore.CARD_CHIP.gradient.x1,y1:_jssdkcore.CARD_CHIP.gradient.y1,x2:_jssdkcore.CARD_CHIP.gradient.x2,y2:_jssdkcore.CARD_CHIP.gradient.y2,gradientUnits:"userSpaceOnUse"},_jssdkcore.CARD_CHIP.gradient.stops.map(({offset:t,color:r})=>_react2.default.createElement(_reactnativesvg.Stop,{key:t,offset:t,stopColor:r})))))}var _reactnativewebview = require('react-native-webview'); var _reactnativewebview2 = _interopRequireDefault(_reactnativewebview);var Le="https://card-details.privy.invalid",Ie="__privyMountCardDetails",pr=/^pk_(test|live)_[A-Za-z0-9]+$/,mr=/^acct_[A-Za-z0-9]+$/,gr=/^ic_[A-Za-z0-9]+$/,fr=/^ek_(test|live)_[A-Za-z0-9_]+$/,gt=e=>pr.test(e),ft=e=>mr.test(e),yt=e=>gr.test(e),bt=e=>fr.test(e);function ht(e){let t;try{t=JSON.parse(e)}catch(r){return null}if(typeof t!="object"||t===null||!("type"in t))return null;switch(t.type){case"nonce":return"nonce"in t&&typeof t.nonce=="string"&&t.nonce?{type:"nonce",nonce:t.nonce}:null;case"ready":case"error":return{type:t.type};default:return null}}function Ct(e){return`window.${Ie} && window.${Ie}(${JSON.stringify(e)}); true;`}function xt({publishableKey:e,issuingCard:t,stripeAccount:r,scriptNonce:d,textColor:n}){let g=JSON.stringify({publishableKey:e,issuingCard:t,stripeAccount:r,textColor:n}).replace(/</g,"\\u003c");return`<!DOCTYPE html>
2
2
  <html>
3
3
  <head>
4
4
  <meta charset="utf-8">
5
- <meta http-equiv="Content-Security-Policy" content="${["default-src 'none'",`script-src 'nonce-${s}' https://js.stripe.com https://*.js.stripe.com`,"frame-src https://js.stripe.com https://*.js.stripe.com https://hooks.stripe.com","connect-src https://api.stripe.com","img-src https://*.stripe.com","style-src 'unsafe-inline'"].join("; ")}">
5
+ <meta http-equiv="Content-Security-Policy" content="${["default-src 'none'",`script-src 'nonce-${d}' https://js.stripe.com https://*.js.stripe.com`,"frame-src https://js.stripe.com https://*.js.stripe.com https://hooks.stripe.com","connect-src https://api.stripe.com","img-src https://*.stripe.com","style-src 'unsafe-inline'"].join("; ")}">
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
7
7
  <style>
8
8
  html, body { margin: 0; background: transparent; color: ${n}; font-family: -apple-system, system-ui, sans-serif; }
@@ -16,19 +16,19 @@
16
16
  .copy svg { position: absolute; top: 6px; left: 6px; }
17
17
  .copy-target { position: absolute; inset: 0; }
18
18
  </style>
19
- <script src="https://js.stripe.com/v3" nonce="${s}"></script>
19
+ <script src="https://js.stripe.com/v3" nonce="${d}"></script>
20
20
  </head>
21
21
  <body>
22
22
  <div class="fields">
23
- <div><div class="label">Card number</div>${Ae("number",n)}</div>
23
+ <div><div class="label">Card number</div>${Ve("number",n)}</div>
24
24
  <div class="row">
25
- <div><div class="label">Expiration</div>${Ae("expiry",n)}</div>
26
- <div><div class="label">CVC</div>${Ae("cvc",n)}</div>
25
+ <div><div class="label">Expiration</div>${Ve("expiry",n)}</div>
26
+ <div><div class="label">CVC</div>${Ve("cvc",n)}</div>
27
27
  </div>
28
28
  </div>
29
- <script nonce="${s}">
29
+ <script nonce="${d}">
30
30
  (function () {
31
- var config = ${f};
31
+ var config = ${g};
32
32
  var fields = [
33
33
  {key: 'number', element: 'issuingCardNumberDisplay'},
34
34
  {key: 'expiry', element: 'issuingCardExpiryDisplay'},
@@ -42,8 +42,8 @@
42
42
  stripe.createEphemeralKeyNonce({issuingCard: config.issuingCard}).then(function (result) {
43
43
  if (!result || result.error || !result.nonce) { send({type: 'error'}); return; }
44
44
  var nonce = result.nonce;
45
- window.${xe} = function (ephemeralKeySecret) {
46
- window.${xe} = undefined;
45
+ window.${Ie} = function (ephemeralKeySecret) {
46
+ window.${Ie} = undefined;
47
47
  var authorization = {issuingCard: config.issuingCard, nonce: nonce, ephemeralKeySecret: ephemeralKeySecret};
48
48
  stripe.retrieveIssuingCard(config.issuingCard, {ephemeralKeySecret: ephemeralKeySecret, nonce: nonce}).then(function () {
49
49
  var elements = stripe.elements();
@@ -62,4 +62,4 @@
62
62
  })();
63
63
  </script>
64
64
  </body>
65
- </html>`}function Ae(e,r){return`<div class="value"><div id="${e}" class="mount"></div><div class="copy"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="${r}" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></svg><div id="${e}-copy" class="copy-target"></div></div></div>`}var ft=14*60*1e3,gt=3e4,yt=12e3,fr=e=>e===Se||e.startsWith(`${Se}/`),bt={loading:gt,mounting:yt,ready:ft};function gr({cardId:e,issuingCard:r,environment:t,publishableKey:s,stripeAccount:n,cardColor:f}){let d=_chunkAPBCP6B2js.o.call(void 0, ),a=_react.useRef.call(void 0, null),[l,g]=_react.useState.call(void 0, "loading"),[m,v]=_react.useState.call(void 0, 0),S=_react.useRef.call(void 0, m);S.current=m;let w=_react.useRef.call(void 0, l);w.current=l;let G=sr(s)&&lr(r)&&(n===null||ar(n)),o=we(f),b=_react.useMemo.call(void 0, ()=>G?pr({publishableKey:s,issuingCard:r,stripeAccount:n,scriptNonce:crypto.randomUUID().replace(/-/g,""),textColor:o.primary}):null,[G,s,r,n,o.primary]),L=()=>{g("loading"),v(C=>C+1)};_react.useEffect.call(void 0, ()=>{if(_reactnative.Platform.OS==="web"||l==="error")return;let C=setTimeout(()=>{l==="loading"?g("error"):l==="mounting"?g("ready"):(g("loading"),v(D=>D+1))},bt[l]);return()=>clearTimeout(C)},[l,m]);let c=C=>{if(!fr(C.nativeEvent.url))return;let D=cr(C.nativeEvent.data);if(D)switch(D.type){case"nonce":{let z=m;_jssdkcore.getCardEphemeralKey.call(void 0, d,{cardId:e,environment:t,nonce:D.nonce}).then(N=>{var W;if(!(S.current!==z||w.current==="error")){if(!dr(N))throw new Error("Unexpected ephemeral key format");(W=a.current)==null||W.injectJavaScript(ur(N)),g("mounting")}}).catch(N=>{S.current===z&&(console.error("[privy] Failed to authorize card details",N),g("error"))});return}case"ready":{g("ready");return}case"error":{g("error");return}default:}},V=l==="loading"||l==="mounting";return _reactnative.Platform.OS==="web"?_react2.default.createElement(_reactnative.View,{style:[$.face,{backgroundColor:f}]},_react2.default.createElement(_reactnative.View,{style:$.overlay},_react2.default.createElement(_reactnative.Text,{style:[$.error,{color:o.primary}]},"Card numbers are shown in the iOS and Android app."))):_react2.default.createElement(_reactnative.View,{style:[$.face,{backgroundColor:f}]},b&&l!=="error"?_react2.default.createElement(_reactnativewebview2.default,{key:m,ref:a,source:{html:b,baseUrl:Se},originWhitelist:["*"],onShouldStartLoadWithRequest:C=>C.isTopFrame===!1?/^(https|about):/.test(C.url):fr(C.url),onMessage:c,onError:()=>g("error"),onContentProcessDidTerminate:L,onRenderProcessGone:L,incognito:_reactnative.Platform.OS==="ios",cacheEnabled:!1,dataDetectorTypes:["none"],allowFileAccess:!1,allowsLinkPreview:!1,javaScriptCanOpenWindowsAutomatically:!1,setSupportMultipleWindows:!1,mixedContentMode:"never",scrollEnabled:!1,style:V?[$.webView,$.hidden]:$.webView}):null,V&&b?_react2.default.createElement(_reactnative.View,{style:$.overlay},_react2.default.createElement(_reactnative.ActivityIndicator,{color:o.primary})):null,l==="error"||!b?_react2.default.createElement(_reactnative.View,{style:$.overlay},_react2.default.createElement(_reactnative.Text,{style:[$.error,{color:o.primary}]},"Card details could not be loaded. Please try again."),b?_react2.default.createElement(_reactnative.Pressable,{accessibilityRole:"button",onPress:L},_react2.default.createElement(_reactnative.Text,{style:[$.retry,{color:o.primary}]},"Try again")):null):null)}var $=_reactnative.StyleSheet.create({face:{aspectRatio:1.586,borderRadius:16,overflow:"hidden"},webView:{flex:1,backgroundColor:"transparent"},hidden:{opacity:0},overlay:{position:"absolute",top:0,right:0,bottom:0,left:0,alignItems:"center",justifyContent:"center",padding:24},error:{fontFamily:_chunkMFUJ4B5Hjs.R.medium,fontSize:14,textAlign:"center"},retry:{fontFamily:_chunkMFUJ4B5Hjs.R.semibold,fontSize:14,marginTop:12,textDecorationLine:"underline"}});var xt=[{value:"lost",label:"Lost"},{value:"stolen",label:"Stolen"},{value:"expired",label:"Expired"}];function hr({card:e,environment:r,cardColor:t,publishableKey:s,stripeAccount:n,logoUrl:f,frozen:d,canceled:a,busy:l,expired:g,onToggleFreeze:m,onCancel:v,onReplace:S}){let{colors:w}=_chunkMFUJ4B5Hjs.b.call(void 0, ),G=_chunkAPBCP6B2js.o.call(void 0, ),[o,b]=_react.useState.call(void 0, {kind:"none"}),[L,c]=_react.useState.call(void 0, !1),V=()=>b({kind:"none"});return _react2.default.createElement(_reactnative.ScrollView,{contentContainerStyle:h.container},L&&s?_react2.default.createElement(gr,{cardId:e.id,issuingCard:e.provider_id,environment:r,publishableKey:s,stripeAccount:n,cardColor:t}):_react2.default.createElement(St,{card:e,cardColor:t,logoUrl:f,frozen:d,canceled:a}),_react2.default.createElement(_reactnative.View,{style:h.tiles},_react2.default.createElement(Le,{Icon:L?_chunkMFUJ4B5Hjs.s:_chunkMFUJ4B5Hjs.t,label:L?"Hide details":"Details",disabled:!s,onPress:()=>{c(!L),L||G.track({name:"sdk_card_details_revealed",properties:{cardId:e.id,environment:r}})}}),_react2.default.createElement(Le,{Icon:_chunkMFUJ4B5Hjs.D,label:"Replace",disabled:a||l,onPress:()=>b({kind:"replace-reason",reason:g?"expired":null})}),_react2.default.createElement(Le,{Icon:_chunkMFUJ4B5Hjs.e,label:"Cancel",disabled:a||l,onPress:()=>b({kind:"cancel"})})),_react2.default.createElement(_reactnative.View,{style:[h.freezeRow,{borderColor:w.border}]},_react2.default.createElement(_reactnative.View,{style:h.freezeText},_react2.default.createElement(_reactnative.Text,{style:[h.rowTitle,{color:w.text}]},"Freeze Card"),_react2.default.createElement(_reactnative.Text,{style:[h.rowSubtitle,{color:w.textMuted}]},"Temporarily disable your card")),_react2.default.createElement(_reactnative.Switch,{accessibilityLabel:"Freeze Card",value:d,disabled:a||l,onValueChange:C=>b({kind:"freeze",next:C})})),_react2.default.createElement(ve,{visible:o.kind==="freeze",title:o.kind==="freeze"&&!o.next?"Unfreeze this card?":"Freeze this card?",description:o.kind==="freeze"&&!o.next?"This will instantly unfreeze the current card.":"This will instantly freeze the current card.",confirmLabel:o.kind==="freeze"&&!o.next?"Unfreeze card":"Freeze card",onConfirm:()=>{o.kind==="freeze"&&m(o.next),V()},onDismiss:V}),_react2.default.createElement(ve,{visible:o.kind==="cancel",title:"Cancel this card?",description:"This will instantly cancel the current card.",confirmLabel:"Cancel card",destructive:!0,onConfirm:()=>{v(),V()},onDismiss:V}),_react2.default.createElement(ve,{visible:o.kind==="replace-reason"||o.kind==="replace-warn",title:o.kind==="replace-warn"?"Replace this card?":"Why are you replacing your card?",description:o.kind==="replace-warn"?"This will instantly close the current card and issue a new one.":void 0,confirmLabel:o.kind==="replace-warn"?"Replace":"Continue",confirmDisabled:o.kind==="replace-reason"&&o.reason===null,dismissLabel:"Back",destructive:o.kind==="replace-warn",onConfirm:()=>{o.kind==="replace-reason"&&o.reason?b({kind:"replace-warn",reason:o.reason}):o.kind==="replace-warn"&&(S(o.reason),V())},onDismiss:()=>{o.kind==="replace-warn"?b({kind:"replace-reason",reason:o.reason}):V()}},o.kind==="replace-reason"?xt.map(({value:C,label:D})=>{let z=o.reason===C;return _react2.default.createElement(_reactnative.Pressable,{key:C,accessibilityRole:"radio",accessibilityState:{checked:z},onPress:()=>b({kind:"replace-reason",reason:C}),style:[h.reason,{borderColor:z?w.interactive:w.border}]},_react2.default.createElement(_reactnative.Text,{style:[h.rowTitle,{color:w.text}]},D),z?_react2.default.createElement(_chunkMFUJ4B5Hjs.g,{size:18,color:w.interactive}):null)}):null))}function St({card:e,cardColor:r,logoUrl:t,frozen:s,canceled:n}){var g,m,v;let f=_chunkMFUJ4B5Hjs.V.call(void 0, t),d=e.exp_month&&e.exp_year?`${String(e.exp_month).padStart(2,"0")}/${String(e.exp_year).slice(-2)}`:null,a=n?"Cancelled":s?"Frozen":null,l=we(r);return _react2.default.createElement(_reactnative.View,{style:[h.face,{backgroundColor:r},a?h.faceDimmed:null]},_react2.default.createElement(_reactnative.View,{style:h.faceTop},f?_react2.default.createElement(_reactnative.Image,{source:{uri:f},style:h.faceLogo,resizeMode:"contain",accessibilityIgnoresInvertColors:!0}):_react2.default.createElement(_reactnative.View,null),a?_react2.default.createElement(_reactnative.Text,{style:h.faceBadge},a):null),_react2.default.createElement(_reactnative.Text,{accessibilityLabel:e.last4?`Card ending in ${e.last4}`:void 0,style:[h.faceNumber,{color:l.primary}]},"\u2022\u2022\u2022\u2022 ",(g=e.last4)!=null?g:"0000"),_react2.default.createElement(_reactnative.View,{style:h.faceBottom},_react2.default.createElement(_reactnative.View,{style:h.faceField},_react2.default.createElement(_reactnative.Text,{style:[h.faceLabel,{color:l.secondary}]},"Cardholder"),_react2.default.createElement(_reactnative.Text,{style:[h.faceValue,{color:l.primary}]},(m=e.cardholder.name)!=null?m:"")),d?_react2.default.createElement(_reactnative.View,{style:h.faceField},_react2.default.createElement(_reactnative.Text,{style:[h.faceLabel,{color:l.secondary}]},"Valid thru"),_react2.default.createElement(_reactnative.Text,{style:[h.faceValue,{color:l.primary}]},d)):null,((v=e.brand)==null?void 0:v.toLowerCase())==="visa"?_react2.default.createElement(_reactnative.Text,{style:[h.faceBrand,{color:l.primary}]},"VISA"):null))}function Le({Icon:e,label:r,disabled:t,onPress:s}){let{colors:n}=_chunkMFUJ4B5Hjs.b.call(void 0, );return _react2.default.createElement(_reactnative.Pressable,{accessibilityRole:"button",accessibilityState:{disabled:t},disabled:t,onPress:s,style:[h.tile,{backgroundColor:n.backgroundSecondary},t?h.tileDisabled:null]},_react2.default.createElement(e,{size:20,color:n.icon}),_react2.default.createElement(_reactnative.Text,{style:[h.tileLabel,{color:n.text}]},r))}var h=_reactnative.StyleSheet.create({container:{gap:16,padding:16},face:{aspectRatio:1.586,borderRadius:16,padding:20,justifyContent:"space-between"},faceDimmed:{opacity:.6},faceTop:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},faceLogo:{width:96,height:28},faceBadge:{fontFamily:_chunkMFUJ4B5Hjs.R.semibold,fontSize:12,color:"#FFFFFF",backgroundColor:"rgba(0, 0, 0, 0.35)",paddingHorizontal:10,paddingVertical:4,borderRadius:999,overflow:"hidden"},faceNumber:{fontFamily:_chunkMFUJ4B5Hjs.R.semibold,fontSize:20,letterSpacing:2},faceBottom:{flexDirection:"row",alignItems:"flex-end",gap:24},faceField:{gap:2},faceLabel:{fontFamily:_chunkMFUJ4B5Hjs.R.regular,fontSize:10},faceValue:{fontFamily:_chunkMFUJ4B5Hjs.R.medium,fontSize:14},faceBrand:{marginLeft:"auto",fontFamily:_chunkMFUJ4B5Hjs.R.semibold,fontSize:20,fontStyle:"italic"},tiles:{flexDirection:"row",gap:12},tile:{flex:1,alignItems:"center",gap:6,paddingVertical:14,borderRadius:12},tileDisabled:{opacity:.4},tileLabel:{fontFamily:_chunkMFUJ4B5Hjs.R.medium,fontSize:14},freezeRow:{flexDirection:"row",alignItems:"center",gap:12,padding:16,borderWidth:1,borderRadius:12},freezeText:{flex:1,gap:2},rowTitle:{fontFamily:_chunkMFUJ4B5Hjs.R.medium,fontSize:16,lineHeight:22},rowSubtitle:{fontFamily:_chunkMFUJ4B5Hjs.R.regular,fontSize:13,lineHeight:18},reason:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",padding:14,borderWidth:1,borderRadius:12}});function wr(){let{colors:e}=_chunkMFUJ4B5Hjs.b.call(void 0, ),r=_chunkAPBCP6B2js.o.call(void 0, ).app.getConfig(),t=(r==null?void 0:r.legal_name)||(r==null?void 0:r.name)||"This app";return _react2.default.createElement(_reactnative.View,{style:[vr.container,{backgroundColor:e.backgroundSecondary}]},_react2.default.createElement(_reactnative.Text,{style:[vr.text,{color:e.textMuted}]},_jssdkcore.getCardDisclosure.call(void 0, t)))}var vr=_reactnative.StyleSheet.create({container:{padding:16,borderRadius:12},text:{fontFamily:_chunkMFUJ4B5Hjs.R.regular,fontSize:12,lineHeight:18}});var Sr="+1 (855) 935-3124",Mt={pending:"Pending",posted:"Posted",declined:"Declined",expired:"Expired",reversed:"Reversed"},Ut={expired:"Dispute expired",lost:"Dispute lost",submitted:"Dispute submitted",unsubmitted:"Dispute unsubmitted",won:"Dispute won"};function Ht(e){return`tel:${e.trimStart().startsWith("+")?"+":""}${e.replace(/\D/g,"")}`}function Tr({transaction:e,cardLast4:r}){let{colors:t}=_chunkMFUJ4B5Hjs.b.call(void 0, ),[s,n]=_react.useState.call(void 0, !1),{text:f,isCredit:d}=_jssdkcore.formatSignedTransactionAmount.call(void 0, e),a=d?t.success:t.textTitle,l=e.status==="posted"?t.success:e.status==="declined"?t.error:t.textMuted,g=[{label:"Amount",value:f,color:a},{label:"ATM Fee",value:_jssdkcore.formatUsdAmount.call(void 0, 0)},{label:"Cashback",value:_jssdkcore.formatUsdAmount.call(void 0, 0)},{label:"Currency",value:e.currency.toUpperCase()},{label:"Status",value:Mt[e.status],color:l},{label:"Dispute",value:e.dispute?Ut[e.dispute.status]:"None"},{label:"Merchant",value:e.merchant.name},{label:"From",value:r?`\u2022\u2022\u2022\u2022 \u2022\u2022\u2022\u2022 \u2022\u2022\u2022\u2022 ${r}`:null,accessibilityLabel:r?`Card ending in ${r}`:void 0},{label:"Date created",value:_jssdkcore.formatTransactionDate.call(void 0, {unixSeconds:e.created})}];return _react2.default.createElement(_reactnative.ScrollView,{contentContainerStyle:P.container},_react2.default.createElement(_reactnative.View,{style:P.summary},_react2.default.createElement(_reactnative.View,{style:[P.merchantIcon,{backgroundColor:t.backgroundSecondary}]},_react2.default.createElement(_chunkMFUJ4B5Hjs.J,{size:24,color:t.iconSubtle})),_react2.default.createElement(_reactnative.Text,{style:[P.amountHeading,{color:a}]},f),_react2.default.createElement(_reactnative.Text,{style:[P.subheader,{color:t.textMuted}]},`Card payment to ${e.merchant.name}`)),_react2.default.createElement(_reactnative.View,{style:P.details},_react2.default.createElement(_reactnative.Text,{style:[P.detailsHeading,{color:t.textTitle}]},"Details"),g.filter(m=>m.value!==null).map(m=>{var v;return _react2.default.createElement(_reactnative.View,{key:m.label,style:P.detailRow},_react2.default.createElement(_reactnative.Text,{style:[P.detailLabel,{color:t.textMuted}]},m.label),_react2.default.createElement(_reactnative.Text,{accessibilityLabel:m.accessibilityLabel,style:[P.detailValue,{color:(v=m.color)!=null?v:t.text}]},m.value))})),_react2.default.createElement(_chunkMFUJ4B5Hjs.c,{variant:"secondary",title:"Dispute transaction",style:P.centeredButton,onPress:()=>n(!0)}),_react2.default.createElement(_reactnative.Modal,{transparent:!0,animationType:"fade",visible:s,onRequestClose:()=>n(!1)},_react2.default.createElement(_reactnative.View,{style:P.backdrop},_react2.default.createElement(_reactnative.View,{style:[P.dialog,{backgroundColor:t.background}]},_react2.default.createElement(_reactnative.Text,{style:[P.detailsHeading,{color:t.textTitle}]},"Dispute this transaction"),_react2.default.createElement(_reactnative.Text,{style:[P.dialogBody,{color:t.text}]},"To dispute this transaction, call the number below and our support team will help you."),_react2.default.createElement(_reactnative.Pressable,{accessibilityRole:"link",onPress:()=>void _reactnative.Linking.openURL(Ht(Sr))},_react2.default.createElement(_reactnative.Text,{style:[P.phone,{color:t.interactive}]},Sr)),_react2.default.createElement(_chunkMFUJ4B5Hjs.c,{title:"Done",onPress:()=>n(!1)})))))}var P=_reactnative.StyleSheet.create({container:{gap:24,padding:24},summary:{alignItems:"center",gap:4},merchantIcon:{width:56,height:56,borderRadius:28,alignItems:"center",justifyContent:"center",marginBottom:8},amountHeading:{fontFamily:_chunkMFUJ4B5Hjs.R.semibold,fontSize:28,lineHeight:36},subheader:{fontFamily:_chunkMFUJ4B5Hjs.R.regular,fontSize:14,lineHeight:20,textAlign:"center"},details:{gap:12},detailsHeading:{fontFamily:_chunkMFUJ4B5Hjs.R.semibold,fontSize:18,lineHeight:24},detailRow:{flexDirection:"row",justifyContent:"space-between",gap:16},detailLabel:{fontFamily:_chunkMFUJ4B5Hjs.R.regular,fontSize:14,lineHeight:20},detailValue:{flexShrink:1,fontFamily:_chunkMFUJ4B5Hjs.R.medium,fontSize:14,lineHeight:20,textAlign:"right"},centeredButton:{justifyContent:"center"},backdrop:{flex:1,justifyContent:"center",padding:24,backgroundColor:"rgba(0, 0, 0, 0.4)"},dialog:{gap:16,padding:24,borderRadius:16},dialogBody:{fontFamily:_chunkMFUJ4B5Hjs.R.regular,fontSize:16,lineHeight:24},phone:{fontFamily:_chunkMFUJ4B5Hjs.R.semibold,fontSize:16,lineHeight:24}});var Ir=25;function Fr({cardId:e,environment:r}){let t=_chunkAPBCP6B2js.o.call(void 0, ),[s,n]=_react.useState.call(void 0, null),[f,d]=_react.useState.call(void 0, !0),[a,l]=_react.useState.call(void 0, void 0),[g,m]=_react.useState.call(void 0, []),[v,S]=_react.useState.call(void 0, !0),[w,G]=_react.useState.call(void 0, !1),[o,b]=_react.useState.call(void 0, !1),[L,c]=_react.useState.call(void 0, void 0),V=_react.useRef.call(void 0, null),C=_react.useRef.call(void 0, !1),D=_react.useRef.call(void 0, null),z=_react.useRef.call(void 0, 0),N=_react.useRef.call(void 0, !1),W=_react.useCallback.call(void 0, y=>{V.current=y.next_cursor,C.current=!0,m(T=>{let j=new Set(T.map(_=>_.id));return[...T,...y.data.filter(_=>!j.has(_.id)).map(_=>_jssdkcore.toTransactionRow.call(void 0, {transaction:_,unknownMerchantName:"Unknown merchant"}))]}),G(y.next_cursor!==null)},[]),ee=_react.useCallback.call(void 0, y=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){d(!0),l(void 0);try{let T=yield _jssdkcore.getCardById.call(void 0, t,{cardId:e,environment:r});if(y.aborted)return;n(T),T||l("Could not load this card.")}catch(T){y.aborted||l("Could not load this card.")}finally{y.aborted||d(!1)}}),[t,e,r]),Y=_react.useCallback.call(void 0, y=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){let T=++z.current,j=()=>!y.aborted&&T===z.current;S(!0),c(void 0),V.current=null,C.current=!1,m([]);try{let _=yield _jssdkcore.listCardTransactions.call(void 0, t,{cardId:e,environment:r,limit:Ir});if(!j())return;W(_)}catch(_){if(!j())return;G(!0),c("Could not load transactions.")}finally{j()&&S(!1)}}),[t,e,r,W]),Te=_react.useCallback.call(void 0, ()=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){let y=D.current;if(!y||y.signal.aborted)return;let{signal:T}=y;if(!C.current){yield Y(T);return}let j=V.current;if(j===null||N.current)return;let _=z.current,ne=()=>!T.aborted&&_===z.current;N.current=!0,b(!0),c(void 0);try{let he=yield _jssdkcore.listCardTransactions.call(void 0, t,{cardId:e,environment:r,limit:Ir,cursor:j});if(!ne())return;W(he)}catch(he){ne()&&c("Could not load transactions.")}finally{N.current=!1,T.aborted||b(!1)}}),[t,e,r,W,Y]),ye=_react.useCallback.call(void 0, ()=>{let y=D.current;!y||y.signal.aborted||(ee(y.signal),Y(y.signal))},[ee,Y]),be=_react.useCallback.call(void 0, y=>{var T;(T=D.current)!=null&&T.signal.aborted||n(y)},[]);return _react.useEffect.call(void 0, ()=>{let y=new AbortController;return D.current=y,ee(y.signal),Y(y.signal),()=>y.abort()},[ee,Y]),{card:s,isCardLoading:f,cardError:a,transactions:g,isLoadingTransactions:v,hasMore:w,isLoadingMore:o,loadMoreError:L,loadMore:Te,retry:ye,applyCard:be}}var Er=({cardId:e,environment:r})=>{let t=_chunkAPBCP6B2js.o.call(void 0, );_react.useEffect.call(void 0, ()=>{t.track({name:"sdk_card_summary_view_loaded",properties:{cardId:e,environment:r}})},[t,e,r])};var Jt=e=>{let r=_chunkMFUJ4B5Hjs.P.call(void 0, );return _react2.default.createElement(_chunkMFUJ4B5Hjs.a,{appearance:r},_react2.default.createElement(Zt,_chunkC5WYSLQFjs.b.call(void 0, {key:`${e.environment}:${e.cardId}`},e)))};function Zt({cardId:e,environment:r,onClose:t,onReplaced:s}){var _e,Me,Ue,He,Ne,Be;let{colors:n}=_chunkMFUJ4B5Hjs.b.call(void 0, ),f=_chunkAPBCP6B2js.o.call(void 0, );Er({cardId:e,environment:r});let[d,a]=_react.useState.call(void 0, {kind:"summary"}),[l,g]=_react.useState.call(void 0, !1),[m,v]=_react.useState.call(void 0, !1),[S,w]=_react.useState.call(void 0, null),[G,o]=_react.useState.call(void 0, !1),[b,L]=_react.useState.call(void 0, null),{card:c,isCardLoading:V,cardError:C,transactions:D,isLoadingTransactions:z,hasMore:N,isLoadingMore:W,loadMoreError:ee,loadMore:Y,retry:Te,applyCard:ye}=Fr({cardId:e,environment:r}),be=m||(c==null?void 0:c.status)==="canceled";_react.useEffect.call(void 0, ()=>{let k=!0;return _jssdkcore.getCardsConfig.call(void 0, f,{appId:f.app.appId,environment:r}).then(B=>{k&&L(B)}).catch(B=>{console.error("[privy] Failed to load the card issuing config",B)}),()=>{k=!1}},[f,r]),_react.useEffect.call(void 0, ()=>{c&&g(c.status==="inactive")},[c]);let y=k=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){let B=l;g(k),w(null),o(!0);try{ye(yield _jssdkcore.updateCardStatus.call(void 0, f,{cardId:e,environment:r,status:k?"inactive":"active"}))}catch(zr){g(B),w("Could not update this card. Please try again."),console.error("[privy] Failed to update the card freeze state",zr)}finally{o(!1)}}),T=()=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){w(null),o(!0);try{ye(yield _jssdkcore.updateCardStatus.call(void 0, f,{cardId:e,environment:r,status:"canceled"})),v(!0)}catch(k){w("Could not cancel this card. Please try again."),console.error("[privy] Failed to cancel the card",k)}finally{o(!1)}}),j=k=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){w(null),o(!0);try{let B=yield _jssdkcore.replaceCard.call(void 0, f,{cardId:e,environment:r,reason:k});v(!0),s==null||s(B.id)}catch(B){w("Could not replace this card. Please try again."),console.error("[privy] Failed to replace the card",B)}finally{o(!1)}}),_=be?_react2.default.createElement(Vr,null,"This card has been cancelled"):l?_react2.default.createElement(Vr,null,"This card is frozen"):null,ne=_react2.default.createElement(_react2.default.Fragment,null,_react2.default.createElement(_chunkMFUJ4B5Hjs.U,{goBack:d.kind==="summary"?void 0:()=>{w(null),a({kind:"summary"})},close:t}),r==="sandbox"?_react2.default.createElement(_reactnative.View,{style:A.banner},_react2.default.createElement(_chunkMFUJ4B5Hjs.S,{variant:"info"},_react2.default.createElement(_chunkMFUJ4B5Hjs.T,null,"In sandbox mode using test funds"))):null);if(d.kind==="transaction")return _react2.default.createElement(_reactnative.View,{style:[A.screen,{backgroundColor:n.background}]},ne,_react2.default.createElement(Tr,{transaction:d.transaction,cardLast4:(_e=c==null?void 0:c.last4)!=null?_e:null}));if(d.kind==="details"&&c)return _react2.default.createElement(_reactnative.View,{style:[A.screen,{backgroundColor:n.background}]},ne,_react2.default.createElement(_reactnative.View,{style:A.detailsHeader},_react2.default.createElement(_reactnative.Text,{style:[A.heading,{color:n.textTitle}]},"Your Card"),_,S?_react2.default.createElement(_reactnative.Text,{accessibilityRole:"alert",style:[A.errorText,{color:n.error}]},S):null),_react2.default.createElement(hr,{card:c,environment:r,cardColor:n.interactive,publishableKey:(Me=b==null?void 0:b.publishableKey)!=null?Me:null,stripeAccount:(Ue=b==null?void 0:b.stripeAccount)!=null?Ue:null,logoUrl:(He=b==null?void 0:b.cardLogoUrl)!=null?He:null,frozen:l,canceled:be,busy:G,expired:_jssdkcore.isCardExpired.call(void 0, c),onToggleFreeze:k=>void y(k),onCancel:()=>void T(),onReplace:k=>void j(k)}));let he=_jssdkcore.getCardAssetDisplayName.call(void 0, c==null?void 0:c.asset),Dr=_react2.default.createElement(_reactnative.View,{style:A.sections},_react2.default.createElement(_reactnative.Text,{style:[A.heading,{color:n.textTitle}]},"Wallet"),_,C?_react2.default.createElement(_reactnative.View,{style:[A.errorRow,{backgroundColor:n.backgroundSecondary}]},_react2.default.createElement(_reactnative.Text,{style:[A.errorText,{color:n.error}]},C),_react2.default.createElement(_reactnative.Pressable,{onPress:Te,accessibilityRole:"button"},_react2.default.createElement(_reactnative.Text,{style:[A.retry,{color:n.interactive}]},"Try again"))):_react2.default.createElement(or,{isLoading:V,balance:nr((Ne=c==null?void 0:c.balance_formatted)!=null?Ne:null),assetSymbol:he,cardTitle:c!=null&&c.brand?`${c.brand} debit card`:"Debit card",last4:(Be=c==null?void 0:c.last4)!=null?Be:void 0,cardColor:n.interactive,onViewDetails:c?()=>{w(null),a({kind:"details"})}:void 0}),_react2.default.createElement(_reactnative.Text,{style:[A.heading,{color:n.textTitle}]},"Transactions"));return _react2.default.createElement(_reactnative.View,{style:[A.screen,{backgroundColor:n.background}]},ne,_react2.default.createElement(_reactnative.FlatList,{data:D,keyExtractor:k=>k.id,renderItem:({item:k})=>_react2.default.createElement(rr,{transaction:k,onPress:B=>a({kind:"transaction",transaction:B})}),ListHeaderComponent:Dr,ListEmptyComponent:z||ee||N?null:_react2.default.createElement(_reactnative.Text,{style:[A.empty,{color:n.textMuted}]},"No transactions found"),ListFooterComponent:_react2.default.createElement(_reactnative.View,{style:A.footer},_react2.default.createElement(tr,{hasMore:N,isLoadingMore:W||z,loadMoreError:ee,onLoadMore:()=>void Y()}),_react2.default.createElement(wr,null)),contentContainerStyle:A.list}))}function Vr({children:e}){let{colors:r}=_chunkMFUJ4B5Hjs.b.call(void 0, );return _react2.default.createElement(_chunkMFUJ4B5Hjs.S,{style:{backgroundColor:r.backgroundHighlight}},_react2.default.createElement(_chunkMFUJ4B5Hjs.T,{style:{color:r.textHighlight}},e))}var A=_reactnative.StyleSheet.create({screen:{flex:1},banner:{paddingHorizontal:16},detailsHeader:{gap:12,paddingHorizontal:16},list:{padding:16},sections:{gap:12,marginBottom:4},heading:{fontFamily:_chunkMFUJ4B5Hjs.R.semibold,fontSize:20,lineHeight:24,marginTop:12},errorRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,padding:16,borderRadius:12},errorText:{flex:1,fontFamily:_chunkMFUJ4B5Hjs.R.regular,fontSize:14},retry:{fontFamily:_chunkMFUJ4B5Hjs.R.medium,fontSize:14},empty:{fontFamily:_chunkMFUJ4B5Hjs.R.regular,fontSize:14,paddingVertical:16,textAlign:"center"},footer:{gap:24,marginTop:8}});exports.CardSummaryView = Jt; exports.useGetCardsForUser = Mr; exports.useSignUpForCard = Br;
65
+ </html>`}function Ve(e,t){return`<div class="value"><div id="${e}" class="mount"></div><div class="copy"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="${t}" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></svg><div id="${e}-copy" class="copy-target"></div></div></div>`}var Pr=14*60*1e3,Ir=3e4,Lr=12e3,St=e=>e===Le||e.startsWith(`${Le}/`),Fr={loading:Ir,mounting:Lr,ready:Pr};function vt({cardId:e,issuingCard:t,environment:r,publishableKey:d,stripeAccount:n,cardColor:g}){let c=_chunkMZRVLBIFjs.o.call(void 0, ),p=_react.useRef.call(void 0, null),[f,y]=_react.useState.call(void 0, "loading"),[o,k]=_react.useState.call(void 0, 0),v=_react.useRef.call(void 0, o);v.current=o;let x=_react.useRef.call(void 0, f);x.current=f;let j=gt(d)&&yt(t)&&(n===null||ft(n)),i=_jssdkcore.getCardFaceColors.call(void 0, g),h=_react.useMemo.call(void 0, ()=>j?xt({publishableKey:d,issuingCard:t,stripeAccount:n,scriptNonce:crypto.randomUUID().replace(/-/g,""),textColor:i.primary}):null,[j,d,t,n,i.primary]),U=()=>{y("loading"),k(b=>b+1)};_react.useEffect.call(void 0, ()=>{if(_reactnative.Platform.OS==="web"||f==="error")return;let b=setTimeout(()=>{f==="loading"?y("error"):f==="mounting"?y("ready"):(y("loading"),k(F=>F+1))},Fr[f]);return()=>clearTimeout(b)},[f,o]);let u=b=>{if(!St(b.nativeEvent.url))return;let F=ht(b.nativeEvent.data);if(F)switch(F.type){case"nonce":{let A=o;_jssdkcore.getCardEphemeralKey.call(void 0, c,{cardId:e,environment:r,nonce:F.nonce}).then(w=>{var L;if(!(v.current!==A||x.current==="error")){if(!bt(w))throw new Error("Unexpected ephemeral key format");(L=p.current)==null||L.injectJavaScript(Ct(w)),y("mounting")}}).catch(w=>{v.current===A&&(console.error("[privy] Failed to authorize card details",w),y("error"))});return}case"ready":{y("ready");return}case"error":{y("error");return}default:}},I=f==="loading"||f==="mounting";return _reactnative.Platform.OS==="web"?_react2.default.createElement(_reactnative.View,{style:[Y.face,{backgroundColor:g}]},_react2.default.createElement(_reactnative.View,{style:Y.overlay},_react2.default.createElement(_reactnative.Text,{style:[Y.error,{color:i.primary}]},"Card numbers are shown in the iOS and Android app."))):_react2.default.createElement(_reactnative.View,{style:[Y.face,{backgroundColor:g}]},h&&f!=="error"?_react2.default.createElement(_reactnativewebview2.default,{key:o,ref:p,source:{html:h,baseUrl:Le},originWhitelist:["*"],onShouldStartLoadWithRequest:b=>b.isTopFrame===!1?/^(https|about):/.test(b.url):St(b.url),onMessage:u,onError:()=>y("error"),onContentProcessDidTerminate:U,onRenderProcessGone:U,incognito:_reactnative.Platform.OS==="ios",cacheEnabled:!1,dataDetectorTypes:["none"],allowFileAccess:!1,allowsLinkPreview:!1,javaScriptCanOpenWindowsAutomatically:!1,setSupportMultipleWindows:!1,mixedContentMode:"never",scrollEnabled:!1,style:I?[Y.webView,Y.hidden]:Y.webView}):null,I&&h?_react2.default.createElement(_reactnative.View,{style:Y.overlay},_react2.default.createElement(_reactnative.ActivityIndicator,{color:i.primary})):null,f==="error"||!h?_react2.default.createElement(_reactnative.View,{style:Y.overlay},_react2.default.createElement(_reactnative.Text,{style:[Y.error,{color:i.primary}]},"Card details could not be loaded. Please try again."),h?_react2.default.createElement(_reactnative.Pressable,{accessibilityRole:"button",onPress:U},_react2.default.createElement(_reactnative.Text,{style:[Y.retry,{color:i.primary}]},"Try again")):null):null)}var Y=_reactnative.StyleSheet.create({face:{aspectRatio:_jssdkcore.CARD_WIDTH_MM/_jssdkcore.CARD_HEIGHT_MM,borderRadius:16,overflow:"hidden"},webView:{flex:1,backgroundColor:"transparent"},hidden:{opacity:0},overlay:{position:"absolute",top:0,right:0,bottom:0,left:0,alignItems:"center",justifyContent:"center",padding:24},error:{fontFamily:_chunkKS4KXE4Vjs.R.medium,fontSize:14,textAlign:"center"},retry:{fontFamily:_chunkKS4KXE4Vjs.R.semibold,fontSize:14,marginTop:12,textDecorationLine:"underline"}});var T=_jssdkcore.CARD_FACE_SIZES,Gr=T.chipWidthPx*_jssdkcore.CARD_CHIP.height/_jssdkcore.CARD_CHIP.width,ae=1.3,Rr=[{value:"lost",label:"Lost"},{value:"stolen",label:"Stolen"},{value:"expired",label:"Expired"}];function Pt({card:e,environment:t,cardColor:r,publishableKey:d,stripeAccount:n,logoUrl:g,frozen:c,canceled:p,busy:f,expired:y,onToggleFreeze:o,onCancel:k,onReplace:v}){let{colors:x}=_chunkKS4KXE4Vjs.b.call(void 0, ),j=_chunkMZRVLBIFjs.o.call(void 0, ),[i,h]=_react.useState.call(void 0, {kind:"none"}),[U,u]=_react.useState.call(void 0, !1),[I,b]=_react.useState.call(void 0, null),[F,A]=_react.useState.call(void 0, null),w=()=>h({kind:"none"});return _react2.default.createElement(_reactnative.ScrollView,{contentContainerStyle:C.container},U&&d?_react2.default.createElement(vt,{cardId:e.id,issuingCard:e.provider_id,environment:t,publishableKey:d,stripeAccount:n,cardColor:r}):_react2.default.createElement(Wr,{card:e,cardColor:r,logoUrl:g,faceWidth:I,onFaceWidth:b,logoImage:F,onLogoImage:A,frozen:c,canceled:p}),_react2.default.createElement(_reactnative.View,{style:C.tiles},_react2.default.createElement(Be,{Icon:U?_chunkKS4KXE4Vjs.s:_chunkKS4KXE4Vjs.t,label:U?"Hide details":"Details",disabled:!d,onPress:()=>{u(!U),U||j.track({name:"sdk_card_details_revealed",properties:{cardId:e.id,environment:t}})}}),_react2.default.createElement(Be,{Icon:_chunkKS4KXE4Vjs.D,label:"Replace",disabled:p||f,onPress:()=>h({kind:"replace-reason",reason:y?"expired":null})}),_react2.default.createElement(Be,{Icon:_chunkKS4KXE4Vjs.e,label:"Cancel",disabled:p||f,onPress:()=>h({kind:"cancel"})})),_react2.default.createElement(_reactnative.View,{style:[C.freezeRow,{borderColor:x.border}]},_react2.default.createElement(_reactnative.View,{style:C.freezeText},_react2.default.createElement(_reactnative.Text,{style:[C.rowTitle,{color:x.text}]},"Freeze Card"),_react2.default.createElement(_reactnative.Text,{style:[C.rowSubtitle,{color:x.textMuted}]},"Temporarily disable your card")),_react2.default.createElement(_reactnative.Switch,{accessibilityLabel:"Freeze Card",value:c,disabled:p||f,onValueChange:L=>h({kind:"freeze",next:L})})),_react2.default.createElement(Pe,{visible:i.kind==="freeze",title:i.kind==="freeze"&&!i.next?"Unfreeze this card?":"Freeze this card?",description:i.kind==="freeze"&&!i.next?"This will instantly unfreeze the current card.":"This will instantly freeze the current card.",confirmLabel:i.kind==="freeze"&&!i.next?"Unfreeze card":"Freeze card",onConfirm:()=>{i.kind==="freeze"&&o(i.next),w()},onDismiss:w}),_react2.default.createElement(Pe,{visible:i.kind==="cancel",title:"Cancel this card?",description:"This will instantly cancel the current card.",confirmLabel:"Cancel card",destructive:!0,onConfirm:()=>{k(),w()},onDismiss:w}),_react2.default.createElement(Pe,{visible:i.kind==="replace-reason"||i.kind==="replace-warn",title:i.kind==="replace-warn"?"Replace this card?":"Why are you replacing your card?",description:i.kind==="replace-warn"?"This will instantly close the current card and issue a new one.":void 0,confirmLabel:i.kind==="replace-warn"?"Replace":"Continue",confirmDisabled:i.kind==="replace-reason"&&i.reason===null,dismissLabel:"Back",destructive:i.kind==="replace-warn",onConfirm:()=>{i.kind==="replace-reason"&&i.reason?h({kind:"replace-warn",reason:i.reason}):i.kind==="replace-warn"&&(v(i.reason),w())},onDismiss:()=>{i.kind==="replace-warn"?h({kind:"replace-reason",reason:i.reason}):w()}},i.kind==="replace-reason"?Rr.map(({value:L,label:G})=>{let H=i.reason===L;return _react2.default.createElement(_reactnative.Pressable,{key:L,accessibilityRole:"radio",accessibilityState:{checked:H},onPress:()=>h({kind:"replace-reason",reason:L}),style:[C.reason,{borderColor:H?x.interactive:x.border}]},_react2.default.createElement(_reactnative.Text,{style:[C.rowTitle,{color:x.text}]},G),H?_react2.default.createElement(_chunkKS4KXE4Vjs.g,{size:18,color:x.interactive}):null)}):null))}function Wr({card:e,cardColor:t,logoUrl:r,faceWidth:d,onFaceWidth:n,logoImage:g,onLogoImage:c,frozen:p,canceled:f}){var le,ne,oe;let y=_chunkKS4KXE4Vjs.V.call(void 0, r),o=_jssdkcore.getCardFaceLayout.call(void 0, d!=null?d:void 0),k=(g==null?void 0:g.uri)===y?g:null,v=_jssdkcore.fitLogoSize.call(void 0, k,o),[x,j]=_react.useState.call(void 0, null),i=Math.max(o.logoHeightPx,Math.floor(o.heightPx-2*o.edgeInsetPx-(Gr+2*T.rowGapPx)*o.faceScale-(x!=null?x:0))),h=v.heightPx<=i?v:{widthPx:v.widthPx*i/v.heightPx,heightPx:i},U=_react.useCallback.call(void 0, ({nativeEvent:{source:a}})=>{if(!y)return;let S=(R,N)=>c({uri:y,width:R,height:N});a!=null&&a.width&&(a!=null&&a.height)?S(a.width,a.height):_reactnative.Image.getSize(y,S,()=>S(0,0))},[y,c]),u=Math.min(_reactnative.useWindowDimensions.call(void 0, ).fontScale,ae),{textSizePx:I}=o,b=a=>a*o.faceScale,F=e.exp_month&&e.exp_year?`${String(e.exp_month).padStart(2,"0")}/${String(e.exp_year).slice(-2)}`:"\u2022\u2022/\u2022\u2022",A=f?"Cancelled":p?"Frozen":null,w=_jssdkcore.getCardFaceColors.call(void 0, t),L={color:w.secondary,fontSize:I.fieldLabel,lineHeight:I.fieldLabel*T.lineHeight.fieldLabel},G={color:w.primary,fontSize:I.fieldValue,lineHeight:I.fieldValue*T.lineHeight.fieldValue},H=((le=e.brand)==null?void 0:le.toLowerCase())==="visa";return _react2.default.createElement(_reactnative.View,{testID:"card-face",onLayout:({nativeEvent:a})=>{a.layout.width>0&&n(a.layout.width)},style:[C.face,{backgroundColor:t,padding:o.edgeInsetPx},A?C.faceDimmed:null,d===null?C.faceUnmeasured:null]},_react2.default.createElement(_reactnative.View,{style:[C.faceTop,{minHeight:o.logoHeightPx}]},y?_react2.default.createElement(_reactnative.Image,{testID:"card-face-logo",source:{uri:y},onLoad:U,style:[{width:h.widthPx,aspectRatio:h.widthPx/h.heightPx},C.faceLogo,k?null:C.faceLogoLoading],resizeMode:"stretch",accessibilityIgnoresInvertColors:!0}):_react2.default.createElement(_reactnative.View,null),A?_react2.default.createElement(_reactnative.Text,{maxFontSizeMultiplier:ae,style:C.faceBadge},A):null),_react2.default.createElement(mt,{width:b(T.chipWidthPx)}),_react2.default.createElement(_reactnative.View,{style:[{gap:b(T.rowGapPx)},H?{paddingRight:o.visaMarkWidthPx+b(T.visaLockupTextGapPx)}:null],onLayout:({nativeEvent:a})=>j(a.layout.height)},_react2.default.createElement(_reactnative.View,{accessible:!0,accessibilityLabel:e.last4?`Card ending in ${e.last4}`:void 0,style:[C.faceNumber,{gap:b(T.rowGapPx)}]},_react2.default.createElement(_reactnative.View,{style:[C.faceDots,{gap:b(T.dotGapPx)}]},Array.from({length:T.maskedDotCount},(a,S)=>_react2.default.createElement(_reactnative.View,{key:S,style:{width:b(T.dotSizePx),height:b(T.dotSizePx),borderRadius:b(T.dotSizePx)/2,backgroundColor:w.secondary,marginLeft:S>0&&S%T.maskedGroupSize===0?b(T.dotGroupGapPx):0}}))),_react2.default.createElement(_reactnative.Text,{maxFontSizeMultiplier:ae,style:[C.faceLast4,{color:w.primary,fontSize:I.cardNumber,lineHeight:I.cardNumber*T.lineHeight.cardNumber}]},(ne=e.last4)!=null?ne:"0000")),_react2.default.createElement(_reactnative.View,{style:[C.faceBottom,{gap:b(T.fieldGapPx)}]},_react2.default.createElement(_reactnative.View,{style:[{gap:b(T.fieldLabelGapPx)},C.faceFieldShrink,{maxWidth:T.cardholderMaxWidthPx*I.fieldValue*u/_jssdkcore.CARD_FACE_TEXT_SIZES.fieldValue.minPx}]},_react2.default.createElement(_reactnative.Text,{numberOfLines:1,maxFontSizeMultiplier:ae,style:[C.faceLabel,L]},"Cardholder"),_react2.default.createElement(_reactnative.Text,{numberOfLines:1,maxFontSizeMultiplier:ae,style:[C.faceValue,G]},(oe=e.cardholder.name)!=null?oe:"")),_react2.default.createElement(_reactnative.View,{style:[{gap:b(T.fieldLabelGapPx)},C.faceFieldEnd]},_react2.default.createElement(_reactnative.Text,{numberOfLines:1,maxFontSizeMultiplier:ae,style:[C.faceLabel,L]},"Valid thru"),_react2.default.createElement(_reactnative.Text,{maxFontSizeMultiplier:ae,style:[C.faceValue,G]},F)))),H?_react2.default.createElement(_reactnative.View,{style:[C.faceBrand,{right:o.edgeInsetPx,bottom:o.edgeInsetPx,width:o.visaMarkWidthPx}],accessible:!0,accessibilityLabel:"Visa debit"},_react2.default.createElement(_reactnative.Text,{allowFontScaling:!1,style:[C.faceDebit,{color:w.primary,fontSize:o.debitSizePx,lineHeight:o.debitSizePx,marginBottom:o.debitGapPx}]},"DEBIT"),_react2.default.createElement(_reactnative.Image,{source:{uri:_jssdkcore.VISA_WORDMARK.uri},style:{width:o.visaMarkWidthPx,height:o.visaMarkHeightPx,tintColor:w.visaMark},resizeMode:"contain"})):null)}function Be({Icon:e,label:t,disabled:r,onPress:d}){let{colors:n}=_chunkKS4KXE4Vjs.b.call(void 0, );return _react2.default.createElement(_reactnative.Pressable,{accessibilityRole:"button",accessibilityState:{disabled:r},disabled:r,onPress:d,style:[C.tile,{backgroundColor:n.backgroundSecondary},r?C.tileDisabled:null]},_react2.default.createElement(e,{size:20,color:n.icon}),_react2.default.createElement(_reactnative.Text,{style:[C.tileLabel,{color:n.text}]},t))}var C=_reactnative.StyleSheet.create({container:{gap:16,padding:16},face:{aspectRatio:_jssdkcore.CARD_WIDTH_MM/_jssdkcore.CARD_HEIGHT_MM,borderRadius:16,justifyContent:"space-between"},faceDimmed:{opacity:.6},faceUnmeasured:{opacity:0},faceTop:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:T.rowGapPx},faceLogoLoading:{opacity:0},faceLogo:{alignSelf:"flex-start",flexShrink:1},faceBadge:{flexShrink:0,fontFamily:_chunkKS4KXE4Vjs.R.semibold,fontSize:12,color:"#FFFFFF",backgroundColor:"rgba(0, 0, 0, 0.35)",paddingHorizontal:10,paddingVertical:4,borderRadius:999,overflow:"hidden"},faceNumber:{flexDirection:"row",alignItems:"center"},faceDots:{flexDirection:"row",alignItems:"center"},faceLast4:{fontFamily:_reactnative.Platform.select({ios:"Menlo",default:"monospace"}),fontWeight:_reactnative.Platform.select({ios:"600",default:"bold"}),letterSpacing:T.letterSpacingPx.cardNumber},faceBottom:{flexDirection:"row",alignItems:"flex-end"},faceFieldShrink:{flexShrink:1,minWidth:0},faceFieldEnd:{alignItems:"flex-end"},faceLabel:{fontFamily:_chunkKS4KXE4Vjs.R.medium,letterSpacing:T.letterSpacingPx.fieldLabel,textTransform:"uppercase"},faceValue:{fontFamily:_chunkKS4KXE4Vjs.R.medium},faceBrand:{position:"absolute",alignItems:"flex-end"},faceDebit:{fontFamily:_reactnative.Platform.select({ios:"Helvetica",default:"sans-serif"})},tiles:{flexDirection:"row",gap:12},tile:{flex:1,alignItems:"center",gap:6,paddingVertical:14,borderRadius:12},tileDisabled:{opacity:.4},tileLabel:{fontFamily:_chunkKS4KXE4Vjs.R.medium,fontSize:14,marginVertical:"auto"},freezeRow:{flexDirection:"row",alignItems:"center",gap:12,padding:16,borderWidth:1,borderRadius:12},freezeText:{flex:1,gap:2},rowTitle:{fontFamily:_chunkKS4KXE4Vjs.R.medium,fontSize:16,lineHeight:22},rowSubtitle:{fontFamily:_chunkKS4KXE4Vjs.R.regular,fontSize:13,lineHeight:18},reason:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",padding:14,borderWidth:1,borderRadius:12}});function Ft(){let{colors:e}=_chunkKS4KXE4Vjs.b.call(void 0, ),t=_chunkMZRVLBIFjs.o.call(void 0, ).app.getConfig(),r=(t==null?void 0:t.legal_name)||(t==null?void 0:t.name)||"This app";return _react2.default.createElement(_reactnative.View,{style:[Lt.container,{backgroundColor:e.backgroundSecondary}]},_react2.default.createElement(_reactnative.Text,{style:[Lt.text,{color:e.textMuted}]},_jssdkcore.getCardDisclosure.call(void 0, r)))}var Lt=_reactnative.StyleSheet.create({container:{padding:16,borderRadius:12},text:{fontFamily:_chunkKS4KXE4Vjs.R.regular,fontSize:12,lineHeight:18}});var Dt="+1 (855) 935-3124",on={pending:"Pending",posted:"Posted",declined:"Declined",expired:"Expired",reversed:"Reversed"},an={expired:"Dispute expired",lost:"Dispute lost",submitted:"Dispute submitted",unsubmitted:"Dispute unsubmitted",won:"Dispute won"};function sn(e){return`tel:${e.trimStart().startsWith("+")?"+":""}${e.replace(/\D/g,"")}`}function zt({transaction:e,cardLast4:t}){let{colors:r}=_chunkKS4KXE4Vjs.b.call(void 0, ),[d,n]=_react.useState.call(void 0, !1),{text:g,isCredit:c}=_jssdkcore.formatSignedTransactionAmount.call(void 0, e),p=c?r.success:r.textTitle,f=e.status==="posted"?r.success:e.status==="declined"?r.error:r.textMuted,y=[{label:"Amount",value:g,color:p},{label:"ATM Fee",value:_jssdkcore.formatUsdAmount.call(void 0, 0)},{label:"Cashback",value:_jssdkcore.formatUsdAmount.call(void 0, 0)},{label:"Currency",value:e.currency.toUpperCase()},{label:"Status",value:on[e.status],color:f},{label:"Dispute",value:e.dispute?an[e.dispute.status]:"None"},{label:"Merchant",value:e.merchant.name},{label:"From",value:t?`\u2022\u2022\u2022\u2022 \u2022\u2022\u2022\u2022 \u2022\u2022\u2022\u2022 ${t}`:null,accessibilityLabel:t?`Card ending in ${t}`:void 0},{label:"Date created",value:_jssdkcore.formatTransactionDate.call(void 0, {unixSeconds:e.created})}];return _react2.default.createElement(_reactnative.ScrollView,{contentContainerStyle:M.container},_react2.default.createElement(_reactnative.View,{style:M.summary},_react2.default.createElement(_reactnative.View,{style:[M.merchantIcon,{backgroundColor:r.backgroundSecondary}]},_react2.default.createElement(_chunkKS4KXE4Vjs.J,{size:24,color:r.iconSubtle})),_react2.default.createElement(_reactnative.Text,{style:[M.amountHeading,{color:p}]},g),_react2.default.createElement(_reactnative.Text,{style:[M.subheader,{color:r.textMuted}]},`Card payment to ${e.merchant.name}`)),_react2.default.createElement(_reactnative.View,{style:M.details},_react2.default.createElement(_reactnative.Text,{style:[M.detailsHeading,{color:r.textTitle}]},"Details"),y.filter(o=>o.value!==null).map(o=>{var k;return _react2.default.createElement(_reactnative.View,{key:o.label,style:M.detailRow},_react2.default.createElement(_reactnative.Text,{style:[M.detailLabel,{color:r.textMuted}]},o.label),_react2.default.createElement(_reactnative.Text,{accessibilityLabel:o.accessibilityLabel,style:[M.detailValue,{color:(k=o.color)!=null?k:r.text}]},o.value))})),_react2.default.createElement(_chunkKS4KXE4Vjs.c,{variant:"secondary",title:"Dispute transaction",style:M.centeredButton,onPress:()=>n(!0)}),_react2.default.createElement(_reactnative.Modal,{transparent:!0,animationType:"fade",visible:d,onRequestClose:()=>n(!1)},_react2.default.createElement(_reactnative.View,{style:M.backdrop},_react2.default.createElement(_reactnative.View,{style:[M.dialog,{backgroundColor:r.background}]},_react2.default.createElement(_reactnative.Text,{style:[M.detailsHeading,{color:r.textTitle}]},"Dispute this transaction"),_react2.default.createElement(_reactnative.Text,{style:[M.dialogBody,{color:r.text}]},"To dispute this transaction, call the number below and our support team will help you."),_react2.default.createElement(_reactnative.Pressable,{accessibilityRole:"link",onPress:()=>void _reactnative.Linking.openURL(sn(Dt))},_react2.default.createElement(_reactnative.Text,{style:[M.phone,{color:r.interactive}]},Dt)),_react2.default.createElement(_chunkKS4KXE4Vjs.c,{title:"Done",onPress:()=>n(!1)})))))}var M=_reactnative.StyleSheet.create({container:{gap:24,padding:24},summary:{alignItems:"center",gap:4},merchantIcon:{width:56,height:56,borderRadius:28,alignItems:"center",justifyContent:"center",marginBottom:8},amountHeading:{fontFamily:_chunkKS4KXE4Vjs.R.semibold,fontSize:28,lineHeight:36},subheader:{fontFamily:_chunkKS4KXE4Vjs.R.regular,fontSize:14,lineHeight:20,textAlign:"center"},details:{gap:12},detailsHeading:{fontFamily:_chunkKS4KXE4Vjs.R.semibold,fontSize:18,lineHeight:24},detailRow:{flexDirection:"row",justifyContent:"space-between",gap:16},detailLabel:{fontFamily:_chunkKS4KXE4Vjs.R.regular,fontSize:14,lineHeight:20},detailValue:{flexShrink:1,fontFamily:_chunkKS4KXE4Vjs.R.medium,fontSize:14,lineHeight:20,textAlign:"right"},centeredButton:{justifyContent:"center"},backdrop:{flex:1,justifyContent:"center",padding:24,backgroundColor:"rgba(0, 0, 0, 0.4)"},dialog:{gap:16,padding:24,borderRadius:16},dialogBody:{fontFamily:_chunkKS4KXE4Vjs.R.regular,fontSize:16,lineHeight:24},phone:{fontFamily:_chunkKS4KXE4Vjs.R.semibold,fontSize:16,lineHeight:24}});var Vt=25;function Mt({cardId:e,environment:t}){let r=_chunkMZRVLBIFjs.o.call(void 0, ),[d,n]=_react.useState.call(void 0, null),[g,c]=_react.useState.call(void 0, !0),[p,f]=_react.useState.call(void 0, void 0),[y,o]=_react.useState.call(void 0, []),[k,v]=_react.useState.call(void 0, !0),[x,j]=_react.useState.call(void 0, !1),[i,h]=_react.useState.call(void 0, !1),[U,u]=_react.useState.call(void 0, void 0),I=_react.useRef.call(void 0, null),b=_react.useRef.call(void 0, !1),F=_react.useRef.call(void 0, null),A=_react.useRef.call(void 0, 0),w=_react.useRef.call(void 0, !1),L=_react.useCallback.call(void 0, a=>{I.current=a.next_cursor,b.current=!0,o(S=>{let R=new Set(S.map(N=>N.id));return[...S,...a.data.filter(N=>!R.has(N.id)).map(N=>_jssdkcore.toTransactionRow.call(void 0, {transaction:N,unknownMerchantName:"Unknown merchant"}))]}),j(a.next_cursor!==null)},[]),G=_react.useCallback.call(void 0, a=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){c(!0),f(void 0);try{let S=yield _jssdkcore.getCardById.call(void 0, r,{cardId:e,environment:t});if(a.aborted)return;n(S),S||f("Could not load this card.")}catch(S){a.aborted||f("Could not load this card.")}finally{a.aborted||c(!1)}}),[r,e,t]),H=_react.useCallback.call(void 0, a=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){let S=++A.current,R=()=>!a.aborted&&S===A.current;v(!0),u(void 0),I.current=null,b.current=!1,o([]);try{let N=yield _jssdkcore.listCardTransactions.call(void 0, r,{cardId:e,environment:t,limit:Vt});if(!R())return;L(N)}catch(N){if(!R())return;j(!0),u("Could not load transactions.")}finally{R()&&v(!1)}}),[r,e,t,L]),le=_react.useCallback.call(void 0, ()=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){let a=F.current;if(!a||a.signal.aborted)return;let{signal:S}=a;if(!b.current){yield H(S);return}let R=I.current;if(R===null||w.current)return;let N=A.current,de=()=>!S.aborted&&N===A.current;w.current=!0,h(!0),u(void 0);try{let Te=yield _jssdkcore.listCardTransactions.call(void 0, r,{cardId:e,environment:t,limit:Vt,cursor:R});if(!de())return;L(Te)}catch(Te){de()&&u("Could not load transactions.")}finally{w.current=!1,S.aborted||h(!1)}}),[r,e,t,L,H]),ne=_react.useCallback.call(void 0, ()=>{let a=F.current;!a||a.signal.aborted||(G(a.signal),H(a.signal))},[G,H]),oe=_react.useCallback.call(void 0, a=>{var S;(S=F.current)!=null&&S.signal.aborted||n(a)},[]);return _react.useEffect.call(void 0, ()=>{let a=new AbortController;return F.current=a,G(a.signal),H(a.signal),()=>a.abort()},[G,H]),{card:d,isCardLoading:g,cardError:p,transactions:y,isLoadingTransactions:k,hasMore:x,isLoadingMore:i,loadMoreError:U,loadMore:le,retry:ne,applyCard:oe}}var _t=({cardId:e,environment:t})=>{let r=_chunkMZRVLBIFjs.o.call(void 0, );_react.useEffect.call(void 0, ()=>{r.track({name:"sdk_card_summary_view_loaded",properties:{cardId:e,environment:t}})},[r,e,t])};var Cn=e=>{let t=_chunkKS4KXE4Vjs.P.call(void 0, );return _react2.default.createElement(_chunkKS4KXE4Vjs.a,{appearance:t},_react2.default.createElement(xn,_chunkC5WYSLQFjs.b.call(void 0, {key:`${e.environment}:${e.cardId}`},e)))};function xn({cardId:e,environment:t,onClose:r,onReplaced:d}){var Oe,$e,Ge,Re,We,je;let{colors:n}=_chunkKS4KXE4Vjs.b.call(void 0, ),g=_chunkMZRVLBIFjs.o.call(void 0, );_t({cardId:e,environment:t});let[c,p]=_react.useState.call(void 0, {kind:"summary"}),[f,y]=_react.useState.call(void 0, !1),[o,k]=_react.useState.call(void 0, !1),[v,x]=_react.useState.call(void 0, null),[j,i]=_react.useState.call(void 0, !1),[h,U]=_react.useState.call(void 0, null),{card:u,isCardLoading:I,cardError:b,transactions:F,isLoadingTransactions:A,hasMore:w,isLoadingMore:L,loadMoreError:G,loadMore:H,retry:le,applyCard:ne}=Mt({cardId:e,environment:t}),oe=o||(u==null?void 0:u.status)==="canceled";_react.useEffect.call(void 0, ()=>{let E=!0;return _jssdkcore.getCardsConfig.call(void 0, g,{appId:g.app.appId,environment:t}).then(K=>{E&&U(K)}).catch(K=>{console.error("[privy] Failed to load the card issuing config",K)}),()=>{E=!1}},[g,t]),_react.useEffect.call(void 0, ()=>{u&&y(u.status==="inactive")},[u]);let a=E=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){let K=f;y(E),x(null),i(!0);try{ne(yield _jssdkcore.updateCardStatus.call(void 0, g,{cardId:e,environment:t,status:E?"inactive":"active"}))}catch(Ot){y(K),x("Could not update this card. Please try again."),console.error("[privy] Failed to update the card freeze state",Ot)}finally{i(!1)}}),S=()=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){x(null),i(!0);try{ne(yield _jssdkcore.updateCardStatus.call(void 0, g,{cardId:e,environment:t,status:"canceled"})),k(!0)}catch(E){x("Could not cancel this card. Please try again."),console.error("[privy] Failed to cancel the card",E)}finally{i(!1)}}),R=E=>_chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){x(null),i(!0);try{let K=yield _jssdkcore.replaceCard.call(void 0, g,{cardId:e,environment:t,reason:E});k(!0),d==null||d(K.id)}catch(K){x("Could not replace this card. Please try again."),console.error("[privy] Failed to replace the card",K)}finally{i(!1)}}),N=oe?_react2.default.createElement(Nt,null,"This card has been cancelled"):f?_react2.default.createElement(Nt,null,"This card is frozen"):null,de=_react2.default.createElement(_react2.default.Fragment,null,_react2.default.createElement(_chunkKS4KXE4Vjs.U,{goBack:c.kind==="summary"?void 0:()=>{x(null),p({kind:"summary"})},close:r}),t==="sandbox"?_react2.default.createElement(_reactnative.View,{style:_.banner},_react2.default.createElement(_chunkKS4KXE4Vjs.S,{variant:"info"},_react2.default.createElement(_chunkKS4KXE4Vjs.T,null,"In sandbox mode using test funds"))):null);if(c.kind==="transaction")return _react2.default.createElement(_reactnative.View,{style:[_.screen,{backgroundColor:n.background}]},de,_react2.default.createElement(zt,{transaction:c.transaction,cardLast4:(Oe=u==null?void 0:u.last4)!=null?Oe:null}));if(c.kind==="details"&&u)return _react2.default.createElement(_reactnative.View,{style:[_.screen,{backgroundColor:n.background}]},de,_react2.default.createElement(_reactnative.View,{style:_.detailsHeader},_react2.default.createElement(_reactnative.Text,{style:[_.heading,{color:n.textTitle}]},"Your Card"),N,v?_react2.default.createElement(_reactnative.Text,{accessibilityRole:"alert",style:[_.errorText,{color:n.error}]},v):null),_react2.default.createElement(Pt,{card:u,environment:t,cardColor:n.interactive,publishableKey:($e=h==null?void 0:h.publishableKey)!=null?$e:null,stripeAccount:(Ge=h==null?void 0:h.stripeAccount)!=null?Ge:null,logoUrl:(Re=h==null?void 0:h.cardLogoUrl)!=null?Re:null,frozen:f,canceled:oe,busy:j,expired:_jssdkcore.isCardExpired.call(void 0, u),onToggleFreeze:E=>void a(E),onCancel:()=>void S(),onReplace:E=>void R(E)}));let Te=_jssdkcore.getCardAssetDisplayName.call(void 0, u==null?void 0:u.asset),Bt=_react2.default.createElement(_reactnative.View,{style:_.sections},_react2.default.createElement(_reactnative.Text,{style:[_.heading,{color:n.textTitle}]},"Wallet"),N,b?_react2.default.createElement(_reactnative.View,{style:[_.errorRow,{backgroundColor:n.backgroundSecondary}]},_react2.default.createElement(_reactnative.Text,{style:[_.errorText,{color:n.error}]},b),_react2.default.createElement(_reactnative.Pressable,{onPress:le,accessibilityRole:"button"},_react2.default.createElement(_reactnative.Text,{style:[_.retry,{color:n.interactive}]},"Try again"))):_react2.default.createElement(ct,{isLoading:I,balance:dt((We=u==null?void 0:u.balance_formatted)!=null?We:null),assetSymbol:Te,cardTitle:u!=null&&u.brand?`${u.brand} debit card`:"Debit card",last4:(je=u==null?void 0:u.last4)!=null?je:void 0,cardColor:n.interactive,onViewDetails:u?()=>{x(null),p({kind:"details"})}:void 0}),_react2.default.createElement(_reactnative.Text,{style:[_.heading,{color:n.textTitle}]},"Transactions"));return _react2.default.createElement(_reactnative.View,{style:[_.screen,{backgroundColor:n.background}]},de,_react2.default.createElement(_reactnative.FlatList,{data:F,keyExtractor:E=>E.id,renderItem:({item:E})=>_react2.default.createElement(st,{transaction:E,onPress:K=>p({kind:"transaction",transaction:K})}),ListHeaderComponent:Bt,ListEmptyComponent:A||G||w?null:_react2.default.createElement(_reactnative.Text,{style:[_.empty,{color:n.textMuted}]},"No transactions found"),ListFooterComponent:_react2.default.createElement(_reactnative.View,{style:_.footer},_react2.default.createElement(lt,{hasMore:w,isLoadingMore:L||A,loadMoreError:G,onLoadMore:()=>void H()}),_react2.default.createElement(Ft,null)),contentContainerStyle:_.list}))}function Nt({children:e}){let{colors:t}=_chunkKS4KXE4Vjs.b.call(void 0, );return _react2.default.createElement(_chunkKS4KXE4Vjs.S,{style:{backgroundColor:t.backgroundHighlight}},_react2.default.createElement(_chunkKS4KXE4Vjs.T,{style:{color:t.textHighlight}},e))}var _=_reactnative.StyleSheet.create({screen:{flex:1},banner:{paddingHorizontal:16},detailsHeader:{gap:12,paddingHorizontal:16},list:{padding:16},sections:{gap:12,marginBottom:4},heading:{fontFamily:_chunkKS4KXE4Vjs.R.semibold,fontSize:20,lineHeight:24,marginTop:12},errorRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:12,padding:16,borderRadius:12},errorText:{flex:1,fontFamily:_chunkKS4KXE4Vjs.R.regular,fontSize:14},retry:{fontFamily:_chunkKS4KXE4Vjs.R.medium,fontSize:14},empty:{fontFamily:_chunkKS4KXE4Vjs.R.regular,fontSize:14,paddingVertical:16,textAlign:"center"},footer:{gap:24,marginTop:8}});exports.CardSummaryView = Cn; exports.useGetCardsForUser = Rt; exports.useSignUpForCard = qt;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }var _chunkAPBCP6B2js = require('./chunk-APBCP6B2.js');var _chunkC5WYSLQFjs = require('./chunk-C5WYSLQF.js');var _expolinking = require('expo-linking'); var O = _interopRequireWildcard(_expolinking); var Q = _interopRequireWildcard(_expolinking);var _react = require('react');var _reactnative = require('react-native');var _jssdkcore = require('@privy-io/js-sdk-core');function M(){return _chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){_chunkAPBCP6B2js.j.call(void 0, "expo-apple-authentication");try{return yield Promise.resolve().then(() => _interopRequireWildcard(require("expo-apple-authentication")))}catch(t){throw new (0, _jssdkcore.PrivyClientError)({code:"configuration_error",error:"`expo-apple-authentication` is not installed. Install it and rebuild the native app."})}})}function H(u){return _chunkC5WYSLQFjs.e.call(void 0, this,arguments,function*({oauthProviderUrl:t,isLogin:i}){try{let o=yield M();return yield o.signInAsync({state:Y(t),requestedScopes:[o.AppleAuthenticationScope.EMAIL,o.AppleAuthenticationScope.FULL_NAME]})}catch(o){throw o instanceof Error&&"code"in o&&o.code==="ERR_REQUEST_CANCELED"?new (0, _jssdkcore.PrivyClientError)({error:"Apple login was cancelled",code:i?"login_with_oauth_was_cancelled_by_user":"link_with_oauth_was_cancelled_by_user"}):o}})}function Y(t){var u;return(u=new URL(t).searchParams.get("state"))!=null?u:""}function z(t){return _reactnative.Platform.select({android:t.replace("x.com","twitter.com"),default:t})}var _expowebbrowser = require('expo-web-browser'); var m = _interopRequireWildcard(_expowebbrowser);function V(o){return _chunkC5WYSLQFjs.e.call(void 0, this,arguments,function*({oauthProviderUrl:t,isLogin:i,returnUrl:u}){var a,p;let n=yield m.openAuthSessionAsync(t,u,{createTask:!1});if(n.type===m.WebBrowserResultType.CANCEL||n.type===m.WebBrowserResultType.DISMISS)throw new (0, _jssdkcore.PrivyClientError)({error:"OAuth was cancelled",code:i?"login_with_oauth_was_cancelled_by_user":"link_with_oauth_was_cancelled_by_user"});if(n.type!=="success")throw new (0, _jssdkcore.PrivyClientError)({error:"OAuth session failed",code:i?"failed_to_complete_login_with_oauth":"failed_to_complete_link_with_oauth"});let r=Q.parse(n.url).queryParams;return{authorizationCode:(a=r==null?void 0:r.privy_oauth_code)!=null?a:null,state:(p=r==null?void 0:r.privy_oauth_state)!=null?p:null,resultUrl:n.url}})}var $=(u={})=>{var o=u,{action:t}=o,i=_chunkC5WYSLQFjs.d.call(void 0, o,["action"]);let{oAuthState:n,setOAuthState:r,client:a}=_react.useContext.call(void 0, _chunkAPBCP6B2js.pa),p=_react.useRef.call(void 0, i);return _react.useEffect.call(void 0, ()=>{p.current=i},[i]),{start:_react.useCallback.call(void 0, function(Nt){return _chunkC5WYSLQFjs.e.call(void 0, this,arguments,function*({provider:c,redirectUri:d,isLegacyAppleIosBehaviorEnabled:G=!1,disableSignup:J,onAppleOAuthUserInfo:S}){var C,U,L,v;r({status:"loading"});let y=_chunkAPBCP6B2js.d.call(void 0, ),g=t?t==="login":!!!y;try{if(y&&t==="login"&&!a.isMultiUserModeEnabled)throw new (0, _jssdkcore.PrivyClientError)({code:"attempted_login_with_oauth_while_already_logged_in",error:"Already logged in, if trying to link an OAuth account use `useLinkWithOAuth`"});if(!y&&t==="link")throw new (0, _jssdkcore.PrivyClientError)({code:"attempted_link_oauth_before_logged_in",error:"Must be logged in to link an OAuth account, use `useLoginWithOAuth`"});if(__DEV__&&d!=null&&d.includes("://")){let e=d.split("://")[0];console.warn(`redirectUri includes a scheme prefix (${e}://), it should be a path instead, such as '/authenticated'`)}let w=O.createURL(d||"/"),{url:s}=yield a.auth.oauth.generateURL(c,w);c==="twitter"&&(s=z(s));let h,b,A,f,I,k,_;if(_reactnative.Platform.OS==="ios"&&c==="apple"&&!G){let e=yield H({oauthProviderUrl:s,isLogin:g});A=e.authorizationCode,f=e.state,_=e,I="raw"}else{let e=yield V({oauthProviderUrl:s,isLogin:g,returnUrl:w});A=e.authorizationCode,f=e.state,k=e.resultUrl}if(!A||!f)throw new (0, _jssdkcore.PrivyClientError)({error:"OAuth invalid credentials",code:g?"login_with_oauth_returned_with_invalid_credentials":"link_with_oauth_returned_with_invalid_credentials"});if(g){let e=_chunkAPBCP6B2js.a.call(void 0, ),x=yield a.auth.oauth.loginWithCode(A,f,c,I,J?"no-signup":"login-or-sign-up",{embedded:e==null?void 0:e.embedded});h=x.user,b=x.is_new_user}else({user:h}=yield a.auth.oauth.linkWithCode(A,f,c,I));return _&&S&&S({fullName:_.fullName,email:_.email}),(U=(C=p.current).onSuccess)==null||U.call(C,h,b),k&&(yield O.openURL(k.split("?")[0])),r({status:"done",isNewUser:b}),h!=null?h:void 0}catch(w){let s=_chunkAPBCP6B2js.h.call(void 0, w);throw r({status:"error",error:s}),(v=(L=p.current).onError)==null||v.call(L,s),s}})},[a.auth.oauth,t,r]),state:n}};function Pt(t){let{state:i,start:u}=$(_chunkC5WYSLQFjs.c.call(void 0, _chunkC5WYSLQFjs.b.call(void 0, {},t),{action:"login"}));return{state:i,login:u}}exports.a = $; exports.b = Pt;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }var _chunkMZRVLBIFjs = require('./chunk-MZRVLBIF.js');var _chunkC5WYSLQFjs = require('./chunk-C5WYSLQF.js');var _expolinking = require('expo-linking'); var O = _interopRequireWildcard(_expolinking); var Q = _interopRequireWildcard(_expolinking);var _react = require('react');var _reactnative = require('react-native');var _jssdkcore = require('@privy-io/js-sdk-core');function M(){return _chunkC5WYSLQFjs.e.call(void 0, this,null,function*(){_chunkMZRVLBIFjs.j.call(void 0, "expo-apple-authentication");try{return yield Promise.resolve().then(() => _interopRequireWildcard(require("expo-apple-authentication")))}catch(t){throw new (0, _jssdkcore.PrivyClientError)({code:"configuration_error",error:"`expo-apple-authentication` is not installed. Install it and rebuild the native app."})}})}function H(u){return _chunkC5WYSLQFjs.e.call(void 0, this,arguments,function*({oauthProviderUrl:t,isLogin:i}){try{let o=yield M();return yield o.signInAsync({state:Y(t),requestedScopes:[o.AppleAuthenticationScope.EMAIL,o.AppleAuthenticationScope.FULL_NAME]})}catch(o){throw o instanceof Error&&"code"in o&&o.code==="ERR_REQUEST_CANCELED"?new (0, _jssdkcore.PrivyClientError)({error:"Apple login was cancelled",code:i?"login_with_oauth_was_cancelled_by_user":"link_with_oauth_was_cancelled_by_user"}):o}})}function Y(t){var u;return(u=new URL(t).searchParams.get("state"))!=null?u:""}function z(t){return _reactnative.Platform.select({android:t.replace("x.com","twitter.com"),default:t})}var _expowebbrowser = require('expo-web-browser'); var m = _interopRequireWildcard(_expowebbrowser);function V(o){return _chunkC5WYSLQFjs.e.call(void 0, this,arguments,function*({oauthProviderUrl:t,isLogin:i,returnUrl:u}){var a,p;let n=yield m.openAuthSessionAsync(t,u,{createTask:!1});if(n.type===m.WebBrowserResultType.CANCEL||n.type===m.WebBrowserResultType.DISMISS)throw new (0, _jssdkcore.PrivyClientError)({error:"OAuth was cancelled",code:i?"login_with_oauth_was_cancelled_by_user":"link_with_oauth_was_cancelled_by_user"});if(n.type!=="success")throw new (0, _jssdkcore.PrivyClientError)({error:"OAuth session failed",code:i?"failed_to_complete_login_with_oauth":"failed_to_complete_link_with_oauth"});let r=Q.parse(n.url).queryParams;return{authorizationCode:(a=r==null?void 0:r.privy_oauth_code)!=null?a:null,state:(p=r==null?void 0:r.privy_oauth_state)!=null?p:null,resultUrl:n.url}})}var $=(u={})=>{var o=u,{action:t}=o,i=_chunkC5WYSLQFjs.d.call(void 0, o,["action"]);let{oAuthState:n,setOAuthState:r,client:a}=_react.useContext.call(void 0, _chunkMZRVLBIFjs.qa),p=_react.useRef.call(void 0, i);return _react.useEffect.call(void 0, ()=>{p.current=i},[i]),{start:_react.useCallback.call(void 0, function(Nt){return _chunkC5WYSLQFjs.e.call(void 0, this,arguments,function*({provider:c,redirectUri:d,isLegacyAppleIosBehaviorEnabled:G=!1,disableSignup:J,onAppleOAuthUserInfo:S}){var C,U,L,v;r({status:"loading"});let y=_chunkMZRVLBIFjs.d.call(void 0, ),g=t?t==="login":!!!y;try{if(y&&t==="login"&&!a.isMultiUserModeEnabled)throw new (0, _jssdkcore.PrivyClientError)({code:"attempted_login_with_oauth_while_already_logged_in",error:"Already logged in, if trying to link an OAuth account use `useLinkWithOAuth`"});if(!y&&t==="link")throw new (0, _jssdkcore.PrivyClientError)({code:"attempted_link_oauth_before_logged_in",error:"Must be logged in to link an OAuth account, use `useLoginWithOAuth`"});if(__DEV__&&d!=null&&d.includes("://")){let e=d.split("://")[0];console.warn(`redirectUri includes a scheme prefix (${e}://), it should be a path instead, such as '/authenticated'`)}let w=O.createURL(d||"/"),{url:s}=yield a.auth.oauth.generateURL(c,w);c==="twitter"&&(s=z(s));let h,b,A,f,I,k,_;if(_reactnative.Platform.OS==="ios"&&c==="apple"&&!G){let e=yield H({oauthProviderUrl:s,isLogin:g});A=e.authorizationCode,f=e.state,_=e,I="raw"}else{let e=yield V({oauthProviderUrl:s,isLogin:g,returnUrl:w});A=e.authorizationCode,f=e.state,k=e.resultUrl}if(!A||!f)throw new (0, _jssdkcore.PrivyClientError)({error:"OAuth invalid credentials",code:g?"login_with_oauth_returned_with_invalid_credentials":"link_with_oauth_returned_with_invalid_credentials"});if(g){let e=_chunkMZRVLBIFjs.a.call(void 0, ),x=yield a.auth.oauth.loginWithCode(A,f,c,I,J?"no-signup":"login-or-sign-up",{embedded:e==null?void 0:e.embedded});h=x.user,b=x.is_new_user}else({user:h}=yield a.auth.oauth.linkWithCode(A,f,c,I));return _&&S&&S({fullName:_.fullName,email:_.email}),(U=(C=p.current).onSuccess)==null||U.call(C,h,b),k&&(yield O.openURL(k.split("?")[0])),r({status:"done",isNewUser:b}),h!=null?h:void 0}catch(w){let s=_chunkMZRVLBIFjs.h.call(void 0, w);throw r({status:"error",error:s}),(v=(L=p.current).onError)==null||v.call(L,s),s}})},[a.auth.oauth,t,r]),state:n}};function Pt(t){let{state:i,start:u}=$(_chunkC5WYSLQFjs.c.call(void 0, _chunkC5WYSLQFjs.b.call(void 0, {},t),{action:"login"}));return{state:i,login:u}}exports.a = $; exports.b = Pt;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkAPBCP6B2js = require('./chunk-APBCP6B2.js');var _chunkC5WYSLQFjs = require('./chunk-C5WYSLQF.js');var C=class extends Error{constructor(o,u){super(u);this.code=o,this.error=u}},he= exports.M =class extends C{constructor(o){super("underlying_error",o instanceof Error?o.message:"An underlying error occurred");this.wrappedError=o}};var _react = require('react'); var _react2 = _interopRequireDefault(_react);var O=_react.createContext.call(void 0, void 0);var ge="#5B4FFF";function Se({colorScheme:a,accentHex:t}){return a==="dark"?{interactive:t,background:"#22222A",backgroundSecondary:"#010110",backgroundInformation:"#1E1B4B",backgroundTertiary:"#010110",backgroundHighlight:"#052E16",text:"#ffffff",textPlaceholder:"#9498B8",textMuted:"#FFFFFF",textHighlight:"#BBF7D0",textTitle:"#FFFFFF",textInteractive:"#FFFFFF",icon:"#FFFFFF",iconInformation:"#818CF8",iconSubtle:"#919191",privyBrand:"#FFFFFF",success:"#4ADE80",successLight:"#C5F7D7",border:"#474869",borderInformation:"#818CF8",error:"#FCA5A5",errorDark:"#EF4444"}:{interactive:t,background:"#FFFFFF",backgroundSecondary:"#F3F3F3",backgroundInformation:"#E0E7FF",backgroundTertiary:"#FFFFFF",backgroundHighlight:"#F1F2F9",text:"#040217",textPlaceholder:"#9498B8",textMuted:"#64668B",textHighlight:"#64668B",textTitle:"#1A1C29",textInteractive:"#FFFFFF",icon:"#110F2A",iconSubtle:"#9498B8",iconInformation:"#4F46E5",privyBrand:"#010110",success:"#16A34A",successLight:"#DCFCE7",border:"#E2E3F0",borderInformation:"#5B4FFF",error:"#EF4444",errorDark:"#B91C1C"}}function ke({colorScheme:a,accentHex:t}){return{colors:Se({colorScheme:a,accentHex:t}),colorScheme:a}}function Oe({children:a,appearance:t={}}){let{colorScheme:o="light",accentColor:u}=t,{isReady:d,client:l}=_react.useContext.call(void 0, _chunkAPBCP6B2js.pa),f=_react.useMemo.call(void 0, ()=>{var B,L;let s=d?l.app.getConfig():void 0,i=(B=s==null?void 0:s.accent_color)!=null?B:void 0;return ke({colorScheme:o,accentHex:(L=u!=null?u:i)!=null?L:ge})},[o,u,d,l]);return _react2.default.createElement(O.Provider,{value:f},a)}var n=()=>{let a=_react.useContext.call(void 0, O);if(a===void 0)throw new Error("Components calling useTheme must be wrapped in an ElementsThemeProvider");return a};var _zustand = require('zustand');var _vanilla = require('zustand/vanilla');var H=_vanilla.createStore.call(void 0, )(a=>({elementsConfig:null,updateUIMounted:t=>a({elementsConfig:t})})),Ra= exports.N =()=>{let{elementsConfig:a}=H.getState();if(!(a!==null))throw new C("privy_elements_not_ready","Privy Elements is not mounted")},ba= exports.O =()=>{let{elementsConfig:a}=H.getState();if(a===null)throw new C("privy_elements_not_ready","Privy Elements is not mounted");return a},qa= exports.P =()=>_zustand.useStore.call(void 0, H,a=>{var t;return(t=a.elementsConfig)==null?void 0:t.appearance}),va= exports.Q =a=>{_react.useEffect.call(void 0, ()=>{let{updateUIMounted:t}=H.getState();return t(a),()=>{t(null)}},[a])};var we={regular:"Inter_400Regular",medium:"Inter_500Medium",semibold:"Inter_600SemiBold"};var _reactnative = require('react-native');var Xe=_react2.default.forwardRef((d,u)=>{var l=d,{style:a,variant:t="default"}=l,o=_chunkC5WYSLQFjs.d.call(void 0, l,["style","variant"]);let{colors:f}=n();return _react2.default.createElement(_reactnative.View,_chunkC5WYSLQFjs.b.call(void 0, {ref:u,style:[E.alert,t==="info"&&{backgroundColor:f.backgroundInformation,borderColor:f.borderInformation},a]},o))});Xe.displayName="Alert";var Ne=_react2.default.forwardRef((u,o)=>{var d=u,{style:a}=d,t=_chunkC5WYSLQFjs.d.call(void 0, d,["style"]);let{colors:l}=n();return _react2.default.createElement(_reactnative.Text,_chunkC5WYSLQFjs.b.call(void 0, {ref:o,style:[E.title,{color:l.text},a]},t))});Ne.displayName="AlertTitle";var _e=_react2.default.forwardRef((u,o)=>{var d=u,{style:a}=d,t=_chunkC5WYSLQFjs.d.call(void 0, d,["style"]);let{colors:l}=n();return _react2.default.createElement(_reactnative.Text,_chunkC5WYSLQFjs.b.call(void 0, {ref:o,style:[E.description,{color:l.text},a]},t))});_e.displayName="AlertDescription";var E=_reactnative.StyleSheet.create({alert:{borderRadius:8,alignItems:"center",gap:12,paddingHorizontal:12,paddingVertical:8,flexDirection:"row"},title:{marginBottom:4,fontFamily:we.semibold,fontSize:16},description:{fontSize:14,lineHeight:20}});var _reactnativesvg = require('react-native-svg'); var V = _interopRequireWildcard(_reactnativesvg);var I={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},Ae={fill:I.fill,stroke:I.stroke,strokeWidth:I.strokeWidth,strokeLinecap:I.strokeLinecap,strokeLinejoin:I.strokeLinejoin};var e=(a,t)=>{let o=_react.forwardRef.call(void 0, (p,L)=>{var M=p,{color:u="currentColor",size:d=24,strokeWidth:l=2,absoluteStrokeWidth:f,children:s,"data-testid":i}=M,B=_chunkC5WYSLQFjs.d.call(void 0, M,["color","size","strokeWidth","absoluteStrokeWidth","children","data-testid"]);let v=_chunkC5WYSLQFjs.b.call(void 0, {stroke:u,strokeWidth:f?Number(l)*24/Number(d):l},B);return _react.createElement.call(void 0, V.Svg,_chunkC5WYSLQFjs.b.call(void 0, _chunkC5WYSLQFjs.c.call(void 0, _chunkC5WYSLQFjs.b.call(void 0, {ref:L},I),{width:d,height:d,"data-testid":i}),v),[...t.map(([D,Te])=>{let Re=D.charAt(0).toUpperCase()+D.slice(1);return _react.createElement.call(void 0, V[Re],_chunkC5WYSLQFjs.b.call(void 0, _chunkC5WYSLQFjs.b.call(void 0, _chunkC5WYSLQFjs.b.call(void 0, {},Ae),v),Te))}),...(Array.isArray(s)?s:[s])||[]])});return o.displayName=`${a}`,o};var G=e("ArrowLeftRight",[["path",{d:"M8 3 4 7l4 4",key:"9rb6wj"}],["path",{d:"M4 7h16",key:"6tx8e3"}],["path",{d:"m16 21 4-4-4-4",key:"siv7j2"}],["path",{d:"M20 17H4",key:"h6l3hr"}]]);var T=e("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);var W=e("Ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]]);var g=e("ChartLine",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]]);var z=e("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);var X=e("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);var N=e("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);var S=e("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);var k=e("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);var w=e("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);var P=e("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);var _=e("Clock10",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 8 10",key:"atfzqc"}]]);var A=e("CloudUpload",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]);var K=e("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);var Z=e("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);var J=e("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);var Q=e("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);var j=e("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);var Y=e("FileCheck",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m9 15 2 2 4-4",key:"1grp1n"}]]);var y=e("FilePen",[["path",{d:"M12.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v9.5",key:"1couwa"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M13.378 15.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"1y4qbx"}]]);var $=e("Files",[["path",{d:"M20 7h-3a2 2 0 0 1-2-2V2",key:"x099mo"}],["path",{d:"M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z",key:"18t6ie"}],["path",{d:"M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8",key:"1nja0z"}]]);var ee=e("Fingerprint",[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]]);var ae=e("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);var te=e("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]]);var oe=e("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);var ue=e("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);var de=e("QrCode",[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]]);var le=e("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);var re=e("ScanFace",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["path",{d:"M9 9h.01",key:"1q5me6"}],["path",{d:"M15 9h.01",key:"x1ddxp"}]]);var fe=e("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);var se=e("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);var ie=e("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);var ce=e("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);var ne=e("Store",[["path",{d:"m2 7 4.41-4.41A2 2 0 0 1 7.83 2h8.34a2 2 0 0 1 1.42.59L22 7",key:"ztvudi"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["path",{d:"M15 22v-4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4",key:"2ebpfo"}],["path",{d:"M2 7h20",key:"1fcdvo"}],["path",{d:"M22 7v3a2 2 0 0 1-2 2a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 16 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 12 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 8 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 4 12a2 2 0 0 1-2-2V7",key:"6c3vgh"}]]);var pe=e("UserCheck",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["polyline",{points:"16 11 18 13 22 9",key:"1pwet4"}]]);var R=e("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var au=({goBack:a,close:t})=>_react2.default.createElement(_reactnative.View,{style:me.navigationBar},_react2.default.createElement(_reactnative.View,null,a&&_react2.default.createElement(Je,{onPress:a})),_react2.default.createElement(_reactnative.View,null,t&&_react2.default.createElement(Qe,{onPress:t}))),Je=a=>{let{colors:t}=n();return _react2.default.createElement(_reactnative.Pressable,_chunkC5WYSLQFjs.b.call(void 0, {accessibilityRole:"button",accessibilityLabel:"Back"},a),_react2.default.createElement(_reactnative.View,{style:me.backButton},_react2.default.createElement(T,{size:24,color:t.icon})))},Qe=a=>{let{colors:t}=n();return _react2.default.createElement(_reactnative.Pressable,_chunkC5WYSLQFjs.b.call(void 0, {accessibilityRole:"button",accessibilityLabel:"Close"},a),_react2.default.createElement(_reactnative.View,{style:me.backButton},_react2.default.createElement(R,{size:24,color:t.icon})))},me=_reactnative.StyleSheet.create({navigationBar:{height:48,flexDirection:"row",justifyContent:"space-between"},backButton:{width:48,height:48,justifyContent:"center",alignItems:"center"}});var Le=_zustand.create.call(void 0, ()=>null),Ye= exports.Y =()=>{var t;let a=(t=Le.getState())==null?void 0:t.controller;return!a||a.signal.aborted?null:a},du= exports.Z =()=>{var a;(a=Ye())==null||a.abort(),Le.setState(null)},lu= exports._ =a=>{Le.setState(t=>t&&{step:a})};var Be=({color:a})=>{let t=_reactnative.useAnimatedValue.call(void 0, 0);_react.useEffect.call(void 0, ()=>{t.setValue(0);let u=_reactnative.Animated.loop(_reactnative.Animated.timing(t,{toValue:1,duration:1200,useNativeDriver:!0,easing:_reactnative.Easing.linear}));return u.start(),()=>u.stop()},[t]);let o=t.interpolate({inputRange:[0,1],outputRange:["0deg","360deg"]});return _react2.default.createElement(_reactnative.Animated.View,{style:{transform:[{rotate:o}]}},_react2.default.createElement(V.default,{width:20,height:20,viewBox:"0 0 20 20",fill:"none"},_react2.default.createElement(_reactnativesvg.Path,{d:"M19 10a9 9 0 11-6.219-8.56",stroke:a,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})))};var Iu=B=>{var L=B,{variant:a="primary",title:t,destroy:o=!1,loading:u=!1,LeftIcon:d,RightIcon:l,color:f,style:s}=L,i=_chunkC5WYSLQFjs.d.call(void 0, L,["variant","title","destroy","loading","LeftIcon","RightIcon","color","style"]);let{colors:p}=n(),M=o?p.errorDark:p.interactive,v={primary:M,secondary:p.backgroundTertiary,tertiary:p.background}[a],D={primary:p.textInteractive,secondary:p.text,tertiary:M}[a];return _react2.default.createElement(_reactnative.Pressable,_chunkC5WYSLQFjs.c.call(void 0, _chunkC5WYSLQFjs.b.call(void 0, {},i),{disabled:i.disabled||u}),_react2.default.createElement(_reactnative.View,{style:[q.buttonBox,{backgroundColor:v},a==="secondary"&&q.buttonBoxSecondary,a==="secondary"&&{borderColor:p.border},s]},u?_react2.default.createElement(Be,{color:f!=null?f:D}):_react2.default.createElement(_react2.default.Fragment,null,d,_react2.default.createElement(_reactnative.Text,{style:[q.buttonLabel,{color:f!=null?f:D},a==="secondary"&&q.buttonLabelSecondary,a==="tertiary"&&q.buttonLabelTertiary]},t),!!l&&_react2.default.createElement(_reactnative.View,{style:{marginLeft:"auto"}},l))))},q=_reactnative.StyleSheet.create({buttonBox:{height:54,flexDirection:"row",justifyContent:"center",alignItems:"center",borderRadius:14,paddingHorizontal:16,gap:12},buttonBoxSecondary:{justifyContent:"flex-start",borderWidth:1,borderRadius:12},buttonLabel:{fontFamily:"Inter_600SemiBold",fontSize:16,lineHeight:24},buttonLabelSecondary:{fontFamily:"Inter_400Regular"},buttonLabelTertiary:{fontFamily:"Inter_500Medium"}});var _expowebbrowser = require('expo-web-browser'); var F = _interopRequireWildcard(_expowebbrowser);var gu=a=>{if(!a)return null;try{return new URL(a).protocol==="https:"?a:null}catch(t){return null}},Su= exports.W =a=>{let t=!1,o=!1,u=null;function d(){o=!0,u==null||u.remove()}function l(f){if(t||o)return;t=!0;let s=!1;u=_reactnative.Platform.OS==="android"?_reactnative.AppState.addEventListener("change",i=>{i==="background"&&(s=!0),i==="active"&&s&&d()}):null,F.openBrowserAsync(f,{createTask:!1}).then(i=>{i.type!==F.WebBrowserResultType.OPENED&&d()}).catch(d)}return a&&l(a),{navigate:l,isClosed:()=>o,dismiss:()=>{o||(d(),t&&_reactnative.Platform.OS==="ios"&&F.dismissBrowser().catch(()=>{}))}}};exports.a = Oe; exports.b = n; exports.c = Iu; exports.d = G; exports.e = W; exports.f = g; exports.g = z; exports.h = X; exports.i = N; exports.j = S; exports.k = k; exports.l = w; exports.m = P; exports.n = _; exports.o = A; exports.p = K; exports.q = Z; exports.r = J; exports.s = Q; exports.t = j; exports.u = Y; exports.v = y; exports.w = $; exports.x = ee; exports.y = ae; exports.z = te; exports.A = oe; exports.B = ue; exports.C = de; exports.D = le; exports.E = re; exports.F = fe; exports.G = se; exports.H = ie; exports.I = ce; exports.J = ne; exports.K = pe; exports.L = C; exports.M = he; exports.N = Ra; exports.O = ba; exports.P = qa; exports.Q = va; exports.R = we; exports.S = Xe; exports.T = _e; exports.U = au; exports.V = gu; exports.W = Su; exports.X = Le; exports.Y = Ye; exports.Z = du; exports._ = lu;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkMZRVLBIFjs = require('./chunk-MZRVLBIF.js');var _chunkC5WYSLQFjs = require('./chunk-C5WYSLQF.js');var C=class extends Error{constructor(o,u){super(u);this.code=o,this.error=u}},he= exports.M =class extends C{constructor(o){super("underlying_error",o instanceof Error?o.message:"An underlying error occurred");this.wrappedError=o}};var _react = require('react'); var _react2 = _interopRequireDefault(_react);var O=_react.createContext.call(void 0, void 0);var ge="#5B4FFF";function Se({colorScheme:a,accentHex:t}){return a==="dark"?{interactive:t,background:"#22222A",backgroundSecondary:"#010110",backgroundInformation:"#1E1B4B",backgroundTertiary:"#010110",backgroundHighlight:"#052E16",text:"#ffffff",textPlaceholder:"#9498B8",textMuted:"#FFFFFF",textHighlight:"#BBF7D0",textTitle:"#FFFFFF",textInteractive:"#FFFFFF",icon:"#FFFFFF",iconInformation:"#818CF8",iconSubtle:"#919191",privyBrand:"#FFFFFF",success:"#4ADE80",successLight:"#C5F7D7",border:"#474869",borderInformation:"#818CF8",error:"#FCA5A5",errorDark:"#EF4444"}:{interactive:t,background:"#FFFFFF",backgroundSecondary:"#F3F3F3",backgroundInformation:"#E0E7FF",backgroundTertiary:"#FFFFFF",backgroundHighlight:"#F1F2F9",text:"#040217",textPlaceholder:"#9498B8",textMuted:"#64668B",textHighlight:"#64668B",textTitle:"#1A1C29",textInteractive:"#FFFFFF",icon:"#110F2A",iconSubtle:"#9498B8",iconInformation:"#4F46E5",privyBrand:"#010110",success:"#16A34A",successLight:"#DCFCE7",border:"#E2E3F0",borderInformation:"#5B4FFF",error:"#EF4444",errorDark:"#B91C1C"}}function ke({colorScheme:a,accentHex:t}){return{colors:Se({colorScheme:a,accentHex:t}),colorScheme:a}}function Oe({children:a,appearance:t={}}){let{colorScheme:o="light",accentColor:u}=t,{isReady:d,client:l}=_react.useContext.call(void 0, _chunkMZRVLBIFjs.qa),f=_react.useMemo.call(void 0, ()=>{var B,L;let s=d?l.app.getConfig():void 0,i=(B=s==null?void 0:s.accent_color)!=null?B:void 0;return ke({colorScheme:o,accentHex:(L=u!=null?u:i)!=null?L:ge})},[o,u,d,l]);return _react2.default.createElement(O.Provider,{value:f},a)}var n=()=>{let a=_react.useContext.call(void 0, O);if(a===void 0)throw new Error("Components calling useTheme must be wrapped in an ElementsThemeProvider");return a};var _zustand = require('zustand');var _vanilla = require('zustand/vanilla');var H=_vanilla.createStore.call(void 0, )(a=>({elementsConfig:null,updateUIMounted:t=>a({elementsConfig:t})})),Ra= exports.N =()=>{let{elementsConfig:a}=H.getState();if(!(a!==null))throw new C("privy_elements_not_ready","Privy Elements is not mounted")},ba= exports.O =()=>{let{elementsConfig:a}=H.getState();if(a===null)throw new C("privy_elements_not_ready","Privy Elements is not mounted");return a},qa= exports.P =()=>_zustand.useStore.call(void 0, H,a=>{var t;return(t=a.elementsConfig)==null?void 0:t.appearance}),va= exports.Q =a=>{_react.useEffect.call(void 0, ()=>{let{updateUIMounted:t}=H.getState();return t(a),()=>{t(null)}},[a])};var we={regular:"Inter_400Regular",medium:"Inter_500Medium",semibold:"Inter_600SemiBold"};var _reactnative = require('react-native');var Xe=_react2.default.forwardRef((d,u)=>{var l=d,{style:a,variant:t="default"}=l,o=_chunkC5WYSLQFjs.d.call(void 0, l,["style","variant"]);let{colors:f}=n();return _react2.default.createElement(_reactnative.View,_chunkC5WYSLQFjs.b.call(void 0, {ref:u,style:[E.alert,t==="info"&&{backgroundColor:f.backgroundInformation,borderColor:f.borderInformation},a]},o))});Xe.displayName="Alert";var Ne=_react2.default.forwardRef((u,o)=>{var d=u,{style:a}=d,t=_chunkC5WYSLQFjs.d.call(void 0, d,["style"]);let{colors:l}=n();return _react2.default.createElement(_reactnative.Text,_chunkC5WYSLQFjs.b.call(void 0, {ref:o,style:[E.title,{color:l.text},a]},t))});Ne.displayName="AlertTitle";var _e=_react2.default.forwardRef((u,o)=>{var d=u,{style:a}=d,t=_chunkC5WYSLQFjs.d.call(void 0, d,["style"]);let{colors:l}=n();return _react2.default.createElement(_reactnative.Text,_chunkC5WYSLQFjs.b.call(void 0, {ref:o,style:[E.description,{color:l.text},a]},t))});_e.displayName="AlertDescription";var E=_reactnative.StyleSheet.create({alert:{borderRadius:8,alignItems:"center",gap:12,paddingHorizontal:12,paddingVertical:8,flexDirection:"row"},title:{marginBottom:4,fontFamily:we.semibold,fontSize:16},description:{fontSize:14,lineHeight:20}});var _reactnativesvg = require('react-native-svg'); var V = _interopRequireWildcard(_reactnativesvg);var I={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},Ae={fill:I.fill,stroke:I.stroke,strokeWidth:I.strokeWidth,strokeLinecap:I.strokeLinecap,strokeLinejoin:I.strokeLinejoin};var e=(a,t)=>{let o=_react.forwardRef.call(void 0, (p,L)=>{var M=p,{color:u="currentColor",size:d=24,strokeWidth:l=2,absoluteStrokeWidth:f,children:s,"data-testid":i}=M,B=_chunkC5WYSLQFjs.d.call(void 0, M,["color","size","strokeWidth","absoluteStrokeWidth","children","data-testid"]);let v=_chunkC5WYSLQFjs.b.call(void 0, {stroke:u,strokeWidth:f?Number(l)*24/Number(d):l},B);return _react.createElement.call(void 0, V.Svg,_chunkC5WYSLQFjs.b.call(void 0, _chunkC5WYSLQFjs.c.call(void 0, _chunkC5WYSLQFjs.b.call(void 0, {ref:L},I),{width:d,height:d,"data-testid":i}),v),[...t.map(([D,Te])=>{let Re=D.charAt(0).toUpperCase()+D.slice(1);return _react.createElement.call(void 0, V[Re],_chunkC5WYSLQFjs.b.call(void 0, _chunkC5WYSLQFjs.b.call(void 0, _chunkC5WYSLQFjs.b.call(void 0, {},Ae),v),Te))}),...(Array.isArray(s)?s:[s])||[]])});return o.displayName=`${a}`,o};var G=e("ArrowLeftRight",[["path",{d:"M8 3 4 7l4 4",key:"9rb6wj"}],["path",{d:"M4 7h16",key:"6tx8e3"}],["path",{d:"m16 21 4-4-4-4",key:"siv7j2"}],["path",{d:"M20 17H4",key:"h6l3hr"}]]);var T=e("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);var W=e("Ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]]);var g=e("ChartLine",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]]);var z=e("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);var X=e("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);var N=e("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);var S=e("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);var k=e("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);var w=e("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);var P=e("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);var _=e("Clock10",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 8 10",key:"atfzqc"}]]);var A=e("CloudUpload",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]);var K=e("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);var Z=e("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);var J=e("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);var Q=e("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);var j=e("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);var Y=e("FileCheck",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m9 15 2 2 4-4",key:"1grp1n"}]]);var y=e("FilePen",[["path",{d:"M12.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v9.5",key:"1couwa"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M13.378 15.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"1y4qbx"}]]);var $=e("Files",[["path",{d:"M20 7h-3a2 2 0 0 1-2-2V2",key:"x099mo"}],["path",{d:"M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z",key:"18t6ie"}],["path",{d:"M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8",key:"1nja0z"}]]);var ee=e("Fingerprint",[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]]);var ae=e("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);var te=e("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]]);var oe=e("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);var ue=e("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);var de=e("QrCode",[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]]);var le=e("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);var re=e("ScanFace",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["path",{d:"M9 9h.01",key:"1q5me6"}],["path",{d:"M15 9h.01",key:"x1ddxp"}]]);var fe=e("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);var se=e("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);var ie=e("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);var ce=e("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);var ne=e("Store",[["path",{d:"m2 7 4.41-4.41A2 2 0 0 1 7.83 2h8.34a2 2 0 0 1 1.42.59L22 7",key:"ztvudi"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["path",{d:"M15 22v-4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4",key:"2ebpfo"}],["path",{d:"M2 7h20",key:"1fcdvo"}],["path",{d:"M22 7v3a2 2 0 0 1-2 2a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 16 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 12 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 8 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 4 12a2 2 0 0 1-2-2V7",key:"6c3vgh"}]]);var pe=e("UserCheck",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["polyline",{points:"16 11 18 13 22 9",key:"1pwet4"}]]);var R=e("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var au=({goBack:a,close:t})=>_react2.default.createElement(_reactnative.View,{style:me.navigationBar},_react2.default.createElement(_reactnative.View,null,a&&_react2.default.createElement(Je,{onPress:a})),_react2.default.createElement(_reactnative.View,null,t&&_react2.default.createElement(Qe,{onPress:t}))),Je=a=>{let{colors:t}=n();return _react2.default.createElement(_reactnative.Pressable,_chunkC5WYSLQFjs.b.call(void 0, {accessibilityRole:"button",accessibilityLabel:"Back"},a),_react2.default.createElement(_reactnative.View,{style:me.backButton},_react2.default.createElement(T,{size:24,color:t.icon})))},Qe=a=>{let{colors:t}=n();return _react2.default.createElement(_reactnative.Pressable,_chunkC5WYSLQFjs.b.call(void 0, {accessibilityRole:"button",accessibilityLabel:"Close"},a),_react2.default.createElement(_reactnative.View,{style:me.backButton},_react2.default.createElement(R,{size:24,color:t.icon})))},me=_reactnative.StyleSheet.create({navigationBar:{height:48,flexDirection:"row",justifyContent:"space-between"},backButton:{width:48,height:48,justifyContent:"center",alignItems:"center"}});var Le=_zustand.create.call(void 0, ()=>null),Ye= exports.Y =()=>{var t;let a=(t=Le.getState())==null?void 0:t.controller;return!a||a.signal.aborted?null:a},du= exports.Z =()=>{var a;(a=Ye())==null||a.abort(),Le.setState(null)},lu= exports._ =a=>{Le.setState(t=>t&&{step:a})};var Be=({color:a})=>{let t=_reactnative.useAnimatedValue.call(void 0, 0);_react.useEffect.call(void 0, ()=>{t.setValue(0);let u=_reactnative.Animated.loop(_reactnative.Animated.timing(t,{toValue:1,duration:1200,useNativeDriver:!0,easing:_reactnative.Easing.linear}));return u.start(),()=>u.stop()},[t]);let o=t.interpolate({inputRange:[0,1],outputRange:["0deg","360deg"]});return _react2.default.createElement(_reactnative.Animated.View,{style:{transform:[{rotate:o}]}},_react2.default.createElement(V.default,{width:20,height:20,viewBox:"0 0 20 20",fill:"none"},_react2.default.createElement(_reactnativesvg.Path,{d:"M19 10a9 9 0 11-6.219-8.56",stroke:a,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})))};var Iu=B=>{var L=B,{variant:a="primary",title:t,destroy:o=!1,loading:u=!1,LeftIcon:d,RightIcon:l,color:f,style:s}=L,i=_chunkC5WYSLQFjs.d.call(void 0, L,["variant","title","destroy","loading","LeftIcon","RightIcon","color","style"]);let{colors:p}=n(),M=o?p.errorDark:p.interactive,v={primary:M,secondary:p.backgroundTertiary,tertiary:p.background}[a],D={primary:p.textInteractive,secondary:p.text,tertiary:M}[a];return _react2.default.createElement(_reactnative.Pressable,_chunkC5WYSLQFjs.c.call(void 0, _chunkC5WYSLQFjs.b.call(void 0, {},i),{disabled:i.disabled||u}),_react2.default.createElement(_reactnative.View,{style:[q.buttonBox,{backgroundColor:v},a==="secondary"&&q.buttonBoxSecondary,a==="secondary"&&{borderColor:p.border},s]},u?_react2.default.createElement(Be,{color:f!=null?f:D}):_react2.default.createElement(_react2.default.Fragment,null,d,_react2.default.createElement(_reactnative.Text,{style:[q.buttonLabel,{color:f!=null?f:D},a==="secondary"&&q.buttonLabelSecondary,a==="tertiary"&&q.buttonLabelTertiary]},t),!!l&&_react2.default.createElement(_reactnative.View,{style:{marginLeft:"auto"}},l))))},q=_reactnative.StyleSheet.create({buttonBox:{height:54,flexDirection:"row",justifyContent:"center",alignItems:"center",borderRadius:14,paddingHorizontal:16,gap:12},buttonBoxSecondary:{justifyContent:"flex-start",borderWidth:1,borderRadius:12},buttonLabel:{fontFamily:"Inter_600SemiBold",fontSize:16,lineHeight:24},buttonLabelSecondary:{fontFamily:"Inter_400Regular"},buttonLabelTertiary:{fontFamily:"Inter_500Medium"}});var _expowebbrowser = require('expo-web-browser'); var F = _interopRequireWildcard(_expowebbrowser);var gu=a=>{if(!a)return null;try{return new URL(a).protocol==="https:"?a:null}catch(t){return null}},Su= exports.W =a=>{let t=!1,o=!1,u=null;function d(){o=!0,u==null||u.remove()}function l(f){if(t||o)return;t=!0;let s=!1;u=_reactnative.Platform.OS==="android"?_reactnative.AppState.addEventListener("change",i=>{i==="background"&&(s=!0),i==="active"&&s&&d()}):null,F.openBrowserAsync(f,{createTask:!1}).then(i=>{i.type!==F.WebBrowserResultType.OPENED&&d()}).catch(d)}return a&&l(a),{navigate:l,isClosed:()=>o,dismiss:()=>{o||(d(),t&&_reactnative.Platform.OS==="ios"&&F.dismissBrowser().catch(()=>{}))}}};exports.a = Oe; exports.b = n; exports.c = Iu; exports.d = G; exports.e = W; exports.f = g; exports.g = z; exports.h = X; exports.i = N; exports.j = S; exports.k = k; exports.l = w; exports.m = P; exports.n = _; exports.o = A; exports.p = K; exports.q = Z; exports.r = J; exports.s = Q; exports.t = j; exports.u = Y; exports.v = y; exports.w = $; exports.x = ee; exports.y = ae; exports.z = te; exports.A = oe; exports.B = ue; exports.C = de; exports.D = le; exports.E = re; exports.F = fe; exports.G = se; exports.H = ie; exports.I = ce; exports.J = ne; exports.K = pe; exports.L = C; exports.M = he; exports.N = Ra; exports.O = ba; exports.P = qa; exports.Q = va; exports.R = we; exports.S = Xe; exports.T = _e; exports.U = au; exports.V = gu; exports.W = Su; exports.X = Le; exports.Y = Ye; exports.Z = du; exports._ = lu;
2
2
  /*! Bundled license information:
3
3
 
4
4
  lucide-react-native/dist/esm/defaultAttributes.js: