@forgeroute/ui 0.5.1 → 0.5.2

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.
@@ -1 +1 @@
1
- {"version":3,"file":"forgeroute-ui-stripe.mjs","names":[],"sources":["../../../projects/forgeroute-ui/stripe/src/stripe-loader/stripe-loader.ts","../../../projects/forgeroute-ui/stripe/src/errors/stripe-errors.ts","../../../projects/forgeroute-ui/stripe/src/stripe-payment/stripe-outcomes.ts","../../../projects/forgeroute-ui/stripe/src/stripe-payment/stripe-actions.ts","../../../projects/forgeroute-ui/stripe/src/stripe-payment/stripe-appearance.ts","../../../projects/forgeroute-ui/stripe/src/stripe-payment/stripe-payment.component.ts","../../../projects/forgeroute-ui/stripe/src/microdeposit-verify/microdeposit-verify.models.ts","../../../projects/forgeroute-ui/stripe/src/microdeposit-verify/microdeposit-verify.component.ts","../../../projects/forgeroute-ui/stripe/src/stripe-connect/stripe-connect.flow.ts","../../../projects/forgeroute-ui/stripe/src/stripe-connect/stripe-connect.component.ts","../../../projects/forgeroute-ui/stripe/src/payment-stripe-method/payment-stripe-method.models.ts","../../../projects/forgeroute-ui/stripe/src/payment-stripe-method/payment-stripe-body.component.ts","../../../projects/forgeroute-ui/stripe/src/payment-stripe-method/payment-stripe-method.component.ts"],"sourcesContent":["import { InjectionToken, type Provider } from '@angular/core';\nimport type { StripeLike, StripeLoadOptions } from './stripe-types';\n\n/**\n * Loads Stripe.js: `loader(publishableKey, options)` resolves the `Stripe` object (or `null` when it could not be created).\n * It is called exactly like `loadStripe(key, options)` from `@stripe/stripe-js`: the second argument is `undefined` unless a Connect\n * account / locale / other option is set.\n */\nexport type StripeLoaderFn = (publishableKey: string, options?: StripeLoadOptions) => Promise<StripeLike | null>;\n\n/** The dynamic import of the Stripe SDK, behind an object so a spec can replace it (internal: not part of the public API). */\nexport const sdkImporter: { load: () => Promise<{ loadStripe: (key: string, options?: never) => Promise<unknown> }> } = {\n load: () => import('@stripe/stripe-js') as unknown as Promise<{ loadStripe: (key: string, options?: never) => Promise<unknown> }>,\n};\n\n/**\n * The default loader. `@stripe/stripe-js` is imported lazily (a dynamic import), so the Stripe SDK is only downloaded when a\n * payment form is actually shown, and it is an optional peer dependency of the library.\n */\nexport const defaultStripeLoader: StripeLoaderFn = async (publishableKey, options) => {\n const sdk = await sdkImporter.load();\n const stripe = options === undefined ? await sdk.loadStripe(publishableKey) : await sdk.loadStripe(publishableKey, options as never);\n return stripe as unknown as StripeLike | null;\n};\n\n/** How Stripe.js is loaded. Provide your own to fake Stripe in tests or to load it differently. Defaults to `defaultStripeLoader`. */\nexport const STRIPE_LOADER = new InjectionToken<StripeLoaderFn>('STRIPE_LOADER', { providedIn: 'root', factory: () => defaultStripeLoader });\n\n/** App-wide defaults for every `ui-stripe-payment`, set once with `provideStripePayment`. A value on the component always wins. */\nexport interface StripePaymentDefaults {\n /** The publishable key (`pk_...`), used when the component has no `publishableKey` of its own. */\n publishableKey?: string;\n /** Stripe.js locale (`'en'`, `'es'`, ...): passed to `loadStripe` as `{ locale }`. */\n locale?: string;\n}\n\nexport const STRIPE_PAYMENT_DEFAULTS = new InjectionToken<StripePaymentDefaults>('STRIPE_PAYMENT_DEFAULTS', { providedIn: 'root', factory: () => ({}) });\n\nexport interface ProvideStripePaymentOptions extends StripePaymentDefaults {\n /** Replaces how Stripe.js is loaded (tests, a self-hosted loader). */\n loader?: StripeLoaderFn;\n}\n\n/**\n * Global defaults for the Stripe components:\n *\n * providers: [provideStripePayment({ publishableKey: environment.stripePublishableKey, locale: 'en' })]\n */\nexport function provideStripePayment(options: ProvideStripePaymentOptions = {}): Provider[] {\n const { loader, ...defaults } = options;\n const providers: Provider[] = [{ provide: STRIPE_PAYMENT_DEFAULTS, useValue: defaults }];\n if (loader) providers.push({ provide: STRIPE_LOADER, useValue: loader });\n return providers;\n}\n\n/** `loadStripe`'s second argument for a Connect account / locale / extra options; `undefined` when there is nothing to pass (like the apps do today). */\nexport function buildLoadOptions(stripeAccount: string | null | undefined, locale: string | null | undefined, extra?: StripeLoadOptions | null): StripeLoadOptions | undefined {\n const options: StripeLoadOptions = { ...(extra ?? {}) };\n if (locale) options.locale = locale;\n if (stripeAccount) options.stripeAccount = stripeAccount;\n return Object.keys(options).length ? options : undefined;\n}\n","import type { StripeErrorLike } from '../stripe-loader/stripe-types';\nimport { UiLabelKey, uiText } from '@forgeroute/ui';\n\n/**\n * Plain-language text for the Stripe decline / error codes (https://docs.stripe.com/declines/codes). One table for every app; an app can replace single entries\n * with the `errorMessages` input of `ui-stripe-payment` (or the `overrides` option of `getStripeErrorMessage`).\n */\nexport const STRIPE_ERROR_MESSAGES: Readonly<Record<string, string>> = {\n // Card issue codes\n stolen_card: 'This card has been reported as stolen. Please use a different payment method.',\n lost_card: 'This card has been reported as lost. Please use a different payment method.',\n card_declined: 'Your card was declined. Please contact your bank or use a different card.',\n generic_decline: 'Your card was declined. Please contact your bank or try a different card.',\n insufficient_funds: 'Your card has insufficient funds. Please use a different card or add funds to your account.',\n do_not_honor: 'Your bank has declined this transaction. Please contact your bank or use a different card.',\n card_not_supported: 'This card does not support this type of purchase. Please use a different card.',\n currency_not_supported: 'This card does not support the requested currency. Please use a different card.',\n duplicate_transaction: 'A duplicate transaction was detected. Please wait a few minutes before trying again.',\n expired_card: 'Your card has expired. Please use a different card.',\n incorrect_cvc: 'The security code (CVC) is incorrect. Please check and try again.',\n incorrect_number: 'The card number is incorrect. Please check and try again.',\n invalid_cvc: 'The security code (CVC) is invalid. Please check and try again.',\n invalid_expiry_month: 'The expiration month is invalid. Please check and try again.',\n invalid_expiry_year: 'The expiration year is invalid. Please check and try again.',\n invalid_number: 'The card number is invalid. Please check and try again.',\n processing_error: 'An error occurred while processing your card. Please try again.',\n incorrect_zip: 'The ZIP/postal code is incorrect. Please check and try again.',\n card_velocity_exceeded: 'You have exceeded the balance or credit limit on your card. Please contact your bank.',\n withdrawal_count_limit_exceeded: 'You have exceeded the allowed number of transactions. Please try again later or use a different card.',\n // Authentication codes\n authentication_required: 'This card requires authentication. Please try again and complete the verification step.',\n // Fraud codes\n fraudulent: 'This transaction has been flagged by your bank. Please contact your bank or use a different card.',\n merchant_blacklist: 'This card cannot be used for this transaction. Please use a different card.',\n pickup_card: 'This card cannot be used. Please contact your bank or use a different card.',\n restricted_card: 'This card has restrictions that prevent this transaction. Please contact your bank or use a different card.',\n security_violation: 'This card has been flagged for a security violation. Please contact your bank.',\n // Account codes\n issuer_not_available: 'Your card issuer could not be reached. Please try again later.',\n new_account_information_available: 'Your card details have changed. Please update your card information and try again.',\n try_again_later: 'Your card issuer is temporarily unable to process this transaction. Please try again later.',\n reenter_transaction: 'The transaction could not be processed. Please try again.',\n // Limit codes\n approve_with_id: 'The payment cannot be authorized. Please contact your bank.',\n call_issuer: 'Your bank has declined this transaction. Please call your bank for more information.',\n do_not_try_again: 'Your bank has permanently declined this card. Please use a different payment method.',\n no_action_taken: 'Your bank could not process this transaction. Please contact your bank.',\n not_permitted: 'This transaction is not permitted on this card. Please contact your bank or use a different card.',\n revocation_of_all_authorizations: 'All authorizations have been revoked for this card. Please contact your bank.',\n revocation_of_authorization: 'The authorization for this card has been revoked. Please contact your bank.',\n stop_payment_order: 'Your bank has stopped this payment. Please contact your bank.',\n // Test mode\n testmode_decline: 'This is a test decline. No real charge was attempted.',\n // ACH\n bank_account_declined: 'Your bank account could not be used. Please try a different account.',\n debit_not_authorized: 'The debit was not authorized. Please contact your bank.',\n // Payment / setup intent state errors\n payment_intent_unexpected_state: 'This payment has already been processed. Please refresh the page and try again.',\n payment_intent_authentication_failure: 'Payment authentication failed. Please try again.',\n payment_intent_incompatible_payment_method: 'This payment method is not compatible. Please use a different payment method.',\n payment_intent_payment_attempt_failed: 'The payment attempt failed. Please try again or use a different payment method.',\n payment_method_unactivated: 'This payment method is not activated. Please use a different payment method.',\n payment_method_unexpected_state: 'There was an issue with your payment method. Please try again.',\n setup_intent_unexpected_state: 'This payment setup has already been completed. Please refresh the page.',\n amount_too_small: 'The payment amount is too small to process. Please contact the business.',\n amount_too_large: 'The payment amount exceeds the maximum allowed. Please contact the business.',\n balance_insufficient: 'Insufficient balance to complete this payment. Please use a different payment method.',\n resource_missing: 'The payment session has expired. Please refresh the page and try again.',\n};\n\n/** Text for the Stripe error types that are about Stripe or the connection, never about the customer's input (Stripe's own text there is technical). */\nexport const STRIPE_TECHNICAL_ERROR_MESSAGES: Readonly<Record<string, string>> = {\n api_connection_error: 'We could not reach the payment service. Please check your connection and try again.',\n rate_limit_error: 'Too many requests. Please wait a moment and try again.',\n api_error: 'Something went wrong while processing the payment. Please try again.',\n authentication_error: 'Something went wrong while processing the payment. Please try again.',\n invalid_request_error: 'Something went wrong while processing the payment. Please try again.',\n};\n\nexport const STRIPE_DEFAULT_ERROR_MESSAGE = 'Payment failed. Please try again.';\nexport const STRIPE_ALREADY_PROCESSED_MESSAGE = 'This payment has already been processed. Please refresh the page and try again.';\nexport const STRIPE_SESSION_EXPIRED_MESSAGE = 'Your payment session has expired. Please refresh the page and try again.';\n\n/** The English table with every text looked up in the app's active language (an unknown code keeps its English text). */\nfunction localizedTable(english: Readonly<Record<string, string>>, prefix: string): Record<string, string> {\n return Object.fromEntries(Object.keys(english).map(code => [code, uiText(`${prefix}${code}` as UiLabelKey)]));\n}\n\nexport type StripeErrorDisplay = 'friendly' | 'table' | 'stripe';\n\nexport interface StripeErrorMessageOptions {\n /**\n * `'friendly'` (default): the table above first, then Stripe's own text for card / validation errors (customer-facing) and plain text for technical errors.\n * `'table'`: the table, then Stripe's own `message` for EVERYTHING else, technical errors included (what the cremo payment flows show today).\n * `'stripe'`: Stripe's own `message` untouched (what the apps that show `error.message` do), the fallback when there is none.\n */\n display?: StripeErrorDisplay;\n /** Text for single codes; wins over the table. */\n overrides?: Readonly<Record<string, string>> | null;\n /** Shown when there is nothing better. */\n fallback?: string;\n}\n\n/**\n * The text to show the customer for a Stripe.js error.\n * Friendly mode order: decline_code, code, the two technical Stripe messages (\"already succeeded\" / \"previously confirmed\", \"expired\"),\n * technical error types, Stripe's own message, the fallback. Table mode is the same without the technical error types.\n */\nexport function getStripeErrorMessage(error: StripeErrorLike | null | undefined, options: StripeErrorMessageOptions = {}): string {\n const fallback = options.fallback ?? uiText('stripeErrors.defaultMessage');\n if (!error) return fallback;\n if (options.display === 'stripe') return error.message || fallback;\n const table = { ...localizedTable(STRIPE_ERROR_MESSAGES, 'stripeErrors.'), ...(options.overrides ?? {}) };\n if (error.decline_code && table[error.decline_code]) return table[error.decline_code];\n if (error.code && table[error.code]) return table[error.code];\n const message = error.message;\n if (message) {\n if (message.includes('already succeeded') || message.includes('previously confirmed')) return options.overrides?.['payment_intent_unexpected_state'] ?? uiText('stripeErrors.alreadyProcessed');\n if (message.includes('expired')) return uiText('stripeErrors.sessionExpired');\n }\n const technical = options.display === 'table' || !error.type || !(error.type in STRIPE_TECHNICAL_ERROR_MESSAGES) ? undefined : uiText(`stripeErrors.technical.${error.type}` as UiLabelKey);\n if (technical) return technical;\n return message || fallback;\n}\n","import { getStripeErrorMessage, type StripeErrorMessageOptions } from '../errors/stripe-errors';\nimport type { StripeConfirmationTokenLike, StripeErrorLike, StripeIntentLike } from '../stripe-loader/stripe-types';\nimport { UiLabelKey, uiText } from '@forgeroute/ui';\n\nexport type StripeIntentKind = 'setup' | 'payment';\n\n/**\n * What happened, in one word:\n * - `succeeded`: the intent succeeded (card charged / method saved).\n * - `processing`: the payment was accepted and is settling (a bank debit takes days).\n * - `requires_verification`: a bank account was entered by number; Stripe sent micro-deposits and the customer has to verify them (see `verification`).\n * - `requires_action`: the intent still needs the customer to do something else (3D Secure, a redirect-less next action).\n * - `requires_capture`: the payment is authorized and waits for the host to capture it (`captureMethod: 'manual'`).\n * - `requires_payment_method`: Stripe sends the intent back for a new payment method (the payment failed).\n * - `canceled` / `unknown`: any other status.\n */\nexport type StripeOutcome = 'succeeded' | 'processing' | 'requires_verification' | 'requires_action' | 'requires_capture' | 'requires_payment_method' | 'canceled' | 'unknown';\n\n/** What the customer has to do to verify a bank account (`next_action.verify_with_microdeposits`). */\nexport interface StripeVerification {\n /** `'amounts'` (two deposits), `'descriptor_code'` (one deposit with a code) or `null` when Stripe did not say. */\n type: 'amounts' | 'descriptor_code' | null;\n /** When the deposits should have arrived: Unix seconds as Stripe sends it, and the same instant as an ISO string. `null` when unknown. */\n arrivalDate: number | null;\n arrivalDateIso: string | null;\n /** Stripe's own page where the customer can verify (https), or `null`. */\n hostedVerificationUrl: string | null;\n}\n\n/** The normalised result of a confirmation (or of `handleReturn`). */\nexport interface StripeConfirmedEvent {\n kind: StripeIntentKind;\n /** Stripe's own `status` of the intent. */\n status: string;\n outcome: StripeOutcome;\n /** The intent exactly as Stripe.js returned it. */\n intent: StripeIntentLike;\n setupIntent?: StripeIntentLike;\n paymentIntent?: StripeIntentLike;\n intentId: string;\n /** The payment method of the intent as an id (`pm_...`), whether Stripe sent it as a string or an object; `null` when there is none. */\n paymentMethodId: string | null;\n /** Set when `outcome` is `requires_verification`. */\n verification: StripeVerification | null;\n /** The 3D Secure step (`stripe.handleCardAction`) ran before this result (`autoHandleCardAction` / `handleNextAction`). Hosts use it for their post-3DS wording. */\n actionHandled: boolean;\n}\n\n/** The funding of a card as Stripe reports it in a ConfirmationToken's `payment_method_preview.card.funding`. */\nexport type StripeCardFunding = 'credit' | 'debit' | 'prepaid' | 'unknown';\n\n/**\n * A ConfirmationToken made from the typed form (`createConfirmationToken()` / `collectConfirmationToken`), with what Stripe shows about the payment method BEFORE any\n * intent exists. `funding` is only for display and for hosts that estimate a fee; a backend that charges by it must read the funding itself from the token id\n * (`stripe.confirmationTokens.retrieve`), never trust the browser.\n */\nexport interface StripeConfirmationTokenEvent {\n /** `ctoken_...`: send it to your backend with the request that creates the intent. */\n id: string;\n /** The preview's payment method type (`'card'`, `'us_bank_account'`, `'link'`, ...), `null` when Stripe sent none. */\n paymentMethodType: string | null;\n /** The card's funding; `null` when the payment method is not a card, `'unknown'` when Stripe did not say. */\n funding: StripeCardFunding | null;\n brand: string | null;\n last4: string | null;\n country: string | null;\n /** `'apple_pay'` / `'google_pay'` / ... when a wallet card was used. */\n wallet: string | null;\n}\n\n/** The normalised {@link StripeConfirmationTokenEvent} of a ConfirmationToken. */\nexport function confirmationTokenEventOf(token: StripeConfirmationTokenLike): StripeConfirmationTokenEvent {\n const preview = token.payment_method_preview;\n const card = preview?.card ?? null;\n const funding = card ? (card.funding === 'credit' || card.funding === 'debit' || card.funding === 'prepaid' ? card.funding : 'unknown') : null;\n return {\n id: token.id,\n paymentMethodType: preview?.type ?? null,\n funding,\n brand: card?.brand ?? null,\n last4: card?.last4 ?? null,\n country: card?.country ?? null,\n wallet: card?.wallet?.type ?? null,\n };\n}\n\n/** Why a flow stopped. */\nexport type StripeFailureStage = 'load' | 'submit' | 'intent' | 'confirm' | 'action' | 'result' | 'verify' | 'return';\n\n/** A failure: `message` is what to show the customer; `stripeMessage` is Stripe's own text. */\nexport interface StripeFailure {\n code: string;\n message: string;\n stripeMessage: string;\n declineCode?: string;\n type?: string;\n stage: StripeFailureStage;\n /** The Stripe error as returned, when there was one. */\n error?: StripeErrorLike;\n /** True when the failure happened in or after the 3D Secure step. */\n actionHandled?: boolean;\n /** Stripe's status of the intent when the failure is about the intent's status (`requires_payment_method`, `canceled`, ...). */\n status?: string;\n}\n\n/** The payment method type the Payment Element currently shows (`'card'`, `'us_bank_account'`, ...) and its completeness. */\nexport interface StripeElementChange {\n complete: boolean;\n empty: boolean;\n /** The selected payment method type, `null` when Stripe did not send one. */\n type: string | null;\n /** Stripe's own validation message for the form, when it shows one. */\n errorMessage: string | null;\n}\n\nexport const MSG_NOT_INITIALIZED = 'Payment system not initialized';\nexport const MSG_INTENT_FAILED = 'Failed to create payment intent';\nexport const MSG_NOT_COMPLETED = 'Payment was not completed';\nexport const MSG_REQUIRES_PAYMENT_METHOD = 'Payment failed. Please try a different payment method.';\nexport const MSG_NO_PAYMENT_METHOD = 'No payment method returned from Stripe';\nexport const MSG_AUTH_FAILED = 'Payment authentication failed';\nexport const MSG_AUTH_NOT_COMPLETED = 'Payment authentication was not completed';\nexport const MSG_KEY_MISSING = 'A Stripe publishable key is required';\nexport const MSG_LOAD_FAILED = 'Failed to load Stripe';\nexport const MSG_TOKEN_FAILED = 'The card details could not be checked. Please try again.';\n\nexport function paymentMethodIdOf(intent: StripeIntentLike | null | undefined): string | null {\n const pm = intent?.payment_method;\n if (!pm) return null;\n return typeof pm === 'string' ? pm : pm.id || null;\n}\n\n/** The micro-deposit verification of an intent whose `next_action` is `verify_with_microdeposits`, else `null`. */\nexport function verificationOf(intent: StripeIntentLike | null | undefined): StripeVerification | null {\n const action = intent?.next_action;\n if (action?.type !== 'verify_with_microdeposits') return null;\n const details = action.verify_with_microdeposits ?? {};\n const arrival = typeof details.arrival_date === 'number' ? details.arrival_date : null;\n const type = details.microdeposit_type === 'amounts' || details.microdeposit_type === 'descriptor_code' ? details.microdeposit_type : null;\n const url = typeof details.hosted_verification_url === 'string' && details.hosted_verification_url ? details.hosted_verification_url : null;\n return { type, arrivalDate: arrival, arrivalDateIso: arrival === null ? null : new Date(arrival * 1000).toISOString(), hostedVerificationUrl: url };\n}\n\n/** Stripe's intent `status` (and `next_action`) as one `StripeOutcome`. */\nexport function outcomeOf(intent: StripeIntentLike): StripeOutcome {\n switch (intent.status) {\n case 'succeeded': return 'succeeded';\n case 'processing': return 'processing';\n case 'requires_capture': return 'requires_capture';\n case 'requires_action': return intent.next_action?.type === 'verify_with_microdeposits' ? 'requires_verification' : 'requires_action';\n case 'requires_payment_method': return 'requires_payment_method';\n case 'canceled': return 'canceled';\n default: return 'unknown';\n }\n}\n\nexport function normalizeIntent(kind: StripeIntentKind, intent: StripeIntentLike): StripeConfirmedEvent {\n const outcome = outcomeOf(intent);\n return {\n kind,\n status: intent.status,\n outcome,\n intent,\n ...(kind === 'setup' ? { setupIntent: intent } : { paymentIntent: intent }),\n intentId: intent.id,\n paymentMethodId: paymentMethodIdOf(intent),\n verification: outcome === 'requires_verification' ? verificationOf(intent) : null,\n actionHandled: false,\n };\n}\n\n/** A failure from a Stripe error, with the text to show chosen by `display` (see `getStripeErrorMessage`). */\nexport function failureFromError(error: StripeErrorLike | null | undefined, stage: StripeFailureStage, options: StripeErrorMessageOptions = {}): StripeFailure {\n return {\n code: error?.code || error?.type || 'unknown_error',\n message: getStripeErrorMessage(error, options),\n stripeMessage: error?.message ?? '',\n ...(error?.decline_code ? { declineCode: error.decline_code } : {}),\n ...(error?.type ? { type: error.type } : {}),\n stage,\n ...(error ? { error } : {}),\n };\n}\n\n/** A failure that is not a Stripe error (our own text). */\nconst KNOWN_MESSAGE_KEYS: Readonly<Record<string, UiLabelKey>> = {\n 'Payment system not initialized': 'stripePayment.msg.notInitialized',\n 'Failed to create payment intent': 'stripePayment.msg.intentFailed',\n 'Payment was not completed': 'stripePayment.msg.notCompleted',\n 'Payment failed. Please try a different payment method.': 'stripePayment.msg.requiresPaymentMethod',\n 'No payment method returned from Stripe': 'stripePayment.msg.noPaymentMethod',\n 'Payment authentication failed': 'stripePayment.msg.authFailed',\n 'Payment authentication was not completed': 'stripePayment.msg.authNotCompleted',\n 'A Stripe publishable key is required': 'stripePayment.msg.keyMissing',\n 'Failed to load Stripe': 'stripePayment.msg.loadFailed',\n 'Verification failed': 'stripePayment.msg.verifyFailed',\n 'Verification failed. Please check the code and try again.': 'stripePayment.msg.verifyThrown',\n 'We could not check the status of this payment. Please contact support before trying again.': 'stripePayment.msg.returnFailed',\n 'Payment method setup was incomplete. Please try again.': 'stripePayment.msg.setupIncomplete',\n 'Payment authentication failed. Please try a different payment method.': 'stripePayment.msg.authFailedTryOther',\n 'Card payments are not available right now.': 'stripePayment.msg.cardsUnavailable',\n 'Failed to initialize payment. Please try again.': 'stripePayment.msg.initFailed',\n 'Could not calculate the fees. Please try again.': 'stripePayment.msg.feesFailed',\n // STRIPE_DEFAULT_ERROR_MESSAGE: what a createIntent callback that throws without any message reports.\n 'Payment failed. Please try again.': 'stripeErrors.defaultMessage',\n 'The card details could not be checked. Please try again.': 'stripePayment.msg.tokenFailed',\n};\n\n/** Our own fixed messages (\"Payment system not initialized\" ...) in the app's active language; any other text (Stripe's, a host's) is returned as it is. */\nexport function localizeStripeMessage(message: string): string {\n const key = KNOWN_MESSAGE_KEYS[message];\n return key ? uiText(key) : message;\n}\n\nexport function failure(code: string, message: string, stage: StripeFailureStage, stripeMessage = ''): StripeFailure {\n return { code, message: localizeStripeMessage(message), stripeMessage, stage };\n}\n\n/** An error thrown by a host callback or a request: its own `error.error.message` (HTTP body), `message`, else the fallback. */\nexport function messageOfThrown(err: unknown, fallback: string): string {\n const e = err as { error?: { message?: unknown }; message?: unknown } | null | undefined;\n if (typeof e?.error?.message === 'string' && e.error.message) return e.error.message;\n if (typeof e?.message === 'string' && e.message) return e.message;\n return fallback;\n}\n","import { Injectable, inject } from '@angular/core';\nimport { STRIPE_LOADER, STRIPE_PAYMENT_DEFAULTS, buildLoadOptions } from '../stripe-loader/stripe-loader';\nimport type { StripeLike, StripeLoadOptions } from '../stripe-loader/stripe-types';\nimport {\n failure, failureFromError, messageOfThrown, normalizeIntent, MSG_KEY_MISSING, MSG_LOAD_FAILED,\n type StripeConfirmedEvent, type StripeFailure, type StripeIntentKind, type StripeOutcome,\n} from './stripe-outcomes';\nimport type { StripeConfirmResult, StripeIntentLike } from '../stripe-loader/stripe-types';\n\n/** The Stripe object with `confirmUsBankAccountSetup`, for an app that keeps its own routing-number form (contractor). Use it as the type argument of `StripePaymentService.load`. */\nexport interface StripeLikeWithBankSetup extends StripeLike {\n confirmUsBankAccountSetup(clientSecret: string, data?: Record<string, unknown>): Promise<StripeConfirmResult<StripeIntentLike>>;\n}\n\n/** What `stripe.verifyMicrodepositsFor*` takes: the two deposit amounts in cents, or the 6-character code of the one deposit. */\nexport type MicrodepositVerifyData = { amounts: number[] } | { descriptor_code: string };\n\nexport interface StripeMicrodepositResult {\n /** The intent is verified (`processing` or `succeeded`). */\n ok: boolean;\n outcome: StripeOutcome | null;\n intent: StripeIntentLike | null;\n /** Set when `ok` is false. `message` is Stripe's own text (customer-facing for a wrong amount / code) or ours. */\n failure: StripeFailure | null;\n}\n\n/** What Stripe appends to the return URL after a redirect (`payment_intent_client_secret` / `setup_intent_client_secret`, `redirect_status`). */\nexport interface StripeReturnParams {\n kind: StripeIntentKind;\n clientSecret: string;\n redirectStatus: string | null;\n}\n\n/** Reads the intent Stripe returned the customer with from a query string (`location.search`); `null` when there is none. */\nexport function readStripeReturnParams(search: string): StripeReturnParams | null {\n const params = new URLSearchParams(search.startsWith('?') ? search.slice(1) : search);\n const payment = params.get('payment_intent_client_secret');\n const setup = params.get('setup_intent_client_secret');\n const kind: StripeIntentKind | null = payment ? 'payment' : setup ? 'setup' : null;\n if (!kind) return null;\n return { kind, clientSecret: (payment ?? setup) as string, redirectStatus: params.get('redirect_status') };\n}\n\nexport const MSG_VERIFY_FAILED = 'Verification failed';\nexport const MSG_VERIFY_THROWN = 'Verification failed. Please check the code and try again.';\nexport const MSG_RETURN_FAILED = 'We could not check the status of this payment. Please contact support before trying again.';\n\n/**\n * Verifies a bank account with micro-deposits through Stripe.js (`verifyMicrodepositsForPayment` / `verifyMicrodepositsForSetup`), the way the public\n * \"verify your bank\" pages do it with the intent's client secret. The result is `ok` once the intent is `processing` or `succeeded`.\n */\nexport async function verifyMicrodeposits(stripe: StripeLike, flow: StripeIntentKind, clientSecret: string, data: MicrodepositVerifyData): Promise<StripeMicrodepositResult> {\n const call = flow === 'payment' ? stripe.verifyMicrodepositsForPayment : stripe.verifyMicrodepositsForSetup;\n if (typeof call !== 'function') return { ok: false, outcome: null, intent: null, failure: failure('unsupported', MSG_VERIFY_FAILED, 'verify') };\n try {\n const result = await call.call(stripe, clientSecret, data as Record<string, unknown>);\n if (result.error) return { ok: false, outcome: null, intent: null, failure: failureFromError(result.error, 'verify', { display: 'stripe', fallback: MSG_VERIFY_FAILED }) };\n const intent = (flow === 'payment' ? result.paymentIntent : result.setupIntent) ?? null;\n const event = intent ? normalizeIntent(flow, intent) : null;\n if (event && (event.outcome === 'processing' || event.outcome === 'succeeded')) return { ok: true, outcome: event.outcome, intent, failure: null };\n return { ok: false, outcome: event?.outcome ?? null, intent, failure: failure('verification_incomplete', MSG_VERIFY_FAILED, 'verify') };\n } catch (err) {\n return { ok: false, outcome: null, intent: null, failure: failure('verification_failed', messageOfThrown(err, MSG_VERIFY_THROWN), 'verify', messageOfThrown(err, '')) };\n }\n}\n\nexport interface StripeReturnResult {\n event: StripeConfirmedEvent | null;\n failure: StripeFailure | null;\n}\n\n/** Retrieves the intent after Stripe redirected the customer back (`retrievePaymentIntent` / `retrieveSetupIntent`) and normalises it. */\nexport async function retrieveIntent(stripe: StripeLike, kind: StripeIntentKind, clientSecret: string): Promise<StripeReturnResult> {\n const call = kind === 'payment' ? stripe.retrievePaymentIntent : stripe.retrieveSetupIntent;\n if (typeof call !== 'function') return { event: null, failure: failure('unsupported', MSG_RETURN_FAILED, 'return') };\n try {\n const result = await call.call(stripe, clientSecret);\n if (result.error) return { event: null, failure: failureFromError(result.error, 'return') };\n const intent = kind === 'payment' ? result.paymentIntent : result.setupIntent;\n if (!intent) return { event: null, failure: failure('no_intent', MSG_RETURN_FAILED, 'return') };\n return { event: normalizeIntent(kind, intent), failure: null };\n } catch (err) {\n return { event: null, failure: failure('return_failed', MSG_RETURN_FAILED, 'return', messageOfThrown(err, '')) };\n }\n}\n\nexport interface StripeConnection {\n publishableKey?: string | null;\n /** A Stripe Connect account id. */\n stripeAccount?: string | null;\n locale?: string | null;\n /** Further `loadStripe` options. */\n options?: StripeLoadOptions | null;\n}\n\nexport interface HandleReturnOptions extends StripeConnection {\n /** The client secret from the return URL. Default: read from `search`. */\n clientSecret?: string;\n /** Which kind of intent `clientSecret` belongs to (default: from the URL parameter name, else `'payment'`). */\n kind?: StripeIntentKind;\n /** The query string to read the return parameters from. Default: `window.location.search`. */\n search?: string;\n}\n\n/**\n * Stripe.js without a component: loads Stripe like `ui-stripe-payment` does, verifies micro-deposits and checks the intent after a redirect.\n * For pages that only verify a bank account (the \"verify your bank\" link) or only land on the `returnUrl`.\n */\n@Injectable({ providedIn: 'root' })\nexport class StripePaymentService {\n private readonly loader = inject(STRIPE_LOADER);\n private readonly defaults = inject(STRIPE_PAYMENT_DEFAULTS);\n\n /** Loads Stripe.js (`loadStripe(key, options)`). Pass a type for methods the library does not use: `load<StripeLikeWithBankSetup>(...)` (contractor's `confirmUsBankAccountSetup`). Throws when the key is missing or Stripe could not be created. */\n async load<T extends StripeLike = StripeLike>(connection: StripeConnection = {}): Promise<T> {\n const key = connection.publishableKey || this.defaults.publishableKey;\n if (!key) throw new Error(MSG_KEY_MISSING);\n const stripe = await this.loader(key, buildLoadOptions(connection.stripeAccount, connection.locale ?? this.defaults.locale, connection.options));\n if (!stripe) throw new Error(MSG_LOAD_FAILED);\n return stripe as T;\n }\n\n async verifyMicrodepositsForPayment(clientSecret: string, data: MicrodepositVerifyData, connection: StripeConnection = {}): Promise<StripeMicrodepositResult> {\n return this.verify('payment', clientSecret, data, connection);\n }\n\n async verifyMicrodepositsForSetup(clientSecret: string, data: MicrodepositVerifyData, connection: StripeConnection = {}): Promise<StripeMicrodepositResult> {\n return this.verify('setup', clientSecret, data, connection);\n }\n\n /** The intent the customer returned with, normalised. `{ event: null, failure: null }` when the URL carries no intent. */\n async handleReturn(options: HandleReturnOptions = {}): Promise<StripeReturnResult> {\n const fromUrl = options.clientSecret ? null : readStripeReturnParams(options.search ?? (typeof window === 'undefined' ? '' : window.location.search));\n const clientSecret = options.clientSecret ?? fromUrl?.clientSecret;\n if (!clientSecret) return { event: null, failure: null };\n const kind = options.kind ?? fromUrl?.kind ?? 'payment';\n let stripe: StripeLike;\n try { stripe = await this.load(options); } catch (err) { return { event: null, failure: failure('load_error', messageOfThrown(err, MSG_LOAD_FAILED), 'load', messageOfThrown(err, '')) }; }\n return retrieveIntent(stripe, kind, clientSecret);\n }\n\n private async verify(flow: StripeIntentKind, clientSecret: string, data: MicrodepositVerifyData, connection: StripeConnection): Promise<StripeMicrodepositResult> {\n let stripe: StripeLike;\n try { stripe = await this.load(connection); } catch (err) { return { ok: false, outcome: null, intent: null, failure: failure('load_error', messageOfThrown(err, MSG_LOAD_FAILED), 'load', messageOfThrown(err, '')) }; }\n return verifyMicrodeposits(stripe, flow, clientSecret, data);\n }\n}\n","import { isDarkPage } from '@forgeroute/ui';\n\n/**\n * The Payment Element `appearance` for the page's own look: Stripe's variables read from CSS custom properties at runtime, so one set of\n * tokens styles the page and the payment form, in light and dark.\n *\n * :root { --ui-stripe-color-primary: #0d9488; --ui-stripe-border-radius: 8px; }\n *\n * Variables read (all optional; a missing one is left out so Stripe's default stays): `--ui-stripe-color-primary`, `--ui-stripe-color-background`,\n * `--ui-stripe-color-text`, `--ui-stripe-color-danger`, `--ui-stripe-font-family`, `--ui-stripe-border-radius`, `--ui-stripe-font-size-base`.\n * The theme is `night` when the page is dark (`data-theme=\"dark\"`, or the system is dark and `data-theme` is not `light`), else `stripe`.\n */\nexport interface StripeAppearance {\n theme?: 'stripe' | 'night' | 'flat';\n variables?: Record<string, string>;\n rules?: Record<string, Record<string, string>>;\n labels?: 'above' | 'floating';\n disableAnimations?: boolean;\n}\n\nconst TOKENS: readonly (readonly [string, string])[] = [\n ['--ui-stripe-color-primary', 'colorPrimary'],\n ['--ui-stripe-color-background', 'colorBackground'],\n ['--ui-stripe-color-text', 'colorText'],\n ['--ui-stripe-color-danger', 'colorDanger'],\n ['--ui-stripe-font-family', 'fontFamily'],\n ['--ui-stripe-border-radius', 'borderRadius'],\n ['--ui-stripe-font-size-base', 'fontSizeBase'],\n];\n\n// `isDarkPage` lives in the main entry (shared with the Square entry); it stays exported from here so existing imports keep working.\nexport { isDarkPage };\n\n/** Builds the appearance from the tokens in effect on `element` (default: the document root). */\nexport function readStripeAppearance(doc: Document, element: Element = doc.documentElement): StripeAppearance {\n const view = doc.defaultView;\n const variables: Record<string, string> = {};\n if (view) {\n const style = view.getComputedStyle(element);\n for (const [token, variable] of TOKENS) {\n const value = style.getPropertyValue(token).trim();\n if (value) variables[variable] = value;\n }\n }\n return { theme: isDarkPage(doc) ? 'night' : 'stripe', ...(Object.keys(variables).length ? { variables } : {}) };\n}\n","import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, PLATFORM_ID, computed, effect, inject, input, output, signal, untracked, viewChild, ViewEncapsulation } from '@angular/core';\nimport { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport {\n AlertComponent, ButtonComponent, PAYMENT_READINESS_EVERY_MS, PAYMENT_READINESS_TIMEOUT_MS, PAYMENT_REQUEST_TIMEOUT_MS, PAYMENT_STATUS_CHECK_TIMEOUT_MS, PAYMENT_STATUS_FAIL_GRACE_MS, PAYMENT_AUTH_TIMEOUT_MS, PAYMENT_STATUS_POLL_MAX_MS, PAYMENT_STATUS_POLL_MS, PaymentAttemptStatusComponent,\n SkeletonComponent, createPaymentProtection, refusalLabelKey, uiText, wasQueuedOffline, warnQueuedPayment, isAttemptFailedReplay,\n type CheckPaymentStatusFn, type PaymentAttempt, type PaymentAttemptOutcome, type PaymentAttemptResult, type PaymentReadiness, type PaymentReadinessResult, type ReadinessCheckFn,\n} from '@forgeroute/ui';\nimport { STRIPE_LOADER, STRIPE_PAYMENT_DEFAULTS, buildLoadOptions } from '../stripe-loader/stripe-loader';\nimport type { StripeElementsLike, StripeLike, StripeLoadOptions, StripePaymentElementLike } from '../stripe-loader/stripe-types';\nimport type { StripeErrorDisplay, StripeErrorMessageOptions } from '../errors/stripe-errors';\nimport { STRIPE_DEFAULT_ERROR_MESSAGE } from '../errors/stripe-errors';\nimport { MSG_TOKEN_FAILED, confirmationTokenEventOf, MSG_AUTH_FAILED, MSG_AUTH_NOT_COMPLETED, MSG_KEY_MISSING, MSG_INTENT_FAILED, MSG_LOAD_FAILED, MSG_NOT_COMPLETED, MSG_NOT_INITIALIZED, MSG_NO_PAYMENT_METHOD, MSG_REQUIRES_PAYMENT_METHOD, failure, failureFromError, messageOfThrown, normalizeIntent, type StripeConfirmationTokenEvent, type StripeConfirmedEvent, type StripeElementChange, type StripeFailure, type StripeFailureStage, type StripeIntentKind, localizeStripeMessage } from './stripe-outcomes';\nimport { readStripeReturnParams, retrieveIntent, verifyMicrodeposits, type MicrodepositVerifyData, type StripeMicrodepositResult, type StripeReturnResult } from './stripe-actions';\nimport { readStripeAppearance, type StripeAppearance } from './stripe-appearance';\nimport { UiLabelsService } from '@forgeroute/ui';\n\n/** The texts of the screen-reader status region. */\nexport interface StripeA11yMessages {\n loading: string;\n savingMethod: string;\n processingPayment: string;\n methodSaved: string;\n paymentReceived: string;\n paymentProcessing: string;\n paymentAuthorized: string;\n verificationNeeded: string;\n actionRequired: string;\n}\n\n/** The screen-reader messages of the payment form; read on every access, so they follow the app's active language. */\nexport const STRIPE_A11Y_MESSAGES: Readonly<StripeA11yMessages> = {\n get loading() { return uiText('stripePayment.a11y.loading'); },\n get savingMethod() { return uiText('stripePayment.a11y.savingMethod'); },\n get processingPayment() { return uiText('stripePayment.a11y.processingPayment'); },\n get methodSaved() { return uiText('stripePayment.a11y.methodSaved'); },\n get paymentReceived() { return uiText('stripePayment.a11y.paymentReceived'); },\n get paymentProcessing() { return uiText('stripePayment.a11y.paymentProcessing'); },\n get paymentAuthorized() { return uiText('stripePayment.a11y.paymentAuthorized'); },\n get verificationNeeded() { return uiText('stripePayment.a11y.verificationNeeded'); },\n get actionRequired() { return uiText('stripePayment.a11y.actionRequired'); },\n};\n\n/** The exact text shown while the bank-account tab is selected. */\nexport const STRIPE_ACH_NOTICE = 'Signing in to your bank account lets you pay right away. Entering your routing and account numbers instead requires verification with two small deposits, which typically take a couple of days to arrive in your account.';\n\n/**\n * \"Deferred intent\" Elements: the form is shown first, the PaymentIntent / SetupIntent is created on the host's backend when the customer submits.\n * Maps to `stripe.elements({ mode, amount, currency, setup_future_usage, payment_method_types, ... })`.\n */\nexport interface StripeDeferredIntent {\n /** Default: the component's `mode`. */\n mode?: 'payment' | 'setup' | 'subscription';\n /** Smallest currency unit (cents). Changing it later calls `elements.update({ amount })` (no re-init). */\n amount?: number;\n currency: string;\n setupFutureUsage?: 'on_session' | 'off_session';\n captureMethod?: 'automatic' | 'automatic_async' | 'manual';\n onBehalfOf?: string;\n}\n\n/** Called on submit in deferred mode: create the intent on your backend and resolve its client secret (or `{ clientSecret }`). */\nexport type StripeCreateIntentFn = (context: { mode: StripeIntentKind; confirmationToken?: StripeConfirmationTokenEvent | null; attemptKey?: string; payableRef?: string | null }) => Promise<string | { clientSecret: string }>;\n\nexport interface StripeBillingDetails {\n name?: string;\n email?: string;\n phone?: string;\n address?: Record<string, string | null | undefined>;\n}\n\n/**\n * The live Stripe.js objects of a form, handed to the host by `(stripeReady)`: the host's own code can call `stripe.confirmPayment({ elements, ... })`,\n * `elements.submit()`, `elements.update()`, `elements.fetchUpdates()` and `paymentElement.update()` with its own arguments.\n */\nexport interface StripeReadyEvent {\n stripe: StripeLike;\n elements: StripeElementsLike;\n paymentElement: StripePaymentElementLike;\n}\n\n/** What ONE protected confirm learned (its own object, passed down: nothing here lives on the component, so a late answer of an older attempt never leaks into the next). */\ninterface ConfirmTrace {\n /** Failures are held back until the attempt is classified: an UNKNOWN outcome must never be shown or emitted as \"failed\". */\n held: boolean;\n failure: StripeFailure | null;\n thrown: boolean;\n outcome: string | null;\n}\n\n/** Stripe error types and codes that say \"Stripe may or may not have processed this\": never a definitive decline. */\nconst AMBIGUOUS_STRIPE_TYPES = new Set(['api_connection_error', 'api_error', 'rate_limit_error', 'idempotency_error']);\nconst AMBIGUOUS_STRIPE_CODES = new Set(['payment_intent_unexpected_state', 'idempotency_error', 'idempotency_key_in_use', 'lock_timeout']);\n\nlet nextId = 0;\nconst jsonEqual = (a: unknown, b: unknown): boolean => JSON.stringify(a) === JSON.stringify(b);\n\n/**\n * Stripe Payment Element: saves a payment method (`mode=\"setup\"`, a SetupIntent) or takes a payment (`mode=\"payment\"`, a PaymentIntent).\n *\n * The host app creates the intent on its backend and passes the `clientSecret` (or, for a deferred intent, `[deferred]` + `[createIntent]`).\n * Stripe.js is loaded lazily through `@stripe/stripe-js` (an optional peer dependency); nothing of Stripe is in the library's static imports.\n *\n * <ui-stripe-payment mode=\"setup\" [publishableKey]=\"key\" [clientSecret]=\"secret()\" submitLabel=\"Save card\"\n * (confirmed)=\"onSaved($event)\" (failed)=\"onFailed($event)\" />\n *\n * Every Stripe.js call and option reproduces what the CRM apps do today; see docs/stripe.md (\"Parity with the existing app implementations\").\n */\n@Component({\n selector: 'ui-stripe-payment',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [AlertComponent, ButtonComponent, PaymentAttemptStatusComponent, SkeletonComponent],\n host: { '[attr.aria-busy]': '!mountOnly() && (loading() || submitting()) ? \"true\" : null' },\n template: `\n <div class=\"sp\">\n @if (!mountOnly() || a11yMessages()) {\n <div class=\"sp-sr\" role=\"status\" aria-live=\"polite\" data-testid=\"stripe-status\">{{ statusText() }}</div>\n }\n @if (!mountOnly() && protectionOn()) {\n <ui-payment-attempt-status [attempt]=\"attempt\" [readiness]=\"readiness\" [allowStartOver]=\"allowStartOver()\" (retryLoad)=\"reload()\" />\n }\n @if (!mountOnly() && (loading() || pending())) {\n <div class=\"sp-skeleton\" data-testid=\"stripe-skeleton\" aria-hidden=\"true\">\n <ui-skeleton [height]=\"44\" [mb]=\"10\" />\n <ui-skeleton [height]=\"44\" [mb]=\"10\" />\n <ui-skeleton [height]=\"44\" width=\"60%\" />\n </div>\n }\n @if (!mountOnly() && loadErrorText(); as text) {\n <div class=\"sp-block\" data-testid=\"stripe-load-error\"><ui-alert variant=\"danger\">{{ text }}</ui-alert></div>\n }\n @if (!mountOnly() && required()) {\n <div class=\"sp-label\" data-testid=\"stripe-required-label\">{{ label() }}<span class=\"sp-required\" aria-hidden=\"true\">*</span></div>\n }\n <div #mount class=\"sp-mount\" [attr.id]=\"mountId() || null\" [class]=\"mountClass()\" [class.sp-mount--hidden]=\"mountHidden()\" [attr.aria-hidden]=\"mountHidden() ? 'true' : null\" [attr.inert]=\"mountHidden() ? '' : null\"\n [attr.role]=\"mountOnly() ? null : 'group'\" [attr.aria-label]=\"mountOnly() ? null : label()\" data-testid=\"stripe-mount\"></div>\n @if (!mountOnly() && achNoticeVisible()) {\n <div class=\"sp-block\" [attr.data-testid]=\"achNoticeTestId()\"><ui-alert variant=\"info\">{{ achNotice() }}</ui-alert></div>\n }\n @if (!mountOnly() && errorText(); as text) {\n <div class=\"sp-block\" [id]=\"errorId\" data-testid=\"stripe-error\"><ui-alert variant=\"danger\">{{ text }}</ui-alert></div>\n }\n @if (!mountOnly() && showSubmit()) {\n <div class=\"sp-actions\">\n <ui-button variant=\"primary\" type=\"button\" [loading]=\"submitting()\" [disabled]=\"submitDisabled()\" [ariaDescribedBy]=\"errorText() ? errorId : undefined\"\n data-testid=\"stripe-submit\" (click)=\"confirm()\">{{ effectiveSubmitLabel() }}</ui-button>\n </div>\n }\n </div>\n `,\n styles: [`\n ui-stripe-payment { display: block; min-width: 0; }\n ui-stripe-payment .sp-sr {\n position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;\n clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;\n }\n .sp-block { margin-top: 12px; }\n .sp-label { font-size: 0.875rem; font-weight: 500; color: #1e293b; margin-bottom: 6px; }\n .sp-required { color: #dc2626; margin-left: 2px; }\n .sp-actions { margin-top: 16px; display: flex; justify-content: flex-end; }\n ui-stripe-payment .sp { position: relative; }\n /* While loading the form is kept laid out (so Stripe can measure it and open Apple Pay / Link / the bank login) but invisible and untouchable. */\n .sp-mount--hidden { position: absolute; top: 0; left: 0; right: 0; opacity: 0; pointer-events: none; }\n /* Phones: the button fills the row. ui-button's host is inline-flex and its inner button is content-sized, so the inner .btn is stretched (ui-button has no host width hook). */\n @media (max-width: 480px) {\n .sp-actions { display: block; }\n .sp-actions ui-button { display: flex; }\n ui-stripe-payment .sp-actions .btn { width: 100%; }\n }\n `],\n})\nexport class StripePaymentComponent {\n protected readonly labels = inject(UiLabelsService);\n private readonly loader = inject(STRIPE_LOADER);\n private readonly defaults = inject(STRIPE_PAYMENT_DEFAULTS);\n private readonly doc = inject(DOCUMENT);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n // ── Inputs ─────────────────────────────────────────────────────────────\n /**\n * Mount-only mode: the component only mounts the Payment Element. No submit button, skeleton, status text (unless `a11yMessages` is set), bank notice or error\n * alert; it never submits, confirms or updates by itself; load failures go to `(loadError)` only. The host keeps its own confirm code and calls Stripe.js with the\n * objects from `(stripeReady)`. `mountId` / `mountClass` still apply, and `(ready)`, `(elementChange)`, `(paymentMethodTypeChange)` still emit.\n */\n readonly mountOnly = input(false);\n /** `'setup'` saves a payment method (`confirmSetup`), `'payment'` takes a payment (`confirmPayment`). */\n readonly mode = input<StripeIntentKind>('payment');\n /** The publishable key (`pk_...`). Falls back to `provideStripePayment({ publishableKey })`. */\n readonly publishableKey = input<string | null>(null);\n /** The client secret of the SetupIntent / PaymentIntent your backend created. Changing it re-creates the form. */\n readonly clientSecret = input<string | null>(null);\n /** Deferred intent: show the form first, create the intent on submit with `createIntent`. Used instead of `clientSecret`. */\n readonly deferred = input<StripeDeferredIntent | null>(null);\n /** Creates the intent on submit (deferred mode) and resolves its client secret. */\n readonly createIntent = input<StripeCreateIntentFn | null>(null);\n /** A Stripe Connect account id (`acct_...`): `loadStripe(key, { stripeAccount })`. */\n readonly stripeAccount = input<string | null>(null);\n /** Stripe.js locale. */\n readonly locale = input<string | null>(null);\n /** Further `loadStripe` options. */\n readonly stripeOptions = input<StripeLoadOptions | null>(null);\n /** Payment method types for a DEFERRED intent (`elements({ payment_method_types })`). With a client secret the intent decides, nothing is passed. */\n readonly paymentMethodTypes = input<string[] | null>(null);\n /** Extra `stripe.elements()` options, merged last. */\n readonly elementsOptions = input<Record<string, unknown> | null>(null);\n\n // Payment Element options (`elements.create('payment', ...)`): only the ones that are set are passed.\n /** `'tabs'` (default), `'accordion'`, an object, or `null` to pass no layout. */\n readonly layout = input<string | Record<string, unknown> | null>('tabs');\n readonly paymentMethodOrder = input<string[] | null>(null);\n /** `{ applePay: 'never', googlePay: 'never' }` hides the wallets. */\n readonly wallets = input<Record<string, string> | null>(null);\n /** `{ billingDetails: { email: 'never', phone: 'never', address: 'auto' } }` etc. */\n readonly fields = input<Record<string, unknown> | null>(null);\n /** Pre-filled values: `{ billingDetails: { name, email, address: { country: 'US' } } }`. A later change updates the element in place. */\n readonly defaultValues = input<Record<string, unknown> | null>(null);\n readonly business = input<{ name: string } | null>(null);\n readonly terms = input<Record<string, string> | null>(null);\n /** Extra Payment Element options, merged last (readOnly, fields, ...). */\n readonly paymentElementOptions = input<Record<string, unknown> | null>(null);\n /** The Elements appearance. */\n readonly appearance = input<StripeAppearance | null>(null);\n /** Derive the appearance from the `--ui-stripe-*` CSS tokens (light / dark) when no `appearance` is set. */\n readonly appearanceFromTokens = input(false);\n\n // Confirmation\n /** Where Stripe sends the customer back after a redirect. Unset = the current page (`window.location.href`); `null` = pass no `return_url`. */\n readonly returnUrl = input<string | null | undefined>(undefined);\n /** Billing details sent on confirm (`confirmParams.payment_method_data.billing_details`), needed for fields hidden with `'never'`. */\n readonly billingDetails = input<StripeBillingDetails | null>(null);\n /** Extra `confirmParams`, merged last. */\n readonly confirmParams = input<Record<string, unknown> | null>(null);\n /** `'if_required'` (default) keeps the customer on the page unless the method needs a redirect. */\n readonly redirect = input<'if_required' | 'always'>('if_required');\n /** Call `elements.submit()` before confirming. Unset = automatic: yes for a deferred intent (Stripe requires it), no with a client secret. */\n readonly submitBeforeConfirm = input<boolean | null>(null);\n /** After a payment comes back `requires_action` (not a bank verification), run `stripe.handleCardAction` (3D Secure) before reporting. */\n readonly autoHandleCardAction = input(false);\n /**\n * Opt-in (default off, nothing changes): when `confirm()` runs for a CARD, create a ConfirmationToken from the Elements (`stripe.createConfirmationToken({ elements })`, after\n * `elements.submit()`) before the intent is created. The token is emitted as `(confirmationToken)` and handed to `createIntent({ mode, confirmationToken })`, so the host's backend\n * can read the card funding (credit / debit / prepaid) from Stripe BEFORE it creates the intent. A token that cannot be made never stops the payment (the `createIntent`\n * context then has no token). Only made for a DEFERRED intent (`[deferred]`, no `clientSecret`: Stripe requires deferred Elements for `createConfirmationToken`); never for a bank account, Link or a wallet tab, nor for `confirm({ useExistingIntent: true })`.\n */\n readonly collectConfirmationToken = input(false);\n\n // ── Duplicate-payment protection and readiness gate (opt-in: with `duplicateProtection` off, nothing below changes any existing behaviour) ──\n /**\n * Turns on the duplicate-charge protection (docs: \"Duplicate-payment protection\") and the readiness gate (\"Readiness gate\"): the synchronous in-flight lock for the button, Enter and `confirm()`,\n * the attempt key, the UNKNOWN outcome (timeout, offline mid-flight) with the host's `checkStatus`, offline refusal, the paid lock and the readiness reasons. Default OFF: `confirm()` behaves\n * exactly as it always did and `createIntent` receives the same context.\n */\n readonly duplicateProtection = input(false);\n /**\n * The amount of the attempt in MAJOR units (the base amount the payer typed): it goes into the attempt marker, the derived key and the host's records. Default: the deferred amount / 100. A caller whose deferred\n * amount includes fees (the Stripe payment-panel plugin) passes the base amount here, so a payment recorded after an unknown outcome is the base amount, not the fee-inclusive charge.\n */\n readonly attemptAmount = input<number | null>(null);\n /**\n * The method of the attempt as the HOST names it (marker, derived key, `succeeded` outcome / tombstone). Default: the Stripe payment method type (`'card'`, `'us_bank_account'`). The payment-panel plugin passes the\n * panel's own method (`'CARD'`, `'ACH'`), so an attempt adopted by a reload or another tab is recorded with the method the panel knows, not with a Stripe type.\n */\n readonly attemptMethod = input<string | null>(null);\n /**\n * The payable this is for (an invoice, a balance, a payment link). While an attempt is undecided its opaque marker (key, amount, method) is stored under it in `localStorage`, so a RELOAD or a\n * SECOND TAB of the same payable starts locked (unknown) with the same attempt key. Without it the protection covers this page instance only. Nothing else is stored.\n */\n readonly payableRef = input<string | null>(null);\n /** A key the host supplies; empty = generated per payment attempt session. It reaches `createIntent({ attemptKey })`. */\n readonly attemptKey = input<string | null>(null);\n /** The host's status check by attempt key: resolves an UNKNOWN outcome. */\n readonly checkStatus = input<CheckPaymentStatusFn | null>(null);\n /** The payable is paid (host re-render, back navigation): every confirm is refused for good. */\n readonly paid = input(false);\n /** The host reports an ambiguous result of ITS charge call: \"Checking your payment...\" while true. */\n readonly hostPending = input(false);\n readonly statusPollMs = input(PAYMENT_STATUS_POLL_MS);\n readonly statusPollMaxMs = input(PAYMENT_STATUS_POLL_MAX_MS);\n /** A status check slower than this counts as unknown (ms). */\n readonly statusCheckTimeoutMs = input(PAYMENT_STATUS_CHECK_TIMEOUT_MS);\n /** While the attempt's own request is unsettled, a status answer `failed` is ignored for this long (ms). */\n readonly statusFailGraceMs = input(PAYMENT_STATUS_FAIL_GRACE_MS);\n /** Offer \"Start over\" after the status polling window (a new attempt with a NEW key). Turn it on ONLY when your backend allows ONE open or succeeded attempt per payable and answers 409 `payment_in_flight` to a second key: that rule is what makes it safe. */\n readonly allowStartOver = input(false);\n /** Managed environments where `navigator.onLine === false` is a false negative (captive portal, VPN): do not refuse a payment because of the browser's offline flag (default false). */\n readonly offlineOverride = input(false);\n /** The request timeout is replaced by this while a 3-D Secure challenge or the bank window is open (ms). */\n readonly authTimeoutMs = input(PAYMENT_AUTH_TIMEOUT_MS);\n /** How long ONE `confirm()` (intent creation + Stripe confirmation) may take before the outcome counts as unknown (ms). */\n readonly confirmTimeoutMs = input(PAYMENT_REQUEST_TIMEOUT_MS);\n /** The host's readiness endpoint (`GET /api/payments/ready`): `{ ready, reasons[] }`. */\n readonly readinessCheck = input<ReadinessCheckFn | null>(null);\n readonly readinessTimeoutMs = input(PAYMENT_READINESS_TIMEOUT_MS);\n readonly readinessEveryMs = input(PAYMENT_READINESS_EVERY_MS);\n\n // Presentation\n readonly submitLabel = input('');\n /** Show the built-in submit button; turn off to use your own and call `confirm()`. */\n readonly showSubmit = input(true);\n readonly disabled = input(false);\n /** The host is still creating the intent: show the loading skeleton. */\n readonly pending = input(false);\n /** Accessible name of the payment form (also its visible heading when `required` is set). */\n readonly labelInput = input<string | null>(null, { alias: 'label' });\n readonly label = computed(() => this.labelInput() ?? this.labels.t('stripeStripePayment.label'));\n /** The payment details are required (a required wizard step): a visible heading with a red asterisk is shown above the form. Not shown in `mountOnly` mode. */\n readonly required = input(false);\n /** The `id` of the element container (an app's e2e selector such as `#payment-element`). */\n readonly mountId = input('');\n /** Extra CSS classes on the element container. */\n readonly mountClass = input('');\n /** Show the bank-account notice while that tab is selected. */\n readonly showAchNotice = input(true);\n readonly achNoticeInput = input<string | null>(null, { alias: 'achNotice' });\n readonly achNotice = computed(() => this.achNoticeInput() ?? this.labels.t('stripePayment.achNotice'));\n /** The `data-testid` of the notice (an app's existing e2e selector, e.g. `ach-setup-notice`). */\n readonly achNoticeTestId = input('stripe-ach-notice');\n /** The payment method type the host shows before Stripe reports one (cremo: `'card'`); `paymentMethodTypeChange` fires only when the reported type differs from it (or from the last report). */\n readonly initialPaymentMethodType = input('card');\n /** Show failures in the built-in alert. Turn off when the host shows `(failed)` itself. */\n readonly showErrors = input(true);\n /** `'friendly'` (default), `'table'` (table text, else Stripe's own message: the cremo payment flows) or `'stripe'` (Stripe's own message). See `getStripeErrorMessage`. */\n readonly errorDisplay = input<StripeErrorDisplay>('friendly');\n /** Different error display for single steps (e.g. `{ submit: 'stripe', action: 'stripe' }`: raw Stripe text for the validation and 3DS steps, `errorDisplay` for the rest). */\n readonly errorDisplayByStage = input<Partial<Record<StripeFailureStage, StripeErrorDisplay>> | null>(null);\n /** The text when Stripe sends an error with no message (default: \"Payment failed. Please try again.\"). */\n readonly errorFallback = input('');\n /** The same per step (Settings: `{ submit: 'Failed to submit payment information', confirm: 'Failed to confirm payment method' }`); wins over `errorFallback`. */\n readonly errorFallbackByStage = input<Partial<Record<StripeFailureStage, string>> | null>(null);\n /** Replacement texts by code: Stripe error codes AND the library's own failure codes (`not_initialized`, `no_payment_method`, `requires_payment_method`, `not_completed`, `authentication_failed`, ...). `{status}` in a text becomes Stripe's status of the intent (\"Unexpected payment status: {status}\"). */\n readonly errorMessages = input<Record<string, string> | null>(null);\n readonly loadErrorMessageInput = input<string | null>(null, { alias: 'loadErrorMessage' });\n readonly loadErrorMessage = computed(() => this.loadErrorMessageInput() ?? this.labels.t('stripeStripePayment.loadErrorMessage'));\n /** Texts of the screen-reader status region (translate them); missing keys keep the English defaults. */\n readonly a11yMessages = input<Partial<StripeA11yMessages> | null>(null);\n\n // ── Outputs ────────────────────────────────────────────────────────────\n /**\n * The live Stripe.js objects, emitted once each time the Elements are created: right after `elements.create('payment')` and `mount()` succeeded, before `(ready)`\n * (the moment the old inline code had `this.stripe` / `this.elements` / `this.paymentElement` assigned). `null` is emitted when they go away (the form is re-created for new\n * inputs, or `destroyElements()`): drop your references. Destroying the component itself emits nothing (the host owns that moment).\n */\n readonly stripeReady = output<StripeReadyEvent | null>();\n /** The Payment Element finished loading. */\n readonly ready = output<void>();\n /** The customer picked another payment method type (`'card'`, `'us_bank_account'`, ...). */\n readonly paymentMethodTypeChange = output<string>();\n /** Every change of the form: completeness and the selected type. */\n readonly elementChange = output<StripeElementChange>();\n /** A ConfirmationToken of the typed card was created (`collectConfirmationToken` during `confirm()`, or `createConfirmationToken()`). Only emitted for a card. */\n readonly confirmationToken = output<StripeConfirmationTokenEvent>();\n /** The intent was confirmed (succeeded, processing, needs bank verification, or needs a further action). */\n readonly confirmed = output<StripeConfirmedEvent>();\n /** A step failed (validation, intent creation, confirmation). `message` is ready to show. */\n readonly failed = output<StripeFailure>();\n /** Stripe.js or the Payment Element could not be loaded. */\n readonly loadError = output<StripeFailure>();\n /** A confirm started / ended (the synchronous lock; only with `duplicateProtection`). */\n readonly inFlightChange = output<boolean>();\n /** Unified outcome of a payment attempt: `succeeded`, `failed`, `unknown`, `refused` (with `reason`), `pending` (only with `duplicateProtection`). */\n readonly outcome = output<PaymentAttemptOutcome>();\n /** The attempt key in effect (only with `duplicateProtection`). */\n readonly attemptKeyChange = output<string>();\n /** The readiness gate changed (only with `duplicateProtection`). */\n readonly readinessChange = output<PaymentReadinessResult>();\n\n // ── State ──────────────────────────────────────────────────────────────\n readonly loading = signal(false);\n readonly isReady = signal(false);\n readonly submitting = signal(false);\n readonly complete = signal(false);\n /** The selected payment method type, `null` until Stripe reports one. */\n readonly selectedType = signal<string | null>(null);\n readonly errorText = signal('');\n readonly loadErrorText = signal('');\n private readonly announcement = signal('');\n\n protected readonly errorId = `ui-stripe-error-${nextId++}`;\n private readonly mountRef = viewChild<ElementRef<HTMLElement>>('mount');\n\n protected readonly mountHidden = computed(() => !this.mountOnly() && (this.loading() || this.pending() || !!this.loadErrorText()));\n protected readonly achNoticeVisible = computed(() => this.showAchNotice() && this.selectedType() === 'us_bank_account');\n protected readonly effectiveSubmitLabel = computed(() => this.submitLabel() || (this.mode() === 'setup' ? this.labels.t('stripePayment.saveMethod') : this.labels.t('stripePayment.pay')));\n protected readonly submitDisabled = computed(() => this.disabled() || this.loading() || this.pending() || !this.isReady() || !!this.loadErrorText()\n || (this.protectionOn() && (this.attempt.unknown() || this.attempt.paidLocked() || !this.readiness.ready())));\n private readonly messages = computed((): StripeA11yMessages => {\n const given = Object.fromEntries(Object.entries(this.a11yMessages() ?? {}).filter(([, text]) => typeof text === 'string')) as Partial<StripeA11yMessages>;\n return { ...STRIPE_A11Y_MESSAGES, ...given };\n });\n protected readonly statusText = computed(() => {\n if (this.loading()) return this.messages().loading;\n if (this.submitting()) return this.mode() === 'setup' ? this.messages().savingMethod : this.messages().processingPayment;\n return this.announcement();\n });\n\n /** How `loadStripe` is called: key + options. Re-creates everything when it changes. */\n private readonly connection = computed(() => {\n const key = this.publishableKey() || this.defaults.publishableKey || '';\n return { key, options: buildLoadOptions(this.stripeAccount(), this.locale() ?? this.defaults.locale, this.stripeOptions()) };\n }, { equal: jsonEqual });\n\n /** The `stripe.elements()` options without the deferred amount (that one is updated in place); `null` while there is no intent to show. */\n private readonly elementsConfig = computed((): Record<string, unknown> | null => {\n const secret = this.clientSecret();\n const deferred = this.deferred();\n let options: Record<string, unknown>;\n if (secret) {\n options = { clientSecret: secret };\n } else if (deferred) {\n options = {\n mode: deferred.mode ?? this.mode(),\n currency: deferred.currency,\n ...(deferred.setupFutureUsage ? { setup_future_usage: deferred.setupFutureUsage } : {}),\n ...(deferred.captureMethod ? { capture_method: deferred.captureMethod } : {}),\n ...(deferred.onBehalfOf ? { on_behalf_of: deferred.onBehalfOf } : {}),\n ...(this.paymentMethodTypes() ? { payment_method_types: this.paymentMethodTypes() } : {}),\n };\n } else {\n return null;\n }\n const appearance = this.appearance();\n if (appearance) options['appearance'] = appearance;\n return { ...options, ...(this.elementsOptions() ?? {}) };\n }, { equal: jsonEqual });\n\n /** The Payment Element options that need a new element when they change (default values and read-only are updated in place). */\n private readonly elementConfig = computed(() => {\n const options: Record<string, unknown> = {};\n const layout = this.layout();\n if (layout) options['layout'] = layout;\n if (this.paymentMethodOrder()) options['paymentMethodOrder'] = this.paymentMethodOrder();\n if (this.wallets()) options['wallets'] = this.wallets();\n if (this.fields()) options['fields'] = this.fields();\n if (this.business()) options['business'] = this.business();\n if (this.terms()) options['terms'] = this.terms();\n return { ...options, ...(this.paymentElementOptions() ?? {}) };\n }, { equal: jsonEqual });\n\n private stripe: StripeLike | null = null;\n private stripeSignature = '';\n private elements: StripeElementsLike | null = null;\n private element: StripePaymentElementLike | null = null;\n private generation = 0;\n private lastType: string | null = null;\n private lastAmount: number | undefined;\n private lastFailure: StripeFailure | null = null;\n private destroyed = false;\n /** Counts the confirms: only the NEWEST one may clear `submitting` (a late, older confirm must not unlock the newer one's screen). */\n private confirmSeq = 0;\n /** What the element was last given, so a change made while it loaded is applied once it is ready. */\n private appliedDefaultValues = '';\n private appliedDisabled = false;\n\n /** The protection applies to PAYMENTS only: saving a card (`mode=\"setup\"`) moves no money, so there is nothing to double-charge and the flag is ignored there. */\n protected readonly protectionOn = computed(() => this.duplicateProtection() && this.mode() === 'payment');\n /** The duplicate-payment protection (only active with `duplicateProtection` in payment mode). */\n readonly attempt: PaymentAttempt;\n readonly readiness: PaymentReadiness;\n /** The key of the attempt that is running (passed to `createIntent`); `null` with protection off. */\n /** Bumped by \"Retry loading\": the init effect runs again. */\n private readonly retryTick = signal(0);\n\n constructor() {\n const protection = createPaymentProtection(this, {\n amount: () => { const own = this.attemptAmount(); if (own != null) return own; const minor = this.deferred()?.amount; return minor == null ? null : minor / 100; }, // the deferred amount is in minor units (cents); attempts, markers and derived keys speak major units like every other form\n method: () => this.attemptMethod() ?? this.selectedType() ?? 'card',\n sdk: () => (this.loadErrorText() ? 'blocked' : this.loading() ? 'loading' : 'ok'),\n enabled: () => this.protectionOn(),\n onOutcome: o => this.outcome.emit(o),\n onInFlightChange: v => this.inFlightChange.emit(v),\n onKeyChange: k => { if (this.protectionOn()) this.attemptKeyChange.emit(k); },\n onReadinessChange: r => { if (this.protectionOn()) this.readinessChange.emit(r); },\n });\n this.attempt = protection.attempt;\n this.readiness = protection.readiness;\n effect(() => {\n const mount = this.mountRef();\n const connection = this.connection();\n const elements = this.elementsConfig();\n const element = this.elementConfig();\n this.retryTick();\n if (!mount) return;\n untracked(() => { void this.init(mount.nativeElement, connection, elements, element); });\n });\n // The deferred amount changes without a new form (a fee shown for the other payment method): elements.update({ amount }).\n effect(() => {\n const amount = this.deferred()?.amount;\n untracked(() => {\n if (!this.mountOnly() && amount !== undefined && this.lastAmount !== undefined && amount !== this.lastAmount && this.elements?.update) this.elements.update({ amount });\n this.lastAmount = amount;\n });\n });\n effect(() => {\n const defaultValues = this.defaultValues();\n untracked(() => this.applyDefaultValues(defaultValues));\n });\n effect(() => {\n const disabled = this.disabled();\n untracked(() => this.applyDisabled(disabled));\n });\n inject(DestroyRef).onDestroy(() => { this.destroyed = true; this.generation++; this.disposeElements(); this.stripe = null; });\n }\n\n // ── Public methods ─────────────────────────────────────────────────────\n\n /**\n * Submits the form: `elements.submit()` (when required), the deferred intent, then `confirmSetup` / `confirmPayment`.\n * Resolves the normalised result (also emitted as `confirmed`), or `null` after a failure (emitted as `failed`) or when nothing was started\n * (already submitting, or disabled). Never rejects: anything Stripe.js throws becomes a `failed` event.\n *\n * `useExistingIntent`: the intent already exists (a retry after a failed attempt, or one created earlier): no `elements.submit()`, no `createIntent`,\n * and `confirmPayment` / `confirmSetup` is called WITHOUT a client secret, exactly like cremo's intake retry. Pass `clientSecret` (the one you stored) to send it.\n */\n async confirm(options: { useExistingIntent?: boolean; clientSecret?: string } = {}): Promise<StripeConfirmedEvent | null> {\n if (this.disabled()) return null;\n if (this.protectionOn()) return this.confirmProtected(options); // the attempt's synchronous lock is the guard (an older, hung confirm must not block a new attempt the status check unlocked)\n if (this.submitting()) return null;\n return this.confirmCore(options, null);\n }\n\n /**\n * `confirm()` under the duplicate-payment protection: the gate (paid / unknown / not ready / offline: nothing is sent), then ONE attempt under the synchronous lock, raced against\n * `confirmTimeoutMs`. A timeout, going offline, a thrown error, a connection error or an abandoned 3-D Secure challenge make the outcome UNKNOWN (locked, status check by key); only\n * a definitive Stripe refusal unlocks with a new key. Never retries by itself.\n */\n private async confirmProtected(options: { useExistingIntent?: boolean; clientSecret?: string }): Promise<StripeConfirmedEvent | null> {\n if (!this.readiness.passSync()) {\n const reason = this.readiness.reasons()[0] ?? 'checking';\n this.outcome.emit({ kind: 'refused', attemptKey: this.attempt.key(), reason });\n this.fail(failure(reason, this.labels.t(refusalLabelKey(reason)), 'submit'));\n return null;\n }\n if (this.attempt.paidLocked() || this.attempt.unknown()) { this.attempt.begin(); return null; } // refuses and reports `refused`\n const run = await this.attempt.run<StripeConfirmedEvent | null>(async key => {\n // Everything this attempt learns lives in ITS OWN trace and key (arguments, never instance fields), so a late answer of an older attempt can never leak into the next one.\n const trace: ConfirmTrace = { held: true, failure: null, thrown: false, outcome: null };\n try {\n const event = await this.confirmCore(options, key, trace, this.attempt.pinnedRef());\n trace.held = false;\n return this.classifyConfirm(event, trace, this.attempt.isLive(key));\n } finally { trace.held = false; }\n }, { timeoutMs: this.confirmTimeoutMs() });\n return 'refused' in run && run.refused ? null : (run.value ?? null);\n }\n\n /** What the result of the core confirm means for the attempt (see {@link confirmProtected}). */\n private classifyConfirm(event: StripeConfirmedEvent | null, trace: ConfirmTrace, live: boolean): PaymentAttemptResult<StripeConfirmedEvent | null> {\n // A LATE answer of an older attempt decides nothing on screen: the payer sees failures and announcements only of the attempt that is still current. `run()` applies the returned result with the same rule.\n const show = (f: StripeFailure): void => { if (live) this.publishFailure(f); };\n const say = (key: 'paymentAttempt.authRequired' | 'paymentAttempt.authAbandoned'): void => { if (live) this.announcement.set(this.labels.t(key)); };\n if (event) {\n if (event.outcome === 'requires_action') { say('paymentAttempt.authRequired'); return { kind: 'pending', value: event, reason: 'auth_required' }; }\n return { kind: 'success', value: event };\n }\n const f = trace.failure;\n if (!f) return { kind: 'unknown', reason: 'no_result' }; // neither an event nor a failure: nothing can be said, so the status check decides\n if (f.code === 'attempt_failed_use_new_key') { show(f); return { kind: 'failure', reason: f.code }; } // a replay of a FAILED attempt: nothing was charged, the next click derives a NEW key\n if (f.stage === 'submit' || f.stage === 'intent') { show(f); return { kind: 'released', reason: f.code }; } // nothing was charged: unlock, the key is kept\n if (f.stage === 'action') {\n // After the challenge Stripe put the intent back to \"needs a payment method\" (the bank refused the authentication): nothing was charged, a definitive failure. Anything else (an abandoned\n // challenge, an error without an intent, a thrown error) proves nothing and stays unknown: the backend cancels the PaymentIntent of an abandoned challenge and answers `failed`.\n const errorIntent = (f.error as { payment_intent?: { status?: string } } | undefined)?.payment_intent;\n const refusedByBank = f.code === 'authentication_failed' || (f.code === 'payment_intent_authentication_failure' && errorIntent?.status === 'requires_payment_method');\n if (refusedByBank && !trace.thrown) { show(f); return { kind: 'failure', reason: f.code }; }\n say('paymentAttempt.authAbandoned');\n return { kind: 'unknown', reason: 'auth_abandoned' };\n }\n if (trace.thrown || (f.type !== undefined && AMBIGUOUS_STRIPE_TYPES.has(f.type)) || AMBIGUOUS_STRIPE_CODES.has(f.code)) return { kind: 'unknown', reason: 'error' };\n // The result stage: Stripe gave an intent in a state that proves the payment did NOT go through (needs a new payment method, cancelled) or one that proves nothing (no intent at all, an\n // unexpected status): only the former is a definitive failure.\n if (f.stage === 'result' && f.code !== 'requires_payment_method' && f.code !== 'no_payment_method' && trace.outcome !== 'canceled') return { kind: 'unknown', reason: 'unexpected_status' };\n show(f); // a definitive refusal by Stripe: the payer sees it, the key is renewed\n return { kind: 'failure', reason: f.code };\n }\n\n /** \"Retry loading\" of a blocked Stripe.js / Payment Element: builds the form again. */\n protected reload(): void { this.retryTick.update(n => n + 1); }\n\n /** The host reports that ITS charge call timed out or is ambiguous (only with `duplicateProtection`). */\n markUnknown(): void { this.attempt.markUnknown('host'); }\n /** The host reports that the payment succeeded (locks the form for this payable). */\n markSucceeded(): void { this.attempt.succeed('host'); }\n /** The host reports a DEFINITIVE failure (declined): unlock with a NEW key. */\n markFailed(): void { this.attempt.fail('host'); }\n /** The host did not use the payment and nothing reached Stripe: unlock, the attempt key is KEPT. */\n markNotCharged(): void { this.attempt.markNotCharged(); }\n /** The host starts a deliberate SECOND payment of this payable (an explicit \"pay again\" flow): forgets the paid state this form saw, removes the succeeded record and moves the epoch so the next attempt has a NEW key. Does nothing against the host's own `paid` input. */\n resetPaid(): void { this.attempt.resetPaid(); }\n\n private async confirmCore(options: { useExistingIntent?: boolean; clientSecret?: string }, attemptKey: string | null, trace?: ConfirmTrace, payableRef: string | null = null): Promise<StripeConfirmedEvent | null> {\n const stripe = this.stripe;\n const elements = this.elements;\n if (!stripe || !elements) { this.fail(failure('not_initialized', MSG_NOT_INITIALIZED, 'submit'), trace); return null; }\n const mine = ++this.confirmSeq;\n this.submitting.set(true);\n this.errorText.set('');\n this.announcement.set('');\n let stage: StripeFailureStage = 'submit';\n try {\n const mode = this.mode();\n const existing = options.useExistingIntent === true;\n const deferred = !existing && !this.clientSecret() && !!this.deferred();\n // Stripe only allows createConfirmationToken on a deferred-intent Elements group (no client secret): with a client secret the token is never attempted.\n const wantToken = deferred && this.collectConfirmationToken() && (this.selectedType() ?? 'card') === 'card';\n if (!existing && ((this.submitBeforeConfirm() ?? deferred) || wantToken)) {\n const { error } = await elements.submit();\n if (error) { this.fail(failureFromError(error, 'submit', this.errorOptions('submit')), trace); return null; }\n }\n let token: StripeConfirmationTokenEvent | null = null;\n if (wantToken) {\n const made = await this.makeConfirmationToken(stripe, elements);\n if ('id' in made && made.paymentMethodType === 'card') { token = made; this.confirmationToken.emit(made); }\n }\n let secret: string | undefined = existing ? options.clientSecret : undefined;\n if (deferred) {\n stage = 'intent';\n const create = this.createIntent();\n if (!create) { this.fail(failure('no_intent_factory', MSG_INTENT_FAILED, 'intent'), trace); return null; }\n try {\n const context = token ? { mode, confirmationToken: token } : { mode };\n const created = await create(attemptKey ? { ...context, attemptKey, payableRef } : context);\n if (wasQueuedOffline(created)) { warnQueuedPayment(); this.fail(failure('not_sent', this.labels.t('paymentAttempt.queuedOffline'), 'intent'), trace); return null; } // the offline layer QUEUED the request instead of sending it: no intent exists, and the queued request may still replay\n secret = typeof created === 'string' ? created : created?.clientSecret;\n } catch (err) {\n // The payments service says this attempt FAILED before (`attempt_failed_use_new_key`): not a retryable intent error but a definitive failure that moves the epoch.\n this.fail(failure(isAttemptFailedReplay(err) ? 'attempt_failed_use_new_key' : 'intent_creation_failed', messageOfThrown(err, STRIPE_DEFAULT_ERROR_MESSAGE), 'intent', messageOfThrown(err, '')), trace);\n return null;\n }\n if (!secret) { this.fail(failure('intent_creation_failed', MSG_INTENT_FAILED, 'intent'), trace); return null; }\n }\n stage = 'confirm';\n const confirmParams = this.buildConfirmParams();\n const params: Record<string, unknown> = {\n elements,\n ...(secret ? { clientSecret: secret } : {}),\n ...(confirmParams ? { confirmParams } : {}),\n redirect: this.redirect(),\n };\n const result = mode === 'setup' ? await stripe.confirmSetup(params) : await stripe.confirmPayment(params);\n if (result.error) { this.fail(failureFromError(result.error, 'confirm', this.errorOptions('confirm')), trace); return null; }\n const intent = mode === 'setup' ? result.setupIntent : result.paymentIntent;\n if (!intent) {\n this.fail(failure('not_completed', mode === 'setup' ? 'Payment method setup was incomplete. Please try again.' : MSG_NOT_COMPLETED, 'result'), trace);\n return null;\n }\n let event = normalizeIntent(mode, intent);\n if (mode === 'setup' && !event.paymentMethodId) { this.fail(failure('no_payment_method', MSG_NO_PAYMENT_METHOD, 'result'), trace); return null; }\n if (mode === 'payment' && event.outcome === 'requires_action' && this.autoHandleCardAction()) {\n stage = 'action';\n if (trace) this.attempt.markPending('auth_required'); // a challenge is open: the request timeout is replaced by authTimeoutMs\n const handled = await this.runCardAction(stripe, intent.client_secret, trace);\n if (!handled) return null;\n event = handled;\n }\n return this.finish(event, false, trace);\n } catch (err) {\n if (trace) trace.thrown = true;\n this.fail(this.thrownFailure(err, stage), trace);\n return null;\n } finally {\n if (mine === this.confirmSeq) this.submitting.set(false);\n }\n }\n\n /**\n * Creates a ConfirmationToken from the typed form (`elements.submit()`, then `stripe.createConfirmationToken({ elements })`) so a host can learn the card's funding before it\n * creates any intent (a fee that depends on credit / debit). Resolves the token event (also emitted as `(confirmationToken)` when it is a card), or the failure (returned only,\n * not emitted, and nothing is shown: Stripe's own form already marks an incomplete field). `null` when nothing was started (already submitting, or disabled).\n */\n async createConfirmationToken(): Promise<StripeConfirmationTokenEvent | StripeFailure | null> {\n if (this.submitting() || this.disabled()) return null;\n const stripe = this.stripe;\n const elements = this.elements;\n if (!stripe || !elements) return failure('not_initialized', MSG_NOT_INITIALIZED, 'submit');\n try {\n const { error } = await elements.submit();\n if (error) return failureFromError(error, 'submit', this.errorOptions('submit'));\n } catch (err) {\n return this.thrownFailure(err, 'submit');\n }\n const made = await this.makeConfirmationToken(stripe, elements);\n if ('id' in made && made.paymentMethodType === 'card') this.confirmationToken.emit(made);\n return made;\n }\n\n /** `stripe.createConfirmationToken({ elements })` (with the billing details as `params` when given); the event, or the failure. Never throws. */\n private async makeConfirmationToken(stripe: StripeLike, elements: StripeElementsLike): Promise<StripeConfirmationTokenEvent | StripeFailure> {\n if (!stripe.createConfirmationToken) return failure('confirmation_token_unavailable', MSG_TOKEN_FAILED, 'confirm');\n const billing = this.billingDetails();\n try {\n const { confirmationToken, error } = await stripe.createConfirmationToken({ elements, ...(billing ? { params: { payment_method_data: { billing_details: billing } } } : {}) });\n if (error) return failureFromError(error, 'confirm', this.errorOptions('confirm'));\n return confirmationToken ? confirmationTokenEventOf(confirmationToken) : failure('confirmation_token_unavailable', MSG_TOKEN_FAILED, 'confirm');\n } catch (err) {\n return this.thrownFailure(err, 'confirm');\n }\n }\n\n /**\n * Runs `stripe.handleCardAction(clientSecret)` (3D Secure) for a payment that came back `requires_action`, and reports the result like `confirm()`.\n * Use it when `autoHandleCardAction` is off and the host handles `outcome: 'requires_action'` itself.\n */\n async handleNextAction(clientSecret: string): Promise<StripeConfirmedEvent | null> {\n if (this.submitting()) return null;\n const stripe = this.stripe;\n if (!stripe) { this.fail(failure('not_initialized', MSG_NOT_INITIALIZED, 'action')); return null; }\n // With the protection on, the host's `confirm()` answered `requires_action` and the attempt is waiting for THIS challenge: its result decides the attempt (success locks, a refusal by the bank\n // unlocks with a new key, an abandoned challenge is unknown), exactly like the automatic challenge of `confirm()`.\n const guarded = this.protectionOn() && this.attempt.inFlight();\n const trace: ConfirmTrace | undefined = guarded ? { held: true, failure: null, thrown: false, outcome: null } : undefined;\n if (guarded) this.attempt.markPending('auth_required');\n this.submitting.set(true);\n this.errorText.set('');\n let event: StripeConfirmedEvent | null = null;\n try {\n const handled = await this.runCardAction(stripe, clientSecret, trace);\n event = handled ? this.finish(handled, false, trace) : null;\n return event;\n } catch (err) {\n if (trace) trace.thrown = true;\n this.fail(this.thrownFailure(err, 'action'), trace);\n return null;\n } finally {\n this.submitting.set(false);\n if (trace) { trace.held = false; this.attempt.apply(this.classifyConfirm(event, trace, true)); }\n }\n }\n\n /**\n * `elements.fetchUpdates()`: after your backend changed the amount of the intent this form was created with (cremo intake: fees differ per payment method),\n * so the form shows the new amount. Resolves `null` when it worked, else the failure (returned only, not emitted: the host decides, cremo ignores it).\n */\n async fetchUpdates(): Promise<StripeFailure | null> {\n const elements = this.elements;\n if (!elements?.fetchUpdates) return failure('not_initialized', MSG_NOT_INITIALIZED, 'submit');\n try {\n const { error } = await elements.fetchUpdates();\n return error ? failureFromError(error, 'confirm', this.errorOptions('confirm')) : null;\n } catch (err) {\n return this.thrownFailure(err, 'confirm');\n }\n }\n\n /** `elements.update(options)`: change the deferred amount, appearance or locale without re-creating the form. */\n updateElements(options: Record<string, unknown>): void { this.elements?.update?.(options); }\n\n /** `paymentElement.update(options)`. */\n updatePaymentElement(options: Record<string, unknown>): void { this.element?.update?.(options); }\n\n /** Removes the Payment Element (host teardown on cancel). The component re-creates it when its inputs change. */\n destroyElements(): void { this.disposeElements(); this.isReady.set(false); }\n\n /** Verify a bank account with the two micro-deposit amounts / the descriptor code of a PaymentIntent (the public \"verify your bank\" page). */\n async verifyMicrodepositsForPayment(clientSecret: string, data: MicrodepositVerifyData): Promise<StripeMicrodepositResult> {\n return this.verifyWith('payment', clientSecret, data);\n }\n\n /** Same for a SetupIntent. */\n async verifyMicrodepositsForSetup(clientSecret: string, data: MicrodepositVerifyData): Promise<StripeMicrodepositResult> {\n return this.verifyWith('setup', clientSecret, data);\n }\n\n /**\n * After Stripe redirected the customer back to `returnUrl`: retrieves the intent (client secret from the URL by default) and reports it like `confirm()`\n * (`confirmed` for succeeded / processing / needs verification / needs action, `failed` otherwise). `{ event: null, failure: null }` when the URL has no intent.\n */\n async handleReturn(options: { clientSecret?: string; kind?: StripeIntentKind; search?: string } = {}): Promise<StripeReturnResult> {\n const fromUrl = options.clientSecret ? null : readStripeReturnParams(options.search ?? this.doc.defaultView?.location.search ?? '');\n const clientSecret = options.clientSecret ?? fromUrl?.clientSecret;\n if (!clientSecret) return { event: null, failure: null };\n const kind = options.kind ?? fromUrl?.kind ?? this.mode();\n let stripe: StripeLike;\n try { stripe = await this.ensureStripe(); } catch (err) {\n const f = failure('load_error', messageOfThrown(err, MSG_LOAD_FAILED), 'load', messageOfThrown(err, ''));\n this.fail(f);\n return { event: null, failure: f };\n }\n const result = await retrieveIntent(stripe, kind, clientSecret);\n if (result.failure) { this.fail(result.failure); return result; }\n if (result.event && !this.finish(result.event, true)) return { event: null, failure: this.lastFailure };\n return result;\n }\n\n // ── Internals ──────────────────────────────────────────────────────────\n\n private errorOptions(stage: StripeFailureStage): StripeErrorMessageOptions {\n return {\n display: this.errorDisplayByStage()?.[stage] ?? this.errorDisplay(),\n overrides: this.errorMessages(),\n ...(this.errorFallbackByStage()?.[stage] || this.errorFallback() ? { fallback: this.errorFallbackByStage()?.[stage] || this.errorFallback() } : {}),\n };\n }\n\n /** Something Stripe.js threw (an IntegrationError, a network failure) as a failure, with the text chosen like any Stripe error. */\n private thrownFailure(err: unknown, stage: StripeFailureStage): StripeFailure {\n const e = err as { code?: unknown; type?: unknown; decline_code?: unknown; message?: unknown } | null | undefined;\n const error = {\n ...(typeof e?.code === 'string' ? { code: e.code } : {}),\n ...(typeof e?.type === 'string' ? { type: e.type } : {}),\n ...(typeof e?.decline_code === 'string' ? { decline_code: e.decline_code } : {}),\n ...(typeof e?.message === 'string' && e.message ? { message: e.message } : {}),\n };\n const code = stage === 'submit' ? 'submit_failed' : stage === 'action' ? 'action_failed' : 'confirm_failed';\n const { error: _raw, ...failed } = failureFromError(error, stage, this.errorOptions(stage));\n return { ...failed, code: error.code ?? code, ...(stage === 'action' ? { actionHandled: true } : {}) };\n }\n\n private buildConfirmParams(): Record<string, unknown> | null {\n const params: Record<string, unknown> = {};\n const returnUrl = this.returnUrl();\n if (returnUrl !== null) params['return_url'] = returnUrl ?? this.doc.defaultView?.location.href ?? '';\n const billing = this.billingDetails();\n if (billing) params['payment_method_data'] = { billing_details: billing };\n Object.assign(params, this.confirmParams() ?? {});\n return Object.keys(params).length ? params : null;\n }\n\n private fail(f: StripeFailure, trace?: ConfirmTrace): void {\n const override = this.errorMessages()?.[f.code];\n if (override) f = { ...f, message: override.split('{status}').join(f.status ?? '') };\n this.lastFailure = f;\n if (trace) { trace.failure = f; if (trace.held) return; } // a protected confirm decides afterwards whether this is a failure the payer sees (see `classifyConfirm`)\n this.publishFailure(f);\n }\n\n /** Shows and emits a failure (what `fail()` always did). */\n private publishFailure(f: StripeFailure): void {\n if (this.destroyed) return;\n if (this.showErrors()) this.errorText.set(f.message);\n this.announcement.set('');\n this.failed.emit(f);\n }\n\n private finish(event: StripeConfirmedEvent, fromReturn = false, trace?: ConfirmTrace): StripeConfirmedEvent | null {\n if (trace) trace.outcome = event.outcome;\n const acted = { ...(event.actionHandled ? { actionHandled: true } : {}), status: event.status };\n if (event.outcome === 'requires_payment_method') {\n this.fail({ ...failure('requires_payment_method', MSG_REQUIRES_PAYMENT_METHOD, fromReturn ? 'return' : 'result'), ...acted }, trace);\n return null;\n }\n if (event.outcome === 'canceled' || event.outcome === 'unknown') {\n this.fail({ ...failure('not_completed', MSG_NOT_COMPLETED, fromReturn ? 'return' : 'result'), ...acted }, trace);\n return null;\n }\n if (this.destroyed) return event;\n this.announcement.set(this.announce(event));\n this.confirmed.emit(event);\n return event;\n }\n\n private announce(event: StripeConfirmedEvent): string {\n const m = this.messages();\n switch (event.outcome) {\n case 'succeeded': return event.kind === 'setup' ? m.methodSaved : m.paymentReceived;\n case 'processing': return m.paymentProcessing;\n case 'requires_capture': return m.paymentAuthorized;\n case 'requires_verification': return m.verificationNeeded;\n default: return m.actionRequired;\n }\n }\n\n private async runCardAction(stripe: StripeLike, clientSecret: string | null | undefined, trace?: ConfirmTrace): Promise<StripeConfirmedEvent | null> {\n const acted = { actionHandled: true };\n if (!stripe.handleCardAction || !clientSecret) { this.fail({ ...failure('action_unavailable', MSG_AUTH_NOT_COMPLETED, 'action'), ...acted }, trace); return null; }\n const { error, paymentIntent } = await stripe.handleCardAction(clientSecret);\n if (error) { this.fail({ ...failureFromError(error, 'action', { ...this.errorOptions('action'), fallback: MSG_AUTH_FAILED }), ...acted }, trace); return null; }\n if (!paymentIntent) { this.fail({ ...failure('action_incomplete', MSG_AUTH_NOT_COMPLETED, 'action'), ...acted }, trace); return null; }\n const event = { ...normalizeIntent('payment', paymentIntent), ...acted };\n if (event.outcome === 'requires_payment_method') {\n this.fail({ ...failure('authentication_failed', 'Payment authentication failed. Please try a different payment method.', 'action'), ...acted, status: event.status }, trace);\n return null;\n }\n return event;\n }\n\n private async ensureStripe(): Promise<StripeLike> {\n if (this.stripe) return this.stripe;\n const { key, options } = this.connection();\n if (!key) throw new Error(MSG_KEY_MISSING);\n const stripe = await this.loader(key, options);\n if (!stripe) throw new Error(MSG_LOAD_FAILED);\n return stripe;\n }\n\n private async verifyWith(flow: StripeIntentKind, clientSecret: string, data: MicrodepositVerifyData): Promise<StripeMicrodepositResult> {\n let stripe: StripeLike;\n try { stripe = await this.ensureStripe(); } catch (err) {\n return { ok: false, outcome: null, intent: null, failure: failure('load_error', messageOfThrown(err, MSG_LOAD_FAILED), 'load', messageOfThrown(err, '')) };\n }\n return verifyMicrodeposits(stripe, flow, clientSecret, data);\n }\n\n private disposeElements(): void {\n const element = this.element;\n this.element = null;\n this.elements = null;\n this.lastType = null;\n this.selectedType.set(null);\n this.complete.set(false);\n if (element) {\n try { element.destroy(); } catch { /* already gone */ }\n if (!this.destroyed) this.stripeReady.emit(null);\n }\n }\n\n private loadFailed(message: string, stripeMessage: string): void {\n this.loading.set(false);\n this.isReady.set(false);\n this.loadErrorText.set(this.loadErrorMessage());\n this.loadError.emit(failure('load_error', message, 'load', stripeMessage));\n }\n\n private async init(\n container: HTMLElement,\n connection: { key: string; options: StripeLoadOptions | undefined },\n elementsConfig: Record<string, unknown> | null,\n elementConfig: Record<string, unknown>,\n ): Promise<void> {\n const generation = ++this.generation;\n this.disposeElements();\n this.isReady.set(false);\n this.errorText.set('');\n this.loadErrorText.set('');\n this.announcement.set('');\n if (!this.isBrowser || !elementsConfig) { this.loading.set(false); return; }\n if (!connection.key) { this.loadFailed(localizeStripeMessage(MSG_KEY_MISSING), ''); return; }\n this.loading.set(true);\n try {\n const signature = JSON.stringify(connection);\n if (!this.stripe || this.stripeSignature !== signature) {\n this.stripe = null;\n const stripe = await this.loader(connection.key, connection.options);\n if (generation !== this.generation) return;\n if (!stripe) { this.loadFailed(localizeStripeMessage(MSG_LOAD_FAILED), ''); return; }\n this.stripe = stripe;\n this.stripeSignature = signature;\n }\n const options: Record<string, unknown> = { ...elementsConfig };\n const deferred = this.deferred();\n if (!options['clientSecret'] && deferred?.amount !== undefined && options['amount'] === undefined) options['amount'] = deferred.amount;\n this.lastAmount = deferred?.amount;\n if (this.appearanceFromTokens() && !options['appearance']) options['appearance'] = readStripeAppearance(this.doc, this.host.nativeElement);\n const elements = this.stripe.elements(options);\n const elementOptions: Record<string, unknown> = { ...elementConfig };\n const defaultValues = this.defaultValues();\n if (defaultValues) elementOptions['defaultValues'] = defaultValues;\n if (this.disabled() && !this.mountOnly()) elementOptions['readOnly'] = true;\n this.appliedDefaultValues = JSON.stringify(defaultValues ?? null);\n this.appliedDisabled = this.disabled();\n const element = elements.create('payment', elementOptions);\n this.elements = elements;\n this.element = element;\n element.on('change', (event) => { if (generation === this.generation) this.onChange(event); });\n element.on('ready', () => {\n if (generation !== this.generation) return;\n this.loading.set(false);\n this.isReady.set(true);\n // Changes made while the element loaded (a customer name typed, the form disabled) are applied now.\n if (!this.mountOnly()) {\n this.applyDefaultValues(this.defaultValues());\n this.applyDisabled(this.disabled());\n }\n this.ready.emit();\n });\n element.on('loaderror', (event) => {\n if (generation !== this.generation) return;\n const message = event?.error?.message || localizeStripeMessage(MSG_LOAD_FAILED);\n this.loadFailed(message, event?.error?.message ?? '');\n });\n element.mount(container);\n this.stripeReady.emit({ stripe: this.stripe, elements, paymentElement: element });\n } catch (err) {\n if (generation !== this.generation) return;\n this.loadFailed(localizeStripeMessage(messageOfThrown(err, MSG_LOAD_FAILED)), messageOfThrown(err, ''));\n }\n }\n\n private applyDefaultValues(defaultValues: Record<string, unknown> | null): void {\n const signature = JSON.stringify(defaultValues ?? null);\n if (this.mountOnly() || !this.element?.update || !this.isReady() || signature === this.appliedDefaultValues) return;\n this.appliedDefaultValues = signature;\n this.element.update({ defaultValues: defaultValues ?? {} });\n }\n\n private applyDisabled(disabled: boolean): void {\n if (this.mountOnly() || !this.element?.update || !this.isReady() || disabled === this.appliedDisabled) return;\n this.appliedDisabled = disabled;\n this.element.update({ readOnly: disabled });\n }\n\n private onChange(event: { complete?: boolean; empty?: boolean; value?: { type?: string }; error?: { message?: string } } | null | undefined): void {\n const type = event?.value?.type ?? null;\n const complete = !!event?.complete;\n this.complete.set(complete);\n if (type) this.selectedType.set(type);\n this.elementChange.emit({ complete, empty: !!event?.empty, type, errorMessage: event?.error?.message ?? null });\n if (type && type !== (this.lastType ?? this.initialPaymentMethodType())) this.paymentMethodTypeChange.emit(type);\n if (type) this.lastType = type;\n }\n}\n","import { UiLabelKey, safeLocale, uiLocale, uiText } from '@forgeroute/ui';\n/** How a bank account added with micro-deposits is verified: two deposit amounts, the code of one deposit, or the bank is still confirming it. */\nexport type MicrodepositType = 'amounts' | 'descriptor_code' | 'processing';\n\n/** The text of the pending-verification card, in one place for the component and its tests. */\n/** The text of the pending-verification card; read on every access, so it follows the app's active language. */\nexport const MICRODEPOSIT_COPY = {\n get title() { return uiText('stripeMicrodepositVerify.title'); },\n get processingTitle() { return uiText('stripeMicrodepositVerify.processingTitle'); },\n get processing() { return uiText('stripeMicrodepositVerify.processing'); },\n get cannotPay() { return uiText('stripeMicrodepositVerify.cannotPay'); },\n get readOnly() { return uiText('stripeMicrodepositVerify.readOnly'); },\n get keepsActive() { return uiText('stripeMicrodepositVerify.keepsActive'); },\n get cancelTitle() { return uiText('stripeMicrodepositVerify.cancelTitle'); },\n get verifyLabel() { return uiText('stripeMicrodepositVerify.verifyLabel'); },\n get cancelBase() { return uiText('stripeMicrodepositVerify.cancelBase'); },\n get cancelKeepsActive() { return uiText('stripeMicrodepositVerify.cancelKeepsActive'); },\n get cancelNoOther() { return uiText('stripeMicrodepositVerify.cancelNoOther'); },\n get tooManyAttempts() { return uiText('stripeMicrodepositVerify.tooManyAttempts'); },\n get codeRequired() { return uiText('stripeMicrodepositVerify.codeRequired'); },\n};\n\n/** \"June 5, 2026\" in UTC: the arrival date is a calendar day. Empty for no / an invalid date. */\nexport function microdepositArrivalText(iso: string | null | undefined): string {\n if (!iso) return '';\n const date = new Date(iso);\n return Number.isNaN(date.getTime()) ? '' : date.toLocaleDateString(safeLocale(uiLocale()), { month: 'long', day: 'numeric', year: 'numeric', timeZone: 'UTC' });\n}\n\n/** Amounts: two whole numbers of cents from 1 to 99 (Stripe's micro-deposits are 1 to 99 cents). Empty text = nothing to say yet. */\nexport function depositAmountError(value: unknown): string {\n if (value === '' || value === null || value === undefined) return '';\n const n = Number(value);\n if (!Number.isInteger(n)) return uiText('stripeMicrodepositVerify.wholeCents');\n if (n < 1 || n > 99) return uiText('stripeMicrodepositVerify.centsRange');\n return '';\n}\n\n/** The code as sent to Stripe: trimmed, upper case. */\nexport const normalizeDescriptorCode = (value: string | null | undefined): string => (value ?? '').trim().toUpperCase();\n\n/** The descriptor code: 6 letters or numbers; with `requireSmPrefix` (Stripe's codes look like SMXXXX) it must start with \"SM\". Empty = nothing to say yet. */\nexport function descriptorCodeError(value: string | null | undefined, requireSmPrefix = false): string {\n const code = normalizeDescriptorCode(value);\n if (!code) return '';\n if (!/^[A-Z0-9]{6}$/.test(code)) return uiText('stripeMicrodepositVerify.code6');\n if (requireSmPrefix && !/^SM[A-Z0-9]{4}$/.test(code)) return uiText('stripeMicrodepositVerify.codeSm');\n return '';\n}\n\n/** Only an https link is offered as Stripe's hosted verification page. */\nexport function safeHostedUrl(url: string | null | undefined): string | null {\n return /^https:\\/\\//.test(url ?? '') ? (url as string) : null;\n}\n\n/** What `(verify)` emits: the two amounts in cents, or the code. */\nexport type MicrodepositVerifyEvent = { amounts: [number, number] } | { descriptorCode: string };\n\n/** Who started a pending verification, from the point of view of the user looking at it (a partner page): this user, the partner, or somebody else. */\nexport type MicrodepositStartedBy = 'you' | 'partner' | 'other' | '';\n\nexport interface MicrodepositStepsContext {\n type: Exclude<MicrodepositType, 'processing'>;\n /** ISO timestamp of the day the deposits should arrive. */\n arrivalDate?: string | null;\n /** Set when the user looks at ANOTHER party's account (a crematory looking at a partner): \"{partner}'s account\", \"Ask {partner} for ...\". */\n partnerName?: string;\n /** The user cannot finish it (no form on the card). */\n readOnly?: boolean;\n /** Read-only: who started it. */\n startedBy?: MicrodepositStartedBy;\n /** Read-only: replaces ONLY the middle sentence (\"An administrator of your organization can finish the verification.\" by default). */\n readOnlyText?: string;\n}\n\nconst arrivalClause = (iso: string | null | undefined): string => {\n const text = microdepositArrivalText(iso);\n return text ? uiText('stripeMicrodepositVerify.byDate', { date: text }) : '';\n};\n\n/**\n * The explanation under the bank account: the deposits clause, then what to do (or, with no form, who can finish it), then\n * \"Until then this account can't be used to pay invoices.\" The exact strings of the cremo Settings / Partners cards.\n */\nexport function microdepositStepsText(ctx: MicrodepositStepsContext): string {\n const t = (key: string, params?: Record<string, string | number>) => uiText(`stripeMicrodepositVerify.${key}` as UiLabelKey, params);\n const partner = ctx.partnerName ?? '';\n const holder = partner ? t('holderPartner', { partner }) : t('holderYours');\n const clause = arrivalClause(ctx.arrivalDate);\n const deposits = ctx.type === 'descriptor_code' ? t('depositsDescriptor', { holder, clause }) : t('depositsAmounts', { holder, clause });\n if (ctx.readOnly) {\n const who = ctx.readOnlyText\n ?? (ctx.startedBy === 'partner' ? t('startedByPartner', { partner })\n : ctx.startedBy === 'other' ? t('startedByOther')\n : partner ? t('partnerOrSetup', { partner })\n : MICRODEPOSIT_COPY.readOnly);\n return `${deposits}${who} ${MICRODEPOSIT_COPY.cannotPay}`;\n }\n const enter = ctx.type === 'descriptor_code'\n ? (partner ? t('enterCodePartner', { partner }) : t('enterCodeOwn'))\n : (partner ? t('enterAmountsPartner', { partner }) : t('enterAmountsOwn'));\n return `${deposits}${enter}${MICRODEPOSIT_COPY.cannotPay}`;\n}\n\n/** While the bank is still confirming the account. */\nexport function microdepositProcessingText(partnerName = ''): string {\n return partnerName ? uiText('stripeMicrodepositVerify.processingPartner', { partner: partnerName }) : MICRODEPOSIT_COPY.processing;\n}\n\n/** The note under the steps when a payment method is already saved. */\nexport function microdepositKeepsActiveText(partnerName = ''): string {\n return partnerName ? uiText('stripeMicrodepositVerify.keepsActivePartner', { partner: partnerName }) : MICRODEPOSIT_COPY.keepsActive;\n}\n\n/** The message of the cancel confirm: the saved method stays active only when one is saved. */\nexport function microdepositCancelMessage(options: { partnerName?: string; hasSavedMethod?: boolean } = {}): string {\n const partner = options.partnerName ?? '';\n if (partner) return `${MICRODEPOSIT_COPY.cancelBase} ${options.hasSavedMethod ? uiText('stripeMicrodepositVerify.cancelKeepsActivePartner', { partner }) : uiText('stripeMicrodepositVerify.cancelNoOtherPartner', { partner })}`;\n return MICRODEPOSIT_COPY.cancelBase + (options.hasSavedMethod ? MICRODEPOSIT_COPY.cancelKeepsActive : MICRODEPOSIT_COPY.cancelNoOther);\n}\n","import { ChangeDetectionStrategy, Component, computed, inject, input, output, signal } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport {\n AlertComponent, BadgeComponent, ButtonComponent, FormRowComponent, FormSectionComponent, ModalComponent, TextComponent, TextInputComponent,\n} from '@forgeroute/ui';\nimport { StripePaymentService, type StripeMicrodepositResult } from '../stripe-payment/stripe-actions';\nimport type { StripeIntentKind } from '../stripe-payment/stripe-outcomes';\nimport {\n MICRODEPOSIT_COPY, depositAmountError, descriptorCodeError, microdepositStepsText, normalizeDescriptorCode, safeHostedUrl,\n type MicrodepositType, type MicrodepositVerifyEvent,\n} from './microdeposit-verify.models';\nimport { UiLabelsService } from '@forgeroute/ui';\nimport { localizeStripeMessage } from '../stripe-payment/stripe-outcomes';\n\n/**\n * \"Bank account waiting for verification\": explains the steps in plain words, takes the two deposit amounts (or the 6-character code),\n * links to Stripe's own verification page, and lets the user cancel. Read-only users see the card but no form and no buttons.\n *\n * Two ways to verify, same screen:\n * - Host verifies (default): `(verify)` emits `{ amounts: [a, b] }` or `{ descriptorCode }`; the host calls its backend and shows\n * `[verifying]` / `[errorText]` (your API owns the rules and the attempts).\n * - Stripe.js verifies (public \"verify your bank\" page): pass `[clientSecret]` (+ `[publishableKey]`, `[stripeAccount]`, `[flow]`); the component calls\n * `verifyMicrodepositsForPayment/Setup` itself, counts failed attempts (`[maxAttempts]`) and emits `(verified)`.\n *\n * <ui-microdeposit-verify type=\"amounts\" bankName=\"Chase\" last4=\"6789\" arrivalDate=\"2026-06-05T00:00:00Z\"\n * [verifying]=\"busy()\" [errorText]=\"error()\" (verify)=\"verify($event)\" (cancelVerification)=\"cancel()\" />\n */\n@Component({\n selector: 'ui-microdeposit-verify',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [FormsModule, AlertComponent, BadgeComponent, ButtonComponent, FormRowComponent, FormSectionComponent, ModalComponent, TextComponent, TextInputComponent],\n template: `\n <div data-testid=\"bank-pending-card\">\n <ui-form-section [label]=\"heading()\">\n <ui-alert variant=\"info\" data-testid=\"bank-pending-alert\">\n <div data-testid=\"bank-pending-summary\">\n @if (bankLine(); as line) { <strong data-testid=\"bank-pending-bank\">{{ line }}</strong> }\n <ui-badge [label]=\"labels.t('stripeMicrodepositVerify.pending')\" variant=\"yellow\" data-testid=\"bank-pending-badge\" />\n </div>\n @if (stepsText().trim()) {\n <ui-text size=\"sm\" [text]=\"stepsText()\" data-testid=\"bank-pending-steps\" />\n } @else if (isProcessing()) {\n <ui-text size=\"sm\" [text]=\"copy.processing\" data-testid=\"bank-pending-steps\" />\n } @else {\n <ui-text size=\"sm\" data-testid=\"bank-pending-steps\" [text]=\"defaultSteps()\" />\n }\n @if (hasSavedMethod()) {\n <ui-text size=\"sm\" tone=\"muted\" [text]=\"keepsActiveText() || copy.keepsActive\" data-testid=\"bank-pending-keeps-active\" />\n }\n <!-- Finishing the verification on Stripe's page saves the payment method (a write): never offered to a read-only user -->\n @if (!formHidden() && !hideHostedLink() && safeUrl(); as url) {\n <div><ui-button variant=\"link\" size=\"sm\" [href]=\"url\" target=\"_blank\" data-testid=\"bank-hosted-link\">{{ labels.t('stripeMicrodepositVerify.openStripeSVerificationPage') }}</ui-button></div>\n }\n </ui-alert>\n\n @if (!formHidden() && !isProcessing()) {\n @if (type() === 'descriptor_code') {\n <ui-text-input [label]=\"labels.t('stripeMicrodepositVerify.verificationCode')\" [hint]=\"labels.t('stripeMicrodepositVerify.6LettersOrNumbersFrom')\" [maxlength]=\"6\" [required]=\"true\" [showErrors]=\"touched()\"\n [error]=\"touched() ? codeError() : ''\" data-testid=\"bank-code-input\" [ngModel]=\"code()\" (ngModelChange)=\"code.set($event)\" />\n } @else {\n <ui-form-row data-testid=\"bank-amounts-row\">\n <ui-text-input [label]=\"labels.t('stripeMicrodepositVerify.firstDepositCents')\" type=\"number\" [min]=\"1\" [max]=\"99\" [maxDecimals]=\"0\" [required]=\"true\" [showErrors]=\"touched()\"\n [error]=\"touched() ? amountError(first()) : ''\" data-testid=\"bank-amount-first\" [ngModel]=\"first()\" (ngModelChange)=\"first.set($event)\" />\n <ui-text-input [label]=\"labels.t('stripeMicrodepositVerify.secondDepositCents')\" type=\"number\" [min]=\"1\" [max]=\"99\" [maxDecimals]=\"0\" [required]=\"true\" [showErrors]=\"touched()\"\n [error]=\"touched() ? amountError(second()) : ''\" data-testid=\"bank-amount-second\" [ngModel]=\"second()\" (ngModelChange)=\"second.set($event)\" />\n </ui-form-row>\n }\n @if (shownError(); as text) {\n <ui-alert variant=\"danger\" data-testid=\"bank-verify-error\">{{ text }}</ui-alert>\n }\n <ui-button variant=\"primary\" size=\"sm\" data-testid=\"bank-verify-button\" [loading]=\"busy()\" [disabled]=\"busy() || cancelling()\" (click)=\"verify()\">{{ verifyLabel() || copy.verifyLabel }}</ui-button>\n }\n\n @if (!formHidden() && allowCancel()) {\n <ui-button variant=\"secondary\" size=\"sm\" data-testid=\"bank-cancel-button\" [disabled]=\"busy() || cancelling()\" (click)=\"showCancelConfirm.set(true)\">{{ cancelLabel() || copy.cancelTitle }}</ui-button>\n }\n </ui-form-section>\n\n <ui-modal [open]=\"showCancelConfirm()\" [title]=\"cancelLabel() || copy.cancelTitle\" maxWidth=\"460px\" (close)=\"showCancelConfirm.set(false)\">\n <ui-text size=\"sm\" data-testid=\"bank-cancel-message\" [text]=\"cancelMessage()\" />\n <ui-button modal-footer-left variant=\"secondary\" size=\"sm\" data-testid=\"bank-cancel-keep\" (click)=\"showCancelConfirm.set(false)\">{{ labels.t('stripeMicrodepositVerify.keepWaiting') }}</ui-button>\n <ui-button modal-footer-right variant=\"danger\" size=\"sm\" data-testid=\"bank-cancel-confirm\" [loading]=\"cancelling()\" (click)=\"confirmCancel()\">{{ cancelLabel() || copy.cancelTitle }}</ui-button>\n </ui-modal>\n </div>\n `,\n})\nexport class MicrodepositVerifyComponent {\n protected readonly labels = inject(UiLabelsService);\n private readonly service = inject(StripePaymentService);\n\n /** `'amounts'` (two deposits), `'descriptor_code'` (one deposit with a code) or `'processing'` (the bank is still confirming; nothing to enter). */\n readonly type = input<MicrodepositType>('amounts');\n readonly bankName = input('');\n readonly last4 = input('');\n /** The day the deposits should have arrived (ISO timestamp); empty when unknown. See `StripeVerification.arrivalDateIso`. */\n readonly arrivalDate = input<string | null>(null);\n /** Stripe's own verification page; only an https link is shown. */\n readonly hostedVerificationUrl = input<string | null>(null);\n /** Read-only users see the card with `readOnlyText` but no form, link or buttons. */\n readonly readOnly = input(false);\n /** Show the card as plain status: no form, link or buttons, and the steps text is yours (`stepsText`). For a page where someone else finishes the verification. */\n readonly statusOnly = input(false);\n /** Replaces the card heading (default: \"Bank account waiting for verification\" / \"Bank account being confirmed\"). */\n readonly title = input('');\n /** Replaces the whole steps text (the sentences about the deposits and what to enter). Use it for wording the library cannot know (a partner's name, who started it). */\n readonly stepsText = input('');\n /** Read-only / status-only: replaces ONLY the middle sentence of the steps text (the deposits clause before it and \"Until then this account can't be used ...\" after it stay). */\n readonly readOnlyText = input<string>(MICRODEPOSIT_COPY.readOnly);\n /** Hide Stripe's hosted-page link even for users who could use it. */\n readonly hideHostedLink = input(false);\n readonly cancelLabel = input('');\n readonly verifyLabel = input('');\n /** Replaces \"Your current payment method stays active until the new bank account is verified.\" */\n readonly keepsActiveText = input('');\n /** Replaces the cancel confirm's message. */\n readonly cancelMessageText = input('');\n /** A payment method is already saved (it stays active until the new bank account is verified). */\n readonly hasSavedMethod = input(false);\n /** Host mode: the host's verify request is running. */\n readonly verifying = input(false);\n /** Host mode: the host's cancel request is running. */\n readonly cancelling = input(false);\n /** Host mode: the verification failed; shown above the button. */\n readonly errorText = input('');\n /** Offer \"Cancel verification\" (with its confirm). */\n readonly allowCancel = input(true);\n /** Descriptor codes must look like Stripe's (`SMXXXX`). */\n readonly requireSmPrefix = input(false);\n\n // Stripe.js mode (set `clientSecret`)\n readonly clientSecret = input<string | null>(null);\n readonly publishableKey = input<string | null>(null);\n readonly stripeAccount = input<string | null>(null);\n /** Which kind of intent `clientSecret` belongs to. */\n readonly flow = input<StripeIntentKind>('payment');\n /** Stripe.js mode: stop sending after this many failed attempts (0 = no limit here). */\n readonly maxAttempts = input(0);\n\n /** Host mode: the amounts / code to verify. */\n readonly verify$ = output<MicrodepositVerifyEvent>({ alias: 'verify' });\n /** The user confirmed cancelling the verification. */\n readonly cancelVerification = output<void>();\n /** Stripe.js mode: the bank account is verified. */\n readonly verified = output<StripeMicrodepositResult>();\n /** Stripe.js mode: a verification attempt failed (the text is already shown). */\n readonly verifyFailed = output<StripeMicrodepositResult>();\n\n readonly copy = MICRODEPOSIT_COPY;\n readonly first = signal<string | number>('');\n readonly second = signal<string | number>('');\n readonly code = signal('');\n readonly touched = signal(false);\n readonly showCancelConfirm = signal(false);\n private readonly stripeBusy = signal(false);\n private readonly stripeError = signal('');\n private failedAttempts = 0;\n\n readonly formHidden = computed(() => this.readOnly() || this.statusOnly());\n readonly heading = computed(() => this.title() || (this.isProcessing() ? this.copy.processingTitle : this.copy.title));\n /** \"Chase ····6789\"; nothing when neither the bank nor the last 4 digits are known. */\n readonly bankLine = computed(() => {\n const bank = this.bankName().trim();\n const last4 = this.last4().trim();\n if (!bank && !last4) return '';\n return `${bank || this.labels.t('stripeMicrodepositVerify.bankFallback')}${last4 ? ` ····${last4}` : ''}`;\n });\n readonly busy = computed(() => this.verifying() || this.stripeBusy());\n readonly shownError = computed(() => this.stripeError() || this.errorText());\n readonly isProcessing = computed(() => this.type() === 'processing');\n readonly safeUrl = computed(() => safeHostedUrl(this.hostedVerificationUrl()));\n /** The built-in steps text: deposits clause + what to do, or with no form the `readOnlyText` sentence, + \"Until then this account can't be used to pay invoices.\" */\n readonly defaultSteps = computed(() => microdepositStepsText({\n type: this.type() === 'descriptor_code' ? 'descriptor_code' : 'amounts',\n arrivalDate: this.arrivalDate(),\n readOnly: this.formHidden(),\n readOnlyText: this.readOnlyText(),\n }));\n readonly amountError = depositAmountError;\n readonly codeError = computed(() => (this.code().trim() ? descriptorCodeError(this.code(), this.requireSmPrefix()) : this.copy.codeRequired));\n readonly hasInvalid = computed(() => this.type() === 'descriptor_code'\n ? !!this.codeError()\n : !!depositAmountError(this.first()) || !!depositAmountError(this.second()) || this.first() === '' || this.second() === '' || this.first() === null || this.second() === null);\n /** The cancel confirm tells the truth: the saved method stays active only when one is saved. */\n readonly cancelMessage = computed(() => this.cancelMessageText() || this.copy.cancelBase + (this.hasSavedMethod() ? this.copy.cancelKeepsActive : this.copy.cancelNoOther));\n\n async verify(): Promise<void> {\n if (this.busy()) return;\n this.touched.set(true);\n if (this.hasInvalid()) return;\n const secret = this.clientSecret();\n if (!secret) {\n this.verify$.emit(this.type() === 'descriptor_code'\n ? { descriptorCode: normalizeDescriptorCode(this.code()) }\n : { amounts: [Number(this.first()), Number(this.second())] });\n return;\n }\n const max = this.maxAttempts();\n if (max > 0 && this.failedAttempts >= max) { this.stripeError.set(this.copy.tooManyAttempts); return; }\n this.stripeBusy.set(true);\n this.stripeError.set('');\n const data = this.type() === 'descriptor_code'\n ? { descriptor_code: normalizeDescriptorCode(this.code()) }\n : { amounts: [Number(this.first()), Number(this.second())] };\n const connection = { publishableKey: this.publishableKey(), stripeAccount: this.stripeAccount() };\n const result = this.flow() === 'setup'\n ? await this.service.verifyMicrodepositsForSetup(secret, data, connection)\n : await this.service.verifyMicrodepositsForPayment(secret, data, connection);\n this.stripeBusy.set(false);\n if (result.ok) { this.verified.emit(result); return; }\n this.failedAttempts++;\n const message = result.failure?.message ?? localizeStripeMessage('Verification failed');\n const remaining = max - this.failedAttempts;\n this.stripeError.set(max > 0 && remaining > 0 ? this.labels.t(remaining === 1 ? 'stripeMicrodepositVerify.attemptsRemaining_one' : 'stripeMicrodepositVerify.attemptsRemaining_other', { message, count: remaining }) : message);\n this.verifyFailed.emit(result);\n }\n\n confirmCancel(): void {\n if (this.cancelling()) return;\n this.showCancelConfirm.set(false);\n this.cancelVerification.emit();\n }\n}\n","import type { DestroyRef, WritableSignal } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport type { Observable } from 'rxjs';\n\n/** What the account-status call answers (the shape of cremo's `GET /organizations/connect/status`). `isComplete` = Stripe accepts charges and payouts. */\nexport interface StripeConnectStatus {\n isComplete: boolean;\n detailsSubmitted?: boolean;\n /** The address of Stripe's onboarding page for an unfinished account. */\n onboardingUrl?: string;\n}\n\n/** What the create-account call answers (cremo's `POST /organizations/connect/create`): the new (or resumed) account and the address of Stripe's onboarding page. */\nexport interface StripeConnectAccount { accountId: string; onboardingUrl: string }\n\n/**\n * What happened after the user pressed a button or the page asked for the state. The flow never shows toasts itself (each app has its own): the host words\n * each outcome, and decides what follows a finished account (for example switching payment collection on).\n *\n * - `complete`: Stripe accepts the account. `source: 'check'` = after \"Check Status\"; `'resume'` = \"Complete Setup\" found it already complete; `'return'` =\n * the state was read again when the user came back to this tab (`refreshOnReturn`).\n * - `verifying`: the details were submitted and Stripe is reviewing them.\n * - `incomplete`: \"Check Status\" found an unfinished onboarding (`onboardingUrl` present).\n * - `link-unavailable`: the answer had no https Stripe address; nothing was opened.\n * - `failed`: a call failed (`action` says which); `error` is what it threw.\n */\nexport type StripeConnectOutcome =\n | { kind: 'complete'; source: 'check' | 'resume' | 'return' }\n | { kind: 'verifying'; source: 'check' | 'resume' | 'return' }\n | { kind: 'incomplete' }\n | { kind: 'link-unavailable' }\n | { kind: 'failed'; action: 'start' | 'check' | 'resume'; error: unknown };\n\n/** The state the flow reads and writes: signals owned by the host (or by the card's two-way models). */\nexport interface StripeConnectState {\n accountId: WritableSignal<string | null>;\n complete: WritableSignal<boolean>;\n detailsSubmitted: WritableSignal<boolean>;\n loading: WritableSignal<boolean>;\n}\n\nexport interface StripeConnectFlowOptions {\n /** Read at call time, so a host can swap the call. Null = no call yet (`start()` does nothing). */\n createAccount: () => (() => Observable<StripeConnectAccount>) | null;\n getStatus: () => (() => Observable<StripeConnectStatus>) | null;\n state: StripeConnectState;\n /** Where outcomes go. */\n emit: (outcome: StripeConnectOutcome) => void;\n /** The buttons and methods do nothing while this says true (a read-only user). */\n disabled?: () => boolean;\n /** How THIS tab is sent to Stripe when the browser refused the new tab (default `window.location.href = url`). */\n navigate?: (url: string) => void;\n destroyRef: DestroyRef;\n}\n\n/** Only an https address on stripe.com or a real subdomain (never `evilstripe.com` / `connect.stripe.com.evil.com`, `http:`, `javascript:`). */\nexport function isStripeUrl(url: string | undefined): url is string {\n if (!url) return false;\n try {\n const u = new URL(url);\n return u.protocol === 'https:' && (u.hostname === 'stripe.com' || u.hostname.endsWith('.stripe.com'));\n } catch { return false; }\n}\n\n/**\n * The Stripe Connect flow of cremo Settings > Payment & Billing, as a plain class: create the account, \"Check Status\", \"Complete Setup\", and the \"back from Stripe\" read.\n * `ui-stripe-connect` runs it behind its card; a host that has to start the flow from code before any view exists (Settings: the first change-detection pass with\n * `?connect=return`) creates its own instance over the same state signals. Stripe's page always opens in a NEW tab opened inside the click (a tab opened after the\n * request is blocked by popup blockers); only an https Stripe address is opened; a failed call closes the empty tab.\n */\nexport class StripeConnectFlow {\n /** A Stripe tab was opened: the card reads the state again when the user comes back (`refreshOnReturn`). */\n tabOpened = false;\n\n constructor(private readonly o: StripeConnectFlowOptions) {}\n\n private get blocked(): boolean { return this.o.state.loading() || !!this.o.disabled?.(); }\n\n /** Creates (or resumes) the account and opens Stripe's onboarding page in a new tab. */\n start(): void {\n const create = this.o.createAccount();\n if (!create || this.blocked) return;\n this.o.state.loading.set(true);\n const tab = this.openBlankTab();\n create().pipe(takeUntilDestroyed(this.o.destroyRef)).subscribe({\n next: result => {\n this.o.state.accountId.set(result.accountId);\n this.o.state.loading.set(false);\n this.openStripe(tab, result.onboardingUrl);\n },\n error: error => {\n this.closeTab(tab);\n this.o.state.loading.set(false);\n this.o.emit({ kind: 'failed', action: 'start', error });\n },\n });\n }\n\n /** \"Check Status\": reads the state; a finished or submitted account updates the card, an unfinished one is reported. */\n check(): void {\n const status = this.o.getStatus();\n if (!status || this.blocked) return;\n this.o.state.loading.set(true);\n status().pipe(takeUntilDestroyed(this.o.destroyRef)).subscribe({\n next: s => {\n this.o.state.complete.set(s.isComplete);\n this.o.state.detailsSubmitted.set(s.detailsSubmitted ?? false);\n this.o.state.loading.set(false);\n if (s.isComplete) this.o.emit({ kind: 'complete', source: 'check' });\n else if (s.detailsSubmitted) this.o.emit({ kind: 'verifying', source: 'check' });\n else if (s.onboardingUrl) this.o.emit({ kind: 'incomplete' });\n },\n error: error => { this.o.state.loading.set(false); this.o.emit({ kind: 'failed', action: 'check', error }); },\n });\n }\n\n /** \"Complete Setup\": reads the state and opens the onboarding address of an unfinished account in a new tab (a finished or submitted one just updates the card). */\n resume(): void {\n const status = this.o.getStatus();\n if (!status || this.blocked) return;\n this.o.state.loading.set(true);\n const tab = this.openBlankTab();\n status().pipe(takeUntilDestroyed(this.o.destroyRef)).subscribe({\n next: s => {\n this.o.state.loading.set(false);\n if (s.isComplete) {\n this.closeTab(tab);\n this.o.state.complete.set(true);\n this.o.emit({ kind: 'complete', source: 'resume' });\n } else if (s.detailsSubmitted) {\n this.closeTab(tab);\n this.o.state.detailsSubmitted.set(true);\n this.o.emit({ kind: 'verifying', source: 'resume' });\n } else {\n this.openStripe(tab, s.onboardingUrl);\n }\n },\n error: error => { this.closeTab(tab); this.o.state.loading.set(false); this.o.emit({ kind: 'failed', action: 'resume', error }); },\n });\n }\n\n /** The state read when the user came back to this tab: silent unless something finished or was submitted. */\n readStatusOnReturn(): void {\n const status = this.o.getStatus();\n if (!status) return;\n status().pipe(takeUntilDestroyed(this.o.destroyRef)).subscribe({\n next: s => {\n this.o.state.complete.set(s.isComplete);\n this.o.state.detailsSubmitted.set(s.detailsSubmitted ?? false);\n if (s.isComplete) this.o.emit({ kind: 'complete', source: 'return' });\n else if (s.detailsSubmitted) this.o.emit({ kind: 'verifying', source: 'return' });\n },\n error: () => { /* the user can press Check Status; a failed background read says nothing */ },\n });\n }\n\n private openStripe(tab: Window | null, url: string | undefined): void {\n if (isStripeUrl(url) && tab) {\n tab.location.href = url;\n this.tabOpened = true;\n } else if (isStripeUrl(url)) {\n this.navigateCurrentTab(url);\n } else {\n // not an https Stripe address: never navigate to it, close the empty tab and say so\n this.closeTab(tab);\n this.o.emit({ kind: 'link-unavailable' });\n }\n }\n\n /** The empty tab, opened inside the click and cut from this page (`opener`); null when the browser refused. */\n openBlankTab(): Window | null {\n const tab = window.open('about:blank', '_blank');\n if (tab) { try { tab.opener = null; } catch { /* cannot be changed: harmless */ } }\n return tab;\n }\n\n /** The browser refused the new tab: Stripe opens in this one. */\n private navigateCurrentTab(url: string): void {\n if (this.o.navigate) this.o.navigate(url);\n else window.location.href = url;\n }\n\n private closeTab(tab: Window | null): void {\n try { tab?.close(); } catch { /* already closed */ }\n }\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, Injector, ViewEncapsulation, afterNextRender, computed, effect, inject, input, model, output } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport type { Observable } from 'rxjs';\nimport { StripeConnectFlow } from './stripe-connect.flow';\nimport type { StripeConnectAccount, StripeConnectOutcome, StripeConnectStatus } from './stripe-connect.flow';\nexport type { StripeConnectAccount, StripeConnectOutcome, StripeConnectStatus } from './stripe-connect.flow';\nexport { StripeConnectFlow, isStripeUrl } from './stripe-connect.flow';\nimport { BadgeComponent, ButtonComponent, DetailCardComponent, StackComponent, TextComponent, uiText } from '@forgeroute/ui';\nimport { UiLabelsService } from '@forgeroute/ui';\n\n/**\n * The default wording of an outcome (the texts cremo Settings has always used), for apps that just want a toast: `{ variant, message }`, or null when\n * nothing should be said. `completeText` replaces the sentence of a finished account when the host has more to say about what follows.\n */\nexport function stripeConnectNotice(outcome: StripeConnectOutcome): { variant: 'success' | 'info' | 'error'; message: string } | null {\n switch (outcome.kind) {\n case 'complete':\n return { variant: 'success', message: uiText(outcome.source === 'resume' ? 'stripeStripeConnect.noticeCompleteResume' : 'stripeStripeConnect.noticeComplete') };\n case 'verifying':\n return { variant: 'success', message: uiText('stripeStripeConnect.noticeVerifying') };\n case 'incomplete':\n return { variant: 'error', message: uiText('stripeStripeConnect.noticeIncomplete') };\n case 'link-unavailable':\n return { variant: 'error', message: uiText('stripeStripeConnect.noticeLinkUnavailable') };\n case 'failed':\n return { variant: 'error', message: uiText(outcome.action === 'start' ? 'stripeStripeConnect.failedStart' : outcome.action === 'check' ? 'stripeStripeConnect.failedCheck' : 'stripeStripeConnect.failedLink') };\n }\n}\n\n/**\n * \"Stripe Connect Account\": the card where a business connects the Stripe account it collects payments into (cremo Settings > Payment & Billing, built here\n * once so every app and the setup wizard show and run the SAME flow). The host owns the data (its two calls and the three state values); the component owns\n * the screen and the flow:\n *\n * - no account yet (`accountId` empty): nothing is shown (the host has its own entry point and calls `start()`), or with `showWhenNoAccount` a card with\n * \"Set Up Payment Account\";;\n * - account, not complete, nothing submitted: warning \"Account setup incomplete\" with \"Complete Setup\" (asks the status for the onboarding address and opens it);\n * - details submitted, not complete: info \"Stripe is verifying your account\" with \"Check Status\";\n * - complete: success \"Account setup complete\" with the account id and \"View Stripe Dashboard\".\n *\n * Stripe's onboarding page always opens in a NEW tab: the empty tab is opened inside the click (a tab opened after the request is blocked by popup\n * blockers) and receives the address when it arrives; with the tab refused the address opens in the current tab. Only an https Stripe address is ever opened,\n * never one an answer made up (`javascript:`, `data:`). A failed call closes the empty tab.\n *\n * <ui-stripe-connect [(accountId)]=\"accountId\" [(complete)]=\"complete\" [(detailsSubmitted)]=\"submitted\"\n * [createAccount]=\"createAccount\" [getStatus]=\"getStatus\" [showWhenNoAccount]=\"true\" (outcome)=\"onOutcome($event)\" />\n *\n * where `createAccount = () => http.post<StripeConnectAccount>('/connect/create', {})` and `getStatus = () => http.get<StripeConnectStatus>('/connect/status')`.\n */\n@Component({\n selector: 'ui-stripe-connect',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgTemplateOutlet, BadgeComponent, ButtonComponent, DetailCardComponent, StackComponent, TextComponent],\n template: `\n <!-- Persistent live region: present before the state changes, so every new state is announced (and \"Loading\" while a request runs). -->\n <div class=\"sc-sr\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\" data-testid=\"connect-live\">{{ liveText() }}</div>\n @if (visible()) {\n @if (bare()) {\n <ng-container *ngTemplateOutlet=\"body\" />\n } @else {\n <ui-detail-card [collapsible]=\"false\" [title]=\"title()\" [headingLevel]=\"3\" data-testid=\"connect-account-card\">\n <ng-container *ngTemplateOutlet=\"body\" />\n </ui-detail-card>\n }\n }\n\n <ng-template #body>\n @if (!accountId()) {\n <ui-stack gap=\"sm\" class=\"sc-state\" tabindex=\"-1\" data-testid=\"connect-status-none\" [attr.aria-busy]=\"loading() ? 'true' : null\">\n <strong class=\"sc-title\">{{ startTitle() }}</strong>\n <ui-text size=\"sm\" [text]=\"startText()\" />\n <ui-stack direction=\"horizontal\">\n <ui-button variant=\"primary\" size=\"sm\" data-testid=\"connect-start-button\" [disabled]=\"disabled()\" (click)=\"start()\">@if (loading()) {<span aria-hidden=\"true\">{{ labels.t('common.loadingellipsis') }}</span><span class=\"sc-sr\">{{ labels.t('stripeStripeConnect.opensInNewTabBusy', { label: startLabel() }) }}</span>} @else { {{ startLabel() }}<span class=\"sc-sr\">{{ labels.t('stripeStripeConnect.opensInNewTabSr') }}</span>}</ui-button>\n </ui-stack>\n </ui-stack>\n } @else if (complete()) {\n <ui-stack gap=\"sm\" class=\"sc-state\" tabindex=\"-1\" data-testid=\"connect-status-complete\">\n <strong class=\"sc-title\">{{ labels.t('stripeStripeConnect.accountSetupComplete') }}</strong>\n <ui-text size=\"sm\" tone=\"muted\" [text]=\"labels.t('stripeConnect.accountId', { id: accountId() ?? '' })\" />\n <ui-stack direction=\"horizontal\">\n <ui-button variant=\"secondary\" size=\"sm\" data-testid=\"connect-dashboard-button\" (click)=\"openDashboard()\">{{ labels.t('stripeStripeConnect.viewStripeDashboard') }}<span class=\"sc-sr\">{{ labels.t('stripeStripeConnect.opensInNewTabSr') }}</span></ui-button>\n </ui-stack>\n </ui-stack>\n } @else if (detailsSubmitted()) {\n <ui-stack gap=\"sm\" class=\"sc-state\" tabindex=\"-1\" data-testid=\"connect-status-verifying\" [attr.aria-busy]=\"loading() ? 'true' : null\">\n <strong class=\"sc-title\">{{ labels.t('stripeStripeConnect.stripeIsVerifyingYourAccount') }}</strong>\n <ui-text size=\"sm\" [text]=\"labels.t('stripeStripeConnect.yourSetupHasBeenSubmitted')\" />\n <ui-stack direction=\"horizontal\">\n <ui-button variant=\"primary\" size=\"sm\" data-testid=\"connect-check-status-button\" [disabled]=\"disabled()\" (click)=\"check()\">@if (loading()) {<span aria-hidden=\"true\">{{ labels.t('stripeStripeConnect.checking') }}</span><span class=\"sc-sr\">{{ labels.t('stripeStripeConnect.checkStatusBusy') }}</span>} @else { {{ labels.t('stripeStripeConnect.checkStatus') }} }</ui-button>\n </ui-stack>\n </ui-stack>\n } @else {\n <ui-stack gap=\"sm\" class=\"sc-state\" tabindex=\"-1\" data-testid=\"connect-status-incomplete\" [attr.aria-busy]=\"loading() ? 'true' : null\">\n <span class=\"sc-badge\"><ui-badge [label]=\"labels.t('stripeStripeConnect.accountSetupIncomplete')\" variant=\"red\" data-testid=\"connect-incomplete-badge\" /></span>\n <ui-text size=\"sm\" [text]=\"labels.t('stripeStripeConnect.completeYourStripeAccountSetup')\" />\n <ui-stack direction=\"horizontal\">\n <ui-button variant=\"primary\" size=\"sm\" data-testid=\"connect-complete-setup-button\" [disabled]=\"disabled()\" (click)=\"resume()\">@if (loading()) {<span aria-hidden=\"true\">{{ labels.t('common.loadingellipsis') }}</span><span class=\"sc-sr\">{{ labels.t('stripeStripeConnect.completeSetupOpensInA') }}</span>} @else { {{ labels.t('stripeStripeConnect.completeSetup') }}<span class=\"sc-sr\">{{ labels.t('stripeStripeConnect.opensInNewTabSr') }}</span>}</ui-button>\n </ui-stack>\n </ui-stack>\n }\n </ng-template>\n `,\n styles: [`ui-stripe-connect { display: block; min-width: 0; } ui-stripe-connect .sc-badge { display: flex; } ui-stripe-connect .sc-title { font-size: 0.9375rem; font-weight: 600; color: #1e293b; } ui-stripe-connect .sc-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }`],\n encapsulation: ViewEncapsulation.None,\n})\nexport class StripeConnectComponent {\n protected readonly labels = inject(UiLabelsService);\n private readonly destroyRef = inject(DestroyRef);\n private readonly injector = inject(Injector);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /** The call that creates the organization's Stripe account (or resumes it) and answers its id and the onboarding address. Needed for `start()`. */\n readonly createAccount = input<(() => Observable<StripeConnectAccount>) | null>(null);\n /** The call that reads the account's state. Needed for `check()`, `resume()` and `refreshOnReturn`. */\n readonly getStatus = input<(() => Observable<StripeConnectStatus>) | null>(null);\n\n /** The Stripe account's id (null / empty = no account yet). Two-way: the component sets it when `start()` created the account. */\n readonly accountId = model<string | null>(null);\n /** Stripe accepts the account (charges and payouts on). Two-way: set by `check()` / `resume()`. */\n readonly complete = model(false);\n /** The details were submitted and Stripe is reviewing them. Two-way: set by `check()` / `resume()`. */\n readonly detailsSubmitted = model(false);\n\n readonly titleInput = input<string | null>(null, { alias: 'title' });\n\n readonly title = computed(() => this.titleInput() ?? this.labels.t('stripeStripeConnect.title'));\n /** No card around the content: the text and the button sit directly in the host's own card (the setup wizard's step card). `title` is not shown then. */\n readonly bare = input(false);\n /** Shows the card (with \"Set Up Payment Account\") while there is no account yet. Default false: hosts with their own entry point show nothing and call `start()`. */\n readonly showWhenNoAccount = input(false);\n readonly startTitleInput = input<string | null>(null, { alias: 'startTitle' });\n readonly startTitle = computed(() => this.startTitleInput() ?? this.labels.t('stripeStripeConnect.startTitle'));\n readonly startTextInput = input<string | null>(null, { alias: 'startText' });\n readonly startText = computed(() => this.startTextInput() ?? this.labels.t('stripeStripeConnect.startText'));\n readonly startLabelInput = input<string | null>(null, { alias: 'startLabel' });\n readonly startLabel = computed(() => this.startLabelInput() ?? this.labels.t('stripeStripeConnect.startLabel'));\n /** The buttons cannot be pressed (a read-only user). */\n readonly disabled = input(false);\n /** After a Stripe tab was opened, the state is read again when this tab becomes visible again (the user came back): `(outcome)` then reports `complete` / `verifying` with source `return`. */\n readonly refreshOnReturn = input(false);\n /** The page \"View Stripe Dashboard\" opens. */\n readonly dashboardUrl = input('https://dashboard.stripe.com');\n\n /** What happened (see {@link StripeConnectOutcome}); the host words it. */\n readonly outcome = output<StripeConnectOutcome>();\n\n /** A request is running: the buttons show \"Loading...\" / \"Checking...\" and cannot be pressed again. Two-way, so a host that shows the state elsewhere can read it. */\n readonly loading = model(false);\n /** How the current tab is sent to Stripe when the browser refused the new tab (default: `window.location.href = url`); a host can route it through its own method. */\n readonly navigateTab = input<((url: string) => void) | null>(null);\n protected readonly visible = computed(() => !!this.accountId() || this.showWhenNoAccount());\n /** Which screen the card shows. */\n protected readonly state = computed((): 'none' | 'complete' | 'verifying' | 'incomplete' =>\n !this.accountId() ? 'none' : this.complete() ? 'complete' : this.detailsSubmitted() ? 'verifying' : 'incomplete');\n /** What the persistent status region says: the current state, plus \"Loading.\" while a request runs. Empty while nothing is shown. */\n protected readonly liveText = computed(() => {\n if (!this.visible()) return '';\n const text = this.labels.t(({ none: 'stripeStripeConnect.liveNone', incomplete: 'stripeStripeConnect.liveIncomplete', verifying: 'stripeStripeConnect.liveVerifying', complete: 'stripeStripeConnect.liveComplete' } as const)[this.state()]);\n return this.loading() ? this.labels.t('stripeStripeConnect.liveLoading', { text }) : text;\n });\n /** The user pressed a button that started a request: when the screen then changes, focus moves to the new screen (the pressed button is gone). */\n private acted = false;\n private lastState = this.state();\n private readonly flow = new StripeConnectFlow({\n createAccount: () => this.createAccount(),\n getStatus: () => this.getStatus(),\n state: { accountId: this.accountId, complete: this.complete, detailsSubmitted: this.detailsSubmitted, loading: this.loading },\n emit: outcome => this.outcome.emit(outcome),\n disabled: () => this.disabled(),\n navigate: url => this.navigateCurrentTab(url),\n destroyRef: this.destroyRef,\n });\n\n constructor() {\n effect(() => {\n const state = this.state();\n if (this.loading()) return;\n const changed = state !== this.lastState;\n this.lastState = state;\n const focusIt = changed && this.acted && this.visible();\n this.acted = false;\n if (focusIt) afterNextRender(() => this.host.nativeElement.querySelector<HTMLElement>('.sc-state')?.focus(), { injector: this.injector });\n });\n if (typeof document !== 'undefined') {\n const onVisible = () => {\n if (document.visibilityState !== 'visible' || !this.flow.tabOpened || !this.refreshOnReturn() || this.loading()) return;\n this.flow.tabOpened = false;\n this.flow.readStatusOnReturn();\n };\n document.addEventListener('visibilitychange', onVisible);\n this.destroyRef.onDestroy(() => document.removeEventListener('visibilitychange', onVisible));\n }\n }\n\n /** Creates (or resumes) the account and opens Stripe's onboarding page in a new tab. */\n start(): void { const run = this.canRun(this.createAccount()); this.flow.start(); this.acted ||= run; }\n\n /** \"Check Status\": reads the state; a finished or submitted account updates the card, an unfinished one is reported. */\n check(): void { const run = this.canRun(this.getStatus()); this.flow.check(); this.acted ||= run; }\n\n /** \"Complete Setup\": reads the state and opens the onboarding address of an unfinished account in a new tab. */\n resume(): void { const run = this.canRun(this.getStatus()); this.flow.resume(); this.acted ||= run; }\n\n /** The flow will really send a request (the host gave the call, nothing is running, the card is not read-only). */\n private canRun(call: unknown): boolean { return !!call && !this.loading() && !this.disabled(); }\n\n /** Opens the Stripe dashboard in a new tab. */\n openDashboard(): void {\n window.open(this.dashboardUrl(), '_blank', 'noopener,noreferrer');\n }\n\n /** The browser refused the new tab: Stripe opens in this one (through the host's `navigateTab` when it gave one). */\n protected navigateCurrentTab(url: string): void {\n const navigate = this.navigateTab();\n if (navigate) navigate(url);\n else window.location.href = url;\n }\n}\n","import type { PaymentAllocation } from '@forgeroute/ui';\nimport { uiText } from '@forgeroute/ui';\nimport type { StripeCardFunding } from '../stripe-payment/stripe-outcomes';\n\n/** What the host's `createIntent` receives: the entered payment and how it is applied to charges. */\nexport interface StripeIntentContext extends PaymentAllocation {\n /** The amount the payer owes (before processing fees), in major units (12.5 = $12.50). */\n amount: number;\n /** The method value that was selected (`'CARD'` / `'ACH'`). */\n paymentMethod: string;\n /** Stripe's name of it: `'card'` or `'us_bank_account'`. */\n paymentMethodType: 'card' | 'us_bank_account';\n receivedDate: string;\n notes: string | null;\n /** Only with `[fundingPreview]=\"true\"` on the plugin and a card: the ConfirmationToken (`ctoken_...`) created from the typed card, so the backend can read the card funding from Stripe before it creates the intent. */\n confirmationTokenId?: string | null;\n /** Only with `[fundingPreview]=\"true\"` and a card: Stripe's funding of the typed card (display only; a backend that charges by it reads it from the token). */\n funding?: StripeCardFunding | null;\n /**\n * Only with `[duplicateProtection]=\"true\"` on the plugin: the key of this PAYMENT ATTEMPT (stable across retries after a timeout / offline loss, a reload and a second tab; renewed only after\n * a definitive failure or success). Send it to your backend, which creates the PaymentIntent with it as Stripe's `Idempotency-Key` and answers `checkStatus(attemptKey)` with it.\n */\n attemptKey?: string;\n /** Only with `[duplicateProtection]=\"true\"`: the payable of this attempt (`payableRef` at the click): the backend allows ONE open or succeeded attempt per payable and answers 409 `payment_in_flight` to a second key. */\n payableRef?: string | null;\n}\n\n/** What the host's `createIntent` answers. Fees are optional; when given they are shown as rows under the form. */\nexport interface StripeIntentInfo {\n clientSecret: string;\n paymentIntentId: string;\n stripeFee?: number;\n platformFee?: number;\n totalAmount?: number;\n /** Connect account of a direct charge (passed back to `finalize` / `cancel`). `[stripeAccount]` of the plugin must already be this account: Stripe.js is loaded for it before the form shows. */\n stripeAccountId?: string | null;\n /** Shown after \"Processing fee\" / \"Platform fee\", e.g. `'2.9% + $0.30'`. */\n stripeFeeLabel?: string;\n platformFeeLabel?: string;\n}\n\n/** The fees of a payment, shown before the payer pays (the host's `estimateFees`) or after the intent exists. */\nexport interface StripeFees {\n stripeFee?: number;\n platformFee?: number;\n /** What the payer is charged (amount + fees). The Payment Element is created with this amount, so it MUST equal the intent's amount. */\n totalAmount?: number;\n stripeFeeLabel?: string;\n platformFeeLabel?: string;\n}\n\nexport interface StripeFeeContext {\n amount: number;\n paymentMethod: string;\n paymentMethodType: 'card' | 'us_bank_account';\n /**\n * Only with `[fundingPreview]=\"true\"` on the plugin: the funding of the typed card once the card form is complete (`'credit'`, `'debit'`, `'prepaid'`, `'unknown'`), `null` while it is\n * not known (no card yet, a bank account). A credit-only fee schedule answers the credit fee while it is `null` or `'credit'` and no platform fee for `'debit'` / ACH.\n */\n funding?: StripeCardFunding | null;\n /** Only with `[fundingPreview]=\"true\"` once the card is complete: the ConfirmationToken of the typed card, for a backend-side funding lookup in `estimateFees`. */\n confirmationTokenId?: string | null;\n}\n\nexport const STRIPE_PAYMENT_METHODS = [\n { value: 'CARD', label: 'Card' },\n { value: 'ACH', label: 'ACH / Bank Transfer' },\n] as const;\n\n/** The name of a method in the app's active language. */\nexport const stripeMethodLabel = (value: string, english: string): string =>\n value === 'CARD' ? uiText('stripePaymentMethod.methodCard') : value === 'ACH' ? uiText('stripePaymentMethod.methodAch') : english;\n\nexport const stripeMethodType = (method: string): 'card' | 'us_bank_account' => (method === 'ACH' ? 'us_bank_account' : 'card');\n\n/** The texts of the Stripe payment method; read on every access, so they follow the app's active language. */\nexport const STRIPE_METHOD_TEXTS = {\n get amountNeeded() { return uiText('stripePaymentMethod.amountNeeded'); },\n get notCompleted() { return uiText('stripePaymentMethod.notCompleted'); },\n get achTitle() { return uiText('stripePaymentMethod.achTitle'); },\n achMessage: (amount: string) => uiText('stripePaymentMethod.achMessage', { amount }),\n get verificationTitle() { return uiText('stripePaymentMethod.verificationTitle'); },\n verificationMessage: (amount: string) => uiText('stripePaymentMethod.verificationMessage', { amount }),\n get receiptNote() { return uiText('stripePaymentMethod.receiptNote'); },\n};\n","import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, Injector, ViewEncapsulation, afterNextRender, computed, effect, inject, input, signal, untracked, viewChild } from '@angular/core';\nimport { AlertComponent, ButtonComponent, HintComponent, KpiCardComponent, callHost, formatCurrency, refusalLabelKey, wasQueuedOffline, warnQueuedPayment, type PaymentAttemptControls, type PaymentAttemptOutcome, type PaymentMethodContext } from '@forgeroute/ui';\nimport { StripePaymentComponent, type StripeBillingDetails, type StripeDeferredIntent } from '../stripe-payment/stripe-payment.component';\nimport type { StripeCardFunding, StripeConfirmationTokenEvent, StripeConfirmedEvent, StripeElementChange, StripeFailure } from '../stripe-payment/stripe-outcomes';\nimport type { StripePaymentMethodComponent } from './payment-stripe-method.component';\nimport { STRIPE_METHOD_TEXTS, stripeMethodType, type StripeFees, type StripeIntentInfo } from './payment-stripe-method.models';\nimport { UiLabelsService } from '@forgeroute/ui';\n\nconst WALLETS = { applePay: 'never', googlePay: 'never' };\nconst FIELDS = { billingDetails: { address: { country: 'auto', postalCode: 'auto' } } };\n\n/** The body `ui-payment-stripe-method` hands to the panel: the Payment Element, the fee rows and the whole Stripe flow, talking to the panel through `ctx`. */\n@Component({\n selector: 'ui-payment-stripe-body',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [AlertComponent, ButtonComponent, HintComponent, KpiCardComponent, StripePaymentComponent],\n template: `\n <div class=\"psm\">\n @if (confirmation(); as notice) {\n <ui-alert variant=\"success\" [title]=\"notice.title\" tabindex=\"-1\" class=\"psm-notice\" data-testid=\"stripe-method-confirmation\">\n <p>{{ notice.message }}</p>\n <p>{{ receiptNote() }}</p>\n </ui-alert>\n } @else {\n @if (ctx().amount == null) {\n <ui-hint data-testid=\"stripe-method-amount-needed\">{{ texts.amountNeeded }}</ui-hint>\n }\n @if (estimateError()) {\n <div class=\"psm-error\">\n <ui-alert variant=\"warning\" data-testid=\"stripe-method-estimate-error\">{{ estimateError() }}\n <ui-button variant=\"secondary\" size=\"sm\" data-testid=\"stripe-method-estimate-retry\" (click)=\"retryEstimate()\">{{ labels.t('common.tryAgain') }}</ui-button>\n </ui-alert>\n </div>\n }\n @if (lastAmount() != null) {\n <ui-stripe-payment #payment mode=\"payment\" [publishableKey]=\"config().publishableKey()\" [stripeAccount]=\"config().stripeAccount()\" [deferred]=\"deferred()\"\n [createIntent]=\"createIntentFn\" [paymentMethodTypes]=\"[methodType()]\" [showSubmit]=\"false\" [showErrors]=\"false\" [autoHandleCardAction]=\"true\" [collectConfirmationToken]=\"config().fundingPreview()\"\n [duplicateProtection]=\"config().duplicateProtection()\" [attemptAmount]=\"ctx().amount\" [attemptMethod]=\"ctx().method\" [payableRef]=\"config().payableRef()\" [attemptKey]=\"config().attemptKey()\" [checkStatus]=\"config().checkStatus()\" [paid]=\"config().paid()\" [hostPending]=\"config().hostPending()\"\n [statusPollMs]=\"config().statusPollMs()\" [statusPollMaxMs]=\"config().statusPollMaxMs()\" [statusCheckTimeoutMs]=\"config().statusCheckTimeoutMs()\" [statusFailGraceMs]=\"config().statusFailGraceMs()\" [authTimeoutMs]=\"config().authTimeoutMs()\" [allowStartOver]=\"config().allowStartOver()\" [offlineOverride]=\"config().offlineOverride()\" [confirmTimeoutMs]=\"config().confirmTimeoutMs()\"\n [readinessCheck]=\"config().readinessCheck()\" [readinessTimeoutMs]=\"config().readinessTimeoutMs()\" [readinessEveryMs]=\"config().readinessEveryMs()\" (outcome)=\"onAttemptOutcome($event)\"\n [wallets]=\"wallets\" [fields]=\"fields\" [defaultValues]=\"defaultValues()\" [appearance]=\"$any(config().appearance())\" [appearanceFromTokens]=\"true\" [label]=\"labels.t('stripePaymentStripeMethod.paymentDetails')\"\n (ready)=\"onReady()\" (elementChange)=\"onElementChange($event)\" (failed)=\"onFailed($event)\" (loadError)=\"onFailed($event)\" />\n @if (totalCard(); as card) {\n <ui-kpi-card class=\"psm-total\" data-testid=\"stripe-method-total\" [label]=\"labels.t('stripePaymentStripeMethod.totalCharged')\" [value]=\"card.value\" [subtitle]=\"card.subtitle\" icon=\"dollar\" color=\"blue\" valueColor=\"blue\" />\n }\n @if (feeRows().length) {\n <dl class=\"psm-fees\" data-testid=\"stripe-method-fees\" [attr.aria-label]=\"labels.t('stripePaymentStripeMethod.paymentTotal')\">\n @for (row of feeRows(); track row.key) {\n <div class=\"psm-fee\" [attr.data-testid]=\"'stripe-fee-' + row.key\"><dt>{{ row.label }}</dt><dd>{{ row.value }}</dd></div>\n }\n </dl>\n }\n @if (error()) { <div class=\"psm-error\"><ui-alert variant=\"danger\" data-testid=\"stripe-method-error\">{{ error() }}</ui-alert></div> }\n }\n }\n </div>\n `,\n styles: [`\n ui-payment-stripe-body { display: block; min-width: 0; }\n ui-payment-stripe-body .psm-error { margin-top: 12px; }\n ui-payment-stripe-body .psm-total { display: block; margin-top: 16px; }\n ui-payment-stripe-body .psm-fees { margin: 16px 0 0; padding: 14px 16px; border: 1px solid var(--ui-psp-border, #e2e8f0); border-radius: 10px; font-size: 0.8125rem; }\n ui-payment-stripe-body .psm-fee { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; color: var(--ui-psp-muted, #475569); }\n ui-payment-stripe-body .psm-fee dt, ui-payment-stripe-body .psm-fee dd { margin: 0; }\n ui-payment-stripe-body .psm-notice:focus { outline: none; }\n ui-payment-stripe-body .psm-notice p { margin: 0 0 6px; }\n `],\n})\nexport class PaymentStripeBodyComponent {\n protected readonly labels = inject(UiLabelsService);\n private readonly injector = inject(Injector);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n readonly ctx = input.required<PaymentMethodContext>();\n readonly config = input.required<StripePaymentMethodComponent>();\n private readonly payment = viewChild(StripePaymentComponent);\n\n protected readonly texts = STRIPE_METHOD_TEXTS;\n protected readonly wallets = WALLETS;\n protected readonly fields = FIELDS;\n\n readonly complete = signal(false);\n readonly processing = signal(false);\n /** What the attempt was STARTED with (pinned at the click). */\n private payAmount: number | null = null;\n /** The attempt's outcome is unknown right now (kept here, not read from the form: the form is already gone when the panel closes). */\n private attemptUnknown = false;\n private payMethod: string | null = null;\n /** What the payment that was RECORDED was made with (a late answer of an older attempt is recorded with its own amount and method). */\n private doneAmount: number | null = null;\n /** The amount and the panel's method of every attempt of this panel, by attempt key: a late answer of an OLDER attempt is recorded with its own (the form's outcome carries the Stripe type, not the panel's method). */\n private readonly attempts = new Map<string, { amount: number; method: string }>();\n private doneMethod: string | null = null;\n /** The payment was accepted (the panel was told, or the notice is up): Pay stays off even if the host keeps the panel open. */\n readonly done = signal(false);\n readonly error = signal('');\n /** Fees from the host's estimate (before the payer pays); they decide the amount of the Payment Element. */\n readonly estimate = signal<StripeFees | null>(null);\n private readonly estimating = signal(false);\n protected readonly estimateError = signal('');\n private readonly estimateTick = signal(0);\n /** Fees the host answered when it created the intent. */\n private readonly intentFees = signal<StripeFees | null>(null);\n protected readonly confirmation = signal<{ title: string; message: string } | null>(null);\n /** The last valid amount: the Payment Element stays mounted (and keeps the typed card data) while the amount is briefly empty or invalid. */\n protected readonly lastAmount = signal<number | null>(null);\n private intent: StripeIntentInfo | null = null;\n private estimateRun = 0;\n /**\n * `fundingPreview`: the funding of the complete typed card; `null` while the card is incomplete / not a card. Only the FUNDING is reactive (a primitive, so setting the same value\n * again notifies nobody): the estimate effect runs once per funding change, not once per token. The id of the token that produced it is kept in `previewTokenId`.\n */\n private readonly previewFunding = signal<StripeCardFunding | null>(null);\n /** The id of the latest ConfirmationToken of the complete typed card (read when the estimate is asked); not reactive on purpose. */\n private previewTokenId: string | null = null;\n private previewRun = 0;\n /** `fundingPreview` only: a complete card changed and its token (and so its funding and the fee rows / total) is not known yet: Pay stays off, the rows on screen belong to the previous card. */\n private readonly previewPending = signal(false);\n private previewTimer: ReturnType<typeof setTimeout> | null = null;\n /** An estimate answer was dropped because a payment was being confirmed: ask again when that ends (else Pay would be free for the base amount). */\n private estimateStale = false;\n\n private readonly amountValue = computed(() => this.ctx().amount);\n private readonly methodValue = computed(() => this.ctx().method);\n protected readonly methodType = computed(() => stripeMethodType(this.ctx().method));\n private readonly total = computed(() => this.estimate()?.totalAmount ?? this.lastAmount() ?? 0);\n protected readonly receiptNote = computed(() => this.config().receiptNote());\n protected readonly deferred = computed((): StripeDeferredIntent => ({ mode: 'payment', amount: Math.round(this.total() * 100), currency: this.ctx().currency.toLowerCase() }));\n protected readonly defaultValues = computed(() => {\n const b: StripeBillingDetails | null = this.config().billingDetails();\n return b ? { billingDetails: b } : null;\n });\n protected readonly feeRows = computed(() => {\n const fees = this.intentFees() ?? this.estimate();\n const amount = this.lastAmount();\n if (!fees || amount == null || (fees.stripeFee === undefined && fees.platformFee === undefined)) return [];\n const money = (n: number) => formatCurrency(n, { currency: this.ctx().currency });\n const rows: { key: string; label: string; value: string }[] = [{ key: 'amount', label: this.labels.t('stripePaymentMethod.paymentAmount'), value: money(amount) }];\n if (fees.stripeFee !== undefined) rows.push({ key: 'processing', label: `${this.labels.t('stripePaymentMethod.processingFee')}${fees.stripeFeeLabel ? ` (${fees.stripeFeeLabel})` : ''}`, value: money(fees.stripeFee) });\n if (fees.platformFee !== undefined) rows.push({ key: 'platform', label: `${this.labels.t('stripePaymentMethod.platformFee')}${fees.platformFeeLabel ? ` (${fees.platformFeeLabel})` : ''}`, value: money(fees.platformFee) });\n return rows;\n });\n /** The headline figure: what the payer is charged, once fees are known. */\n protected readonly totalCard = computed(() => {\n const fees = this.intentFees() ?? this.estimate();\n if (!fees || this.lastAmount() == null || fees.totalAmount === undefined) return null;\n return { value: formatCurrency(fees.totalAmount, { currency: this.ctx().currency }), subtitle: this.labels.t('stripePaymentMethod.amountPlusFees') };\n });\n\n /** Bound as `[createIntent]` of ui-stripe-payment: called on Pay with the deferred form. */\n protected readonly createIntentFn = async (context?: { mode: 'payment' | 'setup'; confirmationToken?: StripeConfirmationTokenEvent | null; attemptKey?: string; payableRef?: string | null }): Promise<string> => {\n const create = this.config().createIntent();\n const ctx = this.ctx();\n if (!create || ctx.amount == null) throw new Error(this.labels.t('stripePayment.msg.cardsUnavailable'));\n this.cancelIntent(true); // a previous attempt that failed leaves an intent behind: cancel it even though a payment is \"processing\" now\n // The amount and method of THIS attempt are the PINNED ones (the click that started it), never what the amount field says by the time the intent is created.\n const attempt = this.payment()?.attempt;\n const amount: number = attempt?.pinnedAmount() ?? ctx.amount;\n const method: string = attempt?.pinnedMethod() ?? ctx.method;\n if (context?.attemptKey) this.attempts.set(context.attemptKey, { amount, method });\n const info = await callHost(() => create({\n amount, paymentMethod: method, paymentMethodType: this.methodType(), receivedDate: ctx.receivedDate, notes: ctx.note || null, ...ctx.allocation,\n ...(context?.confirmationToken ? { confirmationTokenId: context.confirmationToken.id, funding: context.confirmationToken.funding } : {}),\n ...(context?.attemptKey ? { attemptKey: context.attemptKey } : {}),\n ...(context?.attemptKey && context.payableRef !== undefined ? { payableRef: context.payableRef } : {}),\n }));\n if (wasQueuedOffline(info)) { warnQueuedPayment(); throw new Error(this.labels.t('paymentAttempt.queuedOffline')); } // the offline layer QUEUED the request (a synthetic 202): no intent exists, the payer may try again\n if (!info?.clientSecret) throw new Error(this.labels.t('stripePayment.msg.initFailed'));\n this.intent = info;\n this.intentFees.set({ stripeFee: info.stripeFee, platformFee: info.platformFee, totalAmount: info.totalAmount, stripeFeeLabel: info.stripeFeeLabel, platformFeeLabel: info.platformFeeLabel });\n return info.clientSecret;\n };\n\n constructor() {\n effect(() => { const amount = this.amountValue(); if (amount != null) untracked(() => this.lastAmount.set(amount)); });\n // The panel's footer button for this method.\n effect(() => {\n const ctx = this.ctx();\n const processing = this.processing();\n const notice = this.confirmation();\n const complete = this.complete();\n const estimating = this.estimating();\n const done = this.done();\n const estimateFailed = !!this.estimateError();\n const previewPending = this.previewPending();\n const protectedOff = !!this.payment()?.duplicateProtection() && (this.payment()!.attempt.unknown() || this.payment()!.attempt.paidLocked() || !this.payment()!.readiness.ready());\n const label = notice ? this.labels.t('common.done') : ctx.amount != null ? `${this.labels.t('stripePayment.pay')} ${formatCurrency(this.total(), { currency: ctx.currency })}` : this.labels.t('stripePayment.pay');\n untracked(() => ctx.setPrimary({\n label, loading: processing && !notice,\n disabled: notice ? done : !complete || processing || estimating || previewPending || estimateFailed || ctx.amount == null || done || protectedOff,\n onClick: () => (notice ? this.finish() : void this.pay()),\n }));\n });\n // Estimated fees, debounced; they change the amount the Payment Element is created with.\n effect((onCleanup) => {\n const estimate = this.config().estimateFees();\n const amount = this.amountValue();\n const method = this.methodValue();\n const funding = this.previewFunding();\n this.estimateTick();\n const run = ++this.estimateRun; // any change makes an answer that is still on its way stale\n untracked(() => { this.estimate.set(null); this.intentFees.set(null); this.estimateError.set(''); });\n if (!estimate || amount == null) { untracked(() => this.estimating.set(false)); return; }\n untracked(() => this.estimating.set(true));\n let hung: ReturnType<typeof setTimeout> | null = null;\n const failure = this.labels.t('stripePayment.msg.feesFailed');\n const timer = setTimeout(async () => {\n // A hung estimate must not block the user forever: after the timeout \"Try again\" is offered, and Pay stays off (the form\n // would be created for the wrong amount). A late answer still recovers.\n hung = setTimeout(() => {\n if (run !== this.estimateRun) return;\n this.estimating.set(false);\n this.estimateError.set(failure);\n }, Math.max(1, this.config().estimateTimeoutMs()));\n let fees: StripeFees | null = null;\n try {\n fees = (await callHost(() => estimate({\n amount, paymentMethod: method, paymentMethodType: stripeMethodType(method),\n ...(this.config().fundingPreview() ? { funding, confirmationTokenId: funding === null ? null : this.previewTokenId } : {}),\n }))) ?? null;\n } catch { fees = null; }\n if (hung) { clearTimeout(hung); hung = null; }\n if (run !== this.estimateRun) return;\n this.estimating.set(false);\n if (this.processing()) { this.estimateStale = true; return; } // a payment is being confirmed: the form must not change under it; asked again when it ends\n if (fees) { this.estimate.set(fees); this.estimateError.set(''); }\n else { this.estimate.set(null); this.estimateError.set(this.config().feesRequired() ? failure : ''); }\n }, 300);\n onCleanup(() => { clearTimeout(timer); if (hung) clearTimeout(hung); });\n });\n effect(() => {\n if (this.processing()) return;\n untracked(() => {\n if (!this.estimateStale) return;\n this.estimateStale = false;\n // After a success (or while the notice shows) the fees on screen belong to the payment that was taken: keep them.\n if (!this.done() && !this.confirmation()) this.estimateTick.update(n => n + 1);\n });\n });\n // A new form is built for another method: it is not complete until Stripe says so.\n effect(() => { this.methodValue(); untracked(() => { this.complete.set(false); this.error.set(''); this.cancelPreview(); }); });\n // The panel tells us when it is closing or the method changes before this body is removed: an unfinished intent is cancelled,\n // and an accepted payment whose notice is still up is reported as recorded (finalize already ran).\n effect(() => { const ctx = this.ctx(); untracked(() => ctx.onCancel(() => (this.confirmation() ? this.finish() : this.cancelIntent()))); });\n inject(DestroyRef).onDestroy(() => { this.estimateRun++; this.cancelPreview(); this.cancelIntent(); });\n // The host resolves an undecided attempt through the plugin component (markSucceeded / markFailed / markNotCharged / markUnknown), without a status check.\n const controls: PaymentAttemptControls = {\n markUnknown: () => this.payment()?.markUnknown(),\n markSucceeded: () => this.payment()?.markSucceeded(),\n markFailed: () => this.payment()?.markFailed(),\n resetPaid: () => { this.payment()?.resetPaid(); this.done.set(false); this.confirmation.set(null); this.error.set(''); this.ctx().setExclusive(false); },\n markNotCharged: () => { this.payment()?.markNotCharged(); this.processing.set(false); this.ctx().setBusy(false); },\n };\n effect(() => { const config = this.config(); untracked(() => config.attachControls(controls)); });\n inject(DestroyRef).onDestroy(() => this.config().detachControls(controls));\n }\n\n /** Every change of the Payment Element: completeness for Pay, and (only with `fundingPreview`) the card funding preview. */\n protected onElementChange(change: StripeElementChange): void {\n this.complete.set(change.complete);\n if (!this.config().fundingPreview() || !this.config().estimateFees() || this.methodType() !== 'card') return;\n this.stopPreviewTimer();\n const run = ++this.previewRun;\n if (!change.complete) { this.previewTokenId = null; this.previewFunding.set(null); this.previewPending.set(false); return; } // the card was edited: its funding is unknown again\n this.previewPending.set(true);\n this.previewTimer = setTimeout(() => void this.runPreview(run), 400);\n }\n\n private async runPreview(run: number): Promise<void> {\n this.previewTimer = null;\n const payment = this.payment();\n if (!payment || this.processing() || this.done() || run !== this.previewRun) { if (run === this.previewRun) this.previewPending.set(false); return; }\n const made = await payment.createConfirmationToken();\n if (run !== this.previewRun) return; // a newer change owns the pending flag\n if (!made || !('id' in made) || made.paymentMethodType !== 'card') {\n // No token for THIS card: its funding is unknown (never the previous card's): the estimate is asked again with funding null, then Pay is released.\n this.previewTokenId = null;\n this.previewFunding.set(null);\n this.previewPending.set(false);\n return;\n }\n // A new token for a card of the same funding must not ask for the estimate again (Pay would flicker and the effect would loop on its own answers).\n this.previewTokenId = made.id;\n this.previewFunding.set(made.funding);\n this.previewPending.set(false);\n }\n\n private stopPreviewTimer(): void { if (this.previewTimer) { clearTimeout(this.previewTimer); this.previewTimer = null; } }\n\n private cancelPreview(): void { this.stopPreviewTimer(); this.previewRun++; this.previewTokenId = null; this.previewFunding.set(null); this.previewPending.set(false); }\n\n protected retryEstimate(): void { this.estimateTick.update(n => n + 1); }\n\n protected onReady(): void {\n this.complete.set(false);\n this.ctx().announce(this.labels.t('stripePaymentMethod.announceReady'));\n }\n\n protected onFailed(failure: StripeFailure): void {\n this.error.set(failure.message); // shown in a role=alert ui-alert: that is the announcement\n this.processing.set(false);\n this.ctx().report('failed', { message: failure.message });\n }\n\n /** The inner form's attempt resolved OUTSIDE the click (only with `duplicateProtection`): unknown -> reported and kept locked; a status check that says paid completes the payment. */\n protected onAttemptOutcome(outcome: PaymentAttemptOutcome): void {\n const ctx = this.ctx();\n const duplicate = outcome.kind === 'unknown' && outcome.reason === 'duplicate_suspected';\n if (outcome.kind === 'unknown' && !duplicate) this.attemptUnknown = true; // a suspected duplicate is a report about ANOTHER (second) payment: this attempt's lock and intent are not touched\n else if (outcome.kind === 'succeeded' || outcome.kind === 'failed') this.attemptUnknown = false;\n if (duplicate) {\n const message = this.labels.t('paymentAttempt.duplicate');\n this.error.set(message);\n ctx.report('duplicate_suspected', { message, attemptKey: outcome.attemptKey });\n ctx.announce(message);\n } else if (outcome.kind === 'unknown') {\n this.payAmount = this.payment()?.attempt.pinnedAmount() ?? this.payAmount; // the amount and method of the attempt that is UNKNOWN (an adopted one included), never a stale earlier one\n this.payMethod = this.payment()?.attempt.pinnedMethod() ?? this.payMethod;\n const message = this.labels.t(outcome.reason === 'offline' ? 'paymentAttempt.offlineInFlight' : outcome.reason === 'auth_abandoned' ? 'paymentAttempt.authAbandoned' : outcome.reason === 'timeout' ? 'paymentAttempt.timeout' : 'paymentAttempt.checking');\n ctx.report('unknown', { message });\n ctx.announce(message);\n } else if (outcome.kind === 'refused') {\n ctx.report('refused', { message: this.labels.t(refusalLabelKey(outcome.reason ?? '')) });\n } else if (outcome.kind === 'succeeded' && outcome.reason === 'other_tab') {\n // Another tab / page load paid this payable: this form only shows the paid lock. Nothing is recorded here (no `paid`, no `complete`): no money moved through THIS form and the amount typed here is not what was paid.\n // A host that wants to reconcile reads the paid attempt's key, amount and method from the report (and from the form's own `(outcome)`).\n ctx.report('paid_elsewhere', { message: this.labels.t('paymentAttempt.paid'), attemptKey: outcome.attemptKey, ...(outcome.method !== undefined ? { paid: { amount: outcome.amount ?? null, method: outcome.method } } : {}) });\n } else if (outcome.kind === 'succeeded' && !this.done() && (outcome.reason === 'status_check' || outcome.reason === 'host' || !this.processing() || this.isOlderAttempt(outcome.attemptKey))) {\n // A status check or the host settled it, or the confirmation answered LATE (after a timeout, when `pay()` has already returned, or while a NEWER attempt runs): the payment is recorded exactly once here,\n // with the amount and method of THAT attempt (the outcome carries them for a late answer).\n void this.completeAfterCheck(ctx, this.isOlderAttempt(outcome.attemptKey), outcome);\n } else if (outcome.kind === 'failed' && (outcome.reason === 'status_check' || outcome.reason === 'host')) {\n const message = this.labels.t('paymentAttempt.failedAfterCheck');\n this.error.set(message);\n ctx.report('failed', { message });\n this.cancelIntent(true);\n ctx.setBusy(false);\n }\n }\n\n /** Is `key` an attempt OLDER than the one running now (its answer came late, after the host unlocked it and a newer attempt began)? */\n private isOlderAttempt(key: string): boolean {\n const attempt = this.payment()?.attempt;\n return !!attempt && attempt.inFlight() && attempt.key() !== key;\n }\n\n /**\n * A status check found the payment paid after an unknown outcome: the host records it exactly as after a normal confirmation. For an OLDER attempt (its answer came while a newer one runs) the intent\n * and `finalize` belong to the NEWER attempt and are left alone: the host's webhook reconciles the older payment, which it knows by its attempt key.\n */\n private async completeAfterCheck(ctx: PaymentMethodContext, older = false, outcome?: PaymentAttemptOutcome): Promise<void> {\n if (this.done()) return;\n this.done.set(true); // synchronously, BEFORE any await: a second outcome (status check and host report at once) can never report `paid` twice\n const info = older ? null : this.intent;\n if (!older) this.intent = null;\n let finalizeFailed = false;\n const finalize = this.config().finalize();\n if (finalize && info) { try { await callHost(() => finalize(info)); } catch { finalizeFailed = true; } }\n const known = outcome ? this.attempts.get(outcome.attemptKey) : undefined;\n const result = { type: 'stripe' as const, paymentMethod: known?.method ?? this.payMethod ?? ctx.method, amount: known?.amount ?? outcome?.amount ?? this.payAmount ?? ctx.amount ?? this.lastAmount() ?? 0 };\n this.doneAmount = result.amount;\n this.doneMethod = result.paymentMethod;\n ctx.report(finalizeFailed ? 'finalize-failed' : 'paid', { result });\n ctx.announce(this.labels.t('paymentAttempt.succeededAfterCheck'));\n ctx.setBusy(false);\n ctx.complete(result);\n }\n\n /** Pays: validates the panel, confirms the Payment Element (creating the intent), then records it through the host. */\n async pay(): Promise<void> {\n const ctx = this.ctx();\n const payment = this.payment();\n if (this.processing() || this.estimating() || this.done() || !payment) return;\n if (!ctx.validate() || ctx.amount == null) return;\n this.payAmount = ctx.amount; // PINNED: what is recorded later is what this click asked for, whatever the amount field says by then\n this.payMethod = ctx.method;\n const attemptAmount: number = ctx.amount; // captured for THIS attempt: a late answer must not read the fields a newer click overwrote\n const attemptMethod: string = ctx.method;\n this.error.set('');\n this.processing.set(true);\n ctx.setBusy(true);\n ctx.announce(this.labels.t('stripePaymentMethod.announceProcessing'));\n let finished = false;\n try {\n const event = await payment.confirm();\n if (event) finished = await this.afterConfirm(event, ctx, attemptAmount, attemptMethod);\n } finally {\n this.processing.set(false);\n // An UNKNOWN outcome keeps the panel busy: the status check, the host or a late answer settles it (onAttemptOutcome frees the panel).\n if (!finished && !payment.attempt.unknown()) ctx.setBusy(false);\n }\n }\n\n private async afterConfirm(event: StripeConfirmedEvent, ctx: PaymentMethodContext, amount: number, method: string): Promise<boolean> {\n if (this.done()) return true; // already recorded by a status check while the confirmation was still pending\n const money = formatCurrency(amount, { currency: ctx.currency });\n if (event.outcome !== 'succeeded' && event.outcome !== 'processing' && event.outcome !== 'requires_verification') {\n this.error.set(this.texts.notCompleted);\n return false;\n }\n // Paid or accepted: the intent is the host's now, a close must not cancel it.\n const info = this.intent;\n this.intent = null;\n let finalizeFailed = false;\n const finalize = this.config().finalize();\n if (finalize && info) {\n try { await callHost(() => finalize(info)); } catch { finalizeFailed = true; } // Stripe took the payment: the host's webhook reconciles\n }\n const result = { type: 'stripe' as const, paymentMethod: method, amount };\n this.doneAmount = amount;\n this.doneMethod = method;\n if (event.outcome === 'succeeded') {\n ctx.report(finalizeFailed ? 'finalize-failed' : 'paid', { result });\n this.done.set(true);\n ctx.complete(result);\n return true;\n }\n const verification = event.outcome === 'requires_verification';\n ctx.report(finalizeFailed ? 'finalize-failed' : verification ? 'verification' : 'processing', { result });\n this.confirmation.set(verification\n ? { title: this.texts.verificationTitle, message: this.texts.verificationMessage(money) }\n : { title: this.texts.achTitle, message: this.texts.achMessage(money) });\n ctx.setExclusive(true);\n ctx.setBusy(false);\n afterNextRender(() => this.host.nativeElement.querySelector<HTMLElement>('.psm-notice')?.focus(), { injector: this.injector });\n return true;\n }\n\n /** \"Done\" on the ACH / verification notice, or closing the panel while the notice is up: the accepted payment is reported as recorded (once). */\n private finish(): void {\n const ctx = this.ctx();\n if (this.done()) return;\n this.done.set(true);\n ctx.complete({ type: 'stripe', paymentMethod: this.doneMethod ?? ctx.method, amount: this.doneAmount ?? ctx.amount ?? this.lastAmount() ?? 0 });\n }\n\n /**\n * Cancels the abandoned intent (close, another method, a retry). Unless `force`, it is left alone while a payment is being confirmed:\n * a retry (`createIntentFn`) runs inside `pay()`, so it forces the cancel of the PREVIOUS attempt's intent.\n */\n private cancelIntent(force = false): void {\n const info = this.intent;\n if (!info || (this.processing() && !force)) return;\n if (this.attemptUnknown) return; // the confirmation may still be running at Stripe: cancelling its intent could cancel a payment that is about to succeed\n this.intent = null;\n const cancel = this.config().cancel();\n if (cancel) callHost(() => cancel(info)).catch(() => { /* best effort */ });\n }\n}\n","import { ChangeDetectionStrategy, Component, TemplateRef, forwardRef, input, viewChild, computed, signal } from '@angular/core';\nimport {\n PAYMENT_METHOD_PLUGIN, PAYMENT_READINESS_EVERY_MS, PAYMENT_READINESS_TIMEOUT_MS, PAYMENT_REQUEST_TIMEOUT_MS, PAYMENT_STATUS_CHECK_TIMEOUT_MS, PAYMENT_STATUS_FAIL_GRACE_MS, PAYMENT_AUTH_TIMEOUT_MS, PAYMENT_STATUS_POLL_MAX_MS, PAYMENT_STATUS_POLL_MS, PaymentMethodPlugin,\n type CheckPaymentStatusFn, type PaymentAttemptControls, type HostResult, type PaymentMethodBodyContext, type PaymentPluginMethod, type ReadinessCheckFn,\n} from '@forgeroute/ui';\nimport type { StripeBillingDetails } from '../stripe-payment/stripe-payment.component';\nimport { PaymentStripeBodyComponent } from './payment-stripe-body.component';\nimport { STRIPE_METHOD_TEXTS, STRIPE_PAYMENT_METHODS, type StripeFeeContext, type StripeFees, type StripeIntentContext, type StripeIntentInfo, stripeMethodLabel } from './payment-stripe-method.models';\n\n/**\n * Adds LIVE Card and ACH (Stripe) to `ui-payment-side-panel`. Put it inside the panel only for customers who use Stripe: its presence replaces the\n * record-only Card / ACH (last 4 digits) with the Payment Element; remove it and the panel is record-only again.\n *\n * <ui-payment-side-panel ...>\n * @if (stripeEnabled()) {\n * <ui-payment-stripe-method [publishableKey]=\"key\" [createIntent]=\"createIntent\" [finalize]=\"finalize\" [cancel]=\"cancel\" />\n * }\n * </ui-payment-side-panel>\n *\n * The host owns the HTTP: `createIntent(ctx)` (POST create-payment-intent) answers `{ clientSecret, paymentIntentId, fees... }`, `finalize(info)` (POST\n * process-payment) runs after Stripe took the payment, `cancel(info)` cancels an abandoned intent. Outcomes arrive as the panel's `outcome` events with\n * kind `'plugin'` and codes `paid`, `processing`, `verification`, `finalize-failed` and `failed`.\n */\n@Component({\n selector: 'ui-payment-stripe-method',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [PaymentStripeBodyComponent],\n providers: [{ provide: PAYMENT_METHOD_PLUGIN, useExisting: forwardRef(() => StripePaymentMethodComponent) }],\n host: { style: 'display: none' },\n template: `<ng-template #body let-ctx><ui-payment-stripe-body [ctx]=\"ctx\" [config]=\"self\" /></ng-template>`,\n})\nexport class StripePaymentMethodComponent extends PaymentMethodPlugin {\n protected readonly self = this;\n /** Creates the PaymentIntent on the host's backend (called when the payer presses Pay). */\n readonly createIntent = input<((ctx: StripeIntentContext) => HostResult<StripeIntentInfo>) | null>(null);\n /** Records the payment after Stripe accepted it (succeeded, processing or needs bank verification). A failure here is reported, the payment still counts as taken. */\n readonly finalize = input<((info: StripeIntentInfo) => HostResult<unknown>) | null>(null);\n /** Cancels an intent that was created but not paid (panel closed, another method, a retry). */\n readonly cancel = input<((info: StripeIntentInfo) => HostResult<unknown>) | null>(null);\n /** Optional fee preview before paying; its `totalAmount` becomes the amount of the Payment Element (it must equal the intent's amount). */\n readonly estimateFees = input<((ctx: StripeFeeContext) => HostResult<StripeFees>) | null>(null);\n readonly publishableKey = input<string | null>(null);\n /** Connect account for direct charges; Stripe.js is loaded for it. */\n readonly stripeAccount = input<string | null>(null);\n readonly billingDetails = input<StripeBillingDetails | null>(null);\n readonly appearance = input<Record<string, unknown> | null>(null);\n /** The methods this plugin takes over (default: Card and ACH / Bank Transfer). Pass `[{ value: 'CARD', label: 'Card' }]` for cards only. */\n readonly methodListInput = input<readonly PaymentPluginMethod[] | null>(null, { alias: 'methodList' });\n readonly methodList = computed((): readonly PaymentPluginMethod[] => this.methodListInput() ?? STRIPE_PAYMENT_METHODS.map(m => ({ ...m, label: stripeMethodLabel(m.value, m.label) })));\n /** How long a fee estimate may take before Pay is released and \"Try again\" is offered (ms). */\n readonly estimateTimeoutMs = input(10000);\n /** The payer covers fees, so the intent amount is payment + fees: a rejected or empty estimate keeps Pay off (with \"Try again\") instead of falling back to the base amount, which Stripe would reject as a mismatch. */\n readonly feesRequired = input(false);\n /**\n * Opt-in (default off: the estimate and the intent request are exactly as before). For a fee schedule that depends on the card's funding (a platform fee on credit cards only):\n * once the typed card is complete a ConfirmationToken is made from the Payment Element, its funding is passed to `estimateFees` (`ctx.funding`, `ctx.confirmationTokenId`) so\n * the fee rows and the total update (credit vs debit vs bank account), and `createIntent` gets `confirmationTokenId` + `funding` for the backend's own lookup. Needs `[estimateFees]`.\n */\n readonly fundingPreview = input(false);\n // ── Duplicate-payment protection and readiness gate (opt-in: with `duplicateProtection` off the plugin behaves exactly as before) ──\n /** Turns on the duplicate-charge protection and the readiness gate of the Payment Element (docs: \"Duplicate-payment protection\", \"Readiness gate\"). Default off. */\n readonly duplicateProtection = input(false);\n /**\n * The payable this is for (an invoice, a balance, a payment link). While an attempt is undecided its opaque marker (key, amount, method) is stored under it in `localStorage`, so a RELOAD or a\n * SECOND TAB of the same payable starts locked (unknown) with the same attempt key. Without it the protection covers this page instance only. Nothing else is stored.\n */\n readonly payableRef = input<string | null>(null);\n /** A key the host supplies; empty = generated per payment attempt session (it arrives in `createIntent(ctx).attemptKey`). */\n readonly attemptKey = input<string | null>(null);\n /** The host's status check by attempt key: resolves an UNKNOWN outcome (timeout, offline mid-flight, abandoned 3-D Secure challenge). */\n readonly checkStatus = input<CheckPaymentStatusFn | null>(null);\n /** The payable is paid (host re-render, back navigation): Pay stays locked for good. */\n readonly paid = input(false);\n /** The host reports an ambiguous result of ITS charge call: \"Checking your payment...\" while true. */\n readonly hostPending = input(false);\n readonly statusPollMs = input(PAYMENT_STATUS_POLL_MS);\n readonly statusPollMaxMs = input(PAYMENT_STATUS_POLL_MAX_MS);\n /** A status check slower than this counts as unknown (ms). */\n readonly statusCheckTimeoutMs = input(PAYMENT_STATUS_CHECK_TIMEOUT_MS);\n /** While the attempt's own request is unsettled, a status answer `failed` is ignored for this long (ms). */\n readonly statusFailGraceMs = input(PAYMENT_STATUS_FAIL_GRACE_MS);\n /** Offer \"Start over\" after the status polling window (a new attempt with a NEW key). Turn it on ONLY when your backend allows ONE open or succeeded attempt per payable and answers 409 `payment_in_flight` to a second key: that rule is what makes it safe. */\n readonly allowStartOver = input(false);\n /** Managed environments where `navigator.onLine === false` is a false negative (captive portal, VPN): do not refuse a payment because of the browser's offline flag (default false). */\n readonly offlineOverride = input(false);\n /** The request timeout is replaced by this while a 3-D Secure challenge or the bank window is open (ms). */\n readonly authTimeoutMs = input(PAYMENT_AUTH_TIMEOUT_MS);\n /** How long ONE confirmation (intent creation + Stripe confirmation) may take before the outcome counts as unknown (ms). */\n readonly confirmTimeoutMs = input(PAYMENT_REQUEST_TIMEOUT_MS);\n /** The host's readiness endpoint (`GET /api/payments/ready`): `{ ready, reasons[] }`. */\n readonly readinessCheck = input<ReadinessCheckFn | null>(null);\n readonly readinessTimeoutMs = input(PAYMENT_READINESS_TIMEOUT_MS);\n readonly readinessEveryMs = input(PAYMENT_READINESS_EVERY_MS);\n readonly receiptNoteInput = input<string | null>(null, { alias: 'receiptNote' });\n readonly receiptNote = computed((): string => this.receiptNoteInput() ?? STRIPE_METHOD_TEXTS.receiptNote);\n\n private readonly body = viewChild<TemplateRef<PaymentMethodBodyContext>>('body');\n\n // ── The host resolves an undecided attempt itself (without a status check): the body registers its controls here ──\n private readonly controls = signal<PaymentAttemptControls | null>(null);\n /** @internal The body registers itself. */\n attachControls(controls: PaymentAttemptControls): void { this.controls.set(controls); }\n /** @internal The body leaves. */\n detachControls(controls: PaymentAttemptControls): void { if (this.controls() === controls) this.controls.set(null); }\n /** The host's charge of this payment is ambiguous (its call timed out): the plugin shows \"Checking your payment...\" and stays locked (see `checkStatus`). */\n markUnknown(): void { this.controls()?.markUnknown(); }\n /** The host's charge succeeded: the plugin records it (paid + complete) and locks the payable. */\n markSucceeded(): void { this.controls()?.markSucceeded(); }\n /** The host's charge was DEFINITIVELY refused: the plugin unlocks with a NEW attempt key. */\n markFailed(): void { this.controls()?.markFailed(); }\n /** NOTHING was sent to the processor: the plugin unlocks and the attempt key is KEPT (the backend must still answer the state of an attempt it already holds for that key). */\n markNotCharged(): void { this.controls()?.markNotCharged(); }\n /** The host starts a deliberate SECOND payment of this payable (an explicit \"pay again\" flow): forgets the paid state this form saw, removes the succeeded record and moves the epoch so the next attempt has a NEW key. Does nothing against the host's own `paid` input. */\n resetPaid(): void { this.controls()?.resetPaid(); }\n\n\n readonly methods = this.methodList;\n readonly template = this.body;\n}\n"],"mappings":";;;;;;;AAWA,MAAa,cAA2G,EACtH,YAAY,OAAO,qBACpB;AAMD,MAAa,sBAAsC,OAAO,gBAAgB,YAAW;CACnF,MAAM,MAAM,MAAM,YAAY,KAAI;CAElC,OADe,YAAY,SAAY,MAAM,IAAI,WAAW,cAAc,IAAI,MAAM,IAAI,WAAW,gBAAgB,OAAgB;AAErI;AAGA,MAAa,gBAAgB,IAAI,eAA+B,iBAAiB;CAAE,YAAY;CAAQ,eAAe;AAAmB,CAAE;AAU3I,MAAa,0BAA0B,IAAI,eAAsC,2BAA2B;CAAE,YAAY;CAAQ,gBAAgB,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AA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,eAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,kBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,gBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,oBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,kBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,kBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,MAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,QAAM,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
1
+ {"version":3,"file":"forgeroute-ui-stripe.mjs","names":[],"sources":["../../../projects/forgeroute-ui/stripe/src/stripe-loader/stripe-loader.ts","../../../projects/forgeroute-ui/stripe/src/errors/stripe-errors.ts","../../../projects/forgeroute-ui/stripe/src/stripe-payment/stripe-outcomes.ts","../../../projects/forgeroute-ui/stripe/src/stripe-payment/stripe-actions.ts","../../../projects/forgeroute-ui/stripe/src/stripe-payment/stripe-appearance.ts","../../../projects/forgeroute-ui/stripe/src/stripe-payment/stripe-payment.component.ts","../../../projects/forgeroute-ui/stripe/src/microdeposit-verify/microdeposit-verify.models.ts","../../../projects/forgeroute-ui/stripe/src/microdeposit-verify/microdeposit-verify.component.ts","../../../projects/forgeroute-ui/stripe/src/stripe-connect/stripe-connect.flow.ts","../../../projects/forgeroute-ui/stripe/src/stripe-connect/stripe-connect.component.ts","../../../projects/forgeroute-ui/stripe/src/payment-stripe-method/payment-stripe-method.models.ts","../../../projects/forgeroute-ui/stripe/src/payment-stripe-method/payment-stripe-body.component.ts","../../../projects/forgeroute-ui/stripe/src/payment-stripe-method/payment-stripe-method.component.ts"],"sourcesContent":["import { InjectionToken, type Provider } from '@angular/core';\nimport type { StripeLike, StripeLoadOptions } from './stripe-types';\n\n/**\n * Loads Stripe.js: `loader(publishableKey, options)` resolves the `Stripe` object (or `null` when it could not be created).\n * It is called exactly like `loadStripe(key, options)` from `@stripe/stripe-js`: the second argument is `undefined` unless a Connect\n * account / locale / other option is set.\n */\nexport type StripeLoaderFn = (publishableKey: string, options?: StripeLoadOptions) => Promise<StripeLike | null>;\n\n/** The dynamic import of the Stripe SDK, behind an object so a spec can replace it (internal: not part of the public API). */\nexport const sdkImporter: { load: () => Promise<{ loadStripe: (key: string, options?: never) => Promise<unknown> }> } = {\n load: () => import('@stripe/stripe-js') as unknown as Promise<{ loadStripe: (key: string, options?: never) => Promise<unknown> }>,\n};\n\n/**\n * The default loader. `@stripe/stripe-js` is imported lazily (a dynamic import), so the Stripe SDK is only downloaded when a\n * payment form is actually shown, and it is an optional peer dependency of the library.\n */\nexport const defaultStripeLoader: StripeLoaderFn = async (publishableKey, options) => {\n const sdk = await sdkImporter.load();\n const stripe = options === undefined ? await sdk.loadStripe(publishableKey) : await sdk.loadStripe(publishableKey, options as never);\n return stripe as unknown as StripeLike | null;\n};\n\n/** How Stripe.js is loaded. Provide your own to fake Stripe in tests or to load it differently. Defaults to `defaultStripeLoader`. */\nexport const STRIPE_LOADER = new InjectionToken<StripeLoaderFn>('STRIPE_LOADER', { providedIn: 'root', factory: () => defaultStripeLoader });\n\n/** App-wide defaults for every `ui-stripe-payment`, set once with `provideStripePayment`. A value on the component always wins. */\nexport interface StripePaymentDefaults {\n /** The publishable key (`pk_...`), used when the component has no `publishableKey` of its own. */\n publishableKey?: string;\n /** Stripe.js locale (`'en'`, `'es'`, ...): passed to `loadStripe` as `{ locale }`. */\n locale?: string;\n}\n\nexport const STRIPE_PAYMENT_DEFAULTS = new InjectionToken<StripePaymentDefaults>('STRIPE_PAYMENT_DEFAULTS', { providedIn: 'root', factory: () => ({}) });\n\nexport interface ProvideStripePaymentOptions extends StripePaymentDefaults {\n /** Replaces how Stripe.js is loaded (tests, a self-hosted loader). */\n loader?: StripeLoaderFn;\n}\n\n/**\n * Global defaults for the Stripe components:\n *\n * providers: [provideStripePayment({ publishableKey: environment.stripePublishableKey, locale: 'en' })]\n */\nexport function provideStripePayment(options: ProvideStripePaymentOptions = {}): Provider[] {\n const { loader, ...defaults } = options;\n const providers: Provider[] = [{ provide: STRIPE_PAYMENT_DEFAULTS, useValue: defaults }];\n if (loader) providers.push({ provide: STRIPE_LOADER, useValue: loader });\n return providers;\n}\n\n/** `loadStripe`'s second argument for a Connect account / locale / extra options; `undefined` when there is nothing to pass (like the apps do today). */\nexport function buildLoadOptions(stripeAccount: string | null | undefined, locale: string | null | undefined, extra?: StripeLoadOptions | null): StripeLoadOptions | undefined {\n const options: StripeLoadOptions = { ...(extra ?? {}) };\n if (locale) options.locale = locale;\n if (stripeAccount) options.stripeAccount = stripeAccount;\n return Object.keys(options).length ? options : undefined;\n}\n","import type { StripeErrorLike } from '../stripe-loader/stripe-types';\nimport { UiLabelKey, uiText } from '@forgeroute/ui';\n\n/**\n * Plain-language text for the Stripe decline / error codes (https://docs.stripe.com/declines/codes). One table for every app; an app can replace single entries\n * with the `errorMessages` input of `ui-stripe-payment` (or the `overrides` option of `getStripeErrorMessage`).\n */\nexport const STRIPE_ERROR_MESSAGES: Readonly<Record<string, string>> = {\n // Card issue codes\n stolen_card: 'This card has been reported as stolen. Please use a different payment method.',\n lost_card: 'This card has been reported as lost. Please use a different payment method.',\n card_declined: 'Your card was declined. Please contact your bank or use a different card.',\n generic_decline: 'Your card was declined. Please contact your bank or try a different card.',\n insufficient_funds: 'Your card has insufficient funds. Please use a different card or add funds to your account.',\n do_not_honor: 'Your bank has declined this transaction. Please contact your bank or use a different card.',\n card_not_supported: 'This card does not support this type of purchase. Please use a different card.',\n currency_not_supported: 'This card does not support the requested currency. Please use a different card.',\n duplicate_transaction: 'A duplicate transaction was detected. Please wait a few minutes before trying again.',\n expired_card: 'Your card has expired. Please use a different card.',\n incorrect_cvc: 'The security code (CVC) is incorrect. Please check and try again.',\n incorrect_number: 'The card number is incorrect. Please check and try again.',\n invalid_cvc: 'The security code (CVC) is invalid. Please check and try again.',\n invalid_expiry_month: 'The expiration month is invalid. Please check and try again.',\n invalid_expiry_year: 'The expiration year is invalid. Please check and try again.',\n invalid_number: 'The card number is invalid. Please check and try again.',\n processing_error: 'An error occurred while processing your card. Please try again.',\n incorrect_zip: 'The ZIP/postal code is incorrect. Please check and try again.',\n card_velocity_exceeded: 'You have exceeded the balance or credit limit on your card. Please contact your bank.',\n withdrawal_count_limit_exceeded: 'You have exceeded the allowed number of transactions. Please try again later or use a different card.',\n // Authentication codes\n authentication_required: 'This card requires authentication. Please try again and complete the verification step.',\n // Fraud codes\n fraudulent: 'This transaction has been flagged by your bank. Please contact your bank or use a different card.',\n merchant_blacklist: 'This card cannot be used for this transaction. Please use a different card.',\n pickup_card: 'This card cannot be used. Please contact your bank or use a different card.',\n restricted_card: 'This card has restrictions that prevent this transaction. Please contact your bank or use a different card.',\n security_violation: 'This card has been flagged for a security violation. Please contact your bank.',\n // Account codes\n issuer_not_available: 'Your card issuer could not be reached. Please try again later.',\n new_account_information_available: 'Your card details have changed. Please update your card information and try again.',\n try_again_later: 'Your card issuer is temporarily unable to process this transaction. Please try again later.',\n reenter_transaction: 'The transaction could not be processed. Please try again.',\n // Limit codes\n approve_with_id: 'The payment cannot be authorized. Please contact your bank.',\n call_issuer: 'Your bank has declined this transaction. Please call your bank for more information.',\n do_not_try_again: 'Your bank has permanently declined this card. Please use a different payment method.',\n no_action_taken: 'Your bank could not process this transaction. Please contact your bank.',\n not_permitted: 'This transaction is not permitted on this card. Please contact your bank or use a different card.',\n revocation_of_all_authorizations: 'All authorizations have been revoked for this card. Please contact your bank.',\n revocation_of_authorization: 'The authorization for this card has been revoked. Please contact your bank.',\n stop_payment_order: 'Your bank has stopped this payment. Please contact your bank.',\n // Test mode\n testmode_decline: 'This is a test decline. No real charge was attempted.',\n // ACH\n bank_account_declined: 'Your bank account could not be used. Please try a different account.',\n debit_not_authorized: 'The debit was not authorized. Please contact your bank.',\n // Payment / setup intent state errors\n payment_intent_unexpected_state: 'This payment has already been processed. Please refresh the page and try again.',\n payment_intent_authentication_failure: 'Payment authentication failed. Please try again.',\n payment_intent_incompatible_payment_method: 'This payment method is not compatible. Please use a different payment method.',\n payment_intent_payment_attempt_failed: 'The payment attempt failed. Please try again or use a different payment method.',\n payment_method_unactivated: 'This payment method is not activated. Please use a different payment method.',\n payment_method_unexpected_state: 'There was an issue with your payment method. Please try again.',\n setup_intent_unexpected_state: 'This payment setup has already been completed. Please refresh the page.',\n amount_too_small: 'The payment amount is too small to process. Please contact the business.',\n amount_too_large: 'The payment amount exceeds the maximum allowed. Please contact the business.',\n balance_insufficient: 'Insufficient balance to complete this payment. Please use a different payment method.',\n resource_missing: 'The payment session has expired. Please refresh the page and try again.',\n};\n\n/** Text for the Stripe error types that are about Stripe or the connection, never about the customer's input (Stripe's own text there is technical). */\nexport const STRIPE_TECHNICAL_ERROR_MESSAGES: Readonly<Record<string, string>> = {\n api_connection_error: 'We could not reach the payment service. Please check your connection and try again.',\n rate_limit_error: 'Too many requests. Please wait a moment and try again.',\n api_error: 'Something went wrong while processing the payment. Please try again.',\n authentication_error: 'Something went wrong while processing the payment. Please try again.',\n invalid_request_error: 'Something went wrong while processing the payment. Please try again.',\n};\n\nexport const STRIPE_DEFAULT_ERROR_MESSAGE = 'Payment failed. Please try again.';\nexport const STRIPE_ALREADY_PROCESSED_MESSAGE = 'This payment has already been processed. Please refresh the page and try again.';\nexport const STRIPE_SESSION_EXPIRED_MESSAGE = 'Your payment session has expired. Please refresh the page and try again.';\n\n/** The English table with every text looked up in the app's active language (an unknown code keeps its English text). */\nfunction localizedTable(english: Readonly<Record<string, string>>, prefix: string): Record<string, string> {\n return Object.fromEntries(Object.keys(english).map(code => [code, uiText(`${prefix}${code}` as UiLabelKey)]));\n}\n\nexport type StripeErrorDisplay = 'friendly' | 'table' | 'stripe';\n\nexport interface StripeErrorMessageOptions {\n /**\n * `'friendly'` (default): the table above first, then Stripe's own text for card / validation errors (customer-facing) and plain text for technical errors.\n * `'table'`: the table, then Stripe's own `message` for EVERYTHING else, technical errors included (what the cremo payment flows show today).\n * `'stripe'`: Stripe's own `message` untouched (what the apps that show `error.message` do), the fallback when there is none.\n */\n display?: StripeErrorDisplay;\n /** Text for single codes; wins over the table. */\n overrides?: Readonly<Record<string, string>> | null;\n /** Shown when there is nothing better. */\n fallback?: string;\n}\n\n/**\n * The text to show the customer for a Stripe.js error.\n * Friendly mode order: decline_code, code, the two technical Stripe messages (\"already succeeded\" / \"previously confirmed\", \"expired\"),\n * technical error types, Stripe's own message, the fallback. Table mode is the same without the technical error types.\n */\nexport function getStripeErrorMessage(error: StripeErrorLike | null | undefined, options: StripeErrorMessageOptions = {}): string {\n const fallback = options.fallback ?? uiText('stripeErrors.defaultMessage');\n if (!error) return fallback;\n if (options.display === 'stripe') return error.message || fallback;\n const table = { ...localizedTable(STRIPE_ERROR_MESSAGES, 'stripeErrors.'), ...(options.overrides ?? {}) };\n if (error.decline_code && table[error.decline_code]) return table[error.decline_code];\n if (error.code && table[error.code]) return table[error.code];\n const message = error.message;\n if (message) {\n if (message.includes('already succeeded') || message.includes('previously confirmed')) return options.overrides?.['payment_intent_unexpected_state'] ?? uiText('stripeErrors.alreadyProcessed');\n if (message.includes('expired')) return uiText('stripeErrors.sessionExpired');\n }\n const technical = options.display === 'table' || !error.type || !(error.type in STRIPE_TECHNICAL_ERROR_MESSAGES) ? undefined : uiText(`stripeErrors.technical.${error.type}` as UiLabelKey);\n if (technical) return technical;\n return message || fallback;\n}\n","import { getStripeErrorMessage, type StripeErrorMessageOptions } from '../errors/stripe-errors';\nimport type { StripeConfirmationTokenLike, StripeErrorLike, StripeIntentLike } from '../stripe-loader/stripe-types';\nimport { UiLabelKey, uiText } from '@forgeroute/ui';\n\nexport type StripeIntentKind = 'setup' | 'payment';\n\n/**\n * What happened, in one word:\n * - `succeeded`: the intent succeeded (card charged / method saved).\n * - `processing`: the payment was accepted and is settling (a bank debit takes days).\n * - `requires_verification`: a bank account was entered by number; Stripe sent micro-deposits and the customer has to verify them (see `verification`).\n * - `requires_action`: the intent still needs the customer to do something else (3D Secure, a redirect-less next action).\n * - `requires_capture`: the payment is authorized and waits for the host to capture it (`captureMethod: 'manual'`).\n * - `requires_payment_method`: Stripe sends the intent back for a new payment method (the payment failed).\n * - `canceled` / `unknown`: any other status.\n */\nexport type StripeOutcome = 'succeeded' | 'processing' | 'requires_verification' | 'requires_action' | 'requires_capture' | 'requires_payment_method' | 'canceled' | 'unknown';\n\n/** What the customer has to do to verify a bank account (`next_action.verify_with_microdeposits`). */\nexport interface StripeVerification {\n /** `'amounts'` (two deposits), `'descriptor_code'` (one deposit with a code) or `null` when Stripe did not say. */\n type: 'amounts' | 'descriptor_code' | null;\n /** When the deposits should have arrived: Unix seconds as Stripe sends it, and the same instant as an ISO string. `null` when unknown. */\n arrivalDate: number | null;\n arrivalDateIso: string | null;\n /** Stripe's own page where the customer can verify (https), or `null`. */\n hostedVerificationUrl: string | null;\n}\n\n/** The normalised result of a confirmation (or of `handleReturn`). */\nexport interface StripeConfirmedEvent {\n kind: StripeIntentKind;\n /** Stripe's own `status` of the intent. */\n status: string;\n outcome: StripeOutcome;\n /** The intent exactly as Stripe.js returned it. */\n intent: StripeIntentLike;\n setupIntent?: StripeIntentLike;\n paymentIntent?: StripeIntentLike;\n intentId: string;\n /** The payment method of the intent as an id (`pm_...`), whether Stripe sent it as a string or an object; `null` when there is none. */\n paymentMethodId: string | null;\n /** Set when `outcome` is `requires_verification`. */\n verification: StripeVerification | null;\n /** The 3D Secure step (`stripe.handleCardAction`) ran before this result (`autoHandleCardAction` / `handleNextAction`). Hosts use it for their post-3DS wording. */\n actionHandled: boolean;\n}\n\n/** The funding of a card as Stripe reports it in a ConfirmationToken's `payment_method_preview.card.funding`. */\nexport type StripeCardFunding = 'credit' | 'debit' | 'prepaid' | 'unknown';\n\n/**\n * A ConfirmationToken made from the typed form (`createConfirmationToken()` / `collectConfirmationToken`), with what Stripe shows about the payment method BEFORE any\n * intent exists. `funding` is only for display and for hosts that estimate a fee; a backend that charges by it must read the funding itself from the token id\n * (`stripe.confirmationTokens.retrieve`), never trust the browser.\n */\nexport interface StripeConfirmationTokenEvent {\n /** `ctoken_...`: send it to your backend with the request that creates the intent. */\n id: string;\n /** The preview's payment method type (`'card'`, `'us_bank_account'`, `'link'`, ...), `null` when Stripe sent none. */\n paymentMethodType: string | null;\n /** The card's funding; `null` when the payment method is not a card, `'unknown'` when Stripe did not say. */\n funding: StripeCardFunding | null;\n brand: string | null;\n last4: string | null;\n country: string | null;\n /** `'apple_pay'` / `'google_pay'` / ... when a wallet card was used. */\n wallet: string | null;\n}\n\n/** The normalised {@link StripeConfirmationTokenEvent} of a ConfirmationToken. */\nexport function confirmationTokenEventOf(token: StripeConfirmationTokenLike): StripeConfirmationTokenEvent {\n const preview = token.payment_method_preview;\n const card = preview?.card ?? null;\n const funding = card ? (card.funding === 'credit' || card.funding === 'debit' || card.funding === 'prepaid' ? card.funding : 'unknown') : null;\n return {\n id: token.id,\n paymentMethodType: preview?.type ?? null,\n funding,\n brand: card?.brand ?? null,\n last4: card?.last4 ?? null,\n country: card?.country ?? null,\n wallet: card?.wallet?.type ?? null,\n };\n}\n\n/** Why a flow stopped. */\nexport type StripeFailureStage = 'load' | 'submit' | 'intent' | 'confirm' | 'action' | 'result' | 'verify' | 'return';\n\n/** A failure: `message` is what to show the customer; `stripeMessage` is Stripe's own text. */\nexport interface StripeFailure {\n code: string;\n message: string;\n stripeMessage: string;\n declineCode?: string;\n type?: string;\n stage: StripeFailureStage;\n /** The Stripe error as returned, when there was one. */\n error?: StripeErrorLike;\n /** True when the failure happened in or after the 3D Secure step. */\n actionHandled?: boolean;\n /** Stripe's status of the intent when the failure is about the intent's status (`requires_payment_method`, `canceled`, ...). */\n status?: string;\n}\n\n/** The payment method type the Payment Element currently shows (`'card'`, `'us_bank_account'`, ...) and its completeness. */\nexport interface StripeElementChange {\n complete: boolean;\n empty: boolean;\n /** The selected payment method type, `null` when Stripe did not send one. */\n type: string | null;\n /** Stripe's own validation message for the form, when it shows one. */\n errorMessage: string | null;\n}\n\nexport const MSG_NOT_INITIALIZED = 'Payment system not initialized';\nexport const MSG_INTENT_FAILED = 'Failed to create payment intent';\nexport const MSG_NOT_COMPLETED = 'Payment was not completed';\nexport const MSG_REQUIRES_PAYMENT_METHOD = 'Payment failed. Please try a different payment method.';\nexport const MSG_NO_PAYMENT_METHOD = 'No payment method returned from Stripe';\nexport const MSG_AUTH_FAILED = 'Payment authentication failed';\nexport const MSG_AUTH_NOT_COMPLETED = 'Payment authentication was not completed';\nexport const MSG_KEY_MISSING = 'A Stripe publishable key is required';\nexport const MSG_LOAD_FAILED = 'Failed to load Stripe';\nexport const MSG_TOKEN_FAILED = 'The card details could not be checked. Please try again.';\n\nexport function paymentMethodIdOf(intent: StripeIntentLike | null | undefined): string | null {\n const pm = intent?.payment_method;\n if (!pm) return null;\n return typeof pm === 'string' ? pm : pm.id || null;\n}\n\n/** The micro-deposit verification of an intent whose `next_action` is `verify_with_microdeposits`, else `null`. */\nexport function verificationOf(intent: StripeIntentLike | null | undefined): StripeVerification | null {\n const action = intent?.next_action;\n if (action?.type !== 'verify_with_microdeposits') return null;\n const details = action.verify_with_microdeposits ?? {};\n const arrival = typeof details.arrival_date === 'number' ? details.arrival_date : null;\n const type = details.microdeposit_type === 'amounts' || details.microdeposit_type === 'descriptor_code' ? details.microdeposit_type : null;\n const url = typeof details.hosted_verification_url === 'string' && details.hosted_verification_url ? details.hosted_verification_url : null;\n return { type, arrivalDate: arrival, arrivalDateIso: arrival === null ? null : new Date(arrival * 1000).toISOString(), hostedVerificationUrl: url };\n}\n\n/** Stripe's intent `status` (and `next_action`) as one `StripeOutcome`. */\nexport function outcomeOf(intent: StripeIntentLike): StripeOutcome {\n switch (intent.status) {\n case 'succeeded': return 'succeeded';\n case 'processing': return 'processing';\n case 'requires_capture': return 'requires_capture';\n case 'requires_action': return intent.next_action?.type === 'verify_with_microdeposits' ? 'requires_verification' : 'requires_action';\n case 'requires_payment_method': return 'requires_payment_method';\n case 'canceled': return 'canceled';\n default: return 'unknown';\n }\n}\n\nexport function normalizeIntent(kind: StripeIntentKind, intent: StripeIntentLike): StripeConfirmedEvent {\n const outcome = outcomeOf(intent);\n return {\n kind,\n status: intent.status,\n outcome,\n intent,\n ...(kind === 'setup' ? { setupIntent: intent } : { paymentIntent: intent }),\n intentId: intent.id,\n paymentMethodId: paymentMethodIdOf(intent),\n verification: outcome === 'requires_verification' ? verificationOf(intent) : null,\n actionHandled: false,\n };\n}\n\n/** A failure from a Stripe error, with the text to show chosen by `display` (see `getStripeErrorMessage`). */\nexport function failureFromError(error: StripeErrorLike | null | undefined, stage: StripeFailureStage, options: StripeErrorMessageOptions = {}): StripeFailure {\n return {\n code: error?.code || error?.type || 'unknown_error',\n message: getStripeErrorMessage(error, options),\n stripeMessage: error?.message ?? '',\n ...(error?.decline_code ? { declineCode: error.decline_code } : {}),\n ...(error?.type ? { type: error.type } : {}),\n stage,\n ...(error ? { error } : {}),\n };\n}\n\n/** A failure that is not a Stripe error (our own text). */\nconst KNOWN_MESSAGE_KEYS: Readonly<Record<string, UiLabelKey>> = {\n 'Payment system not initialized': 'stripePayment.msg.notInitialized',\n 'Failed to create payment intent': 'stripePayment.msg.intentFailed',\n 'Payment was not completed': 'stripePayment.msg.notCompleted',\n 'Payment failed. Please try a different payment method.': 'stripePayment.msg.requiresPaymentMethod',\n 'No payment method returned from Stripe': 'stripePayment.msg.noPaymentMethod',\n 'Payment authentication failed': 'stripePayment.msg.authFailed',\n 'Payment authentication was not completed': 'stripePayment.msg.authNotCompleted',\n 'A Stripe publishable key is required': 'stripePayment.msg.keyMissing',\n 'Failed to load Stripe': 'stripePayment.msg.loadFailed',\n 'Verification failed': 'stripePayment.msg.verifyFailed',\n 'Verification failed. Please check the code and try again.': 'stripePayment.msg.verifyThrown',\n 'We could not check the status of this payment. Please contact support before trying again.': 'stripePayment.msg.returnFailed',\n 'Payment method setup was incomplete. Please try again.': 'stripePayment.msg.setupIncomplete',\n 'Payment authentication failed. Please try a different payment method.': 'stripePayment.msg.authFailedTryOther',\n 'Card payments are not available right now.': 'stripePayment.msg.cardsUnavailable',\n 'Failed to initialize payment. Please try again.': 'stripePayment.msg.initFailed',\n 'Could not calculate the fees. Please try again.': 'stripePayment.msg.feesFailed',\n // STRIPE_DEFAULT_ERROR_MESSAGE: what a createIntent callback that throws without any message reports.\n 'Payment failed. Please try again.': 'stripeErrors.defaultMessage',\n 'The card details could not be checked. Please try again.': 'stripePayment.msg.tokenFailed',\n};\n\n/** Our own fixed messages (\"Payment system not initialized\" ...) in the app's active language; any other text (Stripe's, a host's) is returned as it is. */\nexport function localizeStripeMessage(message: string): string {\n const key = KNOWN_MESSAGE_KEYS[message];\n return key ? uiText(key) : message;\n}\n\nexport function failure(code: string, message: string, stage: StripeFailureStage, stripeMessage = ''): StripeFailure {\n return { code, message: localizeStripeMessage(message), stripeMessage, stage };\n}\n\n/** An error thrown by a host callback or a request: its own `error.error.message` (HTTP body), `message`, else the fallback. */\nexport function messageOfThrown(err: unknown, fallback: string): string {\n const e = err as { error?: { message?: unknown }; message?: unknown } | null | undefined;\n if (typeof e?.error?.message === 'string' && e.error.message) return e.error.message;\n if (typeof e?.message === 'string' && e.message) return e.message;\n return fallback;\n}\n","import { Injectable, inject } from '@angular/core';\nimport { STRIPE_LOADER, STRIPE_PAYMENT_DEFAULTS, buildLoadOptions } from '../stripe-loader/stripe-loader';\nimport type { StripeLike, StripeLoadOptions } from '../stripe-loader/stripe-types';\nimport {\n failure, failureFromError, messageOfThrown, normalizeIntent, MSG_KEY_MISSING, MSG_LOAD_FAILED,\n type StripeConfirmedEvent, type StripeFailure, type StripeIntentKind, type StripeOutcome,\n} from './stripe-outcomes';\nimport type { StripeConfirmResult, StripeIntentLike } from '../stripe-loader/stripe-types';\n\n/** The Stripe object with `confirmUsBankAccountSetup`, for an app that keeps its own routing-number form (contractor). Use it as the type argument of `StripePaymentService.load`. */\nexport interface StripeLikeWithBankSetup extends StripeLike {\n confirmUsBankAccountSetup(clientSecret: string, data?: Record<string, unknown>): Promise<StripeConfirmResult<StripeIntentLike>>;\n}\n\n/** What `stripe.verifyMicrodepositsFor*` takes: the two deposit amounts in cents, or the 6-character code of the one deposit. */\nexport type MicrodepositVerifyData = { amounts: number[] } | { descriptor_code: string };\n\nexport interface StripeMicrodepositResult {\n /** The intent is verified (`processing` or `succeeded`). */\n ok: boolean;\n outcome: StripeOutcome | null;\n intent: StripeIntentLike | null;\n /** Set when `ok` is false. `message` is Stripe's own text (customer-facing for a wrong amount / code) or ours. */\n failure: StripeFailure | null;\n}\n\n/** What Stripe appends to the return URL after a redirect (`payment_intent_client_secret` / `setup_intent_client_secret`, `redirect_status`). */\nexport interface StripeReturnParams {\n kind: StripeIntentKind;\n clientSecret: string;\n redirectStatus: string | null;\n}\n\n/** Reads the intent Stripe returned the customer with from a query string (`location.search`); `null` when there is none. */\nexport function readStripeReturnParams(search: string): StripeReturnParams | null {\n const params = new URLSearchParams(search.startsWith('?') ? search.slice(1) : search);\n const payment = params.get('payment_intent_client_secret');\n const setup = params.get('setup_intent_client_secret');\n const kind: StripeIntentKind | null = payment ? 'payment' : setup ? 'setup' : null;\n if (!kind) return null;\n return { kind, clientSecret: (payment ?? setup) as string, redirectStatus: params.get('redirect_status') };\n}\n\nexport const MSG_VERIFY_FAILED = 'Verification failed';\nexport const MSG_VERIFY_THROWN = 'Verification failed. Please check the code and try again.';\nexport const MSG_RETURN_FAILED = 'We could not check the status of this payment. Please contact support before trying again.';\n\n/**\n * Verifies a bank account with micro-deposits through Stripe.js (`verifyMicrodepositsForPayment` / `verifyMicrodepositsForSetup`), the way the public\n * \"verify your bank\" pages do it with the intent's client secret. The result is `ok` once the intent is `processing` or `succeeded`.\n */\nexport async function verifyMicrodeposits(stripe: StripeLike, flow: StripeIntentKind, clientSecret: string, data: MicrodepositVerifyData): Promise<StripeMicrodepositResult> {\n const call = flow === 'payment' ? stripe.verifyMicrodepositsForPayment : stripe.verifyMicrodepositsForSetup;\n if (typeof call !== 'function') return { ok: false, outcome: null, intent: null, failure: failure('unsupported', MSG_VERIFY_FAILED, 'verify') };\n try {\n const result = await call.call(stripe, clientSecret, data as Record<string, unknown>);\n if (result.error) return { ok: false, outcome: null, intent: null, failure: failureFromError(result.error, 'verify', { display: 'stripe', fallback: MSG_VERIFY_FAILED }) };\n const intent = (flow === 'payment' ? result.paymentIntent : result.setupIntent) ?? null;\n const event = intent ? normalizeIntent(flow, intent) : null;\n if (event && (event.outcome === 'processing' || event.outcome === 'succeeded')) return { ok: true, outcome: event.outcome, intent, failure: null };\n return { ok: false, outcome: event?.outcome ?? null, intent, failure: failure('verification_incomplete', MSG_VERIFY_FAILED, 'verify') };\n } catch (err) {\n return { ok: false, outcome: null, intent: null, failure: failure('verification_failed', messageOfThrown(err, MSG_VERIFY_THROWN), 'verify', messageOfThrown(err, '')) };\n }\n}\n\nexport interface StripeReturnResult {\n event: StripeConfirmedEvent | null;\n failure: StripeFailure | null;\n}\n\n/** Retrieves the intent after Stripe redirected the customer back (`retrievePaymentIntent` / `retrieveSetupIntent`) and normalises it. */\nexport async function retrieveIntent(stripe: StripeLike, kind: StripeIntentKind, clientSecret: string): Promise<StripeReturnResult> {\n const call = kind === 'payment' ? stripe.retrievePaymentIntent : stripe.retrieveSetupIntent;\n if (typeof call !== 'function') return { event: null, failure: failure('unsupported', MSG_RETURN_FAILED, 'return') };\n try {\n const result = await call.call(stripe, clientSecret);\n if (result.error) return { event: null, failure: failureFromError(result.error, 'return') };\n const intent = kind === 'payment' ? result.paymentIntent : result.setupIntent;\n if (!intent) return { event: null, failure: failure('no_intent', MSG_RETURN_FAILED, 'return') };\n return { event: normalizeIntent(kind, intent), failure: null };\n } catch (err) {\n return { event: null, failure: failure('return_failed', MSG_RETURN_FAILED, 'return', messageOfThrown(err, '')) };\n }\n}\n\nexport interface StripeConnection {\n publishableKey?: string | null;\n /** A Stripe Connect account id. */\n stripeAccount?: string | null;\n locale?: string | null;\n /** Further `loadStripe` options. */\n options?: StripeLoadOptions | null;\n}\n\nexport interface HandleReturnOptions extends StripeConnection {\n /** The client secret from the return URL. Default: read from `search`. */\n clientSecret?: string;\n /** Which kind of intent `clientSecret` belongs to (default: from the URL parameter name, else `'payment'`). */\n kind?: StripeIntentKind;\n /** The query string to read the return parameters from. Default: `window.location.search`. */\n search?: string;\n}\n\n/**\n * Stripe.js without a component: loads Stripe like `ui-stripe-payment` does, verifies micro-deposits and checks the intent after a redirect.\n * For pages that only verify a bank account (the \"verify your bank\" link) or only land on the `returnUrl`.\n */\n@Injectable({ providedIn: 'root' })\nexport class StripePaymentService {\n private readonly loader = inject(STRIPE_LOADER);\n private readonly defaults = inject(STRIPE_PAYMENT_DEFAULTS);\n\n /** Loads Stripe.js (`loadStripe(key, options)`). Pass a type for methods the library does not use: `load<StripeLikeWithBankSetup>(...)` (contractor's `confirmUsBankAccountSetup`). Throws when the key is missing or Stripe could not be created. */\n async load<T extends StripeLike = StripeLike>(connection: StripeConnection = {}): Promise<T> {\n const key = connection.publishableKey || this.defaults.publishableKey;\n if (!key) throw new Error(MSG_KEY_MISSING);\n const stripe = await this.loader(key, buildLoadOptions(connection.stripeAccount, connection.locale ?? this.defaults.locale, connection.options));\n if (!stripe) throw new Error(MSG_LOAD_FAILED);\n return stripe as T;\n }\n\n async verifyMicrodepositsForPayment(clientSecret: string, data: MicrodepositVerifyData, connection: StripeConnection = {}): Promise<StripeMicrodepositResult> {\n return this.verify('payment', clientSecret, data, connection);\n }\n\n async verifyMicrodepositsForSetup(clientSecret: string, data: MicrodepositVerifyData, connection: StripeConnection = {}): Promise<StripeMicrodepositResult> {\n return this.verify('setup', clientSecret, data, connection);\n }\n\n /** The intent the customer returned with, normalised. `{ event: null, failure: null }` when the URL carries no intent. */\n async handleReturn(options: HandleReturnOptions = {}): Promise<StripeReturnResult> {\n const fromUrl = options.clientSecret ? null : readStripeReturnParams(options.search ?? (typeof window === 'undefined' ? '' : window.location.search));\n const clientSecret = options.clientSecret ?? fromUrl?.clientSecret;\n if (!clientSecret) return { event: null, failure: null };\n const kind = options.kind ?? fromUrl?.kind ?? 'payment';\n let stripe: StripeLike;\n try { stripe = await this.load(options); } catch (err) { return { event: null, failure: failure('load_error', messageOfThrown(err, MSG_LOAD_FAILED), 'load', messageOfThrown(err, '')) }; }\n return retrieveIntent(stripe, kind, clientSecret);\n }\n\n private async verify(flow: StripeIntentKind, clientSecret: string, data: MicrodepositVerifyData, connection: StripeConnection): Promise<StripeMicrodepositResult> {\n let stripe: StripeLike;\n try { stripe = await this.load(connection); } catch (err) { return { ok: false, outcome: null, intent: null, failure: failure('load_error', messageOfThrown(err, MSG_LOAD_FAILED), 'load', messageOfThrown(err, '')) }; }\n return verifyMicrodeposits(stripe, flow, clientSecret, data);\n }\n}\n","import { isDarkPage } from '@forgeroute/ui';\n\n/**\n * The Payment Element `appearance` for the page's own look: Stripe's variables read from CSS custom properties at runtime, so one set of\n * tokens styles the page and the payment form, in light and dark.\n *\n * :root { --ui-stripe-color-primary: #0d9488; --ui-stripe-border-radius: 8px; }\n *\n * Variables read (all optional; a missing one is left out so Stripe's default stays): `--ui-stripe-color-primary`, `--ui-stripe-color-background`,\n * `--ui-stripe-color-text`, `--ui-stripe-color-danger`, `--ui-stripe-font-family`, `--ui-stripe-border-radius`, `--ui-stripe-font-size-base`.\n * The theme is `night` when the page is dark (`data-theme=\"dark\"`, or the system is dark and `data-theme` is not `light`), else `stripe`.\n */\nexport interface StripeAppearance {\n theme?: 'stripe' | 'night' | 'flat';\n variables?: Record<string, string>;\n rules?: Record<string, Record<string, string>>;\n labels?: 'above' | 'floating';\n disableAnimations?: boolean;\n}\n\nconst TOKENS: readonly (readonly [string, string])[] = [\n ['--ui-stripe-color-primary', 'colorPrimary'],\n ['--ui-stripe-color-background', 'colorBackground'],\n ['--ui-stripe-color-text', 'colorText'],\n ['--ui-stripe-color-danger', 'colorDanger'],\n ['--ui-stripe-font-family', 'fontFamily'],\n ['--ui-stripe-border-radius', 'borderRadius'],\n ['--ui-stripe-font-size-base', 'fontSizeBase'],\n];\n\n// `isDarkPage` lives in the main entry (shared with the Square entry); it stays exported from here so existing imports keep working.\nexport { isDarkPage };\n\n/** Builds the appearance from the tokens in effect on `element` (default: the document root). */\nexport function readStripeAppearance(doc: Document, element: Element = doc.documentElement): StripeAppearance {\n const view = doc.defaultView;\n const variables: Record<string, string> = {};\n if (view) {\n const style = view.getComputedStyle(element);\n for (const [token, variable] of TOKENS) {\n const value = style.getPropertyValue(token).trim();\n if (value) variables[variable] = value;\n }\n }\n return { theme: isDarkPage(doc) ? 'night' : 'stripe', ...(Object.keys(variables).length ? { variables } : {}) };\n}\n","import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, PLATFORM_ID, computed, effect, inject, input, output, signal, untracked, viewChild, ViewEncapsulation } from '@angular/core';\nimport { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport {\n AlertComponent, ButtonComponent, PAYMENT_READINESS_EVERY_MS, PAYMENT_READINESS_TIMEOUT_MS, PAYMENT_REQUEST_TIMEOUT_MS, PAYMENT_STATUS_CHECK_TIMEOUT_MS, PAYMENT_STATUS_FAIL_GRACE_MS, PAYMENT_AUTH_TIMEOUT_MS, PAYMENT_STATUS_POLL_MAX_MS, PAYMENT_STATUS_POLL_MS, PaymentAttemptStatusComponent,\n SkeletonComponent, createPaymentProtection, refusalLabelKey, uiText, wasQueuedOffline, warnQueuedPayment, isAttemptFailedReplay,\n type CheckPaymentStatusFn, type PaymentAttempt, type PaymentAttemptOutcome, type PaymentAttemptResult, type PaymentReadiness, type PaymentReadinessResult, type ReadinessCheckFn,\n} from '@forgeroute/ui';\nimport { STRIPE_LOADER, STRIPE_PAYMENT_DEFAULTS, buildLoadOptions } from '../stripe-loader/stripe-loader';\nimport type { StripeElementsLike, StripeLike, StripeLoadOptions, StripePaymentElementLike } from '../stripe-loader/stripe-types';\nimport type { StripeErrorDisplay, StripeErrorMessageOptions } from '../errors/stripe-errors';\nimport { STRIPE_DEFAULT_ERROR_MESSAGE } from '../errors/stripe-errors';\nimport { MSG_TOKEN_FAILED, confirmationTokenEventOf, MSG_AUTH_FAILED, MSG_AUTH_NOT_COMPLETED, MSG_KEY_MISSING, MSG_INTENT_FAILED, MSG_LOAD_FAILED, MSG_NOT_COMPLETED, MSG_NOT_INITIALIZED, MSG_NO_PAYMENT_METHOD, MSG_REQUIRES_PAYMENT_METHOD, failure, failureFromError, messageOfThrown, normalizeIntent, type StripeConfirmationTokenEvent, type StripeConfirmedEvent, type StripeElementChange, type StripeFailure, type StripeFailureStage, type StripeIntentKind, localizeStripeMessage } from './stripe-outcomes';\nimport { readStripeReturnParams, retrieveIntent, verifyMicrodeposits, type MicrodepositVerifyData, type StripeMicrodepositResult, type StripeReturnResult } from './stripe-actions';\nimport { readStripeAppearance, type StripeAppearance } from './stripe-appearance';\nimport { UiLabelsService } from '@forgeroute/ui';\n\n/** The texts of the screen-reader status region. */\nexport interface StripeA11yMessages {\n loading: string;\n savingMethod: string;\n processingPayment: string;\n methodSaved: string;\n paymentReceived: string;\n paymentProcessing: string;\n paymentAuthorized: string;\n verificationNeeded: string;\n actionRequired: string;\n}\n\n/** The screen-reader messages of the payment form; read on every access, so they follow the app's active language. */\nexport const STRIPE_A11Y_MESSAGES: Readonly<StripeA11yMessages> = {\n get loading() { return uiText('stripePayment.a11y.loading'); },\n get savingMethod() { return uiText('stripePayment.a11y.savingMethod'); },\n get processingPayment() { return uiText('stripePayment.a11y.processingPayment'); },\n get methodSaved() { return uiText('stripePayment.a11y.methodSaved'); },\n get paymentReceived() { return uiText('stripePayment.a11y.paymentReceived'); },\n get paymentProcessing() { return uiText('stripePayment.a11y.paymentProcessing'); },\n get paymentAuthorized() { return uiText('stripePayment.a11y.paymentAuthorized'); },\n get verificationNeeded() { return uiText('stripePayment.a11y.verificationNeeded'); },\n get actionRequired() { return uiText('stripePayment.a11y.actionRequired'); },\n};\n\n/** The exact text shown while the bank-account tab is selected. */\nexport const STRIPE_ACH_NOTICE = 'Signing in to your bank account lets you pay right away. Entering your routing and account numbers instead requires verification with two small deposits, which typically take a couple of days to arrive in your account.';\n\n/**\n * \"Deferred intent\" Elements: the form is shown first, the PaymentIntent / SetupIntent is created on the host's backend when the customer submits.\n * Maps to `stripe.elements({ mode, amount, currency, setup_future_usage, payment_method_types, ... })`.\n */\nexport interface StripeDeferredIntent {\n /** Default: the component's `mode`. */\n mode?: 'payment' | 'setup' | 'subscription';\n /** Smallest currency unit (cents). Changing it later calls `elements.update({ amount })` (no re-init). */\n amount?: number;\n currency: string;\n setupFutureUsage?: 'on_session' | 'off_session';\n captureMethod?: 'automatic' | 'automatic_async' | 'manual';\n onBehalfOf?: string;\n}\n\n/** Called on submit in deferred mode: create the intent on your backend and resolve its client secret (or `{ clientSecret }`). */\nexport type StripeCreateIntentFn = (context: { mode: StripeIntentKind; confirmationToken?: StripeConfirmationTokenEvent | null; attemptKey?: string; payableRef?: string | null }) => Promise<string | { clientSecret: string }>;\n\nexport interface StripeBillingDetails {\n name?: string;\n email?: string;\n phone?: string;\n address?: Record<string, string | null | undefined>;\n}\n\n/**\n * The live Stripe.js objects of a form, handed to the host by `(stripeReady)`: the host's own code can call `stripe.confirmPayment({ elements, ... })`,\n * `elements.submit()`, `elements.update()`, `elements.fetchUpdates()` and `paymentElement.update()` with its own arguments.\n */\nexport interface StripeReadyEvent {\n stripe: StripeLike;\n elements: StripeElementsLike;\n paymentElement: StripePaymentElementLike;\n}\n\n/** What ONE protected confirm learned (its own object, passed down: nothing here lives on the component, so a late answer of an older attempt never leaks into the next). */\ninterface ConfirmTrace {\n /** Failures are held back until the attempt is classified: an UNKNOWN outcome must never be shown or emitted as \"failed\". */\n held: boolean;\n failure: StripeFailure | null;\n thrown: boolean;\n outcome: string | null;\n}\n\n/** Stripe error types and codes that say \"Stripe may or may not have processed this\": never a definitive decline. */\nconst AMBIGUOUS_STRIPE_TYPES = new Set(['api_connection_error', 'api_error', 'rate_limit_error', 'idempotency_error']);\nconst AMBIGUOUS_STRIPE_CODES = new Set(['payment_intent_unexpected_state', 'idempotency_error', 'idempotency_key_in_use', 'lock_timeout']);\n\nlet nextId = 0;\nconst jsonEqual = (a: unknown, b: unknown): boolean => JSON.stringify(a) === JSON.stringify(b);\n\n/**\n * Stripe Payment Element: saves a payment method (`mode=\"setup\"`, a SetupIntent) or takes a payment (`mode=\"payment\"`, a PaymentIntent).\n *\n * The host app creates the intent on its backend and passes the `clientSecret` (or, for a deferred intent, `[deferred]` + `[createIntent]`).\n * Stripe.js is loaded lazily through `@stripe/stripe-js` (an optional peer dependency); nothing of Stripe is in the library's static imports.\n *\n * <ui-stripe-payment mode=\"setup\" [publishableKey]=\"key\" [clientSecret]=\"secret()\" submitLabel=\"Save card\"\n * (confirmed)=\"onSaved($event)\" (failed)=\"onFailed($event)\" />\n *\n * Every Stripe.js call and option reproduces what the CRM apps do today; see docs/stripe.md (\"Parity with the existing app implementations\").\n */\n@Component({\n selector: 'ui-stripe-payment',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [AlertComponent, ButtonComponent, PaymentAttemptStatusComponent, SkeletonComponent],\n host: { '[attr.aria-busy]': '!mountOnly() && (loading() || submitting()) ? \"true\" : null' },\n template: `\n <div class=\"sp\">\n @if (!mountOnly() || a11yMessages()) {\n <div class=\"sp-sr\" role=\"status\" aria-live=\"polite\" data-testid=\"stripe-status\">{{ statusText() }}</div>\n }\n @if (!mountOnly() && protectionOn()) {\n <ui-payment-attempt-status [attempt]=\"attempt\" [readiness]=\"readiness\" [allowStartOver]=\"allowStartOver()\" (retryLoad)=\"reload()\" />\n }\n @if (!mountOnly() && (loading() || pending())) {\n <div class=\"sp-skeleton\" data-testid=\"stripe-skeleton\" aria-hidden=\"true\">\n <ui-skeleton [height]=\"44\" [mb]=\"10\" />\n <ui-skeleton [height]=\"44\" [mb]=\"10\" />\n <ui-skeleton [height]=\"44\" width=\"60%\" />\n </div>\n }\n @if (!mountOnly() && loadErrorText(); as text) {\n <div class=\"sp-block\" data-testid=\"stripe-load-error\"><ui-alert variant=\"danger\">{{ text }}</ui-alert></div>\n }\n @if (!mountOnly() && required()) {\n <div class=\"sp-label\" data-testid=\"stripe-required-label\">{{ label() }}<span class=\"sp-required\" aria-hidden=\"true\">*</span></div>\n }\n <div #mount class=\"sp-mount\" [attr.id]=\"mountId() || null\" [class]=\"mountClass()\" [class.sp-mount--hidden]=\"mountHidden()\" [attr.aria-hidden]=\"mountHidden() ? 'true' : null\" [attr.inert]=\"mountHidden() ? '' : null\"\n [attr.role]=\"mountOnly() ? null : 'group'\" [attr.aria-label]=\"mountOnly() ? null : label()\" data-testid=\"stripe-mount\"></div>\n @if (!mountOnly() && achNoticeVisible()) {\n <div class=\"sp-block\" [attr.data-testid]=\"achNoticeTestId()\"><ui-alert variant=\"info\">{{ achNotice() }}</ui-alert></div>\n }\n @if (!mountOnly() && errorText(); as text) {\n <div class=\"sp-block\" [id]=\"errorId\" data-testid=\"stripe-error\"><ui-alert variant=\"danger\">{{ text }}</ui-alert></div>\n }\n @if (!mountOnly() && showSubmit()) {\n <div class=\"sp-actions\">\n <ui-button variant=\"primary\" type=\"button\" [loading]=\"submitting()\" [disabled]=\"submitDisabled()\" [ariaDescribedBy]=\"errorText() ? errorId : undefined\"\n data-testid=\"stripe-submit\" (click)=\"confirm()\">{{ effectiveSubmitLabel() }}</ui-button>\n </div>\n }\n </div>\n `,\n styles: [`\n ui-stripe-payment { display: block; min-width: 0; }\n ui-stripe-payment .sp-sr {\n position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;\n clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;\n }\n .sp-block { margin-top: 12px; }\n .sp-label { font-size: 0.875rem; font-weight: 500; color: #1e293b; margin-bottom: 6px; }\n .sp-required { color: #dc2626; margin-left: 2px; }\n .sp-actions { margin-top: 16px; display: flex; justify-content: flex-end; }\n ui-stripe-payment .sp { position: relative; }\n /* While loading the form is kept laid out (so Stripe can measure it and open Apple Pay / Link / the bank login) but invisible and untouchable. */\n .sp-mount--hidden { position: absolute; top: 0; left: 0; right: 0; opacity: 0; pointer-events: none; }\n /* Phones: the button fills the row. ui-button's host is inline-flex and its inner button is content-sized, so the inner .btn is stretched (ui-button has no host width hook). */\n @media (max-width: 480px) {\n .sp-actions { display: block; }\n .sp-actions ui-button { display: flex; }\n ui-stripe-payment .sp-actions .btn { width: 100%; }\n }\n `],\n})\nexport class StripePaymentComponent {\n protected readonly labels = inject(UiLabelsService);\n private readonly loader = inject(STRIPE_LOADER);\n private readonly defaults = inject(STRIPE_PAYMENT_DEFAULTS);\n private readonly doc = inject(DOCUMENT);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n // ── Inputs ─────────────────────────────────────────────────────────────\n /**\n * Mount-only mode: the component only mounts the Payment Element. No submit button, skeleton, status text (unless `a11yMessages` is set), bank notice or error\n * alert; it never submits, confirms or updates by itself; load failures go to `(loadError)` only. The host keeps its own confirm code and calls Stripe.js with the\n * objects from `(stripeReady)`. `mountId` / `mountClass` still apply, and `(ready)`, `(elementChange)`, `(paymentMethodTypeChange)` still emit.\n */\n readonly mountOnly = input(false);\n /** `'setup'` saves a payment method (`confirmSetup`), `'payment'` takes a payment (`confirmPayment`). */\n readonly mode = input<StripeIntentKind>('payment');\n /** The publishable key (`pk_...`). Falls back to `provideStripePayment({ publishableKey })`. */\n readonly publishableKey = input<string | null>(null);\n /** The client secret of the SetupIntent / PaymentIntent your backend created. Changing it re-creates the form. */\n readonly clientSecret = input<string | null>(null);\n /** Deferred intent: show the form first, create the intent on submit with `createIntent`. Used instead of `clientSecret`. */\n readonly deferred = input<StripeDeferredIntent | null>(null);\n /** Creates the intent on submit (deferred mode) and resolves its client secret. */\n readonly createIntent = input<StripeCreateIntentFn | null>(null);\n /** A Stripe Connect account id (`acct_...`): `loadStripe(key, { stripeAccount })`. */\n readonly stripeAccount = input<string | null>(null);\n /** Stripe.js locale. */\n readonly locale = input<string | null>(null);\n /** Further `loadStripe` options. */\n readonly stripeOptions = input<StripeLoadOptions | null>(null);\n /** Payment method types for a DEFERRED intent (`elements({ payment_method_types })`). With a client secret the intent decides, nothing is passed. */\n readonly paymentMethodTypes = input<string[] | null>(null);\n /** Extra `stripe.elements()` options, merged last. */\n readonly elementsOptions = input<Record<string, unknown> | null>(null);\n\n // Payment Element options (`elements.create('payment', ...)`): only the ones that are set are passed.\n /** `'tabs'` (default), `'accordion'`, an object, or `null` to pass no layout. */\n readonly layout = input<string | Record<string, unknown> | null>('tabs');\n readonly paymentMethodOrder = input<string[] | null>(null);\n /** `{ applePay: 'never', googlePay: 'never' }` hides the wallets. */\n readonly wallets = input<Record<string, string> | null>(null);\n /** `{ billingDetails: { email: 'never', phone: 'never', address: 'auto' } }` etc. */\n readonly fields = input<Record<string, unknown> | null>(null);\n /** Pre-filled values: `{ billingDetails: { name, email, address: { country: 'US' } } }`. A later change updates the element in place. */\n readonly defaultValues = input<Record<string, unknown> | null>(null);\n readonly business = input<{ name: string } | null>(null);\n readonly terms = input<Record<string, string> | null>(null);\n /** Extra Payment Element options, merged last (readOnly, fields, ...). */\n readonly paymentElementOptions = input<Record<string, unknown> | null>(null);\n /** The Elements appearance. */\n readonly appearance = input<StripeAppearance | null>(null);\n /** Derive the appearance from the `--ui-stripe-*` CSS tokens (light / dark) when no `appearance` is set. */\n readonly appearanceFromTokens = input(false);\n\n // Confirmation\n /** Where Stripe sends the customer back after a redirect. Unset = the current page (`window.location.href`); `null` = pass no `return_url`. */\n readonly returnUrl = input<string | null | undefined>(undefined);\n /** Billing details sent on confirm (`confirmParams.payment_method_data.billing_details`), needed for fields hidden with `'never'`. */\n readonly billingDetails = input<StripeBillingDetails | null>(null);\n /** Extra `confirmParams`, merged last. */\n readonly confirmParams = input<Record<string, unknown> | null>(null);\n /** `'if_required'` (default) keeps the customer on the page unless the method needs a redirect. */\n readonly redirect = input<'if_required' | 'always'>('if_required');\n /** Call `elements.submit()` before confirming. Unset = automatic: yes for a deferred intent (Stripe requires it), no with a client secret. */\n readonly submitBeforeConfirm = input<boolean | null>(null);\n /** After a payment comes back `requires_action` (not a bank verification), run `stripe.handleCardAction` (3D Secure) before reporting. */\n readonly autoHandleCardAction = input(false);\n /**\n * Opt-in (default off, nothing changes): when `confirm()` runs for a CARD, create a ConfirmationToken from the Elements (`stripe.createConfirmationToken({ elements })`, after\n * `elements.submit()`) before the intent is created. The token is emitted as `(confirmationToken)` and handed to `createIntent({ mode, confirmationToken })`, so the host's backend\n * can read the card funding (credit / debit / prepaid) from Stripe BEFORE it creates the intent. A token that cannot be made never stops the payment (the `createIntent`\n * context then has no token). Only made for a DEFERRED intent (`[deferred]`, no `clientSecret`: Stripe requires deferred Elements for `createConfirmationToken`); never for a bank account, Link or a wallet tab, nor for `confirm({ useExistingIntent: true })`.\n */\n readonly collectConfirmationToken = input(false);\n\n // ── Duplicate-payment protection and readiness gate (opt-in: with `duplicateProtection` off, nothing below changes any existing behaviour) ──\n /**\n * Turns on the duplicate-charge protection (docs: \"Duplicate-payment protection\") and the readiness gate (\"Readiness gate\"): the synchronous in-flight lock for the button, Enter and `confirm()`,\n * the attempt key, the UNKNOWN outcome (timeout, offline mid-flight) with the host's `checkStatus`, offline refusal, the paid lock and the readiness reasons. Default OFF: `confirm()` behaves\n * exactly as it always did and `createIntent` receives the same context.\n */\n readonly duplicateProtection = input(false);\n /**\n * The amount of the attempt in MAJOR units (the base amount the payer typed): it goes into the attempt marker, the derived key and the host's records. Default: the deferred amount / 100. A caller whose deferred\n * amount includes fees (the Stripe payment-panel plugin) passes the base amount here, so a payment recorded after an unknown outcome is the base amount, not the fee-inclusive charge.\n */\n readonly attemptAmount = input<number | null>(null);\n /**\n * The method of the attempt as the HOST names it (marker, derived key, `succeeded` outcome / tombstone). Default: the Stripe payment method type (`'card'`, `'us_bank_account'`). The payment-panel plugin passes the\n * panel's own method (`'CARD'`, `'ACH'`), so an attempt adopted by a reload or another tab is recorded with the method the panel knows, not with a Stripe type.\n */\n readonly attemptMethod = input<string | null>(null);\n /**\n * The payable this is for (an invoice, a balance, a payment link). While an attempt is undecided its opaque marker (key, amount, method) is stored under it in `localStorage`, so a RELOAD or a\n * SECOND TAB of the same payable starts locked (unknown) with the same attempt key. Without it the protection covers this page instance only. Nothing else is stored.\n */\n readonly payableRef = input<string | null>(null);\n /** A key the host supplies; empty = generated per payment attempt session. It reaches `createIntent({ attemptKey })`. */\n readonly attemptKey = input<string | null>(null);\n /** The host's status check by attempt key: resolves an UNKNOWN outcome. */\n readonly checkStatus = input<CheckPaymentStatusFn | null>(null);\n /** The payable is paid (host re-render, back navigation): every confirm is refused for good. */\n readonly paid = input(false);\n /** The host reports an ambiguous result of ITS charge call: \"Checking your payment...\" while true. */\n readonly hostPending = input(false);\n readonly statusPollMs = input(PAYMENT_STATUS_POLL_MS);\n readonly statusPollMaxMs = input(PAYMENT_STATUS_POLL_MAX_MS);\n /** A status check slower than this counts as unknown (ms). */\n readonly statusCheckTimeoutMs = input(PAYMENT_STATUS_CHECK_TIMEOUT_MS);\n /** While the attempt's own request is unsettled, a status answer `failed` is ignored for this long (ms). */\n readonly statusFailGraceMs = input(PAYMENT_STATUS_FAIL_GRACE_MS);\n /** Offer \"Start over\" after the status polling window (a new attempt with a NEW key). Turn it on ONLY when your backend allows ONE open or succeeded attempt per payable and answers 409 `payment_in_flight` to a second key: that rule is what makes it safe. */\n readonly allowStartOver = input(false);\n /** Managed environments where `navigator.onLine === false` is a false negative (captive portal, VPN): do not refuse a payment because of the browser's offline flag (default false). */\n readonly offlineOverride = input(false);\n /** The request timeout is replaced by this while a 3-D Secure challenge or the bank window is open (ms). */\n readonly authTimeoutMs = input(PAYMENT_AUTH_TIMEOUT_MS);\n /** How long ONE `confirm()` (intent creation + Stripe confirmation) may take before the outcome counts as unknown (ms). */\n readonly confirmTimeoutMs = input(PAYMENT_REQUEST_TIMEOUT_MS);\n /** The host's readiness endpoint (`GET /api/payments/ready`): `{ ready, reasons[] }`. */\n readonly readinessCheck = input<ReadinessCheckFn | null>(null);\n readonly readinessTimeoutMs = input(PAYMENT_READINESS_TIMEOUT_MS);\n readonly readinessEveryMs = input(PAYMENT_READINESS_EVERY_MS);\n\n // Presentation\n readonly submitLabel = input('');\n /** Show the built-in submit button; turn off to use your own and call `confirm()`. */\n readonly showSubmit = input(true);\n readonly disabled = input(false);\n /** The host is still creating the intent: show the loading skeleton. */\n readonly pending = input(false);\n /** Accessible name of the payment form (also its visible heading when `required` is set). */\n readonly labelInput = input<string | null>(null, { alias: 'label' });\n readonly label = computed(() => this.labelInput() ?? this.labels.t('stripeStripePayment.label'));\n /** The payment details are required (a required wizard step): a visible heading with a red asterisk is shown above the form. Not shown in `mountOnly` mode. */\n readonly required = input(false);\n /** The `id` of the element container (an app's e2e selector such as `#payment-element`). */\n readonly mountId = input('');\n /** Extra CSS classes on the element container. */\n readonly mountClass = input('');\n /** Show the bank-account notice while that tab is selected. */\n readonly showAchNotice = input(true);\n readonly achNoticeInput = input<string | null>(null, { alias: 'achNotice' });\n readonly achNotice = computed(() => this.achNoticeInput() ?? this.labels.t('stripePayment.achNotice'));\n /** The `data-testid` of the notice (an app's existing e2e selector, e.g. `ach-setup-notice`). */\n readonly achNoticeTestId = input('stripe-ach-notice');\n /** The payment method type the host shows before Stripe reports one (cremo: `'card'`); `paymentMethodTypeChange` fires only when the reported type differs from it (or from the last report). */\n readonly initialPaymentMethodType = input('card');\n /** Show failures in the built-in alert. Turn off when the host shows `(failed)` itself. */\n readonly showErrors = input(true);\n /** `'friendly'` (default), `'table'` (table text, else Stripe's own message: the cremo payment flows) or `'stripe'` (Stripe's own message). See `getStripeErrorMessage`. */\n readonly errorDisplay = input<StripeErrorDisplay>('friendly');\n /** Different error display for single steps (e.g. `{ submit: 'stripe', action: 'stripe' }`: raw Stripe text for the validation and 3DS steps, `errorDisplay` for the rest). */\n readonly errorDisplayByStage = input<Partial<Record<StripeFailureStage, StripeErrorDisplay>> | null>(null);\n /** The text when Stripe sends an error with no message (default: \"Payment failed. Please try again.\"). */\n readonly errorFallback = input('');\n /** The same per step (Settings: `{ submit: 'Failed to submit payment information', confirm: 'Failed to confirm payment method' }`); wins over `errorFallback`. */\n readonly errorFallbackByStage = input<Partial<Record<StripeFailureStage, string>> | null>(null);\n /** Replacement texts by code: Stripe error codes AND the library's own failure codes (`not_initialized`, `no_payment_method`, `requires_payment_method`, `not_completed`, `authentication_failed`, ...). `{status}` in a text becomes Stripe's status of the intent (\"Unexpected payment status: {status}\"). */\n readonly errorMessages = input<Record<string, string> | null>(null);\n readonly loadErrorMessageInput = input<string | null>(null, { alias: 'loadErrorMessage' });\n readonly loadErrorMessage = computed(() => this.loadErrorMessageInput() ?? this.labels.t('stripeStripePayment.loadErrorMessage'));\n /** Texts of the screen-reader status region (translate them); missing keys keep the English defaults. */\n readonly a11yMessages = input<Partial<StripeA11yMessages> | null>(null);\n\n // ── Outputs ────────────────────────────────────────────────────────────\n /**\n * The live Stripe.js objects, emitted once each time the Elements are created: right after `elements.create('payment')` and `mount()` succeeded, before `(ready)`\n * (the moment the old inline code had `this.stripe` / `this.elements` / `this.paymentElement` assigned). `null` is emitted when they go away (the form is re-created for new\n * inputs, or `destroyElements()`): drop your references. Destroying the component itself emits nothing (the host owns that moment).\n */\n readonly stripeReady = output<StripeReadyEvent | null>();\n /** The Payment Element finished loading. */\n readonly ready = output<void>();\n /** The customer picked another payment method type (`'card'`, `'us_bank_account'`, ...). */\n readonly paymentMethodTypeChange = output<string>();\n /** Every change of the form: completeness and the selected type. */\n readonly elementChange = output<StripeElementChange>();\n /** A ConfirmationToken of the typed card was created (`collectConfirmationToken` during `confirm()`, or `createConfirmationToken()`). Only emitted for a card. */\n readonly confirmationToken = output<StripeConfirmationTokenEvent>();\n /** The intent was confirmed (succeeded, processing, needs bank verification, or needs a further action). */\n readonly confirmed = output<StripeConfirmedEvent>();\n /** A step failed (validation, intent creation, confirmation). `message` is ready to show. */\n readonly failed = output<StripeFailure>();\n /** Stripe.js or the Payment Element could not be loaded. */\n readonly loadError = output<StripeFailure>();\n /** A confirm started / ended (the synchronous lock; only with `duplicateProtection`). */\n readonly inFlightChange = output<boolean>();\n /** Unified outcome of a payment attempt: `succeeded`, `failed`, `unknown`, `refused` (with `reason`), `pending` (only with `duplicateProtection`). */\n readonly outcome = output<PaymentAttemptOutcome>();\n /** The attempt key in effect (only with `duplicateProtection`). */\n readonly attemptKeyChange = output<string>();\n /** The readiness gate changed (only with `duplicateProtection`). */\n readonly readinessChange = output<PaymentReadinessResult>();\n\n // ── State ──────────────────────────────────────────────────────────────\n readonly loading = signal(false);\n readonly isReady = signal(false);\n readonly submitting = signal(false);\n readonly complete = signal(false);\n /** The selected payment method type, `null` until Stripe reports one. */\n readonly selectedType = signal<string | null>(null);\n readonly errorText = signal('');\n readonly loadErrorText = signal('');\n private readonly announcement = signal('');\n\n protected readonly errorId = `ui-stripe-error-${nextId++}`;\n private readonly mountRef = viewChild<ElementRef<HTMLElement>>('mount');\n\n protected readonly mountHidden = computed(() => !this.mountOnly() && (this.loading() || this.pending() || !!this.loadErrorText()));\n protected readonly achNoticeVisible = computed(() => this.showAchNotice() && this.selectedType() === 'us_bank_account');\n protected readonly effectiveSubmitLabel = computed(() => this.submitLabel() || (this.mode() === 'setup' ? this.labels.t('stripePayment.saveMethod') : this.labels.t('stripePayment.pay')));\n protected readonly submitDisabled = computed(() => this.disabled() || this.loading() || this.pending() || !this.isReady() || !!this.loadErrorText()\n || (this.protectionOn() && (this.attempt.unknown() || this.attempt.paidLocked() || !this.readiness.ready())));\n private readonly messages = computed((): StripeA11yMessages => {\n const given = Object.fromEntries(Object.entries(this.a11yMessages() ?? {}).filter(([, text]) => typeof text === 'string')) as Partial<StripeA11yMessages>;\n return { ...STRIPE_A11Y_MESSAGES, ...given };\n });\n protected readonly statusText = computed(() => {\n if (this.loading()) return this.messages().loading;\n if (this.submitting()) return this.mode() === 'setup' ? this.messages().savingMethod : this.messages().processingPayment;\n return this.announcement();\n });\n\n /** How `loadStripe` is called: key + options. Re-creates everything when it changes. */\n private readonly connection = computed(() => {\n const key = this.publishableKey() || this.defaults.publishableKey || '';\n return { key, options: buildLoadOptions(this.stripeAccount(), this.locale() ?? this.defaults.locale, this.stripeOptions()) };\n }, { equal: jsonEqual });\n\n /** The `stripe.elements()` options without the deferred amount (that one is updated in place); `null` while there is no intent to show. */\n private readonly elementsConfig = computed((): Record<string, unknown> | null => {\n const secret = this.clientSecret();\n const deferred = this.deferred();\n let options: Record<string, unknown>;\n if (secret) {\n options = { clientSecret: secret };\n } else if (deferred) {\n options = {\n mode: deferred.mode ?? this.mode(),\n currency: deferred.currency,\n ...(deferred.setupFutureUsage ? { setup_future_usage: deferred.setupFutureUsage } : {}),\n ...(deferred.captureMethod ? { capture_method: deferred.captureMethod } : {}),\n ...(deferred.onBehalfOf ? { on_behalf_of: deferred.onBehalfOf } : {}),\n ...(this.paymentMethodTypes() ? { payment_method_types: this.paymentMethodTypes() } : {}),\n };\n } else {\n return null;\n }\n const appearance = this.appearance();\n if (appearance) options['appearance'] = appearance;\n return { ...options, ...(this.elementsOptions() ?? {}) };\n }, { equal: jsonEqual });\n\n /** The Payment Element options that need a new element when they change (default values and read-only are updated in place). */\n private readonly elementConfig = computed(() => {\n const options: Record<string, unknown> = {};\n const layout = this.layout();\n if (layout) options['layout'] = layout;\n if (this.paymentMethodOrder()) options['paymentMethodOrder'] = this.paymentMethodOrder();\n if (this.wallets()) options['wallets'] = this.wallets();\n if (this.fields()) options['fields'] = this.fields();\n if (this.business()) options['business'] = this.business();\n if (this.terms()) options['terms'] = this.terms();\n return { ...options, ...(this.paymentElementOptions() ?? {}) };\n }, { equal: jsonEqual });\n\n private stripe: StripeLike | null = null;\n private stripeSignature = '';\n private elements: StripeElementsLike | null = null;\n private element: StripePaymentElementLike | null = null;\n private generation = 0;\n private lastType: string | null = null;\n private lastAmount: number | undefined;\n private lastFailure: StripeFailure | null = null;\n private destroyed = false;\n /** Counts the confirms: only the NEWEST one may clear `submitting` (a late, older confirm must not unlock the newer one's screen). */\n private confirmSeq = 0;\n /** What the element was last given, so a change made while it loaded is applied once it is ready. */\n private appliedDefaultValues = '';\n private appliedDisabled = false;\n\n /** The protection applies to PAYMENTS only: saving a card (`mode=\"setup\"`) moves no money, so there is nothing to double-charge and the flag is ignored there. */\n protected readonly protectionOn = computed(() => this.duplicateProtection() && this.mode() === 'payment');\n /** The duplicate-payment protection (only active with `duplicateProtection` in payment mode). */\n readonly attempt: PaymentAttempt;\n readonly readiness: PaymentReadiness;\n /** The key of the attempt that is running (passed to `createIntent`); `null` with protection off. */\n /** Bumped by \"Retry loading\": the init effect runs again. */\n private readonly retryTick = signal(0);\n\n constructor() {\n const protection = createPaymentProtection(this, {\n amount: () => { const own = this.attemptAmount(); if (own != null) return own; const minor = this.deferred()?.amount; return minor == null ? null : minor / 100; }, // the deferred amount is in minor units (cents); attempts, markers and derived keys speak major units like every other form\n method: () => this.attemptMethod() ?? this.selectedType() ?? 'card',\n sdk: () => (this.loadErrorText() ? 'blocked' : this.loading() ? 'loading' : 'ok'),\n enabled: () => this.protectionOn(),\n onOutcome: o => this.outcome.emit(o),\n onInFlightChange: v => this.inFlightChange.emit(v),\n onKeyChange: k => { if (this.protectionOn()) this.attemptKeyChange.emit(k); },\n onReadinessChange: r => { if (this.protectionOn()) this.readinessChange.emit(r); },\n });\n this.attempt = protection.attempt;\n this.readiness = protection.readiness;\n effect(() => {\n const mount = this.mountRef();\n const connection = this.connection();\n const elements = this.elementsConfig();\n const element = this.elementConfig();\n this.retryTick();\n if (!mount) return;\n untracked(() => { void this.init(mount.nativeElement, connection, elements, element); });\n });\n // The deferred amount changes without a new form (a fee shown for the other payment method): elements.update({ amount }).\n effect(() => {\n const amount = this.deferred()?.amount;\n untracked(() => {\n if (!this.mountOnly() && amount !== undefined && this.lastAmount !== undefined && amount !== this.lastAmount && this.elements?.update) this.elements.update({ amount });\n this.lastAmount = amount;\n });\n });\n effect(() => {\n const defaultValues = this.defaultValues();\n untracked(() => this.applyDefaultValues(defaultValues));\n });\n effect(() => {\n const disabled = this.disabled();\n untracked(() => this.applyDisabled(disabled));\n });\n inject(DestroyRef).onDestroy(() => { this.destroyed = true; this.generation++; this.disposeElements(); this.stripe = null; });\n }\n\n // ── Public methods ─────────────────────────────────────────────────────\n\n /**\n * Submits the form: `elements.submit()` (when required), the deferred intent, then `confirmSetup` / `confirmPayment`.\n * Resolves the normalised result (also emitted as `confirmed`), or `null` after a failure (emitted as `failed`) or when nothing was started\n * (already submitting, or disabled). Never rejects: anything Stripe.js throws becomes a `failed` event.\n *\n * `useExistingIntent`: the intent already exists (a retry after a failed attempt, or one created earlier): no `elements.submit()`, no `createIntent`,\n * and `confirmPayment` / `confirmSetup` is called WITHOUT a client secret, exactly like cremo's intake retry. Pass `clientSecret` (the one you stored) to send it.\n */\n async confirm(options: { useExistingIntent?: boolean; clientSecret?: string } = {}): Promise<StripeConfirmedEvent | null> {\n if (this.disabled()) return null;\n if (this.protectionOn()) return this.confirmProtected(options); // the attempt's synchronous lock is the guard (an older, hung confirm must not block a new attempt the status check unlocked)\n if (this.submitting()) return null;\n return this.confirmCore(options, null);\n }\n\n /**\n * `confirm()` under the duplicate-payment protection: the gate (paid / unknown / not ready / offline: nothing is sent), then ONE attempt under the synchronous lock, raced against\n * `confirmTimeoutMs`. A timeout, going offline, a thrown error, a connection error or an abandoned 3-D Secure challenge make the outcome UNKNOWN (locked, status check by key); only\n * a definitive Stripe refusal unlocks with a new key. Never retries by itself.\n */\n private async confirmProtected(options: { useExistingIntent?: boolean; clientSecret?: string }): Promise<StripeConfirmedEvent | null> {\n if (!this.readiness.passSync()) {\n const reason = this.readiness.reasons()[0] ?? 'checking';\n this.outcome.emit({ kind: 'refused', attemptKey: this.attempt.key(), reason });\n this.fail(failure(reason, this.labels.t(refusalLabelKey(reason)), 'submit'));\n return null;\n }\n if (this.attempt.paidLocked() || this.attempt.unknown()) { this.attempt.begin(); return null; } // refuses and reports `refused`\n const run = await this.attempt.run<StripeConfirmedEvent | null>(async key => {\n // Everything this attempt learns lives in ITS OWN trace and key (arguments, never instance fields), so a late answer of an older attempt can never leak into the next one.\n const trace: ConfirmTrace = { held: true, failure: null, thrown: false, outcome: null };\n try {\n const event = await this.confirmCore(options, key, trace, this.attempt.pinnedRef());\n trace.held = false;\n return this.classifyConfirm(event, trace, this.attempt.isLive(key));\n } finally { trace.held = false; }\n }, { timeoutMs: this.confirmTimeoutMs() });\n return 'refused' in run && run.refused ? null : (run.value ?? null);\n }\n\n /** What the result of the core confirm means for the attempt (see {@link confirmProtected}). */\n private classifyConfirm(event: StripeConfirmedEvent | null, trace: ConfirmTrace, live: boolean): PaymentAttemptResult<StripeConfirmedEvent | null> {\n // A LATE answer of an older attempt decides nothing on screen: the payer sees failures and announcements only of the attempt that is still current. `run()` applies the returned result with the same rule.\n const show = (f: StripeFailure): void => { if (live) this.publishFailure(f); };\n const say = (key: 'paymentAttempt.authRequired' | 'paymentAttempt.authAbandoned'): void => { if (live) this.announcement.set(this.labels.t(key)); };\n if (event) {\n if (event.outcome === 'requires_action') { say('paymentAttempt.authRequired'); return { kind: 'pending', value: event, reason: 'auth_required' }; }\n return { kind: 'success', value: event };\n }\n const f = trace.failure;\n if (!f) return { kind: 'unknown', reason: 'no_result' }; // neither an event nor a failure: nothing can be said, so the status check decides\n if (f.code === 'attempt_failed_use_new_key') { show(f); return { kind: 'failure', reason: f.code }; } // a replay of a FAILED attempt: nothing was charged, the next click derives a NEW key\n if (f.stage === 'submit' || f.stage === 'intent') { show(f); return { kind: 'released', reason: f.code }; } // nothing was charged: unlock, the key is kept\n if (f.stage === 'action') {\n // After the challenge Stripe put the intent back to \"needs a payment method\" (the bank refused the authentication): nothing was charged, a definitive failure. Anything else (an abandoned\n // challenge, an error without an intent, a thrown error) proves nothing and stays unknown: the backend cancels the PaymentIntent of an abandoned challenge and answers `failed`.\n const errorIntent = (f.error as { payment_intent?: { status?: string } } | undefined)?.payment_intent;\n const refusedByBank = f.code === 'authentication_failed' || (f.code === 'payment_intent_authentication_failure' && errorIntent?.status === 'requires_payment_method');\n if (refusedByBank && !trace.thrown) { show(f); return { kind: 'failure', reason: f.code }; }\n say('paymentAttempt.authAbandoned');\n return { kind: 'unknown', reason: 'auth_abandoned' };\n }\n if (trace.thrown || (f.type !== undefined && AMBIGUOUS_STRIPE_TYPES.has(f.type)) || AMBIGUOUS_STRIPE_CODES.has(f.code)) return { kind: 'unknown', reason: 'error' };\n // The result stage: Stripe gave an intent in a state that proves the payment did NOT go through (needs a new payment method, cancelled) or one that proves nothing (no intent at all, an\n // unexpected status): only the former is a definitive failure.\n if (f.stage === 'result' && f.code !== 'requires_payment_method' && f.code !== 'no_payment_method' && trace.outcome !== 'canceled') return { kind: 'unknown', reason: 'unexpected_status' };\n show(f); // a definitive refusal by Stripe: the payer sees it, the key is renewed\n return { kind: 'failure', reason: f.code };\n }\n\n /** \"Retry loading\" of a blocked Stripe.js / Payment Element: builds the form again. */\n protected reload(): void { this.retryTick.update(n => n + 1); }\n\n /** The host reports that ITS charge call timed out or is ambiguous (only with `duplicateProtection`). */\n markUnknown(): void { this.attempt.markUnknown('host'); }\n /** The host reports that the payment succeeded (locks the form for this payable). */\n markSucceeded(): void { this.attempt.succeed('host'); }\n /** The host reports a DEFINITIVE failure (declined): unlock with a NEW key. */\n markFailed(): void { this.attempt.fail('host'); }\n /** The host did not use the payment and nothing reached Stripe: unlock, the attempt key is KEPT. */\n markNotCharged(): void { this.attempt.markNotCharged(); }\n /** The host starts a deliberate SECOND payment of this payable (an explicit \"pay again\" flow): forgets the paid state this form saw, removes the succeeded record and moves the epoch so the next attempt has a NEW key. Does nothing against the host's own `paid` input. */\n resetPaid(): void { this.attempt.resetPaid(); }\n\n private async confirmCore(options: { useExistingIntent?: boolean; clientSecret?: string }, attemptKey: string | null, trace?: ConfirmTrace, payableRef: string | null = null): Promise<StripeConfirmedEvent | null> {\n const stripe = this.stripe;\n const elements = this.elements;\n if (!stripe || !elements) { this.fail(failure('not_initialized', MSG_NOT_INITIALIZED, 'submit'), trace); return null; }\n const mine = ++this.confirmSeq;\n this.submitting.set(true);\n this.errorText.set('');\n this.announcement.set('');\n let stage: StripeFailureStage = 'submit';\n try {\n const mode = this.mode();\n const existing = options.useExistingIntent === true;\n const deferred = !existing && !this.clientSecret() && !!this.deferred();\n // Stripe only allows createConfirmationToken on a deferred-intent Elements group (no client secret): with a client secret the token is never attempted.\n const wantToken = deferred && this.collectConfirmationToken() && (this.selectedType() ?? 'card') === 'card';\n if (!existing && ((this.submitBeforeConfirm() ?? deferred) || wantToken)) {\n const { error } = await elements.submit();\n if (error) { this.fail(failureFromError(error, 'submit', this.errorOptions('submit')), trace); return null; }\n }\n let token: StripeConfirmationTokenEvent | null = null;\n if (wantToken) {\n const made = await this.makeConfirmationToken(stripe, elements);\n if ('id' in made && made.paymentMethodType === 'card') { token = made; this.confirmationToken.emit(made); }\n }\n let secret: string | undefined = existing ? options.clientSecret : undefined;\n if (deferred) {\n stage = 'intent';\n const create = this.createIntent();\n if (!create) { this.fail(failure('no_intent_factory', MSG_INTENT_FAILED, 'intent'), trace); return null; }\n try {\n const context = token ? { mode, confirmationToken: token } : { mode };\n const created = await create(attemptKey ? { ...context, attemptKey, payableRef } : context);\n if (wasQueuedOffline(created)) { warnQueuedPayment(); this.fail(failure('not_sent', this.labels.t('paymentAttempt.queuedOffline'), 'intent'), trace); return null; } // the offline layer QUEUED the request instead of sending it: no intent exists, and the queued request may still replay\n secret = typeof created === 'string' ? created : created?.clientSecret;\n } catch (err) {\n // The payments service says this attempt FAILED before (`attempt_failed_use_new_key`): not a retryable intent error but a definitive failure that moves the epoch.\n this.fail(failure(isAttemptFailedReplay(err) ? 'attempt_failed_use_new_key' : 'intent_creation_failed', messageOfThrown(err, STRIPE_DEFAULT_ERROR_MESSAGE), 'intent', messageOfThrown(err, '')), trace);\n return null;\n }\n if (!secret) { this.fail(failure('intent_creation_failed', MSG_INTENT_FAILED, 'intent'), trace); return null; }\n }\n stage = 'confirm';\n const confirmParams = this.buildConfirmParams();\n const params: Record<string, unknown> = {\n elements,\n ...(secret ? { clientSecret: secret } : {}),\n ...(confirmParams ? { confirmParams } : {}),\n redirect: this.redirect(),\n };\n const result = mode === 'setup' ? await stripe.confirmSetup(params) : await stripe.confirmPayment(params);\n if (result.error) { this.fail(failureFromError(result.error, 'confirm', this.errorOptions('confirm')), trace); return null; }\n const intent = mode === 'setup' ? result.setupIntent : result.paymentIntent;\n if (!intent) {\n this.fail(failure('not_completed', mode === 'setup' ? 'Payment method setup was incomplete. Please try again.' : MSG_NOT_COMPLETED, 'result'), trace);\n return null;\n }\n let event = normalizeIntent(mode, intent);\n if (mode === 'setup' && !event.paymentMethodId) { this.fail(failure('no_payment_method', MSG_NO_PAYMENT_METHOD, 'result'), trace); return null; }\n if (mode === 'payment' && event.outcome === 'requires_action' && this.autoHandleCardAction()) {\n stage = 'action';\n if (trace) this.attempt.markPending('auth_required'); // a challenge is open: the request timeout is replaced by authTimeoutMs\n const handled = await this.runCardAction(stripe, intent.client_secret, trace);\n if (!handled) return null;\n event = handled;\n }\n return this.finish(event, false, trace);\n } catch (err) {\n if (trace) trace.thrown = true;\n this.fail(this.thrownFailure(err, stage), trace);\n return null;\n } finally {\n if (mine === this.confirmSeq) this.submitting.set(false);\n }\n }\n\n /**\n * Creates a ConfirmationToken from the typed form (`elements.submit()`, then `stripe.createConfirmationToken({ elements })`) so a host can learn the card's funding before it\n * creates any intent (a fee that depends on credit / debit). Resolves the token event (also emitted as `(confirmationToken)` when it is a card), or the failure (returned only,\n * not emitted, and nothing is shown: Stripe's own form already marks an incomplete field). `null` when nothing was started (already submitting, or disabled).\n */\n async createConfirmationToken(): Promise<StripeConfirmationTokenEvent | StripeFailure | null> {\n if (this.submitting() || this.disabled()) return null;\n const stripe = this.stripe;\n const elements = this.elements;\n if (!stripe || !elements) return failure('not_initialized', MSG_NOT_INITIALIZED, 'submit');\n try {\n const { error } = await elements.submit();\n if (error) return failureFromError(error, 'submit', this.errorOptions('submit'));\n } catch (err) {\n return this.thrownFailure(err, 'submit');\n }\n const made = await this.makeConfirmationToken(stripe, elements);\n if ('id' in made && made.paymentMethodType === 'card') this.confirmationToken.emit(made);\n return made;\n }\n\n /** `stripe.createConfirmationToken({ elements })` (with the billing details as `params` when given); the event, or the failure. Never throws. */\n private async makeConfirmationToken(stripe: StripeLike, elements: StripeElementsLike): Promise<StripeConfirmationTokenEvent | StripeFailure> {\n if (!stripe.createConfirmationToken) return failure('confirmation_token_unavailable', MSG_TOKEN_FAILED, 'confirm');\n const billing = this.billingDetails();\n try {\n const { confirmationToken, error } = await stripe.createConfirmationToken({ elements, ...(billing ? { params: { payment_method_data: { billing_details: billing } } } : {}) });\n if (error) return failureFromError(error, 'confirm', this.errorOptions('confirm'));\n return confirmationToken ? confirmationTokenEventOf(confirmationToken) : failure('confirmation_token_unavailable', MSG_TOKEN_FAILED, 'confirm');\n } catch (err) {\n return this.thrownFailure(err, 'confirm');\n }\n }\n\n /**\n * Runs `stripe.handleCardAction(clientSecret)` (3D Secure) for a payment that came back `requires_action`, and reports the result like `confirm()`.\n * Use it when `autoHandleCardAction` is off and the host handles `outcome: 'requires_action'` itself.\n */\n async handleNextAction(clientSecret: string): Promise<StripeConfirmedEvent | null> {\n if (this.submitting()) return null;\n const stripe = this.stripe;\n if (!stripe) { this.fail(failure('not_initialized', MSG_NOT_INITIALIZED, 'action')); return null; }\n // With the protection on, the host's `confirm()` answered `requires_action` and the attempt is waiting for THIS challenge: its result decides the attempt (success locks, a refusal by the bank\n // unlocks with a new key, an abandoned challenge is unknown), exactly like the automatic challenge of `confirm()`.\n const guarded = this.protectionOn() && this.attempt.inFlight();\n const trace: ConfirmTrace | undefined = guarded ? { held: true, failure: null, thrown: false, outcome: null } : undefined;\n if (guarded) this.attempt.markPending('auth_required');\n this.submitting.set(true);\n this.errorText.set('');\n let event: StripeConfirmedEvent | null = null;\n try {\n const handled = await this.runCardAction(stripe, clientSecret, trace);\n event = handled ? this.finish(handled, false, trace) : null;\n return event;\n } catch (err) {\n if (trace) trace.thrown = true;\n this.fail(this.thrownFailure(err, 'action'), trace);\n return null;\n } finally {\n this.submitting.set(false);\n if (trace) { trace.held = false; this.attempt.apply(this.classifyConfirm(event, trace, true)); }\n }\n }\n\n /**\n * `elements.fetchUpdates()`: after your backend changed the amount of the intent this form was created with (cremo intake: fees differ per payment method),\n * so the form shows the new amount. Resolves `null` when it worked, else the failure (returned only, not emitted: the host decides, cremo ignores it).\n */\n async fetchUpdates(): Promise<StripeFailure | null> {\n const elements = this.elements;\n if (!elements?.fetchUpdates) return failure('not_initialized', MSG_NOT_INITIALIZED, 'submit');\n try {\n const { error } = await elements.fetchUpdates();\n return error ? failureFromError(error, 'confirm', this.errorOptions('confirm')) : null;\n } catch (err) {\n return this.thrownFailure(err, 'confirm');\n }\n }\n\n /** `elements.update(options)`: change the deferred amount, appearance or locale without re-creating the form. */\n updateElements(options: Record<string, unknown>): void { this.elements?.update?.(options); }\n\n /** `paymentElement.update(options)`. */\n updatePaymentElement(options: Record<string, unknown>): void { this.element?.update?.(options); }\n\n /** Removes the Payment Element (host teardown on cancel). The component re-creates it when its inputs change. */\n destroyElements(): void { this.disposeElements(); this.isReady.set(false); }\n\n /** Verify a bank account with the two micro-deposit amounts / the descriptor code of a PaymentIntent (the public \"verify your bank\" page). */\n async verifyMicrodepositsForPayment(clientSecret: string, data: MicrodepositVerifyData): Promise<StripeMicrodepositResult> {\n return this.verifyWith('payment', clientSecret, data);\n }\n\n /** Same for a SetupIntent. */\n async verifyMicrodepositsForSetup(clientSecret: string, data: MicrodepositVerifyData): Promise<StripeMicrodepositResult> {\n return this.verifyWith('setup', clientSecret, data);\n }\n\n /**\n * After Stripe redirected the customer back to `returnUrl`: retrieves the intent (client secret from the URL by default) and reports it like `confirm()`\n * (`confirmed` for succeeded / processing / needs verification / needs action, `failed` otherwise). `{ event: null, failure: null }` when the URL has no intent.\n */\n async handleReturn(options: { clientSecret?: string; kind?: StripeIntentKind; search?: string } = {}): Promise<StripeReturnResult> {\n const fromUrl = options.clientSecret ? null : readStripeReturnParams(options.search ?? this.doc.defaultView?.location.search ?? '');\n const clientSecret = options.clientSecret ?? fromUrl?.clientSecret;\n if (!clientSecret) return { event: null, failure: null };\n const kind = options.kind ?? fromUrl?.kind ?? this.mode();\n let stripe: StripeLike;\n try { stripe = await this.ensureStripe(); } catch (err) {\n const f = failure('load_error', messageOfThrown(err, MSG_LOAD_FAILED), 'load', messageOfThrown(err, ''));\n this.fail(f);\n return { event: null, failure: f };\n }\n const result = await retrieveIntent(stripe, kind, clientSecret);\n if (result.failure) { this.fail(result.failure); return result; }\n if (result.event && !this.finish(result.event, true)) return { event: null, failure: this.lastFailure };\n return result;\n }\n\n // ── Internals ──────────────────────────────────────────────────────────\n\n private errorOptions(stage: StripeFailureStage): StripeErrorMessageOptions {\n return {\n display: this.errorDisplayByStage()?.[stage] ?? this.errorDisplay(),\n overrides: this.errorMessages(),\n ...(this.errorFallbackByStage()?.[stage] || this.errorFallback() ? { fallback: this.errorFallbackByStage()?.[stage] || this.errorFallback() } : {}),\n };\n }\n\n /** Something Stripe.js threw (an IntegrationError, a network failure) as a failure, with the text chosen like any Stripe error. */\n private thrownFailure(err: unknown, stage: StripeFailureStage): StripeFailure {\n const e = err as { code?: unknown; type?: unknown; decline_code?: unknown; message?: unknown } | null | undefined;\n const error = {\n ...(typeof e?.code === 'string' ? { code: e.code } : {}),\n ...(typeof e?.type === 'string' ? { type: e.type } : {}),\n ...(typeof e?.decline_code === 'string' ? { decline_code: e.decline_code } : {}),\n ...(typeof e?.message === 'string' && e.message ? { message: e.message } : {}),\n };\n const code = stage === 'submit' ? 'submit_failed' : stage === 'action' ? 'action_failed' : 'confirm_failed';\n const { error: _raw, ...failed } = failureFromError(error, stage, this.errorOptions(stage));\n return { ...failed, code: error.code ?? code, ...(stage === 'action' ? { actionHandled: true } : {}) };\n }\n\n private buildConfirmParams(): Record<string, unknown> | null {\n const params: Record<string, unknown> = {};\n const returnUrl = this.returnUrl();\n if (returnUrl !== null) params['return_url'] = returnUrl ?? this.doc.defaultView?.location.href ?? '';\n const billing = this.billingDetails();\n if (billing) params['payment_method_data'] = { billing_details: billing };\n Object.assign(params, this.confirmParams() ?? {});\n return Object.keys(params).length ? params : null;\n }\n\n private fail(f: StripeFailure, trace?: ConfirmTrace): void {\n const override = this.errorMessages()?.[f.code];\n if (override) f = { ...f, message: override.split('{status}').join(f.status ?? '') };\n this.lastFailure = f;\n if (trace) { trace.failure = f; if (trace.held) return; } // a protected confirm decides afterwards whether this is a failure the payer sees (see `classifyConfirm`)\n this.publishFailure(f);\n }\n\n /** Shows and emits a failure (what `fail()` always did). */\n private publishFailure(f: StripeFailure): void {\n if (this.destroyed) return;\n if (this.showErrors()) this.errorText.set(f.message);\n this.announcement.set('');\n this.failed.emit(f);\n }\n\n private finish(event: StripeConfirmedEvent, fromReturn = false, trace?: ConfirmTrace): StripeConfirmedEvent | null {\n if (trace) trace.outcome = event.outcome;\n const acted = { ...(event.actionHandled ? { actionHandled: true } : {}), status: event.status };\n if (event.outcome === 'requires_payment_method') {\n this.fail({ ...failure('requires_payment_method', MSG_REQUIRES_PAYMENT_METHOD, fromReturn ? 'return' : 'result'), ...acted }, trace);\n return null;\n }\n if (event.outcome === 'canceled' || event.outcome === 'unknown') {\n this.fail({ ...failure('not_completed', MSG_NOT_COMPLETED, fromReturn ? 'return' : 'result'), ...acted }, trace);\n return null;\n }\n if (this.destroyed) return event;\n this.announcement.set(this.announce(event));\n this.confirmed.emit(event);\n return event;\n }\n\n private announce(event: StripeConfirmedEvent): string {\n const m = this.messages();\n switch (event.outcome) {\n case 'succeeded': return event.kind === 'setup' ? m.methodSaved : m.paymentReceived;\n case 'processing': return m.paymentProcessing;\n case 'requires_capture': return m.paymentAuthorized;\n case 'requires_verification': return m.verificationNeeded;\n default: return m.actionRequired;\n }\n }\n\n private async runCardAction(stripe: StripeLike, clientSecret: string | null | undefined, trace?: ConfirmTrace): Promise<StripeConfirmedEvent | null> {\n const acted = { actionHandled: true };\n if (!stripe.handleCardAction || !clientSecret) { this.fail({ ...failure('action_unavailable', MSG_AUTH_NOT_COMPLETED, 'action'), ...acted }, trace); return null; }\n const { error, paymentIntent } = await stripe.handleCardAction(clientSecret);\n if (error) { this.fail({ ...failureFromError(error, 'action', { ...this.errorOptions('action'), fallback: MSG_AUTH_FAILED }), ...acted }, trace); return null; }\n if (!paymentIntent) { this.fail({ ...failure('action_incomplete', MSG_AUTH_NOT_COMPLETED, 'action'), ...acted }, trace); return null; }\n const event = { ...normalizeIntent('payment', paymentIntent), ...acted };\n if (event.outcome === 'requires_payment_method') {\n this.fail({ ...failure('authentication_failed', 'Payment authentication failed. Please try a different payment method.', 'action'), ...acted, status: event.status }, trace);\n return null;\n }\n return event;\n }\n\n private async ensureStripe(): Promise<StripeLike> {\n if (this.stripe) return this.stripe;\n const { key, options } = this.connection();\n if (!key) throw new Error(MSG_KEY_MISSING);\n const stripe = await this.loader(key, options);\n if (!stripe) throw new Error(MSG_LOAD_FAILED);\n return stripe;\n }\n\n private async verifyWith(flow: StripeIntentKind, clientSecret: string, data: MicrodepositVerifyData): Promise<StripeMicrodepositResult> {\n let stripe: StripeLike;\n try { stripe = await this.ensureStripe(); } catch (err) {\n return { ok: false, outcome: null, intent: null, failure: failure('load_error', messageOfThrown(err, MSG_LOAD_FAILED), 'load', messageOfThrown(err, '')) };\n }\n return verifyMicrodeposits(stripe, flow, clientSecret, data);\n }\n\n private disposeElements(): void {\n const element = this.element;\n this.element = null;\n this.elements = null;\n this.lastType = null;\n this.selectedType.set(null);\n this.complete.set(false);\n if (element) {\n try { element.destroy(); } catch { /* already gone */ }\n if (!this.destroyed) this.stripeReady.emit(null);\n }\n }\n\n private loadFailed(message: string, stripeMessage: string): void {\n this.loading.set(false);\n this.isReady.set(false);\n this.loadErrorText.set(this.loadErrorMessage());\n this.loadError.emit(failure('load_error', message, 'load', stripeMessage));\n }\n\n private async init(\n container: HTMLElement,\n connection: { key: string; options: StripeLoadOptions | undefined },\n elementsConfig: Record<string, unknown> | null,\n elementConfig: Record<string, unknown>,\n ): Promise<void> {\n const generation = ++this.generation;\n this.disposeElements();\n this.isReady.set(false);\n this.errorText.set('');\n this.loadErrorText.set('');\n this.announcement.set('');\n if (!this.isBrowser || !elementsConfig) { this.loading.set(false); return; }\n if (!connection.key) { this.loadFailed(localizeStripeMessage(MSG_KEY_MISSING), ''); return; }\n this.loading.set(true);\n try {\n const signature = JSON.stringify(connection);\n if (!this.stripe || this.stripeSignature !== signature) {\n this.stripe = null;\n const stripe = await this.loader(connection.key, connection.options);\n if (generation !== this.generation) return;\n if (!stripe) { this.loadFailed(localizeStripeMessage(MSG_LOAD_FAILED), ''); return; }\n this.stripe = stripe;\n this.stripeSignature = signature;\n }\n const options: Record<string, unknown> = { ...elementsConfig };\n const deferred = this.deferred();\n if (!options['clientSecret'] && deferred?.amount !== undefined && options['amount'] === undefined) options['amount'] = deferred.amount;\n this.lastAmount = deferred?.amount;\n if (this.appearanceFromTokens() && !options['appearance']) options['appearance'] = readStripeAppearance(this.doc, this.host.nativeElement);\n const elements = this.stripe.elements(options);\n const elementOptions: Record<string, unknown> = { ...elementConfig };\n const defaultValues = this.defaultValues();\n if (defaultValues) elementOptions['defaultValues'] = defaultValues;\n if (this.disabled() && !this.mountOnly()) elementOptions['readOnly'] = true;\n this.appliedDefaultValues = JSON.stringify(defaultValues ?? null);\n this.appliedDisabled = this.disabled();\n const element = elements.create('payment', elementOptions);\n this.elements = elements;\n this.element = element;\n element.on('change', (event) => { if (generation === this.generation) this.onChange(event); });\n element.on('ready', () => {\n if (generation !== this.generation) return;\n this.loading.set(false);\n this.isReady.set(true);\n // Changes made while the element loaded (a customer name typed, the form disabled) are applied now.\n if (!this.mountOnly()) {\n this.applyDefaultValues(this.defaultValues());\n this.applyDisabled(this.disabled());\n }\n this.ready.emit();\n });\n element.on('loaderror', (event) => {\n if (generation !== this.generation) return;\n const message = event?.error?.message || localizeStripeMessage(MSG_LOAD_FAILED);\n this.loadFailed(message, event?.error?.message ?? '');\n });\n element.mount(container);\n this.stripeReady.emit({ stripe: this.stripe, elements, paymentElement: element });\n } catch (err) {\n if (generation !== this.generation) return;\n this.loadFailed(localizeStripeMessage(messageOfThrown(err, MSG_LOAD_FAILED)), messageOfThrown(err, ''));\n }\n }\n\n private applyDefaultValues(defaultValues: Record<string, unknown> | null): void {\n const signature = JSON.stringify(defaultValues ?? null);\n if (this.mountOnly() || !this.element?.update || !this.isReady() || signature === this.appliedDefaultValues) return;\n this.appliedDefaultValues = signature;\n this.element.update({ defaultValues: defaultValues ?? {} });\n }\n\n private applyDisabled(disabled: boolean): void {\n if (this.mountOnly() || !this.element?.update || !this.isReady() || disabled === this.appliedDisabled) return;\n this.appliedDisabled = disabled;\n this.element.update({ readOnly: disabled });\n }\n\n private onChange(event: { complete?: boolean; empty?: boolean; value?: { type?: string }; error?: { message?: string } } | null | undefined): void {\n const type = event?.value?.type ?? null;\n const complete = !!event?.complete;\n this.complete.set(complete);\n if (type) this.selectedType.set(type);\n this.elementChange.emit({ complete, empty: !!event?.empty, type, errorMessage: event?.error?.message ?? null });\n if (type && type !== (this.lastType ?? this.initialPaymentMethodType())) this.paymentMethodTypeChange.emit(type);\n if (type) this.lastType = type;\n }\n}\n","import { UiLabelKey, safeLocale, uiLocale, uiText } from '@forgeroute/ui';\n/** How a bank account added with micro-deposits is verified: two deposit amounts, the code of one deposit, or the bank is still confirming it. */\nexport type MicrodepositType = 'amounts' | 'descriptor_code' | 'processing';\n\n/** The text of the pending-verification card, in one place for the component and its tests. */\n/** The text of the pending-verification card; read on every access, so it follows the app's active language. */\nexport const MICRODEPOSIT_COPY = {\n get title() { return uiText('stripeMicrodepositVerify.title'); },\n get processingTitle() { return uiText('stripeMicrodepositVerify.processingTitle'); },\n get processing() { return uiText('stripeMicrodepositVerify.processing'); },\n get cannotPay() { return uiText('stripeMicrodepositVerify.cannotPay'); },\n get readOnly() { return uiText('stripeMicrodepositVerify.readOnly'); },\n get keepsActive() { return uiText('stripeMicrodepositVerify.keepsActive'); },\n get cancelTitle() { return uiText('stripeMicrodepositVerify.cancelTitle'); },\n get verifyLabel() { return uiText('stripeMicrodepositVerify.verifyLabel'); },\n get cancelBase() { return uiText('stripeMicrodepositVerify.cancelBase'); },\n get cancelKeepsActive() { return uiText('stripeMicrodepositVerify.cancelKeepsActive'); },\n get cancelNoOther() { return uiText('stripeMicrodepositVerify.cancelNoOther'); },\n get tooManyAttempts() { return uiText('stripeMicrodepositVerify.tooManyAttempts'); },\n get codeRequired() { return uiText('stripeMicrodepositVerify.codeRequired'); },\n};\n\n/** \"June 5, 2026\" in UTC: the arrival date is a calendar day. Empty for no / an invalid date. */\nexport function microdepositArrivalText(iso: string | null | undefined): string {\n if (!iso) return '';\n const date = new Date(iso);\n return Number.isNaN(date.getTime()) ? '' : date.toLocaleDateString(safeLocale(uiLocale()), { month: 'long', day: 'numeric', year: 'numeric', timeZone: 'UTC' });\n}\n\n/** Amounts: two whole numbers of cents from 1 to 99 (Stripe's micro-deposits are 1 to 99 cents). Empty text = nothing to say yet. */\nexport function depositAmountError(value: unknown): string {\n if (value === '' || value === null || value === undefined) return '';\n const n = Number(value);\n if (!Number.isInteger(n)) return uiText('stripeMicrodepositVerify.wholeCents');\n if (n < 1 || n > 99) return uiText('stripeMicrodepositVerify.centsRange');\n return '';\n}\n\n/** The code as sent to Stripe: trimmed, upper case. */\nexport const normalizeDescriptorCode = (value: string | null | undefined): string => (value ?? '').trim().toUpperCase();\n\n/** The descriptor code: 6 letters or numbers; with `requireSmPrefix` (Stripe's codes look like SMXXXX) it must start with \"SM\". Empty = nothing to say yet. */\nexport function descriptorCodeError(value: string | null | undefined, requireSmPrefix = false): string {\n const code = normalizeDescriptorCode(value);\n if (!code) return '';\n if (!/^[A-Z0-9]{6}$/.test(code)) return uiText('stripeMicrodepositVerify.code6');\n if (requireSmPrefix && !/^SM[A-Z0-9]{4}$/.test(code)) return uiText('stripeMicrodepositVerify.codeSm');\n return '';\n}\n\n/** Only an https link is offered as Stripe's hosted verification page. */\nexport function safeHostedUrl(url: string | null | undefined): string | null {\n return /^https:\\/\\//.test(url ?? '') ? (url as string) : null;\n}\n\n/** What `(verify)` emits: the two amounts in cents, or the code. */\nexport type MicrodepositVerifyEvent = { amounts: [number, number] } | { descriptorCode: string };\n\n/** Who started a pending verification, from the point of view of the user looking at it (a partner page): this user, the partner, or somebody else. */\nexport type MicrodepositStartedBy = 'you' | 'partner' | 'other' | '';\n\nexport interface MicrodepositStepsContext {\n type: Exclude<MicrodepositType, 'processing'>;\n /** ISO timestamp of the day the deposits should arrive. */\n arrivalDate?: string | null;\n /** Set when the user looks at ANOTHER party's account (a crematory looking at a partner): \"{partner}'s account\", \"Ask {partner} for ...\". */\n partnerName?: string;\n /** The user cannot finish it (no form on the card). */\n readOnly?: boolean;\n /** Read-only: who started it. */\n startedBy?: MicrodepositStartedBy;\n /** Read-only: replaces ONLY the middle sentence (\"An administrator of your organization can finish the verification.\" by default). */\n readOnlyText?: string;\n}\n\nconst arrivalClause = (iso: string | null | undefined): string => {\n const text = microdepositArrivalText(iso);\n return text ? uiText('stripeMicrodepositVerify.byDate', { date: text }) : '';\n};\n\n/**\n * The explanation under the bank account: the deposits clause, then what to do (or, with no form, who can finish it), then\n * \"Until then this account can't be used to pay invoices.\" The exact strings of the cremo Settings / Partners cards.\n */\nexport function microdepositStepsText(ctx: MicrodepositStepsContext): string {\n const t = (key: string, params?: Record<string, string | number>) => uiText(`stripeMicrodepositVerify.${key}` as UiLabelKey, params);\n const partner = ctx.partnerName ?? '';\n const holder = partner ? t('holderPartner', { partner }) : t('holderYours');\n const clause = arrivalClause(ctx.arrivalDate);\n const deposits = ctx.type === 'descriptor_code' ? t('depositsDescriptor', { holder, clause }) : t('depositsAmounts', { holder, clause });\n if (ctx.readOnly) {\n const who = ctx.readOnlyText\n ?? (ctx.startedBy === 'partner' ? t('startedByPartner', { partner })\n : ctx.startedBy === 'other' ? t('startedByOther')\n : partner ? t('partnerOrSetup', { partner })\n : MICRODEPOSIT_COPY.readOnly);\n return `${deposits}${who} ${MICRODEPOSIT_COPY.cannotPay}`;\n }\n const enter = ctx.type === 'descriptor_code'\n ? (partner ? t('enterCodePartner', { partner }) : t('enterCodeOwn'))\n : (partner ? t('enterAmountsPartner', { partner }) : t('enterAmountsOwn'));\n return `${deposits}${enter}${MICRODEPOSIT_COPY.cannotPay}`;\n}\n\n/** While the bank is still confirming the account. */\nexport function microdepositProcessingText(partnerName = ''): string {\n return partnerName ? uiText('stripeMicrodepositVerify.processingPartner', { partner: partnerName }) : MICRODEPOSIT_COPY.processing;\n}\n\n/** The note under the steps when a payment method is already saved. */\nexport function microdepositKeepsActiveText(partnerName = ''): string {\n return partnerName ? uiText('stripeMicrodepositVerify.keepsActivePartner', { partner: partnerName }) : MICRODEPOSIT_COPY.keepsActive;\n}\n\n/** The message of the cancel confirm: the saved method stays active only when one is saved. */\nexport function microdepositCancelMessage(options: { partnerName?: string; hasSavedMethod?: boolean } = {}): string {\n const partner = options.partnerName ?? '';\n if (partner) return `${MICRODEPOSIT_COPY.cancelBase} ${options.hasSavedMethod ? uiText('stripeMicrodepositVerify.cancelKeepsActivePartner', { partner }) : uiText('stripeMicrodepositVerify.cancelNoOtherPartner', { partner })}`;\n return MICRODEPOSIT_COPY.cancelBase + (options.hasSavedMethod ? MICRODEPOSIT_COPY.cancelKeepsActive : MICRODEPOSIT_COPY.cancelNoOther);\n}\n","import { ChangeDetectionStrategy, Component, computed, inject, input, output, signal } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport {\n AlertComponent, BadgeComponent, ButtonComponent, FormRowComponent, FormSectionComponent, ModalComponent, TextComponent, TextInputComponent,\n} from '@forgeroute/ui';\nimport { StripePaymentService, type StripeMicrodepositResult } from '../stripe-payment/stripe-actions';\nimport type { StripeIntentKind } from '../stripe-payment/stripe-outcomes';\nimport {\n MICRODEPOSIT_COPY, depositAmountError, descriptorCodeError, microdepositStepsText, normalizeDescriptorCode, safeHostedUrl,\n type MicrodepositType, type MicrodepositVerifyEvent,\n} from './microdeposit-verify.models';\nimport { UiLabelsService } from '@forgeroute/ui';\nimport { localizeStripeMessage } from '../stripe-payment/stripe-outcomes';\n\n/**\n * \"Bank account waiting for verification\": explains the steps in plain words, takes the two deposit amounts (or the 6-character code),\n * links to Stripe's own verification page, and lets the user cancel. Read-only users see the card but no form and no buttons.\n *\n * Two ways to verify, same screen:\n * - Host verifies (default): `(verify)` emits `{ amounts: [a, b] }` or `{ descriptorCode }`; the host calls its backend and shows\n * `[verifying]` / `[errorText]` (your API owns the rules and the attempts).\n * - Stripe.js verifies (public \"verify your bank\" page): pass `[clientSecret]` (+ `[publishableKey]`, `[stripeAccount]`, `[flow]`); the component calls\n * `verifyMicrodepositsForPayment/Setup` itself, counts failed attempts (`[maxAttempts]`) and emits `(verified)`.\n *\n * <ui-microdeposit-verify type=\"amounts\" bankName=\"Chase\" last4=\"6789\" arrivalDate=\"2026-06-05T00:00:00Z\"\n * [verifying]=\"busy()\" [errorText]=\"error()\" (verify)=\"verify($event)\" (cancelVerification)=\"cancel()\" />\n */\n@Component({\n selector: 'ui-microdeposit-verify',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [FormsModule, AlertComponent, BadgeComponent, ButtonComponent, FormRowComponent, FormSectionComponent, ModalComponent, TextComponent, TextInputComponent],\n template: `\n <div data-testid=\"bank-pending-card\">\n <ui-form-section [label]=\"heading()\">\n <ui-alert variant=\"info\" data-testid=\"bank-pending-alert\">\n <div data-testid=\"bank-pending-summary\">\n @if (bankLine(); as line) { <strong data-testid=\"bank-pending-bank\">{{ line }}</strong> }\n <ui-badge [label]=\"labels.t('stripeMicrodepositVerify.pending')\" variant=\"yellow\" data-testid=\"bank-pending-badge\" />\n </div>\n @if (stepsText().trim()) {\n <ui-text size=\"sm\" [text]=\"stepsText()\" data-testid=\"bank-pending-steps\" />\n } @else if (isProcessing()) {\n <ui-text size=\"sm\" [text]=\"copy.processing\" data-testid=\"bank-pending-steps\" />\n } @else {\n <ui-text size=\"sm\" data-testid=\"bank-pending-steps\" [text]=\"defaultSteps()\" />\n }\n @if (hasSavedMethod()) {\n <ui-text size=\"sm\" tone=\"muted\" [text]=\"keepsActiveText() || copy.keepsActive\" data-testid=\"bank-pending-keeps-active\" />\n }\n <!-- Finishing the verification on Stripe's page saves the payment method (a write): never offered to a read-only user -->\n @if (!formHidden() && !hideHostedLink() && safeUrl(); as url) {\n <div><ui-button variant=\"link\" size=\"sm\" [href]=\"url\" target=\"_blank\" data-testid=\"bank-hosted-link\">{{ labels.t('stripeMicrodepositVerify.openStripeSVerificationPage') }}</ui-button></div>\n }\n </ui-alert>\n\n @if (!formHidden() && !isProcessing()) {\n @if (type() === 'descriptor_code') {\n <ui-text-input [label]=\"labels.t('stripeMicrodepositVerify.verificationCode')\" [hint]=\"labels.t('stripeMicrodepositVerify.6LettersOrNumbersFrom')\" [maxlength]=\"6\" [required]=\"true\" [showErrors]=\"touched()\"\n [error]=\"touched() ? codeError() : ''\" data-testid=\"bank-code-input\" [ngModel]=\"code()\" (ngModelChange)=\"code.set($event)\" />\n } @else {\n <ui-form-row data-testid=\"bank-amounts-row\">\n <ui-text-input [label]=\"labels.t('stripeMicrodepositVerify.firstDepositCents')\" type=\"number\" [min]=\"1\" [max]=\"99\" [maxDecimals]=\"0\" [required]=\"true\" [showErrors]=\"touched()\"\n [error]=\"touched() ? amountError(first()) : ''\" data-testid=\"bank-amount-first\" [ngModel]=\"first()\" (ngModelChange)=\"first.set($event)\" />\n <ui-text-input [label]=\"labels.t('stripeMicrodepositVerify.secondDepositCents')\" type=\"number\" [min]=\"1\" [max]=\"99\" [maxDecimals]=\"0\" [required]=\"true\" [showErrors]=\"touched()\"\n [error]=\"touched() ? amountError(second()) : ''\" data-testid=\"bank-amount-second\" [ngModel]=\"second()\" (ngModelChange)=\"second.set($event)\" />\n </ui-form-row>\n }\n @if (shownError(); as text) {\n <ui-alert variant=\"danger\" data-testid=\"bank-verify-error\">{{ text }}</ui-alert>\n }\n <ui-button variant=\"primary\" size=\"sm\" data-testid=\"bank-verify-button\" [loading]=\"busy()\" [disabled]=\"busy() || cancelling()\" (click)=\"verify()\">{{ verifyLabel() || copy.verifyLabel }}</ui-button>\n }\n\n @if (!formHidden() && allowCancel()) {\n <ui-button variant=\"secondary\" size=\"sm\" data-testid=\"bank-cancel-button\" [disabled]=\"busy() || cancelling()\" (click)=\"showCancelConfirm.set(true)\">{{ cancelLabel() || copy.cancelTitle }}</ui-button>\n }\n </ui-form-section>\n\n <ui-modal [open]=\"showCancelConfirm()\" [title]=\"cancelLabel() || copy.cancelTitle\" maxWidth=\"460px\" (close)=\"showCancelConfirm.set(false)\">\n <ui-text size=\"sm\" data-testid=\"bank-cancel-message\" [text]=\"cancelMessage()\" />\n <ui-button modal-footer-left variant=\"secondary\" size=\"sm\" data-testid=\"bank-cancel-keep\" (click)=\"showCancelConfirm.set(false)\">{{ labels.t('stripeMicrodepositVerify.keepWaiting') }}</ui-button>\n <ui-button modal-footer-right variant=\"danger\" size=\"sm\" data-testid=\"bank-cancel-confirm\" [loading]=\"cancelling()\" (click)=\"confirmCancel()\">{{ cancelLabel() || copy.cancelTitle }}</ui-button>\n </ui-modal>\n </div>\n `,\n})\nexport class MicrodepositVerifyComponent {\n protected readonly labels = inject(UiLabelsService);\n private readonly service = inject(StripePaymentService);\n\n /** `'amounts'` (two deposits), `'descriptor_code'` (one deposit with a code) or `'processing'` (the bank is still confirming; nothing to enter). */\n readonly type = input<MicrodepositType>('amounts');\n readonly bankName = input('');\n readonly last4 = input('');\n /** The day the deposits should have arrived (ISO timestamp); empty when unknown. See `StripeVerification.arrivalDateIso`. */\n readonly arrivalDate = input<string | null>(null);\n /** Stripe's own verification page; only an https link is shown. */\n readonly hostedVerificationUrl = input<string | null>(null);\n /** Read-only users see the card with `readOnlyText` but no form, link or buttons. */\n readonly readOnly = input(false);\n /** Show the card as plain status: no form, link or buttons, and the steps text is yours (`stepsText`). For a page where someone else finishes the verification. */\n readonly statusOnly = input(false);\n /** Replaces the card heading (default: \"Bank account waiting for verification\" / \"Bank account being confirmed\"). */\n readonly title = input('');\n /** Replaces the whole steps text (the sentences about the deposits and what to enter). Use it for wording the library cannot know (a partner's name, who started it). */\n readonly stepsText = input('');\n /** Read-only / status-only: replaces ONLY the middle sentence of the steps text (the deposits clause before it and \"Until then this account can't be used ...\" after it stay). */\n readonly readOnlyText = input<string>(MICRODEPOSIT_COPY.readOnly);\n /** Hide Stripe's hosted-page link even for users who could use it. */\n readonly hideHostedLink = input(false);\n readonly cancelLabel = input('');\n readonly verifyLabel = input('');\n /** Replaces \"Your current payment method stays active until the new bank account is verified.\" */\n readonly keepsActiveText = input('');\n /** Replaces the cancel confirm's message. */\n readonly cancelMessageText = input('');\n /** A payment method is already saved (it stays active until the new bank account is verified). */\n readonly hasSavedMethod = input(false);\n /** Host mode: the host's verify request is running. */\n readonly verifying = input(false);\n /** Host mode: the host's cancel request is running. */\n readonly cancelling = input(false);\n /** Host mode: the verification failed; shown above the button. */\n readonly errorText = input('');\n /** Offer \"Cancel verification\" (with its confirm). */\n readonly allowCancel = input(true);\n /** Descriptor codes must look like Stripe's (`SMXXXX`). */\n readonly requireSmPrefix = input(false);\n\n // Stripe.js mode (set `clientSecret`)\n readonly clientSecret = input<string | null>(null);\n readonly publishableKey = input<string | null>(null);\n readonly stripeAccount = input<string | null>(null);\n /** Which kind of intent `clientSecret` belongs to. */\n readonly flow = input<StripeIntentKind>('payment');\n /** Stripe.js mode: stop sending after this many failed attempts (0 = no limit here). */\n readonly maxAttempts = input(0);\n\n /** Host mode: the amounts / code to verify. */\n readonly verify$ = output<MicrodepositVerifyEvent>({ alias: 'verify' });\n /** The user confirmed cancelling the verification. */\n readonly cancelVerification = output<void>();\n /** Stripe.js mode: the bank account is verified. */\n readonly verified = output<StripeMicrodepositResult>();\n /** Stripe.js mode: a verification attempt failed (the text is already shown). */\n readonly verifyFailed = output<StripeMicrodepositResult>();\n\n readonly copy = MICRODEPOSIT_COPY;\n readonly first = signal<string | number>('');\n readonly second = signal<string | number>('');\n readonly code = signal('');\n readonly touched = signal(false);\n readonly showCancelConfirm = signal(false);\n private readonly stripeBusy = signal(false);\n private readonly stripeError = signal('');\n private failedAttempts = 0;\n\n readonly formHidden = computed(() => this.readOnly() || this.statusOnly());\n readonly heading = computed(() => this.title() || (this.isProcessing() ? this.copy.processingTitle : this.copy.title));\n /** \"Chase ····6789\"; nothing when neither the bank nor the last 4 digits are known. */\n readonly bankLine = computed(() => {\n const bank = this.bankName().trim();\n const last4 = this.last4().trim();\n if (!bank && !last4) return '';\n return `${bank || this.labels.t('stripeMicrodepositVerify.bankFallback')}${last4 ? ` ····${last4}` : ''}`;\n });\n readonly busy = computed(() => this.verifying() || this.stripeBusy());\n readonly shownError = computed(() => this.stripeError() || this.errorText());\n readonly isProcessing = computed(() => this.type() === 'processing');\n readonly safeUrl = computed(() => safeHostedUrl(this.hostedVerificationUrl()));\n /** The built-in steps text: deposits clause + what to do, or with no form the `readOnlyText` sentence, + \"Until then this account can't be used to pay invoices.\" */\n readonly defaultSteps = computed(() => microdepositStepsText({\n type: this.type() === 'descriptor_code' ? 'descriptor_code' : 'amounts',\n arrivalDate: this.arrivalDate(),\n readOnly: this.formHidden(),\n readOnlyText: this.readOnlyText(),\n }));\n readonly amountError = depositAmountError;\n readonly codeError = computed(() => (this.code().trim() ? descriptorCodeError(this.code(), this.requireSmPrefix()) : this.copy.codeRequired));\n readonly hasInvalid = computed(() => this.type() === 'descriptor_code'\n ? !!this.codeError()\n : !!depositAmountError(this.first()) || !!depositAmountError(this.second()) || this.first() === '' || this.second() === '' || this.first() === null || this.second() === null);\n /** The cancel confirm tells the truth: the saved method stays active only when one is saved. */\n readonly cancelMessage = computed(() => this.cancelMessageText() || this.copy.cancelBase + (this.hasSavedMethod() ? this.copy.cancelKeepsActive : this.copy.cancelNoOther));\n\n async verify(): Promise<void> {\n if (this.busy()) return;\n this.touched.set(true);\n if (this.hasInvalid()) return;\n const secret = this.clientSecret();\n if (!secret) {\n this.verify$.emit(this.type() === 'descriptor_code'\n ? { descriptorCode: normalizeDescriptorCode(this.code()) }\n : { amounts: [Number(this.first()), Number(this.second())] });\n return;\n }\n const max = this.maxAttempts();\n if (max > 0 && this.failedAttempts >= max) { this.stripeError.set(this.copy.tooManyAttempts); return; }\n this.stripeBusy.set(true);\n this.stripeError.set('');\n const data = this.type() === 'descriptor_code'\n ? { descriptor_code: normalizeDescriptorCode(this.code()) }\n : { amounts: [Number(this.first()), Number(this.second())] };\n const connection = { publishableKey: this.publishableKey(), stripeAccount: this.stripeAccount() };\n const result = this.flow() === 'setup'\n ? await this.service.verifyMicrodepositsForSetup(secret, data, connection)\n : await this.service.verifyMicrodepositsForPayment(secret, data, connection);\n this.stripeBusy.set(false);\n if (result.ok) { this.verified.emit(result); return; }\n this.failedAttempts++;\n const message = result.failure?.message ?? localizeStripeMessage('Verification failed');\n const remaining = max - this.failedAttempts;\n this.stripeError.set(max > 0 && remaining > 0 ? this.labels.t(remaining === 1 ? 'stripeMicrodepositVerify.attemptsRemaining_one' : 'stripeMicrodepositVerify.attemptsRemaining_other', { message, count: remaining }) : message);\n this.verifyFailed.emit(result);\n }\n\n confirmCancel(): void {\n if (this.cancelling()) return;\n this.showCancelConfirm.set(false);\n this.cancelVerification.emit();\n }\n}\n","import type { DestroyRef, WritableSignal } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport type { Observable } from 'rxjs';\n\n/** What the account-status call answers (the shape of cremo's `GET /organizations/connect/status`). `isComplete` = Stripe accepts charges and payouts. */\nexport interface StripeConnectStatus {\n isComplete: boolean;\n detailsSubmitted?: boolean;\n /** The address of Stripe's onboarding page for an unfinished account. */\n onboardingUrl?: string;\n}\n\n/** What the create-account call answers (cremo's `POST /organizations/connect/create`): the new (or resumed) account and the address of Stripe's onboarding page. */\nexport interface StripeConnectAccount { accountId: string; onboardingUrl: string }\n\n/**\n * What happened after the user pressed a button or the page asked for the state. The flow never shows toasts itself (each app has its own): the host words\n * each outcome, and decides what follows a finished account (for example switching payment collection on).\n *\n * - `complete`: Stripe accepts the account. `source: 'check'` = after \"Check Status\"; `'resume'` = \"Complete Setup\" found it already complete; `'return'` =\n * the state was read again when the user came back to this tab (`refreshOnReturn`).\n * - `verifying`: the details were submitted and Stripe is reviewing them.\n * - `incomplete`: \"Check Status\" found an unfinished onboarding (`onboardingUrl` present).\n * - `link-unavailable`: the answer had no https Stripe address; nothing was opened.\n * - `failed`: a call failed (`action` says which); `error` is what it threw.\n */\nexport type StripeConnectOutcome =\n | { kind: 'complete'; source: 'check' | 'resume' | 'return' }\n | { kind: 'verifying'; source: 'check' | 'resume' | 'return' }\n | { kind: 'incomplete' }\n | { kind: 'link-unavailable' }\n | { kind: 'failed'; action: 'start' | 'check' | 'resume'; error: unknown };\n\n/** The state the flow reads and writes: signals owned by the host (or by the card's two-way models). */\nexport interface StripeConnectState {\n accountId: WritableSignal<string | null>;\n complete: WritableSignal<boolean>;\n detailsSubmitted: WritableSignal<boolean>;\n loading: WritableSignal<boolean>;\n}\n\nexport interface StripeConnectFlowOptions {\n /** Read at call time, so a host can swap the call. Null = no call yet (`start()` does nothing). */\n createAccount: () => (() => Observable<StripeConnectAccount>) | null;\n getStatus: () => (() => Observable<StripeConnectStatus>) | null;\n state: StripeConnectState;\n /** Where outcomes go. */\n emit: (outcome: StripeConnectOutcome) => void;\n /** The buttons and methods do nothing while this says true (a read-only user). */\n disabled?: () => boolean;\n /** How THIS tab is sent to Stripe when the browser refused the new tab (default `window.location.href = url`). */\n navigate?: (url: string) => void;\n destroyRef: DestroyRef;\n}\n\n/** Only an https address on stripe.com or a real subdomain (never `evilstripe.com` / `connect.stripe.com.evil.com`, `http:`, `javascript:`). */\nexport function isStripeUrl(url: string | undefined): url is string {\n if (!url) return false;\n try {\n const u = new URL(url);\n return u.protocol === 'https:' && (u.hostname === 'stripe.com' || u.hostname.endsWith('.stripe.com'));\n } catch { return false; }\n}\n\n/**\n * The Stripe Connect flow of cremo Settings > Payment & Billing, as a plain class: create the account, \"Check Status\", \"Complete Setup\", and the \"back from Stripe\" read.\n * `ui-stripe-connect` runs it behind its card; a host that has to start the flow from code before any view exists (Settings: the first change-detection pass with\n * `?connect=return`) creates its own instance over the same state signals. Stripe's page always opens in a NEW tab opened inside the click (a tab opened after the\n * request is blocked by popup blockers); only an https Stripe address is opened; a failed call closes the empty tab.\n */\nexport class StripeConnectFlow {\n /** A Stripe tab was opened: the card reads the state again when the user comes back (`refreshOnReturn`). */\n tabOpened = false;\n\n constructor(private readonly o: StripeConnectFlowOptions) {}\n\n private get blocked(): boolean { return this.o.state.loading() || !!this.o.disabled?.(); }\n\n /** Creates (or resumes) the account and opens Stripe's onboarding page in a new tab. */\n start(): void {\n const create = this.o.createAccount();\n if (!create || this.blocked) return;\n this.o.state.loading.set(true);\n const tab = this.openBlankTab();\n create().pipe(takeUntilDestroyed(this.o.destroyRef)).subscribe({\n next: result => {\n this.o.state.accountId.set(result.accountId);\n this.o.state.loading.set(false);\n this.openStripe(tab, result.onboardingUrl);\n },\n error: error => {\n this.closeTab(tab);\n this.o.state.loading.set(false);\n this.o.emit({ kind: 'failed', action: 'start', error });\n },\n });\n }\n\n /** \"Check Status\": reads the state; a finished or submitted account updates the card, an unfinished one is reported. */\n check(): void {\n const status = this.o.getStatus();\n if (!status || this.blocked) return;\n this.o.state.loading.set(true);\n status().pipe(takeUntilDestroyed(this.o.destroyRef)).subscribe({\n next: s => {\n this.o.state.complete.set(s.isComplete);\n this.o.state.detailsSubmitted.set(s.detailsSubmitted ?? false);\n this.o.state.loading.set(false);\n if (s.isComplete) this.o.emit({ kind: 'complete', source: 'check' });\n else if (s.detailsSubmitted) this.o.emit({ kind: 'verifying', source: 'check' });\n else if (s.onboardingUrl) this.o.emit({ kind: 'incomplete' });\n },\n error: error => { this.o.state.loading.set(false); this.o.emit({ kind: 'failed', action: 'check', error }); },\n });\n }\n\n /** \"Complete Setup\": reads the state and opens the onboarding address of an unfinished account in a new tab (a finished or submitted one just updates the card). */\n resume(): void {\n const status = this.o.getStatus();\n if (!status || this.blocked) return;\n this.o.state.loading.set(true);\n const tab = this.openBlankTab();\n status().pipe(takeUntilDestroyed(this.o.destroyRef)).subscribe({\n next: s => {\n this.o.state.loading.set(false);\n if (s.isComplete) {\n this.closeTab(tab);\n this.o.state.complete.set(true);\n this.o.emit({ kind: 'complete', source: 'resume' });\n } else if (s.detailsSubmitted) {\n this.closeTab(tab);\n this.o.state.detailsSubmitted.set(true);\n this.o.emit({ kind: 'verifying', source: 'resume' });\n } else {\n this.openStripe(tab, s.onboardingUrl);\n }\n },\n error: error => { this.closeTab(tab); this.o.state.loading.set(false); this.o.emit({ kind: 'failed', action: 'resume', error }); },\n });\n }\n\n /** The state read when the user came back to this tab: silent unless something finished or was submitted. */\n readStatusOnReturn(): void {\n const status = this.o.getStatus();\n if (!status) return;\n status().pipe(takeUntilDestroyed(this.o.destroyRef)).subscribe({\n next: s => {\n this.o.state.complete.set(s.isComplete);\n this.o.state.detailsSubmitted.set(s.detailsSubmitted ?? false);\n if (s.isComplete) this.o.emit({ kind: 'complete', source: 'return' });\n else if (s.detailsSubmitted) this.o.emit({ kind: 'verifying', source: 'return' });\n },\n error: () => { /* the user can press Check Status; a failed background read says nothing */ },\n });\n }\n\n private openStripe(tab: Window | null, url: string | undefined): void {\n if (isStripeUrl(url) && tab) {\n tab.location.href = url;\n this.tabOpened = true;\n } else if (isStripeUrl(url)) {\n this.navigateCurrentTab(url);\n } else {\n // not an https Stripe address: never navigate to it, close the empty tab and say so\n this.closeTab(tab);\n this.o.emit({ kind: 'link-unavailable' });\n }\n }\n\n /** The empty tab, opened inside the click and cut from this page (`opener`); null when the browser refused. */\n openBlankTab(): Window | null {\n const tab = window.open('about:blank', '_blank');\n if (tab) { try { tab.opener = null; } catch { /* cannot be changed: harmless */ } }\n return tab;\n }\n\n /** The browser refused the new tab: Stripe opens in this one. */\n private navigateCurrentTab(url: string): void {\n if (this.o.navigate) this.o.navigate(url);\n else window.location.href = url;\n }\n\n private closeTab(tab: Window | null): void {\n try { tab?.close(); } catch { /* already closed */ }\n }\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, Injector, ViewEncapsulation, afterNextRender, computed, effect, inject, input, model, output } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport type { Observable } from 'rxjs';\nimport { StripeConnectFlow } from './stripe-connect.flow';\nimport type { StripeConnectAccount, StripeConnectOutcome, StripeConnectStatus } from './stripe-connect.flow';\nexport type { StripeConnectAccount, StripeConnectOutcome, StripeConnectStatus } from './stripe-connect.flow';\nexport { StripeConnectFlow, isStripeUrl } from './stripe-connect.flow';\nimport { BadgeComponent, ButtonComponent, DetailCardComponent, StackComponent, TextComponent, uiText } from '@forgeroute/ui';\nimport { UiLabelsService } from '@forgeroute/ui';\n\n/**\n * The default wording of an outcome (the texts cremo Settings has always used), for apps that just want a toast: `{ variant, message }`, or null when\n * nothing should be said. `completeText` replaces the sentence of a finished account when the host has more to say about what follows.\n */\nexport function stripeConnectNotice(outcome: StripeConnectOutcome): { variant: 'success' | 'info' | 'error'; message: string } | null {\n switch (outcome.kind) {\n case 'complete':\n return { variant: 'success', message: uiText(outcome.source === 'resume' ? 'stripeStripeConnect.noticeCompleteResume' : 'stripeStripeConnect.noticeComplete') };\n case 'verifying':\n return { variant: 'success', message: uiText('stripeStripeConnect.noticeVerifying') };\n case 'incomplete':\n return { variant: 'error', message: uiText('stripeStripeConnect.noticeIncomplete') };\n case 'link-unavailable':\n return { variant: 'error', message: uiText('stripeStripeConnect.noticeLinkUnavailable') };\n case 'failed':\n return { variant: 'error', message: uiText(outcome.action === 'start' ? 'stripeStripeConnect.failedStart' : outcome.action === 'check' ? 'stripeStripeConnect.failedCheck' : 'stripeStripeConnect.failedLink') };\n }\n}\n\n/**\n * \"Stripe Connect Account\": the card where a business connects the Stripe account it collects payments into (cremo Settings > Payment & Billing, built here\n * once so every app and the setup wizard show and run the SAME flow). The host owns the data (its two calls and the three state values); the component owns\n * the screen and the flow:\n *\n * - no account yet (`accountId` empty): nothing is shown (the host has its own entry point and calls `start()`), or with `showWhenNoAccount` a card with\n * \"Set Up Payment Account\";;\n * - account, not complete, nothing submitted: warning \"Account setup incomplete\" with \"Complete Setup\" (asks the status for the onboarding address and opens it);\n * - details submitted, not complete: info \"Stripe is verifying your account\" with \"Check Status\";\n * - complete: success \"Account setup complete\" with the account id and \"View Stripe Dashboard\".\n *\n * Stripe's onboarding page always opens in a NEW tab: the empty tab is opened inside the click (a tab opened after the request is blocked by popup\n * blockers) and receives the address when it arrives; with the tab refused the address opens in the current tab. Only an https Stripe address is ever opened,\n * never one an answer made up (`javascript:`, `data:`). A failed call closes the empty tab.\n *\n * <ui-stripe-connect [(accountId)]=\"accountId\" [(complete)]=\"complete\" [(detailsSubmitted)]=\"submitted\"\n * [createAccount]=\"createAccount\" [getStatus]=\"getStatus\" [showWhenNoAccount]=\"true\" (outcome)=\"onOutcome($event)\" />\n *\n * where `createAccount = () => http.post<StripeConnectAccount>('/connect/create', {})` and `getStatus = () => http.get<StripeConnectStatus>('/connect/status')`.\n */\n@Component({\n selector: 'ui-stripe-connect',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgTemplateOutlet, BadgeComponent, ButtonComponent, DetailCardComponent, StackComponent, TextComponent],\n template: `\n <!-- Persistent live region: present before the state changes, so every new state is announced (and \"Loading\" while a request runs). -->\n <div class=\"sc-sr\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\" data-testid=\"connect-live\">{{ liveText() }}</div>\n @if (visible()) {\n @if (bare()) {\n <ng-container *ngTemplateOutlet=\"body\" />\n } @else {\n <ui-detail-card [collapsible]=\"false\" [title]=\"title()\" [headingLevel]=\"3\" data-testid=\"connect-account-card\">\n <ng-container *ngTemplateOutlet=\"body\" />\n </ui-detail-card>\n }\n }\n\n <ng-template #body>\n @if (!accountId()) {\n <ui-stack gap=\"sm\" class=\"sc-state\" tabindex=\"-1\" data-testid=\"connect-status-none\" [attr.aria-busy]=\"loading() ? 'true' : null\">\n <strong class=\"sc-title\">{{ startTitle() }}</strong>\n <ui-text size=\"sm\" [text]=\"startText()\" />\n <ui-stack direction=\"horizontal\">\n <ui-button variant=\"primary\" size=\"sm\" data-testid=\"connect-start-button\" [disabled]=\"disabled()\" (click)=\"start()\">@if (loading()) {<span aria-hidden=\"true\">{{ labels.t('common.loadingellipsis') }}</span><span class=\"sc-sr\">{{ labels.t('stripeStripeConnect.opensInNewTabBusy', { label: startLabel() }) }}</span>} @else { {{ startLabel() }}<span class=\"sc-sr\">{{ labels.t('stripeStripeConnect.opensInNewTabSr') }}</span>}</ui-button>\n </ui-stack>\n </ui-stack>\n } @else if (complete()) {\n <ui-stack gap=\"sm\" class=\"sc-state\" tabindex=\"-1\" data-testid=\"connect-status-complete\">\n <strong class=\"sc-title\">{{ labels.t('stripeStripeConnect.accountSetupComplete') }}</strong>\n <ui-text size=\"sm\" tone=\"muted\" [text]=\"labels.t('stripeConnect.accountId', { id: accountId() ?? '' })\" />\n <ui-stack direction=\"horizontal\">\n <ui-button variant=\"secondary\" size=\"sm\" data-testid=\"connect-dashboard-button\" (click)=\"openDashboard()\">{{ labels.t('stripeStripeConnect.viewStripeDashboard') }}<span class=\"sc-sr\">{{ labels.t('stripeStripeConnect.opensInNewTabSr') }}</span></ui-button>\n </ui-stack>\n </ui-stack>\n } @else if (detailsSubmitted()) {\n <ui-stack gap=\"sm\" class=\"sc-state\" tabindex=\"-1\" data-testid=\"connect-status-verifying\" [attr.aria-busy]=\"loading() ? 'true' : null\">\n <strong class=\"sc-title\">{{ labels.t('stripeStripeConnect.stripeIsVerifyingYourAccount') }}</strong>\n <ui-text size=\"sm\" [text]=\"labels.t('stripeStripeConnect.yourSetupHasBeenSubmitted')\" />\n <ui-stack direction=\"horizontal\">\n <ui-button variant=\"primary\" size=\"sm\" data-testid=\"connect-check-status-button\" [disabled]=\"disabled()\" (click)=\"check()\">@if (loading()) {<span aria-hidden=\"true\">{{ labels.t('stripeStripeConnect.checking') }}</span><span class=\"sc-sr\">{{ labels.t('stripeStripeConnect.checkStatusBusy') }}</span>} @else { {{ labels.t('stripeStripeConnect.checkStatus') }} }</ui-button>\n </ui-stack>\n </ui-stack>\n } @else {\n <ui-stack gap=\"sm\" class=\"sc-state\" tabindex=\"-1\" data-testid=\"connect-status-incomplete\" [attr.aria-busy]=\"loading() ? 'true' : null\">\n <span class=\"sc-badge\"><ui-badge [label]=\"labels.t('stripeStripeConnect.accountSetupIncomplete')\" variant=\"red\" data-testid=\"connect-incomplete-badge\" /></span>\n <ui-text size=\"sm\" [text]=\"labels.t('stripeStripeConnect.completeYourStripeAccountSetup')\" />\n <ui-stack direction=\"horizontal\">\n <ui-button variant=\"primary\" size=\"sm\" data-testid=\"connect-complete-setup-button\" [disabled]=\"disabled()\" (click)=\"resume()\">@if (loading()) {<span aria-hidden=\"true\">{{ labels.t('common.loadingellipsis') }}</span><span class=\"sc-sr\">{{ labels.t('stripeStripeConnect.completeSetupOpensInA') }}</span>} @else { {{ labels.t('stripeStripeConnect.completeSetup') }}<span class=\"sc-sr\">{{ labels.t('stripeStripeConnect.opensInNewTabSr') }}</span>}</ui-button>\n </ui-stack>\n </ui-stack>\n }\n </ng-template>\n `,\n styles: [`ui-stripe-connect { display: block; min-width: 0; } ui-stripe-connect .sc-badge { display: flex; } ui-stripe-connect .sc-title { font-size: 0.9375rem; font-weight: 600; color: #1e293b; } ui-stripe-connect .sc-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }`],\n encapsulation: ViewEncapsulation.None,\n})\nexport class StripeConnectComponent {\n protected readonly labels = inject(UiLabelsService);\n private readonly destroyRef = inject(DestroyRef);\n private readonly injector = inject(Injector);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /** The call that creates the organization's Stripe account (or resumes it) and answers its id and the onboarding address. Needed for `start()`. */\n readonly createAccount = input<(() => Observable<StripeConnectAccount>) | null>(null);\n /** The call that reads the account's state. Needed for `check()`, `resume()` and `refreshOnReturn`. */\n readonly getStatus = input<(() => Observable<StripeConnectStatus>) | null>(null);\n\n /** The Stripe account's id (null / empty = no account yet). Two-way: the component sets it when `start()` created the account. */\n readonly accountId = model<string | null>(null);\n /** Stripe accepts the account (charges and payouts on). Two-way: set by `check()` / `resume()`. */\n readonly complete = model(false);\n /** The details were submitted and Stripe is reviewing them. Two-way: set by `check()` / `resume()`. */\n readonly detailsSubmitted = model(false);\n\n readonly titleInput = input<string | null>(null, { alias: 'title' });\n\n readonly title = computed(() => this.titleInput() ?? this.labels.t('stripeStripeConnect.title'));\n /** No card around the content: the text and the button sit directly in the host's own card (the setup wizard's step card). `title` is not shown then. */\n readonly bare = input(false);\n /** Shows the card (with \"Set Up Payment Account\") while there is no account yet. Default false: hosts with their own entry point show nothing and call `start()`. */\n readonly showWhenNoAccount = input(false);\n readonly startTitleInput = input<string | null>(null, { alias: 'startTitle' });\n readonly startTitle = computed(() => this.startTitleInput() ?? this.labels.t('stripeStripeConnect.startTitle'));\n readonly startTextInput = input<string | null>(null, { alias: 'startText' });\n readonly startText = computed(() => this.startTextInput() ?? this.labels.t('stripeStripeConnect.startText'));\n readonly startLabelInput = input<string | null>(null, { alias: 'startLabel' });\n readonly startLabel = computed(() => this.startLabelInput() ?? this.labels.t('stripeStripeConnect.startLabel'));\n /** The buttons cannot be pressed (a read-only user). */\n readonly disabled = input(false);\n /** After a Stripe tab was opened, the state is read again when this tab becomes visible again (the user came back): `(outcome)` then reports `complete` / `verifying` with source `return`. */\n readonly refreshOnReturn = input(false);\n /** The page \"View Stripe Dashboard\" opens. */\n readonly dashboardUrl = input('https://dashboard.stripe.com');\n\n /** What happened (see {@link StripeConnectOutcome}); the host words it. */\n readonly outcome = output<StripeConnectOutcome>();\n\n /** A request is running: the buttons show \"Loading...\" / \"Checking...\" and cannot be pressed again. Two-way, so a host that shows the state elsewhere can read it. */\n readonly loading = model(false);\n /** How the current tab is sent to Stripe when the browser refused the new tab (default: `window.location.href = url`); a host can route it through its own method. */\n readonly navigateTab = input<((url: string) => void) | null>(null);\n protected readonly visible = computed(() => !!this.accountId() || this.showWhenNoAccount());\n /** Which screen the card shows. */\n protected readonly state = computed((): 'none' | 'complete' | 'verifying' | 'incomplete' =>\n !this.accountId() ? 'none' : this.complete() ? 'complete' : this.detailsSubmitted() ? 'verifying' : 'incomplete');\n /** What the persistent status region says: the current state, plus \"Loading.\" while a request runs. Empty while nothing is shown. */\n protected readonly liveText = computed(() => {\n if (!this.visible()) return '';\n const text = this.labels.t(({ none: 'stripeStripeConnect.liveNone', incomplete: 'stripeStripeConnect.liveIncomplete', verifying: 'stripeStripeConnect.liveVerifying', complete: 'stripeStripeConnect.liveComplete' } as const)[this.state()]);\n return this.loading() ? this.labels.t('stripeStripeConnect.liveLoading', { text }) : text;\n });\n /** The user pressed a button that started a request: when the screen then changes, focus moves to the new screen (the pressed button is gone). */\n private acted = false;\n private lastState = this.state();\n private readonly flow = new StripeConnectFlow({\n createAccount: () => this.createAccount(),\n getStatus: () => this.getStatus(),\n state: { accountId: this.accountId, complete: this.complete, detailsSubmitted: this.detailsSubmitted, loading: this.loading },\n emit: outcome => this.outcome.emit(outcome),\n disabled: () => this.disabled(),\n navigate: url => this.navigateCurrentTab(url),\n destroyRef: this.destroyRef,\n });\n\n constructor() {\n effect(() => {\n const state = this.state();\n if (this.loading()) return;\n const changed = state !== this.lastState;\n this.lastState = state;\n const focusIt = changed && this.acted && this.visible();\n this.acted = false;\n if (focusIt) afterNextRender(() => this.host.nativeElement.querySelector<HTMLElement>('.sc-state')?.focus(), { injector: this.injector });\n });\n if (typeof document !== 'undefined') {\n const onVisible = () => {\n if (document.visibilityState !== 'visible' || !this.flow.tabOpened || !this.refreshOnReturn() || this.loading()) return;\n this.flow.tabOpened = false;\n this.flow.readStatusOnReturn();\n };\n document.addEventListener('visibilitychange', onVisible);\n this.destroyRef.onDestroy(() => document.removeEventListener('visibilitychange', onVisible));\n }\n }\n\n /** Creates (or resumes) the account and opens Stripe's onboarding page in a new tab. */\n start(): void { const run = this.canRun(this.createAccount()); this.flow.start(); this.acted ||= run; }\n\n /** \"Check Status\": reads the state; a finished or submitted account updates the card, an unfinished one is reported. */\n check(): void { const run = this.canRun(this.getStatus()); this.flow.check(); this.acted ||= run; }\n\n /** \"Complete Setup\": reads the state and opens the onboarding address of an unfinished account in a new tab. */\n resume(): void { const run = this.canRun(this.getStatus()); this.flow.resume(); this.acted ||= run; }\n\n /** The flow will really send a request (the host gave the call, nothing is running, the card is not read-only). */\n private canRun(call: unknown): boolean { return !!call && !this.loading() && !this.disabled(); }\n\n /** Opens the Stripe dashboard in a new tab. */\n openDashboard(): void {\n window.open(this.dashboardUrl(), '_blank', 'noopener,noreferrer');\n }\n\n /** The browser refused the new tab: Stripe opens in this one (through the host's `navigateTab` when it gave one). */\n protected navigateCurrentTab(url: string): void {\n const navigate = this.navigateTab();\n if (navigate) navigate(url);\n else window.location.href = url;\n }\n}\n","import type { PaymentAllocation } from '@forgeroute/ui';\nimport { uiText } from '@forgeroute/ui';\nimport type { StripeCardFunding } from '../stripe-payment/stripe-outcomes';\n\n/** What the host's `createIntent` receives: the entered payment and how it is applied to charges. */\nexport interface StripeIntentContext extends PaymentAllocation {\n /** The amount the payer owes (before processing fees), in major units (12.5 = $12.50). */\n amount: number;\n /** The method value that was selected (`'CARD'` / `'ACH'`). */\n paymentMethod: string;\n /** Stripe's name of it: `'card'` or `'us_bank_account'`. */\n paymentMethodType: 'card' | 'us_bank_account';\n receivedDate: string;\n notes: string | null;\n /** Only with `[fundingPreview]=\"true\"` on the plugin and a card: the ConfirmationToken (`ctoken_...`) created from the typed card, so the backend can read the card funding from Stripe before it creates the intent. */\n confirmationTokenId?: string | null;\n /** Only with `[fundingPreview]=\"true\"` and a card: Stripe's funding of the typed card (display only; a backend that charges by it reads it from the token). */\n funding?: StripeCardFunding | null;\n /**\n * Only with `[duplicateProtection]=\"true\"` on the plugin: the key of this PAYMENT ATTEMPT (stable across retries after a timeout / offline loss, a reload and a second tab; renewed only after\n * a definitive failure or success). Send it to your backend, which creates the PaymentIntent with it as Stripe's `Idempotency-Key` and answers `checkStatus(attemptKey)` with it.\n */\n attemptKey?: string;\n /** Only with `[duplicateProtection]=\"true\"`: the payable of this attempt (`payableRef` at the click): the backend allows ONE open or succeeded attempt per payable and answers 409 `payment_in_flight` to a second key. */\n payableRef?: string | null;\n}\n\n/** What the host's `createIntent` answers. Fees are optional; when given they are shown as rows under the form. */\nexport interface StripeIntentInfo {\n clientSecret: string;\n paymentIntentId: string;\n stripeFee?: number;\n platformFee?: number;\n totalAmount?: number;\n /** Connect account of a direct charge (passed back to `finalize` / `cancel`). `[stripeAccount]` of the plugin must already be this account: Stripe.js is loaded for it before the form shows. */\n stripeAccountId?: string | null;\n /** Shown after \"Processing fee\" / \"Platform fee\", e.g. `'2.9% + $0.30'`. */\n stripeFeeLabel?: string;\n platformFeeLabel?: string;\n}\n\n/** The fees of a payment, shown before the payer pays (the host's `estimateFees`) or after the intent exists. */\nexport interface StripeFees {\n stripeFee?: number;\n platformFee?: number;\n /** What the payer is charged (amount + fees). The Payment Element is created with this amount, so it MUST equal the intent's amount. */\n totalAmount?: number;\n stripeFeeLabel?: string;\n platformFeeLabel?: string;\n}\n\nexport interface StripeFeeContext {\n amount: number;\n paymentMethod: string;\n paymentMethodType: 'card' | 'us_bank_account';\n /**\n * Only with `[fundingPreview]=\"true\"` on the plugin: the funding of the typed card once the card form is complete (`'credit'`, `'debit'`, `'prepaid'`, `'unknown'`), `null` while it is\n * not known (no card yet, a bank account). A credit-only fee schedule answers the credit fee while it is `null` or `'credit'` and no platform fee for `'debit'` / ACH.\n */\n funding?: StripeCardFunding | null;\n /** Only with `[fundingPreview]=\"true\"` once the card is complete: the ConfirmationToken of the typed card, for a backend-side funding lookup in `estimateFees`. */\n confirmationTokenId?: string | null;\n}\n\nexport const STRIPE_PAYMENT_METHODS = [\n { value: 'CARD', label: 'Card' },\n { value: 'ACH', label: 'ACH / Bank Transfer' },\n] as const;\n\n/** The name of a method in the app's active language. */\nexport const stripeMethodLabel = (value: string, english: string): string =>\n value === 'CARD' ? uiText('stripePaymentMethod.methodCard') : value === 'ACH' ? uiText('stripePaymentMethod.methodAch') : english;\n\nexport const stripeMethodType = (method: string): 'card' | 'us_bank_account' => (method === 'ACH' ? 'us_bank_account' : 'card');\n\n/** The texts of the Stripe payment method; read on every access, so they follow the app's active language. */\nexport const STRIPE_METHOD_TEXTS = {\n get amountNeeded() { return uiText('stripePaymentMethod.amountNeeded'); },\n get notCompleted() { return uiText('stripePaymentMethod.notCompleted'); },\n get achTitle() { return uiText('stripePaymentMethod.achTitle'); },\n achMessage: (amount: string) => uiText('stripePaymentMethod.achMessage', { amount }),\n get verificationTitle() { return uiText('stripePaymentMethod.verificationTitle'); },\n verificationMessage: (amount: string) => uiText('stripePaymentMethod.verificationMessage', { amount }),\n get receiptNote() { return uiText('stripePaymentMethod.receiptNote'); },\n};\n","import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, Injector, ViewEncapsulation, afterNextRender, computed, effect, inject, input, signal, untracked, viewChild } from '@angular/core';\nimport { AlertComponent, ButtonComponent, HintComponent, KpiCardComponent, callHost, formatCurrency, isFinalPaymentRefusal, paymentErrorLabelKey, refusalLabelKey, wasQueuedOffline, warnQueuedPayment, type PaymentAttemptControls, type PaymentAttemptOutcome, type PaymentMethodContext } from '@forgeroute/ui';\nimport { StripePaymentComponent, type StripeBillingDetails, type StripeDeferredIntent } from '../stripe-payment/stripe-payment.component';\nimport type { StripeCardFunding, StripeConfirmationTokenEvent, StripeConfirmedEvent, StripeElementChange, StripeFailure } from '../stripe-payment/stripe-outcomes';\nimport type { StripePaymentMethodComponent } from './payment-stripe-method.component';\nimport { STRIPE_METHOD_TEXTS, stripeMethodType, type StripeFees, type StripeIntentInfo } from './payment-stripe-method.models';\nimport { UiLabelsService } from '@forgeroute/ui';\n\nconst WALLETS = { applePay: 'never', googlePay: 'never' };\nconst FIELDS = { billingDetails: { address: { country: 'auto', postalCode: 'auto' } } };\n\n/** The body `ui-payment-stripe-method` hands to the panel: the Payment Element, the fee rows and the whole Stripe flow, talking to the panel through `ctx`. */\n@Component({\n selector: 'ui-payment-stripe-body',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [AlertComponent, ButtonComponent, HintComponent, KpiCardComponent, StripePaymentComponent],\n template: `\n <div class=\"psm\">\n @if (confirmation(); as notice) {\n <ui-alert variant=\"success\" [title]=\"notice.title\" tabindex=\"-1\" class=\"psm-notice\" data-testid=\"stripe-method-confirmation\">\n <p>{{ notice.message }}</p>\n <p>{{ receiptNote() }}</p>\n </ui-alert>\n } @else {\n @if (ctx().amount == null) {\n <ui-hint data-testid=\"stripe-method-amount-needed\">{{ texts.amountNeeded }}</ui-hint>\n }\n @if (estimateError()) {\n <div class=\"psm-error\">\n <ui-alert variant=\"warning\" data-testid=\"stripe-method-estimate-error\">{{ estimateError() }}\n <ui-button variant=\"secondary\" size=\"sm\" data-testid=\"stripe-method-estimate-retry\" (click)=\"retryEstimate()\">{{ labels.t('common.tryAgain') }}</ui-button>\n </ui-alert>\n </div>\n }\n @if (lastAmount() != null) {\n <ui-stripe-payment #payment mode=\"payment\" [publishableKey]=\"config().publishableKey()\" [stripeAccount]=\"config().stripeAccount()\" [deferred]=\"deferred()\"\n [createIntent]=\"createIntentFn\" [paymentMethodTypes]=\"[methodType()]\" [showSubmit]=\"false\" [showErrors]=\"false\" [autoHandleCardAction]=\"true\" [collectConfirmationToken]=\"config().fundingPreview()\"\n [duplicateProtection]=\"config().duplicateProtection()\" [attemptAmount]=\"ctx().amount\" [attemptMethod]=\"ctx().method\" [payableRef]=\"config().payableRef()\" [attemptKey]=\"config().attemptKey()\" [checkStatus]=\"config().checkStatus()\" [paid]=\"config().paid()\" [hostPending]=\"config().hostPending()\"\n [statusPollMs]=\"config().statusPollMs()\" [statusPollMaxMs]=\"config().statusPollMaxMs()\" [statusCheckTimeoutMs]=\"config().statusCheckTimeoutMs()\" [statusFailGraceMs]=\"config().statusFailGraceMs()\" [authTimeoutMs]=\"config().authTimeoutMs()\" [allowStartOver]=\"config().allowStartOver()\" [offlineOverride]=\"config().offlineOverride()\" [confirmTimeoutMs]=\"config().confirmTimeoutMs()\"\n [readinessCheck]=\"config().readinessCheck()\" [readinessTimeoutMs]=\"config().readinessTimeoutMs()\" [readinessEveryMs]=\"config().readinessEveryMs()\" (outcome)=\"onAttemptOutcome($event)\"\n [wallets]=\"wallets\" [fields]=\"fields\" [defaultValues]=\"defaultValues()\" [appearance]=\"$any(config().appearance())\" [appearanceFromTokens]=\"true\" [label]=\"labels.t('stripePaymentStripeMethod.paymentDetails')\"\n (ready)=\"onReady()\" (elementChange)=\"onElementChange($event)\" (failed)=\"onFailed($event)\" (loadError)=\"onFailed($event)\" />\n @if (totalCard(); as card) {\n <ui-kpi-card class=\"psm-total\" data-testid=\"stripe-method-total\" [label]=\"labels.t('stripePaymentStripeMethod.totalCharged')\" [value]=\"card.value\" [subtitle]=\"card.subtitle\" icon=\"dollar\" color=\"blue\" valueColor=\"blue\" />\n }\n @if (feeRows().length) {\n <dl class=\"psm-fees\" data-testid=\"stripe-method-fees\" [attr.aria-label]=\"labels.t('stripePaymentStripeMethod.paymentTotal')\">\n @for (row of feeRows(); track row.key) {\n <div class=\"psm-fee\" [attr.data-testid]=\"'stripe-fee-' + row.key\"><dt>{{ row.label }}</dt><dd>{{ row.value }}</dd></div>\n }\n </dl>\n }\n @if (error()) { <div class=\"psm-error\"><ui-alert variant=\"danger\" data-testid=\"stripe-method-error\">{{ error() }}</ui-alert></div> }\n }\n }\n </div>\n `,\n styles: [`\n ui-payment-stripe-body { display: block; min-width: 0; }\n ui-payment-stripe-body .psm-error { margin-top: 12px; }\n ui-payment-stripe-body .psm-total { display: block; margin-top: 16px; }\n ui-payment-stripe-body .psm-fees { margin: 16px 0 0; padding: 14px 16px; border: 1px solid var(--ui-psp-border, #e2e8f0); border-radius: 10px; font-size: 0.8125rem; }\n ui-payment-stripe-body .psm-fee { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; color: var(--ui-psp-muted, #475569); }\n ui-payment-stripe-body .psm-fee dt, ui-payment-stripe-body .psm-fee dd { margin: 0; }\n ui-payment-stripe-body .psm-notice:focus { outline: none; }\n ui-payment-stripe-body .psm-notice p { margin: 0 0 6px; }\n `],\n})\nexport class PaymentStripeBodyComponent {\n protected readonly labels = inject(UiLabelsService);\n private readonly injector = inject(Injector);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n readonly ctx = input.required<PaymentMethodContext>();\n readonly config = input.required<StripePaymentMethodComponent>();\n private readonly payment = viewChild(StripePaymentComponent);\n\n protected readonly texts = STRIPE_METHOD_TEXTS;\n protected readonly wallets = WALLETS;\n protected readonly fields = FIELDS;\n\n readonly complete = signal(false);\n readonly processing = signal(false);\n /** What the attempt was STARTED with (pinned at the click). */\n private payAmount: number | null = null;\n /** The attempt's outcome is unknown right now (kept here, not read from the form: the form is already gone when the panel closes). */\n private attemptUnknown = false;\n private payMethod: string | null = null;\n /** What the payment that was RECORDED was made with (a late answer of an older attempt is recorded with its own amount and method). */\n private doneAmount: number | null = null;\n /** The amount and the panel's method of every attempt of this panel, by attempt key: a late answer of an OLDER attempt is recorded with its own (the form's outcome carries the Stripe type, not the panel's method). */\n private readonly attempts = new Map<string, { amount: number; method: string }>();\n private doneMethod: string | null = null;\n /** The payment was accepted (the panel was told, or the notice is up): Pay stays off even if the host keeps the panel open. */\n readonly done = signal(false);\n readonly error = signal('');\n /** The service gave an answer a retry cannot change (see `isFinalPaymentRefusal`), for THIS method, payable and amount: the text stays and Pay stays off until one of them changes (then the refusal and its text are cleared for good; it comes back only if the service answers it again). */\n readonly finalRefusal = signal<{ method: string; ref: string | null; amount: number } | null>(null);\n /** Fees from the host's estimate (before the payer pays); they decide the amount of the Payment Element. */\n readonly estimate = signal<StripeFees | null>(null);\n private readonly estimating = signal(false);\n protected readonly estimateError = signal('');\n private readonly estimateTick = signal(0);\n /** Fees the host answered when it created the intent. */\n private readonly intentFees = signal<StripeFees | null>(null);\n protected readonly confirmation = signal<{ title: string; message: string } | null>(null);\n /** The last valid amount: the Payment Element stays mounted (and keeps the typed card data) while the amount is briefly empty or invalid. */\n protected readonly lastAmount = signal<number | null>(null);\n private intent: StripeIntentInfo | null = null;\n private estimateRun = 0;\n /**\n * `fundingPreview`: the funding of the complete typed card; `null` while the card is incomplete / not a card. Only the FUNDING is reactive (a primitive, so setting the same value\n * again notifies nobody): the estimate effect runs once per funding change, not once per token. The id of the token that produced it is kept in `previewTokenId`.\n */\n private readonly previewFunding = signal<StripeCardFunding | null>(null);\n /** The id of the latest ConfirmationToken of the complete typed card (read when the estimate is asked); not reactive on purpose. */\n private previewTokenId: string | null = null;\n private previewRun = 0;\n /** `fundingPreview` only: a complete card changed and its token (and so its funding and the fee rows / total) is not known yet: Pay stays off, the rows on screen belong to the previous card. */\n private readonly previewPending = signal(false);\n private previewTimer: ReturnType<typeof setTimeout> | null = null;\n /** An estimate answer was dropped because a payment was being confirmed: ask again when that ends (else Pay would be free for the base amount). */\n private estimateStale = false;\n\n private readonly amountValue = computed(() => this.ctx().amount);\n private readonly methodValue = computed(() => this.ctx().method);\n protected readonly methodType = computed(() => stripeMethodType(this.ctx().method));\n private readonly total = computed(() => this.estimate()?.totalAmount ?? this.lastAmount() ?? 0);\n protected readonly receiptNote = computed(() => this.config().receiptNote());\n protected readonly deferred = computed((): StripeDeferredIntent => ({ mode: 'payment', amount: Math.round(this.total() * 100), currency: this.ctx().currency.toLowerCase() }));\n protected readonly defaultValues = computed(() => {\n const b: StripeBillingDetails | null = this.config().billingDetails();\n return b ? { billingDetails: b } : null;\n });\n protected readonly feeRows = computed(() => {\n const fees = this.intentFees() ?? this.estimate();\n const amount = this.lastAmount();\n if (!fees || amount == null || (fees.stripeFee === undefined && fees.platformFee === undefined)) return [];\n const money = (n: number) => formatCurrency(n, { currency: this.ctx().currency });\n const rows: { key: string; label: string; value: string }[] = [{ key: 'amount', label: this.labels.t('stripePaymentMethod.paymentAmount'), value: money(amount) }];\n if (fees.stripeFee !== undefined) rows.push({ key: 'processing', label: `${this.labels.t('stripePaymentMethod.processingFee')}${fees.stripeFeeLabel ? ` (${fees.stripeFeeLabel})` : ''}`, value: money(fees.stripeFee) });\n if (fees.platformFee !== undefined) rows.push({ key: 'platform', label: `${this.labels.t('stripePaymentMethod.platformFee')}${fees.platformFeeLabel ? ` (${fees.platformFeeLabel})` : ''}`, value: money(fees.platformFee) });\n return rows;\n });\n /** The headline figure: what the payer is charged, once fees are known. */\n protected readonly totalCard = computed(() => {\n const fees = this.intentFees() ?? this.estimate();\n if (!fees || this.lastAmount() == null || fees.totalAmount === undefined) return null;\n return { value: formatCurrency(fees.totalAmount, { currency: this.ctx().currency }), subtitle: this.labels.t('stripePaymentMethod.amountPlusFees') };\n });\n\n /** Bound as `[createIntent]` of ui-stripe-payment: called on Pay with the deferred form. */\n protected readonly createIntentFn = async (context?: { mode: 'payment' | 'setup'; confirmationToken?: StripeConfirmationTokenEvent | null; attemptKey?: string; payableRef?: string | null }): Promise<string> => {\n const create = this.config().createIntent();\n const ctx = this.ctx();\n if (!create || ctx.amount == null) throw new Error(this.labels.t('stripePayment.msg.cardsUnavailable'));\n this.cancelIntent(true); // a previous attempt that failed leaves an intent behind: cancel it even though a payment is \"processing\" now\n // The amount and method of THIS attempt are the PINNED ones (the click that started it), never what the amount field says by the time the intent is created.\n const attempt = this.payment()?.attempt;\n const amount: number = attempt?.pinnedAmount() ?? ctx.amount;\n const method: string = attempt?.pinnedMethod() ?? ctx.method;\n if (context?.attemptKey) this.attempts.set(context.attemptKey, { amount, method });\n let info: StripeIntentInfo | null | undefined;\n try { info = await callHost(() => create({\n amount, paymentMethod: method, paymentMethodType: this.methodType(), receivedDate: ctx.receivedDate, notes: ctx.note || null, ...ctx.allocation,\n ...(context?.confirmationToken ? { confirmationTokenId: context.confirmationToken.id, funding: context.confirmationToken.funding } : {}),\n ...(context?.attemptKey ? { attemptKey: context.attemptKey } : {}),\n ...(context?.attemptKey && context.payableRef !== undefined ? { payableRef: context.payableRef } : {}),\n })); } catch (err) {\n // The reference / payment-link codes are worded in OUR (translated) words; a final one keeps the text and turns Pay off instead of looping. The error keeps its code (the form still tells a failed-attempt replay).\n const labelKey = paymentErrorLabelKey(err);\n if (isFinalPaymentRefusal(err)) this.finalRefusal.set({ method: ctx.method, ref: this.config().payableRef(), amount });\n if (labelKey) throw Object.assign(new Error(this.labels.t(labelKey)), { status: (err as { status?: unknown }).status, code: (err as { code?: unknown; error?: { code?: unknown } }).code ?? (err as { error?: { code?: unknown } }).error?.code });\n throw err;\n }\n if (wasQueuedOffline(info)) { warnQueuedPayment(); throw new Error(this.labels.t('paymentAttempt.queuedOffline')); } // the offline layer QUEUED the request (a synthetic 202): no intent exists, the payer may try again\n if (!info?.clientSecret) throw new Error(this.labels.t('stripePayment.msg.initFailed'));\n this.intent = info;\n this.intentFees.set({ stripeFee: info.stripeFee, platformFee: info.platformFee, totalAmount: info.totalAmount, stripeFeeLabel: info.stripeFeeLabel, platformFeeLabel: info.platformFeeLabel });\n return info.clientSecret;\n };\n\n constructor() {\n effect(() => { const amount = this.amountValue(); if (amount != null) untracked(() => this.lastAmount.set(amount)); });\n // A final refusal belongs to the method, payable and amount it was raised for: when one of them changes the refusal and its text are cleared (and stay cleared unless the service answers it again).\n effect(() => {\n const scope = this.finalRefusal();\n if (!scope) return;\n const ctx = this.ctx();\n if (ctx.method !== scope.method || ctx.amount !== scope.amount || this.config().payableRef() !== scope.ref) untracked(() => { this.finalRefusal.set(null); this.error.set(''); });\n });\n // The panel's footer button for this method.\n effect(() => {\n const ctx = this.ctx();\n const processing = this.processing();\n const notice = this.confirmation();\n const complete = this.complete();\n const estimating = this.estimating();\n const done = this.done();\n const estimateFailed = !!this.estimateError();\n const previewPending = this.previewPending();\n const finalRefusal = !!this.finalRefusal();\n const protectedOff = !!this.payment()?.duplicateProtection() && (this.payment()!.attempt.unknown() || this.payment()!.attempt.paidLocked() || !this.payment()!.readiness.ready());\n const label = notice ? this.labels.t('common.done') : ctx.amount != null ? `${this.labels.t('stripePayment.pay')} ${formatCurrency(this.total(), { currency: ctx.currency })}` : this.labels.t('stripePayment.pay');\n untracked(() => ctx.setPrimary({\n label, loading: processing && !notice,\n disabled: notice ? done : !complete || processing || estimating || previewPending || estimateFailed || ctx.amount == null || done || protectedOff || finalRefusal,\n onClick: () => (notice ? this.finish() : void this.pay()),\n }));\n });\n // Estimated fees, debounced; they change the amount the Payment Element is created with.\n effect((onCleanup) => {\n const estimate = this.config().estimateFees();\n const amount = this.amountValue();\n const method = this.methodValue();\n const funding = this.previewFunding();\n this.estimateTick();\n const run = ++this.estimateRun; // any change makes an answer that is still on its way stale\n untracked(() => { this.estimate.set(null); this.intentFees.set(null); this.estimateError.set(''); });\n if (!estimate || amount == null) { untracked(() => this.estimating.set(false)); return; }\n untracked(() => this.estimating.set(true));\n let hung: ReturnType<typeof setTimeout> | null = null;\n const failure = this.labels.t('stripePayment.msg.feesFailed');\n const timer = setTimeout(async () => {\n // A hung estimate must not block the user forever: after the timeout \"Try again\" is offered, and Pay stays off (the form\n // would be created for the wrong amount). A late answer still recovers.\n hung = setTimeout(() => {\n if (run !== this.estimateRun) return;\n this.estimating.set(false);\n this.estimateError.set(failure);\n }, Math.max(1, this.config().estimateTimeoutMs()));\n let fees: StripeFees | null = null;\n try {\n fees = (await callHost(() => estimate({\n amount, paymentMethod: method, paymentMethodType: stripeMethodType(method),\n ...(this.config().fundingPreview() ? { funding, confirmationTokenId: funding === null ? null : this.previewTokenId } : {}),\n }))) ?? null;\n } catch { fees = null; }\n if (hung) { clearTimeout(hung); hung = null; }\n if (run !== this.estimateRun) return;\n this.estimating.set(false);\n if (this.processing()) { this.estimateStale = true; return; } // a payment is being confirmed: the form must not change under it; asked again when it ends\n if (fees) { this.estimate.set(fees); this.estimateError.set(''); }\n else { this.estimate.set(null); this.estimateError.set(this.config().feesRequired() ? failure : ''); }\n }, 300);\n onCleanup(() => { clearTimeout(timer); if (hung) clearTimeout(hung); });\n });\n effect(() => {\n if (this.processing()) return;\n untracked(() => {\n if (!this.estimateStale) return;\n this.estimateStale = false;\n // After a success (or while the notice shows) the fees on screen belong to the payment that was taken: keep them.\n if (!this.done() && !this.confirmation()) this.estimateTick.update(n => n + 1);\n });\n });\n // A new form is built for another method: it is not complete until Stripe says so.\n effect(() => { this.methodValue(); untracked(() => { this.complete.set(false); this.error.set(''); this.cancelPreview(); }); });\n // The panel tells us when it is closing or the method changes before this body is removed: an unfinished intent is cancelled,\n // and an accepted payment whose notice is still up is reported as recorded (finalize already ran).\n effect(() => { const ctx = this.ctx(); untracked(() => ctx.onCancel(() => (this.confirmation() ? this.finish() : this.cancelIntent()))); });\n inject(DestroyRef).onDestroy(() => { this.estimateRun++; this.cancelPreview(); this.cancelIntent(); });\n // The host resolves an undecided attempt through the plugin component (markSucceeded / markFailed / markNotCharged / markUnknown), without a status check.\n const controls: PaymentAttemptControls = {\n markUnknown: () => this.payment()?.markUnknown(),\n markSucceeded: () => this.payment()?.markSucceeded(),\n markFailed: () => this.payment()?.markFailed(),\n resetPaid: () => { this.payment()?.resetPaid(); this.done.set(false); this.confirmation.set(null); this.error.set(''); this.ctx().setExclusive(false); },\n markNotCharged: () => { this.payment()?.markNotCharged(); this.processing.set(false); this.ctx().setBusy(false); },\n };\n effect(() => { const config = this.config(); untracked(() => config.attachControls(controls)); });\n inject(DestroyRef).onDestroy(() => this.config().detachControls(controls));\n }\n\n /** Every change of the Payment Element: completeness for Pay, and (only with `fundingPreview`) the card funding preview. */\n protected onElementChange(change: StripeElementChange): void {\n this.complete.set(change.complete);\n if (!this.config().fundingPreview() || !this.config().estimateFees() || this.methodType() !== 'card') return;\n this.stopPreviewTimer();\n const run = ++this.previewRun;\n if (!change.complete) { this.previewTokenId = null; this.previewFunding.set(null); this.previewPending.set(false); return; } // the card was edited: its funding is unknown again\n this.previewPending.set(true);\n this.previewTimer = setTimeout(() => void this.runPreview(run), 400);\n }\n\n private async runPreview(run: number): Promise<void> {\n this.previewTimer = null;\n const payment = this.payment();\n if (!payment || this.processing() || this.done() || run !== this.previewRun) { if (run === this.previewRun) this.previewPending.set(false); return; }\n const made = await payment.createConfirmationToken();\n if (run !== this.previewRun) return; // a newer change owns the pending flag\n if (!made || !('id' in made) || made.paymentMethodType !== 'card') {\n // No token for THIS card: its funding is unknown (never the previous card's): the estimate is asked again with funding null, then Pay is released.\n this.previewTokenId = null;\n this.previewFunding.set(null);\n this.previewPending.set(false);\n return;\n }\n // A new token for a card of the same funding must not ask for the estimate again (Pay would flicker and the effect would loop on its own answers).\n this.previewTokenId = made.id;\n this.previewFunding.set(made.funding);\n this.previewPending.set(false);\n }\n\n private stopPreviewTimer(): void { if (this.previewTimer) { clearTimeout(this.previewTimer); this.previewTimer = null; } }\n\n private cancelPreview(): void { this.stopPreviewTimer(); this.previewRun++; this.previewTokenId = null; this.previewFunding.set(null); this.previewPending.set(false); }\n\n protected retryEstimate(): void { this.estimateTick.update(n => n + 1); }\n\n protected onReady(): void {\n this.complete.set(false);\n this.ctx().announce(this.labels.t('stripePaymentMethod.announceReady'));\n }\n\n protected onFailed(failure: StripeFailure): void {\n this.error.set(failure.message); // shown in a role=alert ui-alert: that is the announcement\n this.processing.set(false);\n this.ctx().report('failed', { message: failure.message });\n }\n\n /** The inner form's attempt resolved OUTSIDE the click (only with `duplicateProtection`): unknown -> reported and kept locked; a status check that says paid completes the payment. */\n protected onAttemptOutcome(outcome: PaymentAttemptOutcome): void {\n const ctx = this.ctx();\n const duplicate = outcome.kind === 'unknown' && outcome.reason === 'duplicate_suspected';\n if (outcome.kind === 'unknown' && !duplicate) this.attemptUnknown = true; // a suspected duplicate is a report about ANOTHER (second) payment: this attempt's lock and intent are not touched\n else if (outcome.kind === 'succeeded' || outcome.kind === 'failed') this.attemptUnknown = false;\n if (duplicate) {\n const message = this.labels.t('paymentAttempt.duplicate');\n this.error.set(message);\n ctx.report('duplicate_suspected', { message, attemptKey: outcome.attemptKey });\n ctx.announce(message);\n } else if (outcome.kind === 'unknown') {\n this.payAmount = this.payment()?.attempt.pinnedAmount() ?? this.payAmount; // the amount and method of the attempt that is UNKNOWN (an adopted one included), never a stale earlier one\n this.payMethod = this.payment()?.attempt.pinnedMethod() ?? this.payMethod;\n const message = this.labels.t(outcome.reason === 'offline' ? 'paymentAttempt.offlineInFlight' : outcome.reason === 'auth_abandoned' ? 'paymentAttempt.authAbandoned' : outcome.reason === 'timeout' ? 'paymentAttempt.timeout' : 'paymentAttempt.checking');\n ctx.report('unknown', { message });\n ctx.announce(message);\n } else if (outcome.kind === 'refused') {\n ctx.report('refused', { message: this.labels.t(refusalLabelKey(outcome.reason ?? '')) });\n } else if (outcome.kind === 'succeeded' && outcome.reason === 'other_tab') {\n // Another tab / page load paid this payable: this form only shows the paid lock. Nothing is recorded here (no `paid`, no `complete`): no money moved through THIS form and the amount typed here is not what was paid.\n // A host that wants to reconcile reads the paid attempt's key, amount and method from the report (and from the form's own `(outcome)`).\n ctx.report('paid_elsewhere', { message: this.labels.t('paymentAttempt.paid'), attemptKey: outcome.attemptKey, ...(outcome.method !== undefined ? { paid: { amount: outcome.amount ?? null, method: outcome.method } } : {}) });\n } else if (outcome.kind === 'succeeded' && !this.done() && (outcome.reason === 'status_check' || outcome.reason === 'host' || !this.processing() || this.isOlderAttempt(outcome.attemptKey))) {\n // A status check or the host settled it, or the confirmation answered LATE (after a timeout, when `pay()` has already returned, or while a NEWER attempt runs): the payment is recorded exactly once here,\n // with the amount and method of THAT attempt (the outcome carries them for a late answer).\n void this.completeAfterCheck(ctx, this.isOlderAttempt(outcome.attemptKey), outcome);\n } else if (outcome.kind === 'failed' && (outcome.reason === 'status_check' || outcome.reason === 'host')) {\n const message = this.labels.t('paymentAttempt.failedAfterCheck');\n this.error.set(message);\n ctx.report('failed', { message });\n this.cancelIntent(true);\n ctx.setBusy(false);\n }\n }\n\n /** Is `key` an attempt OLDER than the one running now (its answer came late, after the host unlocked it and a newer attempt began)? */\n private isOlderAttempt(key: string): boolean {\n const attempt = this.payment()?.attempt;\n return !!attempt && attempt.inFlight() && attempt.key() !== key;\n }\n\n /**\n * A status check found the payment paid after an unknown outcome: the host records it exactly as after a normal confirmation. For an OLDER attempt (its answer came while a newer one runs) the intent\n * and `finalize` belong to the NEWER attempt and are left alone: the host's webhook reconciles the older payment, which it knows by its attempt key.\n */\n private async completeAfterCheck(ctx: PaymentMethodContext, older = false, outcome?: PaymentAttemptOutcome): Promise<void> {\n if (this.done()) return;\n this.done.set(true); // synchronously, BEFORE any await: a second outcome (status check and host report at once) can never report `paid` twice\n const info = older ? null : this.intent;\n if (!older) this.intent = null;\n let finalizeFailed = false;\n const finalize = this.config().finalize();\n if (finalize && info) { try { await callHost(() => finalize(info)); } catch { finalizeFailed = true; } }\n const known = outcome ? this.attempts.get(outcome.attemptKey) : undefined;\n const result = { type: 'stripe' as const, paymentMethod: known?.method ?? this.payMethod ?? ctx.method, amount: known?.amount ?? outcome?.amount ?? this.payAmount ?? ctx.amount ?? this.lastAmount() ?? 0 };\n this.doneAmount = result.amount;\n this.doneMethod = result.paymentMethod;\n ctx.report(finalizeFailed ? 'finalize-failed' : 'paid', { result });\n ctx.announce(this.labels.t('paymentAttempt.succeededAfterCheck'));\n ctx.setBusy(false);\n ctx.complete(result);\n }\n\n /** Pays: validates the panel, confirms the Payment Element (creating the intent), then records it through the host. */\n async pay(): Promise<void> {\n const ctx = this.ctx();\n const payment = this.payment();\n if (this.processing() || this.estimating() || this.done() || !payment) return;\n if (!ctx.validate() || ctx.amount == null) return;\n this.payAmount = ctx.amount; // PINNED: what is recorded later is what this click asked for, whatever the amount field says by then\n this.payMethod = ctx.method;\n const attemptAmount: number = ctx.amount; // captured for THIS attempt: a late answer must not read the fields a newer click overwrote\n const attemptMethod: string = ctx.method;\n this.error.set('');\n this.processing.set(true);\n ctx.setBusy(true);\n ctx.announce(this.labels.t('stripePaymentMethod.announceProcessing'));\n let finished = false;\n try {\n const event = await payment.confirm();\n if (event) finished = await this.afterConfirm(event, ctx, attemptAmount, attemptMethod);\n } finally {\n this.processing.set(false);\n // An UNKNOWN outcome keeps the panel busy: the status check, the host or a late answer settles it (onAttemptOutcome frees the panel).\n if (!finished && !payment.attempt.unknown()) ctx.setBusy(false);\n }\n }\n\n private async afterConfirm(event: StripeConfirmedEvent, ctx: PaymentMethodContext, amount: number, method: string): Promise<boolean> {\n if (this.done()) return true; // already recorded by a status check while the confirmation was still pending\n const money = formatCurrency(amount, { currency: ctx.currency });\n if (event.outcome !== 'succeeded' && event.outcome !== 'processing' && event.outcome !== 'requires_verification') {\n this.error.set(this.texts.notCompleted);\n return false;\n }\n // Paid or accepted: the intent is the host's now, a close must not cancel it.\n const info = this.intent;\n this.intent = null;\n let finalizeFailed = false;\n const finalize = this.config().finalize();\n if (finalize && info) {\n try { await callHost(() => finalize(info)); } catch { finalizeFailed = true; } // Stripe took the payment: the host's webhook reconciles\n }\n const result = { type: 'stripe' as const, paymentMethod: method, amount };\n this.doneAmount = amount;\n this.doneMethod = method;\n if (event.outcome === 'succeeded') {\n ctx.report(finalizeFailed ? 'finalize-failed' : 'paid', { result });\n this.done.set(true);\n ctx.complete(result);\n return true;\n }\n const verification = event.outcome === 'requires_verification';\n ctx.report(finalizeFailed ? 'finalize-failed' : verification ? 'verification' : 'processing', { result });\n this.confirmation.set(verification\n ? { title: this.texts.verificationTitle, message: this.texts.verificationMessage(money) }\n : { title: this.texts.achTitle, message: this.texts.achMessage(money) });\n ctx.setExclusive(true);\n ctx.setBusy(false);\n afterNextRender(() => this.host.nativeElement.querySelector<HTMLElement>('.psm-notice')?.focus(), { injector: this.injector });\n return true;\n }\n\n /** \"Done\" on the ACH / verification notice, or closing the panel while the notice is up: the accepted payment is reported as recorded (once). */\n private finish(): void {\n const ctx = this.ctx();\n if (this.done()) return;\n this.done.set(true);\n ctx.complete({ type: 'stripe', paymentMethod: this.doneMethod ?? ctx.method, amount: this.doneAmount ?? ctx.amount ?? this.lastAmount() ?? 0 });\n }\n\n /**\n * Cancels the abandoned intent (close, another method, a retry). Unless `force`, it is left alone while a payment is being confirmed:\n * a retry (`createIntentFn`) runs inside `pay()`, so it forces the cancel of the PREVIOUS attempt's intent.\n */\n private cancelIntent(force = false): void {\n const info = this.intent;\n if (!info || (this.processing() && !force)) return;\n if (this.attemptUnknown) return; // the confirmation may still be running at Stripe: cancelling its intent could cancel a payment that is about to succeed\n this.intent = null;\n const cancel = this.config().cancel();\n if (cancel) callHost(() => cancel(info)).catch(() => { /* best effort */ });\n }\n}\n","import { ChangeDetectionStrategy, Component, TemplateRef, forwardRef, input, viewChild, computed, signal } from '@angular/core';\nimport {\n PAYMENT_METHOD_PLUGIN, PAYMENT_READINESS_EVERY_MS, PAYMENT_READINESS_TIMEOUT_MS, PAYMENT_REQUEST_TIMEOUT_MS, PAYMENT_STATUS_CHECK_TIMEOUT_MS, PAYMENT_STATUS_FAIL_GRACE_MS, PAYMENT_AUTH_TIMEOUT_MS, PAYMENT_STATUS_POLL_MAX_MS, PAYMENT_STATUS_POLL_MS, PaymentMethodPlugin,\n type CheckPaymentStatusFn, type PaymentAttemptControls, type HostResult, type PaymentMethodBodyContext, type PaymentPluginMethod, type ReadinessCheckFn,\n} from '@forgeroute/ui';\nimport type { StripeBillingDetails } from '../stripe-payment/stripe-payment.component';\nimport { PaymentStripeBodyComponent } from './payment-stripe-body.component';\nimport { STRIPE_METHOD_TEXTS, STRIPE_PAYMENT_METHODS, type StripeFeeContext, type StripeFees, type StripeIntentContext, type StripeIntentInfo, stripeMethodLabel } from './payment-stripe-method.models';\n\n/**\n * Adds LIVE Card and ACH (Stripe) to `ui-payment-side-panel`. Put it inside the panel only for customers who use Stripe: its presence replaces the\n * record-only Card / ACH (last 4 digits) with the Payment Element; remove it and the panel is record-only again.\n *\n * <ui-payment-side-panel ...>\n * @if (stripeEnabled()) {\n * <ui-payment-stripe-method [publishableKey]=\"key\" [createIntent]=\"createIntent\" [finalize]=\"finalize\" [cancel]=\"cancel\" />\n * }\n * </ui-payment-side-panel>\n *\n * The host owns the HTTP: `createIntent(ctx)` (POST create-payment-intent) answers `{ clientSecret, paymentIntentId, fees... }`, `finalize(info)` (POST\n * process-payment) runs after Stripe took the payment, `cancel(info)` cancels an abandoned intent. Outcomes arrive as the panel's `outcome` events with\n * kind `'plugin'` and codes `paid`, `processing`, `verification`, `finalize-failed` and `failed`.\n */\n@Component({\n selector: 'ui-payment-stripe-method',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [PaymentStripeBodyComponent],\n providers: [{ provide: PAYMENT_METHOD_PLUGIN, useExisting: forwardRef(() => StripePaymentMethodComponent) }],\n host: { style: 'display: none' },\n template: `<ng-template #body let-ctx><ui-payment-stripe-body [ctx]=\"ctx\" [config]=\"self\" /></ng-template>`,\n})\nexport class StripePaymentMethodComponent extends PaymentMethodPlugin {\n protected readonly self = this;\n /** Creates the PaymentIntent on the host's backend (called when the payer presses Pay). */\n readonly createIntent = input<((ctx: StripeIntentContext) => HostResult<StripeIntentInfo>) | null>(null);\n /** Records the payment after Stripe accepted it (succeeded, processing or needs bank verification). A failure here is reported, the payment still counts as taken. */\n readonly finalize = input<((info: StripeIntentInfo) => HostResult<unknown>) | null>(null);\n /** Cancels an intent that was created but not paid (panel closed, another method, a retry). */\n readonly cancel = input<((info: StripeIntentInfo) => HostResult<unknown>) | null>(null);\n /** Optional fee preview before paying; its `totalAmount` becomes the amount of the Payment Element (it must equal the intent's amount). */\n readonly estimateFees = input<((ctx: StripeFeeContext) => HostResult<StripeFees>) | null>(null);\n readonly publishableKey = input<string | null>(null);\n /** Connect account for direct charges; Stripe.js is loaded for it. */\n readonly stripeAccount = input<string | null>(null);\n readonly billingDetails = input<StripeBillingDetails | null>(null);\n readonly appearance = input<Record<string, unknown> | null>(null);\n /** The methods this plugin takes over (default: Card and ACH / Bank Transfer). Pass `[{ value: 'CARD', label: 'Card' }]` for cards only. */\n readonly methodListInput = input<readonly PaymentPluginMethod[] | null>(null, { alias: 'methodList' });\n readonly methodList = computed((): readonly PaymentPluginMethod[] => this.methodListInput() ?? STRIPE_PAYMENT_METHODS.map(m => ({ ...m, label: stripeMethodLabel(m.value, m.label) })));\n /** How long a fee estimate may take before Pay is released and \"Try again\" is offered (ms). */\n readonly estimateTimeoutMs = input(10000);\n /** The payer covers fees, so the intent amount is payment + fees: a rejected or empty estimate keeps Pay off (with \"Try again\") instead of falling back to the base amount, which Stripe would reject as a mismatch. */\n readonly feesRequired = input(false);\n /**\n * Opt-in (default off: the estimate and the intent request are exactly as before). For a fee schedule that depends on the card's funding (a platform fee on credit cards only):\n * once the typed card is complete a ConfirmationToken is made from the Payment Element, its funding is passed to `estimateFees` (`ctx.funding`, `ctx.confirmationTokenId`) so\n * the fee rows and the total update (credit vs debit vs bank account), and `createIntent` gets `confirmationTokenId` + `funding` for the backend's own lookup. Needs `[estimateFees]`.\n */\n readonly fundingPreview = input(false);\n // ── Duplicate-payment protection and readiness gate (opt-in: with `duplicateProtection` off the plugin behaves exactly as before) ──\n /** Turns on the duplicate-charge protection and the readiness gate of the Payment Element (docs: \"Duplicate-payment protection\", \"Readiness gate\"). Default off. */\n readonly duplicateProtection = input(false);\n /**\n * The payable this is for (an invoice, a balance, a payment link). While an attempt is undecided its opaque marker (key, amount, method) is stored under it in `localStorage`, so a RELOAD or a\n * SECOND TAB of the same payable starts locked (unknown) with the same attempt key. Without it the protection covers this page instance only. Nothing else is stored.\n */\n readonly payableRef = input<string | null>(null);\n /** A key the host supplies; empty = generated per payment attempt session (it arrives in `createIntent(ctx).attemptKey`). */\n readonly attemptKey = input<string | null>(null);\n /** The host's status check by attempt key: resolves an UNKNOWN outcome (timeout, offline mid-flight, abandoned 3-D Secure challenge). */\n readonly checkStatus = input<CheckPaymentStatusFn | null>(null);\n /** The payable is paid (host re-render, back navigation): Pay stays locked for good. */\n readonly paid = input(false);\n /** The host reports an ambiguous result of ITS charge call: \"Checking your payment...\" while true. */\n readonly hostPending = input(false);\n readonly statusPollMs = input(PAYMENT_STATUS_POLL_MS);\n readonly statusPollMaxMs = input(PAYMENT_STATUS_POLL_MAX_MS);\n /** A status check slower than this counts as unknown (ms). */\n readonly statusCheckTimeoutMs = input(PAYMENT_STATUS_CHECK_TIMEOUT_MS);\n /** While the attempt's own request is unsettled, a status answer `failed` is ignored for this long (ms). */\n readonly statusFailGraceMs = input(PAYMENT_STATUS_FAIL_GRACE_MS);\n /** Offer \"Start over\" after the status polling window (a new attempt with a NEW key). Turn it on ONLY when your backend allows ONE open or succeeded attempt per payable and answers 409 `payment_in_flight` to a second key: that rule is what makes it safe. */\n readonly allowStartOver = input(false);\n /** Managed environments where `navigator.onLine === false` is a false negative (captive portal, VPN): do not refuse a payment because of the browser's offline flag (default false). */\n readonly offlineOverride = input(false);\n /** The request timeout is replaced by this while a 3-D Secure challenge or the bank window is open (ms). */\n readonly authTimeoutMs = input(PAYMENT_AUTH_TIMEOUT_MS);\n /** How long ONE confirmation (intent creation + Stripe confirmation) may take before the outcome counts as unknown (ms). */\n readonly confirmTimeoutMs = input(PAYMENT_REQUEST_TIMEOUT_MS);\n /** The host's readiness endpoint (`GET /api/payments/ready`): `{ ready, reasons[] }`. */\n readonly readinessCheck = input<ReadinessCheckFn | null>(null);\n readonly readinessTimeoutMs = input(PAYMENT_READINESS_TIMEOUT_MS);\n readonly readinessEveryMs = input(PAYMENT_READINESS_EVERY_MS);\n readonly receiptNoteInput = input<string | null>(null, { alias: 'receiptNote' });\n readonly receiptNote = computed((): string => this.receiptNoteInput() ?? STRIPE_METHOD_TEXTS.receiptNote);\n\n private readonly body = viewChild<TemplateRef<PaymentMethodBodyContext>>('body');\n\n // ── The host resolves an undecided attempt itself (without a status check): the body registers its controls here ──\n private readonly controls = signal<PaymentAttemptControls | null>(null);\n /** @internal The body registers itself. */\n attachControls(controls: PaymentAttemptControls): void { this.controls.set(controls); }\n /** @internal The body leaves. */\n detachControls(controls: PaymentAttemptControls): void { if (this.controls() === controls) this.controls.set(null); }\n /** The host's charge of this payment is ambiguous (its call timed out): the plugin shows \"Checking your payment...\" and stays locked (see `checkStatus`). */\n markUnknown(): void { this.controls()?.markUnknown(); }\n /** The host's charge succeeded: the plugin records it (paid + complete) and locks the payable. */\n markSucceeded(): void { this.controls()?.markSucceeded(); }\n /** The host's charge was DEFINITIVELY refused: the plugin unlocks with a NEW attempt key. */\n markFailed(): void { this.controls()?.markFailed(); }\n /** NOTHING was sent to the processor: the plugin unlocks and the attempt key is KEPT (the backend must still answer the state of an attempt it already holds for that key). */\n markNotCharged(): void { this.controls()?.markNotCharged(); }\n /** The host starts a deliberate SECOND payment of this payable (an explicit \"pay again\" flow): forgets the paid state this form saw, removes the succeeded record and moves the epoch so the next attempt has a NEW key. Does nothing against the host's own `paid` input. */\n resetPaid(): void { this.controls()?.resetPaid(); }\n\n\n readonly methods = this.methodList;\n readonly template = this.body;\n}\n"],"mappings":";;;;;;;AAWA,MAAa,cAA2G,EACtH,YAAY,OAAO,qBACpB;A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