@ory/elements-react 0.0.0-pr.4a28a8f → 0.0.0-pr.6b3fe62

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.
@@ -29,8 +29,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
29
29
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
30
 
31
31
  // src/theme/default/index.ts
32
- var default_exports = {};
33
- __export(default_exports, {
32
+ var index_exports = {};
33
+ __export(index_exports, {
34
+ Consent: () => Consent,
34
35
  DefaultButtonSocial: () => DefaultButtonSocial,
35
36
  DefaultCard: () => DefaultCard,
36
37
  DefaultCardContent: () => DefaultCardContent,
@@ -50,7 +51,7 @@ __export(default_exports, {
50
51
  Verification: () => Verification,
51
52
  getOryComponents: () => getOryComponents
52
53
  });
53
- module.exports = __toCommonJS(default_exports);
54
+ module.exports = __toCommonJS(index_exports);
54
55
 
55
56
  // src/theme/default/assets/ory-badge-horizontal.svg
56
57
  var React = __toESM(require("react"));
@@ -91,9 +92,8 @@ function DefaultCardContent({ children }) {
91
92
  }
92
93
 
93
94
  // src/theme/default/components/card/footer.tsx
94
- var import_client_fetch3 = require("@ory/client-fetch");
95
+ var import_client_fetch4 = require("@ory/client-fetch");
95
96
  var import_elements_react = require("@ory/elements-react");
96
- var import_react_hook_form = require("react-hook-form");
97
97
  var import_react_intl = require("react-intl");
98
98
 
99
99
  // src/theme/default/utils/url.ts
@@ -142,6 +142,7 @@ function appendRefresh(url, refresh) {
142
142
 
143
143
  // src/util/ui/index.ts
144
144
  var import_client_fetch2 = require("@ory/client-fetch");
145
+ var import_client_fetch3 = require("@ory/client-fetch");
145
146
  var import_react2 = require("react");
146
147
 
147
148
  // src/context/component.tsx
@@ -178,33 +179,45 @@ function nodesToAuthMethodGroups(nodes, excludeAuthMethods = []) {
178
179
  groupNodes.push(node);
179
180
  groups[node.group] = groupNodes;
180
181
  }
181
- return Object.values(import_client_fetch2.UiNodeGroupEnum).filter((group) => {
182
+ return Object.values(import_client_fetch3.UiNodeGroupEnum).filter((group) => {
182
183
  var _a2;
183
184
  return (_a2 = groups[group]) == null ? void 0 : _a2.length;
184
185
  }).filter(
185
186
  (group) => ![
186
- import_client_fetch2.UiNodeGroupEnum.Default,
187
- import_client_fetch2.UiNodeGroupEnum.IdentifierFirst,
188
- import_client_fetch2.UiNodeGroupEnum.Profile,
189
- import_client_fetch2.UiNodeGroupEnum.Captcha,
187
+ import_client_fetch3.UiNodeGroupEnum.Default,
188
+ import_client_fetch3.UiNodeGroupEnum.IdentifierFirst,
189
+ import_client_fetch3.UiNodeGroupEnum.Profile,
190
+ import_client_fetch3.UiNodeGroupEnum.Captcha,
190
191
  ...excludeAuthMethods
191
192
  ].includes(group)
192
193
  );
193
194
  }
195
+ var findNode = (nodes, opt) => nodes.find((n) => {
196
+ return n.attributes.node_type === opt.node_type && (opt.group instanceof RegExp ? n.group.match(opt.group) : n.group === opt.group) && (opt.name && n.attributes.node_type === "input" ? opt.name instanceof RegExp ? n.attributes.name.match(opt.name) : n.attributes.name === opt.name : !opt.name);
197
+ });
198
+
199
+ // src/util/nodes.ts
200
+ function findScreenSelectionButton(nodes) {
201
+ return nodes.find(
202
+ (node) => node.attributes.node_type === "input" && node.attributes.type === "submit" && node.attributes.name === "screen"
203
+ );
204
+ }
194
205
 
195
206
  // src/theme/default/components/card/footer.tsx
196
207
  var import_jsx_runtime5 = require("react/jsx-runtime");
197
208
  function DefaultCardFooter() {
198
- const { flowType } = (0, import_elements_react.useOryFlow)();
199
- switch (flowType) {
200
- case import_client_fetch3.FlowType.Login:
209
+ const oryFlow = (0, import_elements_react.useOryFlow)();
210
+ switch (oryFlow.flowType) {
211
+ case import_client_fetch4.FlowType.Login:
201
212
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(LoginCardFooter, {});
202
- case import_client_fetch3.FlowType.Registration:
213
+ case import_client_fetch4.FlowType.Registration:
203
214
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RegistrationCardFooter, {});
204
- case import_client_fetch3.FlowType.Recovery:
215
+ case import_client_fetch4.FlowType.Recovery:
205
216
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(RecoveryCardFooter, {});
206
- case import_client_fetch3.FlowType.Verification:
217
+ case import_client_fetch4.FlowType.Verification:
207
218
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(VerificationCardFooter, {});
219
+ case import_client_fetch4.FlowType.OAuth2Consent:
220
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ConsentCardFooter, { flow: oryFlow.flow });
208
221
  default:
209
222
  return null;
210
223
  }
@@ -213,7 +226,7 @@ function LoginCardFooter() {
213
226
  const { config, formState, flow, flowType } = (0, import_elements_react.useOryFlow)();
214
227
  const intl = (0, import_react_intl.useIntl)();
215
228
  const authMethods = nodesToAuthMethodGroups(flow.ui.nodes);
216
- if (flowType === import_client_fetch3.FlowType.Login && flow.refresh) {
229
+ if (flowType === import_client_fetch4.FlowType.Login && flow.refresh) {
217
230
  return null;
218
231
  }
219
232
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
@@ -261,7 +274,7 @@ function LoginCardFooter() {
261
274
  })
262
275
  }
263
276
  ) }),
264
- flowType === import_client_fetch3.FlowType.Login && flow.requested_aal === "aal2" && (formState.current === "select_method" || authMethods.length === 0) && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "font-normal leading-normal antialiased text-interface-foreground-default-primary", children: [
277
+ flowType === import_client_fetch4.FlowType.Login && flow.requested_aal === "aal2" && (formState.current === "select_method" || authMethods.length === 0) && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "font-normal leading-normal antialiased text-interface-foreground-default-primary", children: [
265
278
  intl.formatMessage({
266
279
  id: "login.2fa.go-back"
267
280
  }),
@@ -283,60 +296,45 @@ function LoginCardFooter() {
283
296
  ] })
284
297
  ] });
285
298
  }
286
- function findScreenSelectionButton(nodes) {
287
- return nodes.find(
288
- (node) => node.attributes.node_type === "input" && node.attributes.type === "submit" && node.attributes.name === "screen"
289
- );
290
- }
291
299
  function RegistrationCardFooter() {
292
300
  const intl = (0, import_react_intl.useIntl)();
293
301
  const { config, flow, formState } = (0, import_elements_react.useOryFlow)();
294
- const { setValue } = (0, import_react_hook_form.useFormContext)();
295
- if (formState.current === "select_method") {
296
- return null;
297
- }
298
302
  const screenSelectionNode = findScreenSelectionButton(flow.ui.nodes);
299
- function handleScreenSelection() {
300
- setValue("method", "profile");
301
- if (screenSelectionNode) {
302
- setValue(
303
- screenSelectionNode.attributes.name,
304
- screenSelectionNode.attributes.value
305
- );
306
- }
303
+ switch (formState.current) {
304
+ case "method_active":
305
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "font-normal leading-normal antialiased", children: screenSelectionNode && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
306
+ "a",
307
+ {
308
+ className: "font-medium text-button-link-brand-brand hover:text-button-link-brand-brand-hover",
309
+ href: "",
310
+ children: intl.formatMessage({
311
+ id: "card.footer.select-another-method",
312
+ defaultMessage: "Select another method"
313
+ })
314
+ }
315
+ ) });
316
+ case "select_method":
317
+ default:
318
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "font-normal leading-normal antialiased", children: [
319
+ intl.formatMessage({
320
+ id: "registration.login-label",
321
+ defaultMessage: "Already have an account?"
322
+ }),
323
+ " ",
324
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
325
+ "a",
326
+ {
327
+ className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
328
+ href: initFlowUrl(config.sdk.url, "login", flow),
329
+ "data-testid": "ory/screen/registration/action/login",
330
+ children: intl.formatMessage({
331
+ id: "registration.login-button",
332
+ defaultMessage: "Sign in"
333
+ })
334
+ }
335
+ )
336
+ ] });
307
337
  }
308
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "font-normal leading-normal antialiased", children: formState.current === "method_active" ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_jsx_runtime5.Fragment, { children: screenSelectionNode && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
309
- "button",
310
- {
311
- className: "font-medium text-button-link-brand-brand hover:text-button-link-brand-brand-hover",
312
- type: "submit",
313
- name: screenSelectionNode.attributes.name,
314
- value: screenSelectionNode.attributes.value,
315
- onClick: handleScreenSelection,
316
- children: intl.formatMessage({
317
- id: "card.footer.select-another-method",
318
- defaultMessage: "Select another method"
319
- })
320
- }
321
- ) }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
322
- intl.formatMessage({
323
- id: "registration.login-label",
324
- defaultMessage: "Already have an account?"
325
- }),
326
- " ",
327
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
328
- "a",
329
- {
330
- className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
331
- href: initFlowUrl(config.sdk.url, "login", flow),
332
- "data-testid": "ory/screen/registration/action/login",
333
- children: intl.formatMessage({
334
- id: "registration.login-button",
335
- defaultMessage: "Sign in"
336
- })
337
- }
338
- )
339
- ] }) });
340
338
  }
341
339
  function RecoveryCardFooter() {
342
340
  return null;
@@ -344,12 +342,57 @@ function RecoveryCardFooter() {
344
342
  function VerificationCardFooter() {
345
343
  return null;
346
344
  }
345
+ function ConsentCardFooter({ flow }) {
346
+ var _a, _b;
347
+ const { Node: Node2 } = (0, import_elements_react.useComponents)();
348
+ const rememberNode = findNode(flow.ui.nodes, {
349
+ group: "oauth2_consent",
350
+ node_type: "input",
351
+ name: "remember"
352
+ });
353
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex gap-8 flex-col", children: [
354
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { children: [
355
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("p", { className: "text-interface-foreground-default-secondary leading-normal font-medium", children: [
356
+ "Make sure you trust ",
357
+ (_a = flow.consent_request.client) == null ? void 0 : _a.client_name
358
+ ] }),
359
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-interface-foreground-default-secondary leading-normal", children: "You may be sharing sensitive information with this site or application." })
360
+ ] }),
361
+ rememberNode && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
362
+ Node2.Checkbox,
363
+ {
364
+ attributes: rememberNode.attributes,
365
+ node: rememberNode
366
+ }
367
+ ),
368
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-2", children: flow.ui.nodes.filter(
369
+ (n) => n.attributes.node_type === "input" && n.attributes.type === "submit"
370
+ ).map((n) => {
371
+ const attributes = n.attributes;
372
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
373
+ Node2.Button,
374
+ {
375
+ node: n,
376
+ attributes
377
+ },
378
+ attributes.value
379
+ );
380
+ }) }),
381
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("p", { className: "text-sm", children: [
382
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "text-interface-foreground-default-tertiary", children: [
383
+ "Authorizing will redirect to",
384
+ " "
385
+ ] }),
386
+ (_b = flow.consent_request.client) == null ? void 0 : _b.client_name
387
+ ] })
388
+ ] });
389
+ }
347
390
 
348
391
  // src/theme/default/components/card/header.tsx
349
392
  var import_elements_react3 = require("@ory/elements-react");
350
393
 
351
394
  // src/theme/default/utils/constructCardHeader.ts
352
- var import_client_fetch4 = require("@ory/client-fetch");
395
+ var import_client_fetch5 = require("@ory/client-fetch");
353
396
  var import_react_intl2 = require("react-intl");
354
397
  function joinWithCommaOr(list, orText = "or") {
355
398
  if (list.length === 0) {
@@ -362,11 +405,11 @@ function joinWithCommaOr(list, orText = "or") {
362
405
  }
363
406
  }
364
407
  function useCardHeaderText(container, opts) {
365
- var _a, _b, _c;
408
+ var _a, _b, _c, _d, _e, _f;
366
409
  const nodes = container.nodes;
367
410
  const intl = (0, import_react_intl2.useIntl)();
368
411
  switch (opts.flowType) {
369
- case import_client_fetch4.FlowType.Recovery:
412
+ case import_client_fetch5.FlowType.Recovery:
370
413
  if (nodes.find(
371
414
  (node) => "name" in node.attributes && node.attributes.name === "code"
372
415
  )) {
@@ -387,7 +430,7 @@ function useCardHeaderText(container, opts) {
387
430
  id: "recovery.subtitle"
388
431
  })
389
432
  };
390
- case import_client_fetch4.FlowType.Settings:
433
+ case import_client_fetch5.FlowType.Settings:
391
434
  return {
392
435
  title: intl.formatMessage({
393
436
  id: "settings.title"
@@ -396,7 +439,7 @@ function useCardHeaderText(container, opts) {
396
439
  id: "settings.subtitle"
397
440
  })
398
441
  };
399
- case import_client_fetch4.FlowType.Verification:
442
+ case import_client_fetch5.FlowType.Verification:
400
443
  if (nodes.find(
401
444
  (node) => "name" in node.attributes && node.attributes.name === "code"
402
445
  )) {
@@ -417,7 +460,7 @@ function useCardHeaderText(container, opts) {
417
460
  id: "verification.subtitle"
418
461
  })
419
462
  };
420
- case import_client_fetch4.FlowType.Login: {
463
+ case import_client_fetch5.FlowType.Login: {
421
464
  const accountLinkingMessage = (_a = container.messages) == null ? void 0 : _a.find(
422
465
  (m) => m.id === 1010016
423
466
  );
@@ -439,7 +482,7 @@ function useCardHeaderText(container, opts) {
439
482
  const parts = [];
440
483
  if (nodes.find((node) => node.group === "password")) {
441
484
  switch (opts.flowType) {
442
- case import_client_fetch4.FlowType.Registration:
485
+ case import_client_fetch5.FlowType.Registration:
443
486
  parts.push(
444
487
  intl.formatMessage(
445
488
  { id: "card.header.parts.password.registration" },
@@ -476,7 +519,7 @@ function useCardHeaderText(container, opts) {
476
519
  }
477
520
  if (nodes.find((node) => node.group === "identifier_first")) {
478
521
  const identifier = nodes.find(
479
- (node) => (0, import_client_fetch4.isUiNodeInputAttributes)(node.attributes) && node.attributes.name.startsWith("identifier") && node.attributes.type !== "hidden"
522
+ (node) => (0, import_client_fetch5.isUiNodeInputAttributes)(node.attributes) && node.attributes.name.startsWith("identifier") && node.attributes.type !== "hidden"
480
523
  );
481
524
  if (identifier) {
482
525
  parts.push(
@@ -492,7 +535,7 @@ function useCardHeaderText(container, opts) {
492
535
  }
493
536
  }
494
537
  switch (opts.flowType) {
495
- case import_client_fetch4.FlowType.Login:
538
+ case import_client_fetch5.FlowType.Login:
496
539
  if (opts.flow.refresh) {
497
540
  return {
498
541
  title: intl.formatMessage({
@@ -533,7 +576,7 @@ function useCardHeaderText(container, opts) {
533
576
  }
534
577
  ) : ""
535
578
  };
536
- case import_client_fetch4.FlowType.Registration:
579
+ case import_client_fetch5.FlowType.Registration:
537
580
  return {
538
581
  title: intl.formatMessage({
539
582
  id: "registration.title"
@@ -550,6 +593,25 @@ function useCardHeaderText(container, opts) {
550
593
  }
551
594
  ) : ""
552
595
  };
596
+ case import_client_fetch5.FlowType.OAuth2Consent:
597
+ return {
598
+ title: intl.formatMessage(
599
+ {
600
+ id: "consent.title"
601
+ },
602
+ {
603
+ party: (_d = opts.flow.consent_request.client) == null ? void 0 : _d.client_name
604
+ }
605
+ ),
606
+ description: intl.formatMessage(
607
+ {
608
+ id: "consent.subtitle"
609
+ },
610
+ {
611
+ identifier: (_f = (_e = opts.flow.session.identity) == null ? void 0 : _e.traits.email) != null ? _f : ""
612
+ }
613
+ )
614
+ };
553
615
  }
554
616
  return {
555
617
  title: "Error",
@@ -558,7 +620,7 @@ function useCardHeaderText(container, opts) {
558
620
  }
559
621
 
560
622
  // src/theme/default/components/card/current-identifier-button.tsx
561
- var import_client_fetch5 = require("@ory/client-fetch");
623
+ var import_client_fetch6 = require("@ory/client-fetch");
562
624
  var import_elements_react2 = require("@ory/elements-react");
563
625
 
564
626
  // src/theme/default/assets/icons/arrow-left.svg
@@ -580,36 +642,90 @@ function omit(obj, keys) {
580
642
  }
581
643
 
582
644
  // src/theme/default/components/card/current-identifier-button.tsx
645
+ var import_react_hook_form = require("react-hook-form");
583
646
  var import_jsx_runtime7 = require("react/jsx-runtime");
584
647
  function DefaultCurrentIdentifierButton() {
585
648
  const { flow, flowType, config, formState } = (0, import_elements_react2.useOryFlow)();
649
+ const { setValue } = (0, import_react_hook_form.useFormContext)();
586
650
  const ui = flow.ui;
587
651
  if (formState.current === "provide_identifier") {
588
652
  return null;
589
653
  }
590
- if (flowType === import_client_fetch5.FlowType.Login && flow.requested_aal === "aal2") {
654
+ if (flowType === import_client_fetch6.FlowType.Login && flow.requested_aal === "aal2") {
591
655
  return null;
592
656
  }
593
- const nodeBackButton = getBackButtonNode(flowType, ui.nodes);
594
- if ((nodeBackButton == null ? void 0 : nodeBackButton.attributes.node_type) !== "input" || !nodeBackButton.attributes.value) {
657
+ const nodeBackButton = getBackButtonNodeAttributes(flowType, ui.nodes);
658
+ if (!nodeBackButton) {
595
659
  return null;
596
660
  }
597
661
  const initFlowUrl2 = restartFlowUrl(
598
662
  flow,
599
663
  `${config.sdk.url}/self-service/${flowType}/browser`
600
664
  );
601
- const attributes = omit(nodeBackButton.attributes, [
665
+ const attributes = omit(nodeBackButton, [
602
666
  "autocomplete",
603
667
  "node_type",
604
668
  "maxlength"
605
669
  ]);
670
+ const screenSelectionNode = findScreenSelectionButton(flow.ui.nodes);
671
+ if (screenSelectionNode) {
672
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("form", { action: flow.ui.action, method: flow.ui.method, children: [
673
+ flow.ui.nodes.filter((n) => {
674
+ if ((0, import_client_fetch6.isUiNodeInputAttributes)(n.attributes)) {
675
+ return n.attributes.type === "hidden";
676
+ }
677
+ return false;
678
+ }).map((n) => {
679
+ const attrs = n.attributes;
680
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
681
+ "input",
682
+ {
683
+ type: "hidden",
684
+ name: attrs.name,
685
+ value: attrs.value
686
+ },
687
+ attrs.name
688
+ );
689
+ }),
690
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
691
+ "button",
692
+ {
693
+ className: "group inline-flex max-w-full cursor-pointer items-center gap-1 self-start rounded-identifier border px-[11px] py-[5px] transition-colors border-button-identifier-border-border-default bg-button-identifier-background-default hover:border-button-identifier-border-border-hover hover:bg-button-identifier-background-hover",
694
+ ...attributes,
695
+ type: "submit",
696
+ onClick: () => {
697
+ setValue(
698
+ screenSelectionNode.attributes.name,
699
+ screenSelectionNode.attributes.value
700
+ );
701
+ setValue("method", "profile");
702
+ },
703
+ name: screenSelectionNode.attributes.name,
704
+ value: screenSelectionNode.attributes.value,
705
+ title: `Adjust ${nodeBackButton == null ? void 0 : nodeBackButton.value}`,
706
+ "data-testid": "ory/screen/login/action/restart",
707
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "inline-flex min-h-5 items-center gap-2 overflow-hidden text-ellipsis", children: [
708
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
709
+ arrow_left_default,
710
+ {
711
+ size: 16,
712
+ stroke: "1",
713
+ className: "shrink-0 text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover"
714
+ }
715
+ ),
716
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "overflow-hidden text-ellipsis text-nowrap text-sm font-medium text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover", children: nodeBackButton == null ? void 0 : nodeBackButton.value })
717
+ ] })
718
+ }
719
+ )
720
+ ] });
721
+ }
606
722
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
607
723
  "a",
608
724
  {
609
725
  className: "group inline-flex max-w-full cursor-pointer items-center gap-1 self-start rounded-identifier border px-[11px] py-[5px] transition-colors border-button-identifier-border-border-default bg-button-identifier-background-default hover:border-button-identifier-border-border-hover hover:bg-button-identifier-background-hover",
610
726
  ...attributes,
611
727
  href: initFlowUrl2,
612
- title: `Adjust ${nodeBackButton == null ? void 0 : nodeBackButton.attributes.value}`,
728
+ title: `Adjust ${nodeBackButton == null ? void 0 : nodeBackButton.value}`,
613
729
  "data-testid": "ory/screen/login/action/restart",
614
730
  children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "inline-flex min-h-5 items-center gap-2 overflow-hidden text-ellipsis", children: [
615
731
  /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
@@ -620,30 +736,34 @@ function DefaultCurrentIdentifierButton() {
620
736
  className: "shrink-0 text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover"
621
737
  }
622
738
  ),
623
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "overflow-hidden text-ellipsis text-nowrap text-sm font-medium text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover", children: nodeBackButton == null ? void 0 : nodeBackButton.attributes.value })
739
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "overflow-hidden text-ellipsis text-nowrap text-sm font-medium text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover", children: nodeBackButton == null ? void 0 : nodeBackButton.value })
624
740
  ] })
625
741
  }
626
742
  );
627
743
  }
628
- function getBackButtonNode(flowType, nodes) {
629
- let nodeBackButton;
744
+ function getBackButtonNodeAttributes(flowType, nodes) {
745
+ var _a, _b;
746
+ let nodeBackButtonAttributes;
630
747
  switch (flowType) {
631
- case import_client_fetch5.FlowType.Login:
632
- nodeBackButton = nodes.find(
633
- (node) => "name" in node.attributes && node.attributes.name === "identifier" && ["default", "identifier_first"].includes(node.group)
634
- );
748
+ case import_client_fetch6.FlowType.Login:
749
+ nodeBackButtonAttributes = (_a = nodes.find(
750
+ (node) => (0, import_client_fetch6.isUiNodeInputAttributes)(node.attributes) && node.attributes.name === "identifier" && ["default", "identifier_first"].includes(node.group)
751
+ )) == null ? void 0 : _a.attributes;
635
752
  break;
636
- case import_client_fetch5.FlowType.Registration:
637
- nodeBackButton = guessRegistrationBackButton(nodes);
753
+ case import_client_fetch6.FlowType.Registration:
754
+ nodeBackButtonAttributes = guessRegistrationBackButton(nodes);
638
755
  break;
639
- case import_client_fetch5.FlowType.Recovery:
640
- case import_client_fetch5.FlowType.Verification:
641
- nodeBackButton = nodes.find(
642
- (n) => "name" in n.attributes && n.attributes.name === "email"
643
- );
756
+ case import_client_fetch6.FlowType.Recovery:
757
+ case import_client_fetch6.FlowType.Verification:
758
+ nodeBackButtonAttributes = (_b = nodes.find(
759
+ (n) => (0, import_client_fetch6.isUiNodeInputAttributes)(n.attributes) && n.attributes.name === "email"
760
+ )) == null ? void 0 : _b.attributes;
644
761
  break;
645
762
  }
646
- return nodeBackButton;
763
+ if ((nodeBackButtonAttributes == null ? void 0 : nodeBackButtonAttributes.node_type) !== "input" || !(nodeBackButtonAttributes == null ? void 0 : nodeBackButtonAttributes.value)) {
764
+ return void 0;
765
+ }
766
+ return nodeBackButtonAttributes;
647
767
  }
648
768
  var backButtonCandiates = [
649
769
  "traits.email",
@@ -651,9 +771,10 @@ var backButtonCandiates = [
651
771
  "traits.phone_number"
652
772
  ];
653
773
  function guessRegistrationBackButton(uiNodes) {
654
- return uiNodes.find(
655
- (node) => "name" in node.attributes && backButtonCandiates.includes(node.attributes.name) && node.group === "default"
656
- );
774
+ var _a;
775
+ return (_a = uiNodes.find(
776
+ (node) => (0, import_client_fetch6.isUiNodeInputAttributes)(node.attributes) && backButtonCandiates.includes(node.attributes.name) && node.group === "default"
777
+ )) == null ? void 0 : _a.attributes;
657
778
  }
658
779
 
659
780
  // src/theme/default/components/card/header.tsx
@@ -711,7 +832,7 @@ function cn(...inputs) {
711
832
  // src/theme/default/components/form/index.tsx
712
833
  var import_react_intl4 = require("react-intl");
713
834
  var import_elements_react6 = require("@ory/elements-react");
714
- var import_client_fetch7 = require("@ory/client-fetch");
835
+ var import_client_fetch8 = require("@ory/client-fetch");
715
836
 
716
837
  // src/theme/default/components/form/social.tsx
717
838
  var import_elements_react5 = require("@ory/elements-react");
@@ -948,7 +1069,7 @@ function Spinner({ className }) {
948
1069
  }
949
1070
 
950
1071
  // src/theme/default/components/form/social.tsx
951
- var import_client_fetch6 = require("@ory/client-fetch");
1072
+ var import_client_fetch7 = require("@ory/client-fetch");
952
1073
  var import_jsx_runtime27 = require("react/jsx-runtime");
953
1074
  function extractProvider(context) {
954
1075
  if (context && typeof context === "object" && "provider" in context && typeof context.provider === "string") {
@@ -980,7 +1101,7 @@ function DefaultButtonSocial({
980
1101
  formState: { isSubmitting }
981
1102
  } = (0, import_react_hook_form2.useFormContext)();
982
1103
  const oidcNodeCount = (_a = ui.nodes.filter(
983
- (node2) => node2.group === import_client_fetch6.UiNodeGroupEnum.Oidc || node2.group === import_client_fetch6.UiNodeGroupEnum.Saml
1104
+ (node2) => node2.group === import_client_fetch7.UiNodeGroupEnum.Oidc || node2.group === import_client_fetch7.UiNodeGroupEnum.Saml
984
1105
  ).length) != null ? _a : 0;
985
1106
  const Logo = logos2[attributes.value.split("-")[0]];
986
1107
  const showLabel = _showLabel != null ? _showLabel : oidcNodeCount % 3 !== 0 && oidcNodeCount % 4 !== 0;
@@ -994,6 +1115,7 @@ function DefaultButtonSocial({
994
1115
  setClicked(false);
995
1116
  }
996
1117
  }, [isSubmitting, setClicked]);
1118
+ const label = node.meta.label ? (0, import_elements_react5.uiTextToFormattedMessage)(node.meta.label, intl) : "";
997
1119
  return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
998
1120
  "button",
999
1121
  {
@@ -1006,10 +1128,11 @@ function DefaultButtonSocial({
1006
1128
  onClick: localOnClick,
1007
1129
  "data-loading": clicked,
1008
1130
  disabled: isSubmitting,
1131
+ "aria-label": label,
1009
1132
  children: [
1010
1133
  /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "size-5 relative", children: !clicked ? Logo ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Logo, { size: 20 }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "flex aspect-square items-center justify-center rounded-[999px] border text-xs", children: provider.slice(0, 2) }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Spinner, { className: "size-5" }) }),
1011
1134
  showLabel && node.meta.label ? /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
1012
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "grow text-center font-medium leading-none text-button-social-foreground-default", children: (0, import_elements_react5.uiTextToFormattedMessage)(node.meta.label, intl) }),
1135
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "grow text-center font-medium leading-none text-button-social-foreground-default", children: label }),
1013
1136
  /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "size-5 block" })
1014
1137
  ] }) : null
