@simsustech/quasar-components 0.12.0 → 0.12.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/LocaleSelect-BtwfPrmu.js +461 -0
  3. package/dist/QSubmitButton-CDKwJhmF.js +102 -0
  4. package/dist/authentication.js +1936 -2031
  5. package/dist/de-C-vWIfjC.js +12 -0
  6. package/dist/de-DC33TYVA.js +354 -0
  7. package/dist/de-DO8EeJ0Q.js +4 -0
  8. package/dist/de-Kz_vvc9w.js +106 -0
  9. package/dist/form.js +1092 -1226
  10. package/dist/general.js +319 -361
  11. package/dist/md3.js +407 -395
  12. package/dist/nl-DIfqXZG_.js +354 -0
  13. package/dist/nl-DWmQiCdO.js +12 -0
  14. package/dist/nl-DbV07Lx7.js +106 -0
  15. package/dist/nl-ZpgX9FUw.js +4 -0
  16. package/dist/quasar-components.css +5 -4
  17. package/dist/rolldown-runtime-D7D4PA-g.js +13 -0
  18. package/dist/types/{ui → src/ui}/authentication/LoginForm.vue.d.ts +5 -0
  19. package/dist/types/src/ui/form/lang/nl.d.ts +3 -0
  20. package/dist/types/src/ui/general/lang/nl.d.ts +3 -0
  21. package/dist/types/src/ui/md3/lang/de.d.ts +3 -0
  22. package/dist/types/src/ui/md3/lang/en-US.d.ts +3 -0
  23. package/dist/types/src/ui/md3/lang/nl.d.ts +3 -0
  24. package/dist/virtualModules.js +62 -2
  25. package/dist/vite-plugin.js +50 -101
  26. package/package.json +33 -33
  27. package/src/ui/authentication/LoginForm.vue +9 -4
  28. package/src/ui/authentication/lang/de.ts +118 -0
  29. package/src/ui/authentication/lang/en-US.ts +1 -1
  30. package/src/ui/flags/lang/de.ts +384 -0
  31. package/src/ui/form/lang/de.ts +211 -0
  32. package/src/ui/general/lang/de.ts +13 -0
  33. package/src/ui/md3/lang/de.ts +7 -0
  34. package/tsconfig.json +1 -0
  35. package/tsconfig.node.json +2 -1
  36. package/tsconfig.types.json +2 -1
  37. package/dist/LocaleSelect.vue_vue_type_script_setup_true_lang-e2EDOyzk.js +0 -353
  38. package/dist/QSubmitButton.vue_vue_type_script_setup_true_lang-D-I0Gws4.js +0 -109
  39. package/dist/nl-BRjDNoaR.js +0 -209
  40. package/dist/nl-CneFq5NZ.js +0 -112
  41. package/dist/nl-NLgZUAKl.js +0 -6
  42. package/dist/nl-X50pmfG-.js +0 -12
  43. package/eslint.config.js +0 -29
  44. package/dist/types/{ui → src/ui}/authentication/AccountsTable.vue.d.ts +0 -0
  45. package/dist/types/{ui → src/ui}/authentication/ConsentList.vue.d.ts +0 -0
  46. package/dist/types/{ui → src/ui}/authentication/EmailChangeForm.vue.d.ts +0 -0
  47. package/dist/types/{ui → src/ui}/authentication/EmailChangeStepper.vue.d.ts +0 -0
  48. package/dist/types/{ui → src/ui}/authentication/LoginButton.vue.d.ts +0 -0
  49. package/dist/types/{ui → src/ui}/authentication/LogoutButton.vue.d.ts +0 -0
  50. package/dist/types/{ui → src/ui}/authentication/LogoutForm.vue.d.ts +0 -0
  51. package/dist/types/{ui → src/ui}/authentication/OtpInput.vue.d.ts +0 -0
  52. package/dist/types/{ui → src/ui}/authentication/PasswordChangeForm.vue.d.ts +0 -0
  53. package/dist/types/{ui → src/ui}/authentication/PasswordChangeStepper.vue.d.ts +0 -0
  54. package/dist/types/{ui → src/ui}/authentication/RegisterForm.vue.d.ts +0 -0
  55. package/dist/types/{ui → src/ui}/authentication/RequestOtpForm.vue.d.ts +0 -0
  56. package/dist/types/{ui → src/ui}/authentication/UserMenuButton.vue.d.ts +0 -0
  57. package/dist/types/{ui → src/ui}/authentication/VerificationSlider.vue.d.ts +0 -0
  58. package/dist/types/{ui → src/ui}/authentication/index.d.ts +0 -0
  59. package/dist/types/{ui/authentication/lang/en-US.d.ts → src/ui/authentication/lang/de.d.ts} +0 -0
  60. package/dist/types/{ui/flags → src/ui/authentication}/lang/en-US.d.ts +0 -0
  61. package/dist/types/{ui → src/ui}/authentication/lang/index.d.ts +0 -0
  62. package/dist/types/{ui → src/ui}/authentication/lang/nl.d.ts +0 -0
  63. package/dist/types/{ui → src/ui}/flags/index.d.ts +0 -0
  64. package/dist/types/{ui/flags/lang/nl.d.ts → src/ui/flags/lang/de.d.ts} +0 -0
  65. package/dist/types/{ui/general → src/ui/flags}/lang/en-US.d.ts +0 -0
  66. package/dist/types/{ui → src/ui}/flags/lang/index.d.ts +0 -0
  67. package/dist/types/{ui/general → src/ui/flags}/lang/nl.d.ts +0 -0
  68. package/dist/types/{ui → src/ui}/form/BooleanItem.vue.d.ts +0 -0
  69. package/dist/types/{ui → src/ui}/form/BooleanSelect.vue.d.ts +0 -0
  70. package/dist/types/{ui → src/ui}/form/CountrySelect.vue.d.ts +0 -0
  71. package/dist/types/{ui → src/ui}/form/CronScheduleInput.vue.d.ts +0 -0
  72. package/dist/types/{ui → src/ui}/form/CurrencySelect.vue.d.ts +0 -0
  73. package/dist/types/{ui → src/ui}/form/DateInput.vue.d.ts +1 -1
  74. package/dist/types/{ui → src/ui}/form/DatePicker.vue.d.ts +0 -0
  75. package/dist/types/{ui → src/ui}/form/EmailInput.vue.d.ts +0 -0
  76. package/dist/types/{ui → src/ui}/form/FilteredModelSelect.vue.d.ts +0 -0
  77. package/dist/types/{ui → src/ui}/form/FormInput.vue.d.ts +0 -0
  78. package/dist/types/{ui → src/ui}/form/FormItem.vue.d.ts +0 -0
  79. package/dist/types/{ui → src/ui}/form/GenderItem.vue.d.ts +0 -0
  80. package/dist/types/{ui → src/ui}/form/GenderSelect.vue.d.ts +0 -0
  81. package/dist/types/{ui → src/ui}/form/LocaleSelect.vue.d.ts +0 -0
  82. package/dist/types/{ui → src/ui}/form/PostalCodeInput.vue.d.ts +0 -0
  83. package/dist/types/{ui → src/ui}/form/TelephoneNumberInput.vue.d.ts +0 -0
  84. package/dist/types/{ui → src/ui}/form/index.d.ts +0 -0
  85. package/dist/types/{ui/form/lang/en-US.d.ts → src/ui/form/lang/de.d.ts} +0 -0
  86. package/dist/types/{ui/form/lang/nl.d.ts → src/ui/form/lang/en-US.d.ts} +0 -0
  87. package/dist/types/{ui → src/ui}/form/lang/index.d.ts +2 -2
  88. package/dist/types/{ui → src/ui}/general/QDrawerList.vue.d.ts +0 -0
  89. package/dist/types/{ui → src/ui}/general/QLanguageSelect.vue.d.ts +0 -0
  90. package/dist/types/{ui → src/ui}/general/QStyledCard.vue.d.ts +0 -0
  91. package/dist/types/{ui → src/ui}/general/QStyledLayout.vue.d.ts +0 -0
  92. package/dist/types/{ui → src/ui}/general/QSubmitButton.vue.d.ts +1 -1
  93. package/dist/types/{ui → src/ui}/general/ResourcePage.vue.d.ts +1 -1
  94. /package/dist/types/{ui → src/ui}/general/ResponsiveDialog.vue.d.ts +0 -0
  95. /package/dist/types/{ui → src/ui}/general/index.d.ts +0 -0
  96. /package/dist/types/{ui/md3/lang/en-US.d.ts → src/ui/general/lang/de.d.ts} +0 -0
  97. /package/dist/types/{ui/md3/lang/nl.d.ts → src/ui/general/lang/en-US.d.ts} +0 -0
  98. /package/dist/types/{ui → src/ui}/general/lang/index.d.ts +0 -0
  99. /package/dist/types/{ui → src/ui}/icons/index.d.ts +0 -0
  100. /package/dist/types/{ui → src/ui}/icons/labels.d.ts +0 -0
  101. /package/dist/types/{ui → src/ui}/md3/Md3Layout.vue.d.ts +0 -0
  102. /package/dist/types/{ui → src/ui}/md3/NavigationRailFabs.vue.d.ts +0 -0
  103. /package/dist/types/{ui → src/ui}/md3/index.d.ts +0 -0
  104. /package/dist/types/{ui → src/ui}/md3/lang/index.d.ts +0 -0
  105. /package/dist/types/{virtualModules.d.ts → src/virtualModules.d.ts} +0 -0
  106. /package/dist/types/{vite-plugin.d.ts → src/vite-plugin.d.ts} +0 -0
@@ -1,286 +1,292 @@
1
- import { useQuasar, QForm, QInput, QStepper, QStep, QStepperNavigation, QIcon, QBtn, QSlider, QList, QItem, QItemSection, QMenu, QTable, QTr, QTd, QItemLabel, QSelect, QTh } from "quasar";
2
- import { ref, defineComponent, watch, computed, openBlock, createBlock, unref, mergeProps, withCtx, createVNode, renderSlot, toRef, createCommentVNode, toRefs, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, createElementVNode } from "vue";
3
- import { _ as _sfc_main$f } from "./QSubmitButton.vue_vue_type_script_setup_true_lang-D-I0Gws4.js";
4
- const lang$1 = {
5
- isoName: "en-US",
6
- myAccount: "Account",
7
- signOut: "Sign out",
8
- unprocessableRequest: "The server was unable to process the request.",
9
- consent: {
10
- message: (name) => `${name} is requesting access to your data.`,
11
- deny: "Deny",
12
- allow: "Allow"
13
- },
14
- email: {
15
- fields: {
16
- email: "Email address",
17
- newEmail: "Your new email address",
18
- repeatNewEmail: "Repeat your new email address"
19
- },
20
- validations: {
21
- fieldRequired: "Field is required.",
22
- invalidEmail: "A valid email address is required.",
23
- emailsDoNotMatch: "The email addresses do not match."
24
- },
25
- changeEmail: "Change your email address.",
26
- emailChanged: "Your email address has been changed."
27
- },
28
- otp: {
29
- fields: {
30
- email: "Your (current) email address"
31
- },
32
- validations: {
33
- fieldRequired: "Field is required.",
34
- invalidEmail: "A valid email address is required."
35
- },
36
- messages: {
37
- unknownEmail: "Email address is not registered."
38
- },
39
- request: "Request a one-time password",
40
- checkEmail: "You will receive a verification code in your email. Please use this verification code in the next step.",
41
- verificationCode: "Verification code"
42
- },
43
- login: {
44
- fields: {
45
- email: "Email",
46
- password: "Password",
47
- username: "Username"
48
- },
49
- validations: {
50
- fieldRequired: "Field is required.",
51
- invalidEmail: "A valid email address is required."
52
- },
53
- login: "Login",
54
- loginWith: "Login with",
55
- createAccount: "Create account",
56
- forgotPassword: "Forgot your password?",
57
- invalidCredentials: "Email address or password is incorrect."
58
- },
59
- password: {
60
- fields: {
61
- password: "Password",
62
- repeatPassword: "Repeat password"
63
- },
64
- validations: {
65
- fieldRequired: "Field is required",
66
- minimumPasswordLength: (minimumPasswordLength) => `The minimum length of the password is ${minimumPasswordLength} characters.`,
67
- passwordsDoNotMatch: "The password do not match."
68
- },
69
- changePassword: "Change your password.",
70
- passwordChanged: "Your password has been changed."
71
- },
72
- register: {
73
- fields: {
74
- email: "Email",
75
- password: "Password",
76
- username: "Username",
77
- repeatPassword: "Repeat password"
78
- },
79
- validations: {
80
- fieldRequired: "Field is required",
81
- invalidEmail: "A valid email address is required.",
82
- notAlphaNumeric: "Veld mag geen speciale tekens bevatten."
83
- },
84
- register: "Register",
85
- forgotPassword: "Forgot your password?",
86
- accountCreated: "Your account has been sucessfully created. You can now login with your credentials.",
87
- alreadyRegistered: "Email address is already registered."
88
- },
89
- verification: {
90
- slider: "Please drag the slider below all the way to the right."
91
- },
92
- account: {
93
- title: "Accounts",
94
- fields: {
95
- name: "Name",
96
- email: "Email",
97
- roles: "Roles"
98
- },
99
- labels: {
100
- addRole: "Add role",
101
- removeRole: "Remove role"
102
- },
103
- messages: {
104
- addRole: ({ email }) => `Select the role which you want to add to ${email}.`,
105
- removeRole: ({ email }) => `Select the role which you want to remove from ${email}.`
106
- }
107
- },
108
- logout: {
109
- confirmation: "Are you sure you want to log out?",
110
- logout: "Log out"
111
- }
1
+ import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
+ import { t as QSubmitButton_default } from "./QSubmitButton-CDKwJhmF.js";
3
+ import { QBtn, QForm, QIcon, QInput, QItem, QItemLabel, QItemSection, QList, QMenu, QSelect, QSlider, QStep, QStepper, QStepperNavigation, QTable, QTd, QTh, QTr, useQuasar } from "quasar";
4
+ import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeProps, openBlock, ref, renderList, renderSlot, toDisplayString, toRef, toRefs, unref, watch, withCtx } from "vue";
5
+ //#region src/ui/authentication/lang/en-US.ts
6
+ var en_US_exports = /* @__PURE__ */ __exportAll({ default: () => lang$1 });
7
+ var lang$1 = {
8
+ isoName: "en-US",
9
+ myAccount: "Account",
10
+ signOut: "Sign out",
11
+ unprocessableRequest: "The server was unable to process the request.",
12
+ consent: {
13
+ message: (name) => `${name} is requesting access to your data.`,
14
+ deny: "Deny",
15
+ allow: "Allow"
16
+ },
17
+ email: {
18
+ fields: {
19
+ email: "Email address",
20
+ newEmail: "Your new email address",
21
+ repeatNewEmail: "Repeat your new email address"
22
+ },
23
+ validations: {
24
+ fieldRequired: "Field is required.",
25
+ invalidEmail: "A valid email address is required.",
26
+ emailsDoNotMatch: "The email addresses do not match."
27
+ },
28
+ changeEmail: "Change your email address.",
29
+ emailChanged: "Your email address has been changed."
30
+ },
31
+ otp: {
32
+ fields: { email: "Your (current) email address" },
33
+ validations: {
34
+ fieldRequired: "Field is required.",
35
+ invalidEmail: "A valid email address is required."
36
+ },
37
+ messages: { unknownEmail: "Email address is not registered." },
38
+ request: "Request a one-time password",
39
+ checkEmail: "You will receive a verification code in your email. Please use this verification code in the next step.",
40
+ verificationCode: "Verification code"
41
+ },
42
+ login: {
43
+ fields: {
44
+ email: "Email",
45
+ password: "Password",
46
+ username: "Username"
47
+ },
48
+ validations: {
49
+ fieldRequired: "Field is required.",
50
+ invalidEmail: "A valid email address is required."
51
+ },
52
+ login: "Login",
53
+ loginWith: "Login with",
54
+ createAccount: "Create account",
55
+ forgotPassword: "Forgot your password?",
56
+ invalidCredentials: "Email address or password is incorrect."
57
+ },
58
+ password: {
59
+ fields: {
60
+ password: "Password",
61
+ repeatPassword: "Repeat password"
62
+ },
63
+ validations: {
64
+ fieldRequired: "Field is required",
65
+ minimumPasswordLength: (minimumPasswordLength) => `The minimum length of the password is ${minimumPasswordLength} characters.`,
66
+ passwordsDoNotMatch: "The password do not match."
67
+ },
68
+ changePassword: "Change your password.",
69
+ passwordChanged: "Your password has been changed."
70
+ },
71
+ register: {
72
+ fields: {
73
+ email: "Email",
74
+ password: "Password",
75
+ username: "Username",
76
+ repeatPassword: "Repeat password"
77
+ },
78
+ validations: {
79
+ fieldRequired: "Field is required",
80
+ invalidEmail: "A valid email address is required.",
81
+ notAlphaNumeric: "Field can not contain special characters."
82
+ },
83
+ register: "Register",
84
+ forgotPassword: "Forgot your password?",
85
+ accountCreated: "Your account has been sucessfully created. You can now login with your credentials.",
86
+ alreadyRegistered: "Email address is already registered."
87
+ },
88
+ verification: { slider: "Please drag the slider below all the way to the right." },
89
+ account: {
90
+ title: "Accounts",
91
+ fields: {
92
+ name: "Name",
93
+ email: "Email",
94
+ roles: "Roles"
95
+ },
96
+ labels: {
97
+ addRole: "Add role",
98
+ removeRole: "Remove role"
99
+ },
100
+ messages: {
101
+ addRole: ({ email }) => `Select the role which you want to add to ${email}.`,
102
+ removeRole: ({ email }) => `Select the role which you want to remove from ${email}.`
103
+ }
104
+ },
105
+ logout: {
106
+ confirmation: "Are you sure you want to log out?",
107
+ logout: "Log out"
108
+ }
112
109
  };
