try{let e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`8244021c-3749-490b-ade8-4a74472f0538`,e._sentryDebugIdIdentifier=`sentry-dbid-8244021c-3749-490b-ade8-4a74472f0538`)}catch{}import{o as e}from"./rolldown-runtime-nx40z1zs.js";import{Ag as t,Um as n,Yh as r,Zm as i,_r as a,jg as o,ng as s}from"./entry.client-mpghtlrl.js";import{n as c}from"./DialogShell-ga7ic6wy.js";import{l}from"./purchasePageReadyUtils-h1z511qr.js";import{n as u}from"./RedeemHost-h6yfzbd7.js";var d=t(),f=e(o(),1),p=s(),m=a(e=>{let t=(0,d.c)(3),n=u.useComponent(),r;return t[0]!==n||t[1]!==e?(r=(0,p.jsx)(n,{...e}),t[0]=n,t[1]=e,t[2]=r):r=t[2],r},e=>{let{queryClient:t,systems:{dialog:a}}=n(),o=l(),{authentication:{queries:{xToken:s}}}=i(),{mutate:c}=r(a.mutations.goBack.getOptions()),u=(0,f.useCallback)(async e=>(await t.fetchQuery(s.getActiveUserQuery().getOptions({uri:e}))).toAuthenticationHeader(),[t,s]),d=(0,f.useCallback)(e=>{c()},[c]);return{...e,getAuthToken:u,onExit:d,flowId:o,flowSource:void 0}}),h=e=>{let t=(0,d.c)(13),n=c.useComponent(),r=m.useComponent(),i=e.allowedStoreIds,a=e.redeemFlowConfiguration,o=e.disallowCsvRedemption,s=e.callerApplicationId,l=e.campaignId,u=e.optionalCampaignId,f=e.purchaseSource,h;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(h=performance.now(),t[0]=h):h=t[0];let g;t[1]!==r||t[2]!==e.allowedStoreIds||t[3]!==e.redeemFlowConfiguration||t[4]!==e.disallowCsvRedemption||t[5]!==e.callerApplicationId||t[6]!==e.campaignId||t[7]!==e.optionalCampaignId||t[8]!==e.purchaseSource?(g=(0,p.jsx)(r,{allowedStoreIds:i,redeemFlowConfiguration:a,disallowCsvRedemption:o,callerApplicationId:s,campaignId:l,optionalCampaignId:u,purchaseSource:f,redeemLaunchStartTime:h}),t[1]=r,t[2]=e.allowedStoreIds,t[3]=e.redeemFlowConfiguration,t[4]=e.disallowCsvRedemption,t[5]=e.callerApplicationId,t[6]=e.campaignId,t[7]=e.optionalCampaignId,t[8]=e.purchaseSource,t[9]=g):g=t[9];let _;return t[10]!==n||t[11]!==g?(_=(0,p.jsx)(n,{className:`h-full w-full overflow-visible`,children:g}),t[10]=n,t[11]=g,t[12]=_):_=t[12],_};export{h as RedeemDialog,h as default};