@asgardeo/react 0.14.0 → 0.14.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -7663,7 +7663,7 @@ import {
7663
7663
  resolveVars as resolveVars3
7664
7664
  } from "@asgardeo/browser";
7665
7665
  import { cx as cx20 } from "@emotion/css";
7666
- import { useState as useState16, useCallback as useCallback11 } from "react";
7666
+ import { useState as useState17, useCallback as useCallback11 } from "react";
7667
7667
 
7668
7668
  // src/utils/v2/resolveTranslationsInObject.ts
7669
7669
  import { resolveVars } from "@asgardeo/browser";
@@ -7775,7 +7775,16 @@ var normalizeFlowResponse = (response, t, options = {}, meta) => {
7775
7775
  if (errorMessage && throwOnError) {
7776
7776
  throw response;
7777
7777
  }
7778
+ const additionalData = response?.data?.additionalData ?? {};
7779
+ if (typeof additionalData["consentPrompt"] === "string") {
7780
+ try {
7781
+ const parsed = JSON.parse(additionalData["consentPrompt"]);
7782
+ additionalData["consentPrompt"] = { purposes: Array.isArray(parsed) ? parsed : [] };
7783
+ } catch {
7784
+ }
7785
+ }
7778
7786
  return {
7787
+ additionalData,
7779
7788
  components: transformComponents(response, t, resolveTranslations, meta),
7780
7789
  flowId: response.flowId
7781
7790
  };
@@ -7845,7 +7854,6 @@ var getAuthComponentHeadings_default = getAuthComponentHeadings;
7845
7854
  import {
7846
7855
  FieldType as FieldType7,
7847
7856
  EmbeddedFlowComponentTypeV2 as EmbeddedFlowComponentType,
7848
- EmbeddedFlowActionVariantV2 as EmbeddedFlowActionVariant,
7849
7857
  EmbeddedFlowEventTypeV2 as EmbeddedFlowEventType,
7850
7858
  createPackageComponentLogger as createPackageComponentLogger5,
7851
7859
  resolveVars as resolveVars2
@@ -7854,8 +7862,156 @@ import { css as css17 } from "@emotion/css";
7854
7862
  import DOMPurify from "dompurify";
7855
7863
  import { cloneElement } from "react";
7856
7864
 
7865
+ // src/components/adapters/ConsentCheckboxList.tsx
7866
+ import { Fragment as Fragment13, jsx as jsx59 } from "react/jsx-runtime";
7867
+ var getConsentOptionalKey = (purposeId, attrName) => `__consent_opt__${purposeId}__${attrName}`;
7868
+ var ConsentCheckboxList = ({
7869
+ variant,
7870
+ purpose,
7871
+ formValues,
7872
+ onInputChange,
7873
+ children
7874
+ }) => {
7875
+ const attributes = variant === "ESSENTIAL" ? purpose.essential : purpose.optional;
7876
+ if (!attributes || attributes.length === 0) {
7877
+ return null;
7878
+ }
7879
+ const isEssential = variant === "ESSENTIAL";
7880
+ const isChecked = (attrName) => {
7881
+ if (isEssential) {
7882
+ return true;
7883
+ }
7884
+ const key = getConsentOptionalKey(purpose.purpose_id, attrName);
7885
+ return formValues[key] !== "false";
7886
+ };
7887
+ const handleChange = (attrName, checked) => {
7888
+ const key = getConsentOptionalKey(purpose.purpose_id, attrName);
7889
+ onInputChange(key, checked ? "true" : "false");
7890
+ };
7891
+ if (children) {
7892
+ return /* @__PURE__ */ jsx59(Fragment13, { children: children({ attributes, handleChange, isChecked, variant }) });
7893
+ }
7894
+ return /* @__PURE__ */ jsx59(
7895
+ "div",
7896
+ {
7897
+ style: {
7898
+ display: "flex",
7899
+ flexDirection: "column",
7900
+ gap: "0.25rem",
7901
+ margin: "0.25rem 0 0.5rem"
7902
+ },
7903
+ children: attributes.map((attr) => {
7904
+ const inputId = `consent_${isEssential ? "ess" : "opt"}_${purpose.purpose_id}_${attr}`;
7905
+ const checked = isChecked(attr);
7906
+ return /* @__PURE__ */ jsx59(
7907
+ Checkbox_default,
7908
+ {
7909
+ id: inputId,
7910
+ checked,
7911
+ disabled: isEssential,
7912
+ label: attr,
7913
+ onChange: isEssential ? void 0 : (e) => handleChange(attr, e.target.checked)
7914
+ },
7915
+ attr
7916
+ );
7917
+ })
7918
+ }
7919
+ );
7920
+ };
7921
+ var ConsentCheckboxList_default = ConsentCheckboxList;
7922
+
7923
+ // src/components/adapters/Consent.tsx
7924
+ import { Fragment as Fragment14, jsx as jsx60, jsxs as jsxs27 } from "react/jsx-runtime";
7925
+ var Consent = ({ consentData, formValues, onInputChange, children }) => {
7926
+ if (!consentData) return null;
7927
+ let purposes = [];
7928
+ try {
7929
+ const parsed = typeof consentData === "string" ? JSON.parse(consentData) : consentData;
7930
+ purposes = Array.isArray(parsed) ? parsed : parsed.purposes || [];
7931
+ } catch (e) {
7932
+ return null;
7933
+ }
7934
+ if (purposes.length === 0) return null;
7935
+ if (children) {
7936
+ return /* @__PURE__ */ jsx60(Fragment14, { children: children({ formValues, onInputChange, purposes }) });
7937
+ }
7938
+ return /* @__PURE__ */ jsx60("div", { style: { display: "flex", flexDirection: "column", gap: "1rem", marginTop: "0.25rem" }, children: purposes.map((purpose, purposeIndex) => /* @__PURE__ */ jsxs27("div", { style: { paddingBottom: "1rem" }, children: [
7939
+ purpose.essential && purpose.essential.length > 0 && /* @__PURE__ */ jsxs27("div", { style: { marginTop: "0.5rem" }, children: [
7940
+ /* @__PURE__ */ jsx60(Typography_default, { variant: "subtitle2", fontWeight: "bold", children: "Essential Attributes" }),
7941
+ /* @__PURE__ */ jsx60(
7942
+ ConsentCheckboxList_default,
7943
+ {
7944
+ variant: "ESSENTIAL",
7945
+ purpose,
7946
+ formValues,
7947
+ onInputChange
7948
+ }
7949
+ )
7950
+ ] }),
7951
+ purpose.optional && purpose.optional.length > 0 && /* @__PURE__ */ jsxs27("div", { style: { marginTop: "0.5rem" }, children: [
7952
+ /* @__PURE__ */ jsx60(Typography_default, { variant: "subtitle2", fontWeight: "bold", children: "Optional Attributes" }),
7953
+ /* @__PURE__ */ jsx60(
7954
+ ConsentCheckboxList_default,
7955
+ {
7956
+ variant: "OPTIONAL",
7957
+ purpose,
7958
+ formValues,
7959
+ onInputChange
7960
+ }
7961
+ )
7962
+ ] })
7963
+ ] }, purpose.purpose_id || purposeIndex)) });
7964
+ };
7965
+ var Consent_default = Consent;
7966
+
7967
+ // src/components/adapters/FlowTimer.tsx
7968
+ import { useEffect as useEffect15, useState as useState16 } from "react";
7969
+ import { Fragment as Fragment15, jsx as jsx61 } from "react/jsx-runtime";
7970
+ var FlowTimer = ({
7971
+ expiresIn = 0,
7972
+ textTemplate = "Time remaining: {time}",
7973
+ children
7974
+ }) => {
7975
+ const [remaining, setRemaining] = useState16(expiresIn > 0 ? expiresIn : 0);
7976
+ useEffect15(() => {
7977
+ if (expiresIn <= 0) {
7978
+ return void 0;
7979
+ }
7980
+ setRemaining(expiresIn);
7981
+ const interval = setInterval(() => {
7982
+ setRemaining((prev) => {
7983
+ if (prev <= 1) {
7984
+ clearInterval(interval);
7985
+ return 0;
7986
+ }
7987
+ return prev - 1;
7988
+ });
7989
+ }, 1e3);
7990
+ return () => clearInterval(interval);
7991
+ }, [expiresIn]);
7992
+ if (expiresIn <= 0) {
7993
+ return null;
7994
+ }
7995
+ const formatTime = (seconds) => {
7996
+ if (seconds <= 0) {
7997
+ return "Timed out";
7998
+ }
7999
+ const m = Math.floor(seconds / 60);
8000
+ const s = seconds % 60;
8001
+ return `${m}:${s.toString().padStart(2, "0")}`;
8002
+ };
8003
+ const isExpired = remaining <= 0;
8004
+ const formattedTime = formatTime(remaining);
8005
+ if (children) {
8006
+ return /* @__PURE__ */ jsx61(Fragment15, { children: children({ formattedTime, isExpired, remaining }) });
8007
+ }
8008
+ const displayText = isExpired ? "Timed out" : textTemplate.replace("{time}", formattedTime);
8009
+ return /* @__PURE__ */ jsx61(Typography_default, { variant: "body2", children: displayText });
8010
+ };
8011
+ var FlowTimer_default = FlowTimer;
8012
+
7857
8013
  // src/components/adapters/ImageComponent.tsx
7858
- import { jsx as jsx59 } from "react/jsx-runtime";
8014
+ import { jsx as jsx62 } from "react/jsx-runtime";
7859
8015
  var ImageComponent = ({ component }) => {
7860
8016
  const { theme } = useTheme_default();
7861
8017
  const config = component.config || {};
@@ -7872,7 +8028,7 @@ var ImageComponent = ({ component }) => {
7872
8028
  if (!src) {
7873
8029
  return null;
7874
8030
  }
7875
- return /* @__PURE__ */ jsx59("div", { style: { textAlign: "center" }, children: /* @__PURE__ */ jsx59(
8031
+ return /* @__PURE__ */ jsx62("div", { style: { textAlign: "center" }, children: /* @__PURE__ */ jsx62(
7876
8032
  "img",
7877
8033
  {
7878
8034
  src,
@@ -7889,7 +8045,7 @@ var ImageComponent = ({ component }) => {
7889
8045
  var ImageComponent_default = ImageComponent;
7890
8046
 
7891
8047
  // src/components/adapters/SmsOtpButton.tsx
7892
- import { jsx as jsx60 } from "react/jsx-runtime";
8048
+ import { jsx as jsx63 } from "react/jsx-runtime";
7893
8049
  var SmsOtpButton = ({
7894
8050
  isLoading,
7895
8051
  preferences,
@@ -7897,7 +8053,7 @@ var SmsOtpButton = ({
7897
8053
  ...rest
7898
8054
  }) => {
7899
8055
  const { t } = useTranslation_default(preferences?.i18n);
7900
- return /* @__PURE__ */ jsx60(
8056
+ return /* @__PURE__ */ jsx63(
7901
8057
  Button_default,
7902
8058
  {
7903
8059
  ...rest,
@@ -7906,7 +8062,7 @@ var SmsOtpButton = ({
7906
8062
  color: "secondary",
7907
8063
  variant: "solid",
7908
8064
  disabled: isLoading,
7909
- startIcon: /* @__PURE__ */ jsx60("svg", { width: "18", height: "18", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx60(
8065
+ startIcon: /* @__PURE__ */ jsx63("svg", { width: "18", height: "18", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx63(
7910
8066
  "path",
7911
8067
  {
7912
8068
  fill: "currentColor",
@@ -7920,8 +8076,8 @@ var SmsOtpButton = ({
7920
8076
  var SmsOtpButton_default = SmsOtpButton;
7921
8077
 
7922
8078
  // src/components/primitives/Icons/ArrowLeftRight.tsx
7923
- import { jsx as jsx61, jsxs as jsxs27 } from "react/jsx-runtime";
7924
- var ArrowLeftRight = ({ color = "currentColor", size = 24 }) => /* @__PURE__ */ jsxs27(
8079
+ import { jsx as jsx64, jsxs as jsxs28 } from "react/jsx-runtime";
8080
+ var ArrowLeftRight = ({ color = "currentColor", size = 24 }) => /* @__PURE__ */ jsxs28(
7925
8081
  "svg",
7926
8082
  {
7927
8083
  xmlns: "http://www.w3.org/2000/svg",
@@ -7934,24 +8090,50 @@ var ArrowLeftRight = ({ color = "currentColor", size = 24 }) => /* @__PURE__ */
7934
8090
  strokeLinecap: "round",
7935
8091
  strokeLinejoin: "round",
7936
8092
  children: [
7937
- /* @__PURE__ */ jsx61("path", { d: "M8 3 4 7l4 4" }),
7938
- /* @__PURE__ */ jsx61("path", { d: "M4 7h16" }),
7939
- /* @__PURE__ */ jsx61("path", { d: "m16 21 4-4-4-4" }),
7940
- /* @__PURE__ */ jsx61("path", { d: "M20 17H4" })
8093
+ /* @__PURE__ */ jsx64("path", { d: "M8 3 4 7l4 4" }),
8094
+ /* @__PURE__ */ jsx64("path", { d: "M4 7h16" }),
8095
+ /* @__PURE__ */ jsx64("path", { d: "m16 21 4-4-4-4" }),
8096
+ /* @__PURE__ */ jsx64("path", { d: "M20 17H4" })
7941
8097
  ]
7942
8098
  }
7943
8099
  );
7944
8100
  ArrowLeftRight.displayName = "ArrowLeftRight";
7945
8101
  var ArrowLeftRight_default = ArrowLeftRight;
7946
8102
 
8103
+ // src/components/primitives/Icons/ArrowRightLeft.tsx
8104
+ import { jsx as jsx65, jsxs as jsxs29 } from "react/jsx-runtime";
8105
+ var ArrowRightLeft = ({ color = "currentColor", size = 24 }) => /* @__PURE__ */ jsxs29(
8106
+ "svg",
8107
+ {
8108
+ xmlns: "http://www.w3.org/2000/svg",
8109
+ width: size,
8110
+ height: size,
8111
+ viewBox: "0 0 24 24",
8112
+ fill: "none",
8113
+ stroke: color,
8114
+ strokeWidth: "2",
8115
+ strokeLinecap: "round",
8116
+ strokeLinejoin: "round",
8117
+ children: [
8118
+ /* @__PURE__ */ jsx65("path", { d: "m16 3 4 4-4 4" }),
8119
+ /* @__PURE__ */ jsx65("path", { d: "M20 7H4" }),
8120
+ /* @__PURE__ */ jsx65("path", { d: "m8 21-4-4 4-4" }),
8121
+ /* @__PURE__ */ jsx65("path", { d: "M4 17h16" })
8122
+ ]
8123
+ }
8124
+ );
8125
+ ArrowRightLeft.displayName = "ArrowRightLeft";
8126
+ var ArrowRightLeft_default = ArrowRightLeft;
8127
+
7947
8128
  // src/components/primitives/Icons/flowIconRegistry.tsx
7948
8129
  var flowIconRegistry = {
7949
- ArrowLeftRight: ArrowLeftRight_default
8130
+ ArrowLeftRight: ArrowLeftRight_default,
8131
+ ArrowRightLeft: ArrowRightLeft_default
7950
8132
  };
7951
8133
  var flowIconRegistry_default = flowIconRegistry;
7952
8134
 
7953
8135
  // src/components/presentation/auth/AuthOptionFactory.tsx
7954
- import { jsx as jsx62 } from "react/jsx-runtime";
8136
+ import { jsx as jsx66 } from "react/jsx-runtime";
7955
8137
  var logger5 = createPackageComponentLogger5(
7956
8138
  "@asgardeo/react",
7957
8139
  "AuthOptionFactory"
@@ -7992,11 +8174,11 @@ var getTypographyVariant = (variant) => {
7992
8174
  };
7993
8175
  return variantMap[variant] || "h3";
7994
8176
  };
7995
- var matchesSocialProvider = (actionId, eventType, buttonText, provider, authType, componentVariant) => {
8177
+ var matchesSocialProvider = (actionId, eventType, buttonText, provider, authType, _componentVariant) => {
7996
8178
  const providerId = `${provider}_auth`;
7997
8179
  const providerMatches = actionId === providerId || eventType === providerId;
7998
- if (componentVariant?.toUpperCase() === EmbeddedFlowActionVariant.Social) {
7999
- return buttonText.toLowerCase().includes(provider);
8180
+ if (buttonText.toLowerCase().includes(provider)) {
8181
+ return true;
8000
8182
  }
8001
8183
  if (authType === "signup") {
8002
8184
  return providerMatches || buttonText.toLowerCase().includes(provider);
@@ -8046,31 +8228,53 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
8046
8228
  Object.keys(formValues).forEach((field) => {
8047
8229
  formData[field] = formValues[field];
8048
8230
  });
8231
+ const consentPrompt = options.additionalData?.["consentPrompt"];
8232
+ if (consentPrompt && eventType.toUpperCase() === EmbeddedFlowEventType.Submit) {
8233
+ const isDeny = componentVariant.toLowerCase() !== "primary";
8234
+ const decisions = {
8235
+ purposes: consentPrompt.purposes.map(
8236
+ (p) => ({
8237
+ approved: !isDeny,
8238
+ elements: [
8239
+ ...p.essential.map((attr) => ({ approved: !isDeny, name: attr })),
8240
+ ...p.optional.map(
8241
+ (attr) => ({
8242
+ approved: isDeny ? false : formValues[getConsentOptionalKey(p.purpose_id, attr)] !== "false",
8243
+ name: attr
8244
+ })
8245
+ )
8246
+ ],
8247
+ purpose_name: p.purpose_name
8248
+ })
8249
+ )
8250
+ };
8251
+ formData["consent_decisions"] = JSON.stringify(decisions);
8252
+ }
8049
8253
  options.onSubmit(component, formData, shouldSkipValidation);
8050
8254
  }
8051
8255
  };
8052
8256
  if (matchesSocialProvider(actionId, eventType, buttonText, "google", authType, componentVariant)) {
8053
- return /* @__PURE__ */ jsx62(GoogleButton_default, { onClick: handleClick, className: options.buttonClassName }, key);
8257
+ return /* @__PURE__ */ jsx66(GoogleButton_default, { onClick: handleClick, className: options.buttonClassName }, key);
8054
8258
  }
8055
8259
  if (matchesSocialProvider(actionId, eventType, buttonText, "github", authType, componentVariant)) {
8056
- return /* @__PURE__ */ jsx62(GitHubButton_default, { onClick: handleClick, className: options.buttonClassName }, key);
8260
+ return /* @__PURE__ */ jsx66(GitHubButton_default, { onClick: handleClick, className: options.buttonClassName }, key);
8057
8261
  }
8058
8262
  if (matchesSocialProvider(actionId, eventType, buttonText, "facebook", authType, componentVariant)) {
8059
- return /* @__PURE__ */ jsx62(FacebookButton_default, { onClick: handleClick, className: options.buttonClassName }, key);
8263
+ return /* @__PURE__ */ jsx66(FacebookButton_default, { onClick: handleClick, className: options.buttonClassName }, key);
8060
8264
  }
8061
8265
  if (matchesSocialProvider(actionId, eventType, buttonText, "microsoft", authType, componentVariant)) {
8062
- return /* @__PURE__ */ jsx62(MicrosoftButton_default, { onClick: handleClick, className: options.buttonClassName }, key);
8266
+ return /* @__PURE__ */ jsx66(MicrosoftButton_default, { onClick: handleClick, className: options.buttonClassName }, key);
8063
8267
  }
8064
8268
  if (matchesSocialProvider(actionId, eventType, buttonText, "linkedin", authType, componentVariant)) {
8065
- return /* @__PURE__ */ jsx62(LinkedInButton_default, { onClick: handleClick, className: options.buttonClassName }, key);
8269
+ return /* @__PURE__ */ jsx66(LinkedInButton_default, { onClick: handleClick, className: options.buttonClassName }, key);
8066
8270
  }
8067
8271
  if (matchesSocialProvider(actionId, eventType, buttonText, "ethereum", authType, componentVariant)) {
8068
- return /* @__PURE__ */ jsx62(SignInWithEthereumButton_default, { onClick: handleClick, className: options.buttonClassName }, key);
8272
+ return /* @__PURE__ */ jsx66(SignInWithEthereumButton_default, { onClick: handleClick, className: options.buttonClassName }, key);
8069
8273
  }
8070
8274
  if (actionId === "prompt_mobile" || eventType === "prompt_mobile") {
8071
- return /* @__PURE__ */ jsx62(SmsOtpButton_default, { onClick: handleClick, className: options.buttonClassName }, key);
8275
+ return /* @__PURE__ */ jsx66(SmsOtpButton_default, { onClick: handleClick, className: options.buttonClassName }, key);
8072
8276
  }
8073
- const startIconEl = component.startIcon ? /* @__PURE__ */ jsx62(
8277
+ const startIconEl = component.startIcon ? /* @__PURE__ */ jsx66(
8074
8278
  "img",
8075
8279
  {
8076
8280
  src: component.startIcon,
@@ -8079,7 +8283,7 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
8079
8283
  style: { height: "1.25em", objectFit: "contain", width: "1.25em" }
8080
8284
  }
8081
8285
  ) : null;
8082
- const endIconEl = component.endIcon ? /* @__PURE__ */ jsx62(
8286
+ const endIconEl = component.endIcon ? /* @__PURE__ */ jsx66(
8083
8287
  "img",
8084
8288
  {
8085
8289
  src: component.endIcon,
@@ -8088,12 +8292,12 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
8088
8292
  style: { height: "1.25em", objectFit: "contain", width: "1.25em" }
8089
8293
  }
8090
8294
  ) : null;
8091
- return /* @__PURE__ */ jsx62(
8295
+ return /* @__PURE__ */ jsx66(
8092
8296
  Button_default,
8093
8297
  {
8094
8298
  fullWidth: true,
8095
8299
  onClick: handleClick,
8096
- disabled: isLoading || !isFormValid,
8300
+ disabled: isLoading || !isFormValid && !shouldSkipValidation || options.isTimeoutDisabled || component.config?.disabled,
8097
8301
  className: options.buttonClassName,
8098
8302
  "data-testid": "asgardeo-signin-submit",
8099
8303
  variant: component.variant?.toLowerCase() === "primary" ? "solid" : "outline",
@@ -8107,10 +8311,10 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
8107
8311
  }
8108
8312
  case EmbeddedFlowComponentType.Text: {
8109
8313
  const variant = getTypographyVariant(component.variant);
8110
- return /* @__PURE__ */ jsx62(Typography_default, { variant, children: resolve(component.label) }, key);
8314
+ return /* @__PURE__ */ jsx66(Typography_default, { variant, children: resolve(component.label) }, key);
8111
8315
  }
8112
8316
  case EmbeddedFlowComponentType.Divider: {
8113
- return /* @__PURE__ */ jsx62(Divider_default, { children: resolve(component.label) || "" }, key);
8317
+ return /* @__PURE__ */ jsx66(Divider_default, { children: resolve(component.label) || "" }, key);
8114
8318
  }
8115
8319
  case EmbeddedFlowComponentType.Select: {
8116
8320
  const identifier = component.ref;
@@ -8121,7 +8325,7 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
8121
8325
  label: typeof opt === "string" ? opt : String(opt.label ?? opt.value ?? ""),
8122
8326
  value: typeof opt === "string" ? opt : String(opt.value ?? "")
8123
8327
  }));
8124
- return /* @__PURE__ */ jsx62(
8328
+ return /* @__PURE__ */ jsx66(
8125
8329
  Select_default,
8126
8330
  {
8127
8331
  name: identifier,
@@ -8156,12 +8360,12 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
8156
8360
  }
8157
8361
  )
8158
8362
  ).filter(Boolean);
8159
- return /* @__PURE__ */ jsx62("form", { id: component.id, children: blockComponents }, key);
8363
+ return /* @__PURE__ */ jsx66("form", { id: component.id, children: blockComponents }, key);
8160
8364
  }
8161
8365
  return null;
8162
8366
  }
8163
8367
  case EmbeddedFlowComponentType.RichText: {
8164
- return /* @__PURE__ */ jsx62(
8368
+ return /* @__PURE__ */ jsx66(
8165
8369
  "div",
8166
8370
  {
8167
8371
  className: richTextClass,
@@ -8171,15 +8375,17 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
8171
8375
  );
8172
8376
  }
8173
8377
  case EmbeddedFlowComponentType.Image: {
8174
- return /* @__PURE__ */ jsx62(
8378
+ const explicitHeight = resolve(component.height?.toString());
8379
+ const explicitWidth = resolve(component.width?.toString());
8380
+ return /* @__PURE__ */ jsx66(
8175
8381
  ImageComponent_default,
8176
8382
  {
8177
8383
  component: {
8178
8384
  config: {
8179
8385
  alt: resolve(component.alt) || resolve(component.label) || "Image",
8180
- height: resolve(component.height.toString()) || "auto",
8386
+ height: explicitHeight || (options.inStack ? "50" : "auto"),
8181
8387
  src: resolve(component.src),
8182
- width: resolve(component.width.toString()) || "100%"
8388
+ width: explicitWidth || (options.inStack ? "50" : "100%")
8183
8389
  }
8184
8390
  },
8185
8391
  formErrors: void 0,
@@ -8201,7 +8407,7 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
8201
8407
  logger5.warn(`Unknown icon name: "${iconName}". Skipping render.`);
8202
8408
  return null;
8203
8409
  }
8204
- return /* @__PURE__ */ jsx62(IconComponent, { size: component.size || 24, color: component.color || "currentColor" }, key);
8410
+ return /* @__PURE__ */ jsx66(IconComponent, { size: component.size || 24, color: component.color || "currentColor" }, key);
8205
8411
  }
8206
8412
  case EmbeddedFlowComponentType.Stack: {
8207
8413
  const direction = component.direction || "row";
@@ -8228,11 +8434,31 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
8228
8434
  authType,
8229
8435
  {
8230
8436
  ...options,
8437
+ inStack: true,
8231
8438
  key: childComponent.id || `${component.id}_${index}`
8232
8439
  }
8233
8440
  )
8234
8441
  ) : [];
8235
- return /* @__PURE__ */ jsx62("div", { style: stackStyle, children: stackChildren }, key);
8442
+ return /* @__PURE__ */ jsx66("div", { style: stackStyle, children: stackChildren }, key);
8443
+ }
8444
+ case EmbeddedFlowComponentType.Consent: {
8445
+ const consentPromptRawData = options.additionalData?.["consentPrompt"];
8446
+ return /* @__PURE__ */ jsx66(
8447
+ Consent_default,
8448
+ {
8449
+ consentData: consentPromptRawData,
8450
+ formValues,
8451
+ onInputChange
8452
+ },
8453
+ key
8454
+ );
8455
+ }
8456
+ case EmbeddedFlowComponentType.Timer: {
8457
+ const timerConfig = component.config || {};
8458
+ const textTemplate = timerConfig.text || "Time remaining: {time}";
8459
+ const timeoutMs = Number(options.additionalData?.["stepTimeout"]) || 0;
8460
+ const expiresIn = timeoutMs > 0 ? Math.max(0, Math.floor((timeoutMs - Date.now()) / 1e3)) : 0;
8461
+ return /* @__PURE__ */ jsx66(FlowTimer_default, { expiresIn, textTemplate }, key);
8236
8462
  }
8237
8463
  default:
8238
8464
  logger5.warn(`Unsupported component type: ${component.type}. Skipping render.`);
@@ -8289,7 +8515,7 @@ var renderInviteUserComponents = (components, formValues, touchedFields, formErr
8289
8515
  ).filter(Boolean);
8290
8516
 
8291
8517
  // src/components/presentation/auth/SignIn/v2/BaseSignIn.tsx
8292
- import { jsx as jsx63, jsxs as jsxs28 } from "react/jsx-runtime";
8518
+ import { jsx as jsx67, jsxs as jsxs30 } from "react/jsx-runtime";
8293
8519
  var BaseSignInContent2 = ({
8294
8520
  components = [],
8295
8521
  onSubmit,
@@ -8304,15 +8530,17 @@ var BaseSignInContent2 = ({
8304
8530
  isLoading: externalIsLoading,
8305
8531
  children,
8306
8532
  showTitle = true,
8307
- showSubtitle = true
8533
+ showSubtitle = true,
8534
+ additionalData = {},
8535
+ isTimeoutDisabled = false
8308
8536
  }) => {
8309
8537
  const { meta } = useAsgardeo_default();
8310
8538
  const { theme } = useTheme_default();
8311
8539
  const { t } = useTranslation_default();
8312
8540
  const { subtitle: flowSubtitle, title: flowTitle, messages: flowMessages, addMessage, clearMessages } = useFlow_default();
8313
8541
  const styles = BaseSignIn_styles_default(theme, theme.vars.colors.text.primary);
8314
- const [isSubmitting, setIsSubmitting] = useState16(false);
8315
- const [apiError, setApiError] = useState16(null);
8542
+ const [isSubmitting, setIsSubmitting] = useState17(false);
8543
+ const [apiError, setApiError] = useState17(null);
8316
8544
  const isLoading = externalIsLoading || isSubmitting;
8317
8545
  const handleError = useCallback11(
8318
8546
  (error) => {
@@ -8451,8 +8679,10 @@ var BaseSignInContent2 = ({
8451
8679
  isFormValid,
8452
8680
  handleInputChange,
8453
8681
  {
8682
+ additionalData,
8454
8683
  buttonClassName: buttonClasses,
8455
8684
  inputClassName: inputClasses,
8685
+ isTimeoutDisabled,
8456
8686
  meta,
8457
8687
  onInputBlur: handleInputBlur,
8458
8688
  onSubmit: handleSubmit,
@@ -8462,6 +8692,7 @@ var BaseSignInContent2 = ({
8462
8692
  }
8463
8693
  ),
8464
8694
  [
8695
+ additionalData,
8465
8696
  formValues,
8466
8697
  touchedFields,
8467
8698
  formErrors,
@@ -8474,7 +8705,8 @@ var BaseSignInContent2 = ({
8474
8705
  inputClasses,
8475
8706
  buttonClasses,
8476
8707
  handleInputBlur,
8477
- handleSubmit
8708
+ handleSubmit,
8709
+ isTimeoutDisabled
8478
8710
  ]
8479
8711
  );
8480
8712
  if (children) {
@@ -8485,6 +8717,7 @@ var BaseSignInContent2 = ({
8485
8717
  handleInputChange,
8486
8718
  handleSubmit,
8487
8719
  isLoading,
8720
+ isTimeoutDisabled,
8488
8721
  isValid: isFormValid,
8489
8722
  messages: flowMessages || [],
8490
8723
  meta,
@@ -8497,13 +8730,13 @@ var BaseSignInContent2 = ({
8497
8730
  },
8498
8731
  values: formValues
8499
8732
  };
8500
- return /* @__PURE__ */ jsx63("div", { className: containerClasses, "data-testid": "asgardeo-signin", children: children(renderProps) });
8733
+ return /* @__PURE__ */ jsx67("div", { className: containerClasses, "data-testid": "asgardeo-signin", children: children(renderProps) });
8501
8734
  }
8502
8735
  if (isLoading) {
8503
- return /* @__PURE__ */ jsx63(Card_default, { className: cx20(containerClasses, styles.card), "data-testid": "asgardeo-signin", variant, children: /* @__PURE__ */ jsx63(Card_default.Content, { children: /* @__PURE__ */ jsx63("div", { style: { display: "flex", justifyContent: "center", padding: "2rem" }, children: /* @__PURE__ */ jsx63(Spinner_default, {}) }) }) });
8736
+ return /* @__PURE__ */ jsx67(Card_default, { className: cx20(containerClasses, styles.card), "data-testid": "asgardeo-signin", variant, children: /* @__PURE__ */ jsx67(Card_default.Content, { children: /* @__PURE__ */ jsx67("div", { style: { display: "flex", justifyContent: "center", padding: "2rem" }, children: /* @__PURE__ */ jsx67(Spinner_default, {}) }) }) });
8504
8737
  }
8505
8738
  if (!components || components.length === 0) {
8506
- return /* @__PURE__ */ jsx63(Card_default, { className: cx20(containerClasses, styles.card), "data-testid": "asgardeo-signin", variant, children: /* @__PURE__ */ jsx63(Card_default.Content, { children: /* @__PURE__ */ jsx63(Alert_default, { variant: "warning", children: /* @__PURE__ */ jsx63(Typography_default, { variant: "body1", children: t("errors.signin.components.not.available") }) }) }) });
8739
+ return /* @__PURE__ */ jsx67(Card_default, { className: cx20(containerClasses, styles.card), "data-testid": "asgardeo-signin", variant, children: /* @__PURE__ */ jsx67(Card_default.Content, { children: /* @__PURE__ */ jsx67(Alert_default, { variant: "warning", children: /* @__PURE__ */ jsx67(Typography_default, { variant: "body1", children: t("errors.signin.components.not.available") }) }) }) });
8507
8740
  }
8508
8741
  const {
8509
8742
  title: rawTitle,
@@ -8512,46 +8745,46 @@ var BaseSignInContent2 = ({
8512
8745
  } = getAuthComponentHeadings_default(components, flowTitle, flowSubtitle, void 0, void 0);
8513
8746
  const title = resolveVars3(rawTitle, { meta, t });
8514
8747
  const subtitle = resolveVars3(rawSubtitle, { meta, t });
8515
- return /* @__PURE__ */ jsxs28(Card_default, { className: cx20(containerClasses, styles.card), "data-testid": "asgardeo-signin", variant, children: [
8516
- (showTitle || showSubtitle) && /* @__PURE__ */ jsxs28(Card_default.Header, { className: styles.header, children: [
8517
- showTitle && /* @__PURE__ */ jsx63(Card_default.Title, { level: 2, className: styles.title, children: title }),
8518
- showSubtitle && /* @__PURE__ */ jsx63(Typography_default, { variant: "body1", className: styles.subtitle, children: subtitle })
8748
+ return /* @__PURE__ */ jsxs30(Card_default, { className: cx20(containerClasses, styles.card), "data-testid": "asgardeo-signin", variant, children: [
8749
+ (showTitle || showSubtitle) && /* @__PURE__ */ jsxs30(Card_default.Header, { className: styles.header, children: [
8750
+ showTitle && /* @__PURE__ */ jsx67(Card_default.Title, { level: 2, className: styles.title, children: title }),
8751
+ showSubtitle && /* @__PURE__ */ jsx67(Typography_default, { variant: "body1", className: styles.subtitle, children: subtitle })
8519
8752
  ] }),
8520
- /* @__PURE__ */ jsxs28(Card_default.Content, { children: [
8521
- externalError && /* @__PURE__ */ jsx63("div", { className: styles.flowMessagesContainer, children: /* @__PURE__ */ jsx63(Alert_default, { variant: "error", className: cx20(styles.flowMessageItem, messageClasses), children: /* @__PURE__ */ jsx63(Alert_default.Description, { children: externalError.message }) }) }),
8522
- flowMessages && flowMessages.length > 0 && /* @__PURE__ */ jsx63("div", { className: styles.flowMessagesContainer, children: flowMessages.map((message, index) => /* @__PURE__ */ jsx63(
8753
+ /* @__PURE__ */ jsxs30(Card_default.Content, { children: [
8754
+ externalError && /* @__PURE__ */ jsx67("div", { className: styles.flowMessagesContainer, children: /* @__PURE__ */ jsx67(Alert_default, { variant: "error", className: cx20(styles.flowMessageItem, messageClasses), children: /* @__PURE__ */ jsx67(Alert_default.Description, { children: externalError.message }) }) }),
8755
+ flowMessages && flowMessages.length > 0 && /* @__PURE__ */ jsx67("div", { className: styles.flowMessagesContainer, children: flowMessages.map((message, index) => /* @__PURE__ */ jsx67(
8523
8756
  Alert_default,
8524
8757
  {
8525
8758
  variant: message.type === "error" ? "error" : "info",
8526
8759
  className: cx20(styles.flowMessageItem, messageClasses),
8527
- children: /* @__PURE__ */ jsx63(Alert_default.Description, { children: message.message })
8760
+ children: /* @__PURE__ */ jsx67(Alert_default.Description, { children: message.message })
8528
8761
  },
8529
8762
  index
8530
8763
  )) }),
8531
- /* @__PURE__ */ jsx63("div", { className: styles.contentContainer, children: componentsWithoutHeadings && renderComponents(componentsWithoutHeadings) })
8764
+ /* @__PURE__ */ jsx67("div", { className: styles.contentContainer, children: componentsWithoutHeadings && renderComponents(componentsWithoutHeadings) })
8532
8765
  ] })
8533
8766
  ] });
8534
8767
  };
8535
8768
  var BaseSignIn2 = ({ preferences, showLogo = true, ...rest }) => {
8536
8769
  const { theme } = useTheme_default();
8537
8770
  const styles = BaseSignIn_styles_default(theme, theme.vars.colors.text.primary);
8538
- const content = /* @__PURE__ */ jsxs28("div", { children: [
8539
- showLogo && /* @__PURE__ */ jsx63("div", { className: styles.logoContainer, children: /* @__PURE__ */ jsx63(Logo_default, { size: "large" }) }),
8540
- /* @__PURE__ */ jsx63(FlowProvider_default, { children: /* @__PURE__ */ jsx63(BaseSignInContent2, { showLogo, ...rest }) })
8771
+ const content = /* @__PURE__ */ jsxs30("div", { children: [
8772
+ showLogo && /* @__PURE__ */ jsx67("div", { className: styles.logoContainer, children: /* @__PURE__ */ jsx67(Logo_default, { size: "large" }) }),
8773
+ /* @__PURE__ */ jsx67(FlowProvider_default, { children: /* @__PURE__ */ jsx67(BaseSignInContent2, { showLogo, ...rest }) })
8541
8774
  ] });
8542
8775
  if (!preferences) return content;
8543
- return /* @__PURE__ */ jsx63(ComponentPreferencesContext_default.Provider, { value: preferences, children: content });
8776
+ return /* @__PURE__ */ jsx67(ComponentPreferencesContext_default.Provider, { value: preferences, children: content });
8544
8777
  };
8545
8778
  var BaseSignIn_default2 = BaseSignIn2;
8546
8779
 
8547
8780
  // src/components/presentation/auth/SignIn/BaseSignIn.tsx
8548
- import { jsx as jsx64 } from "react/jsx-runtime";
8781
+ import { jsx as jsx68 } from "react/jsx-runtime";
8549
8782
  var BaseSignIn3 = (props) => {
8550
8783
  const { platform } = useAsgardeo_default();
8551
8784
  if (platform === Platform4.AsgardeoV2) {
8552
- return /* @__PURE__ */ jsx64(BaseSignIn_default2, { ...props });
8785
+ return /* @__PURE__ */ jsx68(BaseSignIn_default2, { ...props });
8553
8786
  }
8554
- return /* @__PURE__ */ jsx64(BaseSignIn_default, { ...props });
8787
+ return /* @__PURE__ */ jsx68(BaseSignIn_default, { ...props });
8555
8788
  };
8556
8789
  var BaseSignIn_default3 = BaseSignIn3;
8557
8790
 
@@ -8567,10 +8800,10 @@ import {
8567
8800
  EmbeddedSignInFlowStatusV2 as EmbeddedSignInFlowStatusV22,
8568
8801
  EmbeddedSignInFlowTypeV2
8569
8802
  } from "@asgardeo/browser";
8570
- import { useState as useState17, useEffect as useEffect16, useRef as useRef7 } from "react";
8803
+ import { useState as useState18, useEffect as useEffect17, useRef as useRef7 } from "react";
8571
8804
 
8572
8805
  // src/hooks/v2/useOAuthCallback.ts
8573
- import { useEffect as useEffect15, useRef as useRef6 } from "react";
8806
+ import { useEffect as useEffect16, useRef as useRef6 } from "react";
8574
8807
  function cleanupUrlParams() {
8575
8808
  if (typeof window === "undefined") return;
8576
8809
  const url = new URL(window.location.href);
@@ -8597,7 +8830,7 @@ function useOAuthCallback({
8597
8830
  }) {
8598
8831
  const internalRef = useRef6(false);
8599
8832
  const oauthCodeProcessedRef = processedRef ?? internalRef;
8600
- useEffect15(() => {
8833
+ useEffect16(() => {
8601
8834
  if (!isInitialized || isSubmitting) {
8602
8835
  return;
8603
8836
  }
@@ -8843,7 +9076,7 @@ var handlePasskeyAuthentication = async (challengeData) => {
8843
9076
  };
8844
9077
 
8845
9078
  // src/components/presentation/auth/SignIn/v2/SignIn.tsx
8846
- import { Fragment as Fragment13, jsx as jsx65 } from "react/jsx-runtime";
9079
+ import { Fragment as Fragment16, jsx as jsx69 } from "react/jsx-runtime";
8847
9080
  var SignIn = ({
8848
9081
  className,
8849
9082
  preferences,
@@ -8855,12 +9088,14 @@ var SignIn = ({
8855
9088
  }) => {
8856
9089
  const { applicationId, afterSignInUrl, signIn, isInitialized, isLoading, meta } = useAsgardeo_default();
8857
9090
  const { t } = useTranslation_default(preferences?.i18n);
8858
- const [components, setComponents] = useState17([]);
8859
- const [currentFlowId, setCurrentFlowId] = useState17(null);
8860
- const [isFlowInitialized, setIsFlowInitialized] = useState17(false);
8861
- const [flowError, setFlowError] = useState17(null);
8862
- const [isSubmitting, setIsSubmitting] = useState17(false);
8863
- const [passkeyState, setPasskeyState] = useState17({
9091
+ const [components, setComponents] = useState18([]);
9092
+ const [additionalData, setAdditionalData] = useState18({});
9093
+ const [currentFlowId, setCurrentFlowId] = useState18(null);
9094
+ const [isFlowInitialized, setIsFlowInitialized] = useState18(false);
9095
+ const [flowError, setFlowError] = useState18(null);
9096
+ const [isSubmitting, setIsSubmitting] = useState18(false);
9097
+ const [isTimeoutDisabled, setIsTimeoutDisabled] = useState18(false);
9098
+ const [passkeyState, setPasskeyState] = useState18({
8864
9099
  actionId: null,
8865
9100
  challenge: null,
8866
9101
  creationOptions: null,
@@ -8883,6 +9118,7 @@ var SignIn = ({
8883
9118
  setFlowId(null);
8884
9119
  setIsFlowInitialized(false);
8885
9120
  sessionStorage.removeItem("asgardeo_auth_id");
9121
+ setIsTimeoutDisabled(false);
8886
9122
  oauthCodeProcessedRef.current = false;
8887
9123
  };
8888
9124
  const getUrlParams2 = () => {
@@ -8980,7 +9216,11 @@ var SignIn = ({
8980
9216
  if (handleRedirection(response)) {
8981
9217
  return;
8982
9218
  }
8983
- const { flowId: normalizedFlowId, components: normalizedComponents } = normalizeFlowResponse(
9219
+ const {
9220
+ flowId: normalizedFlowId,
9221
+ components: normalizedComponents,
9222
+ additionalData: normalizedAdditionalData
9223
+ } = normalizeFlowResponse(
8984
9224
  response,
8985
9225
  t,
8986
9226
  {
@@ -8991,7 +9231,9 @@ var SignIn = ({
8991
9231
  if (normalizedFlowId && normalizedComponents) {
8992
9232
  setFlowId(normalizedFlowId);
8993
9233
  setComponents(normalizedComponents);
9234
+ setAdditionalData(normalizedAdditionalData ?? {});
8994
9235
  setIsFlowInitialized(true);
9236
+ setIsTimeoutDisabled(false);
8995
9237
  cleanupFlowUrlParams();
8996
9238
  }
8997
9239
  } catch (error) {
@@ -9002,33 +9244,104 @@ var SignIn = ({
9002
9244
  initializationAttemptedRef.current = false;
9003
9245
  }
9004
9246
  };
9005
- useEffect16(() => {
9247
+ useEffect17(() => {
9006
9248
  const urlParams = getUrlParams2();
9007
9249
  if (urlParams.error) {
9008
9250
  handleOAuthError(urlParams.error, urlParams.errorDescription);
9009
9251
  return;
9010
9252
  }
9011
9253
  handleAuthId(urlParams.authId);
9012
- if (urlParams.code || urlParams.state) {
9013
- return;
9014
- }
9254
+ }, []);
9255
+ useEffect17(() => {
9015
9256
  const currentUrlParams = getUrlParams2();
9016
9257
  if (isInitialized && !isLoading && !isFlowInitialized && !initializationAttemptedRef.current && !currentFlowId && !currentUrlParams.code && !currentUrlParams.state && !isSubmitting && !oauthCodeProcessedRef.current) {
9017
9258
  initializationAttemptedRef.current = true;
9018
9259
  initializeFlow();
9019
9260
  }
9020
9261
  }, [isInitialized, isLoading, isFlowInitialized, currentFlowId]);
9262
+ useEffect17(() => {
9263
+ const timeoutMs = Number(additionalData?.["stepTimeout"]) || 0;
9264
+ if (timeoutMs <= 0 || !isFlowInitialized) {
9265
+ setIsTimeoutDisabled(false);
9266
+ return void 0;
9267
+ }
9268
+ const remaining = Math.max(0, Math.floor((timeoutMs - Date.now()) / 1e3));
9269
+ const handleTimeout = () => {
9270
+ const errorMessage = t("errors.signin.timeout") || "Time allowed to complete the step has expired.";
9271
+ setError(new Error(errorMessage));
9272
+ setIsTimeoutDisabled(true);
9273
+ };
9274
+ if (remaining <= 0) {
9275
+ handleTimeout();
9276
+ return void 0;
9277
+ }
9278
+ const timerId = setTimeout(() => {
9279
+ handleTimeout();
9280
+ }, remaining * 1e3);
9281
+ return () => clearTimeout(timerId);
9282
+ }, [additionalData?.["stepTimeout"], isFlowInitialized, t]);
9021
9283
  const handleSubmit = async (payload) => {
9022
9284
  const effectiveFlowId = payload.flowId || currentFlowId;
9023
9285
  if (!effectiveFlowId) {
9024
9286
  throw new Error("No active flow ID");
9025
9287
  }
9288
+ const processedInputs = { ...payload.inputs };
9289
+ if (additionalData?.["consentPrompt"]) {
9290
+ try {
9291
+ const consentPromptRawData = additionalData["consentPrompt"];
9292
+ const purposes = typeof consentPromptRawData === "string" ? JSON.parse(consentPromptRawData) : consentPromptRawData.purposes || consentPromptRawData;
9293
+ let isDeny = false;
9294
+ if (payload.action) {
9295
+ const findAction = (comps) => {
9296
+ if (!comps || comps.length === 0) return null;
9297
+ const found = comps.find((c) => c.id === payload.action);
9298
+ if (found) return found;
9299
+ return comps.reduce((acc, c) => {
9300
+ if (acc) return acc;
9301
+ if (c.components) return findAction(c.components);
9302
+ return null;
9303
+ }, null);
9304
+ };
9305
+ const submitAction = findAction(components);
9306
+ if (submitAction && submitAction.variant?.toLowerCase() !== "primary") {
9307
+ isDeny = true;
9308
+ }
9309
+ }
9310
+ const decisions = {
9311
+ purposes: purposes.map((p) => ({
9312
+ approved: !isDeny,
9313
+ elements: [
9314
+ ...(p.essential || []).map((attr) => ({
9315
+ approved: !isDeny,
9316
+ name: attr
9317
+ })),
9318
+ ...(p.optional || []).map((attr) => {
9319
+ const key = `__consent_opt__${p.purpose_id}__${attr}`;
9320
+ return {
9321
+ approved: isDeny ? false : processedInputs[key] !== "false",
9322
+ name: attr
9323
+ };
9324
+ })
9325
+ ],
9326
+ purpose_name: p.purpose_name
9327
+ }))
9328
+ };
9329
+ processedInputs["consent_decisions"] = JSON.stringify(decisions);
9330
+ Object.keys(processedInputs).forEach((key) => {
9331
+ if (key.startsWith("__consent_opt__")) {
9332
+ delete processedInputs[key];
9333
+ }
9334
+ });
9335
+ } catch (e) {
9336
+ }
9337
+ }
9026
9338
  try {
9027
9339
  setIsSubmitting(true);
9028
9340
  setFlowError(null);
9029
9341
  const response = await signIn({
9030
9342
  flowId: effectiveFlowId,
9031
- ...payload
9343
+ ...payload,
9344
+ inputs: processedInputs
9032
9345
  });
9033
9346
  if (handleRedirection(response)) {
9034
9347
  return;
@@ -9048,7 +9361,11 @@ var SignIn = ({
9048
9361
  setIsSubmitting(false);
9049
9362
  return;
9050
9363
  }
9051
- const { flowId: normalizedFlowId, components: normalizedComponents } = normalizeFlowResponse(
9364
+ const {
9365
+ flowId: normalizedFlowId,
9366
+ components: normalizedComponents,
9367
+ additionalData: normalizedAdditionalData
9368
+ } = normalizeFlowResponse(
9052
9369
  response,
9053
9370
  t,
9054
9371
  {
@@ -9088,6 +9405,8 @@ var SignIn = ({
9088
9405
  if (normalizedFlowId && normalizedComponents) {
9089
9406
  setFlowId(normalizedFlowId);
9090
9407
  setComponents(normalizedComponents);
9408
+ setAdditionalData(normalizedAdditionalData ?? {});
9409
+ setIsTimeoutDisabled(false);
9091
9410
  setIsFlowInitialized(true);
9092
9411
  cleanupFlowUrlParams();
9093
9412
  if (response?.failureReason) {
@@ -9119,7 +9438,7 @@ var SignIn = ({
9119
9438
  processedRef: oauthCodeProcessedRef,
9120
9439
  setFlowId
9121
9440
  });
9122
- useEffect16(() => {
9441
+ useEffect17(() => {
9123
9442
  if (!passkeyState.isActive || !passkeyState.challenge && !passkeyState.creationOptions || !passkeyState.flowId) {
9124
9443
  return;
9125
9444
  }
@@ -9172,21 +9491,25 @@ var SignIn = ({
9172
9491
  }, [passkeyState.isActive, passkeyState.challenge, passkeyState.creationOptions, passkeyState.flowId]);
9173
9492
  if (children) {
9174
9493
  const renderProps = {
9494
+ additionalData,
9175
9495
  components,
9176
9496
  error: flowError,
9177
9497
  initialize: initializeFlow,
9178
9498
  isInitialized: isFlowInitialized,
9179
9499
  isLoading: isLoading || isSubmitting || !isInitialized,
9500
+ isTimeoutDisabled,
9180
9501
  meta,
9181
9502
  onSubmit: handleSubmit
9182
9503
  };
9183
- return /* @__PURE__ */ jsx65(Fragment13, { children: children(renderProps) });
9504
+ return /* @__PURE__ */ jsx69(Fragment16, { children: children(renderProps) });
9184
9505
  }
9185
- return /* @__PURE__ */ jsx65(
9506
+ return /* @__PURE__ */ jsx69(
9186
9507
  BaseSignIn_default2,
9187
9508
  {
9509
+ additionalData,
9188
9510
  components,
9189
9511
  isLoading: isLoading || !isInitialized || !isFlowInitialized,
9512
+ isTimeoutDisabled,
9190
9513
  onSubmit: handleSubmit,
9191
9514
  onError: handleError,
9192
9515
  error: flowError,
@@ -9200,7 +9523,7 @@ var SignIn = ({
9200
9523
  var SignIn_default = SignIn;
9201
9524
 
9202
9525
  // src/components/presentation/auth/SignIn/SignIn.tsx
9203
- import { jsx as jsx66 } from "react/jsx-runtime";
9526
+ import { jsx as jsx70 } from "react/jsx-runtime";
9204
9527
  var SignIn2 = ({ className, size = "medium", children, preferences, ...rest }) => {
9205
9528
  const { signIn, afterSignInUrl, isInitialized, isLoading, platform } = useAsgardeo_default();
9206
9529
  const handleInitialize = async () => await signIn({ response_mode: "direct" });
@@ -9217,7 +9540,7 @@ var SignIn2 = ({ className, size = "medium", children, preferences, ...rest }) =
9217
9540
  }
9218
9541
  };
9219
9542
  if (platform === Platform5.AsgardeoV2) {
9220
- return /* @__PURE__ */ jsx66(
9543
+ return /* @__PURE__ */ jsx70(
9221
9544
  SignIn_default,
9222
9545
  {
9223
9546
  className,
@@ -9230,7 +9553,7 @@ var SignIn2 = ({ className, size = "medium", children, preferences, ...rest }) =
9230
9553
  }
9231
9554
  );
9232
9555
  }
9233
- return /* @__PURE__ */ jsx66(
9556
+ return /* @__PURE__ */ jsx70(
9234
9557
  BaseSignIn_default3,
9235
9558
  {
9236
9559
  isLoading: isLoading || !isInitialized,
@@ -9262,7 +9585,7 @@ import {
9262
9585
  createPackageComponentLogger as createPackageComponentLogger6
9263
9586
  } from "@asgardeo/browser";
9264
9587
  import { cx as cx21 } from "@emotion/css";
9265
- import { useEffect as useEffect17, useState as useState18, useCallback as useCallback12, useRef as useRef8 } from "react";
9588
+ import { useEffect as useEffect18, useState as useState19, useCallback as useCallback12, useRef as useRef8 } from "react";
9266
9589
 
9267
9590
  // src/components/presentation/auth/SignUp/v1/SignUpOptionFactory.tsx
9268
9591
  import { EmbeddedFlowComponentType as EmbeddedFlowComponentType2 } from "@asgardeo/browser";
@@ -9324,13 +9647,13 @@ var DateInput = ({
9324
9647
  var DateInput_default = DateInput;
9325
9648
 
9326
9649
  // src/components/adapters/DividerComponent.tsx
9327
- import { jsx as jsx67 } from "react/jsx-runtime";
9650
+ import { jsx as jsx71 } from "react/jsx-runtime";
9328
9651
  var DividerComponent = ({ component }) => {
9329
9652
  const { theme } = useTheme_default();
9330
9653
  const config = component.config || {};
9331
9654
  const text = config["text"] || "";
9332
9655
  const variant = component.variant?.toLowerCase() || "horizontal";
9333
- return /* @__PURE__ */ jsx67(
9656
+ return /* @__PURE__ */ jsx71(
9334
9657
  Divider_default,
9335
9658
  {
9336
9659
  orientation: variant === "vertical" ? "vertical" : "horizontal",
@@ -9371,7 +9694,7 @@ var EmailInput = ({
9371
9694
  var EmailInput_default = EmailInput;
9372
9695
 
9373
9696
  // src/components/adapters/FormContainer.tsx
9374
- import { jsx as jsx68 } from "react/jsx-runtime";
9697
+ import { jsx as jsx72 } from "react/jsx-runtime";
9375
9698
  var FormContainer = (props) => {
9376
9699
  const { component } = props;
9377
9700
  if (component.components && component.components.length > 0) {
@@ -9384,14 +9707,14 @@ var FormContainer = (props) => {
9384
9707
  props.onSubmit(submitButton, props.formValues);
9385
9708
  }
9386
9709
  };
9387
- return /* @__PURE__ */ jsx68("form", { onSubmit: handleFormSubmit, style: { display: "flex", flexDirection: "column" }, children: component.components.map(
9710
+ return /* @__PURE__ */ jsx72("form", { onSubmit: handleFormSubmit, style: { display: "flex", flexDirection: "column" }, children: component.components.map(
9388
9711
  (childComponent) => createSignUpComponent({
9389
9712
  ...props,
9390
9713
  component: childComponent
9391
9714
  })
9392
9715
  ) }, component.id);
9393
9716
  }
9394
- return /* @__PURE__ */ jsx68("div", {}, component.id);
9717
+ return /* @__PURE__ */ jsx72("div", {}, component.id);
9395
9718
  };
9396
9719
  var FormContainer_default = FormContainer;
9397
9720
 
@@ -9517,7 +9840,7 @@ var SelectInput = ({
9517
9840
  var SelectInput_default = SelectInput;
9518
9841
 
9519
9842
  // src/components/adapters/SubmitButton.tsx
9520
- import { jsx as jsx69 } from "react/jsx-runtime";
9843
+ import { jsx as jsx73 } from "react/jsx-runtime";
9521
9844
  var ButtonComponent = ({
9522
9845
  component,
9523
9846
  isLoading,
@@ -9539,6 +9862,7 @@ var ButtonComponent = ({
9539
9862
  case "TEXT":
9540
9863
  return { color: "primary", variant: "text" };
9541
9864
  case "SOCIAL":
9865
+ case "OUTLINED":
9542
9866
  return { color: "primary", variant: "outline" };
9543
9867
  default:
9544
9868
  return { color: "primary", variant: "solid" };
@@ -9550,7 +9874,7 @@ var ButtonComponent = ({
9550
9874
  onSubmit(component);
9551
9875
  }
9552
9876
  };
9553
- return /* @__PURE__ */ jsx69(
9877
+ return /* @__PURE__ */ jsx73(
9554
9878
  Button_default,
9555
9879
  {
9556
9880
  type: buttonType === "submit" ? "submit" : "button",
@@ -9561,7 +9885,7 @@ var ButtonComponent = ({
9561
9885
  onClick: buttonType !== "submit" ? handleClick : void 0,
9562
9886
  className: buttonClassName,
9563
9887
  style: { width: "100%" },
9564
- children: isLoading ? /* @__PURE__ */ jsx69(Spinner_default, { size: "small" }) : buttonText
9888
+ children: isLoading ? /* @__PURE__ */ jsx73(Spinner_default, { size: "small" }) : buttonText
9565
9889
  },
9566
9890
  component.id
9567
9891
  );
@@ -9569,7 +9893,7 @@ var ButtonComponent = ({
9569
9893
  var SubmitButton_default = ButtonComponent;
9570
9894
 
9571
9895
  // src/components/adapters/TelephoneInput.tsx
9572
- import { jsx as jsx70 } from "react/jsx-runtime";
9896
+ import { jsx as jsx74 } from "react/jsx-runtime";
9573
9897
  var TelephoneInput = ({
9574
9898
  component,
9575
9899
  formValues,
@@ -9582,7 +9906,7 @@ var TelephoneInput = ({
9582
9906
  const fieldName = config["identifier"] || config["name"] || component.id;
9583
9907
  const value = formValues[fieldName] || "";
9584
9908
  const error = touchedFields[fieldName] ? formErrors[fieldName] : void 0;
9585
- return /* @__PURE__ */ jsx70(
9909
+ return /* @__PURE__ */ jsx74(
9586
9910
  TextField_default,
9587
9911
  {
9588
9912
  name: fieldName,
@@ -9630,7 +9954,7 @@ var TextInput = ({
9630
9954
  var TextInput_default = TextInput;
9631
9955
 
9632
9956
  // src/components/adapters/Typography.tsx
9633
- import { jsx as jsx71 } from "react/jsx-runtime";
9957
+ import { jsx as jsx75 } from "react/jsx-runtime";
9634
9958
  var TypographyComponent = ({ component }) => {
9635
9959
  const { theme } = useTheme_default();
9636
9960
  const config = component.config || {};
@@ -9671,7 +9995,7 @@ var TypographyComponent = ({ component }) => {
9671
9995
  default:
9672
9996
  typographyVariant = "body1";
9673
9997
  }
9674
- return /* @__PURE__ */ jsx71(
9998
+ return /* @__PURE__ */ jsx75(
9675
9999
  Typography_default,
9676
10000
  {
9677
10001
  variant: typographyVariant,
@@ -9684,69 +10008,69 @@ var TypographyComponent = ({ component }) => {
9684
10008
  var Typography_default2 = TypographyComponent;
9685
10009
 
9686
10010
  // src/components/presentation/auth/SignUp/v1/SignUpOptionFactory.tsx
9687
- import { jsx as jsx72 } from "react/jsx-runtime";
10011
+ import { jsx as jsx76 } from "react/jsx-runtime";
9688
10012
  var createSignUpComponent = ({ component, onSubmit, ...rest }) => {
9689
10013
  switch (component.type) {
9690
10014
  case EmbeddedFlowComponentType2.Typography:
9691
- return /* @__PURE__ */ jsx72(Typography_default2, { component, onSubmit, ...rest });
10015
+ return /* @__PURE__ */ jsx76(Typography_default2, { component, onSubmit, ...rest });
9692
10016
  case EmbeddedFlowComponentType2.Input: {
9693
10017
  const inputVariant = component.variant?.toUpperCase();
9694
10018
  const inputType = component.config["type"]?.toLowerCase();
9695
10019
  if (inputVariant === "EMAIL" || inputType === "email") {
9696
- return /* @__PURE__ */ jsx72(EmailInput_default, { component, onSubmit, ...rest });
10020
+ return /* @__PURE__ */ jsx76(EmailInput_default, { component, onSubmit, ...rest });
9697
10021
  }
9698
10022
  if (inputVariant === "PASSWORD" || inputType === "password") {
9699
- return /* @__PURE__ */ jsx72(PasswordInput_default, { component, onSubmit, ...rest });
10023
+ return /* @__PURE__ */ jsx76(PasswordInput_default, { component, onSubmit, ...rest });
9700
10024
  }
9701
10025
  if (inputVariant === "TELEPHONE" || inputType === "tel") {
9702
- return /* @__PURE__ */ jsx72(TelephoneInput_default, { component, onSubmit, ...rest });
10026
+ return /* @__PURE__ */ jsx76(TelephoneInput_default, { component, onSubmit, ...rest });
9703
10027
  }
9704
10028
  if (inputVariant === "NUMBER" || inputType === "number") {
9705
- return /* @__PURE__ */ jsx72(NumberInput_default, { component, onSubmit, ...rest });
10029
+ return /* @__PURE__ */ jsx76(NumberInput_default, { component, onSubmit, ...rest });
9706
10030
  }
9707
10031
  if (inputVariant === "DATE" || inputType === "date") {
9708
- return /* @__PURE__ */ jsx72(DateInput_default, { component, onSubmit, ...rest });
10032
+ return /* @__PURE__ */ jsx76(DateInput_default, { component, onSubmit, ...rest });
9709
10033
  }
9710
10034
  if (inputVariant === "CHECKBOX" || inputType === "checkbox") {
9711
- return /* @__PURE__ */ jsx72(CheckboxInput_default, { component, onSubmit, ...rest });
10035
+ return /* @__PURE__ */ jsx76(CheckboxInput_default, { component, onSubmit, ...rest });
9712
10036
  }
9713
- return /* @__PURE__ */ jsx72(TextInput_default, { component, onSubmit, ...rest });
10037
+ return /* @__PURE__ */ jsx76(TextInput_default, { component, onSubmit, ...rest });
9714
10038
  }
9715
10039
  case EmbeddedFlowComponentType2.Button: {
9716
10040
  const buttonVariant = component.variant?.toUpperCase();
9717
10041
  const buttonText = component.config["text"] || component.config["label"] || "";
9718
10042
  if (buttonVariant === "SOCIAL") {
9719
10043
  if (buttonText.toLowerCase().includes("google")) {
9720
- return /* @__PURE__ */ jsx72(GoogleButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
10044
+ return /* @__PURE__ */ jsx76(GoogleButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
9721
10045
  }
9722
10046
  if (buttonText.toLowerCase().includes("github")) {
9723
- return /* @__PURE__ */ jsx72(GitHubButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
10047
+ return /* @__PURE__ */ jsx76(GitHubButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
9724
10048
  }
9725
10049
  if (buttonText.toLowerCase().includes("microsoft")) {
9726
- return /* @__PURE__ */ jsx72(MicrosoftButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
10050
+ return /* @__PURE__ */ jsx76(MicrosoftButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
9727
10051
  }
9728
10052
  if (buttonText.toLowerCase().includes("facebook")) {
9729
- return /* @__PURE__ */ jsx72(FacebookButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
10053
+ return /* @__PURE__ */ jsx76(FacebookButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
9730
10054
  }
9731
10055
  if (buttonText.toLowerCase().includes("linkedin")) {
9732
- return /* @__PURE__ */ jsx72(LinkedInButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
10056
+ return /* @__PURE__ */ jsx76(LinkedInButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
9733
10057
  }
9734
10058
  if (buttonText.toLowerCase().includes("ethereum")) {
9735
- return /* @__PURE__ */ jsx72(SignInWithEthereumButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
10059
+ return /* @__PURE__ */ jsx76(SignInWithEthereumButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
9736
10060
  }
9737
10061
  }
9738
- return /* @__PURE__ */ jsx72(SubmitButton_default, { component, onSubmit, ...rest });
10062
+ return /* @__PURE__ */ jsx76(SubmitButton_default, { component, onSubmit, ...rest });
9739
10063
  }
9740
10064
  case EmbeddedFlowComponentType2.Form:
9741
- return /* @__PURE__ */ jsx72(FormContainer_default, { component, onSubmit, ...rest });
10065
+ return /* @__PURE__ */ jsx76(FormContainer_default, { component, onSubmit, ...rest });
9742
10066
  case EmbeddedFlowComponentType2.Select:
9743
- return /* @__PURE__ */ jsx72(SelectInput_default, { component, onSubmit, ...rest });
10067
+ return /* @__PURE__ */ jsx76(SelectInput_default, { component, onSubmit, ...rest });
9744
10068
  case EmbeddedFlowComponentType2.Divider:
9745
- return /* @__PURE__ */ jsx72(DividerComponent_default, { component, onSubmit, ...rest });
10069
+ return /* @__PURE__ */ jsx76(DividerComponent_default, { component, onSubmit, ...rest });
9746
10070
  case EmbeddedFlowComponentType2.Image:
9747
- return /* @__PURE__ */ jsx72(ImageComponent_default, { component, onSubmit, ...rest });
10071
+ return /* @__PURE__ */ jsx76(ImageComponent_default, { component, onSubmit, ...rest });
9748
10072
  default:
9749
- return /* @__PURE__ */ jsx72("div", {});
10073
+ return /* @__PURE__ */ jsx76("div", {});
9750
10074
  }
9751
10075
  };
9752
10076
  var createSignUpOptionFromComponent = (component, formValues, touchedFields, formErrors, isLoading, isFormValid, onInputChange, options) => createSignUpComponent({
@@ -9915,7 +10239,7 @@ var useStyles17 = (theme, colorScheme) => useMemo25(() => {
9915
10239
  var BaseSignUp_styles_default = useStyles17;
9916
10240
 
9917
10241
  // src/components/presentation/auth/SignUp/v1/BaseSignUp.tsx
9918
- import { jsx as jsx73, jsxs as jsxs29 } from "react/jsx-runtime";
10242
+ import { jsx as jsx77, jsxs as jsxs31 } from "react/jsx-runtime";
9919
10243
  var logger6 = createPackageComponentLogger6(
9920
10244
  "@asgardeo/react",
9921
10245
  "BaseSignUp"
@@ -9977,9 +10301,9 @@ var BaseSignUpContent = ({
9977
10301
  },
9978
10302
  [t, addMessage, clearMessages]
9979
10303
  );
9980
- const [isLoading, setIsLoading] = useState18(false);
9981
- const [isFlowInitialized, setIsFlowInitialized] = useState18(false);
9982
- const [currentFlow, setCurrentFlow] = useState18(null);
10304
+ const [isLoading, setIsLoading] = useState19(false);
10305
+ const [isFlowInitialized, setIsFlowInitialized] = useState19(false);
10306
+ const [currentFlow, setCurrentFlow] = useState19(null);
9983
10307
  const initializationAttemptedRef = useRef8(false);
9984
10308
  const extractFormFields = useCallback12(
9985
10309
  (components) => {
@@ -10266,7 +10590,7 @@ var BaseSignUpContent = ({
10266
10590
  handleSubmit
10267
10591
  ]
10268
10592
  );
10269
- useEffect17(() => {
10593
+ useEffect18(() => {
10270
10594
  if (isInitialized && !isFlowInitialized && !initializationAttemptedRef.current) {
10271
10595
  initializationAttemptedRef.current = true;
10272
10596
  (async () => {
@@ -10318,42 +10642,42 @@ var BaseSignUpContent = ({
10318
10642
  validateForm,
10319
10643
  values: formValues
10320
10644
  };
10321
- return /* @__PURE__ */ jsx73("div", { className: containerClasses, children: children(renderProps) });
10645
+ return /* @__PURE__ */ jsx77("div", { className: containerClasses, children: children(renderProps) });
10322
10646
  }
10323
10647
  if (!isFlowInitialized && isLoading) {
10324
- return /* @__PURE__ */ jsx73(Card_default, { className: cx21(containerClasses, styles.card), variant, children: /* @__PURE__ */ jsx73(Card_default.Content, { children: /* @__PURE__ */ jsx73("div", { className: styles.loadingContainer, children: /* @__PURE__ */ jsx73(Spinner_default, { size: "medium" }) }) }) });
10648
+ return /* @__PURE__ */ jsx77(Card_default, { className: cx21(containerClasses, styles.card), variant, children: /* @__PURE__ */ jsx77(Card_default.Content, { children: /* @__PURE__ */ jsx77("div", { className: styles.loadingContainer, children: /* @__PURE__ */ jsx77(Spinner_default, { size: "medium" }) }) }) });
10325
10649
  }
10326
10650
  if (!currentFlow) {
10327
- return /* @__PURE__ */ jsx73(Card_default, { className: cx21(containerClasses, styles.card), variant, children: /* @__PURE__ */ jsx73(Card_default.Content, { children: /* @__PURE__ */ jsxs29(Alert_default, { variant: "error", className: errorClasses, children: [
10328
- /* @__PURE__ */ jsx73(Alert_default.Title, { children: t("errors.heading") }),
10329
- /* @__PURE__ */ jsx73(Alert_default.Description, { children: t("errors.signup.flow.initialization.failure") })
10651
+ return /* @__PURE__ */ jsx77(Card_default, { className: cx21(containerClasses, styles.card), variant, children: /* @__PURE__ */ jsx77(Card_default.Content, { children: /* @__PURE__ */ jsxs31(Alert_default, { variant: "error", className: errorClasses, children: [
10652
+ /* @__PURE__ */ jsx77(Alert_default.Title, { children: t("errors.heading") }),
10653
+ /* @__PURE__ */ jsx77(Alert_default.Description, { children: t("errors.signup.flow.initialization.failure") })
10330
10654
  ] }) }) });
10331
10655
  }
10332
- return /* @__PURE__ */ jsxs29(Card_default, { className: cx21(containerClasses, styles.card), variant, children: [
10333
- (showTitle || showSubtitle) && /* @__PURE__ */ jsxs29(Card_default.Header, { className: styles.header, children: [
10334
- showTitle && /* @__PURE__ */ jsx73(Card_default.Title, { level: 2, className: styles.title, children: flowTitle || t("signup.heading") }),
10335
- showSubtitle && /* @__PURE__ */ jsx73(Typography_default, { variant: "body1", className: styles.subtitle, children: flowSubtitle || t("signup.subheading") })
10656
+ return /* @__PURE__ */ jsxs31(Card_default, { className: cx21(containerClasses, styles.card), variant, children: [
10657
+ (showTitle || showSubtitle) && /* @__PURE__ */ jsxs31(Card_default.Header, { className: styles.header, children: [
10658
+ showTitle && /* @__PURE__ */ jsx77(Card_default.Title, { level: 2, className: styles.title, children: flowTitle || t("signup.heading") }),
10659
+ showSubtitle && /* @__PURE__ */ jsx77(Typography_default, { variant: "body1", className: styles.subtitle, children: flowSubtitle || t("signup.subheading") })
10336
10660
  ] }),
10337
- /* @__PURE__ */ jsxs29(Card_default.Content, { children: [
10338
- flowMessages && flowMessages.length > 0 && /* @__PURE__ */ jsx73("div", { className: styles.flowMessagesContainer, children: flowMessages.map((message, index) => /* @__PURE__ */ jsx73(
10661
+ /* @__PURE__ */ jsxs31(Card_default.Content, { children: [
10662
+ flowMessages && flowMessages.length > 0 && /* @__PURE__ */ jsx77("div", { className: styles.flowMessagesContainer, children: flowMessages.map((message, index) => /* @__PURE__ */ jsx77(
10339
10663
  Alert_default,
10340
10664
  {
10341
10665
  variant: message.type?.toLowerCase() === "error" ? "error" : "info",
10342
10666
  className: cx21(styles.flowMessageItem, messageClasses),
10343
- children: /* @__PURE__ */ jsx73(Alert_default.Description, { children: message.message })
10667
+ children: /* @__PURE__ */ jsx77(Alert_default.Description, { children: message.message })
10344
10668
  },
10345
10669
  message.id || index
10346
10670
  )) }),
10347
- /* @__PURE__ */ jsx73("div", { className: styles.contentContainer, children: currentFlow.data?.components && currentFlow.data.components.length > 0 ? renderComponents(currentFlow.data.components) : /* @__PURE__ */ jsx73(Alert_default, { variant: "warning", children: /* @__PURE__ */ jsx73(Typography_default, { variant: "body1", children: t("errors.signup.components.not.available") }) }) })
10671
+ /* @__PURE__ */ jsx77("div", { className: styles.contentContainer, children: currentFlow.data?.components && currentFlow.data.components.length > 0 ? renderComponents(currentFlow.data.components) : /* @__PURE__ */ jsx77(Alert_default, { variant: "warning", children: /* @__PURE__ */ jsx77(Typography_default, { variant: "body1", children: t("errors.signup.components.not.available") }) }) })
10348
10672
  ] })
10349
10673
  ] });
10350
10674
  };
10351
10675
  var BaseSignUp = ({ showLogo = true, ...rest }) => {
10352
10676
  const { theme, colorScheme } = useTheme_default();
10353
10677
  const styles = BaseSignUp_styles_default(theme, colorScheme);
10354
- return /* @__PURE__ */ jsxs29("div", { children: [
10355
- showLogo && /* @__PURE__ */ jsx73("div", { className: styles.logoContainer, children: /* @__PURE__ */ jsx73(Logo_default, { size: "large" }) }),
10356
- /* @__PURE__ */ jsx73(FlowProvider_default, { children: /* @__PURE__ */ jsx73(BaseSignUpContent, { showLogo, ...rest }) })
10678
+ return /* @__PURE__ */ jsxs31("div", { children: [
10679
+ showLogo && /* @__PURE__ */ jsx77("div", { className: styles.logoContainer, children: /* @__PURE__ */ jsx77(Logo_default, { size: "large" }) }),
10680
+ /* @__PURE__ */ jsx77(FlowProvider_default, { children: /* @__PURE__ */ jsx77(BaseSignUpContent, { showLogo, ...rest }) })
10357
10681
  ] });
10358
10682
  };
10359
10683
  var BaseSignUp_default = BaseSignUp;
@@ -10367,8 +10691,8 @@ import {
10367
10691
  createPackageComponentLogger as createPackageComponentLogger7
10368
10692
  } from "@asgardeo/browser";
10369
10693
  import { cx as cx22 } from "@emotion/css";
10370
- import { useEffect as useEffect18, useState as useState19, useCallback as useCallback13, useRef as useRef9 } from "react";
10371
- import { jsx as jsx74, jsxs as jsxs30 } from "react/jsx-runtime";
10694
+ import { useEffect as useEffect19, useState as useState20, useCallback as useCallback13, useRef as useRef9 } from "react";
10695
+ import { jsx as jsx78, jsxs as jsxs32 } from "react/jsx-runtime";
10372
10696
  var logger7 = createPackageComponentLogger7(
10373
10697
  "@asgardeo/react",
10374
10698
  "BaseSignUp"
@@ -10398,11 +10722,11 @@ var BaseSignUpContent2 = ({
10398
10722
  const { subtitle: flowSubtitle, title: flowTitle, messages: flowMessages, addMessage, clearMessages } = useFlow_default();
10399
10723
  const { meta } = useAsgardeo_default();
10400
10724
  const styles = BaseSignUp_styles_default(theme, colorScheme);
10401
- const [isLoading, setIsLoading] = useState19(false);
10402
- const [isFlowInitialized, setIsFlowInitialized] = useState19(false);
10403
- const [currentFlow, setCurrentFlow] = useState19(null);
10404
- const [apiError, setApiError] = useState19(null);
10405
- const [passkeyState, setPasskeyState] = useState19({
10725
+ const [isLoading, setIsLoading] = useState20(false);
10726
+ const [isFlowInitialized, setIsFlowInitialized] = useState20(false);
10727
+ const [currentFlow, setCurrentFlow] = useState20(null);
10728
+ const [apiError, setApiError] = useState20(null);
10729
+ const [passkeyState, setPasskeyState] = useState20({
10406
10730
  actionId: null,
10407
10731
  creationOptions: null,
10408
10732
  error: null,
@@ -10703,7 +11027,7 @@ var BaseSignUpContent2 = ({
10703
11027
  setIsLoading(false);
10704
11028
  }
10705
11029
  };
10706
- useEffect18(() => {
11030
+ useEffect19(() => {
10707
11031
  if (!passkeyState.isActive || !passkeyState.creationOptions || !passkeyState.flowId) {
10708
11032
  return;
10709
11033
  }
@@ -10809,7 +11133,7 @@ var BaseSignUpContent2 = ({
10809
11133
  state: urlParams.get("state")
10810
11134
  };
10811
11135
  };
10812
- useEffect18(() => {
11136
+ useEffect19(() => {
10813
11137
  const urlParams = getUrlParams2();
10814
11138
  if (urlParams.code || urlParams.state) {
10815
11139
  return;
@@ -10872,15 +11196,15 @@ var BaseSignUpContent2 = ({
10872
11196
  },
10873
11197
  values: formValues
10874
11198
  };
10875
- return /* @__PURE__ */ jsx74("div", { className: containerClasses, children: children(renderProps) });
11199
+ return /* @__PURE__ */ jsx78("div", { className: containerClasses, children: children(renderProps) });
10876
11200
  }
10877
11201
  if (!isFlowInitialized && isLoading) {
10878
- return /* @__PURE__ */ jsx74(Card_default, { className: cx22(containerClasses, styles.card), variant, children: /* @__PURE__ */ jsx74(Card_default.Content, { children: /* @__PURE__ */ jsx74("div", { className: styles.loadingContainer, children: /* @__PURE__ */ jsx74(Spinner_default, { size: "medium" }) }) }) });
11202
+ return /* @__PURE__ */ jsx78(Card_default, { className: cx22(containerClasses, styles.card), variant, children: /* @__PURE__ */ jsx78(Card_default.Content, { children: /* @__PURE__ */ jsx78("div", { className: styles.loadingContainer, children: /* @__PURE__ */ jsx78(Spinner_default, { size: "medium" }) }) }) });
10879
11203
  }
10880
11204
  if (!currentFlow) {
10881
- return /* @__PURE__ */ jsx74(Card_default, { className: cx22(containerClasses, styles.card), variant, children: /* @__PURE__ */ jsx74(Card_default.Content, { children: /* @__PURE__ */ jsxs30(Alert_default, { variant: "error", className: errorClasses, children: [
10882
- /* @__PURE__ */ jsx74(Alert_default.Title, { children: t("errors.heading") }),
10883
- /* @__PURE__ */ jsx74(Alert_default.Description, { children: t("errors.signup.flow.initialization.failure") })
11205
+ return /* @__PURE__ */ jsx78(Card_default, { className: cx22(containerClasses, styles.card), variant, children: /* @__PURE__ */ jsx78(Card_default.Content, { children: /* @__PURE__ */ jsxs32(Alert_default, { variant: "error", className: errorClasses, children: [
11206
+ /* @__PURE__ */ jsx78(Alert_default.Title, { children: t("errors.heading") }),
11207
+ /* @__PURE__ */ jsx78(Alert_default.Description, { children: t("errors.signup.flow.initialization.failure") })
10884
11208
  ] }) }) });
10885
11209
  }
10886
11210
  const componentsToRender = currentFlow.data?.components || [];
@@ -10891,46 +11215,46 @@ var BaseSignUpContent2 = ({
10891
11215
  t("signup.heading"),
10892
11216
  t("signup.subheading")
10893
11217
  );
10894
- return /* @__PURE__ */ jsxs30(Card_default, { className: cx22(containerClasses, styles.card), variant, children: [
10895
- (showTitle || showSubtitle) && /* @__PURE__ */ jsxs30(Card_default.Header, { className: styles.header, children: [
10896
- showTitle && /* @__PURE__ */ jsx74(Card_default.Title, { level: 2, className: styles.title, children: title }),
10897
- showSubtitle && /* @__PURE__ */ jsx74(Typography_default, { variant: "body1", className: styles.subtitle, children: subtitle })
11218
+ return /* @__PURE__ */ jsxs32(Card_default, { className: cx22(containerClasses, styles.card), variant, children: [
11219
+ (showTitle || showSubtitle) && /* @__PURE__ */ jsxs32(Card_default.Header, { className: styles.header, children: [
11220
+ showTitle && /* @__PURE__ */ jsx78(Card_default.Title, { level: 2, className: styles.title, children: title }),
11221
+ showSubtitle && /* @__PURE__ */ jsx78(Typography_default, { variant: "body1", className: styles.subtitle, children: subtitle })
10898
11222
  ] }),
10899
- /* @__PURE__ */ jsxs30(Card_default.Content, { children: [
10900
- externalError && /* @__PURE__ */ jsx74("div", { className: styles.flowMessagesContainer, children: /* @__PURE__ */ jsx74(Alert_default, { variant: "error", className: cx22(styles.flowMessageItem, messageClasses), children: /* @__PURE__ */ jsx74(Alert_default.Description, { children: externalError.message }) }) }),
10901
- flowMessages && flowMessages.length > 0 && /* @__PURE__ */ jsx74("div", { className: styles.flowMessagesContainer, children: flowMessages.map((message, index) => /* @__PURE__ */ jsx74(
11223
+ /* @__PURE__ */ jsxs32(Card_default.Content, { children: [
11224
+ externalError && /* @__PURE__ */ jsx78("div", { className: styles.flowMessagesContainer, children: /* @__PURE__ */ jsx78(Alert_default, { variant: "error", className: cx22(styles.flowMessageItem, messageClasses), children: /* @__PURE__ */ jsx78(Alert_default.Description, { children: externalError.message }) }) }),
11225
+ flowMessages && flowMessages.length > 0 && /* @__PURE__ */ jsx78("div", { className: styles.flowMessagesContainer, children: flowMessages.map((message, index) => /* @__PURE__ */ jsx78(
10902
11226
  Alert_default,
10903
11227
  {
10904
11228
  variant: message.type?.toLowerCase() === "error" ? "error" : "info",
10905
11229
  className: cx22(styles.flowMessageItem, messageClasses),
10906
- children: /* @__PURE__ */ jsx74(Alert_default.Description, { children: message.message })
11230
+ children: /* @__PURE__ */ jsx78(Alert_default.Description, { children: message.message })
10907
11231
  },
10908
11232
  message.id || index
10909
11233
  )) }),
10910
- /* @__PURE__ */ jsx74("div", { className: styles.contentContainer, children: componentsWithoutHeadings && componentsWithoutHeadings.length > 0 ? renderComponents(componentsWithoutHeadings) : /* @__PURE__ */ jsx74(Alert_default, { variant: "warning", children: /* @__PURE__ */ jsx74(Typography_default, { variant: "body1", children: t("errors.signup.components.not.available") }) }) })
11234
+ /* @__PURE__ */ jsx78("div", { className: styles.contentContainer, children: componentsWithoutHeadings && componentsWithoutHeadings.length > 0 ? renderComponents(componentsWithoutHeadings) : /* @__PURE__ */ jsx78(Alert_default, { variant: "warning", children: /* @__PURE__ */ jsx78(Typography_default, { variant: "body1", children: t("errors.signup.components.not.available") }) }) })
10911
11235
  ] })
10912
11236
  ] });
10913
11237
  };
10914
11238
  var BaseSignUp2 = ({ preferences, showLogo = true, ...rest }) => {
10915
11239
  const { theme, colorScheme } = useTheme_default();
10916
11240
  const styles = BaseSignUp_styles_default(theme, colorScheme);
10917
- const content = /* @__PURE__ */ jsxs30("div", { children: [
10918
- showLogo && /* @__PURE__ */ jsx74("div", { className: styles.logoContainer, children: /* @__PURE__ */ jsx74(Logo_default, { size: "large" }) }),
10919
- /* @__PURE__ */ jsx74(FlowProvider_default, { children: /* @__PURE__ */ jsx74(BaseSignUpContent2, { showLogo, ...rest }) })
11241
+ const content = /* @__PURE__ */ jsxs32("div", { children: [
11242
+ showLogo && /* @__PURE__ */ jsx78("div", { className: styles.logoContainer, children: /* @__PURE__ */ jsx78(Logo_default, { size: "large" }) }),
11243
+ /* @__PURE__ */ jsx78(FlowProvider_default, { children: /* @__PURE__ */ jsx78(BaseSignUpContent2, { showLogo, ...rest }) })
10920
11244
  ] });
10921
11245
  if (!preferences) return content;
10922
- return /* @__PURE__ */ jsx74(ComponentPreferencesContext_default.Provider, { value: preferences, children: content });
11246
+ return /* @__PURE__ */ jsx78(ComponentPreferencesContext_default.Provider, { value: preferences, children: content });
10923
11247
  };
10924
11248
  var BaseSignUp_default2 = BaseSignUp2;
10925
11249
 
10926
11250
  // src/components/presentation/auth/SignUp/BaseSignUp.tsx
10927
- import { jsx as jsx75 } from "react/jsx-runtime";
11251
+ import { jsx as jsx79 } from "react/jsx-runtime";
10928
11252
  var BaseSignUp3 = (props) => {
10929
11253
  const { platform } = useAsgardeo_default();
10930
11254
  if (platform === Platform6.AsgardeoV2) {
10931
- return /* @__PURE__ */ jsx75(BaseSignUp_default2, { ...props });
11255
+ return /* @__PURE__ */ jsx79(BaseSignUp_default2, { ...props });
10932
11256
  }
10933
- return /* @__PURE__ */ jsx75(BaseSignUp_default, { ...props });
11257
+ return /* @__PURE__ */ jsx79(BaseSignUp_default, { ...props });
10934
11258
  };
10935
11259
  var BaseSignUp_default3 = BaseSignUp3;
10936
11260
 
@@ -10942,7 +11266,7 @@ import {
10942
11266
  EmbeddedFlowResponseType as EmbeddedFlowResponseType3,
10943
11267
  EmbeddedFlowType as EmbeddedFlowType2
10944
11268
  } from "@asgardeo/browser";
10945
- import { jsx as jsx76 } from "react/jsx-runtime";
11269
+ import { jsx as jsx80 } from "react/jsx-runtime";
10946
11270
  var SignUp = ({
10947
11271
  className,
10948
11272
  size = "medium",
@@ -10971,7 +11295,7 @@ var SignUp = ({
10971
11295
  window.location.href = response.data.redirectURL;
10972
11296
  }
10973
11297
  };
10974
- return /* @__PURE__ */ jsx76(
11298
+ return /* @__PURE__ */ jsx80(
10975
11299
  BaseSignUp_default,
10976
11300
  {
10977
11301
  afterSignUpUrl,
@@ -10997,7 +11321,7 @@ import {
10997
11321
  EmbeddedFlowResponseType as EmbeddedFlowResponseType4,
10998
11322
  EmbeddedFlowType as EmbeddedFlowType3
10999
11323
  } from "@asgardeo/browser";
11000
- import { jsx as jsx77 } from "react/jsx-runtime";
11324
+ import { jsx as jsx81 } from "react/jsx-runtime";
11001
11325
  var SignUp2 = ({
11002
11326
  className,
11003
11327
  size = "medium",
@@ -11035,7 +11359,7 @@ var SignUp2 = ({
11035
11359
  window.location.href = response.data.redirectURL;
11036
11360
  }
11037
11361
  };
11038
- return /* @__PURE__ */ jsx77(
11362
+ return /* @__PURE__ */ jsx81(
11039
11363
  BaseSignUp_default2,
11040
11364
  {
11041
11365
  afterSignUpUrl,
@@ -11057,13 +11381,13 @@ var SignUp2 = ({
11057
11381
  var SignUp_default2 = SignUp2;
11058
11382
 
11059
11383
  // src/components/presentation/auth/SignUp/SignUp.tsx
11060
- import { jsx as jsx78 } from "react/jsx-runtime";
11384
+ import { jsx as jsx82 } from "react/jsx-runtime";
11061
11385
  var SignUp3 = (props) => {
11062
11386
  const { platform } = useAsgardeo_default();
11063
11387
  if (platform === Platform7.AsgardeoV2) {
11064
- return /* @__PURE__ */ jsx78(SignUp_default2, { ...props });
11388
+ return /* @__PURE__ */ jsx82(SignUp_default2, { ...props });
11065
11389
  }
11066
- return /* @__PURE__ */ jsx78(SignUp_default, { ...props });
11390
+ return /* @__PURE__ */ jsx82(SignUp_default, { ...props });
11067
11391
  };
11068
11392
  var SignUp_default3 = SignUp3;
11069
11393
 
@@ -11073,7 +11397,7 @@ import { EmbeddedFlowType as EmbeddedFlowType5 } from "@asgardeo/browser";
11073
11397
  // src/components/presentation/auth/InviteUser/v2/BaseInviteUser.tsx
11074
11398
  import { EmbeddedFlowType as EmbeddedFlowType4 } from "@asgardeo/browser";
11075
11399
  import { cx as cx23 } from "@emotion/css";
11076
- import { useCallback as useCallback14, useEffect as useEffect19, useRef as useRef10, useState as useState20 } from "react";
11400
+ import { useCallback as useCallback14, useEffect as useEffect20, useRef as useRef10, useState as useState21 } from "react";
11077
11401
 
11078
11402
  // src/components/presentation/auth/InviteUser/v2/BaseInviteUser.styles.ts
11079
11403
  import { css as css19 } from "@emotion/css";
@@ -11116,7 +11440,7 @@ var useStyles18 = (theme, colorScheme) => useMemo26(() => {
11116
11440
  var BaseInviteUser_styles_default = useStyles18;
11117
11441
 
11118
11442
  // src/components/presentation/auth/InviteUser/v2/BaseInviteUser.tsx
11119
- import { jsx as jsx79, jsxs as jsxs31 } from "react/jsx-runtime";
11443
+ import { jsx as jsx83, jsxs as jsxs33 } from "react/jsx-runtime";
11120
11444
  var BaseInviteUser = ({
11121
11445
  onInitialize,
11122
11446
  onSubmit,
@@ -11136,16 +11460,16 @@ var BaseInviteUser = ({
11136
11460
  const { t } = useTranslation_default(preferences?.i18n);
11137
11461
  const { theme } = useTheme_default();
11138
11462
  const styles = BaseInviteUser_styles_default(theme, theme.vars.colors.text.primary);
11139
- const [isLoading, setIsLoading] = useState20(false);
11140
- const [isFlowInitialized, setIsFlowInitialized] = useState20(false);
11141
- const [currentFlow, setCurrentFlow] = useState20(null);
11142
- const [apiError, setApiError] = useState20(null);
11143
- const [formValues, setFormValues] = useState20({});
11144
- const [formErrors, setFormErrors] = useState20({});
11145
- const [touchedFields, setTouchedFields] = useState20({});
11146
- const [inviteLink, setInviteLink] = useState20();
11147
- const [inviteLinkCopied, setInviteLinkCopied] = useState20(false);
11148
- const [isFormValid, setIsFormValid] = useState20(true);
11463
+ const [isLoading, setIsLoading] = useState21(false);
11464
+ const [isFlowInitialized, setIsFlowInitialized] = useState21(false);
11465
+ const [currentFlow, setCurrentFlow] = useState21(null);
11466
+ const [apiError, setApiError] = useState21(null);
11467
+ const [formValues, setFormValues] = useState21({});
11468
+ const [formErrors, setFormErrors] = useState21({});
11469
+ const [touchedFields, setTouchedFields] = useState21({});
11470
+ const [inviteLink, setInviteLink] = useState21();
11471
+ const [inviteLinkCopied, setInviteLinkCopied] = useState21(false);
11472
+ const [isFormValid, setIsFormValid] = useState21(true);
11149
11473
  const initializationAttemptedRef = useRef10(false);
11150
11474
  const handleError = useCallback14(
11151
11475
  (error) => {
@@ -11309,7 +11633,7 @@ var BaseInviteUser = ({
11309
11633
  setInviteLinkCopied(false);
11310
11634
  initializationAttemptedRef.current = false;
11311
11635
  }, []);
11312
- useEffect19(() => {
11636
+ useEffect20(() => {
11313
11637
  if (isInitialized && !isFlowInitialized && !initializationAttemptedRef.current) {
11314
11638
  initializationAttemptedRef.current = true;
11315
11639
  (async () => {
@@ -11336,7 +11660,7 @@ var BaseInviteUser = ({
11336
11660
  })();
11337
11661
  }
11338
11662
  }, [isInitialized, isFlowInitialized, onInitialize, onFlowChange, handleError, normalizeFlowResponseLocal]);
11339
- useEffect19(() => {
11663
+ useEffect20(() => {
11340
11664
  if (currentFlow && isFlowInitialized) {
11341
11665
  const components2 = currentFlow.data?.components || [];
11342
11666
  if (components2.length > 0) {
@@ -11420,28 +11744,28 @@ var BaseInviteUser = ({
11420
11744
  values: formValues
11421
11745
  };
11422
11746
  if (children) {
11423
- return /* @__PURE__ */ jsx79("div", { className, children: children(renderProps) });
11747
+ return /* @__PURE__ */ jsx83("div", { className, children: children(renderProps) });
11424
11748
  }
11425
11749
  if (!isInitialized) {
11426
- return /* @__PURE__ */ jsx79(Card_default, { className: cx23(className, styles.card), variant, children: /* @__PURE__ */ jsx79(Card_default.Content, { children: /* @__PURE__ */ jsx79("div", { style: { display: "flex", justifyContent: "center", padding: "2rem" }, children: /* @__PURE__ */ jsx79(Spinner_default, { size: "medium" }) }) }) });
11750
+ return /* @__PURE__ */ jsx83(Card_default, { className: cx23(className, styles.card), variant, children: /* @__PURE__ */ jsx83(Card_default.Content, { children: /* @__PURE__ */ jsx83("div", { style: { display: "flex", justifyContent: "center", padding: "2rem" }, children: /* @__PURE__ */ jsx83(Spinner_default, { size: "medium" }) }) }) });
11427
11751
  }
11428
11752
  if (!isFlowInitialized && isLoading) {
11429
- return /* @__PURE__ */ jsx79(Card_default, { className: cx23(className, styles.card), variant, children: /* @__PURE__ */ jsx79(Card_default.Content, { children: /* @__PURE__ */ jsx79("div", { style: { display: "flex", justifyContent: "center", padding: "2rem" }, children: /* @__PURE__ */ jsx79(Spinner_default, { size: "medium" }) }) }) });
11753
+ return /* @__PURE__ */ jsx83(Card_default, { className: cx23(className, styles.card), variant, children: /* @__PURE__ */ jsx83(Card_default.Content, { children: /* @__PURE__ */ jsx83("div", { style: { display: "flex", justifyContent: "center", padding: "2rem" }, children: /* @__PURE__ */ jsx83(Spinner_default, { size: "medium" }) }) }) });
11430
11754
  }
11431
11755
  if (!currentFlow && apiError) {
11432
- return /* @__PURE__ */ jsx79(Card_default, { className: cx23(className, styles.card), variant, children: /* @__PURE__ */ jsx79(Card_default.Content, { children: /* @__PURE__ */ jsxs31(Alert_default, { variant: "error", children: [
11433
- /* @__PURE__ */ jsx79(Alert_default.Title, { children: "Error" }),
11434
- /* @__PURE__ */ jsx79(Alert_default.Description, { children: apiError.message })
11756
+ return /* @__PURE__ */ jsx83(Card_default, { className: cx23(className, styles.card), variant, children: /* @__PURE__ */ jsx83(Card_default.Content, { children: /* @__PURE__ */ jsxs33(Alert_default, { variant: "error", children: [
11757
+ /* @__PURE__ */ jsx83(Alert_default.Title, { children: "Error" }),
11758
+ /* @__PURE__ */ jsx83(Alert_default.Description, { children: apiError.message })
11435
11759
  ] }) }) });
11436
11760
  }
11437
11761
  if (isInviteGenerated && inviteLink) {
11438
- return /* @__PURE__ */ jsxs31(Card_default, { className: cx23(className, styles.card), variant, children: [
11439
- /* @__PURE__ */ jsx79(Card_default.Header, { className: styles.header, children: /* @__PURE__ */ jsx79(Card_default.Title, { level: 2, className: styles.title, children: "Invite Link Generated!" }) }),
11440
- /* @__PURE__ */ jsxs31(Card_default.Content, { children: [
11441
- /* @__PURE__ */ jsx79(Alert_default, { variant: "success", children: /* @__PURE__ */ jsx79(Alert_default.Description, { children: "Share this link with the user to complete their registration." }) }),
11442
- /* @__PURE__ */ jsxs31("div", { style: { marginTop: "1rem" }, children: [
11443
- /* @__PURE__ */ jsx79(Typography_default, { variant: "body2", style: { marginBottom: "0.5rem" }, children: "Invite Link" }),
11444
- /* @__PURE__ */ jsxs31(
11762
+ return /* @__PURE__ */ jsxs33(Card_default, { className: cx23(className, styles.card), variant, children: [
11763
+ /* @__PURE__ */ jsx83(Card_default.Header, { className: styles.header, children: /* @__PURE__ */ jsx83(Card_default.Title, { level: 2, className: styles.title, children: "Invite Link Generated!" }) }),
11764
+ /* @__PURE__ */ jsxs33(Card_default.Content, { children: [
11765
+ /* @__PURE__ */ jsx83(Alert_default, { variant: "success", children: /* @__PURE__ */ jsx83(Alert_default.Description, { children: "Share this link with the user to complete their registration." }) }),
11766
+ /* @__PURE__ */ jsxs33("div", { style: { marginTop: "1rem" }, children: [
11767
+ /* @__PURE__ */ jsx83(Typography_default, { variant: "body2", style: { marginBottom: "0.5rem" }, children: "Invite Link" }),
11768
+ /* @__PURE__ */ jsxs33(
11445
11769
  "div",
11446
11770
  {
11447
11771
  style: {
@@ -11454,26 +11778,26 @@ var BaseInviteUser = ({
11454
11778
  wordBreak: "break-all"
11455
11779
  },
11456
11780
  children: [
11457
- /* @__PURE__ */ jsx79(Typography_default, { variant: "body2", style: { flex: 1 }, children: inviteLink }),
11458
- /* @__PURE__ */ jsx79(Button_default, { variant: "outline", size: "small", onClick: copyInviteLink, children: inviteLinkCopied ? "Copied!" : "Copy" })
11781
+ /* @__PURE__ */ jsx83(Typography_default, { variant: "body2", style: { flex: 1 }, children: inviteLink }),
11782
+ /* @__PURE__ */ jsx83(Button_default, { variant: "outline", size: "small", onClick: copyInviteLink, children: inviteLinkCopied ? "Copied!" : "Copy" })
11459
11783
  ]
11460
11784
  }
11461
11785
  )
11462
11786
  ] }),
11463
- /* @__PURE__ */ jsx79("div", { style: { display: "flex", gap: "0.5rem", marginTop: "1.5rem" }, children: /* @__PURE__ */ jsx79(Button_default, { variant: "outline", onClick: resetFlow, children: "Invite Another User" }) })
11787
+ /* @__PURE__ */ jsx83("div", { style: { display: "flex", gap: "0.5rem", marginTop: "1.5rem" }, children: /* @__PURE__ */ jsx83(Button_default, { variant: "outline", onClick: resetFlow, children: "Invite Another User" }) })
11464
11788
  ] })
11465
11789
  ] });
11466
11790
  }
11467
- return /* @__PURE__ */ jsxs31(Card_default, { className: cx23(className, styles.card), variant, children: [
11468
- (showTitle || showSubtitle) && (title || subtitle) && /* @__PURE__ */ jsxs31(Card_default.Header, { className: styles.header, children: [
11469
- showTitle && title && /* @__PURE__ */ jsx79(Card_default.Title, { level: 2, className: styles.title, children: title }),
11470
- showSubtitle && subtitle && /* @__PURE__ */ jsx79(Typography_default, { variant: "body1", className: styles.subtitle, children: subtitle })
11791
+ return /* @__PURE__ */ jsxs33(Card_default, { className: cx23(className, styles.card), variant, children: [
11792
+ (showTitle || showSubtitle) && (title || subtitle) && /* @__PURE__ */ jsxs33(Card_default.Header, { className: styles.header, children: [
11793
+ showTitle && title && /* @__PURE__ */ jsx83(Card_default.Title, { level: 2, className: styles.title, children: title }),
11794
+ showSubtitle && subtitle && /* @__PURE__ */ jsx83(Typography_default, { variant: "body1", className: styles.subtitle, children: subtitle })
11471
11795
  ] }),
11472
- /* @__PURE__ */ jsxs31(Card_default.Content, { children: [
11473
- apiError && /* @__PURE__ */ jsx79("div", { style: { marginBottom: "1rem" }, children: /* @__PURE__ */ jsx79(Alert_default, { variant: "error", children: /* @__PURE__ */ jsx79(Alert_default.Description, { children: apiError.message }) }) }),
11474
- /* @__PURE__ */ jsxs31("div", { children: [
11475
- componentsWithoutHeadings && componentsWithoutHeadings.length > 0 ? renderComponents(componentsWithoutHeadings) : !isLoading && /* @__PURE__ */ jsx79(Alert_default, { variant: "warning", children: /* @__PURE__ */ jsx79(Typography_default, { variant: "body1", children: "No form components available" }) }),
11476
- isLoading && /* @__PURE__ */ jsx79("div", { style: { display: "flex", justifyContent: "center", padding: "1rem" }, children: /* @__PURE__ */ jsx79(Spinner_default, { size: "small" }) })
11796
+ /* @__PURE__ */ jsxs33(Card_default.Content, { children: [
11797
+ apiError && /* @__PURE__ */ jsx83("div", { style: { marginBottom: "1rem" }, children: /* @__PURE__ */ jsx83(Alert_default, { variant: "error", children: /* @__PURE__ */ jsx83(Alert_default.Description, { children: apiError.message }) }) }),
11798
+ /* @__PURE__ */ jsxs33("div", { children: [
11799
+ componentsWithoutHeadings && componentsWithoutHeadings.length > 0 ? renderComponents(componentsWithoutHeadings) : !isLoading && /* @__PURE__ */ jsx83(Alert_default, { variant: "warning", children: /* @__PURE__ */ jsx83(Typography_default, { variant: "body1", children: "No form components available" }) }),
11800
+ isLoading && /* @__PURE__ */ jsx83("div", { style: { display: "flex", justifyContent: "center", padding: "1rem" }, children: /* @__PURE__ */ jsx83(Spinner_default, { size: "small" }) })
11477
11801
  ] })
11478
11802
  ] })
11479
11803
  ] });
@@ -11481,7 +11805,7 @@ var BaseInviteUser = ({
11481
11805
  var BaseInviteUser_default = BaseInviteUser;
11482
11806
 
11483
11807
  // src/components/presentation/auth/InviteUser/v2/InviteUser.tsx
11484
- import { jsx as jsx80 } from "react/jsx-runtime";
11808
+ import { jsx as jsx84 } from "react/jsx-runtime";
11485
11809
  var InviteUser = ({
11486
11810
  onInviteLinkGenerated,
11487
11811
  onError,
@@ -11525,7 +11849,7 @@ var InviteUser = ({
11525
11849
  });
11526
11850
  return response.data;
11527
11851
  };
11528
- return /* @__PURE__ */ jsx80(
11852
+ return /* @__PURE__ */ jsx84(
11529
11853
  BaseInviteUser_default,
11530
11854
  {
11531
11855
  onInitialize: handleInitialize,
@@ -11550,7 +11874,7 @@ import { useMemo as useMemo28 } from "react";
11550
11874
 
11551
11875
  // src/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.tsx
11552
11876
  import { cx as cx24 } from "@emotion/css";
11553
- import { useCallback as useCallback15, useEffect as useEffect20, useRef as useRef11, useState as useState21 } from "react";
11877
+ import { useCallback as useCallback15, useEffect as useEffect21, useRef as useRef11, useState as useState22 } from "react";
11554
11878
 
11555
11879
  // src/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.styles.ts
11556
11880
  import { css as css20 } from "@emotion/css";
@@ -11593,7 +11917,7 @@ var useStyles19 = (theme, colorScheme) => useMemo27(() => {
11593
11917
  var BaseAcceptInvite_styles_default = useStyles19;
11594
11918
 
11595
11919
  // src/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.tsx
11596
- import { jsx as jsx81, jsxs as jsxs32 } from "react/jsx-runtime";
11920
+ import { jsx as jsx85, jsxs as jsxs34 } from "react/jsx-runtime";
11597
11921
  var BaseAcceptInvite = ({
11598
11922
  flowId,
11599
11923
  inviteToken,
@@ -11614,17 +11938,17 @@ var BaseAcceptInvite = ({
11614
11938
  const { t } = useTranslation_default(preferences?.i18n);
11615
11939
  const { theme } = useTheme_default();
11616
11940
  const styles = BaseAcceptInvite_styles_default(theme, theme.vars.colors.text.primary);
11617
- const [isLoading, setIsLoading] = useState21(false);
11618
- const [isValidatingToken, setIsValidatingToken] = useState21(true);
11619
- const [isTokenInvalid, setIsTokenInvalid] = useState21(false);
11620
- const [isComplete, setIsComplete] = useState21(false);
11621
- const [currentFlow, setCurrentFlow] = useState21(null);
11622
- const [apiError, setApiError] = useState21(null);
11623
- const [formValues, setFormValues] = useState21({});
11624
- const [formErrors, setFormErrors] = useState21({});
11625
- const [touchedFields, setTouchedFields] = useState21({});
11626
- const [isFormValid, setIsFormValid] = useState21(true);
11627
- const [completionTitle, setCompletionTitle] = useState21(void 0);
11941
+ const [isLoading, setIsLoading] = useState22(false);
11942
+ const [isValidatingToken, setIsValidatingToken] = useState22(true);
11943
+ const [isTokenInvalid, setIsTokenInvalid] = useState22(false);
11944
+ const [isComplete, setIsComplete] = useState22(false);
11945
+ const [currentFlow, setCurrentFlow] = useState22(null);
11946
+ const [apiError, setApiError] = useState22(null);
11947
+ const [formValues, setFormValues] = useState22({});
11948
+ const [formErrors, setFormErrors] = useState22({});
11949
+ const [touchedFields, setTouchedFields] = useState22({});
11950
+ const [isFormValid, setIsFormValid] = useState22(true);
11951
+ const [completionTitle, setCompletionTitle] = useState22(void 0);
11628
11952
  const tokenValidationAttemptedRef = useRef11(false);
11629
11953
  const handleError = useCallback15(
11630
11954
  (error) => {
@@ -11805,7 +12129,7 @@ var BaseAcceptInvite = ({
11805
12129
  normalizeFlowResponseLocal
11806
12130
  ]
11807
12131
  );
11808
- useEffect20(() => {
12132
+ useEffect21(() => {
11809
12133
  if (tokenValidationAttemptedRef.current) {
11810
12134
  return;
11811
12135
  }
@@ -11922,50 +12246,50 @@ var BaseAcceptInvite = ({
11922
12246
  values: formValues
11923
12247
  };
11924
12248
  if (children) {
11925
- return /* @__PURE__ */ jsx81("div", { className, children: children(renderProps) });
12249
+ return /* @__PURE__ */ jsx85("div", { className, children: children(renderProps) });
11926
12250
  }
11927
12251
  if (isValidatingToken) {
11928
- return /* @__PURE__ */ jsx81(Card_default, { className: cx24(className, styles.card), variant, children: /* @__PURE__ */ jsx81(Card_default.Content, { children: /* @__PURE__ */ jsxs32("div", { style: { alignItems: "center", display: "flex", flexDirection: "column", gap: "1rem", padding: "2rem" }, children: [
11929
- /* @__PURE__ */ jsx81(Spinner_default, { size: "medium" }),
11930
- /* @__PURE__ */ jsx81(Typography_default, { variant: "body1", children: "Validating your invite link..." })
12252
+ return /* @__PURE__ */ jsx85(Card_default, { className: cx24(className, styles.card), variant, children: /* @__PURE__ */ jsx85(Card_default.Content, { children: /* @__PURE__ */ jsxs34("div", { style: { alignItems: "center", display: "flex", flexDirection: "column", gap: "1rem", padding: "2rem" }, children: [
12253
+ /* @__PURE__ */ jsx85(Spinner_default, { size: "medium" }),
12254
+ /* @__PURE__ */ jsx85(Typography_default, { variant: "body1", children: "Validating your invite link..." })
11931
12255
  ] }) }) });
11932
12256
  }
11933
12257
  if (isTokenInvalid) {
11934
- return /* @__PURE__ */ jsxs32(Card_default, { className: cx24(className, styles.card), variant, children: [
11935
- /* @__PURE__ */ jsx81(Card_default.Header, { className: styles.header, children: /* @__PURE__ */ jsx81(Card_default.Title, { level: 2, className: styles.title, children: "Invalid Invite Link" }) }),
11936
- /* @__PURE__ */ jsxs32(Card_default.Content, { children: [
11937
- /* @__PURE__ */ jsxs32(Alert_default, { variant: "error", children: [
11938
- /* @__PURE__ */ jsx81(Alert_default.Title, { children: "Unable to verify invite" }),
11939
- /* @__PURE__ */ jsx81(Alert_default.Description, { children: apiError?.message || "This invite link is invalid or has expired. Please contact your administrator for a new invite." })
12258
+ return /* @__PURE__ */ jsxs34(Card_default, { className: cx24(className, styles.card), variant, children: [
12259
+ /* @__PURE__ */ jsx85(Card_default.Header, { className: styles.header, children: /* @__PURE__ */ jsx85(Card_default.Title, { level: 2, className: styles.title, children: "Invalid Invite Link" }) }),
12260
+ /* @__PURE__ */ jsxs34(Card_default.Content, { children: [
12261
+ /* @__PURE__ */ jsxs34(Alert_default, { variant: "error", children: [
12262
+ /* @__PURE__ */ jsx85(Alert_default.Title, { children: "Unable to verify invite" }),
12263
+ /* @__PURE__ */ jsx85(Alert_default.Description, { children: apiError?.message || "This invite link is invalid or has expired. Please contact your administrator for a new invite." })
11940
12264
  ] }),
11941
- onGoToSignIn && /* @__PURE__ */ jsx81("div", { style: { display: "flex", justifyContent: "center", marginTop: "1.5rem" }, children: /* @__PURE__ */ jsx81(Button_default, { variant: "outline", onClick: onGoToSignIn, children: "Go to Sign In" }) })
12265
+ onGoToSignIn && /* @__PURE__ */ jsx85("div", { style: { display: "flex", justifyContent: "center", marginTop: "1.5rem" }, children: /* @__PURE__ */ jsx85(Button_default, { variant: "outline", onClick: onGoToSignIn, children: "Go to Sign In" }) })
11942
12266
  ] })
11943
12267
  ] });
11944
12268
  }
11945
12269
  if (isComplete) {
11946
- return /* @__PURE__ */ jsxs32(Card_default, { className: cx24(className, styles.card), variant, children: [
11947
- /* @__PURE__ */ jsx81(Card_default.Header, { className: styles.header, children: /* @__PURE__ */ jsx81(Card_default.Title, { level: 2, className: styles.title, children: "Account Setup Complete!" }) }),
11948
- /* @__PURE__ */ jsxs32(Card_default.Content, { children: [
11949
- /* @__PURE__ */ jsx81(Alert_default, { variant: "success", children: /* @__PURE__ */ jsx81(Alert_default.Description, { children: "Your account has been successfully set up. You can now sign in with your credentials." }) }),
11950
- onGoToSignIn && /* @__PURE__ */ jsx81("div", { style: { display: "flex", justifyContent: "center", marginTop: "1.5rem" }, children: /* @__PURE__ */ jsx81(Button_default, { variant: "solid", color: "primary", onClick: onGoToSignIn, children: "Sign In" }) })
12270
+ return /* @__PURE__ */ jsxs34(Card_default, { className: cx24(className, styles.card), variant, children: [
12271
+ /* @__PURE__ */ jsx85(Card_default.Header, { className: styles.header, children: /* @__PURE__ */ jsx85(Card_default.Title, { level: 2, className: styles.title, children: "Account Setup Complete!" }) }),
12272
+ /* @__PURE__ */ jsxs34(Card_default.Content, { children: [
12273
+ /* @__PURE__ */ jsx85(Alert_default, { variant: "success", children: /* @__PURE__ */ jsx85(Alert_default.Description, { children: "Your account has been successfully set up. You can now sign in with your credentials." }) }),
12274
+ onGoToSignIn && /* @__PURE__ */ jsx85("div", { style: { display: "flex", justifyContent: "center", marginTop: "1.5rem" }, children: /* @__PURE__ */ jsx85(Button_default, { variant: "solid", color: "primary", onClick: onGoToSignIn, children: "Sign In" }) })
11951
12275
  ] })
11952
12276
  ] });
11953
12277
  }
11954
- return /* @__PURE__ */ jsxs32(Card_default, { className: cx24(className, styles.card), variant, children: [
11955
- (showTitle || showSubtitle) && (title || subtitle) && /* @__PURE__ */ jsxs32(Card_default.Header, { className: styles.header, children: [
11956
- showTitle && title && /* @__PURE__ */ jsx81(Card_default.Title, { level: 2, className: styles.title, children: title }),
11957
- showSubtitle && subtitle && /* @__PURE__ */ jsx81(Typography_default, { variant: "body1", className: styles.subtitle, children: subtitle })
12278
+ return /* @__PURE__ */ jsxs34(Card_default, { className: cx24(className, styles.card), variant, children: [
12279
+ (showTitle || showSubtitle) && (title || subtitle) && /* @__PURE__ */ jsxs34(Card_default.Header, { className: styles.header, children: [
12280
+ showTitle && title && /* @__PURE__ */ jsx85(Card_default.Title, { level: 2, className: styles.title, children: title }),
12281
+ showSubtitle && subtitle && /* @__PURE__ */ jsx85(Typography_default, { variant: "body1", className: styles.subtitle, children: subtitle })
11958
12282
  ] }),
11959
- /* @__PURE__ */ jsxs32(Card_default.Content, { children: [
11960
- apiError && /* @__PURE__ */ jsx81("div", { style: { marginBottom: "1rem" }, children: /* @__PURE__ */ jsx81(Alert_default, { variant: "error", children: /* @__PURE__ */ jsx81(Alert_default.Description, { children: apiError.message }) }) }),
11961
- /* @__PURE__ */ jsxs32("div", { children: [
11962
- componentsWithoutHeadings && componentsWithoutHeadings.length > 0 ? renderComponents(componentsWithoutHeadings) : !isLoading && /* @__PURE__ */ jsx81(Alert_default, { variant: "warning", children: /* @__PURE__ */ jsx81(Typography_default, { variant: "body1", children: "No form components available" }) }),
11963
- isLoading && /* @__PURE__ */ jsx81("div", { style: { display: "flex", justifyContent: "center", padding: "1rem" }, children: /* @__PURE__ */ jsx81(Spinner_default, { size: "small" }) })
12283
+ /* @__PURE__ */ jsxs34(Card_default.Content, { children: [
12284
+ apiError && /* @__PURE__ */ jsx85("div", { style: { marginBottom: "1rem" }, children: /* @__PURE__ */ jsx85(Alert_default, { variant: "error", children: /* @__PURE__ */ jsx85(Alert_default.Description, { children: apiError.message }) }) }),
12285
+ /* @__PURE__ */ jsxs34("div", { children: [
12286
+ componentsWithoutHeadings && componentsWithoutHeadings.length > 0 ? renderComponents(componentsWithoutHeadings) : !isLoading && /* @__PURE__ */ jsx85(Alert_default, { variant: "warning", children: /* @__PURE__ */ jsx85(Typography_default, { variant: "body1", children: "No form components available" }) }),
12287
+ isLoading && /* @__PURE__ */ jsx85("div", { style: { display: "flex", justifyContent: "center", padding: "1rem" }, children: /* @__PURE__ */ jsx85(Spinner_default, { size: "small" }) })
11964
12288
  ] }),
11965
- onGoToSignIn && /* @__PURE__ */ jsx81("div", { style: { marginTop: "1.5rem", textAlign: "center" }, children: /* @__PURE__ */ jsxs32(Typography_default, { variant: "body2", children: [
12289
+ onGoToSignIn && /* @__PURE__ */ jsx85("div", { style: { marginTop: "1.5rem", textAlign: "center" }, children: /* @__PURE__ */ jsxs34(Typography_default, { variant: "body2", children: [
11966
12290
  "Already have an account?",
11967
12291
  " ",
11968
- /* @__PURE__ */ jsx81(Button_default, { variant: "text", onClick: onGoToSignIn, style: { minWidth: "auto", padding: 0 }, children: "Sign In" })
12292
+ /* @__PURE__ */ jsx85(Button_default, { variant: "text", onClick: onGoToSignIn, style: { minWidth: "auto", padding: 0 }, children: "Sign In" })
11969
12293
  ] }) })
11970
12294
  ] })
11971
12295
  ] });
@@ -11973,7 +12297,7 @@ var BaseAcceptInvite = ({
11973
12297
  var BaseAcceptInvite_default = BaseAcceptInvite;
11974
12298
 
11975
12299
  // src/components/presentation/auth/AcceptInvite/v2/AcceptInvite.tsx
11976
- import { jsx as jsx82 } from "react/jsx-runtime";
12300
+ import { jsx as jsx86 } from "react/jsx-runtime";
11977
12301
  var getUrlParams = () => {
11978
12302
  if (typeof window === "undefined") {
11979
12303
  return {};
@@ -12029,7 +12353,7 @@ var AcceptInvite = ({
12029
12353
  }
12030
12354
  return response.json();
12031
12355
  };
12032
- return /* @__PURE__ */ jsx82(
12356
+ return /* @__PURE__ */ jsx86(
12033
12357
  BaseAcceptInvite_default,
12034
12358
  {
12035
12359
  flowId,
@@ -12052,7 +12376,7 @@ var AcceptInvite_default = AcceptInvite;
12052
12376
 
12053
12377
  // src/components/auth/Callback/Callback.tsx
12054
12378
  import { navigate as browserNavigate } from "@asgardeo/browser";
12055
- import { useEffect as useEffect21, useRef as useRef12 } from "react";
12379
+ import { useEffect as useEffect22, useRef as useRef12 } from "react";
12056
12380
  var Callback = ({ onNavigate, onError }) => {
12057
12381
  const processingRef = useRef12(false);
12058
12382
  const navigate6 = (path) => {
@@ -12062,7 +12386,7 @@ var Callback = ({ onNavigate, onError }) => {
12062
12386
  browserNavigate(path);
12063
12387
  }
12064
12388
  };
12065
- useEffect21(() => {
12389
+ useEffect22(() => {
12066
12390
  const processOAuthCallback = () => {
12067
12391
  if (processingRef.current) {
12068
12392
  return;
@@ -12140,45 +12464,45 @@ var Callback = ({ onNavigate, onError }) => {
12140
12464
  };
12141
12465
 
12142
12466
  // src/components/presentation/User/BaseUser.tsx
12143
- import { Fragment as Fragment14, jsx as jsx83 } from "react/jsx-runtime";
12467
+ import { Fragment as Fragment17, jsx as jsx87 } from "react/jsx-runtime";
12144
12468
  var BaseUser = ({ user, children, fallback = null }) => {
12145
12469
  if (!user) {
12146
- return /* @__PURE__ */ jsx83(Fragment14, { children: fallback });
12470
+ return /* @__PURE__ */ jsx87(Fragment17, { children: fallback });
12147
12471
  }
12148
- return /* @__PURE__ */ jsx83(Fragment14, { children: children(user) });
12472
+ return /* @__PURE__ */ jsx87(Fragment17, { children: children(user) });
12149
12473
  };
12150
12474
  BaseUser.displayName = "BaseUser";
12151
12475
  var BaseUser_default = BaseUser;
12152
12476
 
12153
12477
  // src/components/presentation/User/User.tsx
12154
- import { jsx as jsx84 } from "react/jsx-runtime";
12478
+ import { jsx as jsx88 } from "react/jsx-runtime";
12155
12479
  var User5 = ({ children, fallback = null }) => {
12156
12480
  const { user } = useAsgardeo_default();
12157
- return /* @__PURE__ */ jsx84(BaseUser_default, { user, fallback, children });
12481
+ return /* @__PURE__ */ jsx88(BaseUser_default, { user, fallback, children });
12158
12482
  };
12159
12483
  User5.displayName = "User";
12160
12484
  var User_default = User5;
12161
12485
 
12162
12486
  // src/components/presentation/Organization/BaseOrganization.tsx
12163
- import { Fragment as Fragment15, jsx as jsx85 } from "react/jsx-runtime";
12487
+ import { Fragment as Fragment18, jsx as jsx89 } from "react/jsx-runtime";
12164
12488
  var BaseOrganization = ({
12165
12489
  children,
12166
12490
  fallback = null,
12167
12491
  organization
12168
12492
  }) => {
12169
12493
  if (!organization) {
12170
- return /* @__PURE__ */ jsx85(Fragment15, { children: fallback });
12494
+ return /* @__PURE__ */ jsx89(Fragment18, { children: fallback });
12171
12495
  }
12172
- return /* @__PURE__ */ jsx85(Fragment15, { children: children(organization) });
12496
+ return /* @__PURE__ */ jsx89(Fragment18, { children: children(organization) });
12173
12497
  };
12174
12498
  BaseOrganization.displayName = "BaseOrganization";
12175
12499
  var BaseOrganization_default = BaseOrganization;
12176
12500
 
12177
12501
  // src/components/presentation/Organization/Organization.tsx
12178
- import { jsx as jsx86 } from "react/jsx-runtime";
12502
+ import { jsx as jsx90 } from "react/jsx-runtime";
12179
12503
  var Organization5 = ({ children, fallback = null }) => {
12180
12504
  const { currentOrganization } = useOrganization_default();
12181
- return /* @__PURE__ */ jsx86(BaseOrganization_default, { organization: currentOrganization, fallback, children });
12505
+ return /* @__PURE__ */ jsx90(BaseOrganization_default, { organization: currentOrganization, fallback, children });
12182
12506
  };
12183
12507
  Organization5.displayName = "Organization";
12184
12508
  var Organization_default = Organization5;
@@ -12186,7 +12510,7 @@ var Organization_default = Organization5;
12186
12510
  // src/components/presentation/UserProfile/BaseUserProfile.tsx
12187
12511
  import { withVendorCSSClassPrefix as withVendorCSSClassPrefix27, WellKnownSchemaIds, bem as bem19 } from "@asgardeo/browser";
12188
12512
  import { cx as cx28 } from "@emotion/css";
12189
- import { useState as useState24, useCallback as useCallback17 } from "react";
12513
+ import { useState as useState25, useCallback as useCallback17 } from "react";
12190
12514
 
12191
12515
  // src/components/presentation/UserProfile/BaseUserProfile.styles.ts
12192
12516
  import { withVendorCSSClassPrefix as withVendorCSSClassPrefix23 } from "@asgardeo/browser";
@@ -12517,7 +12841,7 @@ var useStyles21 = (theme, colorScheme, size, variant, backgroundColor) => useMem
12517
12841
  var Avatar_styles_default = useStyles21;
12518
12842
 
12519
12843
  // src/components/primitives/Avatar/Avatar.tsx
12520
- import { jsx as jsx87 } from "react/jsx-runtime";
12844
+ import { jsx as jsx91 } from "react/jsx-runtime";
12521
12845
  var Avatar = ({
12522
12846
  alt = "User avatar",
12523
12847
  background = "random",
@@ -12564,7 +12888,7 @@ var Avatar = ({
12564
12888
  const getInitials = (fullName) => fullName.split(" ").map((part) => part[0]).slice(0, 2).join("").toUpperCase();
12565
12889
  const renderContent = () => {
12566
12890
  if (imageUrl) {
12567
- return /* @__PURE__ */ jsx87(
12891
+ return /* @__PURE__ */ jsx91(
12568
12892
  "img",
12569
12893
  {
12570
12894
  src: imageUrl,
@@ -12577,19 +12901,19 @@ var Avatar = ({
12577
12901
  return getInitials(name);
12578
12902
  }
12579
12903
  if (isLoading) {
12580
- return /* @__PURE__ */ jsx87("div", { className: cx25(withVendorCSSClassPrefix24(bem16("avatar", "skeleton")), styles["skeleton"]) });
12904
+ return /* @__PURE__ */ jsx91("div", { className: cx25(withVendorCSSClassPrefix24(bem16("avatar", "skeleton")), styles["skeleton"]) });
12581
12905
  }
12582
- return /* @__PURE__ */ jsx87(
12906
+ return /* @__PURE__ */ jsx91(
12583
12907
  "svg",
12584
12908
  {
12585
12909
  xmlns: "http://www.w3.org/2000/svg",
12586
12910
  viewBox: "0 0 640 640",
12587
12911
  className: cx25(withVendorCSSClassPrefix24(bem16("avatar", "icon")), styles["icon"]),
12588
- children: /* @__PURE__ */ jsx87("path", { d: "M240 192C240 147.8 275.8 112 320 112C364.2 112 400 147.8 400 192C400 236.2 364.2 272 320 272C275.8 272 240 236.2 240 192zM448 192C448 121.3 390.7 64 320 64C249.3 64 192 121.3 192 192C192 262.7 249.3 320 320 320C390.7 320 448 262.7 448 192zM144 544C144 473.3 201.3 416 272 416L368 416C438.7 416 496 473.3 496 544L496 552C496 565.3 506.7 576 520 576C533.3 576 544 565.3 544 552L544 544C544 446.8 465.2 368 368 368L272 368C174.8 368 96 446.8 96 544L96 552C96 565.3 106.7 576 120 576C133.3 576 144 565.3 144 552L144 544z" })
12912
+ children: /* @__PURE__ */ jsx91("path", { d: "M240 192C240 147.8 275.8 112 320 112C364.2 112 400 147.8 400 192C400 236.2 364.2 272 320 272C275.8 272 240 236.2 240 192zM448 192C448 121.3 390.7 64 320 64C249.3 64 192 121.3 192 192C192 262.7 249.3 320 320 320C390.7 320 448 262.7 448 192zM144 544C144 473.3 201.3 416 272 416L368 416C438.7 416 496 473.3 496 544L496 552C496 565.3 506.7 576 520 576C533.3 576 544 565.3 544 552L544 544C544 446.8 465.2 368 368 368L272 368C174.8 368 96 446.8 96 544L96 552C96 565.3 106.7 576 120 576C133.3 576 144 565.3 144 552L144 544z" })
12589
12913
  }
12590
12914
  );
12591
12915
  };
12592
- return /* @__PURE__ */ jsx87(
12916
+ return /* @__PURE__ */ jsx91(
12593
12917
  "div",
12594
12918
  {
12595
12919
  className: cx25(
@@ -12628,7 +12952,7 @@ import {
12628
12952
  useContext as useContext12,
12629
12953
  useLayoutEffect,
12630
12954
  useMemo as useMemo33,
12631
- useState as useState22
12955
+ useState as useState23
12632
12956
  } from "react";
12633
12957
 
12634
12958
  // src/components/primitives/Dialog/Dialog.styles.ts
@@ -12696,8 +13020,8 @@ var useStyles22 = (theme, colorScheme) => useMemo32(() => {
12696
13020
  var Dialog_styles_default = useStyles22;
12697
13021
 
12698
13022
  // src/components/primitives/Icons/LogOut.tsx
12699
- import { jsx as jsx88, jsxs as jsxs33 } from "react/jsx-runtime";
12700
- var LogOut = (props) => /* @__PURE__ */ jsxs33(
13023
+ import { jsx as jsx92, jsxs as jsxs35 } from "react/jsx-runtime";
13024
+ var LogOut = (props) => /* @__PURE__ */ jsxs35(
12701
13025
  "svg",
12702
13026
  {
12703
13027
  xmlns: "http://www.w3.org/2000/svg",
@@ -12711,17 +13035,17 @@ var LogOut = (props) => /* @__PURE__ */ jsxs33(
12711
13035
  strokeLinejoin: "round",
12712
13036
  ...props,
12713
13037
  children: [
12714
- /* @__PURE__ */ jsx88("path", { d: "m16 17 5-5-5-5" }),
12715
- /* @__PURE__ */ jsx88("path", { d: "M21 12H9" }),
12716
- /* @__PURE__ */ jsx88("path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" })
13038
+ /* @__PURE__ */ jsx92("path", { d: "m16 17 5-5-5-5" }),
13039
+ /* @__PURE__ */ jsx92("path", { d: "M21 12H9" }),
13040
+ /* @__PURE__ */ jsx92("path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" })
12717
13041
  ]
12718
13042
  }
12719
13043
  );
12720
13044
  var LogOut_default = LogOut;
12721
13045
 
12722
13046
  // src/components/primitives/Icons/Plus.tsx
12723
- import { jsx as jsx89, jsxs as jsxs34 } from "react/jsx-runtime";
12724
- var Plus = (props) => /* @__PURE__ */ jsxs34(
13047
+ import { jsx as jsx93, jsxs as jsxs36 } from "react/jsx-runtime";
13048
+ var Plus = (props) => /* @__PURE__ */ jsxs36(
12725
13049
  "svg",
12726
13050
  {
12727
13051
  xmlns: "http://www.w3.org/2000/svg",
@@ -12735,16 +13059,16 @@ var Plus = (props) => /* @__PURE__ */ jsxs34(
12735
13059
  strokeLinejoin: "round",
12736
13060
  ...props,
12737
13061
  children: [
12738
- /* @__PURE__ */ jsx89("path", { d: "M5 12h14" }),
12739
- /* @__PURE__ */ jsx89("path", { d: "M12 5v14" })
13062
+ /* @__PURE__ */ jsx93("path", { d: "M5 12h14" }),
13063
+ /* @__PURE__ */ jsx93("path", { d: "M12 5v14" })
12740
13064
  ]
12741
13065
  }
12742
13066
  );
12743
13067
  var Plus_default = Plus;
12744
13068
 
12745
13069
  // src/components/primitives/Icons/User.tsx
12746
- import { jsx as jsx90, jsxs as jsxs35 } from "react/jsx-runtime";
12747
- var User7 = (props) => /* @__PURE__ */ jsxs35(
13070
+ import { jsx as jsx94, jsxs as jsxs37 } from "react/jsx-runtime";
13071
+ var User7 = (props) => /* @__PURE__ */ jsxs37(
12748
13072
  "svg",
12749
13073
  {
12750
13074
  xmlns: "http://www.w3.org/2000/svg",
@@ -12758,16 +13082,16 @@ var User7 = (props) => /* @__PURE__ */ jsxs35(
12758
13082
  strokeLinejoin: "round",
12759
13083
  ...props,
12760
13084
  children: [
12761
- /* @__PURE__ */ jsx90("path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" }),
12762
- /* @__PURE__ */ jsx90("circle", { cx: "12", cy: "7", r: "4" })
13085
+ /* @__PURE__ */ jsx94("path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" }),
13086
+ /* @__PURE__ */ jsx94("circle", { cx: "12", cy: "7", r: "4" })
12763
13087
  ]
12764
13088
  }
12765
13089
  );
12766
13090
  var User_default2 = User7;
12767
13091
 
12768
13092
  // src/components/primitives/Icons/X.tsx
12769
- import { jsx as jsx91, jsxs as jsxs36 } from "react/jsx-runtime";
12770
- var X = (props) => /* @__PURE__ */ jsxs36(
13093
+ import { jsx as jsx95, jsxs as jsxs38 } from "react/jsx-runtime";
13094
+ var X = (props) => /* @__PURE__ */ jsxs38(
12771
13095
  "svg",
12772
13096
  {
12773
13097
  xmlns: "http://www.w3.org/2000/svg",
@@ -12781,23 +13105,23 @@ var X = (props) => /* @__PURE__ */ jsxs36(
12781
13105
  strokeLinejoin: "round",
12782
13106
  ...props,
12783
13107
  children: [
12784
- /* @__PURE__ */ jsx91("path", { d: "M18 6 6 18" }),
12785
- /* @__PURE__ */ jsx91("path", { d: "m6 6 12 12" })
13108
+ /* @__PURE__ */ jsx95("path", { d: "M18 6 6 18" }),
13109
+ /* @__PURE__ */ jsx95("path", { d: "m6 6 12 12" })
12786
13110
  ]
12787
13111
  }
12788
13112
  );
12789
13113
  var X_default = X;
12790
13114
 
12791
13115
  // src/components/primitives/Dialog/Dialog.tsx
12792
- import { jsx as jsx92, jsxs as jsxs37 } from "react/jsx-runtime";
13116
+ import { jsx as jsx96, jsxs as jsxs39 } from "react/jsx-runtime";
12793
13117
  function useDialog({
12794
13118
  initialOpen = false,
12795
13119
  open: controlledOpen,
12796
13120
  onOpenChange: setControlledOpen
12797
13121
  } = {}) {
12798
- const [uncontrolledOpen, setUncontrolledOpen] = useState22(initialOpen);
12799
- const [labelId, setLabelId] = useState22();
12800
- const [descriptionId, setDescriptionId] = useState22();
13122
+ const [uncontrolledOpen, setUncontrolledOpen] = useState23(initialOpen);
13123
+ const [labelId, setLabelId] = useState23();
13124
+ const [descriptionId, setDescriptionId] = useState23();
12801
13125
  const open = controlledOpen ?? uncontrolledOpen;
12802
13126
  const setOpen = setControlledOpen ?? setUncontrolledOpen;
12803
13127
  const data = useFloating({
@@ -12835,7 +13159,7 @@ var useDialogContext = () => {
12835
13159
  };
12836
13160
  function Dialog({ children, ...options }) {
12837
13161
  const dialog = useDialog(options);
12838
- return /* @__PURE__ */ jsx92(DialogContext.Provider, { value: dialog, children });
13162
+ return /* @__PURE__ */ jsx96(DialogContext.Provider, { value: dialog, children });
12839
13163
  }
12840
13164
  var DialogTrigger = forwardRef10(
12841
13165
  ({ children, asChild = false, ...props }, propRef) => {
@@ -12853,7 +13177,7 @@ var DialogTrigger = forwardRef10(
12853
13177
  })
12854
13178
  );
12855
13179
  }
12856
- return /* @__PURE__ */ jsx92("button", { ref, "data-state": context.open ? "open" : "closed", ...context.getReferenceProps(props), children });
13180
+ return /* @__PURE__ */ jsx96("button", { ref, "data-state": context.open ? "open" : "closed", ...context.getReferenceProps(props), children });
12857
13181
  }
12858
13182
  );
12859
13183
  var DialogContent = forwardRef10(
@@ -12863,12 +13187,12 @@ var DialogContent = forwardRef10(
12863
13187
  const styles = Dialog_styles_default(theme, colorScheme);
12864
13188
  const ref = useMergeRefs([context.refs.setFloating, propRef]);
12865
13189
  if (!floatingContext.open) return null;
12866
- return /* @__PURE__ */ jsx92(FloatingPortal, { children: /* @__PURE__ */ jsx92(
13190
+ return /* @__PURE__ */ jsx96(FloatingPortal, { children: /* @__PURE__ */ jsx96(
12867
13191
  FloatingOverlay,
12868
13192
  {
12869
13193
  className: cx26(withVendorCSSClassPrefix25(bem17("dialog", "overlay")), styles["overlay"]),
12870
13194
  lockScroll: true,
12871
- children: /* @__PURE__ */ jsx92(FloatingFocusManager, { context: floatingContext, initialFocus: -1, children: /* @__PURE__ */ jsx92(
13195
+ children: /* @__PURE__ */ jsx96(FloatingFocusManager, { context: floatingContext, initialFocus: -1, children: /* @__PURE__ */ jsx96(
12872
13196
  "div",
12873
13197
  {
12874
13198
  ref,
@@ -12895,8 +13219,8 @@ var DialogHeading = forwardRef10(
12895
13219
  context.setLabelId(void 0);
12896
13220
  };
12897
13221
  }, [id, context.setLabelId]);
12898
- return /* @__PURE__ */ jsxs37("div", { className: cx26(withVendorCSSClassPrefix25(bem17("dialog", "header")), styles["header"]), children: [
12899
- /* @__PURE__ */ jsx92(
13222
+ return /* @__PURE__ */ jsxs39("div", { className: cx26(withVendorCSSClassPrefix25(bem17("dialog", "header")), styles["header"]), children: [
13223
+ /* @__PURE__ */ jsx96(
12900
13224
  "h2",
12901
13225
  {
12902
13226
  ...props,
@@ -12906,7 +13230,7 @@ var DialogHeading = forwardRef10(
12906
13230
  children
12907
13231
  }
12908
13232
  ),
12909
- /* @__PURE__ */ jsx92(
13233
+ /* @__PURE__ */ jsx96(
12910
13234
  Button_default,
12911
13235
  {
12912
13236
  color: "tertiary",
@@ -12917,7 +13241,7 @@ var DialogHeading = forwardRef10(
12917
13241
  context.setOpen(false);
12918
13242
  },
12919
13243
  "aria-label": "Close",
12920
- children: /* @__PURE__ */ jsx92(X_default, { width: 16, height: 16 })
13244
+ children: /* @__PURE__ */ jsx96(X_default, { width: 16, height: 16 })
12921
13245
  }
12922
13246
  )
12923
13247
  ] });
@@ -12935,7 +13259,7 @@ var DialogDescription = forwardRef10(
12935
13259
  context.setDescriptionId(void 0);
12936
13260
  };
12937
13261
  }, [id, context.setDescriptionId]);
12938
- return /* @__PURE__ */ jsx92(
13262
+ return /* @__PURE__ */ jsx96(
12939
13263
  "p",
12940
13264
  {
12941
13265
  ...props,
@@ -12964,7 +13288,7 @@ var DialogClose = forwardRef10(
12964
13288
  onClick: handleClick
12965
13289
  });
12966
13290
  }
12967
- return /* @__PURE__ */ jsx92(
13291
+ return /* @__PURE__ */ jsx96(
12968
13292
  Button_default,
12969
13293
  {
12970
13294
  ...props,
@@ -12992,7 +13316,7 @@ var Dialog_default = Dialog;
12992
13316
  // src/components/primitives/MultiInput/MultiInput.tsx
12993
13317
  import { withVendorCSSClassPrefix as withVendorCSSClassPrefix26, bem as bem18 } from "@asgardeo/browser";
12994
13318
  import { cx as cx27 } from "@emotion/css";
12995
- import { useCallback as useCallback16, useState as useState23 } from "react";
13319
+ import { useCallback as useCallback16, useState as useState24 } from "react";
12996
13320
 
12997
13321
  // src/components/primitives/MultiInput/MultiInput.styles.ts
12998
13322
  import { css as css24 } from "@emotion/css";
@@ -13087,7 +13411,7 @@ var useStyles23 = (theme, colorScheme, disabled, hasError, canAddMore, canRemove
13087
13411
  var MultiInput_styles_default = useStyles23;
13088
13412
 
13089
13413
  // src/components/primitives/MultiInput/MultiInput.tsx
13090
- import { jsx as jsx93, jsxs as jsxs38 } from "react/jsx-runtime";
13414
+ import { jsx as jsx97, jsxs as jsxs40 } from "react/jsx-runtime";
13091
13415
  var MultiInput = ({
13092
13416
  label,
13093
13417
  error,
@@ -13110,8 +13434,8 @@ var MultiInput = ({
13110
13434
  const canAddMore = !maxFields || values.length < maxFields;
13111
13435
  const canRemove = values.length > minFields;
13112
13436
  const styles = MultiInput_styles_default(theme, colorScheme, !!disabled, !!error, canAddMore, canRemove);
13113
- const PlusIcon = ({ iconClassName }) => /* @__PURE__ */ jsx93("svg", { width: "16", height: "16", viewBox: "0 0 24 24", className: cx27(styles["icon"], iconClassName), children: /* @__PURE__ */ jsx93("path", { d: "M12 5v14M5 12h14" }) });
13114
- const BinIcon = ({ iconClassName }) => /* @__PURE__ */ jsx93("svg", { width: "16", height: "16", viewBox: "0 0 24 24", className: cx27(styles["icon"], iconClassName), children: /* @__PURE__ */ jsx93("path", { d: "M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2m3 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6h14ZM10 11v6M14 11v6" }) });
13437
+ const PlusIcon = ({ iconClassName }) => /* @__PURE__ */ jsx97("svg", { width: "16", height: "16", viewBox: "0 0 24 24", className: cx27(styles["icon"], iconClassName), children: /* @__PURE__ */ jsx97("path", { d: "M12 5v14M5 12h14" }) });
13438
+ const BinIcon = ({ iconClassName }) => /* @__PURE__ */ jsx97("svg", { width: "16", height: "16", viewBox: "0 0 24 24", className: cx27(styles["icon"], iconClassName), children: /* @__PURE__ */ jsx97("path", { d: "M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2m3 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6h14ZM10 11v6M14 11v6" }) });
13115
13439
  const handleAddValue = useCallback16(
13116
13440
  (newValue) => {
13117
13441
  if (newValue.trim() !== "" && (!maxFields || values.length < maxFields)) {
@@ -13155,9 +13479,9 @@ var MultiInput = ({
13155
13479
  };
13156
13480
  switch (fieldType) {
13157
13481
  case "DATE_TIME":
13158
- return /* @__PURE__ */ jsx93(DatePicker_default, { ...commonProps });
13482
+ return /* @__PURE__ */ jsx97(DatePicker_default, { ...commonProps });
13159
13483
  case "BOOLEAN":
13160
- return /* @__PURE__ */ jsx93(
13484
+ return /* @__PURE__ */ jsx97(
13161
13485
  Checkbox_default,
13162
13486
  {
13163
13487
  ...commonProps,
@@ -13166,19 +13490,19 @@ var MultiInput = ({
13166
13490
  }
13167
13491
  );
13168
13492
  default:
13169
- return /* @__PURE__ */ jsx93(TextField_default, { ...commonProps, type });
13493
+ return /* @__PURE__ */ jsx97(TextField_default, { ...commonProps, type });
13170
13494
  }
13171
13495
  },
13172
13496
  [placeholder, disabled, startIcon, endIcon, error, fieldType, type]
13173
13497
  );
13174
- const [currentInputValue, setCurrentInputValue] = useState23("");
13498
+ const [currentInputValue, setCurrentInputValue] = useState24("");
13175
13499
  const handleInputSubmit = useCallback16(() => {
13176
13500
  if (currentInputValue.trim() !== "") {
13177
13501
  handleAddValue(currentInputValue);
13178
13502
  setCurrentInputValue("");
13179
13503
  }
13180
13504
  }, [currentInputValue, handleAddValue]);
13181
- return /* @__PURE__ */ jsxs38(
13505
+ return /* @__PURE__ */ jsxs40(
13182
13506
  FormControl_default,
13183
13507
  {
13184
13508
  error,
@@ -13186,27 +13510,27 @@ var MultiInput = ({
13186
13510
  className: cx27(withVendorCSSClassPrefix26(bem18("multi-input")), className),
13187
13511
  style,
13188
13512
  children: [
13189
- label && /* @__PURE__ */ jsx93(InputLabel_default, { required, error: !!error, children: label }),
13190
- /* @__PURE__ */ jsxs38("div", { className: cx27(withVendorCSSClassPrefix26(bem18("multi-input", "container")), styles["container"]), children: [
13191
- /* @__PURE__ */ jsx93("div", { className: cx27(withVendorCSSClassPrefix26(bem18("multi-input", "input-row")), styles["inputRow"]), children: /* @__PURE__ */ jsx93("div", { className: cx27(withVendorCSSClassPrefix26(bem18("multi-input", "input-wrapper")), styles["inputWrapper"]), children: renderInputField(
13513
+ label && /* @__PURE__ */ jsx97(InputLabel_default, { required, error: !!error, children: label }),
13514
+ /* @__PURE__ */ jsxs40("div", { className: cx27(withVendorCSSClassPrefix26(bem18("multi-input", "container")), styles["container"]), children: [
13515
+ /* @__PURE__ */ jsx97("div", { className: cx27(withVendorCSSClassPrefix26(bem18("multi-input", "input-row")), styles["inputRow"]), children: /* @__PURE__ */ jsx97("div", { className: cx27(withVendorCSSClassPrefix26(bem18("multi-input", "input-wrapper")), styles["inputWrapper"]), children: renderInputField(
13192
13516
  currentInputValue,
13193
13517
  setCurrentInputValue,
13194
- canAddMore ? /* @__PURE__ */ jsx93(PlusIcon, { iconClassName: styles["plusIcon"] }) : void 0,
13518
+ canAddMore ? /* @__PURE__ */ jsx97(PlusIcon, { iconClassName: styles["plusIcon"] }) : void 0,
13195
13519
  canAddMore ? handleInputSubmit : void 0
13196
13520
  ) }) }),
13197
- values.length > 0 && /* @__PURE__ */ jsx93("div", { className: cx27(withVendorCSSClassPrefix26(bem18("multi-input", "list-container")), styles["listContainer"]), children: values.map((value, index) => /* @__PURE__ */ jsxs38(
13521
+ values.length > 0 && /* @__PURE__ */ jsx97("div", { className: cx27(withVendorCSSClassPrefix26(bem18("multi-input", "list-container")), styles["listContainer"]), children: values.map((value, index) => /* @__PURE__ */ jsxs40(
13198
13522
  "div",
13199
13523
  {
13200
13524
  className: cx27(withVendorCSSClassPrefix26(bem18("multi-input", "list-item")), styles["listItem"]),
13201
13525
  children: [
13202
- /* @__PURE__ */ jsx93(
13526
+ /* @__PURE__ */ jsx97(
13203
13527
  "span",
13204
13528
  {
13205
13529
  className: cx27(withVendorCSSClassPrefix26(bem18("multi-input", "list-item-text")), styles["listItemText"]),
13206
13530
  children: value
13207
13531
  }
13208
13532
  ),
13209
- canRemove && /* @__PURE__ */ jsx93(
13533
+ canRemove && /* @__PURE__ */ jsx97(
13210
13534
  "button",
13211
13535
  {
13212
13536
  type: "button",
@@ -13217,7 +13541,7 @@ var MultiInput = ({
13217
13541
  styles["removeButton"]
13218
13542
  ),
13219
13543
  title: "Remove value",
13220
- children: /* @__PURE__ */ jsx93(BinIcon, { iconClassName: styles["icon"] })
13544
+ children: /* @__PURE__ */ jsx97(BinIcon, { iconClassName: styles["icon"] })
13221
13545
  }
13222
13546
  )
13223
13547
  ]
@@ -13232,7 +13556,7 @@ var MultiInput = ({
13232
13556
  var MultiInput_default = MultiInput;
13233
13557
 
13234
13558
  // src/components/presentation/UserProfile/BaseUserProfile.tsx
13235
- import { Fragment as Fragment16, jsx as jsx94, jsxs as jsxs39 } from "react/jsx-runtime";
13559
+ import { Fragment as Fragment19, jsx as jsx98, jsxs as jsxs41 } from "react/jsx-runtime";
13236
13560
  var fieldsToSkip = [
13237
13561
  "roles.default",
13238
13562
  "active",
@@ -13276,8 +13600,8 @@ var BaseUserProfile = ({
13276
13600
  displayNameAttributes = []
13277
13601
  }) => {
13278
13602
  const { theme, colorScheme } = useTheme_default();
13279
- const [editedUser, setEditedUser] = useState24(flattenedProfile || profile);
13280
- const [editingFields, setEditingFields] = useState24({});
13603
+ const [editedUser, setEditedUser] = useState25(flattenedProfile || profile);
13604
+ const [editingFields, setEditingFields] = useState25({});
13281
13605
  const { t } = useTranslation_default(preferences?.i18n);
13282
13606
  const shouldShowField = useCallback17(
13283
13607
  (fieldName) => {
@@ -13294,7 +13618,7 @@ var BaseUserProfile = ({
13294
13618
  },
13295
13619
  [showFields, hideFields]
13296
13620
  );
13297
- const PencilIcon = () => /* @__PURE__ */ jsx94(
13621
+ const PencilIcon = () => /* @__PURE__ */ jsx98(
13298
13622
  "svg",
13299
13623
  {
13300
13624
  width: "16",
@@ -13305,7 +13629,7 @@ var BaseUserProfile = ({
13305
13629
  strokeWidth: "2",
13306
13630
  strokeLinecap: "round",
13307
13631
  strokeLinejoin: "round",
13308
- children: /* @__PURE__ */ jsx94("path", { d: "M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z" })
13632
+ children: /* @__PURE__ */ jsx98("path", { d: "M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z" })
13309
13633
  }
13310
13634
  );
13311
13635
  const toggleFieldEdit = useCallback17((fieldName) => {
@@ -13335,12 +13659,12 @@ var BaseUserProfile = ({
13335
13659
  const styles = BaseUserProfile_styles_default(theme, colorScheme);
13336
13660
  const ObjectDisplay = ({ data }) => {
13337
13661
  if (!data || typeof data !== "object") return null;
13338
- return /* @__PURE__ */ jsx94("table", { className: styles.value, children: /* @__PURE__ */ jsx94("tbody", { children: Object.entries(data).map(([key, value]) => /* @__PURE__ */ jsxs39("tr", { children: [
13339
- /* @__PURE__ */ jsx94("td", { className: styles.objectKey, children: /* @__PURE__ */ jsxs39("strong", { children: [
13662
+ return /* @__PURE__ */ jsx98("table", { className: styles.value, children: /* @__PURE__ */ jsx98("tbody", { children: Object.entries(data).map(([key, value]) => /* @__PURE__ */ jsxs41("tr", { children: [
13663
+ /* @__PURE__ */ jsx98("td", { className: styles.objectKey, children: /* @__PURE__ */ jsxs41("strong", { children: [
13340
13664
  formatLabel(key),
13341
13665
  ":"
13342
13666
  ] }) }),
13343
- /* @__PURE__ */ jsx94("td", { className: styles.objectValue, children: typeof value === "object" ? /* @__PURE__ */ jsx94(ObjectDisplay, { data: value }) : String(value) })
13667
+ /* @__PURE__ */ jsx98("td", { className: styles.objectValue, children: typeof value === "object" ? /* @__PURE__ */ jsx98(ObjectDisplay, { data: value }) : String(value) })
13344
13668
  ] }, key)) }) });
13345
13669
  };
13346
13670
  function set(obj, path, value) {
@@ -13415,7 +13739,7 @@ var BaseUserProfile = ({
13415
13739
  const { value, displayName, description, name, type, required, mutability, subAttributes, multiValued } = schema;
13416
13740
  const label = displayName || description || name || "";
13417
13741
  if (subAttributes && Array.isArray(subAttributes)) {
13418
- return /* @__PURE__ */ jsx94(Fragment16, { children: subAttributes.map((subAttr, index) => {
13742
+ return /* @__PURE__ */ jsx98(Fragment19, { children: subAttributes.map((subAttr, index) => {
13419
13743
  let displayValue2;
13420
13744
  if (Array.isArray(subAttr.value)) {
13421
13745
  displayValue2 = subAttr.value.map((item) => typeof item === "object" ? JSON.stringify(item) : String(item)).join(", ");
@@ -13424,9 +13748,9 @@ var BaseUserProfile = ({
13424
13748
  } else {
13425
13749
  displayValue2 = String(subAttr.value);
13426
13750
  }
13427
- return /* @__PURE__ */ jsxs39("div", { className: styles.field, children: [
13428
- /* @__PURE__ */ jsx94("span", { className: styles.label, children: subAttr.displayName || subAttr.description || "" }),
13429
- /* @__PURE__ */ jsx94("div", { className: styles.value, children: displayValue2 })
13751
+ return /* @__PURE__ */ jsxs41("div", { className: styles.field, children: [
13752
+ /* @__PURE__ */ jsx98("span", { className: styles.label, children: subAttr.displayName || subAttr.description || "" }),
13753
+ /* @__PURE__ */ jsx98("div", { className: styles.value, children: displayValue2 })
13430
13754
  ] }, index);
13431
13755
  }) });
13432
13756
  }
@@ -13450,9 +13774,9 @@ var BaseUserProfile = ({
13450
13774
  } else {
13451
13775
  fieldValues = [];
13452
13776
  }
13453
- return /* @__PURE__ */ jsxs39(Fragment16, { children: [
13454
- /* @__PURE__ */ jsx94("span", { className: styles.label, children: label }),
13455
- /* @__PURE__ */ jsx94("div", { className: styles.value, children: /* @__PURE__ */ jsx94(
13777
+ return /* @__PURE__ */ jsxs41(Fragment19, { children: [
13778
+ /* @__PURE__ */ jsx98("span", { className: styles.label, children: label }),
13779
+ /* @__PURE__ */ jsx98("div", { className: styles.value, children: /* @__PURE__ */ jsx98(
13456
13780
  MultiInput_default,
13457
13781
  {
13458
13782
  values: fieldValues,
@@ -13483,9 +13807,9 @@ var BaseUserProfile = ({
13483
13807
  } else {
13484
13808
  displayValue2 = "-";
13485
13809
  }
13486
- return /* @__PURE__ */ jsxs39(Fragment16, { children: [
13487
- /* @__PURE__ */ jsx94("span", { className: styles.label, children: label }),
13488
- /* @__PURE__ */ jsx94("div", { className: cx28(styles.value, !hasValues ? styles.valuePlaceholder : ""), children: !hasValues && isEditable2 && onStartEdit ? /* @__PURE__ */ jsx94(
13810
+ return /* @__PURE__ */ jsxs41(Fragment19, { children: [
13811
+ /* @__PURE__ */ jsx98("span", { className: styles.label, children: label }),
13812
+ /* @__PURE__ */ jsx98("div", { className: cx28(styles.value, !hasValues ? styles.valuePlaceholder : ""), children: !hasValues && isEditable2 && onStartEdit ? /* @__PURE__ */ jsx98(
13489
13813
  Button_default,
13490
13814
  {
13491
13815
  onClick: onStartEdit,
@@ -13500,7 +13824,7 @@ var BaseUserProfile = ({
13500
13824
  ] });
13501
13825
  }
13502
13826
  if (type === "COMPLEX" && typeof value === "object") {
13503
- return /* @__PURE__ */ jsx94(ObjectDisplay, { data: value });
13827
+ return /* @__PURE__ */ jsx98(ObjectDisplay, { data: value });
13504
13828
  }
13505
13829
  if (isEditing && onEditValue && mutability !== "READ_ONLY" && !readonlyFields.includes(name || "")) {
13506
13830
  let fieldValue;
@@ -13522,13 +13846,13 @@ var BaseUserProfile = ({
13522
13846
  let field;
13523
13847
  switch (type) {
13524
13848
  case "STRING":
13525
- field = /* @__PURE__ */ jsx94(TextField_default, { ...commonProps });
13849
+ field = /* @__PURE__ */ jsx98(TextField_default, { ...commonProps });
13526
13850
  break;
13527
13851
  case "DATE_TIME":
13528
- field = /* @__PURE__ */ jsx94(DatePicker_default, { ...commonProps });
13852
+ field = /* @__PURE__ */ jsx98(DatePicker_default, { ...commonProps });
13529
13853
  break;
13530
13854
  case "BOOLEAN":
13531
- field = /* @__PURE__ */ jsx94(
13855
+ field = /* @__PURE__ */ jsx98(
13532
13856
  Checkbox_default,
13533
13857
  {
13534
13858
  ...commonProps,
@@ -13540,7 +13864,7 @@ var BaseUserProfile = ({
13540
13864
  );
13541
13865
  break;
13542
13866
  case "COMPLEX":
13543
- field = /* @__PURE__ */ jsx94(
13867
+ field = /* @__PURE__ */ jsx98(
13544
13868
  "textarea",
13545
13869
  {
13546
13870
  value: fieldValue,
@@ -13552,11 +13876,11 @@ var BaseUserProfile = ({
13552
13876
  );
13553
13877
  break;
13554
13878
  default:
13555
- field = /* @__PURE__ */ jsx94(TextField_default, { ...commonProps });
13879
+ field = /* @__PURE__ */ jsx98(TextField_default, { ...commonProps });
13556
13880
  }
13557
- return /* @__PURE__ */ jsxs39(Fragment16, { children: [
13558
- /* @__PURE__ */ jsx94("span", { className: styles.label, children: label }),
13559
- /* @__PURE__ */ jsx94("div", { className: styles.value, children: field })
13881
+ return /* @__PURE__ */ jsxs41(Fragment19, { children: [
13882
+ /* @__PURE__ */ jsx98("span", { className: styles.label, children: label }),
13883
+ /* @__PURE__ */ jsx98("div", { className: styles.value, children: field })
13560
13884
  ] });
13561
13885
  }
13562
13886
  const hasValue = value !== void 0 && value !== null && value !== "";
@@ -13569,9 +13893,9 @@ var BaseUserProfile = ({
13569
13893
  } else {
13570
13894
  displayValue = "-";
13571
13895
  }
13572
- return /* @__PURE__ */ jsxs39(Fragment16, { children: [
13573
- /* @__PURE__ */ jsx94("span", { className: styles.label, children: label }),
13574
- /* @__PURE__ */ jsx94("div", { className: cx28(styles.value, !hasValue ? styles.valuePlaceholder : ""), children: !hasValue && isEditable && onStartEdit ? /* @__PURE__ */ jsx94(
13896
+ return /* @__PURE__ */ jsxs41(Fragment19, { children: [
13897
+ /* @__PURE__ */ jsx98("span", { className: styles.label, children: label }),
13898
+ /* @__PURE__ */ jsx98("div", { className: cx28(styles.value, !hasValue ? styles.valuePlaceholder : ""), children: !hasValue && isEditable && onStartEdit ? /* @__PURE__ */ jsx98(
13575
13899
  Button_default,
13576
13900
  {
13577
13901
  onClick: onStartEdit,
@@ -13594,8 +13918,8 @@ var BaseUserProfile = ({
13594
13918
  if (!shouldShow) {
13595
13919
  return null;
13596
13920
  }
13597
- return /* @__PURE__ */ jsxs39("div", { className: styles.field, children: [
13598
- /* @__PURE__ */ jsx94("div", { className: styles.fieldInner, children: renderSchemaField(
13921
+ return /* @__PURE__ */ jsxs41("div", { className: styles.field, children: [
13922
+ /* @__PURE__ */ jsx98("div", { className: styles.fieldInner, children: renderSchemaField(
13599
13923
  schema,
13600
13924
  isFieldEditing,
13601
13925
  (value) => {
@@ -13605,10 +13929,10 @@ var BaseUserProfile = ({
13605
13929
  },
13606
13930
  () => toggleFieldEdit(schema.name)
13607
13931
  ) }),
13608
- editable && schema.mutability !== "READ_ONLY" && !isReadonlyField && /* @__PURE__ */ jsxs39("div", { className: styles.fieldActions, children: [
13609
- isFieldEditing && /* @__PURE__ */ jsxs39(Fragment16, { children: [
13610
- /* @__PURE__ */ jsx94(Button_default, { size: "small", color: "primary", variant: "solid", onClick: () => handleFieldSave(schema), children: "Save" }),
13611
- /* @__PURE__ */ jsx94(
13932
+ editable && schema.mutability !== "READ_ONLY" && !isReadonlyField && /* @__PURE__ */ jsxs41("div", { className: styles.fieldActions, children: [
13933
+ isFieldEditing && /* @__PURE__ */ jsxs41(Fragment19, { children: [
13934
+ /* @__PURE__ */ jsx98(Button_default, { size: "small", color: "primary", variant: "solid", onClick: () => handleFieldSave(schema), children: "Save" }),
13935
+ /* @__PURE__ */ jsx98(
13612
13936
  Button_default,
13613
13937
  {
13614
13938
  size: "small",
@@ -13619,7 +13943,7 @@ var BaseUserProfile = ({
13619
13943
  }
13620
13944
  )
13621
13945
  ] }),
13622
- !isFieldEditing && hasValue && /* @__PURE__ */ jsx94(
13946
+ !isFieldEditing && hasValue && /* @__PURE__ */ jsx98(
13623
13947
  Button_default,
13624
13948
  {
13625
13949
  size: "small",
@@ -13628,7 +13952,7 @@ var BaseUserProfile = ({
13628
13952
  onClick: () => toggleFieldEdit(schema.name),
13629
13953
  title: "Edit",
13630
13954
  className: styles.editButton,
13631
- children: /* @__PURE__ */ jsx94(PencilIcon, {})
13955
+ children: /* @__PURE__ */ jsx98(PencilIcon, {})
13632
13956
  }
13633
13957
  )
13634
13958
  ] })
@@ -13651,9 +13975,9 @@ var BaseUserProfile = ({
13651
13975
  if (!shouldShowField(key)) return false;
13652
13976
  return value !== void 0 && value !== "" && value !== null;
13653
13977
  }).sort(([a], [b]) => a.localeCompare(b));
13654
- return /* @__PURE__ */ jsxs39(Fragment16, { children: [
13655
- /* @__PURE__ */ jsxs39("div", { className: styles.profileSummary, children: [
13656
- /* @__PURE__ */ jsx94(
13978
+ return /* @__PURE__ */ jsxs41(Fragment19, { children: [
13979
+ /* @__PURE__ */ jsxs41("div", { className: styles.profileSummary, children: [
13980
+ /* @__PURE__ */ jsx98(
13657
13981
  Avatar,
13658
13982
  {
13659
13983
  imageUrl: getMappedUserProfileValue_default("picture", mergedMappings, currentUser),
@@ -13663,32 +13987,32 @@ var BaseUserProfile = ({
13663
13987
  isLoading
13664
13988
  }
13665
13989
  ),
13666
- /* @__PURE__ */ jsx94(Typography_default, { variant: "h3", fontWeight: "medium", children: displayName }),
13667
- getMappedUserProfileValue_default("email", mergedMappings, currentUser) && /* @__PURE__ */ jsx94(Typography_default, { variant: "body2", color: "textSecondary", children: getMappedUserProfileValue_default("email", mergedMappings, currentUser) })
13990
+ /* @__PURE__ */ jsx98(Typography_default, { variant: "h3", fontWeight: "medium", children: displayName }),
13991
+ getMappedUserProfileValue_default("email", mergedMappings, currentUser) && /* @__PURE__ */ jsx98(Typography_default, { variant: "body2", color: "textSecondary", children: getMappedUserProfileValue_default("email", mergedMappings, currentUser) })
13668
13992
  ] }),
13669
- /* @__PURE__ */ jsx94(Divider_default, {}),
13670
- profileEntries.map(([key, value], index) => /* @__PURE__ */ jsxs39("div", { children: [
13671
- /* @__PURE__ */ jsxs39("div", { className: styles.sectionRow, children: [
13672
- /* @__PURE__ */ jsx94("div", { className: styles.sectionLabel, children: formatLabel(key) }),
13673
- /* @__PURE__ */ jsx94("div", { className: styles.sectionValue, children: typeof value === "object" ? /* @__PURE__ */ jsx94(ObjectDisplay, { data: value }) : String(value) })
13993
+ /* @__PURE__ */ jsx98(Divider_default, {}),
13994
+ profileEntries.map(([key, value], index) => /* @__PURE__ */ jsxs41("div", { children: [
13995
+ /* @__PURE__ */ jsxs41("div", { className: styles.sectionRow, children: [
13996
+ /* @__PURE__ */ jsx98("div", { className: styles.sectionLabel, children: formatLabel(key) }),
13997
+ /* @__PURE__ */ jsx98("div", { className: styles.sectionValue, children: typeof value === "object" ? /* @__PURE__ */ jsx98(ObjectDisplay, { data: value }) : String(value) })
13674
13998
  ] }),
13675
- index < profileEntries.length - 1 && /* @__PURE__ */ jsx94(Divider_default, {})
13999
+ index < profileEntries.length - 1 && /* @__PURE__ */ jsx98(Divider_default, {})
13676
14000
  ] }, key))
13677
14001
  ] });
13678
14002
  };
13679
- const profileContent = /* @__PURE__ */ jsxs39(Card_default, { className: containerClasses, children: [
13680
- error && /* @__PURE__ */ jsxs39(
14003
+ const profileContent = /* @__PURE__ */ jsxs41(Card_default, { className: containerClasses, children: [
14004
+ error && /* @__PURE__ */ jsxs41(
13681
14005
  Alert_default,
13682
14006
  {
13683
14007
  variant: "error",
13684
14008
  className: cx28(withVendorCSSClassPrefix27(bem19("user-profile", "alert")), styles.alert),
13685
14009
  children: [
13686
- /* @__PURE__ */ jsx94(Alert_default.Title, { children: t("errors.heading") || "Error" }),
13687
- /* @__PURE__ */ jsx94(Alert_default.Description, { children: error })
14010
+ /* @__PURE__ */ jsx98(Alert_default.Title, { children: t("errors.heading") || "Error" }),
14011
+ /* @__PURE__ */ jsx98(Alert_default.Description, { children: error })
13688
14012
  ]
13689
14013
  }
13690
14014
  ),
13691
- schemas && schemas.length > 0 && /* @__PURE__ */ jsx94("div", { className: styles.header, children: /* @__PURE__ */ jsx94(
14015
+ schemas && schemas.length > 0 && /* @__PURE__ */ jsx98("div", { className: styles.header, children: /* @__PURE__ */ jsx98(
13692
14016
  Avatar,
13693
14017
  {
13694
14018
  imageUrl: getMappedUserProfileValue_default("picture", mergedMappings, currentUser),
@@ -13698,7 +14022,7 @@ var BaseUserProfile = ({
13698
14022
  isLoading
13699
14023
  }
13700
14024
  ) }),
13701
- /* @__PURE__ */ jsx94("div", { className: styles.infoContainer, children: schemas && schemas.length > 0 ? schemas.filter((schema) => {
14025
+ /* @__PURE__ */ jsx98("div", { className: styles.infoContainer, children: schemas && schemas.length > 0 ? schemas.filter((schema) => {
13702
14026
  if (!schema.name || !shouldShowField(schema.name)) return false;
13703
14027
  if (!editable) {
13704
14028
  const value = flattenedProfile && schema.name ? flattenedProfile[schema.name] : void 0;
@@ -13715,13 +14039,13 @@ var BaseUserProfile = ({
13715
14039
  ...schema,
13716
14040
  value
13717
14041
  };
13718
- return /* @__PURE__ */ jsx94("div", { className: styles.info, children: renderUserInfo(schemaWithValue) }, schema.name || index);
14042
+ return /* @__PURE__ */ jsx98("div", { className: styles.info, children: renderUserInfo(schemaWithValue) }, schema.name || index);
13719
14043
  }) : renderProfileWithoutSchemas() })
13720
14044
  ] });
13721
14045
  if (mode === "popup") {
13722
- return /* @__PURE__ */ jsx94(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs39(Dialog_default.Content, { children: [
13723
- /* @__PURE__ */ jsx94(Dialog_default.Heading, { children: title ?? t("user.profile.heading") }),
13724
- /* @__PURE__ */ jsx94("div", { className: styles.popup, children: profileContent })
14046
+ return /* @__PURE__ */ jsx98(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs41(Dialog_default.Content, { children: [
14047
+ /* @__PURE__ */ jsx98(Dialog_default.Heading, { children: title ?? t("user.profile.heading") }),
14048
+ /* @__PURE__ */ jsx98("div", { className: styles.popup, children: profileContent })
13725
14049
  ] }) });
13726
14050
  }
13727
14051
  return profileContent;
@@ -13730,7 +14054,7 @@ var BaseUserProfile_default = BaseUserProfile;
13730
14054
 
13731
14055
  // src/components/presentation/UserProfile/UserProfile.tsx
13732
14056
  import { AsgardeoError } from "@asgardeo/browser";
13733
- import { useState as useState25 } from "react";
14057
+ import { useState as useState26 } from "react";
13734
14058
 
13735
14059
  // src/api/updateMeProfile.ts
13736
14060
  import {
@@ -13763,12 +14087,12 @@ var updateMeProfile = async ({ fetcher, instanceId = 0, ...requestConfig }) => {
13763
14087
  var updateMeProfile_default = updateMeProfile;
13764
14088
 
13765
14089
  // src/components/presentation/UserProfile/UserProfile.tsx
13766
- import { jsx as jsx95 } from "react/jsx-runtime";
14090
+ import { jsx as jsx99 } from "react/jsx-runtime";
13767
14091
  var UserProfile3 = ({ preferences, ...rest }) => {
13768
14092
  const { baseUrl, instanceId } = useAsgardeo_default();
13769
14093
  const { profile, flattenedProfile, schemas, onUpdateProfile } = useUser_default();
13770
14094
  const { t } = useTranslation_default(preferences?.i18n);
13771
- const [error, setError] = useState25(null);
14095
+ const [error, setError] = useState26(null);
13772
14096
  const handleProfileUpdate = async (payload) => {
13773
14097
  setError(null);
13774
14098
  try {
@@ -13782,7 +14106,7 @@ var UserProfile3 = ({ preferences, ...rest }) => {
13782
14106
  setError(message);
13783
14107
  }
13784
14108
  };
13785
- return /* @__PURE__ */ jsx95(
14109
+ return /* @__PURE__ */ jsx99(
13786
14110
  BaseUserProfile_default,
13787
14111
  {
13788
14112
  profile,
@@ -13813,7 +14137,7 @@ import {
13813
14137
  FloatingFocusManager as FloatingFocusManager2,
13814
14138
  FloatingPortal as FloatingPortal2
13815
14139
  } from "@floating-ui/react";
13816
- import { useState as useState26 } from "react";
14140
+ import { useState as useState27 } from "react";
13817
14141
 
13818
14142
  // src/components/presentation/UserDropdown/BaseUserDropdown.styles.ts
13819
14143
  import { css as css25 } from "@emotion/css";
@@ -14005,7 +14329,7 @@ var useStyles24 = (theme, colorScheme) => useMemo35(() => {
14005
14329
  var BaseUserDropdown_styles_default = useStyles24;
14006
14330
 
14007
14331
  // src/components/presentation/UserDropdown/BaseUserDropdown.tsx
14008
- import { jsx as jsx96, jsxs as jsxs40 } from "react/jsx-runtime";
14332
+ import { jsx as jsx100, jsxs as jsxs42 } from "react/jsx-runtime";
14009
14333
  var BaseUserDropdown = ({
14010
14334
  fallback = null,
14011
14335
  className = "",
@@ -14021,8 +14345,8 @@ var BaseUserDropdown = ({
14021
14345
  }) => {
14022
14346
  const { theme, colorScheme } = useTheme_default();
14023
14347
  const styles = BaseUserDropdown_styles_default(theme, colorScheme);
14024
- const [isOpen, setIsOpen] = useState26(false);
14025
- const [hoveredItemIndex, setHoveredItemIndex] = useState26(null);
14348
+ const [isOpen, setIsOpen] = useState27(false);
14349
+ const [hoveredItemIndex, setHoveredItemIndex] = useState27(null);
14026
14350
  const { refs, floatingStyles, context } = useFloating2({
14027
14351
  middleware: [offset(5), flip({ fallbackAxisSideDirection: "end" }), shift({ padding: 5 })],
14028
14352
  onOpenChange: setIsOpen,
@@ -14057,14 +14381,14 @@ var BaseUserDropdown = ({
14057
14381
  const defaultMenuItems = [];
14058
14382
  if (onManageProfile) {
14059
14383
  defaultMenuItems.push({
14060
- icon: /* @__PURE__ */ jsx96(User_default2, { width: "16", height: "16" }),
14384
+ icon: /* @__PURE__ */ jsx100(User_default2, { width: "16", height: "16" }),
14061
14385
  label: "Manage Profile",
14062
14386
  onClick: onManageProfile
14063
14387
  });
14064
14388
  }
14065
14389
  if (onSignOut) {
14066
14390
  defaultMenuItems.push({
14067
- icon: /* @__PURE__ */ jsx96(LogOut_default, { width: "16", height: "16" }),
14391
+ icon: /* @__PURE__ */ jsx100(LogOut_default, { width: "16", height: "16" }),
14068
14392
  label: "Sign Out",
14069
14393
  onClick: onSignOut
14070
14394
  });
@@ -14076,8 +14400,8 @@ var BaseUserDropdown = ({
14076
14400
  }
14077
14401
  allMenuItems.push(...defaultMenuItems);
14078
14402
  }
14079
- return /* @__PURE__ */ jsxs40("div", { className: cx29(withVendorCSSClassPrefix28("user-dropdown"), className), children: [
14080
- /* @__PURE__ */ jsxs40(
14403
+ return /* @__PURE__ */ jsxs42("div", { className: cx29(withVendorCSSClassPrefix28("user-dropdown"), className), children: [
14404
+ /* @__PURE__ */ jsxs42(
14081
14405
  Button_default,
14082
14406
  {
14083
14407
  ref: refs.setReference,
@@ -14088,7 +14412,7 @@ var BaseUserDropdown = ({
14088
14412
  "data-testid": "asgardeo-user-dropdown-trigger",
14089
14413
  ...getReferenceProps(),
14090
14414
  children: [
14091
- /* @__PURE__ */ jsx96(
14415
+ /* @__PURE__ */ jsx100(
14092
14416
  Avatar,
14093
14417
  {
14094
14418
  imageUrl: getMappedUserProfileValue_default("picture", mergedMappings, user),
@@ -14097,7 +14421,7 @@ var BaseUserDropdown = ({
14097
14421
  alt: `${getDisplayName_default(mergedMappings, user)}'s avatar`
14098
14422
  }
14099
14423
  ),
14100
- showTriggerLabel && /* @__PURE__ */ jsx96(
14424
+ showTriggerLabel && /* @__PURE__ */ jsx100(
14101
14425
  Typography_default,
14102
14426
  {
14103
14427
  variant: "body2",
@@ -14108,7 +14432,7 @@ var BaseUserDropdown = ({
14108
14432
  ]
14109
14433
  }
14110
14434
  ),
14111
- isOpen && /* @__PURE__ */ jsx96(FloatingPortal2, { id: portalId, children: /* @__PURE__ */ jsx96(FloatingFocusManager2, { context, modal: false, initialFocus: -1, children: /* @__PURE__ */ jsxs40(
14435
+ isOpen && /* @__PURE__ */ jsx100(FloatingPortal2, { id: portalId, children: /* @__PURE__ */ jsx100(FloatingFocusManager2, { context, modal: false, initialFocus: -1, children: /* @__PURE__ */ jsxs42(
14112
14436
  "div",
14113
14437
  {
14114
14438
  ref: refs.setFloating,
@@ -14121,8 +14445,8 @@ var BaseUserDropdown = ({
14121
14445
  },
14122
14446
  ...getFloatingProps(),
14123
14447
  children: [
14124
- /* @__PURE__ */ jsxs40("div", { className: cx29(withVendorCSSClassPrefix28("user-dropdown__header"), styles["dropdownHeader"]), children: [
14125
- /* @__PURE__ */ jsx96(
14448
+ /* @__PURE__ */ jsxs42("div", { className: cx29(withVendorCSSClassPrefix28("user-dropdown__header"), styles["dropdownHeader"]), children: [
14449
+ /* @__PURE__ */ jsx100(
14126
14450
  Avatar,
14127
14451
  {
14128
14452
  imageUrl: getMappedUserProfileValue_default("picture", mergedMappings, user),
@@ -14131,8 +14455,8 @@ var BaseUserDropdown = ({
14131
14455
  alt: `${getDisplayName_default(mergedMappings, user)}'s avatar`
14132
14456
  }
14133
14457
  ),
14134
- /* @__PURE__ */ jsxs40("div", { className: cx29(withVendorCSSClassPrefix28("user-dropdown__header-info"), styles["headerInfo"]), children: [
14135
- /* @__PURE__ */ jsx96(
14458
+ /* @__PURE__ */ jsxs42("div", { className: cx29(withVendorCSSClassPrefix28("user-dropdown__header-info"), styles["headerInfo"]), children: [
14459
+ /* @__PURE__ */ jsx100(
14136
14460
  Typography_default,
14137
14461
  {
14138
14462
  noWrap: true,
@@ -14142,7 +14466,7 @@ var BaseUserDropdown = ({
14142
14466
  children: getDisplayName_default(mergedMappings, user)
14143
14467
  }
14144
14468
  ),
14145
- /* @__PURE__ */ jsx96(
14469
+ /* @__PURE__ */ jsx100(
14146
14470
  Typography_default,
14147
14471
  {
14148
14472
  noWrap: true,
@@ -14154,9 +14478,9 @@ var BaseUserDropdown = ({
14154
14478
  )
14155
14479
  ] })
14156
14480
  ] }),
14157
- /* @__PURE__ */ jsx96("div", { className: cx29(withVendorCSSClassPrefix28("user-dropdown__menu"), styles["dropdownMenu"]), children: allMenuItems.map((item, index) => /* @__PURE__ */ jsx96("div", { children: (() => {
14481
+ /* @__PURE__ */ jsx100("div", { className: cx29(withVendorCSSClassPrefix28("user-dropdown__menu"), styles["dropdownMenu"]), children: allMenuItems.map((item, index) => /* @__PURE__ */ jsx100("div", { children: (() => {
14158
14482
  if (item.label === "") {
14159
- return /* @__PURE__ */ jsx96(
14483
+ return /* @__PURE__ */ jsx100(
14160
14484
  "div",
14161
14485
  {
14162
14486
  className: cx29(withVendorCSSClassPrefix28("user-dropdown__menu-divider"), styles["divider"])
@@ -14164,7 +14488,7 @@ var BaseUserDropdown = ({
14164
14488
  );
14165
14489
  }
14166
14490
  if (item.href) {
14167
- return /* @__PURE__ */ jsxs40(
14491
+ return /* @__PURE__ */ jsxs42(
14168
14492
  "a",
14169
14493
  {
14170
14494
  href: item.href,
@@ -14181,12 +14505,12 @@ var BaseUserDropdown = ({
14181
14505
  onBlur: () => setHoveredItemIndex(null),
14182
14506
  children: [
14183
14507
  item.icon,
14184
- /* @__PURE__ */ jsx96("span", { children: item.label })
14508
+ /* @__PURE__ */ jsx100("span", { children: item.label })
14185
14509
  ]
14186
14510
  }
14187
14511
  );
14188
14512
  }
14189
- return /* @__PURE__ */ jsx96(
14513
+ return /* @__PURE__ */ jsx100(
14190
14514
  Button_default,
14191
14515
  {
14192
14516
  onClick: () => handleMenuItemClick(item),
@@ -14212,8 +14536,8 @@ var BaseUserDropdown = ({
14212
14536
  var BaseUserDropdown_default = BaseUserDropdown;
14213
14537
 
14214
14538
  // src/components/presentation/UserDropdown/UserDropdown.tsx
14215
- import { useState as useState27 } from "react";
14216
- import { Fragment as Fragment17, jsx as jsx97, jsxs as jsxs41 } from "react/jsx-runtime";
14539
+ import { useState as useState28 } from "react";
14540
+ import { Fragment as Fragment20, jsx as jsx101, jsxs as jsxs43 } from "react/jsx-runtime";
14217
14541
  var UserDropdown = ({
14218
14542
  children,
14219
14543
  renderTrigger,
@@ -14222,7 +14546,7 @@ var UserDropdown = ({
14222
14546
  ...rest
14223
14547
  }) => {
14224
14548
  const { user, isLoading, signOut, meta } = useAsgardeo_default();
14225
- const [isProfileOpen, setIsProfileOpen] = useState27(false);
14549
+ const [isProfileOpen, setIsProfileOpen] = useState28(false);
14226
14550
  const handleManageProfile = () => {
14227
14551
  setIsProfileOpen(true);
14228
14552
  };
@@ -14245,14 +14569,14 @@ var UserDropdown = ({
14245
14569
  user
14246
14570
  };
14247
14571
  if (children) {
14248
- return /* @__PURE__ */ jsxs41(Fragment17, { children: [
14572
+ return /* @__PURE__ */ jsxs43(Fragment20, { children: [
14249
14573
  children(renderProps),
14250
- /* @__PURE__ */ jsx97(UserProfile_default, { mode: "popup", open: isProfileOpen, onOpenChange: setIsProfileOpen })
14574
+ /* @__PURE__ */ jsx101(UserProfile_default, { mode: "popup", open: isProfileOpen, onOpenChange: setIsProfileOpen })
14251
14575
  ] });
14252
14576
  }
14253
14577
  if (renderTrigger || renderDropdown) {
14254
- return /* @__PURE__ */ jsxs41(Fragment17, { children: [
14255
- renderTrigger ? renderTrigger(renderProps) : /* @__PURE__ */ jsx97(
14578
+ return /* @__PURE__ */ jsxs43(Fragment20, { children: [
14579
+ renderTrigger ? renderTrigger(renderProps) : /* @__PURE__ */ jsx101(
14256
14580
  BaseUserDropdown,
14257
14581
  {
14258
14582
  user,
@@ -14262,11 +14586,11 @@ var UserDropdown = ({
14262
14586
  ...rest
14263
14587
  }
14264
14588
  ),
14265
- /* @__PURE__ */ jsx97(UserProfile_default, { mode: "popup", open: isProfileOpen, onOpenChange: setIsProfileOpen })
14589
+ /* @__PURE__ */ jsx101(UserProfile_default, { mode: "popup", open: isProfileOpen, onOpenChange: setIsProfileOpen })
14266
14590
  ] });
14267
14591
  }
14268
- return /* @__PURE__ */ jsxs41(Fragment17, { children: [
14269
- /* @__PURE__ */ jsx97(
14592
+ return /* @__PURE__ */ jsxs43(Fragment20, { children: [
14593
+ /* @__PURE__ */ jsx101(
14270
14594
  BaseUserDropdown,
14271
14595
  {
14272
14596
  user,
@@ -14276,7 +14600,7 @@ var UserDropdown = ({
14276
14600
  ...rest
14277
14601
  }
14278
14602
  ),
14279
- isProfileOpen && /* @__PURE__ */ jsx97(UserProfile_default, { mode: "popup", open: isProfileOpen, onOpenChange: setIsProfileOpen })
14603
+ isProfileOpen && /* @__PURE__ */ jsx101(UserProfile_default, { mode: "popup", open: isProfileOpen, onOpenChange: setIsProfileOpen })
14280
14604
  ] });
14281
14605
  };
14282
14606
  var UserDropdown_default = UserDropdown;
@@ -14296,7 +14620,7 @@ import {
14296
14620
  FloatingFocusManager as FloatingFocusManager3,
14297
14621
  FloatingPortal as FloatingPortal3
14298
14622
  } from "@floating-ui/react";
14299
- import { useState as useState28 } from "react";
14623
+ import { useState as useState29 } from "react";
14300
14624
 
14301
14625
  // src/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.styles.ts
14302
14626
  import { css as css26 } from "@emotion/css";
@@ -14524,9 +14848,9 @@ var useStyles25 = (theme, colorScheme) => useMemo36(() => {
14524
14848
  var BaseOrganizationSwitcher_styles_default = useStyles25;
14525
14849
 
14526
14850
  // src/components/primitives/Icons/Building.tsx
14527
- import { jsx as jsx98, jsxs as jsxs42 } from "react/jsx-runtime";
14528
- var Building = ({ color = "currentColor", height = 24, width = 24 }) => /* @__PURE__ */ jsxs42("svg", { width, height, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
14529
- /* @__PURE__ */ jsx98(
14851
+ import { jsx as jsx102, jsxs as jsxs44 } from "react/jsx-runtime";
14852
+ var Building = ({ color = "currentColor", height = 24, width = 24 }) => /* @__PURE__ */ jsxs44("svg", { width, height, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
14853
+ /* @__PURE__ */ jsx102(
14530
14854
  "path",
14531
14855
  {
14532
14856
  d: "M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",
@@ -14536,30 +14860,30 @@ var Building = ({ color = "currentColor", height = 24, width = 24 }) => /* @__PU
14536
14860
  strokeLinejoin: "round"
14537
14861
  }
14538
14862
  ),
14539
- /* @__PURE__ */ jsx98("path", { d: "M6 12h4", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
14540
- /* @__PURE__ */ jsx98("path", { d: "M6 8h4", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
14541
- /* @__PURE__ */ jsx98("path", { d: "M14 8h4", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
14542
- /* @__PURE__ */ jsx98("path", { d: "M14 12h4", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
14543
- /* @__PURE__ */ jsx98("path", { d: "M6 18h4", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
14544
- /* @__PURE__ */ jsx98("path", { d: "M14 18h4", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
14863
+ /* @__PURE__ */ jsx102("path", { d: "M6 12h4", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
14864
+ /* @__PURE__ */ jsx102("path", { d: "M6 8h4", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
14865
+ /* @__PURE__ */ jsx102("path", { d: "M14 8h4", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
14866
+ /* @__PURE__ */ jsx102("path", { d: "M14 12h4", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
14867
+ /* @__PURE__ */ jsx102("path", { d: "M6 18h4", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
14868
+ /* @__PURE__ */ jsx102("path", { d: "M14 18h4", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
14545
14869
  ] });
14546
14870
  Building.displayName = "Building";
14547
14871
  var Building_default = Building;
14548
14872
 
14549
14873
  // src/components/primitives/Icons/Check.tsx
14550
- import { jsx as jsx99 } from "react/jsx-runtime";
14551
- var Check = ({ color = "currentColor", height = 24, width = 24 }) => /* @__PURE__ */ jsx99("svg", { width, height, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx99("path", { d: "M20 6 9 17l-5-5", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) });
14874
+ import { jsx as jsx103 } from "react/jsx-runtime";
14875
+ var Check = ({ color = "currentColor", height = 24, width = 24 }) => /* @__PURE__ */ jsx103("svg", { width, height, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx103("path", { d: "M20 6 9 17l-5-5", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) });
14552
14876
  Check.displayName = "Check";
14553
14877
  var Check_default = Check;
14554
14878
 
14555
14879
  // src/components/primitives/Icons/ChevronDown.tsx
14556
- import { jsx as jsx100 } from "react/jsx-runtime";
14557
- var ChevronDown = ({ color = "currentColor", height = 24, width = 24 }) => /* @__PURE__ */ jsx100("svg", { width, height, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx100("path", { d: "m6 9 6 6 6-6", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) });
14880
+ import { jsx as jsx104 } from "react/jsx-runtime";
14881
+ var ChevronDown = ({ color = "currentColor", height = 24, width = 24 }) => /* @__PURE__ */ jsx104("svg", { width, height, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx104("path", { d: "m6 9 6 6 6-6", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) });
14558
14882
  ChevronDown.displayName = "ChevronDown";
14559
14883
  var ChevronDown_default = ChevronDown;
14560
14884
 
14561
14885
  // src/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.tsx
14562
- import { Fragment as Fragment18, jsx as jsx101, jsxs as jsxs43 } from "react/jsx-runtime";
14886
+ import { Fragment as Fragment21, jsx as jsx105, jsxs as jsxs45 } from "react/jsx-runtime";
14563
14887
  var BaseOrganizationSwitcher = ({
14564
14888
  organizations,
14565
14889
  currentOrganization,
@@ -14583,8 +14907,8 @@ var BaseOrganizationSwitcher = ({
14583
14907
  }) => {
14584
14908
  const { theme, colorScheme, direction } = useTheme_default();
14585
14909
  const styles = BaseOrganizationSwitcher_styles_default(theme, colorScheme);
14586
- const [isOpen, setIsOpen] = useState28(false);
14587
- const [hoveredItemIndex, setHoveredItemIndex] = useState28(null);
14910
+ const [isOpen, setIsOpen] = useState29(false);
14911
+ const [hoveredItemIndex, setHoveredItemIndex] = useState29(null);
14588
14912
  const { t } = useTranslation_default(preferences?.i18n);
14589
14913
  const isRTL = direction === "rtl";
14590
14914
  const { refs, floatingStyles, context } = useFloating3({
@@ -14614,8 +14938,8 @@ var BaseOrganizationSwitcher = ({
14614
14938
  const switchableOrganizations = organizations.filter(
14615
14939
  (org) => org.id !== currentOrganization?.id
14616
14940
  );
14617
- const defaultRenderOrganization2 = (organization, isSelected) => /* @__PURE__ */ jsxs43(Fragment18, { children: [
14618
- /* @__PURE__ */ jsx101(
14941
+ const defaultRenderOrganization2 = (organization, isSelected) => /* @__PURE__ */ jsxs45(Fragment21, { children: [
14942
+ /* @__PURE__ */ jsx105(
14619
14943
  Avatar,
14620
14944
  {
14621
14945
  variant: "square",
@@ -14625,24 +14949,24 @@ var BaseOrganizationSwitcher = ({
14625
14949
  alt: `${organization.name} avatar`
14626
14950
  }
14627
14951
  ),
14628
- /* @__PURE__ */ jsxs43("div", { className: cx30(styles["organizationInfo"]), children: [
14629
- /* @__PURE__ */ jsx101(Typography_default, { variant: "body2", fontWeight: "medium", className: cx30(styles["organizationName"]), children: organization.name }),
14630
- /* @__PURE__ */ jsxs43("div", { className: cx30(styles["organizationMeta"]), children: [
14631
- showMemberCount && organization.memberCount !== void 0 && /* @__PURE__ */ jsxs43("span", { children: [
14952
+ /* @__PURE__ */ jsxs45("div", { className: cx30(styles["organizationInfo"]), children: [
14953
+ /* @__PURE__ */ jsx105(Typography_default, { variant: "body2", fontWeight: "medium", className: cx30(styles["organizationName"]), children: organization.name }),
14954
+ /* @__PURE__ */ jsxs45("div", { className: cx30(styles["organizationMeta"]), children: [
14955
+ showMemberCount && organization.memberCount !== void 0 && /* @__PURE__ */ jsxs45("span", { children: [
14632
14956
  organization.memberCount,
14633
14957
  " ",
14634
14958
  organization.memberCount === 1 ? t("organization.switcher.member") : t("organization.switcher.members")
14635
14959
  ] }),
14636
- showRole && organization.role && showMemberCount && organization.memberCount !== void 0 && /* @__PURE__ */ jsx101("span", { children: " \u2022 " }),
14637
- showRole && organization.role && /* @__PURE__ */ jsx101("span", { className: cx30(styles["roleCapitalized"]), children: organization.role })
14960
+ showRole && organization.role && showMemberCount && organization.memberCount !== void 0 && /* @__PURE__ */ jsx105("span", { children: " \u2022 " }),
14961
+ showRole && organization.role && /* @__PURE__ */ jsx105("span", { className: cx30(styles["roleCapitalized"]), children: organization.role })
14638
14962
  ] })
14639
14963
  ] }),
14640
- isSelected && /* @__PURE__ */ jsx101(Check_default, { width: "16", height: "16", color: theme.vars.colors.text.primary })
14964
+ isSelected && /* @__PURE__ */ jsx105(Check_default, { width: "16", height: "16", color: theme.vars.colors.text.primary })
14641
14965
  ] });
14642
- const defaultRenderLoading2 = () => /* @__PURE__ */ jsx101("div", { className: cx30(styles["loadingContainer"]), children: /* @__PURE__ */ jsx101(Typography_default, { variant: "caption", className: cx30(styles["loadingText"]), children: t("organization.switcher.loading.placeholder.organizations") }) });
14643
- const defaultRenderError2 = (errorMessage) => /* @__PURE__ */ jsx101("div", { className: cx30(styles["errorContainer"]), children: /* @__PURE__ */ jsx101(Typography_default, { variant: "caption", className: cx30(styles["errorText"]), children: errorMessage }) });
14644
- return /* @__PURE__ */ jsxs43("div", { className: cx30(styles["root"], className), style, children: [
14645
- /* @__PURE__ */ jsxs43(
14966
+ const defaultRenderLoading2 = () => /* @__PURE__ */ jsx105("div", { className: cx30(styles["loadingContainer"]), children: /* @__PURE__ */ jsx105(Typography_default, { variant: "caption", className: cx30(styles["loadingText"]), children: t("organization.switcher.loading.placeholder.organizations") }) });
14967
+ const defaultRenderError2 = (errorMessage) => /* @__PURE__ */ jsx105("div", { className: cx30(styles["errorContainer"]), children: /* @__PURE__ */ jsx105(Typography_default, { variant: "caption", className: cx30(styles["errorText"]), children: errorMessage }) });
14968
+ return /* @__PURE__ */ jsxs45("div", { className: cx30(styles["root"], className), style, children: [
14969
+ /* @__PURE__ */ jsxs45(
14646
14970
  Button_default,
14647
14971
  {
14648
14972
  ref: refs.setReference,
@@ -14652,8 +14976,8 @@ var BaseOrganizationSwitcher = ({
14652
14976
  size: "medium",
14653
14977
  ...getReferenceProps(),
14654
14978
  children: [
14655
- currentOrganization ? /* @__PURE__ */ jsxs43(Fragment18, { children: [
14656
- /* @__PURE__ */ jsx101(
14979
+ currentOrganization ? /* @__PURE__ */ jsxs45(Fragment21, { children: [
14980
+ /* @__PURE__ */ jsx105(
14657
14981
  Avatar,
14658
14982
  {
14659
14983
  variant: "square",
@@ -14663,16 +14987,16 @@ var BaseOrganizationSwitcher = ({
14663
14987
  alt: `${currentOrganization.name} avatar`
14664
14988
  }
14665
14989
  ),
14666
- showTriggerLabel && /* @__PURE__ */ jsx101(Typography_default, { variant: "body2", className: cx30(styles["triggerLabel"]), children: currentOrganization.name })
14667
- ] }) : /* @__PURE__ */ jsxs43(Fragment18, { children: [
14668
- /* @__PURE__ */ jsx101(Building_default, { width: avatarSize, height: avatarSize }),
14669
- showTriggerLabel && /* @__PURE__ */ jsx101(Typography_default, { variant: "body2", className: cx30(styles["triggerLabel"]), children: t("elements.fields.organization.select.label") })
14990
+ showTriggerLabel && /* @__PURE__ */ jsx105(Typography_default, { variant: "body2", className: cx30(styles["triggerLabel"]), children: currentOrganization.name })
14991
+ ] }) : /* @__PURE__ */ jsxs45(Fragment21, { children: [
14992
+ /* @__PURE__ */ jsx105(Building_default, { width: avatarSize, height: avatarSize }),
14993
+ showTriggerLabel && /* @__PURE__ */ jsx105(Typography_default, { variant: "body2", className: cx30(styles["triggerLabel"]), children: t("elements.fields.organization.select.label") })
14670
14994
  ] }),
14671
- /* @__PURE__ */ jsx101("span", { style: { display: "inline-flex", transform: isRTL ? "scaleX(-1)" : "none" }, children: /* @__PURE__ */ jsx101(ChevronDown_default, { width: "16", height: "16" }) })
14995
+ /* @__PURE__ */ jsx105("span", { style: { display: "inline-flex", transform: isRTL ? "scaleX(-1)" : "none" }, children: /* @__PURE__ */ jsx105(ChevronDown_default, { width: "16", height: "16" }) })
14672
14996
  ]
14673
14997
  }
14674
14998
  ),
14675
- isOpen && /* @__PURE__ */ jsx101(FloatingPortal3, { id: portalId, children: /* @__PURE__ */ jsx101(FloatingFocusManager3, { context, modal: false, initialFocus: -1, children: /* @__PURE__ */ jsxs43(
14999
+ isOpen && /* @__PURE__ */ jsx105(FloatingPortal3, { id: portalId, children: /* @__PURE__ */ jsx105(FloatingFocusManager3, { context, modal: false, initialFocus: -1, children: /* @__PURE__ */ jsxs45(
14676
15000
  "div",
14677
15001
  {
14678
15002
  ref: refs.setFloating,
@@ -14680,8 +15004,8 @@ var BaseOrganizationSwitcher = ({
14680
15004
  style: floatingStyles,
14681
15005
  ...getFloatingProps(),
14682
15006
  children: [
14683
- currentOrganization && /* @__PURE__ */ jsxs43("div", { className: cx30(styles["header"]), children: [
14684
- /* @__PURE__ */ jsx101(
15007
+ currentOrganization && /* @__PURE__ */ jsxs45("div", { className: cx30(styles["header"]), children: [
15008
+ /* @__PURE__ */ jsx105(
14685
15009
  Avatar,
14686
15010
  {
14687
15011
  variant: "square",
@@ -14691,10 +15015,10 @@ var BaseOrganizationSwitcher = ({
14691
15015
  alt: `${currentOrganization.name} avatar`
14692
15016
  }
14693
15017
  ),
14694
- /* @__PURE__ */ jsxs43("div", { className: cx30(styles["headerInfo"]), children: [
14695
- /* @__PURE__ */ jsx101(Typography_default, { noWrap: true, className: cx30(styles["headerName"]), variant: "body1", fontWeight: "medium", children: currentOrganization.name }),
14696
- /* @__PURE__ */ jsxs43("div", { className: cx30(styles["headerMeta"]), children: [
14697
- showMemberCount && currentOrganization.memberCount !== void 0 && /* @__PURE__ */ jsxs43(
15018
+ /* @__PURE__ */ jsxs45("div", { className: cx30(styles["headerInfo"]), children: [
15019
+ /* @__PURE__ */ jsx105(Typography_default, { noWrap: true, className: cx30(styles["headerName"]), variant: "body1", fontWeight: "medium", children: currentOrganization.name }),
15020
+ /* @__PURE__ */ jsxs45("div", { className: cx30(styles["headerMeta"]), children: [
15021
+ showMemberCount && currentOrganization.memberCount !== void 0 && /* @__PURE__ */ jsxs45(
14698
15022
  Typography_default,
14699
15023
  {
14700
15024
  noWrap: true,
@@ -14704,17 +15028,17 @@ var BaseOrganizationSwitcher = ({
14704
15028
  currentOrganization.memberCount,
14705
15029
  " ",
14706
15030
  currentOrganization.memberCount === 1 ? t("organization.switcher.member") : t("organization.switcher.members"),
14707
- showRole && currentOrganization.role && /* @__PURE__ */ jsxs43("span", { children: [
15031
+ showRole && currentOrganization.role && /* @__PURE__ */ jsxs45("span", { children: [
14708
15032
  " \u2022 ",
14709
15033
  currentOrganization.role
14710
15034
  ] })
14711
15035
  ]
14712
15036
  }
14713
15037
  ),
14714
- showRole && currentOrganization.role && (!showMemberCount || currentOrganization.memberCount === void 0) && /* @__PURE__ */ jsx101(Typography_default, { noWrap: true, className: cx30(styles["headerRole"]), variant: "caption", color: "secondary", children: currentOrganization.role })
15038
+ showRole && currentOrganization.role && (!showMemberCount || currentOrganization.memberCount === void 0) && /* @__PURE__ */ jsx105(Typography_default, { noWrap: true, className: cx30(styles["headerRole"]), variant: "caption", color: "secondary", children: currentOrganization.role })
14715
15039
  ] })
14716
15040
  ] }),
14717
- onManageProfile && /* @__PURE__ */ jsx101(
15041
+ onManageProfile && /* @__PURE__ */ jsx105(
14718
15042
  Button_default,
14719
15043
  {
14720
15044
  onClick: onManageProfile,
@@ -14723,7 +15047,7 @@ var BaseOrganizationSwitcher = ({
14723
15047
  size: "small",
14724
15048
  "aria-label": "Manage Organization Profile",
14725
15049
  className: cx30(styles["manageButton"]),
14726
- endIcon: /* @__PURE__ */ jsxs43(
15050
+ endIcon: /* @__PURE__ */ jsxs45(
14727
15051
  "svg",
14728
15052
  {
14729
15053
  width: "16",
@@ -14735,8 +15059,8 @@ var BaseOrganizationSwitcher = ({
14735
15059
  strokeLinecap: "round",
14736
15060
  strokeLinejoin: "round",
14737
15061
  children: [
14738
- /* @__PURE__ */ jsx101("circle", { cx: "12", cy: "12", r: "3" }),
14739
- /* @__PURE__ */ jsx101("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1 1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" })
15062
+ /* @__PURE__ */ jsx105("circle", { cx: "12", cy: "12", r: "3" }),
15063
+ /* @__PURE__ */ jsx105("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1 1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" })
14740
15064
  ]
14741
15065
  }
14742
15066
  ),
@@ -14744,27 +15068,27 @@ var BaseOrganizationSwitcher = ({
14744
15068
  }
14745
15069
  )
14746
15070
  ] }),
14747
- organizations.length > 1 && /* @__PURE__ */ jsx101(
15071
+ organizations.length > 1 && /* @__PURE__ */ jsx105(
14748
15072
  "div",
14749
15073
  {
14750
15074
  className: cx30(styles["header"], styles["sectionHeaderContainer"]),
14751
15075
  style: {
14752
15076
  borderTop: currentOrganization ? `1px solid ${theme.vars.colors.border}` : "none"
14753
15077
  },
14754
- children: /* @__PURE__ */ jsx101(Typography_default, { variant: "caption", fontWeight: 600, className: cx30(styles["sectionHeader"]), children: t("organization.switcher.switch.organization") })
15078
+ children: /* @__PURE__ */ jsx105(Typography_default, { variant: "caption", fontWeight: 600, className: cx30(styles["sectionHeader"]), children: t("organization.switcher.switch.organization") })
14755
15079
  }
14756
15080
  ),
14757
- /* @__PURE__ */ jsx101("div", { className: cx30(styles["menu"]), children: (() => {
15081
+ /* @__PURE__ */ jsx105("div", { className: cx30(styles["menu"]), children: (() => {
14758
15082
  if (loading) {
14759
15083
  return renderLoading ? renderLoading() : defaultRenderLoading2();
14760
15084
  }
14761
15085
  if (error) {
14762
15086
  return renderError ? renderError(error) : defaultRenderError2(error);
14763
15087
  }
14764
- return /* @__PURE__ */ jsxs43(Fragment18, { children: [
15088
+ return /* @__PURE__ */ jsxs45(Fragment21, { children: [
14765
15089
  switchableOrganizations.map((organization) => {
14766
15090
  const isSelected = false;
14767
- return /* @__PURE__ */ jsx101(
15091
+ return /* @__PURE__ */ jsx105(
14768
15092
  Button_default,
14769
15093
  {
14770
15094
  onClick: () => handleOrganizationSwitch(organization),
@@ -14782,10 +15106,10 @@ var BaseOrganizationSwitcher = ({
14782
15106
  organization.id
14783
15107
  );
14784
15108
  }),
14785
- menuItems.length > 0 && /* @__PURE__ */ jsxs43(Fragment18, { children: [
14786
- /* @__PURE__ */ jsx101("div", { className: cx30(styles["menuDivider"]) }),
15109
+ menuItems.length > 0 && /* @__PURE__ */ jsxs45(Fragment21, { children: [
15110
+ /* @__PURE__ */ jsx105("div", { className: cx30(styles["menuDivider"]) }),
14787
15111
  menuItems.map(
14788
- (item, index) => /* @__PURE__ */ jsx101("div", { children: item.href ? /* @__PURE__ */ jsxs43(
15112
+ (item, index) => /* @__PURE__ */ jsx105("div", { children: item.href ? /* @__PURE__ */ jsxs45(
14789
15113
  "a",
14790
15114
  {
14791
15115
  href: item.href,
@@ -14799,10 +15123,10 @@ var BaseOrganizationSwitcher = ({
14799
15123
  onBlur: () => setHoveredItemIndex(null),
14800
15124
  children: [
14801
15125
  item.icon,
14802
- /* @__PURE__ */ jsx101("span", { children: item.label })
15126
+ /* @__PURE__ */ jsx105("span", { children: item.label })
14803
15127
  ]
14804
15128
  }
14805
- ) : /* @__PURE__ */ jsx101(
15129
+ ) : /* @__PURE__ */ jsx105(
14806
15130
  Button_default,
14807
15131
  {
14808
15132
  onClick: () => handleMenuItemClick(item),
@@ -14831,11 +15155,11 @@ var BaseOrganizationSwitcher = ({
14831
15155
  var BaseOrganizationSwitcher_default = BaseOrganizationSwitcher;
14832
15156
 
14833
15157
  // src/components/presentation/OrganizationSwitcher/OrganizationSwitcher.tsx
14834
- import { useState as useState35 } from "react";
15158
+ import { useState as useState36 } from "react";
14835
15159
 
14836
15160
  // src/components/primitives/Icons/BuildingAlt.tsx
14837
- import { jsx as jsx102, jsxs as jsxs44 } from "react/jsx-runtime";
14838
- var BuildingAlt = ({ height = 24, width = 24 }) => /* @__PURE__ */ jsxs44(
15161
+ import { jsx as jsx106, jsxs as jsxs46 } from "react/jsx-runtime";
15162
+ var BuildingAlt = ({ height = 24, width = 24 }) => /* @__PURE__ */ jsxs46(
14839
15163
  "svg",
14840
15164
  {
14841
15165
  width,
@@ -14848,13 +15172,13 @@ var BuildingAlt = ({ height = 24, width = 24 }) => /* @__PURE__ */ jsxs44(
14848
15172
  strokeLinecap: "round",
14849
15173
  strokeLinejoin: "round",
14850
15174
  children: [
14851
- /* @__PURE__ */ jsx102("path", { d: "M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z" }),
14852
- /* @__PURE__ */ jsx102("path", { d: "M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2" }),
14853
- /* @__PURE__ */ jsx102("path", { d: "M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2" }),
14854
- /* @__PURE__ */ jsx102("path", { d: "M10 6h4" }),
14855
- /* @__PURE__ */ jsx102("path", { d: "M10 10h4" }),
14856
- /* @__PURE__ */ jsx102("path", { d: "M10 14h4" }),
14857
- /* @__PURE__ */ jsx102("path", { d: "M10 18h4" })
15175
+ /* @__PURE__ */ jsx106("path", { d: "M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z" }),
15176
+ /* @__PURE__ */ jsx106("path", { d: "M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2" }),
15177
+ /* @__PURE__ */ jsx106("path", { d: "M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2" }),
15178
+ /* @__PURE__ */ jsx106("path", { d: "M10 6h4" }),
15179
+ /* @__PURE__ */ jsx106("path", { d: "M10 10h4" }),
15180
+ /* @__PURE__ */ jsx106("path", { d: "M10 14h4" }),
15181
+ /* @__PURE__ */ jsx106("path", { d: "M10 18h4" })
14858
15182
  ]
14859
15183
  }
14860
15184
  );
@@ -14862,12 +15186,12 @@ BuildingAlt.displayName = "BuildingAlt";
14862
15186
  var BuildingAlt_default = BuildingAlt;
14863
15187
 
14864
15188
  // src/components/presentation/CreateOrganization/CreateOrganization.tsx
14865
- import { useState as useState30 } from "react";
15189
+ import { useState as useState31 } from "react";
14866
15190
 
14867
15191
  // src/components/presentation/CreateOrganization/BaseCreateOrganization.tsx
14868
15192
  import { createPackageComponentLogger as createPackageComponentLogger8 } from "@asgardeo/browser";
14869
15193
  import { cx as cx31 } from "@emotion/css";
14870
- import { useState as useState29 } from "react";
15194
+ import { useState as useState30 } from "react";
14871
15195
 
14872
15196
  // src/components/presentation/CreateOrganization/BaseCreateOrganization.styles.ts
14873
15197
  import { css as css27 } from "@emotion/css";
@@ -15008,7 +15332,7 @@ var useStyles26 = (theme, colorScheme) => useMemo37(() => {
15008
15332
  var BaseCreateOrganization_styles_default = useStyles26;
15009
15333
 
15010
15334
  // src/components/presentation/CreateOrganization/BaseCreateOrganization.tsx
15011
- import { jsx as jsx103, jsxs as jsxs45 } from "react/jsx-runtime";
15335
+ import { jsx as jsx107, jsxs as jsxs47 } from "react/jsx-runtime";
15012
15336
  var logger8 = createPackageComponentLogger8(
15013
15337
  "@asgardeo/react",
15014
15338
  "BaseCreateOrganization"
@@ -15035,13 +15359,13 @@ var BaseCreateOrganization = ({
15035
15359
  const { theme, colorScheme } = useTheme_default();
15036
15360
  const styles = BaseCreateOrganization_styles_default(theme, colorScheme);
15037
15361
  const { t } = useTranslation_default(preferences?.i18n);
15038
- const [formData, setFormData] = useState29({
15362
+ const [formData, setFormData] = useState30({
15039
15363
  description: "",
15040
15364
  handle: "",
15041
15365
  name: "",
15042
15366
  ...initialValues
15043
15367
  });
15044
- const [formErrors, setFormErrors] = useState29({});
15368
+ const [formErrors, setFormErrors] = useState30({});
15045
15369
  const validateForm = () => {
15046
15370
  const errors = {};
15047
15371
  if (!formData.name.trim()) {
@@ -15098,13 +15422,13 @@ var BaseCreateOrganization = ({
15098
15422
  logger8.error("Form submission error:");
15099
15423
  }
15100
15424
  };
15101
- const createOrganizationContent = /* @__PURE__ */ jsx103("div", { className: cx31(styles["root"], cardLayout && styles["card"], className), style, children: /* @__PURE__ */ jsxs45("div", { className: cx31(styles["content"]), children: [
15102
- /* @__PURE__ */ jsxs45("form", { id: "create-organization-form", className: cx31(styles["form"]), onSubmit: handleSubmit, children: [
15103
- error && /* @__PURE__ */ jsxs45(Alert_default, { variant: "error", className: styles["errorAlert"], children: [
15104
- /* @__PURE__ */ jsx103(Alert_default.Title, { children: "Error" }),
15105
- /* @__PURE__ */ jsx103(Alert_default.Description, { children: error })
15425
+ const createOrganizationContent = /* @__PURE__ */ jsx107("div", { className: cx31(styles["root"], cardLayout && styles["card"], className), style, children: /* @__PURE__ */ jsxs47("div", { className: cx31(styles["content"]), children: [
15426
+ /* @__PURE__ */ jsxs47("form", { id: "create-organization-form", className: cx31(styles["form"]), onSubmit: handleSubmit, children: [
15427
+ error && /* @__PURE__ */ jsxs47(Alert_default, { variant: "error", className: styles["errorAlert"], children: [
15428
+ /* @__PURE__ */ jsx107(Alert_default.Title, { children: "Error" }),
15429
+ /* @__PURE__ */ jsx107(Alert_default.Description, { children: error })
15106
15430
  ] }),
15107
- /* @__PURE__ */ jsx103("div", { className: cx31(styles["fieldGroup"]), children: /* @__PURE__ */ jsx103(
15431
+ /* @__PURE__ */ jsx107("div", { className: cx31(styles["fieldGroup"]), children: /* @__PURE__ */ jsx107(
15108
15432
  TextField_default,
15109
15433
  {
15110
15434
  label: `${t("elements.fields.organization.name.label")}`,
@@ -15117,7 +15441,7 @@ var BaseCreateOrganization = ({
15117
15441
  className: cx31(styles["input"])
15118
15442
  }
15119
15443
  ) }),
15120
- /* @__PURE__ */ jsx103("div", { className: cx31(styles["fieldGroup"]), children: /* @__PURE__ */ jsx103(
15444
+ /* @__PURE__ */ jsx107("div", { className: cx31(styles["fieldGroup"]), children: /* @__PURE__ */ jsx107(
15121
15445
  TextField_default,
15122
15446
  {
15123
15447
  label: `${t("elements.fields.organization.handle.label") || "Organization Handle"}`,
@@ -15131,9 +15455,9 @@ var BaseCreateOrganization = ({
15131
15455
  className: cx31(styles["input"])
15132
15456
  }
15133
15457
  ) }),
15134
- /* @__PURE__ */ jsx103("div", { className: cx31(styles["fieldGroup"]), children: /* @__PURE__ */ jsxs45(FormControl_default, { error: formErrors.description, children: [
15135
- /* @__PURE__ */ jsx103(InputLabel_default, { required: true, children: t("elements.fields.organization.description.label") }),
15136
- /* @__PURE__ */ jsx103(
15458
+ /* @__PURE__ */ jsx107("div", { className: cx31(styles["fieldGroup"]), children: /* @__PURE__ */ jsxs47(FormControl_default, { error: formErrors.description, children: [
15459
+ /* @__PURE__ */ jsx107(InputLabel_default, { required: true, children: t("elements.fields.organization.description.label") }),
15460
+ /* @__PURE__ */ jsx107(
15137
15461
  "textarea",
15138
15462
  {
15139
15463
  className: cx31(styles["textarea"], formErrors.description && styles["textareaError"]),
@@ -15147,15 +15471,15 @@ var BaseCreateOrganization = ({
15147
15471
  ] }) }),
15148
15472
  renderAdditionalFields && renderAdditionalFields()
15149
15473
  ] }),
15150
- /* @__PURE__ */ jsxs45("div", { className: cx31(styles["actions"]), children: [
15151
- onCancel && /* @__PURE__ */ jsx103(Button_default, { type: "button", variant: "outline", onClick: onCancel, disabled: loading, children: t("organization.create.buttons.cancel.text") }),
15152
- /* @__PURE__ */ jsx103(Button_default, { type: "submit", variant: "solid", color: "primary", disabled: loading, form: "create-organization-form", children: loading ? t("organization.create.buttons.create_organization.loading.text") : t("organization.create.buttons.create_organization.text") })
15474
+ /* @__PURE__ */ jsxs47("div", { className: cx31(styles["actions"]), children: [
15475
+ onCancel && /* @__PURE__ */ jsx107(Button_default, { type: "button", variant: "outline", onClick: onCancel, disabled: loading, children: t("organization.create.buttons.cancel.text") }),
15476
+ /* @__PURE__ */ jsx107(Button_default, { type: "submit", variant: "solid", color: "primary", disabled: loading, form: "create-organization-form", children: loading ? t("organization.create.buttons.create_organization.loading.text") : t("organization.create.buttons.create_organization.text") })
15153
15477
  ] })
15154
15478
  ] }) });
15155
15479
  if (mode === "popup") {
15156
- return /* @__PURE__ */ jsx103(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs45(Dialog_default.Content, { children: [
15157
- /* @__PURE__ */ jsx103(Dialog_default.Heading, { children: title }),
15158
- /* @__PURE__ */ jsx103("div", { className: styles["popup"], children: createOrganizationContent })
15480
+ return /* @__PURE__ */ jsx107(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs47(Dialog_default.Content, { children: [
15481
+ /* @__PURE__ */ jsx107(Dialog_default.Heading, { children: title }),
15482
+ /* @__PURE__ */ jsx107("div", { className: styles["popup"], children: createOrganizationContent })
15159
15483
  ] }) });
15160
15484
  }
15161
15485
  return createOrganizationContent;
@@ -15196,7 +15520,7 @@ var createOrganization = async ({
15196
15520
  var createOrganization_default = createOrganization;
15197
15521
 
15198
15522
  // src/components/presentation/CreateOrganization/CreateOrganization.tsx
15199
- import { Fragment as Fragment19, jsx as jsx104 } from "react/jsx-runtime";
15523
+ import { Fragment as Fragment22, jsx as jsx108 } from "react/jsx-runtime";
15200
15524
  var CreateOrganization = ({
15201
15525
  onCreateOrganization,
15202
15526
  fallback = null,
@@ -15206,13 +15530,13 @@ var CreateOrganization = ({
15206
15530
  }) => {
15207
15531
  const { isSignedIn, baseUrl, instanceId } = useAsgardeo_default();
15208
15532
  const { currentOrganization, revalidateMyOrganizations } = useOrganization_default();
15209
- const [loading, setLoading] = useState30(false);
15210
- const [error, setError] = useState30(null);
15533
+ const [loading, setLoading] = useState31(false);
15534
+ const [error, setError] = useState31(null);
15211
15535
  if (!isSignedIn && fallback) {
15212
15536
  return fallback;
15213
15537
  }
15214
15538
  if (!isSignedIn) {
15215
- return /* @__PURE__ */ jsx104(Fragment19, {});
15539
+ return /* @__PURE__ */ jsx108(Fragment22, {});
15216
15540
  }
15217
15541
  const parentId = defaultParentId || currentOrganization?.id || "";
15218
15542
  const handleSubmit = async (payload) => {
@@ -15247,7 +15571,7 @@ var CreateOrganization = ({
15247
15571
  setLoading(false);
15248
15572
  }
15249
15573
  };
15250
- return /* @__PURE__ */ jsx104(
15574
+ return /* @__PURE__ */ jsx108(
15251
15575
  BaseCreateOrganization,
15252
15576
  {
15253
15577
  onSubmit: handleSubmit,
@@ -15262,7 +15586,7 @@ var CreateOrganization = ({
15262
15586
 
15263
15587
  // src/components/presentation/OrganizationList/OrganizationList.tsx
15264
15588
  import { cx as cx33 } from "@emotion/css";
15265
- import { useEffect as useEffect22, useState as useState31 } from "react";
15589
+ import { useEffect as useEffect23, useState as useState32 } from "react";
15266
15590
 
15267
15591
  // src/components/presentation/OrganizationList/BaseOrganizationList.tsx
15268
15592
  import { cx as cx32 } from "@emotion/css";
@@ -15495,20 +15819,20 @@ var useStyles27 = (theme, colorScheme) => useMemo38(() => {
15495
15819
  var BaseOrganizationList_styles_default = useStyles27;
15496
15820
 
15497
15821
  // src/components/presentation/OrganizationList/BaseOrganizationList.tsx
15498
- import { jsx as jsx105, jsxs as jsxs46 } from "react/jsx-runtime";
15499
- var defaultRenderOrganization = (organization, styles, t, onOrganizationSelect, showStatus) => /* @__PURE__ */ jsxs46("div", { className: cx32(styles.organizationItem), children: [
15500
- /* @__PURE__ */ jsxs46("div", { className: cx32(styles.organizationContent), children: [
15501
- /* @__PURE__ */ jsx105(Avatar, { variant: "square", name: organization.name, size: 48, alt: `${organization.name} logo` }),
15502
- /* @__PURE__ */ jsxs46("div", { className: cx32(styles.organizationInfo), children: [
15503
- /* @__PURE__ */ jsx105(Typography_default, { variant: "h6", className: cx32(styles.organizationName), children: organization.name }),
15504
- /* @__PURE__ */ jsxs46(Typography_default, { variant: "body2", color: "textSecondary", className: cx32(styles.organizationHandle), children: [
15822
+ import { jsx as jsx109, jsxs as jsxs48 } from "react/jsx-runtime";
15823
+ var defaultRenderOrganization = (organization, styles, t, onOrganizationSelect, showStatus) => /* @__PURE__ */ jsxs48("div", { className: cx32(styles.organizationItem), children: [
15824
+ /* @__PURE__ */ jsxs48("div", { className: cx32(styles.organizationContent), children: [
15825
+ /* @__PURE__ */ jsx109(Avatar, { variant: "square", name: organization.name, size: 48, alt: `${organization.name} logo` }),
15826
+ /* @__PURE__ */ jsxs48("div", { className: cx32(styles.organizationInfo), children: [
15827
+ /* @__PURE__ */ jsx109(Typography_default, { variant: "h6", className: cx32(styles.organizationName), children: organization.name }),
15828
+ /* @__PURE__ */ jsxs48(Typography_default, { variant: "body2", color: "textSecondary", className: cx32(styles.organizationHandle), children: [
15505
15829
  "@",
15506
15830
  organization.orgHandle
15507
15831
  ] }),
15508
- showStatus && /* @__PURE__ */ jsxs46(Typography_default, { variant: "body2", color: "textSecondary", className: cx32(styles.organizationStatus), children: [
15832
+ showStatus && /* @__PURE__ */ jsxs48(Typography_default, { variant: "body2", color: "textSecondary", className: cx32(styles.organizationStatus), children: [
15509
15833
  t("organization.switcher.status.label"),
15510
15834
  " ",
15511
- /* @__PURE__ */ jsx105(
15835
+ /* @__PURE__ */ jsx109(
15512
15836
  "span",
15513
15837
  {
15514
15838
  className: cx32(
@@ -15521,7 +15845,7 @@ var defaultRenderOrganization = (organization, styles, t, onOrganizationSelect,
15521
15845
  ] })
15522
15846
  ] })
15523
15847
  ] }),
15524
- organization.canSwitch && /* @__PURE__ */ jsx105("div", { className: cx32(styles.organizationActions), children: /* @__PURE__ */ jsx105(
15848
+ organization.canSwitch && /* @__PURE__ */ jsx109("div", { className: cx32(styles.organizationActions), children: /* @__PURE__ */ jsx109(
15525
15849
  Button_default,
15526
15850
  {
15527
15851
  onClick: (e) => {
@@ -15534,17 +15858,17 @@ var defaultRenderOrganization = (organization, styles, t, onOrganizationSelect,
15534
15858
  }
15535
15859
  ) })
15536
15860
  ] }, organization.id);
15537
- var defaultRenderLoading = (t, styles) => /* @__PURE__ */ jsxs46("div", { className: cx32(styles.loadingContainer), children: [
15538
- /* @__PURE__ */ jsx105(Spinner_default, { size: "medium" }),
15539
- /* @__PURE__ */ jsx105(Typography_default, { variant: "body1", color: "textSecondary", className: cx32(styles.loadingText), children: t("organization.switcher.loading.placeholder.organizations") })
15861
+ var defaultRenderLoading = (t, styles) => /* @__PURE__ */ jsxs48("div", { className: cx32(styles.loadingContainer), children: [
15862
+ /* @__PURE__ */ jsx109(Spinner_default, { size: "medium" }),
15863
+ /* @__PURE__ */ jsx109(Typography_default, { variant: "body1", color: "textSecondary", className: cx32(styles.loadingText), children: t("organization.switcher.loading.placeholder.organizations") })
15540
15864
  ] });
15541
- var defaultRenderError = (errorMessage, t, styles) => /* @__PURE__ */ jsx105("div", { className: cx32(styles.errorContainer), children: /* @__PURE__ */ jsxs46(Typography_default, { variant: "body1", color: "error", children: [
15542
- /* @__PURE__ */ jsx105("strong", { children: t("organization.switcher.error.prefix") }),
15865
+ var defaultRenderError = (errorMessage, t, styles) => /* @__PURE__ */ jsx109("div", { className: cx32(styles.errorContainer), children: /* @__PURE__ */ jsxs48(Typography_default, { variant: "body1", color: "error", children: [
15866
+ /* @__PURE__ */ jsx109("strong", { children: t("organization.switcher.error.prefix") }),
15543
15867
  " ",
15544
15868
  errorMessage
15545
15869
  ] }) });
15546
- var defaultRenderLoadMore = (onLoadMore, isLoadingMore, t, styles) => /* @__PURE__ */ jsx105(Button_default, { onClick: onLoadMore, disabled: isLoadingMore, className: cx32(styles.loadMoreButton), type: "button", fullWidth: true, children: isLoadingMore ? t("organization.switcher.loading.more") : t("organization.switcher.buttons.load_more.text") });
15547
- var defaultRenderEmpty = (t, styles) => /* @__PURE__ */ jsx105("div", { className: cx32(styles.emptyContainer), children: /* @__PURE__ */ jsx105(Typography_default, { variant: "body1", color: "textSecondary", className: cx32(styles.emptyText), children: t("organization.switcher.no.organizations") }) });
15870
+ var defaultRenderLoadMore = (onLoadMore, isLoadingMore, t, styles) => /* @__PURE__ */ jsx109(Button_default, { onClick: onLoadMore, disabled: isLoadingMore, className: cx32(styles.loadMoreButton), type: "button", fullWidth: true, children: isLoadingMore ? t("organization.switcher.loading.more") : t("organization.switcher.buttons.load_more.text") });
15871
+ var defaultRenderEmpty = (t, styles) => /* @__PURE__ */ jsx109("div", { className: cx32(styles.emptyContainer), children: /* @__PURE__ */ jsx109(Typography_default, { variant: "body1", color: "textSecondary", className: cx32(styles.emptyText), children: t("organization.switcher.no.organizations") }) });
15548
15872
  var BaseOrganizationList = ({
15549
15873
  className = "",
15550
15874
  allOrganizations,
@@ -15588,42 +15912,42 @@ var BaseOrganizationList = ({
15588
15912
  const renderLoadMoreWithStyles = renderLoadMore || ((onLoadMore, loadingMore) => defaultRenderLoadMore(onLoadMore, loadingMore, t, styles));
15589
15913
  const renderOrganizationWithStyles = renderOrganization || ((org) => defaultRenderOrganization(org, styles, t, onOrganizationSelect, showStatus));
15590
15914
  if (isLoading && organizationsWithSwitchAccess?.length === 0) {
15591
- const loadingContent = /* @__PURE__ */ jsx105("div", { className: cx32(styles["root"], className), style, children: renderLoadingWithStyles() });
15915
+ const loadingContent = /* @__PURE__ */ jsx109("div", { className: cx32(styles["root"], className), style, children: renderLoadingWithStyles() });
15592
15916
  if (mode === "popup") {
15593
- return /* @__PURE__ */ jsx105(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs46(Dialog_default.Content, { children: [
15594
- /* @__PURE__ */ jsx105(Dialog_default.Heading, { children: title }),
15595
- /* @__PURE__ */ jsx105("div", { className: cx32(styles["popupContent"]), children: loadingContent })
15917
+ return /* @__PURE__ */ jsx109(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs48(Dialog_default.Content, { children: [
15918
+ /* @__PURE__ */ jsx109(Dialog_default.Heading, { children: title }),
15919
+ /* @__PURE__ */ jsx109("div", { className: cx32(styles["popupContent"]), children: loadingContent })
15596
15920
  ] }) });
15597
15921
  }
15598
15922
  return loadingContent;
15599
15923
  }
15600
15924
  if (error && organizationsWithSwitchAccess?.length === 0) {
15601
- const errorContent = /* @__PURE__ */ jsx105("div", { className: cx32(styles["root"], className), style, children: renderErrorWithStyles(error) });
15925
+ const errorContent = /* @__PURE__ */ jsx109("div", { className: cx32(styles["root"], className), style, children: renderErrorWithStyles(error) });
15602
15926
  if (mode === "popup") {
15603
- return /* @__PURE__ */ jsx105(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs46(Dialog_default.Content, { children: [
15604
- /* @__PURE__ */ jsx105(Dialog_default.Heading, { children: title }),
15605
- /* @__PURE__ */ jsx105("div", { className: cx32(styles["popupContent"]), children: errorContent })
15927
+ return /* @__PURE__ */ jsx109(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs48(Dialog_default.Content, { children: [
15928
+ /* @__PURE__ */ jsx109(Dialog_default.Heading, { children: title }),
15929
+ /* @__PURE__ */ jsx109("div", { className: cx32(styles["popupContent"]), children: errorContent })
15606
15930
  ] }) });
15607
15931
  }
15608
15932
  return errorContent;
15609
15933
  }
15610
15934
  if (!isLoading && organizationsWithSwitchAccess?.length === 0) {
15611
- const emptyContent = /* @__PURE__ */ jsx105("div", { className: cx32(styles["root"], className), style, children: renderEmptyWithStyles() });
15935
+ const emptyContent = /* @__PURE__ */ jsx109("div", { className: cx32(styles["root"], className), style, children: renderEmptyWithStyles() });
15612
15936
  if (mode === "popup") {
15613
- return /* @__PURE__ */ jsx105(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs46(Dialog_default.Content, { children: [
15614
- /* @__PURE__ */ jsx105(Dialog_default.Heading, { children: title }),
15615
- /* @__PURE__ */ jsx105("div", { className: cx32(styles["popupContent"]), children: emptyContent })
15937
+ return /* @__PURE__ */ jsx109(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs48(Dialog_default.Content, { children: [
15938
+ /* @__PURE__ */ jsx109(Dialog_default.Heading, { children: title }),
15939
+ /* @__PURE__ */ jsx109("div", { className: cx32(styles["popupContent"]), children: emptyContent })
15616
15940
  ] }) });
15617
15941
  }
15618
15942
  return emptyContent;
15619
15943
  }
15620
- const organizationListContent = /* @__PURE__ */ jsxs46("div", { className: cx32(styles["root"], className), style, children: [
15621
- /* @__PURE__ */ jsxs46("div", { className: cx32(styles["header"]), children: [
15622
- /* @__PURE__ */ jsx105("div", { className: cx32(styles["headerInfo"]), children: /* @__PURE__ */ jsx105(Typography_default, { variant: "body2", color: "textSecondary", className: cx32(styles["subtitle"]), children: t("organization.switcher.showing.count", {
15944
+ const organizationListContent = /* @__PURE__ */ jsxs48("div", { className: cx32(styles["root"], className), style, children: [
15945
+ /* @__PURE__ */ jsxs48("div", { className: cx32(styles["header"]), children: [
15946
+ /* @__PURE__ */ jsx109("div", { className: cx32(styles["headerInfo"]), children: /* @__PURE__ */ jsx109(Typography_default, { variant: "body2", color: "textSecondary", className: cx32(styles["subtitle"]), children: t("organization.switcher.showing.count", {
15623
15947
  showing: organizationsWithSwitchAccess?.length,
15624
15948
  total: allOrganizations?.organizations?.length || 0
15625
15949
  }) }) }),
15626
- onRefresh && /* @__PURE__ */ jsx105(
15950
+ onRefresh && /* @__PURE__ */ jsx109(
15627
15951
  Button_default,
15628
15952
  {
15629
15953
  onClick: onRefresh,
@@ -15635,16 +15959,16 @@ var BaseOrganizationList = ({
15635
15959
  }
15636
15960
  )
15637
15961
  ] }),
15638
- /* @__PURE__ */ jsx105("div", { className: cx32(styles["listContainer"]), children: organizationsWithSwitchAccess?.map(
15962
+ /* @__PURE__ */ jsx109("div", { className: cx32(styles["listContainer"]), children: organizationsWithSwitchAccess?.map(
15639
15963
  (organization, index) => renderOrganizationWithStyles(organization, index)
15640
15964
  ) }),
15641
- error && organizationsWithSwitchAccess?.length > 0 && /* @__PURE__ */ jsx105("div", { className: cx32(styles["errorMargin"]), children: renderErrorWithStyles(error) }),
15642
- hasMore && fetchMore && /* @__PURE__ */ jsx105("div", { className: cx32(styles["loadMoreMargin"]), children: renderLoadMoreWithStyles(fetchMore, isLoadingMore) })
15965
+ error && organizationsWithSwitchAccess?.length > 0 && /* @__PURE__ */ jsx109("div", { className: cx32(styles["errorMargin"]), children: renderErrorWithStyles(error) }),
15966
+ hasMore && fetchMore && /* @__PURE__ */ jsx109("div", { className: cx32(styles["loadMoreMargin"]), children: renderLoadMoreWithStyles(fetchMore, isLoadingMore) })
15643
15967
  ] });
15644
15968
  if (mode === "popup") {
15645
- return /* @__PURE__ */ jsx105(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs46(Dialog_default.Content, { children: [
15646
- /* @__PURE__ */ jsx105(Dialog_default.Heading, { children: title }),
15647
- /* @__PURE__ */ jsx105("div", { className: cx32(styles["popupContent"]), children: organizationListContent })
15969
+ return /* @__PURE__ */ jsx109(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs48(Dialog_default.Content, { children: [
15970
+ /* @__PURE__ */ jsx109(Dialog_default.Heading, { children: title }),
15971
+ /* @__PURE__ */ jsx109("div", { className: cx32(styles["popupContent"]), children: organizationListContent })
15648
15972
  ] }) });
15649
15973
  }
15650
15974
  return organizationListContent;
@@ -15714,22 +16038,22 @@ var useStyles28 = (theme, colorScheme) => useMemo40(() => {
15714
16038
  var OrganizationList_styles_default = useStyles28;
15715
16039
 
15716
16040
  // src/components/presentation/OrganizationList/OrganizationList.tsx
15717
- import { jsx as jsx106 } from "react/jsx-runtime";
16041
+ import { jsx as jsx110 } from "react/jsx-runtime";
15718
16042
  var OrganizationList = (props) => {
15719
16043
  const { onOrganizationSelect, className = "", style, ...baseProps } = props;
15720
16044
  const { autoFetch, filter, limit, recursive, ...filteredBaseProps } = baseProps;
15721
16045
  const { theme, colorScheme } = useTheme_default();
15722
16046
  const styles = OrganizationList_styles_default(theme, colorScheme);
15723
16047
  const { getAllOrganizations: getAllOrganizations2, error, isLoading, myOrganizations } = useOrganization_default();
15724
- const [allOrganizations, setAllOrganizations] = useState31({
16048
+ const [allOrganizations, setAllOrganizations] = useState32({
15725
16049
  organizations: []
15726
16050
  });
15727
- useEffect22(() => {
16051
+ useEffect23(() => {
15728
16052
  (async () => {
15729
16053
  setAllOrganizations(await getAllOrganizations2());
15730
16054
  })();
15731
16055
  }, []);
15732
- return /* @__PURE__ */ jsx106("div", { className: cx33(styles["root"], className), style, children: /* @__PURE__ */ jsx106("div", { className: cx33(styles["container"]), children: /* @__PURE__ */ jsx106(
16056
+ return /* @__PURE__ */ jsx110("div", { className: cx33(styles["root"], className), style, children: /* @__PURE__ */ jsx110("div", { className: cx33(styles["container"]), children: /* @__PURE__ */ jsx110(
15733
16057
  BaseOrganizationList,
15734
16058
  {
15735
16059
  allOrganizations,
@@ -15745,12 +16069,12 @@ var OrganizationList_default = OrganizationList;
15745
16069
 
15746
16070
  // src/components/presentation/OrganizationProfile/OrganizationProfile.tsx
15747
16071
  import { createPackageComponentLogger as createPackageComponentLogger9 } from "@asgardeo/browser";
15748
- import { useEffect as useEffect23, useState as useState34 } from "react";
16072
+ import { useEffect as useEffect24, useState as useState35 } from "react";
15749
16073
 
15750
16074
  // src/components/presentation/OrganizationProfile/BaseOrganizationProfile.tsx
15751
16075
  import { formatDate } from "@asgardeo/browser";
15752
16076
  import { cx as cx35 } from "@emotion/css";
15753
- import { useState as useState33, useCallback as useCallback19 } from "react";
16077
+ import { useState as useState34, useCallback as useCallback19 } from "react";
15754
16078
 
15755
16079
  // src/components/presentation/OrganizationProfile/BaseOrganizationProfile.styles.ts
15756
16080
  import { css as css30 } from "@emotion/css";
@@ -15911,7 +16235,7 @@ var BaseOrganizationProfile_styles_default = useStyles29;
15911
16235
  // src/components/primitives/KeyValueInput/KeyValueInput.tsx
15912
16236
  import { withVendorCSSClassPrefix as withVendorCSSClassPrefix29, bem as bem20 } from "@asgardeo/browser";
15913
16237
  import { cx as cx34 } from "@emotion/css";
15914
- import { useState as useState32, useCallback as useCallback18 } from "react";
16238
+ import { useState as useState33, useCallback as useCallback18 } from "react";
15915
16239
 
15916
16240
  // src/components/primitives/KeyValueInput/KeyValueInput.styles.ts
15917
16241
  import { css as css31 } from "@emotion/css";
@@ -16068,7 +16392,7 @@ var useStyles30 = (theme, colorScheme, disabled, readOnly, hasError) => useMemo4
16068
16392
  var KeyValueInput_styles_default = useStyles30;
16069
16393
 
16070
16394
  // src/components/primitives/KeyValueInput/KeyValueInput.tsx
16071
- import { jsx as jsx107, jsxs as jsxs47 } from "react/jsx-runtime";
16395
+ import { jsx as jsx111, jsxs as jsxs49 } from "react/jsx-runtime";
16072
16396
  var KeyValueInput = ({
16073
16397
  className = "",
16074
16398
  disabled = false,
@@ -16091,9 +16415,9 @@ var KeyValueInput = ({
16091
16415
  const { theme, colorScheme } = useTheme_default();
16092
16416
  const styles = KeyValueInput_styles_default(theme, colorScheme, disabled, readOnly, !!error);
16093
16417
  const initialPairs = Array.isArray(value) ? value : Object.entries(value).map(([key, val]) => ({ key, value: String(val) }));
16094
- const [pairs, setPairs] = useState32(initialPairs);
16095
- const [newKey, setNewKey] = useState32("");
16096
- const [newValue, setNewValue] = useState32("");
16418
+ const [pairs, setPairs] = useState33(initialPairs);
16419
+ const [newKey, setNewKey] = useState33("");
16420
+ const [newValue, setNewValue] = useState33("");
16097
16421
  const handleAddPair = useCallback18(() => {
16098
16422
  if (!newKey.trim() || !newValue.trim()) return;
16099
16423
  if (maxPairs && pairs.length >= maxPairs) return;
@@ -16145,18 +16469,18 @@ var KeyValueInput = ({
16145
16469
  const isAddDisabled = disabled || readOnly || !canAddMore || !newKey.trim() || !newValue.trim();
16146
16470
  const renderReadOnlyContent = () => {
16147
16471
  if (pairs.length === 0) {
16148
- return /* @__PURE__ */ jsx107("div", { className: cx34(withVendorCSSClassPrefix29(bem20("key-value-input", "empty-state")), styles["emptyState"]), children: "No attributes defined" });
16472
+ return /* @__PURE__ */ jsx111("div", { className: cx34(withVendorCSSClassPrefix29(bem20("key-value-input", "empty-state")), styles["emptyState"]), children: "No attributes defined" });
16149
16473
  }
16150
- return pairs.map((pair, index) => /* @__PURE__ */ jsxs47(
16474
+ return pairs.map((pair, index) => /* @__PURE__ */ jsxs49(
16151
16475
  "div",
16152
16476
  {
16153
16477
  className: cx34(withVendorCSSClassPrefix29(bem20("key-value-input", "readonly-pair")), styles["readOnlyPair"]),
16154
16478
  children: [
16155
- /* @__PURE__ */ jsxs47("span", { className: cx34(withVendorCSSClassPrefix29(bem20("key-value-input", "readonly-key")), styles["readOnlyKey"]), children: [
16479
+ /* @__PURE__ */ jsxs49("span", { className: cx34(withVendorCSSClassPrefix29(bem20("key-value-input", "readonly-key")), styles["readOnlyKey"]), children: [
16156
16480
  pair.key,
16157
16481
  ":"
16158
16482
  ] }),
16159
- /* @__PURE__ */ jsx107(
16483
+ /* @__PURE__ */ jsx111(
16160
16484
  "span",
16161
16485
  {
16162
16486
  className: cx34(withVendorCSSClassPrefix29(bem20("key-value-input", "readonly-value")), styles["readOnlyValue"]),
@@ -16168,10 +16492,10 @@ var KeyValueInput = ({
16168
16492
  `${pair.key}-${index}`
16169
16493
  ));
16170
16494
  };
16171
- return /* @__PURE__ */ jsxs47("div", { className: cx34(withVendorCSSClassPrefix29(bem20("key-value-input")), styles["container"], className), children: [
16172
- label && /* @__PURE__ */ jsxs47("label", { className: cx34(withVendorCSSClassPrefix29(bem20("key-value-input", "label")), styles["label"]), children: [
16495
+ return /* @__PURE__ */ jsxs49("div", { className: cx34(withVendorCSSClassPrefix29(bem20("key-value-input")), styles["container"], className), children: [
16496
+ label && /* @__PURE__ */ jsxs49("label", { className: cx34(withVendorCSSClassPrefix29(bem20("key-value-input", "label")), styles["label"]), children: [
16173
16497
  label,
16174
- required && /* @__PURE__ */ jsx107(
16498
+ required && /* @__PURE__ */ jsx111(
16175
16499
  "span",
16176
16500
  {
16177
16501
  className: cx34(withVendorCSSClassPrefix29(bem20("key-value-input", "required")), styles["requiredIndicator"]),
@@ -16179,13 +16503,13 @@ var KeyValueInput = ({
16179
16503
  }
16180
16504
  )
16181
16505
  ] }),
16182
- /* @__PURE__ */ jsxs47("div", { className: cx34(withVendorCSSClassPrefix29(bem20("key-value-input", "pairs-list")), styles["pairsList"]), children: [
16183
- readOnly ? renderReadOnlyContent() : pairs.map((pair, index) => /* @__PURE__ */ jsxs47(
16506
+ /* @__PURE__ */ jsxs49("div", { className: cx34(withVendorCSSClassPrefix29(bem20("key-value-input", "pairs-list")), styles["pairsList"]), children: [
16507
+ readOnly ? renderReadOnlyContent() : pairs.map((pair, index) => /* @__PURE__ */ jsxs49(
16184
16508
  "div",
16185
16509
  {
16186
16510
  className: cx34(withVendorCSSClassPrefix29(bem20("key-value-input", "pair-row")), styles["pairRow"]),
16187
16511
  children: [
16188
- /* @__PURE__ */ jsx107(
16512
+ /* @__PURE__ */ jsx111(
16189
16513
  TextField_default,
16190
16514
  {
16191
16515
  placeholder: keyPlaceholder,
@@ -16196,7 +16520,7 @@ var KeyValueInput = ({
16196
16520
  "aria-label": `${keyLabel} ${index + 1}`
16197
16521
  }
16198
16522
  ),
16199
- /* @__PURE__ */ jsx107(
16523
+ /* @__PURE__ */ jsx111(
16200
16524
  TextField_default,
16201
16525
  {
16202
16526
  placeholder: valuePlaceholder,
@@ -16207,7 +16531,7 @@ var KeyValueInput = ({
16207
16531
  "aria-label": `${valueLabel} ${index + 1}`
16208
16532
  }
16209
16533
  ),
16210
- !readOnly && /* @__PURE__ */ jsx107(
16534
+ !readOnly && /* @__PURE__ */ jsx111(
16211
16535
  "button",
16212
16536
  {
16213
16537
  type: "button",
@@ -16218,15 +16542,15 @@ var KeyValueInput = ({
16218
16542
  styles["removeButton"]
16219
16543
  ),
16220
16544
  "aria-label": `${removeButtonText} ${pair.key}`,
16221
- children: /* @__PURE__ */ jsx107(X_default, { width: 16, height: 16 })
16545
+ children: /* @__PURE__ */ jsx111(X_default, { width: 16, height: 16 })
16222
16546
  }
16223
16547
  )
16224
16548
  ]
16225
16549
  },
16226
16550
  `${pair.key}-${index}`
16227
16551
  )),
16228
- !readOnly && /* @__PURE__ */ jsxs47("div", { className: cx34(withVendorCSSClassPrefix29(bem20("key-value-input", "add-row")), styles["addRow"]), children: [
16229
- /* @__PURE__ */ jsx107(
16552
+ !readOnly && /* @__PURE__ */ jsxs49("div", { className: cx34(withVendorCSSClassPrefix29(bem20("key-value-input", "add-row")), styles["addRow"]), children: [
16553
+ /* @__PURE__ */ jsx111(
16230
16554
  TextField_default,
16231
16555
  {
16232
16556
  placeholder: keyPlaceholder,
@@ -16237,7 +16561,7 @@ var KeyValueInput = ({
16237
16561
  "aria-label": "New key"
16238
16562
  }
16239
16563
  ),
16240
- /* @__PURE__ */ jsx107(
16564
+ /* @__PURE__ */ jsx111(
16241
16565
  TextField_default,
16242
16566
  {
16243
16567
  placeholder: valuePlaceholder,
@@ -16253,7 +16577,7 @@ var KeyValueInput = ({
16253
16577
  }
16254
16578
  }
16255
16579
  ),
16256
- /* @__PURE__ */ jsx107(
16580
+ /* @__PURE__ */ jsx111(
16257
16581
  "button",
16258
16582
  {
16259
16583
  type: "button",
@@ -16261,13 +16585,13 @@ var KeyValueInput = ({
16261
16585
  disabled: isAddDisabled,
16262
16586
  className: cx34(withVendorCSSClassPrefix29(bem20("key-value-input", "add-button")), styles["addButton"]),
16263
16587
  "aria-label": "Add new key-value pair",
16264
- children: /* @__PURE__ */ jsx107(Plus_default, { width: 16, height: 16 })
16588
+ children: /* @__PURE__ */ jsx111(Plus_default, { width: 16, height: 16 })
16265
16589
  }
16266
16590
  )
16267
16591
  ] })
16268
16592
  ] }),
16269
- (helperText || error) && /* @__PURE__ */ jsx107("div", { className: cx34(withVendorCSSClassPrefix29(bem20("key-value-input", "helper-text")), styles["helperText"]), children: error || helperText }),
16270
- maxPairs && /* @__PURE__ */ jsxs47("div", { className: cx34(withVendorCSSClassPrefix29(bem20("key-value-input", "counter")), styles["counterText"]), children: [
16593
+ (helperText || error) && /* @__PURE__ */ jsx111("div", { className: cx34(withVendorCSSClassPrefix29(bem20("key-value-input", "helper-text")), styles["helperText"]), children: error || helperText }),
16594
+ maxPairs && /* @__PURE__ */ jsxs49("div", { className: cx34(withVendorCSSClassPrefix29(bem20("key-value-input", "counter")), styles["counterText"]), children: [
16271
16595
  pairs.length,
16272
16596
  " of ",
16273
16597
  maxPairs,
@@ -16278,7 +16602,7 @@ var KeyValueInput = ({
16278
16602
  var KeyValueInput_default = KeyValueInput;
16279
16603
 
16280
16604
  // src/components/presentation/OrganizationProfile/BaseOrganizationProfile.tsx
16281
- import { Fragment as Fragment20, jsx as jsx108, jsxs as jsxs48 } from "react/jsx-runtime";
16605
+ import { Fragment as Fragment23, jsx as jsx112, jsxs as jsxs50 } from "react/jsx-runtime";
16282
16606
  var BaseOrganizationProfile = ({
16283
16607
  fallback = null,
16284
16608
  className = "",
@@ -16325,9 +16649,9 @@ var BaseOrganizationProfile = ({
16325
16649
  }) => {
16326
16650
  const { theme, colorScheme } = useTheme_default();
16327
16651
  const styles = BaseOrganizationProfile_styles_default(theme, colorScheme);
16328
- const [editedOrganization, setEditedOrganization] = useState33(organization);
16329
- const [editingFields, setEditingFields] = useState33({});
16330
- const PencilIcon = () => /* @__PURE__ */ jsx108(
16652
+ const [editedOrganization, setEditedOrganization] = useState34(organization);
16653
+ const [editingFields, setEditingFields] = useState34({});
16654
+ const PencilIcon = () => /* @__PURE__ */ jsx112(
16331
16655
  "svg",
16332
16656
  {
16333
16657
  width: "16",
@@ -16338,7 +16662,7 @@ var BaseOrganizationProfile = ({
16338
16662
  strokeWidth: "2",
16339
16663
  strokeLinecap: "round",
16340
16664
  strokeLinejoin: "round",
16341
- children: /* @__PURE__ */ jsx108("path", { d: "M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z" })
16665
+ children: /* @__PURE__ */ jsx112("path", { d: "M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z" })
16342
16666
  }
16343
16667
  );
16344
16668
  const toggleFieldEdit = useCallback19((fieldName) => {
@@ -16408,7 +16732,7 @@ var BaseOrganizationProfile = ({
16408
16732
  let fieldInput;
16409
16733
  if (key === "attributes") {
16410
16734
  const attributesValue = typeof fieldValue === "object" && fieldValue !== null ? fieldValue : {};
16411
- fieldInput = /* @__PURE__ */ jsx108(
16735
+ fieldInput = /* @__PURE__ */ jsx112(
16412
16736
  KeyValueInput_default,
16413
16737
  {
16414
16738
  value: attributesValue,
@@ -16446,26 +16770,26 @@ var BaseOrganizationProfile = ({
16446
16770
  }
16447
16771
  );
16448
16772
  } else {
16449
- fieldInput = /* @__PURE__ */ jsx108(TextField_default, { ...commonProps });
16773
+ fieldInput = /* @__PURE__ */ jsx112(TextField_default, { ...commonProps });
16450
16774
  }
16451
- return /* @__PURE__ */ jsxs48(Fragment20, { children: [
16452
- /* @__PURE__ */ jsx108("span", { className: cx35(styles["label"]), children: label }),
16453
- /* @__PURE__ */ jsx108("div", { className: cx35(styles["value"]), children: fieldInput })
16775
+ return /* @__PURE__ */ jsxs50(Fragment23, { children: [
16776
+ /* @__PURE__ */ jsx112("span", { className: cx35(styles["label"]), children: label }),
16777
+ /* @__PURE__ */ jsx112("div", { className: cx35(styles["value"]), children: fieldInput })
16454
16778
  ] });
16455
16779
  }
16456
16780
  const hasValue = value !== void 0 && value !== null && value !== "";
16457
16781
  const isFieldEditable = editable && fieldEditable;
16458
16782
  let displayValue;
16459
16783
  if (hasValue) {
16460
- displayValue = key === "attributes" && typeof value === "object" && value !== null ? /* @__PURE__ */ jsx108(KeyValueInput_default, { value, readOnly: true, label: "" }) : String(renderedValue);
16784
+ displayValue = key === "attributes" && typeof value === "object" && value !== null ? /* @__PURE__ */ jsx112(KeyValueInput_default, { value, readOnly: true, label: "" }) : String(renderedValue);
16461
16785
  } else if (isFieldEditable) {
16462
16786
  displayValue = getFieldPlaceholder(key);
16463
16787
  } else {
16464
16788
  displayValue = "-";
16465
16789
  }
16466
- return /* @__PURE__ */ jsxs48(Fragment20, { children: [
16467
- /* @__PURE__ */ jsx108("span", { className: cx35(styles["label"]), children: label }),
16468
- /* @__PURE__ */ jsx108("div", { className: cx35(styles["value"], !hasValue && styles["valueEmpty"]), children: !hasValue && isFieldEditable && onStartEdit ? /* @__PURE__ */ jsx108(
16790
+ return /* @__PURE__ */ jsxs50(Fragment23, { children: [
16791
+ /* @__PURE__ */ jsx112("span", { className: cx35(styles["label"]), children: label }),
16792
+ /* @__PURE__ */ jsx112("div", { className: cx35(styles["value"], !hasValue && styles["valueEmpty"]), children: !hasValue && isFieldEditable && onStartEdit ? /* @__PURE__ */ jsx112(
16469
16793
  Button_default,
16470
16794
  {
16471
16795
  onClick: onStartEdit,
@@ -16488,8 +16812,8 @@ var BaseOrganizationProfile = ({
16488
16812
  if (!shouldShow) {
16489
16813
  return null;
16490
16814
  }
16491
- return /* @__PURE__ */ jsxs48("div", { className: cx35(styles["field"]), children: [
16492
- /* @__PURE__ */ jsx108("div", { className: cx35(styles["fieldContent"]), children: renderField(
16815
+ return /* @__PURE__ */ jsxs50("div", { className: cx35(styles["field"]), children: [
16816
+ /* @__PURE__ */ jsx112("div", { className: cx35(styles["fieldContent"]), children: renderField(
16493
16817
  field,
16494
16818
  isFieldEditing,
16495
16819
  (value) => {
@@ -16499,8 +16823,8 @@ var BaseOrganizationProfile = ({
16499
16823
  },
16500
16824
  () => toggleFieldEdit(field.key)
16501
16825
  ) }),
16502
- isFieldEditable && /* @__PURE__ */ jsx108("div", { className: cx35(styles["fieldActions"]), children: isFieldEditing ? /* @__PURE__ */ jsxs48(Fragment20, { children: [
16503
- /* @__PURE__ */ jsx108(
16826
+ isFieldEditable && /* @__PURE__ */ jsx112("div", { className: cx35(styles["fieldActions"]), children: isFieldEditing ? /* @__PURE__ */ jsxs50(Fragment23, { children: [
16827
+ /* @__PURE__ */ jsx112(
16504
16828
  Button_default,
16505
16829
  {
16506
16830
  onClick: () => handleFieldSave(field.key),
@@ -16511,7 +16835,7 @@ var BaseOrganizationProfile = ({
16511
16835
  children: saveButtonText
16512
16836
  }
16513
16837
  ),
16514
- /* @__PURE__ */ jsx108(
16838
+ /* @__PURE__ */ jsx112(
16515
16839
  Button_default,
16516
16840
  {
16517
16841
  onClick: () => handleFieldCancel(field.key),
@@ -16522,7 +16846,7 @@ var BaseOrganizationProfile = ({
16522
16846
  children: cancelButtonText
16523
16847
  }
16524
16848
  )
16525
- ] }) : hasValue && /* @__PURE__ */ jsx108(
16849
+ ] }) : hasValue && /* @__PURE__ */ jsx112(
16526
16850
  Button_default,
16527
16851
  {
16528
16852
  onClick: () => toggleFieldEdit(field.key),
@@ -16531,7 +16855,7 @@ var BaseOrganizationProfile = ({
16531
16855
  size: "small",
16532
16856
  title: "Edit field",
16533
16857
  className: cx35(styles["editButton"]),
16534
- children: /* @__PURE__ */ jsx108(PencilIcon, {})
16858
+ children: /* @__PURE__ */ jsx112(PencilIcon, {})
16535
16859
  }
16536
16860
  ) })
16537
16861
  ] }, field.key);
@@ -16539,23 +16863,23 @@ var BaseOrganizationProfile = ({
16539
16863
  if (!organization) {
16540
16864
  return fallback;
16541
16865
  }
16542
- const profileContent = /* @__PURE__ */ jsxs48(Card_default, { className: cx35(styles["root"], cardLayout && styles["card"], className), children: [
16543
- /* @__PURE__ */ jsxs48("div", { className: cx35(styles["header"]), children: [
16544
- /* @__PURE__ */ jsx108(Avatar, { name: getOrgInitials(organization.name), size: 80, alt: `${organization.name} logo` }),
16545
- /* @__PURE__ */ jsxs48("div", { className: cx35(styles["orgInfo"]), children: [
16546
- /* @__PURE__ */ jsx108("h2", { className: cx35(styles["name"]), children: organization.name }),
16547
- organization.orgHandle && /* @__PURE__ */ jsxs48("p", { className: cx35(styles["handle"]), children: [
16866
+ const profileContent = /* @__PURE__ */ jsxs50(Card_default, { className: cx35(styles["root"], cardLayout && styles["card"], className), children: [
16867
+ /* @__PURE__ */ jsxs50("div", { className: cx35(styles["header"]), children: [
16868
+ /* @__PURE__ */ jsx112(Avatar, { name: getOrgInitials(organization.name), size: 80, alt: `${organization.name} logo` }),
16869
+ /* @__PURE__ */ jsxs50("div", { className: cx35(styles["orgInfo"]), children: [
16870
+ /* @__PURE__ */ jsx112("h2", { className: cx35(styles["name"]), children: organization.name }),
16871
+ organization.orgHandle && /* @__PURE__ */ jsxs50("p", { className: cx35(styles["handle"]), children: [
16548
16872
  "@",
16549
16873
  organization.orgHandle
16550
16874
  ] })
16551
16875
  ] })
16552
16876
  ] }),
16553
- /* @__PURE__ */ jsx108("div", { className: cx35(styles["infoContainer"]), children: fields.map((field) => renderOrganizationField(field)) })
16877
+ /* @__PURE__ */ jsx112("div", { className: cx35(styles["infoContainer"]), children: fields.map((field) => renderOrganizationField(field)) })
16554
16878
  ] });
16555
16879
  if (mode === "popup") {
16556
- return /* @__PURE__ */ jsx108(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs48(Dialog_default.Content, { children: [
16557
- /* @__PURE__ */ jsx108(Dialog_default.Heading, { children: title }),
16558
- /* @__PURE__ */ jsx108("div", { className: cx35(styles["popup"]), children: profileContent })
16880
+ return /* @__PURE__ */ jsx112(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs50(Dialog_default.Content, { children: [
16881
+ /* @__PURE__ */ jsx112(Dialog_default.Heading, { children: title }),
16882
+ /* @__PURE__ */ jsx112("div", { className: cx35(styles["popup"]), children: profileContent })
16559
16883
  ] }) });
16560
16884
  }
16561
16885
  return profileContent;
@@ -16631,7 +16955,7 @@ var updateOrganization = async ({
16631
16955
  var updateOrganization_default = updateOrganization;
16632
16956
 
16633
16957
  // src/components/presentation/OrganizationProfile/OrganizationProfile.tsx
16634
- import { jsx as jsx109 } from "react/jsx-runtime";
16958
+ import { jsx as jsx113 } from "react/jsx-runtime";
16635
16959
  var logger9 = createPackageComponentLogger9(
16636
16960
  "@asgardeo/react",
16637
16961
  "OrganizationProfile"
@@ -16650,7 +16974,7 @@ var OrganizationProfile = ({
16650
16974
  }) => {
16651
16975
  const { baseUrl, instanceId } = useAsgardeo_default();
16652
16976
  const { t } = useTranslation_default(preferences?.i18n);
16653
- const [organization, setOrganization] = useState34(null);
16977
+ const [organization, setOrganization] = useState35(null);
16654
16978
  const fetchOrganization = async () => {
16655
16979
  if (!baseUrl || !organizationId) {
16656
16980
  return;
@@ -16667,7 +16991,7 @@ var OrganizationProfile = ({
16667
16991
  setOrganization(null);
16668
16992
  }
16669
16993
  };
16670
- useEffect23(() => {
16994
+ useEffect24(() => {
16671
16995
  fetchOrganization();
16672
16996
  }, [baseUrl, organizationId]);
16673
16997
  const handleOrganizationUpdate = async (payload) => {
@@ -16689,7 +17013,7 @@ var OrganizationProfile = ({
16689
17013
  throw err;
16690
17014
  }
16691
17015
  };
16692
- return /* @__PURE__ */ jsx109(
17016
+ return /* @__PURE__ */ jsx113(
16693
17017
  BaseOrganizationProfile_default,
16694
17018
  {
16695
17019
  organization,
@@ -16706,7 +17030,7 @@ var OrganizationProfile = ({
16706
17030
  var OrganizationProfile_default = OrganizationProfile;
16707
17031
 
16708
17032
  // src/components/presentation/OrganizationSwitcher/OrganizationSwitcher.tsx
16709
- import { Fragment as Fragment21, jsx as jsx110, jsxs as jsxs49 } from "react/jsx-runtime";
17033
+ import { Fragment as Fragment24, jsx as jsx114, jsxs as jsxs51 } from "react/jsx-runtime";
16710
17034
  var OrganizationSwitcher = ({
16711
17035
  currentOrganization: propCurrentOrganization,
16712
17036
  fallback = null,
@@ -16723,15 +17047,15 @@ var OrganizationSwitcher = ({
16723
17047
  isLoading,
16724
17048
  error
16725
17049
  } = useOrganization_default();
16726
- const [isCreateOrgOpen, setIsCreateOrgOpen] = useState35(false);
16727
- const [isProfileOpen, setIsProfileOpen] = useState35(false);
16728
- const [isOrganizationListOpen, setIsOrganizationListOpen] = useState35(false);
17050
+ const [isCreateOrgOpen, setIsCreateOrgOpen] = useState36(false);
17051
+ const [isProfileOpen, setIsProfileOpen] = useState36(false);
17052
+ const [isOrganizationListOpen, setIsOrganizationListOpen] = useState36(false);
16729
17053
  const { t } = useTranslation_default(preferences?.i18n);
16730
17054
  if (!isSignedIn && fallback) {
16731
17055
  return fallback;
16732
17056
  }
16733
17057
  if (!isSignedIn) {
16734
- return /* @__PURE__ */ jsx110(Fragment21, {});
17058
+ return /* @__PURE__ */ jsx114(Fragment24, {});
16735
17059
  }
16736
17060
  const organizations = propOrganizations || contextOrganizations || [];
16737
17061
  const currentOrganization = propCurrentOrganization || contextCurrentOrganization;
@@ -16745,19 +17069,19 @@ var OrganizationSwitcher = ({
16745
17069
  const defaultMenuItems = [];
16746
17070
  if (currentOrganization) {
16747
17071
  defaultMenuItems.push({
16748
- icon: /* @__PURE__ */ jsx110(BuildingAlt_default, {}),
17072
+ icon: /* @__PURE__ */ jsx114(BuildingAlt_default, {}),
16749
17073
  label: t("organization.switcher.manage.organizations"),
16750
17074
  onClick: handleManageOrganizations
16751
17075
  });
16752
17076
  }
16753
17077
  defaultMenuItems.push({
16754
- icon: /* @__PURE__ */ jsx110("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsx110("path", { d: "M12 5v14m-7-7h14" }) }),
17078
+ icon: /* @__PURE__ */ jsx114("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsx114("path", { d: "M12 5v14m-7-7h14" }) }),
16755
17079
  label: t("organization.switcher.create.organization"),
16756
17080
  onClick: () => setIsCreateOrgOpen(true)
16757
17081
  });
16758
17082
  const menuItems = props.menuItems ? [...defaultMenuItems, ...props.menuItems] : defaultMenuItems;
16759
- return /* @__PURE__ */ jsxs49(Fragment21, { children: [
16760
- /* @__PURE__ */ jsx110(
17083
+ return /* @__PURE__ */ jsxs51(Fragment24, { children: [
17084
+ /* @__PURE__ */ jsx114(
16761
17085
  BaseOrganizationSwitcher,
16762
17086
  {
16763
17087
  organizations,
@@ -16771,7 +17095,7 @@ var OrganizationSwitcher = ({
16771
17095
  ...props
16772
17096
  }
16773
17097
  ),
16774
- /* @__PURE__ */ jsx110(
17098
+ /* @__PURE__ */ jsx114(
16775
17099
  CreateOrganization,
16776
17100
  {
16777
17101
  mode: "popup",
@@ -16785,7 +17109,7 @@ var OrganizationSwitcher = ({
16785
17109
  }
16786
17110
  }
16787
17111
  ),
16788
- currentOrganization && /* @__PURE__ */ jsx110(
17112
+ currentOrganization && /* @__PURE__ */ jsx114(
16789
17113
  OrganizationProfile_default,
16790
17114
  {
16791
17115
  organizationId: currentOrganization.id,
@@ -16793,11 +17117,11 @@ var OrganizationSwitcher = ({
16793
17117
  open: isProfileOpen,
16794
17118
  onOpenChange: setIsProfileOpen,
16795
17119
  cardLayout: true,
16796
- loadingFallback: /* @__PURE__ */ jsx110("div", { children: t("organization.profile.loading") }),
16797
- errorFallback: /* @__PURE__ */ jsx110("div", { children: t("organization.profile.error") })
17120
+ loadingFallback: /* @__PURE__ */ jsx114("div", { children: t("organization.profile.loading") }),
17121
+ errorFallback: /* @__PURE__ */ jsx114("div", { children: t("organization.profile.error") })
16798
17122
  }
16799
17123
  ),
16800
- /* @__PURE__ */ jsx110(
17124
+ /* @__PURE__ */ jsx114(
16801
17125
  OrganizationList_default,
16802
17126
  {
16803
17127
  mode: "popup",
@@ -16831,7 +17155,7 @@ import {
16831
17155
  useInteractions as useInteractions4,
16832
17156
  useRole as useRole4
16833
17157
  } from "@floating-ui/react";
16834
- import { useState as useState36 } from "react";
17158
+ import { useEffect as useEffect25, useState as useState37 } from "react";
16835
17159
 
16836
17160
  // src/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.styles.ts
16837
17161
  import { css as css32 } from "@emotion/css";
@@ -16946,7 +17270,7 @@ var useStyles31 = (theme, colorScheme) => useMemo43(() => {
16946
17270
  var BaseLanguageSwitcher_styles_default = useStyles31;
16947
17271
 
16948
17272
  // src/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.tsx
16949
- import { Fragment as Fragment22, jsx as jsx111, jsxs as jsxs50 } from "react/jsx-runtime";
17273
+ import { Fragment as Fragment25, jsx as jsx115, jsxs as jsxs52 } from "react/jsx-runtime";
16950
17274
  var BaseLanguageSwitcher = ({
16951
17275
  children,
16952
17276
  className,
@@ -16957,28 +17281,34 @@ var BaseLanguageSwitcher = ({
16957
17281
  }) => {
16958
17282
  const { theme, colorScheme } = useTheme_default();
16959
17283
  const styles = BaseLanguageSwitcher_styles_default(theme, colorScheme);
16960
- const [isOpen, setIsOpen] = useState36(false);
17284
+ const [isOpen, setIsOpen] = useState37(false);
17285
+ const hasMultipleLanguages = languages.length > 1;
17286
+ useEffect25(() => {
17287
+ if (!hasMultipleLanguages && isOpen) {
17288
+ setIsOpen(false);
17289
+ }
17290
+ }, [hasMultipleLanguages, isOpen]);
16961
17291
  const { refs, floatingStyles, context } = useFloating4({
16962
17292
  middleware: [offset3(4), flip3(), shift3()],
16963
17293
  onOpenChange: setIsOpen,
16964
17294
  open: isOpen,
16965
17295
  whileElementsMounted: autoUpdate3
16966
17296
  });
16967
- const click = useClick4(context);
16968
- const dismiss = useDismiss4(context);
16969
- const role = useRole4(context, { role: "listbox" });
17297
+ const click = useClick4(context, { enabled: hasMultipleLanguages });
17298
+ const dismiss = useDismiss4(context, { enabled: hasMultipleLanguages });
17299
+ const role = useRole4(context, { enabled: hasMultipleLanguages, role: "listbox" });
16970
17300
  const { getReferenceProps, getFloatingProps } = useInteractions4([click, dismiss, role]);
16971
17301
  const currentOption = languages.find((l) => l.code === currentLanguage);
16972
17302
  if (children) {
16973
- return /* @__PURE__ */ jsx111(Fragment22, { children: children({
17303
+ return /* @__PURE__ */ jsx115(Fragment25, { children: children({
16974
17304
  currentLanguage,
16975
17305
  isLoading,
16976
17306
  languages,
16977
17307
  onLanguageChange
16978
17308
  }) });
16979
17309
  }
16980
- return /* @__PURE__ */ jsxs50("div", { className: cx36(styles["root"], className), children: [
16981
- /* @__PURE__ */ jsxs50(
17310
+ return /* @__PURE__ */ jsxs52("div", { className: cx36(styles["root"], className), children: [
17311
+ /* @__PURE__ */ jsxs52(
16982
17312
  "button",
16983
17313
  {
16984
17314
  ref: refs.setReference,
@@ -16988,13 +17318,13 @@ var BaseLanguageSwitcher = ({
16988
17318
  ...getReferenceProps(),
16989
17319
  className: styles["trigger"],
16990
17320
  children: [
16991
- currentOption && /* @__PURE__ */ jsx111("span", { className: styles["triggerEmoji"], children: currentOption.emoji }),
16992
- /* @__PURE__ */ jsx111("span", { className: styles["triggerLabel"], children: currentOption?.displayName ?? currentLanguage }),
16993
- /* @__PURE__ */ jsx111(ChevronDown_default, {})
17321
+ currentOption && /* @__PURE__ */ jsx115("span", { className: styles["triggerEmoji"], children: currentOption.emoji }),
17322
+ /* @__PURE__ */ jsx115("span", { className: styles["triggerLabel"], children: currentOption?.displayName ?? currentLanguage }),
17323
+ hasMultipleLanguages && /* @__PURE__ */ jsx115(ChevronDown_default, {})
16994
17324
  ]
16995
17325
  }
16996
17326
  ),
16997
- isOpen && /* @__PURE__ */ jsx111(FloatingPortal4, { children: /* @__PURE__ */ jsx111(FloatingFocusManager4, { context, modal: false, children: /* @__PURE__ */ jsx111(
17327
+ isOpen && hasMultipleLanguages && /* @__PURE__ */ jsx115(FloatingPortal4, { children: /* @__PURE__ */ jsx115(FloatingFocusManager4, { context, modal: false, children: /* @__PURE__ */ jsx115(
16998
17328
  "div",
16999
17329
  {
17000
17330
  ref: refs.setFloating,
@@ -17003,7 +17333,7 @@ var BaseLanguageSwitcher = ({
17003
17333
  className: styles["content"],
17004
17334
  role: "listbox",
17005
17335
  "aria-label": "Select language",
17006
- children: languages.map((lang) => /* @__PURE__ */ jsxs50(
17336
+ children: languages.map((lang) => /* @__PURE__ */ jsxs52(
17007
17337
  "button",
17008
17338
  {
17009
17339
  type: "button",
@@ -17015,9 +17345,9 @@ var BaseLanguageSwitcher = ({
17015
17345
  setIsOpen(false);
17016
17346
  },
17017
17347
  children: [
17018
- /* @__PURE__ */ jsx111("span", { className: styles["optionEmoji"], children: lang.emoji }),
17019
- /* @__PURE__ */ jsx111("span", { className: styles["optionLabel"], children: lang.displayName }),
17020
- lang.code === currentLanguage && /* @__PURE__ */ jsx111("span", { className: styles["checkIcon"], children: /* @__PURE__ */ jsx111(Check_default, {}) })
17348
+ /* @__PURE__ */ jsx115("span", { className: styles["optionEmoji"], children: lang.emoji }),
17349
+ /* @__PURE__ */ jsx115("span", { className: styles["optionLabel"], children: lang.displayName }),
17350
+ lang.code === currentLanguage && /* @__PURE__ */ jsx115("span", { className: styles["checkIcon"], children: /* @__PURE__ */ jsx115(Check_default, {}) })
17021
17351
  ]
17022
17352
  },
17023
17353
  lang.code
@@ -17044,25 +17374,30 @@ var useFlowMeta = () => {
17044
17374
  var useFlowMeta_default = useFlowMeta;
17045
17375
 
17046
17376
  // src/components/presentation/LanguageSwitcher/LanguageSwitcher.tsx
17047
- import { jsx as jsx112 } from "react/jsx-runtime";
17377
+ import { jsx as jsx116 } from "react/jsx-runtime";
17048
17378
  var LanguageSwitcher = ({ children, className }) => {
17049
17379
  const { meta, switchLanguage, isLoading } = useFlowMeta_default();
17050
17380
  const { currentLanguage } = useTranslation_default();
17051
17381
  const availableLanguageCodes = meta?.i18n?.languages ?? [];
17382
+ const effectiveLanguageCodes = useMemo44(() => {
17383
+ const fallbackCodes = availableLanguageCodes.length > 0 ? availableLanguageCodes : [currentLanguage];
17384
+ return Array.from(/* @__PURE__ */ new Set([currentLanguage, ...fallbackCodes]));
17385
+ }, [availableLanguageCodes, currentLanguage]);
17052
17386
  const languages = useMemo44(
17053
- () => availableLanguageCodes.map((code) => ({
17387
+ () => effectiveLanguageCodes.map((code) => ({
17054
17388
  code,
17055
- displayName: resolveLocaleDisplayName(code, currentLanguage),
17389
+ // Resolve each label in its own locale so option names stay stable across UI language switches.
17390
+ displayName: resolveLocaleDisplayName(code, code) || code,
17056
17391
  emoji: resolveLocaleEmoji(code)
17057
17392
  })),
17058
- [availableLanguageCodes, currentLanguage]
17393
+ [effectiveLanguageCodes]
17059
17394
  );
17060
17395
  const handleLanguageChange = (language) => {
17061
17396
  if (language !== currentLanguage) {
17062
17397
  switchLanguage(language);
17063
17398
  }
17064
17399
  };
17065
- return /* @__PURE__ */ jsx112(
17400
+ return /* @__PURE__ */ jsx116(
17066
17401
  BaseLanguageSwitcher_default,
17067
17402
  {
17068
17403
  currentLanguage,
@@ -17120,6 +17455,8 @@ export {
17120
17455
  Checkbox_default as Checkbox,
17121
17456
  CircleAlert_default as CircleAlert,
17122
17457
  CircleCheck_default as CircleCheck,
17458
+ Consent_default as Consent,
17459
+ ConsentCheckboxList_default as ConsentCheckboxList,
17123
17460
  CreateOrganization,
17124
17461
  DatePicker_default as DatePicker,
17125
17462
  Divider_default as Divider,
@@ -17136,6 +17473,7 @@ export {
17136
17473
  FieldFactory,
17137
17474
  FlowContext_default as FlowContext,
17138
17475
  FlowProvider_default as FlowProvider,
17476
+ FlowTimer_default as FlowTimer,
17139
17477
  FormControl_default as FormControl,
17140
17478
  GitHubButton_default as GitHubButton,
17141
17479
  GoogleButton_default as GoogleButton,
@@ -17194,6 +17532,7 @@ export {
17194
17532
  createSignInOptionFromAuthenticator,
17195
17533
  getActiveTheme2 as getActiveTheme,
17196
17534
  getAllOrganizations_default as getAllOrganizations,
17535
+ getConsentOptionalKey,
17197
17536
  getMeOrganizations_default as getMeOrganizations,
17198
17537
  getScim2Me_default as getMeProfile,
17199
17538
  getOrganization_default as getOrganization,