113
- const enUS = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
114
- __proto__: null,
115
- default: lang$1
116
- }, Symbol.toStringTag, { value: "Module" }));
117
- const lang = ref(lang$1);
118
- const locales = /* @__PURE__ */ Object.assign({
119
- "./en-US.ts": () => Promise.resolve().then(() => enUS),
120
- "./nl.ts": () => import("./nl-CneFq5NZ.js")
110
+ //#endregion
111
+ //#region src/ui/authentication/lang/index.ts
112
+ var lang = ref(lang$1);
113
+ var locales = /* @__PURE__ */ Object.assign({
114
+ "./de.ts": () => import("./de-Kz_vvc9w.js"),
115
+ "./en-US.ts": () => Promise.resolve().then(() => en_US_exports),
116
+ "./nl.ts": () => import("./nl-DbV07Lx7.js")
121
117
  });
122
- const useLang = () => {
123
- return lang;
118
+ var useLang = () => {
119
+ return lang;
124
120
  };
125
- let loadingLanguage = false;
126
- const loadLang = async (isoName) => {
127
- if (!loadingLanguage) {
128
- loadingLanguage = true;
129
- try {
130
- const data = (await locales[`./${isoName}.ts`]()).default;
131
- if (data) {
132
- lang.value = data;
133
- }
134
- } catch (e) {
135
- throw new Error(
136
- `[quasar-components] Failed to load ${isoName} language file.`
137
- );
138
- }
139
- loadingLanguage = false;
140
- }
121
+ var loadingLanguage = false;
122
+ var loadLang = async (isoName) => {
123
+ if (!loadingLanguage) {
124
+ loadingLanguage = true;
125
+ try {
126
+ const data = (await locales[`./${isoName}.ts`]()).default;
127
+ if (data) lang.value = data;
128
+ } catch (e) {
129
+ throw new Error(`[quasar-components] Failed to load ${isoName} language file.`);
130
+ }
131
+ loadingLanguage = false;
132
+ }
141
133
  };
134
+ //#endregion
135
+ //#region ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/es/lib/util/assertString.js
142
136
  function assertString(input) {
143
- if (input === void 0 || input === null) throw new TypeError("Expected a string but received a ".concat(input));
144
- if (input.constructor.name !== "String") throw new TypeError("Expected a string but received a ".concat(input.constructor.name));
137
+ if (input === void 0 || input === null) throw new TypeError("Expected a string but received a ".concat(input));
138
+ if (input.constructor.name !== "String") throw new TypeError("Expected a string but received a ".concat(input.constructor.name));
145
139
  }
140
+ //#endregion
141
+ //#region ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/es/lib/util/checkHost.js
146
142
  function isRegExp(obj) {
147
- return Object.prototype.toString.call(obj) === "[object RegExp]";
143
+ return Object.prototype.toString.call(obj) === "[object RegExp]";
148
144
  }
149
145
  function checkHost(host, matches) {
150
- for (var i = 0; i < matches.length; i++) {
151
- var match = matches[i];
152
- if (host === match || isRegExp(match) && match.test(host)) {
153
- return true;
154
- }
155
- }
156
- return false;
146
+ for (var i = 0; i < matches.length; i++) {
147
+ var match = matches[i];
148
+ if (host === match || isRegExp(match) && match.test(host)) return true;
149
+ }
150
+ return false;
157
151
  }
158
- function _typeof$1(o) {
159
- "@babel/helpers - typeof";
160
- return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
161
- return typeof o2;
162
- } : function(o2) {
163
- return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
164
- }, _typeof$1(o);
152
+ //#endregion
153
+ //#region ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/es/lib/isByteLength.js
154
+ function _typeof$2(o) {
155
+ "@babel/helpers - typeof";
156
+ return _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
157
+ return typeof o;
158
+ } : function(o) {
159
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
160
+ }, _typeof$2(o);
165
161
  }
166
162
  function isByteLength(str, options) {
167
- assertString(str);
168
- var min;
169
- var max;
170
- if (_typeof$1(options) === "object") {
171
- min = options.min || 0;
172
- max = options.max;
173
- } else {
174
- min = arguments[1];
175
- max = arguments[2];
176
- }
177
- var len = encodeURI(str).split(/%..|./).length - 1;
178
- return len >= min && (typeof max === "undefined" || len <= max);
163
+ assertString(str);
164
+ var min;
165
+ var max;
166
+ if (_typeof$2(options) === "object") {
167
+ min = options.min || 0;
168
+ max = options.max;
169
+ } else {
170
+ min = arguments[1];
171
+ max = arguments[2];
172
+ }
173
+ var len = encodeURI(str).split(/%..|./).length - 1;
174
+ return len >= min && (typeof max === "undefined" || len <= max);
175
+ }
176
+ //#endregion
177
+ //#region ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/es/lib/util/merge.js
178
+ function _typeof$1(o) {
179
+ "@babel/helpers - typeof";
180
+ return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
181
+ return typeof o;
182
+ } : function(o) {
183
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
184
+ }, _typeof$1(o);
179
185
  }
180
186
  function merge() {
181
- var obj = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
182
- var defaults = arguments.length > 1 ? arguments[1] : void 0;
183
- for (var key in defaults) {
184
- if (typeof obj[key] === "undefined") {
185
- obj[key] = defaults[key];
186
- }
187
- }
188
- return obj;
187
+ var obj = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
188
+ var defaults = arguments.length > 1 ? arguments[1] : void 0;
189
+ if (_typeof$1(obj) !== "object" || obj === null) obj = {};
190
+ for (var key in defaults) if (typeof obj[key] === "undefined") obj[key] = defaults[key];
191
+ return obj;
189
192
  }
193
+ //#endregion
194
+ //#region ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/es/lib/isFQDN.js
190
195
  var default_fqdn_options = {
191
- require_tld: true,
192
- allow_underscores: false,
193
- allow_trailing_dot: false,
194
- allow_numeric_tld: false,
195
- allow_wildcard: false,
196
- ignore_max_length: false
196
+ require_tld: true,
197
+ allow_underscores: false,
198
+ allow_trailing_dot: false,
199
+ allow_numeric_tld: false,
200
+ allow_wildcard: false,
201
+ ignore_max_length: false
197
202
  };
198
203
  function isFQDN(str, options) {
199
- assertString(str);
200
- options = merge(options, default_fqdn_options);
201
- if (options.allow_trailing_dot && str[str.length - 1] === ".") {
202
- str = str.substring(0, str.length - 1);
203
- }
204
- if (options.allow_wildcard === true && str.indexOf("*.") === 0) {
205
- str = str.substring(2);
206
- }
207
- var parts = str.split(".");
208
- var tld = parts[parts.length - 1];
209
- if (options.require_tld) {
210
- if (parts.length < 2) {
211
- return false;
212
- }
213
- if (!options.allow_numeric_tld && !/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(tld)) {
214
- return false;
215
- }
216
- if (/\s/.test(tld)) {
217
- return false;
218
- }
219
- }
220
- if (!options.allow_numeric_tld && /^\d+$/.test(tld)) {
221
- return false;
222
- }
223
- return parts.every(function(part) {
224
- if (part.length > 63 && !options.ignore_max_length) {
225
- return false;
226
- }
227
- if (!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(part)) {
228
- return false;
229
- }
230
- if (/[\uff01-\uff5e]/.test(part)) {
231
- return false;
232
- }
233
- if (/^-|-$/.test(part)) {
234
- return false;
235
- }
236
- if (!options.allow_underscores && /_/.test(part)) {
237
- return false;
238
- }
239
- return true;
240
- });
204
+ assertString(str);
205
+ options = merge(options, default_fqdn_options);
206
+ if (options.allow_trailing_dot && str[str.length - 1] === ".") str = str.substring(0, str.length - 1);
207
+ if (options.allow_wildcard === true && str.indexOf("*.") === 0) str = str.substring(2);
208
+ var parts = str.split(".");
209
+ var tld = parts[parts.length - 1];
210
+ if (options.require_tld) {
211
+ if (parts.length < 2) return false;
212
+ if (!options.allow_numeric_tld && !/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(tld)) return false;
213
+ if (/\s/.test(tld)) return false;
214
+ }
215
+ if (!options.allow_numeric_tld && /^\d+$/.test(tld)) return false;
216
+ return parts.every(function(part) {
217
+ if (part.length > 63 && !options.ignore_max_length) return false;
218
+ if (!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(part)) return false;
219
+ if (/[\uff01-\uff5e]/.test(part)) return false;
220
+ if (/^-|-$/.test(part)) return false;
221
+ if (!options.allow_underscores && /_/.test(part)) return false;
222
+ return true;
223
+ });
241
224
  }
225
+ //#endregion
226
+ //#region ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/es/lib/isIP.js
242
227
  function _typeof(o) {
243
- "@babel/helpers - typeof";
244
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
245
- return typeof o2;
246
- } : function(o2) {
247
- return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
248
- }, _typeof(o);
228
+ "@babel/helpers - typeof";
229
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
230
+ return typeof o;
231
+ } : function(o) {
232
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
233
+ }, _typeof(o);
249
234
  }
235
+ /**
236
+ 11.3. Examples
237
+
238
+ The following addresses
239
+
240
+ fe80::1234 (on the 1st link of the node)
241
+ ff02::5678 (on the 5th link of the node)
242
+ ff08::9abc (on the 10th organization of the node)
243
+
244
+ would be represented as follows:
245
+
246
+ fe80::1234%1
247
+ ff02::5678%5
248
+ ff08::9abc%10
249
+
250
+ (Here we assume a natural translation from a zone index to the
251
+ <zone_id> part, where the Nth zone of any scope is translated into
252
+ "N".)
253
+
254
+ If we use interface names as <zone_id>, those addresses could also be
255
+ represented as follows:
256
+
257
+ fe80::1234%ne0
258
+ ff02::5678%pvc1.3
259
+ ff08::9abc%interface10
260
+
261
+ where the interface "ne0" belongs to the 1st link, "pvc1.3" belongs
262
+ to the 5th link, and "interface10" belongs to the 10th organization.
263
+ * * */
250
264
  var IPv4SegmentFormat = "(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])";
251
265
  var IPv4AddressFormat = "(".concat(IPv4SegmentFormat, "[.]){3}").concat(IPv4SegmentFormat);
252
266
  var IPv4AddressRegExp = new RegExp("^".concat(IPv4AddressFormat, "$"));
253
267
  var IPv6SegmentFormat = "(?:[0-9a-fA-F]{1,4})";
254
268
  var IPv6AddressRegExp = new RegExp("^(" + "(?:".concat(IPv6SegmentFormat, ":){7}(?:").concat(IPv6SegmentFormat, "|:)|") + "(?:".concat(IPv6SegmentFormat, ":){6}(?:").concat(IPv4AddressFormat, "|:").concat(IPv6SegmentFormat, "|:)|") + "(?:".concat(IPv6SegmentFormat, ":){5}(?::").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,2}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){4}(?:(:").concat(IPv6SegmentFormat, "){0,1}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,3}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){3}(?:(:").concat(IPv6SegmentFormat, "){0,2}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,4}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){2}(?:(:").concat(IPv6SegmentFormat, "){0,3}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,5}|:)|") + "(?:".concat(IPv6SegmentFormat, ":){1}(?:(:").concat(IPv6SegmentFormat, "){0,4}:").concat(IPv4AddressFormat, "|(:").concat(IPv6SegmentFormat, "){1,6}|:)|") + "(?::((?::".concat(IPv6SegmentFormat, "){0,5}:").concat(IPv4AddressFormat, "|(?::").concat(IPv6SegmentFormat, "){1,7}|:))") + ")(%[0-9a-zA-Z.]{1,})?$");
255
269
  function isIP(ipAddress) {
256
- var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
257
- assertString(ipAddress);
258
- var version = (_typeof(options) === "object" ? options.version : arguments[1]) || "";
259
- if (!version) {
260
- return isIP(ipAddress, {
261
- version: 4
262
- }) || isIP(ipAddress, {
263
- version: 6
264
- });
265
- }
266
- if (version.toString() === "4") {
267
- return IPv4AddressRegExp.test(ipAddress);
268
- }
269
- if (version.toString() === "6") {
270
- return IPv6AddressRegExp.test(ipAddress);
271
- }
272
- return false;
270
+ var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
271
+ assertString(ipAddress);
272
+ var version = (_typeof(options) === "object" ? options.version : arguments[1]) || "";
273
+ if (!version) return isIP(ipAddress, { version: 4 }) || isIP(ipAddress, { version: 6 });
274
+ if (version.toString() === "4") return IPv4AddressRegExp.test(ipAddress);
275
+ if (version.toString() === "6") return IPv6AddressRegExp.test(ipAddress);
276
+ return false;
273
277
  }
278
+ //#endregion
279
+ //#region ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/es/lib/isEmail.js
274
280
  var default_email_options = {
275
- allow_display_name: false,
276
- allow_underscores: false,
277
- require_display_name: false,
278
- allow_utf8_local_part: true,
279
- require_tld: true,
280
- blacklisted_chars: "",
281
- ignore_max_length: false,
282
- host_blacklist: [],
283
- host_whitelist: []
281
+ allow_display_name: false,
282
+ allow_underscores: false,
283
+ require_display_name: false,
284
+ allow_utf8_local_part: true,
285
+ require_tld: true,
286
+ blacklisted_chars: "",
287
+ ignore_max_length: false,
288
+ host_blacklist: [],
289
+ host_whitelist: []
284
290
  };
285
291
  var splitNameAddress = /^([^\x00-\x1F\x7F-\x9F\cX]+)</i;
286
292
  var emailUserPart = /^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i;
@@ -289,1818 +295,1717 @@ var quotedEmailUser = /^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e
289
295
  var emailUserUtf8Part = /^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A1-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i;
290
296
  var quotedEmailUserUtf8 = /^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i;
291
297
  var defaultMaxEmailLength = 254;
298
+ /**
299
+ * Validate display name according to the RFC2822: https://tools.ietf.org/html/rfc2822#appendix-A.1.2
300
+ * @param {String} display_name
301
+ */
292
302
  function validateDisplayName(display_name) {
293
- var display_name_without_quotes = display_name.replace(/^"(.+)"$/, "$1");
294
- if (!display_name_without_quotes.trim()) {
295
- return false;
296
- }
297
- var contains_illegal = /[\.";<>]/.test(display_name_without_quotes);
298
- if (contains_illegal) {
299
- if (display_name_without_quotes === display_name) {
300
- return false;
301
- }
302
- var all_start_with_back_slash = display_name_without_quotes.split('"').length === display_name_without_quotes.split('\\"').length;
303
- if (!all_start_with_back_slash) {
304
- return false;
305
- }
306
- }
307
- return true;
303
+ var display_name_without_quotes = display_name.replace(/^"(.+)"$/, "$1");
304
+ if (!display_name_without_quotes.trim()) return false;
305
+ if (/[\.";<>]/.test(display_name_without_quotes)) {
306
+ if (display_name_without_quotes === display_name) return false;
307
+ if (!(display_name_without_quotes.split("\"").length === display_name_without_quotes.split("\\\"").length)) return false;
308
+ }
309
+ return true;
308
310
  }
309
311
  function isEmail(str, options) {
310
- assertString(str);
311
- options = merge(options, default_email_options);
312
- if (options.require_display_name || options.allow_display_name) {
313
- var display_email = str.match(splitNameAddress);
314
- if (display_email) {
315
- var display_name = display_email[1];
316
- str = str.replace(display_name, "").replace(/(^<|>$)/g, "");
317
- if (display_name.endsWith(" ")) {
318
- display_name = display_name.slice(0, -1);
319
- }
320
- if (!validateDisplayName(display_name)) {
321
- return false;
322
- }
323
- } else if (options.require_display_name) {
324
- return false;
325
- }
326
- }
327
- if (!options.ignore_max_length && str.length > defaultMaxEmailLength) {
328
- return false;
329
- }
330
- var parts = str.split("@");
331
- var domain = parts.pop();
332
- var lower_domain = domain.toLowerCase();
333
- if (options.host_blacklist.length > 0 && checkHost(lower_domain, options.host_blacklist)) {
334
- return false;
335
- }
336
- if (options.host_whitelist.length > 0 && !checkHost(lower_domain, options.host_whitelist)) {
337
- return false;
338
- }
339
- var user = parts.join("@");
340
- if (options.domain_specific_validation && (lower_domain === "gmail.com" || lower_domain === "googlemail.com")) {
341
- user = user.toLowerCase();
342
- var username = user.split("+")[0];
343
- if (!isByteLength(username.replace(/\./g, ""), {
344
- min: 6,
345
- max: 30
346
- })) {
347
- return false;
348
- }
349
- var _user_parts = username.split(".");
350
- for (var i = 0; i < _user_parts.length; i++) {
351
- if (!gmailUserPart.test(_user_parts[i])) {
352
- return false;
353
- }
354
- }
355
- }
356
- if (options.ignore_max_length === false && (!isByteLength(user, {
357
- max: 64
358
- }) || !isByteLength(domain, {
359
- max: 254
360
- }))) {
361
- return false;
362
- }
363
- if (!isFQDN(domain, {
364
- require_tld: options.require_tld,
365
- ignore_max_length: options.ignore_max_length,
366
- allow_underscores: options.allow_underscores
367
- })) {
368
- if (!options.allow_ip_domain) {
369
- return false;
370
- }
371
- if (!isIP(domain)) {
372
- if (!domain.startsWith("[") || !domain.endsWith("]")) {
373
- return false;
374
- }
375
- var noBracketdomain = domain.slice(1, -1);
376
- if (noBracketdomain.length === 0 || !isIP(noBracketdomain)) {
377
- return false;
378
- }
379
- }
380
- }
381
- if (options.blacklisted_chars) {
382
- if (user.search(new RegExp("[".concat(options.blacklisted_chars, "]+"), "g")) !== -1) return false;
383
- }
384
- if (user[0] === '"' && user[user.length - 1] === '"') {
385
- user = user.slice(1, user.length - 1);
386
- return options.allow_utf8_local_part ? quotedEmailUserUtf8.test(user) : quotedEmailUser.test(user);
387
- }
388
- var pattern = options.allow_utf8_local_part ? emailUserUtf8Part : emailUserPart;
389
- var user_parts = user.split(".");
390
- for (var _i = 0; _i < user_parts.length; _i++) {
391
- if (!pattern.test(user_parts[_i])) {
392
- return false;
393
- }
394
- }
395
- return true;
312
+ assertString(str);
313
+ options = merge(options, default_email_options);
314
+ if (options.require_display_name || options.allow_display_name) {
315
+ var display_email = str.match(splitNameAddress);
316
+ if (display_email) {
317
+ var display_name = display_email[1];
318
+ str = str.replace(display_name, "").replace(/(^<|>$)/g, "");
319
+ if (display_name.endsWith(" ")) display_name = display_name.slice(0, -1);
320
+ if (!validateDisplayName(display_name)) return false;
321
+ } else if (options.require_display_name) return false;
322
+ }
323
+ if (!options.ignore_max_length && str.length > defaultMaxEmailLength) return false;
324
+ var parts = str.split("@");
325
+ var domain = parts.pop();
326
+ var lower_domain = domain.toLowerCase();
327
+ if (options.host_blacklist.length > 0 && checkHost(lower_domain, options.host_blacklist)) return false;
328
+ if (options.host_whitelist.length > 0 && !checkHost(lower_domain, options.host_whitelist)) return false;
329
+ var user = parts.join("@");
330
+ if (options.domain_specific_validation && (lower_domain === "gmail.com" || lower_domain === "googlemail.com")) {
331
+ user = user.toLowerCase();
332
+ var username = user.split("+")[0];
333
+ if (!isByteLength(username.replace(/\./g, ""), {
334
+ min: 6,
335
+ max: 30
336
+ })) return false;
337
+ var _user_parts = username.split(".");
338
+ for (var i = 0; i < _user_parts.length; i++) if (!gmailUserPart.test(_user_parts[i])) return false;
339
+ }
340
+ if (options.ignore_max_length === false && (!isByteLength(user, { max: 64 }) || !isByteLength(domain, { max: 254 }))) return false;
341
+ if (!isFQDN(domain, {
342
+ require_tld: options.require_tld,
343
+ ignore_max_length: options.ignore_max_length,
344
+ allow_underscores: options.allow_underscores
345
+ })) {
346
+ if (!options.allow_ip_domain) return false;
347
+ if (!isIP(domain)) {
348
+ if (!domain.startsWith("[") || !domain.endsWith("]")) return false;
349
+ var noBracketdomain = domain.slice(1, -1);
350
+ if (noBracketdomain.length === 0 || !isIP(noBracketdomain)) return false;
351
+ }
352
+ }
353
+ if (options.blacklisted_chars) {
354
+ if (user.search(new RegExp("[".concat(options.blacklisted_chars, "]+"), "g")) !== -1) return false;
355
+ }
356
+ if (user[0] === "\"" && user[user.length - 1] === "\"") {
357
+ user = user.slice(1, user.length - 1);
358
+ return options.allow_utf8_local_part ? quotedEmailUserUtf8.test(user) : quotedEmailUser.test(user);
359
+ }
360
+ var pattern = options.allow_utf8_local_part ? emailUserUtf8Part : emailUserPart;
361
+ var user_parts = user.split(".");
362
+ for (var _i = 0; _i < user_parts.length; _i++) if (!pattern.test(user_parts[_i])) return false;
363
+ return true;
396
364
  }
397
- const __default__$c = {
398
- name: "RequestOtpForm"
399
- };
400
- const _sfc_main$e = /* @__PURE__ */ defineComponent({
401
- ...__default__$c,
402
- props: {
403
- form: {},
404
- input: {}
405
- },
406
- emits: ["submit"],
407
- setup(__props, { expose: __expose, emit: __emit }) {
408
- const emit = __emit;
409
- const $q = useQuasar();
410
- const lang2 = useLang();
411
- if (lang2.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
412
- watch($q.lang, (val) => {
413
- loadLang($q.lang.isoName);
414
- });
415
- const email = ref("");
416
- const formRef = ref();
417
- const validations = computed(() => ({
418
- email: [
419
- (val) => !!val || lang2.value.otp.validations.fieldRequired,
420
- (val) => isEmail(val) || lang2.value.otp.validations.invalidEmail
421
- ]
422
- }));
423
- const submit = ({
424
- done
425
- }) => {
426
- formRef.value?.validate().then((success) => {
427
- if (success) {
428
- emit("submit", {
429
- email: email.value.trim(),
430
- done
431
- });
432
- } else done();
433
- });
434
- };
435
- const variables = ref({});
436
- const functions = ref({ submit });
437
- __expose({
438
- variables,
439
- functions
440
- });
441
- return (_ctx, _cache) => {
442
- const _component_q_input = QInput;
443
- return openBlock(), createBlock(unref(QForm), mergeProps({
444
- ref_key: "formRef",
445
- ref: formRef
446
- }, __props.form, {
447
- onSubmit: _cache[1] || (_cache[1] = (e) => submit)
448
- }), {
449
- default: withCtx(() => [
450
- createVNode(_component_q_input, mergeProps(__props.input, {
451
- id: "email",
452
- modelValue: email.value,
453
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => email.value = $event),
454
- modelModifiers: { trim: true },
455
- name: "email",
456
- type: "text",
457
- label: unref(lang2).otp.fields.email,
458
- rules: validations.value["email"],
459
- "lazy-rules": "",
460
- autofocus: ""
461
- }), null, 16, ["modelValue", "label", "rules"]),
462
- renderSlot(_ctx.$slots, "default", { submit })
463
- ]),
464
- _: 3
465
- }, 16);
466
- };
467
- }
365
+ //#endregion
366
+ //#region src/ui/authentication/RequestOtpForm.vue
367
+ var RequestOtpForm_default = /* @__PURE__ */ defineComponent({
368
+ name: "RequestOtpForm",
369
+ props: {
370
+ form: {},
371
+ input: {}
372
+ },
373
+ emits: ["submit"],
374
+ setup(__props, { expose: __expose, emit: __emit }) {
375
+ const emit = __emit;
376
+ const $q = useQuasar();
377
+ const lang = useLang();
378
+ if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
379
+ watch($q.lang, (val) => {
380
+ loadLang($q.lang.isoName);
381
+ });
382
+ const email = ref("");
383
+ const formRef = ref();
384
+ const validations = computed(() => ({ email: [(val) => !!val || lang.value.otp.validations.fieldRequired, (val) => isEmail(val) || lang.value.otp.validations.invalidEmail] }));
385
+ const submit = ({ done }) => {
386
+ formRef.value?.validate().then((success) => {
387
+ if (success) emit("submit", {
388
+ email: email.value.trim(),
389
+ done
390
+ });
391
+ else done();
392
+ });
393
+ };
394
+ __expose({
395
+ variables: ref({}),
396
+ functions: ref({ submit })
397
+ });
398
+ return (_ctx, _cache) => {
399
+ const _component_q_input = QInput;
400
+ return openBlock(), createBlock(unref(QForm), mergeProps({
401
+ ref_key: "formRef",
402
+ ref: formRef
403
+ }, __props.form, { onSubmit: _cache[1] || (_cache[1] = (e) => submit) }), {
404
+ default: withCtx(() => [createVNode(_component_q_input, mergeProps(__props.input, {
405
+ id: "email",
406
+ modelValue: email.value,
407
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => email.value = $event),
408
+ modelModifiers: { trim: true },
409
+ name: "email",
410
+ type: "text",
411
+ label: unref(lang).otp.fields.email,
412
+ rules: validations.value["email"],
413
+ "lazy-rules": "",
414
+ autofocus: ""
415
+ }), null, 16, [
416
+ "modelValue",
417
+ "label",
418
+ "rules"
419
+ ]), renderSlot(_ctx.$slots, "default", { submit })]),
420
+ _: 3
421
+ }, 16);
422
+ };
423
+ }
468
424
  });
469
- const _sfc_main$d = /* @__PURE__ */ defineComponent({
470
- __name: "OtpInput",
471
- props: {
472
- modelValue: {}
473
- },
474
- emits: ["update:modelValue"],
475
- setup(__props) {
476
- const lang2 = useLang();
477
- const validations = computed(() => ({
478
- otp: [(val) => !!val || lang2.value.otp.validations.fieldRequired]
479
- }));
480
- return (_ctx, _cache) => {
481
- return openBlock(), createBlock(unref(QInput), {
482
- id: "otp",
483
- name: "otp",
484
- "model-value": __props.modelValue,
485
- "bottom-slots": "",
486
- "lazy-rules": "",
487
- label: unref(lang2).otp.verificationCode,
488
- rules: validations.value["otp"],
489
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event))
490
- }, null, 8, ["model-value", "label", "rules"]);
491
- };
492
- }
425
+ //#endregion
426
+ //#region src/ui/authentication/OtpInput.vue
427
+ var OtpInput_default = /* @__PURE__ */ defineComponent({
428
+ __name: "OtpInput",
429
+ props: { modelValue: {} },
430
+ emits: ["update:modelValue"],
431
+ setup(__props) {
432
+ const lang = useLang();
433
+ const validations = computed(() => ({ otp: [(val) => !!val || lang.value.otp.validations.fieldRequired] }));
434
+ return (_ctx, _cache) => {
435
+ return openBlock(), createBlock(unref(QInput), {
436
+ id: "otp",
437
+ name: "otp",
438
+ "model-value": __props.modelValue,
439
+ "bottom-slots": "",
440
+ "lazy-rules": "",
441
+ label: unref(lang).otp.verificationCode,
442
+ rules: validations.value["otp"],
443
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event))
444
+ }, null, 8, [
445
+ "model-value",
446
+ "label",
447
+ "rules"
448
+ ]);
449
+ };
450
+ }
493
451
  });
494
- const __default__$b = {
495
- name: "EmailChangeForm"
496
- };
497
- const _sfc_main$c = /* @__PURE__ */ defineComponent({
498
- ...__default__$b,
499
- props: {
500
- email: {},
501
- form: {},
502
- input: {}
503
- },
504
- emits: ["submit"],
505
- setup(__props, { expose: __expose, emit: __emit }) {
506
- const props = __props;
507
- const emit = __emit;
508
- const $q = useQuasar();
509
- const lang2 = useLang();
510
- if (lang2.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
511
- watch($q.lang, (val) => {
512
- loadLang($q.lang.isoName);
513
- });
514
- const email = toRef(props, "email");
515
- const otp = ref("");
516
- const newEmail = ref("");
517
- const repeatNewEmail = ref("");
518
- const header = computed(() => lang2.value.email.changeEmail);
519
- const formRef = ref();
520
- const validations = computed(() => ({
521
- newEmail: [
522
- (val) => !!val || lang2.value.email.validations.fieldRequired,
523
- (val) => isEmail(val) || lang2.value.email.validations.invalidEmail
524
- ],
525
- repeatNewEmail: [
526
- (val) => !!val || lang2.value.email.validations.fieldRequired,
527
- (val) => isEmail(val) || lang2.value.email.validations.emailsDoNotMatch
528
- ]
529
- }));
530
- const submit = (evt) => {
531
- formRef.value?.validate().then((success) => {
532
- if (success) {
533
- emit("submit", {
534
- email: email.value.trim(),
535
- newEmail: newEmail.value.trim(),
536
- otp: otp.value,
537
- done: evt.done
538
- });
539
- } else evt.done();
540
- });
541
- };
542
- const variables = ref({
543
- header
544
- });
545
- const functions = ref({
546
- submit
547
- });
548
- __expose({
549
- variables,
550
- functions
551
- });
552
- return (_ctx, _cache) => {
553
- const _component_q_input = QInput;
554
- return openBlock(), createBlock(unref(QForm), mergeProps({
555
- ref_key: "formRef",
556
- ref: formRef,
557
- class: "q-gutter-md"
558
- }, __props.form, {
559
- onSubmit: _cache[3] || (_cache[3] = (e) => submit)
560
- }), {
561
- default: withCtx(() => [
562
- createVNode(_sfc_main$d, mergeProps(__props.input, {
563
- modelValue: otp.value,
564
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => otp.value = $event)
565
- }), null, 16, ["modelValue"]),
566
- createVNode(_component_q_input, mergeProps(__props.input, {
567
- id: "newEmail",
568
- modelValue: newEmail.value,
569
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => newEmail.value = $event),
570
- name: "newEmail",
571
- label: unref(lang2).email.fields.newEmail,
572
- "bottom-slots": "",
573
- rules: validations.value["newEmail"],
574
- "lazy-rules": ""
575
- }), null, 16, ["modelValue", "label", "rules"]),
576
- createVNode(_component_q_input, mergeProps(__props.input, {
577
- id: "repeatNewEmail",
578
- modelValue: repeatNewEmail.value,
579
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => repeatNewEmail.value = $event),
580
- name: "repeatNewEmail",
581
- label: unref(lang2).email.fields.repeatNewEmail,
582
- "bottom-slots": "",
583
- rules: validations.value["repeatNewEmail"],
584
- "lazy-rules": ""
585
- }), null, 16, ["modelValue", "label", "rules"]),
586
- renderSlot(_ctx.$slots, "default", { submit })
587
- ]),
588
- _: 3
589
- }, 16);
590
- };
591
- }
452
+ //#endregion
453
+ //#region src/ui/authentication/EmailChangeForm.vue
454
+ var EmailChangeForm_default = /* @__PURE__ */ defineComponent({
455
+ name: "EmailChangeForm",
456
+ props: {
457
+ email: {},
458
+ form: {},
459
+ input: {}
460
+ },
461
+ emits: ["submit"],
462
+ setup(__props, { expose: __expose, emit: __emit }) {
463
+ const props = __props;
464
+ const emit = __emit;
465
+ const $q = useQuasar();
466
+ const lang = useLang();
467
+ if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
468
+ watch($q.lang, (val) => {
469
+ loadLang($q.lang.isoName);
470
+ });
471
+ const email = toRef(props, "email");
472
+ const otp = ref("");
473
+ const newEmail = ref("");
474
+ const repeatNewEmail = ref("");
475
+ const header = computed(() => lang.value.email.changeEmail);
476
+ const formRef = ref();
477
+ const validations = computed(() => ({
478
+ newEmail: [(val) => !!val || lang.value.email.validations.fieldRequired, (val) => isEmail(val) || lang.value.email.validations.invalidEmail],
479
+ repeatNewEmail: [(val) => !!val || lang.value.email.validations.fieldRequired, (val) => isEmail(val) || lang.value.email.validations.emailsDoNotMatch]
480
+ }));
481
+ const submit = (evt) => {
482
+ formRef.value?.validate().then((success) => {
483
+ if (success) emit("submit", {
484
+ email: email.value.trim(),
485
+ newEmail: newEmail.value.trim(),
486
+ otp: otp.value,
487
+ done: evt.done
488
+ });
489
+ else evt.done();
490
+ });
491
+ };
492
+ __expose({
493
+ variables: ref({ header }),
494
+ functions: ref({ submit })
495
+ });
496
+ return (_ctx, _cache) => {
497
+ const _component_q_input = QInput;
498
+ return openBlock(), createBlock(unref(QForm), mergeProps({
499
+ ref_key: "formRef",
500
+ ref: formRef,
501
+ class: "q-gutter-md"
502
+ }, __props.form, { onSubmit: _cache[3] || (_cache[3] = (e) => submit) }), {
503
+ default: withCtx(() => [
504
+ createVNode(OtpInput_default, mergeProps(__props.input, {
505
+ modelValue: otp.value,
506
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => otp.value = $event)
507
+ }), null, 16, ["modelValue"]),
508
+ createVNode(_component_q_input, mergeProps(__props.input, {
509
+ id: "newEmail",
510
+ modelValue: newEmail.value,
511
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => newEmail.value = $event),
512
+ name: "newEmail",
513
+ label: unref(lang).email.fields.newEmail,
514
+ "bottom-slots": "",
515
+ rules: validations.value["newEmail"],
516
+ "lazy-rules": ""
517
+ }), null, 16, [
518
+ "modelValue",
519
+ "label",
520
+ "rules"
521
+ ]),
522
+ createVNode(_component_q_input, mergeProps(__props.input, {
523
+ id: "repeatNewEmail",
524
+ modelValue: repeatNewEmail.value,
525
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => repeatNewEmail.value = $event),
526
+ name: "repeatNewEmail",
527
+ label: unref(lang).email.fields.repeatNewEmail,
528
+ "bottom-slots": "",
529
+ rules: validations.value["repeatNewEmail"],
530
+ "lazy-rules": ""
531
+ }), null, 16, [
532
+ "modelValue",
533
+ "label",
534
+ "rules"
535
+ ]),
536
+ renderSlot(_ctx.$slots, "default", { submit })
537
+ ]),
538
+ _: 3
539
+ }, 16);
540
+ };
541
+ }
592
542
  });
