@abpjs/ui 0.2.0-next.4 → 0.2.0-next.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/guard.js ADDED
@@ -0,0 +1,4194 @@
1
+ "use client";
2
+
3
+ // src/areas/guard/AccountEmailsPanel.tsx
4
+ import { useState } from "react";
5
+ import { HStack, Input, Stack, Text } from "@chakra-ui/react";
6
+ import { Button, DataTable, InlineAlert, notify, Panel, StatusPill, useApiAction, useAreaRequest, useFormatters } from "@abpjs/ui";
7
+
8
+ // src/areas/guard/texts.ts
9
+ import { Fragment, createElement, useCallback } from "react";
10
+ import { createAreaTexts } from "@abpjs/ui";
11
+
12
+ // src/areas/guard/texts/ar.json
13
+ var ar_default = {
14
+ "directories.title": "\u0627\u0644\u0623\u062F\u0644\u0629",
15
+ "directories.subtitle": "\u0623\u062F\u0644\u0629 \u0627\u0644\u0645\u0633\u062A\u062E\u062F\u0645\u064A\u0646 \u0645\u0631\u062A\u0628\u0629 \u062D\u0633\u0628 \u0627\u0644\u0623\u0633\u0628\u0642\u064A\u0629. \u0625\u0630\u0627 \u0639\u0631\u0641 \u062F\u0644\u064A\u0644\u0627\u0646 \u0627\u0633\u0645 \u0627\u0644\u0645\u0633\u062A\u062E\u062F\u0645 \u0646\u0641\u0633\u0647\u060C \u0641\u0647\u0648 \u0644\u0623\u0648\u0644 \u062F\u0644\u064A\u0644 \u0646\u0634\u0637 \u0645\u0646\u0647\u0645\u0627.",
16
+ "directories.add": "\u062F\u0644\u064A\u0644 \u062C\u062F\u064A\u062F",
17
+ "directories.empty": "\u0644\u0627 \u062A\u0648\u062C\u062F \u0623\u062F\u0644\u0629.",
18
+ "directories.signIn": "\u062A\u0633\u062C\u064A\u0644 \u0627\u0644\u062F\u062E\u0648\u0644",
19
+ "directories.lastSync": "\u0622\u062E\u0631 \u0645\u0632\u0627\u0645\u0646\u0629",
20
+ "directories.syncNow": "\u0645\u0632\u0627\u0645\u0646\u0629 \u0627\u0644\u0622\u0646",
21
+ "directories.moveUp": "\u0646\u0642\u0644 {name} \u0625\u0644\u0649 \u0627\u0644\u0623\u0639\u0644\u0649",
22
+ "directories.moveDown": "\u0646\u0642\u0644 {name} \u0625\u0644\u0649 \u0627\u0644\u0623\u0633\u0641\u0644",
23
+ "directories.connectorDisabled": "\u0625\u0636\u0627\u0641\u0629 \u0627\u0644\u0645\u0648\u0635\u0644 \u0645\u0639\u0637\u0651\u0644\u0629",
24
+ "directories.pluginDisabledHint": "\u0627\u0644\u0625\u0636\u0627\u0641\u0629 {plugin} \u0645\u0639\u0637\u0651\u0644\u0629",
25
+ "directories.synced": "\u062A\u0645\u062A \u0645\u0632\u0627\u0645\u0646\u0629 {name}: \u0623\u064F\u0636\u064A\u0641 {added}\u060C \u0648\u062D\u064F\u062F\u0651\u062B {updated}\u060C \u0648\u0639\u064F\u0637\u0651\u0644 {deactivated}\u060C \u0648{groups} \u0645\u062C\u0645\u0648\u0639\u0629\u060C \u0648{memberships} \u0639\u0636\u0648\u064A\u0629.",
26
+ "directories.syncFailed": "\u0641\u0634\u0644\u062A \u0645\u0632\u0627\u0645\u0646\u0629 {name}: {error}",
27
+ "directories.internalType": "\u062F\u0627\u062E\u0644\u064A (\u064A\u062D\u0641\u0638\u0647 {product})",
28
+ "directories.warnings": "{count, plural, one {\u062A\u062D\u0630\u064A\u0631} two {\u062A\u062D\u0630\u064A\u0631\u0627\u0646} few {# \u062A\u062D\u0630\u064A\u0631\u0627\u062A} many {# \u062A\u062D\u0630\u064A\u0631\u064B\u0627} other {# \u062A\u062D\u0630\u064A\u0631}}",
29
+ "directoryDetail.notFound": "\u0627\u0644\u062F\u0644\u064A\u0644 \u063A\u064A\u0631 \u0645\u0648\u062C\u0648\u062F",
30
+ "directoryDetail.back": "\u0627\u0644\u0639\u0648\u062F\u0629 \u0625\u0644\u0649 \u0627\u0644\u0623\u062F\u0644\u0629",
31
+ "directoryDetail.order": "\u0627\u0644\u062A\u0631\u062A\u064A\u0628 {order}",
32
+ "directoryDetail.signInEnabled": "\u062A\u0633\u062C\u064A\u0644 \u0627\u0644\u062F\u062E\u0648\u0644 \u0645\u0641\u0639\u0651\u0644",
33
+ "directoryDetail.signInDisabled": "\u062A\u0633\u062C\u064A\u0644 \u0627\u0644\u062F\u062E\u0648\u0644 \u0645\u0639\u0637\u0651\u0644",
34
+ "directoryDetail.connectorDisabled": "\u0625\u0636\u0627\u0641\u0629 \u0627\u0644\u0645\u0648\u0635\u0644 \u0645\u0639\u0637\u0651\u0644\u0629",
35
+ "directoryDetail.testConnection": "\u0627\u062E\u062A\u0628\u0627\u0631 \u0627\u0644\u0627\u062A\u0635\u0627\u0644",
36
+ "directoryDetail.syncNow": "\u0645\u0632\u0627\u0645\u0646\u0629 \u0627\u0644\u0622\u0646",
37
+ "directoryDetail.connectionSucceeded": "\u0646\u062C\u062D \u0627\u0644\u0627\u062A\u0635\u0627\u0644.",
38
+ "directoryDetail.connectionFailed": "\u0641\u0634\u0644 \u0627\u0644\u0627\u062A\u0635\u0627\u0644.",
39
+ "directoryDetail.found": "(\u0639\u064F\u062B\u0631 \u0639\u0644\u0649 {users} \u0645\u0633\u062A\u062E\u062F\u0645 \u0648{groups} \u0645\u062C\u0645\u0648\u0639\u0629)",
40
+ "directoryDetail.syncCompleted": "\u0627\u0643\u062A\u0645\u0644\u062A \u0627\u0644\u0645\u0632\u0627\u0645\u0646\u0629.",
41
+ "directoryDetail.syncFailed": "\u0641\u0634\u0644\u062A \u0627\u0644\u0645\u0632\u0627\u0645\u0646\u0629: {error}",
42
+ "directoryDetail.deleteTitle": "\u062D\u0630\u0641 \u0627\u0644\u062F\u0644\u064A\u0644 \xAB{name}\xBB\u061F",
43
+ "directoryDetail.deleteDescription": "\u0633\u062A\u064F\u062D\u0630\u0641 \u0627\u0644\u062D\u0633\u0627\u0628\u0627\u062A \u0648\u0627\u0644\u0645\u062C\u0645\u0648\u0639\u0627\u062A \u0627\u0644\u062A\u064A \u062C\u0631\u062A \u0645\u0632\u0627\u0645\u0646\u062A\u0647\u0627 \u0645\u0646\u0647.",
44
+ "directoryDetail.settings": "\u0627\u0644\u0625\u0639\u062F\u0627\u062F\u0627\u062A",
45
+ "directoryDetail.saved": "\u062A\u0645 \u0627\u0644\u062D\u0641\u0638.",
46
+ "directoryDetail.summary": "\u0627\u0644\u0645\u0644\u062E\u0635",
47
+ "directoryDetail.syncInterval": "\u0641\u062A\u0631\u0629 \u0627\u0644\u0645\u0632\u0627\u0645\u0646\u0629",
48
+ "directoryDetail.minutes": "{count, plural, zero {# \u062F\u0642\u064A\u0642\u0629} one {\u062F\u0642\u064A\u0642\u0629 \u0648\u0627\u062D\u062F\u0629} two {\u062F\u0642\u064A\u0642\u062A\u0627\u0646} few {# \u062F\u0642\u0627\u0626\u0642} many {# \u062F\u0642\u064A\u0642\u0629} other {# \u062F\u0642\u064A\u0642\u0629}}",
49
+ "directoryDetail.onDemand": "\u0639\u0646\u062F \u0627\u0644\u0637\u0644\u0628",
50
+ "directoryDetail.plugin": "\u0627\u0644\u0625\u0636\u0627\u0641\u0629",
51
+ "directoryDetail.builtIn": "\u0645\u062F\u0645\u062C",
52
+ "directoryDetail.lastSync": "\u0622\u062E\u0631 \u0645\u0632\u0627\u0645\u0646\u0629",
53
+ "directoryDetail.testLogin": "\u0627\u062E\u062A\u0628\u0627\u0631 \u062A\u0633\u062C\u064A\u0644 \u0627\u0644\u062F\u062E\u0648\u0644",
54
+ "directoryDetail.testLoginHint": "\u064A\u062A\u062D\u0642\u0642 \u0645\u0646 \u0643\u0644 \u062E\u0637\u0648\u0629 \u0645\u0646 \u062E\u0637\u0648\u0627\u062A \u062A\u0633\u062C\u064A\u0644 \u0627\u0644\u062F\u062E\u0648\u0644 \u0639\u0628\u0631 \u0647\u0630\u0627 \u0627\u0644\u062F\u0644\u064A\u0644.",
55
+ "directoryDetail.runTest": "\u062A\u0634\u063A\u064A\u0644 \u0627\u0644\u0627\u062E\u062A\u0628\u0627\u0631",
56
+ "directoryDetail.testSteps": "\u062E\u0637\u0648\u0627\u062A \u0627\u062E\u062A\u0628\u0627\u0631 \u062A\u0633\u062C\u064A\u0644 \u0627\u0644\u062F\u062E\u0648\u0644",
57
+ "directoryDetail.steps.Connection": "\u0627\u0644\u0627\u062A\u0635\u0627\u0644 \u0628\u0627\u0644\u062F\u0644\u064A\u0644",
58
+ "directoryDetail.steps.FindUser": "\u0627\u0644\u0639\u062B\u0648\u0631 \u0639\u0644\u0649 \u0627\u0644\u0645\u0633\u062A\u062E\u062F\u0645",
59
+ "directoryDetail.steps.Authenticate": "\u0627\u0644\u062A\u062D\u0642\u0642 \u0645\u0646 \u0643\u0644\u0645\u0629 \u0627\u0644\u0645\u0631\u0648\u0631",
60
+ "directoryDetail.steps.Precedence": "\u0627\u0644\u062F\u0644\u064A\u0644 \u064A\u0645\u0644\u0643 \u0627\u0633\u0645 \u0627\u0644\u0645\u0633\u062A\u062E\u062F\u0645 (\u0627\u0644\u0623\u0633\u0628\u0642\u064A\u0629)",
61
+ "directoryDetail.syncRuns": "\u0639\u0645\u0644\u064A\u0627\u062A \u0627\u0644\u0645\u0632\u0627\u0645\u0646\u0629",
62
+ "directoryDetail.noRuns": "\u0644\u0627 \u062A\u0648\u062C\u062F \u0639\u0645\u0644\u064A\u0627\u062A \u0645\u0632\u0627\u0645\u0646\u0629 \u0628\u0639\u062F.",
63
+ "directoryDetail.started": "\u0627\u0644\u0628\u062F\u0621",
64
+ "directoryDetail.finished": "\u0627\u0644\u0627\u0646\u062A\u0647\u0627\u0621",
65
+ "directoryDetail.result": "\u0627\u0644\u0646\u062A\u064A\u062C\u0629",
66
+ "directoryDetail.added": "\u0627\u0644\u0645\u064F\u0636\u0627\u0641",
67
+ "directoryDetail.updated": "\u0627\u0644\u0645\u064F\u062D\u062F\u064E\u0651\u062B",
68
+ "directoryDetail.deactivated": "\u0627\u0644\u0645\u064F\u0639\u0637\u064E\u0651\u0644",
69
+ "directoryDetail.memberships": "\u0627\u0644\u0639\u0636\u0648\u064A\u0627\u062A",
70
+ "directoryDetail.error": "\u0627\u0644\u062E\u0637\u0623",
71
+ "directoryDetail.warningsTitle": "\u0641\u064A \u0625\u0639\u062F\u0627\u062F\u0627\u062A\u0647 \u062A\u062D\u0630\u064A\u0631\u0627\u062A",
72
+ "directoryForm.name": "\u0627\u0644\u0627\u0633\u0645",
73
+ "directoryForm.type": "\u0627\u0644\u0646\u0648\u0639",
74
+ "directoryForm.selectType": "\u0627\u062E\u062A\u0631 \u0646\u0648\u0639\u064B\u0627",
75
+ "directoryForm.typeFromPlugin": "{name} (\u0627\u0644\u0625\u0636\u0627\u0641\u0629 {plugin})",
76
+ "directoryForm.syncInterval": "\u0627\u0644\u0645\u0632\u0627\u0645\u0646\u0629 \u0643\u0644",
77
+ "directoryForm.syncIntervalHint": "\u0641\u0627\u0631\u063A = \u0639\u0646\u062F \u0627\u0644\u0637\u0644\u0628 \u0641\u0642\u0637",
78
+ "directoryForm.active": "\u0646\u0634\u0637",
79
+ "directoryForm.signInEnabled": "\u0627\u0644\u0633\u0645\u0627\u062D \u0628\u062A\u0633\u062C\u064A\u0644 \u0627\u0644\u062F\u062E\u0648\u0644",
80
+ "directoryForm.capabilities": "\u0627\u0644\u0642\u062F\u0631\u0627\u062A: {list}",
81
+ "directoryForm.connectionSettings": "\u0625\u0639\u062F\u0627\u062F\u0627\u062A \u0627\u0644\u0627\u062A\u0635\u0627\u0644",
82
+ "directoryForm.fillFromPreset": "\u062A\u0639\u0628\u0626\u0629 \u0645\u0646 \u0625\u0639\u062F\u0627\u062F \u062C\u0627\u0647\u0632",
83
+ "directoryForm.choosePreset": "\u0627\u062E\u062A\u0631 \u0625\u0639\u062F\u0627\u062F\u064B\u0627 \u062C\u0627\u0647\u0632\u064B\u0627",
84
+ "directoryForm.loadingPresets": "\u062C\u0627\u0631\u064D \u062A\u062D\u0645\u064A\u0644 \u0627\u0644\u0625\u0639\u062F\u0627\u062F\u0627\u062A \u0627\u0644\u062C\u0627\u0647\u0632\u0629",
85
+ "directoryForm.presetsUnavailable": "\u0627\u0644\u0625\u0639\u062F\u0627\u062F\u0627\u062A \u0627\u0644\u062C\u0627\u0647\u0632\u0629 \u063A\u064A\u0631 \u0645\u062A\u0627\u062D\u0629: {error}",
86
+ "directoryForm.keepSecret": "\u0627\u062A\u0631\u0643\u0647 \u0641\u0627\u0631\u063A\u064B\u0627 \u0644\u0644\u0625\u0628\u0642\u0627\u0621 \u0639\u0644\u0649 \u0627\u0644\u0642\u064A\u0645\u0629 \u0627\u0644\u0645\u062D\u0641\u0648\u0638\u0629",
87
+ "directoryForm.create": "\u0625\u0646\u0634\u0627\u0621 \u0627\u0644\u062F\u0644\u064A\u0644",
88
+ "directoryForm.save": "\u062D\u0641\u0638 \u0627\u0644\u062A\u063A\u064A\u064A\u0631\u0627\u062A",
89
+ "accounts.title": "\u0627\u0644\u062D\u0633\u0627\u0628\u0627\u062A",
90
+ "accounts.subtitle": "\u0627\u0644\u062D\u0633\u0627\u0628\u0627\u062A \u0627\u0644\u0645\u0633\u0645\u0648\u062D \u0644\u0643 \u0628\u0631\u0624\u064A\u062A\u0647\u0627. \u062A\u062D\u062F\u062F \u0635\u0644\u0627\u062D\u064A\u0627\u062A\u0643 \u0627\u0644\u0623\u062F\u0644\u0629 \u0627\u0644\u0645\u0634\u0645\u0648\u0644\u0629.",
91
+ "accounts.create": "\u0625\u0646\u0634\u0627\u0621 \u062D\u0633\u0627\u0628 \u062F\u0627\u062E\u0644\u064A",
92
+ "accounts.createTitle": "\u0625\u0646\u0634\u0627\u0621 \u062D\u0633\u0627\u0628 \u062F\u0627\u062E\u0644\u064A",
93
+ "accounts.createHint": "\u062A\u064F\u062D\u0641\u0638 \u0627\u0644\u062D\u0633\u0627\u0628\u0627\u062A \u0627\u0644\u062F\u0627\u062E\u0644\u064A\u0629 \u0641\u064A \u062F\u0644\u064A\u0644 {product} \u0648\u062A\u0633\u062C\u0651\u0644 \u0627\u0644\u062F\u062E\u0648\u0644 \u0628\u0643\u0644\u0645\u0629 \u0645\u0631\u0648\u0631.",
94
+ "accounts.createSubmit": "\u0625\u0646\u0634\u0627\u0621 \u0627\u0644\u062D\u0633\u0627\u0628",
95
+ "accounts.created": "\u062A\u0645 \u0625\u0646\u0634\u0627\u0621 \u0627\u0644\u062D\u0633\u0627\u0628 {username}.",
96
+ "accounts.search": "\u0627\u0644\u0628\u062D\u062B \u0641\u064A \u0627\u0644\u062D\u0633\u0627\u0628\u0627\u062A",
97
+ "accounts.searchPlaceholder": "\u0627\u0628\u062D\u062B \u0628\u0627\u0633\u0645 \u0627\u0644\u0645\u0633\u062A\u062E\u062F\u0645 \u0623\u0648 \u0627\u0644\u0627\u0633\u0645 \u0623\u0648 \u0627\u0644\u0628\u0631\u064A\u062F",
98
+ "accounts.allStatuses": "\u0643\u0644 \u0627\u0644\u062D\u0627\u0644\u0627\u062A",
99
+ "accounts.empty": "\u0644\u0627 \u062A\u0648\u062C\u062F \u062D\u0633\u0627\u0628\u0627\u062A \u0645\u0637\u0627\u0628\u0642\u0629.",
100
+ "accountDetail.account": "\u0627\u0644\u062D\u0633\u0627\u0628",
101
+ "accountDetail.owningDirectory": "\u0627\u0644\u062F\u0644\u064A\u0644 \u0627\u0644\u0645\u0627\u0644\u0643",
102
+ "accountDetail.lock": "\u0642\u0641\u0644",
103
+ "accountDetail.unlock": "\u0625\u0644\u063A\u0627\u0621 \u0627\u0644\u0642\u0641\u0644",
104
+ "accountDetail.identities": "\u0627\u0644\u0647\u0648\u064A\u0627\u062A ({count})",
105
+ "accountDetail.identitiesHint": "\u0635\u0641 \u0644\u0643\u0644 \u062F\u0644\u064A\u0644 \u064A\u0639\u0631\u0641 \u0627\u0633\u0645 \u0627\u0644\u0645\u0633\u062A\u062E\u062F\u0645 \u0647\u0630\u0627. \u064A\u0641\u0648\u0632 \u0623\u0648\u0644 \u062F\u0644\u064A\u0644 \u0646\u0634\u0637 \u062D\u0633\u0628 \u062A\u0631\u062A\u064A\u0628 \u0627\u0644\u0623\u0633\u0628\u0642\u064A\u0629\u060C \u0648\u062A\u064F\u062D\u062C\u0628 \u0627\u0644\u0628\u0642\u064A\u0629.",
106
+ "accountDetail.noIdentities": "\u0644\u0627 \u062A\u0648\u062C\u062F \u0647\u0648\u064A\u0627\u062A \u0641\u064A \u0627\u0644\u0623\u062F\u0644\u0629.",
107
+ "accountDetail.externalId": "\u0627\u0644\u0645\u0639\u0631\u0651\u0641 \u0627\u0644\u062E\u0627\u0631\u062C\u064A",
108
+ "accountDetail.lastSynced": "\u0622\u062E\u0631 \u0645\u0632\u0627\u0645\u0646\u0629",
109
+ "accountDetail.precedence": "\u0627\u0644\u0623\u0633\u0628\u0642\u064A\u0629",
110
+ "accountDetail.winning": "\u0627\u0644\u0641\u0627\u0626\u0632",
111
+ "accountDetail.shadowed": "\u0645\u062D\u062C\u0648\u0628",
112
+ "accountDetail.effectiveGroups": "\u0627\u0644\u0645\u062C\u0645\u0648\u0639\u0627\u062A \u0627\u0644\u0641\u0639\u0644\u064A\u0629 ({count})",
113
+ "accountDetail.noGroups": "\u0644\u064A\u0633 \u0639\u0636\u0648\u064B\u0627 \u0641\u064A \u0623\u064A \u0645\u062C\u0645\u0648\u0639\u0629.",
114
+ "accountDetail.secondFactor.title": "\u0627\u0644\u062A\u062D\u0642\u0642 \u0628\u062E\u0637\u0648\u062A\u064A\u0646",
115
+ "accountDetail.secondFactor.asked": "\u064A\u064F\u0637\u0644\u0628 \u0639\u0646\u062F \u062A\u0633\u062C\u064A\u0644 \u0627\u0644\u062F\u062E\u0648\u0644",
116
+ "accountDetail.secondFactor.notAsked": "\u0644\u0627 \u064A\u064F\u0637\u0644\u0628",
117
+ "accountDetail.secondFactor.mode": "\u0645\u0646 \u0645\u062C\u0645\u0648\u0639\u0627\u062A\u0647",
118
+ "accountDetail.secondFactor.factors": "\u0645\u0627 \u0623\u064F\u0639\u062F\u0651",
119
+ "accountDetail.secondFactor.none": "\u0644\u0645 \u064A\u064F\u0639\u062F\u0651 \u0634\u064A\u0621",
120
+ "accountDetail.secondFactor.recoveryLeft": "\u0631\u0645\u0648\u0632 \u0627\u0644\u0627\u0633\u062A\u0631\u062F\u0627\u062F \u0627\u0644\u0645\u062A\u0628\u0642\u064A\u0629",
121
+ "accountDetail.secondFactor.reset": "\u0625\u0639\u0627\u062F\u0629 \u062A\u0639\u064A\u064A\u0646 \u0627\u0644\u062A\u062D\u0642\u0642 \u0628\u062E\u0637\u0648\u062A\u064A\u0646",
122
+ "accountDetail.secondFactor.resetTitle": "\u0625\u0639\u0627\u062F\u0629 \u062A\u0639\u064A\u064A\u0646 \u0627\u0644\u062A\u062D\u0642\u0642 \u0628\u062E\u0637\u0648\u062A\u064A\u0646 \u0644\u0640 {name}\u061F",
123
+ "accountDetail.secondFactor.resetHint": "\u062A\u062A\u0648\u0642\u0641 \u062A\u0637\u0628\u064A\u0642\u0627\u062A \u0627\u0644\u0645\u0635\u0627\u062F\u0642\u0629 \u0648\u0631\u0645\u0648\u0632 \u0627\u0644\u0627\u0633\u062A\u0631\u062F\u0627\u062F \u0627\u0644\u062E\u0627\u0635\u0629 \u0628\u0647 \u0639\u0646 \u0627\u0644\u0639\u0645\u0644. \u0625\u0646 \u0643\u0627\u0646\u062A \u0625\u062D\u062F\u0649 \u0645\u062C\u0645\u0648\u0639\u0627\u062A\u0647 \u062A\u0634\u062A\u0631\u0637 \u0639\u0627\u0645\u0644\u064B\u0627 \u062B\u0627\u0646\u064A\u064B\u0627\u060C \u0641\u0633\u064A\u0639\u062F\u0651 \u0648\u0627\u062D\u062F\u064B\u0627 \u0645\u0646 \u062C\u062F\u064A\u062F \u0639\u0646\u062F \u062A\u0633\u062C\u064A\u0644 \u062F\u062E\u0648\u0644\u0647 \u0627\u0644\u062A\u0627\u0644\u064A. \u0644\u0627 \u062A\u0641\u0639\u0644 \u0630\u0644\u0643 \u0625\u0644\u0627 \u0628\u0639\u062F \u0627\u0644\u062A\u0623\u0643\u062F \u0645\u0646 \u0623\u0646\u0647 \u0647\u0648 \u0645\u0646 \u064A\u0637\u0644\u0628.",
124
+ "accountDetail.secondFactor.resetDone": "\u0623\u064F\u0639\u064A\u062F \u062A\u0639\u064A\u064A\u0646 \u0627\u0644\u062A\u062D\u0642\u0642 \u0628\u062E\u0637\u0648\u062A\u064A\u0646.",
125
+ "accountName.change": "\u062A\u063A\u064A\u064A\u0631",
126
+ "accountName.label": "\u0627\u0644\u0627\u0633\u0645 \u0627\u0644\u0645\u0639\u0631\u0648\u0636",
127
+ "accountName.save": "\u0627\u062D\u0641\u0638 \u0627\u0644\u0627\u0633\u0645",
128
+ "accountName.cancel": "\u0625\u0644\u063A\u0627\u0621",
129
+ "accountName.saved": "\u0623\u0635\u0628\u062D \u0627\u0644\u0627\u0633\u0645 {name}\u060C \u0623\u064A\u0646\u0645\u0627 \u0638\u0647\u0631.",
130
+ "accountName.languagesHint": "\u0627\u0643\u062A\u0628 \u0627\u0633\u0645\u0643 \u0628\u0643\u0644 \u0644\u063A\u0629 \u0645\u0646 \u0644\u063A\u0627\u062A \u0627\u0644\u0645\u0648\u0642\u0639: \u064A\u0631\u0627\u0647 \u0645\u0646 \u064A\u0642\u0631\u0623 \u0628\u062A\u0644\u0643 \u0627\u0644\u0644\u063A\u0629. \u0648\u064A\u0628\u0642\u0649 \u0627\u0644\u0627\u0633\u0645 \u0627\u0644\u0625\u0646\u062C\u0644\u064A\u0632\u064A \u0641\u064A \u0627\u0644\u0633\u062C\u0644.",
131
+ "groups.title": "\u0627\u0644\u0645\u062C\u0645\u0648\u0639\u0627\u062A",
132
+ "groups.subtitle": "\u062A\u064F\u0646\u0634\u0623 \u0627\u0644\u0645\u062C\u0645\u0648\u0639\u0627\u062A \u0627\u0644\u0645\u062D\u0644\u064A\u0629 \u0641\u064A {product}\u060C \u0648\u062A\u0623\u062A\u064A \u0627\u0644\u0645\u062C\u0645\u0648\u0639\u0627\u062A \u0627\u0644\u0645\u062A\u0632\u0627\u0645\u0646\u0629 \u0645\u0646 \u062F\u0644\u064A\u0644. \u064A\u0645\u0643\u0646 \u0623\u0646 \u062A\u062D\u062A\u0648\u064A \u0627\u0644\u0645\u062C\u0645\u0648\u0639\u0629 \u0639\u0644\u0649 \u0645\u062C\u0645\u0648\u0639\u0627\u062A \u0623\u062E\u0631\u0649.",
133
+ "groups.create": "\u0625\u0646\u0634\u0627\u0621 \u0645\u062C\u0645\u0648\u0639\u0629",
134
+ "groups.created": "\u062A\u0645 \u0625\u0646\u0634\u0627\u0621 \u0627\u0644\u0645\u062C\u0645\u0648\u0639\u0629 {name}.",
135
+ "groups.searchPlaceholder": "\u0627\u0644\u0628\u062D\u062B \u0641\u064A \u0627\u0644\u0645\u062C\u0645\u0648\u0639\u0627\u062A",
136
+ "groups.allDirectories": "\u0643\u0644 \u0627\u0644\u0623\u062F\u0644\u0629",
137
+ "groups.empty": "\u0644\u0627 \u062A\u0648\u062C\u062F \u0645\u062C\u0645\u0648\u0639\u0627\u062A \u0645\u0637\u0627\u0628\u0642\u0629.",
138
+ "groups.local": "\u0645\u062D\u0644\u064A\u0629",
139
+ "groups.synced": "\u0645\u062A\u0632\u0627\u0645\u0646\u0629",
140
+ "groups.readOnly": "\u0644\u0644\u0642\u0631\u0627\u0621\u0629 \u0641\u0642\u0637",
141
+ "groups.directMembers": "\u0627\u0644\u0623\u0639\u0636\u0627\u0621 \u0627\u0644\u0645\u0628\u0627\u0634\u0631\u0648\u0646",
142
+ "groups.memberGroups": "\u0627\u0644\u0645\u062C\u0645\u0648\u0639\u0627\u062A \u0627\u0644\u0623\u0639\u0636\u0627\u0621",
143
+ "groups.directoryHint": "\u0627\u0644\u0627\u0641\u062A\u0631\u0627\u0636\u064A \u0647\u0648 \u0627\u0644\u062F\u0644\u064A\u0644 \u0627\u0644\u062F\u0627\u062E\u0644\u064A.",
144
+ "groups.internalDefault": "\u062F\u0627\u062E\u0644\u064A (\u0627\u0641\u062A\u0631\u0627\u0636\u064A)",
145
+ "groups.kind": "\u0627\u0644\u0646\u0648\u0639",
146
+ "groups.kindHint": "\u0627\u0644\u0645\u0624\u0633\u0633\u0629 \u0645\u062C\u0645\u0648\u0639\u0629 \u064A\u0646\u062A\u0645\u064A \u0625\u0644\u064A\u0647\u0627 \u0627\u0644\u0639\u0645\u0644\u0627\u0621\u060C \u064A\u062F\u0648\u064A\u064B\u0627 \u0623\u0648 \u0628\u0646\u0637\u0627\u0642 \u0628\u0631\u064A\u062F\u0647\u0645.",
147
+ "groups.kinds.standard": "\u0645\u062C\u0645\u0648\u0639\u0629",
148
+ "groups.kinds.directory": "\u0643\u0644 \u0645\u0646 \u0641\u064A \u062F\u0644\u064A\u0644",
149
+ "groups.kinds.ou": "\u0648\u062D\u062F\u0629 \u062A\u0646\u0638\u064A\u0645\u064A\u0629",
150
+ "groups.kinds.organization": "\u0645\u0624\u0633\u0633\u0629",
151
+ "groups.domains": "\u0646\u0637\u0627\u0642\u0627\u062A \u0627\u0644\u0628\u0631\u064A\u062F",
152
+ "groups.domainsHint": "\u064A\u0646\u0636\u0645 \u0625\u0644\u064A\u0647\u0627 \u0645\u0646 \u0628\u0631\u064A\u062F\u0647 \u0641\u064A \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u0646\u0637\u0627\u0642\u0627\u062A (acme.com). \u0627\u0641\u0635\u0644 \u0628\u064A\u0646\u0647\u0627 \u0628\u0641\u0648\u0627\u0635\u0644.",
153
+ "groupDetail.delete": "\u062D\u0630\u0641 \u0627\u0644\u0645\u062C\u0645\u0648\u0639\u0629",
154
+ "groupDetail.deleteTitle": "\u062D\u0630\u0641 \u0627\u0644\u0645\u062C\u0645\u0648\u0639\u0629 \xAB{name}\xBB\u061F",
155
+ "groupDetail.writable": "\u0642\u0627\u0628\u0644\u0629 \u0644\u0644\u062A\u0639\u062F\u064A\u0644",
156
+ "groupDetail.directMembers": "\u0627\u0644\u0623\u0639\u0636\u0627\u0621 \u0627\u0644\u0645\u0628\u0627\u0634\u0631\u0648\u0646 ({count})",
157
+ "groupDetail.noMembers": "\u0644\u0627 \u064A\u0648\u062C\u062F \u0623\u0639\u0636\u0627\u0621 \u0645\u0628\u0627\u0634\u0631\u0648\u0646.",
158
+ "groupDetail.fromDirectory": "\u0645\u0646 \u0627\u0644\u062F\u0644\u064A\u0644",
159
+ "groupDetail.manual": "\u064A\u062F\u0648\u064A",
160
+ "groupDetail.remove": "\u0625\u0632\u0627\u0644\u0629",
161
+ "groupDetail.memberOf": "\u0639\u0636\u0648 \u0641\u064A ({count})",
162
+ "groupDetail.notNested": "\u0644\u064A\u0633\u062A \u0636\u0645\u0646 \u0623\u064A \u0645\u062C\u0645\u0648\u0639\u0629.",
163
+ "groupDetail.nestedGroups": "\u0627\u0644\u0645\u062C\u0645\u0648\u0639\u0627\u062A \u0627\u0644\u0645\u062A\u062F\u0627\u062E\u0644\u0629",
164
+ "groupDetail.readOnlyNotice": "\u0647\u0630\u0647 \u0627\u0644\u0645\u062C\u0645\u0648\u0639\u0629 \u0644\u0644\u0642\u0631\u0627\u0621\u0629 \u0641\u0642\u0637 \u0641\u064A {product}: \u0623\u0639\u0636\u0627\u0624\u0647\u0627 \u064A\u0623\u062A\u0648\u0646 \u0645\u0646 \u0645\u0632\u0627\u0645\u0646\u0629 \u0627\u0644\u062F\u0644\u064A\u0644.",
165
+ "groupDetail.effectiveMembers": "\u0627\u0644\u0623\u0639\u0636\u0627\u0621 \u0627\u0644\u0641\u0639\u0644\u064A\u0648\u0646 ({count})",
166
+ "groupDetail.noEffectiveMembers": "\u0644\u0627 \u064A\u0635\u0644 \u0623\u064A \u062D\u0633\u0627\u0628 \u0625\u0644\u0649 \u0647\u0630\u0647 \u0627\u0644\u0645\u062C\u0645\u0648\u0639\u0629.",
167
+ "groupDetail.addMember": "\u0625\u0636\u0627\u0641\u0629 \u0639\u0636\u0648",
168
+ "groupDetail.searchMembers": "\u0627\u0628\u062D\u062B \u0639\u0646 \u062D\u0633\u0627\u0628\u0627\u062A \u0623\u0648 \u0645\u062C\u0645\u0648\u0639\u0627\u062A",
169
+ "groupDetail.noMatches": "\u0644\u0627 \u062A\u0648\u062C\u062F \u0646\u062A\u0627\u0626\u062C \u0645\u0637\u0627\u0628\u0642\u0629.",
170
+ "groupDetail.alreadyMember": "\u0639\u0636\u0648 \u0628\u0627\u0644\u0641\u0639\u0644",
171
+ "groupDetail.add": "\u0625\u0636\u0627\u0641\u0629",
172
+ "groupDetail.accountCount": "{count, plural, zero {\u0644\u0627 \u062D\u0633\u0627\u0628\u0627\u062A} one {\u062D\u0633\u0627\u0628 \u0648\u0627\u062D\u062F} two {\u062D\u0633\u0627\u0628\u0627\u0646} few {# \u062D\u0633\u0627\u0628\u0627\u062A} many {# \u062D\u0633\u0627\u0628\u064B\u0627} other {# \u062D\u0633\u0627\u0628}}",
173
+ "groupDetail.expand": "\u062A\u0648\u0633\u064A\u0639 {name}",
174
+ "groupDetail.collapse": "\u0637\u064A\u0651 {name}",
175
+ "groupDetail.cycle": "\u062D\u0644\u0642\u0629",
176
+ "groupDetail.loadingTree": "\u062C\u0627\u0631\u064D \u0627\u0644\u062A\u062D\u0645\u064A\u0644",
177
+ "groupDetail.byDomain": "\u0628\u0646\u0637\u0627\u0642 \u0627\u0644\u0628\u0631\u064A\u062F",
178
+ "groupDetail.fromImport": "\u0645\u0646 \u0627\u0633\u062A\u064A\u0631\u0627\u062F",
179
+ "groupDetail.directoryNotice": "\u064A\u0636\u0639 {product} \u0641\u064A \u0647\u0630\u0647 \u0627\u0644\u0645\u062C\u0645\u0648\u0639\u0629 \u0643\u0644 \u0645\u0646 \u064A\u0623\u062A\u064A \u062D\u0633\u0627\u0628\u0647 \u0645\u0646 \u0647\u0630\u0627 \u0627\u0644\u062F\u0644\u064A\u0644. \u0627\u0645\u0646\u062D\u0647\u0627 \u062F\u0648\u0631\u064B\u0627 \u0644\u062A\u0645\u0646\u062D\u0647 \u0644\u0644\u062F\u0644\u064A\u0644 \u0643\u0644\u0647\u060C \u0623\u0648 \u0636\u0639\u0647\u0627 \u062F\u0627\u062E\u0644 \u0645\u062C\u0645\u0648\u0639\u0629 \u0623\u062E\u0631\u0649.",
180
+ "groupDetail.ouNotice": "\u0643\u0644 \u0645\u0646 \u062A\u062D\u062A \u0647\u0630\u0647 \u0627\u0644\u0648\u062D\u062F\u0629 \u0627\u0644\u062A\u0646\u0638\u064A\u0645\u064A\u0629 \u0641\u064A \u0627\u0644\u062F\u0644\u064A\u0644\u060C \u0639\u0644\u0649 \u0623\u064A \u0639\u0645\u0642\u060C \u062D\u0633\u0628 \u0622\u062E\u0631 \u0645\u0632\u0627\u0645\u0646\u0629. \u063A\u064A\u0651\u0631 \u0627\u0644\u0648\u062D\u062F\u0627\u062A \u0645\u0646 \u0625\u0639\u062F\u0627\u062F\u0627\u062A \u0627\u0644\u062F\u0644\u064A\u0644.",
181
+ "groupDetail.organization": "\u0627\u0644\u0645\u0624\u0633\u0633\u0629",
182
+ "groupDetail.organizationHint": "\u064A\u0645\u0643\u0646 \u0644\u0639\u0645\u0644\u0627\u0621 \u0627\u0644\u0645\u0624\u0633\u0633\u0629 \u0645\u0634\u0627\u0631\u0643\u0629 \u0637\u0644\u0628\u0627\u062A\u0647\u0645 \u0641\u064A\u0645\u0627 \u0628\u064A\u0646\u0647\u0645 \u062D\u064A\u062B \u064A\u0633\u0645\u062D \u0646\u0648\u0639 \u0627\u0644\u0637\u0644\u0628 \u0628\u0630\u0644\u0643.",
183
+ "groupDetail.attributes": "\u0627\u0644\u0633\u0645\u0627\u062A",
184
+ "groupDetail.attributesHint": "\u0633\u0645\u0629 \u0641\u064A \u0643\u0644 \u0633\u0637\u0631: \u0627\u0644\u0627\u0633\u0645 = \u0627\u0644\u0642\u064A\u0645\u0629 (\u0631\u0642\u0645 \u0627\u0644\u0639\u0645\u064A\u0644 = 1042).",
185
+ "groupDetail.organizationSaved": "\u062D\u064F\u0641\u0638\u062A \u0627\u0644\u0645\u0624\u0633\u0633\u0629.",
186
+ "groupDetail.saveOrganization": "\u0627\u062D\u0641\u0638 \u0627\u0644\u0645\u0624\u0633\u0633\u0629",
187
+ "groupDetail.twoFactor.title": "\u0627\u0644\u062A\u062D\u0642\u0642 \u0628\u062E\u0637\u0648\u062A\u064A\u0646",
188
+ "groupDetail.twoFactor.hint": "\u0647\u0644 \u064A\u064F\u0637\u0644\u0628 \u0645\u0646 \u0627\u0644\u0623\u0639\u0636\u0627\u0621 \u0639\u0627\u0645\u0644 \u062B\u0627\u0646\u064D. \u064A\u062A\u0628\u0639 \u0643\u0644 \u0634\u062E\u0635 \u0627\u0644\u0623\u0634\u062F \u0628\u064A\u0646 \u062C\u0645\u064A\u0639 \u0645\u062C\u0645\u0648\u0639\u0627\u062A\u0647\u060C \u0628\u0645\u0627 \u0641\u064A\u0647\u0627 \u0627\u0644\u0645\u062A\u062F\u0627\u062E\u0644\u0629.",
189
+ "groupDetail.twoFactor.modes.off": "\u0645\u062A\u0648\u0642\u0641",
190
+ "groupDetail.twoFactor.modes.optional": "\u0645\u062A\u0627\u062D",
191
+ "groupDetail.twoFactor.modes.required": "\u0645\u0637\u0644\u0648\u0628",
192
+ "groupDetail.twoFactor.modes.strong": "\u0642\u0648\u064A",
193
+ "groupDetail.twoFactor.modeHints.off": "\u0644\u0627 \u064A\u064F\u0637\u0644\u0628 \u0645\u0646 \u0627\u0644\u0623\u0639\u0636\u0627\u0621\u060C \u0625\u0644\u0627 \u0645\u0646 \u0623\u0639\u062F\u0651 \u0648\u0627\u062D\u062F\u064B\u0627 \u0628\u0646\u0641\u0633\u0647.",
194
+ "groupDetail.twoFactor.modeHints.optional": "\u064A\u064F\u062A\u0627\u062D \u0639\u0646\u062F \u062A\u0633\u062C\u064A\u0644 \u0627\u0644\u062F\u062E\u0648\u0644 \u0648\u0644\u0627 \u064A\u064F\u0634\u062A\u0631\u0637\u061B \u0648\u0645\u0646 \u0623\u0639\u062F\u0651 \u0648\u0627\u062D\u062F\u064B\u0627 \u064A\u064F\u0637\u0644\u0628 \u0645\u0646\u0647.",
195
+ "groupDetail.twoFactor.modeHints.required": "\u064A\u064F\u0639\u062F\u0651 \u0627\u0644\u0623\u0639\u0636\u0627\u0621 \u0639\u0627\u0645\u0644\u064B\u0627 \u062B\u0627\u0646\u064A\u064B\u0627 \u0648\u064A\u064F\u062F\u062E\u0644\u0648\u0646 \u0631\u0645\u0632\u064B\u0627 \u0639\u0646\u062F \u0643\u0644 \u062A\u0633\u062C\u064A\u0644 \u062F\u062E\u0648\u0644.",
196
+ "groupDetail.twoFactor.modeHints.strong": "\u0643\u0627\u0644\u0645\u0637\u0644\u0648\u0628\u060C \u0648\u0628\u062A\u0637\u0628\u064A\u0642 \u0645\u0635\u0627\u062F\u0642\u0629 \u0641\u0642\u0637\u060C \u0644\u0627 \u0628\u0631\u0645\u0648\u0632 \u0627\u0644\u0628\u0631\u064A\u062F \u0623\u0648 \u0627\u0644\u0631\u0633\u0627\u0626\u0644 \u0627\u0644\u0646\u0635\u064A\u0629.",
197
+ "groupDetail.twoFactor.saved": "\u0627\u0644\u062A\u062D\u0642\u0642 \u0628\u062E\u0637\u0648\u062A\u064A\u0646 \u0644\u0640 {name}: {mode}.",
198
+ "groupDetail.twoFactor.pill": "\u0627\u0644\u062A\u062D\u0642\u0642 \u0628\u062E\u0637\u0648\u062A\u064A\u0646: {mode}",
199
+ "groupDetail.names": "\u0627\u0644\u0627\u0633\u0645 \u0628\u0643\u0644 \u0644\u063A\u0629",
200
+ "groupDetail.namesHint": "\u064A\u0631\u0649 \u0645\u0646 \u064A\u0642\u0631\u0623 \u0628\u0644\u063A\u0629\u064D \u0627\u0633\u0645\u064E \u0627\u0644\u0645\u062C\u0645\u0648\u0639\u0629 \u0628\u0647\u0627. \u0648\u064A\u0628\u0642\u0649 \u0627\u0644\u0627\u0633\u0645 \u0627\u0644\u0625\u0646\u062C\u0644\u064A\u0632\u064A \u0641\u064A \u0627\u0644\u0633\u062C\u0644 \u0648\u0641\u064A \u0627\u0644\u062F\u0644\u064A\u0644.",
201
+ "groupDetail.saveNames": "\u0627\u062D\u0641\u0638 \u0627\u0644\u0623\u0633\u0645\u0627\u0621",
202
+ "signUpSettings.title": "\u0627\u0644\u062A\u0633\u062C\u064A\u0644",
203
+ "signUpSettings.subtitle": "\u0647\u0644 \u064A\u0645\u0643\u0646 \u0644\u0644\u0646\u0627\u0633 \u0625\u0646\u0634\u0627\u0621 \u062D\u0633\u0627\u0628\u0627\u062A\u0647\u0645 \u0628\u0623\u0646\u0641\u0633\u0647\u0645. \u064A\u0624\u0643\u062F\u0648\u0646 \u0628\u0631\u064A\u062F\u0647\u0645 \u0623\u0648\u0644\u064B\u0627\u061B \u0648\u0645\u0627 \u064A\u0645\u0643\u0646\u0647\u0645 \u0627\u0633\u062A\u062E\u062F\u0627\u0645\u0647 \u062A\u062D\u062F\u062F\u0647 \u0627\u0644\u0623\u062F\u0648\u0627\u0631 \u0627\u0644\u062A\u064A \u062A\u0645\u0646\u062D\u0647\u0627.",
204
+ "signUpSettings.enabled": "\u064A\u0645\u0643\u0646 \u0644\u0644\u0646\u0627\u0633 \u0625\u0646\u0634\u0627\u0621 \u062D\u0633\u0627\u0628\u0627\u062A\u0647\u0645 \u0628\u0623\u0646\u0641\u0633\u0647\u0645",
205
+ "signUpSettings.directory": "\u062A\u064F\u0646\u0634\u0623 \u0627\u0644\u062D\u0633\u0627\u0628\u0627\u062A \u0641\u064A",
206
+ "signUpSettings.directoryHint": "\u062A\u064F\u0646\u0634\u0623 \u0627\u0644\u062D\u0633\u0627\u0628\u0627\u062A \u0641\u064A \u0647\u0630\u0627 \u0627\u0644\u062F\u0644\u064A\u0644 \u0627\u0644\u062F\u0627\u062E\u0644\u064A. \u0623\u0636\u0641 \u062F\u0644\u064A\u0644\u064B\u0627 \u0645\u062B\u0644 \u0627\u0644\u0639\u0645\u0644\u0627\u0621 \u0645\u0646 \u0627\u0644\u0623\u062F\u0644\u0629.",
207
+ "signUpSettings.directoryHintPlain": "\u062A\u064F\u0646\u0634\u0623 \u0627\u0644\u062D\u0633\u0627\u0628\u0627\u062A \u0641\u064A \u0647\u0630\u0627 \u0627\u0644\u062F\u0644\u064A\u0644 \u0627\u0644\u062F\u0627\u062E\u0644\u064A.",
208
+ "signUpSettings.chooseDirectory": "\u0627\u062E\u062A\u0631 \u062F\u0644\u064A\u0644\u064B\u0627",
209
+ "signUpSettings.domains": "\u0646\u0637\u0627\u0642\u0627\u062A \u0627\u0644\u0628\u0631\u064A\u062F \u0627\u0644\u0645\u0633\u0645\u0648\u062D\u0629",
210
+ "signUpSettings.grantHint": "\u0644\u062A\u0645\u0646\u062D \u0627\u0644\u0645\u0633\u062C\u0651\u0644\u064A\u0646 \u0645\u0634\u0631\u0648\u0639\u064B\u0627\u060C \u0627\u0645\u0646\u062D \u062F\u0648\u0631 \u0627\u0644\u0639\u0645\u064A\u0644 \u0641\u064A\u0647 \u0644\u0644\u0645\u062C\u0645\u0648\u0639\u0629 {group} \u0645\u0646 \u0623\u0639\u0636\u0627\u0621 \u0627\u0644\u0645\u0634\u0631\u0648\u0639.",
211
+ "signUpSettings.saved": "\u062D\u064F\u0641\u0638 \u0627\u0644\u062A\u0633\u062C\u064A\u0644.",
212
+ "anonymousAccess.title": "\u0627\u0644\u0648\u0635\u0648\u0644 \u0627\u0644\u0645\u062C\u0647\u0648\u0644",
213
+ "anonymousAccess.subtitle": "\u0643\u0644 \u062F\u0648\u0631 \u0645\u064F\u0646\u062D \u0644\u0644\u0632\u0648\u0627\u0631 \u0627\u0644\u0645\u062C\u0647\u0648\u0644\u064A\u0646. \u064A\u062D\u0635\u0644 \u0639\u0644\u064A\u0647\u0627 \u0623\u064A \u0634\u062E\u0635 \u0639\u0644\u0649 \u0627\u0644\u0625\u0646\u062A\u0631\u0646\u062A\u060C \u0641\u0623\u0628\u0642\u0647\u0627 \u0642\u0644\u064A\u0644\u0629.",
214
+ "anonymousAccess.role": "\u0627\u0644\u062F\u0648\u0631",
215
+ "anonymousAccess.scope": "\u0623\u064A\u0646",
216
+ "anonymousAccess.since": "\u0645\u0646\u0630",
217
+ "anonymousAccess.revoke": "\u0633\u062D\u0628 \u0627\u0644\u062F\u0648\u0631",
218
+ "anonymousAccess.revokeTitle": "\u0633\u062D\u0628 {role} \u0641\u064A {scope} \u0645\u0646 \u0627\u0644\u0632\u0648\u0627\u0631 \u0627\u0644\u0645\u062C\u0647\u0648\u0644\u064A\u0646\u061F",
219
+ "anonymousAccess.revoked": "\u0633\u064F\u062D\u0628 \u0627\u0644\u062F\u0648\u0631.",
220
+ "merge.mergeInto": "\u062F\u0645\u062C \u0641\u064A \u062D\u0633\u0627\u0628 \u0622\u062E\u0631",
221
+ "merge.pageTitle": "\u062F\u0645\u062C \u0641\u064A \u062D\u0633\u0627\u0628 \u0622\u062E\u0631",
222
+ "merge.pageHint": "\u0643\u0644 \u0645\u0627 \u0641\u0639\u0644\u0647 {username} \u0623\u0648 \u064A\u0645\u0644\u0643\u0647 \u0623\u0648 \u0630\u064F\u0643\u0631 \u0641\u064A\u0647 \u064A\u0646\u062A\u0642\u0644 \u0625\u0644\u0649 \u0627\u0644\u062D\u0633\u0627\u0628 \u0627\u0644\u0630\u064A \u062A\u062E\u062A\u0627\u0631\u0647: \u0627\u0644\u0633\u062C\u0644\u0627\u062A \u0648\u0627\u0644\u062A\u0639\u0644\u064A\u0642\u0627\u062A \u0648\u0627\u0644\u0633\u062C\u0644 \u0627\u0644\u062A\u0627\u0631\u064A\u062E\u064A \u0648\u0627\u0644\u0635\u0644\u0627\u062D\u064A\u0627\u062A \u0648\u0627\u0644\u0645\u062C\u0645\u0648\u0639\u0627\u062A \u0648\u0627\u0644\u0639\u0631\u0648\u0636 \u0648\u0644\u0648\u062D\u0627\u062A \u0627\u0644\u0645\u0639\u0644\u0648\u0645\u0627\u062A \u0648\u0627\u0644\u0627\u0634\u062A\u0631\u0627\u0643\u0627\u062A \u0648\u0645\u0627 \u062A\u062D\u0641\u0638\u0647 \u0627\u0644\u0625\u0636\u0627\u0641\u0627\u062A. \u064A\u0628\u0642\u0649 {username} \u062D\u0633\u0627\u0628\u064B\u0627 \u063A\u064A\u0631 \u0641\u0639\u0651\u0627\u0644 \u0644\u0627 \u064A\u0645\u0643\u0646\u0647 \u062A\u0633\u062C\u064A\u0644 \u0627\u0644\u062F\u062E\u0648\u0644.",
223
+ "merge.alreadyMerged": "\u062F\u064F\u0645\u062C \u0647\u0630\u0627 \u0627\u0644\u062D\u0633\u0627\u0628 \u0641\u064A {survivor} \u0645\u0646 \u0642\u0628\u0644.",
224
+ "merge.chooseTitle": "\u0627\u0644\u062D\u0633\u0627\u0628 \u0627\u0644\u0630\u064A \u064A\u0628\u0642\u0649",
225
+ "merge.chooseHint": "\u0639\u0627\u062F\u0629\u064B \u0627\u0644\u062D\u0633\u0627\u0628 \u0627\u0644\u062D\u0642\u064A\u0642\u064A \u0644\u0644\u0634\u062E\u0635: \u0627\u0644\u0630\u064A \u064A\u0633\u062C\u0651\u0644 \u0627\u0644\u062F\u062E\u0648\u0644 \u0628\u0647.",
226
+ "merge.survivor": "\u0627\u0644\u062F\u0645\u062C \u0641\u064A",
227
+ "merge.searchPlaceholder": "\u0627\u0628\u062D\u062B \u0628\u0627\u0633\u0645 \u0627\u0644\u0645\u0633\u062A\u062E\u062F\u0645 \u0623\u0648 \u0627\u0644\u0627\u0633\u0645 \u0623\u0648 \u0627\u0644\u0628\u0631\u064A\u062F",
228
+ "merge.searching": "\u062C\u0627\u0631\u064D \u0627\u0644\u0628\u062D\u062B\u2026",
229
+ "merge.noMatches": "\u0644\u0627 \u062D\u0633\u0627\u0628 \u064A\u0637\u0627\u0628\u0642.",
230
+ "merge.sourceTitle": "\u064A\u064F\u062F\u0645\u062C",
231
+ "merge.sourceHint": "\u064A\u0628\u0642\u0649 \u062D\u0633\u0627\u0628\u064B\u0627 \u063A\u064A\u0631 \u0641\u0639\u0651\u0627\u0644 \u0645\u062F\u0645\u0648\u062C\u064B\u0627 \u0641\u064A \u0627\u0644\u0622\u062E\u0631.",
232
+ "merge.survivorTitle": "\u064A\u0628\u0642\u0649",
233
+ "merge.survivorHint": "\u064A\u062D\u0635\u0644 \u0639\u0644\u0649 \u0643\u0644 \u0634\u064A\u0621.",
234
+ "merge.previewTitle": "\u0645\u0627 \u0633\u064A\u0646\u062A\u0642\u0644",
235
+ "merge.previewHint": "\u0645\u0639\u062F\u0648\u062F \u0627\u0644\u0622\u0646\u061B \u062A\u0646\u0642\u0644 \u0648\u062D\u062F\u0627\u062A {product} \u0628\u064A\u0627\u0646\u0627\u062A\u0647\u0627 \u0641\u064A \u0645\u0639\u0627\u0645\u0644\u0629 \u0648\u0627\u062D\u062F\u0629\u060C \u062B\u0645 \u0627\u0644\u0625\u0636\u0627\u0641\u0627\u062A \u0645\u0628\u0627\u0634\u0631\u0629.",
236
+ "merge.nothing": "\u0644\u0627 \u0634\u064A\u0621 \u0644\u0646\u0642\u0644\u0647.",
237
+ "merge.pluginError": "\u062A\u0639\u0630\u0651\u0631 \u0639\u0644\u0649 \u0647\u0630\u0647 \u0627\u0644\u0625\u0636\u0627\u0641\u0629 \u0627\u0644\u0625\u062C\u0627\u0628\u0629: {error}",
238
+ "merge.confirmTitle": "\u0627\u0644\u062F\u0645\u062C",
239
+ "merge.activeWarning": "\u064A\u0645\u0643\u0646 \u0644\u0640 {username} \u062A\u0633\u062C\u064A\u0644 \u0627\u0644\u062F\u062E\u0648\u0644. \u0628\u0639\u062F \u0627\u0644\u062F\u0645\u062C \u0644\u0646 \u064A\u0645\u0643\u0646\u0647 \u0630\u0644\u0643: \u064A\u0633\u062C\u0651\u0644 \u0635\u0627\u062D\u0628\u0647 \u0627\u0644\u062F\u062E\u0648\u0644 \u0628\u0627\u0644\u062D\u0633\u0627\u0628 \u0627\u0644\u0622\u062E\u0631.",
240
+ "merge.activeOtherDirectory": "\u064A\u0645\u0643\u0646 \u0644\u0640 {username} \u062A\u0633\u062C\u064A\u0644 \u0627\u0644\u062F\u062E\u0648\u0644 \u0645\u0646 \u062F\u0644\u064A\u0644 \u0622\u062E\u0631. \u0628\u0639\u062F \u0627\u0644\u062F\u0645\u062C \u0644\u0646 \u064A\u0645\u0643\u0646\u0647 \u0630\u0644\u0643: \u064A\u0633\u062C\u0651\u0644 \u0635\u0627\u062D\u0628\u0647 \u0627\u0644\u062F\u062E\u0648\u0644 \u0628\u0627\u0644\u062D\u0633\u0627\u0628 \u0627\u0644\u0622\u062E\u0631. \u0644\u0627 \u062A\u062F\u0645\u062C \u0625\u0644\u0627 \u0625\u0646 \u0643\u0627\u0646\u0627 \u0627\u0644\u0634\u062E\u0635 \u0646\u0641\u0633\u0647.",
241
+ "merge.typeUsername": "\u0627\u0643\u062A\u0628 {username} \u0644\u0644\u062A\u0623\u0643\u064A\u062F",
242
+ "merge.noUndo": "\u0644\u0627 \u064A\u0645\u0643\u0646 \u0627\u0644\u062A\u0631\u0627\u062C\u0639 \u0639\u0646 \u0627\u0644\u062F\u0645\u062C. \u064A\u064F\u0633\u062C\u064E\u0651\u0644 \u0641\u064A \u0627\u0644\u062D\u0633\u0627\u0628\u064A\u0646.",
243
+ "merge.mergeButton": "\u062F\u0645\u062C {source} \u0641\u064A {survivor}",
244
+ "merge.merged": "\u062F\u064F\u0645\u062C {source} \u0641\u064A {survivor}.",
245
+ "merge.mergedIncomplete": "\u062F\u064F\u0645\u062C {source} \u0641\u064A {survivor}\u060C \u0644\u0643\u0646 \u0625\u0636\u0627\u0641\u0629 \u0644\u0645 \u062A\u064F\u0643\u0645\u0644 \u0639\u0645\u0644\u0647\u0627: \u0627\u0633\u062A\u0623\u0646\u0641\u0647\u0627 \u0645\u0646 \u0639\u0645\u0644\u064A\u0627\u062A \u062F\u0645\u062C \u0627\u0644\u062D\u0633\u0627\u0628.",
246
+ "merge.mergedBanner": "\u062F\u064F\u0645\u062C \u0647\u0630\u0627 \u0627\u0644\u062D\u0633\u0627\u0628 \u0641\u064A <survivor></survivor>: \u0639\u0645\u0644\u0647 \u0648\u0635\u0644\u0627\u062D\u064A\u0627\u062A\u0647 \u0648\u0639\u0646\u0627\u0648\u064A\u0646\u0647 \u0647\u0646\u0627\u0643 \u0627\u0644\u0622\u0646. \u0644\u0627 \u064A\u0645\u0643\u0646\u0647 \u062A\u0633\u062C\u064A\u0644 \u0627\u0644\u062F\u062E\u0648\u0644.",
247
+ "merge.title": "\u0639\u0645\u0644\u064A\u0627\u062A \u0627\u0644\u062F\u0645\u062C ({count})",
248
+ "merge.hint": "\u062D\u0633\u0627\u0628\u0627\u062A \u062F\u064F\u0645\u062C\u062A \u0641\u064A \u0647\u0630\u0627 \u0627\u0644\u062D\u0633\u0627\u0628\u060C \u0623\u0648 \u062F\u064F\u0645\u062C \u0647\u0648 \u0641\u064A \u063A\u064A\u0631\u0647. \u0644\u0627 \u064A\u0645\u0643\u0646 \u0627\u0644\u062A\u0631\u0627\u062C\u0639 \u0639\u0646 \u0634\u064A\u0621 \u0647\u0646\u0627.",
249
+ "merge.none": "\u0644\u0627 \u0639\u0645\u0644\u064A\u0627\u062A \u062F\u0645\u062C.",
250
+ "merge.when": "\u0645\u062A\u0649",
251
+ "merge.what": "\u0645\u0627\u0630\u0627",
252
+ "merge.who": "\u0628\u0648\u0627\u0633\u0637\u0629",
253
+ "merge.moved": "\u0645\u0627 \u0627\u0646\u062A\u0642\u0644",
254
+ "merge.state": "\u0627\u0644\u062D\u0627\u0644\u0629",
255
+ "merge.done": "\u062A\u0645",
256
+ "merge.incomplete": "\u063A\u064A\u0631 \u0645\u0643\u062A\u0645\u0644",
257
+ "merge.resume": "\u0627\u0633\u062A\u0626\u0646\u0627\u0641",
258
+ "merge.someone": "\u0645\u0633\u0624\u0648\u0644",
259
+ "merge.mergedInto": "\u062F\u064F\u0645\u062C \u0641\u064A <survivor></survivor>",
260
+ "merge.mergedFrom": "\u062F\u064F\u0645\u062C <source></source> ({name}) \u0641\u064A \u0647\u0630\u0627 \u0627\u0644\u062D\u0633\u0627\u0628",
261
+ "merge.reason.admin": "\u0628\u0648\u0627\u0633\u0637\u0629 \u0645\u0633\u0624\u0648\u0644",
262
+ "merge.reason.sign-up": "\u062A\u0644\u0642\u0627\u0626\u064A: \u0633\u062C\u0651\u0644 \u062D\u0633\u0627\u0628\u064B\u0627",
263
+ "merge.reason.confirmed-address": "\u062A\u0644\u0642\u0627\u0626\u064A: \u0623\u0643\u0651\u062F \u0639\u0646\u0648\u0627\u0646\u0647",
264
+ "merge.reason.account-created": "\u062A\u0644\u0642\u0627\u0626\u064A: \u0623\u064F\u0646\u0634\u0626 \u0627\u0644\u062D\u0633\u0627\u0628",
265
+ "merge.reason.directory-sync": "\u062A\u0644\u0642\u0627\u0626\u064A: \u0645\u0632\u0627\u0645\u0646\u0629 \u0627\u0644\u062F\u0644\u064A\u0644",
266
+ "merge.reason.address-added": "\u062A\u0644\u0642\u0627\u0626\u064A: \u0623\u064F\u0636\u064A\u0641 \u0639\u0646\u0648\u0627\u0646",
267
+ "merge.step.failed": "\u0641\u0634\u0644",
268
+ "merge.step.pending": "\u0644\u0645 \u064A\u0643\u062A\u0645\u0644",
269
+ "merge.step.off": "\u0645\u062A\u0648\u0642\u0641",
270
+ "merge.plugin": "\u0627\u0644\u0625\u0636\u0627\u0641\u0629 {key}",
271
+ "merge.part.guard": "\u0627\u0644\u062D\u0633\u0627\u0628\u0627\u062A \u0648\u0627\u0644\u0635\u0644\u0627\u062D\u064A\u0627\u062A",
272
+ "merge.count.grants": "{count, plural, one {\u0645\u0646\u062D \u062F\u0648\u0631 \u0648\u0627\u062D\u062F} other {# \u0645\u0646 \u0645\u0646\u062D \u0627\u0644\u0623\u062F\u0648\u0627\u0631}}",
273
+ "merge.count.memberships": "{count, plural, one {\u0639\u0636\u0648\u064A\u0629 \u0645\u062C\u0645\u0648\u0639\u0629 \u0648\u0627\u062D\u062F\u0629} other {# \u0645\u0646 \u0639\u0636\u0648\u064A\u0627\u062A \u0627\u0644\u0645\u062C\u0645\u0648\u0639\u0627\u062A}}",
274
+ "merge.count.addresses": "{count, plural, one {\u0639\u0646\u0648\u0627\u0646 \u0648\u0627\u062D\u062F} other {# \u0645\u0646 \u0627\u0644\u0639\u0646\u0627\u0648\u064A\u0646}}",
275
+ "merge.count.tokens": "{count, plural, one {\u0631\u0645\u0632 \u0648\u0635\u0648\u0644 \u0648\u0627\u062D\u062F \u0623\u064F\u0644\u063A\u064A} other {# \u0645\u0646 \u0631\u0645\u0648\u0632 \u0627\u0644\u0648\u0635\u0648\u0644 \u0623\u064F\u0644\u063A\u064A\u062A}}",
276
+ "duplicates.title": "\u062D\u0633\u0627\u0628\u0627\u062A \u0645\u0643\u0631\u0631\u0629 \u0645\u062D\u062A\u0645\u0644\u0629 ({count})",
277
+ "duplicates.hint": "\u062D\u0633\u0627\u0628\u0627\u062A \u062A\u0634\u062A\u0631\u0643 \u0641\u064A \u0639\u0646\u0648\u0627\u0646: \u063A\u0627\u0644\u0628\u064B\u0627 \u0627\u0644\u0634\u062E\u0635 \u0646\u0641\u0633\u0647 \u0645\u0631\u062A\u064A\u0646\u060C \u0643\u0634\u062E\u0635 \u0644\u0645 \u064A\u0637\u0627\u0628\u0642\u0647 \u0627\u0633\u062A\u064A\u0631\u0627\u062F \u0645\u0646 Jira. \u0627\u062F\u0645\u062C\u0647\u0627 \u0644\u062A\u0635\u0628\u062D \u062D\u0633\u0627\u0628\u064B\u0627 \u0648\u0627\u062D\u062F\u064B\u0627.",
278
+ "duplicates.address": "\u0627\u0644\u0639\u0646\u0648\u0627\u0646",
279
+ "duplicates.accounts": "\u0627\u0644\u062D\u0633\u0627\u0628\u0627\u062A",
280
+ "duplicates.merge": "\u0627\u0644\u062F\u0645\u062C",
281
+ "duplicates.mergeInto": "\u062F\u0645\u062C {source} \u0641\u064A {survivor}",
282
+ "addresses.title": "\u0639\u0646\u0627\u0648\u064A\u0646 \u0627\u0644\u0628\u0631\u064A\u062F ({count})",
283
+ "addresses.adminHint": "\u0643\u0644 \u0639\u0646\u0648\u0627\u0646 \u0645\u0624\u0643\u064E\u0651\u062F \u064A\u062F\u0644 \u0639\u0644\u0649 \u0647\u0630\u0627 \u0627\u0644\u062D\u0633\u0627\u0628: \u0627\u0644\u0628\u0631\u064A\u062F \u0627\u0644\u0648\u0627\u0631\u062F \u0648\u0627\u0644\u0645\u0634\u0627\u0631\u0643\u0648\u0646 \u0648\u0627\u0644\u062A\u0633\u062C\u064A\u0644 \u0648\u0627\u0644\u0645\u0646\u0638\u0645\u0627\u062A \u062D\u0633\u0628 \u0627\u0644\u0646\u0637\u0627\u0642. \u0627\u0644\u0639\u0646\u0627\u0648\u064A\u0646 \u0627\u0644\u062A\u064A \u062A\u0636\u064A\u0641\u0647\u0627 \u062A\u064F\u0624\u0643\u064E\u0651\u062F \u0641\u0648\u0631\u064B\u0627\u061B \u0648\u064A\u0630\u0647\u0628 \u0627\u0644\u0628\u0631\u064A\u062F \u0625\u0644\u0649 \u0627\u0644\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0645\u062E\u062A\u0627\u0631.",
284
+ "addresses.selfHint": "\u0643\u0644 \u0639\u0646\u0648\u0627\u0646 \u0645\u0624\u0643\u064E\u0651\u062F \u064A\u062F\u0644 \u0639\u0644\u0649 \u062D\u0633\u0627\u0628\u0643: \u0627\u0644\u0628\u0631\u064A\u062F \u0627\u0644\u0630\u064A \u062A\u0631\u0633\u0644\u0647 \u0648\u0627\u0644\u0637\u0644\u0628\u0627\u062A \u0627\u0644\u0645\u0634\u062A\u0631\u0643\u0629 \u0645\u0639\u0643 \u0648\u0627\u0644\u0645\u0646\u0638\u0645\u0627\u062A \u062D\u0633\u0628 \u0627\u0644\u0646\u0637\u0627\u0642. \u0646\u0631\u0633\u0644 \u0631\u0627\u0628\u0637\u064B\u0627 \u0625\u0644\u0649 \u0643\u0644 \u0639\u0646\u0648\u0627\u0646 \u062A\u0636\u064A\u0641\u0647\u060C \u0648\u064A\u064F\u0639\u062A\u0645\u062F \u0639\u0646\u062F \u0641\u062A\u062D\u0647.",
285
+ "addresses.address": "\u0627\u0644\u0639\u0646\u0648\u0627\u0646",
286
+ "addresses.from": "\u0627\u0644\u0645\u0635\u062F\u0631",
287
+ "addresses.source.directory": "\u0627\u0644\u062F\u0644\u064A\u0644",
288
+ "addresses.source.admin": "\u0623\u0636\u0627\u0641\u0647 \u0645\u0633\u0624\u0648\u0644",
289
+ "addresses.source.person": "\u0623\u0636\u0627\u0641\u0647 \u0635\u0627\u062D\u0628\u0647",
290
+ "addresses.source.merge": "\u0645\u0646 \u062D\u0633\u0627\u0628 \u0645\u062F\u0645\u0648\u062C",
291
+ "addresses.state": "\u0627\u0644\u062D\u0627\u0644\u0629",
292
+ "addresses.confirmed": "\u0645\u0624\u0643\u064E\u0651\u062F",
293
+ "addresses.waiting": "\u0628\u0627\u0646\u062A\u0638\u0627\u0631 \u0627\u0644\u0631\u0627\u0628\u0637",
294
+ "addresses.addedAt": "\u0623\u064F\u0636\u064A\u0641",
295
+ "addresses.mail": "\u0627\u0644\u0628\u0631\u064A\u062F",
296
+ "addresses.mailGoesHere": "\u064A\u0630\u0647\u0628 \u0627\u0644\u0628\u0631\u064A\u062F \u0625\u0644\u064A\u0647",
297
+ "addresses.sendHere": "\u0623\u0631\u0633\u0644 \u0627\u0644\u0628\u0631\u064A\u062F \u0625\u0644\u064A\u0647",
298
+ "addresses.remove": "\u0625\u0632\u0627\u0644\u0629",
299
+ "addresses.removeLabel": "\u0625\u0632\u0627\u0644\u0629 {email}",
300
+ "addresses.none": "\u0644\u0627 \u0639\u0646\u0627\u0648\u064A\u0646.",
301
+ "addresses.placeholder": "someone@example.com",
302
+ "addresses.newAddress": "\u0639\u0646\u0648\u0627\u0646 \u062C\u062F\u064A\u062F",
303
+ "addresses.add": "\u0625\u0636\u0627\u0641\u0629 \u0639\u0646\u0648\u0627\u0646",
304
+ "addresses.addAndSend": "\u0625\u0636\u0627\u0641\u0629 \u0648\u0625\u0631\u0633\u0627\u0644 \u0627\u0644\u0631\u0627\u0628\u0637",
305
+ "addresses.addedToast": "\u0623\u064F\u0636\u064A\u0641 {email} \u0648\u0623\u064F\u0643\u0650\u0651\u062F.",
306
+ "addresses.linkSent": "\u0623\u0631\u0633\u0644\u0646\u0627 \u0631\u0627\u0628\u0637\u064B\u0627 \u0625\u0644\u0649 {email}. \u064A\u064F\u0639\u062A\u0645\u062F \u0627\u0644\u0639\u0646\u0648\u0627\u0646 \u0639\u0646\u062F \u0641\u062A\u062D\u0647.",
307
+ "addresses.verifyTitle": "\u062A\u0623\u0643\u064A\u062F \u0639\u0646\u0648\u0627\u0646",
308
+ "addresses.verified": "\u062A\u0623\u0643\u064E\u0651\u062F {email} \u0644\u0644\u062D\u0633\u0627\u0628 {username}.",
309
+ "addresses.toAccount": "\u0627\u0630\u0647\u0628 \u0625\u0644\u0649 \u062D\u0633\u0627\u0628\u0643",
310
+ "addresses.primary": "\u0631\u0626\u064A\u0633\u064A",
311
+ "addresses.makePrimary": "\u0627\u062C\u0639\u0644\u0647 \u0631\u0626\u064A\u0633\u064A\u064B\u0627",
312
+ "addresses.makePrimaryLabel": "\u0627\u062C\u0639\u0644 {email} \u0627\u0644\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0631\u0626\u064A\u0633\u064A",
313
+ "addresses.primaryChanged": "\u0623\u0635\u0628\u062D {email} \u0627\u0644\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0631\u0626\u064A\u0633\u064A. \u0648\u064A\u0628\u0642\u0649 \u0627\u0644\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0633\u0627\u0628\u0642 \u0645\u0624\u0643\u064E\u0651\u062F\u064B\u0627\u060C \u0648\u0642\u062F \u0623\u064F\u0628\u0644\u063A.",
314
+ "addresses.fromDirectory": "\u064A\u0623\u062A\u064A \u0627\u0644\u0627\u0633\u0645 \u0648\u0627\u0644\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0631\u0626\u064A\u0633\u064A \u0645\u0646 {directory}: \u063A\u064A\u0651\u0631\u0647\u0645\u0627 \u0647\u0646\u0627\u0643\u060C \u0648\u062A\u0646\u0642\u0644\u0647\u0645\u0627 \u0627\u0644\u0645\u0632\u0627\u0645\u0646\u0629 \u0627\u0644\u062A\u0627\u0644\u064A\u0629 \u0625\u0644\u0649 \u0647\u0646\u0627.",
315
+ "status.account.Active": "\u0646\u0634\u0637",
316
+ "status.account.Inactive": "\u063A\u064A\u0631 \u0646\u0634\u0637",
317
+ "status.account.Locked": "\u0645\u0642\u0641\u0644",
318
+ "status.plugin.Enabled": "\u0645\u0641\u0639\u0651\u0644\u0629",
319
+ "status.plugin.Disabled": "\u0645\u0639\u0637\u0651\u0644\u0629",
320
+ "status.plugin.Installed": "\u0645\u062B\u0628\u0651\u062A\u0629",
321
+ "status.plugin.Failed": "\u0641\u0634\u0644\u062A",
322
+ "status.check.notRun": "\u0644\u0645 \u064A\u064F\u0646\u0641\u064E\u0651\u0630",
323
+ "status.check.pass": "\u0646\u062C\u062D",
324
+ "status.check.fail": "\u0641\u0634\u0644",
325
+ "status.sync.running": "\u0642\u064A\u062F \u0627\u0644\u062A\u0646\u0641\u064A\u0630",
326
+ "status.sync.succeeded": "\u0646\u062C\u062D\u062A",
327
+ "status.sync.failed": "\u0641\u0634\u0644\u062A",
328
+ "status.sync.never": "\u0644\u0645 \u062A\u062A\u0645 \u0627\u0644\u0645\u0632\u0627\u0645\u0646\u0629 \u0642\u0637",
329
+ "common.account": "\u062D\u0633\u0627\u0628",
330
+ "common.actions": "\u0627\u0644\u0625\u062C\u0631\u0627\u0621\u0627\u062A",
331
+ "common.active": "\u0646\u0634\u0637",
332
+ "common.cancel": "\u0625\u0644\u063A\u0627\u0621",
333
+ "common.delete": "\u062D\u0630\u0641",
334
+ "common.description": "\u0627\u0644\u0648\u0635\u0641",
335
+ "common.direct": "\u0645\u0628\u0627\u0634\u0631\u0629",
336
+ "common.directory": "\u0627\u0644\u062F\u0644\u064A\u0644",
337
+ "common.disabled": "\u0645\u0639\u0637\u0651\u0644",
338
+ "common.displayName": "\u0627\u0644\u0627\u0633\u0645 \u0627\u0644\u0645\u0639\u0631\u0648\u0636",
339
+ "common.email": "\u0627\u0644\u0628\u0631\u064A\u062F \u0627\u0644\u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",
340
+ "common.enabled": "\u0645\u0641\u0639\u0651\u0644",
341
+ "common.group": "\u0645\u062C\u0645\u0648\u0639\u0629",
342
+ "common.groups": "\u0627\u0644\u0645\u062C\u0645\u0648\u0639\u0627\u062A",
343
+ "common.inactive": "\u063A\u064A\u0631 \u0646\u0634\u0637",
344
+ "common.lastSignIn": "\u0622\u062E\u0631 \u062A\u0633\u062C\u064A\u0644 \u062F\u062E\u0648\u0644",
345
+ "common.membership": "\u0627\u0644\u0639\u0636\u0648\u064A\u0629",
346
+ "common.name": "\u0627\u0644\u0627\u0633\u0645",
347
+ "common.nested": "\u0645\u062A\u062F\u0627\u062E\u0644\u0629",
348
+ "common.no": "\u0644\u0627",
349
+ "common.optional": "(\u0627\u062E\u062A\u064A\u0627\u0631\u064A)",
350
+ "common.order": "\u0627\u0644\u062A\u0631\u062A\u064A\u0628",
351
+ "common.password": "\u0643\u0644\u0645\u0629 \u0627\u0644\u0645\u0631\u0648\u0631",
352
+ "common.path": "\u0627\u0644\u0645\u0633\u0627\u0631",
353
+ "common.product": "{product}",
354
+ "common.source": "\u0627\u0644\u0645\u0635\u062F\u0631",
355
+ "common.status": "\u0627\u0644\u062D\u0627\u0644\u0629",
356
+ "common.type": "\u0627\u0644\u0646\u0648\u0639",
357
+ "common.unknownError": "\u062E\u0637\u0623 \u063A\u064A\u0631 \u0645\u0639\u0631\u0648\u0641",
358
+ "common.username": "\u0627\u0633\u0645 \u0627\u0644\u0645\u0633\u062A\u062E\u062F\u0645",
359
+ "common.users": "\u0627\u0644\u0645\u0633\u062A\u062E\u062F\u0645\u0648\u0646",
360
+ "common.yes": "\u0646\u0639\u0645",
361
+ "nav.accounts": "\u0627\u0644\u062D\u0633\u0627\u0628\u0627\u062A",
362
+ "nav.groups": "\u0627\u0644\u0645\u062C\u0645\u0648\u0639\u0627\u062A",
363
+ "nav.directories": "\u0627\u0644\u0623\u062F\u0644\u0629",
364
+ "nav.signup": "\u0627\u0644\u062A\u0633\u062C\u064A\u0644",
365
+ "nav.anonymous": "\u0627\u0644\u0648\u0635\u0648\u0644 \u0627\u0644\u0645\u062C\u0647\u0648\u0644",
366
+ "secondFactor.disabled": "\u0623\u0648\u0642\u0641 \u0645\u0634\u063A\u0651\u0644 \u0647\u0630\u0627 \u0627\u0644\u0645\u0648\u0642\u0639 \u0627\u0644\u062A\u062D\u0642\u0642 \u0628\u062E\u0637\u0648\u062A\u064A\u0646 \u0645\u0624\u0642\u062A\u064B\u0627: \u0644\u0627 \u064A\u064F\u0637\u0644\u0628 \u0631\u0645\u0632 \u0645\u0646 \u0623\u062D\u062F.",
367
+ "secondFactor.kinds.app": "\u062A\u0637\u0628\u064A\u0642 \u0645\u0635\u0627\u062F\u0642\u0629",
368
+ "secondFactor.kinds.email": "\u0627\u0644\u0628\u0631\u064A\u062F \u0627\u0644\u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",
369
+ "secondFactor.kinds.sms": "\u0631\u0633\u0627\u0644\u0629 \u0646\u0635\u064A\u0629",
370
+ "secondFactor.kinds.whatsapp": "\u0648\u0627\u062A\u0633\u0627\u0628",
371
+ "secondFactor.kinds.passkey": "\u0645\u0641\u062A\u0627\u062D \u0645\u0631\u0648\u0631",
372
+ "secondFactor.title": "\u0627\u0644\u062A\u062D\u0642\u0642 \u0628\u062E\u0637\u0648\u062A\u064A\u0646",
373
+ "secondFactor.panelHint": "\u0645\u0641\u062A\u0627\u062D \u0645\u0631\u0648\u0631\u060C \u0623\u0648 \u0631\u0645\u0632 \u0645\u0646 \u062A\u0637\u0628\u064A\u0642 \u0639\u0644\u0649 \u0647\u0627\u062A\u0641\u0643\u060C \u0628\u0639\u062F \u0643\u0644\u0645\u0629 \u0627\u0644\u0645\u0631\u0648\u0631\u060C \u0641\u0644\u0627 \u062A\u0643\u0641\u064A \u0643\u0644\u0645\u0629 \u0645\u0631\u0648\u0631 \u0645\u0633\u0631\u0648\u0642\u0629 \u0648\u062D\u062F\u0647\u0627 \u0644\u062F\u062E\u0648\u0644 \u0623\u062D\u062F.",
374
+ "secondFactor.on": "\u0645\u0641\u0639\u0651\u0644",
375
+ "secondFactor.off": "\u0645\u062A\u0648\u0642\u0641",
376
+ "secondFactor.modeHint.off": "\u0644\u0627 \u062A\u0637\u0644\u0628 \u0645\u062C\u0645\u0648\u0639\u0627\u062A\u0643 \u0639\u0627\u0645\u0644\u064B\u0627 \u062B\u0627\u0646\u064A\u064B\u0627. \u0625\u0646 \u0623\u0639\u062F\u062F\u062A \u0648\u0627\u062D\u062F\u064B\u0627 \u0641\u0633\u064A\u064F\u0637\u0644\u0628 \u0645\u0646\u0643 \u0639\u0646\u062F \u0643\u0644 \u062A\u0633\u062C\u064A\u0644 \u062F\u062E\u0648\u0644.",
377
+ "secondFactor.modeHint.optional": "\u062A\u062A\u064A\u062D \u0645\u062C\u0645\u0648\u0639\u0627\u062A\u0643 \u0639\u0627\u0645\u0644\u064B\u0627 \u062B\u0627\u0646\u064A\u064B\u0627. \u0625\u0646 \u0623\u0639\u062F\u062F\u062A \u0648\u0627\u062D\u062F\u064B\u0627 \u0641\u0633\u064A\u064F\u0637\u0644\u0628 \u0645\u0646\u0643 \u0639\u0646\u062F \u0643\u0644 \u062A\u0633\u062C\u064A\u0644 \u062F\u062E\u0648\u0644.",
378
+ "secondFactor.modeHint.required": "\u062A\u0634\u062A\u0631\u0637 \u0645\u062C\u0645\u0648\u0639\u0627\u062A\u0643 \u0639\u0627\u0645\u0644\u064B\u0627 \u062B\u0627\u0646\u064A\u064B\u0627 \u0639\u0646\u062F \u0643\u0644 \u062A\u0633\u062C\u064A\u0644 \u062F\u062E\u0648\u0644.",
379
+ "secondFactor.modeHint.strong": "\u062A\u0634\u062A\u0631\u0637 \u0645\u062C\u0645\u0648\u0639\u0627\u062A\u0643 \u0639\u0627\u0645\u0644\u064B\u0627 \u062B\u0627\u0646\u064A\u064B\u0627 \u0639\u0646\u062F \u0643\u0644 \u062A\u0633\u062C\u064A\u0644 \u062F\u062E\u0648\u0644\u060C \u0645\u0646 \u062A\u0637\u0628\u064A\u0642 \u0645\u0635\u0627\u062F\u0642\u0629.",
380
+ "secondFactor.added": "\u0623\u064F\u0636\u064A\u0641",
381
+ "secondFactor.lastUsed": "\u0622\u062E\u0631 \u0627\u0633\u062A\u062E\u062F\u0627\u0645",
382
+ "secondFactor.never": "\u0644\u0645 \u064A\u064F\u0633\u062A\u062E\u062F\u0645 \u0628\u0639\u062F",
383
+ "secondFactor.none": "\u0644\u0645 \u064A\u064F\u0639\u062F\u0651 \u0639\u0627\u0645\u0644 \u062B\u0627\u0646\u064D \u0628\u0639\u062F.",
384
+ "secondFactor.remove": "\u0625\u0632\u0627\u0644\u0629",
385
+ "secondFactor.removeTitle": "\u0625\u0632\u0627\u0644\u0629 \u062A\u0637\u0628\u064A\u0642 \u0627\u0644\u0645\u0635\u0627\u062F\u0642\u0629 \u0647\u0630\u0627\u061F",
386
+ "secondFactor.removeHint": "\u062A\u062A\u0648\u0642\u0641 \u0631\u0645\u0648\u0632\u0647 \u0639\u0646 \u0627\u0644\u0639\u0645\u0644. \u0648\u0625\u0646 \u0644\u0645 \u064A\u0628\u0642\u064E \u0644\u0643 \u0639\u0627\u0645\u0644 \u062B\u0627\u0646\u064D\u060C \u062A\u062A\u0648\u0642\u0641 \u0631\u0645\u0648\u0632 \u0627\u0644\u0627\u0633\u062A\u0631\u062F\u0627\u062F \u0623\u064A\u0636\u064B\u0627.",
387
+ "secondFactor.removed": "\u0623\u064F\u0632\u064A\u0644 \u062A\u0637\u0628\u064A\u0642 \u0627\u0644\u0645\u0635\u0627\u062F\u0642\u0629.",
388
+ "secondFactor.setUp": "\u0625\u0639\u062F\u0627\u062F \u062A\u0637\u0628\u064A\u0642 \u0645\u0635\u0627\u062F\u0642\u0629",
389
+ "secondFactor.addAnother": "\u0625\u0636\u0627\u0641\u0629 \u062A\u0637\u0628\u064A\u0642 \u0645\u0635\u0627\u062F\u0642\u0629 \u0622\u062E\u0631",
390
+ "secondFactor.recoveryLeft": "{count, plural, =0 {\u0644\u0645 \u062A\u0628\u0642\u064E \u0631\u0645\u0648\u0632 \u0627\u0633\u062A\u0631\u062F\u0627\u062F} one {\u0628\u0642\u064A \u0631\u0645\u0632 \u0627\u0633\u062A\u0631\u062F\u0627\u062F \u0648\u0627\u062D\u062F} two {\u0628\u0642\u064A \u0631\u0645\u0632\u0627 \u0627\u0633\u062A\u0631\u062F\u0627\u062F} few {\u0628\u0642\u064A\u062A # \u0631\u0645\u0648\u0632 \u0627\u0633\u062A\u0631\u062F\u0627\u062F} many {\u0628\u0642\u064A # \u0631\u0645\u0632 \u0627\u0633\u062A\u0631\u062F\u0627\u062F} other {\u0628\u0642\u064A # \u0631\u0645\u0632 \u0627\u0633\u062A\u0631\u062F\u0627\u062F}}",
391
+ "secondFactor.renew": "\u0631\u0645\u0648\u0632 \u0627\u0633\u062A\u0631\u062F\u0627\u062F \u062C\u062F\u064A\u062F\u0629",
392
+ "secondFactor.renewTitle": "\u0625\u0646\u0634\u0627\u0621 \u0631\u0645\u0648\u0632 \u0627\u0633\u062A\u0631\u062F\u0627\u062F \u062C\u062F\u064A\u062F\u0629\u061F",
393
+ "secondFactor.renewHint": "\u062A\u062A\u0648\u0642\u0641 \u0631\u0645\u0648\u0632 \u0627\u0644\u0627\u0633\u062A\u0631\u062F\u0627\u062F \u0627\u0644\u0642\u062F\u064A\u0645\u0629 \u0639\u0646 \u0627\u0644\u0639\u0645\u0644.",
394
+ "secondFactor.setup.scan": "\u0627\u0645\u0633\u062D \u0631\u0645\u0632 QR \u0647\u0630\u0627 \u0628\u062A\u0637\u0628\u064A\u0642 \u0645\u0635\u0627\u062F\u0642\u0629\u060C \u0645\u062B\u0644 Microsoft Authenticator \u0623\u0648 Google Authenticator \u0623\u0648 1Password.",
395
+ "secondFactor.setup.qrAlt": "\u0631\u0645\u0632 QR \u0644\u062A\u0637\u0628\u064A\u0642 \u0627\u0644\u0645\u0635\u0627\u062F\u0642\u0629",
396
+ "secondFactor.setup.cantScan": "\u0644\u0627 \u064A\u0645\u0643\u0646\u0643 \u0645\u0633\u062D\u0647\u061F \u0623\u062F\u062E\u0644 \u0647\u0630\u0627 \u0627\u0644\u0645\u0641\u062A\u0627\u062D \u0641\u064A \u0627\u0644\u062A\u0637\u0628\u064A\u0642 \u0628\u062F\u0644\u064B\u0627 \u0645\u0646 \u0630\u0644\u0643:",
397
+ "secondFactor.setup.onThisDevice": "\u0627\u0641\u062A\u062D\u0647 \u0641\u064A \u062A\u0637\u0628\u064A\u0642 \u0645\u0635\u0627\u062F\u0642\u0629 \u0639\u0644\u0649 \u0647\u0630\u0627 \u0627\u0644\u062C\u0647\u0627\u0632",
398
+ "secondFactor.setup.code": "\u0627\u0644\u0631\u0645\u0632 \u0645\u0646 \u0627\u0644\u062A\u0637\u0628\u064A\u0642",
399
+ "secondFactor.setup.codeHint": "\u0627\u0644\u0623\u0631\u0642\u0627\u0645 \u0627\u0644\u0633\u062A\u0629 \u0627\u0644\u062A\u064A \u064A\u0639\u0631\u0636\u0647\u0627 \u0627\u0644\u062A\u0637\u0628\u064A\u0642 \u0627\u0644\u0622\u0646.",
400
+ "secondFactor.setup.verify": "\u062A\u062D\u0642\u0642",
401
+ "secondFactor.setup.wrongCode": "\u0644\u0645 \u064A\u062A\u0637\u0627\u0628\u0642 \u0627\u0644\u0631\u0645\u0632. \u062A\u062D\u0642\u0642 \u0645\u0646 \u0627\u0644\u0648\u0642\u062A \u0639\u0644\u0649 \u0647\u0627\u062A\u0641\u0643\u060C \u0648\u0623\u062F\u062E\u0644 \u0627\u0644\u0631\u0645\u0632 \u0627\u0644\u0630\u064A \u064A\u0639\u0631\u0636\u0647 \u0627\u0644\u062A\u0637\u0628\u064A\u0642 \u0627\u0644\u0622\u0646.",
402
+ "secondFactor.setup.cancel": "\u0625\u0644\u063A\u0627\u0621",
403
+ "secondFactor.setup.done": "\u0623\u064F\u0639\u062F\u0651 \u062A\u0637\u0628\u064A\u0642 \u0627\u0644\u0645\u0635\u0627\u062F\u0642\u0629.",
404
+ "secondFactor.recovery.title": "\u0631\u0645\u0648\u0632 \u0627\u0644\u0627\u0633\u062A\u0631\u062F\u0627\u062F",
405
+ "secondFactor.recovery.hint": "\u0643\u0644 \u0631\u0645\u0632 \u064A\u064F\u062F\u062E\u0644\u0643 \u0645\u0631\u0629 \u0648\u0627\u062D\u062F\u0629 \u0625\u0646 \u0641\u0642\u062F\u062A \u0647\u0627\u062A\u0641\u0643. \u0627\u062D\u0641\u0638\u0647\u0627 \u0641\u064A \u0645\u0643\u0627\u0646 \u0622\u0645\u0646: \u0644\u0646 \u062A\u064F\u0639\u0631\u0636 \u0645\u0631\u0629 \u0623\u062E\u0631\u0649.",
406
+ "secondFactor.recovery.copy": "\u0646\u0633\u062E",
407
+ "secondFactor.recovery.download": "\u062A\u0646\u0632\u064A\u0644",
408
+ "secondFactor.recovery.copied": "\u0646\u064F\u0633\u062E\u062A \u0631\u0645\u0648\u0632 \u0627\u0644\u0627\u0633\u062A\u0631\u062F\u0627\u062F.",
409
+ "secondFactor.recovery.copyFailed": "\u062A\u0639\u0630\u0651\u0631 \u0627\u0644\u0646\u0633\u062E: \u062D\u062F\u0651\u062F\u0647\u0627 \u0648\u0627\u0646\u0633\u062E\u0647\u0627 \u0628\u0646\u0641\u0633\u0643.",
410
+ "secondFactor.recovery.saved": "\u062D\u0641\u0638\u062A\u0647\u0627",
411
+ "secondFactor.recovery.fileHeader": "\u0631\u0645\u0648\u0632 \u0627\u0644\u0627\u0633\u062A\u0631\u062F\u0627\u062F \u0644\u0640 {site}. \u0643\u0644 \u0631\u0645\u0632 \u064A\u064F\u062F\u062E\u0644\u0643 \u0645\u0631\u0629 \u0648\u0627\u062D\u062F\u0629.",
412
+ "secondFactor.alsoBy": "\u064A\u0645\u0643\u0646\u0643 \u0623\u064A\u0636\u064B\u0627 \u0627\u0644\u062D\u0635\u0648\u0644 \u0639\u0644\u0649 \u0631\u0645\u0632 \u0639\u0628\u0631 {list}.",
413
+ "secondFactor.addPasskey": "\u0623\u0636\u0641 \u0645\u0641\u062A\u0627\u062D \u0645\u0631\u0648\u0631",
414
+ "secondFactor.passkeyHint": "\u0633\u0645\u0650\u0651\u0647 \u0628\u0627\u0633\u0645 \u0627\u0644\u062C\u0647\u0627\u0632\u060C \u062B\u0645 \u0627\u062A\u0628\u0639 \u0645\u0627 \u064A\u0637\u0644\u0628\u0647.",
415
+ "secondFactor.passkeyName": "\u0627\u0633\u0645 \u0645\u0641\u062A\u0627\u062D \u0627\u0644\u0645\u0631\u0648\u0631",
416
+ "secondFactor.passkeyNameDefault": "\u0645\u0641\u062A\u0627\u062D \u0645\u0631\u0648\u0631",
417
+ "secondFactor.passkeyCreate": "\u0623\u0646\u0634\u0626 \u0645\u0641\u062A\u0627\u062D \u0627\u0644\u0645\u0631\u0648\u0631",
418
+ "secondFactor.passkeyAdded": "\u0623\u064F\u0636\u064A\u0641 \u0645\u0641\u062A\u0627\u062D \u0627\u0644\u0645\u0631\u0648\u0631.",
419
+ "secondFactor.passkeyCancelled": "\u0644\u0645 \u064A\u064F\u0646\u0634\u0623 \u0645\u0641\u062A\u0627\u062D \u0627\u0644\u0645\u0631\u0648\u0631.",
420
+ "secondFactor.passkeyRemoved": "\u0623\u064F\u0632\u064A\u0644 \u0645\u0641\u062A\u0627\u062D \u0627\u0644\u0645\u0631\u0648\u0631.",
421
+ "secondFactor.removePasskeyTitle": "\u0625\u0632\u0627\u0644\u0629 \u0645\u0641\u062A\u0627\u062D \u0627\u0644\u0645\u0631\u0648\u0631 \u0647\u0630\u0627\u061F",
422
+ "secondFactor.removePasskeyHint": "\u0644\u0646 \u064A\u0639\u0645\u0644 \u0628\u0639\u062F \u0630\u0644\u0643 \u0644\u062A\u0633\u062C\u064A\u0644 \u0627\u0644\u062F\u062E\u0648\u0644 \u0623\u0648 \u0644\u062A\u0623\u0643\u064A\u062F \u0647\u0648\u064A\u062A\u0643.",
423
+ "secondFactor.rename": "\u0625\u0639\u0627\u062F\u0629 \u062A\u0633\u0645\u064A\u0629",
424
+ "secondFactor.renameTitle": "\u0625\u0639\u0627\u062F\u0629 \u062A\u0633\u0645\u064A\u0629 \u0645\u0641\u062A\u0627\u062D \u0627\u0644\u0645\u0631\u0648\u0631",
425
+ "secondFactor.save": "\u062D\u0641\u0638",
426
+ "secondFactor.cancel": "\u0625\u0644\u063A\u0627\u0621",
427
+ "secondFactor.required.title": "\u0623\u0639\u062F\u0651 \u0645\u0641\u062A\u0627\u062D \u0645\u0631\u0648\u0631 \u0623\u0648 \u062A\u0637\u0628\u064A\u0642 \u0645\u0635\u0627\u062F\u0642\u0629",
428
+ "secondFactor.required.by": "\u064A\u062D\u062A\u0627\u062C \u0645\u062F\u064A\u0631\u0648 \u0627\u0644\u0645\u0648\u0642\u0639 \u0625\u0644\u0649 \u0623\u062D\u062F\u0647\u0645\u0627. \u0623\u0639\u062F\u0651\u0647 \u0642\u0628\u0644 {date}\u061B \u0628\u0639\u062F \u0630\u0644\u0643 \u064A\u0637\u0644\u0628\u0647 \u062A\u0633\u062C\u064A\u0644 \u0627\u0644\u062F\u062E\u0648\u0644 \u0623\u0648\u0644\u064B\u0627.",
429
+ "secondFactor.required.overdue": "\u064A\u062D\u062A\u0627\u062C \u0645\u062F\u064A\u0631\u0648 \u0627\u0644\u0645\u0648\u0642\u0639 \u0625\u0644\u0649 \u0623\u062D\u062F\u0647\u0645\u0627\u060C \u0648\u0642\u062F \u0645\u0636\u0649 \u0627\u0644\u0645\u0648\u0639\u062F: \u0623\u0639\u062F\u0651\u0647 \u0627\u0644\u0622\u0646.",
430
+ "secondFactor.required.setUp": "\u0623\u0639\u062F\u0651\u0647",
431
+ "signUpSettings.off": "\u0627\u0644\u062A\u0633\u062C\u064A\u0644 \u0645\u062A\u0648\u0642\u0641. \u0644\u0627 \u064A\u0646\u0634\u0626 \u0627\u0644\u062D\u0633\u0627\u0628\u0627\u062A \u0625\u0644\u0627 \u0627\u0644\u0645\u0633\u0624\u0648\u0644\u0648\u0646 \u0645\u0646 \u0635\u0641\u062D\u0629 \u0627\u0644\u062D\u0633\u0627\u0628\u0627\u062A.",
432
+ "signUpSettings.directoryRequired": "\u0627\u062E\u062A\u0631 \u0627\u0644\u062F\u0644\u064A\u0644 \u0627\u0644\u0630\u064A \u062A\u064F\u0646\u0634\u0623 \u0641\u064A\u0647 \u0627\u0644\u062D\u0633\u0627\u0628\u0627\u062A.",
433
+ "signUpSettings.anyDomain": "\u0623\u064A \u0646\u0637\u0627\u0642. \u064A\u0645\u0643\u0646 \u0644\u0623\u064A \u0628\u0631\u064A\u062F \u0627\u0644\u062A\u0633\u062C\u064A\u0644.",
434
+ "signUpSettings.addDomain": "\u0625\u0636\u0627\u0641\u0629 \u0646\u0637\u0627\u0642",
435
+ "signUpSettings.add": "\u0625\u0636\u0627\u0641\u0629",
436
+ "signUpSettings.removeDomain": "\u0625\u0632\u0627\u0644\u0629 {domain}",
437
+ "signUpSettings.domainInvalid": "\u0623\u062F\u062E\u0644 \u0646\u0637\u0627\u0642\u064B\u0627 \u0645\u062B\u0644 acme.com.",
438
+ "signUpSettings.domainTwice": "{domain} \u0645\u0648\u062C\u0648\u062F \u0641\u064A \u0627\u0644\u0642\u0627\u0626\u0645\u0629.",
439
+ "signUpSettings.emptyTitle": "\u0627\u0644\u062A\u0633\u062C\u064A\u0644 \u0645\u062A\u0648\u0642\u0641",
440
+ "signUpSettings.emptyText": "\u0627\u0644\u0645\u062F\u064A\u0631\u0648\u0646 \u0641\u0642\u0637 \u064A\u0636\u064A\u0641\u0648\u0646 \u0627\u0644\u0623\u0634\u062E\u0627\u0635 \u0627\u0644\u0622\u0646. \u064A\u0645\u0643\u0646\u0643 \u0627\u0644\u0633\u0645\u0627\u062D \u0644\u0644\u0646\u0627\u0633 \u0628\u0627\u0644\u062A\u0633\u062C\u064A\u0644 \u0628\u0623\u0646\u0641\u0633\u0647\u0645.",
441
+ "signUpSettings.turnOn": "\u062A\u0634\u063A\u064A\u0644 \u0627\u0644\u062A\u0633\u062C\u064A\u0644",
442
+ "anonymousAccess.giveRole": "\u0645\u0646\u062D \u062F\u0648\u0631",
443
+ "anonymousAccess.dialogTitle": "\u0645\u0646\u062D \u0627\u0644\u0632\u0648\u0627\u0631 \u0627\u0644\u0645\u062C\u0647\u0648\u0644\u064A\u0646 \u062F\u0648\u0631\u064B\u0627",
444
+ "anonymousAccess.changeTitle": "\u062A\u063A\u064A\u064A\u0631 \u062F\u0648\u0631 \u0627\u0644\u0632\u0648\u0627\u0631 \u0627\u0644\u0645\u062C\u0647\u0648\u0644\u064A\u0646 \u0641\u064A {scope}",
445
+ "anonymousAccess.chooseRole": "\u0627\u062E\u062A\u0631 \u062F\u0648\u0631\u064B\u0627",
446
+ "anonymousAccess.chooseWhere": "\u0627\u062E\u062A\u0631 \u0645\u0643\u0627\u0646\u064B\u0627",
447
+ "anonymousAccess.warning": "\u0623\u064A \u0634\u062E\u0635 \u0639\u0644\u0649 \u0627\u0644\u0625\u0646\u062A\u0631\u0646\u062A \u064A\u062D\u0635\u0644 \u0639\u0644\u0649 \u0647\u0630\u0627 \u0627\u0644\u062F\u0648\u0631\u060C \u062F\u0648\u0646 \u062A\u0633\u062C\u064A\u0644 \u062F\u062E\u0648\u0644.",
448
+ "anonymousAccess.who": "\u0627\u0644\u0632\u0648\u0627\u0631 \u0627\u0644\u0645\u062C\u0647\u0648\u0644\u0648\u0646",
449
+ "anonymousAccess.can": "\u064A\u0645\u0643\u0646\u0647\u0645",
450
+ "anonymousAccess.give": "\u0645\u0646\u062D \u0627\u0644\u062F\u0648\u0631",
451
+ "anonymousAccess.change": "\u062A\u063A\u064A\u064A\u0631 \u0627\u0644\u062F\u0648\u0631",
452
+ "anonymousAccess.given": "\u0645\u064F\u0646\u062D \u0627\u0644\u062F\u0648\u0631.",
453
+ "anonymousAccess.changed": "\u062A\u063A\u064A\u0651\u0631 \u0627\u0644\u062F\u0648\u0631.",
454
+ "anonymousAccess.emptyTitle": "\u0644\u064A\u0633 \u0644\u0644\u0632\u0648\u0627\u0631 \u0627\u0644\u0645\u062C\u0647\u0648\u0644\u064A\u0646 \u0623\u064A \u062F\u0648\u0631",
455
+ "anonymousAccess.emptyText": "\u064A\u062C\u0628 \u062A\u0633\u062C\u064A\u0644 \u0627\u0644\u062F\u062E\u0648\u0644 \u0644\u0631\u0624\u064A\u0629 \u0623\u064A \u0634\u064A\u0621.",
456
+ "anonymousAccess.tableLabel": "\u0623\u062F\u0648\u0627\u0631 \u0627\u0644\u0632\u0648\u0627\u0631 \u0627\u0644\u0645\u062C\u0647\u0648\u0644\u064A\u0646",
457
+ "anonymousAccess.actions": "\u0627\u0644\u0625\u062C\u0631\u0627\u0621\u0627\u062A",
458
+ "anonymousAccess.menuLabel": "\u0625\u062C\u0631\u0627\u0621\u0627\u062A {role} \u0641\u064A {scope}",
459
+ "anonymousAccess.notListed": "\u0644\u0645 \u064A\u0639\u062F \u0647\u0630\u0627 \u0627\u0644\u0645\u0643\u0627\u0646 \u064A\u062A\u064A\u062D \u0623\u062F\u0648\u0627\u0631\u064B\u0627 \u0644\u0644\u0632\u0648\u0627\u0631 \u0627\u0644\u0645\u062C\u0647\u0648\u0644\u064A\u0646. \u0627\u0633\u062D\u0628 \u0627\u0644\u062F\u0648\u0631 \u0628\u062F\u0644\u064B\u0627 \u0645\u0646 \u0630\u0644\u0643.",
460
+ "anonymousAccess.emptyTextNoPlaces": "\u064A\u062C\u0628 \u062A\u0633\u062C\u064A\u0644 \u0627\u0644\u062F\u062E\u0648\u0644 \u0644\u0631\u0624\u064A\u0629 \u0623\u064A \u0634\u064A\u0621. \u0644\u0627 \u0634\u064A\u0621 \u0641\u064A \u0647\u0630\u0627 \u0627\u0644\u0645\u0648\u0642\u0639 \u064A\u0645\u0643\u0646 \u0641\u062A\u062D\u0647 \u0644\u0644\u0632\u0648\u0627\u0631 \u0627\u0644\u0645\u062C\u0647\u0648\u0644\u064A\u0646 \u0628\u0639\u062F.",
461
+ "anonymousAccess.placeWithCode": "{place} \xB7 {code}",
462
+ "directories.priority": "\u0627\u0644\u0623\u0648\u0644\u0648\u064A\u0629",
463
+ "directories.on": "\u0645\u0641\u0639\u0651\u0644",
464
+ "directories.off": "\u0645\u062A\u0648\u0642\u0641",
465
+ "directories.menuLabel": "\u0625\u062C\u0631\u0627\u0621\u0627\u062A {name}",
466
+ "directories.edit": "\u062A\u0639\u062F\u064A\u0644",
467
+ "directories.openPage": "\u0641\u062A\u062D \u0635\u0641\u062D\u062A\u0647",
468
+ "directories.deactivate": "\u0625\u064A\u0642\u0627\u0641",
469
+ "directories.activate": "\u062A\u0641\u0639\u064A\u0644",
470
+ "directories.newTitle": "\u062F\u0644\u064A\u0644 \u062C\u062F\u064A\u062F",
471
+ "directories.editTitle": "\u062A\u0639\u062F\u064A\u0644 \u0627\u0644\u062F\u0644\u064A\u0644",
472
+ "directories.deleteDirectory": "\u062D\u0630\u0641 \u0627\u0644\u062F\u0644\u064A\u0644",
473
+ "directories.namePreview": "\u0627\u0633\u0645 \u0627\u0644\u062F\u0644\u064A\u0644",
474
+ "directories.sync": "\u0627\u0644\u0645\u0632\u0627\u0645\u0646\u0629",
475
+ "directories.syncEvery": "{count, plural, one {\u0643\u0644 \u062F\u0642\u064A\u0642\u0629} two {\u0643\u0644 \u062F\u0642\u064A\u0642\u062A\u064A\u0646} few {\u0643\u0644 # \u062F\u0642\u0627\u0626\u0642} many {\u0643\u0644 # \u062F\u0642\u064A\u0642\u0629} other {\u0643\u0644 # \u062F\u0642\u064A\u0642\u0629}}",
476
+ "directories.onRequest": "\u0639\u0646\u062F \u0627\u0644\u0637\u0644\u0628 \u0641\u0642\u0637",
477
+ "directories.savedWithWarnings": "\u062D\u064F\u0641\u0638 {name}. \u0641\u064A \u0625\u0639\u062F\u0627\u062F\u0627\u062A\u0647 \u062A\u062D\u0630\u064A\u0631\u0627\u062A:",
478
+ "directoryForm.minutes": "\u062F\u0642\u064A\u0642\u0629",
479
+ "directoryForm.namePlaceholder": "\u0645\u062B\u0627\u0644: \u062F\u0644\u064A\u0644 \u0627\u0644\u0634\u0631\u0643\u0629",
480
+ "directories.internal": "\u062F\u0627\u062E\u0644\u064A"
481
+ };
482
+
483
+ // src/areas/guard/texts/en.json
484
+ var en_default = {
485
+ "directories.title": "Directories",
486
+ "directories.subtitle": "User directories in precedence order. When two directories know the same username, the first active one owns it.",
487
+ "directories.add": "New directory",
488
+ "directories.empty": "No directories.",
489
+ "directories.signIn": "Sign-in",
490
+ "directories.lastSync": "Last sync",
491
+ "directories.syncNow": "Sync now",
492
+ "directories.moveUp": "Move {name} up",
493
+ "directories.moveDown": "Move {name} down",
494
+ "directories.connectorDisabled": "Connector plugin disabled",
495
+ "directories.pluginDisabledHint": "Plugin {plugin} is disabled",
496
+ "directories.synced": "Synced {name}: {added} added, {updated} updated, {deactivated} deactivated, {groups} groups, {memberships} memberships.",
497
+ "directories.syncFailed": "Sync of {name} failed: {error}",
498
+ "directories.internalType": "Internal (kept by {product})",
499
+ "directories.warnings": "{count, plural, one {A warning} other {# warnings}}",
500
+ "directoryDetail.notFound": "Directory not found",
501
+ "directoryDetail.back": "Back to directories",
502
+ "directoryDetail.order": "Order {order}",
503
+ "directoryDetail.signInEnabled": "Sign-in enabled",
504
+ "directoryDetail.signInDisabled": "Sign-in disabled",
505
+ "directoryDetail.connectorDisabled": "Connector plugin disabled",
506
+ "directoryDetail.testConnection": "Test connection",
507
+ "directoryDetail.syncNow": "Sync now",
508
+ "directoryDetail.connectionSucceeded": "Connection succeeded.",
509
+ "directoryDetail.connectionFailed": "Connection failed.",
510
+ "directoryDetail.found": "({users} users, {groups} groups found)",
511
+ "directoryDetail.syncCompleted": "Sync completed.",
512
+ "directoryDetail.syncFailed": "Sync failed: {error}",
513
+ "directoryDetail.deleteTitle": "Delete directory \u201C{name}\u201D?",
514
+ "directoryDetail.deleteDescription": "Its synced accounts and groups are removed.",
515
+ "directoryDetail.settings": "Settings",
516
+ "directoryDetail.saved": "Saved.",
517
+ "directoryDetail.summary": "Summary",
518
+ "directoryDetail.syncInterval": "Sync interval",
519
+ "directoryDetail.minutes": "{count, plural, one {# minute} other {# minutes}}",
520
+ "directoryDetail.onDemand": "On demand",
521
+ "directoryDetail.plugin": "Plugin",
522
+ "directoryDetail.builtIn": "Built in",
523
+ "directoryDetail.lastSync": "Last sync",
524
+ "directoryDetail.testLogin": "Test login",
525
+ "directoryDetail.testLoginHint": "Checks each step of signing in against this directory.",
526
+ "directoryDetail.runTest": "Run test",
527
+ "directoryDetail.testSteps": "Test login steps",
528
+ "directoryDetail.steps.Connection": "Connect to the directory",
529
+ "directoryDetail.steps.FindUser": "Find the user",
530
+ "directoryDetail.steps.Authenticate": "Verify the password",
531
+ "directoryDetail.steps.Precedence": "Directory owns this username (precedence)",
532
+ "directoryDetail.syncRuns": "Sync runs",
533
+ "directoryDetail.noRuns": "No sync runs yet.",
534
+ "directoryDetail.started": "Started",
535
+ "directoryDetail.finished": "Finished",
536
+ "directoryDetail.result": "Result",
537
+ "directoryDetail.added": "Added",
538
+ "directoryDetail.updated": "Updated",
539
+ "directoryDetail.deactivated": "Deactivated",
540
+ "directoryDetail.memberships": "Memberships",
541
+ "directoryDetail.error": "Error",
542
+ "directoryDetail.warningsTitle": "Its settings have warnings",
543
+ "directoryForm.name": "Name",
544
+ "directoryForm.type": "Type",
545
+ "directoryForm.selectType": "Select a type",
546
+ "directoryForm.typeFromPlugin": "{name} (plugin {plugin})",
547
+ "directoryForm.syncInterval": "Sync every",
548
+ "directoryForm.syncIntervalHint": "Empty = on request only",
549
+ "directoryForm.active": "Active",
550
+ "directoryForm.signInEnabled": "Allow sign-in",
551
+ "directoryForm.capabilities": "Capabilities: {list}",
552
+ "directoryForm.connectionSettings": "Connection settings",
553
+ "directoryForm.fillFromPreset": "Fill from preset",
554
+ "directoryForm.choosePreset": "Choose a preset",
555
+ "directoryForm.loadingPresets": "Loading presets",
556
+ "directoryForm.presetsUnavailable": "Presets unavailable: {error}",
557
+ "directoryForm.keepSecret": "Leave blank to keep the stored value",
558
+ "directoryForm.create": "Create directory",
559
+ "directoryForm.save": "Save changes",
560
+ "accounts.title": "Accounts",
561
+ "accounts.subtitle": "The accounts you may see. Your rules decide which directories are included.",
562
+ "accounts.create": "Create internal account",
563
+ "accounts.createTitle": "Create internal account",
564
+ "accounts.createHint": "Internal accounts live in the {product} directory and sign in with a password.",
565
+ "accounts.createSubmit": "Create account",
566
+ "accounts.created": "Account {username} created.",
567
+ "accounts.search": "Search accounts",
568
+ "accounts.searchPlaceholder": "Search username, name or email",
569
+ "accounts.allStatuses": "All statuses",
570
+ "accounts.empty": "No accounts match.",
571
+ "accountDetail.account": "Account",
572
+ "accountDetail.owningDirectory": "Owning directory",
573
+ "accountDetail.lock": "Lock",
574
+ "accountDetail.unlock": "Unlock",
575
+ "accountDetail.identities": "Identities ({count})",
576
+ "accountDetail.identitiesHint": "One row per directory that knows this username. The first active directory in precedence order wins; the others are shadowed.",
577
+ "accountDetail.noIdentities": "No directory identities.",
578
+ "accountDetail.externalId": "External ID",
579
+ "accountDetail.lastSynced": "Last synced",
580
+ "accountDetail.precedence": "Precedence",
581
+ "accountDetail.winning": "Winning",
582
+ "accountDetail.shadowed": "Shadowed",
583
+ "accountDetail.effectiveGroups": "Effective groups ({count})",
584
+ "accountDetail.noGroups": "Not a member of any group.",
585
+ "accountDetail.secondFactor.title": "Two-factor sign-in",
586
+ "accountDetail.secondFactor.asked": "Asked at sign-in",
587
+ "accountDetail.secondFactor.notAsked": "Not asked",
588
+ "accountDetail.secondFactor.mode": "From their groups",
589
+ "accountDetail.secondFactor.factors": "Set up",
590
+ "accountDetail.secondFactor.none": "Nothing set up",
591
+ "accountDetail.secondFactor.recoveryLeft": "Recovery codes left",
592
+ "accountDetail.secondFactor.reset": "Reset two-factor sign-in",
593
+ "accountDetail.secondFactor.resetTitle": "Reset {name}'s two-factor sign-in?",
594
+ "accountDetail.secondFactor.resetHint": "Their authenticator apps and recovery codes stop working. If a group of theirs requires a second factor, they set one up again at their next sign-in. Do this only once you're sure it's really them asking.",
595
+ "accountDetail.secondFactor.resetDone": "Two-factor sign-in reset.",
596
+ "accountName.change": "Change",
597
+ "accountName.label": "Display name",
598
+ "accountName.save": "Save name",
599
+ "accountName.cancel": "Cancel",
600
+ "accountName.saved": "The name is {name} now, wherever it shows.",
601
+ "accountName.languagesHint": "Give your name in each of the site's languages: people reading in that language see it. The English one is kept in history.",
602
+ "groups.title": "Groups",
603
+ "groups.subtitle": "Local groups are created in {product}; synced groups come from a directory. Groups can contain other groups.",
604
+ "groups.create": "Create group",
605
+ "groups.created": "Group {name} created.",
606
+ "groups.searchPlaceholder": "Search groups",
607
+ "groups.allDirectories": "All directories",
608
+ "groups.empty": "No groups match.",
609
+ "groups.local": "Local",
610
+ "groups.synced": "Synced",
611
+ "groups.readOnly": "Read-only",
612
+ "groups.directMembers": "Direct members",
613
+ "groups.memberGroups": "Member groups",
614
+ "groups.directoryHint": "Defaults to the internal directory.",
615
+ "groups.internalDefault": "Internal (default)",
616
+ "groups.kind": "Kind",
617
+ "groups.kindHint": "An organization is a group customers belong to, by hand or by their email\u2019s domain.",
618
+ "groups.kinds.standard": "Group",
619
+ "groups.kinds.directory": "Everyone in a directory",
620
+ "groups.kinds.ou": "OU",
621
+ "groups.kinds.organization": "Organization",
622
+ "groups.domains": "Email domains",
623
+ "groups.domainsHint": "People whose email is in one of these domains join it (acme.com). Separate them with commas.",
624
+ "groupDetail.delete": "Delete group",
625
+ "groupDetail.deleteTitle": "Delete group \u201C{name}\u201D?",
626
+ "groupDetail.writable": "Writable",
627
+ "groupDetail.directMembers": "Direct members ({count})",
628
+ "groupDetail.noMembers": "No direct members.",
629
+ "groupDetail.fromDirectory": "Directory",
630
+ "groupDetail.manual": "Manual",
631
+ "groupDetail.remove": "Remove",
632
+ "groupDetail.memberOf": "Member of ({count})",
633
+ "groupDetail.notNested": "Not nested in any group.",
634
+ "groupDetail.nestedGroups": "Nested groups",
635
+ "groupDetail.readOnlyNotice": "This group is read-only in {product}: its members come from directory sync.",
636
+ "groupDetail.effectiveMembers": "Effective members ({count})",
637
+ "groupDetail.noEffectiveMembers": "No accounts reach this group.",
638
+ "groupDetail.addMember": "Add member",
639
+ "groupDetail.searchMembers": "Search accounts or groups",
640
+ "groupDetail.noMatches": "No matches.",
641
+ "groupDetail.alreadyMember": "Already a member",
642
+ "groupDetail.add": "Add",
643
+ "groupDetail.accountCount": "{count, plural, one {# account} other {# accounts}}",
644
+ "groupDetail.expand": "Expand {name}",
645
+ "groupDetail.collapse": "Collapse {name}",
646
+ "groupDetail.cycle": "Cycle",
647
+ "groupDetail.loadingTree": "Loading",
648
+ "groupDetail.byDomain": "By email domain",
649
+ "groupDetail.fromImport": "From an import",
650
+ "groupDetail.directoryNotice": "{product} puts everyone whose account comes from this directory in this group. Grant it a role to give it to the whole directory, or nest it in another group.",
651
+ "groupDetail.ouNotice": "Everyone under this OU in the directory, at any depth, from the last sync. Change the OUs in the directory\u2019s settings.",
652
+ "groupDetail.organization": "Organization",
653
+ "groupDetail.organizationHint": "Customers in an organization can share their requests with each other where a request type allows it.",
654
+ "groupDetail.attributes": "Attributes",
655
+ "groupDetail.attributesHint": "One per line: name = value (customer number = 1042).",
656
+ "groupDetail.organizationSaved": "Organization saved.",
657
+ "groupDetail.saveOrganization": "Save organization",
658
+ "groupDetail.twoFactor.title": "Two-factor sign-in",
659
+ "groupDetail.twoFactor.hint": "Whether members are asked for a second factor. Each person follows the strictest of all their groups, nested ones too.",
660
+ "groupDetail.twoFactor.modes.off": "Off",
661
+ "groupDetail.twoFactor.modes.optional": "Offered",
662
+ "groupDetail.twoFactor.modes.required": "Required",
663
+ "groupDetail.twoFactor.modes.strong": "Strong",
664
+ "groupDetail.twoFactor.modeHints.off": "Members aren't asked, unless they set one up themselves.",
665
+ "groupDetail.twoFactor.modeHints.optional": "Offered at sign-in and never asked; members who set one up are asked.",
666
+ "groupDetail.twoFactor.modeHints.required": "Members set up a second factor and enter a code at every sign-in.",
667
+ "groupDetail.twoFactor.modeHints.strong": "As Required, and only with an authenticator app, not codes by email or SMS.",
668
+ "groupDetail.twoFactor.saved": "Two-factor sign-in for {name}: {mode}.",
669
+ "groupDetail.twoFactor.pill": "Two-factor: {mode}",
670
+ "groupDetail.names": "Name in each language",
671
+ "groupDetail.namesHint": "People reading in a language see the group's name in it. The English one is kept in history and by the directory.",
672
+ "groupDetail.saveNames": "Save names",
673
+ "signUpSettings.title": "Sign-up",
674
+ "signUpSettings.subtitle": "Whether people may create their own accounts. They confirm their email first; what they may use is up to the roles you grant.",
675
+ "signUpSettings.enabled": "People can create their own accounts",
676
+ "signUpSettings.directory": "New accounts go to",
677
+ "signUpSettings.directoryHint": "Sign-ups are created in this internal directory. Add one such as Customers under Directories.",
678
+ "signUpSettings.directoryHintPlain": "Sign-ups are created in this internal directory.",
679
+ "signUpSettings.chooseDirectory": "Choose a directory",
680
+ "signUpSettings.domains": "Allowed email domains",
681
+ "signUpSettings.grantHint": "To give sign-ups a project, grant its Customer role to the group {group} in the project\u2019s members.",
682
+ "signUpSettings.saved": "Sign-up saved.",
683
+ "anonymousAccess.title": "Anonymous access",
684
+ "anonymousAccess.subtitle": "Every role given to anonymous visitors. Anyone on the internet gets these, so keep them few.",
685
+ "anonymousAccess.role": "Role",
686
+ "anonymousAccess.scope": "Where",
687
+ "anonymousAccess.since": "Since",
688
+ "anonymousAccess.revoke": "Remove role",
689
+ "anonymousAccess.revokeTitle": "Remove {role} in {scope} from anonymous visitors?",
690
+ "anonymousAccess.revoked": "Role removed.",
691
+ "merge.mergeInto": "Merge into another account",
692
+ "merge.pageTitle": "Merge into another account",
693
+ "merge.pageHint": "Everything {username} did, owns or is named in moves to the account you choose: records, comments, history, grants, groups, views, dashboards, subscriptions and what plugins keep. {username} stays, inactive, and can't sign in.",
694
+ "merge.alreadyMerged": "This account was merged into {survivor} already.",
695
+ "merge.chooseTitle": "The account that stays",
696
+ "merge.chooseHint": "Usually the person's real account: the one they sign in with.",
697
+ "merge.survivor": "Merge into",
698
+ "merge.searchPlaceholder": "Search by username, name or email",
699
+ "merge.searching": "Searching\u2026",
700
+ "merge.noMatches": "No account matches.",
701
+ "merge.sourceTitle": "Goes",
702
+ "merge.sourceHint": "Stays as an inactive account, merged into the other.",
703
+ "merge.survivorTitle": "Stays",
704
+ "merge.survivorHint": "Gets everything.",
705
+ "merge.previewTitle": "What moves",
706
+ "merge.previewHint": "Counted now; {product}'s own modules move in one transaction, plugins right after.",
707
+ "merge.nothing": "Nothing to move.",
708
+ "merge.pluginError": "This plugin couldn't say: {error}",
709
+ "merge.confirmTitle": "Merge",
710
+ "merge.activeWarning": "{username} can sign in. After the merge it can't: its owner signs in with the other account.",
711
+ "merge.activeOtherDirectory": "{username} can sign in, from another directory. After the merge it can't: its owner signs in with the other account. Merge only if they're the same person.",
712
+ "merge.typeUsername": "Type {username} to confirm",
713
+ "merge.noUndo": "A merge can't be undone. It's recorded on both accounts.",
714
+ "merge.mergeButton": "Merge {source} into {survivor}",
715
+ "merge.merged": "{source} merged into {survivor}.",
716
+ "merge.mergedIncomplete": "{source} merged into {survivor}, but a plugin didn't finish: resume it from the account's merges.",
717
+ "merge.mergedBanner": "This account was merged into <survivor></survivor>: its work, rights and addresses are there now. It can't sign in.",
718
+ "merge.title": "Merges ({count})",
719
+ "merge.hint": "Accounts merged into this one, or this one into another. Nothing here can be undone.",
720
+ "merge.none": "No merges.",
721
+ "merge.when": "When",
722
+ "merge.what": "What",
723
+ "merge.who": "By",
724
+ "merge.moved": "What moved",
725
+ "merge.state": "State",
726
+ "merge.done": "Done",
727
+ "merge.incomplete": "Incomplete",
728
+ "merge.resume": "Resume",
729
+ "merge.someone": "An administrator",
730
+ "merge.mergedInto": "Merged into <survivor></survivor>",
731
+ "merge.mergedFrom": "<source></source> ({name}) merged into this account",
732
+ "merge.reason.admin": "By an administrator",
733
+ "merge.reason.sign-up": "Automatic: signed up",
734
+ "merge.reason.confirmed-address": "Automatic: confirmed their address",
735
+ "merge.reason.account-created": "Automatic: account created",
736
+ "merge.reason.directory-sync": "Automatic: directory sync",
737
+ "merge.reason.address-added": "Automatic: address added",
738
+ "merge.step.failed": "failed",
739
+ "merge.step.pending": "not finished",
740
+ "merge.step.off": "off",
741
+ "merge.plugin": "Plugin {key}",
742
+ "merge.part.guard": "Accounts and permissions",
743
+ "merge.count.grants": "{count, plural, one {# role grant} other {# role grants}}",
744
+ "merge.count.memberships": "{count, plural, one {# group membership} other {# group memberships}}",
745
+ "merge.count.addresses": "{count, plural, one {# address} other {# addresses}}",
746
+ "merge.count.tokens": "{count, plural, one {# access token revoked} other {# access tokens revoked}}",
747
+ "duplicates.title": "Possible duplicates ({count})",
748
+ "duplicates.hint": "Accounts that share an address: often one person twice, such as someone a Jira import couldn't match. Merge them to make one.",
749
+ "duplicates.address": "Address",
750
+ "duplicates.accounts": "Accounts",
751
+ "duplicates.merge": "Merge",
752
+ "duplicates.mergeInto": "Merge {source} into {survivor}",
753
+ "addresses.title": "Email addresses ({count})",
754
+ "addresses.adminHint": "Every confirmed address finds this account: mail in, participants, sign-up and organizations by domain. Addresses you add are confirmed at once; mail goes to the one chosen.",
755
+ "addresses.selfHint": "Every confirmed address finds your account: mail you send in, requests shared with you, organizations by domain. We mail a link to each address you add; it counts once you follow it.",
756
+ "addresses.address": "Address",
757
+ "addresses.from": "From",
758
+ "addresses.source.directory": "Directory",
759
+ "addresses.source.admin": "Added by an administrator",
760
+ "addresses.source.person": "Added by its owner",
761
+ "addresses.source.merge": "From a merged account",
762
+ "addresses.state": "State",
763
+ "addresses.confirmed": "Confirmed",
764
+ "addresses.waiting": "Waiting for the link",
765
+ "addresses.addedAt": "Added",
766
+ "addresses.mail": "Mail",
767
+ "addresses.mailGoesHere": "Mail goes here",
768
+ "addresses.sendHere": "Send mail here",
769
+ "addresses.remove": "Remove",
770
+ "addresses.removeLabel": "Remove {email}",
771
+ "addresses.none": "No addresses.",
772
+ "addresses.placeholder": "someone@example.com",
773
+ "addresses.newAddress": "New address",
774
+ "addresses.add": "Add address",
775
+ "addresses.addAndSend": "Add and send link",
776
+ "addresses.addedToast": "{email} added and confirmed.",
777
+ "addresses.linkSent": "We sent a link to {email}. It counts once you follow it.",
778
+ "addresses.verifyTitle": "Confirm an address",
779
+ "addresses.verified": "{email} is confirmed for {username}.",
780
+ "addresses.toAccount": "Go to your account",
781
+ "addresses.primary": "Primary",
782
+ "addresses.makePrimary": "Make primary",
783
+ "addresses.makePrimaryLabel": "Make {email} the primary address",
784
+ "addresses.primaryChanged": "{email} is the primary address now. The one before stays confirmed, and was told.",
785
+ "addresses.fromDirectory": "The name and primary address come from {directory}: change them there, and the next sync brings them here.",
786
+ "status.account.Active": "Active",
787
+ "status.account.Inactive": "Inactive",
788
+ "status.account.Locked": "Locked",
789
+ "status.plugin.Enabled": "Enabled",
790
+ "status.plugin.Disabled": "Disabled",
791
+ "status.plugin.Installed": "Installed",
792
+ "status.plugin.Failed": "Failed",
793
+ "status.check.notRun": "Not run",
794
+ "status.check.pass": "Pass",
795
+ "status.check.fail": "Fail",
796
+ "status.sync.running": "Running",
797
+ "status.sync.succeeded": "Succeeded",
798
+ "status.sync.failed": "Failed",
799
+ "status.sync.never": "Never synced",
800
+ "common.account": "Account",
801
+ "common.actions": "Actions",
802
+ "common.active": "Active",
803
+ "common.cancel": "Cancel",
804
+ "common.delete": "Delete",
805
+ "common.description": "Description",
806
+ "common.direct": "Direct",
807
+ "common.directory": "Directory",
808
+ "common.disabled": "Disabled",
809
+ "common.displayName": "Display name",
810
+ "common.email": "Email",
811
+ "common.enabled": "Enabled",
812
+ "common.group": "Group",
813
+ "common.groups": "Groups",
814
+ "common.inactive": "Inactive",
815
+ "common.lastSignIn": "Last sign-in",
816
+ "common.membership": "Membership",
817
+ "common.name": "Name",
818
+ "common.nested": "Nested",
819
+ "common.no": "No",
820
+ "common.optional": "(optional)",
821
+ "common.order": "Order",
822
+ "common.password": "Password",
823
+ "common.path": "Path",
824
+ "common.product": "{product}",
825
+ "common.source": "Source",
826
+ "common.status": "Status",
827
+ "common.type": "Type",
828
+ "common.unknownError": "unknown error",
829
+ "common.username": "Username",
830
+ "common.users": "Users",
831
+ "common.yes": "Yes",
832
+ "nav.accounts": "Accounts",
833
+ "nav.groups": "Groups",
834
+ "nav.directories": "Directories",
835
+ "nav.signup": "Sign-up",
836
+ "nav.anonymous": "Anonymous access",
837
+ "secondFactor.disabled": "This site's operator has switched two-factor sign-in off for now: nobody is asked for a code.",
838
+ "secondFactor.kinds.app": "Authenticator app",
839
+ "secondFactor.kinds.email": "email",
840
+ "secondFactor.kinds.sms": "SMS",
841
+ "secondFactor.kinds.whatsapp": "WhatsApp",
842
+ "secondFactor.kinds.passkey": "Passkey",
843
+ "secondFactor.title": "Two-factor sign-in",
844
+ "secondFactor.panelHint": "A passkey, or a code from an app on your phone, after your password, so a stolen password alone doesn't get anyone in.",
845
+ "secondFactor.on": "On",
846
+ "secondFactor.off": "Off",
847
+ "secondFactor.modeHint.off": "Your groups don't ask for a second factor. Set one up and you'll be asked for it at every sign-in.",
848
+ "secondFactor.modeHint.optional": "Your groups offer a second factor. Set one up and you'll be asked for it at every sign-in.",
849
+ "secondFactor.modeHint.required": "Your groups require a second factor at every sign-in.",
850
+ "secondFactor.modeHint.strong": "Your groups require a second factor at every sign-in, from an authenticator app.",
851
+ "secondFactor.added": "Added",
852
+ "secondFactor.lastUsed": "Last used",
853
+ "secondFactor.never": "Not yet",
854
+ "secondFactor.none": "No second factor set up yet.",
855
+ "secondFactor.remove": "Remove",
856
+ "secondFactor.removeTitle": "Remove this authenticator app?",
857
+ "secondFactor.removeHint": "Its codes stop working. With no second factor left, your recovery codes stop working too.",
858
+ "secondFactor.removed": "Authenticator app removed.",
859
+ "secondFactor.setUp": "Set up an authenticator app",
860
+ "secondFactor.addAnother": "Add another authenticator app",
861
+ "secondFactor.recoveryLeft": "{count, plural, =0 {No recovery codes left} one {# recovery code left} other {# recovery codes left}}",
862
+ "secondFactor.renew": "New recovery codes",
863
+ "secondFactor.renewTitle": "Make new recovery codes?",
864
+ "secondFactor.renewHint": "Your old recovery codes stop working.",
865
+ "secondFactor.setup.scan": "Scan this QR code with an authenticator app, such as Microsoft Authenticator, Google Authenticator or 1Password.",
866
+ "secondFactor.setup.qrAlt": "QR code for your authenticator app",
867
+ "secondFactor.setup.cantScan": "Can't scan it? Enter this key in the app instead:",
868
+ "secondFactor.setup.onThisDevice": "Open in an authenticator app on this device",
869
+ "secondFactor.setup.code": "Code from the app",
870
+ "secondFactor.setup.codeHint": "The six digits the app shows now.",
871
+ "secondFactor.setup.verify": "Verify",
872
+ "secondFactor.setup.wrongCode": "That code didn't match. Check the time on your phone, and enter the code the app shows now.",
873
+ "secondFactor.setup.cancel": "Cancel",
874
+ "secondFactor.setup.done": "Authenticator app set up.",
875
+ "secondFactor.recovery.title": "Your recovery codes",
876
+ "secondFactor.recovery.hint": "Each code signs you in once if you lose your phone. Keep them somewhere safe: they won't be shown again.",
877
+ "secondFactor.recovery.copy": "Copy",
878
+ "secondFactor.recovery.download": "Download",
879
+ "secondFactor.recovery.copied": "Recovery codes copied.",
880
+ "secondFactor.recovery.copyFailed": "Couldn't copy: select them and copy them yourself.",
881
+ "secondFactor.recovery.saved": "I've saved them",
882
+ "secondFactor.recovery.fileHeader": "Recovery codes for {site}. Each signs you in once.",
883
+ "secondFactor.alsoBy": "You can also get a code by {list}.",
884
+ "secondFactor.addPasskey": "Add a passkey",
885
+ "secondFactor.passkeyHint": "Name it after the device, then follow its prompt.",
886
+ "secondFactor.passkeyName": "Name for this passkey",
887
+ "secondFactor.passkeyNameDefault": "Passkey",
888
+ "secondFactor.passkeyCreate": "Create the passkey",
889
+ "secondFactor.passkeyAdded": "Passkey added.",
890
+ "secondFactor.passkeyCancelled": "The passkey wasn't created.",
891
+ "secondFactor.passkeyRemoved": "Passkey removed.",
892
+ "secondFactor.removePasskeyTitle": "Remove this passkey?",
893
+ "secondFactor.removePasskeyHint": "It stops working for signing in and confirming it's you.",
894
+ "secondFactor.rename": "Rename",
895
+ "secondFactor.renameTitle": "Rename this passkey",
896
+ "secondFactor.save": "Save",
897
+ "secondFactor.cancel": "Cancel",
898
+ "secondFactor.required.title": "Set up a passkey or an authenticator app",
899
+ "secondFactor.required.by": "Site admins need one. Set it up by {date}; after that, signing in asks you to first.",
900
+ "secondFactor.required.overdue": "Site admins need one, and the date has passed: set it up now.",
901
+ "secondFactor.required.setUp": "Set it up",
902
+ "signUpSettings.off": "Sign-up is off. Only admins create accounts, from Accounts.",
903
+ "signUpSettings.directoryRequired": "Choose where new accounts go.",
904
+ "signUpSettings.anyDomain": "Any domain. Anyone with an email can sign up.",
905
+ "signUpSettings.addDomain": "Add domain",
906
+ "signUpSettings.add": "Add",
907
+ "signUpSettings.removeDomain": "Remove {domain}",
908
+ "signUpSettings.domainInvalid": "Enter a domain such as acme.com.",
909
+ "signUpSettings.domainTwice": "{domain} is in the list already.",
910
+ "signUpSettings.emptyTitle": "Sign-up is off",
911
+ "signUpSettings.emptyText": "Only admins can add people now. You can let people sign themselves up.",
912
+ "signUpSettings.turnOn": "Turn on sign-up",
913
+ "anonymousAccess.giveRole": "Give a role",
914
+ "anonymousAccess.dialogTitle": "Give anonymous visitors a role",
915
+ "anonymousAccess.changeTitle": "Change the role anonymous visitors have in {scope}",
916
+ "anonymousAccess.chooseRole": "Choose a role",
917
+ "anonymousAccess.chooseWhere": "Choose where",
918
+ "anonymousAccess.warning": "Anyone on the internet gets this role, without signing in.",
919
+ "anonymousAccess.who": "Anonymous visitors",
920
+ "anonymousAccess.can": "Can",
921
+ "anonymousAccess.give": "Give role",
922
+ "anonymousAccess.change": "Change role",
923
+ "anonymousAccess.given": "Role given.",
924
+ "anonymousAccess.changed": "Role changed.",
925
+ "anonymousAccess.emptyTitle": "Anonymous visitors have no roles",
926
+ "anonymousAccess.emptyText": "People must sign in to see anything.",
927
+ "anonymousAccess.tableLabel": "Roles for anonymous visitors",
928
+ "anonymousAccess.actions": "Actions",
929
+ "anonymousAccess.menuLabel": "Actions for {role} in {scope}",
930
+ "anonymousAccess.notListed": "This place doesn't offer roles to anonymous visitors now. Remove the role instead.",
931
+ "anonymousAccess.emptyTextNoPlaces": "People must sign in to see anything. Nothing on this site can be opened to anonymous visitors yet.",
932
+ "anonymousAccess.placeWithCode": "{place} \xB7 {code}",
933
+ "directories.priority": "Priority",
934
+ "directories.on": "On",
935
+ "directories.off": "Off",
936
+ "directories.menuLabel": "Actions for {name}",
937
+ "directories.edit": "Edit",
938
+ "directories.openPage": "Open its page",
939
+ "directories.deactivate": "Deactivate",
940
+ "directories.activate": "Activate",
941
+ "directories.newTitle": "New directory",
942
+ "directories.editTitle": "Edit directory",
943
+ "directories.deleteDirectory": "Delete directory",
944
+ "directories.namePreview": "Directory name",
945
+ "directories.sync": "Sync",
946
+ "directories.syncEvery": "{count, plural, one {Every minute} other {Every # minutes}}",
947
+ "directories.onRequest": "On request only",
948
+ "directories.savedWithWarnings": "{name} is saved. Its settings have warnings:",
949
+ "directoryForm.minutes": "minutes",
950
+ "directoryForm.namePlaceholder": "e.g. Company directory",
951
+ "directories.internal": "Internal"
952
+ };
953
+
954
+ // src/areas/guard/texts.ts
955
+ var useGuardTexts = createAreaTexts("guard", { en: en_default, ar: ar_default });
956
+ function useGuardNs(namespace) {
957
+ const t = useGuardTexts();
958
+ return useCallback((key, values) => t(`${namespace}.${key}`, values), [t, namespace]);
959
+ }
960
+ function withParts(text, parts) {
961
+ const pieces = text.split(/<(\w+)><\/\1>/);
962
+ return createElement(Fragment, null, ...pieces.map((piece, i) => i % 2 === 0 ? piece : createElement(Fragment, { key: i }, parts[piece] ?? null)));
963
+ }
964
+
965
+ // src/areas/guard/AccountEmailsPanel.tsx
966
+ import { jsx, jsxs } from "react/jsx-runtime";
967
+ function AccountEmailsPanel({ addresses, base, canEdit, onChange }) {
968
+ const t = useGuardNs("addresses");
969
+ const fmt = useFormatters();
970
+ const request = useAreaRequest("guard");
971
+ const action = useApiAction();
972
+ const [email, setEmail] = useState("");
973
+ const self = base === "/me";
974
+ const rows = [
975
+ ...addresses.directoryEmail ? [{ id: "directory", email: addresses.directoryEmail, source: "directory", verified: true, mailGoesHere: addresses.directoryMailGoesHere, addedAt: null }] : [],
976
+ ...(addresses.addresses ?? []).map((a) => ({
977
+ id: a.id,
978
+ email: a.email,
979
+ source: a.source,
980
+ verified: a.verifiedAt != null,
981
+ mailGoesHere: a.mailGoesHere,
982
+ addedAt: a.addedAt ?? null
983
+ }))
984
+ ];
985
+ async function add(e) {
986
+ e.preventDefault();
987
+ const added = email.trim();
988
+ const updated = await action.run(() => request(`${base}/emails`, { method: "POST", body: { email: added } }));
989
+ if (updated) {
990
+ setEmail("");
991
+ onChange(updated);
992
+ notify.success(self ? t("linkSent", { email: added }) : t("addedToast", { email: added }));
993
+ }
994
+ }
995
+ async function mailTo(row) {
996
+ const updated = await action.run(
997
+ () => request(`${base}/mail-to`, { method: "PUT", body: { email: row.source === "directory" ? null : row.email } })
998
+ );
999
+ if (updated) onChange(updated);
1000
+ }
1001
+ async function primary(row) {
1002
+ const updated = await action.run(() => request(`${base}/emails/${row.id}/primary`, { method: "POST" }));
1003
+ if (updated) {
1004
+ onChange(updated);
1005
+ notify.success(t("primaryChanged", { email: row.email }));
1006
+ }
1007
+ }
1008
+ async function remove(row) {
1009
+ const updated = await action.run(() => request(`${base}/emails/${row.id}`, { method: "DELETE" }));
1010
+ if (updated) onChange(updated);
1011
+ }
1012
+ const columns = [
1013
+ {
1014
+ id: "email",
1015
+ header: t("address"),
1016
+ sortValue: (r) => r.email,
1017
+ cell: (r) => /* @__PURE__ */ jsx(Text, { as: "span", fontWeight: r.mailGoesHere ? "medium" : void 0, dir: "ltr", wordBreak: "break-all", children: r.email })
1018
+ },
1019
+ { id: "source", header: t("from"), sortValue: (r) => r.source, cell: (r) => t(`source.${r.source}`) },
1020
+ {
1021
+ id: "state",
1022
+ header: t("state"),
1023
+ sortValue: (r) => r.verified ? 0 : 1,
1024
+ cell: (r) => r.verified ? /* @__PURE__ */ jsx(StatusPill, { tone: "success", children: t("confirmed") }) : /* @__PURE__ */ jsx(StatusPill, { tone: "warning", children: t("waiting") })
1025
+ },
1026
+ { id: "added", header: t("addedAt"), nowrap: true, sortValue: (r) => r.addedAt ? new Date(r.addedAt) : null, cell: (r) => fmt.dateTime(r.addedAt) },
1027
+ {
1028
+ id: "mail",
1029
+ header: t("mail"),
1030
+ cell: (r) => r.mailGoesHere ? /* @__PURE__ */ jsx(StatusPill, { tone: "info", children: t("mailGoesHere") }) : canEdit && r.verified ? /* @__PURE__ */ jsx(Button, { size: "sm", onClick: () => mailTo(r), disabled: action.busy, children: t("sendHere") }) : null
1031
+ },
1032
+ {
1033
+ id: "actions",
1034
+ header: "",
1035
+ cell: (r) => r.source === "directory" ? addresses.correctable ? /* @__PURE__ */ jsx(StatusPill, { tone: "accent", children: t("primary") }) : null : canEdit ? /* @__PURE__ */ jsxs(HStack, { gap: "2", justify: "flex-end", children: [
1036
+ addresses.correctable && r.verified && /* @__PURE__ */ jsx(Button, { size: "sm", onClick: () => primary(r), disabled: action.busy, "aria-label": t("makePrimaryLabel", { email: r.email }), children: t("makePrimary") }),
1037
+ /* @__PURE__ */ jsx(Button, { size: "sm", danger: true, onClick: () => remove(r), disabled: action.busy, "aria-label": t("removeLabel", { email: r.email }), children: t("remove") })
1038
+ ] }) : null
1039
+ }
1040
+ ];
1041
+ return /* @__PURE__ */ jsx(Panel, { title: t("title", { count: rows.length }), description: self ? t("selfHint") : t("adminHint"), "data-testid": "addresses", children: /* @__PURE__ */ jsxs(Stack, { gap: "field", children: [
1042
+ /* @__PURE__ */ jsx(InlineAlert, { tone: "danger", children: action.error }),
1043
+ !addresses.correctable && addresses.directory && /* @__PURE__ */ jsx(Text, { textStyle: "caption", color: "fg.muted", children: t("fromDirectory", { directory: addresses.directory }) }),
1044
+ /* @__PURE__ */ jsx(DataTable, { "aria-label": t("title", { count: rows.length }), size: "sm", columns, rows, getRowId: (r) => r.id, empty: t("none") }),
1045
+ canEdit && /* @__PURE__ */ jsx("form", { onSubmit: add, children: /* @__PURE__ */ jsxs(HStack, { gap: "2", align: "flex-end", wrap: "wrap", children: [
1046
+ /* @__PURE__ */ jsx(
1047
+ Input,
1048
+ {
1049
+ type: "email",
1050
+ value: email,
1051
+ onChange: (e) => setEmail(e.target.value),
1052
+ placeholder: t("placeholder"),
1053
+ "aria-label": t("newAddress"),
1054
+ maxW: "sm",
1055
+ dir: "ltr"
1056
+ }
1057
+ ),
1058
+ /* @__PURE__ */ jsx(Button, { type: "submit", loading: action.busy, disabled: !email.trim(), children: self ? t("addAndSend") : t("add") })
1059
+ ] }) })
1060
+ ] }) });
1061
+ }
1062
+
1063
+ // src/areas/guard/AccountNameEditor.tsx
1064
+ import { useState as useState2 } from "react";
1065
+ import { HStack as HStack2, Text as Text2 } from "@chakra-ui/react";
1066
+ import { Button as Button2, notify as notify2, TranslatedInput, useApiAction as useApiAction2, useAreaRequest as useAreaRequest2 } from "@abpjs/ui";
1067
+
1068
+ // src/areas/guard/names.ts
1069
+ import { useCallback as useCallback2 } from "react";
1070
+ import { useAbpLocale, useHostLanguages } from "@abpjs/ui";
1071
+ import { languageChain, pickName } from "@abpjs/ui/rules";
1072
+ function useWrittenName() {
1073
+ const { locale } = useAbpLocale();
1074
+ const languages = useHostLanguages();
1075
+ const fallback = languages[0]?.code;
1076
+ return useCallback2(
1077
+ (name, names) => pickName(languageChain(locale, fallback), { ...names ?? {}, en: name }, name),
1078
+ [locale, fallback]
1079
+ );
1080
+ }
1081
+
1082
+ // src/areas/guard/AccountNameEditor.tsx
1083
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
1084
+ function AccountNameEditor({ name, names, base, correctable, onRenamed }) {
1085
+ const t = useGuardNs("accountName");
1086
+ const written = useWrittenName();
1087
+ const request = useAreaRequest2("guard");
1088
+ const action = useApiAction2();
1089
+ const [editing, setEditing] = useState2(false);
1090
+ const start = () => ({ ...names ?? {}, en: name });
1091
+ const [value, setValue] = useState2(start);
1092
+ const typed = (value.en ?? "").trim();
1093
+ const others = (v) => Object.fromEntries(Object.entries(v).filter(([code, n]) => code !== "en" && n && n.trim()).map(([code, n]) => [code, n.trim()]));
1094
+ const unchanged = typed === name && JSON.stringify(others(value)) === JSON.stringify(others(names ?? {}));
1095
+ async function save(e) {
1096
+ e.preventDefault();
1097
+ const saved = await action.run(
1098
+ () => request(`${base}/name`, {
1099
+ method: "PUT",
1100
+ body: { displayName: typed, displayNames: others(value) }
1101
+ })
1102
+ );
1103
+ if (saved) {
1104
+ setEditing(false);
1105
+ onRenamed(saved.displayName);
1106
+ notify2.success(t("saved", { name: written(saved.displayName, saved.displayNames) }));
1107
+ }
1108
+ }
1109
+ if (!editing) {
1110
+ return /* @__PURE__ */ jsxs2(HStack2, { gap: "2", children: [
1111
+ /* @__PURE__ */ jsx2(Text2, { as: "span", children: written(name, names) }),
1112
+ correctable && /* @__PURE__ */ jsx2(
1113
+ Button2,
1114
+ {
1115
+ size: "xs",
1116
+ variant: "ghost",
1117
+ onClick: () => {
1118
+ setValue(start());
1119
+ setEditing(true);
1120
+ },
1121
+ children: t("change")
1122
+ }
1123
+ )
1124
+ ] });
1125
+ }
1126
+ return /* @__PURE__ */ jsxs2("form", { onSubmit: save, children: [
1127
+ /* @__PURE__ */ jsxs2(HStack2, { gap: "2", wrap: "wrap", align: "start", children: [
1128
+ /* @__PURE__ */ jsx2(TranslatedInput, { size: "sm", value, onChange: setValue, fallback: name, "aria-label": t("label"), suggest: false, autoFocus: true }),
1129
+ /* @__PURE__ */ jsx2(Button2, { size: "sm", type: "submit", loading: action.busy, disabled: !typed || unchanged, children: t("save") }),
1130
+ /* @__PURE__ */ jsx2(Button2, { size: "sm", variant: "ghost", onClick: () => setEditing(false), children: t("cancel") }),
1131
+ action.error && /* @__PURE__ */ jsx2(Text2, { as: "span", textStyle: "caption", color: "fg.error", children: action.error })
1132
+ ] }),
1133
+ /* @__PURE__ */ jsx2(Text2, { textStyle: "caption", color: "fg.muted", mt: "1", children: t("languagesHint") })
1134
+ ] });
1135
+ }
1136
+
1137
+ // src/areas/guard/AccountScreen.tsx
1138
+ import { HStack as HStack5, Stack as Stack4, Text as Text6 } from "@chakra-ui/react";
1139
+ import {
1140
+ AppLink as AppLink2,
1141
+ Button as Button5,
1142
+ DataTable as DataTable3,
1143
+ EMPTY_VALUE as EMPTY_VALUE2,
1144
+ HostSlot,
1145
+ InlineAlert as InlineAlert4,
1146
+ Loading,
1147
+ PageHeader,
1148
+ Panel as Panel4,
1149
+ PathChips,
1150
+ PropertyList as PropertyList2,
1151
+ RecordKey,
1152
+ StatusPill as StatusPill5,
1153
+ TextSlot,
1154
+ useApiAction as useApiAction5,
1155
+ useApiQuery as useApiQuery2,
1156
+ useAreaRequest as useAreaRequest5,
1157
+ useFormatters as useFormatters4,
1158
+ useMe,
1159
+ useNavigate
1160
+ } from "@abpjs/ui";
1161
+
1162
+ // src/areas/guard/AccountSecondFactorPanel.tsx
1163
+ import { HStack as HStack3, Text as Text3 } from "@chakra-ui/react";
1164
+ import { Button as Button3, EMPTY_VALUE, InlineAlert as InlineAlert2, notify as notify3, Panel as Panel2, PropertyList, StatusPill as StatusPill2, useApiAction as useApiAction3, useApiQuery, useAreaRequest as useAreaRequest3, useConfirm } from "@abpjs/ui";
1165
+
1166
+ // src/areas/guard/types.ts
1167
+ var num = (value) => value == null || value === "" ? 0 : typeof value === "number" ? value : Number(value);
1168
+
1169
+ // src/areas/guard/AccountSecondFactorPanel.tsx
1170
+ import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
1171
+ function AccountSecondFactorPanel({ accountId, name, canReset }) {
1172
+ const t = useGuardNs("accountDetail.secondFactor");
1173
+ const tf = useGuardNs("groupDetail.twoFactor");
1174
+ const ts = useGuardNs("secondFactor");
1175
+ const confirm = useConfirm();
1176
+ const request = useAreaRequest3("guard");
1177
+ const state = useApiQuery("guard", `/accounts/${accountId}/second-factors`);
1178
+ const action = useApiAction3();
1179
+ const data = state.data;
1180
+ const factors = data?.factors ?? [];
1181
+ async function reset() {
1182
+ if (!await confirm({ title: t("resetTitle", { name }), description: t("resetHint"), confirmLabel: t("reset"), danger: true })) return;
1183
+ const ok = await action.run(async () => {
1184
+ await request(`/accounts/${accountId}/second-factors`, { method: "DELETE" });
1185
+ return true;
1186
+ });
1187
+ if (ok) {
1188
+ notify3.success(t("resetDone"));
1189
+ await state.reload();
1190
+ }
1191
+ }
1192
+ return /* @__PURE__ */ jsxs3(
1193
+ Panel2,
1194
+ {
1195
+ title: t("title"),
1196
+ actions: canReset && factors.length > 0 && /* @__PURE__ */ jsx3(Button3, { size: "sm", danger: true, onClick: () => void reset(), loading: action.busy, "data-testid": "reset-second-factor", children: t("reset") }),
1197
+ "data-testid": "account-second-factor",
1198
+ children: [
1199
+ /* @__PURE__ */ jsx3(InlineAlert2, { tone: "danger", children: state.error ?? action.error }),
1200
+ data?.disabled && /* @__PURE__ */ jsx3(InlineAlert2, { tone: "neutral", children: ts("disabled") }),
1201
+ /* @__PURE__ */ jsx3(
1202
+ PropertyList,
1203
+ {
1204
+ items: [
1205
+ {
1206
+ label: t("mode"),
1207
+ value: data && /* @__PURE__ */ jsxs3(HStack3, { gap: "2", children: [
1208
+ /* @__PURE__ */ jsx3(Text3, { as: "span", children: tf(`modes.${data.mode}`) }),
1209
+ data.asked ? /* @__PURE__ */ jsx3(StatusPill2, { tone: "success", children: t("asked") }) : /* @__PURE__ */ jsx3(StatusPill2, { children: t("notAsked") })
1210
+ ] })
1211
+ },
1212
+ { label: t("factors"), value: data && (factors.length ? factors.map((f) => ts(`kinds.${f.kind}`)).join(", ") : t("none")) },
1213
+ { label: t("recoveryLeft"), value: data && (factors.length ? String(num(data.recoveryCodesLeft)) : EMPTY_VALUE) }
1214
+ ]
1215
+ }
1216
+ )
1217
+ ]
1218
+ }
1219
+ );
1220
+ }
1221
+
1222
+ // src/areas/guard/MergeParts.tsx
1223
+ import { HStack as HStack4, Stack as Stack2, Text as Text4 } from "@chakra-ui/react";
1224
+ import { AppLink, Button as Button4, DataTable as DataTable2, InlineAlert as InlineAlert3, Panel as Panel3, StatusPill as StatusPill3, useApiAction as useApiAction4, useAreaRequest as useAreaRequest4, useFormatters as useFormatters2 } from "@abpjs/ui";
1225
+
1226
+ // src/areas/guard/routes.ts
1227
+ function guardRoutes(base = "/admin") {
1228
+ const root = base.replace(/\/$/, "");
1229
+ const one = (kind) => (id) => `${root}/${kind}/${encodeURIComponent(id)}`;
1230
+ return {
1231
+ directories: `${root}/directories`,
1232
+ directory: one("directories"),
1233
+ accounts: `${root}/accounts`,
1234
+ account: one("accounts"),
1235
+ accountMerge: (id) => `${one("accounts")(id)}/merge`,
1236
+ groups: `${root}/groups`,
1237
+ group: one("groups")
1238
+ };
1239
+ }
1240
+
1241
+ // src/areas/guard/MergeParts.tsx
1242
+ import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
1243
+ function useCountLabel() {
1244
+ const t = useGuardNs("merge");
1245
+ return (c) => {
1246
+ const key = `count.${c.key.replace(/\./g, "_")}`;
1247
+ const text = t(key, { count: c.count });
1248
+ return text === `merge.${key}` ? `${c.label ?? c.key}: ${c.count}` : text;
1249
+ };
1250
+ }
1251
+ function usePartLabel() {
1252
+ const t = useGuardNs("merge");
1253
+ return (key, plugin) => {
1254
+ if (plugin) return t("plugin", { key });
1255
+ const text = t(`part.${key}`);
1256
+ return text === `merge.part.${key}` ? key : text;
1257
+ };
1258
+ }
1259
+ function CountList({ counts }) {
1260
+ const label = useCountLabel();
1261
+ const t = useGuardNs("merge");
1262
+ if (counts.length === 0) return /* @__PURE__ */ jsx4(Text4, { color: "fg.muted", children: t("nothing") });
1263
+ return /* @__PURE__ */ jsx4(Stack2, { gap: "0.5", as: "ul", listStyleType: "none", ps: "0", m: "0", children: counts.map((c) => /* @__PURE__ */ jsx4(Text4, { as: "li", textStyle: "body.sm", children: label(c) }, c.key)) });
1264
+ }
1265
+ function MergesPanel({ accountId, merges, onChange, routes = guardRoutes() }) {
1266
+ const t = useGuardNs("merge");
1267
+ const fmt = useFormatters2();
1268
+ const partLabel = usePartLabel();
1269
+ const request = useAreaRequest4("guard");
1270
+ const action = useApiAction4();
1271
+ async function resume(m) {
1272
+ if (await action.run(() => request(`/merges/${m.id}/resume`, { method: "POST" }))) await onChange();
1273
+ }
1274
+ const columns = [
1275
+ { id: "when", header: t("when"), nowrap: true, sortValue: (m) => new Date(m.startedAt), cell: (m) => fmt.dateTime(m.startedAt) },
1276
+ {
1277
+ id: "what",
1278
+ header: t("what"),
1279
+ cell: (m) => m.sourceId === accountId ? /* @__PURE__ */ jsx4(Text4, { as: "span", children: withParts(t("mergedInto"), {
1280
+ survivor: /* @__PURE__ */ jsx4(AppLink, { href: routes.account(m.survivorId), fontWeight: "medium", children: m.survivorUsername })
1281
+ }) }) : /* @__PURE__ */ jsx4(Text4, { as: "span", children: withParts(t("mergedFrom", { name: m.sourceDisplayName ?? "" }), {
1282
+ source: /* @__PURE__ */ jsx4(AppLink, { href: routes.account(m.sourceId), fontWeight: "medium", children: m.sourceUsername })
1283
+ }) })
1284
+ },
1285
+ {
1286
+ id: "who",
1287
+ header: t("who"),
1288
+ cell: (m) => m.automatic ? /* @__PURE__ */ jsx4(StatusPill3, { tone: "accent", children: t(`reason.${m.reason}`) }) : m.actorUsername ?? t("someone")
1289
+ },
1290
+ {
1291
+ id: "moved",
1292
+ header: t("moved"),
1293
+ cell: (m) => /* @__PURE__ */ jsx4(Stack2, { gap: "1", children: m.steps.filter((s) => s.counts.length > 0 || s.state !== "done").map((s) => /* @__PURE__ */ jsxs4(Stack2, { gap: "0", children: [
1294
+ /* @__PURE__ */ jsxs4(Text4, { textStyle: "caption", color: "fg.muted", children: [
1295
+ partLabel(s.key, s.plugin),
1296
+ s.state !== "done" && ` \xB7 ${t(`step.${s.state}`)}`
1297
+ ] }),
1298
+ s.error && /* @__PURE__ */ jsx4(Text4, { textStyle: "caption", color: "fg.danger", children: s.error }),
1299
+ /* @__PURE__ */ jsx4(CountList, { counts: s.counts })
1300
+ ] }, s.key)) })
1301
+ },
1302
+ {
1303
+ id: "state",
1304
+ header: t("state"),
1305
+ cell: (m) => m.state === "done" ? /* @__PURE__ */ jsx4(StatusPill3, { tone: "success", children: t("done") }) : /* @__PURE__ */ jsxs4(HStack4, { gap: "2", wrap: "wrap", children: [
1306
+ /* @__PURE__ */ jsx4(StatusPill3, { tone: "warning", children: t("incomplete") }),
1307
+ /* @__PURE__ */ jsx4(Button4, { size: "sm", onClick: () => resume(m), loading: action.busy, children: t("resume") })
1308
+ ] })
1309
+ }
1310
+ ];
1311
+ return /* @__PURE__ */ jsxs4(Panel3, { title: t("title", { count: merges.length }), description: t("hint"), flush: true, "data-testid": "merges", children: [
1312
+ /* @__PURE__ */ jsx4(InlineAlert3, { tone: "danger", children: action.error }),
1313
+ /* @__PURE__ */ jsx4(
1314
+ DataTable2,
1315
+ {
1316
+ "aria-label": t("title", { count: merges.length }),
1317
+ columns,
1318
+ rows: merges,
1319
+ getRowId: (m) => m.id,
1320
+ defaultSort: { columnId: "when", direction: "desc" },
1321
+ empty: t("none")
1322
+ }
1323
+ )
1324
+ ] });
1325
+ }
1326
+
1327
+ // src/areas/guard/status.tsx
1328
+ import { Stack as Stack3, Text as Text5 } from "@chakra-ui/react";
1329
+ import { StatusPill as StatusPill4, useFormatters as useFormatters3 } from "@abpjs/ui";
1330
+ import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
1331
+ var accountTone = { Active: "success", Inactive: "neutral", Locked: "danger" };
1332
+ function AccountStatusPill({ status }) {
1333
+ const t = useGuardNs("status.account");
1334
+ const known = Object.hasOwn(accountTone, status) ? status : null;
1335
+ return /* @__PURE__ */ jsx5(StatusPill4, { tone: known ? accountTone[known] : "neutral", children: known ? t(known) : status });
1336
+ }
1337
+ var pluginTone = { Enabled: "success", Disabled: "neutral", Installed: "info", Failed: "danger" };
1338
+ function PluginStatePill({ state }) {
1339
+ const t = useGuardNs("status.plugin");
1340
+ const known = Object.hasOwn(pluginTone, state) ? state : null;
1341
+ return /* @__PURE__ */ jsx5(StatusPill4, { tone: known ? pluginTone[known] : "neutral", children: known ? t(known) : state });
1342
+ }
1343
+ function FlagPill({ value, yes, no }) {
1344
+ return /* @__PURE__ */ jsx5(StatusPill4, { tone: value ? "success" : "neutral", children: value ? yes : no });
1345
+ }
1346
+ function PassFail({ ok }) {
1347
+ const t = useGuardNs("status.check");
1348
+ if (ok == null) return /* @__PURE__ */ jsx5(StatusPill4, { children: t("notRun") });
1349
+ return /* @__PURE__ */ jsx5(StatusPill4, { tone: ok ? "success" : "danger", children: ok ? t("pass") : t("fail") });
1350
+ }
1351
+ function SyncResultPill({ succeeded }) {
1352
+ const t = useGuardNs("status.sync");
1353
+ if (succeeded == null) return /* @__PURE__ */ jsx5(StatusPill4, { tone: "warning", children: t("running") });
1354
+ return /* @__PURE__ */ jsx5(StatusPill4, { tone: succeeded ? "success" : "danger", children: succeeded ? t("succeeded") : t("failed") });
1355
+ }
1356
+ function SyncStatus({ d }) {
1357
+ const t = useGuardNs("status.sync");
1358
+ const fmt = useFormatters3();
1359
+ if (!d.lastSyncAt) return /* @__PURE__ */ jsx5(StatusPill4, { children: t("never") });
1360
+ return /* @__PURE__ */ jsxs5(Stack3, { gap: "0.5", align: "flex-start", minW: "0", maxW: "full", children: [
1361
+ /* @__PURE__ */ jsx5(SyncResultPill, { succeeded: d.lastSyncSucceeded ?? null }),
1362
+ /* @__PURE__ */ jsx5(Text5, { textStyle: "caption", color: "fg.muted", children: fmt.dateTime(d.lastSyncAt) }),
1363
+ d.lastSyncMessage && /* @__PURE__ */ jsx5(Text5, { textStyle: "caption", color: "fg.muted", maxW: "full", truncate: true, dir: "auto", title: d.lastSyncMessage, children: d.lastSyncMessage })
1364
+ ] });
1365
+ }
1366
+
1367
+ // src/areas/guard/AccountScreen.tsx
1368
+ import { Fragment as Fragment2, jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
1369
+ function useAccountCan(detail) {
1370
+ return (action) => detail?.can?.[action] ?? false;
1371
+ }
1372
+ var NO_ADDRESSES = { directoryEmail: null, directoryMailGoesHere: false, mailTo: null, addresses: [] };
1373
+ function AccountScreen({ id, routes = guardRoutes() }) {
1374
+ const t = useGuardNs("accountDetail");
1375
+ const tm = useGuardNs("merge");
1376
+ const tc = useGuardNs("common");
1377
+ const tn = useGuardNs("nav");
1378
+ const fmt = useFormatters4();
1379
+ const navigate = useNavigate();
1380
+ const me = useMe();
1381
+ const request = useAreaRequest5("guard");
1382
+ const detail = useApiQuery2("guard", `/accounts/${id}`);
1383
+ const action = useApiAction5();
1384
+ const may = useAccountCan(detail.data);
1385
+ async function setLocked(lock) {
1386
+ const updated = await action.run(() => request(`/accounts/${id}/${lock ? "lock" : "unlock"}`, { method: "POST" }));
1387
+ if (updated) await detail.reload();
1388
+ }
1389
+ if (detail.error && !detail.data) return /* @__PURE__ */ jsx6(InlineAlert4, { tone: "danger", children: detail.error });
1390
+ const data = detail.data;
1391
+ const account = data?.account;
1392
+ const merged = account?.mergedIntoId != null;
1393
+ const slotContext = { account, detail: data, reload: detail.reload };
1394
+ const identityColumns = [
1395
+ { id: "order", header: tc("order"), numeric: true, sortValue: (i) => i.directoryOrder, cell: (i) => i.directoryOrder },
1396
+ {
1397
+ id: "directory",
1398
+ header: tc("directory"),
1399
+ sortValue: (i) => i.directoryName,
1400
+ cell: (i) => /* @__PURE__ */ jsx6(AppLink2, { href: routes.directory(i.directoryId), fontWeight: i.isWinning ? "medium" : void 0, children: i.directoryName })
1401
+ },
1402
+ { id: "username", header: tc("username"), sortValue: (i) => i.username, cell: (i) => /* @__PURE__ */ jsx6(RecordKey, { value: i.username }), skeleton: "key" },
1403
+ {
1404
+ id: "externalId",
1405
+ header: t("externalId"),
1406
+ cell: (i) => /* @__PURE__ */ jsx6(Text6, { as: "span", textStyle: "code", color: "fg.muted", wordBreak: "break-all", dir: "ltr", children: i.externalId })
1407
+ },
1408
+ { id: "displayName", header: tc("displayName"), sortValue: (i) => i.displayName, cell: (i) => i.displayName ?? EMPTY_VALUE2, skeleton: "person" },
1409
+ { id: "email", header: tc("email"), sortValue: (i) => i.email, cell: (i) => i.email ?? EMPTY_VALUE2 },
1410
+ {
1411
+ id: "active",
1412
+ header: tc("active"),
1413
+ sortValue: (i) => i.isActive,
1414
+ cell: (i) => i.isActive ? /* @__PURE__ */ jsx6(StatusPill5, { tone: "success", children: tc("active") }) : /* @__PURE__ */ jsx6(StatusPill5, { children: tc("inactive") }),
1415
+ skeleton: "pill"
1416
+ },
1417
+ {
1418
+ id: "synced",
1419
+ header: t("lastSynced"),
1420
+ nowrap: true,
1421
+ sortValue: (i) => i.lastSyncedAt ? new Date(i.lastSyncedAt) : null,
1422
+ cell: (i) => fmt.dateTime(i.lastSyncedAt),
1423
+ skeleton: "date",
1424
+ skeletonWidth: 17
1425
+ },
1426
+ {
1427
+ id: "precedence",
1428
+ header: t("precedence"),
1429
+ sortValue: (i) => i.isWinning,
1430
+ cell: (i) => i.isWinning ? /* @__PURE__ */ jsx6(StatusPill5, { tone: "success", children: t("winning") }) : /* @__PURE__ */ jsx6(StatusPill5, { children: t("shadowed") }),
1431
+ skeleton: "pill"
1432
+ }
1433
+ ];
1434
+ const groupColumns = [
1435
+ {
1436
+ id: "group",
1437
+ header: tc("group"),
1438
+ sortValue: (g) => g.name,
1439
+ cell: (g) => /* @__PURE__ */ jsx6(AppLink2, { href: routes.group(g.groupId), fontWeight: "medium", children: g.name })
1440
+ },
1441
+ { id: "directory", header: tc("directory"), sortValue: (g) => g.directoryName, cell: (g) => g.directoryName },
1442
+ {
1443
+ id: "membership",
1444
+ header: tc("membership"),
1445
+ sortValue: (g) => g.direct ? 0 : 1,
1446
+ cell: (g) => g.direct ? /* @__PURE__ */ jsx6(StatusPill5, { tone: "info", children: tc("direct") }) : /* @__PURE__ */ jsx6(StatusPill5, { children: tc("nested") }),
1447
+ skeleton: "pill"
1448
+ },
1449
+ { id: "path", header: tc("path"), sortValue: (g) => g.path.length, cell: (g) => /* @__PURE__ */ jsx6(PathChips, { path: g.path }), skeleton: () => /* @__PURE__ */ jsx6(PathChips, { path: [], loading: true }) }
1450
+ ];
1451
+ return /* @__PURE__ */ jsxs6(Loading, { when: !data, children: [
1452
+ /* @__PURE__ */ jsx6(
1453
+ PageHeader,
1454
+ {
1455
+ breadcrumbs: [{ label: tn("accounts"), href: routes.accounts }, { label: account?.username }],
1456
+ title: account && (account.displayName || account.username),
1457
+ meta: /* @__PURE__ */ jsxs6(Fragment2, { children: [
1458
+ account ? /* @__PURE__ */ jsx6(AccountStatusPill, { status: account.status }) : /* @__PURE__ */ jsx6(StatusPill5, {}),
1459
+ /* @__PURE__ */ jsx6(RecordKey, { value: account?.username, variant: "muted" }),
1460
+ /* @__PURE__ */ jsx6(Text6, { as: "span", children: /* @__PURE__ */ jsx6(TextSlot, { width: 12, children: account?.directoryName }) }),
1461
+ account?.statusReason && /* @__PURE__ */ jsx6(Text6, { as: "span", children: account.statusReason })
1462
+ ] }),
1463
+ actions: !merged && /* @__PURE__ */ jsxs6(HStack5, { gap: "2", children: [
1464
+ account && /* @__PURE__ */ jsx6(HostSlot, { name: "guard.account.actions", context: slotContext }),
1465
+ may("merge") && /* @__PURE__ */ jsx6(Button5, { onClick: () => navigate(routes.accountMerge(account?.id ?? id)), children: tm("mergeInto") }),
1466
+ account?.status === "Locked" ? may("unlock") && /* @__PURE__ */ jsx6(Button5, { onClick: () => setLocked(false), loading: action.busy, children: t("unlock") }) : may("lock") && /* @__PURE__ */ jsx6(Button5, { danger: true, onClick: () => setLocked(true), loading: action.busy, children: t("lock") }),
1467
+ account && /* @__PURE__ */ jsx6(HostSlot, { name: "guard.account.actions.end", context: slotContext })
1468
+ ] })
1469
+ }
1470
+ ),
1471
+ /* @__PURE__ */ jsxs6(Stack4, { gap: "section", children: [
1472
+ /* @__PURE__ */ jsx6(InlineAlert4, { tone: "danger", children: action.error }),
1473
+ merged && /* @__PURE__ */ jsx6(InlineAlert4, { tone: "info", "data-testid": "merged", children: withParts(tm("mergedBanner"), {
1474
+ survivor: /* @__PURE__ */ jsx6(AppLink2, { href: routes.account(account?.mergedIntoId ?? ""), fontWeight: "medium", children: data?.mergedIntoUsername ?? account?.mergedIntoId })
1475
+ }) }),
1476
+ account && /* @__PURE__ */ jsx6(HostSlot, { name: "guard.account.notices", context: slotContext }),
1477
+ /* @__PURE__ */ jsx6(Panel4, { title: t("account"), children: /* @__PURE__ */ jsx6(
1478
+ PropertyList2,
1479
+ {
1480
+ items: [
1481
+ {
1482
+ label: tc("displayName"),
1483
+ value: account && /* @__PURE__ */ jsx6(
1484
+ AccountNameEditor,
1485
+ {
1486
+ name: account.displayName || account.username,
1487
+ names: account.displayNames,
1488
+ base: `/accounts/${account.id}`,
1489
+ correctable: (data?.addresses?.correctable ?? false) && may("update"),
1490
+ onRenamed: () => void detail.reload()
1491
+ }
1492
+ )
1493
+ },
1494
+ { label: tc("email"), value: account && (account.email ?? EMPTY_VALUE2) },
1495
+ { label: t("owningDirectory"), value: account?.directoryName },
1496
+ { label: tc("lastSignIn"), value: account && fmt.dateTime(account.lastLoginAt) }
1497
+ ]
1498
+ }
1499
+ ) }),
1500
+ !merged && account && /* @__PURE__ */ jsx6(
1501
+ AccountSecondFactorPanel,
1502
+ {
1503
+ accountId: account.id,
1504
+ name: account.displayName || account.username,
1505
+ canReset: may("resetSecondFactor") && account.id !== me?.accountId
1506
+ }
1507
+ ),
1508
+ !merged && /* @__PURE__ */ jsx6(
1509
+ AccountEmailsPanel,
1510
+ {
1511
+ addresses: data?.addresses ?? NO_ADDRESSES,
1512
+ base: `/accounts/${account?.id ?? id}`,
1513
+ canEdit: may("update"),
1514
+ onChange: (updated) => data && detail.setData({ ...data, addresses: updated })
1515
+ }
1516
+ ),
1517
+ account && /* @__PURE__ */ jsx6(HostSlot, { name: "guard.account.panels", context: slotContext }),
1518
+ /* @__PURE__ */ jsx6(
1519
+ Panel4,
1520
+ {
1521
+ title: /* @__PURE__ */ jsx6(TextSlot, { width: 14, children: t("identities", { count: data?.identities.length ?? 0 }) }),
1522
+ description: t("identitiesHint"),
1523
+ flush: true,
1524
+ children: /* @__PURE__ */ jsx6(
1525
+ DataTable3,
1526
+ {
1527
+ "aria-label": t("identities", { count: data?.identities.length ?? 0 }),
1528
+ size: "sm",
1529
+ columns: identityColumns,
1530
+ rows: data?.identities,
1531
+ skeletonRows: 1,
1532
+ getRowId: (i) => `${i.directoryId}:${i.externalId}`,
1533
+ defaultSort: { columnId: "order", direction: "asc" },
1534
+ rowProps: (i) => i.isWinning ? { "data-selected": "" } : void 0,
1535
+ empty: t("noIdentities")
1536
+ }
1537
+ )
1538
+ }
1539
+ ),
1540
+ /* @__PURE__ */ jsx6(Panel4, { title: /* @__PURE__ */ jsx6(TextSlot, { width: 20, children: t("effectiveGroups", { count: data?.groups.length ?? 0 }) }), flush: true, children: /* @__PURE__ */ jsx6(
1541
+ DataTable3,
1542
+ {
1543
+ "aria-label": t("effectiveGroups", { count: data?.groups.length ?? 0 }),
1544
+ columns: groupColumns,
1545
+ rows: data?.groups,
1546
+ getRowId: (g) => g.groupId,
1547
+ defaultSort: { columnId: "path", direction: "asc" },
1548
+ empty: t("noGroups")
1549
+ }
1550
+ ) }),
1551
+ data && (data.merges.length > 0 || may("merge")) && /* @__PURE__ */ jsx6(MergesPanel, { accountId: data.account.id, merges: data.merges, onChange: detail.reload, routes })
1552
+ ] })
1553
+ ] });
1554
+ }
1555
+
1556
+ // src/areas/guard/AccountsScreen.tsx
1557
+ import { useState as useState3 } from "react";
1558
+ import { HStack as HStack7, Input as Input2, SimpleGrid, Stack as Stack6, Text as Text8 } from "@chakra-ui/react";
1559
+ import {
1560
+ Button as Button6,
1561
+ DataTable as DataTable5,
1562
+ EMPTY_VALUE as EMPTY_VALUE3,
1563
+ errorText,
1564
+ Field,
1565
+ InlineAlert as InlineAlert5,
1566
+ ListFooter,
1567
+ notify as notify4,
1568
+ PageHeader as PageHeader2,
1569
+ Panel as Panel6,
1570
+ RecordKey as RecordKey3,
1571
+ SearchInput,
1572
+ SelectField,
1573
+ useApiQuery as useApiQuery4,
1574
+ useAreaListSource,
1575
+ useAreaRequest as useAreaRequest6,
1576
+ useCan,
1577
+ useFormatters as useFormatters5,
1578
+ useListState
1579
+ } from "@abpjs/ui";
1580
+
1581
+ // src/areas/guard/DuplicatesPanel.tsx
1582
+ import { HStack as HStack6, Stack as Stack5, Text as Text7 } from "@chakra-ui/react";
1583
+ import { AppLink as AppLink3, DataTable as DataTable4, Panel as Panel5, RecordKey as RecordKey2, useApiQuery as useApiQuery3 } from "@abpjs/ui";
1584
+ import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
1585
+ function DuplicatesPanel({ routes = guardRoutes() }) {
1586
+ const t = useGuardNs("duplicates");
1587
+ const duplicates = useApiQuery3("guard", "/accounts/duplicates");
1588
+ const rows = duplicates.data ?? [];
1589
+ if (rows.length === 0) return null;
1590
+ const columns = [
1591
+ {
1592
+ id: "email",
1593
+ header: t("address"),
1594
+ sortValue: (d) => d.email,
1595
+ cell: (d) => /* @__PURE__ */ jsx7(Text7, { as: "span", dir: "ltr", wordBreak: "break-all", children: d.email })
1596
+ },
1597
+ {
1598
+ id: "accounts",
1599
+ header: t("accounts"),
1600
+ cell: (d) => /* @__PURE__ */ jsx7(Stack5, { gap: "1", children: d.accounts.map((a) => /* @__PURE__ */ jsxs7(HStack6, { gap: "2", wrap: "wrap", children: [
1601
+ /* @__PURE__ */ jsx7(RecordKey2, { value: a.username, href: routes.account(a.id) }),
1602
+ /* @__PURE__ */ jsx7(Text7, { as: "span", textStyle: "caption", color: "fg.muted", children: a.directoryName }),
1603
+ /* @__PURE__ */ jsx7(AccountStatusPill, { status: a.status })
1604
+ ] }, a.id)) })
1605
+ },
1606
+ {
1607
+ id: "merge",
1608
+ header: t("merge"),
1609
+ cell: (d) => /* @__PURE__ */ jsx7(Stack5, { gap: "1", children: d.accounts.slice(1).map((a) => /* @__PURE__ */ jsx7(AppLink3, { href: `${routes.accountMerge(a.id)}?into=${d.accounts[0].id}`, children: t("mergeInto", { source: a.username, survivor: d.accounts[0].username }) }, a.id)) })
1610
+ }
1611
+ ];
1612
+ return /* @__PURE__ */ jsx7(Panel5, { title: t("title", { count: rows.length }), description: t("hint"), flush: true, "data-testid": "duplicates", children: /* @__PURE__ */ jsx7(
1613
+ DataTable4,
1614
+ {
1615
+ "aria-label": t("title", { count: rows.length }),
1616
+ columns,
1617
+ rows,
1618
+ getRowId: (d) => d.email,
1619
+ defaultSort: { columnId: "email", direction: "asc" }
1620
+ }
1621
+ ) });
1622
+ }
1623
+
1624
+ // src/areas/guard/AccountsScreen.tsx
1625
+ import { Fragment as Fragment3, jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
1626
+ var INTERNAL_DIRECTORY = "00000000-0000-0000-0000-00000000d001";
1627
+ var STATUSES = ["Active", "Inactive", "Locked"];
1628
+ function AccountsScreen({ routes = guardRoutes(), source }) {
1629
+ const t = useGuardNs("accounts");
1630
+ const tc = useGuardNs("common");
1631
+ const ts = useGuardNs("status.account");
1632
+ const fmt = useFormatters5();
1633
+ const can = useCan();
1634
+ const admin = can("guard.site.admin");
1635
+ const served = useAreaListSource("guard", "/accounts/page", { sortFields: { lastSignIn: "lastLoginAt" } });
1636
+ const list = useListState(source ?? served, { initial: { sort: { columnId: "username", direction: "asc" } } });
1637
+ const [creating, setCreating] = useState3(false);
1638
+ const columns = [
1639
+ { id: "username", header: tc("username"), sortValue: (a) => a.username, cell: (a) => /* @__PURE__ */ jsx8(RecordKey3, { value: a.username, href: routes.account(a.id) }), skeleton: "key" },
1640
+ { id: "displayName", header: tc("displayName"), sortValue: (a) => a.displayName, cell: (a) => a.displayName || EMPTY_VALUE3, skeleton: "person" },
1641
+ {
1642
+ id: "email",
1643
+ header: tc("email"),
1644
+ sortValue: (a) => a.email,
1645
+ cell: (a) => a.email ? /* @__PURE__ */ jsx8(Text8, { as: "span", color: "fg.muted", dir: "ltr", wordBreak: "break-all", children: a.email }) : EMPTY_VALUE3
1646
+ },
1647
+ { id: "directory", header: tc("directory"), cell: (a) => a.directoryName },
1648
+ { id: "status", header: tc("status"), sortValue: (a) => a.status, cell: (a) => /* @__PURE__ */ jsx8(AccountStatusPill, { status: a.status }), skeleton: "pill" },
1649
+ {
1650
+ id: "lastSignIn",
1651
+ header: tc("lastSignIn"),
1652
+ nowrap: true,
1653
+ sortValue: (a) => a.lastLoginAt ? new Date(a.lastLoginAt) : null,
1654
+ cell: (a) => /* @__PURE__ */ jsx8(Text8, { as: "span", color: "fg.muted", children: fmt.dateTime(a.lastLoginAt) }),
1655
+ skeleton: "date"
1656
+ }
1657
+ ];
1658
+ return /* @__PURE__ */ jsxs8(Fragment3, { children: [
1659
+ /* @__PURE__ */ jsx8(
1660
+ PageHeader2,
1661
+ {
1662
+ title: t("title"),
1663
+ description: t("subtitle"),
1664
+ actions: !creating && admin && /* @__PURE__ */ jsx8(Button6, { variant: "primary", onClick: () => setCreating(true), children: t("create") })
1665
+ }
1666
+ ),
1667
+ /* @__PURE__ */ jsxs8(Stack6, { gap: "section", children: [
1668
+ creating && /* @__PURE__ */ jsx8(
1669
+ CreateAccountPanel,
1670
+ {
1671
+ onDone: (created) => {
1672
+ setCreating(false);
1673
+ notify4.success(t("created", { username: created.username }));
1674
+ list.reload();
1675
+ },
1676
+ onCancel: () => setCreating(false)
1677
+ }
1678
+ ),
1679
+ /* @__PURE__ */ jsxs8(Stack6, { gap: "field", children: [
1680
+ /* @__PURE__ */ jsxs8(HStack7, { gap: "2", wrap: "wrap", children: [
1681
+ /* @__PURE__ */ jsx8(
1682
+ SearchInput,
1683
+ {
1684
+ size: "sm",
1685
+ maxW: "sm",
1686
+ value: list.query.search,
1687
+ onChange: (e) => list.setSearch(e.target.value),
1688
+ placeholder: t("searchPlaceholder"),
1689
+ "aria-label": t("search")
1690
+ }
1691
+ ),
1692
+ /* @__PURE__ */ jsx8(
1693
+ SelectField,
1694
+ {
1695
+ size: "sm",
1696
+ maxW: "12rem",
1697
+ "aria-label": tc("status"),
1698
+ value: list.query.filters.status ?? "",
1699
+ onChange: (e) => list.setFilter("status", e.target.value || null),
1700
+ options: [{ value: "", label: t("allStatuses") }, ...STATUSES.map((s) => ({ value: s, label: ts(s) }))]
1701
+ }
1702
+ )
1703
+ ] }),
1704
+ /* @__PURE__ */ jsx8(DataTable5, { "aria-label": t("title"), columns, getRowId: (a) => a.id, empty: t("empty"), ...list.table }),
1705
+ /* @__PURE__ */ jsx8(ListFooter, { list })
1706
+ ] }),
1707
+ admin && /* @__PURE__ */ jsx8(DuplicatesPanel, { routes })
1708
+ ] })
1709
+ ] });
1710
+ }
1711
+ function CreateAccountPanel({ onDone, onCancel }) {
1712
+ const t = useGuardNs("accounts");
1713
+ const tc = useGuardNs("common");
1714
+ const request = useAreaRequest6("guard");
1715
+ const [form, setForm] = useState3({ username: "", displayName: "", email: "", password: "" });
1716
+ const [directoryId, setDirectoryId] = useState3("");
1717
+ const [error, setError] = useState3(null);
1718
+ const [busy, setBusy] = useState3(false);
1719
+ const internal = (useApiQuery4("guard", "/directories").data ?? []).filter((d) => d.type === "internal");
1720
+ async function submit(e) {
1721
+ e.preventDefault();
1722
+ setBusy(true);
1723
+ setError(null);
1724
+ try {
1725
+ const created = await request("/accounts", { method: "POST", body: { ...form, ...directoryId ? { directoryId } : {} } });
1726
+ onDone(created);
1727
+ } catch (err) {
1728
+ setError(errorText(err));
1729
+ } finally {
1730
+ setBusy(false);
1731
+ }
1732
+ }
1733
+ const set = (k) => (e) => setForm((f) => ({ ...f, [k]: e.target.value }));
1734
+ return /* @__PURE__ */ jsx8(Panel6, { title: t("createTitle"), description: t("createHint"), children: /* @__PURE__ */ jsx8("form", { onSubmit: submit, children: /* @__PURE__ */ jsxs8(Stack6, { gap: "field", children: [
1735
+ /* @__PURE__ */ jsxs8(SimpleGrid, { columns: { base: 1, md: 2 }, gap: "field", children: [
1736
+ /* @__PURE__ */ jsx8(Field, { label: tc("username"), required: true, children: /* @__PURE__ */ jsx8(Input2, { value: form.username, onChange: set("username"), autoComplete: "off" }) }),
1737
+ /* @__PURE__ */ jsx8(Field, { label: tc("displayName"), required: true, children: /* @__PURE__ */ jsx8(Input2, { value: form.displayName, onChange: set("displayName") }) }),
1738
+ /* @__PURE__ */ jsx8(
1739
+ Field,
1740
+ {
1741
+ label: tc("email"),
1742
+ optionalText: /* @__PURE__ */ jsx8(Text8, { as: "span", color: "fg.subtle", children: tc("optional") }),
1743
+ children: /* @__PURE__ */ jsx8(Input2, { type: "email", value: form.email, onChange: set("email"), dir: "ltr" })
1744
+ }
1745
+ ),
1746
+ /* @__PURE__ */ jsx8(Field, { label: tc("password"), required: true, children: /* @__PURE__ */ jsx8(Input2, { type: "password", value: form.password, onChange: set("password"), autoComplete: "new-password" }) }),
1747
+ internal.length > 1 && /* @__PURE__ */ jsx8(Field, { label: tc("directory"), children: /* @__PURE__ */ jsx8(
1748
+ SelectField,
1749
+ {
1750
+ value: directoryId,
1751
+ onChange: (e) => setDirectoryId(e.target.value),
1752
+ options: internal.map((d) => ({ value: d.id === INTERNAL_DIRECTORY ? "" : d.id, label: d.name }))
1753
+ }
1754
+ ) })
1755
+ ] }),
1756
+ /* @__PURE__ */ jsx8(InlineAlert5, { tone: "danger", children: error }),
1757
+ /* @__PURE__ */ jsxs8(HStack7, { gap: "2", children: [
1758
+ /* @__PURE__ */ jsx8(Button6, { type: "submit", variant: "primary", loading: busy, children: t("createSubmit") }),
1759
+ /* @__PURE__ */ jsx8(Button6, { onClick: onCancel, children: tc("cancel") })
1760
+ ] })
1761
+ ] }) }) });
1762
+ }
1763
+
1764
+ // src/areas/guard/AnonymousScreen.tsx
1765
+ import { useMemo, useState as useState4 } from "react";
1766
+ import { HStack as HStack8, Stack as Stack7, Text as Text9 } from "@chakra-ui/react";
1767
+ import { Globe, Pencil, Trash2 } from "lucide-react";
1768
+ import {
1769
+ AppLink as AppLink4,
1770
+ Button as Button7,
1771
+ DataTable as DataTable6,
1772
+ EmptyState,
1773
+ Field as Field2,
1774
+ FormDialog,
1775
+ IconTile,
1776
+ InlineAlert as InlineAlert6,
1777
+ notify as notify5,
1778
+ PageHeader as PageHeader3,
1779
+ Panel as Panel7,
1780
+ PreviewCard,
1781
+ RecordKey as RecordKey4,
1782
+ RowMenu,
1783
+ SelectField as SelectField2,
1784
+ StatusPill as StatusPill6,
1785
+ errorText as errorText2,
1786
+ useApiAction as useApiAction6,
1787
+ useApiQuery as useApiQuery5,
1788
+ useAreaRequest as useAreaRequest7,
1789
+ useConfirm as useConfirm2,
1790
+ useFormatters as useFormatters6
1791
+ } from "@abpjs/ui";
1792
+
1793
+ // src/areas/guard/anonymousRules.ts
1794
+ function takenKey(roleId, scopeKey) {
1795
+ return `${roleId}\0${scopeKey}`;
1796
+ }
1797
+ function takenBy(grants, except) {
1798
+ return new Set(grants.filter((g) => g.id !== except && g.roleId && g.scopeKey).map((g) => takenKey(g.roleId, g.scopeKey)));
1799
+ }
1800
+ function rolesOffered(places, place, taken = /* @__PURE__ */ new Set()) {
1801
+ const pairs = (place ? [place] : places).flatMap((p) => p.roles.map((r) => [r, p.scopeKey]));
1802
+ const free = pairs.filter(([r, scopeKey]) => !taken.has(takenKey(r.id, scopeKey))).map(([r]) => r);
1803
+ return [...new Map(free.map((r) => [r.id, r])).values()];
1804
+ }
1805
+ function placesOffering(places, roleId, taken = /* @__PURE__ */ new Set()) {
1806
+ return places.filter((p) => p.roles.some((r) => (!roleId || r.id === roleId) && !taken.has(takenKey(r.id, p.scopeKey))));
1807
+ }
1808
+ function placeKept(places, scopeKey, roleId, taken = /* @__PURE__ */ new Set()) {
1809
+ if (!scopeKey) return "";
1810
+ const place = places.find((p) => p.scopeKey === scopeKey);
1811
+ if (!place) return "";
1812
+ if (!roleId) return scopeKey;
1813
+ return place.roles.some((r) => r.id === roleId) && !taken.has(takenKey(roleId, scopeKey)) ? scopeKey : "";
1814
+ }
1815
+
1816
+ // src/areas/guard/AnonymousScreen.tsx
1817
+ import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
1818
+ function AnonymousScreen({ roleName, roleDescription } = {}) {
1819
+ const t = useGuardNs("anonymousAccess");
1820
+ const fmt = useFormatters6();
1821
+ const written = useWrittenName();
1822
+ const confirm = useConfirm2();
1823
+ const request = useAreaRequest7("guard");
1824
+ const action = useApiAction6();
1825
+ const grants = useApiQuery5("guard", "/anonymous");
1826
+ const places = useApiQuery5("guard", "/anonymous/places");
1827
+ const [editing, setEditing] = useState4(null);
1828
+ const [shown, setShown] = useState4({ mode: "give" });
1829
+ const [roleId, setRoleId] = useState4("");
1830
+ const [scopeKey, setScopeKey] = useState4("");
1831
+ const placeOf = useMemo(() => new Map((places.data ?? []).map((p) => [p.scopeKey, p])), [places.data]);
1832
+ const roleOf = useMemo(() => new Map((places.data ?? []).flatMap((p) => p.roles).map((r) => [r.id, r])), [places.data]);
1833
+ const nameOf = (r) => written(roleName?.(r.key, r.name) ?? r.name, r.names);
1834
+ const describe = (r) => written(roleDescription?.(r.key, r.description) ?? r.description ?? "", r.descriptions) || void 0;
1835
+ const grantRole = (g) => {
1836
+ const known = g.roleId ? roleOf.get(g.roleId) : void 0;
1837
+ return known ? nameOf(known) : written(roleName?.(g.roleKey, g.roleName) ?? g.roleName);
1838
+ };
1839
+ const whereOf = (g) => {
1840
+ const place = g.scopeKey ? placeOf.get(g.scopeKey) : void 0;
1841
+ return { label: place?.label ?? g.scope ?? g.scopeKey ?? "", code: place?.code ?? g.code ?? null, href: place?.href ?? g.href };
1842
+ };
1843
+ const taken = useMemo(() => takenBy(grants.data ?? [], shown.mode === "change" ? shown.grant.id : void 0), [grants.data, shown]);
1844
+ const chosenPlace = shown.mode === "change" ? shown.place : placeOf.get(scopeKey);
1845
+ const roleOptions = useMemo(() => rolesOffered(places.data ?? [], chosenPlace, taken), [chosenPlace, places.data, taken]);
1846
+ const chosenRole = roleOptions.find((r) => r.id === roleId);
1847
+ const placeOptions = placesOffering(places.data ?? [], roleId, taken);
1848
+ const unchanged = shown.mode === "change" && roleId === (shown.grant.roleId ?? "");
1849
+ function open(next) {
1850
+ setEditing(next);
1851
+ setShown(next);
1852
+ setRoleId(next.mode === "change" ? next.grant.roleId ?? "" : "");
1853
+ setScopeKey(next.mode === "change" ? next.place.scopeKey : "");
1854
+ action.setError(null);
1855
+ }
1856
+ async function save() {
1857
+ if (!editing) return;
1858
+ const done = await action.run(
1859
+ () => editing.mode === "give" ? request("/anonymous", { method: "POST", body: { roleId, scopeKey } }) : request(`/anonymous/${editing.grant.id}`, { method: "PUT", body: { roleId } })
1860
+ );
1861
+ if (done === void 0) return;
1862
+ notify5.success(editing.mode === "give" ? t("given") : t("changed"));
1863
+ setEditing(null);
1864
+ await grants.reload();
1865
+ }
1866
+ async function remove(g) {
1867
+ const where = whereOf(g);
1868
+ if (!await confirm({ title: t("revokeTitle", { role: grantRole(g), scope: where.label }), confirmLabel: t("revoke"), danger: true })) return;
1869
+ try {
1870
+ await request(`/anonymous/${g.id}`, { method: "DELETE" });
1871
+ notify5.success(t("revoked"));
1872
+ await grants.reload();
1873
+ } catch (e) {
1874
+ notify5.error(errorText2(e));
1875
+ }
1876
+ }
1877
+ const canGive = placesOffering(places.data ?? [], "", takenBy(grants.data ?? [])).length > 0;
1878
+ const giveButton = canGive && /* @__PURE__ */ jsx9(Button7, { variant: "primary", onClick: () => open({ mode: "give" }), children: t("giveRole") });
1879
+ const empty = grants.data !== void 0 && grants.data.length === 0;
1880
+ const whereLabel = (p) => p.code ? t("placeWithCode", { place: p.label, code: p.code }) : p.label;
1881
+ const previewWhere = chosenPlace ? whereLabel(chosenPlace) : void 0;
1882
+ return /* @__PURE__ */ jsxs9(Stack7, { gap: "section", children: [
1883
+ /* @__PURE__ */ jsx9(PageHeader3, { title: t("title"), description: t("subtitle"), actions: !empty ? giveButton : void 0 }),
1884
+ /* @__PURE__ */ jsx9(InlineAlert6, { tone: "danger", children: grants.error ?? places.error }),
1885
+ empty ? /* @__PURE__ */ jsx9(
1886
+ EmptyState,
1887
+ {
1888
+ variant: "page",
1889
+ size: "md",
1890
+ kind: "first-use",
1891
+ illustration: "views",
1892
+ title: t("emptyTitle"),
1893
+ description: canGive || places.data === void 0 ? t("emptyText") : t("emptyTextNoPlaces"),
1894
+ action: giveButton || void 0
1895
+ }
1896
+ ) : /* @__PURE__ */ jsx9(Panel7, { flush: true, children: /* @__PURE__ */ jsx9(
1897
+ DataTable6,
1898
+ {
1899
+ "aria-label": t("tableLabel"),
1900
+ rows: grants.data,
1901
+ loading: grants.loading,
1902
+ getRowId: (g) => g.id,
1903
+ columns: [
1904
+ {
1905
+ id: "role",
1906
+ header: t("role"),
1907
+ cell: (g) => /* @__PURE__ */ jsx9(StatusPill6, { tone: "info", dot: false, children: grantRole(g) })
1908
+ },
1909
+ {
1910
+ id: "scope",
1911
+ header: t("scope"),
1912
+ cell: (g) => {
1913
+ const where = whereOf(g);
1914
+ return /* @__PURE__ */ jsxs9(HStack8, { gap: "2", minW: "0", children: [
1915
+ /* @__PURE__ */ jsx9(Text9, { as: "span", fontWeight: "semibold", truncate: true, children: where.href ? /* @__PURE__ */ jsx9(AppLink4, { href: where.href, children: where.label }) : where.label }),
1916
+ where.code && /* @__PURE__ */ jsx9(RecordKey4, { value: where.code, variant: "muted" })
1917
+ ] });
1918
+ }
1919
+ },
1920
+ { id: "since", header: t("since"), nowrap: true, cell: (g) => /* @__PURE__ */ jsx9(Text9, { as: "span", color: "fg.muted", children: fmt.dateTime(g.createdAt, { dateStyle: "medium" }) }) },
1921
+ {
1922
+ id: "actions",
1923
+ header: /* @__PURE__ */ jsx9(Text9, { as: "span", srOnly: true, children: t("actions") }),
1924
+ align: "end",
1925
+ cell: (g) => {
1926
+ const place = g.scopeKey ? placeOf.get(g.scopeKey) : void 0;
1927
+ return /* @__PURE__ */ jsx9(
1928
+ RowMenu,
1929
+ {
1930
+ label: t("menuLabel", { role: grantRole(g), scope: whereOf(g).label }),
1931
+ items: [
1932
+ { id: "change", label: t("change"), icon: /* @__PURE__ */ jsx9(Pencil, {}), disabled: !place, onSelect: () => place && open({ mode: "change", grant: g, place }) },
1933
+ ...place ? [] : [{ note: t("notListed") }],
1934
+ { separator: true },
1935
+ { id: "remove", label: t("revoke"), icon: /* @__PURE__ */ jsx9(Trash2, {}), danger: true, onSelect: () => void remove(g) }
1936
+ ]
1937
+ }
1938
+ );
1939
+ }
1940
+ }
1941
+ ]
1942
+ }
1943
+ ) }),
1944
+ /* @__PURE__ */ jsxs9(
1945
+ FormDialog,
1946
+ {
1947
+ open: editing !== null,
1948
+ onOpenChange: (o) => {
1949
+ if (!o) setEditing(null);
1950
+ },
1951
+ title: shown.mode === "change" ? t("changeTitle", { scope: shown.place.label }) : t("dialogTitle"),
1952
+ submitLabel: shown.mode === "change" ? t("change") : t("give"),
1953
+ submitDisabled: unchanged,
1954
+ onSubmit: save,
1955
+ busy: action.busy,
1956
+ error: action.error,
1957
+ preview: /* @__PURE__ */ jsx9(
1958
+ PreviewCard,
1959
+ {
1960
+ media: /* @__PURE__ */ jsx9(IconTile, { size: "md", children: /* @__PURE__ */ jsx9(Globe, {}) }),
1961
+ title: t("who"),
1962
+ subtitle: chosenRole ? nameOf(chosenRole) : void 0,
1963
+ items: [
1964
+ { label: t("scope"), value: previewWhere },
1965
+ { label: t("can"), wrap: true, value: chosenRole ? describe(chosenRole) : void 0 }
1966
+ ]
1967
+ }
1968
+ ),
1969
+ children: [
1970
+ /* @__PURE__ */ jsx9(Field2, { label: t("role"), required: true, children: /* @__PURE__ */ jsx9(
1971
+ SelectField2,
1972
+ {
1973
+ value: roleId,
1974
+ onChange: (e) => {
1975
+ const next = e.target.value;
1976
+ setRoleId(next);
1977
+ if (shown.mode === "give") setScopeKey(placeKept(places.data ?? [], scopeKey, next, taken));
1978
+ },
1979
+ options: [{ value: "", label: t("chooseRole") }, ...roleOptions.map((r) => ({ value: r.id, label: nameOf(r) }))]
1980
+ }
1981
+ ) }),
1982
+ shown.mode === "change" ? (
1983
+ // The place a change keeps: a label and its value, not a field (there's nothing to fill in).
1984
+ /* @__PURE__ */ jsxs9(Stack7, { gap: "1.5", children: [
1985
+ /* @__PURE__ */ jsx9(Text9, { id: "anonymous-change-where", textStyle: "label", children: t("scope") }),
1986
+ /* @__PURE__ */ jsx9(Text9, { textStyle: "body.sm", "aria-labelledby": "anonymous-change-where", children: whereLabel(shown.place) })
1987
+ ] })
1988
+ ) : /* @__PURE__ */ jsx9(Field2, { label: t("scope"), required: true, children: /* @__PURE__ */ jsx9(
1989
+ SelectField2,
1990
+ {
1991
+ value: scopeKey,
1992
+ onChange: (e) => setScopeKey(e.target.value),
1993
+ options: [{ value: "", label: t("chooseWhere") }, ...placeOptions.map((p) => ({ value: p.scopeKey, label: whereLabel(p) }))]
1994
+ }
1995
+ ) }),
1996
+ /* @__PURE__ */ jsx9(InlineAlert6, { tone: "warning", children: t("warning") })
1997
+ ]
1998
+ }
1999
+ )
2000
+ ] });
2001
+ }
2002
+
2003
+ // src/areas/guard/DirectoriesScreen.tsx
2004
+ import { useMemo as useMemo2, useState as useState6 } from "react";
2005
+ import { chakra, Stack as Stack9, Text as Text11 } from "@chakra-ui/react";
2006
+ import { ArrowDown, ArrowUp, ExternalLink, FolderTree, Pencil as Pencil2, Power, PowerOff, RefreshCw, Trash2 as Trash22 } from "lucide-react";
2007
+ import {
2008
+ Button as Button9,
2009
+ DataTable as DataTable7,
2010
+ FormDialog as FormDialog2,
2011
+ IconTile as IconTile2,
2012
+ InlineAlert as InlineAlert8,
2013
+ Loading as Loading2,
2014
+ PageHeader as PageHeader4,
2015
+ Panel as Panel8,
2016
+ PreviewCard as PreviewCard2,
2017
+ RowMenu as RowMenu2,
2018
+ StatusPill as StatusPill7,
2019
+ errorText as errorText4,
2020
+ useApiAction as useApiAction7,
2021
+ useApiQuery as useApiQuery6,
2022
+ useAreaRequest as useAreaRequest8,
2023
+ useConfirm as useConfirm3,
2024
+ useNavigate as useNavigate2
2025
+ } from "@abpjs/ui";
2026
+
2027
+ // src/areas/guard/DirectoryForm.tsx
2028
+ import { useState as useState5 } from "react";
2029
+ import { Fieldset, HStack as HStack9, Input as Input3, InputGroup, SimpleGrid as SimpleGrid2, Stack as Stack8, Text as Text10 } from "@chakra-ui/react";
2030
+ import { Button as Button8, errorText as errorText3, Field as Field3, HostSlot as HostSlot2, InlineAlert as InlineAlert7, SelectField as SelectField3, SwitchField, TranslatedInput as TranslatedInput2 } from "@abpjs/ui";
2031
+
2032
+ // src/areas/guard/directoryRules.ts
2033
+ var MASKED_SECRET = "********";
2034
+ function editInput(dir, secretNames = /* @__PURE__ */ new Set()) {
2035
+ const settings = {};
2036
+ for (const [k, v] of Object.entries(dir.settings)) settings[k] = secretNames.has(k) || v === MASKED_SECRET ? "" : v;
2037
+ const minutes = dir.syncIntervalMinutes === null || dir.syncIntervalMinutes === "" ? null : Number(dir.syncIntervalMinutes);
2038
+ return {
2039
+ name: dir.name,
2040
+ names: dir.names,
2041
+ type: dir.type,
2042
+ isActive: dir.isActive,
2043
+ authenticationEnabled: dir.authenticationEnabled,
2044
+ // 0 is "on request" as empty is: kept as empty, so the field's minimum of 1 doesn't stop a save.
2045
+ syncIntervalMinutes: minutes !== null && Number.isFinite(minutes) && minutes > 0 ? minutes : null,
2046
+ settings
2047
+ };
2048
+ }
2049
+ function syncs(capabilities) {
2050
+ return (capabilities ?? []).some((c) => c === "Sync" || c === "IncrementalSync");
2051
+ }
2052
+ function moved(ids, id, delta) {
2053
+ const out = [...ids];
2054
+ const i = out.indexOf(id);
2055
+ const j = i + delta;
2056
+ if (i < 0 || j < 0 || j >= out.length) return out;
2057
+ [out[i], out[j]] = [out[j], out[i]];
2058
+ return out;
2059
+ }
2060
+ function forType(input, capabilities) {
2061
+ return syncs(capabilities) ? input : { ...input, syncIntervalMinutes: null };
2062
+ }
2063
+
2064
+ // src/areas/guard/DirectoryForm.tsx
2065
+ import { fromNamesValue, toNamesValue } from "@abpjs/ui/rules";
2066
+ import { jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
2067
+ function defaultsFor(type) {
2068
+ const out = {};
2069
+ for (const s of type?.settings ?? []) out[s.name] = s.defaultValue ?? "";
2070
+ return out;
2071
+ }
2072
+ function DirectoryForm({ mode, types, initial, onSubmit, onCancel, fallbackSettings }) {
2073
+ const t = useGuardNs("directoryForm");
2074
+ const tc = useGuardNs("common");
2075
+ const [input, setInput] = useState5(initial);
2076
+ const [error, setError] = useState5(null);
2077
+ const [busy, setBusy] = useState5(false);
2078
+ async function submit(e) {
2079
+ e.preventDefault();
2080
+ setBusy(true);
2081
+ setError(null);
2082
+ try {
2083
+ await onSubmit(input);
2084
+ } catch (err) {
2085
+ setError(errorText3(err));
2086
+ } finally {
2087
+ setBusy(false);
2088
+ }
2089
+ }
2090
+ return /* @__PURE__ */ jsx10("form", { onSubmit: submit, children: /* @__PURE__ */ jsxs10(Stack8, { gap: "field", children: [
2091
+ /* @__PURE__ */ jsx10(DirectoryFields, { mode, types, input, onChange: setInput, fallbackSettings }),
2092
+ /* @__PURE__ */ jsx10(InlineAlert7, { tone: "danger", children: error }),
2093
+ /* @__PURE__ */ jsxs10(HStack9, { gap: "2", children: [
2094
+ /* @__PURE__ */ jsx10(Button8, { type: "submit", variant: "primary", loading: busy, disabled: !input.type, children: mode === "create" ? t("create") : t("save") }),
2095
+ onCancel && /* @__PURE__ */ jsx10(Button8, { variant: "cancel", onClick: onCancel, children: tc("cancel") })
2096
+ ] })
2097
+ ] }) });
2098
+ }
2099
+ function DirectoryFields({ mode, types, input, onChange, fallbackSettings, compact }) {
2100
+ const t = useGuardNs("directoryForm");
2101
+ const type = types.find((x) => x.type === input.type);
2102
+ const definitions = type?.settings ?? fallbackSettings ?? [];
2103
+ const columns = compact ? 1 : { base: 1, md: 2 };
2104
+ function set(key, value) {
2105
+ onChange((prev) => ({ ...prev, [key]: value }));
2106
+ }
2107
+ function setSetting(name, value) {
2108
+ onChange((prev) => ({ ...prev, settings: { ...prev.settings, [name]: value } }));
2109
+ }
2110
+ function changeType(next) {
2111
+ const nextType = types.find((x) => x.type === next);
2112
+ onChange((prev) => forType({ ...prev, type: next, settings: defaultsFor(nextType) }, nextType?.capabilities ?? ["Sync"]));
2113
+ }
2114
+ function applyPreset(settings) {
2115
+ onChange((prev) => ({ ...prev, settings: { ...prev.settings, ...settings } }));
2116
+ }
2117
+ return /* @__PURE__ */ jsxs10(Stack8, { gap: "field", children: [
2118
+ /* @__PURE__ */ jsxs10(SimpleGrid2, { columns, gap: "field", children: [
2119
+ /* @__PURE__ */ jsx10(Field3, { label: t("name"), required: true, children: /* @__PURE__ */ jsx10(
2120
+ TranslatedInput2,
2121
+ {
2122
+ value: toNamesValue(input.name, input.names),
2123
+ "aria-label": t("name"),
2124
+ placeholder: t("namePlaceholder"),
2125
+ onChange: (v) => {
2126
+ const { name, names } = fromNamesValue(v);
2127
+ onChange((prev) => ({ ...prev, name, names }));
2128
+ }
2129
+ }
2130
+ ) }),
2131
+ /* @__PURE__ */ jsx10(Field3, { label: t("type"), required: true, children: mode === "create" ? /* @__PURE__ */ jsx10(
2132
+ SelectField3,
2133
+ {
2134
+ value: input.type,
2135
+ onChange: (e) => changeType(e.target.value),
2136
+ options: [
2137
+ { value: "", label: t("selectType") },
2138
+ ...types.map((x) => ({
2139
+ value: x.type,
2140
+ label: x.pluginKey ? t("typeFromPlugin", { name: x.displayName, plugin: x.pluginKey }) : x.displayName
2141
+ }))
2142
+ ]
2143
+ }
2144
+ ) : /* @__PURE__ */ jsx10(Input3, { value: type?.displayName ?? input.type, readOnly: true }) }),
2145
+ (!type || syncs(type.capabilities)) && /* @__PURE__ */ jsx10(Field3, { label: t("syncInterval"), children: /* @__PURE__ */ jsx10(InputGroup, { endAddon: t("minutes"), children: /* @__PURE__ */ jsx10(
2146
+ Input3,
2147
+ {
2148
+ type: "number",
2149
+ min: 1,
2150
+ value: input.syncIntervalMinutes ?? "",
2151
+ placeholder: t("syncIntervalHint"),
2152
+ onChange: (e) => set("syncIntervalMinutes", e.target.value === "" ? null : Number(e.target.value))
2153
+ }
2154
+ ) }) }),
2155
+ /* @__PURE__ */ jsxs10(Stack8, { gap: "3", justify: "flex-end", pb: "1", children: [
2156
+ /* @__PURE__ */ jsx10(SwitchField, { label: t("active"), checked: input.isActive, onCheckedChange: (v) => set("isActive", v) }),
2157
+ /* @__PURE__ */ jsx10(SwitchField, { label: t("signInEnabled"), checked: input.authenticationEnabled, onCheckedChange: (v) => set("authenticationEnabled", v) })
2158
+ ] })
2159
+ ] }),
2160
+ !compact && type && type.capabilities.length > 0 && /* @__PURE__ */ jsx10(Text10, { textStyle: "caption", color: "fg.muted", children: t("capabilities", { list: type.capabilities.join(", ") }) }),
2161
+ definitions.length > 0 && /* @__PURE__ */ jsxs10(Fieldset.Root, { layerStyle: "sunken", p: "panel", children: [
2162
+ /* @__PURE__ */ jsx10(Fieldset.Legend, { textStyle: "label", px: "1", children: t("connectionSettings") }),
2163
+ /* @__PURE__ */ jsxs10(Fieldset.Content, { gap: "field", children: [
2164
+ input.type && /* @__PURE__ */ jsx10(HostSlot2, { name: "guard.directory.presets", context: { type: input.type, apply: applyPreset } }),
2165
+ /* @__PURE__ */ jsx10(SimpleGrid2, { columns, gap: "field", children: definitions.map((d) => /* @__PURE__ */ jsx10(Field3, { label: d.label || d.name, helperText: d.help ?? void 0, required: d.required && !(d.secret && mode === "edit"), children: /* @__PURE__ */ jsx10(
2166
+ Input3,
2167
+ {
2168
+ type: d.secret ? "password" : "text",
2169
+ autoComplete: d.secret ? "new-password" : "off",
2170
+ value: input.settings?.[d.name] ?? "",
2171
+ placeholder: d.secret && mode === "edit" ? t("keepSecret") : d.defaultValue ?? "",
2172
+ dir: "auto",
2173
+ onChange: (e) => setSetting(d.name, e.target.value)
2174
+ }
2175
+ ) }, d.name)) })
2176
+ ] })
2177
+ ] })
2178
+ ] });
2179
+ }
2180
+ function DirectoryWarnings({ title, warnings }) {
2181
+ if (!warnings || warnings.length === 0) return null;
2182
+ return /* @__PURE__ */ jsx10(InlineAlert7, { tone: "warning", title, "data-testid": "directory-warnings", children: /* @__PURE__ */ jsx10(Stack8, { gap: "0.5", as: "ul", listStyle: "none", children: warnings.map((w) => /* @__PURE__ */ jsx10("li", { children: /* @__PURE__ */ jsx10(Text10, { dir: "auto", children: w }) }, w)) }) });
2183
+ }
2184
+
2185
+ // src/areas/guard/DirectoriesScreen.tsx
2186
+ import { Fragment as Fragment4, jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
2187
+ var EMPTY_INPUT = {
2188
+ name: "",
2189
+ type: "",
2190
+ isActive: true,
2191
+ authenticationEnabled: true,
2192
+ syncIntervalMinutes: 60,
2193
+ settings: {}
2194
+ };
2195
+ function DirectoriesScreen({ routes = guardRoutes() }) {
2196
+ const t = useGuardNs("directories");
2197
+ const tf = useGuardNs("directoryForm");
2198
+ const td = useGuardNs("directoryDetail");
2199
+ const tc = useGuardNs("common");
2200
+ const request = useAreaRequest8("guard");
2201
+ const navigate = useNavigate2();
2202
+ const confirm = useConfirm3();
2203
+ const dirs = useApiQuery6("guard", "/directories");
2204
+ const types = useApiQuery6("guard", "/directory-types");
2205
+ const action = useApiAction7();
2206
+ const dialog = useApiAction7();
2207
+ const [editing, setEditing] = useState6(null);
2208
+ const [shown, setShown] = useState6({ mode: "create" });
2209
+ const [input, setInput] = useState6(EMPTY_INPUT);
2210
+ const [notice, setNotice] = useState6(null);
2211
+ const [syncing, setSyncing] = useState6(null);
2212
+ const [warned, setWarned] = useState6(null);
2213
+ const list = dirs.data ?? [];
2214
+ const allTypes = useMemo2(
2215
+ () => [{ type: "internal", displayName: t("internalType"), capabilities: ["Authenticate"], settings: [], pluginKey: null }, ...types.data ?? []],
2216
+ [types.data, t]
2217
+ );
2218
+ const typeOf = (type2) => allTypes.find((x) => x.type === type2);
2219
+ const typeName = (type2, displayName) => type2 === "internal" ? t("internal") : displayName || typeOf(type2)?.displayName || type2;
2220
+ const secretsOf = (type2) => new Set((typeOf(type2)?.settings ?? []).filter((s) => s.secret).map((s) => s.name));
2221
+ const typesReady = types.data !== void 0;
2222
+ function open(next) {
2223
+ setEditing(next);
2224
+ setShown(next);
2225
+ setInput(next.mode === "edit" ? editInput(next.dir, secretsOf(next.dir.type)) : EMPTY_INPUT);
2226
+ dialog.setError(null);
2227
+ }
2228
+ async function save() {
2229
+ if (!editing) return;
2230
+ const body = forType(input, typeOf(input.type)?.capabilities);
2231
+ const saved = await dialog.run(
2232
+ () => editing.mode === "create" ? request("/directories", { method: "POST", body }) : request(`/directories/${editing.dir.id}`, { method: "PUT", body })
2233
+ );
2234
+ if (!saved) return;
2235
+ setWarned((saved.warnings ?? []).length > 0 ? saved : null);
2236
+ setEditing(null);
2237
+ await dirs.reload();
2238
+ }
2239
+ async function remove(d, from) {
2240
+ if (!await confirm({ title: td("deleteTitle", { name: d.name }), description: td("deleteDescription"), confirmLabel: tc("delete"), danger: true })) return;
2241
+ const run = from === "dialog" ? dialog : action;
2242
+ const done = await run.run(async () => {
2243
+ await request(`/directories/${d.id}`, { method: "DELETE" });
2244
+ return true;
2245
+ });
2246
+ if (done) {
2247
+ setEditing(null);
2248
+ await dirs.reload();
2249
+ }
2250
+ }
2251
+ async function setActive(d, isActive) {
2252
+ const body = { ...editInput(d, secretsOf(d.type)), isActive };
2253
+ const saved = await action.run(() => request(`/directories/${d.id}`, { method: "PUT", body }));
2254
+ if (saved) await dirs.reload();
2255
+ }
2256
+ async function move(d, delta) {
2257
+ const ids = moved(list.map((x) => x.id), d.id, delta);
2258
+ const result = await action.run(() => request("/directories/reorder", { method: "POST", body: { directoryIds: ids } }));
2259
+ if (result) dirs.setData(result);
2260
+ }
2261
+ async function sync(d) {
2262
+ setSyncing(d.id);
2263
+ setNotice(null);
2264
+ const run = await action.run(() => request(`/directories/${d.id}/sync`, { method: "POST" }));
2265
+ setSyncing(null);
2266
+ if (run) {
2267
+ setNotice(
2268
+ run.succeeded === false ? { ok: false, text: t("syncFailed", { name: d.name, error: run.error ?? tc("unknownError") }) } : {
2269
+ ok: true,
2270
+ text: t("synced", {
2271
+ name: d.name,
2272
+ added: run.usersAdded,
2273
+ updated: run.usersUpdated,
2274
+ deactivated: run.usersDeactivated,
2275
+ groups: run.groupsSynced,
2276
+ memberships: run.membershipsSynced
2277
+ })
2278
+ }
2279
+ );
2280
+ }
2281
+ await dirs.reload();
2282
+ }
2283
+ function menu(d) {
2284
+ const i = list.indexOf(d);
2285
+ const canSync = d.connectorAvailable && syncs(typeOf(d.type)?.capabilities);
2286
+ return [
2287
+ { id: "edit", label: t("edit"), icon: /* @__PURE__ */ jsx11(Pencil2, {}), disabled: !typesReady, onSelect: () => open({ mode: "edit", dir: d }) },
2288
+ { id: "open", label: t("openPage"), icon: /* @__PURE__ */ jsx11(ExternalLink, {}), onSelect: () => navigate(routes.directory(d.id)) },
2289
+ { id: "sync", label: t("syncNow"), icon: /* @__PURE__ */ jsx11(RefreshCw, {}), disabled: !canSync || syncing != null, onSelect: () => void sync(d) },
2290
+ ...!d.connectorAvailable ? [{ note: t("connectorDisabled") }] : [],
2291
+ { separator: true },
2292
+ { id: "up", label: t("moveUp", { name: d.name }), icon: /* @__PURE__ */ jsx11(ArrowUp, {}), disabled: i <= 0 || action.busy, onSelect: () => void move(d, -1) },
2293
+ { id: "down", label: t("moveDown", { name: d.name }), icon: /* @__PURE__ */ jsx11(ArrowDown, {}), disabled: i === list.length - 1 || action.busy, onSelect: () => void move(d, 1) },
2294
+ { separator: true },
2295
+ // One write at a time: these wait, as moving does, while another is running.
2296
+ d.isActive ? { id: "deactivate", label: t("deactivate"), icon: /* @__PURE__ */ jsx11(PowerOff, {}), disabled: !typesReady || action.busy, onSelect: () => void setActive(d, false) } : { id: "activate", label: t("activate"), icon: /* @__PURE__ */ jsx11(Power, {}), disabled: !typesReady || action.busy, onSelect: () => void setActive(d, true) },
2297
+ { id: "delete", label: tc("delete"), icon: /* @__PURE__ */ jsx11(Trash22, {}), danger: true, disabled: action.busy, onSelect: () => void remove(d, "list") }
2298
+ ];
2299
+ }
2300
+ const columns = [
2301
+ // The order sign-in tries them, counted from 1 (the server's is from 0).
2302
+ { id: "order", header: t("priority"), numeric: true, width: "16", cell: (d) => list.indexOf(d) + 1 },
2303
+ {
2304
+ id: "name",
2305
+ header: tc("name"),
2306
+ cell: (d) => /* @__PURE__ */ jsxs11(Stack9, { gap: "1", align: "flex-start", children: [
2307
+ /* @__PURE__ */ jsx11(
2308
+ chakra.button,
2309
+ {
2310
+ type: "button",
2311
+ fontWeight: "semibold",
2312
+ textAlign: "start",
2313
+ color: "fg",
2314
+ _hover: { textDecoration: "underline" },
2315
+ disabled: !typesReady,
2316
+ onClick: () => open({ mode: "edit", dir: d }),
2317
+ children: d.name
2318
+ }
2319
+ ),
2320
+ !d.connectorAvailable && /* @__PURE__ */ jsx11(StatusPill7, { tone: "warning", title: d.pluginKey ? t("pluginDisabledHint", { plugin: d.pluginKey }) : void 0, children: t("connectorDisabled") }),
2321
+ d.warnings && d.warnings.length > 0 && /* @__PURE__ */ jsx11(StatusPill7, { tone: "warning", title: d.warnings.join("\n"), children: t("warnings", { count: d.warnings.length }) })
2322
+ ] })
2323
+ },
2324
+ { id: "type", header: tc("type"), cell: (d) => typeName(d.type, d.typeDisplayName) },
2325
+ { id: "active", header: tc("status"), cell: (d) => /* @__PURE__ */ jsx11(FlagPill, { value: d.isActive, yes: tc("active"), no: tc("inactive") }), skeleton: "pill" },
2326
+ { id: "signIn", header: t("signIn"), cell: (d) => /* @__PURE__ */ jsx11(FlagPill, { value: d.authenticationEnabled, yes: t("on"), no: t("off") }), skeleton: "pill" },
2327
+ { id: "users", header: tc("users"), numeric: true, cell: (d) => d.userCount },
2328
+ { id: "groups", header: tc("groups"), numeric: true, cell: (d) => d.groupCount },
2329
+ { id: "lastSync", header: t("lastSync"), cell: (d) => /* @__PURE__ */ jsx11(SyncStatus, { d }), skeleton: "pill" },
2330
+ {
2331
+ id: "actions",
2332
+ header: /* @__PURE__ */ jsx11(Text11, { as: "span", srOnly: true, children: tc("actions") }),
2333
+ align: "end",
2334
+ cell: (d) => /* @__PURE__ */ jsx11(RowMenu2, { label: t("menuLabel", { name: d.name }), items: menu(d) })
2335
+ }
2336
+ ];
2337
+ const type = typeOf(input.type);
2338
+ const synced = !!type && syncs(type.capabilities);
2339
+ const minutes = input.syncIntervalMinutes;
2340
+ return /* @__PURE__ */ jsxs11(Fragment4, { children: [
2341
+ /* @__PURE__ */ jsx11(
2342
+ PageHeader4,
2343
+ {
2344
+ title: t("title"),
2345
+ description: t("subtitle"),
2346
+ actions: /* @__PURE__ */ jsx11(Button9, { variant: "primary", onClick: () => {
2347
+ setWarned(null);
2348
+ open({ mode: "create" });
2349
+ }, children: t("add") })
2350
+ }
2351
+ ),
2352
+ /* @__PURE__ */ jsxs11(Stack9, { gap: "section", children: [
2353
+ /* @__PURE__ */ jsx11(InlineAlert8, { tone: "danger", children: action.error }),
2354
+ warned && /* @__PURE__ */ jsx11(DirectoryWarnings, { title: t("savedWithWarnings", { name: warned.name }), warnings: warned.warnings }),
2355
+ notice && /* @__PURE__ */ jsx11(InlineAlert8, { tone: notice.ok ? "success" : "warning", children: notice.text }),
2356
+ /* @__PURE__ */ jsx11(Panel8, { flush: true, children: /* @__PURE__ */ jsx11(
2357
+ DataTable7,
2358
+ {
2359
+ "aria-label": t("title"),
2360
+ columns,
2361
+ rows: dirs.data,
2362
+ getRowId: (d) => d.id,
2363
+ loading: dirs.loading,
2364
+ skeletonRows: 2,
2365
+ error: dirs.error,
2366
+ empty: t("empty")
2367
+ }
2368
+ ) })
2369
+ ] }),
2370
+ /* @__PURE__ */ jsx11(
2371
+ FormDialog2,
2372
+ {
2373
+ open: editing !== null,
2374
+ onOpenChange: (o) => {
2375
+ if (!o) setEditing(null);
2376
+ },
2377
+ title: shown.mode === "edit" ? t("editTitle") : t("newTitle"),
2378
+ submitLabel: shown.mode === "edit" ? tf("save") : tf("create"),
2379
+ onSubmit: save,
2380
+ busy: dialog.busy,
2381
+ error: dialog.error ?? (types.error ? errorText4(types.error) : null),
2382
+ dangerAction: shown.mode === "edit" ? { label: t("deleteDirectory"), disabled: dialog.busy, onClick: () => shown.mode === "edit" && void remove(shown.dir, "dialog") } : void 0,
2383
+ preview: /* @__PURE__ */ jsx11(
2384
+ PreviewCard2,
2385
+ {
2386
+ media: /* @__PURE__ */ jsx11(IconTile2, { size: "md", children: /* @__PURE__ */ jsx11(FolderTree, {}) }),
2387
+ title: input.name || /* @__PURE__ */ jsx11(Text11, { as: "span", color: "fg.muted", children: t("namePreview") }),
2388
+ subtitle: type ? typeName(type.type, type.displayName) : void 0,
2389
+ items: [
2390
+ ...type && !synced ? [] : [{ label: t("sync"), value: minutes ? t("syncEvery", { count: minutes }) : t("onRequest") }],
2391
+ { label: tc("status"), value: input.isActive ? tc("active") : tc("inactive") },
2392
+ { label: t("signIn"), value: input.authenticationEnabled ? t("on") : t("off") }
2393
+ ]
2394
+ }
2395
+ ),
2396
+ children: /* @__PURE__ */ jsx11(Loading2, { when: !types.data && !types.error, children: /* @__PURE__ */ jsx11(DirectoryFields, { compact: true, mode: shown.mode, types: allTypes, input, onChange: setInput }) })
2397
+ }
2398
+ )
2399
+ ] });
2400
+ }
2401
+
2402
+ // src/areas/guard/DirectoryScreen.tsx
2403
+ import { useMemo as useMemo3, useState as useState7 } from "react";
2404
+ import { Box, Grid, HStack as HStack10, Input as Input4, List, Stack as Stack10, Text as Text12 } from "@chakra-ui/react";
2405
+ import {
2406
+ AppLink as AppLink5,
2407
+ Button as Button10,
2408
+ DataTable as DataTable8,
2409
+ errorText as errorText5,
2410
+ Field as Field4,
2411
+ HostSlot as HostSlot3,
2412
+ InlineAlert as InlineAlert9,
2413
+ Loading as Loading3,
2414
+ PageHeader as PageHeader5,
2415
+ Panel as Panel9,
2416
+ PropertyList as PropertyList3,
2417
+ StatusPill as StatusPill8,
2418
+ TextSlot as TextSlot2,
2419
+ useApiAction as useApiAction8,
2420
+ useApiQuery as useApiQuery7,
2421
+ useAreaRequest as useAreaRequest9,
2422
+ useConfirm as useConfirm4,
2423
+ useFormatters as useFormatters7,
2424
+ useNavigate as useNavigate3
2425
+ } from "@abpjs/ui";
2426
+ import { Fragment as Fragment5, jsx as jsx12, jsxs as jsxs12 } from "react/jsx-runtime";
2427
+ var STEPS = ["Connection", "FindUser", "Authenticate", "Precedence"];
2428
+ var PLACEHOLDER = { name: "", type: "", isActive: true, authenticationEnabled: true, syncIntervalMinutes: 60, settings: {} };
2429
+ function DirectoryScreen({ id, routes = guardRoutes() }) {
2430
+ const t = useGuardNs("directoryDetail");
2431
+ const tc = useGuardNs("common");
2432
+ const tn = useGuardNs("nav");
2433
+ const fmt = useFormatters7();
2434
+ const confirm = useConfirm4();
2435
+ const navigate = useNavigate3();
2436
+ const request = useAreaRequest9("guard");
2437
+ const dirs = useApiQuery7("guard", "/directories");
2438
+ const types = useApiQuery7("guard", "/directory-types");
2439
+ const runs = useApiQuery7("guard", `/directories/${id}/sync-runs`);
2440
+ const action = useApiAction8();
2441
+ const [saved, setSaved] = useState7(false);
2442
+ const [formKey, setFormKey] = useState7(0);
2443
+ const [test, setTest] = useState7(null);
2444
+ const [syncMsg, setSyncMsg] = useState7(null);
2445
+ const dir = dirs.data?.find((d) => d.id === id);
2446
+ const type = types.data?.find((x) => x.type === dir?.type);
2447
+ const secretNames = useMemo3(() => new Set((type?.settings ?? []).filter((s) => s.secret).map((s) => s.name)), [type]);
2448
+ const initial = useMemo3(() => dir ? editInput(dir, secretNames) : null, [dir, secretNames]);
2449
+ const fallbackSettings = useMemo3(
2450
+ () => Object.keys(dir?.settings ?? {}).map((name) => ({
2451
+ name,
2452
+ label: name,
2453
+ required: false,
2454
+ secret: dir?.settings[name] === MASKED_SECRET,
2455
+ defaultValue: null,
2456
+ help: null
2457
+ })),
2458
+ [dir]
2459
+ );
2460
+ async function save(input) {
2461
+ setSaved(false);
2462
+ const updated = await request(`/directories/${id}`, { method: "PUT", body: input });
2463
+ if (dirs.data) dirs.setData(dirs.data.map((d) => d.id === updated.id ? updated : d));
2464
+ await dirs.reload();
2465
+ setFormKey((k) => k + 1);
2466
+ setSaved(true);
2467
+ }
2468
+ async function testConnection() {
2469
+ setTest(null);
2470
+ const r = await action.run(() => request(`/directories/${id}/test`, { method: "POST" }));
2471
+ if (r) setTest(r);
2472
+ }
2473
+ async function syncNow() {
2474
+ setSyncMsg(null);
2475
+ const run = await action.run(() => request(`/directories/${id}/sync`, { method: "POST" }));
2476
+ if (run)
2477
+ setSyncMsg(
2478
+ run.succeeded === false ? { ok: false, text: t("syncFailed", { error: run.error ?? tc("unknownError") }) } : { ok: true, text: t("syncCompleted") }
2479
+ );
2480
+ await Promise.all([runs.reload(), dirs.reload()]);
2481
+ }
2482
+ async function remove() {
2483
+ if (!dir) return;
2484
+ const ok = await confirm({ title: t("deleteTitle", { name: dir.name }), description: t("deleteDescription"), confirmLabel: tc("delete"), danger: true });
2485
+ if (!ok) return;
2486
+ const done = await action.run(async () => {
2487
+ await request(`/directories/${id}`, { method: "DELETE" });
2488
+ return true;
2489
+ });
2490
+ if (done) navigate(routes.directories);
2491
+ }
2492
+ if (dirs.error) return /* @__PURE__ */ jsx12(InlineAlert9, { tone: "danger", children: dirs.error });
2493
+ const loading = !dirs.data || !types.data;
2494
+ if (!loading && (!dir || !initial))
2495
+ return /* @__PURE__ */ jsxs12(Fragment5, { children: [
2496
+ /* @__PURE__ */ jsx12(PageHeader5, { breadcrumbs: [{ label: tn("directories"), href: routes.directories }], title: t("notFound") }),
2497
+ /* @__PURE__ */ jsx12(AppLink5, { href: routes.directories, children: t("back") })
2498
+ ] });
2499
+ const runColumns = [
2500
+ { id: "started", header: t("started"), nowrap: true, cell: (r) => fmt.dateTime(r.startedAt), skeleton: "date", skeletonWidth: 17 },
2501
+ { id: "finished", header: t("finished"), nowrap: true, cell: (r) => fmt.dateTime(r.finishedAt), skeleton: "date", skeletonWidth: 17 },
2502
+ { id: "result", header: t("result"), cell: (r) => /* @__PURE__ */ jsx12(SyncResultPill, { succeeded: r.succeeded ?? null }), skeleton: "pill" },
2503
+ { id: "added", header: t("added"), numeric: true, cell: (r) => r.usersAdded },
2504
+ { id: "updated", header: t("updated"), numeric: true, cell: (r) => r.usersUpdated },
2505
+ { id: "deactivated", header: t("deactivated"), numeric: true, cell: (r) => r.usersDeactivated },
2506
+ { id: "groups", header: tc("groups"), numeric: true, cell: (r) => r.groupsSynced },
2507
+ { id: "memberships", header: t("memberships"), numeric: true, cell: (r) => r.membershipsSynced },
2508
+ {
2509
+ id: "error",
2510
+ header: t("error"),
2511
+ cell: (r) => r.error && /* @__PURE__ */ jsx12(Text12, { as: "span", textStyle: "caption", color: "fg.danger", wordBreak: "break-word", maxW: "xs", display: "block", children: r.error })
2512
+ }
2513
+ ];
2514
+ return /* @__PURE__ */ jsxs12(Loading3, { when: loading, children: [
2515
+ /* @__PURE__ */ jsx12(
2516
+ PageHeader5,
2517
+ {
2518
+ breadcrumbs: [{ label: tn("directories"), href: routes.directories }, { label: dir?.name }],
2519
+ title: dir?.name,
2520
+ meta: /* @__PURE__ */ jsxs12(Fragment5, { children: [
2521
+ /* @__PURE__ */ jsx12(Text12, { as: "span", children: /* @__PURE__ */ jsx12(TextSlot2, { width: 8, children: dir && (dir.typeDisplayName || dir.type) }) }),
2522
+ /* @__PURE__ */ jsx12(Text12, { as: "span", children: /* @__PURE__ */ jsx12(TextSlot2, { width: 8, children: dir && t("order", { order: dir.order }) }) }),
2523
+ dir ? /* @__PURE__ */ jsx12(FlagPill, { value: dir.isActive, yes: tc("active"), no: tc("inactive") }) : /* @__PURE__ */ jsx12(StatusPill8, {}),
2524
+ dir ? /* @__PURE__ */ jsx12(FlagPill, { value: dir.authenticationEnabled, yes: t("signInEnabled"), no: t("signInDisabled") }) : /* @__PURE__ */ jsx12(StatusPill8, {}),
2525
+ dir && !dir.connectorAvailable && /* @__PURE__ */ jsx12(StatusPill8, { tone: "warning", children: t("connectorDisabled") })
2526
+ ] }),
2527
+ actions: /* @__PURE__ */ jsxs12(Fragment5, { children: [
2528
+ /* @__PURE__ */ jsx12(Button10, { onClick: testConnection, disabled: action.busy || dir?.connectorAvailable === false, children: t("testConnection") }),
2529
+ /* @__PURE__ */ jsx12(Button10, { onClick: syncNow, disabled: action.busy || dir?.connectorAvailable === false, children: t("syncNow") }),
2530
+ dir?.type !== "internal" && /* @__PURE__ */ jsx12(Button10, { danger: true, onClick: remove, disabled: action.busy, children: tc("delete") })
2531
+ ] })
2532
+ }
2533
+ ),
2534
+ /* @__PURE__ */ jsxs12(Stack10, { gap: "section", children: [
2535
+ /* @__PURE__ */ jsx12(InlineAlert9, { tone: "danger", children: action.error }),
2536
+ dir && /* @__PURE__ */ jsx12(DirectoryWarnings, { title: t("warningsTitle"), warnings: dir.warnings }),
2537
+ test && /* @__PURE__ */ jsxs12(InlineAlert9, { tone: test.succeeded ? "success" : "warning", title: test.succeeded ? t("connectionSucceeded") : t("connectionFailed"), children: [
2538
+ test.message,
2539
+ test.succeeded && test.usersFound != null && test.groupsFound != null && ` ${t("found", { users: num(test.usersFound), groups: num(test.groupsFound) })}`
2540
+ ] }),
2541
+ syncMsg && /* @__PURE__ */ jsx12(InlineAlert9, { tone: syncMsg.ok ? "success" : "warning", children: syncMsg.text }),
2542
+ /* @__PURE__ */ jsxs12(Grid, { templateColumns: { base: "minmax(0, 1fr)", lg: "minmax(0, 1fr) {sizes.sidePanel}" }, gap: "section", alignItems: "start", children: [
2543
+ /* @__PURE__ */ jsx12(Panel9, { title: t("settings"), children: /* @__PURE__ */ jsxs12(Stack10, { gap: "field", children: [
2544
+ saved && /* @__PURE__ */ jsx12(InlineAlert9, { tone: "success", children: t("saved") }),
2545
+ /* @__PURE__ */ jsx12(
2546
+ DirectoryForm,
2547
+ {
2548
+ mode: "edit",
2549
+ types: types.data ?? [],
2550
+ initial: initial ?? PLACEHOLDER,
2551
+ onSubmit: save,
2552
+ fallbackSettings
2553
+ },
2554
+ loading ? "loading" : formKey
2555
+ )
2556
+ ] }) }),
2557
+ /* @__PURE__ */ jsxs12(Stack10, { gap: "section", children: [
2558
+ /* @__PURE__ */ jsx12(Panel9, { title: t("summary"), children: /* @__PURE__ */ jsx12(
2559
+ PropertyList3,
2560
+ {
2561
+ size: "sm",
2562
+ items: [
2563
+ { label: tc("users"), value: dir && fmt.number(num(dir.userCount)) },
2564
+ { label: tc("groups"), value: dir && fmt.number(num(dir.groupCount)) },
2565
+ {
2566
+ label: t("syncInterval"),
2567
+ value: dir && (dir.syncIntervalMinutes ? t("minutes", { count: num(dir.syncIntervalMinutes) }) : t("onDemand"))
2568
+ },
2569
+ { label: t("plugin"), value: dir && (dir.pluginKey ?? t("builtIn")) },
2570
+ { label: t("lastSync"), value: dir && /* @__PURE__ */ jsx12(SyncStatus, { d: dir }) }
2571
+ ]
2572
+ }
2573
+ ) }),
2574
+ /* @__PURE__ */ jsx12(TestLoginPanel, { directoryId: id, disabled: dir?.connectorAvailable === false })
2575
+ ] })
2576
+ ] }),
2577
+ dir && /* @__PURE__ */ jsx12(HostSlot3, { name: "guard.directory.panel", context: { directoryId: dir.id, directoryType: dir.type } }),
2578
+ /* @__PURE__ */ jsx12(Panel9, { title: t("syncRuns"), flush: true, children: /* @__PURE__ */ jsx12(
2579
+ DataTable8,
2580
+ {
2581
+ "aria-label": t("syncRuns"),
2582
+ size: "sm",
2583
+ columns: runColumns,
2584
+ rows: runs.data,
2585
+ getRowId: (r) => r.id,
2586
+ loading: runs.loading,
2587
+ error: runs.error,
2588
+ empty: t("noRuns"),
2589
+ stickyHeader: true,
2590
+ maxHeight: "md"
2591
+ }
2592
+ ) })
2593
+ ] })
2594
+ ] });
2595
+ }
2596
+ function TestLoginPanel({ directoryId, disabled }) {
2597
+ const t = useGuardNs("directoryDetail");
2598
+ const tc = useGuardNs("common");
2599
+ const ts = useGuardNs("directoryDetail.steps");
2600
+ const request = useAreaRequest9("guard");
2601
+ const [username, setUsername] = useState7("");
2602
+ const [password, setPassword] = useState7("");
2603
+ const [result, setResult] = useState7(null);
2604
+ const [error, setError] = useState7(null);
2605
+ const [busy, setBusy] = useState7(false);
2606
+ async function submit(e) {
2607
+ e.preventDefault();
2608
+ setBusy(true);
2609
+ setError(null);
2610
+ setResult(null);
2611
+ try {
2612
+ setResult(await request(`/directories/${directoryId}/test-login`, { method: "POST", body: { username, password } }));
2613
+ } catch (err) {
2614
+ setError(errorText5(err));
2615
+ } finally {
2616
+ setBusy(false);
2617
+ }
2618
+ }
2619
+ const known = new Set(STEPS);
2620
+ const rows = result ? [
2621
+ ...STEPS.map((step) => ({ step, label: ts(step), r: result.steps.find((s) => s.step === step) })),
2622
+ ...result.steps.filter((s) => !known.has(s.step)).map((s) => ({ step: s.step, label: s.step, r: s }))
2623
+ ] : [];
2624
+ return /* @__PURE__ */ jsx12(Panel9, { title: t("testLogin"), description: t("testLoginHint"), children: /* @__PURE__ */ jsxs12(Stack10, { gap: "stack", children: [
2625
+ /* @__PURE__ */ jsx12("form", { onSubmit: submit, children: /* @__PURE__ */ jsxs12(Stack10, { gap: "stack", children: [
2626
+ /* @__PURE__ */ jsx12(Field4, { label: tc("username"), required: true, children: /* @__PURE__ */ jsx12(Input4, { size: "sm", value: username, onChange: (e) => setUsername(e.target.value), autoComplete: "off" }) }),
2627
+ /* @__PURE__ */ jsx12(Field4, { label: tc("password"), required: true, children: /* @__PURE__ */ jsx12(Input4, { size: "sm", type: "password", value: password, onChange: (e) => setPassword(e.target.value), autoComplete: "new-password" }) }),
2628
+ /* @__PURE__ */ jsx12(Button10, { type: "submit", size: "sm", w: "full", loading: busy, disabled, children: t("runTest") })
2629
+ ] }) }),
2630
+ /* @__PURE__ */ jsx12(InlineAlert9, { tone: "danger", size: "sm", children: error }),
2631
+ result && /* @__PURE__ */ jsx12(List.Root, { as: "ol", gap: "2", listStyle: "none", "aria-label": t("testSteps"), children: rows.map(({ step, label, r }) => /* @__PURE__ */ jsx12(List.Item, { layerStyle: "sunken", px: "3", py: "2", children: /* @__PURE__ */ jsxs12(Box, { w: "full", children: [
2632
+ /* @__PURE__ */ jsxs12(HStack10, { justify: "space-between", gap: "2", children: [
2633
+ /* @__PURE__ */ jsx12(Text12, { textStyle: "label", children: label }),
2634
+ /* @__PURE__ */ jsx12(PassFail, { ok: r ? r.succeeded : null })
2635
+ ] }),
2636
+ r?.message && /* @__PURE__ */ jsx12(Text12, { textStyle: "caption", color: "fg.muted", mt: "1", children: r.message })
2637
+ ] }) }, step)) })
2638
+ ] }) });
2639
+ }
2640
+
2641
+ // src/areas/guard/GroupScreen.tsx
2642
+ import { useEffect, useState as useState10 } from "react";
2643
+ import { Grid as Grid2, HStack as HStack13, Input as Input5, List as List3, Stack as Stack12, Text as Text15, Textarea } from "@chakra-ui/react";
2644
+ import {
2645
+ AppLink as AppLink7,
2646
+ Button as Button11,
2647
+ DataTable as DataTable9,
2648
+ errorText as errorText8,
2649
+ Field as Field5,
2650
+ InlineAlert as InlineAlert11,
2651
+ Loading as Loading4,
2652
+ notify as notify7,
2653
+ PageHeader as PageHeader6,
2654
+ Panel as Panel11,
2655
+ PathChips as PathChips2,
2656
+ RecordKey as RecordKey5,
2657
+ SearchInput as SearchInput2,
2658
+ StatusPill as StatusPill10,
2659
+ TextBone,
2660
+ TextSlot as TextSlot3,
2661
+ TranslatedInput as TranslatedInput3,
2662
+ useApiAction as useApiAction9,
2663
+ useApiQuery as useApiQuery8,
2664
+ useAreaRequest as useAreaRequest12,
2665
+ useConfirm as useConfirm5,
2666
+ useNavigate as useNavigate4,
2667
+ useSettledValue
2668
+ } from "@abpjs/ui";
2669
+ import { fromNamesValue as fromNamesValue2, splitList, toNamesValue as toNamesValue2 } from "@abpjs/ui/rules";
2670
+
2671
+ // src/areas/guard/GroupTree.tsx
2672
+ import { useState as useState8 } from "react";
2673
+ import { Box as Box2, HStack as HStack11, List as List2, Text as Text13 } from "@chakra-ui/react";
2674
+ import { ChevronDown, ChevronRight } from "lucide-react";
2675
+ import { AppLink as AppLink6, DirectionalIcon, errorText as errorText6, IconButton, StatusPill as StatusPill9, useAreaRequest as useAreaRequest10 } from "@abpjs/ui";
2676
+ import { jsx as jsx13, jsxs as jsxs13 } from "react/jsx-runtime";
2677
+ function GroupTree({ rootId, rootName, rootMembers, routes = guardRoutes() }) {
2678
+ return /* @__PURE__ */ jsxs13(Box2, { textStyle: "md", role: "tree", "aria-label": rootName, children: [
2679
+ /* @__PURE__ */ jsx13(Text13, { fontWeight: "medium", children: rootName }),
2680
+ /* @__PURE__ */ jsx13(Children, { members: rootMembers, ancestors: [rootId], routes })
2681
+ ] });
2682
+ }
2683
+ function Children({ members, ancestors, routes }) {
2684
+ const t = useGuardNs("groupDetail");
2685
+ const groups = members.filter((m) => m.memberType === "Group");
2686
+ const accountCount = members.length - groups.length;
2687
+ return /* @__PURE__ */ jsxs13(List2.Root, { role: "group", listStyle: "none", ms: "2", ps: "3", borderInlineStartWidth: "1px", borderColor: "border", gap: "0.5", py: "0.5", children: [
2688
+ groups.map((g) => /* @__PURE__ */ jsx13(Node, { member: g, ancestors, routes }, g.memberId)),
2689
+ accountCount > 0 && /* @__PURE__ */ jsx13(List2.Item, { textStyle: "caption", color: "fg.muted", ps: "6", children: t("accountCount", { count: accountCount }) })
2690
+ ] });
2691
+ }
2692
+ function Node({ member, ancestors, routes }) {
2693
+ const t = useGuardNs("groupDetail");
2694
+ const request = useAreaRequest10("guard");
2695
+ const [open, setOpen] = useState8(false);
2696
+ const [detail, setDetail] = useState8(null);
2697
+ const [error, setError] = useState8(null);
2698
+ const cyclic = ancestors.includes(member.memberId);
2699
+ async function toggle() {
2700
+ const next = !open;
2701
+ setOpen(next);
2702
+ if (next && !detail) {
2703
+ try {
2704
+ setError(null);
2705
+ setDetail(await request(`/groups/${member.memberId}`));
2706
+ } catch (e) {
2707
+ setError(errorText6(e));
2708
+ }
2709
+ }
2710
+ }
2711
+ return /* @__PURE__ */ jsxs13(List2.Item, { role: "treeitem", "aria-expanded": cyclic ? void 0 : open, display: "block", children: [
2712
+ /* @__PURE__ */ jsxs13(HStack11, { gap: "1", children: [
2713
+ cyclic ? /* @__PURE__ */ jsx13(Box2, { boxSize: "control.xs", flexShrink: "0" }) : /* @__PURE__ */ jsx13(
2714
+ IconButton,
2715
+ {
2716
+ size: "xs",
2717
+ "aria-label": open ? t("collapse", { name: member.name }) : t("expand", { name: member.name }),
2718
+ onClick: toggle,
2719
+ children: open ? /* @__PURE__ */ jsx13(ChevronDown, {}) : /* @__PURE__ */ jsx13(DirectionalIcon, { children: /* @__PURE__ */ jsx13(ChevronRight, {}) })
2720
+ }
2721
+ ),
2722
+ /* @__PURE__ */ jsx13(AppLink6, { href: routes.group(member.memberId), children: member.name }),
2723
+ cyclic && /* @__PURE__ */ jsx13(StatusPill9, { tone: "warning", children: t("cycle") })
2724
+ ] }),
2725
+ open && !cyclic && /* @__PURE__ */ jsxs13(Box2, { children: [
2726
+ error && /* @__PURE__ */ jsx13(Text13, { textStyle: "caption", color: "fg.danger", ms: "7", children: error }),
2727
+ !detail && !error && /* @__PURE__ */ jsx13(Text13, { textStyle: "caption", color: "fg.muted", ms: "7", children: t("loadingTree") }),
2728
+ detail && /* @__PURE__ */ jsx13(Children, { members: detail.members, ancestors: [...ancestors, member.memberId], routes })
2729
+ ] })
2730
+ ] });
2731
+ }
2732
+
2733
+ // src/areas/guard/GroupTwoFactorPanel.tsx
2734
+ import { useState as useState9 } from "react";
2735
+ import { Box as Box3, chakra as chakra2, HStack as HStack12, Stack as Stack11, Text as Text14 } from "@chakra-ui/react";
2736
+ import { errorText as errorText7, Indicator, InlineAlert as InlineAlert10, notify as notify6, Panel as Panel10, useAreaRequest as useAreaRequest11 } from "@abpjs/ui";
2737
+ import { jsx as jsx14, jsxs as jsxs14 } from "react/jsx-runtime";
2738
+ var TWO_FACTOR_MODES = ["off", "optional", "required", "strong"];
2739
+ function GroupTwoFactorPanel({ group, onSaved }) {
2740
+ const t = useGuardNs("groupDetail.twoFactor");
2741
+ const request = useAreaRequest11("guard");
2742
+ const [mode, setMode] = useState9(group.twoFactor ?? "off");
2743
+ const [error, setError] = useState9(null);
2744
+ async function choose(next) {
2745
+ if (next === mode) return;
2746
+ const before = mode;
2747
+ setMode(next);
2748
+ setError(null);
2749
+ try {
2750
+ const updated = await request(`/groups/${group.id}/two-factor`, { method: "PUT", body: { mode: next } });
2751
+ notify6.success(t("saved", { name: group.name, mode: t(`modes.${next}`) }));
2752
+ onSaved(updated);
2753
+ } catch (e) {
2754
+ setMode(before);
2755
+ setError(errorText7(e));
2756
+ }
2757
+ }
2758
+ return /* @__PURE__ */ jsx14(Panel10, { title: t("title"), description: t("hint"), "data-testid": "group-two-factor", children: /* @__PURE__ */ jsxs14(Stack11, { gap: "2", children: [
2759
+ /* @__PURE__ */ jsx14(InlineAlert10, { tone: "danger", children: error }),
2760
+ /* @__PURE__ */ jsx14(HStack12, { gap: "1", p: "1", rounded: "l2", bg: "bg.subtle", w: "fit-content", maxW: "full", wrap: "wrap", role: "radiogroup", "aria-label": t("title"), children: TWO_FACTOR_MODES.map((choice) => /* @__PURE__ */ jsxs14(
2761
+ chakra2.button,
2762
+ {
2763
+ type: "button",
2764
+ role: "radio",
2765
+ "aria-checked": mode === choice,
2766
+ position: "relative",
2767
+ px: "3",
2768
+ py: "1.5",
2769
+ rounded: "l1",
2770
+ textStyle: "body.sm",
2771
+ fontWeight: "medium",
2772
+ color: mode === choice ? "fg" : "fg.muted",
2773
+ cursor: "pointer",
2774
+ focusVisibleRing: "inside",
2775
+ onClick: () => void choose(choice),
2776
+ "data-testid": `two-factor-${choice}`,
2777
+ children: [
2778
+ mode === choice && /* @__PURE__ */ jsx14(Indicator, { group: `two-factor-${group.id}`, css: { position: "absolute", inset: 0, rounded: "l1", bg: "bg.panel", boxShadow: "xs" } }),
2779
+ /* @__PURE__ */ jsx14(Box3, { as: "span", position: "relative", children: t(`modes.${choice}`) })
2780
+ ]
2781
+ },
2782
+ choice
2783
+ )) }),
2784
+ /* @__PURE__ */ jsx14(Text14, { textStyle: "body.sm", color: "fg.muted", "aria-live": "polite", children: t(`modeHints.${mode}`) })
2785
+ ] }) });
2786
+ }
2787
+
2788
+ // src/areas/guard/GroupScreen.tsx
2789
+ import { Fragment as Fragment6, jsx as jsx15, jsxs as jsxs15 } from "react/jsx-runtime";
2790
+ function isSystemGroup(group) {
2791
+ return group.system ?? false;
2792
+ }
2793
+ function GroupScreen({ id, routes = guardRoutes() }) {
2794
+ const t = useGuardNs("groupDetail");
2795
+ const tg = useGuardNs("groups");
2796
+ const tc = useGuardNs("common");
2797
+ const tn = useGuardNs("nav");
2798
+ const tf = useGuardNs("groupDetail.twoFactor");
2799
+ const written = useWrittenName();
2800
+ const confirm = useConfirm5();
2801
+ const navigate = useNavigate4();
2802
+ const request = useAreaRequest12("guard");
2803
+ const detail = useApiQuery8("guard", `/groups/${id}`);
2804
+ const action = useApiAction9();
2805
+ const [treeKey, setTreeKey] = useState10(0);
2806
+ async function reload() {
2807
+ await detail.reload();
2808
+ setTreeKey((k) => k + 1);
2809
+ }
2810
+ async function removeMember(m) {
2811
+ const ok = await action.run(async () => {
2812
+ await request(`/groups/${id}/members/${m.memberType}/${m.memberId}`, { method: "DELETE" });
2813
+ return true;
2814
+ });
2815
+ if (ok) await reload();
2816
+ }
2817
+ async function deleteGroup() {
2818
+ if (!detail.data) return;
2819
+ const yes = await confirm({ title: t("deleteTitle", { name: detail.data.group.name }), confirmLabel: tc("delete"), danger: true });
2820
+ if (!yes) return;
2821
+ const ok = await action.run(async () => {
2822
+ await request(`/groups/${id}`, { method: "DELETE" });
2823
+ return true;
2824
+ });
2825
+ if (ok) navigate(routes.groups);
2826
+ }
2827
+ if (detail.error && !detail.data) return /* @__PURE__ */ jsx15(InlineAlert11, { tone: "danger", children: detail.error });
2828
+ const group = detail.data?.group;
2829
+ const members = detail.data?.members;
2830
+ const parents = detail.data?.parents;
2831
+ const effectiveMembers = detail.data?.effectiveMembers;
2832
+ const hasGroupMembers = members?.some((m) => m.memberType === "Group") ?? false;
2833
+ const memberColumns = [
2834
+ {
2835
+ id: "type",
2836
+ header: tc("type"),
2837
+ sortValue: (m) => m.memberType === "Group" ? 0 : 1,
2838
+ cell: (m) => m.memberType === "Group" ? /* @__PURE__ */ jsx15(StatusPill10, { tone: "info", children: tc("group") }) : /* @__PURE__ */ jsx15(StatusPill10, { children: tc("account") }),
2839
+ skeleton: "pill"
2840
+ },
2841
+ {
2842
+ id: "name",
2843
+ header: tc("name"),
2844
+ sortValue: (m) => m.name,
2845
+ cell: (m) => /* @__PURE__ */ jsxs15(HStack13, { gap: "2", wrap: "wrap", children: [
2846
+ m.memberType === "Group" ? /* @__PURE__ */ jsx15(AppLink7, { href: routes.group(m.memberId), fontWeight: "medium", children: m.name }) : /* @__PURE__ */ jsx15(RecordKey5, { value: m.name, href: routes.account(m.memberId) }),
2847
+ m.displayName && m.displayName !== m.name && /* @__PURE__ */ jsx15(Text15, { as: "span", textStyle: "caption", color: "fg.muted", children: m.displayName })
2848
+ ] }),
2849
+ skeleton: "key"
2850
+ },
2851
+ { id: "directory", header: tc("directory"), sortValue: (m) => m.directoryName, cell: (m) => m.directoryName },
2852
+ {
2853
+ id: "source",
2854
+ header: tc("source"),
2855
+ sortValue: (m) => m.source,
2856
+ cell: (m) => m.source === "Directory" ? /* @__PURE__ */ jsx15(StatusPill10, { tone: "info", children: t("fromDirectory") }) : m.source === "Domain" ? /* @__PURE__ */ jsx15(StatusPill10, { tone: "info", children: t("byDomain") }) : m.source === "Import" ? /* @__PURE__ */ jsx15(StatusPill10, { tone: "info", children: t("fromImport") }) : /* @__PURE__ */ jsx15(StatusPill10, { tone: "accent", children: t("manual") }),
2857
+ skeleton: "pill"
2858
+ },
2859
+ {
2860
+ id: "actions",
2861
+ header: /* @__PURE__ */ jsx15(Text15, { as: "span", srOnly: true, children: tc("actions") }),
2862
+ align: "end",
2863
+ cell: (m) => m.removable && /* @__PURE__ */ jsx15(Button11, { size: "sm", variant: "ghost", danger: true, onClick: () => removeMember(m), disabled: action.busy, children: t("remove") }),
2864
+ skeleton: () => /* @__PURE__ */ jsx15(Button11, { size: "sm", variant: "ghost", danger: true, children: t("remove") })
2865
+ }
2866
+ ];
2867
+ const effectiveColumns = [
2868
+ {
2869
+ id: "username",
2870
+ header: tc("username"),
2871
+ sortValue: (m) => m.username,
2872
+ cell: (m) => /* @__PURE__ */ jsx15(RecordKey5, { value: m.username, href: routes.account(m.accountId) }),
2873
+ skeleton: "key"
2874
+ },
2875
+ { id: "displayName", header: tc("displayName"), sortValue: (m) => m.displayName, cell: (m) => m.displayName, skeleton: "person" },
2876
+ { id: "path", header: tc("path"), sortValue: (m) => m.path.length, cell: (m) => /* @__PURE__ */ jsx15(PathChips2, { path: m.path }), skeleton: () => /* @__PURE__ */ jsx15(PathChips2, { path: [], loading: true }) }
2877
+ ];
2878
+ return /* @__PURE__ */ jsxs15(Loading4, { when: !detail.data, children: [
2879
+ /* @__PURE__ */ jsx15(
2880
+ PageHeader6,
2881
+ {
2882
+ breadcrumbs: [{ label: tn("groups"), href: routes.groups }, { label: group && written(group.name, group.names) }],
2883
+ title: group && written(group.name, group.names),
2884
+ description: group?.description ?? void 0,
2885
+ meta: /* @__PURE__ */ jsxs15(Fragment6, { children: [
2886
+ /* @__PURE__ */ jsx15(Text15, { as: "span", children: /* @__PURE__ */ jsx15(TextSlot3, { width: 10, children: group?.directoryName }) }),
2887
+ /* @__PURE__ */ jsx15(StatusPill10, { dot: false, children: group && tg(`kinds.${group.kind}`) }),
2888
+ !group ? /* @__PURE__ */ jsx15(StatusPill10, {}) : group.isLocal ? /* @__PURE__ */ jsx15(StatusPill10, { tone: "accent", children: tg("local") }) : /* @__PURE__ */ jsx15(StatusPill10, { tone: "info", children: tg("synced") }),
2889
+ !group ? /* @__PURE__ */ jsx15(StatusPill10, {}) : group.writable ? /* @__PURE__ */ jsx15(StatusPill10, { tone: "success", children: t("writable") }) : /* @__PURE__ */ jsx15(StatusPill10, { children: tg("readOnly") }),
2890
+ group && group.twoFactor && group.twoFactor !== "off" && /* @__PURE__ */ jsx15(StatusPill10, { tone: "accent", "data-testid": "group-two-factor-pill", children: tf("pill", { mode: tf(`modes.${group.twoFactor}`) }) })
2891
+ ] }),
2892
+ actions: (!group || group.isLocal && !group.computed && !isSystemGroup(group)) && /* @__PURE__ */ jsx15(Button11, { danger: true, onClick: deleteGroup, disabled: action.busy, children: t("delete") })
2893
+ }
2894
+ ),
2895
+ /* @__PURE__ */ jsxs15(Stack12, { gap: "section", children: [
2896
+ /* @__PURE__ */ jsx15(InlineAlert11, { tone: "danger", children: action.error }),
2897
+ group && group.writable && group.isLocal && /* @__PURE__ */ jsx15(GroupNames, { group, onSaved: reload }),
2898
+ /* @__PURE__ */ jsxs15(Grid2, { templateColumns: { base: "minmax(0, 1fr)", lg: "minmax(0, 1fr) {sizes.sidePanel}" }, gap: "section", alignItems: "start", children: [
2899
+ /* @__PURE__ */ jsx15(Panel11, { title: /* @__PURE__ */ jsx15(TextSlot3, { width: 18, children: t("directMembers", { count: members?.length ?? 0 }) }), flush: true, children: /* @__PURE__ */ jsx15(
2900
+ DataTable9,
2901
+ {
2902
+ "aria-label": t("directMembers", { count: members?.length ?? 0 }),
2903
+ columns: memberColumns,
2904
+ rows: members,
2905
+ getRowId: (m) => `${m.memberType}:${m.memberId}`,
2906
+ defaultSort: { columnId: "type", direction: "asc" },
2907
+ empty: t("noMembers")
2908
+ }
2909
+ ) }),
2910
+ /* @__PURE__ */ jsxs15(Stack12, { gap: "section", children: [
2911
+ /* @__PURE__ */ jsx15(Panel11, { title: /* @__PURE__ */ jsx15(TextSlot3, { width: 14, children: t("memberOf", { count: parents?.length ?? 0 }) }), children: !parents ? /* @__PURE__ */ jsx15(Text15, { textStyle: "body", children: /* @__PURE__ */ jsx15(TextBone, { width: t("notNested").length }) }) : parents.length === 0 ? /* @__PURE__ */ jsx15(Text15, { textStyle: "body", color: "fg.muted", children: t("notNested") }) : /* @__PURE__ */ jsx15(List3.Root, { listStyle: "none", gap: "1.5", children: parents.map((p) => /* @__PURE__ */ jsx15(List3.Item, { children: /* @__PURE__ */ jsxs15(HStack13, { justify: "space-between", gap: "2", w: "full", children: [
2912
+ /* @__PURE__ */ jsx15(AppLink7, { href: routes.group(p.id), children: written(p.name, p.names) }),
2913
+ /* @__PURE__ */ jsx15(Text15, { as: "span", textStyle: "caption", color: "fg.muted", children: p.directoryName })
2914
+ ] }) }, p.id)) }) }),
2915
+ group && detail.data && /* @__PURE__ */ jsx15(GroupTwoFactorPanel, { group, onSaved: (updated) => detail.data && detail.setData({ ...detail.data, group: updated }) }, group.id),
2916
+ group && members && hasGroupMembers && /* @__PURE__ */ jsx15(Panel11, { title: t("nestedGroups"), children: /* @__PURE__ */ jsx15(GroupTree, { rootId: group.id, rootName: group.name, rootMembers: members, routes }, treeKey) })
2917
+ ] })
2918
+ ] }),
2919
+ group?.kind === "organization" && /* @__PURE__ */ jsx15(OrganizationPanel, { group, onSaved: reload }),
2920
+ !group || group.writable ? /* @__PURE__ */ jsx15(AddMember, { groupId: group?.id ?? id, existing: members ?? [], onAdded: reload }) : /* @__PURE__ */ jsx15(InlineAlert11, { tone: "neutral", children: group.computed ? t(group.kind === "ou" ? "ouNotice" : "directoryNotice") : t("readOnlyNotice") }),
2921
+ /* @__PURE__ */ jsx15(Panel11, { title: /* @__PURE__ */ jsx15(TextSlot3, { width: 22, children: t("effectiveMembers", { count: effectiveMembers?.length ?? 0 }) }), flush: true, children: /* @__PURE__ */ jsx15(
2922
+ DataTable9,
2923
+ {
2924
+ "aria-label": t("effectiveMembers", { count: effectiveMembers?.length ?? 0 }),
2925
+ columns: effectiveColumns,
2926
+ rows: effectiveMembers,
2927
+ getRowId: (m) => `${m.accountId}:${m.path.join(">")}`,
2928
+ defaultSort: { columnId: "path", direction: "asc" },
2929
+ empty: t("noEffectiveMembers")
2930
+ }
2931
+ ) })
2932
+ ] })
2933
+ ] });
2934
+ }
2935
+ function OrganizationPanel({ group, onSaved }) {
2936
+ const t = useGuardNs("groupDetail");
2937
+ const tg = useGuardNs("groups");
2938
+ const request = useAreaRequest12("guard");
2939
+ const [domains, setDomains] = useState10(group.emailDomains.join(", "));
2940
+ const [attributes, setAttributes] = useState10(
2941
+ Object.entries(group.attributes).map(([k, v]) => `${k} = ${v}`).join("\n")
2942
+ );
2943
+ const action = useApiAction9();
2944
+ async function save() {
2945
+ const parsed = {};
2946
+ for (const line of attributes.split("\n").map((l) => l.trim()).filter(Boolean)) {
2947
+ const at = line.indexOf("=");
2948
+ if (at > 0) parsed[line.slice(0, at).trim()] = line.slice(at + 1).trim();
2949
+ }
2950
+ const ok = await action.run(async () => {
2951
+ await request(`/groups/${group.id}`, {
2952
+ method: "PUT",
2953
+ body: { name: group.name, description: group.description, emailDomains: splitList(domains), attributes: parsed }
2954
+ });
2955
+ return true;
2956
+ });
2957
+ if (ok) {
2958
+ notify7.success(t("organizationSaved"));
2959
+ await onSaved();
2960
+ }
2961
+ }
2962
+ return /* @__PURE__ */ jsx15(Panel11, { title: t("organization"), description: t("organizationHint"), "data-testid": "organization", children: /* @__PURE__ */ jsxs15(Stack12, { gap: "field", maxW: "2xl", children: [
2963
+ /* @__PURE__ */ jsx15(Field5, { label: tg("domains"), helperText: tg("domainsHint"), children: /* @__PURE__ */ jsx15(Input5, { value: domains, onChange: (e) => setDomains(e.target.value), dir: "ltr", placeholder: "acme.com" }) }),
2964
+ /* @__PURE__ */ jsx15(Field5, { label: t("attributes"), helperText: t("attributesHint"), children: /* @__PURE__ */ jsx15(Textarea, { value: attributes, onChange: (e) => setAttributes(e.target.value), rows: 4, fontFamily: "mono", fontSize: "sm" }) }),
2965
+ /* @__PURE__ */ jsx15(InlineAlert11, { tone: "danger", children: action.error }),
2966
+ /* @__PURE__ */ jsx15(HStack13, { children: /* @__PURE__ */ jsx15(Button11, { onClick: () => void save(), loading: action.busy, children: t("saveOrganization") }) })
2967
+ ] }) });
2968
+ }
2969
+ function AddMember({ groupId, existing, onAdded }) {
2970
+ const t = useGuardNs("groupDetail");
2971
+ const tc = useGuardNs("common");
2972
+ const request = useAreaRequest12("guard");
2973
+ const [query, setQuery] = useState10("");
2974
+ const settled = useSettledValue(query.trim());
2975
+ const [accounts, setAccounts] = useState10([]);
2976
+ const [groups, setGroups] = useState10([]);
2977
+ const [searchError, setSearchError] = useState10(null);
2978
+ const [error, setError] = useState10(null);
2979
+ const [busyId, setBusyId] = useState10(null);
2980
+ useEffect(() => {
2981
+ if (!settled) {
2982
+ setAccounts([]);
2983
+ setGroups([]);
2984
+ return;
2985
+ }
2986
+ let cancelled = false;
2987
+ const search = new URLSearchParams({ search: settled });
2988
+ Promise.all([request(`/accounts?${search}`), request(`/groups?${search}`)]).then(([a, g]) => {
2989
+ if (cancelled) return;
2990
+ setAccounts(a.slice(0, 10));
2991
+ setGroups(g.filter((x) => x.id !== groupId).slice(0, 10));
2992
+ setSearchError(null);
2993
+ }).catch((e) => !cancelled && setSearchError(errorText8(e)));
2994
+ return () => {
2995
+ cancelled = true;
2996
+ };
2997
+ }, [settled, groupId, request]);
2998
+ const isMember = (type, id) => existing.some((m) => m.memberType === type && m.memberId === id);
2999
+ async function add(body, key) {
3000
+ setBusyId(key);
3001
+ setError(null);
3002
+ try {
3003
+ await request(`/groups/${groupId}/members`, { method: "POST", body });
3004
+ await onAdded();
3005
+ } catch (e) {
3006
+ setError(errorText8(e));
3007
+ } finally {
3008
+ setBusyId(null);
3009
+ }
3010
+ }
3011
+ const candidates = [
3012
+ ...groups.map((g) => ({ kind: "Group", group: g })),
3013
+ ...accounts.map((a) => ({ kind: "Account", account: a }))
3014
+ ];
3015
+ const keyOf = (c) => c.kind === "Group" ? `g:${c.group.id}` : `a:${c.account.id}`;
3016
+ const columns = [
3017
+ {
3018
+ id: "type",
3019
+ header: tc("type"),
3020
+ width: "24",
3021
+ cell: (c) => c.kind === "Group" ? /* @__PURE__ */ jsx15(StatusPill10, { tone: "info", children: tc("group") }) : /* @__PURE__ */ jsx15(StatusPill10, { children: tc("account") })
3022
+ },
3023
+ {
3024
+ id: "name",
3025
+ header: tc("name"),
3026
+ cell: (c) => c.kind === "Group" ? /* @__PURE__ */ jsx15(Text15, { as: "span", fontWeight: "medium", children: c.group.name }) : /* @__PURE__ */ jsxs15(HStack13, { gap: "2", children: [
3027
+ /* @__PURE__ */ jsx15(RecordKey5, { value: c.account.username }),
3028
+ /* @__PURE__ */ jsx15(Text15, { as: "span", textStyle: "caption", color: "fg.muted", children: c.account.displayName })
3029
+ ] })
3030
+ },
3031
+ { id: "directory", header: tc("directory"), cell: (c) => c.kind === "Group" ? c.group.directoryName : c.account.directoryName },
3032
+ {
3033
+ id: "add",
3034
+ header: /* @__PURE__ */ jsx15(Text15, { as: "span", srOnly: true, children: tc("actions") }),
3035
+ align: "end",
3036
+ cell: (c) => {
3037
+ const member = c.kind === "Group" ? isMember("Group", c.group.id) : isMember("Account", c.account.id);
3038
+ if (member)
3039
+ return /* @__PURE__ */ jsx15(Text15, { as: "span", textStyle: "caption", color: "fg.muted", children: t("alreadyMember") });
3040
+ const key = keyOf(c);
3041
+ return /* @__PURE__ */ jsx15(
3042
+ Button11,
3043
+ {
3044
+ size: "sm",
3045
+ disabled: busyId != null,
3046
+ loading: busyId === key,
3047
+ onClick: () => add(c.kind === "Group" ? { groupId: c.group.id } : { accountId: c.account.id }, key),
3048
+ children: t("add")
3049
+ }
3050
+ );
3051
+ }
3052
+ }
3053
+ ];
3054
+ return /* @__PURE__ */ jsx15(Panel11, { title: t("addMember"), children: /* @__PURE__ */ jsxs15(Stack12, { gap: "stack", children: [
3055
+ /* @__PURE__ */ jsx15(SearchInput2, { maxW: "md", placeholder: t("searchMembers"), value: query, onChange: (e) => setQuery(e.target.value), "aria-label": t("searchMembers") }),
3056
+ /* @__PURE__ */ jsx15(InlineAlert11, { tone: "danger", children: error }),
3057
+ /* @__PURE__ */ jsx15(InlineAlert11, { tone: "danger", children: searchError }),
3058
+ settled && candidates.length === 0 && !searchError && /* @__PURE__ */ jsx15(Text15, { textStyle: "body", color: "fg.muted", children: t("noMatches") }),
3059
+ candidates.length > 0 && /* @__PURE__ */ jsx15(Panel11, { flush: true, children: /* @__PURE__ */ jsx15(DataTable9, { size: "sm", "aria-label": t("addMember"), columns, rows: candidates, getRowId: keyOf }) })
3060
+ ] }) });
3061
+ }
3062
+ function GroupNames({ group, onSaved }) {
3063
+ const t = useGuardNs("groupDetail");
3064
+ const tc = useGuardNs("common");
3065
+ const request = useAreaRequest12("guard");
3066
+ const action = useApiAction9();
3067
+ const [value, setValue] = useState10(() => toNamesValue2(group.name, group.names));
3068
+ const { name, names } = fromNamesValue2(value);
3069
+ const unchanged = name === group.name && JSON.stringify(names) === JSON.stringify(fromNamesValue2(toNamesValue2(group.name, group.names)).names);
3070
+ async function save(e) {
3071
+ e.preventDefault();
3072
+ const ok = await action.run(async () => {
3073
+ await request(`/groups/${group.id}`, {
3074
+ method: "PUT",
3075
+ body: { name, description: group.description, names, attributes: group.attributes, emailDomains: group.emailDomains }
3076
+ });
3077
+ return true;
3078
+ });
3079
+ if (ok) await onSaved();
3080
+ }
3081
+ return /* @__PURE__ */ jsx15(Panel11, { title: t("names"), description: t("namesHint"), children: /* @__PURE__ */ jsxs15("form", { onSubmit: save, children: [
3082
+ /* @__PURE__ */ jsxs15(HStack13, { gap: "2", align: "start", wrap: "wrap", children: [
3083
+ /* @__PURE__ */ jsx15(TranslatedInput3, { value, onChange: setValue, "aria-label": tc("name"), suggest: false }),
3084
+ /* @__PURE__ */ jsx15(Button11, { type: "submit", loading: action.busy, disabled: !name || unchanged, children: t("saveNames") })
3085
+ ] }),
3086
+ /* @__PURE__ */ jsx15(InlineAlert11, { tone: "danger", children: action.error })
3087
+ ] }) });
3088
+ }
3089
+
3090
+ // src/areas/guard/GroupsScreen.tsx
3091
+ import { useState as useState11 } from "react";
3092
+ import { HStack as HStack14, Input as Input6, SimpleGrid as SimpleGrid3, Stack as Stack13, Text as Text16 } from "@chakra-ui/react";
3093
+ import {
3094
+ AppLink as AppLink8,
3095
+ Button as Button12,
3096
+ DataTable as DataTable10,
3097
+ EMPTY_VALUE as EMPTY_VALUE4,
3098
+ errorText as errorText9,
3099
+ Field as Field6,
3100
+ InlineAlert as InlineAlert12,
3101
+ ListFooter as ListFooter2,
3102
+ notify as notify8,
3103
+ PageHeader as PageHeader7,
3104
+ Panel as Panel12,
3105
+ SearchInput as SearchInput3,
3106
+ SelectField as SelectField4,
3107
+ StatusPill as StatusPill11,
3108
+ TranslatedInput as TranslatedInput4,
3109
+ useApiQuery as useApiQuery9,
3110
+ useAreaListSource as useAreaListSource2,
3111
+ useAreaRequest as useAreaRequest13,
3112
+ useCan as useCan2,
3113
+ useListState as useListState2
3114
+ } from "@abpjs/ui";
3115
+ import { fromNamesValue as fromNamesValue3, splitList as splitList2 } from "@abpjs/ui/rules";
3116
+ import { Fragment as Fragment7, jsx as jsx16, jsxs as jsxs16 } from "react/jsx-runtime";
3117
+ var KINDS = ["standard", "directory", "ou", "organization"];
3118
+ function GroupsScreen({ routes = guardRoutes(), source }) {
3119
+ const t = useGuardNs("groups");
3120
+ const tc = useGuardNs("common");
3121
+ const written = useWrittenName();
3122
+ const can = useCan2();
3123
+ const admin = can("guard.site.admin");
3124
+ const dirs = useApiQuery9("guard", "/directories");
3125
+ const served = useAreaListSource2("guard", "/groups/page");
3126
+ const list = useListState2(source ?? served, { initial: { sort: { columnId: "name", direction: "asc" } } });
3127
+ const [creating, setCreating] = useState11(false);
3128
+ const columns = [
3129
+ {
3130
+ id: "name",
3131
+ header: tc("name"),
3132
+ sortValue: (g) => g.name,
3133
+ cell: (g) => /* @__PURE__ */ jsx16(AppLink8, { href: routes.group(g.id), fontWeight: "medium", children: written(g.name, g.names) })
3134
+ },
3135
+ { id: "kind", header: t("kind"), sortValue: (g) => g.kind, cell: (g) => /* @__PURE__ */ jsx16(StatusPill11, { dot: false, children: t(`kinds.${g.kind}`) }), skeleton: "pill" },
3136
+ {
3137
+ id: "description",
3138
+ header: tc("description"),
3139
+ cell: (g) => g.description ? /* @__PURE__ */ jsx16(Text16, { as: "span", color: "fg.muted", children: g.description }) : EMPTY_VALUE4
3140
+ },
3141
+ { id: "directory", header: tc("directory"), sortValue: (g) => g.directoryName, cell: (g) => g.directoryName },
3142
+ {
3143
+ id: "source",
3144
+ header: tc("source"),
3145
+ cell: (g) => g.isLocal ? /* @__PURE__ */ jsx16(StatusPill11, { tone: "accent", children: t("local") }) : /* @__PURE__ */ jsx16(StatusPill11, { tone: "info", children: t("synced") }),
3146
+ skeleton: "pill"
3147
+ },
3148
+ { id: "members", header: t("directMembers"), numeric: true, cell: (g) => num(g.directMemberCount) },
3149
+ { id: "memberGroups", header: t("memberGroups"), numeric: true, cell: (g) => num(g.memberGroupCount) }
3150
+ ];
3151
+ return /* @__PURE__ */ jsxs16(Fragment7, { children: [
3152
+ /* @__PURE__ */ jsx16(
3153
+ PageHeader7,
3154
+ {
3155
+ title: t("title"),
3156
+ description: t("subtitle"),
3157
+ actions: !creating && admin && /* @__PURE__ */ jsx16(Button12, { variant: "primary", onClick: () => setCreating(true), children: t("create") })
3158
+ }
3159
+ ),
3160
+ /* @__PURE__ */ jsxs16(Stack13, { gap: "section", children: [
3161
+ creating && /* @__PURE__ */ jsx16(
3162
+ CreateGroupPanel,
3163
+ {
3164
+ directories: dirs.data ?? [],
3165
+ onCancel: () => setCreating(false),
3166
+ onDone: (created) => {
3167
+ setCreating(false);
3168
+ notify8.success(t("created", { name: created.name }));
3169
+ list.reload();
3170
+ }
3171
+ }
3172
+ ),
3173
+ /* @__PURE__ */ jsxs16(Stack13, { gap: "field", children: [
3174
+ /* @__PURE__ */ jsxs16(HStack14, { gap: "2", wrap: "wrap", children: [
3175
+ /* @__PURE__ */ jsx16(
3176
+ SearchInput3,
3177
+ {
3178
+ size: "sm",
3179
+ maxW: "sm",
3180
+ value: list.query.search,
3181
+ onChange: (e) => list.setSearch(e.target.value),
3182
+ placeholder: t("searchPlaceholder"),
3183
+ "aria-label": t("searchPlaceholder")
3184
+ }
3185
+ ),
3186
+ /* @__PURE__ */ jsx16(
3187
+ SelectField4,
3188
+ {
3189
+ size: "sm",
3190
+ maxW: "14rem",
3191
+ "aria-label": tc("directory"),
3192
+ value: list.query.filters.directoryId ?? "",
3193
+ onChange: (e) => list.setFilter("directoryId", e.target.value || null),
3194
+ options: [{ value: "", label: t("allDirectories") }, ...(dirs.data ?? []).map((d) => ({ value: d.id, label: d.name }))]
3195
+ }
3196
+ ),
3197
+ /* @__PURE__ */ jsx16(
3198
+ SelectField4,
3199
+ {
3200
+ size: "sm",
3201
+ maxW: "14rem",
3202
+ "aria-label": t("kind"),
3203
+ value: list.query.filters.kind ?? "",
3204
+ onChange: (e) => list.setFilter("kind", e.target.value || null),
3205
+ options: [{ value: "", label: t("kind") }, ...KINDS.map((k) => ({ value: k, label: t(`kinds.${k}`) }))]
3206
+ }
3207
+ )
3208
+ ] }),
3209
+ /* @__PURE__ */ jsx16(DataTable10, { "aria-label": t("title"), columns, getRowId: (g) => g.id, empty: t("empty"), ...list.table }),
3210
+ /* @__PURE__ */ jsx16(ListFooter2, { list })
3211
+ ] })
3212
+ ] })
3213
+ ] });
3214
+ }
3215
+ function CreateGroupPanel({ directories, onDone, onCancel }) {
3216
+ const t = useGuardNs("groups");
3217
+ const tc = useGuardNs("common");
3218
+ const request = useAreaRequest13("guard");
3219
+ const [nameValue, setNameValue] = useState11({});
3220
+ const { name, names } = fromNamesValue3(nameValue);
3221
+ const [description, setDescription] = useState11("");
3222
+ const [directoryId, setDirectoryId] = useState11("");
3223
+ const [kind, setKind] = useState11("standard");
3224
+ const [domains, setDomains] = useState11("");
3225
+ const [error, setError] = useState11(null);
3226
+ const [busy, setBusy] = useState11(false);
3227
+ async function submit(e) {
3228
+ e.preventDefault();
3229
+ setBusy(true);
3230
+ setError(null);
3231
+ try {
3232
+ const created = await request("/groups", {
3233
+ method: "POST",
3234
+ body: {
3235
+ name,
3236
+ names,
3237
+ description: description || null,
3238
+ ...directoryId ? { directoryId } : {},
3239
+ kind,
3240
+ ...kind === "organization" ? { emailDomains: splitList2(domains) } : {}
3241
+ }
3242
+ });
3243
+ onDone(created);
3244
+ } catch (err) {
3245
+ setError(errorText9(err));
3246
+ } finally {
3247
+ setBusy(false);
3248
+ }
3249
+ }
3250
+ return /* @__PURE__ */ jsx16(Panel12, { title: t("create"), children: /* @__PURE__ */ jsx16("form", { onSubmit: submit, children: /* @__PURE__ */ jsxs16(Stack13, { gap: "field", children: [
3251
+ /* @__PURE__ */ jsxs16(SimpleGrid3, { columns: { base: 1, md: 3 }, gap: "field", children: [
3252
+ /* @__PURE__ */ jsx16(Field6, { label: tc("name"), required: true, children: /* @__PURE__ */ jsx16(TranslatedInput4, { value: nameValue, onChange: setNameValue, "aria-label": tc("name") }) }),
3253
+ /* @__PURE__ */ jsx16(Field6, { label: tc("description"), children: /* @__PURE__ */ jsx16(Input6, { value: description, onChange: (e) => setDescription(e.target.value) }) }),
3254
+ /* @__PURE__ */ jsx16(Field6, { label: tc("directory"), helperText: t("directoryHint"), children: /* @__PURE__ */ jsx16(
3255
+ SelectField4,
3256
+ {
3257
+ value: directoryId,
3258
+ onChange: (e) => setDirectoryId(e.target.value),
3259
+ options: [
3260
+ { value: "", label: t("internalDefault") },
3261
+ ...directories.filter((d) => d.type !== "internal").map((d) => ({ value: d.id, label: d.name }))
3262
+ ]
3263
+ }
3264
+ ) }),
3265
+ /* @__PURE__ */ jsx16(Field6, { label: t("kind"), helperText: t("kindHint"), children: /* @__PURE__ */ jsx16(
3266
+ SelectField4,
3267
+ {
3268
+ value: kind,
3269
+ onChange: (e) => setKind(e.target.value),
3270
+ options: ["standard", "organization"].map((k) => ({ value: k, label: t(`kinds.${k}`) }))
3271
+ }
3272
+ ) }),
3273
+ kind === "organization" && /* @__PURE__ */ jsx16(Field6, { label: t("domains"), helperText: t("domainsHint"), children: /* @__PURE__ */ jsx16(Input6, { value: domains, onChange: (e) => setDomains(e.target.value), dir: "ltr", placeholder: "acme.com" }) })
3274
+ ] }),
3275
+ /* @__PURE__ */ jsx16(InlineAlert12, { tone: "danger", children: error }),
3276
+ /* @__PURE__ */ jsxs16(HStack14, { gap: "2", children: [
3277
+ /* @__PURE__ */ jsx16(Button12, { type: "submit", variant: "primary", loading: busy, children: t("create") }),
3278
+ /* @__PURE__ */ jsx16(Button12, { onClick: onCancel, children: tc("cancel") })
3279
+ ] })
3280
+ ] }) }) });
3281
+ }
3282
+
3283
+ // src/areas/guard/MergeScreen.tsx
3284
+ import { useEffect as useEffect2, useRef, useState as useState12 } from "react";
3285
+ import { HStack as HStack15, Input as Input7, SimpleGrid as SimpleGrid4, Stack as Stack14, Text as Text17 } from "@chakra-ui/react";
3286
+ import {
3287
+ boneWidth,
3288
+ Button as Button13,
3289
+ EMPTY_VALUE as EMPTY_VALUE5,
3290
+ Field as Field7,
3291
+ InlineAlert as InlineAlert13,
3292
+ Loading as Loading5,
3293
+ notify as notify9,
3294
+ PageHeader as PageHeader8,
3295
+ Panel as Panel13,
3296
+ PropertyList as PropertyList4,
3297
+ RecordKey as RecordKey6,
3298
+ SearchPicker,
3299
+ StatusPill as StatusPill12,
3300
+ TextBone as TextBone2,
3301
+ TextSlot as TextSlot4,
3302
+ useApiAction as useApiAction10,
3303
+ useApiQuery as useApiQuery10,
3304
+ useAreaRequest as useAreaRequest14,
3305
+ useFormatters as useFormatters8,
3306
+ useNavigate as useNavigate5
3307
+ } from "@abpjs/ui";
3308
+ import { Fragment as Fragment8, jsx as jsx17, jsxs as jsxs17 } from "react/jsx-runtime";
3309
+ function MergeScreen({ id, into, routes = guardRoutes() }) {
3310
+ const t = useGuardNs("merge");
3311
+ const tn = useGuardNs("nav");
3312
+ const tc = useGuardNs("common");
3313
+ const navigate = useNavigate5();
3314
+ const request = useAreaRequest14("guard");
3315
+ const source = useApiQuery10("guard", `/accounts/${id}`);
3316
+ const [survivor, setSurvivor] = useState12(null);
3317
+ const pickedByHand = useRef(false);
3318
+ const [preview, setPreview] = useState12(null);
3319
+ const [confirm, setConfirm] = useState12("");
3320
+ const loading = useApiAction10();
3321
+ const merging = useApiAction10();
3322
+ useEffect2(() => {
3323
+ if (!into) return;
3324
+ let live = true;
3325
+ request(`/accounts/${into}`).then(
3326
+ (d) => {
3327
+ if (live && !pickedByHand.current) setSurvivor(d.account);
3328
+ },
3329
+ () => void 0
3330
+ );
3331
+ return () => {
3332
+ live = false;
3333
+ };
3334
+ }, [into, request]);
3335
+ useEffect2(() => {
3336
+ setPreview(null);
3337
+ setConfirm("");
3338
+ if (!survivor) return;
3339
+ void loading.run(
3340
+ () => request(`/accounts/${id}/merge/preview`, { method: "POST", body: { survivorId: survivor.id } }).then(setPreview)
3341
+ );
3342
+ }, [id, survivor]);
3343
+ if (source.error && !source.data) return /* @__PURE__ */ jsx17(InlineAlert13, { tone: "danger", children: source.error });
3344
+ const account = source.data?.account;
3345
+ const confirmed = !preview?.needsConfirmation || confirm.trim().toLowerCase() === account?.username.toLowerCase();
3346
+ async function merge() {
3347
+ if (!survivor) return;
3348
+ const done = await merging.run(
3349
+ () => request(`/accounts/${id}/merge`, {
3350
+ method: "POST",
3351
+ body: { survivorId: survivor.id, confirm: preview?.needsConfirmation ? confirm.trim() : null }
3352
+ })
3353
+ );
3354
+ if (done) {
3355
+ if (done.state === "done") notify9.success(t("merged", { source: done.sourceUsername, survivor: done.survivorUsername }));
3356
+ else notify9.warning(t("mergedIncomplete", { source: done.sourceUsername, survivor: done.survivorUsername }));
3357
+ navigate(routes.account(done.survivorId));
3358
+ }
3359
+ }
3360
+ const search = async (text) => (await request(`/accounts?${new URLSearchParams({ search: text })}`)).filter((a) => a.id !== account?.id && !a.mergedIntoId);
3361
+ return /* @__PURE__ */ jsxs17(Loading5, { when: !source.data, children: [
3362
+ /* @__PURE__ */ jsx17(
3363
+ PageHeader8,
3364
+ {
3365
+ breadcrumbs: [
3366
+ { label: tn("accounts"), href: routes.accounts },
3367
+ { label: account?.username, href: routes.account(account?.id ?? id) },
3368
+ { label: t("pageTitle") }
3369
+ ],
3370
+ title: t("pageTitle"),
3371
+ description: /* @__PURE__ */ jsx17(TextSlot4, { width: t("pageHint", { username: "" }).length + 16, children: t("pageHint", { username: account?.username ?? "" }) })
3372
+ }
3373
+ ),
3374
+ /* @__PURE__ */ jsxs17(Stack14, { gap: "section", children: [
3375
+ account?.mergedIntoId ? /* @__PURE__ */ jsx17(InlineAlert13, { tone: "warning", children: t("alreadyMerged", { survivor: source.data?.mergedIntoUsername ?? "" }) }) : /* @__PURE__ */ jsx17(Panel13, { title: t("chooseTitle"), description: t("chooseHint"), children: /* @__PURE__ */ jsx17(Field7, { label: t("survivor"), children: /* @__PURE__ */ jsx17(
3376
+ SearchPicker,
3377
+ {
3378
+ "aria-label": t("survivor"),
3379
+ value: survivor,
3380
+ onChange: (picked) => {
3381
+ pickedByHand.current = true;
3382
+ setSurvivor(picked);
3383
+ },
3384
+ search,
3385
+ known: [],
3386
+ getId: (a) => a.id,
3387
+ label: (a) => `${a.displayName} (@${a.username})`,
3388
+ renderOption: (a) => /* @__PURE__ */ jsxs17(Fragment8, { children: [
3389
+ /* @__PURE__ */ jsx17(Text17, { as: "span", textStyle: "body.sm", fontWeight: "medium", children: a.displayName }),
3390
+ " ",
3391
+ /* @__PURE__ */ jsxs17(Text17, { as: "span", textStyle: "caption", color: "fg.muted", dir: "ltr", children: [
3392
+ "@",
3393
+ a.username,
3394
+ " \xB7 ",
3395
+ a.directoryName,
3396
+ " \xB7 ",
3397
+ a.status
3398
+ ] })
3399
+ ] }),
3400
+ messages: { placeholder: t("searchPlaceholder"), searching: t("searching"), noMatches: t("noMatches"), noKnown: t("noMatches") }
3401
+ }
3402
+ ) }) }),
3403
+ /* @__PURE__ */ jsx17(InlineAlert13, { tone: "danger", children: loading.error }),
3404
+ survivor && (preview || loading.busy) && /* @__PURE__ */ jsxs17(Loading5, { when: !preview, children: [
3405
+ /* @__PURE__ */ jsxs17(SimpleGrid4, { columns: { base: 1, md: 2 }, gap: "section", children: [
3406
+ /* @__PURE__ */ jsx17(Side, { title: t("sourceTitle"), hint: t("sourceHint"), account: preview?.source, routes }),
3407
+ /* @__PURE__ */ jsx17(Side, { title: t("survivorTitle"), hint: t("survivorHint"), account: preview?.survivor, routes })
3408
+ ] }),
3409
+ /* @__PURE__ */ jsx17(Panel13, { title: t("previewTitle"), description: t("previewHint"), "data-testid": "merge-preview", children: preview ? /* @__PURE__ */ jsx17(Parts, { preview }) : /* @__PURE__ */ jsx17(PartsComing, {}) }),
3410
+ /* @__PURE__ */ jsx17(Panel13, { title: t("confirmTitle"), children: /* @__PURE__ */ jsxs17(Stack14, { gap: "field", maxW: "xl", children: [
3411
+ preview?.needsConfirmation && /* @__PURE__ */ jsxs17(Fragment8, { children: [
3412
+ /* @__PURE__ */ jsx17(InlineAlert13, { tone: "warning", children: preview.sameDirectory ? t("activeWarning", { username: account?.username ?? "" }) : t("activeOtherDirectory", { username: account?.username ?? "" }) }),
3413
+ /* @__PURE__ */ jsx17(Field7, { label: t("typeUsername", { username: account?.username ?? "" }), children: /* @__PURE__ */ jsx17(Input7, { value: confirm, onChange: (e) => setConfirm(e.target.value), autoComplete: "off", dir: "ltr" }) })
3414
+ ] }),
3415
+ /* @__PURE__ */ jsx17(Text17, { textStyle: "body.sm", color: "fg.muted", children: t("noUndo") }),
3416
+ /* @__PURE__ */ jsx17(InlineAlert13, { tone: "danger", children: merging.error }),
3417
+ /* @__PURE__ */ jsxs17(HStack15, { gap: "2", children: [
3418
+ /* @__PURE__ */ jsx17(Button13, { variant: "primary", danger: true, onClick: merge, loading: merging.busy, disabled: !confirmed, children: t("mergeButton", {
3419
+ source: preview?.source.username ?? account?.username ?? "",
3420
+ survivor: preview?.survivor.username ?? survivor.username
3421
+ }) }),
3422
+ /* @__PURE__ */ jsx17(Button13, { onClick: () => navigate(routes.account(account?.id ?? id)), children: tc("cancel") })
3423
+ ] })
3424
+ ] }) })
3425
+ ] })
3426
+ ] })
3427
+ ] });
3428
+ }
3429
+ function Side({ title, hint, account, routes }) {
3430
+ const tc = useGuardNs("common");
3431
+ const fmt = useFormatters8();
3432
+ return /* @__PURE__ */ jsx17(Panel13, { title, description: hint, children: /* @__PURE__ */ jsx17(
3433
+ PropertyList4,
3434
+ {
3435
+ items: [
3436
+ { label: tc("username"), value: /* @__PURE__ */ jsx17(RecordKey6, { value: account?.username, href: account && routes.account(account.id) }) },
3437
+ { label: tc("displayName"), value: account?.displayName },
3438
+ { label: tc("email"), value: account && (account.email ?? EMPTY_VALUE5) },
3439
+ { label: tc("directory"), value: account?.directoryName },
3440
+ { label: tc("status"), value: account ? /* @__PURE__ */ jsx17(AccountStatusPill, { status: account.status }) : /* @__PURE__ */ jsx17(StatusPill12, {}) },
3441
+ { label: tc("lastSignIn"), value: account && fmt.dateTime(account.lastLoginAt) }
3442
+ ]
3443
+ }
3444
+ ) });
3445
+ }
3446
+ function PartsComing() {
3447
+ return /* @__PURE__ */ jsx17(SimpleGrid4, { columns: { base: 1, md: 3 }, gap: "field", children: [0, 1, 2].map((i) => /* @__PURE__ */ jsxs17(Stack14, { gap: "1", children: [
3448
+ /* @__PURE__ */ jsx17(Text17, { fontWeight: "medium", children: /* @__PURE__ */ jsx17(TextBone2, { width: boneWidth(i, 8, 14) }) }),
3449
+ /* @__PURE__ */ jsx17(Text17, { textStyle: "body.sm", children: /* @__PURE__ */ jsx17(TextBone2, { width: boneWidth(i + 3, 12, 22) }) })
3450
+ ] }, i)) });
3451
+ }
3452
+ function Parts({ preview }) {
3453
+ const t = useGuardNs("merge");
3454
+ const partLabel = usePartLabel();
3455
+ const moving = preview.parts.filter((p) => p.counts.length > 0 || p.error);
3456
+ if (moving.length === 0) return /* @__PURE__ */ jsx17(Text17, { color: "fg.muted", children: t("nothing") });
3457
+ return /* @__PURE__ */ jsx17(SimpleGrid4, { columns: { base: 1, md: 3 }, gap: "field", children: moving.map((p) => /* @__PURE__ */ jsxs17(Stack14, { gap: "1", children: [
3458
+ /* @__PURE__ */ jsx17(Text17, { fontWeight: "medium", children: partLabel(p.key, p.plugin) }),
3459
+ p.error ? /* @__PURE__ */ jsx17(InlineAlert13, { tone: "warning", children: t("pluginError", { error: p.error }) }) : /* @__PURE__ */ jsx17(CountList, { counts: p.counts })
3460
+ ] }, p.key)) });
3461
+ }
3462
+
3463
+ // src/areas/guard/MySecondFactorsPanel.tsx
3464
+ import { useEffect as useEffect4, useState as useState14 } from "react";
3465
+ import { HStack as HStack17, Input as Input9, Stack as Stack16, Text as Text19 } from "@chakra-ui/react";
3466
+ import {
3467
+ AbpApiError,
3468
+ Button as Button15,
3469
+ createPasskey,
3470
+ DataTable as DataTable11,
3471
+ errorText as errorText11,
3472
+ Field as Field9,
3473
+ FormDialog as FormDialog3,
3474
+ InlineAlert as InlineAlert15,
3475
+ notify as notify11,
3476
+ Panel as Panel14,
3477
+ passkeysSupported,
3478
+ StatusPill as StatusPill13,
3479
+ useApiQuery as useApiQuery11,
3480
+ useAreaRequest as useAreaRequest15,
3481
+ useConfirm as useConfirm6,
3482
+ useFormatters as useFormatters9
3483
+ } from "@abpjs/ui";
3484
+
3485
+ // src/areas/guard/SecondFactorParts.tsx
3486
+ import { useEffect as useEffect3, useState as useState13 } from "react";
3487
+ import { Box as Box4, chakra as chakra3, Grid as Grid3, HStack as HStack16, Image, Input as Input8, Stack as Stack15, Text as Text18 } from "@chakra-ui/react";
3488
+ import { AppLink as AppLink9, Button as Button14, errorText as errorText10, Field as Field8, InlineAlert as InlineAlert14, looksLikeCode, notify as notify10 } from "@abpjs/ui";
3489
+ import { jsx as jsx18, jsxs as jsxs18 } from "react/jsx-runtime";
3490
+ function groupedKey(secret) {
3491
+ return secret.replace(/(.{4})/g, "$1 ").trim();
3492
+ }
3493
+ function useSenderName() {
3494
+ const t = useGuardNs("secondFactor");
3495
+ return (sender) => {
3496
+ const key = `sender.${sender.method.replace(/\W/g, "_")}`;
3497
+ const own = t(key);
3498
+ if (own !== `secondFactor.${key}`) return own;
3499
+ return sender.method === "email" ? t("kinds.email") : sender.name;
3500
+ };
3501
+ }
3502
+ function CodeInput({
3503
+ recovery,
3504
+ value,
3505
+ onChange,
3506
+ autoFocus = true
3507
+ }) {
3508
+ return /* @__PURE__ */ jsx18(
3509
+ Input8,
3510
+ {
3511
+ value,
3512
+ onChange: (e) => onChange(e.target.value),
3513
+ autoFocus,
3514
+ autoComplete: "one-time-code",
3515
+ inputMode: recovery ? "text" : "numeric",
3516
+ maxLength: recovery ? 16 : 7,
3517
+ dir: "ltr",
3518
+ textAlign: "start",
3519
+ fontFamily: "mono",
3520
+ letterSpacing: recovery ? void 0 : "0.2em",
3521
+ width: recovery ? "48" : "32",
3522
+ "data-testid": "second-factor-code"
3523
+ }
3524
+ );
3525
+ }
3526
+ function AppSetup({ start, confirm, onDone, onCancel }) {
3527
+ const t = useGuardNs("secondFactor.setup");
3528
+ const [enrolment, setEnrolment] = useState13(null);
3529
+ const [code, setCode] = useState13("");
3530
+ const [error, setError] = useState13(null);
3531
+ const [busy, setBusy] = useState13(false);
3532
+ useEffect3(() => {
3533
+ let live = true;
3534
+ start().then(
3535
+ (e) => live && setEnrolment(e),
3536
+ (e) => live && setError(errorText10(e))
3537
+ );
3538
+ return () => {
3539
+ live = false;
3540
+ };
3541
+ }, []);
3542
+ async function verify(e) {
3543
+ e.preventDefault();
3544
+ setBusy(true);
3545
+ setError(null);
3546
+ try {
3547
+ const result = await confirm(code.replace(/\D/g, ""));
3548
+ if (result === false) {
3549
+ setError(t("wrongCode"));
3550
+ setCode("");
3551
+ return;
3552
+ }
3553
+ onDone(result);
3554
+ } catch (e2) {
3555
+ setError(errorText10(e2));
3556
+ } finally {
3557
+ setBusy(false);
3558
+ }
3559
+ }
3560
+ return /* @__PURE__ */ jsx18("form", { onSubmit: (e) => void verify(e), "data-testid": "app-setup", children: /* @__PURE__ */ jsxs18(Stack15, { gap: "field", children: [
3561
+ /* @__PURE__ */ jsx18(Text18, { color: "fg.muted", children: t("scan") }),
3562
+ /* @__PURE__ */ jsxs18(Grid3, { templateColumns: { base: "1fr", sm: "auto minmax(0, 1fr)" }, gap: "5", alignItems: "center", children: [
3563
+ /* @__PURE__ */ jsx18(Box4, { bg: "white", p: "2", rounded: "l2", borderWidth: "1px", w: "fit-content", children: enrolment ? /* @__PURE__ */ jsx18(Image, { src: enrolment.qr, alt: t("qrAlt"), width: "44", height: "44", "data-testid": "app-setup-qr" }) : /* @__PURE__ */ jsx18(Box4, { width: "44", height: "44" }) }),
3564
+ /* @__PURE__ */ jsxs18(Stack15, { gap: "2", minW: "0", children: [
3565
+ /* @__PURE__ */ jsx18(Text18, { textStyle: "body.sm", color: "fg.muted", children: t("cantScan") }),
3566
+ /* @__PURE__ */ jsx18(
3567
+ Box4,
3568
+ {
3569
+ as: "code",
3570
+ dir: "ltr",
3571
+ textAlign: "start",
3572
+ fontFamily: "mono",
3573
+ fontSize: "sm",
3574
+ bg: "bg.muted",
3575
+ p: "2",
3576
+ rounded: "l2",
3577
+ wordBreak: "break-all",
3578
+ "data-testid": "app-setup-secret",
3579
+ children: enrolment ? groupedKey(enrolment.secret) : " "
3580
+ }
3581
+ ),
3582
+ enrolment && /* @__PURE__ */ jsx18(AppLink9, { href: enrolment.address, textStyle: "body.sm", children: t("onThisDevice") })
3583
+ ] })
3584
+ ] }),
3585
+ /* @__PURE__ */ jsx18(Field8, { label: t("code"), helperText: t("codeHint"), children: /* @__PURE__ */ jsx18(CodeInput, { value: code, onChange: setCode, autoFocus: false }) }),
3586
+ /* @__PURE__ */ jsx18(InlineAlert14, { tone: "danger", children: error }),
3587
+ /* @__PURE__ */ jsxs18(HStack16, { children: [
3588
+ /* @__PURE__ */ jsx18(Button14, { type: "submit", loading: busy, disabled: !enrolment || !looksLikeCode(code, false), children: t("verify") }),
3589
+ onCancel && /* @__PURE__ */ jsx18(Button14, { variant: "secondary", onClick: onCancel, disabled: busy, children: t("cancel") })
3590
+ ] })
3591
+ ] }) });
3592
+ }
3593
+ function RecoveryCodes({ codes, onSaved, savedLabel }) {
3594
+ const t = useGuardNs("secondFactor.recovery");
3595
+ function text() {
3596
+ const site = typeof window === "undefined" ? "" : window.location.host;
3597
+ return `${t("fileHeader", { site })}
3598
+
3599
+ ${codes.join("\n")}
3600
+ `;
3601
+ }
3602
+ async function copy() {
3603
+ try {
3604
+ await navigator.clipboard.writeText(text());
3605
+ notify10.success(t("copied"));
3606
+ } catch {
3607
+ notify10.error(t("copyFailed"));
3608
+ }
3609
+ }
3610
+ function download() {
3611
+ const url = URL.createObjectURL(new Blob([text()], { type: "text/plain" }));
3612
+ const link = document.createElement("a");
3613
+ link.href = url;
3614
+ link.download = `${window.location.hostname}-recovery-codes.txt`;
3615
+ link.click();
3616
+ URL.revokeObjectURL(url);
3617
+ }
3618
+ return /* @__PURE__ */ jsxs18(Stack15, { gap: "field", "data-testid": "recovery-codes", children: [
3619
+ /* @__PURE__ */ jsx18(InlineAlert14, { tone: "warning", children: t("hint") }),
3620
+ /* @__PURE__ */ jsx18(Grid3, { templateColumns: "repeat(2, max-content)", columnGap: "6", rowGap: "1.5", dir: "ltr", bg: "bg.muted", p: "3", rounded: "l2", w: "fit-content", children: codes.map((c) => /* @__PURE__ */ jsx18(chakra3.code, { fontFamily: "mono", fontSize: "sm", children: c }, c)) }),
3621
+ /* @__PURE__ */ jsxs18(HStack16, { wrap: "wrap", children: [
3622
+ /* @__PURE__ */ jsx18(Button14, { variant: "secondary", onClick: () => void copy(), children: t("copy") }),
3623
+ /* @__PURE__ */ jsx18(Button14, { variant: "secondary", onClick: download, children: t("download") }),
3624
+ /* @__PURE__ */ jsx18(Button14, { onClick: onSaved, "data-testid": "recovery-codes-saved", children: savedLabel ?? t("saved") })
3625
+ ] })
3626
+ ] });
3627
+ }
3628
+
3629
+ // src/areas/guard/MySecondFactorsPanel.tsx
3630
+ import { Fragment as Fragment9, jsx as jsx19, jsxs as jsxs19 } from "react/jsx-runtime";
3631
+ function MySecondFactorsPanel({ setUpNow = false, onSetUpChosen, onChange }) {
3632
+ const t = useGuardNs("secondFactor");
3633
+ const fmt = useFormatters9();
3634
+ const confirm = useConfirm6();
3635
+ const request = useAreaRequest15("guard");
3636
+ const mine = useApiQuery11("guard", "/me/second-factors");
3637
+ const nameOf = useSenderName();
3638
+ const [choice, setChoice] = useState14(null);
3639
+ const settingUp = choice ?? setUpNow;
3640
+ const [codes, setCodes] = useState14(null);
3641
+ const [error, setError] = useState14(null);
3642
+ const canPasskey = passkeysSupported();
3643
+ const [addingPasskey, setAddingPasskey] = useState14(false);
3644
+ const [passkeyName, setPasskeyName] = useState14("");
3645
+ const [busy, setBusy] = useState14(false);
3646
+ const [renaming, setRenaming] = useState14(null);
3647
+ const [newName, setNewName] = useState14("");
3648
+ const data = mine.data;
3649
+ const factors = data?.factors ?? [];
3650
+ useEffect4(() => {
3651
+ if (setUpNow) document.getElementById("second-factor")?.scrollIntoView({ block: "start" });
3652
+ }, [setUpNow]);
3653
+ function setSettingUp(next) {
3654
+ onSetUpChosen?.(next);
3655
+ setChoice(next);
3656
+ }
3657
+ async function remove(factor) {
3658
+ const passkey = factor.kind === "passkey";
3659
+ const yes = await confirm({
3660
+ title: passkey ? t("removePasskeyTitle") : t("removeTitle"),
3661
+ description: passkey ? t("removePasskeyHint") : t("removeHint"),
3662
+ confirmLabel: t("remove"),
3663
+ danger: true
3664
+ });
3665
+ if (!yes) return;
3666
+ setError(null);
3667
+ try {
3668
+ await request(`/me/second-factors/${factor.id}`, { method: "DELETE" });
3669
+ notify11.success(passkey ? t("passkeyRemoved") : t("removed"));
3670
+ await mine.reload();
3671
+ onChange?.();
3672
+ } catch (e) {
3673
+ setError(errorText11(e));
3674
+ }
3675
+ }
3676
+ async function renew() {
3677
+ if (!await confirm({ title: t("renewTitle"), description: t("renewHint"), confirmLabel: t("renew") })) return;
3678
+ setError(null);
3679
+ try {
3680
+ setCodes((await request("/me/second-factors/recovery-codes", { method: "POST" })).recoveryCodes);
3681
+ await mine.reload();
3682
+ } catch (e) {
3683
+ setError(errorText11(e));
3684
+ }
3685
+ }
3686
+ async function addPasskey() {
3687
+ setBusy(true);
3688
+ setError(null);
3689
+ try {
3690
+ const options = await request("/me/passkeys/options", { method: "POST" });
3691
+ const credential = await createPasskey(options);
3692
+ if (!credential) {
3693
+ setError(t("passkeyCancelled"));
3694
+ return;
3695
+ }
3696
+ const added = await request("/me/passkeys", {
3697
+ method: "POST",
3698
+ body: { name: passkeyName.trim() || t("passkeyNameDefault"), credential }
3699
+ });
3700
+ setAddingPasskey(false);
3701
+ notify11.success(t("passkeyAdded"));
3702
+ if (added.recoveryCodes?.length) setCodes(added.recoveryCodes);
3703
+ await mine.reload();
3704
+ onChange?.();
3705
+ } catch (e) {
3706
+ setError(errorText11(e));
3707
+ } finally {
3708
+ setBusy(false);
3709
+ }
3710
+ }
3711
+ async function rename() {
3712
+ if (!renaming) return;
3713
+ await request(`/me/passkeys/${renaming.id}`, { method: "PUT", body: { name: newName.trim() } });
3714
+ setRenaming(null);
3715
+ await mine.reload();
3716
+ }
3717
+ async function confirmCode(code) {
3718
+ try {
3719
+ return (await request("/me/second-factors/app/confirm", { method: "POST", body: { code } })).recoveryCodes;
3720
+ } catch (e) {
3721
+ if (e instanceof AbpApiError && e.code === "second_factor_failed") return false;
3722
+ throw e;
3723
+ }
3724
+ }
3725
+ const hasApp = factors.some((f) => f.kind === "app");
3726
+ const actions = !settingUp && !addingPasskey && !codes && data && !data.disabled && /* @__PURE__ */ jsxs19(HStack17, { gap: "2", wrap: "wrap", children: [
3727
+ canPasskey && /* @__PURE__ */ jsx19(
3728
+ Button15,
3729
+ {
3730
+ size: "sm",
3731
+ variant: factors.length ? "secondary" : "primary",
3732
+ onClick: () => {
3733
+ setPasskeyName(t("passkeyNameDefault"));
3734
+ setError(null);
3735
+ setAddingPasskey(true);
3736
+ },
3737
+ "data-testid": "passkey-add",
3738
+ children: t("addPasskey")
3739
+ }
3740
+ ),
3741
+ /* @__PURE__ */ jsx19(Button15, { size: "sm", variant: factors.length || canPasskey ? "secondary" : "primary", onClick: () => setSettingUp(true), "data-testid": "second-factor-set-up", children: hasApp ? t("addAnother") : t("setUp") })
3742
+ ] });
3743
+ return /* @__PURE__ */ jsxs19(Panel14, { id: "second-factor", title: t("title"), description: t("panelHint"), actions, "data-testid": "second-factor", children: [
3744
+ /* @__PURE__ */ jsxs19(Stack16, { gap: "field", children: [
3745
+ /* @__PURE__ */ jsx19(InlineAlert15, { tone: "danger", children: mine.error ?? error }),
3746
+ data?.disabled && /* @__PURE__ */ jsx19(InlineAlert15, { tone: "neutral", children: t("disabled") }),
3747
+ data && /* @__PURE__ */ jsxs19(HStack17, { gap: "2", wrap: "wrap", children: [
3748
+ factors.length > 0 && !data.disabled ? /* @__PURE__ */ jsx19(StatusPill13, { tone: "success", children: t("on") }) : /* @__PURE__ */ jsx19(StatusPill13, { children: t("off") }),
3749
+ /* @__PURE__ */ jsx19(Text19, { color: "fg.muted", textStyle: "body.sm", "data-testid": "second-factor-mode", children: t(`modeHint.${data.mode}`) })
3750
+ ] }),
3751
+ data?.senders && data.senders.length > 0 && /* @__PURE__ */ jsx19(Text19, { color: "fg.muted", textStyle: "body.sm", "data-testid": "second-factor-senders", children: t("alsoBy", { list: data.senders.map((s) => `${nameOf(s)} (${s.to})`).join(", ") }) }),
3752
+ settingUp && /* @__PURE__ */ jsx19(
3753
+ AppSetup,
3754
+ {
3755
+ start: () => request("/me/second-factors/app", { method: "POST" }),
3756
+ confirm: confirmCode,
3757
+ onCancel: () => setSettingUp(false),
3758
+ onDone: (made) => {
3759
+ setSettingUp(false);
3760
+ notify11.success(t("setup.done"));
3761
+ setCodes(made);
3762
+ void mine.reload();
3763
+ onChange?.();
3764
+ }
3765
+ }
3766
+ ),
3767
+ addingPasskey && /* @__PURE__ */ jsx19(
3768
+ "form",
3769
+ {
3770
+ onSubmit: (e) => {
3771
+ e.preventDefault();
3772
+ void addPasskey();
3773
+ },
3774
+ "data-testid": "passkey-add-form",
3775
+ children: /* @__PURE__ */ jsxs19(Stack16, { gap: "field", maxW: "md", children: [
3776
+ /* @__PURE__ */ jsx19(Text19, { color: "fg.muted", textStyle: "body.sm", children: t("passkeyHint") }),
3777
+ /* @__PURE__ */ jsx19(Field9, { label: t("passkeyName"), children: /* @__PURE__ */ jsx19(Input9, { value: passkeyName, maxLength: 64, autoFocus: true, onChange: (e) => setPasskeyName(e.target.value), "data-testid": "passkey-name" }) }),
3778
+ /* @__PURE__ */ jsxs19(HStack17, { children: [
3779
+ /* @__PURE__ */ jsx19(Button15, { type: "submit", loading: busy, "data-testid": "passkey-create", children: t("passkeyCreate") }),
3780
+ /* @__PURE__ */ jsx19(Button15, { variant: "secondary", onClick: () => setAddingPasskey(false), disabled: busy, children: t("cancel") })
3781
+ ] })
3782
+ ] })
3783
+ }
3784
+ ),
3785
+ codes && /* @__PURE__ */ jsx19(RecoveryCodes, { codes, onSaved: () => setCodes(null) }),
3786
+ !settingUp && !addingPasskey && !codes && /* @__PURE__ */ jsxs19(Fragment9, { children: [
3787
+ /* @__PURE__ */ jsx19(
3788
+ DataTable11,
3789
+ {
3790
+ "aria-label": t("title"),
3791
+ size: "sm",
3792
+ rows: data?.factors,
3793
+ loading: mine.loading,
3794
+ skeletonRows: 1,
3795
+ getRowId: (f) => f.id,
3796
+ empty: t("none"),
3797
+ columns: [
3798
+ {
3799
+ id: "kind",
3800
+ header: t("title"),
3801
+ cell: (f) => f.kind === "passkey" ? /* @__PURE__ */ jsxs19(Stack16, { gap: "0", children: [
3802
+ /* @__PURE__ */ jsx19(Text19, { fontWeight: "medium", children: f.name || t("kinds.passkey") }),
3803
+ /* @__PURE__ */ jsx19(Text19, { textStyle: "caption", color: "fg.muted", children: f.provider ? `${t("kinds.passkey")} \xB7 ${f.provider}` : t("kinds.passkey") })
3804
+ ] }) : /* @__PURE__ */ jsx19(Text19, { fontWeight: "medium", children: t(`kinds.${f.kind}`) })
3805
+ },
3806
+ { id: "added", header: t("added"), nowrap: true, cell: (f) => fmt.dateTime(f.createdAt) },
3807
+ { id: "used", header: t("lastUsed"), nowrap: true, cell: (f) => f.lastUsedAt ? fmt.dateTime(f.lastUsedAt) : t("never") },
3808
+ {
3809
+ id: "remove",
3810
+ header: "",
3811
+ cell: (f) => /* @__PURE__ */ jsxs19(HStack17, { gap: "2", justify: "flex-end", children: [
3812
+ f.kind === "passkey" && /* @__PURE__ */ jsx19(
3813
+ Button15,
3814
+ {
3815
+ size: "sm",
3816
+ variant: "ghost",
3817
+ onClick: () => {
3818
+ setNewName(f.name ?? "");
3819
+ setRenaming(f);
3820
+ },
3821
+ children: t("rename")
3822
+ }
3823
+ ),
3824
+ /* @__PURE__ */ jsx19(Button15, { size: "sm", variant: "secondary", onClick: () => void remove(f), children: t("remove") })
3825
+ ] })
3826
+ }
3827
+ ]
3828
+ }
3829
+ ),
3830
+ factors.length > 0 && /* @__PURE__ */ jsxs19(HStack17, { justify: "space-between", wrap: "wrap", gap: "2", children: [
3831
+ /* @__PURE__ */ jsx19(Text19, { textStyle: "body.sm", color: "fg.muted", "data-testid": "recovery-left", children: t("recoveryLeft", { count: num(data?.recoveryCodesLeft ?? 0) }) }),
3832
+ /* @__PURE__ */ jsx19(Button15, { size: "sm", variant: "secondary", onClick: () => void renew(), children: t("renew") })
3833
+ ] })
3834
+ ] })
3835
+ ] }),
3836
+ /* @__PURE__ */ jsx19(
3837
+ FormDialog3,
3838
+ {
3839
+ open: renaming != null,
3840
+ onOpenChange: (open) => !open && setRenaming(null),
3841
+ title: t("renameTitle"),
3842
+ submitLabel: t("save"),
3843
+ onSubmit: rename,
3844
+ submitDisabled: !newName.trim(),
3845
+ children: /* @__PURE__ */ jsx19(Field9, { label: t("passkeyName"), required: true, children: /* @__PURE__ */ jsx19(Input9, { value: newName, maxLength: 64, required: true, onChange: (e) => setNewName(e.target.value), "data-testid": "passkey-rename" }) })
3846
+ }
3847
+ )
3848
+ ] });
3849
+ }
3850
+
3851
+ // src/areas/guard/pages.tsx
3852
+ import { useSyncExternalStore } from "react";
3853
+
3854
+ // src/areas/guard/SignUpScreen.tsx
3855
+ import { useEffect as useEffect5, useMemo as useMemo4, useRef as useRef2, useState as useState15 } from "react";
3856
+ import { Grid as Grid4, HStack as HStack18, Input as Input10, Stack as Stack17, Text as Text20 } from "@chakra-ui/react";
3857
+ import { Trash2 as Trash23 } from "lucide-react";
3858
+ import {
3859
+ AddButton,
3860
+ Button as Button16,
3861
+ EmptyState as EmptyState2,
3862
+ Field as Field10,
3863
+ IconButton as IconButton2,
3864
+ InlineAlert as InlineAlert16,
3865
+ notify as notify12,
3866
+ PageHeader as PageHeader9,
3867
+ Panel as Panel15,
3868
+ SaveBar,
3869
+ SelectField as SelectField5,
3870
+ SwitchField as SwitchField2,
3871
+ useApiAction as useApiAction11,
3872
+ useApiQuery as useApiQuery12,
3873
+ useAreaRequest as useAreaRequest16
3874
+ } from "@abpjs/ui";
3875
+
3876
+ // src/areas/guard/signUpRules.ts
3877
+ var DOMAIN = /^(?=.{1,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z][a-z0-9-]{0,61}[a-z0-9]$/;
3878
+ function normalDomain(typed) {
3879
+ const d = typed.trim().replace(/^@/, "").replace(/\.$/, "").toLowerCase();
3880
+ return DOMAIN.test(d) ? d : null;
3881
+ }
3882
+ function signUpChanges(saved, form) {
3883
+ const was = new Set(saved.domains);
3884
+ const now = new Set(form.domains);
3885
+ return Number(saved.enabled !== form.enabled) + Number(saved.directoryId !== form.directoryId) + form.domains.filter((d) => !was.has(d)).length + saved.domains.filter((d) => !now.has(d)).length;
3886
+ }
3887
+
3888
+ // src/areas/guard/SignUpScreen.tsx
3889
+ import { jsx as jsx20, jsxs as jsxs20 } from "react/jsx-runtime";
3890
+ function fromSettings(s) {
3891
+ return { enabled: s.enabled, directoryId: s.directoryId ?? "", domains: [...s.emailDomains] };
3892
+ }
3893
+ function SignUpScreen({ directoriesPage = true } = {}) {
3894
+ const t = useGuardNs("signUpSettings");
3895
+ const request = useAreaRequest16("guard");
3896
+ const settings = useApiQuery12("guard", "/signup/settings");
3897
+ const action = useApiAction11();
3898
+ const [form, setForm] = useState15({ enabled: false, directoryId: "", domains: [] });
3899
+ const [started, setStarted] = useState15(false);
3900
+ const [adding, setAdding] = useState15(false);
3901
+ const [draft, setDraft] = useState15("");
3902
+ const [draftError, setDraftError] = useState15("");
3903
+ const [directoryError, setDirectoryError] = useState15("");
3904
+ const addButton = useRef2(null);
3905
+ const draftInput = useRef2(null);
3906
+ useEffect5(() => {
3907
+ if (settings.data) setForm(fromSettings(settings.data));
3908
+ }, [settings.data]);
3909
+ const saved = useMemo4(() => settings.data ? fromSettings(settings.data) : form, [settings.data, form]);
3910
+ const changes = settings.data ? signUpChanges(saved, form) + Number(draft.trim() !== "") : 0;
3911
+ if (settings.error) return /* @__PURE__ */ jsx20(InlineAlert16, { tone: "danger", children: settings.error });
3912
+ const listed = settings.data?.directories ?? [];
3913
+ const current = settings.data?.directoryId;
3914
+ const internal = current && !listed.some((d) => d.id === current) && settings.data?.directoryName ? [...listed, { id: current, name: settings.data.directoryName }] : listed;
3915
+ const chosen = internal.find((d) => d.id === form.directoryId);
3916
+ const neverSetUp = !!settings.data && !settings.data.enabled && !settings.data.directoryId && settings.data.emailDomains.length === 0;
3917
+ function change(next) {
3918
+ setForm((f) => ({ ...f, ...next }));
3919
+ action.setError(null);
3920
+ }
3921
+ function addDraft() {
3922
+ const domain = normalDomain(draft);
3923
+ if (!domain) {
3924
+ setDraftError(t("domainInvalid"));
3925
+ return;
3926
+ }
3927
+ if (form.domains.includes(domain)) {
3928
+ setDraftError(t("domainTwice", { domain }));
3929
+ return;
3930
+ }
3931
+ change({ domains: [...form.domains, domain] });
3932
+ setDraft("");
3933
+ setDraftError("");
3934
+ draftInput.current?.focus();
3935
+ }
3936
+ function closeDraft() {
3937
+ setAdding(false);
3938
+ setDraft("");
3939
+ setDraftError("");
3940
+ requestAnimationFrame(() => addButton.current?.focus());
3941
+ }
3942
+ function onDraftKey(e) {
3943
+ if (e.key === "Enter") {
3944
+ e.preventDefault();
3945
+ addDraft();
3946
+ } else if (e.key === "Escape") {
3947
+ e.preventDefault();
3948
+ closeDraft();
3949
+ }
3950
+ }
3951
+ function discard() {
3952
+ if (settings.data) setForm(fromSettings(settings.data));
3953
+ setStarted(false);
3954
+ setDirectoryError("");
3955
+ closeDraft();
3956
+ action.setError(null);
3957
+ }
3958
+ async function save() {
3959
+ let domains = form.domains;
3960
+ if (draft.trim()) {
3961
+ const domain = normalDomain(draft);
3962
+ if (!domain) {
3963
+ setDraftError(t("domainInvalid"));
3964
+ draftInput.current?.focus();
3965
+ return;
3966
+ }
3967
+ if (!domains.includes(domain)) domains = [...domains, domain];
3968
+ }
3969
+ if (form.enabled && !form.directoryId) {
3970
+ setDirectoryError(t("directoryRequired"));
3971
+ return;
3972
+ }
3973
+ const result = await action.run(
3974
+ () => request("/signup/settings", {
3975
+ method: "PUT",
3976
+ body: { enabled: form.enabled, directoryId: form.directoryId || null, emailDomains: domains }
3977
+ })
3978
+ );
3979
+ if (result) {
3980
+ settings.setData(result);
3981
+ setStarted(false);
3982
+ closeDraft();
3983
+ notify12.success(t("saved"));
3984
+ }
3985
+ }
3986
+ const saveBar = /* @__PURE__ */ jsx20(SaveBar, { open: changes > 0, count: changes, onSave: () => void save(), onDiscard: discard, busy: action.busy });
3987
+ if (neverSetUp && !started && changes === 0) {
3988
+ return /* @__PURE__ */ jsxs20(Stack17, { gap: "section", children: [
3989
+ /* @__PURE__ */ jsx20(PageHeader9, { title: t("title"), description: t("subtitle") }),
3990
+ /* @__PURE__ */ jsx20(
3991
+ EmptyState2,
3992
+ {
3993
+ variant: "page",
3994
+ size: "md",
3995
+ kind: "first-use",
3996
+ illustration: "records",
3997
+ title: t("emptyTitle"),
3998
+ description: t("emptyText"),
3999
+ action: /* @__PURE__ */ jsx20(Button16, { variant: "primary", onClick: () => {
4000
+ setStarted(true);
4001
+ change({ enabled: true });
4002
+ }, children: t("turnOn") })
4003
+ }
4004
+ )
4005
+ ] });
4006
+ }
4007
+ return /* @__PURE__ */ jsxs20(Stack17, { gap: "section", children: [
4008
+ /* @__PURE__ */ jsx20(PageHeader9, { title: t("title"), description: t("subtitle") }),
4009
+ /* @__PURE__ */ jsx20(Panel15, { "data-testid": "signup-settings", loading: !settings.data, children: /* @__PURE__ */ jsxs20(Stack17, { gap: "5", children: [
4010
+ /* @__PURE__ */ jsx20(SwitchField2, { label: t("enabled"), checked: form.enabled, onCheckedChange: (c) => {
4011
+ change({ enabled: c });
4012
+ if (!c) setDirectoryError("");
4013
+ } }),
4014
+ form.enabled ? /* @__PURE__ */ jsxs20(Grid4, { templateColumns: { base: "minmax(0, 1fr)", md: "repeat(2, minmax(0, 1fr))" }, gap: { base: "5", md: "4 8" }, alignItems: "start", children: [
4015
+ /* @__PURE__ */ jsx20(
4016
+ Field10,
4017
+ {
4018
+ label: t("directory"),
4019
+ required: true,
4020
+ invalid: !!directoryError,
4021
+ errorText: directoryError,
4022
+ helperText: chosen ? t("grantHint", { group: `${chosen.name} (everyone)` }) : directoriesPage ? t("directoryHint") : t("directoryHintPlain"),
4023
+ children: /* @__PURE__ */ jsx20(
4024
+ SelectField5,
4025
+ {
4026
+ value: form.directoryId,
4027
+ onChange: (e) => {
4028
+ change({ directoryId: e.target.value });
4029
+ setDirectoryError("");
4030
+ },
4031
+ options: [{ value: "", label: t("chooseDirectory") }, ...internal.map((d) => ({ value: d.id, label: d.name }))]
4032
+ }
4033
+ )
4034
+ }
4035
+ ),
4036
+ /* @__PURE__ */ jsxs20(Stack17, { gap: "2", minW: "0", role: "group", "aria-labelledby": "signup-domains", children: [
4037
+ /* @__PURE__ */ jsx20(Text20, { id: "signup-domains", textStyle: "label", children: t("domains") }),
4038
+ /* @__PURE__ */ jsxs20(Stack17, { gap: "1", children: [
4039
+ form.domains.length === 0 && !adding && /* @__PURE__ */ jsx20(Text20, { textStyle: "body.sm", color: "fg.muted", py: "1.5", children: t("anyDomain") }),
4040
+ form.domains.map((d) => /* @__PURE__ */ jsxs20(HStack18, { gap: "2", minH: "11", ps: "3", pe: "1", borderRadius: "l2", bg: "bg.subtle", textStyle: "body.sm", children: [
4041
+ /* @__PURE__ */ jsx20(Text20, { flex: "1", minW: "0", fontWeight: "bold", dir: "ltr", textAlign: "start", truncate: true, children: d }),
4042
+ /* @__PURE__ */ jsx20(
4043
+ IconButton2,
4044
+ {
4045
+ remove: true,
4046
+ size: "sm",
4047
+ "aria-label": t("removeDomain", { domain: d }),
4048
+ onClick: () => change({ domains: form.domains.filter((x) => x !== d) }),
4049
+ children: /* @__PURE__ */ jsx20(Trash23, {})
4050
+ }
4051
+ )
4052
+ ] }, d))
4053
+ ] }),
4054
+ adding ? /* @__PURE__ */ jsx20(Field10, { invalid: !!draftError, errorText: draftError, children: /* @__PURE__ */ jsxs20(HStack18, { gap: "3", align: "center", w: "full", children: [
4055
+ /* @__PURE__ */ jsx20(
4056
+ Input10,
4057
+ {
4058
+ ref: draftInput,
4059
+ autoFocus: true,
4060
+ "aria-label": t("addDomain"),
4061
+ value: draft,
4062
+ dir: "ltr",
4063
+ placeholder: "acme.com",
4064
+ maxW: { md: "20rem" },
4065
+ flex: "1",
4066
+ onChange: (e) => {
4067
+ setDraft(e.target.value);
4068
+ setDraftError("");
4069
+ },
4070
+ onKeyDown: onDraftKey,
4071
+ onBlur: () => {
4072
+ if (!draft.trim()) closeDraft();
4073
+ }
4074
+ }
4075
+ ),
4076
+ /* @__PURE__ */ jsx20(AddButton, { onMouseDown: (e) => e.preventDefault(), onClick: addDraft, children: t("add") })
4077
+ ] }) }) : /* @__PURE__ */ jsx20(AddButton, { ref: addButton, alignSelf: "flex-start", onClick: () => setAdding(true), children: t("addDomain") })
4078
+ ] })
4079
+ ] }) : /* @__PURE__ */ jsx20(Text20, { textStyle: "body.sm", color: "fg.muted", children: t("off") }),
4080
+ /* @__PURE__ */ jsx20(InlineAlert16, { tone: "danger", children: action.error })
4081
+ ] }) }),
4082
+ saveBar
4083
+ ] });
4084
+ }
4085
+
4086
+ // src/areas/guard/pages.tsx
4087
+ import { jsx as jsx21 } from "react/jsx-runtime";
4088
+ function subscribe(changed) {
4089
+ window.addEventListener("popstate", changed);
4090
+ return () => window.removeEventListener("popstate", changed);
4091
+ }
4092
+ function MergePage({ id, routes }) {
4093
+ const into = useSyncExternalStore(
4094
+ subscribe,
4095
+ () => new URLSearchParams(window.location.search).get("into"),
4096
+ () => null
4097
+ );
4098
+ return /* @__PURE__ */ jsx21(MergeScreen, { id, into, routes });
4099
+ }
4100
+ function guardPages(options) {
4101
+ const base = (options.base ?? "/admin").replace(/\/$/, "");
4102
+ const routes = guardRoutes(base);
4103
+ const directories = options.directories ?? true;
4104
+ const visible = options.visible ?? (options.host?.can ? () => options.host.can("guard.site.admin") : void 0);
4105
+ const weight = options.weight ?? 100;
4106
+ const page = (key, at, component) => ({
4107
+ id: `guard.${key}`,
4108
+ section: options.section,
4109
+ weight: weight + 4 - at,
4110
+ title: options.titles?.[key] ?? en_default[`nav.${key}`],
4111
+ href: `${base}/${key}`,
4112
+ about: options.about?.[key],
4113
+ plugin: "guard",
4114
+ visible,
4115
+ component
4116
+ });
4117
+ const pages = [
4118
+ page(
4119
+ "accounts",
4120
+ 0,
4121
+ ({ path }) => !path[0] ? /* @__PURE__ */ jsx21(AccountsScreen, { routes }) : path[1] === "merge" ? /* @__PURE__ */ jsx21(MergePage, { id: path[0], routes }) : /* @__PURE__ */ jsx21(AccountScreen, { id: path[0], routes })
4122
+ ),
4123
+ page("groups", 1, ({ path }) => path[0] ? /* @__PURE__ */ jsx21(GroupScreen, { id: path[0], routes }) : /* @__PURE__ */ jsx21(GroupsScreen, { routes }))
4124
+ ];
4125
+ if (directories) {
4126
+ pages.push(page("directories", 2, ({ path }) => path[0] ? /* @__PURE__ */ jsx21(DirectoryScreen, { id: path[0], routes }) : /* @__PURE__ */ jsx21(DirectoriesScreen, { routes })));
4127
+ }
4128
+ pages.push(page("signup", 3, () => /* @__PURE__ */ jsx21(SignUpScreen, { directoriesPage: directories })), page("anonymous", 4, () => /* @__PURE__ */ jsx21(AnonymousScreen, {})));
4129
+ return pages;
4130
+ }
4131
+
4132
+ // src/areas/guard/StrongFactorBanner.tsx
4133
+ import { Box as Box5 } from "@chakra-ui/react";
4134
+ import { AppLink as AppLink10, InlineAlert as InlineAlert17, useFormatters as useFormatters10 } from "@abpjs/ui";
4135
+ import { jsx as jsx22, jsxs as jsxs21 } from "react/jsx-runtime";
4136
+ function StrongFactorBanner({ strongFactor, setUpHref }) {
4137
+ const t = useGuardTexts();
4138
+ const fmt = useFormatters10();
4139
+ if (!strongFactor || strongFactor.has || !strongFactor.requiredBy) return null;
4140
+ return /* @__PURE__ */ jsx22(Box5, { mb: "section", "data-testid": "strong-factor-banner", children: /* @__PURE__ */ jsxs21(InlineAlert17, { tone: strongFactor.overdue ? "danger" : "warning", title: t("secondFactor.required.title"), children: [
4141
+ t(strongFactor.overdue ? "secondFactor.required.overdue" : "secondFactor.required.by", { date: fmt.dateTime(strongFactor.requiredBy) }),
4142
+ " ",
4143
+ /* @__PURE__ */ jsx22(AppLink10, { href: setUpHref, children: t("secondFactor.required.setUp") })
4144
+ ] }) });
4145
+ }
4146
+ export {
4147
+ AccountEmailsPanel,
4148
+ AccountNameEditor,
4149
+ AccountScreen,
4150
+ AccountSecondFactorPanel,
4151
+ AccountStatusPill,
4152
+ AccountsScreen,
4153
+ AnonymousScreen,
4154
+ AppSetup,
4155
+ CodeInput,
4156
+ CountList,
4157
+ CreateAccountPanel,
4158
+ CreateGroupPanel,
4159
+ DirectoriesScreen,
4160
+ DirectoryForm,
4161
+ DirectoryScreen,
4162
+ DirectoryWarnings,
4163
+ DuplicatesPanel,
4164
+ FlagPill,
4165
+ GroupScreen,
4166
+ GroupTree,
4167
+ GroupTwoFactorPanel,
4168
+ GroupsScreen,
4169
+ MergeScreen,
4170
+ MergesPanel,
4171
+ MySecondFactorsPanel,
4172
+ PassFail,
4173
+ PluginStatePill,
4174
+ RecoveryCodes,
4175
+ SignUpScreen,
4176
+ StrongFactorBanner,
4177
+ SyncResultPill,
4178
+ SyncStatus,
4179
+ TWO_FACTOR_MODES,
4180
+ groupedKey,
4181
+ guardPages,
4182
+ guardRoutes,
4183
+ isSystemGroup,
4184
+ num,
4185
+ useAccountCan,
4186
+ useCountLabel,
4187
+ useGuardNs,
4188
+ useGuardTexts,
4189
+ usePartLabel,
4190
+ useSenderName,
4191
+ useWrittenName,
4192
+ withParts
4193
+ };
4194
+ //# sourceMappingURL=guard.js.map