{"version":3,"file":"idpWebComponent.mjs","sources":["../../../src/b2c/idpWebComponent.ts"],"sourcesContent":["import type { StytchProjectConfigurationInput } from '@stytch/core/public';\nimport { IDPContainer, IDPSDKConfig } from '@stytch/web';\n\nimport { createMountFn, createWebComponent } from '../bindings/WebComponents';\n\n// region identityProvider\n/**\n * Renders an IDP Consent screen.\n * Parses OAuth Authorization params (client_id, scope, nonce, etc.) out of the page URL.\n * Requires the user to be logged in.\n *\n * @attr {boolean} [shadow] - use shadow DOM to contain styles\n *\n * @prop {StytchClient} client - used to make API calls.\n * @prop {PresentationConfig} [presentation] - for customizing the UI styling and presentation\n * @prop {Messages} [strings] - custom strings to be used, to customize text or for localization\n * @prop {IDPConsentManifestGenerator} [getIDPConsentManifest] - to render custom scopes\n * @prop {AuthTokenParams} [authTokenParams] - to provide a trusted auth token to provide for attestation prior to running OAuth flow.\n *\n * @event StytchEvent - see {@link import('../../WebComponents').StytchEvent}\n * @event StytchError - see {@link import('../../WebComponents').StytchError}\n *\n */\nexport const StytchIdentityProvider = createWebComponent<IDPSDKConfig<StytchProjectConfigurationInput>>(IDPContainer, {\n  propNames: ['client', 'presentation', 'strings', 'getIDPConsentManifest', 'authTokenParams'],\n});\n\n/**\n * Mounts an IDP Consent screen inside the element provided.\n * Parses OAuth Authorization params (client_id, scope, nonce, etc.) out of the page URL.\n * Requires the user to be logged in.\n * @example\n * mountIdentityProvider({\n *   client: stytchClient,\n *   elementId: '#idp-container'\n * });\n *\n * @deprecated Use the StytchIdentityProvider web component instead\n *\n * @param client - A {@link StytchClient} instance used for making API calls.\n * @param elementId - A string containing the id of the element that should contain the login screen.\n * @param presentation - Optional {@link PresentationConfig} object for customizing the UI presentation\n * @param callbacks - Optional {@link Callbacks} triggered by various events in the Stytch SDK.\n * @param strings - Optional custom strings to be used in the prebuilt UI.\n * @param getIDPConsentManifest - Optional {@link IDPConsentManifestGenerator} to render custom scopes\n * @param authTokenParams - Optional {@link AuthTokenParams} to provide a trusted auth token to provide for attestation prior to running OAuth flow.\n * @throws An error when the element specified by elementId cannot be found.\n */\nexport const mountIdentityProvider = createMountFn('stytch-identity-provider', StytchIdentityProvider);\n\n// endregion\n"],"names":["StytchIdentityProvider","createWebComponent","IDPContainer","propNames","mountIdentityProvider","createMountFn"],"mappings":";;;AAKA;AACA;;;;;;;;;;;;;;;;AAgBC,IACM,MAAMA,sBAAAA,GAAyBC,kBAAAA,CAAkEC,YAAAA,EAAc;IACpHC,SAAAA,EAAW;AAAC,QAAA,QAAA;AAAU,QAAA,cAAA;AAAgB,QAAA,SAAA;AAAW,QAAA,uBAAA;AAAyB,QAAA;AAAkB;AAC9F,CAAA;AAEA;;;;;;;;;;;;;;;;;;;;AAoBC,IACM,MAAMC,qBAAAA,GAAwBC,cAAc,0BAAA,EAA4BL,sBAAAA,EAAwB;;;;"}