593
- const __default__$a = {
594
- name: "EmailChangeStepper"
595
- };
596
- const _sfc_main$b = /* @__PURE__ */ defineComponent({
597
- ...__default__$a,
598
- props: {
599
- input: {}
600
- },
601
- emits: ["requestOtp", "changeEmail"],
602
- setup(__props, { expose: __expose, emit: __emit }) {
603
- const emit = __emit;
604
- const $q = useQuasar();
605
- const lang2 = useLang();
606
- if (lang2.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
607
- watch($q.lang, (val) => {
608
- loadLang($q.lang.isoName);
609
- });
610
- const steps = ["requestOtp", "changeEmail"];
611
- const step = ref("requestOtp");
612
- const email = ref("");
613
- const header = computed(() => lang2.value.email.changeEmail);
614
- const emailChanged = computed(() => lang2.value.email.emailChanged);
615
- const unprocessableRequest = computed(() => lang2.value.unprocessableRequest);
616
- const checkEmail = computed(() => lang2.value.otp.checkEmail);
617
- const requestOtpFormRef = ref();
618
- const emailChangeFormRef = ref();
619
- const requestOtpHeader = computed(
620
- () => requestOtpFormRef.value?.variables.header || ""
621
- );
622
- const emailChangeHeader = computed(
623
- () => emailChangeFormRef.value?.variables.header || ""
624
- );
625
- const requestOtp = ({
626
- email: emittedEmail,
627
- done
628
- }) => {
629
- emit("requestOtp", {
630
- email: emittedEmail,
631
- done: () => {
632
- email.value = emittedEmail;
633
- done();
634
- }
635
- });
636
- };
637
- const changeEmail = ({ email: email2, newEmail, otp, done }) => {
638
- emit("changeEmail", {
639
- email: email2,
640
- newEmail,
641
- otp,
642
- done
643
- });
644
- };
645
- const variables = ref({
646
- header,
647
- emailChanged,
648
- unprocessableRequest,
649
- checkEmail,
650
- steps
651
- });
652
- const functions = ref({
653
- goToStep: (newStep) => step.value = newStep
654
- });
655
- __expose({
656
- variables,
657
- functions
658
- });
659
- return (_ctx, _cache) => {
660
- const _component_q_step = QStep;
661
- const _component_q_stepper_navigation = QStepperNavigation;
662
- const _component_q_stepper = QStepper;
663
- return openBlock(), createBlock(_component_q_stepper, {
664
- modelValue: step.value,
665
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => step.value = $event)
666
- }, {
667
- navigation: withCtx(() => [
668
- createVNode(_component_q_stepper_navigation, { class: "text-right" }, {
669
- default: withCtx(() => [
670
- step.value === "requestOtp" ? (openBlock(), createBlock(_sfc_main$f, {
671
- key: 0,
672
- "is-next-button": "",
673
- form: "requestOtpForm",
674
- onSubmit: requestOtpFormRef.value?.functions.submit
675
- }, null, 8, ["onSubmit"])) : createCommentVNode("", true),
676
- step.value === "changeEmail" ? (openBlock(), createBlock(_sfc_main$f, {
677
- key: 1,
678
- form: "emailChangeForm",
679
- onSubmit: emailChangeFormRef.value?.functions.submit
680
- }, null, 8, ["onSubmit"])) : createCommentVNode("", true)
681
- ]),
682
- _: 1
683
- })
684
- ]),
685
- default: withCtx(() => [
686
- createVNode(_component_q_step, {
687
- name: "requestOtp",
688
- title: requestOtpHeader.value
689
- }, {
690
- default: withCtx(() => [
691
- createVNode(_sfc_main$e, {
692
- ref_key: "requestOtpFormRef",
693
- ref: requestOtpFormRef,
694
- form: { id: "requestOtpForm" },
695
- input: __props.input,
696
- onSubmit: requestOtp
697
- }, null, 8, ["input"])
698
- ]),
699
- _: 1
700
- }, 8, ["title"]),
701
- createVNode(_component_q_step, {
702
- name: "changeEmail",
703
- title: emailChangeHeader.value
704
- }, {
705
- default: withCtx(() => [
706
- createVNode(_sfc_main$c, {
707
- ref_key: "emailChangeFormRef",
708
- ref: emailChangeFormRef,
709
- form: { id: "emailChangeForm" },
710
- email: email.value,
711
- input: __props.input,
712
- onSubmit: changeEmail
713
- }, null, 8, ["email", "input"])
714
- ]),
715
- _: 1
716
- }, 8, ["title"])
717
- ]),
718
- _: 1
719
- }, 8, ["modelValue"]);
720
- };
721
- }
543
+ //#endregion
544
+ //#region src/ui/authentication/EmailChangeStepper.vue
545
+ var EmailChangeStepper_default = /* @__PURE__ */ defineComponent({
546
+ name: "EmailChangeStepper",
547
+ props: { input: {} },
548
+ emits: ["requestOtp", "changeEmail"],
549
+ setup(__props, { expose: __expose, emit: __emit }) {
550
+ const emit = __emit;
551
+ const $q = useQuasar();
552
+ const lang = useLang();
553
+ if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
554
+ watch($q.lang, (val) => {
555
+ loadLang($q.lang.isoName);
556
+ });
557
+ const steps = ["requestOtp", "changeEmail"];
558
+ const step = ref("requestOtp");
559
+ const email = ref("");
560
+ const header = computed(() => lang.value.email.changeEmail);
561
+ const emailChanged = computed(() => lang.value.email.emailChanged);
562
+ const unprocessableRequest = computed(() => lang.value.unprocessableRequest);
563
+ const checkEmail = computed(() => lang.value.otp.checkEmail);
564
+ const requestOtpFormRef = ref();
565
+ const emailChangeFormRef = ref();
566
+ const requestOtpHeader = computed(() => requestOtpFormRef.value?.variables.header || "");
567
+ const emailChangeHeader = computed(() => emailChangeFormRef.value?.variables.header || "");
568
+ const requestOtp = ({ email: emittedEmail, done }) => {
569
+ emit("requestOtp", {
570
+ email: emittedEmail,
571
+ done: () => {
572
+ email.value = emittedEmail;
573
+ done();
574
+ }
575
+ });
576
+ };
577
+ const changeEmail = ({ email, newEmail, otp, done }) => {
578
+ emit("changeEmail", {
579
+ email,
580
+ newEmail,
581
+ otp,
582
+ done
583
+ });
584
+ };
585
+ __expose({
586
+ variables: ref({
587
+ header,
588
+ emailChanged,
589
+ unprocessableRequest,
590
+ checkEmail,
591
+ steps
592
+ }),
593
+ functions: ref({ goToStep: (newStep) => step.value = newStep })
594
+ });
595
+ return (_ctx, _cache) => {
596
+ const _component_q_step = QStep;
597
+ const _component_q_stepper_navigation = QStepperNavigation;
598
+ const _component_q_stepper = QStepper;
599
+ return openBlock(), createBlock(_component_q_stepper, {
600
+ modelValue: step.value,
601
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => step.value = $event)
602
+ }, {
603
+ navigation: withCtx(() => [createVNode(_component_q_stepper_navigation, { class: "text-right" }, {
604
+ default: withCtx(() => [step.value === "requestOtp" ? (openBlock(), createBlock(QSubmitButton_default, {
605
+ key: 0,
606
+ "is-next-button": "",
607
+ form: "requestOtpForm",
608
+ onSubmit: requestOtpFormRef.value?.functions.submit
609
+ }, null, 8, ["onSubmit"])) : createCommentVNode("", true), step.value === "changeEmail" ? (openBlock(), createBlock(QSubmitButton_default, {
610
+ key: 1,
611
+ form: "emailChangeForm",
612
+ onSubmit: emailChangeFormRef.value?.functions.submit
613
+ }, null, 8, ["onSubmit"])) : createCommentVNode("", true)]),
614
+ _: 1
615
+ })]),
616
+ default: withCtx(() => [createVNode(_component_q_step, {
617
+ name: "requestOtp",
618
+ title: requestOtpHeader.value
619
+ }, {
620
+ default: withCtx(() => [createVNode(RequestOtpForm_default, {
621
+ ref_key: "requestOtpFormRef",
622
+ ref: requestOtpFormRef,
623
+ form: { id: "requestOtpForm" },
624
+ input: __props.input,
625
+ onSubmit: requestOtp
626
+ }, null, 8, ["input"])]),
627
+ _: 1
628
+ }, 8, ["title"]), createVNode(_component_q_step, {
629
+ name: "changeEmail",
630
+ title: emailChangeHeader.value
631
+ }, {
632
+ default: withCtx(() => [createVNode(EmailChangeForm_default, {
633
+ ref_key: "emailChangeFormRef",
634
+ ref: emailChangeFormRef,
635
+ form: { id: "emailChangeForm" },
636
+ email: email.value,
637
+ input: __props.input,
638
+ onSubmit: changeEmail
639
+ }, null, 8, ["email", "input"])]),
640
+ _: 1
641
+ }, 8, ["title"])]),
642
+ _: 1
643
+ }, 8, ["modelValue"]);
644
+ };
645
+ }
722
646
  });
647
+ //#endregion
648
+ //#region ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/es/lib/equals.js
723
649
  function equals(str, comparison) {
724
- assertString(str);
725
- return str === comparison;
650
+ assertString(str);
651
+ return str === comparison;
726
652
  }
727
- const __default__$9 = {
728
- name: "PasswordChangeForm"
729
- };
730
- const _sfc_main$a = /* @__PURE__ */ defineComponent({
731
- ...__default__$9,
732
- props: {
733
- email: {},
734
- minimumPasswordLength: { default: 8 },
735
- form: { default: void 0 },
736
- input: { default: void 0 },
737
- icons: { default: () => ({
738
- visibility: "visibility",
739
- visibilityOff: "visibility_off"
740
- }) }
741
- },
742
- emits: ["submit"],
743
- setup(__props, { expose: __expose, emit: __emit }) {
744
- const props = __props;
745
- const emit = __emit;
746
- const $q = useQuasar();
747
- const lang2 = useLang();
748
- if (lang2.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
749
- watch($q.lang, (val) => {
750
- loadLang($q.lang.isoName);
751
- });
752
- const email = toRef(props, "email");
753
- const minimumPasswordLength = toRef(props, "minimumPasswordLength");
754
- const otp = ref("");
755
- const newPassword = ref("");
756
- const repeatNewPassword = ref("");
757
- const showPassword = ref(false);
758
- const showRepeatPassword = ref(false);
759
- const formRef = ref();
760
- const validations = computed(() => ({
761
- password: [
762
- (val) => !!val || lang2.value.password.validations.fieldRequired,
763
- (val) => val.length >= minimumPasswordLength.value || lang2.value.password.validations.minimumPasswordLength(
764
- minimumPasswordLength.value
765
- )
766
- ],
767
- repeatPassword: [
768
- (val) => !!val || lang2.value.password.validations.fieldRequired,
769
- (val) => equals(val, newPassword.value) || lang2.value.password.validations.passwordsDoNotMatch
770
- ]
771
- }));
772
- const submit = (evt) => {
773
- formRef.value?.validate().then((success) => {
774
- if (success) {
775
- emit("submit", {
776
- email: email.value,
777
- newPassword: newPassword.value,
778
- otp: otp.value,
779
- done: evt.done
780
- });
781
- } else evt.done();
782
- });
783
- };
784
- const variables = ref({});
785
- const functions = ref({
786
- submit
787
- });
788
- __expose({
789
- variables,
790
- functions
791
- });
792
- return (_ctx, _cache) => {
793
- const _component_q_icon = QIcon;
794
- const _component_q_input = QInput;
795
- return openBlock(), createBlock(unref(QForm), mergeProps({
796
- ref_key: "formRef",
797
- ref: formRef,
798
- class: "q-gutter-md"
799
- }, __props.form, {
800
- onSubmit: _cache[5] || (_cache[5] = (e) => submit)
801
- }), {
802
- default: withCtx(() => [
803
- createVNode(_sfc_main$d, mergeProps(__props.input, {
804
- modelValue: otp.value,
805
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => otp.value = $event)
806
- }), null, 16, ["modelValue"]),
807
- createVNode(_component_q_input, mergeProps(__props.input, {
808
- id: "newPassword",
809
- modelValue: newPassword.value,
810
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => newPassword.value = $event),
811
- name: "newPassword",
812
- type: showPassword.value ? "text" : "password",
813
- label: unref(lang2).password.fields.password,
814
- "bottom-slots": "",
815
- rules: validations.value["newPassword"],
816
- "lazy-rules": ""
817
- }), {
818
- append: withCtx(() => [
819
- createVNode(_component_q_icon, {
820
- name: showPassword.value ? __props.icons.visibility : __props.icons.visibilityOff,
821
- class: "cursor-pointer",
822
- onClick: _cache[1] || (_cache[1] = ($event) => showPassword.value = !showPassword.value)
823
- }, null, 8, ["name"])
824
- ]),
825
- _: 1
826
- }, 16, ["modelValue", "type", "label", "rules"]),
827
- createVNode(_component_q_input, mergeProps(__props.input, {
828
- id: "repeatNewPassword",
829
- modelValue: repeatNewPassword.value,
830
- "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => repeatNewPassword.value = $event),
831
- name: "repeatNewPassword",
832
- type: showRepeatPassword.value ? "text" : "password",
833
- label: unref(lang2).password.fields.repeatPassword,
834
- "bottom-slots": "",
835
- rules: validations.value["repeatNewPassword"],
836
- "lazy-rules": ""
837
- }), {
838
- append: withCtx(() => [
839
- createVNode(_component_q_icon, {
840
- name: showRepeatPassword.value ? __props.icons.visibility : __props.icons.visibilityOff,
841
- class: "cursor-pointer",
842
- onClick: _cache[3] || (_cache[3] = ($event) => showRepeatPassword.value = !showRepeatPassword.value)
843
- }, null, 8, ["name"])
844
- ]),
845
- _: 1
846
- }, 16, ["modelValue", "type", "label", "rules"]),
847
- renderSlot(_ctx.$slots, "default", { submit })
848
- ]),
849
- _: 3
850
- }, 16);
851
- };
852
- }
653
+ //#endregion
654
+ //#region src/ui/authentication/PasswordChangeForm.vue
655
+ var PasswordChangeForm_default = /* @__PURE__ */ defineComponent({
656
+ name: "PasswordChangeForm",
657
+ props: {
658
+ email: {},
659
+ minimumPasswordLength: { default: 8 },
660
+ form: { default: void 0 },
661
+ input: { default: void 0 },
662
+ icons: { default: () => ({
663
+ visibility: "visibility",
664
+ visibilityOff: "visibility_off"
665
+ }) }
666
+ },
667
+ emits: ["submit"],
668
+ setup(__props, { expose: __expose, emit: __emit }) {
669
+ const props = __props;
670
+ const emit = __emit;
671
+ const $q = useQuasar();
672
+ const lang = useLang();
673
+ if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
674
+ watch($q.lang, (val) => {
675
+ loadLang($q.lang.isoName);
676
+ });
677
+ const email = toRef(props, "email");
678
+ const minimumPasswordLength = toRef(props, "minimumPasswordLength");
679
+ const otp = ref("");
680
+ const newPassword = ref("");
681
+ const repeatNewPassword = ref("");
682
+ const showPassword = ref(false);
683
+ const showRepeatPassword = ref(false);
684
+ const formRef = ref();
685
+ const validations = computed(() => ({
686
+ password: [(val) => !!val || lang.value.password.validations.fieldRequired, (val) => val.length >= minimumPasswordLength.value || lang.value.password.validations.minimumPasswordLength(minimumPasswordLength.value)],
687
+ repeatPassword: [(val) => !!val || lang.value.password.validations.fieldRequired, (val) => equals(val, newPassword.value) || lang.value.password.validations.passwordsDoNotMatch]
688
+ }));
689
+ const submit = (evt) => {
690
+ formRef.value?.validate().then((success) => {
691
+ if (success) emit("submit", {
692
+ email: email.value,
693
+ newPassword: newPassword.value,
694
+ otp: otp.value,
695
+ done: evt.done
696
+ });
697
+ else evt.done();
698
+ });
699
+ };
700
+ __expose({
701
+ variables: ref({}),
702
+ functions: ref({ submit })
703
+ });
704
+ return (_ctx, _cache) => {
705
+ const _component_q_icon = QIcon;
706
+ const _component_q_input = QInput;
707
+ return openBlock(), createBlock(unref(QForm), mergeProps({
708
+ ref_key: "formRef",
709
+ ref: formRef,
710
+ class: "q-gutter-md"
711
+ }, __props.form, { onSubmit: _cache[5] || (_cache[5] = (e) => submit) }), {
712
+ default: withCtx(() => [
713
+ createVNode(OtpInput_default, mergeProps(__props.input, {
714
+ modelValue: otp.value,
715
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => otp.value = $event)
716
+ }), null, 16, ["modelValue"]),
717
+ createVNode(_component_q_input, mergeProps(__props.input, {
718
+ id: "newPassword",
719
+ modelValue: newPassword.value,
720
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => newPassword.value = $event),
721
+ name: "newPassword",
722
+ type: showPassword.value ? "text" : "password",
723
+ label: unref(lang).password.fields.password,
724
+ "bottom-slots": "",
725
+ rules: validations.value["newPassword"],
726
+ "lazy-rules": ""
727
+ }), {
728
+ append: withCtx(() => [createVNode(_component_q_icon, {
729
+ name: showPassword.value ? __props.icons.visibility : __props.icons.visibilityOff,
730
+ class: "cursor-pointer",
731
+ onClick: _cache[1] || (_cache[1] = ($event) => showPassword.value = !showPassword.value)
732
+ }, null, 8, ["name"])]),
733
+ _: 1
734
+ }, 16, [
735
+ "modelValue",
736
+ "type",
737
+ "label",
738
+ "rules"
739
+ ]),
740
+ createVNode(_component_q_input, mergeProps(__props.input, {
741
+ id: "repeatNewPassword",
742
+ modelValue: repeatNewPassword.value,
743
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => repeatNewPassword.value = $event),
744
+ name: "repeatNewPassword",
745
+ type: showRepeatPassword.value ? "text" : "password",
746
+ label: unref(lang).password.fields.repeatPassword,
747
+ "bottom-slots": "",
748
+ rules: validations.value["repeatNewPassword"],
749
+ "lazy-rules": ""
750
+ }), {
751
+ append: withCtx(() => [createVNode(_component_q_icon, {
752
+ name: showRepeatPassword.value ? __props.icons.visibility : __props.icons.visibilityOff,
753
+ class: "cursor-pointer",
754
+ onClick: _cache[3] || (_cache[3] = ($event) => showRepeatPassword.value = !showRepeatPassword.value)
755
+ }, null, 8, ["name"])]),
756
+ _: 1
757
+ }, 16, [
758
+ "modelValue",
759
+ "type",
760
+ "label",
761
+ "rules"
762
+ ]),
763
+ renderSlot(_ctx.$slots, "default", { submit })
764
+ ]),
765
+ _: 3
766
+ }, 16);
767
+ };
768
+ }
853
769
  });