1015
1138
  ]
@@ -1041,11 +1164,13 @@ function DefaultFormContainer({
1041
1164
  children,
1042
1165
  onSubmit,
1043
1166
  action,
1044
- method
1167
+ method,
1168
+ "data-testid": dataTestId
1045
1169
  }) {
1046
1170
  return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1047
1171
  "form",
1048
1172
  {
1173
+ "data-testid": dataTestId,
1049
1174
  onSubmit,
1050
1175
  noValidate: true,
1051
1176
  action,
@@ -1064,7 +1189,7 @@ function DefaultMessageContainer({ children }) {
1064
1189
  "section",
1065
1190
  {
1066
1191
  className: cn(
1067
- flowType === import_client_fetch7.FlowType.Settings ? "text-center" : "text-left"
1192
+ flowType === import_client_fetch8.FlowType.Settings ? "text-center" : "text-left"
1068
1193
  ),
1069
1194
  children
1070
1195
  }
@@ -1149,8 +1274,40 @@ function isGroupImmediateSubmit(group) {
1149
1274
  return group === "code";
1150
1275
  }
1151
1276
 
1152
- // src/theme/default/components/card/auth-method-list-item.tsx
1277
+ // src/theme/default/components/card/list-item.tsx
1153
1278
  var import_jsx_runtime35 = require("react/jsx-runtime");
1279
+ function ListItem({
1280
+ icon: Icon,
1281
+ as,
1282
+ title,
1283
+ description,
1284
+ children,
1285
+ className,
1286
+ ...props
1287
+ }) {
1288
+ const Comp = as || "div";
1289
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
1290
+ Comp,
1291
+ {
1292
+ ...props,
1293
+ className: cn(
1294
+ "flex cursor-pointer gap-3 text-left items-start w-full rounded-buttons p-2 hover:bg-interface-background-default-primary-hover",
1295
+ className
1296
+ ),
1297
+ children: [
1298
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "mt-1", children: Icon && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Icon, { size: 16, className: "text-interface-foreground-brand-primary" }) }),
1299
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { className: "flex-1 leading-normal inline-flex flex-col max-w-full min-w-1", children: [
1300
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "text-interface-foreground-default-primary break-words", children: title }),
1301
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "text-interface-foreground-default-secondary", children: description })
1302
+ ] }),
1303
+ children
1304
+ ]
1305
+ }
1306
+ );
1307
+ }
1308
+
1309
+ // src/theme/default/components/card/auth-method-list-item.tsx
1310
+ var import_jsx_runtime36 = require("react/jsx-runtime");
1154
1311
  var iconsMap = {
1155
1312
  code: code_default,
1156
1313
  passkey: passkey_default,
@@ -1169,40 +1326,33 @@ function DefaultAuthMethodListItem({
1169
1326
  var _a;
1170
1327
  const intl = (0, import_react_intl5.useIntl)();
1171
1328
  const Icon = iconsMap[group] || null;
1172
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
1173
- "button",
1329
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
1330
+ ListItem,
1174
1331
  {
1175
- className: "flex cursor-pointer gap-3 text-left items-start w-full rounded-buttons p-2 hover:bg-interface-background-default-primary-hover",
1332
+ as: "button",
1333
+ icon: Icon,
1334
+ title: intl.formatMessage(
1335
+ { id: (_a = title == null ? void 0 : title.id) != null ? _a : `two-step.${group}.title` },
1336
+ title == null ? void 0 : title.values
1337
+ ),
1338
+ description: intl.formatMessage({
1339
+ id: `two-step.${group}.description`
1340
+ }),
1176
1341
  onClick,
1177
1342
  type: isGroupImmediateSubmit(group) ? "submit" : "button",
1178
- "data-testid": `ory/form/auth-picker/${group}`,
1179
- children: [
1180
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "mt-1", children: Icon && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Icon, { size: 16, className: "text-interface-foreground-brand-primary" }) }),
1181
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { className: "flex-1 leading-normal inline-flex flex-col w-full", children: [
1182
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { className: "text-interface-foreground-default-primary truncate mr-6", children: [
1183
- intl.formatMessage(
1184
- { id: (_a = title == null ? void 0 : title.id) != null ? _a : `two-step.${group}.title` },
1185
- title == null ? void 0 : title.values
1186
- ),
1187
- " "
1188
- ] }),
1189
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "text-interface-foreground-default-secondary", children: intl.formatMessage({
1190
- id: `two-step.${group}.description`
1191
- }) })
1192
- ] })
1193
- ]
1343
+ "data-testid": `ory/form/auth-picker/${group}`
1194
1344
  }
1195
1345
  );
1196
1346
  }
1197
1347
 
1198
1348
  // src/theme/default/components/form/button.tsx
1199
- var import_client_fetch8 = require("@ory/client-fetch");
1349
+ var import_client_fetch9 = require("@ory/client-fetch");
1200
1350
  var import_elements_react7 = require("@ory/elements-react");
1201
1351
  var import_class_variance_authority = require("class-variance-authority");
1202
1352
  var import_react_hook_form3 = require("react-hook-form");
1203
1353
  var import_react_intl6 = require("react-intl");
1204
1354
  var import_react4 = require("react");
1205
- var import_jsx_runtime36 = require("react/jsx-runtime");
1355
+ var import_jsx_runtime37 = require("react/jsx-runtime");
1206
1356
  var buttonStyles = (0, import_class_variance_authority.cva)(
1207
1357
  [
1208
1358
  "relative flex justify-center gap-3 overflow-hidden rounded-buttons leading-none ring-1 ring-inset font-medium",
@@ -1255,7 +1405,7 @@ var DefaultButton = ({
1255
1405
  } = attributes;
1256
1406
  const [clicked, setClicked] = (0, import_react4.useState)(false);
1257
1407
  const intl = (0, import_react_intl6.useIntl)();
1258
- const label = (0, import_client_fetch8.getNodeLabel)(node);
1408
+ const label = (0, import_client_fetch9.getNodeLabel)(node);
1259
1409
  const {
1260
1410
  formState: { isSubmitting },
1261
1411
  setValue
@@ -1265,8 +1415,8 @@ var DefaultButton = ({
1265
1415
  setClicked(false);
1266
1416
  }
1267
1417
  }, [isSubmitting]);
1268
- const isPrimary = attributes.name === "method" || attributes.name.includes("passkey") || attributes.name.includes("webauthn") || attributes.name.includes("lookup_secret");
1269
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
1418
+ const isPrimary = attributes.name === "method" || attributes.name.includes("passkey") || attributes.name.includes("webauthn") || attributes.name.includes("lookup_secret") || attributes.name.includes("action") && attributes.value === "accept";
1419
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
1270
1420
  "button",
1271
1421
  {
1272
1422
  ...rest,
@@ -1286,8 +1436,8 @@ var DefaultButton = ({
1286
1436
  disabled: (_a = rest.disabled) != null ? _a : isSubmitting,
1287
1437
  "data-loading": clicked,
1288
1438
  children: [
1289
- clicked ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Spinner, {}) : null,
1290
- label ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { children: (0, import_elements_react7.uiTextToFormattedMessage)(label, intl) }) : ""
1439
+ clicked ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Spinner, {}) : null,
1440
+ label ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { children: (0, import_elements_react7.uiTextToFormattedMessage)(label, intl) }) : ""
1291
1441
  ]
1292
1442
  }
1293
1443
  );
@@ -1295,7 +1445,7 @@ var DefaultButton = ({
1295
1445
  DefaultButton.displayName = "DefaultButton";
1296
1446
 
1297
1447
  // src/theme/default/components/form/checkbox.tsx
1298
- var import_client_fetch9 = require("@ory/client-fetch");
1448
+ var import_client_fetch10 = require("@ory/client-fetch");
1299
1449
  var import_elements_react8 = require("@ory/elements-react");
1300
1450
  var import_react_hook_form4 = require("react-hook-form");
1301
1451
  var import_react_intl8 = require("react-intl");
@@ -1360,7 +1510,7 @@ var uiTextToFormattedMessage4 = ({ id, context = {}, text }, intl) => {
1360
1510
  };
1361
1511
 
1362
1512
  // src/theme/default/components/ui/checkbox-label.tsx
1363
- var import_jsx_runtime37 = require("react/jsx-runtime");
1513
+ var import_jsx_runtime38 = require("react/jsx-runtime");
1364
1514
  var linkRegex = /\[([^\]]+)\]\(([^)]+)\)/g;
1365
1515
  function computeLabelElements(labelText) {
1366
1516
  const elements = [];
@@ -1376,7 +1526,7 @@ function computeLabelElements(labelText) {
1376
1526
  elements.push(labelText.slice(lastIndex, matchStart));
1377
1527
  }
1378
1528
  elements.push(
1379
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
1529
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
1380
1530
  "a",
1381
1531
  {
1382
1532
  href: url,
@@ -1401,13 +1551,13 @@ function CheckboxLabel({ label }) {
1401
1551
  return null;
1402
1552
  }
1403
1553
  const labelText = uiTextToFormattedMessage4(label, intl);
1404
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_jsx_runtime37.Fragment, { children: computeLabelElements(labelText) });
1554
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_jsx_runtime38.Fragment, { children: computeLabelElements(labelText) });
1405
1555
  }
1406
1556
 
1407
1557
  // src/theme/default/components/form/checkbox.tsx
