@forgeroute/ui 0.4.99 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/forgeroute-ui-offline.mjs +18 -2
- package/fesm2022/forgeroute-ui-offline.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-quickbooks.mjs +4953 -0
- package/fesm2022/forgeroute-ui-quickbooks.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-square.mjs +4315 -0
- package/fesm2022/forgeroute-ui-square.mjs.map +1 -0
- package/fesm2022/forgeroute-ui-stripe.mjs +1209 -77
- package/fesm2022/forgeroute-ui-stripe.mjs.map +1 -1
- package/fesm2022/{forgeroute-ui-ui-labels.es-Bdh64Ql6.mjs → forgeroute-ui-ui-labels.es-C1Meg25h.mjs} +271 -2
- package/fesm2022/{forgeroute-ui-ui-labels.es-Bdh64Ql6.mjs.map → forgeroute-ui-ui-labels.es-C1Meg25h.mjs.map} +1 -1
- package/fesm2022/forgeroute-ui.mjs +1845 -5
- package/fesm2022/forgeroute-ui.mjs.map +1 -1
- package/package.json +9 -1
- package/types/forgeroute-ui-offline.d.ts +20 -0
- package/types/forgeroute-ui-quickbooks.d.ts +1482 -0
- package/types/forgeroute-ui-square.d.ts +1376 -0
- package/types/forgeroute-ui-stripe.d.ts +421 -4
- package/types/forgeroute-ui.d.ts +857 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forgeroute-ui-square.mjs","names":[],"sources":["../../../projects/forgeroute-ui/square/src/square-loader/square-loader.ts","../../../projects/forgeroute-ui/square/src/errors/square-errors.ts","../../../projects/forgeroute-ui/square/src/square-payment/square-outcomes.ts","../../../projects/forgeroute-ui/square/src/square-payment/square-style.ts","../../../projects/forgeroute-ui/square/src/square-payment/square-payment.component.ts","../../../projects/forgeroute-ui/square/src/square-connect/square-connect.flow.ts","../../../projects/forgeroute-ui/square/src/square-connect/square-connect.component.ts","../../../projects/forgeroute-ui/square/src/payment-square-method/payment-square-method.models.ts","../../../projects/forgeroute-ui/square/src/payment-square-method/payment-square-body.component.ts","../../../projects/forgeroute-ui/square/src/payment-square-method/payment-square-method.component.ts"],"sourcesContent":["import { InjectionToken, type Provider } from '@angular/core';\nimport type { SquareConnectionConfig, SquareEnvironment, SquarePaymentsLike } from './square-types';\n\n/** The only addresses the SDK script is ever loaded from (Square's own CDN; never an address an answer or an input made up). */\nexport const SQUARE_SDK_URL = 'https://web.squarecdn.com/v1/square.js';\nexport const SQUARE_SANDBOX_SDK_URL = 'https://sandbox.web.squarecdn.com/v1/square.js';\n\n/** How long a script that is already in the page may take to define `window.Square` before the load is reported as failed. */\nexport const SQUARE_SCRIPT_WAIT_MS = 15_000;\n\n/** How long a script this loader inserted (or a form's `card()` / `attach()` / `ach()`) may stay silent before the load is reported as failed: a hung CDN must not leave a skeleton forever. */\nexport const SQUARE_LOAD_TIMEOUT_MS = 20_000;\n/**\n * Races a step of the form (`loader`, `card()`, `attach()`, `ach()`) against {@link SQUARE_LOAD_TIMEOUT_MS}: a promise that never settles becomes the error `makeError()` builds, so the\n * form shows its load error instead of a skeleton forever. The timer is always cleared (nothing is left pending).\n */\nexport function withSquareTimeout<T>(step: Promise<T> | T, makeError: () => Error): Promise<T> {\n return new Promise<T>((resolve, reject) => {\n const timer = setTimeout(() => reject(makeError()), SQUARE_LOAD_TIMEOUT_MS);\n Promise.resolve(step).then(value => { clearTimeout(timer); resolve(value); }, error => { clearTimeout(timer); reject(error); });\n });\n}\n\n/** Marks the script tags THIS loader inserted, so a tag whose `window.Square` is gone (the host deleted it) is replaced instead of waited for. */\nconst OWN_SCRIPT_MARK = 'data-forgeroute-square';\n\n/** Why the SDK could not be loaded; `code` is `'script_failed'` (the script did not load or never defined `window.Square`) or `'sdk_missing'`. */\nexport class SquareLoadError extends Error {\n constructor(readonly code: 'script_failed' | 'sdk_missing') {\n super(code);\n this.name = 'SquareLoadError';\n }\n}\n\n/** Loads the Web Payments SDK and resolves the payments object: `loader({ applicationId, locationId, environment })`. */\nexport type SquareLoaderFn = (config: SquareConnectionConfig) => Promise<SquarePaymentsLike>;\n\ninterface SquareGlobal { payments(applicationId: string, locationId: string): SquarePaymentsLike | Promise<SquarePaymentsLike> }\nconst squareGlobal = (): SquareGlobal | undefined => (window as unknown as { Square?: SquareGlobal }).Square;\n\n/**\n * The script tag handling, behind an object so a spec can watch it (internal: not part of the public API).\n *\n * The sandbox and the production SDK are two different scripts that BOTH define `window.Square`, so `window.Square` alone says nothing about which one it is. `active` remembers\n * the address of the script whose `window.Square` is current: when a payment form asks for the OTHER environment, the old object is set aside, the other script is loaded fresh and\n * its `window.Square` wins (a form that already has its payments object keeps working: it holds its own reference). A `window.Square` this loader did not load (`active` is `null`)\n * is trusted as it is. One page normally uses one environment; switching is supported but not a hot path.\n */\nexport const squareScript = {\n /** One load per address at a time; a failed load is forgotten so the next call retries with a fresh script. */\n pending: new Map<string, Promise<void>>(),\n /** The address of the script whose `window.Square` is current; `null` = unknown (nothing loaded yet, or the SDK came from the host page). */\n active: null as string | null,\n /** The load that currently OWNS an address: a callback of any other load (an older one, a timer that fires late) never touches `pending`, `active` or `window.Square`. */\n owners: new Map<string, object>(),\n load(url: string): Promise<void> {\n const switching = squareScript.active !== null && squareScript.active !== url;\n if (squareGlobal() && !switching) return Promise.resolve();\n // Two environments are never loaded at the same moment (both define window.Square): the second waits for the first to finish, then switches.\n for (const [other, inFlight] of squareScript.pending) if (other !== url) return inFlight.catch(() => undefined).then(() => squareScript.load(url));\n // A load of THIS address that is already running (also one that is doing the switch) is shared: never a second script, never a second download.\n const running = squareScript.pending.get(url);\n if (running) return running;\n const owner = {};\n squareScript.owners.set(url, owner);\n const promise = new Promise<void>((resolve, reject) => {\n const windowWithSquare = window as unknown as { Square?: SquareGlobal };\n const previous = switching ? windowWithSquare.Square : undefined;\n const current = () => squareScript.owners.get(url) === owner;\n let settled = false;\n let loadTimer: ReturnType<typeof setTimeout> | null = null;\n let script: HTMLScriptElement | null = null;\n const finish = (): boolean => {\n if (settled) return false;\n settled = true;\n if (loadTimer) { clearTimeout(loadTimer); loadTimer = null; }\n if (script) { script.onload = null; script.onerror = null; }\n return true;\n };\n const fail = () => {\n if (!finish()) return;\n if (current()) {\n squareScript.pending.delete(url);\n squareScript.owners.delete(url);\n if (switching && previous && !windowWithSquare.Square) windowWithSquare.Square = previous; // the other environment keeps working\n }\n reject(new SquareLoadError('script_failed'));\n };\n // A finished load is forgotten at once (only an IN-FLIGHT load is shared): nothing is retained, and coming back to this address later loads it again.\n const done = () => {\n if (!finish()) return;\n if (current()) { squareScript.active = url; squareScript.pending.delete(url); squareScript.owners.delete(url); }\n resolve();\n };\n const tags = Array.from(document.querySelectorAll('script')).filter(s => s.getAttribute('src') === url);\n let foreign = tags.filter(t => !t.hasAttribute(OWN_SCRIPT_MARK));\n if (switching) {\n // The other environment's SDK is current: run THIS address again (a script that stays in the page does not run twice) and let its `window.Square` replace the old one.\n tags.forEach(t => t.remove());\n foreign = [];\n delete windowWithSquare.Square;\n } else {\n // Our own tag is still in the page but `window.Square` is gone (the host deleted it): insert the script again instead of waiting for something that will not come.\n tags.filter(t => t.hasAttribute(OWN_SCRIPT_MARK)).forEach(t => t.remove());\n }\n if (!switching && foreign.length) {\n // Somebody else inserted the script: wait for `window.Square` instead of adding a second one.\n const started = Date.now();\n const timer = setInterval(() => {\n if (settled) { clearInterval(timer); return; }\n if (squareGlobal()) { clearInterval(timer); done(); }\n else if (Date.now() - started > SQUARE_SCRIPT_WAIT_MS) { clearInterval(timer); fail(); }\n }, 50);\n return;\n }\n const own = document.createElement('script');\n script = own;\n own.src = url;\n own.async = true;\n own.setAttribute(OWN_SCRIPT_MARK, '');\n loadTimer = setTimeout(() => { own.remove(); fail(); }, SQUARE_LOAD_TIMEOUT_MS); // onload / onerror never fired: the load is reported as failed\n own.onload = () => { if (squareGlobal()) done(); else { own.remove(); fail(); } };\n own.onerror = () => { own.remove(); fail(); };\n document.head.appendChild(own);\n });\n squareScript.pending.set(url, promise);\n return promise;\n },\n};\n\nexport const squareSdkUrl = (environment: SquareEnvironment): string => (environment === 'production' ? SQUARE_SDK_URL : SQUARE_SANDBOX_SDK_URL);\n\n/**\n * The default loader: adds the SDK script from Square's CDN (production or sandbox host by `environment`) once, then calls `Square.payments(applicationId, locationId)`.\n * Nothing is fetched until a payment form is shown.\n */\nexport const defaultSquareLoader: SquareLoaderFn = async (config) => {\n await squareScript.load(squareSdkUrl(config.environment));\n const square = squareGlobal();\n if (!square) throw new SquareLoadError('sdk_missing');\n return square.payments(config.applicationId, config.locationId);\n};\n\n/** How the Web Payments SDK is loaded. Provide your own to fake Square in tests or to load it differently. Defaults to `defaultSquareLoader`. */\nexport const SQUARE_LOADER = new InjectionToken<SquareLoaderFn>('SQUARE_LOADER', { providedIn: 'root', factory: () => defaultSquareLoader });\n\n/** App-wide defaults for every Square component, set once with `provideSquarePayment`. A value on the component always wins. */\nexport interface SquarePaymentDefaults {\n /** The Square application id (`sq0idp-...` / `sandbox-sq0idb-...`). */\n applicationId?: string;\n /** The seller's Square location id. */\n locationId?: string;\n /** `'production'` or `'sandbox'` (default `'sandbox'`: a forgotten setting never charges real cards). */\n environment?: SquareEnvironment;\n}\n\nexport const SQUARE_PAYMENT_DEFAULTS = new InjectionToken<SquarePaymentDefaults>('SQUARE_PAYMENT_DEFAULTS', { providedIn: 'root', factory: () => ({}) });\n\nexport interface ProvideSquarePaymentOptions extends SquarePaymentDefaults {\n /** Replaces how the SDK is loaded (tests, a self-hosted loader). */\n loader?: SquareLoaderFn;\n}\n\n/**\n * Global defaults for the Square components:\n *\n * providers: [provideSquarePayment({ applicationId: env.squareApplicationId, locationId: env.squareLocationId, environment: 'production' })]\n */\nexport function provideSquarePayment(options: ProvideSquarePaymentOptions = {}): Provider[] {\n const { loader, ...defaults } = options;\n const providers: Provider[] = [{ provide: SQUARE_PAYMENT_DEFAULTS, useValue: defaults }];\n if (loader) providers.push({ provide: SQUARE_LOADER, useValue: loader });\n return providers;\n}\n","import { UiLabelKey, uiText } from '@forgeroute/ui';\nimport type { SquareTokenError } from '../square-loader/square-types';\n\n/**\n * Plain-language text for the codes Square's Payments API answers when a payment is refused (https://developer.squareup.com/reference/square/objects/Error).\n * The Web Payments SDK never sees these (it only tokenizes); they come back from the host's backend after it created the payment, which is why the table is\n * public: `getSquarePaymentErrorMessage(code)` words them in the app's active language. Values are label keys; the English text lives in the dictionary.\n */\nexport const SQUARE_PAYMENT_ERROR_KEYS: Readonly<Record<string, UiLabelKey>> = {\n GENERIC_DECLINE: 'squareErrors.code.GENERIC_DECLINE',\n CARD_DECLINED: 'squareErrors.code.CARD_DECLINED',\n CARD_DECLINED_CALL_ISSUER: 'squareErrors.code.CARD_DECLINED_CALL_ISSUER',\n CARD_DECLINED_VERIFICATION_REQUIRED: 'squareErrors.code.CARD_DECLINED_VERIFICATION_REQUIRED',\n INSUFFICIENT_FUNDS: 'squareErrors.code.INSUFFICIENT_FUNDS',\n CVV_FAILURE: 'squareErrors.code.CVV_FAILURE',\n VERIFY_CVV_FAILURE: 'squareErrors.code.CVV_FAILURE',\n ADDRESS_VERIFICATION_FAILURE: 'squareErrors.code.ADDRESS_VERIFICATION_FAILURE',\n VERIFY_AVS_FAILURE: 'squareErrors.code.ADDRESS_VERIFICATION_FAILURE',\n INVALID_EXPIRATION: 'squareErrors.code.INVALID_EXPIRATION',\n BAD_EXPIRATION: 'squareErrors.code.INVALID_EXPIRATION',\n CARD_EXPIRED: 'squareErrors.code.CARD_EXPIRED',\n INVALID_CARD: 'squareErrors.code.INVALID_CARD',\n PAN_FAILURE: 'squareErrors.code.INVALID_CARD',\n CARD_NOT_SUPPORTED: 'squareErrors.code.CARD_NOT_SUPPORTED',\n INVALID_ACCOUNT: 'squareErrors.code.INVALID_ACCOUNT',\n PAYMENT_LIMIT_EXCEEDED: 'squareErrors.code.PAYMENT_LIMIT_EXCEEDED',\n TRANSACTION_LIMIT: 'squareErrors.code.PAYMENT_LIMIT_EXCEEDED',\n BUYER_REFUSED_PAYMENT: 'squareErrors.code.BUYER_REFUSED_PAYMENT',\n CARDHOLDER_INSUFFICIENT_PERMISSIONS: 'squareErrors.code.CARDHOLDER_INSUFFICIENT_PERMISSIONS',\n IDEMPOTENCY_KEY_REUSED: 'squareErrors.code.IDEMPOTENCY_KEY_REUSED',\n RATE_LIMITED: 'squareErrors.code.RATE_LIMITED',\n UNAUTHORIZED: 'squareErrors.code.UNAUTHORIZED',\n ACCESS_TOKEN_EXPIRED: 'squareErrors.code.UNAUTHORIZED',\n ACCESS_TOKEN_REVOKED: 'squareErrors.code.UNAUTHORIZED',\n};\n\n/** The card fields the SDK names in a validation error. */\nexport const SQUARE_FIELD_ERROR_KEYS: Readonly<Record<string, UiLabelKey>> = {\n cardNumber: 'squareErrors.field.cardNumber',\n expirationDate: 'squareErrors.field.expirationDate',\n cvv: 'squareErrors.field.cvv',\n postalCode: 'squareErrors.field.postalCode',\n};\n\n/** The SDK's own error types. */\nexport const SQUARE_TYPE_ERROR_KEYS: Readonly<Record<string, UiLabelKey>> = {\n UNSUPPORTED_CARD_BRAND: 'squareErrors.type.UNSUPPORTED_CARD_BRAND',\n INVALID_APPLICATION_ID: 'squareErrors.type.CONFIGURATION',\n INVALID_LOCATION_ID: 'squareErrors.type.CONFIGURATION',\n PAYMENT_METHOD_NOT_SUPPORTED: 'squareErrors.type.PAYMENT_METHOD_NOT_SUPPORTED',\n};\n\n/**\n * `'friendly'` (default): the code table (`overrides` first), then the validation field, then the SDK error type, then Square's own text for a validation error\n * (customer-facing), then the fallback. `'square'`: Square's own `message` untouched, the fallback when there is none.\n */\nexport type SquareErrorDisplay = 'friendly' | 'square';\n\nexport interface SquareErrorMessageOptions {\n display?: SquareErrorDisplay;\n /** Text for single codes (a payment code, an SDK error type, a card field name); wins over the tables. */\n overrides?: Readonly<Record<string, string>> | null;\n /** Shown when there is nothing better. */\n fallback?: string;\n}\n\n/** The text for a payment error code the host's backend got back from Square (`'GENERIC_DECLINE'`, ...), in the app's active language. */\nexport function getSquarePaymentErrorMessage(code: string | null | undefined, options: Pick<SquareErrorMessageOptions, 'overrides' | 'fallback'> = {}): string {\n const fallback = options.fallback ?? uiText('squareErrors.defaultMessage');\n const key = (code ?? '').toUpperCase();\n const override = key ? options.overrides?.[code as string] ?? options.overrides?.[key] : undefined;\n if (override) return override;\n const table = SQUARE_PAYMENT_ERROR_KEYS[key];\n return table ? uiText(table) : fallback;\n}\n\n/** The text to show the customer for an error of the Web Payments SDK (`result.errors[n]`). */\nexport function getSquareErrorMessage(error: SquareTokenError | null | undefined, options: SquareErrorMessageOptions = {}): string {\n const fallback = options.fallback ?? uiText('squareErrors.defaultMessage');\n if (!error) return fallback;\n if (options.display === 'square') return error.message || fallback;\n const overrides = options.overrides ?? {};\n for (const name of [error.code, error.type, error.field]) {\n if (name && overrides[name]) return overrides[name];\n }\n if (error.code && SQUARE_PAYMENT_ERROR_KEYS[error.code.toUpperCase()]) return uiText(SQUARE_PAYMENT_ERROR_KEYS[error.code.toUpperCase()]);\n if (error.field && SQUARE_FIELD_ERROR_KEYS[error.field]) return uiText(SQUARE_FIELD_ERROR_KEYS[error.field]);\n const type = (error.type ?? '').toUpperCase();\n if (SQUARE_TYPE_ERROR_KEYS[type]) return uiText(SQUARE_TYPE_ERROR_KEYS[type]);\n if (type === 'VALIDATION_ERROR' && error.message) return error.message;\n return fallback;\n}\n","import { UiLabelKey, uiText } from '@forgeroute/ui';\nimport { getSquareErrorMessage, type SquareErrorMessageOptions } from '../errors/square-errors';\nimport type { SquareTokenDetailsLike, SquareTokenError, SquareTokenResultLike } from '../square-loader/square-types';\n\n/** `'card'` = the Web Payments SDK card form, `'ach'` = Square's bank-account authorization window. */\nexport type SquareMethod = 'card' | 'ach';\n/** `'payment'` takes a payment (single-use token), `'setup'` saves the method on file (the token is used to create a card / bank account on file). */\nexport type SquareIntentKind = 'payment' | 'setup';\n\nexport type SquareCardType = 'CREDIT' | 'DEBIT' | 'UNKNOWN';\nexport type SquarePrepaidType = 'PREPAID' | 'NOT_PREPAID' | 'UNKNOWN';\n\n/**\n * What the SDK told about the tokenized method. Every field is `null` when the SDK did not send it. `cardType` / `prepaidType` (the funding of the card) are\n * only filled when the SDK returns them in `details.card`, which it usually does NOT at tokenization time: Square's own `card_type` / `prepaid_type` are\n * read on the server after the card exists (a card on file, or the payment), so a backend that needs the funding must read it there.\n */\nexport interface SquareTokenDetails {\n brand: string | null;\n last4: string | null;\n expMonth: number | null;\n expYear: number | null;\n cardType: SquareCardType | null;\n prepaidType: SquarePrepaidType | null;\n bankName: string | null;\n accountType: string | null;\n}\n\n/** A successful tokenization. The component NEVER talks to your backend: send `token` (single use) to it, together with `attemptKey` (never the deprecated per-token `idempotencyKey`). */\nexport interface SquareTokenizedEvent {\n /** The single-use source id (`cnon:...` for a card, `bnon:...` for a bank account). */\n token: string;\n method: SquareMethod;\n kind: SquareIntentKind;\n details: SquareTokenDetails;\n /** The buyer-verification (SCA / 3-D Secure) token, when `payments.verifyBuyer` ran (card, `amount` + `billingContact` given); `null` otherwise. */\n verificationToken: string | null;\n /**\n * @deprecated A new id per tokenization: do NOT use it as the charge's idempotency key (a retry with a new token would then be a second payment). Derive Square's `idempotency_key` from\n * `attemptKey`, and look the attempt up by `attemptKey` before calling Square.\n */\n idempotencyKey: string;\n /**\n * The key of this PAYMENT ATTEMPT (stable across retries after a timeout, a reload and a second tab; renewed only after a definitive failure or success): send it to your backend with the\n * charge, which derives the processor's idempotency key from it. `idempotencyKey` above is new per tokenization; the attempt key is the one that prevents a duplicate charge.\n */\n attemptKey: string;\n /** The amount the attempt STARTED with (pinned when the click began; the buyer verification asked for exactly this). `null` for a saved card or when the form has no `amount`. */\n amount: number | null;\n /** The payable the attempt started for (the form's `payableRef` at the click): send it with the charge; 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\nexport type SquareFailureStage = 'load' | 'validate' | 'tokenize' | 'verify';\n\n/** A failure: `message` is what to show the customer; `squareMessage` is Square's own text. */\nexport interface SquareFailure {\n code: string;\n message: string;\n squareMessage: string;\n stage: SquareFailureStage;\n /** The SDK's `status` (`'Cancel'`, `'Invalid'`, ...) for a tokenization failure. */\n status?: string;\n /** The card field a validation error is about. */\n field?: string;\n /** The SDK errors as returned. */\n errors?: SquareTokenError[];\n}\n\nexport function squareFailure(code: string, message: string, stage: SquareFailureStage, squareMessage = ''): SquareFailure {\n return { code, message, squareMessage, stage };\n}\n\n/** An error thrown by the SDK, the loader or a host callback: 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\nconst upper = (v: unknown): string => (typeof v === 'string' ? v.toUpperCase() : '');\nconst text = (v: unknown): string | null => (typeof v === 'string' && v.trim() ? v : null);\n\n/** `details` of a token result as the fixed shape (see {@link SquareTokenDetails}); an unreadable field is `null`. */\nexport function normalizeSquareDetails(details: SquareTokenDetailsLike | null | undefined): SquareTokenDetails {\n const card = details?.card;\n const cardType = upper(card?.cardType);\n const prepaid = upper(card?.prepaidType);\n return {\n brand: text(card?.brand),\n last4: text(card?.last4) ?? text(details?.lastFour) ?? text(details?.ach?.lastFour),\n expMonth: typeof card?.expMonth === 'number' ? card.expMonth : null,\n expYear: typeof card?.expYear === 'number' ? card.expYear : null,\n cardType: cardType === 'CREDIT' || cardType === 'DEBIT' || cardType === 'UNKNOWN' ? cardType : null,\n prepaidType: prepaid === 'PREPAID' || prepaid === 'NOT_PREPAID' || prepaid === 'UNKNOWN' ? prepaid : null,\n bankName: text(details?.bankName) ?? text(details?.ach?.bankName),\n accountType: text(details?.accountType) ?? text(details?.ach?.accountType),\n };\n}\n\n/** The failure of a `tokenize()` that did not answer `status: 'OK'` with a token. The text is chosen by `options` (see `getSquareErrorMessage`). */\nexport function failureFromTokenResult(result: SquareTokenResultLike, method: SquareMethod, options: SquareErrorMessageOptions = {}): SquareFailure {\n const errors = (result.errors ?? []).filter(e => !!e);\n const first = errors[0];\n const base = { status: result.status, ...(errors.length ? { errors } : {}) };\n if (!first) {\n const cancelled = result.status === 'Cancel';\n const key: UiLabelKey = cancelled ? 'squarePayment.msg.cancelled' : method === 'ach' ? 'squarePayment.msg.achFailed' : 'squarePayment.msg.tokenizeFailed';\n return { ...squareFailure(cancelled ? 'cancelled' : method === 'ach' ? 'ach_failed' : 'tokenize_failed', uiText(key), 'tokenize'), ...base };\n }\n const fallback = options.fallback ?? uiText(method === 'ach' ? 'squarePayment.msg.achFailed' : 'squarePayment.msg.tokenizeFailed');\n return {\n ...squareFailure(first.code || first.type || 'tokenize_failed', getSquareErrorMessage(first, { ...options, fallback }), 'tokenize', first.message ?? ''),\n ...base,\n ...(first.field ? { field: first.field } : {}),\n };\n}\n\n/** A new idempotency key (a UUID, with a time + random fallback for a browser without `crypto.randomUUID`). */\nexport function newIdempotencyKey(): string {\n const c = typeof crypto !== 'undefined' ? crypto : undefined;\n return c && 'randomUUID' in c ? c.randomUUID() : `${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}-${Math.random().toString(36).slice(2)}`;\n}\n","import { isDarkPage } from '@forgeroute/ui';\n\n/**\n * The `style` option of `payments.card({ style })`: the card form's look read from CSS custom properties at runtime, so one set of tokens styles the page and\n * the Square form, in light and dark.\n *\n * :root { --ui-square-color-primary: #0d9488; --ui-square-border-radius: 8px; }\n *\n * Tokens read (all optional; a missing one is left out so Square's default stays): `--ui-square-color-primary` (the focused field's border),\n * `--ui-square-color-text`, `--ui-square-color-background`, `--ui-square-color-border`, `--ui-square-color-danger`, `--ui-square-font-family`,\n * `--ui-square-border-radius`, `--ui-square-font-size-base`. On a dark page (`data-theme=\"dark\"`, or a dark system whose root is not forced to `light`) the text and\n * background fall back to a light-on-dark pair so a form without tokens stays readable.\n */\nexport type SquareCardStyle = Record<string, Record<string, string>>;\n\nconst DARK_TEXT = '#e2e8f0';\nconst DARK_BACKGROUND = '#0f172a';\nconst DARK_BORDER = '#64748b'; // 3.76:1 on the dark background (WCAG 1.4.11 non-text contrast; #475569 was ~2.35:1)\n\n/** Builds the card style from the tokens in effect on `element` (default: the document root). */\nexport function readSquareCardStyle(doc: Document, element: Element = doc.documentElement): SquareCardStyle {\n const view = doc.defaultView;\n const token = (name: string): string => (view ? view.getComputedStyle(element).getPropertyValue(name).trim() : '');\n const dark = isDarkPage(doc);\n const primary = token('--ui-square-color-primary');\n const text = token('--ui-square-color-text') || (dark ? DARK_TEXT : '');\n const background = token('--ui-square-color-background') || (dark ? DARK_BACKGROUND : '');\n const border = token('--ui-square-color-border') || (dark ? DARK_BORDER : '');\n const danger = token('--ui-square-color-danger');\n const font = token('--ui-square-font-family');\n const radius = token('--ui-square-border-radius');\n const size = token('--ui-square-font-size-base');\n const style: SquareCardStyle = {};\n const put = (selector: string, props: Record<string, string | undefined>): void => {\n const filled = Object.fromEntries(Object.entries(props).filter(([, v]) => !!v)) as Record<string, string>;\n if (Object.keys(filled).length) style[selector] = filled;\n };\n put('.input-container', { borderColor: border, borderRadius: radius });\n put('.input-container.is-focus', { borderColor: primary });\n put('.input-container.is-error', { borderColor: danger });\n put('.message-text', { color: text });\n put('.message-icon', { color: text });\n put('.message-text.is-error', { color: danger });\n put('input', { backgroundColor: background, color: text, fontFamily: font, fontSize: size });\n put('input::placeholder', { color: dark ? '#94a3b8' : '' });\n return style;\n}\n","import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, Injector, PLATFORM_ID, afterNextRender, computed, effect, inject, input, model, output, signal, untracked, viewChild, ViewEncapsulation } from '@angular/core';\nimport { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport {\n AlertComponent, ButtonComponent, CheckboxComponent, LiveRegionComponent, PAYMENT_READINESS_EVERY_MS, PAYMENT_READINESS_TIMEOUT_MS, PAYMENT_STATUS_CHECK_TIMEOUT_MS, PAYMENT_STATUS_FAIL_GRACE_MS, PAYMENT_HOST_SILENCE_MS, PAYMENT_STATUS_POLL_MAX_MS, PAYMENT_STATUS_POLL_MS,\n PaymentAttemptStatusComponent, PillTabsComponent, SkeletonComponent, TextComponent, TextInputComponent, UiLabelsService, createPaymentProtection, refusalLabelKey, uiText,\n type CheckPaymentStatusFn, type PaymentAttempt, type PaymentAttemptOutcome, type PaymentReadiness, type PaymentReadinessResult, type PillTab, type ReadinessCheckFn,\n} from '@forgeroute/ui';\nimport { SQUARE_LOADER, SQUARE_PAYMENT_DEFAULTS, SquareLoadError, withSquareTimeout } from '../square-loader/square-loader';\nimport type { SquareAchLike, SquareBillingContact, SquareCardLike, SquareConnectionConfig, SquarePaymentsLike, SquareVerifyBuyerDetails } from '../square-loader/square-types';\nimport type { SquareErrorDisplay, SquareErrorMessageOptions } from '../errors/square-errors';\nimport {\n failureFromTokenResult, messageOfThrown, newIdempotencyKey, normalizeSquareDetails, squareFailure,\n type SquareFailure, type SquareIntentKind, type SquareMethod, type SquareTokenizedEvent,\n} from './square-outcomes';\nimport { readSquareCardStyle, type SquareCardStyle } from './square-style';\n\n/** The texts of the screen-reader status region. */\nexport interface SquareA11yMessages {\n loading: string;\n processing: string;\n tokenized: 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 SQUARE_A11Y_MESSAGES: Readonly<SquareA11yMessages> = {\n get loading() { return uiText('squarePayment.a11y.loading'); },\n get processing() { return uiText('squarePayment.a11y.processing'); },\n get tokenized() { return uiText('squarePayment.a11y.tokenized'); },\n};\n\n/**\n * The live Square objects of a form, handed to the host by `(squareReady)`: the host's own code can call `card.tokenize()`, `ach.tokenize({ accountHolderName })`,\n * `payments.verifyBuyer(...)` and anything else the SDK offers. `card` is set for the card form, `ach` for the bank-account form (the other one is `null`).\n */\nexport interface SquareReadyEvent {\n payments: SquarePaymentsLike;\n card: SquareCardLike | null;\n ach: SquareAchLike | null;\n}\n\nlet nextId = 0;\nconst jsonEqual = (a: unknown, b: unknown): boolean => JSON.stringify(a) === JSON.stringify(b);\n/**\n * Structural equality for option objects that may hold functions (`cardOptions`): plain values and nested objects / arrays / Maps / Sets are compared by content (a Set's members\n * structurally and without regard to order), a Date by time, a RegExp by source and flags, a class instance by prototype AND own keys, a FUNCTION by reference, so a new callback\n * rebuilds the card form (JSON.stringify would drop functions and `undefined` and call two different callbacks equal). A cycle never loops: a pair of objects that is already being\n * compared (further up the same comparison) counts as equal while it is in progress.\n */\nexport function structuralEqual(a: unknown, b: unknown, inProgress: WeakMap<object, WeakSet<object>> = new WeakMap()): boolean {\n if (Object.is(a, b)) return true;\n if (typeof a !== 'object' || typeof b !== 'object' || !a || !b) return false;\n if (inProgress.get(a)?.has(b)) return true;\n if (Object.getPrototypeOf(a) !== Object.getPrototypeOf(b)) return false;\n if (a instanceof Date) return b instanceof Date && a.getTime() === b.getTime();\n if (a instanceof RegExp) return b instanceof RegExp && a.source === b.source && a.flags === b.flags;\n const pairs = inProgress.get(a) ?? new WeakSet<object>();\n pairs.add(b);\n inProgress.set(a, pairs);\n try {\n if (a instanceof Map) {\n const other = b as Map<unknown, unknown>;\n return a.size === other.size && [...a].every(([k, v]) => other.has(k) && structuralEqual(v, other.get(k), inProgress));\n }\n if (a instanceof Set) {\n const other = b as Set<unknown>;\n if (a.size !== other.size) return false;\n const rest = [...other];\n for (const member of a) {\n const at = rest.findIndex(candidate => structuralEqual(member, candidate, inProgress));\n if (at < 0) return false;\n rest.splice(at, 1);\n }\n return true;\n }\n const keysA = Object.keys(a);\n const keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(k => k in b && structuralEqual((a as Record<string, unknown>)[k], (b as Record<string, unknown>)[k], inProgress));\n } finally {\n pairs.delete(b);\n }\n}\n\n/**\n * Square Web Payments SDK form: a card form or Square's bank-account (ACH) authorization, as a payment (`mode=\"payment\"`) or to keep the method on file\n * (`mode=\"setup\"`).\n *\n * The component NEVER talks to your backend. It tokenizes in the browser and emits `(tokenized)` with the single-use token (plus the brand / last four /\n * bank name Square returned, an optional buyer-verification token and an idempotency key); your app sends that to its backend, which creates the payment or the\n * card on file. A failure is `(failed)` with a friendly message. The SDK script is loaded lazily from Square's CDN (nothing is fetched until a form is shown).\n *\n * <ui-square-payment [applicationId]=\"app\" [locationId]=\"loc\" environment=\"production\" [amount]=\"total\" [billingContact]=\"billing\"\n * (tokenized)=\"onToken($event)\" (failed)=\"onFailed($event)\" />\n *\n * Every behaviour of the CRM apps' Square forms is reproduced; see docs/square.md (\"Parity with the existing app implementations\").\n */\n@Component({\n selector: 'ui-square-payment',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [AlertComponent, ButtonComponent, CheckboxComponent, FormsModule, LiveRegionComponent, PaymentAttemptStatusComponent, PillTabsComponent, SkeletonComponent, TextComponent, TextInputComponent],\n host: { '[attr.aria-busy]': '!mountOnly() && (loading() || submitting()) ? \"true\" : null' },\n template: `\n <div class=\"sqp\">\n @if (!mountOnly() || a11yMessages()) {\n <ui-live-region data-testid=\"square-status\" [message]=\"statusText()\" />\n }\n @if (!mountOnly() && tabs().length > 1) {\n <div class=\"sqp-block\"><ui-pill-tabs [ariaLabel]=\"labels.t('squarePayment.method.group')\" [tabs]=\"tabs()\" [activeKey]=\"method()\" (tabChange)=\"onTab($event)\" /></div>\n }\n @if (!mountOnly() && showStatus()) {\n <ui-payment-attempt-status [attempt]=\"attempt\" [readiness]=\"readiness\" [allowStartOver]=\"allowStartOver()\" (retryLoad)=\"retryLoad()\" />\n }\n @if (!mountOnly() && (loading() || pending())) {\n <div class=\"sqp-skeleton\" data-testid=\"square-skeleton\" aria-hidden=\"true\">\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=\"sqp-block\" data-testid=\"square-load-error\"><ui-alert variant=\"danger\">{{ text }}</ui-alert></div>\n }\n @if (!mountOnly() && required()) {\n <div class=\"sqp-label\" data-testid=\"square-required-label\">{{ label() }}<span class=\"sqp-required\" aria-hidden=\"true\">*</span></div>\n }\n @if (method() === 'card') {\n <div #mount class=\"sqp-mount\" [attr.id]=\"mountId() || null\" [class]=\"mountClass()\" [class.sqp-mount--hidden]=\"mountHidden()\" [class.sqp-mount--locked]=\"mountLocked()\"\n [attr.aria-hidden]=\"mountHidden() ? 'true' : null\" [attr.aria-disabled]=\"mountLocked() ? 'true' : null\" [attr.inert]=\"mountHidden() || mountLocked() ? '' : null\"\n [attr.role]=\"mountOnly() ? null : 'group'\" [attr.aria-label]=\"mountOnly() ? null : label()\" [attr.data-testid]=\"mountTestId()\"></div>\n } @else if (!mountOnly()) {\n <div class=\"sqp-ach\" data-testid=\"square-ach\">\n <ui-text data-testid=\"square-ach-info\" size=\"sm\" tone=\"muted\" [text]=\"labels.t('squarePayment.achInfo')\" />\n <ui-text-input [label]=\"labels.t('squarePayment.holderLabel')\" [placeholder]=\"labels.t('squarePayment.holderPlaceholder')\" [inputTestId]=\"holderTestId()\" autocomplete=\"name\"\n [required]=\"true\" [maxlength]=\"255\" [error]=\"holderError()\" [showErrors]=\"attempted()\" [disabled]=\"locked()\"\n [ngModel]=\"holder()\" (ngModelChange)=\"holder.set($event ?? '')\" />\n @if (requireAchConsent()) {\n <ui-checkbox testId=\"square-consent\" [label]=\"achConsent()\" [required]=\"true\" [requiredMessage]=\"labels.t('squarePayment.consentRequired')\" [showErrors]=\"attempted()\"\n [disabled]=\"locked()\" [ngModel]=\"consent()\" (ngModelChange)=\"consent.set(!!$event)\" />\n }\n </div>\n }\n @if (!mountOnly() && errorText(); as text) {\n <div class=\"sqp-block\" [id]=\"errorId\" [attr.data-testid]=\"errorTestId()\"><ui-alert variant=\"danger\">{{ text }}</ui-alert></div>\n }\n @if (!mountOnly() && showSubmit()) {\n <div class=\"sqp-actions\">\n <ui-button variant=\"primary\" type=\"button\" [fullWidth]=\"true\" [loading]=\"submitting()\" [disabled]=\"submitDisabled()\" [ariaDescribedBy]=\"errorText() ? errorId : undefined\"\n data-testid=\"square-submit\" (click)=\"tokenize()\">{{ effectiveSubmitLabel() }}</ui-button>\n </div>\n }\n </div>\n `,\n styles: [`\n ui-square-payment { display: block; min-width: 0; }\n ui-square-payment .sqp { position: relative; }\n ui-square-payment .sqp-block { margin-top: 12px; }\n ui-square-payment .sqp-label { font-size: 0.875rem; font-weight: 500; color: var(--ui-text, #1e293b); margin-bottom: 6px; }\n ui-square-payment .sqp-required { color: var(--ui-danger, #dc2626); margin-left: 2px; }\n ui-square-payment .sqp-mount { min-height: 44px; margin-top: 12px; }\n ui-square-payment .sqp-ach { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }\n /* The submit button fills the row on every screen: a flex column stretches the (inline-flex) ui-button host, and [fullWidth] stretches its button. */\n ui-square-payment .sqp-actions { margin-top: 16px; display: flex; flex-direction: column; align-items: stretch; }\n /* While loading the card form is kept laid out (the SDK measures its container) but invisible and untouchable. */\n ui-square-payment .sqp-mount--hidden { position: absolute; top: 0; left: 0; right: 0; opacity: 0; pointer-events: none; }\n /* Disabled or tokenizing: the card form cannot be typed into. the inert attribute does it where it is supported; pointer-events (mouse / touch) and a dimmed look cover an older Safari. */\n ui-square-payment .sqp-mount--locked { pointer-events: none; opacity: 0.6; }\n `],\n})\nexport class SquarePaymentComponent {\n protected readonly labels = inject(UiLabelsService);\n private readonly loader = inject(SQUARE_LOADER);\n private readonly defaults = inject(SQUARE_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 private readonly injector = inject(Injector);\n\n // ── Inputs ─────────────────────────────────────────────────────────────\n /**\n * Mount-only mode: the component only creates the Square objects and mounts the card form (or creates the bank-account object). No submit button, skeleton, status text (unless\n * `a11yMessages` is set), switcher, holder / consent fields or alerts: load failures go to `(loadError)` only. The host keeps its own tokenization code and calls the SDK with the\n * objects from `(squareReady)`. `mountId` / `mountClass` / `mountTestId` still apply, `(ready)` still emits, and `tokenize()` stays available (the holder name then comes from\n * `accountHolderName`, since the holder field is not drawn).\n */\n readonly mountOnly = input(false);\n /** `'payment'` takes a payment, `'setup'` keeps the method on file (changes the default button text and the buyer-verification intent). */\n readonly mode = input<SquareIntentKind>('payment');\n /** The method shown: `'card'` (the SDK card form) or `'ach'` (the bank-account authorization). Two-way. */\n readonly method = model<SquareMethod>('card');\n /** The methods the customer may pick between (a switcher is shown for two or more); `null` = only the `method` above, no switcher. */\n readonly methods = input<readonly SquareMethod[] | null>(null);\n /** The Square application id. Falls back to `provideSquarePayment({ applicationId })`. */\n readonly applicationId = input<string | null>(null);\n readonly locationId = input<string | null>(null);\n /** `'production'` or `'sandbox'` (default: the provider's, else `'sandbox'`). Decides which Square host the SDK script comes from. */\n readonly environment = input<'production' | 'sandbox' | null>(null);\n /** The amount in major units (12.5 = $12.50), for buyer verification (SCA / 3-D Secure) of a card payment. */\n readonly amount = input<number | null>(null);\n readonly currency = input('USD');\n /** The buyer's billing contact, for buyer verification. */\n readonly billingContact = input<SquareBillingContact | null>(null);\n /** Run `payments.verifyBuyer` after a card token. `null` (default) = automatic: for a payment when `amount` and `billingContact` are both given, for a setup when `billingContact` is given. */\n readonly verifyBuyer = input<boolean | null>(null);\n /** The account holder name of the bank account (ACH); the customer can edit it. */\n readonly accountHolderName = input('');\n /** ACH: an unticked authorization checkbox blocks the tokenization (default TRUE: a bank debit needs the holder's authorization; the wording follows `mode`: one-time payment vs agreed-upon payments for a saved account). Not applied in `mountOnly` (no checkbox is drawn: the host owns the consent). */\n readonly requireAchConsent = input(true);\n readonly achConsentTextInput = input<string | null>(null, { alias: 'achConsentText' });\n readonly achConsent = computed(() => this.achConsentTextInput() ?? this.labels.t(this.mode() === 'setup' ? 'squarePayment.achConsentSetup' : 'squarePayment.achConsent'));\n /** `payments.ach({ redirectURI })`: where the bank sends the customer back after a redirect-based authorization. Passed only when set. */\n readonly achRedirectUri = input<string | null>(null);\n /** `payments.ach({ transactionId })`. Passed only when set. */\n readonly achTransactionId = input<string | null>(null);\n /** Extra options of `payments.card(options)`, merged over `cardStyle`. */\n readonly cardOptions = input<Record<string, unknown> | null>(null);\n /** The card form's CSS-like `style` (see Square's docs). */\n readonly cardStyle = input<SquareCardStyle | null>(null);\n /** Build the card `style` from the `--ui-square-*` CSS tokens (light / dark) when no `cardStyle` is given. */\n readonly styleFromTokens = input(false);\n\n /** Show the built-in attempt / readiness status block (a payment plugin that embeds this form shows its own and turns this off). */\n readonly showStatus = input(true);\n\n // ── Duplicate-payment protection and readiness gate (docs: \"Duplicate-payment protection\", \"Readiness gate\") ──\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 for the charge; empty = the component generates one per payment attempt session (see `attemptKeyChange`). */\n readonly attemptKey = input<string | null>(null);\n /** The host's status check by attempt key: resolves an UNKNOWN outcome (`'succeeded' | 'failed' | 'unknown' | 'in_flight'`). */\n readonly checkStatus = input<CheckPaymentStatusFn | null>(null);\n /** The payable is paid (host re-render, back navigation): the form shows the paid state and ignores every submit for good. */\n readonly paid = input(false);\n /** The host reports an ambiguous result of ITS charge call (its own timeout): the form goes to \"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 /** A token-only form whose host never reports (markSucceeded / markFailed / markUnknown / markNotCharged) becomes unknown after this long (ms), so the status check and \"Check again\" engage. */\n readonly hostSilenceMs = input(PAYMENT_HOST_SILENCE_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\n // Presentation\n readonly submitLabel = input('');\n /** Show the built-in submit button; turn off to use your own and call `tokenize()`. */\n readonly showSubmit = input(true);\n readonly disabled = input(false);\n /** The host is still preparing the form (e.g. it fetches the amount): show the loading skeleton. */\n readonly pending = input(false);\n /** Accessible name of the payment form. */\n readonly labelInput = input<string | null>(null, { alias: 'label' });\n readonly label = computed(() => this.labelInput() ?? this.labels.t('squarePayment.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 card container (an app's e2e selector). */\n readonly mountId = input('');\n readonly mountClass = input('');\n /** `data-testid` of the card container (default `square-card-form`, the id the mfh forms had). */\n readonly mountTestId = input('square-card-form');\n readonly errorTestId = input('square-error');\n readonly holderTestId = input('square-holder');\n /** Show failures in the built-in alert. Turn off when the host shows `(failed)` itself. */\n readonly showErrors = input(true);\n /** `'friendly'` (default) or `'square'` (Square's own message). See `getSquareErrorMessage`. */\n readonly errorDisplay = input<SquareErrorDisplay>('friendly');\n /** Replacement texts by code: Square error codes / types / card fields AND the library's own codes (`not_ready`, `holder_required`, `consent_required`, `cancelled`, `verification_failed`, ...). */\n readonly errorMessages = input<Record<string, string> | null>(null);\n /** The text when Square sends an error with no usable text. */\n readonly errorFallback = input('');\n readonly loadErrorMessageInput = input<string | null>(null, { alias: 'loadErrorMessage' });\n readonly loadErrorMessage = computed(() => this.loadErrorMessageInput() ?? this.labels.t('squarePayment.loadErrorMessage'));\n /** Texts of the screen-reader status region (translate them); missing keys keep the defaults. */\n readonly a11yMessages = input<Partial<SquareA11yMessages> | null>(null);\n\n // ── Outputs ────────────────────────────────────────────────────────────\n /**\n * The live Square objects, emitted once each time the form is created: right after the card form was attached (or the bank-account object created), before `(ready)`.\n * `null` is emitted when they go away (the form is re-created for new inputs, `reset()` or `destroyForm()`): drop your references. Destroying the component itself emits nothing\n * (the host owns that moment).\n */\n readonly squareReady = output<SquareReadyEvent | null>();\n /** The card form / bank authorization is ready. */\n readonly ready = output<void>();\n /** A step of an attempt started / ended (the synchronous lock). */\n readonly inFlightChange = output<boolean>();\n /** Unified outcome of a payment attempt: `succeeded`, `failed`, `unknown`, `refused` (with `reason`), `pending`. */\n readonly outcome = output<PaymentAttemptOutcome>();\n /** The attempt key in effect (also on `tokenized`): send it to your backend with the charge. */\n readonly attemptKeyChange = output<string>();\n /** The readiness gate changed: `{ ready, reasons }`. */\n readonly readinessChange = output<PaymentReadinessResult>();\n /** The customer's details were tokenized: send `token` to your backend. */\n readonly tokenized = output<SquareTokenizedEvent>();\n /** A step failed (validation, tokenization, buyer verification). `message` is ready to show. */\n readonly failed = output<SquareFailure>();\n /** The SDK could not be loaded or the form could not be created. */\n readonly loadError = output<SquareFailure>();\n\n // ── State ──────────────────────────────────────────────────────────────\n readonly loading = signal(false);\n readonly isReady = signal(false);\n readonly submitting = signal(false);\n readonly errorText = signal('');\n readonly loadErrorText = signal('');\n protected readonly holder = signal('');\n protected readonly consent = signal(false);\n protected readonly attempted = signal(false);\n private readonly announcement = signal('');\n private readonly resetTick = signal(0);\n\n protected readonly errorId = `ui-square-error-${nextId++}`;\n private readonly mountRef = viewChild<ElementRef<HTMLElement>>('mount');\n\n protected readonly tabs = computed((): PillTab[] => {\n const methods = this.methods();\n if (!methods || methods.length < 2) return [];\n return methods.map(m => ({ key: m, label: this.labels.t(m === 'card' ? 'squarePayment.method.card' : 'squarePayment.method.ach') }));\n });\n protected readonly locked = computed(() => this.disabled() || this.submitting() || this.attempt.locked());\n protected readonly mountHidden = computed(() => !this.mountOnly() && (this.loading() || this.pending() || !!this.loadErrorText()));\n /** The card form is not usable while the form is disabled or a tokenization runs (not in `mountOnly`: there the host owns the interaction). */\n protected readonly mountLocked = computed(() => !this.mountOnly() && this.locked());\n protected readonly holderError = computed(() => (this.attempted() && !this.holder().trim() ? this.labels.t('squarePayment.holderRequired') : ''));\n protected readonly effectiveSubmitLabel = computed(() => {\n const given = this.submitLabel();\n if (given) return given;\n const setup = this.mode() === 'setup';\n return this.labels.t(this.method() === 'ach' ? (setup ? 'squarePayment.submit.saveBank' : 'squarePayment.submit.payBank') : (setup ? 'squarePayment.submit.saveCard' : 'squarePayment.submit.pay'));\n });\n protected readonly submitDisabled = computed(() => this.disabled() || this.loading() || this.pending() || !this.isReady() || !!this.loadErrorText() || this.attempt.locked() || !this.readiness.ready());\n private readonly messages = computed((): SquareA11yMessages => {\n const given = Object.fromEntries(Object.entries(this.a11yMessages() ?? {}).filter(([, text]) => typeof text === 'string')) as Partial<SquareA11yMessages>;\n return { ...SQUARE_A11Y_MESSAGES, ...given };\n });\n protected readonly statusText = computed(() => {\n if (this.loading()) return this.messages().loading;\n if (this.submitting()) return this.messages().processing;\n return this.announcement();\n });\n\n private readonly connection = computed((): SquareConnectionConfig => ({\n applicationId: this.applicationId() || this.defaults.applicationId || '',\n locationId: this.locationId() || this.defaults.locationId || '',\n environment: this.environment() ?? this.defaults.environment ?? 'sandbox',\n }), { equal: jsonEqual });\n\n /** The options of `payments.card()`: `cardOptions` merged over the style; `null` = call `card()` with no argument (the SDK default look). */\n private readonly cardConfig = computed((): Record<string, unknown> | null => {\n const style = this.cardStyle();\n const options = this.cardOptions();\n if (!style && !options) return null;\n return { ...(style ? { style } : {}), ...(options ?? {}) };\n }, { equal: structuralEqual });\n\n private payments: SquarePaymentsLike | null = null;\n private card: SquareCardLike | null = null;\n private ach: SquareAchLike | null = null;\n private generation = 0;\n private destroyed = false;\n /** `(squareReady)` emitted an object set that has not been withdrawn (`null`) yet. */\n private announced = false;\n\n /** The duplicate-payment protection of this form: the synchronous lock, the attempt key, the unknown state. Public so a host can read `attempt.key()` / `attempt.unknown()`. */\n readonly attempt: PaymentAttempt;\n /** The readiness gate: `readiness.ready()` / `readiness.reasons()`. */\n readonly readiness: PaymentReadiness;\n\n constructor() {\n const protection = createPaymentProtection(this, {\n amount: () => this.amount(),\n method: () => this.method(),\n sdk: () => (this.loadErrorText() ? 'blocked' : this.loading() ? 'loading' : 'ok'),\n offlineMidFlight: false, // this form only TOKENIZES: the token call answers or fails by itself, no charge is in flight here\n onOutcome: o => this.outcome.emit(o),\n onInFlightChange: v => this.inFlightChange.emit(v),\n onKeyChange: k => this.attemptKeyChange.emit(k),\n onReadinessChange: r => this.readinessChange.emit(r),\n });\n this.attempt = protection.attempt;\n this.readiness = protection.readiness;\n effect(() => {\n const method = this.method();\n const mount = method === 'card' ? this.mountRef() : null;\n const connection = this.connection();\n const card = this.cardConfig();\n const ach = { redirectUri: this.achRedirectUri(), transactionId: this.achTransactionId() };\n this.resetTick();\n this.styleFromTokens(); // the token style is read when the form is built: switching it on / off rebuilds the form\n if (method === 'card' && !mount) return;\n untracked(() => { void this.init(mount?.nativeElement ?? null, method, connection, card, ach); });\n });\n effect(() => { const name = this.accountHolderName(); untracked(() => this.holder.set(name)); });\n inject(DestroyRef).onDestroy(() => { this.destroyed = true; this.generation++; this.disposeInstances(); this.payments = null; });\n }\n\n // ── Public methods ─────────────────────────────────────────────────────\n\n /**\n * Tokenizes the entered card / bank account (the same as the built-in button). Resolves the event (also emitted as `tokenized`), or `null` after a failure (emitted\n * as `failed`) or when nothing was started (already running, disabled, not ready). Never rejects: anything the SDK throws becomes a `failed` event.\n *\n * ACH opens the bank window: call this method directly from the click handler (no `await` before it), or the browser blocks the window.\n */\n async tokenize(): Promise<SquareTokenizedEvent | null> {\n if (this.submitting() || this.disabled() || this.pending()) return null;\n if (this.refusedByProtection()) return null;\n const method = this.method();\n const card = this.card;\n const ach = this.ach;\n if (!this.isReady() || (method === 'card' ? !card : !ach)) { this.fail(squareFailure('not_ready', this.labels.t('squarePayment.msg.notReady'), 'tokenize')); return null; }\n this.attempted.set(true);\n const holder = this.holder().trim();\n if (method === 'ach') {\n if (!holder) { this.fail(squareFailure('holder_required', this.labels.t('squarePayment.holderRequired'), 'validate')); this.focusInput('holder'); return null; }\n if (this.requireAchConsent() && !this.mountOnly() && !this.consent()) { this.fail(squareFailure('consent_required', this.labels.t('squarePayment.consentRequired'), 'validate')); this.focusInput('consent'); return null; }\n }\n const generation = this.generation;\n const kind = this.mode();\n const begun = this.attempt.begin(); // SYNCHRONOUS lock: the same tick as the click, before any await\n if (!begun.ok) return null;\n const attemptKey = begun.key;\n const payableRef = this.attempt.pinnedRef();\n const amount = this.attempt.pinnedAmount(); // PINNED at begin: a fee re-estimate while the card is verified never changes what was asked for\n let handedToHost = false;\n this.submitting.set(true);\n this.errorText.set('');\n this.announcement.set('');\n try {\n const result = method === 'card' ? await card!.tokenize() : await ach!.tokenize({ accountHolderName: holder });\n if (this.destroyed || generation !== this.generation) return null;\n if (result.status !== 'OK' || !result.token) { this.fail(failureFromTokenResult(result, method, this.errorOptions())); return null; }\n let verificationToken: string | null = null;\n if (method === 'card' && this.shouldVerify(kind, amount)) {\n const verified = await this.verify(result.token, kind, amount);\n if (this.destroyed || generation !== this.generation) return null;\n if ('code' in verified) { this.fail(verified); return null; }\n verificationToken = verified.token;\n }\n const event: SquareTokenizedEvent = {\n token: result.token, method, kind, details: normalizeSquareDetails(result.details), verificationToken, idempotencyKey: newIdempotencyKey(), attemptKey, amount, payableRef,\n };\n this.announcement.set(this.messages().tokenized);\n // A PAYMENT keeps its lock after the token: the host charges now, and until it reports markSucceeded / markFailed / markUnknown / markNotCharged (or the status check decides) a second\n // tokenization or charge is refused. A saved card (mode 'setup') charges nothing, so it unlocks.\n if (kind === 'payment') { handedToHost = true; this.attempt.markPending('token'); }\n this.tokenized.emit(event);\n return event;\n } catch (err) {\n if (this.destroyed || generation !== this.generation) return null;\n this.fail({ ...squareFailure('tokenize_failed', this.errorFallback() || this.labels.t(method === 'ach' ? 'squarePayment.msg.achFailed' : 'squarePayment.msg.tokenizeFailed'), 'tokenize', messageOfThrown(err, '')) });\n return null;\n } finally {\n this.submitting.set(false);\n if (!handedToHost) this.attempt.release(); // the attempt ended before any charge request (validation, tokenization, verification): unlock, the key is kept\n }\n }\n\n /** The host reports that ITS charge call timed out or is ambiguous: the form shows \"Checking your payment...\" and stays locked (see `checkStatus`). */\n markUnknown(): void { this.attempt.markUnknown('host'); }\n\n /** The host reports that the charge succeeded: the form locks for this payable (a success does NOT move the epoch: the same key replays the original payment; the paid lock lasts 24 hours, see `resetPaid()`). */\n markSucceeded(): void { this.attempt.succeed('host'); }\n\n /** The host reports a DEFINITIVE failure of the charge (declined): the form unlocks with a NEW attempt key. */\n markFailed(): void { this.attempt.fail('host'); }\n\n /** The host did not use the token and nothing reached the processor (its call never left, the offline layer refused it): the form unlocks and 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 /** Builds the form again (clears the typed card; a token is single use, so call this after the host has used one). */\n reset(): void { this.resetTick.update(n => n + 1); }\n\n /** Removes the card form (host teardown). The component re-creates it when its inputs change. */\n destroyForm(): void { this.generation++; this.disposeInstances(); this.isReady.set(false); this.loading.set(false); }\n\n // ── Internals ──────────────────────────────────────────────────────────\n\n /** The gate before ANYTHING starts: a paid or unknown payable, offline, or a failed readiness check refuses (nothing is sent, the reason is reported). */\n private refusedByProtection(): boolean {\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(squareFailure(reason, this.labels.t(refusalLabelKey(reason)), 'validate'));\n return true;\n }\n if (this.attempt.inFlight()) return true; // the host is charging the token of the earlier click: nothing may start (silent, like a double click)\n if (this.attempt.paidLocked() || this.attempt.unknown()) { this.attempt.begin(); return true; } // refuses and reports `refused`\n return false;\n }\n\n /** \"Retry loading\" of a blocked payment SDK: builds the form again (the loader asks Square's CDN again). */\n protected retryLoad(): void { this.reset(); }\n\n /** After a refused submit the focus goes to the bank field the message is about (the holder name or the authorization), once the view is up to date. */\n private focusInput(which: 'holder' | 'consent'): void {\n if (this.mountOnly()) return;\n const id = which === 'holder' ? this.holderTestId() : 'square-consent';\n afterNextRender(() => this.host.nativeElement.querySelector<HTMLElement>(`input[data-testid=\"${id}\"]`)?.focus(), { injector: this.injector });\n }\n\n private errorOptions(): SquareErrorMessageOptions {\n return { display: this.errorDisplay(), overrides: this.errorMessages(), ...(this.errorFallback() ? { fallback: this.errorFallback() } : {}) };\n }\n\n private shouldVerify(kind: SquareIntentKind, amount: number | null): boolean {\n const forced = this.verifyBuyer();\n if (forced !== null) return forced;\n return kind === 'payment' ? amount !== null && !!this.billingContact() : !!this.billingContact();\n }\n\n private async verify(token: string, kind: SquareIntentKind, amount: number | null): Promise<{ token: string } | SquareFailure> {\n const failure = (squareMessage = '') => squareFailure('verification_failed', this.labels.t('squarePayment.msg.verifyFailed'), 'verify', squareMessage);\n const verifyBuyer = this.payments?.verifyBuyer?.bind(this.payments);\n if (!verifyBuyer || (kind === 'payment' && amount === null)) return failure();\n const billing = this.billingContact();\n const details: SquareVerifyBuyerDetails = {\n intent: kind === 'setup' ? 'STORE' : 'CHARGE',\n ...(kind === 'payment' ? { amount: (Math.round((amount as number) * 100) / 100).toFixed(2), currencyCode: this.currency().toUpperCase() } : {}),\n ...(billing ? { billingContact: billing } : {}),\n customerInitiated: true,\n sellerKeyedIn: false,\n };\n try {\n const result = await verifyBuyer(token, details);\n return result?.token ? { token: result.token } : failure();\n } catch (err) {\n return failure(messageOfThrown(err, ''));\n }\n }\n\n private fail(f: SquareFailure): void {\n const override = this.errorMessages()?.[f.code];\n if (override) f = { ...f, message: override };\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 /** A `card()` / `ach()` that answers AFTER the form gave up on it (timeout, or the inputs changed): the late object is destroyed, never leaked. A rejection is ignored. */\n private discardLate(pending: Promise<{ destroy?(): Promise<void> | void }>): void {\n void pending.then(late => { try { void Promise.resolve(late.destroy?.()).catch(() => undefined); } catch { /* already gone */ } }, () => undefined);\n }\n\n private disposeInstances(): void {\n const card = this.card;\n const ach = this.ach;\n this.card = null;\n this.ach = null;\n if (this.announced) { this.announced = false; if (!this.destroyed) this.squareReady.emit(null); }\n for (const instance of [card, ach]) {\n if (!instance?.destroy) continue;\n try { void Promise.resolve(instance.destroy()).catch(() => undefined); } catch { /* the SDK may already have removed it */ }\n }\n }\n\n private loadFailed(code: string, message: string, squareMessage: string): void {\n this.loading.set(false);\n this.isReady.set(false);\n this.loadErrorText.set(this.loadErrorMessage());\n this.loadError.emit(squareFailure(code, message, 'load', squareMessage));\n }\n\n private async init(\n container: HTMLElement | null,\n method: SquareMethod,\n connection: SquareConnectionConfig,\n cardConfig: Record<string, unknown> | null,\n ach: { redirectUri: string | null; transactionId: string | null },\n ): Promise<void> {\n const generation = ++this.generation;\n this.disposeInstances();\n this.isReady.set(false);\n this.errorText.set('');\n this.loadErrorText.set('');\n this.announcement.set('');\n if (!this.isBrowser) { this.loading.set(false); return; }\n if (!connection.applicationId || !connection.locationId) { this.loadFailed('config_missing', this.labels.t('squarePayment.msg.configMissing'), ''); return; }\n this.loading.set(true);\n try {\n // No cache: every build of the form asks the loader again (the loader itself adds the SDK script once per page); the object is only this form's live handle.\n this.payments = null;\n const payments = await withSquareTimeout(this.loader(connection), () => new SquareLoadError('script_failed'));\n if (generation !== this.generation) return;\n this.payments = payments;\n } catch (err) {\n if (generation !== this.generation) return;\n this.loadFailed(err instanceof SquareLoadError ? err.code : 'load_error', this.labels.t('squarePayment.msg.loadFailed'), messageOfThrown(err, ''));\n return;\n }\n try {\n const payments = this.payments as SquarePaymentsLike;\n if (method === 'card') {\n // The token style is the base when no explicit style is given; `cardOptions` (and an explicit `cardStyle`) are spread over it, so options alone never switch `styleFromTokens` off.\n const tokenStyle = this.styleFromTokens() && cardConfig?.['style'] === undefined ? { style: readSquareCardStyle(this.doc, this.host.nativeElement) } : null;\n const options = tokenStyle || cardConfig ? { ...(tokenStyle ?? {}), ...(cardConfig ?? {}) } : null;\n const pendingCard = options ? payments.card(options) : payments.card();\n const card = await withSquareTimeout(pendingCard, () => new Error('timeout')).catch(err => { this.discardLate(pendingCard); throw err; });\n if (generation !== this.generation) { try { void Promise.resolve(card.destroy()).catch(() => undefined); } catch { /* gone */ } return; }\n this.card = card;\n try { await withSquareTimeout(card.attach(container as HTMLElement), () => new Error('timeout')); } catch (err) {\n if (generation !== this.generation) return;\n this.disposeInstances();\n this.loadFailed('mount_failed', this.labels.t('squarePayment.msg.cardFormFailed'), messageOfThrown(err, ''));\n return;\n }\n } else {\n const options: Record<string, unknown> = { ...(ach.redirectUri ? { redirectURI: ach.redirectUri } : {}), ...(ach.transactionId ? { transactionId: ach.transactionId } : {}) };\n const pendingAch = Object.keys(options).length ? payments.ach(options) : payments.ach();\n const instance = await withSquareTimeout(pendingAch, () => new Error('timeout')).catch(err => { this.discardLate(pendingAch); throw err; });\n if (generation !== this.generation) { try { void Promise.resolve(instance.destroy?.()).catch(() => undefined); } catch { /* gone */ } return; }\n this.ach = instance;\n }\n if (generation !== this.generation) return;\n this.loading.set(false);\n this.isReady.set(true);\n this.announced = true;\n this.squareReady.emit({ payments, card: this.card, ach: this.ach });\n this.ready.emit();\n } catch (err) {\n if (generation !== this.generation) return;\n this.disposeInstances();\n this.loadFailed('init_failed', this.labels.t(method === 'card' ? 'squarePayment.msg.cardFormFailed' : 'squarePayment.msg.achInitFailed'), messageOfThrown(err, ''));\n }\n }\n\n protected onTab(key: string): void {\n if (this.submitting() || this.disabled() || this.attempt.locked() || (key !== 'card' && key !== 'ach')) return;\n this.method.set(key);\n this.errorText.set('');\n }\n}\n","import type { DestroyRef, WritableSignal } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport type { Observable } from 'rxjs';\n\n/** The state of the seller's Square connection (the shape of contractor's `GET /integrations/square/status`, with the optional names a service may add). */\nexport interface SquareConnectStatus {\n connected: boolean;\n /** The integration is switched on for this account (informational). */\n enabled?: boolean;\n merchantId?: string | null;\n merchantName?: string | null;\n locationId?: string | null;\n locationName?: string | null;\n /** ISO date-time the connection was made. */\n connectedAt?: string | null;\n /** The access token was revoked or expired for good: the seller has to authorize again. */\n needsReconnect?: boolean;\n}\n\n/** What the start call answers: the address of Square's authorization page (`authUrl`, or `url`). */\nexport interface SquareConnectStart { authUrl?: string; url?: 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 each outcome.\n *\n * - `connected`: the connection is live. `source: 'check'` = after \"Check Status\"; `'return'` = the state was read again when the user came back to this tab (`refreshOnReturn`).\n * - `needs-reconnect`: Square no longer accepts the saved authorization.\n * - `not-connected`: \"Check Status\" found no connection (the authorization was not finished).\n * - `disconnected`: the connection was removed.\n * - `link-unavailable`: the answer had no https Square address; nothing was opened.\n * - `failed`: a call failed (`action` says which); `error` is what it threw.\n */\nexport type SquareConnectOutcome =\n | { kind: 'connected'; source: 'check' | 'return' }\n | { kind: 'needs-reconnect'; source: 'check' | 'return' }\n | { kind: 'not-connected' }\n | { kind: 'disconnected' }\n | { kind: 'link-unavailable' }\n | { kind: 'failed'; action: 'start' | 'check' | 'disconnect'; 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 SquareConnectState {\n status: WritableSignal<SquareConnectStatus | null>;\n loading: WritableSignal<boolean>;\n}\n\nexport interface SquareConnectFlowOptions {\n /** Read at call time, so a host can swap the call. Null = no call yet (`start()` does nothing). */\n start: () => (() => Observable<SquareConnectStart>) | null;\n getStatus: () => (() => Observable<SquareConnectStatus>) | null;\n disconnect: () => (() => Observable<unknown>) | null;\n state: SquareConnectState;\n /** Where outcomes go. */\n emit: (outcome: SquareConnectOutcome) => 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 Square when the browser refused the new tab (default `window.location.href = url`). */\n navigate?: (url: string) => void;\n /** Called when Square's page was opened in a new tab (the card then offers \"Check Status\"). */\n onOpened?: () => void;\n destroyRef: DestroyRef;\n}\n\n/** Only an https address on Square's own domains (`squareup.com`, `squareupsandbox.com`, `square.com`, or a real subdomain): never `evilsquareup.com`, `http:` or `javascript:`. */\nexport function isSquareUrl(url: string | undefined | null): url is string {\n if (!url) return false;\n try {\n const u = new URL(url);\n return u.protocol === 'https:' && ['squareup.com', 'squareupsandbox.com', 'square.com'].some(d => u.hostname === d || u.hostname.endsWith(`.${d}`));\n } catch { return false; }\n}\n\n/**\n * The Square OAuth connection as a plain class: start (authorization page in a new tab), \"Check Status\", disconnect, and the \"back from Square\" read.\n * `ui-square-connect` runs it behind its card; a host that has to start the flow from code creates its own instance over the same state signals.\n * Square's page always opens in a NEW tab opened inside the click (a tab opened after the request is blocked by popup blockers); only an https Square address is\n * opened; a failed call closes the empty tab.\n */\nexport class SquareConnectFlow {\n /** A Square tab was opened: the card reads the state again when the user comes back (`refreshOnReturn`). */\n tabOpened = false;\n\n constructor(private readonly o: SquareConnectFlowOptions) {}\n\n private get blocked(): boolean { return this.o.state.loading() || !!this.o.disabled?.(); }\n\n /** Asks for the authorization address and opens Square's page in a new tab. */\n startConnect(): void {\n const start = this.o.start();\n if (!start || this.blocked) return;\n this.o.state.loading.set(true);\n const tab = this.openBlankTab();\n start().pipe(takeUntilDestroyed(this.o.destroyRef)).subscribe({\n next: result => {\n this.o.state.loading.set(false);\n this.openSquare(tab, result?.authUrl ?? result?.url);\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 and reports it. */\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.status.set(s);\n this.o.state.loading.set(false);\n if (s.connected && s.needsReconnect) this.o.emit({ kind: 'needs-reconnect', source: 'check' });\n else if (s.connected) this.o.emit({ kind: 'connected', source: 'check' });\n else this.o.emit({ kind: 'not-connected' });\n },\n error: error => { this.o.state.loading.set(false); this.o.emit({ kind: 'failed', action: 'check', error }); },\n });\n }\n\n /** Removes the connection. The state becomes \"not connected\" only after the call succeeded. */\n disconnect(): void {\n const disconnect = this.o.disconnect();\n if (!disconnect || this.blocked) return;\n this.o.state.loading.set(true);\n disconnect().pipe(takeUntilDestroyed(this.o.destroyRef)).subscribe({\n next: () => {\n this.o.state.status.set({ connected: false });\n this.o.state.loading.set(false);\n this.o.emit({ kind: 'disconnected' });\n },\n error: error => { this.o.state.loading.set(false); this.o.emit({ kind: 'failed', action: 'disconnect', error }); },\n });\n }\n\n /** The state read when the user came back to this tab: silent unless a connection is live or needs to be redone. */\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.status.set(s);\n if (s.connected && s.needsReconnect) this.o.emit({ kind: 'needs-reconnect', source: 'return' });\n else if (s.connected) this.o.emit({ kind: 'connected', source: 'return' });\n },\n error: () => { /* the user can press Check Status; a failed background read says nothing */ },\n });\n }\n\n private openSquare(tab: Window | null, url: string | undefined): void {\n // A blank tab the user already closed (before the answer arrived) cannot take the address: this tab is sent instead, like a refused tab.\n if (isSquareUrl(url) && tab && !tab.closed) {\n tab.location.href = url;\n this.tabOpened = true;\n this.o.onOpened?.();\n } else if (isSquareUrl(url)) {\n this.navigateCurrentTab(url);\n } else {\n // not an https Square 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: Square 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, signal } from '@angular/core';\nimport type { Observable } from 'rxjs';\nimport { SquareConnectFlow } from './square-connect.flow';\nimport type { SquareConnectOutcome, SquareConnectStart, SquareConnectStatus } from './square-connect.flow';\nexport type { SquareConnectOutcome, SquareConnectStart, SquareConnectStatus } from './square-connect.flow';\nexport { SquareConnectFlow, isSquareUrl } from './square-connect.flow';\nimport { BadgeComponent, ButtonComponent, DetailCardComponent, LiveRegionComponent, ModalComponent, StackComponent, TextComponent, UiLabelsService, uiText } from '@forgeroute/ui';\n\n/**\n * The default wording of an outcome, for apps that just want a toast: `{ variant, message }`, or null when nothing should be said.\n */\nexport function squareConnectNotice(outcome: SquareConnectOutcome): { variant: 'success' | 'info' | 'error'; message: string } | null {\n switch (outcome.kind) {\n case 'connected': return { variant: 'success', message: uiText('squareConnect.noticeConnected') };\n case 'needs-reconnect': return { variant: 'error', message: uiText('squareConnect.noticeReconnect') };\n case 'not-connected': return { variant: 'info', message: uiText('squareConnect.noticeNotConnected') };\n case 'disconnected': return { variant: 'success', message: uiText('squareConnect.noticeDisconnected') };\n case 'link-unavailable': return { variant: 'error', message: uiText('squareConnect.noticeLinkUnavailable') };\n case 'failed': return { variant: 'error', message: uiText(outcome.action === 'start' ? 'squareConnect.failedStart' : outcome.action === 'check' ? 'squareConnect.failedCheck' : 'squareConnect.failedDisconnect') };\n }\n}\n\nlet nextConnectId = 0;\n\n/**\n * \"Square account\": the card where a business connects the Square account it collects payments into (Square OAuth). The host owns the data (its three calls and the\n * status value); the component owns the screen and the flow:\n *\n * - not connected: \"Connect Square\" (opens Square's authorization page in a NEW tab, then offers \"Check Status\");\n * - connected: success with the merchant, the location and the date, \"Check Status\" and \"Disconnect\" (asks to confirm first);\n * - needs reconnect: warning with \"Reconnect\".\n *\n * The page opens in a NEW tab opened inside the click (a tab opened after the request is blocked by popup blockers) and receives the address when it arrives; with the\n * tab refused the address opens in the current tab. Only an https Square address is ever opened. A failed call closes the empty tab and is reported, never toasted.\n *\n * <ui-square-connect [(status)]=\"status\" [startConnect]=\"start\" [getStatus]=\"getStatus\" [disconnect]=\"disconnect\" [refreshOnReturn]=\"true\" (outcome)=\"onOutcome($event)\" />\n *\n * where `start = () => http.get<SquareConnectStart>('/integrations/square/connect')`, `getStatus = () => http.get<SquareConnectStatus>('/integrations/square/status')` and\n * `disconnect = () => http.delete('/integrations/square/disconnect')`.\n */\n@Component({\n selector: 'ui-square-connect',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgTemplateOutlet, BadgeComponent, ButtonComponent, DetailCardComponent, ModalComponent, LiveRegionComponent, 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 <ui-live-region data-testid=\"square-connect-live\" [message]=\"liveText()\" />\n @if (bare()) {\n <ng-container *ngTemplateOutlet=\"body\" />\n } @else {\n <ui-detail-card [collapsible]=\"false\" [title]=\"title()\" [headingLevel]=\"3\" data-testid=\"square-connect-card\">\n <ng-container *ngTemplateOutlet=\"body\" />\n </ui-detail-card>\n }\n\n <ng-template #body>\n @if (state() === 'none') {\n <ui-stack gap=\"sm\" class=\"sqc-state\" tabindex=\"-1\" data-testid=\"square-connect-status-none\" [attr.aria-busy]=\"loading() ? 'true' : null\">\n <ui-text size=\"lg\" weight=\"semibold\" [text]=\"startTitle()\" />\n <ui-text size=\"sm\" [text]=\"startText()\" />\n <ui-stack direction=\"horizontal\">\n <ui-button variant=\"primary\" size=\"sm\" data-testid=\"square-connect-start-button\" [disabled]=\"disabled()\" (click)=\"start()\">@if (loading()) {<span aria-hidden=\"true\">{{ labels.t('common.loadingellipsis') }}</span><span class=\"sqc-sr\">{{ labels.t('squareConnect.opensInNewTabBusy', { label: startLabel() }) }}</span>} @else { {{ startLabel() }}<span class=\"sqc-sr\">{{ labels.t('squareConnect.opensInNewTabSr') }}</span>}</ui-button>\n @if (awaiting()) {\n <ui-button variant=\"secondary\" size=\"sm\" data-testid=\"square-connect-check-status-button\" [disabled]=\"disabled() || loading()\" (click)=\"check()\">{{ labels.t(loading() ? 'squareConnect.checking' : 'squareConnect.checkStatus') }}</ui-button>\n }\n </ui-stack>\n </ui-stack>\n } @else if (state() === 'reconnect') {\n <ui-stack gap=\"sm\" class=\"sqc-state\" tabindex=\"-1\" data-testid=\"square-connect-status-reconnect\" [attr.aria-busy]=\"loading() ? 'true' : null\">\n <span class=\"sqc-badge\"><ui-badge [label]=\"labels.t('squareConnect.needsReconnect')\" variant=\"red\" data-testid=\"square-connect-reconnect-badge\" /></span>\n <ui-text size=\"sm\" [text]=\"labels.t('squareConnect.reconnectText')\" />\n <ui-stack direction=\"horizontal\">\n <ui-button variant=\"primary\" size=\"sm\" data-testid=\"square-connect-reconnect-button\" [disabled]=\"disabled()\" (click)=\"start()\">@if (loading()) {<span aria-hidden=\"true\">{{ labels.t('common.loadingellipsis') }}</span><span class=\"sqc-sr\">{{ labels.t('squareConnect.opensInNewTabBusy', { label: labels.t('squareConnect.reconnect') }) }}</span>} @else { {{ labels.t('squareConnect.reconnect') }}<span class=\"sqc-sr\">{{ labels.t('squareConnect.opensInNewTabSr') }}</span>}</ui-button>\n <ui-button variant=\"secondary\" size=\"sm\" data-testid=\"square-connect-disconnect-button\" [disabled]=\"disabled() || loading()\" (click)=\"askDisconnect()\">{{ labels.t('squareConnect.disconnect') }}</ui-button>\n </ui-stack>\n </ui-stack>\n } @else {\n <ui-stack gap=\"sm\" class=\"sqc-state\" tabindex=\"-1\" data-testid=\"square-connect-status-connected\" [attr.aria-busy]=\"loading() ? 'true' : null\">\n <ui-text size=\"lg\" weight=\"semibold\" [text]=\"labels.t('squareConnect.connected')\" />\n @if (merchant(); as merchant) { <ui-text size=\"sm\" tone=\"muted\" data-testid=\"square-connect-merchant\" [text]=\"labels.t('squareConnect.merchantLine', { merchant })\" /> }\n @if (location(); as location) { <ui-text size=\"sm\" tone=\"muted\" data-testid=\"square-connect-location\" [text]=\"labels.t('squareConnect.locationLine', { location })\" /> }\n @if (connectedOn(); as date) { <ui-text size=\"sm\" tone=\"muted\" data-testid=\"square-connect-date\" [text]=\"labels.t('squareConnect.connectedOn', { date })\" /> }\n <ui-stack direction=\"horizontal\">\n <ui-button variant=\"secondary\" size=\"sm\" data-testid=\"square-connect-check-status-button\" [disabled]=\"disabled() || loading()\" (click)=\"check()\">{{ labels.t(loading() ? 'squareConnect.checking' : 'squareConnect.checkStatus') }}</ui-button>\n <ui-button variant=\"secondary\" size=\"sm\" data-testid=\"square-connect-disconnect-button\" [disabled]=\"disabled() || loading()\" (click)=\"askDisconnect()\">{{ labels.t('squareConnect.disconnect') }}</ui-button>\n </ui-stack>\n </ui-stack>\n }\n </ng-template>\n\n <ui-modal [open]=\"confirming()\" [title]=\"labels.t('squareConnect.disconnectTitle')\" maxWidth=\"440px\" [describedBy]=\"confirmMessageId\" [busy]=\"loading()\" dialogTestId=\"square-connect-confirm\" (close)=\"cancelDisconnect()\">\n <p [id]=\"confirmMessageId\" class=\"sqc-confirm\" data-testid=\"square-connect-confirm-message\">{{ labels.t('squareConnect.disconnectMessage') }}</p>\n <ui-button modal-footer-left variant=\"secondary\" size=\"sm\" data-testid=\"square-connect-confirm-cancel\" [disabled]=\"loading()\" (click)=\"cancelDisconnect()\">{{ labels.t('common.cancel') }}</ui-button>\n <ui-button modal-footer-right variant=\"danger\" size=\"sm\" data-testid=\"square-connect-confirm-accept\" [loading]=\"loading()\" (click)=\"doDisconnect()\">{{ labels.t('squareConnect.disconnect') }}</ui-button>\n </ui-modal>\n `,\n styles: [`ui-square-connect { display: block; min-width: 0; } ui-square-connect .sqc-badge { display: flex; } ui-square-connect .sqc-confirm { margin: 0; font-size: 0.9375rem; line-height: 1.5; } ui-square-connect .sqc-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 SquareConnectComponent {\n /** Unique per instance: two connect cards on one page must not share the id the dialog's description points at. */\n protected readonly confirmMessageId = `sqc-disconnect-msg-${nextConnectId++}`;\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 answers Square's authorization address (`{ authUrl }`). Needed for `start()`. */\n readonly startConnect = input<(() => Observable<SquareConnectStart>) | null>(null);\n /** The call that reads the connection's state. Needed for `check()` and `refreshOnReturn`. */\n readonly getStatus = input<(() => Observable<SquareConnectStatus>) | null>(null);\n /** The call that removes the connection. Needed for \"Disconnect\". */\n readonly disconnect = input<(() => Observable<unknown>) | null>(null);\n\n /** The connection state (null = not read yet = shown as not connected). Two-way: the component sets it after \"Check Status\" and \"Disconnect\". */\n readonly status = model<SquareConnectStatus | null>(null);\n\n readonly titleInput = input<string | null>(null, { alias: 'title' });\n readonly title = computed(() => this.titleInput() ?? this.labels.t('squareConnect.title'));\n /** No card around the content: the text and the buttons sit directly in the host's own card (a setup wizard step). `title` is not shown then. */\n readonly bare = input(false);\n readonly startTitleInput = input<string | null>(null, { alias: 'startTitle' });\n readonly startTitle = computed(() => this.startTitleInput() ?? this.labels.t('squareConnect.startTitle'));\n readonly startTextInput = input<string | null>(null, { alias: 'startText' });\n readonly startText = computed(() => this.startTextInput() ?? this.labels.t('squareConnect.startText'));\n readonly startLabelInput = input<string | null>(null, { alias: 'startLabel' });\n readonly startLabel = computed(() => this.startLabelInput() ?? this.labels.t('squareConnect.startLabel'));\n /** The buttons cannot be pressed (a read-only user). */\n readonly disabled = input(false);\n /** Ask before disconnecting (default true). */\n readonly confirmDisconnect = input(true);\n /** After a Square tab was opened, the state is read again when this tab becomes visible again (the user came back): `(outcome)` then reports `connected` / `needs-reconnect` with source `return`. */\n readonly refreshOnReturn = input(false);\n /** How the current tab is sent to Square when the browser refused the new tab (default: `window.location.href = url`). */\n readonly navigateTab = input<((url: string) => void) | null>(null);\n\n /** What happened (see {@link SquareConnectOutcome}); the host words it. */\n readonly outcome = output<SquareConnectOutcome>();\n\n /** A request is running: the buttons show \"Loading...\" / \"Checking...\" and cannot be pressed again. Two-way, so a host can read it. */\n readonly loading = model(false);\n\n protected readonly awaiting = signal(false);\n protected readonly confirming = signal(false);\n protected readonly state = computed((): 'none' | 'connected' | 'reconnect' => {\n const s = this.status();\n return !s?.connected ? 'none' : s.needsReconnect ? 'reconnect' : 'connected';\n });\n protected readonly merchant = computed(() => this.status()?.merchantName || this.status()?.merchantId || '');\n protected readonly location = computed(() => this.status()?.locationName || this.status()?.locationId || '');\n protected readonly connectedOn = computed(() => this.labels.formatDate(this.status()?.connectedAt ?? null, 'mediumDate'));\n /** What the persistent status region says: the current state, plus \"Loading.\" while a request runs. */\n protected readonly liveText = computed(() => {\n const text = this.labels.t(({ none: 'squareConnect.live.none', connected: 'squareConnect.live.connected', reconnect: 'squareConnect.live.reconnect' } as const)[this.state()]);\n return this.loading() ? this.labels.t('squareConnect.live.loading', { 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 SquareConnectFlow({\n start: () => this.startConnect(),\n getStatus: () => this.getStatus(),\n disconnect: () => this.disconnect(),\n state: { status: this.status, loading: this.loading },\n emit: outcome => this.outcome.emit(outcome),\n disabled: () => this.disabled(),\n navigate: url => this.navigateCurrentTab(url),\n onOpened: () => this.awaiting.set(true),\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;\n this.acted = false;\n if (state === 'connected') this.awaiting.set(false);\n if (focusIt) afterNextRender(() => this.host.nativeElement.querySelector<HTMLElement>('.sqc-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 /** Asks for the authorization address and opens Square's page in a new tab. */\n start(): void { const run = this.canRun(this.startConnect()); this.flow.startConnect(); this.acted ||= run; }\n\n /** \"Check Status\": reads the state; the card updates and the outcome is reported. */\n check(): void { const run = this.canRun(this.getStatus()); this.flow.check(); this.acted ||= run; }\n\n /** \"Disconnect\": asks for confirmation first (`confirmDisconnect`, default), then removes the connection. */\n askDisconnect(): void {\n if (this.disabled() || this.loading() || !this.disconnect()) return;\n if (this.confirmDisconnect()) this.confirming.set(true);\n else this.doDisconnect();\n }\n\n protected cancelDisconnect(): void { if (!this.loading()) this.confirming.set(false); }\n\n /** Removes the connection (what the confirm's button calls). */\n doDisconnect(): void {\n const run = this.canRun(this.disconnect());\n this.flow.disconnect();\n this.acted ||= run;\n this.confirming.set(false);\n }\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 /** The browser refused the new tab: Square 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 { SquareCardType, SquareMethod, SquareTokenDetails } from '../square-payment/square-outcomes';\n\n/** What the host's `createPayment` receives: the entered payment, how it is applied to charges, and the single-use token Square gave for the customer's card / bank account. */\nexport interface SquarePaymentContext 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 /** Square's side of it: `'card'` or `'ach'`. */\n method: SquareMethod;\n receivedDate: string;\n notes: string | null;\n /** The single-use source id: send it to your backend (which sends it to the payments service). */\n token: string;\n /** Brand, last four, bank name ... as far as the SDK sent them. */\n details: SquareTokenDetails;\n /** The card funding when the SDK already told it at tokenization (`null` otherwise: a backend that needs it reads `card_type` from Square once the card exists). */\n funding: SquareCardType | null;\n /** The buyer-verification (SCA) token, when the form ran `verifyBuyer`. */\n verificationToken: string | null;\n /**\n * @deprecated A new id per tokenization: do NOT use it as the Square `idempotency_key` (a retry with a new token would then be a second payment). Send `token` and `attemptKey` instead, and derive\n * the idempotency key from `attemptKey`.\n */\n idempotencyKey: string;\n /**\n * The key of this PAYMENT ATTEMPT: stable across retries after a timeout / offline loss, a reload and a second tab (with a `payableRef` it is derived from payable, amount and method, so every tab holds\n * the SAME key); renewed only after a definitive failure or success. Send it to your backend with the charge (it looks the attempt up by it FIRST and derives the processor's idempotency key from it) and\n * answer `checkStatus(attemptKey)` with it.\n */\n attemptKey: string;\n /** The payable of this attempt (the plugin's `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/**\n * What the host's `createPayment` answers. `status` is Square's payment status: `COMPLETED` = paid (a payment the host created with autocomplete answers `COMPLETED`), `APPROVED` (authorized, NOT captured yet)\n * and `PENDING` (and any other non-final value) = submitted and settling (a bank debit takes days), `FAILED` / `CANCELED` = not paid (the panel shows `failureMessage` / a default text and the payer can try again). Fees are optional;\n * when given they are shown as rows under the form.\n */\nexport interface SquarePaymentResult {\n paymentId?: string | null;\n status?: string;\n failureMessage?: string;\n processingFee?: number;\n platformFee?: number;\n totalAmount?: number;\n processingFeeLabel?: string;\n platformFeeLabel?: string;\n}\n\n/** The fees of a payment, shown before the payer pays (the host's `estimateFees`) or after the payment exists. */\nexport interface SquareFees {\n processingFee?: number;\n platformFee?: number;\n /** What the payer is charged (amount + fees), shown as \"Total charged\". Display only: Square's form is not created for an amount. */\n totalAmount?: number;\n processingFeeLabel?: string;\n platformFeeLabel?: string;\n}\n\nexport interface SquareFeeContext {\n amount: number;\n paymentMethod: string;\n method: SquareMethod;\n /**\n * The card funding. Square's SDK does not know it before the customer pays, so this is `null` in the estimate; a credit-only fee schedule shows the credit fee\n * (or the highest) here and corrects the rows from the `createPayment` answer.\n */\n funding: SquareCardType | null;\n}\n\nexport type SquareOutcomeKind = 'paid' | 'processing' | 'failed';\n\n// `APPROVED` is an authorization that is not captured yet: the money has not moved, so it is NOT paid (it is `processing`, like any other non-final status).\nconst PAID = new Set(['COMPLETED', 'PAID']);\nconst FAILED = new Set(['FAILED', 'CANCELED', 'CANCELLED']);\n\n/**\n * Square's payment `status` as one outcome. A non-final status (`PENDING`, `APPROVED` = authorized but not captured, anything unknown) counts as `'processing'`: the payment exists, so the payer is told it was submitted,\n * never \"failed\". No status at all (a host that answers nothing after it created the payment) is `'paid'` for a card and `'processing'` for a bank account, which never settles at once.\n */\nexport function squareOutcomeOf(status: string | null | undefined, method: SquareMethod = 'card'): SquareOutcomeKind {\n const value = (status ?? '').trim().toUpperCase();\n if (!value) return method === 'ach' ? 'processing' : 'paid';\n if (PAID.has(value)) return 'paid';\n if (FAILED.has(value)) return 'failed';\n return 'processing';\n}\n\n/** The method values the plugin takes over by default. */\nexport const SQUARE_PAYMENT_METHOD_VALUES = ['CARD', 'ACH'] as const;\n\n/** The name of a method in the app's active language (an unknown value is shown as it is). */\nexport const squareMethodLabel = (value: string): string =>\n value === 'CARD' ? uiText('squarePaymentMethod.methodCard') : value === 'ACH' ? uiText('squarePaymentMethod.methodAch') : value;\n\nexport const squareMethodOf = (method: string): SquareMethod => (method === 'ACH' ? 'ach' : 'card');\n\n/** The texts of the Square payment method; read on every access, so they follow the app's active language. */\nexport const SQUARE_METHOD_TEXTS = {\n get amountNeeded() { return uiText('squarePaymentMethod.amountNeeded'); },\n get notCompleted() { return uiText('squarePaymentMethod.notCompleted'); },\n get achTitle() { return uiText('squarePaymentMethod.achTitle'); },\n achMessage: (amount: string) => uiText('squarePaymentMethod.achMessage', { amount }),\n get pendingTitle() { return uiText('squarePaymentMethod.pendingTitle'); },\n pendingMessage: (amount: string) => uiText('squarePaymentMethod.pendingMessage', { amount }),\n get receiptNote() { return uiText('squarePaymentMethod.receiptNote'); },\n};\n","import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, Injector, ViewEncapsulation, afterNextRender, computed, effect, inject, input, signal, untracked, viewChild } from '@angular/core';\nimport {\n AlertComponent, ButtonComponent, HintComponent, KpiCardComponent, PaymentAttemptStatusComponent, UiLabelsService, callHost, classifyHostError, wasQueuedOffline, warnQueuedPayment, createPaymentProtection, refusalLabelKey, formatCurrency, hostErrorMessage,\n type PaymentAttempt, type PaymentAttemptControls, type PaymentAttemptOutcome, type PaymentMethodContext, type PaymentProtectionInputs, type PaymentReadiness,\n} from '@forgeroute/ui';\nimport { SquarePaymentComponent } from '../square-payment/square-payment.component';\nimport type { SquareFailure } from '../square-payment/square-outcomes';\nimport type { SquarePaymentMethodComponent } from './payment-square-method.component';\nimport { SQUARE_METHOD_TEXTS, squareMethodOf, squareOutcomeOf, type SquareFees, type SquarePaymentContext, type SquarePaymentResult } from './payment-square-method.models';\n\n/** The body `ui-square-payment-method` hands to the panel: the Square form, the fee rows and the whole flow (tokenize, host callback, outcome), talking to the panel through `ctx`. */\n@Component({\n selector: 'ui-payment-square-body',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [AlertComponent, ButtonComponent, HintComponent, KpiCardComponent, PaymentAttemptStatusComponent, SquarePaymentComponent],\n template: `\n <div class=\"psq\">\n @if (confirmation(); as notice) {\n <ui-alert variant=\"success\" [title]=\"notice.title\" tabindex=\"-1\" class=\"psq-notice\" data-testid=\"square-method-confirmation\">\n <p>{{ notice.message }}</p>\n <p>{{ receiptNote() }}</p>\n </ui-alert>\n } @else {\n <ui-payment-attempt-status [attempt]=\"attempt\" [readiness]=\"readiness\" [allowStartOver]=\"config().allowStartOver()\" [showPaid]=\"!confirmation() && !done()\" (retryLoad)=\"payment()?.reset()\" />\n @if (ctx().amount == null) {\n <ui-hint data-testid=\"square-method-amount-needed\">{{ texts.amountNeeded }}</ui-hint>\n }\n @if (estimateError()) {\n <div class=\"psq-error\">\n <ui-alert variant=\"warning\" data-testid=\"square-method-estimate-error\">{{ estimateError() }}\n <ui-button variant=\"secondary\" size=\"sm\" data-testid=\"square-method-estimate-retry\" (click)=\"retryEstimate()\">{{ labels.t('common.tryAgain') }}</ui-button>\n </ui-alert>\n </div>\n }\n @if (lastAmount() != null) {\n <ui-square-payment #payment mode=\"payment\" [method]=\"squareMethod()\" [applicationId]=\"config().applicationId()\" [locationId]=\"config().locationId()\" [environment]=\"config().environment()\"\n [amount]=\"chargedAmount()\" [currency]=\"ctx().currency\" [billingContact]=\"config().billingContact()\" [accountHolderName]=\"config().accountHolderName()\"\n [requireAchConsent]=\"config().requireAchConsent()\" [cardStyle]=\"config().cardStyle()\" [styleFromTokens]=\"true\" [showSubmit]=\"false\" [showErrors]=\"false\"\n [showStatus]=\"false\" [offlineOverride]=\"config().offlineOverride()\" [disabled]=\"processing() || done() || attempt.unknown() || attempt.paidLocked()\" [label]=\"labels.t('squarePaymentMethod.paymentDetails')\" (ready)=\"onReady()\" (failed)=\"onFailed($event)\" (loadError)=\"onFailed($event)\" />\n @if (totalCard(); as card) {\n <ui-kpi-card class=\"psq-total\" data-testid=\"square-method-total\" [label]=\"labels.t('squarePaymentMethod.totalCharged')\" [value]=\"card.value\" [subtitle]=\"card.subtitle\" icon=\"dollar\" color=\"blue\" valueColor=\"blue\" />\n }\n @if (feeRows().length) {\n <dl class=\"psq-fees\" data-testid=\"square-method-fees\" [attr.aria-label]=\"labels.t('squarePaymentMethod.paymentTotal')\">\n @for (row of feeRows(); track row.key) {\n <div class=\"psq-fee\" [attr.data-testid]=\"'square-fee-' + row.key\"><dt>{{ row.label }}</dt><dd>{{ row.value }}</dd></div>\n }\n </dl>\n }\n @if (error()) { <div class=\"psq-error\"><ui-alert variant=\"danger\" data-testid=\"square-method-error\">{{ error() }}</ui-alert></div> }\n }\n }\n </div>\n `,\n styles: [`\n ui-payment-square-body { display: block; min-width: 0; }\n ui-payment-square-body .psq-error { margin-top: 12px; }\n ui-payment-square-body .psq-total { display: block; margin-top: 16px; }\n ui-payment-square-body .psq-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-square-body .psq-fee { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; color: var(--ui-psp-muted, #475569); }\n ui-payment-square-body .psq-fee dt, ui-payment-square-body .psq-fee dd { margin: 0; }\n ui-payment-square-body .psq-notice:focus { outline: none; }\n ui-payment-square-body .psq-notice p { margin: 0 0 6px; }\n `],\n})\nexport class PaymentSquareBodyComponent {\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<SquarePaymentMethodComponent>();\n private readonly payment = viewChild(SquarePaymentComponent);\n\n protected readonly texts = SQUARE_METHOD_TEXTS;\n\n readonly ready = signal(false);\n readonly processing = signal(false);\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). */\n readonly estimate = signal<SquareFees | 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 payment. */\n private readonly resultFees = signal<SquareFees | null>(null);\n protected readonly confirmation = signal<{ title: string; message: string } | null>(null);\n /** The last valid amount: the form 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 /** What the attempt was STARTED with (pinned at the click; a later amount edit or method change never changes what is recorded). */\n private payAmount: number | null = null;\n private payMethod: string | null = null;\n /** What the payment that was RECORDED (or accepted) was made with: a late answer of an older attempt is recorded with ITS OWN amount and method, never the newest click's. */\n private doneAmount: number | null = null;\n private doneMethod: string | null = null;\n private estimateRun = 0;\n\n private readonly amountValue = computed(() => this.ctx().amount);\n private readonly methodValue = computed(() => this.ctx().method);\n protected readonly squareMethod = computed(() => squareMethodOf(this.ctx().method));\n private readonly total = computed(() => this.resultFees()?.totalAmount ?? this.estimate()?.totalAmount ?? this.lastAmount() ?? 0);\n /** What the card is actually charged (amount + fees the host showed): the amount Square's buyer verification must be asked for. Falls back to the entered amount. */\n protected readonly chargedAmount = computed(() => this.estimate()?.totalAmount ?? this.resultFees()?.totalAmount ?? this.lastAmount());\n protected readonly receiptNote = computed(() => this.config().receiptNote());\n protected readonly feeRows = computed(() => {\n const fees = this.resultFees() ?? this.estimate();\n const amount = this.lastAmount();\n if (!fees || amount == null || (fees.processingFee === 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('squarePaymentMethod.paymentAmount'), value: money(amount) }];\n if (fees.processingFee !== undefined) rows.push({ key: 'processing', label: `${this.labels.t('squarePaymentMethod.processingFee')}${fees.processingFeeLabel ? ` (${fees.processingFeeLabel})` : ''}`, value: money(fees.processingFee) });\n if (fees.platformFee !== undefined) rows.push({ key: 'platform', label: `${this.labels.t('squarePaymentMethod.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.resultFees() ?? 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('squarePaymentMethod.amountPlusFees') };\n });\n\n /** The duplicate-payment protection of this payment (lock, attempt key, unknown state) and its readiness gate, driven by the plugin's inputs. */\n readonly attempt: PaymentAttempt;\n readonly readiness: PaymentReadiness;\n private gone = false;\n\n constructor() {\n const configured = <T>(read: (config: SquarePaymentMethodComponent) => T) => computed(() => read(this.config()));\n const inputs: PaymentProtectionInputs = {\n payableRef: configured(c => c.payableRef()), attemptKey: configured(c => c.attemptKey()), checkStatus: configured(c => c.checkStatus()), paid: configured(c => c.paid()), hostPending: configured(c => c.hostPending()),\n statusPollMs: configured(c => c.statusPollMs()), statusPollMaxMs: configured(c => c.statusPollMaxMs()),\n statusCheckTimeoutMs: configured(c => c.statusCheckTimeoutMs()), statusFailGraceMs: configured(c => c.statusFailGraceMs()), authTimeoutMs: configured(c => c.authTimeoutMs()), readinessCheck: configured(c => c.readinessCheck()),\n readinessTimeoutMs: configured(c => c.readinessTimeoutMs()), readinessEveryMs: configured(c => c.readinessEveryMs()), offlineOverride: configured(c => c.offlineOverride()),\n };\n const protection = createPaymentProtection(inputs, {\n amount: () => this.ctx().amount,\n method: () => this.ctx().method,\n sdk: () => (this.payment()?.loadErrorText() ? 'blocked' : 'ok'),\n onOutcome: o => this.onAttemptOutcome(o),\n });\n this.attempt = protection.attempt;\n this.readiness = protection.readiness;\n inject(DestroyRef).onDestroy(() => { this.gone = true; });\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.attempt.markUnknown('host'),\n markSucceeded: () => this.attempt.succeed('host'),\n markFailed: () => this.attempt.fail('host'),\n resetPaid: () => { this.attempt.resetPaid(); this.done.set(false); this.confirmation.set(null); this.error.set(''); this.ctx().setExclusive(false); },\n markNotCharged: () => { this.attempt.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 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 ready = this.ready();\n const estimating = this.estimating();\n const done = this.done();\n const estimateFailed = !!this.estimateError();\n const unknown = this.attempt.unknown();\n const paidLocked = this.attempt.paidLocked();\n const gateReady = this.readiness.ready();\n const label = notice ? this.labels.t('common.done') : ctx.amount != null ? `${this.labels.t('squarePaymentMethod.pay')} ${formatCurrency(this.total(), { currency: ctx.currency })}` : this.labels.t('squarePaymentMethod.pay');\n untracked(() => ctx.setPrimary({\n label, loading: processing && !notice,\n disabled: notice ? done : !ready || processing || estimating || estimateFailed || ctx.amount == null || done || unknown || paidLocked || !gateReady,\n onClick: () => (notice ? this.finish() : void this.pay()),\n }));\n });\n // Estimated fees, debounced (display only: Square's form is not created for an amount).\n effect((onCleanup) => {\n const estimate = this.config().estimateFees();\n const amount = this.amountValue();\n const method = this.methodValue();\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.resultFees.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('squarePaymentMethod.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 when fees are required). A late answer still recovers.\n hung = setTimeout(() => {\n if (run !== this.estimateRun) return;\n this.estimating.set(false);\n if (this.feesMustBeKnown()) this.estimateError.set(failure);\n }, Math.max(1, this.config().estimateTimeoutMs()));\n let fees: SquareFees | null = null;\n try { fees = (await callHost(() => estimate({ amount, paymentMethod: method, method: squareMethodOf(method), funding: null }))) ?? null; } catch { fees = null; }\n if (hung) { clearTimeout(hung); hung = null; }\n if (run !== this.estimateRun) return;\n this.estimating.set(false);\n if (fees) { this.estimate.set(fees); this.estimateError.set(''); }\n else { this.estimate.set(null); this.estimateError.set(this.feesMustBeKnown() ? failure : ''); }\n }, 300);\n onCleanup(() => { clearTimeout(timer); if (hung) clearTimeout(hung); });\n });\n // A new form is built for another method, or for another application / location / environment: it is not ready until Square says so (Pay stays off meanwhile).\n effect(() => {\n this.methodValue();\n const config = this.config();\n config.applicationId(); config.locationId(); config.environment();\n untracked(() => { this.ready.set(false); this.error.set(''); });\n });\n // The panel tells us when it is closing or the method changes before this body is removed: an accepted payment whose notice is still up is reported as recorded.\n effect(() => { const ctx = this.ctx(); untracked(() => ctx.onCancel(() => { if (this.confirmation()) this.finish(); })); });\n inject(DestroyRef).onDestroy(() => { this.estimateRun++; });\n }\n\n /**\n * Pay stays off while an estimate that was asked for failed when the payer covers fees (`feesRequired`) OR when buyer verification is on (`billingContact`): the verification is\n * done for the charged total, so a failed estimate would verify the base amount while the host may still add fees (Square then declines with a verification error).\n */\n private feesMustBeKnown(): boolean { return this.config().feesRequired() || !!this.config().billingContact(); }\n\n protected retryEstimate(): void { this.estimateTick.update(n => n + 1); }\n\n protected onReady(): void {\n this.ready.set(true);\n this.ctx().announce(this.labels.t('squarePaymentMethod.announceReady'));\n }\n\n protected onFailed(failure: SquareFailure): void {\n // A failed buyer verification (3-D Secure) happened BEFORE any charge: the payer can try again, for the SAME total the Pay button shows.\n const message = failure.stage === 'verify' ? `${failure.message} ${this.labels.t('paymentAttempt.verifyRetry', { amount: formatCurrency(this.total(), { currency: this.ctx().currency }) })}` : failure.message;\n failure = { ...failure, message };\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 /**\n * Pays: the gate (paid / unknown / not ready / offline: nothing is sent), validates the panel, then ONE attempt under the synchronous lock: tokenizes the Square form and creates the\n * payment through the host with the attempt key. A timeout, going offline or an ambiguous host error makes the outcome UNKNOWN (locked, \"Checking your payment...\", status check by\n * key); only a definitive refusal unlocks with a new key. The component never retries a charge itself.\n */\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 (this.refused(ctx)) return;\n if (!ctx.validate() || ctx.amount == null) return;\n this.payAmount = ctx.amount;\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 const create = this.config().createPayment();\n if (!create) { this.onFailed({ code: 'not_configured', message: this.labels.t('squarePaymentMethod.unavailable'), squareMessage: '', stage: 'tokenize' }); return; }\n this.error.set('');\n this.processing.set(true);\n ctx.setBusy(true);\n ctx.announce(this.labels.t('squarePaymentMethod.announceProcessing'));\n let finished = false;\n const run = await this.attempt.run<SquarePaymentResult | null>(async key => {\n // A LATE answer (the attempt moved on while this call was still running) must not touch the newer attempt's screen, error text, busy state or inner form: every side effect below asks `live()` first.\n const live = (): boolean => this.attempt.isLive(key);\n try {\n // The tokenization starts synchronously from the click (the bank window of an ACH payment needs the user gesture).\n if (squareMethodOf(attemptMethod) === 'ach') this.attempt.markPending('bank_window'); // the bank window may stay open for minutes: the request timeout is replaced by authTimeoutMs meanwhile\n const event = await payment.tokenize();\n if (!event) return { kind: 'released' }; // the form reported the failure (onFailed): nothing was charged\n if (this.gone) return { kind: 'released', reason: 'destroyed' }; // destroyed before the host call: NOTHING was sent, the marker must not outlive the page\n const request: SquarePaymentContext = {\n amount: attemptAmount, paymentMethod: attemptMethod, method: event.method, receivedDate: ctx.receivedDate, notes: ctx.note || null, ...ctx.allocation,\n token: event.token, details: event.details, funding: event.details.cardType, verificationToken: event.verificationToken, idempotencyKey: event.idempotencyKey, attemptKey: key, payableRef: this.attempt.pinnedRef(),\n };\n let result: SquarePaymentResult | null | undefined;\n try { result = await callHost(() => create(request)); } catch (err) { // after the panel closed (`this.gone`) the classification still decides and the core writes the records: there is no screen left to touch\n const kind = classifyHostError(err);\n if (kind === 'unknown') return { kind: 'unknown', reason: 'host_error' };\n const message = hostErrorMessage(err, this.labels.t('squarePaymentMethod.paymentFailed'));\n if (kind === 'not_sent') { // the request never left (offline layer): nothing was charged, the key is KEPT and the payer may try again\n if (live()) { this.error.set(message); ctx.report('refused', { message }); }\n return { kind: 'released', reason: 'not_sent' };\n }\n if (live()) { this.error.set(message); ctx.report('failed', { message }); }\n return { kind: 'failure', reason: 'host_refused' };\n }\n if (wasQueuedOffline(result)) { // the offline layer QUEUED the request instead of sending it (a synthetic 202): no payment exists, the key is KEPT\n warnQueuedPayment();\n const message = this.labels.t('paymentAttempt.queuedOffline');\n if (live()) { this.error.set(message); ctx.report('refused', { message }); }\n return { kind: 'released', reason: 'not_sent' };\n }\n if (this.gone) return { kind: squareOutcomeOf(result?.status, squareMethodOf(attemptMethod)) === 'failed' ? 'failure' : 'success', value: result ?? null, reason: 'created' }; // the panel closed meanwhile: the answer is still the payment's outcome (the core records it for the next form of the payable)\n finished = this.afterCreate(result ?? null, ctx, live(), attemptAmount, attemptMethod);\n return { kind: squareOutcomeOf(result?.status, squareMethodOf(attemptMethod)) === 'failed' ? 'failure' : 'success', value: result ?? null, reason: 'created' };\n } finally { if (live()) payment.markNotCharged(); } // the token was handed to the host: the INNER form's own lock ends with this attempt (never the lock of a NEWER attempt)\n }, { timeoutMs: this.config().paymentTimeoutMs() });\n this.processing.set(false);\n if ('refused' in run && run.refused) { ctx.setBusy(false); return; }\n if (run.kind === 'unknown') return; // stays locked (busy) until the status check, the host or a late answer resolves it\n if (!finished) ctx.setBusy(false);\n }\n\n /** Refuses to start (nothing is sent): a paid payable, an unknown earlier outcome, a failed readiness gate or being offline. Returns true when refused. */\n private refused(ctx: PaymentMethodContext): boolean {\n if (!this.readiness.passSync()) {\n const reason = this.readiness.reasons()[0] ?? 'checking';\n const message = this.labels.t(refusalLabelKey(reason));\n this.error.set(message);\n ctx.report('refused', { message });\n ctx.announce(message);\n return true;\n }\n if (this.attempt.paidLocked() || this.attempt.unknown()) { this.attempt.begin(); return true; } // refuses and reports `refused`\n return false;\n }\n\n /** The attempt resolved OUTSIDE the click (a status check, the host's `markSucceeded` / `markFailed`, a late answer) or became unknown. */\n private onAttemptOutcome(outcome: PaymentAttemptOutcome): void {\n const ctx = this.ctx();\n if (outcome.kind === 'unknown' && outcome.reason === 'duplicate_suspected') {\n // A SECOND payment of a payable that is already paid: nothing about the lock, the amount or the method changes; the host is told (with the key of the second payment) so it can resolve it.\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.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.attempt.pinnedMethod() ?? this.payMethod;\n const message = this.labels.t(outcome.reason === 'offline' ? 'paymentAttempt.offlineInFlight' : 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' && (outcome.reason === 'status_check' || outcome.reason === 'host') && !this.done()) {\n const paid = { type: 'stripe' as const, paymentMethod: outcome.method ?? this.payMethod ?? ctx.method, amount: outcome.amount ?? this.payAmount ?? ctx.amount ?? this.lastAmount() ?? 0, processor: 'square' };\n this.doneAmount = paid.amount;\n this.doneMethod = paid.paymentMethod;\n ctx.report('paid', { result: paid });\n ctx.announce(this.labels.t('paymentAttempt.succeededAfterCheck'));\n this.done.set(true);\n ctx.setBusy(false);\n ctx.complete(paid);\n } else if (outcome.kind === 'failed') {\n if (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 }\n this.payment()?.markNotCharged(); // the attempt is decided: the INNER form's lock (kept while the host charged) ends with it, so a NEW attempt can tokenize even when the old request never answers\n ctx.setBusy(false); // also a LATE definitive refusal (the answer came after a timeout): the panel is free again\n }\n }\n\n private afterCreate(result: SquarePaymentResult | null, ctx: PaymentMethodContext, live: boolean, amount: number, method: string): boolean {\n if (this.done() || this.confirmation()) return true; // a status check or the host already recorded this payment: report it exactly once\n const money = formatCurrency(amount, { currency: ctx.currency });\n const outcome = squareOutcomeOf(result?.status, squareMethodOf(method));\n if (outcome === 'failed') {\n if (live) { // a late decline of an OLDER attempt says nothing on the newer attempt's screen\n const message = result?.failureMessage || this.texts.notCompleted;\n this.error.set(message);\n ctx.report('failed', { message });\n }\n return false;\n }\n if (live && result && (result.processingFee !== undefined || result.platformFee !== undefined || result.totalAmount !== undefined)) {\n this.resultFees.set({ processingFee: result.processingFee, platformFee: result.platformFee, totalAmount: result.totalAmount, processingFeeLabel: result.processingFeeLabel, platformFeeLabel: result.platformFeeLabel });\n }\n const paid = { type: 'stripe' as const, paymentMethod: method, amount, processor: 'square' };\n this.doneAmount = amount;\n this.doneMethod = method;\n if (outcome === 'paid') {\n ctx.report('paid', { result: paid });\n this.done.set(true);\n ctx.complete(paid);\n return true;\n }\n ctx.report('processing', { result: paid });\n this.confirmation.set(squareMethodOf(method) === 'ach'\n ? { title: this.texts.achTitle, message: this.texts.achMessage(money) }\n : { title: this.texts.pendingTitle, message: this.texts.pendingMessage(money) });\n ctx.setExclusive(true);\n ctx.setBusy(false);\n afterNextRender(() => this.host.nativeElement.querySelector<HTMLElement>('.psq-notice')?.focus(), { injector: this.injector });\n return true;\n }\n\n /** \"Done\" on the submitted 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 ?? this.payMethod ?? ctx.method, amount: this.doneAmount ?? this.payAmount ?? ctx.amount ?? this.lastAmount() ?? 0, processor: 'square' });\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 { SquareBillingContact } from '../square-loader/square-types';\nimport type { SquareCardStyle } from '../square-payment/square-style';\nimport { PaymentSquareBodyComponent } from './payment-square-body.component';\nimport { SQUARE_PAYMENT_METHOD_VALUES, SQUARE_METHOD_TEXTS, squareMethodLabel, type SquareFeeContext, type SquareFees, type SquarePaymentContext, type SquarePaymentResult } from './payment-square-method.models';\n\n/**\n * Adds LIVE Card and ACH (Square) to `ui-payment-side-panel`. Put it inside the panel only for customers who use Square: its presence replaces the record-only\n * Card / ACH (last 4 digits) with the Square card form / bank authorization; remove it and the panel is record-only again.\n *\n * <ui-payment-side-panel ...>\n * @if (squareEnabled()) {\n * <ui-square-payment-method [applicationId]=\"app\" [locationId]=\"loc\" environment=\"production\" [createPayment]=\"createPayment\" />\n * }\n * </ui-payment-side-panel>\n *\n * The host owns the HTTP: `createPayment(ctx)` receives the single-use token (and the entered amount, date, notes, allocation) and answers the payment result\n * (`{ status, fees... }`). Outcomes arrive as the panel's `outcome` events with kind `'plugin'` and codes `paid`, `processing` and `failed`.\n */\n@Component({\n selector: 'ui-square-payment-method',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [PaymentSquareBodyComponent],\n providers: [{ provide: PAYMENT_METHOD_PLUGIN, useExisting: forwardRef(() => SquarePaymentMethodComponent) }],\n host: { style: 'display: none' },\n template: `<ng-template #body let-ctx><ui-payment-square-body [ctx]=\"ctx\" [config]=\"self\" /></ng-template>`,\n})\nexport class SquarePaymentMethodComponent extends PaymentMethodPlugin {\n protected readonly self = this;\n /** Creates the payment on the host's backend from the token (called when the payer presses Pay, after Square tokenized). */\n readonly createPayment = input<((ctx: SquarePaymentContext) => HostResult<SquarePaymentResult>) | null>(null);\n /** Optional fee preview before paying (display only). */\n readonly estimateFees = input<((ctx: SquareFeeContext) => HostResult<SquareFees>) | null>(null);\n readonly applicationId = input<string | null>(null);\n readonly locationId = input<string | null>(null);\n readonly environment = input<'production' | 'sandbox' | null>(null);\n /** The buyer's billing contact: with it the card form runs buyer verification (SCA / 3-D Secure) before the token reaches your backend. */\n readonly billingContact = input<SquareBillingContact | null>(null);\n /** The account holder name offered for the bank account. */\n readonly accountHolderName = input('');\n /** ACH: the authorization checkbox must be ticked before the bank window opens. */\n readonly requireAchConsent = input(true);\n readonly cardStyle = input<SquareCardStyle | 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() ?? SQUARE_PAYMENT_METHOD_VALUES.map(value => ({ value, label: squareMethodLabel(value) })));\n /** How long a fee estimate may take before Pay is released and \"Try again\" is offered (ms). */\n readonly estimateTimeoutMs = input(10000);\n // ── Duplicate-payment protection and readiness gate (docs: \"Duplicate-payment protection\", \"Readiness gate\") ──\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 for the charge; empty = the plugin generates one per payment attempt session (it arrives in `createPayment(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). */\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: the plugin goes to \"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 `createPayment` (tokenize + charge) may take before the outcome counts as unknown (ms). */\n readonly paymentTimeoutMs = 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 /** The payer covers fees: a rejected or empty estimate keeps Pay off (with \"Try again\") instead of paying without the fee preview. */\n readonly feesRequired = input(false);\n readonly receiptNoteInput = input<string | null>(null, { alias: 'receiptNote' });\n readonly receiptNote = computed((): string => this.receiptNoteInput() ?? SQUARE_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":";;;;;;;AAIA,MAAa,iBAAiB;AAC9B,MAAa,yBAAyB;AAMtC,MAAa,yBAAyB;AAKtC,SAAgB,kBAAqB,MAAsB,WAAsB;CAC/E,OAAO,IAAI,SAAY,SAAS,WAAU;EACxC,MAAM,QAAQ,iBAAiB,OAAO,UAAS,CAAE,GAAG,sBAAsB;EAC1E,QAAQ,QAAQ,IAAI,CAAC,CAAC,MAAK,UAAQ;GAAG,aAAa,KAAK;GAAG,QAAQ,KAAK;EAAG,IAAG,UAAQ;GAAG,aAAa,KAAK;GAAG,OAAO,KAAK;EAAG,CAAC;CAChI,CAAC;AACH;AAGA,MAAM,kBAAkB;AAGxB,IAAa,kBAAb,cAAqC,MAAK;CACxC,YAAqB,MAAqC;EACxD,MAAM,IAAI;EADS,KAAA,OAAA;EAEnB,KAAK,OAAO;CACd;AACD;AAMD,MAAM,qBAAgD,OAAgD;AAUtG,MAAa,eAAe;CAE1B,yBAAS,IAAI,IAAG;CAEhB,QAAQ;CAER,wBAAQ,IAAI,IAAG;CACf,KAAK,KAAW;EACd,MAAM,YAAY,aAAa,WAAW,QAAQ,aAAa,WAAW;EAC1E,IAAI,aAAY,KAAM,CAAC,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