854
- const __default__$8 = {
855
- name: "PasswordChangeStepper",
856
- useLang
857
- };
858
- const _sfc_main$9 = /* @__PURE__ */ defineComponent({
859
- ...__default__$8,
860
- props: {
861
- input: { default: void 0 },
862
- icons: { default: () => ({
863
- visibility: "visibility",
864
- visibilityOff: "visibility_off"
865
- }) }
866
- },
867
- emits: ["requestOtp", "changePassword"],
868
- setup(__props, { expose: __expose, emit: __emit }) {
869
- const emit = __emit;
870
- const $q = useQuasar();
871
- const lang2 = useLang();
872
- if (lang2.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
873
- watch($q.lang, (val) => {
874
- loadLang($q.lang.isoName);
875
- });
876
- const steps = ["requestOtp", "changePassword"];
877
- const step = ref("requestOtp");
878
- const email = ref("");
879
- const requestOtpFormRef = ref();
880
- const passwordChangeFormRef = ref();
881
- const requestOtpHeader = computed(() => lang2.value.otp.request);
882
- const passwordChangeHeader = computed(() => lang2.value.password.changePassword);
883
- const requestOtp = ({
884
- email: emittedEmail,
885
- done
886
- }) => {
887
- emit("requestOtp", {
888
- email: emittedEmail,
889
- done: () => {
890
- email.value = emittedEmail;
891
- done();
892
- }
893
- });
894
- };
895
- const changePassword = ({ email: email2, newPassword, otp, done }) => {
896
- emit("changePassword", {
897
- email: email2,
898
- newPassword,
899
- otp,
900
- done
901
- });
902
- };
903
- const variables = ref({
904
- steps
905
- });
906
- const functions = ref({
907
- goToStep: (newStep) => step.value = newStep
908
- });
909
- __expose({
910
- variables,
911
- functions
912
- });
913
- return (_ctx, _cache) => {
914
- const _component_q_step = QStep;
915
- const _component_q_stepper_navigation = QStepperNavigation;
916
- const _component_q_stepper = QStepper;
917
- return openBlock(), createBlock(_component_q_stepper, {
918
- modelValue: step.value,
919
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => step.value = $event)
920
- }, {
921
- navigation: withCtx(() => [
922
- createVNode(_component_q_stepper_navigation, { class: "text-right" }, {
923
- default: withCtx(() => [
924
- step.value === "requestOtp" ? (openBlock(), createBlock(_sfc_main$f, {
925
- key: 0,
926
- "is-next-button": "",
927
- form: "requestOtpForm",
928
- onSubmit: requestOtpFormRef.value?.functions.submit
929
- }, null, 8, ["onSubmit"])) : createCommentVNode("", true),
930
- step.value === "changePassword" ? (openBlock(), createBlock(_sfc_main$f, {
931
- key: 1,
932
- form: "passwordChangeForm",
933
- onSubmit: passwordChangeFormRef.value?.functions.submit
934
- }, null, 8, ["onSubmit"])) : createCommentVNode("", true)
935
- ]),
936
- _: 1
937
- })
938
- ]),
939
- default: withCtx(() => [
940
- createVNode(_component_q_step, {
941
- name: "requestOtp",
942
- title: requestOtpHeader.value
943
- }, {
944
- default: withCtx(() => [
945
- createVNode(_sfc_main$e, {
946
- ref_key: "requestOtpFormRef",
947
- ref: requestOtpFormRef,
948
- form: { id: "requestOtpForm" },
949
- input: __props.input,
950
- onSubmit: requestOtp
951
- }, null, 8, ["input"])
952
- ]),
953
- _: 1
954
- }, 8, ["title"]),
955
- createVNode(_component_q_step, {
956
- name: "changePassword",
957
- title: passwordChangeHeader.value
958
- }, {
959
- default: withCtx(() => [
960
- createVNode(_sfc_main$a, {
961
- ref_key: "passwordChangeFormRef",
962
- ref: passwordChangeFormRef,
963
- form: { id: "passwordChangeForm" },
964
- email: email.value,
965
- input: __props.input,
966
- icons: __props.icons,
967
- onSubmit: changePassword
968
- }, null, 8, ["email", "input", "icons"])
969
- ]),
970
- _: 1
971
- }, 8, ["title"])
972
- ]),
973
- _: 1
974
- }, 8, ["modelValue"]);
975
- };
976
- }
770
+ //#endregion
771
+ //#region src/ui/authentication/PasswordChangeStepper.vue
772
+ var PasswordChangeStepper_default = /* @__PURE__ */ defineComponent({
773
+ name: "PasswordChangeStepper",
774
+ useLang,
775
+ props: {
776
+ input: { default: void 0 },
777
+ icons: { default: () => ({
778
+ visibility: "visibility",
779
+ visibilityOff: "visibility_off"
780
+ }) }
781
+ },
782
+ emits: ["requestOtp", "changePassword"],
783
+ setup(__props, { expose: __expose, emit: __emit }) {
784
+ const emit = __emit;
785
+ const $q = useQuasar();
786
+ const lang = useLang();
787
+ if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
788
+ watch($q.lang, (val) => {
789
+ loadLang($q.lang.isoName);
790
+ });
791
+ const steps = ["requestOtp", "changePassword"];
792
+ const step = ref("requestOtp");
793
+ const email = ref("");
794
+ const requestOtpFormRef = ref();
795
+ const passwordChangeFormRef = ref();
796
+ const requestOtpHeader = computed(() => lang.value.otp.request);
797
+ const passwordChangeHeader = computed(() => lang.value.password.changePassword);
798
+ const requestOtp = ({ email: emittedEmail, done }) => {
799
+ emit("requestOtp", {
800
+ email: emittedEmail,
801
+ done: () => {
802
+ email.value = emittedEmail;
803
+ done();
804
+ }
805
+ });
806
+ };
807
+ const changePassword = ({ email, newPassword, otp, done }) => {
808
+ emit("changePassword", {
809
+ email,
810
+ newPassword,
811
+ otp,
812
+ done
813
+ });
814
+ };
815
+ __expose({
816
+ variables: ref({ steps }),
817
+ functions: ref({ goToStep: (newStep) => step.value = newStep })
818
+ });
819
+ return (_ctx, _cache) => {
820
+ const _component_q_step = QStep;
821
+ const _component_q_stepper_navigation = QStepperNavigation;
822
+ const _component_q_stepper = QStepper;
823
+ return openBlock(), createBlock(_component_q_stepper, {
824
+ modelValue: step.value,
825
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => step.value = $event)
826
+ }, {
827
+ navigation: withCtx(() => [createVNode(_component_q_stepper_navigation, { class: "text-right" }, {
828
+ default: withCtx(() => [step.value === "requestOtp" ? (openBlock(), createBlock(QSubmitButton_default, {
829
+ key: 0,
830
+ "is-next-button": "",
831
+ form: "requestOtpForm",
832
+ onSubmit: requestOtpFormRef.value?.functions.submit
833
+ }, null, 8, ["onSubmit"])) : createCommentVNode("", true), step.value === "changePassword" ? (openBlock(), createBlock(QSubmitButton_default, {
834
+ key: 1,
835
+ form: "passwordChangeForm",
836
+ onSubmit: passwordChangeFormRef.value?.functions.submit
837
+ }, null, 8, ["onSubmit"])) : createCommentVNode("", true)]),
838
+ _: 1
839
+ })]),
840
+ default: withCtx(() => [createVNode(_component_q_step, {
841
+ name: "requestOtp",
842
+ title: requestOtpHeader.value
843
+ }, {
844
+ default: withCtx(() => [createVNode(RequestOtpForm_default, {
845
+ ref_key: "requestOtpFormRef",
846
+ ref: requestOtpFormRef,
847
+ form: { id: "requestOtpForm" },
848
+ input: __props.input,
849
+ onSubmit: requestOtp
850
+ }, null, 8, ["input"])]),
851
+ _: 1
852
+ }, 8, ["title"]), createVNode(_component_q_step, {
853
+ name: "changePassword",
854
+ title: passwordChangeHeader.value
855
+ }, {
856
+ default: withCtx(() => [createVNode(PasswordChangeForm_default, {
857
+ ref_key: "passwordChangeFormRef",
858
+ ref: passwordChangeFormRef,
859
+ form: { id: "passwordChangeForm" },
860
+ email: email.value,
861
+ input: __props.input,
862
+ icons: __props.icons,
863
+ onSubmit: changePassword
864
+ }, null, 8, [
865
+ "email",
866
+ "input",
867
+ "icons"
868
+ ])]),
869
+ _: 1
870
+ }, 8, ["title"])]),
871
+ _: 1
872
+ }, 8, ["modelValue"]);
873
+ };
874
+ }
977
875
  });
978
- const __default__$7 = {
979
- name: "LoginForm"
980
- };
981
- const _sfc_main$8 = /* @__PURE__ */ defineComponent({
982
- ...__default__$7,
983
- props: {
984
- useUsername: { type: Boolean },
985
- passwordForgotUrl: {},
986
- form: {},
987
- input: {},
988
- icons: {}
989
- },
990
- emits: ["submit"],
991
- setup(__props, { expose: __expose, emit: __emit }) {
992
- const props = __props;
993
- const { icons } = toRefs(props);
994
- const emit = __emit;
995
- const $q = useQuasar();
996
- const lang2 = useLang();
997
- if (lang2.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
998
- watch($q.lang, (val) => {
999
- loadLang($q.lang.isoName);
1000
- });
1001
- const email = ref("");
1002
- const password = ref("");
1003
- const username = ref("");
1004
- const showPassword = ref(false);
1005
- const header = computed(() => lang2.value.login.login);
1006
- const createAccount = computed(() => lang2.value.login.createAccount);
1007
- const invalidCredentials = computed(() => lang2.value.login.invalidCredentials);
1008
- const unprocessableRequest = computed(() => lang2.value.unprocessableRequest);
1009
- const formRef = ref();
1010
- const validations = computed(() => ({
1011
- email: [
1012
- (val) => !!val || lang2.value.login.validations.fieldRequired,
1013
- (val) => isEmail(val) || lang2.value.login.validations.invalidEmail
1014
- ],
1015
- username: [(val) => !!val || lang2.value.login.validations.fieldRequired],
1016
- password: [(val) => !!val || lang2.value.login.validations.fieldRequired]
1017
- }));
1018
- const submit = (evt) => {
1019
- formRef.value?.validate().then((success) => {
1020
- if (success) {
1021
- emit("submit", {
1022
- email: email.value.trim(),
1023
- password: password.value,
1024
- username: username.value.trim(),
1025
- done: evt.done
1026
- });
1027
- } else evt.done();
1028
- });
1029
- };
1030
- const visibilityIcon = icons.value?.visibility ?? "visibility";
1031
- const visibilityOffIcon = icons.value?.visibilifyOff ?? "visibility_off";
1032
- const variables = ref({
1033
- header,
1034
- createAccount,
1035
- invalidCredentials,
1036
- unprocessableRequest
1037
- });
1038
- const functions = ref({
1039
- submit
1040
- });
1041
- __expose({
1042
- variables,
1043
- functions
1044
- });
1045
- return (_ctx, _cache) => {
1046
- const _component_q_input = QInput;
1047
- const _component_q_icon = QIcon;
1048
- const _component_q_btn = QBtn;
1049
- return openBlock(), createBlock(unref(QForm), mergeProps({
1050
- ref_key: "formRef",
1051
- ref: formRef,
1052
- class: "q-gutter-md"
1053
- }, __props.form, {
1054
- onSubmit: _cache[4] || (_cache[4] = (e) => submit)
1055
- }), {
1056
- default: withCtx(() => [
1057
- !__props.useUsername ? (openBlock(), createBlock(_component_q_input, mergeProps({ key: 0 }, __props.input, {
1058
- id: "email",
1059
- modelValue: email.value,
1060
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => email.value = $event),
1061
- name: "email",
1062
- label: unref(lang2).login.fields.email,
1063
- "bottom-slots": "",
1064
- rules: validations.value["email"],
1065
- "lazy-rules": "",
1066
- autcomplete: "email"
1067
- }), null, 16, ["modelValue", "label", "rules"])) : createCommentVNode("", true),
1068
- __props.useUsername ? (openBlock(), createBlock(_component_q_input, mergeProps({ key: 1 }, __props.input, {
1069
- id: "username",
1070
- modelValue: username.value,
1071
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => username.value = $event),
1072
- name: "username",
1073
- label: unref(lang2).login.fields.username,
1074
- "bottom-slots": "",
1075
- rules: validations.value["username"],
1076
- "lazy-rules": "",
1077
- autocomplete: "username"
1078
- }), null, 16, ["modelValue", "label", "rules"])) : createCommentVNode("", true),
1079
- createVNode(_component_q_input, mergeProps({
1080
- id: "password",
1081
- modelValue: password.value,
1082
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => password.value = $event),
1083
- class: "q-pt-none"
1084
- }, __props.input, {
1085
- name: "password",
1086
- type: showPassword.value ? "text" : "password",
1087
- label: unref(lang2).login.fields.password,
1088
- rules: validations.value["password"],
1089
- "lazy-rules": "",
1090
- "bottom-slots": "",
1091
- autcomplete: "current-password"
1092
- }), {
1093
- append: withCtx(() => [
1094
- createVNode(_component_q_icon, {
1095
- name: showPassword.value ? unref(visibilityIcon) : unref(visibilityOffIcon),
1096
- class: "cursor-pointer",
1097
- onClick: _cache[2] || (_cache[2] = ($event) => showPassword.value = !showPassword.value)
1098
- }, null, 8, ["name"])
1099
- ]),
1100
- _: 1
1101
- }, 16, ["modelValue", "type", "label", "rules"]),
1102
- __props.passwordForgotUrl ? (openBlock(), createBlock(_component_q_btn, {
1103
- key: 2,
1104
- class: "q-pt-none text-primary",
1105
- label: unref(lang2).login.forgotPassword,
1106
- size: "sm",
1107
- flat: "",
1108
- to: __props.passwordForgotUrl
1109
- }, null, 8, ["label", "to"])) : createCommentVNode("", true),
1110
- renderSlot(_ctx.$slots, "default", { submit })
1111
- ]),
1112
- _: 3
1113
- }, 16);
1114
- };
1115
- }
876
+ //#endregion
877
+ //#region src/ui/authentication/LoginForm.vue
878
+ var LoginForm_default = /* @__PURE__ */ defineComponent({
879
+ name: "LoginForm",
880
+ props: {
881
+ useUsername: { type: Boolean },
882
+ passwordForgotUrl: {},
883
+ form: {},
884
+ input: {},
885
+ icons: {},
886
+ defaultCredentials: {}
887
+ },
888
+ emits: ["submit"],
889
+ setup(__props, { expose: __expose, emit: __emit }) {
890
+ const { icons, defaultCredentials } = toRefs(__props);
891
+ const emit = __emit;
892
+ const $q = useQuasar();
893
+ const lang = useLang();
894
+ if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
895
+ watch($q.lang, (val) => {
896
+ loadLang($q.lang.isoName);
897
+ });
898
+ const email = ref(defaultCredentials.value?.email ?? "");
899
+ const password = ref(defaultCredentials.value?.password ?? "");
900
+ const username = ref(defaultCredentials.value?.username ?? "");
901
+ const showPassword = ref(false);
902
+ const header = computed(() => lang.value.login.login);
903
+ const createAccount = computed(() => lang.value.login.createAccount);
904
+ const invalidCredentials = computed(() => lang.value.login.invalidCredentials);
905
+ const unprocessableRequest = computed(() => lang.value.unprocessableRequest);
906
+ const formRef = ref();
907
+ const validations = computed(() => ({
908
+ email: [(val) => !!val || lang.value.login.validations.fieldRequired, (val) => isEmail(val) || lang.value.login.validations.invalidEmail],
909
+ username: [(val) => !!val || lang.value.login.validations.fieldRequired],
910
+ password: [(val) => !!val || lang.value.login.validations.fieldRequired]
911
+ }));
912
+ const submit = (evt) => {
913
+ formRef.value?.validate().then((success) => {
914
+ if (success) emit("submit", {
915
+ email: email.value.trim(),
916
+ password: password.value,
917
+ username: username.value.trim(),
918
+ done: evt.done
919
+ });
920
+ else evt.done();
921
+ });
922
+ };
923
+ const visibilityIcon = icons.value?.visibility ?? "visibility";
924
+ const visibilityOffIcon = icons.value?.visibilifyOff ?? "visibility_off";
925
+ __expose({
926
+ variables: ref({
927
+ header,
928
+ createAccount,
929
+ invalidCredentials,
930
+ unprocessableRequest
931
+ }),
932
+ functions: ref({ submit })
933
+ });
934
+ return (_ctx, _cache) => {
935
+ const _component_q_input = QInput;
936
+ const _component_q_icon = QIcon;
937
+ const _component_q_btn = QBtn;
938
+ return openBlock(), createBlock(unref(QForm), mergeProps({
939
+ ref_key: "formRef",
940
+ ref: formRef,
941
+ class: "q-gutter-md"
942
+ }, __props.form, { onSubmit: _cache[4] || (_cache[4] = (e) => submit) }), {
943
+ default: withCtx(() => [
944
+ !__props.useUsername ? (openBlock(), createBlock(_component_q_input, mergeProps({ key: 0 }, __props.input, {
945
+ id: "email",
946
+ modelValue: email.value,
947
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => email.value = $event),
948
+ name: "email",
949
+ label: unref(lang).login.fields.email,
950
+ "bottom-slots": "",
951
+ rules: validations.value["email"],
952
+ "lazy-rules": "",
953
+ autcomplete: "email"
954
+ }), null, 16, [
955
+ "modelValue",
956
+ "label",
957
+ "rules"
958
+ ])) : createCommentVNode("", true),
959
+ __props.useUsername ? (openBlock(), createBlock(_component_q_input, mergeProps({ key: 1 }, __props.input, {
960
+ id: "username",
961
+ modelValue: username.value,
962
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => username.value = $event),
963
+ name: "username",
964
+ label: unref(lang).login.fields.username,
965
+ "bottom-slots": "",
966
+ rules: validations.value["username"],
967
+ "lazy-rules": "",
968
+ autocomplete: "username"
969
+ }), null, 16, [
970
+ "modelValue",
971
+ "label",
972
+ "rules"
973
+ ])) : createCommentVNode("", true),
974
+ createVNode(_component_q_input, mergeProps({
975
+ id: "password",
976
+ modelValue: password.value,
977
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => password.value = $event),
978
+ class: "q-pt-none"
979
+ }, __props.input, {
980
+ name: "password",
981
+ type: showPassword.value ? "text" : "password",
982
+ label: unref(lang).login.fields.password,
983
+ rules: validations.value["password"],
984
+ "lazy-rules": "",
985
+ "bottom-slots": "",
986
+ autcomplete: "current-password"
987
+ }), {
988
+ append: withCtx(() => [createVNode(_component_q_icon, {
989
+ name: showPassword.value ? unref(visibilityIcon) : unref(visibilityOffIcon),
990
+ class: "cursor-pointer",
991
+ onClick: _cache[2] || (_cache[2] = ($event) => showPassword.value = !showPassword.value)
992
+ }, null, 8, ["name"])]),
993
+ _: 1
994
+ }, 16, [
995
+ "modelValue",
996
+ "type",
997
+ "label",
998
+ "rules"
999
+ ]),
1000
+ __props.passwordForgotUrl ? (openBlock(), createBlock(_component_q_btn, {
1001
+ key: 2,
1002
+ class: "q-pt-none text-primary",
1003
+ label: unref(lang).login.forgotPassword,
1004
+ size: "sm",
1005
+ flat: "",
1006
+ to: __props.passwordForgotUrl
1007
+ }, null, 8, ["label", "to"])) : createCommentVNode("", true),
1008
+ renderSlot(_ctx.$slots, "default", { submit })
1009
+ ]),
1010
+ _: 3
1011
+ }, 16);
1012
+ };
1013
+ }
1116
1014
  });