1408
- var import_jsx_runtime38 = require("react/jsx-runtime");
1558
+ var import_jsx_runtime39 = require("react/jsx-runtime");
1409
1559
  function CheckboxSVG() {
1410
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
1560
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
1411
1561
  "svg",
1412
1562
  {
1413
1563
  className: "absolute hidden size-4 peer-checked:block fill-checkbox-foreground-checked",
@@ -1416,7 +1566,7 @@ function CheckboxSVG() {
1416
1566
  height: "16",
1417
1567
  viewBox: "0 0 16 16",
1418
1568
  fill: "none",
1419
- children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
1569
+ children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
1420
1570
  "path",
1421
1571
  {
1422
1572
  fillRule: "evenodd",
@@ -1442,30 +1592,29 @@ var DefaultCheckbox = ({
1442
1592
  ...attributes
1443
1593
  } = initialAttributes;
1444
1594
  const intl = (0, import_react_intl8.useIntl)();
1445
- const label = (0, import_client_fetch9.getNodeLabel)(node);
1446
- const { register } = (0, import_react_hook_form4.useForm)();
1595
+ const label = (0, import_client_fetch10.getNodeLabel)(node);
1596
+ const { register } = (0, import_react_hook_form4.useFormContext)();
1447
1597
  const hasError = node.messages.some((m) => m.type === "error");
1448
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("label", { className: "flex items-start gap-3 self-stretch antialiased", children: [
1449
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("span", { className: "flex h-5 items-center", children: [
1450
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
1598
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("label", { className: "flex items-start gap-3 self-stretch antialiased", children: [
1599
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { className: "flex h-5 items-center", children: [
1600
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
1451
1601
  "input",
1452
1602
  {
1453
1603
  ...attributes,
1454
- value: 1,
1455
1604
  defaultChecked: Boolean(value),
1456
1605
  type: "checkbox",
1457
1606
  className: cn(
1458
1607
  "peer size-4 border appearance-none rounded-forms bg-checkbox-background-default border-checkbox-border-checkbox-border-default checked:bg-checkbox-background-checked checked:border-checkbox-border-checkbox-border-checked",
1459
1608
  hasError && "border-interface-border-validation-danger"
1460
1609
  ),
1461
- ...register(name, { value })
1610
+ ...register(name)
1462
1611
  }
1463
1612
  ),
1464
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(CheckboxSVG, {})
1613
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(CheckboxSVG, {})
1465
1614
  ] }),
1466
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("span", { className: "flex flex-col", children: [
1467
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "font-normal leading-tight text-interface-foreground-default-primary", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(CheckboxLabel, { label }) }),
1468
- node.messages.map((message) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
1615
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { className: "flex flex-col", children: [
1616
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "font-normal leading-tight text-interface-foreground-default-primary", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(CheckboxLabel, { label }) }),
1617
+ node.messages.map((message) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
1469
1618
  "span",
1470
1619
  {
1471
1620
  className: cn(
@@ -1482,60 +1631,90 @@ var DefaultCheckbox = ({
1482
1631
  };
1483
1632
 
1484
1633
  // src/theme/default/components/form/group-container.tsx
1485
- var import_jsx_runtime39 = require("react/jsx-runtime");
1634
+ var import_elements_react9 = require("@ory/elements-react");
1635
+ var import_client_fetch11 = require("@ory/client-fetch");
1636
+
1637
+ // src/util/childCounter.ts
1638
+ var import_react5 = require("react");
1639
+ function countRenderableChildren(children) {
1640
+ return import_react5.Children.toArray(children).filter((c) => {
1641
+ if ((0, import_react5.isValidElement)(c)) {
1642
+ return true;
1643
+ }
1644
+ return false;
1645
+ }).length;
1646
+ }
1647
+
1648
+ // src/theme/default/components/form/group-container.tsx
1649
+ var import_jsx_runtime40 = require("react/jsx-runtime");
1486
1650
  function DefaultGroupContainer({ children }) {
1487
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "grid grid-cols-1 gap-8", children });
1651
+ const { flowType } = (0, import_elements_react9.useOryFlow)();
1652
+ const count = countRenderableChildren(children);
1653
+ if (count === 0) {
1654
+ return null;
1655
+ }
1656
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
1657
+ "div",
1658
+ {
1659
+ className: cn(
1660
+ "grid",
1661
+ flowType === import_client_fetch11.FlowType.OAuth2Consent ? "grid-cols-2 gap-2" : "grid-cols-1 gap-8"
1662
+ ),
1663
+ children
1664
+ }
1665
+ );
1488
1666
  }
1489
1667
 
1490
1668
  // src/theme/default/components/form/horizontal-divider.tsx
1491
- var import_jsx_runtime40 = require("react/jsx-runtime");
1669
+ var import_jsx_runtime41 = require("react/jsx-runtime");
1492
1670
  function DefaultHorizontalDivider() {
1493
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("hr", { className: "border-interface-border-default-primary" });
1671
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("hr", { className: "border-interface-border-default-primary" });
1494
1672
  }
1495
1673
 
1496
1674
  // src/theme/default/components/form/image.tsx
1497
- var import_jsx_runtime41 = require("react/jsx-runtime");
1498
- function DefaultImage({ attributes }) {
1499
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("figure", { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("img", { ...attributes }) });
1675
+ var import_jsx_runtime42 = require("react/jsx-runtime");
1676
+ function DefaultImage({ attributes, node }) {
1677
+ var _a;
1678
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("figure", { children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("img", { ...attributes, alt: ((_a = node.meta.label) == null ? void 0 : _a.text) || "" }) });
1500
1679
  }
1501
1680
 
1502
1681
  // src/theme/default/components/form/input.tsx
1503
- var import_client_fetch10 = require("@ory/client-fetch");
1504
- var import_elements_react9 = require("@ory/elements-react");
1505
- var import_react5 = require("react");
1682
+ var import_client_fetch12 = require("@ory/client-fetch");
1683
+ var import_elements_react10 = require("@ory/elements-react");
1684
+ var import_react6 = require("react");
1506
1685
  var import_react_hook_form5 = require("react-hook-form");
1507
1686
  var import_react_intl9 = require("react-intl");
1508
1687
 
1509
1688
  // src/theme/default/assets/icons/eye-off.svg
1510
1689
  var React24 = __toESM(require("react"));
1511
- var import_jsx_runtime42 = require("react/jsx-runtime");
1690
+ var import_jsx_runtime43 = require("react/jsx-runtime");
1512
1691
  var SvgEyeOff = (props) => {
1513
1692
  var _a, _b;
1514
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("path", { stroke: "#000", strokeLinecap: "round", strokeLinejoin: "round", d: "M10.585 10.587a2 2 0 0 0 2.829 2.828m3.267 3.258A8.7 8.7 0 0 1 12 18q-5.4 0-9-6 1.908-3.18 4.32-4.674m2.86-1.146A9 9 0 0 1 12 6q5.4 0 9 6-1 1.665-2.138 2.87M3 3l18 18" }) });
1693
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("path", { stroke: "#000", strokeLinecap: "round", strokeLinejoin: "round", d: "M10.585 10.587a2 2 0 0 0 2.829 2.828m3.267 3.258A8.7 8.7 0 0 1 12 18q-5.4 0-9-6 1.908-3.18 4.32-4.674m2.86-1.146A9 9 0 0 1 12 6q5.4 0 9 6-1 1.665-2.138 2.87M3 3l18 18" }) });
1515
1694
  };
1516
1695
  var eye_off_default = SvgEyeOff;
1517
1696
 
1518
1697
  // src/theme/default/assets/icons/eye.svg
1519
1698
  var React25 = __toESM(require("react"));
1520
- var import_jsx_runtime43 = require("react/jsx-runtime");
1699
+ var import_jsx_runtime44 = require("react/jsx-runtime");
1521
1700
  var SvgEye = (props) => {
1522
1701
  var _a, _b;
1523
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("g", { strokeLinecap: "round", strokeLinejoin: "round", children: [
1524
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("path", { stroke: "currentColor", d: "M10 12a2 2 0 1 0 4 0 2 2 0 0 0-4 0" }),
1525
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("path", { stroke: "#64748B", d: "M21 12q-3.6 6-9 6t-9-6q3.6-6 9-6t9 6" })
1702
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("g", { strokeLinecap: "round", strokeLinejoin: "round", children: [
1703
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("path", { stroke: "currentColor", d: "M10 12a2 2 0 1 0 4 0 2 2 0 0 0-4 0" }),
1704
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("path", { stroke: "#64748B", d: "M21 12q-3.6 6-9 6t-9-6q3.6-6 9-6t9 6" })
1526
1705
  ] }) });
1527
1706
  };
1528
1707
  var eye_default = SvgEye;
1529
1708
 
1530
1709
  // src/theme/default/components/form/input.tsx
1531
- var import_jsx_runtime44 = require("react/jsx-runtime");
1710
+ var import_jsx_runtime45 = require("react/jsx-runtime");
1532
1711
  var DefaultInput = ({
1533
1712
  node,
1534
1713
  attributes,
1535
1714
  onClick
1536
1715
  }) => {
1537
- const label = (0, import_client_fetch10.getNodeLabel)(node);
1538
- const { register } = (0, import_react_hook_form5.useFormContext)();
1716
+ const label = (0, import_client_fetch12.getNodeLabel)(node);
1717
+ const { register, watch } = (0, import_react_hook_form5.useFormContext)();
1539
1718
  const {
1540
1719
  value,
1541
1720
  autocomplete,
@@ -1545,19 +1724,19 @@ var DefaultInput = ({
1545
1724
  ...rest
1546
1725
  } = attributes;
1547
1726
  const intl = (0, import_react_intl9.useIntl)();
1548
- const { flowType } = (0, import_elements_react9.useOryFlow)();
1549
- const inputRef = (0, import_react5.useRef)(null);
1727
+ const { flowType } = (0, import_elements_react10.useOryFlow)();
1728
+ const inputRef = (0, import_react6.useRef)(null);
1550
1729
  const formattedLabel = label ? intl.formatMessage(
1551
1730
  {
1552
1731
  id: "input.placeholder",
1553
1732
  defaultMessage: "Enter your {placeholder}"
1554
1733
  },
1555
1734
  {
1556
- placeholder: (0, import_elements_react9.uiTextToFormattedMessage)(label, intl)
1735
+ placeholder: (0, import_elements_react10.uiTextToFormattedMessage)(label, intl)
1557
1736
  }
1558
1737
  ) : "";
1559
1738
  if (rest.type === "hidden") {
1560
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
1739
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
1561
1740
  "input",
1562
1741
  {
1563
1742
  ...rest,
@@ -1571,16 +1750,16 @@ var DefaultInput = ({
1571
1750
  );
1572
1751
  }
1573
1752
  const { ref, ...restRegister } = register(name, { value });
1574
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
1753
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
1575
1754
  "div",
1576
1755
  {
1577
1756
  className: cn(
1578
1757
  "relative flex justify-stretch",
1579
1758
  // The settings flow input fields are supposed to be dense, so we don't need the extra padding we want on the user flows.
1580
- flowType === import_client_fetch10.FlowType.Settings && "max-w-[488px]"
1759
+ flowType === import_client_fetch12.FlowType.Settings && "max-w-[488px]"
1581
1760
  ),
1582
1761
  children: [
1583
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
1762
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
1584
1763
  "input",
1585
1764
  {
1586
1765
  ...rest,
@@ -1604,7 +1783,7 @@ var DefaultInput = ({
1604
1783
  ...restRegister
1605
1784
  }
1606
1785
  ),
1607
- rest.type === "password" && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(PasswordToggle, { inputRef })
1786
+ rest.type === "password" && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(PasswordToggle, { inputRef })
1608
1787
  ]
1609
1788
  }
1610
1789
  );
@@ -1612,30 +1791,31 @@ var DefaultInput = ({
1612
1791
  function PasswordToggle({
1613
1792
  inputRef
1614
1793
  }) {
1615
- const [shown, setShown] = (0, import_react5.useState)(false);
1794
+ const [shown, setShown] = (0, import_react6.useState)(false);
1616
1795
  const handleClick = () => {
1617
1796
  setShown(!shown);
1618
1797
  if (inputRef.current) {
1619
1798
  inputRef.current.type = shown ? "password" : "text";
1620
1799
  }
1621
1800
  };
1622
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
1801
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
1623
1802
  "button",
1624
1803
  {
1625
1804
  onClick: handleClick,
1626
1805
  className: "absolute right-0 h-full w-12 flex items-center justify-center",
1627
1806
  type: "button",
1628
- children: shown ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(eye_off_default, {}) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(eye_default, {})
1807
+ "aria-label": "Toggle password visibility",
1808
+ children: shown ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(eye_off_default, {}) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(eye_default, {})
1629
1809
  }
1630
1810
  );
1631
1811
  }
1632
1812
 
1633
1813
  // src/theme/default/components/form/label.tsx
1634
- var import_client_fetch11 = require("@ory/client-fetch");
1635
- var import_elements_react10 = require("@ory/elements-react");
1814
+ var import_client_fetch13 = require("@ory/client-fetch");
1815
+ var import_elements_react11 = require("@ory/elements-react");
1636
1816
  var import_react_hook_form6 = require("react-hook-form");
1637
1817
  var import_react_intl10 = require("react-intl");
1638
- var import_jsx_runtime45 = require("react/jsx-runtime");
1818
+ var import_jsx_runtime46 = require("react/jsx-runtime");
1639
1819
  function findResendNode(nodes) {
1640
1820
  return nodes.find(
1641
1821
  (n) => "name" in n.attributes && (n.attributes.name === "email" && n.attributes.type === "submit" || n.attributes.name === "resend")
@@ -1648,9 +1828,9 @@ function DefaultLabel({
1648
1828
  ...rest
1649
1829
  }) {
1650
1830
  const intl = (0, import_react_intl10.useIntl)();
1651
- const label = (0, import_client_fetch11.getNodeLabel)(node);
1652
- const { Message } = (0, import_elements_react10.useComponents)();
1653
- const { config, flowType, flow } = (0, import_elements_react10.useOryFlow)();
1831
+ const label = (0, import_client_fetch13.getNodeLabel)(node);
1832
+ const { Message } = (0, import_elements_react11.useComponents)();
1833
+ const { config, flowType, flow } = (0, import_elements_react11.useOryFlow)();
1654
1834
  const { setValue, formState } = (0, import_react_hook_form6.useFormContext)();
1655
1835
  const isPassword = attributes.type === "password";
1656
1836
  const resendNode = findResendNode(flow.ui.nodes);
@@ -1660,21 +1840,21 @@ function DefaultLabel({
1660
1840
  }
1661
1841
  };
1662
1842
  const fieldError = formState.errors[attributes.name];
1663
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex flex-col gap-1 antialiased", children: [
1664
- label && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("span", { className: "inline-flex justify-between", children: [
1665
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
1843
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex flex-col gap-1 antialiased", children: [
1844
+ label && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { className: "inline-flex justify-between", children: [
1845
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
1666
1846
  "label",
1667
1847
  {
1668
- ...(0, import_elements_react10.messageTestId)(label),
1848
+ ...(0, import_elements_react11.messageTestId)(label),
1669
1849
  className: "leading-normal text-input-foreground-primary",
1670
1850
  htmlFor: attributes.name,
1671
1851
  "data-testid": `ory/form/node/input/label/${attributes.name}`,
1672
1852
  ...rest,
1673
- children: (0, import_elements_react10.uiTextToFormattedMessage)(label, intl)
1853
+ children: (0, import_elements_react11.uiTextToFormattedMessage)(label, intl)
1674
1854
  }
1675
1855
  ),
1676
- isPassword && config.project.recovery_enabled && flowType === import_client_fetch11.FlowType.Login && // TODO: make it possible to override with a custom component
1677
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
1856
+ isPassword && config.project.recovery_enabled && flowType === import_client_fetch13.FlowType.Login && // TODO: make it possible to override with a custom component
1857
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
1678
1858
  "a",
1679
1859
  {
1680
1860
  href: initFlowUrl(config.sdk.url, "recovery", flow),
@@ -1685,7 +1865,7 @@ function DefaultLabel({
1685
1865
  })
1686
1866
  }
1687
1867
  ),
1688
- (resendNode == null ? void 0 : resendNode.attributes.node_type) === "input" && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
1868
+ (resendNode == null ? void 0 : resendNode.attributes.node_type) === "input" && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
1689
1869
  "button",
1690
1870
  {
1691
1871
  type: "submit",
@@ -1698,31 +1878,31 @@ function DefaultLabel({
1698
1878
  )
1699
1879
  ] }),
1700
1880
  children,
1701
- node.messages.map((message) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Message.Content, { message }, message.id)),
1702
- fieldError && (0, import_client_fetch11.instanceOfUiText)(fieldError) && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Message.Content, { message: fieldError })
1881
+ node.messages.map((message) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Message.Content, { message }, message.id)),
1882
+ fieldError && (0, import_client_fetch13.instanceOfUiText)(fieldError) && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Message.Content, { message: fieldError })
1703
1883
  ] });
1704
1884
  }
1705
1885
 
1706
1886
  // src/theme/default/components/form/link-button.tsx
1707
- var import_client_fetch12 = require("@ory/client-fetch");
1708
- var import_elements_react11 = require("@ory/elements-react");
1709
- var import_react6 = require("react");
1887
+ var import_client_fetch14 = require("@ory/client-fetch");
1888
+ var import_elements_react12 = require("@ory/elements-react");
1889
+ var import_react7 = require("react");
1710
1890
  var import_react_intl11 = require("react-intl");
1711
- var import_jsx_runtime46 = require("react/jsx-runtime");
1712
- var DefaultLinkButton = (0, import_react6.forwardRef)(({ attributes, node }, ref) => {
1891
+ var import_jsx_runtime47 = require("react/jsx-runtime");
1892
+ var DefaultLinkButton = (0, import_react7.forwardRef)(({ attributes, node }, ref) => {
1713
1893
  const intl = (0, import_react_intl11.useIntl)();
1714
- const label = (0, import_client_fetch12.getNodeLabel)(node);
1715
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
1894
+ const label = (0, import_client_fetch14.getNodeLabel)(node);
1895
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
1716
1896
  "a",
1717
1897
  {
1718
1898
  ...attributes,
1719
1899
  ref,
1720
- title: label ? (0, import_elements_react11.uiTextToFormattedMessage)(label, intl) : "",
1900
+ title: label ? (0, import_elements_react12.uiTextToFormattedMessage)(label, intl) : "",
1721
1901
  "data-testid": `ory/form/node/link/${attributes.id}`,
1722
1902
  className: cn(
1723
1903
  "antialiased rounded cursor-pointer text-center border gap-3 leading-none bg-button-primary-background-default hover:bg-button-primary-background-hover transition-colors text-button-primary-foreground-default hover:text-button-primary-foreground-hover p-4 font-medium"
1724
1904
  ),
1725
- children: label ? (0, import_elements_react11.uiTextToFormattedMessage)(label, intl) : ""
1905
+ children: label ? (0, import_elements_react12.uiTextToFormattedMessage)(label, intl) : ""
1726
1906
  }
1727
1907
  );
1728
1908
  });
@@ -1734,8 +1914,8 @@ var import_react_hook_form7 = require("react-hook-form");
1734
1914
  // src/theme/default/components/form/shadcn/otp-input.tsx
1735
1915
  var import_input_otp = require("input-otp");
1736
1916
  var React26 = __toESM(require("react"));
1737
- var import_jsx_runtime47 = require("react/jsx-runtime");
1738
- var InputOTP = React26.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
1917
+ var import_jsx_runtime48 = require("react/jsx-runtime");
1918
+ var InputOTP = React26.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
1739
1919
  import_input_otp.OTPInput,
1740
1920
  {
1741
1921
  ref,
@@ -1748,12 +1928,12 @@ var InputOTP = React26.forwardRef(({ className, containerClassName, ...props },
1748
1928
  }
1749
1929
  ));
1750
1930
  InputOTP.displayName = "InputOTP";
1751
- var InputOTPGroup = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { ref, className: cn("flex items-center", className), ...props }));
1931
+ var InputOTPGroup = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { ref, className: cn("flex items-center", className), ...props }));
1752
1932
  InputOTPGroup.displayName = "InputOTPGroup";
1753
1933
  var InputOTPSlot = React26.forwardRef(({ index, className, ...props }, ref) => {
1754
1934
  const inputOTPContext = React26.useContext(import_input_otp.OTPInputContext);
1755
1935
  const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
1756
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
1936
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
1757
1937
  "div",
1758
1938
  {
1759
1939
  ref,
@@ -1765,8 +1945,8 @@ var InputOTPSlot = React26.forwardRef(({ index, className, ...props }, ref) => {
1765
1945
  ),
1766
1946
  ...props,
1767
1947
  children: [
1768
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "inline-block size-4", children: char }),
1769
- hasFakeCaret && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "h-4 w-px animate-caret-blink bg-interface-background-brand-primary duration-700" }) })
1948
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "inline-block size-4", children: char }),
1949
+ hasFakeCaret && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "h-4 w-px animate-caret-blink bg-interface-background-brand-primary duration-700" }) })
1770
1950
  ]
1771
1951
  }
1772
1952
  );
@@ -1774,34 +1954,34 @@ var InputOTPSlot = React26.forwardRef(({ index, className, ...props }, ref) => {
1774
1954
  InputOTPSlot.displayName = "InputOTPSlot";
1775
1955
 
1776
1956
  // src/theme/default/components/form/pin-code-input.tsx
1777
- var import_elements_react12 = require("@ory/elements-react");
1778
- var import_client_fetch13 = require("@ory/client-fetch");
1779
- var import_jsx_runtime48 = require("react/jsx-runtime");
1957
+ var import_elements_react13 = require("@ory/elements-react");
1958
+ var import_client_fetch15 = require("@ory/client-fetch");
1959
+ var import_jsx_runtime49 = require("react/jsx-runtime");
1780
1960
  var DefaultPinCodeInput = ({ attributes }) => {
1781
1961
  const { setValue, watch } = (0, import_react_hook_form7.useFormContext)();
1782
1962
  const { maxlength, name } = attributes;
1783
1963
  const elements = maxlength != null ? maxlength : 6;
1784
- const { flowType } = (0, import_elements_react12.useOryFlow)();
1964
+ const { flowType } = (0, import_elements_react13.useOryFlow)();
1785
1965
  const handleInputChange = (v) => {
1786
1966
  setValue(name, v);
1787
1967
  };
1788
1968
  const value = watch(name);
1789
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
1969
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
1790
1970
  InputOTP,
1791
1971
  {
1792
1972
  maxLength: maxlength != null ? maxlength : 6,
1793
1973
  onChange: handleInputChange,
1794
1974
  name,
1795
1975
  value,
1796
- children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
1976
+ children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
1797
1977
  InputOTPGroup,
1798
1978
  {
1799
1979
  className: cn(
1800
1980
  "w-full flex gap-2 justify-stretch",
1801
1981
  // The settings flow input fields are supposed to be dense, so we don't need the extra padding we want on the user flows.
1802
- flowType === import_client_fetch13.FlowType.Settings && "max-w-[488px]"
1982
+ flowType === import_client_fetch15.FlowType.Settings && "max-w-[488px]"
1803
1983
  ),
1804
- children: [...Array(elements)].map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(InputOTPSlot, { index }, index))
1984
+ children: [...Array(elements)].map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(InputOTPSlot, { index }, index))
1805
1985
  }
1806
1986
  )
1807
1987
  }
@@ -1809,13 +1989,13 @@ var DefaultPinCodeInput = ({ attributes }) => {
1809
1989
  };
1810
1990
 
1811
1991
  // src/theme/default/components/form/section.tsx
1812
- var import_jsx_runtime49 = require("react/jsx-runtime");
1992
+ var import_jsx_runtime50 = require("react/jsx-runtime");
1813
1993
  var DefaultFormSection = ({
1814
1994
  children,
1815
1995
  nodes: _nodes,
1816
1996
  ...rest
1817
1997
  }) => {
1818
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
1998
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
1819
1999
  "form",
1820
2000
  {
1821
2001
  className: "flex w-full max-w-screen-sm flex-col md:max-w-[712px] lg:max-w-[802px] xl:max-w-[896px] px-4",
@@ -1829,10 +2009,10 @@ var DefaultFormSectionContent = ({
1829
2009
  description,
1830
2010
  children
1831
2011
  }) => {
1832
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-col gap-8 rounded-t-cards border border-b-0 border-interface-border-default-primary bg-interface-background-default-primary px-6 py-8", children: [
1833
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-col gap-2", children: [
1834
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("h3", { className: "font-medium text-interface-foreground-default-primary", children: title }),
1835
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "text-interface-foreground-default-secondary", children: description })
2012
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex flex-col gap-8 rounded-t-cards border border-b-0 border-interface-border-default-primary bg-interface-background-default-primary px-6 py-8", children: [
2013
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex flex-col gap-2", children: [
2014
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("h3", { className: "font-medium text-interface-foreground-default-primary", children: title }),
2015
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "text-interface-foreground-default-secondary", children: description })
1836
2016
  ] }),
1837
2017
  children
1838
2018
  ] });
@@ -1841,14 +2021,14 @@ var DefaultFormSectionFooter = ({
1841
2021
  children,
1842
2022
  text
1843
2023
  }) => {
1844
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
2024
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
1845
2025
  "div",
1846
2026
  {
1847
2027
  className: cn(
1848
2028
  "flex min-h-[72px] items-center justify-between gap-2 rounded-b-cards border border-interface-border-default-primary bg-interface-background-default-secondary px-6 py-4 text-interface-foreground-default-tertiary"
1849
2029
  ),
1850
2030
  children: [
1851
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { children: text }),
2031
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { children: text }),
1852
2032
  children
1853
2033
  ]
1854
2034
  }
@@ -1856,74 +2036,74 @@ var DefaultFormSectionFooter = ({
1856
2036
  };
1857
2037
 
1858
2038
  // src/theme/default/components/form/text.tsx
1859
- var import_elements_react13 = require("@ory/elements-react");
2039
+ var import_elements_react14 = require("@ory/elements-react");
1860
2040
  var import_react_intl12 = require("react-intl");
1861
- var import_jsx_runtime50 = require("react/jsx-runtime");
2041
+ var import_jsx_runtime51 = require("react/jsx-runtime");
1862
2042
  function DefaultText({ node, attributes }) {
1863
2043
  var _a;
1864
2044
  const intl = (0, import_react_intl12.useIntl)();
1865
2045
  const lookup = (_a = attributes.text.context) == null ? void 0 : _a.secrets;
1866
2046
  if (lookup) {
1867
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
1868
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { "data-testid": `ory/form/node/text/${attributes.id}/label`, children: node.meta.label ? (0, import_elements_react13.uiTextToFormattedMessage)(node.meta.label, intl) : "" }),
1869
- lookup.map((text, index) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
2047
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
2048
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { "data-testid": `ory/form/node/text/${attributes.id}/label`, children: node.meta.label ? (0, import_elements_react14.uiTextToFormattedMessage)(node.meta.label, intl) : "" }),
2049
+ lookup.map((text, index) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
1870
2050
  "pre",
1871
2051
  {
1872
2052
  "data-testid": `ory/form/node/text/lookup_secret_codes/text`,
1873
- children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("code", { children: text ? (0, import_elements_react13.uiTextToFormattedMessage)(text, intl) : "" })
2053
+ children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("code", { children: text ? (0, import_elements_react14.uiTextToFormattedMessage)(text, intl) : "" })
1874
2054
  },
1875
2055
  index
1876
2056
  ))
1877
2057
  ] });