1015
+ //#endregion
1016
+ //#region ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/es/lib/alpha.js
1017
+ var alpha = {
1018
+ "en-US": /^[A-Z]+$/i,
1019
+ "az-AZ": /^[A-VXYZÇƏĞİıÖŞÜ]+$/i,
1020
+ "bg-BG": /^[А-Я]+$/i,
1021
+ "cs-CZ": /^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,
1022
+ "da-DK": /^[A-ZÆØÅ]+$/i,
1023
+ "de-DE": /^[A-ZÄÖÜß]+$/i,
1024
+ "el-GR": /^[Α-ώ]+$/i,
1025
+ "es-ES": /^[A-ZÁÉÍÑÓÚÜ]+$/i,
1026
+ "fa-IR": /^[ابپتثجچحخدذرزژسشصضطظعغفقکگلمنوهی]+$/i,
1027
+ "fi-FI": /^[A-ZÅÄÖ]+$/i,
1028
+ "fr-FR": /^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,
1029
+ "it-IT": /^[A-ZÀÉÈÌÎÓÒÙ]+$/i,
1030
+ "ja-JP": /^[ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i,
1031
+ "nb-NO": /^[A-ZÆØÅ]+$/i,
1032
+ "nl-NL": /^[A-ZÁÉËÏÓÖÜÚ]+$/i,
1033
+ "nn-NO": /^[A-ZÆØÅ]+$/i,
1034
+ "hu-HU": /^[A-ZÁÉÍÓÖŐÚÜŰ]+$/i,
1035
+ "pl-PL": /^[A-ZĄĆĘŚŁŃÓŻŹ]+$/i,
1036
+ "pt-PT": /^[A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,
1037
+ "ru-RU": /^[А-ЯЁ]+$/i,
1038
+ "kk-KZ": /^[А-ЯЁ\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i,
1039
+ "sl-SI": /^[A-ZČĆĐŠŽ]+$/i,
1040
+ "sk-SK": /^[A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,
1041
+ "sr-RS@latin": /^[A-ZČĆŽŠĐ]+$/i,
1042
+ "sr-RS": /^[А-ЯЂЈЉЊЋЏ]+$/i,
1043
+ "sv-SE": /^[A-ZÅÄÖ]+$/i,
1044
+ "th-TH": /^[ก-๐\s]+$/i,
1045
+ "tr-TR": /^[A-ZÇĞİıÖŞÜ]+$/i,
1046
+ "uk-UA": /^[А-ЩЬЮЯЄIЇҐі]+$/i,
1047
+ "vi-VN": /^[A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,
1048
+ "ko-KR": /^[ㄱ-ㅎㅏ-ㅣ가-힣]*$/,
1049
+ "ku-IQ": /^[ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,
1050
+ ar: /^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,
1051
+ he: /^[א-ת]+$/,
1052
+ fa: /^['آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی']+$/i,
1053
+ bn: /^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣৰৱ৲৳৴৵৶৷৸৹৺৻']+$/,
1054
+ eo: /^[ABCĈD-GĜHĤIJĴK-PRSŜTUŬVZ]+$/i,
1055
+ "hi-IN": /^[\u0900-\u0961]+[\u0972-\u097F]*$/i,
1056
+ "si-LK": /^[\u0D80-\u0DFF]+$/,
1057
+ "ta-IN": /^[\u0B80-\u0BFF]+$/i,
1058
+ "te-IN": /^[\u0C00-\u0C7F]+$/i,
1059
+ "kn-IN": /^[\u0C80-\u0CFF]+$/i,
1060
+ "ml-IN": /^[\u0D00-\u0D7F]+$/i,
1061
+ "gu-IN": /^[\u0A80-\u0AFF]+$/i,
1062
+ "pa-IN": /^[\u0A00-\u0A7F]+$/i,
1063
+ "or-IN": /^[\u0B00-\u0B7F]+$/i
1064
+ };
1117
1065
  var alphanumeric = {
1118
- "en-US": /^[0-9A-Z]+$/i,
1119
- "az-AZ": /^[0-9A-VXYZÇƏĞİıÖŞÜ]+$/i,
1120
- "bg-BG": /^[0-9А-Я]+$/i,
1121
- "cs-CZ": /^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,
1122
- "da-DK": /^[0-9A-ZÆØÅ]+$/i,
1123
- "de-DE": /^[0-9A-ZÄÖÜß]+$/i,
1124
- "el-GR": /^[0-9Α-ω]+$/i,
1125
- "es-ES": /^[0-9A-ZÁÉÍÑÓÚÜ]+$/i,
1126
- "fi-FI": /^[0-9A-ZÅÄÖ]+$/i,
1127
- "fr-FR": /^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,
1128
- "it-IT": /^[0-9A-ZÀÉÈÌÎÓÒÙ]+$/i,
1129
- "ja-JP": /^[0-90-9ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i,
1130
- "hu-HU": /^[0-9A-ZÁÉÍÓÖŐÚÜŰ]+$/i,
1131
- "nb-NO": /^[0-9A-ZÆØÅ]+$/i,
1132
- "nl-NL": /^[0-9A-ZÁÉËÏÓÖÜÚ]+$/i,
1133
- "nn-NO": /^[0-9A-ZÆØÅ]+$/i,
1134
- "pl-PL": /^[0-9A-ZĄĆĘŚŁŃÓŻŹ]+$/i,
1135
- "pt-PT": /^[0-9A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,
1136
- "ru-RU": /^[0-9А-ЯЁ]+$/i,
1137
- "kk-KZ": /^[0-9А-ЯЁ\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i,
1138
- "sl-SI": /^[0-9A-ZČĆĐŠŽ]+$/i,
1139
- "sk-SK": /^[0-9A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,
1140
- "sr-RS@latin": /^[0-9A-ZČĆŽŠĐ]+$/i,
1141
- "sr-RS": /^[0-9А-ЯЂЈЉЊЋЏ]+$/i,
1142
- "sv-SE": /^[0-9A-ZÅÄÖ]+$/i,
1143
- "th-TH": /^[ก-๙\s]+$/i,
1144
- "tr-TR": /^[0-9A-ZÇĞİıÖŞÜ]+$/i,
1145
- "uk-UA": /^[0-9А-ЩЬЮЯЄIЇҐі]+$/i,
1146
- "ko-KR": /^[0-9ㄱ-ㅎㅏ-ㅣ가-힣]*$/,
1147
- "ku-IQ": /^[٠١٢٣٤٥٦٧٨٩0-9ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,
1148
- "vi-VN": /^[0-9A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,
1149
- ar: /^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,
1150
- he: /^[0-9א-ת]+$/,
1151
- fa: /^['0-9آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی۱۲۳۴۵۶۷۸۹۰']+$/i,
1152
- bn: /^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣ০১২৩৪৫৬৭৮৯ৰৱ৲৳৴৵৶৷৸৹৺৻']+$/,
1153
- eo: /^[0-9ABCĈD-GĜHĤIJĴK-PRSŜTUŬVZ]+$/i,
1154
- "hi-IN": /^[\u0900-\u0963]+[\u0966-\u097F]*$/i,
1155
- "si-LK": /^[0-9\u0D80-\u0DFF]+$/,
1156
- "ta-IN": /^[0-9\u0B80-\u0BFF.]+$/i,
1157
- "te-IN": /^[0-9\u0C00-\u0C7F.]+$/i,
1158
- "kn-IN": /^[0-9\u0C80-\u0CFF.]+$/i,
1159
- "ml-IN": /^[0-9\u0D00-\u0D7F.]+$/i,
1160
- "gu-IN": /^[0-9\u0A80-\u0AFF.]+$/i,
1161
- "pa-IN": /^[0-9\u0A00-\u0A7F.]+$/i,
1162
- "or-IN": /^[0-9\u0B00-\u0B7F.]+$/i
1066
+ "en-US": /^[0-9A-Z]+$/i,
1067
+ "az-AZ": /^[0-9A-VXYZÇƏĞİıÖŞÜ]+$/i,
1068
+ "bg-BG": /^[0-9А-Я]+$/i,
1069
+ "cs-CZ": /^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,
1070
+ "da-DK": /^[0-9A-ZÆØÅ]+$/i,
1071
+ "de-DE": /^[0-9A-ZÄÖÜß]+$/i,
1072
+ "el-GR": /^[0-9Α-ω]+$/i,
1073
+ "es-ES": /^[0-9A-ZÁÉÍÑÓÚÜ]+$/i,
1074
+ "fi-FI": /^[0-9A-ZÅÄÖ]+$/i,
1075
+ "fr-FR": /^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,
1076
+ "it-IT": /^[0-9A-ZÀÉÈÌÎÓÒÙ]+$/i,
1077
+ "ja-JP": /^[0-90-9ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i,
1078
+ "hu-HU": /^[0-9A-ZÁÉÍÓÖŐÚÜŰ]+$/i,
1079
+ "nb-NO": /^[0-9A-ZÆØÅ]+$/i,
1080
+ "nl-NL": /^[0-9A-ZÁÉËÏÓÖÜÚ]+$/i,
1081
+ "nn-NO": /^[0-9A-ZÆØÅ]+$/i,
1082
+ "pl-PL": /^[0-9A-ZĄĆĘŚŁŃÓŻŹ]+$/i,
1083
+ "pt-PT": /^[0-9A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,
1084
+ "ru-RU": /^[0-9А-ЯЁ]+$/i,
1085
+ "kk-KZ": /^[0-9А-ЯЁ\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i,
1086
+ "sl-SI": /^[0-9A-ZČĆĐŠŽ]+$/i,
1087
+ "sk-SK": /^[0-9A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,
1088
+ "sr-RS@latin": /^[0-9A-ZČĆŽŠĐ]+$/i,
1089
+ "sr-RS": /^[0-9А-ЯЂЈЉЊЋЏ]+$/i,
1090
+ "sv-SE": /^[0-9A-ZÅÄÖ]+$/i,
1091
+ "th-TH": /^[ก-๙\s]+$/i,
1092
+ "tr-TR": /^[0-9A-ZÇĞİıÖŞÜ]+$/i,
1093
+ "uk-UA": /^[0-9А-ЩЬЮЯЄIЇҐі]+$/i,
1094
+ "ko-KR": /^[0-9ㄱ-ㅎㅏ-ㅣ가-힣]*$/,
1095
+ "ku-IQ": /^[٠١٢٣٤٥٦٧٨٩0-9ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,
1096
+ "vi-VN": /^[0-9A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,
1097
+ ar: /^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,
1098
+ he: /^[0-9א-ת]+$/,
1099
+ fa: /^['0-9آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی۱۲۳۴۵۶۷۸۹۰']+$/i,
1100
+ bn: /^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣ০১২৩৪৫৬৭৮৯ৰৱ৲৳৴৵৶৷৸৹৺৻']+$/,
1101
+ eo: /^[0-9ABCĈD-GĜHĤIJĴK-PRSŜTUŬVZ]+$/i,
1102
+ "hi-IN": /^[\u0900-\u0963]+[\u0966-\u097F]*$/i,
1103
+ "si-LK": /^[0-9\u0D80-\u0DFF]+$/,
1104
+ "ta-IN": /^[0-9\u0B80-\u0BFF.]+$/i,
1105
+ "te-IN": /^[0-9\u0C00-\u0C7F.]+$/i,
1106
+ "kn-IN": /^[0-9\u0C80-\u0CFF.]+$/i,
1107
+ "ml-IN": /^[0-9\u0D00-\u0D7F.]+$/i,
1108
+ "gu-IN": /^[0-9\u0A80-\u0AFF.]+$/i,
1109
+ "pa-IN": /^[0-9\u0A00-\u0A7F.]+$/i,
1110
+ "or-IN": /^[0-9\u0B00-\u0B7F.]+$/i
1163
1111
  };
1164
- var englishLocales = ["AU", "GB", "HK", "IN", "NZ", "ZA", "ZM"];
1112
+ var decimal = {
1113
+ "en-US": ".",
1114
+ ar: "٫"
1115
+ };
1116
+ var englishLocales = [
1117
+ "AU",
1118
+ "GB",
1119
+ "HK",
1120
+ "IN",
1121
+ "NZ",
1122
+ "ZA",
1123
+ "ZM"
1124
+ ];
1165
1125
  for (var locale, i = 0; i < englishLocales.length; i++) {
1166
- locale = "en-".concat(englishLocales[i]);
1167
- alphanumeric[locale] = alphanumeric["en-US"];
1126
+ locale = "en-".concat(englishLocales[i]);
1127
+ alpha[locale] = alpha["en-US"];
1128
+ alphanumeric[locale] = alphanumeric["en-US"];
1129
+ decimal[locale] = decimal["en-US"];
1168
1130
  }
1169
- var arabicLocales = ["AE", "BH", "DZ", "EG", "IQ", "JO", "KW", "LB", "LY", "MA", "QM", "QA", "SA", "SD", "SY", "TN", "YE"];
1131
+ var arabicLocales = [
1132
+ "AE",
1133
+ "BH",
1134
+ "DZ",
1135
+ "EG",
1136
+ "IQ",
1137
+ "JO",
1138
+ "KW",
1139
+ "LB",
1140
+ "LY",
1141
+ "MA",
1142
+ "QM",
1143
+ "QA",
1144
+ "SA",
1145
+ "SD",
1146
+ "SY",
1147
+ "TN",
1148
+ "YE"
1149
+ ];
1170
1150
  for (var _locale, _i = 0; _i < arabicLocales.length; _i++) {
1171
- _locale = "ar-".concat(arabicLocales[_i]);
1172
- alphanumeric[_locale] = alphanumeric.ar;
1151
+ _locale = "ar-".concat(arabicLocales[_i]);
1152
+ alpha[_locale] = alpha.ar;
1153
+ alphanumeric[_locale] = alphanumeric.ar;
1154
+ decimal[_locale] = decimal.ar;
1173
1155
  }
1174
1156
  var farsiLocales = ["IR", "AF"];
1175
1157
  for (var _locale2, _i2 = 0; _i2 < farsiLocales.length; _i2++) {
1176
- _locale2 = "fa-".concat(farsiLocales[_i2]);
1177
- alphanumeric[_locale2] = alphanumeric.fa;
1158
+ _locale2 = "fa-".concat(farsiLocales[_i2]);
1159
+ alphanumeric[_locale2] = alphanumeric.fa;
1160
+ decimal[_locale2] = decimal.ar;
1178
1161
  }
1179
1162
  var bengaliLocales = ["BD", "IN"];
1180
1163
  for (var _locale3, _i3 = 0; _i3 < bengaliLocales.length; _i3++) {
1181
- _locale3 = "bn-".concat(bengaliLocales[_i3]);
1182
- alphanumeric[_locale3] = alphanumeric.bn;
1164
+ _locale3 = "bn-".concat(bengaliLocales[_i3]);
1165
+ alpha[_locale3] = alpha.bn;
1166
+ alphanumeric[_locale3] = alphanumeric.bn;
1167
+ decimal[_locale3] = decimal["en-US"];
1183
1168
  }
1169
+ var dotDecimal = [
1170
+ "ar-EG",
1171
+ "ar-LB",
1172
+ "ar-LY"
1173
+ ];
1174
+ var commaDecimal = [
1175
+ "bg-BG",
1176
+ "cs-CZ",
1177
+ "da-DK",
1178
+ "de-DE",
1179
+ "el-GR",
1180
+ "en-ZM",
1181
+ "eo",
1182
+ "es-ES",
1183
+ "fr-CA",
1184
+ "fr-FR",
1185
+ "gu-IN",
1186
+ "hi-IN",
1187
+ "hu-HU",
1188
+ "id-ID",
1189
+ "it-IT",
1190
+ "kk-KZ",
1191
+ "kn-IN",
1192
+ "ku-IQ",
1193
+ "ml-IN",
1194
+ "nb-NO",
1195
+ "nl-NL",
1196
+ "nn-NO",
1197
+ "or-IN",
1198
+ "pa-IN",
1199
+ "pl-PL",
1200
+ "pt-PT",
1201
+ "ru-RU",
1202
+ "si-LK",
1203
+ "sl-SI",
1204
+ "sr-RS",
1205
+ "sr-RS@latin",
1206
+ "sv-SE",
1207
+ "ta-IN",
1208
+ "te-IN",
1209
+ "tr-TR",
1210
+ "uk-UA",
1211
+ "vi-VN"
1212
+ ];
1213
+ for (var _i4 = 0; _i4 < dotDecimal.length; _i4++) decimal[dotDecimal[_i4]] = decimal["en-US"];
1214
+ for (var _i5 = 0; _i5 < commaDecimal.length; _i5++) decimal[commaDecimal[_i5]] = ",";
1215
+ alpha["fr-CA"] = alpha["fr-FR"];
1184
1216
  alphanumeric["fr-CA"] = alphanumeric["fr-FR"];
1217
+ alpha["pt-BR"] = alpha["pt-PT"];
1185
1218
  alphanumeric["pt-BR"] = alphanumeric["pt-PT"];
1219
+ decimal["pt-BR"] = decimal["pt-PT"];
1220
+ alpha["pl-Pl"] = alpha["pl-PL"];
1186
1221
  alphanumeric["pl-Pl"] = alphanumeric["pl-PL"];
1222
+ decimal["pl-Pl"] = decimal["pl-PL"];
1223
+ alpha["fa-AF"] = alpha.fa;
1224
+ //#endregion
1225
+ //#region ../../node_modules/.pnpm/validator@13.15.35/node_modules/validator/es/lib/isAlphanumeric.js
1187
1226
  function isAlphanumeric(_str) {
1188
- var locale = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "en-US";
1189
- var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
1190
- assertString(_str);
1191
- var str = _str;
1192
- var ignore = options.ignore;
1193
- if (ignore) {
1194
- if (ignore instanceof RegExp) {
1195
- str = str.replace(ignore, "");
1196
- } else if (typeof ignore === "string") {
1197
- str = str.replace(new RegExp("[".concat(ignore.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g, "\\$&"), "]"), "g"), "");
1198
- } else {
1199
- throw new Error("ignore should be instance of a String or RegExp");
1200
- }
1201
- }
1202
- if (locale in alphanumeric) {
1203
- return alphanumeric[locale].test(str);
1204
- }
1205
- throw new Error("Invalid locale '".concat(locale, "'"));
1227
+ var locale = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "en-US";
1228
+ var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
1229
+ assertString(_str);
1230
+ var str = _str;
1231
+ var ignore = options.ignore;
1232
+ if (ignore) if (ignore instanceof RegExp) str = str.replace(ignore, "");
1233
+ else if (typeof ignore === "string") str = str.replace(new RegExp("[".concat(ignore.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g, "\\$&"), "]"), "g"), "");
1234
+ else throw new Error("ignore should be instance of a String or RegExp");
1235
+ if (locale in alphanumeric) return alphanumeric[locale].test(str);
1236
+ throw new Error("Invalid locale '".concat(locale, "'"));
1206
1237
  }
1207
- const __default__$6 = {
1208
- name: "RegisterForm"
1209
- };
1210
- const _sfc_main$7 = /* @__PURE__ */ defineComponent({
1211
- ...__default__$6,
1212
- props: {
1213
- useUsername: { type: Boolean },
1214
- extraFields: { default: void 0 },
1215
- minimumPasswordLength: { default: 8 },
1216
- form: { default: void 0 },
1217
- input: { default: void 0 },
1218
- icons: { default: () => ({
1219
- visibility: "visibility",
1220
- visibilityOff: "visibility_off"
1221
- }) }
1222
- },
1223
- emits: ["submit"],
1224
- setup(__props, { expose: __expose, emit: __emit }) {
1225
- const props = __props;
1226
- const emit = __emit;
1227
- const $q = useQuasar();
1228
- const lang2 = useLang();
1229
- if (lang2.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
1230
- watch($q.lang, (val) => {
1231
- loadLang($q.lang.isoName);
1232
- });
1233
- const email = ref("");
1234
- const password = ref("");
1235
- const repeatPassword = ref("");
1236
- const extraFieldValues = ref({});
1237
- const username = ref("");
1238
- const showPassword = ref(false);
1239
- const header = computed(() => lang2.value.register.register);
1240
- const forgotPassword = computed(() => lang2.value.register.forgotPassword);
1241
- const accountCreated = computed(() => lang2.value.register.accountCreated);
1242
- const unprocessableRequest = computed(() => lang2.value.unprocessableRequest);
1243
- const alreadyRegistered = computed(() => lang2.value.register.alreadyRegistered);
1244
- const minimumPasswordLength = toRef(props, "minimumPasswordLength");
1245
- const formRef = ref();
1246
- const validations = computed(() => ({
1247
- email: [
1248
- (val) => !!val || lang2.value.register.validations.fieldRequired,
1249
- (val) => isEmail(val) || lang2.value.register.validations.invalidEmail
1250
- ],
1251
- username: [
1252
- (val) => !!val || lang2.value.register.validations.fieldRequired,
1253
- (val) => isAlphanumeric(val) || lang2.value.register.validations.notAlphaNumeric
1254
- ],
1255
- password: [
1256
- (val) => !!val || lang2.value.password.validations.fieldRequired,
1257
- (val) => val.length >= minimumPasswordLength.value || lang2.value.password.validations.minimumPasswordLength(
1258
- minimumPasswordLength.value
1259
- )
1260
- ],
1261
- repeatPassword: [
1262
- (val) => !!val || lang2.value.password.validations.fieldRequired,
1263
- (val) => equals(val, password.value) || lang2.value.password.validations.passwordsDoNotMatch
1264
- ]
1265
- }));
1266
- const submit = (evt) => {
1267
- formRef.value?.validate().then((success) => {
1268
- if (success) {
1269
- emit("submit", {
1270
- email: email.value.trim(),
1271
- password: password.value,
1272
- username: username.value.trim(),
1273
- extraFields: extraFieldValues.value,
1274
- done: evt.done
1275
- });
1276
- } else evt.done();
1277
- });
1278
- };
1279
- const variables = ref({
1280
- header,
1281
- forgotPassword,
1282
- accountCreated,
1283
- unprocessableRequest,
1284
- alreadyRegistered
1285
- });
1286
- const functions = ref({
1287
- submit
1288
- });
1289
- __expose({
1290
- variables,
1291
- functions
1292
- });
1293
- return (_ctx, _cache) => {
1294
- const _component_q_input = QInput;
1295
- const _component_q_icon = QIcon;
1296
- return openBlock(), createBlock(unref(QForm), mergeProps({
1297
- ref_key: "formRef",
1298
- ref: formRef,
1299
- class: "q-gutter-md"
1300
- }, __props.form, {
1301
- onSubmit: _cache[6] || (_cache[6] = (e) => submit)
1302
- }), {
1303
- default: withCtx(() => [
1304
- !__props.useUsername ? (openBlock(), createBlock(_component_q_input, mergeProps({ key: 0 }, __props.input, {
1305
- id: "email",
1306
- modelValue: email.value,
1307
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => email.value = $event),
1308
- name: "email",
1309
- label: unref(lang2).register.fields.email,
1310
- "bottom-slots": "",
1311
- rules: validations.value["email"],
1312
- "lazy-rules": ""
1313
- }), null, 16, ["modelValue", "label", "rules"])) : createCommentVNode("", true),
1314
- __props.useUsername ? (openBlock(), createBlock(_component_q_input, mergeProps({ key: 1 }, __props.input, {
1315
- id: "username",
1316
- modelValue: username.value,
1317
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => username.value = $event),
1318
- name: "username",
1319
- label: unref(lang2).register.fields.username,
1320
- "bottom-slots": "",
1321
- rules: validations.value["username"],
1322
- "lazy-rules": ""
1323
- }), null, 16, ["modelValue", "label", "rules"])) : createCommentVNode("", true),
1324
- (openBlock(true), createElementBlock(Fragment, null, renderList(__props.extraFields, (field) => {
1325
- return openBlock(), createBlock(_component_q_input, {
1326
- key: field.name,
1327
- modelValue: extraFieldValues.value[field.name],
1328
- "onUpdate:modelValue": ($event) => extraFieldValues.value[field.name] = $event,
1329
- type: "text",
1330
- name: field.name,
1331
- label: field.label,
1332
- rules: field.rules,
1333
- "bottom-slots": ""
1334
- }, null, 8, ["modelValue", "onUpdate:modelValue", "name", "label", "rules"]);
1335
- }), 128)),
1336
- createVNode(_component_q_input, mergeProps(__props.input, {
1337
- id: "password",
1338
- modelValue: password.value,
1339
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => password.value = $event),
1340
- name: "password",
1341
- type: showPassword.value ? "text" : "password",
1342
- label: unref(lang2).register.fields.password,
1343
- rules: validations.value["password"],
1344
- "lazy-rules": "",
1345
- "bottom-slots": ""
1346
- }), {
1347
- append: withCtx(() => [
1348
- createVNode(_component_q_icon, {
1349
- name: showPassword.value ? __props.icons.visibility : __props.icons.visibilityOff,
1350
- class: "cursor-pointer",
1351
- onClick: _cache[2] || (_cache[2] = ($event) => showPassword.value = !showPassword.value)
1352
- }, null, 8, ["name"])
1353
- ]),
1354
- _: 1
1355
- }, 16, ["modelValue", "type", "label", "rules"]),
1356
- createVNode(_component_q_input, {
1357
- id: "repeatPassword",
1358
- modelValue: repeatPassword.value,
1359
- "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => repeatPassword.value = $event),
1360
- type: showPassword.value ? "text" : "password",
1361
- label: unref(lang2).register.fields.repeatPassword,
1362
- "bottom-slots": "",
1363
- required: "",
1364
- rules: validations.value["repeatPassword"],
1365
- "lazy-rules": ""
1366
- }, {
1367
- append: withCtx(() => [
1368
- createVNode(_component_q_icon, {
1369
- name: showPassword.value ? __props.icons.visibility : __props.icons.visibilityOff,
1370
- class: "cursor-pointer",
1371
- onClick: _cache[4] || (_cache[4] = ($event) => showPassword.value = !showPassword.value)
1372
- }, null, 8, ["name"])
1373
- ]),
1374
- _: 1
1375
- }, 8, ["modelValue", "type", "label", "rules"]),
1376
- renderSlot(_ctx.$slots, "default", { submit })
1377
- ]),
1378
- _: 3
1379
- }, 16);
1380
- };
1381
- }
1238
+ //#endregion
1239
+ //#region src/ui/authentication/RegisterForm.vue
1240
+ var RegisterForm_default = /* @__PURE__ */ defineComponent({
1241
+ name: "RegisterForm",
1242
+ props: {
1243
+ useUsername: { type: Boolean },
1244
+ extraFields: { default: void 0 },
1245
+ minimumPasswordLength: { default: 8 },
1246
+ form: { default: void 0 },
1247
+ input: { default: void 0 },
1248
+ icons: { default: () => ({
1249
+ visibility: "visibility",
1250
+ visibilityOff: "visibility_off"
1251
+ }) }
1252
+ },
1253
+ emits: ["submit"],
1254
+ setup(__props, { expose: __expose, emit: __emit }) {
1255
+ const props = __props;
1256
+ const emit = __emit;
1257
+ const $q = useQuasar();
1258
+ const lang = useLang();
1259
+ if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
1260
+ watch($q.lang, (val) => {
1261
+ loadLang($q.lang.isoName);
1262
+ });
1263
+ const email = ref("");
1264
+ const password = ref("");
1265
+ const repeatPassword = ref("");
1266
+ const extraFieldValues = ref({});
1267
+ const username = ref("");
1268
+ const showPassword = ref(false);
1269
+ const header = computed(() => lang.value.register.register);
1270
+ const forgotPassword = computed(() => lang.value.register.forgotPassword);
1271
+ const accountCreated = computed(() => lang.value.register.accountCreated);
1272
+ const unprocessableRequest = computed(() => lang.value.unprocessableRequest);
1273
+ const alreadyRegistered = computed(() => lang.value.register.alreadyRegistered);
1274
+ const minimumPasswordLength = toRef(props, "minimumPasswordLength");
1275
+ const formRef = ref();
1276
+ const validations = computed(() => ({
1277
+ email: [(val) => !!val || lang.value.register.validations.fieldRequired, (val) => isEmail(val) || lang.value.register.validations.invalidEmail],
1278
+ username: [(val) => !!val || lang.value.register.validations.fieldRequired, (val) => isAlphanumeric(val) || lang.value.register.validations.notAlphaNumeric],
1279
+ password: [(val) => !!val || lang.value.password.validations.fieldRequired, (val) => val.length >= minimumPasswordLength.value || lang.value.password.validations.minimumPasswordLength(minimumPasswordLength.value)],
1280
+ repeatPassword: [(val) => !!val || lang.value.password.validations.fieldRequired, (val) => equals(val, password.value) || lang.value.password.validations.passwordsDoNotMatch]
1281
+ }));
1282
+ const submit = (evt) => {
1283
+ formRef.value?.validate().then((success) => {
1284
+ if (success) emit("submit", {
1285
+ email: email.value.trim(),
1286
+ password: password.value,
1287
+ username: username.value.trim(),
1288
+ extraFields: extraFieldValues.value,
1289
+ done: evt.done
1290
+ });
1291
+ else evt.done();
1292
+ });
1293
+ };
1294
+ __expose({
1295
+ variables: ref({
1296
+ header,
1297
+ forgotPassword,
1298
+ accountCreated,
1299
+ unprocessableRequest,
1300
+ alreadyRegistered
1301
+ }),
1302
+ functions: ref({ submit })
1303
+ });
1304
+ return (_ctx, _cache) => {
1305
+ const _component_q_input = QInput;
1306
+ const _component_q_icon = QIcon;
1307
+ return openBlock(), createBlock(unref(QForm), mergeProps({
1308
+ ref_key: "formRef",
1309
+ ref: formRef,
1310
+ class: "q-gutter-md"
1311
+ }, __props.form, { onSubmit: _cache[6] || (_cache[6] = (e) => submit) }), {
1312
+ default: withCtx(() => [
1313
+ !__props.useUsername ? (openBlock(), createBlock(_component_q_input, mergeProps({ key: 0 }, __props.input, {
1314
+ id: "email",
1315
+ modelValue: email.value,
1316
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => email.value = $event),
1317
+ name: "email",
1318
+ label: unref(lang).register.fields.email,
1319
+ "bottom-slots": "",
1320
+ rules: validations.value["email"],
1321
+ "lazy-rules": ""
1322
+ }), null, 16, [
1323
+ "modelValue",
1324
+ "label",
1325
+ "rules"
1326
+ ])) : createCommentVNode("", true),
1327
+ __props.useUsername ? (openBlock(), createBlock(_component_q_input, mergeProps({ key: 1 }, __props.input, {
1328
+ id: "username",
1329
+ modelValue: username.value,
1330
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => username.value = $event),
1331
+ name: "username",
1332
+ label: unref(lang).register.fields.username,
1333
+ "bottom-slots": "",
1334
+ rules: validations.value["username"],
1335
+ "lazy-rules": ""
1336
+ }), null, 16, [
1337
+ "modelValue",
1338
+ "label",
1339
+ "rules"
1340
+ ])) : createCommentVNode("", true),
1341
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.extraFields, (field) => {
1342
+ return openBlock(), createBlock(_component_q_input, {
1343
+ key: field.name,
1344
+ modelValue: extraFieldValues.value[field.name],
1345
+ "onUpdate:modelValue": ($event) => extraFieldValues.value[field.name] = $event,
1346
+ type: "text",
1347
+ name: field.name,
1348
+ label: field.label,
1349
+ rules: field.rules,
1350
+ "bottom-slots": ""
1351
+ }, null, 8, [
1352
+ "modelValue",
1353
+ "onUpdate:modelValue",
1354
+ "name",
1355
+ "label",
1356
+ "rules"
1357
+ ]);
1358
+ }), 128)),
1359
+ createVNode(_component_q_input, mergeProps(__props.input, {
1360
+ id: "password",
1361
+ modelValue: password.value,
1362
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => password.value = $event),
1363
+ name: "password",
1364
+ type: showPassword.value ? "text" : "password",
1365
+ label: unref(lang).register.fields.password,
1366
+ rules: validations.value["password"],
1367
+ "lazy-rules": "",
1368
+ "bottom-slots": ""
1369
+ }), {
1370
+ append: withCtx(() => [createVNode(_component_q_icon, {
1371
+ name: showPassword.value ? __props.icons.visibility : __props.icons.visibilityOff,
1372
+ class: "cursor-pointer",
1373
+ onClick: _cache[2] || (_cache[2] = ($event) => showPassword.value = !showPassword.value)
1374
+ }, null, 8, ["name"])]),
1375
+ _: 1
1376
+ }, 16, [
1377
+ "modelValue",
1378
+ "type",
1379
+ "label",
1380
+ "rules"
1381
+ ]),
1382
+ createVNode(_component_q_input, {
1383
+ id: "repeatPassword",
1384
+ modelValue: repeatPassword.value,
1385
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => repeatPassword.value = $event),
1386
+ type: showPassword.value ? "text" : "password",
1387
+ label: unref(lang).register.fields.repeatPassword,
1388
+ "bottom-slots": "",
1389
+ required: "",
1390
+ rules: validations.value["repeatPassword"],
1391
+ "lazy-rules": ""
1392
+ }, {
1393
+ append: withCtx(() => [createVNode(_component_q_icon, {
1394
+ name: showPassword.value ? __props.icons.visibility : __props.icons.visibilityOff,
1395
+ class: "cursor-pointer",
1396
+ onClick: _cache[4] || (_cache[4] = ($event) => showPassword.value = !showPassword.value)
1397
+ }, null, 8, ["name"])]),
1398
+ _: 1
1399
+ }, 8, [
1400
+ "modelValue",
1401
+ "type",
1402
+ "label",
1403
+ "rules"
1404
+ ]),
1405
+ renderSlot(_ctx.$slots, "default", { submit })
1406
+ ]),
1407
+ _: 3
1408
+ }, 16);
1409
+ };
1410
+ }
1382
1411
  });
1383
- const __default__$5 = {
1384
- name: "VerificationSlider"
1385
- };
1386
- const _sfc_main$6 = /* @__PURE__ */ defineComponent({
1387
- ...__default__$5,
1388
- props: {
1389
- useVerificationSlider: { type: Boolean }
1390
- },
1391
- emits: ["verified"],
1392
- setup(__props, { expose: __expose, emit: __emit }) {
1393
- const emit = __emit;
1394
- const $q = useQuasar();
1395
- const lang2 = useLang();
1396
- if (lang2.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
1397
- watch($q.lang, (val) => {
1398
- loadLang($q.lang.isoName);
1399
- });
1400
- const sliderValue = ref(0);
1401
- const sliderColor = ref("red");
1402
- const completed = ref(false);
1403
- watch(sliderValue, (newVal, oldVal) => {
1404
- if (newVal > 80) {
1405
- sliderColor.value = "green";
1406
- setTimeout(() => {
1407
- sliderValue.value = 100;
1408
- completed.value = true;
1409
- }, 500);
1410
- emit("verified");
1411
- }
1412
- });
1413
- const variables = ref({
1414
- // header: lang.value.some.nested.prop
1415
- });
1416
- const functions = ref({
1417
- // submit
1418
- });
1419
- __expose({
1420
- variables,
1421
- functions
1422
- });
1423
- return (_ctx, _cache) => {
1424
- const _component_q_slider = QSlider;
1425
- return openBlock(), createElementBlock(Fragment, null, [
1426
- createTextVNode(toDisplayString(unref(lang2).verification.slider) + " ", 1),
1427
- createVNode(_component_q_slider, {
1428
- modelValue: sliderValue.value,
1429
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => sliderValue.value = $event),
1430
- color: sliderColor.value,
1431
- readonly: completed.value
1432
- }, null, 8, ["modelValue", "color", "readonly"])
1433
- ], 64);
1434
- };
1435
- }
1412
+ //#endregion
1413
+ //#region src/ui/authentication/VerificationSlider.vue
1414
+ var VerificationSlider_default = /* @__PURE__ */ defineComponent({
1415
+ name: "VerificationSlider",
1416
+ props: { useVerificationSlider: { type: Boolean } },
1417
+ emits: ["verified"],
1418
+ setup(__props, { expose: __expose, emit: __emit }) {
1419
+ const emit = __emit;
1420
+ const $q = useQuasar();
1421
+ const lang = useLang();
1422
+ if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
1423
+ watch($q.lang, (val) => {
1424
+ loadLang($q.lang.isoName);
1425
+ });
1426
+ const sliderValue = ref(0);
1427
+ const sliderColor = ref("red");
1428
+ const completed = ref(false);
1429
+ watch(sliderValue, (newVal, oldVal) => {
1430
+ if (newVal > 80) {
1431
+ sliderColor.value = "green";
1432
+ setTimeout(() => {
1433
+ sliderValue.value = 100;
1434
+ completed.value = true;
1435
+ }, 500);
1436
+ emit("verified");
1437
+ }
1438
+ });
1439
+ __expose({
1440
+ variables: ref({}),
1441
+ functions: ref({})
1442
+ });
1443
+ return (_ctx, _cache) => {
1444
+ const _component_q_slider = QSlider;
1445
+ return openBlock(), createElementBlock(Fragment, null, [createTextVNode(toDisplayString(unref(lang).verification.slider) + " ", 1), createVNode(_component_q_slider, {
1446
+ modelValue: sliderValue.value,
1447
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => sliderValue.value = $event),
1448
+ color: sliderColor.value,
1449
+ readonly: completed.value
1450
+ }, null, 8, [
1451
+ "modelValue",
1452
+ "color",
1453
+ "readonly"
1454
+ ])], 64);
1455
+ };
1456
+ }
1436
1457
  });
1437
- const __default__$4 = {
1438
- name: "ConsentList"
1439
- };
1440
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1441
- ...__default__$4,
1442
- props: {
1443
- scopes: {},
1444
- claims: {},
1445
- resourceScopes: {},
1446
- icons: {}
1447
- },
1448
- setup(__props, { expose: __expose }) {
1449
- const props = __props;
1450
- const { icons } = toRefs(props);
1451
- const $q = useQuasar();
1452
- const lang2 = useLang();
1453
- if (lang2.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
1454
- watch($q.lang, (val) => {
1455
- loadLang($q.lang.isoName);
1456
- });
1457
- const message = computed(() => lang2.value.consent.message);
1458
- const allow = computed(() => lang2.value.consent.allow);
1459
- const deny = computed(() => lang2.value.consent.deny);
1460
- const checkIcon = icons.value?.check ?? "check";
1461
- const variables = ref({
1462
- message,
1463
- allow,
1464
- deny
1465
- });
1466
- const functions = ref({
1467
- // submit
1468
- });
1469
- __expose({
1470
- variables,
1471
- functions
1472
- });
1473
- return (_ctx, _cache) => {
1474
- const _component_q_icon = QIcon;
1475
- const _component_q_item_section = QItemSection;
1476
- const _component_q_item = QItem;
1477
- const _component_q_list = QList;
1478
- return openBlock(), createBlock(_component_q_list, null, {
1479
- default: withCtx(() => [
1480
- (openBlock(true), createElementBlock(Fragment, null, renderList(__props.scopes, (scope) => {
1481
- return openBlock(), createBlock(_component_q_item, {
1482
- key: scope.name
1483
- }, {
1484
- default: withCtx(() => [
1485
- createVNode(_component_q_item_section, { avatar: "" }, {
1486
- default: withCtx(() => [
1487
- createVNode(_component_q_icon, {
1488
- color: "green",
1489
- name: unref(checkIcon)
1490
- }, null, 8, ["name"])
1491
- ]),
1492
- _: 1
1493
- }),
1494
- createVNode(_component_q_item_section, null, {
1495
- default: withCtx(() => [
1496
- createTextVNode(toDisplayString(scope.name), 1)
1497
- ]),
1498
- _: 2
1499
- }, 1024)
1500
- ]),
1501
- _: 2
1502
- }, 1024);
1503
- }), 128)),
1504
- (openBlock(true), createElementBlock(Fragment, null, renderList(__props.claims, (claim) => {
1505
- return openBlock(), createBlock(_component_q_item, {
1506
- key: claim.name
1507
- }, {
1508
- default: withCtx(() => [
1509
- createVNode(_component_q_item_section, { avatar: "" }, {
1510
- default: withCtx(() => [
1511
- createVNode(_component_q_icon, {
1512
- color: "green",
1513
- name: unref(checkIcon)
1514
- }, null, 8, ["name"])
1515
- ]),
1516
- _: 1
1517
- }),
1518
- createVNode(_component_q_item_section, null, {
1519
- default: withCtx(() => [
1520
- createTextVNode(toDisplayString(claim.name), 1)
1521
- ]),
1522
- _: 2
1523
- }, 1024)
1524
- ]),
1525
- _: 2
1526
- }, 1024);
1527
- }), 128)),
1528
- (openBlock(true), createElementBlock(Fragment, null, renderList(__props.resourceScopes, (resourceScope) => {
1529
- return openBlock(), createBlock(_component_q_item, {
1530
- key: resourceScope.name
1531
- }, {
1532
- default: withCtx(() => [
1533
- createVNode(_component_q_item_section, { avatar: "" }, {
1534
- default: withCtx(() => [
1535
- createVNode(_component_q_icon, {
1536
- color: "green",
1537
- name: unref(checkIcon)
1538
- }, null, 8, ["name"])
1539
- ]),
1540
- _: 1
1541
- }),
1542
- createVNode(_component_q_item_section, null, {
1543
- default: withCtx(() => [
1544
- createTextVNode(toDisplayString(resourceScope.name), 1)
1545
- ]),
1546
- _: 2
1547
- }, 1024)
1548
- ]),
1549
- _: 2
1550
- }, 1024);
1551
- }), 128))
1552
- ]),
1553
- _: 1
1554
- });
1555
- };
1556
- }
1458
+ //#endregion
1459
+ //#region src/ui/authentication/ConsentList.vue
1460
+ var ConsentList_default = /* @__PURE__ */ defineComponent({
1461
+ name: "ConsentList",
1462
+ props: {
1463
+ scopes: {},
1464
+ claims: {},
1465
+ resourceScopes: {},
1466
+ icons: {}
1467
+ },
1468
+ setup(__props, { expose: __expose }) {
1469
+ const { icons } = toRefs(__props);
1470
+ const $q = useQuasar();
1471
+ const lang = useLang();
1472
+ if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
1473
+ watch($q.lang, (val) => {
1474
+ loadLang($q.lang.isoName);
1475
+ });
1476
+ const message = computed(() => lang.value.consent.message);
1477
+ const allow = computed(() => lang.value.consent.allow);
1478
+ const deny = computed(() => lang.value.consent.deny);
1479
+ const checkIcon = icons.value?.check ?? "check";
1480
+ __expose({
1481
+ variables: ref({
1482
+ message,
1483
+ allow,
1484
+ deny
1485
+ }),
1486
+ functions: ref({})
1487
+ });
1488
+ return (_ctx, _cache) => {
1489
+ const _component_q_icon = QIcon;
1490
+ const _component_q_item_section = QItemSection;
1491
+ const _component_q_item = QItem;
1492
+ const _component_q_list = QList;
1493
+ return openBlock(), createBlock(_component_q_list, null, {
1494
+ default: withCtx(() => [
1495
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.scopes, (scope) => {
1496
+ return openBlock(), createBlock(_component_q_item, { key: scope.name }, {
1497
+ default: withCtx(() => [createVNode(_component_q_item_section, { avatar: "" }, {
1498
+ default: withCtx(() => [createVNode(_component_q_icon, {
1499
+ color: "green",
1500
+ name: unref(checkIcon)
1501
+ }, null, 8, ["name"])]),
1502
+ _: 1
1503
+ }), createVNode(_component_q_item_section, null, {
1504
+ default: withCtx(() => [createTextVNode(toDisplayString(scope.name), 1)]),
1505
+ _: 2
1506
+ }, 1024)]),
1507
+ _: 2
1508
+ }, 1024);
1509
+ }), 128)),
1510
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.claims, (claim) => {
1511
+ return openBlock(), createBlock(_component_q_item, { key: claim.name }, {
1512
+ default: withCtx(() => [createVNode(_component_q_item_section, { avatar: "" }, {
1513
+ default: withCtx(() => [createVNode(_component_q_icon, {
1514
+ color: "green",
1515
+ name: unref(checkIcon)
1516
+ }, null, 8, ["name"])]),
1517
+ _: 1
1518
+ }), createVNode(_component_q_item_section, null, {
1519
+ default: withCtx(() => [createTextVNode(toDisplayString(claim.name), 1)]),
1520
+ _: 2
1521
+ }, 1024)]),
1522
+ _: 2
1523
+ }, 1024);
1524
+ }), 128)),
1525
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.resourceScopes, (resourceScope) => {
1526
+ return openBlock(), createBlock(_component_q_item, { key: resourceScope.name }, {
1527
+ default: withCtx(() => [createVNode(_component_q_item_section, { avatar: "" }, {
1528
+ default: withCtx(() => [createVNode(_component_q_icon, {
1529
+ color: "green",
1530
+ name: unref(checkIcon)
1531
+ }, null, 8, ["name"])]),
1532
+ _: 1
1533
+ }), createVNode(_component_q_item_section, null, {
1534
+ default: withCtx(() => [createTextVNode(toDisplayString(resourceScope.name), 1)]),
1535
+ _: 2
1536
+ }, 1024)]),
1537
+ _: 2
1538
+ }, 1024);
1539
+ }), 128))
1540
+ ]),
1541
+ _: 1
1542
+ });
1543
+ };
1544
+ }
1557
1545
  });
1558
- const __default__$3 = {
1559
- name: "UserMenuButton"
1560
- };
1561
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
1562
- ...__default__$3,
1563
- props: {
1564
- userRoute: {},
1565
- icons: {}
1566
- },
1567
- emits: ["signOut"],
1568
- setup(__props, { expose: __expose, emit: __emit }) {
1569
- const props = __props;
1570
- const { icons } = toRefs(props);
1571
- const emit = __emit;
1572
- const $q = useQuasar();
1573
- const lang2 = useLang();
1574
- if (lang2.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
1575
- watch($q.lang, (val) => {
1576
- loadLang($q.lang.isoName);
1577
- });
1578
- const personIcon = icons.value?.person ?? "person";
1579
- const variables = ref({
1580
- // header: lang.value.some.nested.prop
1581
- });
1582
- const functions = ref({
1583
- // submit
1584
- });
1585
- __expose({
1586
- variables,
1587
- functions
1588
- });
1589
- return (_ctx, _cache) => {
1590
- const _component_q_item_section = QItemSection;
1591
- const _component_q_item = QItem;
1592
- const _component_q_list = QList;
1593
- const _component_q_menu = QMenu;
1594
- const _component_q_btn = QBtn;
1595
- return openBlock(), createBlock(_component_q_btn, {
1596
- icon: unref(personIcon),
1597
- round: ""
1598
- }, {
1599
- default: withCtx(() => [
1600
- createVNode(_component_q_menu, null, {
1601
- default: withCtx(() => [
1602
- createVNode(_component_q_list, null, {
1603
- default: withCtx(() => [
1604
- createVNode(_component_q_item, { to: __props.userRoute }, {
1605
- default: withCtx(() => [
1606
- createVNode(_component_q_item_section, null, {
1607
- default: withCtx(() => [
1608
- createTextVNode(toDisplayString(unref(lang2).myAccount), 1)
1609
- ]),
1610
- _: 1
1611
- })
1612
- ]),
1613
- _: 1
1614
- }, 8, ["to"]),
1615
- renderSlot(_ctx.$slots, "default"),
1616
- createVNode(_component_q_item, {
1617
- clickable: "",
1618
- onClick: _cache[0] || (_cache[0] = ($event) => emit("signOut"))
1619
- }, {
1620
- default: withCtx(() => [
1621
- createVNode(_component_q_item_section, null, {
1622
- default: withCtx(() => [
1623
- createTextVNode(toDisplayString(unref(lang2).signOut), 1)
1624
- ]),
1625
- _: 1
1626
- })
1627
- ]),
1628
- _: 1
1629
- })
1630
- ]),
1631
- _: 3
1632
- })
1633
- ]),
1634
- _: 3
1635
- })
1636
- ]),
1637
- _: 3
1638
- }, 8, ["icon"]);
1639
- };
1640
- }
1546
+ //#endregion
1547
+ //#region src/ui/authentication/UserMenuButton.vue
1548
+ var UserMenuButton_default = /* @__PURE__ */ defineComponent({
1549
+ name: "UserMenuButton",
1550
+ props: {
1551
+ userRoute: {},
1552
+ icons: {}
1553
+ },
1554
+ emits: ["signOut"],
1555
+ setup(__props, { expose: __expose, emit: __emit }) {
1556
+ const { icons } = toRefs(__props);
1557
+ const emit = __emit;
1558
+ const $q = useQuasar();
1559
+ const lang = useLang();
1560
+ if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
1561
+ watch($q.lang, (val) => {
1562
+ loadLang($q.lang.isoName);
1563
+ });
1564
+ const personIcon = icons.value?.person ?? "person";
1565
+ __expose({
1566
+ variables: ref({}),
1567
+ functions: ref({})
1568
+ });
1569
+ return (_ctx, _cache) => {
1570
+ const _component_q_item_section = QItemSection;
1571
+ const _component_q_item = QItem;
1572
+ const _component_q_list = QList;
1573
+ const _component_q_menu = QMenu;
1574
+ const _component_q_btn = QBtn;
1575
+ return openBlock(), createBlock(_component_q_btn, {
1576
+ icon: unref(personIcon),
1577
+ round: ""
1578
+ }, {
1579
+ default: withCtx(() => [createVNode(_component_q_menu, null, {
1580
+ default: withCtx(() => [createVNode(_component_q_list, null, {
1581
+ default: withCtx(() => [
1582
+ createVNode(_component_q_item, { to: __props.userRoute }, {
1583
+ default: withCtx(() => [createVNode(_component_q_item_section, null, {
1584
+ default: withCtx(() => [createTextVNode(toDisplayString(unref(lang).myAccount), 1)]),
1585
+ _: 1
1586
+ })]),
1587
+ _: 1
1588
+ }, 8, ["to"]),
1589
+ renderSlot(_ctx.$slots, "default"),
1590
+ createVNode(_component_q_item, {
1591
+ clickable: "",
1592
+ onClick: _cache[0] || (_cache[0] = ($event) => emit("signOut"))
1593
+ }, {
1594
+ default: withCtx(() => [createVNode(_component_q_item_section, null, {
1595
+ default: withCtx(() => [createTextVNode(toDisplayString(unref(lang).signOut), 1)]),
1596
+ _: 1
1597
+ })]),
1598
+ _: 1
1599
+ })
1600
+ ]),
1601
+ _: 3
1602
+ })]),
1603
+ _: 3
1604
+ })]),
1605
+ _: 3
1606
+ }, 8, ["icon"]);
1607
+ };
1608
+ }
1641
1609
  });
1642
- const _hoisted_1$2 = { key: 0 };
1643
- const _hoisted_2 = { key: 1 };
1644
- const __default__$2 = {
1645
- name: "LoginButton"
1646
- };
1647
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
1648
- ...__default__$2,
1649
- props: {
1650
- withNetwork: {}
1651
- },
1652
- setup(__props) {
1653
- const $q = useQuasar();
1654
- const lang2 = useLang();
1655
- if (lang2.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
1656
- watch($q.lang, (val) => {
1657
- loadLang($q.lang.isoName);
1658
- });
1659
- return (_ctx, _cache) => {
1660
- return openBlock(), createBlock(_sfc_main$f, null, {
1661
- default: withCtx(() => [
1662
- renderSlot(_ctx.$slots, "icon"),
1663
- __props.withNetwork ? (openBlock(), createElementBlock("div", _hoisted_1$2, toDisplayString(unref(lang2).login.loginWith) + " " + toDisplayString(__props.withNetwork), 1)) : (openBlock(), createElementBlock("div", _hoisted_2, toDisplayString(unref(lang2).login.login), 1))
1664
- ]),
1665
- _: 3
1666
- });
1667
- };
1668
- }
1610
+ //#endregion
1611
+ //#region src/ui/authentication/LoginButton.vue?vue&type=script&setup=true&lang.ts
1612
+ var _hoisted_1$2 = { key: 0 };
1613
+ var _hoisted_2 = { key: 1 };
1614
+ //#endregion
1615
+ //#region src/ui/authentication/LoginButton.vue
1616
+ var LoginButton_default = /* @__PURE__ */ defineComponent({
1617
+ name: "LoginButton",
1618
+ props: { withNetwork: {} },
1619
+ setup(__props) {
1620
+ const $q = useQuasar();
1621
+ const lang = useLang();
1622
+ if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
1623
+ watch($q.lang, (val) => {
1624
+ loadLang($q.lang.isoName);
1625
+ });
1626
+ return (_ctx, _cache) => {
1627
+ return openBlock(), createBlock(QSubmitButton_default, null, {
1628
+ default: withCtx(() => [renderSlot(_ctx.$slots, "icon"), __props.withNetwork ? (openBlock(), createElementBlock("div", _hoisted_1$2, toDisplayString(unref(lang).login.loginWith) + " " + toDisplayString(__props.withNetwork), 1)) : (openBlock(), createElementBlock("div", _hoisted_2, toDisplayString(unref(lang).login.login), 1))]),
1629
+ _: 3
1630
+ });
1631
+ };
1632
+ }
1669
1633
  });
1670
- const _hoisted_1$1 = { class: "q-pa-sm" };
1671
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
1672
- __name: "AccountsTable",
1673
- props: {
1674
- modelValue: {},
1675
- count: {},
1676
- pagination: {},
1677
- mappedRoles: {},
1678
- columns: {},
1679
- icons: {}
1680
- },
1681
- emits: ["update:pagination", "update:criteria", "addRole", "removeRole"],
1682
- setup(__props, { emit: __emit }) {
1683
- const props = __props;
1684
- const emit = __emit;
1685
- const { modelValue, count, mappedRoles, columns, icons } = toRefs(props);
1686
- const lang2 = useLang();
1687
- const $q = useQuasar();
1688
- const sortBy = ref(props.pagination.sortBy);
1689
- const descending = ref(props.pagination.descending);
1690
- const rowsPerPage = ref(props.pagination.limit);
1691
- const page = ref(props.pagination.offset / props.pagination.limit + 1);
1692
- const name = ref("");
1693
- const email = ref("");
1694
- const roles = ref([]);
1695
- const criteria = computed(() => ({
1696
- name: name.value,
1697
- email: email.value,
1698
- roles: roles.value
1699
- }));
1700
- const tablePagination = computed({
1701
- // getter
1702
- get() {
1703
- return {
1704
- sortBy: sortBy.value,
1705
- descending: descending.value,
1706
- page: page.value,
1707
- rowsPerPage: rowsPerPage.value,
1708
- rowsNumber: count.value || 0
1709
- };
1710
- },
1711
- // setter
1712
- set(newValue) {
1713
- sortBy.value = newValue.sortBy;
1714
- descending.value = newValue.descending;
1715
- page.value = newValue.page;
1716
- rowsPerPage.value = newValue.rowsPerPage;
1717
- }
1718
- });
1719
- watch(criteria, () => emit("update:criteria", criteria.value));
1720
- const onRequest = ({ pagination }) => {
1721
- descending.value = pagination.descending;
1722
- sortBy.value = pagination.sortBy;
1723
- page.value = pagination.page;
1724
- rowsPerPage.value = pagination.rowsPerPage;
1725
- emit("update:pagination", {
1726
- limit: rowsPerPage.value,
1727
- offset: (page.value - 1) * rowsPerPage.value,
1728
- sortBy: sortBy.value,
1729
- descending: descending.value
1730
- });
1731
- return;
1732
- };
1733
- const accountColumns = ref([
1734
- {
1735
- name: "id",
1736
- required: true,
1737
- label: "#",
1738
- align: "left",
1739
- field: (row) => row.id,
1740
- format: (val) => `${val}`,
1741
- sortable: true
1742
- },
1743
- {
1744
- name: "name",
1745
- required: true,
1746
- label: lang2.value.account.fields.name,
1747
- align: "left",
1748
- field: (row) => row.name,
1749
- format: (val) => `${val || ""}`,
1750
- sortable: false
1751
- },
1752
- {
1753
- name: "email",
1754
- required: true,
1755
- label: lang2.value.account.fields.email,
1756
- align: "left",
1757
- field: (row) => row.email,
1758
- format: (val) => `${val}`,
1759
- sortable: false
1760
- },
1761
- {
1762
- name: "roles",
1763
- required: true,
1764
- label: lang2.value.account.fields.roles,
1765
- align: "right",
1766
- field: (row) => row.roles,
1767
- format: (val) => val.map((role) => mappedRoles.value[role]).join(", ")
1768
- }
1769
- ]);
1770
- if (columns?.value) accountColumns.value.push(...columns.value);
1771
- const roleOptions = computed(
1772
- () => Object.entries(mappedRoles.value).map(([key, value]) => ({
1773
- label: value,
1774
- value: key
1775
- }))
1776
- );
1777
- const openAddRoleDialog = (account) => {
1778
- $q.dialog({
1779
- message: lang2.value.account.messages.addRole(account),
1780
- options: {
1781
- type: "radio",
1782
- model: "role",
1783
- items: roleOptions.value.filter(
1784
- (newRole) => !account.roles.includes(newRole.value)
1785
- )
1786
- },
1787
- cancel: true,
1788
- persistent: true
1789
- }).onOk((role) => {
1790
- emit("addRole", { id: account.id, role });
1791
- });
1792
- };
1793
- const openRemoveRoleDialog = (account) => {
1794
- $q.dialog({
1795
- message: lang2.value.account.messages.removeRole(account),
1796
- options: {
1797
- type: "radio",
1798
- model: "role",
1799
- items: account.roles?.map((role) => ({
1800
- label: mappedRoles.value[role],
1801
- value: role
1802
- }))
1803
- },
1804
- cancel: true,
1805
- persistent: true
1806
- }).onOk((role) => {
1807
- emit("removeRole", { id: account.id, role });
1808
- });
1809
- };
1810
- const searchIcon = icons.value?.search ?? "search";
1811
- const cancelIcon = icons.value?.cancel ?? "cancel";
1812
- const moreVertIcon = icons.value?.moreVert ?? "more_vert";
1813
- return (_ctx, _cache) => {
1814
- const _component_q_th = QTh;
1815
- const _component_q_tr = QTr;
1816
- const _component_q_icon = QIcon;
1817
- const _component_q_input = QInput;
1818
- const _component_q_select = QSelect;
1819
- const _component_q_menu = QMenu;
1820
- const _component_q_btn = QBtn;
1821
- const _component_q_td = QTd;
1822
- const _component_q_item_label = QItemLabel;
1823
- const _component_q_item_section = QItemSection;
1824
- const _component_q_item = QItem;
1825
- const _component_q_list = QList;
1826
- return unref(modelValue) ? (openBlock(), createBlock(unref(QTable), {
1827
- key: 0,
1828
- pagination: tablePagination.value,
1829
- "onUpdate:pagination": _cache[6] || (_cache[6] = ($event) => tablePagination.value = $event),
1830
- title: unref(lang2).account.title,
1831
- class: "full-width",
1832
- rows: unref(modelValue),
1833
- columns: accountColumns.value,
1834
- "row-key": "id",
1835
- onRequest
1836
- }, {
1837
- header: withCtx((props2) => [
1838
- createVNode(_component_q_tr, { props: props2 }, {
1839
- default: withCtx(() => [
1840
- (openBlock(true), createElementBlock(Fragment, null, renderList(props2.cols, (col) => {
1841
- return openBlock(), createBlock(_component_q_th, {
1842
- key: col.name,
1843
- props: props2
1844
- }, {
1845
- default: withCtx(() => [
1846
- createTextVNode(toDisplayString(col.label), 1)
1847
- ]),
1848
- _: 2
1849
- }, 1032, ["props"]);
1850
- }), 128))
1851
- ]),
1852
- _: 2
1853
- }, 1032, ["props"])
1854
- ]),
1855
- "top-right": withCtx(() => [
1856
- createVNode(_component_q_btn, {
1857
- icon: unref(searchIcon),
1858
- "data-testid": "search-button"
1859
- }, {
1860
- default: withCtx(() => [
1861
- createVNode(_component_q_menu, null, {
1862
- default: withCtx(() => [
1863
- createElementVNode("div", _hoisted_1$1, [
1864
- createVNode(_component_q_input, {
1865
- modelValue: name.value,
1866
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => name.value = $event),
1867
- label: unref(lang2).account.fields.name
1868
- }, {
1869
- append: withCtx(() => [
1870
- name.value ? (openBlock(), createBlock(_component_q_icon, {
1871
- key: 0,
1872
- class: "q-field__focusable-action",
1873
- role: "button",
1874
- name: unref(cancelIcon),
1875
- onClick: _cache[0] || (_cache[0] = ($event) => name.value = "")
1876
- }, null, 8, ["name"])) : createCommentVNode("", true)
1877
- ]),
1878
- _: 1
1879
- }, 8, ["modelValue", "label"]),
1880
- createVNode(_component_q_input, {
1881
- modelValue: email.value,
1882
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => email.value = $event),
1883
- label: unref(lang2).account.fields.email
1884
- }, {
1885
- append: withCtx(() => [
1886
- email.value ? (openBlock(), createBlock(_component_q_icon, {
1887
- key: 0,
1888
- class: "q-field__focusable-action",
1889
- role: "button",
1890
- name: unref(cancelIcon),
1891
- onClick: _cache[2] || (_cache[2] = ($event) => email.value = "")
1892
- }, null, 8, ["name"])) : createCommentVNode("", true)
1893
- ]),
1894
- _: 1
1895
- }, 8, ["modelValue", "label"]),
1896
- createVNode(_component_q_select, {
1897
- modelValue: roles.value,
1898
- "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => roles.value = $event),
1899
- multiple: "",
1900
- style: { "min-width": "200px" },
1901
- label: unref(lang2).account.fields.roles,
1902
- options: roleOptions.value,
1903
- "map-options": "",
1904
- "emit-value": ""
1905
- }, {
1906
- append: withCtx(() => [
1907
- roles.value.length ? (openBlock(), createBlock(_component_q_icon, {
1908
- key: 0,
1909
- class: "q-field__focusable-action",
1910
- role: "button",
1911
- name: unref(cancelIcon),
1912
- onClick: _cache[4] || (_cache[4] = ($event) => roles.value = [])
1913
- }, null, 8, ["name"])) : createCommentVNode("", true)
1914
- ]),
1915
- _: 1
1916
- }, 8, ["modelValue", "label", "options"])
1917
- ])
1918
- ]),
1919
- _: 1
1920
- })
1921
- ]),
1922
- _: 1
1923
- }, 8, ["icon"])
1924
- ]),
1925
- body: withCtx((props2) => [
1926
- createVNode(_component_q_tr, { props: props2 }, {
1927
- default: withCtx(() => [
1928
- (openBlock(true), createElementBlock(Fragment, null, renderList(props2.cols, (col) => {
1929
- return openBlock(), createBlock(_component_q_td, {
1930
- key: col.name,
1931
- props: props2
1932
- }, {
1933
- default: withCtx(() => [
1934
- createTextVNode(toDisplayString(col.value), 1)
1935
- ]),
1936
- _: 2
1937
- }, 1032, ["props"]);
1938
- }), 128)),
1939
- createVNode(_component_q_td, { "auto-width": "" }, {
1940
- default: withCtx(() => [
1941
- createVNode(_component_q_btn, {
1942
- size: "sm",
1943
- round: "",
1944
- flat: "",
1945
- icon: unref(moreVertIcon)
1946
- }, {
1947
- default: withCtx(() => [
1948
- createVNode(_component_q_menu, null, {
1949
- default: withCtx(() => [
1950
- createVNode(_component_q_list, null, {
1951
- default: withCtx(() => [
1952
- createVNode(_component_q_item, {
1953
- clickable: "",
1954
- onClick: ($event) => openAddRoleDialog(props2.row)
1955
- }, {
1956
- default: withCtx(() => [
1957
- createVNode(_component_q_item_section, null, {
1958
- default: withCtx(() => [
1959
- createVNode(_component_q_item_label, null, {
1960
- default: withCtx(() => [
1961
- createTextVNode(toDisplayString(unref(lang2).account.labels.addRole), 1)
1962
- ]),
1963
- _: 1
1964
- })
1965
- ]),
1966
- _: 1
1967
- })
1968
- ]),
1969
- _: 1
1970
- }, 8, ["onClick"]),
1971
- createVNode(_component_q_item, {
1972
- clickable: "",
1973
- onClick: ($event) => openRemoveRoleDialog(props2.row)
1974
- }, {
1975
- default: withCtx(() => [
1976
- createVNode(_component_q_item_section, null, {
1977
- default: withCtx(() => [
1978
- createVNode(_component_q_item_label, null, {
1979
- default: withCtx(() => [
1980
- createTextVNode(toDisplayString(unref(lang2).account.labels.removeRole), 1)
1981
- ]),
1982
- _: 1
1983
- })
1984
- ]),
1985
- _: 1
1986
- })
1987
- ]),
1988
- _: 1
1989
- }, 8, ["onClick"])
1990
- ]),
1991
- _: 2
1992
- }, 1024)
1993
- ]),
1994
- _: 2
1995
- }, 1024)
1996
- ]),
1997
- _: 2
1998
- }, 1032, ["icon"])
1999
- ]),
2000
- _: 2
2001
- }, 1024)
2002
- ]),
2003
- _: 2
2004
- }, 1032, ["props"])
2005
- ]),
2006
- _: 1
2007
- }, 8, ["pagination", "title", "rows", "columns"])) : createCommentVNode("", true);
2008
- };
2009
- }
1634
+ //#endregion
1635
+ //#region src/ui/authentication/AccountsTable.vue?vue&type=script&setup=true&lang.ts
1636
+ var _hoisted_1$1 = { class: "q-pa-sm" };
1637
+ //#endregion
1638
+ //#region src/ui/authentication/AccountsTable.vue
1639
+ var AccountsTable_default = /* @__PURE__ */ defineComponent({
1640
+ __name: "AccountsTable",
1641
+ props: {
1642
+ modelValue: {},
1643
+ count: {},
1644
+ pagination: {},
1645
+ mappedRoles: {},
1646
+ columns: {},
1647
+ icons: {}
1648
+ },
1649
+ emits: [
1650
+ "update:pagination",
1651
+ "update:criteria",
1652
+ "addRole",
1653
+ "removeRole"
1654
+ ],
1655
+ setup(__props, { emit: __emit }) {
1656
+ const props = __props;
1657
+ const emit = __emit;
1658
+ const { modelValue, count, mappedRoles, columns, icons } = toRefs(props);
1659
+ const lang = useLang();
1660
+ const $q = useQuasar();
1661
+ const sortBy = ref(props.pagination.sortBy);
1662
+ const descending = ref(props.pagination.descending);
1663
+ const rowsPerPage = ref(props.pagination.limit);
1664
+ const page = ref(props.pagination.offset / props.pagination.limit + 1);
1665
+ const name = ref("");
1666
+ const email = ref("");
1667
+ const roles = ref([]);
1668
+ const criteria = computed(() => ({
1669
+ name: name.value,
1670
+ email: email.value,
1671
+ roles: roles.value
1672
+ }));
1673
+ const tablePagination = computed({
1674
+ get() {
1675
+ return {
1676
+ sortBy: sortBy.value,
1677
+ descending: descending.value,
1678
+ page: page.value,
1679
+ rowsPerPage: rowsPerPage.value,
1680
+ rowsNumber: count.value || 0
1681
+ };
1682
+ },
1683
+ set(newValue) {
1684
+ sortBy.value = newValue.sortBy;
1685
+ descending.value = newValue.descending;
1686
+ page.value = newValue.page;
1687
+ rowsPerPage.value = newValue.rowsPerPage;
1688
+ }
1689
+ });
1690
+ watch(criteria, () => emit("update:criteria", criteria.value));
1691
+ const onRequest = ({ pagination }) => {
1692
+ descending.value = pagination.descending;
1693
+ sortBy.value = pagination.sortBy;
1694
+ page.value = pagination.page;
1695
+ rowsPerPage.value = pagination.rowsPerPage;
1696
+ emit("update:pagination", {
1697
+ limit: rowsPerPage.value,
1698
+ offset: (page.value - 1) * rowsPerPage.value,
1699
+ sortBy: sortBy.value,
1700
+ descending: descending.value
1701
+ });
1702
+ };
1703
+ const accountColumns = ref([
1704
+ {
1705
+ name: "id",
1706
+ required: true,
1707
+ label: "#",
1708
+ align: "left",
1709
+ field: (row) => row.id,
1710
+ format: (val) => `${val}`,
1711
+ sortable: true
1712
+ },
1713
+ {
1714
+ name: "name",
1715
+ required: true,
1716
+ label: lang.value.account.fields.name,
1717
+ align: "left",
1718
+ field: (row) => row.name,
1719
+ format: (val) => `${val || ""}`,
1720
+ sortable: false
1721
+ },
1722
+ {
1723
+ name: "email",
1724
+ required: true,
1725
+ label: lang.value.account.fields.email,
1726
+ align: "left",
1727
+ field: (row) => row.email,
1728
+ format: (val) => `${val}`,
1729
+ sortable: false
1730
+ },
1731
+ {
1732
+ name: "roles",
1733
+ required: true,
1734
+ label: lang.value.account.fields.roles,
1735
+ align: "right",
1736
+ field: (row) => row.roles,
1737
+ format: (val) => val.map((role) => mappedRoles.value[role]).join(", ")
1738
+ }
1739
+ ]);
1740
+ if (columns?.value) accountColumns.value.push(...columns.value);
1741
+ const roleOptions = computed(() => Object.entries(mappedRoles.value).map(([key, value]) => ({
1742
+ label: value,
1743
+ value: key
1744
+ })));
1745
+ const openAddRoleDialog = (account) => {
1746
+ $q.dialog({
1747
+ message: lang.value.account.messages.addRole(account),
1748
+ options: {
1749
+ type: "radio",
1750
+ model: "role",
1751
+ items: roleOptions.value.filter((newRole) => !account.roles.includes(newRole.value))
1752
+ },
1753
+ cancel: true,
1754
+ persistent: true
1755
+ }).onOk((role) => {
1756
+ emit("addRole", {
1757
+ id: account.id,
1758
+ role
1759
+ });
1760
+ });
1761
+ };
1762
+ const openRemoveRoleDialog = (account) => {
1763
+ $q.dialog({
1764
+ message: lang.value.account.messages.removeRole(account),
1765
+ options: {
1766
+ type: "radio",
1767
+ model: "role",
1768
+ items: account.roles?.map((role) => ({
1769
+ label: mappedRoles.value[role],
1770
+ value: role
1771
+ }))
1772
+ },
1773
+ cancel: true,
1774
+ persistent: true
1775
+ }).onOk((role) => {
1776
+ emit("removeRole", {
1777
+ id: account.id,
1778
+ role
1779
+ });
1780
+ });
1781
+ };
1782
+ const searchIcon = icons.value?.search ?? "search";
1783
+ const cancelIcon = icons.value?.cancel ?? "cancel";
1784
+ const moreVertIcon = icons.value?.moreVert ?? "more_vert";
1785
+ return (_ctx, _cache) => {
1786
+ const _component_q_th = QTh;
1787
+ const _component_q_tr = QTr;
1788
+ const _component_q_icon = QIcon;
1789
+ const _component_q_input = QInput;
1790
+ const _component_q_select = QSelect;
1791
+ const _component_q_menu = QMenu;
1792
+ const _component_q_btn = QBtn;
1793
+ const _component_q_td = QTd;
1794
+ const _component_q_item_label = QItemLabel;
1795
+ const _component_q_item_section = QItemSection;
1796
+ const _component_q_item = QItem;
1797
+ const _component_q_list = QList;
1798
+ return unref(modelValue) ? (openBlock(), createBlock(unref(QTable), {
1799
+ key: 0,
1800
+ pagination: tablePagination.value,
1801
+ "onUpdate:pagination": _cache[6] || (_cache[6] = ($event) => tablePagination.value = $event),
1802
+ title: unref(lang).account.title,
1803
+ class: "full-width",
1804
+ rows: unref(modelValue),
1805
+ columns: accountColumns.value,
1806
+ "row-key": "id",
1807
+ onRequest
1808
+ }, {
1809
+ header: withCtx((props) => [createVNode(_component_q_tr, { props }, {
1810
+ default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(props.cols, (col) => {
1811
+ return openBlock(), createBlock(_component_q_th, {
1812
+ key: col.name,
1813
+ props
1814
+ }, {
1815
+ default: withCtx(() => [createTextVNode(toDisplayString(col.label), 1)]),
1816
+ _: 2
1817
+ }, 1032, ["props"]);
1818
+ }), 128))]),
1819
+ _: 2
1820
+ }, 1032, ["props"])]),
1821
+ "top-right": withCtx(() => [createVNode(_component_q_btn, {
1822
+ icon: unref(searchIcon),
1823
+ "data-testid": "search-button"
1824
+ }, {
1825
+ default: withCtx(() => [createVNode(_component_q_menu, null, {
1826
+ default: withCtx(() => [createElementVNode("div", _hoisted_1$1, [
1827
+ createVNode(_component_q_input, {
1828
+ modelValue: name.value,
1829
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => name.value = $event),
1830
+ label: unref(lang).account.fields.name
1831
+ }, {
1832
+ append: withCtx(() => [name.value ? (openBlock(), createBlock(_component_q_icon, {
1833
+ key: 0,
1834
+ class: "q-field__focusable-action",
1835
+ role: "button",
1836
+ name: unref(cancelIcon),
1837
+ onClick: _cache[0] || (_cache[0] = ($event) => name.value = "")
1838
+ }, null, 8, ["name"])) : createCommentVNode("", true)]),
1839
+ _: 1
1840
+ }, 8, ["modelValue", "label"]),
1841
+ createVNode(_component_q_input, {
1842
+ modelValue: email.value,
1843
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => email.value = $event),
1844
+ label: unref(lang).account.fields.email
1845
+ }, {
1846
+ append: withCtx(() => [email.value ? (openBlock(), createBlock(_component_q_icon, {
1847
+ key: 0,
1848
+ class: "q-field__focusable-action",
1849
+ role: "button",
1850
+ name: unref(cancelIcon),
1851
+ onClick: _cache[2] || (_cache[2] = ($event) => email.value = "")
1852
+ }, null, 8, ["name"])) : createCommentVNode("", true)]),
1853
+ _: 1
1854
+ }, 8, ["modelValue", "label"]),
1855
+ createVNode(_component_q_select, {
1856
+ modelValue: roles.value,
1857
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => roles.value = $event),
1858
+ multiple: "",
1859
+ style: { "min-width": "200px" },
1860
+ label: unref(lang).account.fields.roles,
1861
+ options: roleOptions.value,
1862
+ "map-options": "",
1863
+ "emit-value": ""
1864
+ }, {
1865
+ append: withCtx(() => [roles.value.length ? (openBlock(), createBlock(_component_q_icon, {
1866
+ key: 0,
1867
+ class: "q-field__focusable-action",
1868
+ role: "button",
1869
+ name: unref(cancelIcon),
1870
+ onClick: _cache[4] || (_cache[4] = ($event) => roles.value = [])
1871
+ }, null, 8, ["name"])) : createCommentVNode("", true)]),
1872
+ _: 1
1873
+ }, 8, [
1874
+ "modelValue",
1875
+ "label",
1876
+ "options"
1877
+ ])
1878
+ ])]),
1879
+ _: 1
1880
+ })]),
1881
+ _: 1
1882
+ }, 8, ["icon"])]),
1883
+ body: withCtx((props) => [createVNode(_component_q_tr, { props }, {
1884
+ default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(props.cols, (col) => {
1885
+ return openBlock(), createBlock(_component_q_td, {
1886
+ key: col.name,
1887
+ props
1888
+ }, {
1889
+ default: withCtx(() => [createTextVNode(toDisplayString(col.value), 1)]),
1890
+ _: 2
1891
+ }, 1032, ["props"]);
1892
+ }), 128)), createVNode(_component_q_td, { "auto-width": "" }, {
1893
+ default: withCtx(() => [createVNode(_component_q_btn, {
1894
+ size: "sm",
1895
+ round: "",
1896
+ flat: "",
1897
+ icon: unref(moreVertIcon)
1898
+ }, {
1899
+ default: withCtx(() => [createVNode(_component_q_menu, null, {
1900
+ default: withCtx(() => [createVNode(_component_q_list, null, {
1901
+ default: withCtx(() => [createVNode(_component_q_item, {
1902
+ clickable: "",
1903
+ onClick: ($event) => openAddRoleDialog(props.row)
1904
+ }, {
1905
+ default: withCtx(() => [createVNode(_component_q_item_section, null, {
1906
+ default: withCtx(() => [createVNode(_component_q_item_label, null, {
1907
+ default: withCtx(() => [createTextVNode(toDisplayString(unref(lang).account.labels.addRole), 1)]),
1908
+ _: 1
1909
+ })]),
1910
+ _: 1
1911
+ })]),
1912
+ _: 1
1913
+ }, 8, ["onClick"]), createVNode(_component_q_item, {
1914
+ clickable: "",
1915
+ onClick: ($event) => openRemoveRoleDialog(props.row)
1916
+ }, {
1917
+ default: withCtx(() => [createVNode(_component_q_item_section, null, {
1918
+ default: withCtx(() => [createVNode(_component_q_item_label, null, {
1919
+ default: withCtx(() => [createTextVNode(toDisplayString(unref(lang).account.labels.removeRole), 1)]),
1920
+ _: 1
1921
+ })]),
1922
+ _: 1
1923
+ })]),
1924
+ _: 1
1925
+ }, 8, ["onClick"])]),
1926
+ _: 2
1927
+ }, 1024)]),
1928
+ _: 2
1929
+ }, 1024)]),
1930
+ _: 2
1931
+ }, 1032, ["icon"])]),
1932
+ _: 2
1933
+ }, 1024)]),
1934
+ _: 2
1935
+ }, 1032, ["props"])]),
1936
+ _: 1
1937
+ }, 8, [
1938
+ "pagination",
1939
+ "title",
1940
+ "rows",
1941
+ "columns"
1942
+ ])) : createCommentVNode("", true);
1943
+ };
1944
+ }
2010
1945
  });