1878
2058
  }
1879
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_jsx_runtime50.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
2059
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_jsx_runtime51.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
1880
2060
  "p",
1881
2061
  {
1882
2062
  "data-testid": `ory/form/node/text/${attributes.id}/label`,
1883
2063
  id: attributes.id,
1884
2064
  children: [
1885
- node.meta.label ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("label", { children: (0, import_elements_react13.uiTextToFormattedMessage)(node.meta.label, intl) }) : null,
1886
- attributes.text ? (0, import_elements_react13.uiTextToFormattedMessage)(attributes.text, intl) : ""
2065
+ node.meta.label ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("label", { children: (0, import_elements_react14.uiTextToFormattedMessage)(node.meta.label, intl) }) : null,
2066
+ attributes.text ? (0, import_elements_react14.uiTextToFormattedMessage)(attributes.text, intl) : ""
1887
2067
  ]
1888
2068
  }
1889
2069
  ) });
1890
2070
  }
1891
2071
 
1892
2072
  // src/theme/default/components/generic/page-header.tsx
1893
- var import_elements_react15 = require("@ory/elements-react");
2073
+ var import_elements_react16 = require("@ory/elements-react");
1894
2074
 
1895
2075
  // src/theme/default/components/ui/user-menu.tsx
1896
- var import_elements_react14 = require("@ory/elements-react");
2076
+ var import_elements_react15 = require("@ory/elements-react");
1897
2077
  var import_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
1898
2078
 
1899
2079
  // src/theme/default/assets/icons/logout.svg
1900
2080
  var React27 = __toESM(require("react"));
1901
- var import_jsx_runtime51 = require("react/jsx-runtime");
2081
+ var import_jsx_runtime52 = require("react/jsx-runtime");
1902
2082
  var SvgLogout = (props) => {
1903
2083
  var _a, _b;
1904
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.333 5.334V4A1.333 1.333 0 0 0 8 2.667H3.333A1.333 1.333 0 0 0 2 4v8a1.333 1.333 0 0 0 1.333 1.334H8A1.333 1.333 0 0 0 9.333 12v-1.333M4.667 8H14m0 0-2-2m2 2-2 2" }) });
2084
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.333 5.334V4A1.333 1.333 0 0 0 8 2.667H3.333A1.333 1.333 0 0 0 2 4v8a1.333 1.333 0 0 0 1.333 1.334H8A1.333 1.333 0 0 0 9.333 12v-1.333M4.667 8H14m0 0-2-2m2 2-2 2" }) });
1905
2085
  };
1906
2086
  var logout_default = SvgLogout;
1907
2087
 
1908
2088
  // src/theme/default/assets/icons/settings.svg
1909
2089
  var React28 = __toESM(require("react"));
1910
- var import_jsx_runtime52 = require("react/jsx-runtime");
2090
+ var import_jsx_runtime53 = require("react/jsx-runtime");
1911
2091
  var SvgSettings = (props) => {
1912
2092
  var _a, _b;
1913
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("g", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", children: [
1914
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("path", { d: "M6.883 2.878c.284-1.17 1.95-1.17 2.234 0a1.15 1.15 0 0 0 1.715.71c1.029-.626 2.207.551 1.58 1.58a1.148 1.148 0 0 0 .71 1.715c1.17.284 1.17 1.95 0 2.234a1.15 1.15 0 0 0-.71 1.715c.626 1.029-.551 2.207-1.58 1.58a1.148 1.148 0 0 0-1.715.71c-.284 1.17-1.95 1.17-2.234 0a1.15 1.15 0 0 0-1.715-.71c-1.029.626-2.207-.551-1.58-1.58a1.15 1.15 0 0 0-.71-1.715c-1.17-.284-1.17-1.95 0-2.234a1.15 1.15 0 0 0 .71-1.715c-.626-1.029.551-2.207 1.58-1.58.667.405 1.531.047 1.715-.71" }),
1915
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("path", { d: "M6 8a2 2 0 1 0 4 0 2 2 0 0 0-4 0" })
2093
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("g", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", children: [
2094
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("path", { d: "M6.883 2.878c.284-1.17 1.95-1.17 2.234 0a1.15 1.15 0 0 0 1.715.71c1.029-.626 2.207.551 1.58 1.58a1.148 1.148 0 0 0 .71 1.715c1.17.284 1.17 1.95 0 2.234a1.15 1.15 0 0 0-.71 1.715c.626 1.029-.551 2.207-1.58 1.58a1.148 1.148 0 0 0-1.715.71c-.284 1.17-1.95 1.17-2.234 0a1.15 1.15 0 0 0-1.715-.71c-1.029.626-2.207-.551-1.58-1.58a1.15 1.15 0 0 0-.71-1.715c-1.17-.284-1.17-1.95 0-2.234a1.15 1.15 0 0 0 .71-1.715c-.626-1.029.551-2.207 1.58-1.58.667.405 1.531.047 1.715-.71" }),
2095
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("path", { d: "M6 8a2 2 0 1 0 4 0 2 2 0 0 0-4 0" })
1916
2096
  ] }) });
1917
2097
  };
1918
2098
  var settings_default = SvgSettings;
1919
2099
 
1920
2100
  // src/theme/default/utils/logout.ts
1921
- var import_react7 = require("react");
2101
+ var import_react8 = require("react");
1922
2102
 
1923
2103
  // src/util/client.ts
1924
- var import_client_fetch14 = require("@ory/client-fetch");
2104
+ var import_client_fetch16 = require("@ory/client-fetch");
1925
2105
  function frontendClient(sdkUrl, opts = {}) {
1926
- const config = new import_client_fetch14.Configuration({
2106
+ const config = new import_client_fetch16.Configuration({
1927
2107
  ...opts,
1928
2108
  basePath: sdkUrl,
1929
2109
  headers: {
@@ -1931,17 +2111,17 @@ function frontendClient(sdkUrl, opts = {}) {
1931
2111
  ...opts.headers
1932
2112
  }
1933
2113
  });
1934
- return new import_client_fetch14.FrontendApi(config);
2114
+ return new import_client_fetch16.FrontendApi(config);
1935
2115
  }
1936
2116
 
1937
2117
  // src/theme/default/utils/logout.ts
1938
2118
  function useClientLogout(config) {
1939
- const [logoutFlow, setLogoutFlow] = (0, import_react7.useState)();
1940
- const fetchLogoutFlow = (0, import_react7.useCallback)(async () => {
2119
+ const [logoutFlow, setLogoutFlow] = (0, import_react8.useState)();
2120
+ const fetchLogoutFlow = (0, import_react8.useCallback)(async () => {
1941
2121
  const flow = await frontendClient(config.sdk.url).createBrowserLogoutFlow();
1942
2122
  setLogoutFlow(flow);
1943
2123
  }, [config.sdk.url]);
1944
- (0, import_react7.useEffect)(() => {
2124
+ (0, import_react8.useEffect)(() => {
1945
2125
  void fetchLogoutFlow();
1946
2126
  }, [fetchLogoutFlow]);
1947
2127
  return logoutFlow;
@@ -1987,12 +2167,12 @@ var getUserInitials = (session) => {
1987
2167
  };
1988
2168
 
1989
2169
  // src/theme/default/components/ui/dropdown-menu.tsx
1990
- var import_react8 = require("react");
2170
+ var import_react9 = require("react");
1991
2171
  var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"));
1992
- var import_jsx_runtime53 = require("react/jsx-runtime");
2172
+ var import_jsx_runtime54 = require("react/jsx-runtime");
1993
2173
  var DropdownMenu = DropdownMenuPrimitive.Root;
1994
2174
  var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
1995
- var DropdownMenuContent = (0, import_react8.forwardRef)(({ className, sideOffset = 16, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
2175
+ var DropdownMenuContent = (0, import_react9.forwardRef)(({ className, sideOffset = 16, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
1996
2176
  DropdownMenuPrimitive.Content,
1997
2177
  {
1998
2178
  ref,
@@ -2007,7 +2187,7 @@ var DropdownMenuContent = (0, import_react8.forwardRef)(({ className, sideOffset
2007
2187
  }
2008
2188
  ) }));
2009
2189
  DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
2010
- var DropdownMenuItem = (0, import_react8.forwardRef)(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
2190
+ var DropdownMenuItem = (0, import_react9.forwardRef)(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
2011
2191
  DropdownMenuPrimitive.Item,
2012
2192
  {
2013
2193
  ref,
@@ -2025,7 +2205,7 @@ var DropdownMenuItem = (0, import_react8.forwardRef)(({ className, inset, ...pro
2025
2205
  }
2026
2206
  ));
2027
2207
  DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
2028
- var DropdownMenuLabel = (0, import_react8.forwardRef)(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
2208
+ var DropdownMenuLabel = (0, import_react9.forwardRef)(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
2029
2209
  DropdownMenuPrimitive.Label,
2030
2210
  {
2031
2211
  ref,
@@ -2040,35 +2220,35 @@ var DropdownMenuLabel = (0, import_react8.forwardRef)(({ className, inset, ...pr
2040
2220
  DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
2041
2221
 
2042
2222
  // src/theme/default/components/ui/user-avater.tsx
2043
- var import_react9 = require("react");
2223
+ var import_react10 = require("react");
2044
2224
 
2045
2225
  // src/theme/default/assets/icons/user.svg
2046
2226
  var React29 = __toESM(require("react"));
2047
- var import_jsx_runtime54 = require("react/jsx-runtime");
2227
+ var import_jsx_runtime55 = require("react/jsx-runtime");
2048
2228
  var SvgUser = (props) => {
2049
2229
  var _a, _b;
2050
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M6 21v-2a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v2M8 7a4 4 0 1 0 8 0 4 4 0 0 0-8 0" }) });
2230
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M6 21v-2a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v2M8 7a4 4 0 1 0 8 0 4 4 0 0 0-8 0" }) });
2051
2231
  };
2052
2232
  var user_default = SvgUser;
2053
2233
 
2054
2234
  // src/theme/default/components/ui/user-avater.tsx
2055
- var import_jsx_runtime55 = require("react/jsx-runtime");
2056
- var UserAvatar = (0, import_react9.forwardRef)(
2235
+ var import_jsx_runtime56 = require("react/jsx-runtime");
2236
+ var UserAvatar = (0, import_react10.forwardRef)(
2057
2237
  ({ initials, ...rest }, ref) => {
2058
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
2238
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
2059
2239
  "button",
2060
2240
  {
2061
2241
  ref,
2062
2242
  className: "relative flex size-10 items-center justify-center overflow-hidden rounded-[999px] bg-button-primary-background-default hover:bg-button-primary-background-hover",
2063
2243
  ...rest,
2064
- children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "relative flex size-full items-center justify-center", children: initials.avatar ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
2244
+ children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "relative flex size-full items-center justify-center", children: initials.avatar ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
2065
2245
  "img",
2066
2246
  {
2067
2247
  src: initials.avatar,
2068
2248
  alt: initials.primary,
2069
2249
  className: "w-full object-contain"
2070
2250
  }
2071
- ) : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
2251
+ ) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
2072
2252
  user_default,
2073
2253
  {
2074
2254
  size: 24,
@@ -2082,27 +2262,27 @@ var UserAvatar = (0, import_react9.forwardRef)(
2082
2262
  UserAvatar.displayName = "UserAvatar";
2083
2263
 
2084
2264
  // src/theme/default/components/ui/user-menu.tsx
2085
- var import_jsx_runtime56 = require("react/jsx-runtime");
2265
+ var import_jsx_runtime57 = require("react/jsx-runtime");
2086
2266
  var UserMenu = ({ session }) => {
2087
- const { config } = (0, import_elements_react14.useOryFlow)();
2267
+ const { config } = (0, import_elements_react15.useOryFlow)();
2088
2268
  const initials = getUserInitials(session);
2089
2269
  const logoutFlow = useClientLogout(config);
2090
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(DropdownMenu, { children: [
2091
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(UserAvatar, { initials }) }),
2092
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(DropdownMenuContent, { children: [
2093
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_react_dropdown_menu.DropdownMenuLabel, { className: "flex gap-3 px-5 py-4.5", children: [
2094
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(UserAvatar, { disabled: true, initials }),
2095
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex flex-col justify-center text-sm leading-tight", children: [
2096
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "text-interface-foreground-default-primary leading-tight font-medium", children: initials.primary }),
2097
- initials.secondary && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "text-interface-foreground-default-tertiary leading-tight", children: initials.secondary })
2270
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(DropdownMenu, { children: [
2271
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(UserAvatar, { initials, title: "User Menu" }) }),
2272
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(DropdownMenuContent, { children: [
2273
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_react_dropdown_menu.DropdownMenuLabel, { className: "flex gap-3 px-5 py-4.5", children: [
2274
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(UserAvatar, { disabled: true, initials }),
2275
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex flex-col justify-center text-sm leading-tight", children: [
2276
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "text-interface-foreground-default-primary leading-tight font-medium", children: initials.primary }),
2277
+ initials.secondary && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "text-interface-foreground-default-tertiary leading-tight", children: initials.secondary })
2098
2278
  ] })
2099
2279
  ] }),
2100
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(DropdownMenuItem, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("a", { href: "/settings", children: [
2101
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(settings_default, { size: 16 }),
2280
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(DropdownMenuItem, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("a", { href: "/settings", children: [
2281
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(settings_default, { size: 16 }),
2102
2282
  " User settings"
2103
2283
  ] }) }),
2104
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(DropdownMenuItem, { asChild: true, disabled: !(logoutFlow == null ? void 0 : logoutFlow.logout_url), children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("a", { href: logoutFlow == null ? void 0 : logoutFlow.logout_url, children: [
2105
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(logout_default, { size: 16 }),
2284
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(DropdownMenuItem, { asChild: true, disabled: !(logoutFlow == null ? void 0 : logoutFlow.logout_url), children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("a", { href: logoutFlow == null ? void 0 : logoutFlow.logout_url, children: [
2285
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(logout_default, { size: 16 }),
2106
2286
  " Logout"
2107
2287
  ] }) })
2108
2288
  ] })
@@ -2111,42 +2291,42 @@ var UserMenu = ({ session }) => {
2111
2291
 
2112
2292
  // src/theme/default/components/generic/page-header.tsx
2113
2293
  var import_client2 = require("@ory/elements-react/client");
2114
- var import_jsx_runtime57 = require("react/jsx-runtime");
2294
+ var import_jsx_runtime58 = require("react/jsx-runtime");
2115
2295
  var DefaultPageHeader = (_props) => {
2116
- const { Card } = (0, import_elements_react15.useComponents)();
2296
+ const { Card } = (0, import_elements_react16.useComponents)();
2117
2297
  const { session } = (0, import_client2.useSession)();
2118
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "mt-16 flex max-w-screen-sm w-full md:max-w-[712px] lg:max-w-[802px] xl:max-w-[896px] flex-col gap-3 px-4", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "flex flex-col gap-12", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex max-h-10 flex-1 justify-between gap-2", children: [
2119
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "relative h-10 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Card.Logo, {}) }),
2120
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(UserMenu, { session })
2298
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "mt-16 flex max-w-screen-sm w-full md:max-w-[712px] lg:max-w-[802px] xl:max-w-[896px] flex-col gap-3 px-4", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "flex flex-col gap-12", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex max-h-10 flex-1 justify-between gap-2", children: [
2299
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "relative h-10 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Card.Logo, {}) }),
2300
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(UserMenu, { session })
2121
2301
  ] }) }) });
2122
2302
  };
2123
2303
 
2124
2304
  // src/theme/default/components/settings/settings-oidc.tsx
2125
- var import_react10 = require("react");
2305
+ var import_react11 = require("react");
2126
2306
  var import_react_hook_form8 = require("react-hook-form");
2127
2307
  var import_usehooks_ts2 = require("usehooks-ts");
2128
2308
 
2129
2309
  // src/theme/default/assets/icons/trash.svg
2130
2310
  var React30 = __toESM(require("react"));
2131
- var import_jsx_runtime58 = require("react/jsx-runtime");
2311
+ var import_jsx_runtime59 = require("react/jsx-runtime");
2132
2312
  var SvgTrash = (props) => {
2133
2313
  var _a, _b;
2134
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M4 7h16m-10 4v6m4-6v6M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2l1-12M9 7V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3" }) });
2314
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M4 7h16m-10 4v6m4-6v6M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2l1-12M9 7V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3" }) });
2135
2315
  };
2136
2316
  var trash_default = SvgTrash;
2137
2317
 
2138
2318
  // src/theme/default/components/settings/settings-oidc.tsx
2139
- var import_jsx_runtime59 = require("react/jsx-runtime");
2319
+ var import_jsx_runtime60 = require("react/jsx-runtime");
2140
2320
  function DefaultSettingsOidc({
2141
2321
  linkButtons,
2142
2322
  unlinkButtons
2143
2323
  }) {
2144
2324
  const hasLinkButtons = linkButtons.length > 0;
2145
2325
  const hasUnlinkButtons = unlinkButtons.length > 0;
2146
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex flex-col gap-8", children: [
2147
- hasLinkButtons && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "grid items-start gap-3 grid-cols-1 sm:grid-cols-2 md:grid-cols-3", children: linkButtons.map((button) => {
2326
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "flex flex-col gap-8", children: [
2327
+ hasLinkButtons && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "grid items-start gap-3 grid-cols-1 sm:grid-cols-2 md:grid-cols-3", children: linkButtons.map((button) => {
2148
2328
  const attrs = button.attributes;
2149
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
2329
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
2150
2330
  DefaultButtonSocial,
2151
2331
  {
2152
2332
  showLabel: true,
@@ -2157,12 +2337,12 @@ function DefaultSettingsOidc({
2157
2337
  attrs.value
2158
2338
  );
2159
2339
  }) }),
2160
- hasUnlinkButtons && hasLinkButtons ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(DefaultHorizontalDivider, {}) : null,
2340
+ hasUnlinkButtons && hasLinkButtons ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(DefaultHorizontalDivider, {}) : null,
2161
2341
  unlinkButtons.map((button) => {
2162
2342
  if (button.attributes.node_type !== "input") {
2163
2343
  return null;
2164
2344
  }
2165
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(UnlinkRow, { button }, button.attributes.value);
2345
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(UnlinkRow, { button }, button.attributes.value);
2166
2346
  })
2167
2347
  ] });
2168
2348
  }
@@ -2179,17 +2359,17 @@ function UnlinkRow({ button }) {
2179
2359
  button.onClick();
2180
2360
  setClicked(true);
2181
2361
  };
2182
- (0, import_react10.useEffect)(() => {
2362
+ (0, import_react11.useEffect)(() => {
2183
2363
  if (!isSubmitting) {
2184
2364
  setClicked(false);
2185
2365
  }
2186
2366
  }, [isSubmitting, setClicked]);
2187
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex justify-between", children: [
2188
- /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex items-center gap-6", children: [
2189
- Logo ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Logo, { size: 32 }) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(provider_logos_default.generic, { size: 32 }),
2190
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { className: "text-sm font-medium text-interface-foreground-default-secondary", children: provider })
2367
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "flex justify-between", children: [
2368
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "flex items-center gap-6", children: [
2369
+ Logo ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Logo, { size: 32 }) : /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(provider_logos_default.generic, { size: 32 }),
2370
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("p", { className: "text-sm font-medium text-interface-foreground-default-secondary", children: provider })
2191
2371
  ] }),
2192
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
2372
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
2193
2373
  "button",
2194
2374
  {
2195
2375
  ...attrs,
@@ -2198,7 +2378,7 @@ function UnlinkRow({ button }) {
2198
2378
  disabled: isSubmitting,
2199
2379
  className: "relative",
2200
2380
  title: `Unlink ${provider}`,
2201
- children: clicked ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Spinner, { className: "relative" }) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
2381
+ children: clicked ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Spinner, { className: "relative" }) : /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
2202
2382
  trash_default,
2203
2383
  {
2204
2384
  className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
@@ -2211,9 +2391,9 @@ function UnlinkRow({ button }) {
2211
2391
  }
2212
2392
 
2213
2393
  // src/theme/default/components/settings/settings-passkey.tsx
2214
- var import_elements_react16 = require("@ory/elements-react");
2394
+ var import_elements_react17 = require("@ory/elements-react");
2215
2395
  var import_react_hook_form9 = require("react-hook-form");
2216
- var import_jsx_runtime60 = require("react/jsx-runtime");
2396
+ var import_jsx_runtime61 = require("react/jsx-runtime");
2217
2397
  function DefaultSettingsPasskey({
2218
2398
  triggerButton,
2219
2399
  removeButtons
@@ -2221,10 +2401,10 @@ function DefaultSettingsPasskey({
2221
2401
  const {
2222
2402
  formState: { isSubmitting }
2223
2403
  } = (0, import_react_hook_form9.useFormContext)();
2224
- const { Node: Node2 } = (0, import_elements_react16.useComponents)();
2404
+ const { Node: Node2 } = (0, import_elements_react17.useComponents)();
2225
2405
  const hasRemoveButtons = removeButtons.length > 0;
2226
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "flex flex-col gap-8", children: [
2227
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "flex max-w-[60%] items-end gap-3", children: triggerButton && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
2406
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex flex-col gap-8", children: [
2407
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "flex max-w-[60%] items-end gap-3", children: triggerButton && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
2228
2408
  Node2.Button,
2229
2409
  {
2230
2410
  node: triggerButton,
@@ -2232,38 +2412,38 @@ function DefaultSettingsPasskey({
2232
2412
  onClick: triggerButton.onClick
2233
2413
  }
2234
2414
  ) }),
2235
- hasRemoveButtons ? /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "flex flex-col gap-8", children: [
2236
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(DefaultHorizontalDivider, {}),
2237
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "flex flex-col gap-2", children: removeButtons.map((node, i) => {
2415
+ hasRemoveButtons ? /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex flex-col gap-8", children: [
2416
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(DefaultHorizontalDivider, {}),
2417
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "flex flex-col gap-2", children: removeButtons.map((node, i) => {
2238
2418
  var _a, _b;
2239
2419
  const context = (_b = (_a = node.meta.label) == null ? void 0 : _a.context) != null ? _b : {};
2240
2420
  const addedAt = "added_at" in context ? context.added_at : null;
2241
2421
  const displayName = "display_name" in context ? context.display_name : null;
2242
2422
  const keyId = "value" in node.attributes ? node.attributes.value : null;
2243
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
2423
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
2244
2424
  "div",
2245
2425
  {
2246
2426
  className: "flex justify-between gap-6 md:items-center",
2247
2427
  children: [
2248
- /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "flex gap-2 items-center flex-1 truncate", children: [
2249
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
2428
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex gap-2 items-center flex-1 truncate", children: [
2429
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
2250
2430
  passkey_default,
2251
2431
  {
2252
2432
  size: 32,
2253
2433
  className: "text-interface-foreground-default-primary"
2254
2434
  }
2255
2435
  ),
2256
- /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "flex-1 flex-col md:flex-row md:items-center flex md:justify-between gap-4 truncate", children: [
2257
- /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "flex-1 flex-col truncate", children: [
2258
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("p", { className: "text-sm font-medium text-interface-foreground-default-secondary truncate", children: displayName }),
2259
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { className: "text-sm text-interface-foreground-default-tertiary hidden sm:block truncate", children: keyId })
2436
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex-1 flex-col md:flex-row md:items-center flex md:justify-between gap-4 truncate", children: [
2437
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex-1 flex-col truncate", children: [
2438
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("p", { className: "text-sm font-medium text-interface-foreground-default-secondary truncate", children: displayName }),
2439
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "text-sm text-interface-foreground-default-tertiary hidden sm:block truncate", children: keyId })
2260
2440
  ] }),
2261
- addedAt && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("p", { className: "text-sm text-interface-foreground-default-tertiary", children: new Intl.DateTimeFormat(void 0, {
2441
+ addedAt && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("p", { className: "text-sm text-interface-foreground-default-tertiary", children: new Intl.DateTimeFormat(void 0, {
2262
2442
  dateStyle: "long"
2263
2443
  }).format(new Date(addedAt)) })
2264
2444
  ] })
2265
2445
  ] }),
2266
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
2446
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
2267
2447
  "button",
2268
2448
  {
2269
2449
  ...node.attributes,
@@ -2271,7 +2451,7 @@ function DefaultSettingsPasskey({
2271
2451
  onClick: node.onClick,
2272
2452
  disabled: isSubmitting,
2273
2453
  className: "relative",
2274
- children: isSubmitting ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Spinner, { className: "relative" }) : /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
2454
+ children: isSubmitting ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Spinner, { className: "relative" }) : /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
2275
2455
  trash_default,
2276
2456
  {
2277
2457
  className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
@@ -2291,25 +2471,25 @@ function DefaultSettingsPasskey({
2291
2471
 
2292
2472
  // src/theme/default/assets/icons/download.svg
2293
2473
  var React31 = __toESM(require("react"));
2294
- var import_jsx_runtime61 = require("react/jsx-runtime");
2474
+ var import_jsx_runtime62 = require("react/jsx-runtime");
2295
2475
  var SvgDownload = (props) => {
2296
2476
  var _a, _b;
2297
- return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, fill: "none", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2M7 11l5 5m0 0 5-5m-5 5V4" }) });
2477
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, fill: "none", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2M7 11l5 5m0 0 5-5m-5 5V4" }) });
2298
2478
  };
2299
2479
  var download_default = SvgDownload;
2300
2480
 
2301
2481
  // src/theme/default/assets/icons/refresh.svg
2302
2482
  var React32 = __toESM(require("react"));
2303
- var import_jsx_runtime62 = require("react/jsx-runtime");
2483
+ var import_jsx_runtime63 = require("react/jsx-runtime");
2304
2484
  var SvgRefresh = (props) => {
2305
2485
  var _a, _b;
2306
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, fill: "none", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M20 11A8.1 8.1 0 0 0 4.5 9M4 5v4h4m-4 4a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4" }) });
2486
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, fill: "none", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M20 11A8.1 8.1 0 0 0 4.5 9M4 5v4h4m-4 4a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4" }) });
2307
2487
  };
2308
2488
  var refresh_default = SvgRefresh;
2309
2489
 
2310
2490
  // src/theme/default/components/settings/settings-recovery-codes.tsx
2311
2491
  var import_react_hook_form10 = require("react-hook-form");
2312
- var import_jsx_runtime63 = require("react/jsx-runtime");
2492
+ var import_jsx_runtime64 = require("react/jsx-runtime");
2313
2493
  function DefaultSettingsRecoveryCodes({
2314
2494
  codes,
2315
2495
  regnerateButton,
@@ -2331,12 +2511,12 @@ function DefaultSettingsRecoveryCodes({
2331
2511
  element.click();
2332
2512
  };
2333
2513
  const hasCodes = codes.length >= 1;
2334
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "flex flex-col gap-8", children: [
2335
- codes.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(DefaultHorizontalDivider, {}),
2336
- /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "flex gap-4 justify-between", children: [
2337
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: "text-interface-foreground-default-tertiary", children: revealButton && "Reveal recovery codes" }),
2338
- /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: "flex gap-2", children: [
2339
- regnerateButton && codes.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
2514
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "flex flex-col gap-8", children: [
2515
+ codes.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(DefaultHorizontalDivider, {}),
2516
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "flex gap-4 justify-between", children: [
2517
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "text-interface-foreground-default-tertiary", children: revealButton && "Reveal recovery codes" }),
2518
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "flex gap-2", children: [
2519
+ regnerateButton && codes.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
2340
2520
  "button",
2341
2521
  {
2342
2522
  ...regnerateButton.attributes,
@@ -2345,7 +2525,7 @@ function DefaultSettingsRecoveryCodes({
2345
2525
  onClick: onRegenerate,
2346
2526
  disabled: isSubmitting,
2347
2527
  "data-loading": isSubmitting,
2348
- children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
2528
+ children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
2349
2529
  refresh_default,
2350
2530
  {
2351
2531
  size: 24,
@@ -2354,7 +2534,7 @@ function DefaultSettingsRecoveryCodes({
2354
2534
  )
2355
2535
  }
2356
2536
  ),
2357
- revealButton && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_jsx_runtime63.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
2537
+ revealButton && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_jsx_runtime64.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
2358
2538
  "button",
2359
2539
  {
2360
2540
  ...revealButton.attributes,
@@ -2362,7 +2542,7 @@ function DefaultSettingsRecoveryCodes({
2362
2542
  className: "ml-auto",
2363
2543
  onClick: onReveal,
2364
2544
  title: "Reveal recovery codes",
2365
- children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
2545
+ children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
2366
2546
  eye_default,
2367
2547
  {
2368
2548
  size: 24,
@@ -2371,7 +2551,7 @@ function DefaultSettingsRecoveryCodes({
2371
2551
  )
2372
2552
  }
2373
2553
  ) }),
2374
- hasCodes && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
2554
+ hasCodes && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
2375
2555
  "button",
2376
2556
  {
2377
2557
  onClick: onDownload,
@@ -2379,7 +2559,7 @@ function DefaultSettingsRecoveryCodes({
2379
2559
  className: "ml-auto",
2380
2560
  "data-testid": "ory/screen/settings/group/recovery_code/download",
2381
2561
  title: "Download recovery codes",
2382
- children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
2562
+ children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
2383
2563
  download_default,
2384
2564
  {
2385
2565
  size: 24,
@@ -2390,32 +2570,32 @@ function DefaultSettingsRecoveryCodes({
2390
2570
  )
2391
2571
  ] })
2392
2572
  ] }),
2393
- hasCodes ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "rounded-general p-6 bg-interface-background-default-secondary border-interface-border-default-primary", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
2573
+ hasCodes ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "rounded-general p-6 bg-interface-background-default-secondary border-interface-border-default-primary", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
2394
2574
  "div",
2395
2575
  {
2396
2576
  className: "grid grid-cols-2 sm:grid-cols-3 md:grid-cols-5 flex-wrap gap-4 text-sm text-interface-foreground-default-primary",
2397
2577
  "data-testid": "ory/screen/settings/group/recovery_code/codes",
2398
- children: codes.map((code) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("p", { children: code }, code))
2578
+ children: codes.map((code) => /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("p", { children: code }, code))
2399
2579
  }
2400
2580
  ) }) : null
2401
2581
  ] });
2402
2582
  }
2403
2583
 
2404
2584
  // src/theme/default/components/settings/settings-totp.tsx
2405
- var import_elements_react17 = require("@ory/elements-react");
2585
+ var import_elements_react18 = require("@ory/elements-react");
2406
2586
 
2407
2587
  // src/theme/default/assets/icons/qrcode.svg
2408
2588
  var React33 = __toESM(require("react"));
2409
- var import_jsx_runtime64 = require("react/jsx-runtime");
2589
+ var import_jsx_runtime65 = require("react/jsx-runtime");
2410
2590
  var SvgQrcode = (props) => {
2411
2591
  var _a, _b;
2412
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, fill: "none", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.333 22.667v.013m0-13.346v.013m13.333-.013v.013m0 9.32h-4v4m8-4v.013m-8 7.987h4m0-4h4v4m-21.333-20a1.333 1.333 0 0 1 1.333-1.333H12a1.333 1.333 0 0 1 1.333 1.333V12A1.334 1.334 0 0 1 12 13.334H6.666A1.334 1.334 0 0 1 5.333 12zm13.333 0A1.333 1.333 0 0 1 20 5.334h5.333a1.333 1.333 0 0 1 1.333 1.333V12a1.333 1.333 0 0 1-1.333 1.334H20A1.333 1.333 0 0 1 18.666 12zM5.333 20a1.333 1.333 0 0 1 1.333-1.333H12A1.333 1.333 0 0 1 13.333 20v5.334A1.333 1.333 0 0 1 12 26.667H6.666a1.333 1.333 0 0 1-1.333-1.334z" }) });
2592
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, fill: "none", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.333 22.667v.013m0-13.346v.013m13.333-.013v.013m0 9.32h-4v4m8-4v.013m-8 7.987h4m0-4h4v4m-21.333-20a1.333 1.333 0 0 1 1.333-1.333H12a1.333 1.333 0 0 1 1.333 1.333V12A1.334 1.334 0 0 1 12 13.334H6.666A1.334 1.334 0 0 1 5.333 12zm13.333 0A1.333 1.333 0 0 1 20 5.334h5.333a1.333 1.333 0 0 1 1.333 1.333V12a1.333 1.333 0 0 1-1.333 1.334H20A1.333 1.333 0 0 1 18.666 12zM5.333 20a1.333 1.333 0 0 1 1.333-1.333H12A1.333 1.333 0 0 1 13.333 20v5.334A1.333 1.333 0 0 1 12 26.667H6.666a1.333 1.333 0 0 1-1.333-1.334z" }) });
2413
2593
  };
2414
2594
  var qrcode_default = SvgQrcode;
2415
2595
 
2416
2596
  // src/theme/default/components/settings/settings-totp.tsx
2417
2597
  var import_react_hook_form11 = require("react-hook-form");
2418
- var import_jsx_runtime65 = require("react/jsx-runtime");
2598
+ var import_jsx_runtime66 = require("react/jsx-runtime");
2419
2599
  function DefaultSettingsTotp({
2420
2600
  totpImage,
2421
2601
  totpInput,
@@ -2423,7 +2603,7 @@ function DefaultSettingsTotp({
2423
2603
  totpUnlink,
2424
2604
  onUnlink
2425
2605
  }) {
2426
- const { Node: Node2, Card } = (0, import_elements_react17.useComponents)();
2606
+ const { Node: Node2, Card } = (0, import_elements_react18.useComponents)();
2427
2607
  const {
2428
2608
  formState: { isSubmitting }
2429
2609
  } = (0, import_react_hook_form11.useFormContext)();
@@ -2435,19 +2615,19 @@ function DefaultSettingsTotp({
2435
2615
  node_type: _ignoredNodeType,
2436
2616
  ...buttonAttrs
2437
2617
  } = totpUnlink.attributes;
2438
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "grid grid-cols-1 gap-8 md:grid-cols-2", children: [
2439
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "col-span-full", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Card.Divider, {}) }),
2440
- /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "col-span-full flex items-center gap-6", children: [
2441
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "aspect-square size-8 ", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(qrcode_default, { size: 32 }) }),
2442
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "mr-auto flex flex-col", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("p", { className: "text-sm font-medium text-interface-foreground-default-primary", children: "Authenticator app" }) }),
2443
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
2618
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "grid grid-cols-1 gap-8 md:grid-cols-2", children: [
2619
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "col-span-full", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Card.Divider, {}) }),
2620
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "col-span-full flex items-center gap-6", children: [
2621
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "aspect-square size-8 ", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(qrcode_default, { size: 32 }) }),
2622
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "mr-auto flex flex-col", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("p", { className: "text-sm font-medium text-interface-foreground-default-primary", children: "Authenticator app" }) }),
2623
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
2444
2624
  "button",
2445
2625
  {
2446
2626
  type: type === "button" ? "button" : "submit",
2447
2627
  ...buttonAttrs,
2448
2628
  onClick: onUnlink,
2449
2629
  disabled: isSubmitting,
2450
- children: isSubmitting ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Spinner, { className: "relative" }) : /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
2630
+ children: isSubmitting ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Spinner, { className: "relative" }) : /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
2451
2631
  trash_default,
2452
2632
  {
2453
2633
  className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
@@ -2460,9 +2640,9 @@ function DefaultSettingsTotp({
2460
2640
  ] });
2461
2641
  }
2462
2642
  if (totpImage && totpSecret && totpInput) {
2463
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "grid grid-cols-1 gap-8 md:grid-cols-2", children: [
2464
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "col-span-full", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(DefaultHorizontalDivider, {}) }),
2465
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "flex justify-center rounded-cards bg-interface-background-default-secondary p-8", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "aspect-square h-44 rounded bg-[white]", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "-m-3 antialiased mix-blend-multiply", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
2643
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "grid grid-cols-1 gap-8 md:grid-cols-2", children: [
2644
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "col-span-full", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(DefaultHorizontalDivider, {}) }),
2645
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "flex justify-center rounded-cards bg-interface-background-default-secondary p-8", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "aspect-square h-44 rounded bg-[white]", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "-m-3 antialiased mix-blend-multiply", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
2466
2646
  Node2.Image,
2467
2647
  {
2468
2648
  node: totpImage,
@@ -2471,13 +2651,13 @@ function DefaultSettingsTotp({
2471
2651
  }
2472
2652
  }
2473
2653
  ) }) }) }),
2474
- /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "flex flex-col gap-6", children: [
2475
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
2654
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: "flex flex-col gap-6", children: [
2655
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
2476
2656
  Node2.Label,
2477
2657
  {
2478
2658
  node: totpSecret,
2479
2659
  attributes: totpSecret.attributes,
2480
- children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
2660
+ children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
2481
2661
  Node2.Input,
2482
2662
  {
2483
2663
  node: totpSecret,
@@ -2492,12 +2672,12 @@ function DefaultSettingsTotp({
2492
2672
  )
2493
2673
  }
2494
2674
  ),
2495
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
2675
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
2496
2676
  Node2.Label,
2497
2677
  {
2498
2678
  attributes: totpInput.attributes,
2499
2679
  node: totpInput,
2500
- children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
2680
+ children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
2501
2681
  Node2.CodeInput,
2502
2682
  {
2503
2683
  node: totpInput,
@@ -2512,20 +2692,20 @@ function DefaultSettingsTotp({
2512
2692
  }
2513
2693
 
2514
2694
  // src/theme/default/components/settings/settings-webauthn.tsx
2515
- var import_elements_react18 = require("@ory/elements-react");
2695
+ var import_elements_react19 = require("@ory/elements-react");
2516
2696
 
2517
2697
  // src/theme/default/assets/icons/key.svg
2518
2698
  var React34 = __toESM(require("react"));
2519
- var import_jsx_runtime66 = require("react/jsx-runtime");
2699
+ var import_jsx_runtime67 = require("react/jsx-runtime");
2520
2700
  var SvgKey = (props) => {
2521
2701
  var _a, _b;
2522
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M20 12h.013m2.06-6.876 4.803 4.803a3.836 3.836 0 0 1 0 5.425l-3.524 3.524a3.835 3.835 0 0 1-5.425 0l-.402-.401-8.744 8.744a2.67 2.67 0 0 1-1.652.77L6.896 28H5.333a1.334 1.334 0 0 1-1.324-1.177L4 26.667v-1.563c0-.626.22-1.232.623-1.712l.158-.173.552-.552H8V20h2.667v-2.667l2.858-2.858-.401-.402a3.835 3.835 0 0 1 0-5.425l3.524-3.524a3.835 3.835 0 0 1 5.425 0" }) });
2702
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M20 12h.013m2.06-6.876 4.803 4.803a3.836 3.836 0 0 1 0 5.425l-3.524 3.524a3.835 3.835 0 0 1-5.425 0l-.402-.401-8.744 8.744a2.67 2.67 0 0 1-1.652.77L6.896 28H5.333a1.334 1.334 0 0 1-1.324-1.177L4 26.667v-1.563c0-.626.22-1.232.623-1.712l.158-.173.552-.552H8V20h2.667v-2.667l2.858-2.858-.401-.402a3.835 3.835 0 0 1 0-5.425l3.524-3.524a3.835 3.835 0 0 1 5.425 0" }) });
2523
2703
  };
2524
2704
  var key_default = SvgKey;
2525
2705
 
2526
2706
  // src/theme/default/components/settings/settings-webauthn.tsx
2527
2707
  var import_react_hook_form12 = require("react-hook-form");
2528
- var import_jsx_runtime67 = require("react/jsx-runtime");
2708
+ var import_jsx_runtime68 = require("react/jsx-runtime");
2529
2709
  function DefaultSettingsWebauthn({
2530
2710
  nameInput,
2531
2711
  triggerButton,
@@ -2534,16 +2714,16 @@ function DefaultSettingsWebauthn({
2534
2714
  const {
2535
2715
  formState: { isSubmitting }
2536
2716
  } = (0, import_react_hook_form12.useFormContext)();
2537
- const { Node: Node2, Card } = (0, import_elements_react18.useComponents)();
2717
+ const { Node: Node2, Card } = (0, import_elements_react19.useComponents)();
2538
2718
  const hasRemoveButtons = removeButtons.length > 0;
2539
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex flex-col gap-8", children: [
2540
- /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex md:max-w-96 sm:items-end gap-3 flex-col sm:flex-row", children: [
2541
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
2719
+ return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "flex flex-col gap-8", children: [
2720
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "flex md:max-w-96 sm:items-end gap-3 flex-col sm:flex-row", children: [
2721
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
2542
2722
  Node2.Label,
2543
2723
  {
2544
2724
  node: nameInput,
2545
2725
  attributes: nameInput.attributes,
2546
- children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
2726
+ children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
2547
2727
  Node2.Input,
2548
2728
  {
2549
2729
  node: nameInput,
@@ -2552,7 +2732,7 @@ function DefaultSettingsWebauthn({
2552
2732
  )
2553
2733
  }
2554
2734
  ) }),
2555
- triggerButton ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
2735
+ triggerButton ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
2556
2736
  Node2.Button,
2557
2737
  {
2558
2738
  node: triggerButton,
@@ -2561,38 +2741,38 @@ function DefaultSettingsWebauthn({
2561
2741
  }
2562
2742
  ) : null
2563
2743
  ] }),
2564
- hasRemoveButtons ? /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex flex-col gap-8", children: [
2565
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Card.Divider, {}),
2566
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "flex flex-col gap-4", children: removeButtons.map((node, i) => {
2744
+ hasRemoveButtons ? /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "flex flex-col gap-8", children: [
2745
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Card.Divider, {}),
2746
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "flex flex-col gap-4", children: removeButtons.map((node, i) => {
2567
2747
  var _a, _b;
2568
2748
  const context = (_b = (_a = node.meta.label) == null ? void 0 : _a.context) != null ? _b : {};
2569
2749
  const addedAt = "added_at" in context ? context.added_at : null;
2570
2750
  const displayName = "display_name" in context ? context.display_name : null;
2571
2751
  const keyId = "value" in node.attributes ? node.attributes.value : null;
2572
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
2752
+ return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
2573
2753
  "div",
2574
2754
  {
2575
2755
  className: "flex justify-between gap-6 md:items-center",
2576
2756
  children: [
2577
- /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex gap-2 items-center flex-1 truncate", children: [
2578
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
2757
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "flex gap-2 items-center flex-1 truncate", children: [
2758
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
2579
2759
  key_default,
2580
2760
  {
2581
2761
  size: 32,
2582
2762
  className: "text-interface-foreground-default-primary"
2583
2763
  }
2584
2764
  ),
2585
- /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-1 flex-col md:flex-row md:items-center flex md:justify-between gap-4 truncate", children: [
2586
- /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "flex-1 flex-col truncate", children: [
2587
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("p", { className: "text-sm font-medium text-interface-foreground-default-secondary truncate", children: displayName }),
2588
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "text-sm text-interface-foreground-default-tertiary hidden sm:block truncate", children: keyId })
2765
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "flex-1 flex-col md:flex-row md:items-center flex md:justify-between gap-4 truncate", children: [
2766
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "flex-1 flex-col truncate", children: [
2767
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("p", { className: "text-sm font-medium text-interface-foreground-default-secondary truncate", children: displayName }),
2768
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "text-sm text-interface-foreground-default-tertiary hidden sm:block truncate", children: keyId })
2589
2769
  ] }),
2590
- addedAt && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("p", { className: "text-sm text-interface-foreground-default-tertiary", children: new Intl.DateTimeFormat(void 0, {
2770
+ addedAt && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("p", { className: "text-sm text-interface-foreground-default-tertiary", children: new Intl.DateTimeFormat(void 0, {
2591
2771
  dateStyle: "long"
2592
2772
  }).format(new Date(addedAt)) })
2593
2773
  ] })
2594
2774
  ] }),
2595
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
2775
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
2596
2776
  "button",
2597
2777
  {
2598
2778
  ...node.attributes,
@@ -2600,7 +2780,7 @@ function DefaultSettingsWebauthn({
2600
2780
  onClick: node.onClick,
2601
2781
  disabled: isSubmitting,
2602
2782
  className: "relative",
2603
- children: isSubmitting ? /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Spinner, { className: "relative" }) : /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
2783
+ children: isSubmitting ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Spinner, { className: "relative" }) : /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
2604
2784
  trash_default,
2605
2785
  {
2606
2786
  className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
@@ -2619,34 +2799,34 @@ function DefaultSettingsWebauthn({
2619
2799
  }
2620
2800
 
2621
2801
  // src/theme/default/components/card/auth-method-list-container.tsx
2622
- var import_jsx_runtime68 = require("react/jsx-runtime");
2802
+ var import_jsx_runtime69 = require("react/jsx-runtime");
2623
2803
  function DefaultAuthMethodListContainer({
2624
2804
  children
2625
2805
  }) {
2626
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "grid grid-cols-1 gap-2", children });
2806
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "grid grid-cols-1 gap-2", children });
2627
2807
  }
2628
2808
 
2629
2809
  // src/theme/default/components/form/captcha.tsx
2630
- var import_client_fetch15 = require("@ory/client-fetch");
2810
+ var import_client_fetch17 = require("@ory/client-fetch");
2631
2811
  var import_react_turnstile = require("@marsidev/react-turnstile");
2632
- var import_react11 = require("react");
2812
+ var import_react12 = require("react");
2633
2813
  var import_react_hook_form13 = require("react-hook-form");
2634
- var import_jsx_runtime69 = require("react/jsx-runtime");
2814
+ var import_jsx_runtime70 = require("react/jsx-runtime");
2635
2815
  var DefaultCaptcha = ({ node }) => {
2636
2816
  const { setValue } = (0, import_react_hook_form13.useFormContext)();
2637
- const ref = (0, import_react11.useRef)();
2817
+ const ref = (0, import_react12.useRef)();
2638
2818
  const nodes = [];
2639
- if ((0, import_client_fetch15.isUiNodeInputAttributes)(node.attributes)) {
2819
+ if ((0, import_client_fetch17.isUiNodeInputAttributes)(node.attributes)) {
2640
2820
  if (node.attributes.name === "transient_payload.captcha_turnstile_response") {
2641
2821
  nodes.push(
2642
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(DefaultInput, { node, attributes: node.attributes }, 1)
2822
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(DefaultInput, { node, attributes: node.attributes }, 1)
2643
2823
  );
2644
2824
  }
2645
2825
  }
2646
- if ((0, import_client_fetch15.isUiNodeInputAttributes)(node.attributes) && node.attributes.name === "captcha_turnstile_options") {
2826
+ if ((0, import_client_fetch17.isUiNodeInputAttributes)(node.attributes) && node.attributes.name === "captcha_turnstile_options") {
2647
2827
  const options = JSON.parse(node.attributes.value);
2648
2828
  nodes.push(
2649
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
2829
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
2650
2830
  import_react_turnstile.Turnstile,
2651
2831
  {
2652
2832
  ref,
@@ -2673,9 +2853,83 @@ var DefaultCaptcha = ({ node }) => {
2673
2853
  return nodes;
2674
2854
  };
2675
2855
 
2856
+ // src/theme/default/assets/icons/personal.svg
2857
+ var React35 = __toESM(require("react"));
2858
+ var import_jsx_runtime71 = require("react/jsx-runtime");
2859
+ var SvgPersonal = (props) => {
2860
+ var _a, _b;
2861
+ return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("path", { stroke: "#0F172A", strokeLinecap: "round", strokeLinejoin: "round", d: "M4 14v-1.333A2.667 2.667 0 0 1 6.667 10h1m5.8 3.467 1.2 1.2m-9.334-10a2.667 2.667 0 1 0 5.334 0 2.667 2.667 0 0 0-5.334 0M10 12a2 2 0 1 0 4 0 2 2 0 0 0-4 0" }) });
2862
+ };
2863
+ var personal_default = SvgPersonal;
2864
+
2865
+ // src/theme/default/assets/icons/message.svg
2866
+ var React36 = __toESM(require("react"));
2867
+ var import_jsx_runtime72 = require("react/jsx-runtime");
2868
+ var SvgMessage = (props) => {
2869
+ var _a, _b;
2870
+ return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 25", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("path", { stroke: "#000", strokeLinecap: "round", strokeLinejoin: "round", d: "M3 7.325a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2m-18 0v10a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-10m-18 0 9 6 9-6" }) });
2871
+ };
2872
+ var message_default = SvgMessage;
2873
+
2874
+ // src/theme/default/assets/icons/phone.svg
2875
+ var React37 = __toESM(require("react"));
2876
+ var import_jsx_runtime73 = require("react/jsx-runtime");
2877
+ var SvgPhone = (props) => {
2878
+ var _a, _b;
2879
+ return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 25", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M5 4.325h4l2 5-2.5 1.5a11 11 0 0 0 5 5l1.5-2.5 5 2v4a2 2 0 0 1-2 2 16 16 0 0 1-15-15 2 2 0 0 1 2-2" }) });
2880
+ };
2881
+ var phone_default = SvgPhone;
2882
+
2883
+ // src/theme/default/components/form/consent-scope-checkbox.tsx
2884
+ var import_react_intl13 = require("react-intl");
2885
+ var Switch = __toESM(require("@radix-ui/react-switch"));
2886
+ var import_jsx_runtime74 = require("react/jsx-runtime");
2887
+ var ScopeIcons = {
2888
+ openid: personal_default,
2889
+ offline_access: personal_default,
2890
+ profile: personal_default,
2891
+ email: message_default,
2892
+ phone: phone_default
2893
+ };
2894
+ function DefaultConsentScopeCheckbox({
2895
+ attributes,
2896
+ onCheckedChange
2897
+ }) {
2898
+ var _a;
2899
+ const intl = (0, import_react_intl13.useIntl)();
2900
+ const Icon = (_a = ScopeIcons[attributes.value]) != null ? _a : personal_default;
2901
+ return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
2902
+ ListItem,
2903
+ {
2904
+ as: "label",
2905
+ icon: Icon,
2906
+ title: intl.formatMessage({
2907
+ id: `consent.scope.${attributes.value}.title`,
2908
+ defaultMessage: attributes.value
2909
+ }),
2910
+ description: intl.formatMessage({
2911
+ id: `consent.scope.${attributes.value}.description`,
2912
+ defaultMessage: []
2913
+ }),
2914
+ className: "col-span-2",
2915
+ children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
2916
+ Switch.Root,
2917
+ {
2918
+ className: "relative w-7 h-4 bg-toggle-background-default rounded-identifier border-toggle-border-default border p-[3px] data-[state=checked]:bg-toggle-background-checked transition-all data-[state=checked]:border-toggle-border-checked",
2919
+ "data-testid": `ory/screen/consent/scope-checkbox`,
2920
+ value: attributes.value,
2921
+ onCheckedChange,
2922
+ defaultChecked: true,
2923
+ children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Switch.Thumb, { className: "size-2 block bg-toggle-foreground-default rounded-identifier data-[state=checked]:bg-toggle-foreground-checked transition-all data-[state=checked]:translate-x-3" })
2924
+ }
2925
+ )
2926
+ }
2927
+ );
2928
+ }
2929
+
2676
2930
  // src/theme/default/components/default-components.tsx
2677
2931
  function getOryComponents(overrides) {
2678
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da, _ea, _fa, _ga, _ha, _ia, _ja;
2932
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da, _ea, _fa, _ga, _ha, _ia, _ja, _ka, _la;
2679
2933
  return {
2680
2934
  Card: {
2681
2935
  Root: (_b = (_a = overrides == null ? void 0 : overrides.Card) == null ? void 0 : _a.Root) != null ? _b : DefaultCard,
@@ -2700,174 +2954,178 @@ function getOryComponents(overrides) {
2700
2954
  Checkbox: (_J = (_I = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _I.Checkbox) != null ? _J : DefaultCheckbox,
2701
2955
  Text: (_L = (_K = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _K.Text) != null ? _L : DefaultText,
2702
2956
  Anchor: (_N = (_M = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _M.Anchor) != null ? _N : DefaultLinkButton,
2703
- Captcha: (_P = (_O = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _O.Captcha) != null ? _P : DefaultCaptcha
2957
+ Captcha: (_P = (_O = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _O.Captcha) != null ? _P : DefaultCaptcha,
2958
+ ConsentScopeCheckbox: (_R = (_Q = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _Q.ConsentScopeCheckbox) != null ? _R : DefaultConsentScopeCheckbox
2704
2959
  },
2705
2960
  Form: {
2706
- Root: (_R = (_Q = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _Q.Root) != null ? _R : DefaultFormContainer,
2707
- Group: (_T = (_S = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _S.Group) != null ? _T : DefaultGroupContainer,
2708
- OidcRoot: (_V = (_U = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _U.OidcRoot) != null ? _V : DefaultSocialButtonContainer,
2709
- RecoveryCodesSettings: (_X = (_W = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _W.RecoveryCodesSettings) != null ? _X : DefaultSettingsRecoveryCodes,
2710
- TotpSettings: (_Z = (_Y = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _Y.TotpSettings) != null ? _Z : DefaultSettingsTotp,
2711
- OidcSettings: (_$ = (__ = overrides == null ? void 0 : overrides.Form) == null ? void 0 : __.OidcSettings) != null ? _$ : DefaultSettingsOidc,
2712
- WebauthnSettings: (_ba = (_aa = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _aa.WebauthnSettings) != null ? _ba : DefaultSettingsWebauthn,
2713
- PasskeySettings: (_da = (_ca = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _ca.PasskeySettings) != null ? _da : DefaultSettingsPasskey
2961
+ Root: (_T = (_S = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _S.Root) != null ? _T : DefaultFormContainer,
2962
+ Group: (_V = (_U = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _U.Group) != null ? _V : DefaultGroupContainer,
2963
+ OidcRoot: (_X = (_W = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _W.OidcRoot) != null ? _X : DefaultSocialButtonContainer,
2964
+ RecoveryCodesSettings: (_Z = (_Y = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _Y.RecoveryCodesSettings) != null ? _Z : DefaultSettingsRecoveryCodes,
2965
+ TotpSettings: (_$ = (__ = overrides == null ? void 0 : overrides.Form) == null ? void 0 : __.TotpSettings) != null ? _$ : DefaultSettingsTotp,
2966
+ OidcSettings: (_ba = (_aa = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _aa.OidcSettings) != null ? _ba : DefaultSettingsOidc,
2967
+ WebauthnSettings: (_da = (_ca = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _ca.WebauthnSettings) != null ? _da : DefaultSettingsWebauthn,
2968
+ PasskeySettings: (_fa = (_ea = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _ea.PasskeySettings) != null ? _fa : DefaultSettingsPasskey
2714
2969
  },
2715
2970
  Message: {
2716
- Root: (_fa = (_ea = overrides == null ? void 0 : overrides.Message) == null ? void 0 : _ea.Root) != null ? _fa : DefaultMessageContainer,
2717
- Content: (_ha = (_ga = overrides == null ? void 0 : overrides.Message) == null ? void 0 : _ga.Content) != null ? _ha : DefaultMessage
2971
+ Root: (_ha = (_ga = overrides == null ? void 0 : overrides.Message) == null ? void 0 : _ga.Root) != null ? _ha : DefaultMessageContainer,
2972
+ Content: (_ja = (_ia = overrides == null ? void 0 : overrides.Message) == null ? void 0 : _ia.Content) != null ? _ja : DefaultMessage
2718
2973
  },
2719
2974
  Page: {
2720
- Header: (_ja = (_ia = overrides == null ? void 0 : overrides.Page) == null ? void 0 : _ia.Header) != null ? _ja : DefaultPageHeader
2975
+ Header: (_la = (_ka = overrides == null ? void 0 : overrides.Page) == null ? void 0 : _ka.Header) != null ? _la : DefaultPageHeader
2721
2976
  }
2722
2977
  };
2723
2978
  }
2724
2979
 
2725
2980
  // src/theme/default/flows/error.tsx
2726
- var import_client_fetch34 = require("@ory/client-fetch");
2727
- var import_react15 = require("react");
2981
+ var import_client_fetch36 = require("@ory/client-fetch");
2982
+ var import_react16 = require("react");
2728
2983
 
2729
2984
  // src/context/intl-context.tsx
2730
- var import_react_intl20 = require("react-intl");
2985
+ var import_react_intl21 = require("react-intl");
2731
2986
 
2732
2987
  // src/context/flow-context.tsx
2733
- var import_react13 = require("react");
2988
+ var import_react14 = require("react");
2734
2989
 
2735
2990
  // src/context/form-state.ts
2736
- var import_client_fetch17 = require("@ory/client-fetch");
2737
- var import_react12 = require("react");
2991
+ var import_client_fetch19 = require("@ory/client-fetch");
2992
+ var import_react13 = require("react");
2738
2993
 
2739
2994
  // src/components/card/card-two-step.utils.ts
2740
- var import_client_fetch16 = require("@ory/client-fetch");
2995
+ var import_client_fetch18 = require("@ory/client-fetch");
2741
2996
 
2742
2997
  // src/context/flow-context.tsx
2743
- var import_jsx_runtime70 = require("react/jsx-runtime");
2744
- var OryFlowContext = (0, import_react13.createContext)(null);
2998
+ var import_jsx_runtime75 = require("react/jsx-runtime");
2999
+ var OryFlowContext = (0, import_react14.createContext)(null);
2745
3000
 
2746
3001
  // src/context/provider.tsx
2747
- var import_jsx_runtime71 = require("react/jsx-runtime");
3002
+ var import_jsx_runtime76 = require("react/jsx-runtime");
2748
3003
 
2749
3004
  // src/components/card/header.tsx
2750
- var import_jsx_runtime72 = require("react/jsx-runtime");
3005
+ var import_jsx_runtime77 = require("react/jsx-runtime");
2751
3006
 
2752
3007
  // src/components/form/form-provider.tsx
2753
- var import_client_fetch20 = require("@ory/client-fetch");
3008
+ var import_client_fetch22 = require("@ory/client-fetch");
2754
3009
  var import_react_hook_form14 = require("react-hook-form");
2755
3010
 
2756
3011
  // src/components/form/form-helpers.ts
2757
- var import_client_fetch18 = require("@ory/client-fetch");
3012
+ var import_client_fetch20 = require("@ory/client-fetch");
2758
3013
 
2759
3014
  // src/components/form/form-resolver.ts
2760
- var import_client_fetch19 = require("@ory/client-fetch");
3015
+ var import_client_fetch21 = require("@ory/client-fetch");
2761
3016
 
2762
3017
  // src/components/form/form-provider.tsx
2763
- var import_jsx_runtime73 = require("react/jsx-runtime");
3018
+ var import_jsx_runtime78 = require("react/jsx-runtime");
2764
3019
 
2765
3020
  // src/components/card/card.tsx
2766
- var import_jsx_runtime74 = require("react/jsx-runtime");
3021
+ var import_jsx_runtime79 = require("react/jsx-runtime");
2767
3022
 
2768
3023
  // src/components/card/footer.tsx
2769
- var import_jsx_runtime75 = require("react/jsx-runtime");
3024
+ var import_jsx_runtime80 = require("react/jsx-runtime");
2770
3025
 
2771
3026
  // src/components/card/content.tsx
2772
- var import_jsx_runtime76 = require("react/jsx-runtime");
3027
+ var import_jsx_runtime81 = require("react/jsx-runtime");
2773
3028
 
2774
3029
  // src/components/card/card-two-step.tsx
2775
- var import_client_fetch31 = require("@ory/client-fetch");
3030
+ var import_client_fetch33 = require("@ory/client-fetch");
2776
3031
  var import_react_hook_form19 = require("react-hook-form");
2777
3032
 
2778
3033
  // src/components/form/form.tsx
2779
- var import_client_fetch27 = require("@ory/client-fetch");
3034
+ var import_client_fetch29 = require("@ory/client-fetch");
2780
3035
  var import_react_hook_form16 = require("react-hook-form");
2781
- var import_react_intl13 = require("react-intl");
3036
+ var import_react_intl14 = require("react-intl");
2782
3037
 
2783
3038
  // src/components/form/useOryFormSubmit.ts
2784
- var import_client_fetch26 = require("@ory/client-fetch");
3039
+ var import_client_fetch28 = require("@ory/client-fetch");
2785
3040
  var import_react_hook_form15 = require("react-hook-form");
2786
3041
 
2787
3042
  // src/util/onSubmitLogin.ts
2788
- var import_client_fetch21 = require("@ory/client-fetch");
3043
+ var import_client_fetch23 = require("@ory/client-fetch");
2789
3044
 
2790
3045
  // src/util/onSubmitRecovery.ts
2791
- var import_client_fetch22 = require("@ory/client-fetch");
3046
+ var import_client_fetch24 = require("@ory/client-fetch");
2792
3047
 
2793
3048
  // src/util/onSubmitRegistration.ts
2794
- var import_client_fetch23 = require("@ory/client-fetch");
3049
+ var import_client_fetch25 = require("@ory/client-fetch");
2795
3050
 
2796
3051
  // src/util/onSubmitSettings.ts
2797
- var import_client_fetch24 = require("@ory/client-fetch");
3052
+ var import_client_fetch26 = require("@ory/client-fetch");
2798
3053
 
2799
3054
  // src/util/onSubmitVerification.ts
2800
- var import_client_fetch25 = require("@ory/client-fetch");
3055
+ var import_client_fetch27 = require("@ory/client-fetch");
2801
3056
 
2802
3057
  // src/components/form/form.tsx
2803
- var import_jsx_runtime77 = require("react/jsx-runtime");
3058
+ var import_jsx_runtime82 = require("react/jsx-runtime");
2804
3059
 
2805
3060
  // src/components/form/messages.tsx
2806
- var import_jsx_runtime78 = require("react/jsx-runtime");
3061
+ var import_jsx_runtime83 = require("react/jsx-runtime");
2807
3062
 
2808
3063
  // src/components/form/nodes/input.tsx
2809
- var import_client_fetch28 = require("@ory/client-fetch");
2810
- var import_react14 = require("react");
3064
+ var import_client_fetch30 = require("@ory/client-fetch");
3065
+ var import_react15 = require("react");
2811
3066
  var import_react_hook_form17 = require("react-hook-form");
2812
- var import_jsx_runtime79 = require("react/jsx-runtime");
3067
+ var import_jsx_runtime84 = require("react/jsx-runtime");
2813
3068
 
2814
3069
  // src/components/form/nodes/node.tsx
2815
- var import_client_fetch29 = require("@ory/client-fetch");
2816
- var import_jsx_runtime80 = require("react/jsx-runtime");
3070
+ var import_client_fetch31 = require("@ory/client-fetch");
3071
+ var import_jsx_runtime85 = require("react/jsx-runtime");
2817
3072
 
2818
3073
  // src/components/form/social.tsx
2819
- var import_client_fetch30 = require("@ory/client-fetch");
3074
+ var import_client_fetch32 = require("@ory/client-fetch");
2820
3075
  var import_react_hook_form18 = require("react-hook-form");
2821
- var import_jsx_runtime81 = require("react/jsx-runtime");
3076
+ var import_jsx_runtime86 = require("react/jsx-runtime");
2822
3077
 
2823
3078
  // src/components/card/card-two-step.tsx
2824
- var import_jsx_runtime82 = require("react/jsx-runtime");
3079
+ var import_jsx_runtime87 = require("react/jsx-runtime");
2825
3080
 
2826
3081
  // src/components/form/groups.tsx
2827
- var import_jsx_runtime83 = require("react/jsx-runtime");
3082
+ var import_jsx_runtime88 = require("react/jsx-runtime");
2828
3083
 
2829
3084
  // src/components/form/section.tsx
2830
3085
  var import_react_hook_form20 = require("react-hook-form");
2831
- var import_jsx_runtime84 = require("react/jsx-runtime");
3086
+ var import_jsx_runtime89 = require("react/jsx-runtime");
3087
+
3088
+ // src/components/card/card-consent.tsx
3089
+ var import_jsx_runtime90 = require("react/jsx-runtime");
2832
3090
 
2833
3091
  // src/components/generic/divider.tsx
2834
- var import_client_fetch32 = require("@ory/client-fetch");
2835
- var import_jsx_runtime85 = require("react/jsx-runtime");
3092
+ var import_client_fetch34 = require("@ory/client-fetch");
3093
+ var import_jsx_runtime91 = require("react/jsx-runtime");
2836
3094
 
2837
3095
  // src/components/generic/page-header.tsx
2838
- var import_jsx_runtime86 = require("react/jsx-runtime");
3096
+ var import_jsx_runtime92 = require("react/jsx-runtime");
2839
3097
 
2840
3098
  // src/components/settings/settings-card.tsx
2841
- var import_client_fetch33 = require("@ory/client-fetch");
2842
- var import_react_intl19 = require("react-intl");
3099
+ var import_client_fetch35 = require("@ory/client-fetch");
3100
+ var import_react_intl20 = require("react-intl");
2843
3101
 
2844
3102
  // src/components/settings/oidc-settings.tsx
2845
- var import_react_intl14 = require("react-intl");
3103
+ var import_react_intl15 = require("react-intl");
2846
3104
  var import_react_hook_form21 = require("react-hook-form");
2847
- var import_jsx_runtime87 = require("react/jsx-runtime");
3105
+ var import_jsx_runtime93 = require("react/jsx-runtime");
2848
3106
 
2849
3107
  // src/components/settings/passkey-settings.tsx
2850
3108
  var import_react_hook_form22 = require("react-hook-form");
2851
- var import_react_intl15 = require("react-intl");
2852
- var import_jsx_runtime88 = require("react/jsx-runtime");
3109
+ var import_react_intl16 = require("react-intl");
3110
+ var import_jsx_runtime94 = require("react/jsx-runtime");
2853
3111
 
2854
3112
  // src/components/settings/recovery-codes-settings.tsx
2855
- var import_react_intl16 = require("react-intl");
3113
+ var import_react_intl17 = require("react-intl");
2856
3114
  var import_react_hook_form23 = require("react-hook-form");
2857
- var import_jsx_runtime89 = require("react/jsx-runtime");
3115
+ var import_jsx_runtime95 = require("react/jsx-runtime");
2858
3116
 
2859
3117
  // src/components/settings/totp-settings.tsx
2860
3118
  var import_react_hook_form24 = require("react-hook-form");
2861
- var import_react_intl17 = require("react-intl");
2862
- var import_jsx_runtime90 = require("react/jsx-runtime");
3119
+ var import_react_intl18 = require("react-intl");
3120
+ var import_jsx_runtime96 = require("react/jsx-runtime");
2863
3121
 
2864
3122
  // src/components/settings/webauthn-settings.tsx
2865
3123
  var import_react_hook_form25 = require("react-hook-form");
2866
- var import_react_intl18 = require("react-intl");
2867
- var import_jsx_runtime91 = require("react/jsx-runtime");
3124
+ var import_react_intl19 = require("react-intl");
3125
+ var import_jsx_runtime97 = require("react/jsx-runtime");
2868
3126
 
2869
3127
  // src/components/settings/settings-card.tsx
2870
- var import_jsx_runtime92 = require("react/jsx-runtime");
3128
+ var import_jsx_runtime98 = require("react/jsx-runtime");
2871
3129
 
2872
3130
  // src/locales/en.json
2873
3131
  var en_default = {
@@ -3132,6 +3390,20 @@ var en_default = {
3132
3390
  "property.username": "username",
3133
3391
  "property.identifier": "identifier",
3134
3392
  "property.code": "code",
3393
+ "consent.title": "Authorize {party}",
3394
+ "consent.subtitle": "A third party application wants to access information associated with your account {identifier}.",
3395
+ "consent.scope.openid.title": "Identity",
3396
+ "consent.scope.openid.description": "Allows the application to verify your identity. This is required for authentication and a trusted login experience.",
3397
+ "consent.scope.offline_access.title": "Offline Access",
3398
+ "consent.scope.offline_access.description": "Allows this application to keep you signed in even when you're not actively using it.",
3399
+ "consent.scope.profile.title": "Profile Information",
3400
+ "consent.scope.profile.description": "Allows access to your basic profile details, including your username, first name, and last name.",
3401
+ "consent.scope.email.title": "Email Address",
3402
+ "consent.scope.email.description": "Retrieve your email address and its verification status.",
3403
+ "consent.scope.address.title": "Physical Address",
3404
+ "consent.scope.address.description": "Access your postal address.",
3405
+ "consent.scope.phone.title": "Phone Number",
3406
+ "consent.scope.phone.description": "Retrieve your phone number and its verification status.",
3135
3407
  "error.title.what-happened": "What happened?",
3136
3408
  "error.title.what-can-i-do": "What can I do?",
3137
3409
  "error.instructions": "Please try again in a few minutes or contact the website operator.",
@@ -3308,7 +3580,7 @@ var de_default = {
3308
3580
  "two-step.code.description": "Ein Best\xE4tigungscode wird an Ihre E-Mail gesendet.",
3309
3581
  "two-step.code.title": "E-Mail-Code",
3310
3582
  "two-step.passkey.description": "Verwenden Sie die Fingerabdruck- oder Gesichtserkennung Ihres Ger\xE4ts",
3311
- "two-step.passkey.title": "Passwort (empfohlen)",
3583
+ "two-step.passkey.title": "Passkey (empfohlen)",
3312
3584
  "two-step.password.description": "Geben Sie Ihr Passwort ein, das mit Ihrem Konto verkn\xFCpft ist",
3313
3585
  "two-step.password.title": "Passwort",
3314
3586
  "two-step.webauthn.title": "Sicherheitsschl\xFCssel",
@@ -3403,6 +3675,20 @@ var de_default = {
3403
3675
  "property.phone": "Telefon",
3404
3676
  "property.code": "Code",
3405
3677
  "property.username": "Benutzername",
3678
+ "consent.title": "Autorisieren {party}",
3679
+ "consent.subtitle": "Eine Drittanbieteranwendung m\xF6chte auf Informationen zugreifen, die mit Ihrem Konto {identifier} verkn\xFCpft sind.",
3680
+ "consent.scope.openid.title": "Identit\xE4t",
3681
+ "consent.scope.openid.description": "Erm\xF6glicht der Anwendung, Ihre Identit\xE4t zu \xFCberpr\xFCfen. Dies ist f\xFCr die Authentifizierung und eine vertrauensw\xFCrdige Login-Erfahrung erforderlich.",
3682
+ "consent.scope.offline_access.title": "Offline-Zugriff",
3683
+ "consent.scope.offline_access.description": "Erm\xF6glicht dieser Anwendung, Sie angemeldet zu lassen, auch wenn Sie sie nicht aktiv nutzen.",
3684
+ "consent.scope.profile.title": "Profilinformationen",
3685
+ "consent.scope.profile.description": "Erm\xF6glicht den Zugriff auf Ihre grundlegenden Profildetails, einschlie\xDFlich Ihres Benutzernamens, Vornamens und Nachnamens.",
3686
+ "consent.scope.email.title": "E-Mail-Adresse",
3687
+ "consent.scope.email.description": "Erm\xF6glicht den Abruf Ihrer E-Mail-Adresse und deren \xDCberpr\xFCfungsstatus.",
3688
+ "consent.scope.address.title": "Physische Adresse",
3689
+ "consent.scope.address.description": "Erm\xF6glicht den Zugriff auf Ihre Postanschrift.",
3690
+ "consent.scope.phone.title": "Telefonnummer",
3691
+ "consent.scope.phone.description": "Erm\xF6glicht den Abruf Ihrer Telefonnummer und deren \xDCberpr\xFCfungsstatus.",
3406
3692
  "error.title.what-happened": "Was ist passiert?",
3407
3693
  "error.footer.copy": "Kopieren",
3408
3694
  "error.footer.text": "Bitte f\xFCgen Sie bei der Meldung dieses Fehlers die folgenden Informationen hinzu:",
@@ -3674,6 +3960,20 @@ var es_default = {
3674
3960
  "property.password": "",
3675
3961
  "property.phone": "",
3676
3962
  "property.username": "",
3963
+ "consent.title": "Autorizar {party}",
3964
+ "consent.subtitle": "Una aplicaci\xF3n de terceros quiere acceder a la informaci\xF3n asociada a su cuenta {identifier}.",
3965
+ "consent.scope.openid.title": "Identidad",
3966
+ "consent.scope.openid.description": "Permite que la aplicaci\xF3n verifique su identidad. Esto es necesario para la autenticaci\xF3n y una experiencia de inicio de sesi\xF3n confiable.",
3967
+ "consent.scope.offline_access.title": "Acceso sin conexi\xF3n",
3968
+ "consent.scope.offline_access.description": "Permite que esta aplicaci\xF3n le mantenga conectado incluso cuando no la est\xE9 utilizando activamente.",
3969
+ "consent.scope.profile.title": "Informaci\xF3n del perfil",
3970
+ "consent.scope.profile.description": "Permite el acceso a los detalles b\xE1sicos de su perfil, incluyendo su nombre de usuario, nombre y apellido.",
3971
+ "consent.scope.email.title": "Direcci\xF3n de correo electr\xF3nico",
3972
+ "consent.scope.email.description": "Recupere su direcci\xF3n de correo electr\xF3nico y su estado de verificaci\xF3n.",
3973
+ "consent.scope.address.title": "Direcci\xF3n f\xEDsica",
3974
+ "consent.scope.address.description": "Acceda a su direcci\xF3n postal.",
3975
+ "consent.scope.phone.title": "N\xFAmero de tel\xE9fono",
3976
+ "consent.scope.phone.description": "Recupere su n\xFAmero de tel\xE9fono y su estado de verificaci\xF3n.",
3677
3977
  "error.action.go-back": "",
3678
3978
  "error.footer.copy": "",
3679
3979
  "error.footer.text": "",
@@ -3945,6 +4245,20 @@ var fr_default = {
3945
4245
  "property.password": "",
3946
4246
  "property.phone": "",
3947
4247
  "property.username": "",
4248
+ "consent.title": "Autoriser {party}",
4249
+ "consent.subtitle": "Une application tierce souhaite acc\xE9der aux informations associ\xE9es \xE0 votre compte {identifier}.",
4250
+ "consent.scope.openid.title": "Identit\xE9",
4251
+ "consent.scope.openid.description": "Permet \xE0 l'application de v\xE9rifier votre identit\xE9. Cela est n\xE9cessaire pour l'authentification et une exp\xE9rience de connexion fiable.",
4252
+ "consent.scope.offline_access.title": "Acc\xE8s hors ligne",
4253
+ "consent.scope.offline_access.description": "Permet \xE0 cette application de vous maintenir connect\xE9 m\xEAme lorsque vous ne l'utilisez pas activement.",
4254
+ "consent.scope.profile.title": "Informations de profil",
4255
+ "consent.scope.profile.description": "Permet l'acc\xE8s aux d\xE9tails de base de votre profil, y compris votre nom d'utilisateur, pr\xE9nom et nom.",
4256
+ "consent.scope.email.title": "Adresse e-mail",
4257
+ "consent.scope.email.description": "R\xE9cup\xE8re votre adresse e-mail et son statut de v\xE9rification.",
4258
+ "consent.scope.address.title": "Adresse physique",
4259
+ "consent.scope.address.description": "Acc\xE8de \xE0 votre adresse postale.",
4260
+ "consent.scope.phone.title": "Num\xE9ro de t\xE9l\xE9phone",
4261
+ "consent.scope.phone.description": "R\xE9cup\xE8re votre num\xE9ro de t\xE9l\xE9phone et son statut de v\xE9rification.",
3948
4262
  "error.action.go-back": "",
3949
4263
  "error.footer.copy": "",
3950
4264
  "error.footer.text": "",
@@ -4216,6 +4530,20 @@ var nl_default = {
4216
4530
  "property.password": "",
4217
4531
  "property.phone": "",
4218
4532
  "property.username": "",
4533
+ "consent.title": "Autoriseren {party}",
4534
+ "consent.subtitle": "Een derde partij applicatie wil toegang tot informatie die aan uw account {identifier} is gekoppeld.",
4535
+ "consent.scope.openid.title": "Identiteit",
4536
+ "consent.scope.openid.description": "Stelt de applicatie in staat uw identiteit te verifi\xEBren. Dit is vereist voor authenticatie en een betrouwbare inlogervaring.",
4537
+ "consent.scope.offline_access.title": "Offline toegang",
4538
+ "consent.scope.offline_access.description": "Stelt deze applicatie in staat u ingelogd te houden, zelfs wanneer u deze niet actief gebruikt.",
4539
+ "consent.scope.profile.title": "Profielinformatie",
4540
+ "consent.scope.profile.description": "Geeft toegang tot uw basisprofielgegevens, inclusief uw gebruikersnaam, voornaam en achternaam.",
4541
+ "consent.scope.email.title": "E-mailadres",
4542
+ "consent.scope.email.description": "Haal uw e-mailadres en de verificatiestatus ervan op.",
4543
+ "consent.scope.address.title": "Fysiek adres",
4544
+ "consent.scope.address.description": "Toegang tot uw postadres.",
4545
+ "consent.scope.phone.title": "Telefoonnummer",
4546
+ "consent.scope.phone.description": "Haal uw telefoonnummer en de verificatiestatus ervan op.",
4219
4547
  "error.action.go-back": "",
4220
4548
  "error.footer.copy": "",
4221
4549
  "error.footer.text": "",
@@ -4487,6 +4815,20 @@ var pl_default = {
4487
4815
  "property.phone": "",
4488
4816
  "property.username": "",
4489
4817
  "property.identifier": "",
4818
+ "consent.title": "Autoryzuj {party}",
4819
+ "consent.subtitle": "Aplikacja trzeciej strony chce uzyska\u0107 dost\u0119p do informacji powi\u0105zanych z Twoim kontem {identifier}.",
4820
+ "consent.scope.openid.title": "To\u017Csamo\u015B\u0107",
4821
+ "consent.scope.openid.description": "Pozwala aplikacji zweryfikowa\u0107 Twoj\u0105 to\u017Csamo\u015B\u0107. Jest to wymagane do uwierzytelniania i zapewnienia zaufanej sesji logowania.",
4822
+ "consent.scope.offline_access.title": "Dost\u0119p offline",
4823
+ "consent.scope.offline_access.description": "Pozwala aplikacji utrzyma\u0107 Twoje logowanie, nawet gdy nie korzystasz z niej aktywnie.",
4824
+ "consent.scope.profile.title": "Informacje profilowe",
4825
+ "consent.scope.profile.description": "Pozwala na dost\u0119p do podstawowych danych profilowych, w tym nazwy u\u017Cytkownika, imienia i nazwiska.",
4826
+ "consent.scope.email.title": "Adres e-mail",
4827
+ "consent.scope.email.description": "Pobierz sw\xF3j adres e-mail oraz status jego weryfikacji.",
4828
+ "consent.scope.address.title": "Adres fizyczny",
4829
+ "consent.scope.address.description": "Dost\u0119p do Twojego adresu pocztowego.",
4830
+ "consent.scope.phone.title": "Numer telefonu",
4831
+ "consent.scope.phone.description": "Pobierz sw\xF3j numer telefonu oraz status jego weryfikacji.",
4490
4832
  "error.action.go-back": "",
4491
4833
  "error.footer.copy": "",
4492
4834
  "error.footer.text": "",
@@ -4758,6 +5100,20 @@ var pt_default = {
4758
5100
  "property.password": "",
4759
5101
  "property.phone": "",
4760
5102
  "property.username": "",
5103
+ "consent.title": "Autorizar {party}",
5104
+ "consent.subtitle": "Um aplicativo de terceiros deseja acessar as informa\xE7\xF5es associadas \xE0 sua conta {identifier}.",
5105
+ "consent.scope.openid.title": "Identidade",
5106
+ "consent.scope.openid.description": "Permite que a aplica\xE7\xE3o verifique sua identidade. Isso \xE9 necess\xE1rio para a autentica\xE7\xE3o e uma experi\xEAncia de login confi\xE1vel.",
5107
+ "consent.scope.offline_access.title": "Acesso Offline",
5108
+ "consent.scope.offline_access.description": "Permite que este aplicativo mantenha voc\xEA conectado mesmo quando n\xE3o estiver usando-o ativamente.",
5109
+ "consent.scope.profile.title": "Informa\xE7\xF5es do Perfil",
5110
+ "consent.scope.profile.description": "Permite o acesso aos detalhes b\xE1sicos do seu perfil, incluindo seu nome de usu\xE1rio, primeiro nome e sobrenome.",
5111
+ "consent.scope.email.title": "Endere\xE7o de E-mail",
5112
+ "consent.scope.email.description": "Recupere seu endere\xE7o de e-mail e seu status de verifica\xE7\xE3o.",
5113
+ "consent.scope.address.title": "Endere\xE7o F\xEDsico",
5114
+ "consent.scope.address.description": "Acesse seu endere\xE7o postal.",
5115
+ "consent.scope.phone.title": "N\xFAmero de Telefone",
5116
+ "consent.scope.phone.description": "Recupere seu n\xFAmero de telefone e seu status de verifica\xE7\xE3o.",
4761
5117
  "error.action.go-back": "",
4762
5118
  "error.footer.copy": "",
4763
5119
  "error.footer.text": "",
@@ -5029,6 +5385,20 @@ var sv_default = {
5029
5385
  "property.username": "anv\xE4ndarnamn",
5030
5386
  "property.identifier": "identifier",
5031
5387
  "property.code": "kod",
5388
+ "consent.title": "Auktorisera {party}",
5389
+ "consent.subtitle": "En tredjepartsapplikation vill f\xE5 tillg\xE5ng till information kopplad till ditt konto {identifier}.",
5390
+ "consent.scope.openid.title": "Identitet",
5391
+ "consent.scope.openid.description": "G\xF6r det m\xF6jligt f\xF6r applikationen att verifiera din identitet. Detta kr\xE4vs f\xF6r autentisering och en p\xE5litlig inloggningsupplevelse.",
5392
+ "consent.scope.offline_access.title": "Offline-\xE5tkomst",
5393
+ "consent.scope.offline_access.description": "G\xF6r det m\xF6jligt f\xF6r denna applikation att h\xE5lla dig inloggad \xE4ven n\xE4r du inte aktivt anv\xE4nder den.",
5394
+ "consent.scope.profile.title": "Profilinformation",
5395
+ "consent.scope.profile.description": "Ger tillg\xE5ng till dina grundl\xE4ggande profiluppgifter, inklusive ditt anv\xE4ndarnamn, f\xF6rnamn och efternamn.",
5396
+ "consent.scope.email.title": "E-postadress",
5397
+ "consent.scope.email.description": "H\xE4mta din e-postadress och dess verifieringsstatus.",
5398
+ "consent.scope.address.title": "Fysisk adress",
5399
+ "consent.scope.address.description": "F\xE5 \xE5tkomst till din postadress.",
5400
+ "consent.scope.phone.title": "Telefonnummer",
5401
+ "consent.scope.phone.description": "H\xE4mta ditt telefonnummer och dess verifieringsstatus.",
5032
5402
  "error.action.go-back": "",
5033
5403
  "error.footer.copy": "",
5034
5404
  "error.footer.text": "",
@@ -5050,7 +5420,7 @@ var OryLocales = {
5050
5420
  };
5051
5421
 
5052
5422
  // src/context/intl-context.tsx
5053
- var import_jsx_runtime93 = require("react/jsx-runtime");
5423
+ var import_jsx_runtime99 = require("react/jsx-runtime");
5054
5424
  function mergeTranslations(customTranslations) {
5055
5425
  return Object.keys(customTranslations).reduce((acc, key) => {
5056
5426
  acc[key] = { ...OryLocales[key], ...customTranslations[key] };
@@ -5063,12 +5433,12 @@ var IntlProvider = ({
5063
5433
  customTranslations
5064
5434
  }) => {
5065
5435
  const messages = mergeTranslations(customTranslations != null ? customTranslations : {});
5066
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
5067
- import_react_intl20.IntlProvider,
5436
+ return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
5437
+ import_react_intl21.IntlProvider,
5068
5438
  {
5069
5439
  onWarn: () => ({}),
5070
5440
  defaultRichTextElements: {
5071
- del: (chunks) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("del", { children: chunks })
5441
+ del: (chunks) => /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("del", { children: chunks })
5072
5442
  },
5073
5443
  locale,
5074
5444
  messages: messages[locale],
@@ -5079,8 +5449,8 @@ var IntlProvider = ({
5079
5449
  };
5080
5450
 
5081
5451
  // src/theme/default/flows/error.tsx
5082
- var import_react_intl21 = require("react-intl");
5083
- var import_jsx_runtime94 = require("react/jsx-runtime");
5452
+ var import_react_intl22 = require("react-intl");
5453
+ var import_jsx_runtime100 = require("react/jsx-runtime");
5084
5454
  function isOAuth2Error(error) {
5085
5455
  return !!error && typeof error === "object" && "error" in error && "error_description" in error;
5086
5456
  }
@@ -5089,7 +5459,7 @@ var errorDescriptions = {
5089
5459
  5: "The server encountered an error and could not complete your request"
5090
5460
  };
5091
5461
  function useStandardize(error) {
5092
- return (0, import_react15.useMemo)(() => {
5462
+ return (0, import_react16.useMemo)(() => {
5093
5463
  var _a;
5094
5464
  if (isOAuth2Error(error)) {
5095
5465
  return {
@@ -5099,14 +5469,14 @@ function useStandardize(error) {
5099
5469
  timestamp: /* @__PURE__ */ new Date()
5100
5470
  };
5101
5471
  }
5102
- if ((0, import_client_fetch34.instanceOfFlowError)(error)) {
5472
+ if ((0, import_client_fetch36.instanceOfFlowError)(error)) {
5103
5473
  const parsed = error.error;
5104
5474
  return {
5105
5475
  ...parsed,
5106
5476
  id: error.id,
5107
5477
  timestamp: error.created_at
5108
5478
  };
5109
- } else if (error.error && (0, import_client_fetch34.instanceOfGenericError)(error.error)) {
5479
+ } else if (error.error && (0, import_client_fetch36.instanceOfGenericError)(error.error)) {
5110
5480
  return {
5111
5481
  code: (_a = error.error.code) != null ? _a : 500,
5112
5482
  message: error.error.message,
@@ -5133,47 +5503,47 @@ function Error2({
5133
5503
  const Divider = (_d = (_c = Components == null ? void 0 : Components.Card) == null ? void 0 : _c.Divider) != null ? _d : DefaultHorizontalDivider;
5134
5504
  const parsed = useStandardize(error);
5135
5505
  const description = errorDescriptions[Math.floor(parsed.code / 100)];
5136
- return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
5506
+ return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
5137
5507
  IntlProvider,
5138
5508
  {
5139
5509
  locale: (_f = (_e = config.intl) == null ? void 0 : _e.locale) != null ? _f : "en",
5140
5510
  customTranslations: (_g = config.intl) == null ? void 0 : _g.customTranslations,
5141
- children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Card, { children: /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
5511
+ children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Card, { children: /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(
5142
5512
  "div",
5143
5513
  {
5144
5514
  className: "flex flex-col gap-6 antialiased",
5145
5515
  "data-testid": "ory/screen/error",
5146
5516
  children: [
5147
- /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("header", { className: "flex flex-col gap-8 antialiased", children: [
5148
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(ErrorLogo, { config }),
5149
- /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex flex-col gap-2", children: [
5150
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("h2", { className: "text-lg font-semibold leading-normal text-interface-foreground-default-primary", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_react_intl21.FormattedMessage, { id: "error.title.what-happened" }) }),
5151
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("p", { className: "leading-normal text-interface-foreground-default-secondary", children: (_h = parsed.message) != null ? _h : description }),
5152
- parsed.reason && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("p", { className: "leading-normal text-interface-foreground-default-secondary", children: parsed.reason })
5517
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("header", { className: "flex flex-col gap-8 antialiased", children: [
5518
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(ErrorLogo, { config }),
5519
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: "flex flex-col gap-2", children: [
5520
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("h2", { className: "text-lg font-semibold leading-normal text-interface-foreground-default-primary", children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_react_intl22.FormattedMessage, { id: "error.title.what-happened" }) }),
5521
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("p", { className: "leading-normal text-interface-foreground-default-secondary", children: (_h = parsed.message) != null ? _h : description }),
5522
+ parsed.reason && /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("p", { className: "leading-normal text-interface-foreground-default-secondary", children: parsed.reason })
5153
5523
  ] })
5154
5524
  ] }),
5155
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Divider, {}),
5156
- /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex flex-col gap-2", children: [
5157
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("h2", { className: "text-lg font-semibold leading-normal text-interface-foreground-default-primary", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_react_intl21.FormattedMessage, { id: "error.title.what-can-i-do" }) }),
5158
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("p", { className: "leading-normal text-interface-foreground-default-secondary", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_react_intl21.FormattedMessage, { id: "error.instructions" }) }),
5159
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { children: session ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(LoggedInActions, { config }) : /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(GoBackButton, { config }) })
5525
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Divider, {}),
5526
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: "flex flex-col gap-2", children: [
5527
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("h2", { className: "text-lg font-semibold leading-normal text-interface-foreground-default-primary", children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_react_intl22.FormattedMessage, { id: "error.title.what-can-i-do" }) }),
5528
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("p", { className: "leading-normal text-interface-foreground-default-secondary", children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_react_intl22.FormattedMessage, { id: "error.instructions" }) }),
5529
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { children: session ? /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(LoggedInActions, { config }) : /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(GoBackButton, { config }) })
5160
5530
  ] }),
5161
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Divider, {}),
5162
- /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "font-normal leading-normal antialiased gap-2 flex flex-col", children: [
5163
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("span", { className: "text-interface-foreground-default-primary text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_react_intl21.FormattedMessage, { id: "error.footer.text" }) }),
5164
- parsed.id && /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("p", { className: "text-interface-foreground-default-secondary text-sm", children: [
5531
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Divider, {}),
5532
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: "font-normal leading-normal antialiased gap-2 flex flex-col", children: [
5533
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("span", { className: "text-interface-foreground-default-primary text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_react_intl22.FormattedMessage, { id: "error.footer.text" }) }),
5534
+ parsed.id && /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("p", { className: "text-interface-foreground-default-secondary text-sm", children: [
5165
5535
  "ID: ",
5166
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("code", { children: parsed.id })
5536
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("code", { children: parsed.id })
5167
5537
  ] }),
5168
- /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("p", { className: "text-interface-foreground-default-secondary text-sm", children: [
5538
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("p", { className: "text-interface-foreground-default-secondary text-sm", children: [
5169
5539
  "Time: ",
5170
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("code", { children: (_i = parsed.timestamp) == null ? void 0 : _i.toUTCString() })
5540
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("code", { children: (_i = parsed.timestamp) == null ? void 0 : _i.toUTCString() })
5171
5541
  ] }),
5172
- /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("p", { className: "text-interface-foreground-default-secondary text-sm", children: [
5542
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("p", { className: "text-interface-foreground-default-secondary text-sm", children: [
5173
5543
  "Message: ",
5174
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("code", { children: parsed.reason })
5544
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("code", { children: parsed.reason })
5175
5545
  ] }),
5176
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
5546
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
5177
5547
  "button",
5178
5548
  {
5179
5549
  className: "text-interface-foreground-default-primary underline",
@@ -5185,7 +5555,7 @@ ${parsed.reason ? `Message: ${parsed.reason}` : ""}
5185
5555
  `;
5186
5556
  void navigator.clipboard.writeText(text);
5187
5557
  },
5188
- children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_react_intl21.FormattedMessage, { id: "error.footer.copy" })
5558
+ children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_react_intl22.FormattedMessage, { id: "error.footer.copy" })
5189
5559
  }
5190
5560
  ) })
5191
5561
  ] })
@@ -5197,7 +5567,7 @@ ${parsed.reason ? `Message: ${parsed.reason}` : ""}
5197
5567
  }
5198
5568
  function LoggedInActions({ config }) {
5199
5569
  const logoutFlow = useClientLogout(config);
5200
- return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
5570
+ return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
5201
5571
  "a",
5202
5572
  {
5203
5573
  href: logoutFlow == null ? void 0 : logoutFlow.logout_url,
@@ -5208,12 +5578,12 @@ function LoggedInActions({ config }) {
5208
5578
  }
5209
5579
  function GoBackButton({ config }) {
5210
5580
  if ("default_redirect_url" in config.project) {
5211
- return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
5581
+ return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
5212
5582
  "a",
5213
5583
  {
5214
5584
  className: "text-interface-foreground-default-primary underline",
5215
5585
  href: config.project.default_redirect_url,
5216
- children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_react_intl21.FormattedMessage, { id: "error.action.go-back" })
5586
+ children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_react_intl22.FormattedMessage, { id: "error.action.go-back" })
5217
5587
  }
5218
5588
  );
5219
5589
  }
@@ -5221,15 +5591,15 @@ function GoBackButton({ config }) {
5221
5591
  }
5222
5592
  function ErrorLogo({ config }) {
5223
5593
  if (config.logoUrl) {
5224
- return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("img", { src: config.logoUrl, width: 100, height: 36, alt: "Logo" });
5594
+ return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("img", { src: config.logoUrl, width: 100, height: 36, alt: "Logo" });
5225
5595
  }
5226
- return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("h1", { className: "text-xl font-semibold leading-normal text-interface-foreground-default-primary", children: config.name });
5596
+ return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("h1", { className: "text-xl font-semibold leading-normal text-interface-foreground-default-primary", children: config.name });
5227
5597
  }
5228
5598
 
5229
5599
  // src/theme/default/flows/login.tsx
5230
- var import_client_fetch35 = require("@ory/client-fetch");
5231
- var import_elements_react19 = require("@ory/elements-react");
5232
- var import_jsx_runtime95 = require("react/jsx-runtime");
5600
+ var import_client_fetch37 = require("@ory/client-fetch");
5601
+ var import_elements_react20 = require("@ory/elements-react");
5602
+ var import_jsx_runtime101 = require("react/jsx-runtime");
5233
5603
  function Login({
5234
5604
  flow,
5235
5605
  config,
@@ -5237,22 +5607,22 @@ function Login({
5237
5607
  components: flowOverrideComponents
5238
5608
  }) {
5239
5609
  const components = getOryComponents(flowOverrideComponents);
5240
- return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
5241
- import_elements_react19.OryProvider,
5610
+ return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
5611
+ import_elements_react20.OryProvider,
5242
5612
  {
5243
5613
  config,
5244
5614
  flow,
5245
- flowType: import_client_fetch35.FlowType.Login,
5615
+ flowType: import_client_fetch37.FlowType.Login,
5246
5616
  components,
5247
- children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_elements_react19.OryTwoStepCard, {})
5617
+ children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_elements_react20.OryTwoStepCard, {})
5248
5618
  }
5249
5619
  );
5250
5620
  }
5251
5621
 
5252
5622
  // src/theme/default/flows/recovery.tsx
5253
- var import_client_fetch36 = require("@ory/client-fetch");
5254
- var import_elements_react20 = require("@ory/elements-react");
5255
- var import_jsx_runtime96 = require("react/jsx-runtime");
5623
+ var import_client_fetch38 = require("@ory/client-fetch");
5624
+ var import_elements_react21 = require("@ory/elements-react");
5625
+ var import_jsx_runtime102 = require("react/jsx-runtime");
5256
5626
  function Recovery({
5257
5627
  flow,
5258
5628
  config,
@@ -5260,22 +5630,22 @@ function Recovery({
5260
5630
  components: flowOverrideComponents
5261
5631
  }) {
5262
5632
  const components = getOryComponents(flowOverrideComponents);
5263
- return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
5264
- import_elements_react20.OryProvider,
5633
+ return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
5634
+ import_elements_react21.OryProvider,
5265
5635
  {
5266
5636
  config,
5267
5637
  flow,
5268
- flowType: import_client_fetch36.FlowType.Recovery,
5638
+ flowType: import_client_fetch38.FlowType.Recovery,
5269
5639
  components,
5270
- children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_elements_react20.OryTwoStepCard, {})
5640
+ children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_elements_react21.OryTwoStepCard, {})
5271
5641
  }
5272
5642
  );
5273
5643
  }
5274
5644
 
5275
5645
  // src/theme/default/flows/registration.tsx
5276
- var import_client_fetch37 = require("@ory/client-fetch");
5277
- var import_elements_react21 = require("@ory/elements-react");
5278
- var import_jsx_runtime97 = require("react/jsx-runtime");
5646
+ var import_client_fetch39 = require("@ory/client-fetch");
5647
+ var import_elements_react22 = require("@ory/elements-react");
5648
+ var import_jsx_runtime103 = require("react/jsx-runtime");
5279
5649
  function Registration({
5280
5650
  flow,
5281
5651
  children,
@@ -5283,22 +5653,22 @@ function Registration({
5283
5653
  config
5284
5654
  }) {
5285
5655
  const components = getOryComponents(flowOverrideComponents);
5286
- return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
5287
- import_elements_react21.OryProvider,
5656
+ return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
5657
+ import_elements_react22.OryProvider,
5288
5658
  {
5289
5659
  config,
5290
5660
  flow,
5291
- flowType: import_client_fetch37.FlowType.Registration,
5661
+ flowType: import_client_fetch39.FlowType.Registration,
5292
5662
  components,
5293
- children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_elements_react21.OryTwoStepCard, {})
5663
+ children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_elements_react22.OryTwoStepCard, {})
5294
5664
  }
5295
5665
  );
5296
5666
  }
5297
5667
 
5298
5668
  // src/theme/default/flows/settings.tsx
5299
- var import_client_fetch38 = require("@ory/client-fetch");
5300
- var import_elements_react22 = require("@ory/elements-react");
5301
- var import_jsx_runtime98 = require("react/jsx-runtime");
5669
+ var import_client_fetch40 = require("@ory/client-fetch");
5670
+ var import_elements_react23 = require("@ory/elements-react");
5671
+ var import_jsx_runtime104 = require("react/jsx-runtime");
5302
5672
  function Settings({
5303
5673
  flow,
5304
5674
  config,
@@ -5306,25 +5676,25 @@ function Settings({
5306
5676
  components: flowOverrideComponents
5307
5677
  }) {
5308
5678
  const components = getOryComponents(flowOverrideComponents);
5309
- return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
5310
- import_elements_react22.OryProvider,
5679
+ return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
5680
+ import_elements_react23.OryProvider,
5311
5681
  {
5312
5682
  config,
5313
5683
  flow,
5314
- flowType: import_client_fetch38.FlowType.Settings,
5684
+ flowType: import_client_fetch40.FlowType.Settings,
5315
5685
  components,
5316
- children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(import_jsx_runtime98.Fragment, { children: [
5317
- /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_elements_react22.HeadlessPageHeader, {}),
5318
- /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_elements_react22.OrySettingsCard, {})
5686
+ children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(import_jsx_runtime104.Fragment, { children: [
5687
+ /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_elements_react23.HeadlessPageHeader, {}),
5688
+ /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_elements_react23.OrySettingsCard, {})
5319
5689
  ] })
5320
5690
  }
5321
5691
  );
5322
5692
  }
5323
5693
 
5324
5694
  // src/theme/default/flows/verification.tsx
5325
- var import_client_fetch39 = require("@ory/client-fetch");
5326
- var import_elements_react23 = require("@ory/elements-react");
5327
- var import_jsx_runtime99 = require("react/jsx-runtime");
5695
+ var import_client_fetch41 = require("@ory/client-fetch");
5696
+ var import_elements_react24 = require("@ory/elements-react");
5697
+ var import_jsx_runtime105 = require("react/jsx-runtime");
5328
5698
  function Verification({
5329
5699
  flow,
5330
5700
  config,
@@ -5332,19 +5702,192 @@ function Verification({
5332
5702
  components: flowOverrideComponents
5333
5703
  }) {
5334
5704
  const components = getOryComponents(flowOverrideComponents);
5335
- return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
5336
- import_elements_react23.OryProvider,
5705
+ return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
5706
+ import_elements_react24.OryProvider,
5707
+ {
5708
+ config,
5709
+ flow,
5710
+ flowType: import_client_fetch41.FlowType.Verification,
5711
+ components,
5712
+ children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_elements_react24.OryTwoStepCard, {})
5713
+ }
5714
+ );
5715
+ }
5716
+
5717
+ // src/theme/default/flows/consent.tsx
5718
+ var import_client_fetch43 = require("@ory/client-fetch");
5719
+ var import_elements_react25 = require("@ory/elements-react");
5720
+
5721
+ // src/theme/default/utils/oauth2.ts
5722
+ var import_client_fetch42 = require("@ory/client-fetch");
5723
+ var rememberCheckbox = {
5724
+ type: "input",
5725
+ group: "oauth2_consent",
5726
+ meta: {
5727
+ label: {
5728
+ id: 9999111,
5729
+ text: "Remember my decision",
5730
+ type: import_client_fetch42.UiTextTypeEnum.Info
5731
+ }
5732
+ },
5733
+ attributes: {
5734
+ node_type: "input",
5735
+ name: "remember",
5736
+ value: false,
5737
+ type: "checkbox",
5738
+ disabled: false
5739
+ },
5740
+ messages: []
5741
+ };
5742
+ var acceptButton = {
5743
+ type: "input",
5744
+ group: "oauth2_consent",
5745
+ meta: {
5746
+ label: {
5747
+ id: 9999111,
5748
+ text: "Accept",
5749
+ type: import_client_fetch42.UiTextTypeEnum.Info
5750
+ }
5751
+ },
5752
+ attributes: {
5753
+ node_type: "input",
5754
+ name: "action",
5755
+ value: "accept",
5756
+ type: "submit",
5757
+ disabled: false
5758
+ },
5759
+ messages: []
5760
+ };
5761
+ var rejectButton = {
5762
+ type: "input",
5763
+ group: "oauth2_consent",
5764
+ meta: {
5765
+ label: {
5766
+ id: 9999111,
5767
+ text: "Reject",
5768
+ type: import_client_fetch42.UiTextTypeEnum.Info
5769
+ }
5770
+ },
5771
+ attributes: {
5772
+ node_type: "input",
5773
+ name: "action",
5774
+ value: "reject",
5775
+ type: "submit",
5776
+ disabled: false
5777
+ },
5778
+ messages: []
5779
+ };
5780
+ function translateConsentChallengeToUiNodes(consentChallenge, csrfToken, formAction, session) {
5781
+ var _a;
5782
+ const ui = {
5783
+ action: formAction,
5784
+ nodes: [
5785
+ ...scopesToUiNodes((_a = consentChallenge.requested_scope) != null ? _a : []),
5786
+ rememberCheckbox,
5787
+ rejectButton,
5788
+ acceptButton,
5789
+ csrfTokenNode(csrfToken),
5790
+ challengeNode(consentChallenge.challenge)
5791
+ ],
5792
+ method: "POST",
5793
+ messages: []
5794
+ };
5795
+ return {
5796
+ id: "UNSET",
5797
+ created_at: /* @__PURE__ */ new Date(),
5798
+ expires_at: /* @__PURE__ */ new Date(),
5799
+ issued_at: /* @__PURE__ */ new Date(),
5800
+ state: "show_form",
5801
+ active: "oauth2_consent",
5802
+ ui,
5803
+ consent_request: consentChallenge,
5804
+ session
5805
+ };
5806
+ }
5807
+ function scopesToUiNodes(scopes) {
5808
+ return scopes.map((scope) => ({
5809
+ type: "input",
5810
+ group: "oauth2_consent",
5811
+ meta: {
5812
+ label: {
5813
+ id: 9999111,
5814
+ text: scope,
5815
+ type: import_client_fetch42.UiTextTypeEnum.Info
5816
+ }
5817
+ },
5818
+ attributes: {
5819
+ node_type: "input",
5820
+ name: `grant_scope`,
5821
+ value: scope,
5822
+ type: "checkbox",
5823
+ disabled: false
5824
+ },
5825
+ messages: []
5826
+ }));
5827
+ }
5828
+ function csrfTokenNode(csrfToken) {
5829
+ return {
5830
+ type: "input",
5831
+ group: "default",
5832
+ meta: {},
5833
+ attributes: {
5834
+ node_type: "input",
5835
+ name: "csrf_token",
5836
+ value: csrfToken,
5837
+ type: "hidden",
5838
+ disabled: false
5839
+ },
5840
+ messages: []
5841
+ };
5842
+ }
5843
+ function challengeNode(challenge) {
5844
+ return {
5845
+ type: "input",
5846
+ group: "oauth2_consent",
5847
+ meta: {},
5848
+ attributes: {
5849
+ node_type: "input",
5850
+ name: "consent_challenge",
5851
+ value: challenge,
5852
+ type: "hidden",
5853
+ disabled: false
5854
+ },
5855
+ messages: []
5856
+ };
5857
+ }
5858
+
5859
+ // src/theme/default/flows/consent.tsx
5860
+ var import_jsx_runtime106 = require("react/jsx-runtime");
5861
+ function Consent({
5862
+ consentChallenge,
5863
+ session,
5864
+ config,
5865
+ components: Passed,
5866
+ children,
5867
+ csrfToken,
5868
+ formActionUrl
5869
+ }) {
5870
+ const components = getOryComponents(Passed);
5871
+ const flow = translateConsentChallengeToUiNodes(
5872
+ consentChallenge,
5873
+ csrfToken,
5874
+ formActionUrl,
5875
+ session
5876
+ );
5877
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
5878
+ import_elements_react25.OryProvider,
5337
5879
  {
5338
5880
  config,
5339
5881
  flow,
5340
- flowType: import_client_fetch39.FlowType.Verification,
5882
+ flowType: import_client_fetch43.FlowType.OAuth2Consent,
5341
5883
  components,
5342
- children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_elements_react23.OryTwoStepCard, {})
5884
+ children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_elements_react25.OryConsentCard, {})
5343
5885
  }
5344
5886
  );
5345
5887
  }
5346
5888
  // Annotate the CommonJS export names for ESM import in node:
5347
5889
  0 && (module.exports = {
5890
+ Consent,
5348
5891
  DefaultButtonSocial,
5349
5892
  DefaultCard,
5350
5893
  DefaultCardContent,