2011
- const _hoisted_1 = ["value"];
2012
- const __default__$1 = {
2013
- name: "LoginForm"
2014
- };
2015
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2016
- ...__default__$1,
2017
- props: {
2018
- form: {},
2019
- action: {},
2020
- xsrfSecret: {}
2021
- },
2022
- setup(__props, { expose: __expose }) {
2023
- const $q = useQuasar();
2024
- const lang2 = useLang();
2025
- if (lang2.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
2026
- watch($q.lang, (val) => {
2027
- loadLang($q.lang.isoName);
2028
- });
2029
- const formRef = ref();
2030
- const variables = ref({});
2031
- const functions = ref({});
2032
- __expose({
2033
- variables,
2034
- functions
2035
- });
2036
- return (_ctx, _cache) => {
2037
- return openBlock(), createElementBlock(Fragment, null, [
2038
- createTextVNode(toDisplayString(unref(lang2).logout.confirmation) + " ", 1),
2039
- createVNode(unref(QForm), mergeProps({
2040
- ref_key: "formRef",
2041
- ref: formRef,
2042
- "data-allow-mismatch": "props",
2043
- class: "q-gutter-md"
2044
- }, __props.form, {
2045
- method: "post",
2046
- action: __props.action
2047
- }), {
2048
- default: withCtx(() => [
2049
- createElementVNode("input", {
2050
- type: "hidden",
2051
- name: "xsrf",
2052
- value: __props.xsrfSecret
2053
- }, null, 8, _hoisted_1),
2054
- renderSlot(_ctx.$slots, "default")
2055
- ]),
2056
- _: 3
2057
- }, 16, ["action"])
2058
- ], 64);
2059
- };
2060
- }
1946
+ //#endregion
1947
+ //#region src/ui/authentication/LogoutForm.vue?vue&type=script&setup=true&lang.ts
1948
+ var _hoisted_1 = ["value"];
1949
+ //#endregion
1950
+ //#region src/ui/authentication/LogoutForm.vue
1951
+ var LogoutForm_default = /* @__PURE__ */ defineComponent({
1952
+ name: "LoginForm",
1953
+ props: {
1954
+ form: {},
1955
+ action: {},
1956
+ xsrfSecret: {}
1957
+ },
1958
+ setup(__props, { expose: __expose }) {
1959
+ const $q = useQuasar();
1960
+ const lang = useLang();
1961
+ if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
1962
+ watch($q.lang, (val) => {
1963
+ loadLang($q.lang.isoName);
1964
+ });
1965
+ const formRef = ref();
1966
+ __expose({
1967
+ variables: ref({}),
1968
+ functions: ref({})
1969
+ });
1970
+ return (_ctx, _cache) => {
1971
+ return openBlock(), createElementBlock(Fragment, null, [createTextVNode(toDisplayString(unref(lang).logout.confirmation) + " ", 1), createVNode(unref(QForm), mergeProps({
1972
+ ref_key: "formRef",
1973
+ ref: formRef,
1974
+ "data-allow-mismatch": "props",
1975
+ class: "q-gutter-md"
1976
+ }, __props.form, {
1977
+ method: "post",
1978
+ action: __props.action
1979
+ }), {
1980
+ default: withCtx(() => [createElementVNode("input", {
1981
+ type: "hidden",
1982
+ name: "xsrf",
1983
+ value: __props.xsrfSecret
1984
+ }, null, 8, _hoisted_1), renderSlot(_ctx.$slots, "default")]),
1985
+ _: 3
1986
+ }, 16, ["action"])], 64);
1987
+ };
1988
+ }
2061
1989
  });
2062
- const __default__ = {
2063
- name: "LogoutButton"
2064
- };
2065
- const _sfc_main = /* @__PURE__ */ defineComponent({
2066
- ...__default__,
2067
- props: {
2068
- withNetwork: {}
2069
- },
2070
- setup(__props) {
2071
- const $q = useQuasar();
2072
- const lang2 = useLang();
2073
- if (lang2.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
2074
- watch($q.lang, (val) => {
2075
- loadLang($q.lang.isoName);
2076
- });
2077
- return (_ctx, _cache) => {
2078
- return openBlock(), createBlock(_sfc_main$f, null, {
2079
- default: withCtx(() => [
2080
- renderSlot(_ctx.$slots, "icon"),
2081
- createTextVNode(" " + toDisplayString(unref(lang2).logout.logout), 1)
2082
- ]),
2083
- _: 3
2084
- });
2085
- };
2086
- }
1990
+ //#endregion
1991
+ //#region src/ui/authentication/LogoutButton.vue
1992
+ var LogoutButton_default = /* @__PURE__ */ defineComponent({
1993
+ name: "LogoutButton",
1994
+ props: { withNetwork: {} },
1995
+ setup(__props) {
1996
+ const $q = useQuasar();
1997
+ const lang = useLang();
1998
+ if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName);
1999
+ watch($q.lang, (val) => {
2000
+ loadLang($q.lang.isoName);
2001
+ });
2002
+ return (_ctx, _cache) => {
2003
+ return openBlock(), createBlock(QSubmitButton_default, null, {
2004
+ default: withCtx(() => [renderSlot(_ctx.$slots, "icon"), createTextVNode(" " + toDisplayString(unref(lang).logout.logout), 1)]),
2005
+ _: 3
2006
+ });
2007
+ };
2008
+ }
2087
2009
  });
2088
- export {
2089
- _sfc_main$2 as AccountsTable,
2090
- _sfc_main$5 as ConsentList,
2091
- _sfc_main$c as EmailChangeForm,
2092
- _sfc_main$b as EmailChangeStepper,
2093
- _sfc_main$3 as LoginButton,
2094
- _sfc_main$8 as LoginForm,
2095
- _sfc_main as LogoutButton,
2096
- _sfc_main$1 as LogoutForm,
2097
- _sfc_main$d as OtpInput,
2098
- _sfc_main$a as PasswordChangeForm,
2099
- _sfc_main$9 as PasswordChangeStepper,
2100
- _sfc_main$7 as RegisterForm,
2101
- _sfc_main$e as RequestOtpForm,
2102
- _sfc_main$4 as UserMenuButton,
2103
- _sfc_main$6 as VerificationSlider,
2104
- loadLang,
2105
- useLang
2106
- };
2010
+ //#endregion
2011
+ export { AccountsTable_default as AccountsTable, ConsentList_default as ConsentList, EmailChangeForm_default as EmailChangeForm, EmailChangeStepper_default as EmailChangeStepper, LoginButton_default as LoginButton, LoginForm_default as LoginForm, LogoutButton_default as LogoutButton, LogoutForm_default as LogoutForm, OtpInput_default as OtpInput, PasswordChangeForm_default as PasswordChangeForm, PasswordChangeStepper_default as PasswordChangeStepper, RegisterForm_default as RegisterForm, RequestOtpForm_default as RequestOtpForm, UserMenuButton_default as UserMenuButton, VerificationSlider_default as VerificationSlider, loadLang, useLang };