@data-c/ui 0.2.92 → 0.2.93

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -2572,7 +2572,7 @@ function PageTitle(props) {
2572
2572
  }
2573
2573
 
2574
2574
  // src/MioAuth/index.tsx
2575
- import { Stack as Stack44, Typography as Typography26, useMediaQuery as useMediaQuery6, useTheme as useTheme11 } from "@mui/material";
2575
+ import { Stack as Stack52, Typography as Typography34, useMediaQuery as useMediaQuery10, useTheme as useTheme16 } from "@mui/material";
2576
2576
 
2577
2577
  // src/MioAuth/components/BannerSection/index.tsx
2578
2578
  import { Stack as Stack7, useMediaQuery as useMediaQuery2, useTheme } from "@mui/material";
@@ -2602,7 +2602,7 @@ function BannerSection(props) {
2602
2602
  }
2603
2603
 
2604
2604
  // src/MioAuth/components/LoginSection/index.tsx
2605
- import { Box as Box21, Stack as Stack42, useMediaQuery as useMediaQuery4, useTheme as useTheme9 } from "@mui/material";
2605
+ import { Box as Box26, Stack as Stack50, useMediaQuery as useMediaQuery8, useTheme as useTheme14 } from "@mui/material";
2606
2606
 
2607
2607
  // src/MioAuth/components/Header/index.tsx
2608
2608
  import { Stack as Stack8, Typography as Typography6 } from "@mui/material";
@@ -2637,15 +2637,15 @@ function Header(props) {
2637
2637
  }
2638
2638
 
2639
2639
  // src/MioAuth/components/LoginForm/index.tsx
2640
- import { useState as useState18 } from "react";
2640
+ import { useState as useState26 } from "react";
2641
2641
  import {
2642
- useCredentials as useCredentials2,
2643
- useValidations as useValidations2
2642
+ useCredentials as useCredentials3,
2643
+ useValidations as useValidations5
2644
2644
  } from "@data-c/hooks";
2645
- import { Alert as Alert4, Divider as Divider4, Stack as Stack39, TextField as TextField6, Typography as Typography21 } from "@mui/material";
2646
- import { isAxiosError as isAxiosError2 } from "axios";
2647
- import Mail from "@mui/icons-material/Mail";
2648
- import WhatsApp from "@mui/icons-material/WhatsApp";
2645
+ import { Alert as Alert9, Divider as Divider6, Stack as Stack47, TextField as TextField12, Typography as Typography29 } from "@mui/material";
2646
+ import { isAxiosError as isAxiosError4 } from "axios";
2647
+ import Mail2 from "@mui/icons-material/Mail";
2648
+ import WhatsApp2 from "@mui/icons-material/WhatsApp";
2649
2649
 
2650
2650
  // ../../node_modules/yup/index.esm.js
2651
2651
  var import_property_expr = __toESM(require_property_expr());
@@ -2872,10 +2872,10 @@ var Condition = class {
2872
2872
  otherwise
2873
2873
  } = config;
2874
2874
  let check = typeof is === "function" ? is : (...values) => values.every((value) => value === is);
2875
- return new Condition(refs, (values, schema6) => {
2875
+ return new Condition(refs, (values, schema9) => {
2876
2876
  var _branch;
2877
2877
  let branch = check(...values) ? then : otherwise;
2878
- return (_branch = branch == null ? void 0 : branch(schema6)) != null ? _branch : schema6;
2878
+ return (_branch = branch == null ? void 0 : branch(schema9)) != null ? _branch : schema9;
2879
2879
  });
2880
2880
  }
2881
2881
  constructor(refs, builder) {
@@ -2889,14 +2889,14 @@ var Condition = class {
2889
2889
  // TODO: ? operator here?
2890
2890
  ref.getValue(options == null ? void 0 : options.value, options == null ? void 0 : options.parent, options == null ? void 0 : options.context)
2891
2891
  ));
2892
- let schema6 = this.fn(values, base, options);
2893
- if (schema6 === void 0 || // @ts-ignore this can be base
2894
- schema6 === base) {
2892
+ let schema9 = this.fn(values, base, options);
2893
+ if (schema9 === void 0 || // @ts-ignore this can be base
2894
+ schema9 === base) {
2895
2895
  return base;
2896
2896
  }
2897
- if (!isSchema(schema6))
2897
+ if (!isSchema(schema9))
2898
2898
  throw new TypeError("conditions must return a schema object");
2899
- return schema6.resolve(options);
2899
+ return schema9.resolve(options);
2900
2900
  }
2901
2901
  };
2902
2902
  var prefixes = {
@@ -2970,7 +2970,7 @@ function createValidation(config) {
2970
2970
  path = "",
2971
2971
  options,
2972
2972
  originalValue,
2973
- schema: schema6
2973
+ schema: schema9
2974
2974
  }, panic, next) {
2975
2975
  const {
2976
2976
  name,
@@ -2982,8 +2982,8 @@ function createValidation(config) {
2982
2982
  let {
2983
2983
  parent,
2984
2984
  context,
2985
- abortEarly = schema6.spec.abortEarly,
2986
- disableStackTrace = schema6.spec.disableStackTrace
2985
+ abortEarly = schema9.spec.abortEarly,
2986
+ disableStackTrace = schema9.spec.disableStackTrace
2987
2987
  } = options;
2988
2988
  const resolveOptions = {
2989
2989
  value,
@@ -2994,9 +2994,9 @@ function createValidation(config) {
2994
2994
  const nextParams = resolveParams(Object.assign({
2995
2995
  value,
2996
2996
  originalValue,
2997
- label: schema6.spec.label,
2997
+ label: schema9.spec.label,
2998
2998
  path: overrides.path || path,
2999
- spec: schema6.spec,
2999
+ spec: schema9.spec,
3000
3000
  disableStackTrace: overrides.disableStackTrace || disableStackTrace
3001
3001
  }, params, overrides.params), resolveOptions);
3002
3002
  const error = new ValidationError(ValidationError.formatError(overrides.message || message, nextParams), value, nextParams.path, overrides.type || name, nextParams.disableStackTrace);
@@ -3015,7 +3015,7 @@ function createValidation(config) {
3015
3015
  },
3016
3016
  options,
3017
3017
  originalValue,
3018
- schema: schema6
3018
+ schema: schema9
3019
3019
  };
3020
3020
  const handleResult = (validOrError) => {
3021
3021
  if (ValidationError.isError(validOrError))
@@ -3065,24 +3065,24 @@ function resolveParams(params, options) {
3065
3065
  function resolveMaybeRef(item, options) {
3066
3066
  return Reference.isRef(item) ? item.getValue(options.value, options.parent, options.context) : item;
3067
3067
  }
3068
- function getIn(schema6, path, value, context = value) {
3068
+ function getIn(schema9, path, value, context = value) {
3069
3069
  let parent, lastPart, lastPartDebug;
3070
3070
  if (!path)
3071
3071
  return {
3072
3072
  parent,
3073
3073
  parentPath: path,
3074
- schema: schema6
3074
+ schema: schema9
3075
3075
  };
3076
3076
  (0, import_property_expr.forEach)(path, (_part, isBracket, isArray) => {
3077
3077
  let part = isBracket ? _part.slice(1, _part.length - 1) : _part;
3078
- schema6 = schema6.resolve({
3078
+ schema9 = schema9.resolve({
3079
3079
  context,
3080
3080
  parent,
3081
3081
  value
3082
3082
  });
3083
- let isTuple = schema6.type === "tuple";
3083
+ let isTuple = schema9.type === "tuple";
3084
3084
  let idx = isArray ? parseInt(part, 10) : 0;
3085
- if (schema6.innerType || isTuple) {
3085
+ if (schema9.innerType || isTuple) {
3086
3086
  if (isTuple && !isArray)
3087
3087
  throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${lastPartDebug}" must contain an index to the tuple element, e.g. "${lastPartDebug}[0]"`);
3088
3088
  if (value && idx >= value.length) {
@@ -3090,20 +3090,20 @@ function getIn(schema6, path, value, context = value) {
3090
3090
  }
3091
3091
  parent = value;
3092
3092
  value = value && value[idx];
3093
- schema6 = isTuple ? schema6.spec.types[idx] : schema6.innerType;
3093
+ schema9 = isTuple ? schema9.spec.types[idx] : schema9.innerType;
3094
3094
  }
3095
3095
  if (!isArray) {
3096
- if (!schema6.fields || !schema6.fields[part])
3097
- throw new Error(`The schema does not contain the path: ${path}. (failed at: ${lastPartDebug} which is a type: "${schema6.type}")`);
3096
+ if (!schema9.fields || !schema9.fields[part])
3097
+ throw new Error(`The schema does not contain the path: ${path}. (failed at: ${lastPartDebug} which is a type: "${schema9.type}")`);
3098
3098
  parent = value;
3099
3099
  value = value && value[part];
3100
- schema6 = schema6.fields[part];
3100
+ schema9 = schema9.fields[part];
3101
3101
  }
3102
3102
  lastPart = part;
3103
3103
  lastPartDebug = isBracket ? "[" + _part + "]" : "." + _part;
3104
3104
  });
3105
3105
  return {
3106
- schema: schema6,
3106
+ schema: schema9,
3107
3107
  parent,
3108
3108
  parentPath: lastPart
3109
3109
  };
@@ -3311,22 +3311,22 @@ var Schema = class {
3311
3311
  this._mutate = before;
3312
3312
  return result;
3313
3313
  }
3314
- concat(schema6) {
3315
- if (!schema6 || schema6 === this)
3314
+ concat(schema9) {
3315
+ if (!schema9 || schema9 === this)
3316
3316
  return this;
3317
- if (schema6.type !== this.type && this.type !== "mixed")
3318
- throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${schema6.type}`);
3317
+ if (schema9.type !== this.type && this.type !== "mixed")
3318
+ throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${schema9.type}`);
3319
3319
  let base = this;
3320
- let combined = schema6.clone();
3320
+ let combined = schema9.clone();
3321
3321
  const mergedSpec = Object.assign({}, base.spec, combined.spec);
3322
3322
  combined.spec = mergedSpec;
3323
3323
  combined.internalTests = Object.assign({}, base.internalTests, combined.internalTests);
3324
- combined._whitelist = base._whitelist.merge(schema6._whitelist, schema6._blacklist);
3325
- combined._blacklist = base._blacklist.merge(schema6._blacklist, schema6._whitelist);
3324
+ combined._whitelist = base._whitelist.merge(schema9._whitelist, schema9._blacklist);
3325
+ combined._blacklist = base._blacklist.merge(schema9._blacklist, schema9._whitelist);
3326
3326
  combined.tests = base.tests;
3327
3327
  combined.exclusiveTests = base.exclusiveTests;
3328
3328
  combined.withMutation((next) => {
3329
- schema6.tests.forEach((fn) => {
3329
+ schema9.tests.forEach((fn) => {
3330
3330
  next.test(fn.OPTIONS);
3331
3331
  });
3332
3332
  });
@@ -3344,15 +3344,15 @@ var Schema = class {
3344
3344
  return this._typeCheck(v);
3345
3345
  }
3346
3346
  resolve(options) {
3347
- let schema6 = this;
3348
- if (schema6.conditions.length) {
3349
- let conditions = schema6.conditions;
3350
- schema6 = schema6.clone();
3351
- schema6.conditions = [];
3352
- schema6 = conditions.reduce((prevSchema, condition) => condition.resolve(prevSchema, options), schema6);
3353
- schema6 = schema6.resolve(options);
3347
+ let schema9 = this;
3348
+ if (schema9.conditions.length) {
3349
+ let conditions = schema9.conditions;
3350
+ schema9 = schema9.clone();
3351
+ schema9.conditions = [];
3352
+ schema9 = conditions.reduce((prevSchema, condition) => condition.resolve(prevSchema, options), schema9);
3353
+ schema9 = schema9.resolve(options);
3354
3354
  }
3355
- return schema6;
3355
+ return schema9;
3356
3356
  }
3357
3357
  resolveOptions(options) {
3358
3358
  var _options$strict, _options$abortEarly, _options$recursive, _options$disableStack;
@@ -3512,11 +3512,11 @@ attempted value: ${formattedValue}
3512
3512
  }
3513
3513
  validate(value, options) {
3514
3514
  var _options$disableStack2;
3515
- let schema6 = this.resolve(Object.assign({}, options, {
3515
+ let schema9 = this.resolve(Object.assign({}, options, {
3516
3516
  value
3517
3517
  }));
3518
- let disableStackTrace = (_options$disableStack2 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack2 : schema6.spec.disableStackTrace;
3519
- return new Promise((resolve, reject) => schema6._validate(value, options, (error, parsed) => {
3518
+ let disableStackTrace = (_options$disableStack2 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack2 : schema9.spec.disableStackTrace;
3519
+ return new Promise((resolve, reject) => schema9._validate(value, options, (error, parsed) => {
3520
3520
  if (ValidationError.isError(error))
3521
3521
  error.value = parsed;
3522
3522
  reject(error);
@@ -3529,12 +3529,12 @@ attempted value: ${formattedValue}
3529
3529
  }
3530
3530
  validateSync(value, options) {
3531
3531
  var _options$disableStack3;
3532
- let schema6 = this.resolve(Object.assign({}, options, {
3532
+ let schema9 = this.resolve(Object.assign({}, options, {
3533
3533
  value
3534
3534
  }));
3535
3535
  let result;
3536
- let disableStackTrace = (_options$disableStack3 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack3 : schema6.spec.disableStackTrace;
3537
- schema6._validate(value, Object.assign({}, options, {
3536
+ let disableStackTrace = (_options$disableStack3 = options == null ? void 0 : options.disableStackTrace) != null ? _options$disableStack3 : schema9.spec.disableStackTrace;
3537
+ schema9._validate(value, Object.assign({}, options, {
3538
3538
  sync: true
3539
3539
  }), (error, parsed) => {
3540
3540
  if (ValidationError.isError(error))
@@ -3572,8 +3572,8 @@ attempted value: ${formattedValue}
3572
3572
  return typeof defaultValue === "function" ? defaultValue.call(this, options) : clone(defaultValue);
3573
3573
  }
3574
3574
  getDefault(options) {
3575
- let schema6 = this.resolve(options || {});
3576
- return schema6._getDefault(options);
3575
+ let schema9 = this.resolve(options || {});
3576
+ return schema9._getDefault(options);
3577
3577
  }
3578
3578
  default(def) {
3579
3579
  if (arguments.length === 0) {
@@ -3815,13 +3815,13 @@ attempted value: ${formattedValue}
3815
3815
  return description;
3816
3816
  }
3817
3817
  get ["~standard"]() {
3818
- const schema6 = this;
3818
+ const schema9 = this;
3819
3819
  const standard = {
3820
3820
  version: 1,
3821
3821
  vendor: "yup",
3822
3822
  async validate(value) {
3823
3823
  try {
3824
- const result = await schema6.validate(value, {
3824
+ const result = await schema9.validate(value, {
3825
3825
  abortEarly: false
3826
3826
  });
3827
3827
  return {
@@ -3846,9 +3846,9 @@ for (const method of ["validate", "validateSync"])
3846
3846
  const {
3847
3847
  parent,
3848
3848
  parentPath,
3849
- schema: schema6
3849
+ schema: schema9
3850
3850
  } = getIn(this, path, value, options.context);
3851
- return schema6[method](parent && parent[parentPath], Object.assign({}, options, {
3851
+ return schema9[method](parent && parent[parentPath], Object.assign({}, options, {
3852
3852
  parent,
3853
3853
  path
3854
3854
  }));
@@ -4034,7 +4034,7 @@ var StringSchema = class extends Schema {
4034
4034
  });
4035
4035
  }
4036
4036
  required(message) {
4037
- return super.required(message).withMutation((schema6) => schema6.test({
4037
+ return super.required(message).withMutation((schema9) => schema9.test({
4038
4038
  message: message || mixed.required,
4039
4039
  name: "required",
4040
4040
  skipAbsent: true,
@@ -4042,9 +4042,9 @@ var StringSchema = class extends Schema {
4042
4042
  }));
4043
4043
  }
4044
4044
  notRequired() {
4045
- return super.notRequired().withMutation((schema6) => {
4046
- schema6.tests = schema6.tests.filter((t) => t.OPTIONS.name !== "required");
4047
- return schema6;
4045
+ return super.notRequired().withMutation((schema9) => {
4046
+ schema9.tests = schema9.tests.filter((t) => t.OPTIONS.name !== "required");
4047
+ return schema9;
4048
4048
  });
4049
4049
  }
4050
4050
  length(length, message = string.length) {
@@ -4437,7 +4437,7 @@ function sortByKeyOrder(keys) {
4437
4437
  return findIndex(keys, a) - findIndex(keys, b);
4438
4438
  };
4439
4439
  }
4440
- var parseJson = (value, _, schema6) => {
4440
+ var parseJson = (value, _, schema9) => {
4441
4441
  if (typeof value !== "string") {
4442
4442
  return value;
4443
4443
  }
@@ -4446,31 +4446,31 @@ var parseJson = (value, _, schema6) => {
4446
4446
  parsed = JSON.parse(value);
4447
4447
  } catch (err) {
4448
4448
  }
4449
- return schema6.isType(parsed) ? parsed : value;
4449
+ return schema9.isType(parsed) ? parsed : value;
4450
4450
  };
4451
- function deepPartial(schema6) {
4452
- if ("fields" in schema6) {
4451
+ function deepPartial(schema9) {
4452
+ if ("fields" in schema9) {
4453
4453
  const partial = {};
4454
- for (const [key2, fieldSchema] of Object.entries(schema6.fields)) {
4454
+ for (const [key2, fieldSchema] of Object.entries(schema9.fields)) {
4455
4455
  partial[key2] = deepPartial(fieldSchema);
4456
4456
  }
4457
- return schema6.setFields(partial);
4457
+ return schema9.setFields(partial);
4458
4458
  }
4459
- if (schema6.type === "array") {
4460
- const nextArray = schema6.optional();
4459
+ if (schema9.type === "array") {
4460
+ const nextArray = schema9.optional();
4461
4461
  if (nextArray.innerType)
4462
4462
  nextArray.innerType = deepPartial(nextArray.innerType);
4463
4463
  return nextArray;
4464
4464
  }
4465
- if (schema6.type === "tuple") {
4466
- return schema6.optional().clone({
4467
- types: schema6.spec.types.map(deepPartial)
4465
+ if (schema9.type === "tuple") {
4466
+ return schema9.optional().clone({
4467
+ types: schema9.spec.types.map(deepPartial)
4468
4468
  });
4469
4469
  }
4470
- if ("optional" in schema6) {
4471
- return schema6.optional();
4470
+ if ("optional" in schema9) {
4471
+ return schema9.optional();
4472
4472
  }
4473
- return schema6;
4473
+ return schema9;
4474
4474
  }
4475
4475
  var deepHas = (obj, p) => {
4476
4476
  const path = [...(0, import_property_expr.normalizePath)(p)];
@@ -4604,8 +4604,8 @@ var ObjectSchema = class extends Schema {
4604
4604
  next._sortErrors = this._sortErrors;
4605
4605
  return next;
4606
4606
  }
4607
- concat(schema6) {
4608
- let next = super.concat(schema6);
4607
+ concat(schema9) {
4608
+ let next = super.concat(schema9);
4609
4609
  let nextFields = next.fields;
4610
4610
  for (let [field, schemaOrRef] of Object.entries(this.fields)) {
4611
4611
  const target = nextFields[field];
@@ -4613,7 +4613,7 @@ var ObjectSchema = class extends Schema {
4613
4613
  }
4614
4614
  return next.withMutation((s) => (
4615
4615
  // XXX: excludes here is wrong
4616
- s.setFields(nextFields, [...this._excludedEdges, ...schema6._excludedEdges])
4616
+ s.setFields(nextFields, [...this._excludedEdges, ...schema9._excludedEdges])
4617
4617
  ));
4618
4618
  }
4619
4619
  _getDefault(options) {
@@ -4660,8 +4660,8 @@ var ObjectSchema = class extends Schema {
4660
4660
  }
4661
4661
  partial() {
4662
4662
  const partial = {};
4663
- for (const [key2, schema6] of Object.entries(this.fields)) {
4664
- partial[key2] = "optional" in schema6 && schema6.optional instanceof Function ? schema6.optional() : schema6;
4663
+ for (const [key2, schema9] of Object.entries(this.fields)) {
4664
+ partial[key2] = "optional" in schema9 && schema9.optional instanceof Function ? schema9.optional() : schema9;
4665
4665
  }
4666
4666
  return this.setFields(partial);
4667
4667
  }
@@ -4871,23 +4871,23 @@ var ArraySchema = class extends Schema {
4871
4871
  json() {
4872
4872
  return this.transform(parseJson);
4873
4873
  }
4874
- concat(schema6) {
4875
- let next = super.concat(schema6);
4874
+ concat(schema9) {
4875
+ let next = super.concat(schema9);
4876
4876
  next.innerType = this.innerType;
4877
- if (schema6.innerType)
4877
+ if (schema9.innerType)
4878
4878
  next.innerType = next.innerType ? (
4879
4879
  // @ts-expect-error Lazy doesn't have concat and will break
4880
- next.innerType.concat(schema6.innerType)
4881
- ) : schema6.innerType;
4880
+ next.innerType.concat(schema9.innerType)
4881
+ ) : schema9.innerType;
4882
4882
  return next;
4883
4883
  }
4884
- of(schema6) {
4884
+ of(schema9) {
4885
4885
  let next = this.clone();
4886
- if (!isSchema(schema6))
4887
- throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: " + printValue(schema6));
4888
- next.innerType = schema6;
4886
+ if (!isSchema(schema9))
4887
+ throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: " + printValue(schema9));
4888
+ next.innerType = schema9;
4889
4889
  next.spec = Object.assign({}, next.spec, {
4890
- types: schema6
4890
+ types: schema9
4891
4891
  });
4892
4892
  return next;
4893
4893
  }
@@ -5037,7 +5037,7 @@ var TupleSchema = class extends Schema {
5037
5037
  describe(options) {
5038
5038
  const next = (options ? this.resolve(options) : this).clone();
5039
5039
  const base = super.describe(options);
5040
- base.innerType = next.spec.types.map((schema6, index) => {
5040
+ base.innerType = next.spec.types.map((schema9, index) => {
5041
5041
  var _innerOptions;
5042
5042
  let innerOptions = options;
5043
5043
  if ((_innerOptions = innerOptions) != null && _innerOptions.value) {
@@ -5046,7 +5046,7 @@ var TupleSchema = class extends Schema {
5046
5046
  value: innerOptions.value[index]
5047
5047
  });
5048
5048
  }
5049
- return schema6.describe(innerOptions);
5049
+ return schema9.describe(innerOptions);
5050
5050
  });
5051
5051
  return base;
5052
5052
  }
@@ -5054,23 +5054,23 @@ var TupleSchema = class extends Schema {
5054
5054
  create$1.prototype = TupleSchema.prototype;
5055
5055
 
5056
5056
  // src/AlterarSenha/index.tsx
5057
- import InfoOutlined from "@mui/icons-material/InfoOutlined";
5058
- import { Alert as Alert3, Box as Box17, Divider as Divider3, Grid, Typography as Typography20 } from "@mui/material";
5059
- import { useState as useState17 } from "react";
5057
+ import InfoOutlined2 from "@mui/icons-material/InfoOutlined";
5058
+ import { Alert as Alert8, Box as Box23, Divider as Divider5, Grid as Grid2, Typography as Typography28 } from "@mui/material";
5059
+ import { useState as useState25 } from "react";
5060
5060
  import {
5061
- useCredentials,
5062
- useForm,
5063
- useValidations
5061
+ useCredentials as useCredentials2,
5062
+ useForm as useForm3,
5063
+ useValidations as useValidations4
5064
5064
  } from "@data-c/hooks";
5065
- import { isAxiosError } from "axios";
5066
- import { useEffect as useEffect15 } from "react";
5067
- import isStrongPassword from "validator/lib/isStrongPassword";
5065
+ import { isAxiosError as isAxiosError3 } from "axios";
5066
+ import { useEffect as useEffect19 } from "react";
5067
+ import isStrongPassword2 from "validator/lib/isStrongPassword";
5068
5068
 
5069
5069
  // src/PasswordTextField/index.tsx
5070
5070
  import Visibility from "@mui/icons-material/Visibility";
5071
5071
  import VisibilityOff from "@mui/icons-material/VisibilityOff";
5072
- import { IconButton as IconButton13, InputAdornment as InputAdornment4 } from "@mui/material";
5073
- import { useState as useState16 } from "react";
5072
+ import { IconButton as IconButton14, InputAdornment as InputAdornment4 } from "@mui/material";
5073
+ import { useState as useState24 } from "react";
5074
5074
 
5075
5075
  // src/v2/Header/HeaderContent.tsx
5076
5076
  import { Stack as Stack9 } from "@mui/material";
@@ -10281,181 +10281,1477 @@ var CurrencyTextField = forwardRef2(
10281
10281
  );
10282
10282
  var CurrencyTextField_default = CurrencyTextField;
10283
10283
 
10284
- // src/PasswordTextField/index.tsx
10284
+ // src/v2/Auth/index.tsx
10285
+ import { Stack as Stack46, Typography as Typography26, useMediaQuery as useMediaQuery7, useTheme as useTheme12 } from "@mui/material";
10286
+
10287
+ // src/v2/Auth/components/BannerSection/index.tsx
10288
+ import { Stack as Stack39, useMediaQuery as useMediaQuery4, useTheme as useTheme8 } from "@mui/material";
10285
10289
  import { jsx as jsx152 } from "react/jsx-runtime";
10286
- function PasswordTextField(props) {
10287
- const { name, label, value, onChange, onKeyDown, ...rest } = props;
10288
- const [showPassword, setShowPassword] = useState16(false);
10289
- function handleClickShowPassword() {
10290
- setShowPassword(!showPassword);
10291
- }
10290
+ function BannerSection2(props) {
10291
+ const { children } = props;
10292
+ const theme2 = useTheme8();
10293
+ const fullScreen = useMediaQuery4(theme2.breakpoints.up("md"));
10292
10294
  return /* @__PURE__ */ jsx152(
10293
- TextField5,
10295
+ Stack39,
10294
10296
  {
10295
- name,
10296
- label,
10297
- value: value || "",
10298
- onChange,
10299
- onKeyDown,
10300
- type: showPassword ? "text" : "password",
10301
- slotProps: {
10302
- input: {
10303
- endAdornment: /* @__PURE__ */ jsx152(InputAdornment4, { position: "end", children: /* @__PURE__ */ jsx152(
10304
- IconButton13,
10305
- {
10306
- tabIndex: -1,
10307
- onClick: handleClickShowPassword,
10308
- edge: "end",
10309
- children: showPassword ? /* @__PURE__ */ jsx152(VisibilityOff, {}) : /* @__PURE__ */ jsx152(Visibility, {})
10310
- }
10311
- ) })
10312
- }
10297
+ component: "section",
10298
+ display: fullScreen ? "flex" : "none",
10299
+ width: "100%",
10300
+ direction: "row",
10301
+ justifyContent: "center",
10302
+ alignItems: "center",
10303
+ sx: {
10304
+ // backgroundImage: `url(${backgroundLoginImage})`,
10305
+ // backgroundSize: 'cover',
10306
+ // backgroundPosition: 'right',
10307
+ // backgroundRepeat: 'no-repeat',
10313
10308
  },
10314
- ...rest
10309
+ children
10315
10310
  }
10316
10311
  );
10317
10312
  }
10318
10313
 
10319
- // src/AlterarSenha/components/ValidatorMessage/index.tsx
10320
- import Circle3 from "@mui/icons-material/Circle";
10321
- import { Box as Box16, Typography as Typography19, useTheme as useTheme8 } from "@mui/material";
10314
+ // src/v2/Auth/components/DefaultBanner/index.tsx
10315
+ import ArrowRight from "@mui/icons-material/ArrowRight";
10316
+ import { Link, Stack as Stack40, Typography as Typography19, useMediaQuery as useMediaQuery5, useTheme as useTheme9 } from "@mui/material";
10322
10317
  import { jsx as jsx153, jsxs as jsxs67 } from "react/jsx-runtime";
10323
- function ValidatorMessage(props) {
10324
- const { isValid, message } = props;
10325
- const theme2 = useTheme8();
10326
- return /* @__PURE__ */ jsxs67(
10327
- Box16,
10318
+ function DefaultBanner() {
10319
+ const theme2 = useTheme9();
10320
+ const fullScreen = useMediaQuery5(theme2.breakpoints.up("md"));
10321
+ return /* @__PURE__ */ jsx153(
10322
+ Stack40,
10328
10323
  {
10324
+ component: "section",
10325
+ display: fullScreen ? "flex" : "none",
10326
+ width: "100%",
10327
+ direction: "row",
10328
+ justifyContent: "center",
10329
+ alignItems: "center",
10329
10330
  sx: {
10330
- display: "flex",
10331
- flexDirection: "row",
10332
- alignItems: "center"
10331
+ backgroundImage: `url(https://datac-site-assets.s3.sa-east-1.amazonaws.com/background_login.png)`,
10332
+ backgroundSize: "cover",
10333
+ backgroundPosition: "right",
10334
+ backgroundRepeat: "no-repeat"
10333
10335
  },
10334
- children: [
10336
+ children: /* @__PURE__ */ jsxs67(Stack40, { padding: "2rem", children: [
10335
10337
  /* @__PURE__ */ jsx153(
10336
- Circle3,
10338
+ Typography19,
10337
10339
  {
10338
- color: isValid ? "success" : "inherit",
10339
- sx: { fontSize: "8pt" }
10340
+ component: "h1",
10341
+ fontSize: "3.5rem",
10342
+ lineHeight: "4rem",
10343
+ fontWeight: "bold",
10344
+ color: "white",
10345
+ fontFamily: "Montserrat",
10346
+ letterSpacing: 0,
10347
+ children: "Inova\xE7\xE3o e tecnologia"
10340
10348
  }
10341
10349
  ),
10342
10350
  /* @__PURE__ */ jsx153(
10343
10351
  Typography19,
10344
10352
  {
10345
- variant: "body2",
10353
+ component: "h2",
10354
+ color: "white",
10355
+ fontSize: "2.5rem",
10356
+ lineHeight: "3rem",
10357
+ letterSpacing: 0,
10358
+ fontWeight: "bold",
10359
+ fontFamily: "Montserrat",
10360
+ children: "para empresas de resultado"
10361
+ }
10362
+ ),
10363
+ /* @__PURE__ */ jsx153(
10364
+ Typography19,
10365
+ {
10366
+ component: "span",
10367
+ fontSize: "1.25rem",
10368
+ lineHeight: "1.25rem",
10369
+ fontWeight: "300",
10370
+ letterSpacing: 0,
10371
+ marginTop: "1.5rem",
10372
+ marginBottom: "3rem",
10373
+ fontFamily: "Montserrat",
10374
+ sx: { color: "rgb(68, 167, 255)" },
10375
+ children: "Mais de 30 anos de exist\xEAncia e muitas hist\xF3rias de sucesso."
10376
+ }
10377
+ ),
10378
+ /* @__PURE__ */ jsx153(Link, { href: "https://site.datac.com.br/services/", target: "_blank", children: /* @__PURE__ */ jsxs67(
10379
+ Button_default,
10380
+ {
10381
+ component: "a",
10382
+ variant: "text",
10346
10383
  sx: {
10347
- color: isValid ? theme2.palette.success.main : "inherit",
10348
- textDecoration: isValid ? "line-through" : "none",
10349
- ml: 1,
10350
- fontSize: "10pt"
10384
+ width: "fit-content",
10385
+ color: "rgb(255, 255, 255)",
10386
+ fontWeight: "400",
10387
+ fontSize: "0.875rem",
10388
+ lineHeight: "1.125rem",
10389
+ fontFamily: "Montserrat",
10390
+ backgroundColor: "rgb(22, 23, 101)",
10391
+ borderRadius: "30px",
10392
+ padding: "17px 48px",
10393
+ ":hover": {
10394
+ backgroundColor: "rgb(255, 255, 255)",
10395
+ color: "rgb(22, 23, 101)"
10396
+ },
10397
+ alignItems: "center"
10351
10398
  },
10352
- children: message
10399
+ children: [
10400
+ "Conhe\xE7a nossos produtos",
10401
+ /* @__PURE__ */ jsx153(
10402
+ ArrowRight,
10403
+ {
10404
+ fontSize: "medium",
10405
+ sx: { color: (theme3) => theme3.palette.success.light }
10406
+ }
10407
+ )
10408
+ ]
10353
10409
  }
10354
- )
10355
- ]
10410
+ ) })
10411
+ ] })
10356
10412
  }
10357
10413
  );
10358
10414
  }
10359
10415
 
10360
- // src/AlterarSenha/index.tsx
10361
- import { jsx as jsx154, jsxs as jsxs68 } from "react/jsx-runtime";
10362
- var defaultData = {
10363
- senhaAtual: "",
10364
- senhaNova: "",
10365
- senhaNovaConfirmar: ""
10366
- };
10416
+ // src/v2/Auth/components/LoginSection/index.tsx
10417
+ import { Box as Box21, Stack as Stack45, useMediaQuery as useMediaQuery6, useTheme as useTheme11 } from "@mui/material";
10418
+
10419
+ // src/v2/Auth/components/EsqueciSenhaForm/index.tsx
10420
+ import { useState as useState16 } from "react";
10421
+ import { Alert as Alert3, Box as Box16, TextField as TextField6 } from "@mui/material";
10422
+ import { useValidations } from "@data-c/hooks";
10423
+
10424
+ // src/v2/Auth/context/CredentialsContext.tsx
10425
+ import { useCredentials } from "@data-c/hooks";
10426
+ import { createContext as createContext5, useContext as useContext6 } from "react";
10427
+ import { jsx as jsx154 } from "react/jsx-runtime";
10428
+ var CredentialsContext = createContext5(
10429
+ void 0
10430
+ );
10431
+ function CredentialsProvider({
10432
+ children,
10433
+ credentialsConfig
10434
+ }) {
10435
+ const credentials = useCredentials(credentialsConfig);
10436
+ return /* @__PURE__ */ jsx154(
10437
+ CredentialsContext.Provider,
10438
+ {
10439
+ value: credentials,
10440
+ children
10441
+ }
10442
+ );
10443
+ }
10444
+ function useCredentialsContext() {
10445
+ const context = useContext6(CredentialsContext);
10446
+ if (context === void 0) {
10447
+ throw new Error(
10448
+ "useCredentialsContext must be used within a CredentialsProvider"
10449
+ );
10450
+ }
10451
+ return context;
10452
+ }
10453
+
10454
+ // src/v2/Auth/components/EsqueciSenhaForm/index.tsx
10455
+ import { jsx as jsx155, jsxs as jsxs68 } from "react/jsx-runtime";
10367
10456
  var schema = create$3().shape({
10368
- senhaAtual: create$6().required("Informe a Senha Atual."),
10369
- senhaNova: create$6().required("Informe a Nova Senha."),
10370
- senhaNovaConfirmar: create$6().required("Informe a Nova Senha.").oneOf([create$9("senhaNova")], "As senhas devem ser iguais.")
10457
+ email: create$6().required("Informe o e-mail")
10371
10458
  });
10372
- function AlterarSenha(props) {
10373
- const {
10374
- isOpen,
10375
- credentialsConfig,
10376
- onClose,
10377
- onSuccess,
10378
- onFailed,
10379
- primeiroAcesso,
10380
- senhaAtual,
10381
- email
10382
- } = props;
10383
- const { alterarSenha, isSubmitting } = useCredentials(credentialsConfig);
10384
- const { setValidationErrors, validationProps } = useValidations();
10385
- const { data, handleChange, setData, changeValue } = useForm(defaultData);
10386
- const [ehSegura, setEhSegura] = useState17(false);
10387
- const [error, setError] = useState17(null);
10388
- useEffect15(() => {
10389
- if (senhaAtual) {
10390
- changeValue("senhaAtual", senhaAtual);
10391
- }
10392
- }, [senhaAtual]);
10393
- useEffect15(() => {
10394
- if (data.senhaNova) {
10395
- setEhSegura(
10396
- isStrongPassword(data.senhaNova, {
10397
- minLength: 8,
10398
- minLowercase: 1,
10399
- minUppercase: 1,
10400
- minNumbers: 1,
10401
- minSymbols: 1
10402
- })
10403
- );
10404
- }
10405
- }, [data.senhaNova]);
10406
- async function handleAlterarSenha() {
10459
+ function EsqueciSenhaForm(props) {
10460
+ const { onLoginClick } = props;
10461
+ const [email, setEmail] = useState16("");
10462
+ const [isSubmitting, setSubmitting] = useState16(false);
10463
+ const [sucessoRecuperarSenha, setSucessoRecuperarSenha] = useState16(false);
10464
+ const [error, setError] = useState16(null);
10465
+ const { recuperarSenha } = useCredentialsContext();
10466
+ const { validationProps, setValidationErrors } = useValidations();
10467
+ async function handleRecuperarSenha() {
10407
10468
  setValidationErrors(null);
10408
- setError(null);
10409
- schema.validate(data, { abortEarly: false }).then(async () => {
10410
- const { senhaAtual: senhaAtual2, senhaNova } = data;
10469
+ schema.validate({ email }, { abortEarly: false }).then(async () => {
10411
10470
  try {
10412
- const response = await alterarSenha(senhaAtual2, senhaNova, email);
10413
- if (response) {
10414
- if (onSuccess)
10415
- onSuccess();
10416
- setData(defaultData);
10417
- }
10471
+ setSubmitting(true);
10472
+ await recuperarSenha(email);
10473
+ setSucessoRecuperarSenha(true);
10418
10474
  } catch (error2) {
10419
- if (onFailed)
10420
- onFailed(error2);
10421
- if (isAxiosError(error2)) {
10422
- setError(error2.response?.data.message);
10423
- return;
10424
- }
10425
- setError("Ocorreu um erro ao tentar alterar a senha");
10475
+ setError(error2.response?.data.message);
10476
+ } finally {
10477
+ setSubmitting(false);
10426
10478
  }
10427
10479
  }).catch((error2) => {
10428
- console.log("Erros por campo:", error2.inner);
10429
- console.log("Primeiro erro:", error2.errors);
10430
10480
  setValidationErrors(error2);
10431
10481
  });
10432
10482
  }
10433
- function tem8caracteres() {
10434
- return data?.senhaNova.length >= 8;
10435
- }
10436
- function temLetraMinuscula() {
10437
- if (data?.senhaNova) {
10438
- const result = data?.senhaNova.match(/[a-z]/g);
10439
- return Array.isArray(result) && result.length > 0;
10440
- }
10441
- return false;
10442
- }
10443
- function temLetraMaisucula() {
10444
- if (data?.senhaNova) {
10445
- const result = data?.senhaNova.match(/[A-Z]/g);
10446
- return Array.isArray(result) && result.length > 0;
10447
- }
10448
- return false;
10449
- }
10450
- function temNumero() {
10451
- if (data?.senhaNova) {
10452
- const result = data?.senhaNova.match(/\d/g);
10453
- return Array.isArray(result) && result.length > 0;
10454
- }
10455
- return false;
10456
- }
10457
- function temCaracterEspecial() {
10458
- if (data?.senhaNova) {
10483
+ return /* @__PURE__ */ jsxs68(Box16, { component: "form", children: [
10484
+ /* @__PURE__ */ jsx155(
10485
+ TextField6,
10486
+ {
10487
+ name: "email",
10488
+ label: "E-mail",
10489
+ margin: "normal",
10490
+ placeholder: "Informe o e-mail utilizado para acessar o sistema",
10491
+ autoFocus: true,
10492
+ value: email || "",
10493
+ onChange: (e) => setEmail(e.target.value),
10494
+ ...validationProps("email")
10495
+ }
10496
+ ),
10497
+ /* @__PURE__ */ jsx155(
10498
+ Button_default,
10499
+ {
10500
+ fullWidth: true,
10501
+ variant: "contained",
10502
+ onClick: handleRecuperarSenha,
10503
+ isLoading: isSubmitting,
10504
+ children: "Recuperar minha senha"
10505
+ }
10506
+ ),
10507
+ /* @__PURE__ */ jsx155(
10508
+ ButtonContainer,
10509
+ {
10510
+ sx: {
10511
+ display: "inline-flex",
10512
+ justifyContent: "space-between",
10513
+ width: "100%",
10514
+ marginTop: 1
10515
+ },
10516
+ children: /* @__PURE__ */ jsx155(
10517
+ Button_default,
10518
+ {
10519
+ onClick: onLoginClick,
10520
+ variant: "text",
10521
+ sx: {
10522
+ fontWeight: "400",
10523
+ ":hover": {
10524
+ color: (theme2) => theme2.palette.primary.dark
10525
+ }
10526
+ },
10527
+ children: "Voltar para o Login"
10528
+ }
10529
+ )
10530
+ }
10531
+ ),
10532
+ sucessoRecuperarSenha && /* @__PURE__ */ jsx155(
10533
+ Alert3,
10534
+ {
10535
+ severity: "success",
10536
+ action: /* @__PURE__ */ jsx155(
10537
+ Button_default,
10538
+ {
10539
+ onClick: onLoginClick,
10540
+ variant: "text",
10541
+ sx: {
10542
+ fontWeight: "400",
10543
+ ":hover": {
10544
+ color: (theme2) => theme2.palette.primary.dark
10545
+ }
10546
+ },
10547
+ children: "Ir para o Login"
10548
+ }
10549
+ ),
10550
+ children: "Enviamos para o seu e-mail as instru\xE7\xF5es para recuperar a sua senha"
10551
+ }
10552
+ ),
10553
+ error && /* @__PURE__ */ jsx155(Alert3, { severity: "error", children: error })
10554
+ ] });
10555
+ }
10556
+
10557
+ // src/v2/Auth/components/Header/index.tsx
10558
+ import { Stack as Stack41, Typography as Typography20 } from "@mui/material";
10559
+ import { jsx as jsx156, jsxs as jsxs69 } from "react/jsx-runtime";
10560
+ function Header3(props) {
10561
+ const { label, subTitle = "Acesse sua conta" } = props;
10562
+ return /* @__PURE__ */ jsxs69(Stack41, { component: "header", textAlign: "center", marginBottom: "3rem", children: [
10563
+ /* @__PURE__ */ jsx156(
10564
+ Typography20,
10565
+ {
10566
+ component: "h2",
10567
+ fontSize: "2rem",
10568
+ fontWeight: "bold",
10569
+ variant: "body1",
10570
+ fontFamily: "Montserrat",
10571
+ sx: { color: (theme2) => theme2.palette.primary.dark },
10572
+ children: label
10573
+ }
10574
+ ),
10575
+ /* @__PURE__ */ jsx156(
10576
+ Typography20,
10577
+ {
10578
+ component: "h3",
10579
+ fontSize: "1.25rem",
10580
+ fontFamily: "Montserrat",
10581
+ color: "primary",
10582
+ variant: "body1",
10583
+ children: subTitle
10584
+ }
10585
+ )
10586
+ ] });
10587
+ }
10588
+
10589
+ // src/v2/Auth/components/LicencaForm/index.tsx
10590
+ import { Box as Box17, MenuItem as MenuItem6, TextField as TextField7 } from "@mui/material";
10591
+ import { useEffect as useEffect15, useState as useState17 } from "react";
10592
+ import { jsx as jsx157, jsxs as jsxs70 } from "react/jsx-runtime";
10593
+ function LicencaForm(props) {
10594
+ const { loginData, onLoginFailed, onLoginSuccess } = props;
10595
+ const [empresaId, setEmpresaId] = useState17("");
10596
+ const { selecionarLicenca, isSubmitting } = useCredentialsContext();
10597
+ useEffect15(() => {
10598
+ if (Array.isArray(loginData?.empresas)) {
10599
+ const empresa = loginData?.empresas[0];
10600
+ setEmpresaId(empresa?.uuid);
10601
+ }
10602
+ }, [loginData]);
10603
+ async function handleSelecionarLicenca() {
10604
+ try {
10605
+ const tokens = await selecionarLicenca(loginData?.token, empresaId);
10606
+ if (tokens) {
10607
+ onLoginSuccess(tokens);
10608
+ } else {
10609
+ onLoginFailed("Nenhuma token definida");
10610
+ }
10611
+ } catch (err) {
10612
+ onLoginFailed(err);
10613
+ }
10614
+ }
10615
+ return /* @__PURE__ */ jsxs70(Box17, { component: "form", sx: { minWidth: "290px" }, children: [
10616
+ /* @__PURE__ */ jsx157(
10617
+ TextField7,
10618
+ {
10619
+ label: "Licen\xE7as",
10620
+ margin: "normal",
10621
+ select: true,
10622
+ autoFocus: true,
10623
+ value: empresaId,
10624
+ onChange: (e) => {
10625
+ setEmpresaId(e.target.value);
10626
+ },
10627
+ children: loginData?.empresas?.map((empresa) => /* @__PURE__ */ jsx157(MenuItem6, { value: empresa.uuid, children: empresa.nome }, empresa.uuid))
10628
+ }
10629
+ ),
10630
+ /* @__PURE__ */ jsx157(
10631
+ Button_default,
10632
+ {
10633
+ fullWidth: true,
10634
+ variant: "contained",
10635
+ onClick: handleSelecionarLicenca,
10636
+ isLoading: isSubmitting,
10637
+ sx: { mt: 1 },
10638
+ children: "Confirmar"
10639
+ }
10640
+ )
10641
+ ] });
10642
+ }
10643
+
10644
+ // src/v2/Auth/components/LoginForm/index.tsx
10645
+ import { useState as useState19 } from "react";
10646
+ import { useValidations as useValidations3 } from "@data-c/hooks";
10647
+ import { Alert as Alert5, Divider as Divider4, Stack as Stack42, TextField as TextField8, Typography as Typography23 } from "@mui/material";
10648
+ import { isAxiosError as isAxiosError2 } from "axios";
10649
+ import Mail from "@mui/icons-material/Mail";
10650
+ import WhatsApp from "@mui/icons-material/WhatsApp";
10651
+
10652
+ // src/v2/Auth/components/AlterarSenhaV2/index.tsx
10653
+ import InfoOutlined from "@mui/icons-material/InfoOutlined";
10654
+ import { Alert as Alert4, Box as Box19, Divider as Divider3, Grid, Typography as Typography22 } from "@mui/material";
10655
+ import { useState as useState18 } from "react";
10656
+ import { useForm, useValidations as useValidations2 } from "@data-c/hooks";
10657
+ import { isAxiosError } from "axios";
10658
+ import { useEffect as useEffect16 } from "react";
10659
+ import isStrongPassword from "validator/lib/isStrongPassword";
10660
+
10661
+ // src/v2/Auth/components/AlterarSenhaV2/components/ValidatorMessage/index.tsx
10662
+ import Circle3 from "@mui/icons-material/Circle";
10663
+ import { Box as Box18, Typography as Typography21, useTheme as useTheme10 } from "@mui/material";
10664
+ import { jsx as jsx158, jsxs as jsxs71 } from "react/jsx-runtime";
10665
+ function ValidatorMessage(props) {
10666
+ const { isValid, message } = props;
10667
+ const theme2 = useTheme10();
10668
+ return /* @__PURE__ */ jsxs71(
10669
+ Box18,
10670
+ {
10671
+ sx: {
10672
+ display: "flex",
10673
+ flexDirection: "row",
10674
+ alignItems: "center"
10675
+ },
10676
+ children: [
10677
+ /* @__PURE__ */ jsx158(
10678
+ Circle3,
10679
+ {
10680
+ color: isValid ? "success" : "inherit",
10681
+ sx: { fontSize: "8pt" }
10682
+ }
10683
+ ),
10684
+ /* @__PURE__ */ jsx158(
10685
+ Typography21,
10686
+ {
10687
+ variant: "body2",
10688
+ sx: {
10689
+ color: isValid ? theme2.palette.success.main : "inherit",
10690
+ textDecoration: isValid ? "line-through" : "none",
10691
+ ml: 1,
10692
+ fontSize: "10pt"
10693
+ },
10694
+ children: message
10695
+ }
10696
+ )
10697
+ ]
10698
+ }
10699
+ );
10700
+ }
10701
+
10702
+ // src/v2/Auth/components/AlterarSenhaV2/index.tsx
10703
+ import { jsx as jsx159, jsxs as jsxs72 } from "react/jsx-runtime";
10704
+ var defaultData = {
10705
+ senhaAtual: "",
10706
+ senhaNova: "",
10707
+ senhaNovaConfirmar: ""
10708
+ };
10709
+ var schema2 = create$3().shape({
10710
+ senhaAtual: create$6().required("Informe a Senha Atual."),
10711
+ senhaNova: create$6().required("Informe a Nova Senha."),
10712
+ senhaNovaConfirmar: create$6().required("Informe a Nova Senha.").oneOf([create$9("senhaNova")], "As senhas devem ser iguais.")
10713
+ });
10714
+ function AlterarSenhaV2(props) {
10715
+ const {
10716
+ isOpen,
10717
+ onClose,
10718
+ onSuccess,
10719
+ onFailed,
10720
+ primeiroAcesso,
10721
+ senhaAtual,
10722
+ email
10723
+ } = props;
10724
+ const { alterarSenha, isSubmitting } = useCredentialsContext();
10725
+ const { setValidationErrors, validationProps } = useValidations2();
10726
+ const { data, handleChange, setData, changeValue } = useForm(defaultData);
10727
+ const [ehSegura, setEhSegura] = useState18(false);
10728
+ const [error, setError] = useState18(null);
10729
+ useEffect16(() => {
10730
+ if (senhaAtual) {
10731
+ changeValue("senhaAtual", senhaAtual);
10732
+ }
10733
+ }, [senhaAtual]);
10734
+ useEffect16(() => {
10735
+ if (data.senhaNova) {
10736
+ setEhSegura(
10737
+ isStrongPassword(data.senhaNova, {
10738
+ minLength: 8,
10739
+ minLowercase: 1,
10740
+ minUppercase: 1,
10741
+ minNumbers: 1,
10742
+ minSymbols: 1
10743
+ })
10744
+ );
10745
+ }
10746
+ }, [data.senhaNova]);
10747
+ async function handleAlterarSenha() {
10748
+ setValidationErrors(null);
10749
+ setError(null);
10750
+ schema2.validate(data, { abortEarly: false }).then(async () => {
10751
+ const { senhaAtual: senhaAtual2, senhaNova } = data;
10752
+ try {
10753
+ const response = await alterarSenha(senhaAtual2, senhaNova, email);
10754
+ if (response) {
10755
+ if (onSuccess)
10756
+ onSuccess();
10757
+ setData(defaultData);
10758
+ }
10759
+ } catch (error2) {
10760
+ if (onFailed)
10761
+ onFailed(error2);
10762
+ if (isAxiosError(error2)) {
10763
+ setError(error2.response?.data.message);
10764
+ return;
10765
+ }
10766
+ setError("Ocorreu um erro ao tentar alterar a senha");
10767
+ }
10768
+ }).catch((error2) => {
10769
+ console.log("Erros por campo:", error2.inner);
10770
+ console.log("Primeiro erro:", error2.errors);
10771
+ setValidationErrors(error2);
10772
+ });
10773
+ }
10774
+ function tem8caracteres() {
10775
+ return data?.senhaNova.length >= 8;
10776
+ }
10777
+ function temLetraMinuscula() {
10778
+ if (data?.senhaNova) {
10779
+ const result = data?.senhaNova.match(/[a-z]/g);
10780
+ return Array.isArray(result) && result.length > 0;
10781
+ }
10782
+ return false;
10783
+ }
10784
+ function temLetraMaisucula() {
10785
+ if (data?.senhaNova) {
10786
+ const result = data?.senhaNova.match(/[A-Z]/g);
10787
+ return Array.isArray(result) && result.length > 0;
10788
+ }
10789
+ return false;
10790
+ }
10791
+ function temNumero() {
10792
+ if (data?.senhaNova) {
10793
+ const result = data?.senhaNova.match(/\d/g);
10794
+ return Array.isArray(result) && result.length > 0;
10795
+ }
10796
+ return false;
10797
+ }
10798
+ function temCaracterEspecial() {
10799
+ if (data?.senhaNova) {
10800
+ const result = data?.senhaNova.match(/\W/g);
10801
+ return Array.isArray(result) && result.length > 0;
10802
+ }
10803
+ return false;
10804
+ }
10805
+ function asSenhasSaoIguais() {
10806
+ if (data?.senhaNova === "")
10807
+ return false;
10808
+ return data?.senhaNova === data?.senhaNovaConfirmar;
10809
+ }
10810
+ return /* @__PURE__ */ jsxs72(Dialog_default.Root, { open: isOpen, onClose: (_) => onClose(), maxWidth: "md", children: [
10811
+ /* @__PURE__ */ jsxs72(Dialog_default.Header, { children: [
10812
+ /* @__PURE__ */ jsx159(Dialog_default.Title, { children: "Alterar Senha" }),
10813
+ /* @__PURE__ */ jsx159(Dialog_default.ActionClose, { onClose })
10814
+ ] }),
10815
+ /* @__PURE__ */ jsx159(Dialog_default.Content, { children: /* @__PURE__ */ jsxs72(Grid, { container: true, spacing: 2, children: [
10816
+ primeiroAcesso && /* @__PURE__ */ jsx159(Grid, { size: 12, children: /* @__PURE__ */ jsxs72(Alert4, { severity: "info", children: [
10817
+ "Voc\xEA est\xE1 acessando o sistema com uma senha tempor\xE1ria.",
10818
+ /* @__PURE__ */ jsx159("br", {}),
10819
+ "Cadastre uma senha segura para deixar sua conta mais protegida."
10820
+ ] }) }),
10821
+ /* @__PURE__ */ jsxs72(Grid, { size: 12, children: [
10822
+ /* @__PURE__ */ jsx159(
10823
+ PasswordTextField,
10824
+ {
10825
+ name: "senhaAtual",
10826
+ label: "Senha Atual",
10827
+ value: data?.senhaAtual || "",
10828
+ onChange: handleChange,
10829
+ ...validationProps("senhaAtual")
10830
+ }
10831
+ ),
10832
+ /* @__PURE__ */ jsxs72(
10833
+ Box19,
10834
+ {
10835
+ sx: { display: "flex", alignItems: "center", gap: 0.5, mt: 0.5 },
10836
+ children: [
10837
+ /* @__PURE__ */ jsx159(InfoOutlined, { sx: { fontSize: 14, color: "text.secondary" } }),
10838
+ /* @__PURE__ */ jsx159(Typography22, { variant: "caption", color: "text.secondary", children: "Essa \xE9 a senha que voc\xEA utiliza para acessar o sistema atualmente." })
10839
+ ]
10840
+ }
10841
+ )
10842
+ ] }),
10843
+ /* @__PURE__ */ jsx159(Grid, { size: 12, children: /* @__PURE__ */ jsx159(Divider3, {}) }),
10844
+ /* @__PURE__ */ jsx159(Grid, { size: 12, children: /* @__PURE__ */ jsx159(
10845
+ PasswordTextField,
10846
+ {
10847
+ name: "senhaNova",
10848
+ label: "Nova Senha",
10849
+ value: data?.senhaNova || "",
10850
+ onChange: handleChange,
10851
+ ...validationProps("senhaNova")
10852
+ }
10853
+ ) }),
10854
+ /* @__PURE__ */ jsxs72(Grid, { size: 12, children: [
10855
+ /* @__PURE__ */ jsx159(
10856
+ PasswordTextField,
10857
+ {
10858
+ name: "senhaNovaConfirmar",
10859
+ label: "Confirmar Nova Senha",
10860
+ value: data?.senhaNovaConfirmar || "",
10861
+ onChange: handleChange,
10862
+ ...validationProps("senhaNovaConfirmar")
10863
+ }
10864
+ ),
10865
+ /* @__PURE__ */ jsxs72(
10866
+ Box19,
10867
+ {
10868
+ sx: { display: "flex", alignItems: "center", gap: 0.5, mt: 0.5 },
10869
+ children: [
10870
+ /* @__PURE__ */ jsx159(InfoOutlined, { sx: { fontSize: 14, color: "text.secondary" } }),
10871
+ /* @__PURE__ */ jsx159(Typography22, { variant: "caption", color: "text.secondary", children: "Informe nos campos acima a nova senha que deseja utilizar." })
10872
+ ]
10873
+ }
10874
+ )
10875
+ ] }),
10876
+ /* @__PURE__ */ jsxs72(Grid, { size: 12, children: [
10877
+ /* @__PURE__ */ jsx159(
10878
+ ValidatorMessage,
10879
+ {
10880
+ isValid: tem8caracteres(),
10881
+ message: "O tamanho m\xEDnimo da nova senha \xE9 de 8 caracteres"
10882
+ }
10883
+ ),
10884
+ /* @__PURE__ */ jsx159(
10885
+ ValidatorMessage,
10886
+ {
10887
+ isValid: temLetraMinuscula(),
10888
+ message: "A nova senha deve ter ao menos uma letra min\xFAscula"
10889
+ }
10890
+ ),
10891
+ /* @__PURE__ */ jsx159(
10892
+ ValidatorMessage,
10893
+ {
10894
+ isValid: temLetraMaisucula(),
10895
+ message: "A nova senha deve ter ao menos uma letra mai\xFAscula"
10896
+ }
10897
+ ),
10898
+ /* @__PURE__ */ jsx159(
10899
+ ValidatorMessage,
10900
+ {
10901
+ isValid: temNumero(),
10902
+ message: "A nova senha deve ter ao menos um n\xFAmero"
10903
+ }
10904
+ ),
10905
+ /* @__PURE__ */ jsx159(
10906
+ ValidatorMessage,
10907
+ {
10908
+ isValid: temCaracterEspecial(),
10909
+ message: "A nova senha deve ter ao menos um caracter especial"
10910
+ }
10911
+ ),
10912
+ /* @__PURE__ */ jsx159(
10913
+ ValidatorMessage,
10914
+ {
10915
+ isValid: asSenhasSaoIguais(),
10916
+ message: "A confirma\xE7\xE3o da nova senha deve ser igual \xE0 nova senha"
10917
+ }
10918
+ )
10919
+ ] }),
10920
+ error && /* @__PURE__ */ jsx159(Grid, { size: 12, children: /* @__PURE__ */ jsx159(Alert4, { severity: "error", children: error }) })
10921
+ ] }) }),
10922
+ /* @__PURE__ */ jsx159(Dialog_default.Footer, { children: /* @__PURE__ */ jsxs72(Dialog_default.Actions, { children: [
10923
+ /* @__PURE__ */ jsx159(Dialog_default.ActionCancelar, { onClick: () => onClose() }),
10924
+ /* @__PURE__ */ jsx159(
10925
+ Dialog_default.ActionSalvar,
10926
+ {
10927
+ label: "Alterar Senha",
10928
+ onClick: handleAlterarSenha,
10929
+ isLoading: isSubmitting,
10930
+ disabled: !ehSegura
10931
+ }
10932
+ )
10933
+ ] }) })
10934
+ ] });
10935
+ }
10936
+
10937
+ // src/v2/Auth/components/LoginForm/index.tsx
10938
+ import { jsx as jsx160, jsxs as jsxs73 } from "react/jsx-runtime";
10939
+ var schema3 = create$3().shape({
10940
+ email: create$6().required("Informe o e-mail"),
10941
+ password: create$6().required("Informe a senha")
10942
+ });
10943
+ function LoginForm(props) {
10944
+ const { onLoginSuccess, onLoginFailed, onOptionsClick } = props;
10945
+ const [email, setEmail] = useState19("");
10946
+ const [password, setPassword] = useState19("");
10947
+ const [isLoading, setLoading] = useState19(false);
10948
+ const [exibirAlterarSenha, setExibirAlterarSenha] = useState19(false);
10949
+ const [sucessoAlterarSenha, setSucessoAlterarSenha] = useState19(false);
10950
+ const [error, setError] = useState19(null);
10951
+ const { login } = useCredentialsContext();
10952
+ const { validationProps, setValidationErrors } = useValidations3();
10953
+ async function handleLogin() {
10954
+ setValidationErrors(null);
10955
+ setError(null);
10956
+ schema3.validate({ email, password }, { abortEarly: false }).then(async () => {
10957
+ setLoading(true);
10958
+ try {
10959
+ const loginResponse = await login(email, password);
10960
+ if (loginResponse) {
10961
+ onLoginSuccess(loginResponse);
10962
+ }
10963
+ } catch (err) {
10964
+ if (isAxiosError2(err)) {
10965
+ const axiosError = err;
10966
+ if (axiosError.response?.data.code === "E_FIRST_ACCESS") {
10967
+ setExibirAlterarSenha(true);
10968
+ return;
10969
+ }
10970
+ setError(err.response?.data.message);
10971
+ }
10972
+ onLoginFailed(err);
10973
+ }
10974
+ }).catch((err) => {
10975
+ setValidationErrors(err);
10976
+ }).finally(() => {
10977
+ setLoading(false);
10978
+ });
10979
+ }
10980
+ return /* @__PURE__ */ jsxs73(Stack42, { component: "form", onSubmit: handleLogin, children: [
10981
+ /* @__PURE__ */ jsxs73(
10982
+ Stack42,
10983
+ {
10984
+ spacing: 2,
10985
+ children: [
10986
+ /* @__PURE__ */ jsx160(
10987
+ TextField8,
10988
+ {
10989
+ name: "email",
10990
+ label: "E-mail",
10991
+ margin: "normal",
10992
+ autoFocus: true,
10993
+ value: email || "",
10994
+ onChange: (e) => setEmail(e.target.value),
10995
+ ...validationProps("email")
10996
+ }
10997
+ ),
10998
+ /* @__PURE__ */ jsx160(
10999
+ PasswordTextField,
11000
+ {
11001
+ name: "password",
11002
+ label: "Senha",
11003
+ value: password || "",
11004
+ onChange: (e) => setPassword(e.target.value),
11005
+ onKeyDown: (e) => e.key === "Enter" && handleLogin(),
11006
+ ...validationProps("password")
11007
+ }
11008
+ ),
11009
+ /* @__PURE__ */ jsx160(
11010
+ Button_default,
11011
+ {
11012
+ fullWidth: true,
11013
+ variant: "contained",
11014
+ onClick: handleLogin,
11015
+ isLoading,
11016
+ sx: { mt: 1 },
11017
+ children: "Entrar"
11018
+ }
11019
+ )
11020
+ ]
11021
+ }
11022
+ ),
11023
+ /* @__PURE__ */ jsx160(
11024
+ Button_default,
11025
+ {
11026
+ onClick: () => onOptionsClick("esqueci-senha"),
11027
+ variant: "text",
11028
+ disableRipple: true,
11029
+ disableTouchRipple: true,
11030
+ sx: {
11031
+ justifyContent: "flex-start",
11032
+ // alinha o conteúdo à esquerda
11033
+ alignContent: "center",
11034
+ alignItems: "center",
11035
+ textAlign: "left",
11036
+ // alinha o texto internamente à esquerda
11037
+ width: "120px",
11038
+ // define uma largura para perceber o alinhamento
11039
+ marginTop: 0.5,
11040
+ fontWeight: "400",
11041
+ ":hover": {
11042
+ // color: (theme) => theme.palette.,
11043
+ }
11044
+ },
11045
+ children: "Esqueci a senha"
11046
+ }
11047
+ ),
11048
+ error && /* @__PURE__ */ jsx160(Alert5, { severity: "error", children: error }),
11049
+ sucessoAlterarSenha && /* @__PURE__ */ jsxs73(Alert5, { severity: "success", children: [
11050
+ "Senha cadastrada com sucesso",
11051
+ /* @__PURE__ */ jsx160("br", {}),
11052
+ "Tudo pronto para voc\xEA fazer o login"
11053
+ ] }),
11054
+ /* @__PURE__ */ jsxs73(
11055
+ Stack42,
11056
+ {
11057
+ direction: "row",
11058
+ justifyContent: "center",
11059
+ alignItems: "center",
11060
+ mt: 2,
11061
+ mb: 2,
11062
+ children: [
11063
+ /* @__PURE__ */ jsx160(Divider4, { sx: { flexGrow: 1, mr: 1 } }),
11064
+ /* @__PURE__ */ jsx160(Typography23, { children: "Ou fa\xE7a login com" }),
11065
+ /* @__PURE__ */ jsx160(Divider4, { sx: { flexGrow: 1, ml: 1 } })
11066
+ ]
11067
+ }
11068
+ ),
11069
+ /* @__PURE__ */ jsxs73(Stack42, { spacing: 1, children: [
11070
+ /* @__PURE__ */ jsx160(
11071
+ Button_default,
11072
+ {
11073
+ onClick: () => onOptionsClick("otp-email"),
11074
+ startIcon: /* @__PURE__ */ jsx160(Mail, {}),
11075
+ children: "Entrar com senha tempor\xE1ria"
11076
+ }
11077
+ ),
11078
+ /* @__PURE__ */ jsx160(
11079
+ Button_default,
11080
+ {
11081
+ onClick: () => onOptionsClick("otp-whatsapp"),
11082
+ startIcon: /* @__PURE__ */ jsx160(WhatsApp, {}),
11083
+ children: "Entrar com senha tempor\xE1ria"
11084
+ }
11085
+ )
11086
+ ] }),
11087
+ /* @__PURE__ */ jsx160(
11088
+ AlterarSenhaV2,
11089
+ {
11090
+ senhaAtual: password,
11091
+ email,
11092
+ primeiroAcesso: true,
11093
+ isOpen: exibirAlterarSenha,
11094
+ onClose: async () => setExibirAlterarSenha(false),
11095
+ onSuccess: () => {
11096
+ setExibirAlterarSenha(false);
11097
+ setSucessoAlterarSenha(true);
11098
+ setPassword("");
11099
+ }
11100
+ }
11101
+ )
11102
+ ] });
11103
+ }
11104
+
11105
+ // src/v2/Auth/components/LoginSection/index.tsx
11106
+ import { useEffect as useEffect18, useState as useState23 } from "react";
11107
+
11108
+ // src/v2/Auth/components/OtpForm/index.tsx
11109
+ import { useForm as useForm2 } from "@data-c/hooks";
11110
+ import HelpOutline from "@mui/icons-material/HelpOutline";
11111
+ import { Alert as Alert7, IconButton as IconButton13, Stack as Stack44, TextField as TextField11, Typography as Typography25 } from "@mui/material";
11112
+ import { useState as useState22 } from "react";
11113
+
11114
+ // src/WhastappTextField/index.tsx
11115
+ import { useState as useState20, useMemo as useMemo10 } from "react";
11116
+ import TextField9 from "@mui/material/TextField";
11117
+ import { jsx as jsx161 } from "react/jsx-runtime";
11118
+ var formatPhone = (value) => {
11119
+ const digits = value.replace(/\D/g, "");
11120
+ if (digits.length <= 2) {
11121
+ return `(${digits}`;
11122
+ }
11123
+ if (digits.length <= 7) {
11124
+ return `(${digits.slice(0, 2)}) ${digits.slice(2)}`;
11125
+ }
11126
+ if (digits.length <= 11) {
11127
+ return `(${digits.slice(0, 2)}) ${digits.slice(2, 7)}-${digits.slice(7)}`;
11128
+ }
11129
+ return `(${digits.slice(0, 2)}) ${digits.slice(2, 7)}-${digits.slice(7, 11)}`;
11130
+ };
11131
+ function WhatsAppTextField(props) {
11132
+ const { value: propValue, onChange: propOnChange, ...rest } = props;
11133
+ const [internalValue, setInternalValue] = useState20("");
11134
+ const isControlled = propValue !== void 0;
11135
+ const displayedValue = useMemo10(() => {
11136
+ return isControlled ? formatPhone(propValue || "") : internalValue;
11137
+ }, [propValue, internalValue, isControlled]);
11138
+ const handleChange = (event) => {
11139
+ const masked = formatPhone(event.target.value);
11140
+ if (!isControlled) {
11141
+ setInternalValue(masked);
11142
+ }
11143
+ if (propOnChange) {
11144
+ const customEvent = {
11145
+ ...event,
11146
+ target: {
11147
+ ...event.target,
11148
+ value: masked
11149
+ }
11150
+ };
11151
+ propOnChange(customEvent);
11152
+ }
11153
+ };
11154
+ return /* @__PURE__ */ jsx161(
11155
+ TextField9,
11156
+ {
11157
+ value: displayedValue,
11158
+ onChange: handleChange,
11159
+ inputProps: { maxLength: 15 },
11160
+ ...rest
11161
+ }
11162
+ );
11163
+ }
11164
+
11165
+ // src/v2/Auth/components/OtpForm/DialogVerificarOtp.tsx
11166
+ import { Alert as Alert6, Stack as Stack43, Typography as Typography24 } from "@mui/material";
11167
+ import { useEffect as useEffect17, useState as useState21 } from "react";
11168
+
11169
+ // src/VerificationCodeInput/index.tsx
11170
+ import { useRef as useRef5 } from "react";
11171
+ import { Box as Box20, TextField as TextField10 } from "@mui/material";
11172
+ import { jsx as jsx162 } from "react/jsx-runtime";
11173
+ function VerificationCodeInput({
11174
+ length = 6,
11175
+ value,
11176
+ onChange
11177
+ }) {
11178
+ const inputsRef = useRef5([]);
11179
+ const handleChange = (index, digit) => {
11180
+ const chars = "ABCDEF0123456789";
11181
+ const cleanDigit = digit.toUpperCase().split("").find((char) => chars.includes(char)) || "";
11182
+ const nextValue = value.split("");
11183
+ nextValue[index] = cleanDigit;
11184
+ const updatedValue = nextValue.join("");
11185
+ onChange(updatedValue);
11186
+ if (cleanDigit && index < length - 1) {
11187
+ inputsRef.current[index + 1]?.focus();
11188
+ }
11189
+ };
11190
+ const handleKeyDown = (index, event) => {
11191
+ if (event.key === "Backspace" && !value[index] && index > 0) {
11192
+ inputsRef.current[index - 1]?.focus();
11193
+ }
11194
+ };
11195
+ return /* @__PURE__ */ jsx162(Box20, { display: "flex", gap: 1, children: Array.from({ length }).map((_, i) => /* @__PURE__ */ jsx162(
11196
+ TextField10,
11197
+ {
11198
+ autoFocus: i === 0,
11199
+ inputRef: (el) => inputsRef.current[i] = el,
11200
+ slotProps: {
11201
+ htmlInput: {
11202
+ maxLength: 1,
11203
+ style: {
11204
+ textAlign: "center",
11205
+ fontSize: "24px",
11206
+ width: "24px",
11207
+ height: "36px"
11208
+ }
11209
+ }
11210
+ },
11211
+ value: value[i] || "",
11212
+ onChange: (e) => handleChange(i, e.target.value),
11213
+ onKeyDown: (e) => handleKeyDown(i, e)
11214
+ },
11215
+ i
11216
+ )) });
11217
+ }
11218
+
11219
+ // src/v2/Auth/components/OtpForm/DialogVerificarOtp.tsx
11220
+ import { jsx as jsx163, jsxs as jsxs74 } from "react/jsx-runtime";
11221
+ function DialogVerificarOtp(props) {
11222
+ const { open, onClose, payload, onLoginSuccess } = props;
11223
+ const [code, setCode] = useState21("");
11224
+ const [error, setError] = useState21(false);
11225
+ const [isLoading, setLoading] = useState21(false);
11226
+ const { validarOtpVerificationCode } = useCredentialsContext();
11227
+ useEffect17(() => {
11228
+ if (error) {
11229
+ setTimeout(() => {
11230
+ setError(false);
11231
+ }, 3e3);
11232
+ }
11233
+ }, [error]);
11234
+ async function handleOtpLogin() {
11235
+ try {
11236
+ setLoading(true);
11237
+ const loginResponse = await validarOtpVerificationCode({
11238
+ channel: payload.channel,
11239
+ target: payload.target,
11240
+ code
11241
+ });
11242
+ if (loginResponse) {
11243
+ onLoginSuccess(loginResponse);
11244
+ }
11245
+ onClose();
11246
+ } catch (err) {
11247
+ setError(err.response.data.message);
11248
+ } finally {
11249
+ setLoading(false);
11250
+ }
11251
+ }
11252
+ return /* @__PURE__ */ jsxs74(Dialog_default.Root, { open, onClose: (_) => onClose(), maxWidth: "xs", children: [
11253
+ /* @__PURE__ */ jsxs74(Dialog_default.Header, { children: [
11254
+ /* @__PURE__ */ jsx163(Dialog_default.Title, { children: "Entrar com senha tempor\xE1ria" }),
11255
+ /* @__PURE__ */ jsx163(Dialog_default.ActionClose, { onClose })
11256
+ ] }),
11257
+ /* @__PURE__ */ jsx163(Dialog_default.Content, { children: /* @__PURE__ */ jsxs74(
11258
+ Stack43,
11259
+ {
11260
+ spacing: 2,
11261
+ justifyContent: "center",
11262
+ alignContent: "center",
11263
+ alignItems: "center",
11264
+ children: [
11265
+ /* @__PURE__ */ jsx163(
11266
+ Typography24,
11267
+ {
11268
+ variant: "subtitle1",
11269
+ sx: { fontWeight: "bolder", fontSize: "11pt" },
11270
+ children: "\u{1F510} Digite a senha tempor\xE1ria para acessar sua conta"
11271
+ }
11272
+ ),
11273
+ /* @__PURE__ */ jsxs74(Typography24, { variant: "body1", sx: { fontSize: "10pt" }, children: [
11274
+ "Enviamos uma senha tempor\xE1ria para ",
11275
+ /* @__PURE__ */ jsx163("b", { children: payload.target }),
11276
+ ". ",
11277
+ /* @__PURE__ */ jsx163("br", {}),
11278
+ "Digite o c\xF3digo abaixo para acessar sua conta."
11279
+ ] }),
11280
+ /* @__PURE__ */ jsx163(
11281
+ VerificationCodeInput,
11282
+ {
11283
+ value: code,
11284
+ onChange: (value) => {
11285
+ setCode(value);
11286
+ }
11287
+ }
11288
+ ),
11289
+ error && /* @__PURE__ */ jsx163(Alert6, { sx: { flexGrow: 1 }, severity: "error", children: error })
11290
+ ]
11291
+ }
11292
+ ) }),
11293
+ /* @__PURE__ */ jsx163(Dialog_default.Footer, { children: /* @__PURE__ */ jsxs74(Dialog_default.Actions, { children: [
11294
+ /* @__PURE__ */ jsx163(Dialog_default.ActionCancelar, { onClick: () => onClose() }),
11295
+ /* @__PURE__ */ jsx163(
11296
+ Dialog_default.ActionSalvar,
11297
+ {
11298
+ label: "Entrar",
11299
+ onClick: handleOtpLogin,
11300
+ isLoading,
11301
+ disabled: code.length != 6
11302
+ }
11303
+ )
11304
+ ] }) })
11305
+ ] });
11306
+ }
11307
+
11308
+ // src/v2/Auth/components/OtpForm/index.tsx
11309
+ import { Fragment as Fragment10, jsx as jsx164, jsxs as jsxs75 } from "react/jsx-runtime";
11310
+ var contatoSchema = create$3().shape({
11311
+ contato: create$6().when("$tipo", ([tipo], schema9) => {
11312
+ return tipo === "otp-email" ? schema9.email("E-mail inv\xE1lido").required("Informe o e-mail") : schema9.matches(/^\+?[1-9]\d{7,14}$/, "N\xFAmero de WhatsApp inv\xE1lido").required("Informe o WhatsApp");
11313
+ })
11314
+ });
11315
+ function OtpForm(props) {
11316
+ const { tipo, onLoginSuccess, onLoginClick } = props;
11317
+ const [isLoading, setLoading] = useState22(false);
11318
+ const [error, setError] = useState22(false);
11319
+ const { gerarOtpVerificationCode } = useCredentialsContext();
11320
+ const { handleChange, changeValue, data, validate, validationErrors } = useForm2({ contato: "" }, contatoSchema);
11321
+ const [isOpenVerificar, setOpenVerificar] = useState22(false);
11322
+ const handleSubmit = async (e) => {
11323
+ e.preventDefault();
11324
+ validate(
11325
+ async (validData) => {
11326
+ try {
11327
+ setError(false);
11328
+ setLoading(true);
11329
+ const usuario = await gerarOtpVerificationCode({
11330
+ channel: tipo === "otp-email" ? "email" : "whatsapp",
11331
+ target: validData.contato
11332
+ });
11333
+ setOpenVerificar(true);
11334
+ } catch (err) {
11335
+ setError(err.response.data.message);
11336
+ } finally {
11337
+ setLoading(false);
11338
+ }
11339
+ },
11340
+ { context: { tipo } }
11341
+ );
11342
+ };
11343
+ return /* @__PURE__ */ jsxs75(Fragment10, { children: [
11344
+ /* @__PURE__ */ jsx164("form", { onSubmit: handleSubmit, children: /* @__PURE__ */ jsxs75(Stack44, { spacing: 2, children: [
11345
+ /* @__PURE__ */ jsx164(Typography25, { variant: "subtitle2", children: tipo === "otp-email" ? " Informe seu e-mail para receber um c\xF3digo de acesso" : "Informe seu n\xFAmero de WhatsApp para receber um c\xF3digo de acesso" }),
11346
+ tipo === "otp-email" && /* @__PURE__ */ jsx164(
11347
+ TextField11,
11348
+ {
11349
+ autoFocus: true,
11350
+ name: "contato",
11351
+ label: "E-mail",
11352
+ value: data.contato || "",
11353
+ onChange: handleChange,
11354
+ fullWidth: true,
11355
+ ...validationErrors("contato")
11356
+ }
11357
+ ),
11358
+ tipo === "otp-whatsapp" && /* @__PURE__ */ jsx164(
11359
+ WhatsAppTextField,
11360
+ {
11361
+ autoFocus: true,
11362
+ name: "contato",
11363
+ label: "Whatsapp",
11364
+ value: data.contato || "",
11365
+ onChange: (e) => {
11366
+ changeValue("contato", e.target.value.replace(/[^\d+]/g, ""));
11367
+ },
11368
+ fullWidth: true,
11369
+ ...validationErrors("contato")
11370
+ }
11371
+ ),
11372
+ /* @__PURE__ */ jsxs75(Stack44, { children: [
11373
+ /* @__PURE__ */ jsx164(
11374
+ Button_default,
11375
+ {
11376
+ isLoading,
11377
+ type: "submit",
11378
+ variant: "contained",
11379
+ color: "primary",
11380
+ children: "Enviar c\xF3digo"
11381
+ }
11382
+ ),
11383
+ /* @__PURE__ */ jsxs75(
11384
+ ButtonContainer,
11385
+ {
11386
+ sx: {
11387
+ display: "inline-flex",
11388
+ justifyContent: "space-between",
11389
+ width: "100%",
11390
+ marginTop: 1
11391
+ },
11392
+ children: [
11393
+ /* @__PURE__ */ jsx164(
11394
+ Button_default,
11395
+ {
11396
+ onClick: onLoginClick,
11397
+ variant: "text",
11398
+ sx: {
11399
+ fontWeight: "400",
11400
+ ":hover": {
11401
+ color: (theme2) => theme2.palette.primary.dark
11402
+ }
11403
+ },
11404
+ children: "Voltar para o Login"
11405
+ }
11406
+ ),
11407
+ /* @__PURE__ */ jsx164(
11408
+ "a",
11409
+ {
11410
+ href: "https://datacsistemashelp.zendesk.com/hc/pt-br/articles/36489079108756-Login-OTP-via-WhatsApp",
11411
+ target: "_blank",
11412
+ rel: "noopener noreferrer",
11413
+ children: /* @__PURE__ */ jsx164(IconButton13, { children: /* @__PURE__ */ jsx164(HelpOutline, { color: "primary" }) })
11414
+ }
11415
+ )
11416
+ ]
11417
+ }
11418
+ )
11419
+ ] }),
11420
+ error && /* @__PURE__ */ jsx164(Alert7, { severity: "error", children: error })
11421
+ ] }) }),
11422
+ /* @__PURE__ */ jsx164(
11423
+ DialogVerificarOtp,
11424
+ {
11425
+ onLoginSuccess,
11426
+ open: isOpenVerificar,
11427
+ onClose: async (_) => {
11428
+ setOpenVerificar(false);
11429
+ },
11430
+ payload: {
11431
+ target: data.contato,
11432
+ channel: tipo === "otp-email" ? "email" : "whatsapp"
11433
+ }
11434
+ }
11435
+ )
11436
+ ] });
11437
+ }
11438
+
11439
+ // src/v2/Auth/components/LoginSection/index.tsx
11440
+ import { jsx as jsx165, jsxs as jsxs76 } from "react/jsx-runtime";
11441
+ var pageLabelMap = {
11442
+ login: "Acesse sua conta",
11443
+ licensa: "Selecione a licen\xE7a",
11444
+ "esqueci-senha": "Recupere a sua senha",
11445
+ "otp-email": "Entrar com senha tempor\xE1ria (E-mail)",
11446
+ "otp-whatsapp": "Entrar com senha tempor\xE1ria (WhatsApp)"
11447
+ };
11448
+ function LoginSection(props) {
11449
+ const { onLoginSuccess, onLoginFailed, onAlreadyLogged, appName } = props;
11450
+ const [loginData, setLoginData] = useState23();
11451
+ const { selecionarLicenca, isAuthenticated } = useCredentialsContext();
11452
+ const [view, setView] = useState23("login");
11453
+ const theme2 = useTheme11();
11454
+ const fullScreen = useMediaQuery6(theme2.breakpoints.up("md"));
11455
+ useEffect18(() => {
11456
+ if (isAuthenticated && onAlreadyLogged) {
11457
+ onAlreadyLogged();
11458
+ }
11459
+ }, [isAuthenticated]);
11460
+ async function handleLoginSuccess(_loginData) {
11461
+ try {
11462
+ if (Array.isArray(_loginData?.empresas)) {
11463
+ if (_loginData?.empresas.length === 1) {
11464
+ const tokens = await selecionarLicenca(
11465
+ _loginData?.token,
11466
+ _loginData.empresas[0].uuid
11467
+ );
11468
+ if (tokens) {
11469
+ onLoginSuccess(tokens);
11470
+ }
11471
+ return;
11472
+ }
11473
+ setView("licensa");
11474
+ setLoginData(_loginData);
11475
+ return;
11476
+ }
11477
+ onLoginSuccess(_loginData);
11478
+ } catch (err) {
11479
+ onLoginFailed(err);
11480
+ }
11481
+ }
11482
+ async function handleLoginFailed(err) {
11483
+ onLoginFailed(err);
11484
+ }
11485
+ function handleOptionsClick(option) {
11486
+ setView(option);
11487
+ }
11488
+ function handleExibirLogin() {
11489
+ setView("login");
11490
+ }
11491
+ const pageLabel = pageLabelMap[view];
11492
+ return /* @__PURE__ */ jsxs76(Stack45, { children: [
11493
+ /* @__PURE__ */ jsx165(Header3, { label: appName, subTitle: pageLabel }),
11494
+ /* @__PURE__ */ jsxs76(Box21, { sx: { marginTop: 2 }, children: [
11495
+ view === "login" && /* @__PURE__ */ jsx165(
11496
+ LoginForm,
11497
+ {
11498
+ onLoginSuccess: handleLoginSuccess,
11499
+ onLoginFailed: handleLoginFailed,
11500
+ onOptionsClick: handleOptionsClick
11501
+ }
11502
+ ),
11503
+ view === "licensa" && /* @__PURE__ */ jsx165(
11504
+ LicencaForm,
11505
+ {
11506
+ loginData,
11507
+ onLoginSuccess,
11508
+ onLoginFailed
11509
+ }
11510
+ ),
11511
+ view === "esqueci-senha" && /* @__PURE__ */ jsx165(EsqueciSenhaForm, { onLoginClick: handleExibirLogin }),
11512
+ view === "otp-email" && /* @__PURE__ */ jsx165(
11513
+ OtpForm,
11514
+ {
11515
+ onLoginClick: handleExibirLogin,
11516
+ onLoginSuccess: handleLoginSuccess,
11517
+ tipo: "otp-email"
11518
+ }
11519
+ ),
11520
+ view === "otp-whatsapp" && /* @__PURE__ */ jsx165(
11521
+ OtpForm,
11522
+ {
11523
+ onLoginClick: handleExibirLogin,
11524
+ onLoginSuccess: handleLoginSuccess,
11525
+ tipo: "otp-whatsapp"
11526
+ }
11527
+ )
11528
+ ] })
11529
+ ] });
11530
+ }
11531
+
11532
+ // src/v2/Auth/index.tsx
11533
+ import { jsx as jsx166, jsxs as jsxs77 } from "react/jsx-runtime";
11534
+ function LoginContainer({ children }) {
11535
+ const theme2 = useTheme12();
11536
+ const fullScreen = useMediaQuery7(theme2.breakpoints.up("md"));
11537
+ return /* @__PURE__ */ jsxs77(
11538
+ Stack46,
11539
+ {
11540
+ component: "section",
11541
+ width: fullScreen ? "46%" : "100%",
11542
+ minWidth: "420px",
11543
+ maxWidth: fullScreen ? "614px" : "initial",
11544
+ justifyContent: "center",
11545
+ alignItems: "center",
11546
+ padding: "2rem",
11547
+ children: [
11548
+ /* @__PURE__ */ jsx166(Stack46, { width: "100%", maxWidth: "28rem", margin: "auto 0", children }),
11549
+ /* @__PURE__ */ jsxs77(Stack46, { direction: "row", alignItems: "center", marginBottom: -3, children: [
11550
+ /* @__PURE__ */ jsx166(
11551
+ "img",
11552
+ {
11553
+ width: "60",
11554
+ src: "https://datac-site-assets.s3.sa-east-1.amazonaws.com/logomarca.png"
11555
+ }
11556
+ ),
11557
+ /* @__PURE__ */ jsx166(
11558
+ Typography26,
11559
+ {
11560
+ variant: "body1",
11561
+ component: "span",
11562
+ fontSize: "0.7rem",
11563
+ sx: { color: (theme3) => theme3.palette.grey[500] },
11564
+ children: "Data C Sistemas"
11565
+ }
11566
+ )
11567
+ ] })
11568
+ ]
11569
+ }
11570
+ );
11571
+ }
11572
+ function Auth(props) {
11573
+ const { banner, loginSection, ...loginSectionProps } = props;
11574
+ return /* @__PURE__ */ jsxs77(Stack46, { component: "main", direction: "row", height: "100vh", children: [
11575
+ banner ? /* @__PURE__ */ jsx166(BannerSection2, { children: banner }) : /* @__PURE__ */ jsx166(DefaultBanner, {}),
11576
+ /* @__PURE__ */ jsx166(LoginContainer, { children: loginSection ? loginSection : /* @__PURE__ */ jsx166(LoginSection, { ...loginSectionProps }) })
11577
+ ] });
11578
+ }
11579
+
11580
+ // src/PasswordTextField/index.tsx
11581
+ import { jsx as jsx167 } from "react/jsx-runtime";
11582
+ function PasswordTextField(props) {
11583
+ const { name, label, value, onChange, onKeyDown, ...rest } = props;
11584
+ const [showPassword, setShowPassword] = useState24(false);
11585
+ function handleClickShowPassword() {
11586
+ setShowPassword(!showPassword);
11587
+ }
11588
+ return /* @__PURE__ */ jsx167(
11589
+ TextField5,
11590
+ {
11591
+ name,
11592
+ label,
11593
+ value: value || "",
11594
+ onChange,
11595
+ onKeyDown,
11596
+ type: showPassword ? "text" : "password",
11597
+ slotProps: {
11598
+ input: {
11599
+ endAdornment: /* @__PURE__ */ jsx167(InputAdornment4, { position: "end", children: /* @__PURE__ */ jsx167(
11600
+ IconButton14,
11601
+ {
11602
+ tabIndex: -1,
11603
+ onClick: handleClickShowPassword,
11604
+ edge: "end",
11605
+ children: showPassword ? /* @__PURE__ */ jsx167(VisibilityOff, {}) : /* @__PURE__ */ jsx167(Visibility, {})
11606
+ }
11607
+ ) })
11608
+ }
11609
+ },
11610
+ ...rest
11611
+ }
11612
+ );
11613
+ }
11614
+
11615
+ // src/AlterarSenha/components/ValidatorMessage/index.tsx
11616
+ import Circle4 from "@mui/icons-material/Circle";
11617
+ import { Box as Box22, Typography as Typography27, useTheme as useTheme13 } from "@mui/material";
11618
+ import { jsx as jsx168, jsxs as jsxs78 } from "react/jsx-runtime";
11619
+ function ValidatorMessage2(props) {
11620
+ const { isValid, message } = props;
11621
+ const theme2 = useTheme13();
11622
+ return /* @__PURE__ */ jsxs78(
11623
+ Box22,
11624
+ {
11625
+ sx: {
11626
+ display: "flex",
11627
+ flexDirection: "row",
11628
+ alignItems: "center"
11629
+ },
11630
+ children: [
11631
+ /* @__PURE__ */ jsx168(
11632
+ Circle4,
11633
+ {
11634
+ color: isValid ? "success" : "inherit",
11635
+ sx: { fontSize: "8pt" }
11636
+ }
11637
+ ),
11638
+ /* @__PURE__ */ jsx168(
11639
+ Typography27,
11640
+ {
11641
+ variant: "body2",
11642
+ sx: {
11643
+ color: isValid ? theme2.palette.success.main : "inherit",
11644
+ textDecoration: isValid ? "line-through" : "none",
11645
+ ml: 1,
11646
+ fontSize: "10pt"
11647
+ },
11648
+ children: message
11649
+ }
11650
+ )
11651
+ ]
11652
+ }
11653
+ );
11654
+ }
11655
+
11656
+ // src/AlterarSenha/index.tsx
11657
+ import { jsx as jsx169, jsxs as jsxs79 } from "react/jsx-runtime";
11658
+ var defaultData2 = {
11659
+ senhaAtual: "",
11660
+ senhaNova: "",
11661
+ senhaNovaConfirmar: ""
11662
+ };
11663
+ var schema4 = create$3().shape({
11664
+ senhaAtual: create$6().required("Informe a Senha Atual."),
11665
+ senhaNova: create$6().required("Informe a Nova Senha."),
11666
+ senhaNovaConfirmar: create$6().required("Informe a Nova Senha.").oneOf([create$9("senhaNova")], "As senhas devem ser iguais.")
11667
+ });
11668
+ function AlterarSenha(props) {
11669
+ const {
11670
+ isOpen,
11671
+ credentialsConfig,
11672
+ onClose,
11673
+ onSuccess,
11674
+ onFailed,
11675
+ primeiroAcesso,
11676
+ senhaAtual,
11677
+ email
11678
+ } = props;
11679
+ const { alterarSenha, isSubmitting } = useCredentials2(credentialsConfig);
11680
+ const { setValidationErrors, validationProps } = useValidations4();
11681
+ const { data, handleChange, setData, changeValue } = useForm3(defaultData2);
11682
+ const [ehSegura, setEhSegura] = useState25(false);
11683
+ const [error, setError] = useState25(null);
11684
+ useEffect19(() => {
11685
+ if (senhaAtual) {
11686
+ changeValue("senhaAtual", senhaAtual);
11687
+ }
11688
+ }, [senhaAtual]);
11689
+ useEffect19(() => {
11690
+ if (data.senhaNova) {
11691
+ setEhSegura(
11692
+ isStrongPassword2(data.senhaNova, {
11693
+ minLength: 8,
11694
+ minLowercase: 1,
11695
+ minUppercase: 1,
11696
+ minNumbers: 1,
11697
+ minSymbols: 1
11698
+ })
11699
+ );
11700
+ }
11701
+ }, [data.senhaNova]);
11702
+ async function handleAlterarSenha() {
11703
+ setValidationErrors(null);
11704
+ setError(null);
11705
+ schema4.validate(data, { abortEarly: false }).then(async () => {
11706
+ const { senhaAtual: senhaAtual2, senhaNova } = data;
11707
+ try {
11708
+ const response = await alterarSenha(senhaAtual2, senhaNova, email);
11709
+ if (response) {
11710
+ if (onSuccess)
11711
+ onSuccess();
11712
+ setData(defaultData2);
11713
+ }
11714
+ } catch (error2) {
11715
+ if (onFailed)
11716
+ onFailed(error2);
11717
+ if (isAxiosError3(error2)) {
11718
+ setError(error2.response?.data.message);
11719
+ return;
11720
+ }
11721
+ setError("Ocorreu um erro ao tentar alterar a senha");
11722
+ }
11723
+ }).catch((error2) => {
11724
+ console.log("Erros por campo:", error2.inner);
11725
+ console.log("Primeiro erro:", error2.errors);
11726
+ setValidationErrors(error2);
11727
+ });
11728
+ }
11729
+ function tem8caracteres() {
11730
+ return data?.senhaNova.length >= 8;
11731
+ }
11732
+ function temLetraMinuscula() {
11733
+ if (data?.senhaNova) {
11734
+ const result = data?.senhaNova.match(/[a-z]/g);
11735
+ return Array.isArray(result) && result.length > 0;
11736
+ }
11737
+ return false;
11738
+ }
11739
+ function temLetraMaisucula() {
11740
+ if (data?.senhaNova) {
11741
+ const result = data?.senhaNova.match(/[A-Z]/g);
11742
+ return Array.isArray(result) && result.length > 0;
11743
+ }
11744
+ return false;
11745
+ }
11746
+ function temNumero() {
11747
+ if (data?.senhaNova) {
11748
+ const result = data?.senhaNova.match(/\d/g);
11749
+ return Array.isArray(result) && result.length > 0;
11750
+ }
11751
+ return false;
11752
+ }
11753
+ function temCaracterEspecial() {
11754
+ if (data?.senhaNova) {
10459
11755
  const result = data?.senhaNova.match(/\W/g);
10460
11756
  return Array.isArray(result) && result.length > 0;
10461
11757
  }
@@ -10466,19 +11762,19 @@ function AlterarSenha(props) {
10466
11762
  return false;
10467
11763
  return data?.senhaNova === data?.senhaNovaConfirmar;
10468
11764
  }
10469
- return /* @__PURE__ */ jsxs68(Dialog_default.Root, { open: isOpen, onClose: (_) => onClose(), maxWidth: "md", children: [
10470
- /* @__PURE__ */ jsxs68(Dialog_default.Header, { children: [
10471
- /* @__PURE__ */ jsx154(Dialog_default.Title, { children: "Alterar Senha" }),
10472
- /* @__PURE__ */ jsx154(Dialog_default.ActionClose, { onClose })
11765
+ return /* @__PURE__ */ jsxs79(Dialog_default.Root, { open: isOpen, onClose: (_) => onClose(), maxWidth: "md", children: [
11766
+ /* @__PURE__ */ jsxs79(Dialog_default.Header, { children: [
11767
+ /* @__PURE__ */ jsx169(Dialog_default.Title, { children: "Alterar Senha" }),
11768
+ /* @__PURE__ */ jsx169(Dialog_default.ActionClose, { onClose })
10473
11769
  ] }),
10474
- /* @__PURE__ */ jsx154(Dialog_default.Content, { children: /* @__PURE__ */ jsxs68(Grid, { container: true, spacing: 2, children: [
10475
- primeiroAcesso && /* @__PURE__ */ jsx154(Grid, { size: 12, children: /* @__PURE__ */ jsxs68(Alert3, { severity: "info", children: [
11770
+ /* @__PURE__ */ jsx169(Dialog_default.Content, { children: /* @__PURE__ */ jsxs79(Grid2, { container: true, spacing: 2, children: [
11771
+ primeiroAcesso && /* @__PURE__ */ jsx169(Grid2, { size: 12, children: /* @__PURE__ */ jsxs79(Alert8, { severity: "info", children: [
10476
11772
  "Voc\xEA est\xE1 acessando o sistema com uma senha tempor\xE1ria.",
10477
- /* @__PURE__ */ jsx154("br", {}),
11773
+ /* @__PURE__ */ jsx169("br", {}),
10478
11774
  "Cadastre uma senha segura para deixar sua conta mais protegida."
10479
11775
  ] }) }),
10480
- /* @__PURE__ */ jsxs68(Grid, { size: 12, children: [
10481
- /* @__PURE__ */ jsx154(
11776
+ /* @__PURE__ */ jsxs79(Grid2, { size: 12, children: [
11777
+ /* @__PURE__ */ jsx169(
10482
11778
  PasswordTextField,
10483
11779
  {
10484
11780
  name: "senhaAtual",
@@ -10488,19 +11784,19 @@ function AlterarSenha(props) {
10488
11784
  ...validationProps("senhaAtual")
10489
11785
  }
10490
11786
  ),
10491
- /* @__PURE__ */ jsxs68(
10492
- Box17,
11787
+ /* @__PURE__ */ jsxs79(
11788
+ Box23,
10493
11789
  {
10494
11790
  sx: { display: "flex", alignItems: "center", gap: 0.5, mt: 0.5 },
10495
11791
  children: [
10496
- /* @__PURE__ */ jsx154(InfoOutlined, { sx: { fontSize: 14, color: "text.secondary" } }),
10497
- /* @__PURE__ */ jsx154(Typography20, { variant: "caption", color: "text.secondary", children: "Essa \xE9 a senha que voc\xEA utiliza para acessar o sistema atualmente." })
11792
+ /* @__PURE__ */ jsx169(InfoOutlined2, { sx: { fontSize: 14, color: "text.secondary" } }),
11793
+ /* @__PURE__ */ jsx169(Typography28, { variant: "caption", color: "text.secondary", children: "Essa \xE9 a senha que voc\xEA utiliza para acessar o sistema atualmente." })
10498
11794
  ]
10499
11795
  }
10500
11796
  )
10501
11797
  ] }),
10502
- /* @__PURE__ */ jsx154(Grid, { size: 12, children: /* @__PURE__ */ jsx154(Divider3, {}) }),
10503
- /* @__PURE__ */ jsx154(Grid, { size: 12, children: /* @__PURE__ */ jsx154(
11798
+ /* @__PURE__ */ jsx169(Grid2, { size: 12, children: /* @__PURE__ */ jsx169(Divider5, {}) }),
11799
+ /* @__PURE__ */ jsx169(Grid2, { size: 12, children: /* @__PURE__ */ jsx169(
10504
11800
  PasswordTextField,
10505
11801
  {
10506
11802
  name: "senhaNova",
@@ -10510,8 +11806,8 @@ function AlterarSenha(props) {
10510
11806
  ...validationProps("senhaNova")
10511
11807
  }
10512
11808
  ) }),
10513
- /* @__PURE__ */ jsxs68(Grid, { size: 12, children: [
10514
- /* @__PURE__ */ jsx154(
11809
+ /* @__PURE__ */ jsxs79(Grid2, { size: 12, children: [
11810
+ /* @__PURE__ */ jsx169(
10515
11811
  PasswordTextField,
10516
11812
  {
10517
11813
  name: "senhaNovaConfirmar",
@@ -10521,66 +11817,66 @@ function AlterarSenha(props) {
10521
11817
  ...validationProps("senhaNovaConfirmar")
10522
11818
  }
10523
11819
  ),
10524
- /* @__PURE__ */ jsxs68(
10525
- Box17,
11820
+ /* @__PURE__ */ jsxs79(
11821
+ Box23,
10526
11822
  {
10527
11823
  sx: { display: "flex", alignItems: "center", gap: 0.5, mt: 0.5 },
10528
11824
  children: [
10529
- /* @__PURE__ */ jsx154(InfoOutlined, { sx: { fontSize: 14, color: "text.secondary" } }),
10530
- /* @__PURE__ */ jsx154(Typography20, { variant: "caption", color: "text.secondary", children: "Informe nos campos acima a nova senha que deseja utilizar." })
11825
+ /* @__PURE__ */ jsx169(InfoOutlined2, { sx: { fontSize: 14, color: "text.secondary" } }),
11826
+ /* @__PURE__ */ jsx169(Typography28, { variant: "caption", color: "text.secondary", children: "Informe nos campos acima a nova senha que deseja utilizar." })
10531
11827
  ]
10532
11828
  }
10533
11829
  )
10534
11830
  ] }),
10535
- /* @__PURE__ */ jsxs68(Grid, { size: 12, children: [
10536
- /* @__PURE__ */ jsx154(
10537
- ValidatorMessage,
11831
+ /* @__PURE__ */ jsxs79(Grid2, { size: 12, children: [
11832
+ /* @__PURE__ */ jsx169(
11833
+ ValidatorMessage2,
10538
11834
  {
10539
11835
  isValid: tem8caracteres(),
10540
11836
  message: "O tamanho m\xEDnimo da nova senha \xE9 de 8 caracteres"
10541
11837
  }
10542
11838
  ),
10543
- /* @__PURE__ */ jsx154(
10544
- ValidatorMessage,
11839
+ /* @__PURE__ */ jsx169(
11840
+ ValidatorMessage2,
10545
11841
  {
10546
11842
  isValid: temLetraMinuscula(),
10547
11843
  message: "A nova senha deve ter ao menos uma letra min\xFAscula"
10548
11844
  }
10549
11845
  ),
10550
- /* @__PURE__ */ jsx154(
10551
- ValidatorMessage,
11846
+ /* @__PURE__ */ jsx169(
11847
+ ValidatorMessage2,
10552
11848
  {
10553
11849
  isValid: temLetraMaisucula(),
10554
11850
  message: "A nova senha deve ter ao menos uma letra mai\xFAscula"
10555
11851
  }
10556
11852
  ),
10557
- /* @__PURE__ */ jsx154(
10558
- ValidatorMessage,
11853
+ /* @__PURE__ */ jsx169(
11854
+ ValidatorMessage2,
10559
11855
  {
10560
11856
  isValid: temNumero(),
10561
11857
  message: "A nova senha deve ter ao menos um n\xFAmero"
10562
11858
  }
10563
11859
  ),
10564
- /* @__PURE__ */ jsx154(
10565
- ValidatorMessage,
11860
+ /* @__PURE__ */ jsx169(
11861
+ ValidatorMessage2,
10566
11862
  {
10567
11863
  isValid: temCaracterEspecial(),
10568
11864
  message: "A nova senha deve ter ao menos um caracter especial"
10569
11865
  }
10570
11866
  ),
10571
- /* @__PURE__ */ jsx154(
10572
- ValidatorMessage,
11867
+ /* @__PURE__ */ jsx169(
11868
+ ValidatorMessage2,
10573
11869
  {
10574
11870
  isValid: asSenhasSaoIguais(),
10575
11871
  message: "A confirma\xE7\xE3o da nova senha deve ser igual \xE0 nova senha"
10576
11872
  }
10577
11873
  )
10578
11874
  ] }),
10579
- error && /* @__PURE__ */ jsx154(Grid, { size: 12, children: /* @__PURE__ */ jsx154(Alert3, { severity: "error", children: error }) })
11875
+ error && /* @__PURE__ */ jsx169(Grid2, { size: 12, children: /* @__PURE__ */ jsx169(Alert8, { severity: "error", children: error }) })
10580
11876
  ] }) }),
10581
- /* @__PURE__ */ jsx154(Dialog_default.Footer, { children: /* @__PURE__ */ jsxs68(Dialog_default.Actions, { children: [
10582
- /* @__PURE__ */ jsx154(Dialog_default.ActionCancelar, { onClick: () => onClose() }),
10583
- /* @__PURE__ */ jsx154(
11877
+ /* @__PURE__ */ jsx169(Dialog_default.Footer, { children: /* @__PURE__ */ jsxs79(Dialog_default.Actions, { children: [
11878
+ /* @__PURE__ */ jsx169(Dialog_default.ActionCancelar, { onClick: () => onClose() }),
11879
+ /* @__PURE__ */ jsx169(
10584
11880
  Dialog_default.ActionSalvar,
10585
11881
  {
10586
11882
  label: "Alterar Senha",
@@ -10594,25 +11890,25 @@ function AlterarSenha(props) {
10594
11890
  }
10595
11891
 
10596
11892
  // src/MioAuth/components/LoginForm/index.tsx
10597
- import { jsx as jsx155, jsxs as jsxs69 } from "react/jsx-runtime";
10598
- var schema2 = create$3().shape({
11893
+ import { jsx as jsx170, jsxs as jsxs80 } from "react/jsx-runtime";
11894
+ var schema5 = create$3().shape({
10599
11895
  email: create$6().required("Informe o e-mail"),
10600
11896
  password: create$6().required("Informe a senha")
10601
11897
  });
10602
- function LoginForm(props) {
11898
+ function LoginForm2(props) {
10603
11899
  const { onLoginSuccess, onLoginFailed, onOptionsClick, credentialsConfig } = props;
10604
- const [email, setEmail] = useState18("");
10605
- const [password, setPassword] = useState18("");
10606
- const [isLoading, setLoading] = useState18(false);
10607
- const [exibirAlterarSenha, setExibirAlterarSenha] = useState18(false);
10608
- const [sucessoAlterarSenha, setSucessoAlterarSenha] = useState18(false);
10609
- const [error, setError] = useState18(null);
10610
- const { login } = useCredentials2(credentialsConfig);
10611
- const { validationProps, setValidationErrors } = useValidations2();
11900
+ const [email, setEmail] = useState26("");
11901
+ const [password, setPassword] = useState26("");
11902
+ const [isLoading, setLoading] = useState26(false);
11903
+ const [exibirAlterarSenha, setExibirAlterarSenha] = useState26(false);
11904
+ const [sucessoAlterarSenha, setSucessoAlterarSenha] = useState26(false);
11905
+ const [error, setError] = useState26(null);
11906
+ const { login } = useCredentials3(credentialsConfig);
11907
+ const { validationProps, setValidationErrors } = useValidations5();
10612
11908
  async function handleLogin() {
10613
11909
  setValidationErrors(null);
10614
11910
  setError(null);
10615
- schema2.validate({ email, password }, { abortEarly: false }).then(async () => {
11911
+ schema5.validate({ email, password }, { abortEarly: false }).then(async () => {
10616
11912
  setLoading(true);
10617
11913
  try {
10618
11914
  const loginResponse = await login(email, password);
@@ -10620,7 +11916,7 @@ function LoginForm(props) {
10620
11916
  onLoginSuccess(loginResponse);
10621
11917
  }
10622
11918
  } catch (err) {
10623
- if (isAxiosError2(err)) {
11919
+ if (isAxiosError4(err)) {
10624
11920
  const axiosError = err;
10625
11921
  if (axiosError.response?.data.code === "E_FIRST_ACCESS") {
10626
11922
  setExibirAlterarSenha(true);
@@ -10636,14 +11932,14 @@ function LoginForm(props) {
10636
11932
  setLoading(false);
10637
11933
  });
10638
11934
  }
10639
- return /* @__PURE__ */ jsxs69(Stack39, { component: "form", onSubmit: handleLogin, children: [
10640
- /* @__PURE__ */ jsxs69(
10641
- Stack39,
11935
+ return /* @__PURE__ */ jsxs80(Stack47, { component: "form", onSubmit: handleLogin, children: [
11936
+ /* @__PURE__ */ jsxs80(
11937
+ Stack47,
10642
11938
  {
10643
11939
  spacing: 2,
10644
11940
  children: [
10645
- /* @__PURE__ */ jsx155(
10646
- TextField6,
11941
+ /* @__PURE__ */ jsx170(
11942
+ TextField12,
10647
11943
  {
10648
11944
  name: "email",
10649
11945
  label: "E-mail",
@@ -10654,7 +11950,7 @@ function LoginForm(props) {
10654
11950
  ...validationProps("email")
10655
11951
  }
10656
11952
  ),
10657
- /* @__PURE__ */ jsx155(
11953
+ /* @__PURE__ */ jsx170(
10658
11954
  PasswordTextField,
10659
11955
  {
10660
11956
  name: "password",
@@ -10665,7 +11961,7 @@ function LoginForm(props) {
10665
11961
  ...validationProps("password")
10666
11962
  }
10667
11963
  ),
10668
- /* @__PURE__ */ jsx155(
11964
+ /* @__PURE__ */ jsx170(
10669
11965
  Button_default,
10670
11966
  {
10671
11967
  fullWidth: true,
@@ -10679,7 +11975,7 @@ function LoginForm(props) {
10679
11975
  ]
10680
11976
  }
10681
11977
  ),
10682
- /* @__PURE__ */ jsx155(
11978
+ /* @__PURE__ */ jsx170(
10683
11979
  Button_default,
10684
11980
  {
10685
11981
  onClick: () => onOptionsClick("esqueci-senha"),
@@ -10704,14 +12000,14 @@ function LoginForm(props) {
10704
12000
  children: "Esqueci a senha"
10705
12001
  }
10706
12002
  ),
10707
- error && /* @__PURE__ */ jsx155(Alert4, { severity: "error", children: error }),
10708
- sucessoAlterarSenha && /* @__PURE__ */ jsxs69(Alert4, { severity: "success", children: [
12003
+ error && /* @__PURE__ */ jsx170(Alert9, { severity: "error", children: error }),
12004
+ sucessoAlterarSenha && /* @__PURE__ */ jsxs80(Alert9, { severity: "success", children: [
10709
12005
  "Senha cadastrada com sucesso",
10710
- /* @__PURE__ */ jsx155("br", {}),
12006
+ /* @__PURE__ */ jsx170("br", {}),
10711
12007
  "Tudo pronto para voc\xEA fazer o login"
10712
12008
  ] }),
10713
- /* @__PURE__ */ jsxs69(
10714
- Stack39,
12009
+ /* @__PURE__ */ jsxs80(
12010
+ Stack47,
10715
12011
  {
10716
12012
  direction: "row",
10717
12013
  justifyContent: "center",
@@ -10719,31 +12015,31 @@ function LoginForm(props) {
10719
12015
  mt: 2,
10720
12016
  mb: 2,
10721
12017
  children: [
10722
- /* @__PURE__ */ jsx155(Divider4, { sx: { flexGrow: 1, mr: 1 } }),
10723
- /* @__PURE__ */ jsx155(Typography21, { children: "Ou fa\xE7a login com" }),
10724
- /* @__PURE__ */ jsx155(Divider4, { sx: { flexGrow: 1, ml: 1 } })
12018
+ /* @__PURE__ */ jsx170(Divider6, { sx: { flexGrow: 1, mr: 1 } }),
12019
+ /* @__PURE__ */ jsx170(Typography29, { children: "Ou fa\xE7a login com" }),
12020
+ /* @__PURE__ */ jsx170(Divider6, { sx: { flexGrow: 1, ml: 1 } })
10725
12021
  ]
10726
12022
  }
10727
12023
  ),
10728
- /* @__PURE__ */ jsxs69(Stack39, { spacing: 1, children: [
10729
- /* @__PURE__ */ jsx155(
12024
+ /* @__PURE__ */ jsxs80(Stack47, { spacing: 1, children: [
12025
+ /* @__PURE__ */ jsx170(
10730
12026
  Button_default,
10731
12027
  {
10732
12028
  onClick: () => onOptionsClick("otp-email"),
10733
- startIcon: /* @__PURE__ */ jsx155(Mail, {}),
12029
+ startIcon: /* @__PURE__ */ jsx170(Mail2, {}),
10734
12030
  children: "Entrar com senha tempor\xE1ria"
10735
12031
  }
10736
12032
  ),
10737
- /* @__PURE__ */ jsx155(
12033
+ /* @__PURE__ */ jsx170(
10738
12034
  Button_default,
10739
12035
  {
10740
12036
  onClick: () => onOptionsClick("otp-whatsapp"),
10741
- startIcon: /* @__PURE__ */ jsx155(WhatsApp, {}),
12037
+ startIcon: /* @__PURE__ */ jsx170(WhatsApp2, {}),
10742
12038
  children: "Entrar com senha tempor\xE1ria"
10743
12039
  }
10744
12040
  )
10745
12041
  ] }),
10746
- /* @__PURE__ */ jsx155(
12042
+ /* @__PURE__ */ jsx170(
10747
12043
  AlterarSenha,
10748
12044
  {
10749
12045
  senhaAtual: password,
@@ -10763,24 +12059,24 @@ function LoginForm(props) {
10763
12059
  }
10764
12060
 
10765
12061
  // src/MioAuth/components/EsqueciSenhaForm/index.tsx
10766
- import { useState as useState19 } from "react";
10767
- import { Alert as Alert5, Box as Box18, TextField as TextField7 } from "@mui/material";
10768
- import { useCredentials as useCredentials3, useValidations as useValidations3 } from "@data-c/hooks";
10769
- import { jsx as jsx156, jsxs as jsxs70 } from "react/jsx-runtime";
10770
- var schema3 = create$3().shape({
12062
+ import { useState as useState27 } from "react";
12063
+ import { Alert as Alert10, Box as Box24, TextField as TextField13 } from "@mui/material";
12064
+ import { useCredentials as useCredentials4, useValidations as useValidations6 } from "@data-c/hooks";
12065
+ import { jsx as jsx171, jsxs as jsxs81 } from "react/jsx-runtime";
12066
+ var schema6 = create$3().shape({
10771
12067
  email: create$6().required("Informe o e-mail")
10772
12068
  });
10773
- function EsqueciSenhaForm(props) {
12069
+ function EsqueciSenhaForm2(props) {
10774
12070
  const { onLoginClick, credentialsConfig } = props;
10775
- const [email, setEmail] = useState19("");
10776
- const [isSubmitting, setSubmitting] = useState19(false);
10777
- const [sucessoRecuperarSenha, setSucessoRecuperarSenha] = useState19(false);
10778
- const [error, setError] = useState19(null);
10779
- const { recuperarSenha } = useCredentials3(credentialsConfig);
10780
- const { validationProps, setValidationErrors } = useValidations3();
12071
+ const [email, setEmail] = useState27("");
12072
+ const [isSubmitting, setSubmitting] = useState27(false);
12073
+ const [sucessoRecuperarSenha, setSucessoRecuperarSenha] = useState27(false);
12074
+ const [error, setError] = useState27(null);
12075
+ const { recuperarSenha } = useCredentials4(credentialsConfig);
12076
+ const { validationProps, setValidationErrors } = useValidations6();
10781
12077
  async function handleRecuperarSenha() {
10782
12078
  setValidationErrors(null);
10783
- schema3.validate({ email }, { abortEarly: false }).then(async () => {
12079
+ schema6.validate({ email }, { abortEarly: false }).then(async () => {
10784
12080
  try {
10785
12081
  setSubmitting(true);
10786
12082
  await recuperarSenha(email);
@@ -10794,9 +12090,9 @@ function EsqueciSenhaForm(props) {
10794
12090
  setValidationErrors(error2);
10795
12091
  });
10796
12092
  }
10797
- return /* @__PURE__ */ jsxs70(Box18, { component: "form", children: [
10798
- /* @__PURE__ */ jsx156(
10799
- TextField7,
12093
+ return /* @__PURE__ */ jsxs81(Box24, { component: "form", children: [
12094
+ /* @__PURE__ */ jsx171(
12095
+ TextField13,
10800
12096
  {
10801
12097
  name: "email",
10802
12098
  label: "E-mail",
@@ -10808,7 +12104,7 @@ function EsqueciSenhaForm(props) {
10808
12104
  ...validationProps("email")
10809
12105
  }
10810
12106
  ),
10811
- /* @__PURE__ */ jsx156(
12107
+ /* @__PURE__ */ jsx171(
10812
12108
  Button_default,
10813
12109
  {
10814
12110
  fullWidth: true,
@@ -10818,7 +12114,7 @@ function EsqueciSenhaForm(props) {
10818
12114
  children: "Recuperar minha senha"
10819
12115
  }
10820
12116
  ),
10821
- /* @__PURE__ */ jsx156(
12117
+ /* @__PURE__ */ jsx171(
10822
12118
  ButtonContainer,
10823
12119
  {
10824
12120
  sx: {
@@ -10827,7 +12123,7 @@ function EsqueciSenhaForm(props) {
10827
12123
  width: "100%",
10828
12124
  marginTop: 1
10829
12125
  },
10830
- children: /* @__PURE__ */ jsx156(
12126
+ children: /* @__PURE__ */ jsx171(
10831
12127
  Button_default,
10832
12128
  {
10833
12129
  onClick: onLoginClick,
@@ -10843,11 +12139,11 @@ function EsqueciSenhaForm(props) {
10843
12139
  )
10844
12140
  }
10845
12141
  ),
10846
- sucessoRecuperarSenha && /* @__PURE__ */ jsx156(
10847
- Alert5,
12142
+ sucessoRecuperarSenha && /* @__PURE__ */ jsx171(
12143
+ Alert10,
10848
12144
  {
10849
12145
  severity: "success",
10850
- action: /* @__PURE__ */ jsx156(
12146
+ action: /* @__PURE__ */ jsx171(
10851
12147
  Button_default,
10852
12148
  {
10853
12149
  onClick: onLoginClick,
@@ -10864,20 +12160,20 @@ function EsqueciSenhaForm(props) {
10864
12160
  children: "Enviamos para o seu e-mail as instru\xE7\xF5es para recuperar a sua senha"
10865
12161
  }
10866
12162
  ),
10867
- error && /* @__PURE__ */ jsx156(Alert5, { severity: "error", children: error })
12163
+ error && /* @__PURE__ */ jsx171(Alert10, { severity: "error", children: error })
10868
12164
  ] });
10869
12165
  }
10870
12166
 
10871
12167
  // src/MioAuth/components/LicencaForm/index.tsx
10872
- import { useEffect as useEffect16, useState as useState20 } from "react";
10873
- import { Box as Box19, MenuItem as MenuItem6, TextField as TextField8 } from "@mui/material";
10874
- import { useCredentials as useCredentials4 } from "@data-c/hooks";
10875
- import { jsx as jsx157, jsxs as jsxs71 } from "react/jsx-runtime";
10876
- function LicencaForm(props) {
12168
+ import { useEffect as useEffect20, useState as useState28 } from "react";
12169
+ import { Box as Box25, MenuItem as MenuItem7, TextField as TextField14 } from "@mui/material";
12170
+ import { useCredentials as useCredentials5 } from "@data-c/hooks";
12171
+ import { jsx as jsx172, jsxs as jsxs82 } from "react/jsx-runtime";
12172
+ function LicencaForm2(props) {
10877
12173
  const { loginData, credentialsConfig, onLoginFailed, onLoginSuccess } = props;
10878
- const [empresaId, setEmpresaId] = useState20("");
10879
- const { selecionarLicenca, isSubmitting } = useCredentials4(credentialsConfig);
10880
- useEffect16(() => {
12174
+ const [empresaId, setEmpresaId] = useState28("");
12175
+ const { selecionarLicenca, isSubmitting } = useCredentials5(credentialsConfig);
12176
+ useEffect20(() => {
10881
12177
  if (Array.isArray(loginData?.empresas)) {
10882
12178
  const empresa = loginData?.empresas[0];
10883
12179
  setEmpresaId(empresa?.uuid);
@@ -10895,9 +12191,9 @@ function LicencaForm(props) {
10895
12191
  onLoginFailed(err);
10896
12192
  }
10897
12193
  }
10898
- return /* @__PURE__ */ jsxs71(Box19, { component: "form", sx: { minWidth: "290px" }, children: [
10899
- /* @__PURE__ */ jsx157(
10900
- TextField8,
12194
+ return /* @__PURE__ */ jsxs82(Box25, { component: "form", sx: { minWidth: "290px" }, children: [
12195
+ /* @__PURE__ */ jsx172(
12196
+ TextField14,
10901
12197
  {
10902
12198
  label: "Licen\xE7as",
10903
12199
  margin: "normal",
@@ -10907,10 +12203,10 @@ function LicencaForm(props) {
10907
12203
  onChange: (e) => {
10908
12204
  setEmpresaId(e.target.value);
10909
12205
  },
10910
- children: loginData?.empresas?.map((empresa) => /* @__PURE__ */ jsx157(MenuItem6, { value: empresa.uuid, children: empresa.nome }, empresa.uuid))
12206
+ children: loginData?.empresas?.map((empresa) => /* @__PURE__ */ jsx172(MenuItem7, { value: empresa.uuid, children: empresa.nome }, empresa.uuid))
10911
12207
  }
10912
12208
  ),
10913
- /* @__PURE__ */ jsx157(
12209
+ /* @__PURE__ */ jsx172(
10914
12210
  Button_default,
10915
12211
  {
10916
12212
  fullWidth: true,
@@ -10925,137 +12221,34 @@ function LicencaForm(props) {
10925
12221
  }
10926
12222
 
10927
12223
  // src/MioAuth/components/LoginSection/index.tsx
10928
- import { useEffect as useEffect18, useState as useState24 } from "react";
12224
+ import { useEffect as useEffect22, useState as useState31 } from "react";
10929
12225
  import {
10930
- useCredentials as useCredentials7
12226
+ useCredentials as useCredentials8
10931
12227
  } from "@data-c/hooks";
10932
12228
 
10933
12229
  // src/MioAuth/components/OtpForm/index.tsx
10934
12230
  import {
10935
- useCredentials as useCredentials6,
10936
- useForm as useForm2
12231
+ useCredentials as useCredentials7,
12232
+ useForm as useForm4
10937
12233
  } from "@data-c/hooks";
10938
- import HelpOutline from "@mui/icons-material/HelpOutline";
10939
- import { Alert as Alert7, IconButton as IconButton14, Stack as Stack41, TextField as TextField11, Typography as Typography23 } from "@mui/material";
10940
- import { useState as useState23 } from "react";
10941
-
10942
- // src/WhastappTextField/index.tsx
10943
- import { useState as useState21, useMemo as useMemo10 } from "react";
10944
- import TextField9 from "@mui/material/TextField";
10945
- import { jsx as jsx158 } from "react/jsx-runtime";
10946
- var formatPhone = (value) => {
10947
- const digits = value.replace(/\D/g, "");
10948
- if (digits.length <= 2) {
10949
- return `(${digits}`;
10950
- }
10951
- if (digits.length <= 7) {
10952
- return `(${digits.slice(0, 2)}) ${digits.slice(2)}`;
10953
- }
10954
- if (digits.length <= 11) {
10955
- return `(${digits.slice(0, 2)}) ${digits.slice(2, 7)}-${digits.slice(7)}`;
10956
- }
10957
- return `(${digits.slice(0, 2)}) ${digits.slice(2, 7)}-${digits.slice(7, 11)}`;
10958
- };
10959
- function WhatsAppTextField(props) {
10960
- const { value: propValue, onChange: propOnChange, ...rest } = props;
10961
- const [internalValue, setInternalValue] = useState21("");
10962
- const isControlled = propValue !== void 0;
10963
- const displayedValue = useMemo10(() => {
10964
- return isControlled ? formatPhone(propValue || "") : internalValue;
10965
- }, [propValue, internalValue, isControlled]);
10966
- const handleChange = (event) => {
10967
- const masked = formatPhone(event.target.value);
10968
- if (!isControlled) {
10969
- setInternalValue(masked);
10970
- }
10971
- if (propOnChange) {
10972
- const customEvent = {
10973
- ...event,
10974
- target: {
10975
- ...event.target,
10976
- value: masked
10977
- }
10978
- };
10979
- propOnChange(customEvent);
10980
- }
10981
- };
10982
- return /* @__PURE__ */ jsx158(
10983
- TextField9,
10984
- {
10985
- value: displayedValue,
10986
- onChange: handleChange,
10987
- inputProps: { maxLength: 15 },
10988
- ...rest
10989
- }
10990
- );
10991
- }
12234
+ import HelpOutline2 from "@mui/icons-material/HelpOutline";
12235
+ import { Alert as Alert12, IconButton as IconButton15, Stack as Stack49, TextField as TextField15, Typography as Typography31 } from "@mui/material";
12236
+ import { useState as useState30 } from "react";
10992
12237
 
10993
12238
  // src/MioAuth/components/OtpForm/DialogVerificarOtp.tsx
10994
12239
  import {
10995
- useCredentials as useCredentials5
12240
+ useCredentials as useCredentials6
10996
12241
  } from "@data-c/hooks";
10997
- import { Alert as Alert6, Stack as Stack40, Typography as Typography22 } from "@mui/material";
10998
- import { useEffect as useEffect17, useState as useState22 } from "react";
10999
-
11000
- // src/VerificationCodeInput/index.tsx
11001
- import { useRef as useRef5 } from "react";
11002
- import { Box as Box20, TextField as TextField10 } from "@mui/material";
11003
- import { jsx as jsx159 } from "react/jsx-runtime";
11004
- function VerificationCodeInput({
11005
- length = 6,
11006
- value,
11007
- onChange
11008
- }) {
11009
- const inputsRef = useRef5([]);
11010
- const handleChange = (index, digit) => {
11011
- const chars = "ABCDEF0123456789";
11012
- const cleanDigit = digit.toUpperCase().split("").find((char) => chars.includes(char)) || "";
11013
- const nextValue = value.split("");
11014
- nextValue[index] = cleanDigit;
11015
- const updatedValue = nextValue.join("");
11016
- onChange(updatedValue);
11017
- if (cleanDigit && index < length - 1) {
11018
- inputsRef.current[index + 1]?.focus();
11019
- }
11020
- };
11021
- const handleKeyDown = (index, event) => {
11022
- if (event.key === "Backspace" && !value[index] && index > 0) {
11023
- inputsRef.current[index - 1]?.focus();
11024
- }
11025
- };
11026
- return /* @__PURE__ */ jsx159(Box20, { display: "flex", gap: 1, children: Array.from({ length }).map((_, i) => /* @__PURE__ */ jsx159(
11027
- TextField10,
11028
- {
11029
- autoFocus: i === 0,
11030
- inputRef: (el) => inputsRef.current[i] = el,
11031
- slotProps: {
11032
- htmlInput: {
11033
- maxLength: 1,
11034
- style: {
11035
- textAlign: "center",
11036
- fontSize: "24px",
11037
- width: "24px",
11038
- height: "36px"
11039
- }
11040
- }
11041
- },
11042
- value: value[i] || "",
11043
- onChange: (e) => handleChange(i, e.target.value),
11044
- onKeyDown: (e) => handleKeyDown(i, e)
11045
- },
11046
- i
11047
- )) });
11048
- }
11049
-
11050
- // src/MioAuth/components/OtpForm/DialogVerificarOtp.tsx
11051
- import { jsx as jsx160, jsxs as jsxs72 } from "react/jsx-runtime";
11052
- function DialogVerificarOtp(props) {
12242
+ import { Alert as Alert11, Stack as Stack48, Typography as Typography30 } from "@mui/material";
12243
+ import { useEffect as useEffect21, useState as useState29 } from "react";
12244
+ import { jsx as jsx173, jsxs as jsxs83 } from "react/jsx-runtime";
12245
+ function DialogVerificarOtp2(props) {
11053
12246
  const { open, onClose, payload, onLoginSuccess, credentialsConfig } = props;
11054
- const [code, setCode] = useState22("");
11055
- const [error, setError] = useState22(false);
11056
- const [isLoading, setLoading] = useState22(false);
11057
- const { validarOtpVerificationCode } = useCredentials5(credentialsConfig);
11058
- useEffect17(() => {
12247
+ const [code, setCode] = useState29("");
12248
+ const [error, setError] = useState29(false);
12249
+ const [isLoading, setLoading] = useState29(false);
12250
+ const { validarOtpVerificationCode } = useCredentials6(credentialsConfig);
12251
+ useEffect21(() => {
11059
12252
  if (error) {
11060
12253
  setTimeout(() => {
11061
12254
  setError(false);
@@ -11080,35 +12273,35 @@ function DialogVerificarOtp(props) {
11080
12273
  setLoading(false);
11081
12274
  }
11082
12275
  }
11083
- return /* @__PURE__ */ jsxs72(Dialog_default.Root, { open, onClose: (_) => onClose(), maxWidth: "xs", children: [
11084
- /* @__PURE__ */ jsxs72(Dialog_default.Header, { children: [
11085
- /* @__PURE__ */ jsx160(Dialog_default.Title, { children: "Entrar com senha tempor\xE1ria" }),
11086
- /* @__PURE__ */ jsx160(Dialog_default.ActionClose, { onClose })
12276
+ return /* @__PURE__ */ jsxs83(Dialog_default.Root, { open, onClose: (_) => onClose(), maxWidth: "xs", children: [
12277
+ /* @__PURE__ */ jsxs83(Dialog_default.Header, { children: [
12278
+ /* @__PURE__ */ jsx173(Dialog_default.Title, { children: "Entrar com senha tempor\xE1ria" }),
12279
+ /* @__PURE__ */ jsx173(Dialog_default.ActionClose, { onClose })
11087
12280
  ] }),
11088
- /* @__PURE__ */ jsx160(Dialog_default.Content, { children: /* @__PURE__ */ jsxs72(
11089
- Stack40,
12281
+ /* @__PURE__ */ jsx173(Dialog_default.Content, { children: /* @__PURE__ */ jsxs83(
12282
+ Stack48,
11090
12283
  {
11091
12284
  spacing: 2,
11092
12285
  justifyContent: "center",
11093
12286
  alignContent: "center",
11094
12287
  alignItems: "center",
11095
12288
  children: [
11096
- /* @__PURE__ */ jsx160(
11097
- Typography22,
12289
+ /* @__PURE__ */ jsx173(
12290
+ Typography30,
11098
12291
  {
11099
12292
  variant: "subtitle1",
11100
12293
  sx: { fontWeight: "bolder", fontSize: "11pt" },
11101
12294
  children: "\u{1F510} Digite a senha tempor\xE1ria para acessar sua conta"
11102
12295
  }
11103
12296
  ),
11104
- /* @__PURE__ */ jsxs72(Typography22, { variant: "body1", sx: { fontSize: "10pt" }, children: [
12297
+ /* @__PURE__ */ jsxs83(Typography30, { variant: "body1", sx: { fontSize: "10pt" }, children: [
11105
12298
  "Enviamos uma senha tempor\xE1ria para ",
11106
- /* @__PURE__ */ jsx160("b", { children: payload.target }),
12299
+ /* @__PURE__ */ jsx173("b", { children: payload.target }),
11107
12300
  ". ",
11108
- /* @__PURE__ */ jsx160("br", {}),
12301
+ /* @__PURE__ */ jsx173("br", {}),
11109
12302
  "Digite o c\xF3digo abaixo para acessar sua conta."
11110
12303
  ] }),
11111
- /* @__PURE__ */ jsx160(
12304
+ /* @__PURE__ */ jsx173(
11112
12305
  VerificationCodeInput,
11113
12306
  {
11114
12307
  value: code,
@@ -11117,13 +12310,13 @@ function DialogVerificarOtp(props) {
11117
12310
  }
11118
12311
  }
11119
12312
  ),
11120
- error && /* @__PURE__ */ jsx160(Alert6, { sx: { flexGrow: 1 }, severity: "error", children: error })
12313
+ error && /* @__PURE__ */ jsx173(Alert11, { sx: { flexGrow: 1 }, severity: "error", children: error })
11121
12314
  ]
11122
12315
  }
11123
12316
  ) }),
11124
- /* @__PURE__ */ jsx160(Dialog_default.Footer, { children: /* @__PURE__ */ jsxs72(Dialog_default.Actions, { children: [
11125
- /* @__PURE__ */ jsx160(Dialog_default.ActionCancelar, { onClick: () => onClose() }),
11126
- /* @__PURE__ */ jsx160(
12317
+ /* @__PURE__ */ jsx173(Dialog_default.Footer, { children: /* @__PURE__ */ jsxs83(Dialog_default.Actions, { children: [
12318
+ /* @__PURE__ */ jsx173(Dialog_default.ActionCancelar, { onClick: () => onClose() }),
12319
+ /* @__PURE__ */ jsx173(
11127
12320
  Dialog_default.ActionSalvar,
11128
12321
  {
11129
12322
  label: "Entrar",
@@ -11137,19 +12330,19 @@ function DialogVerificarOtp(props) {
11137
12330
  }
11138
12331
 
11139
12332
  // src/MioAuth/components/OtpForm/index.tsx
11140
- import { Fragment as Fragment10, jsx as jsx161, jsxs as jsxs73 } from "react/jsx-runtime";
11141
- var contatoSchema = create$3().shape({
11142
- contato: create$6().when("$tipo", ([tipo], schema6) => {
11143
- return tipo === "otp-email" ? schema6.email("E-mail inv\xE1lido").required("Informe o e-mail") : schema6.matches(/^\+?[1-9]\d{7,14}$/, "N\xFAmero de WhatsApp inv\xE1lido").required("Informe o WhatsApp");
12333
+ import { Fragment as Fragment11, jsx as jsx174, jsxs as jsxs84 } from "react/jsx-runtime";
12334
+ var contatoSchema2 = create$3().shape({
12335
+ contato: create$6().when("$tipo", ([tipo], schema9) => {
12336
+ return tipo === "otp-email" ? schema9.email("E-mail inv\xE1lido").required("Informe o e-mail") : schema9.matches(/^\+?[1-9]\d{7,14}$/, "N\xFAmero de WhatsApp inv\xE1lido").required("Informe o WhatsApp");
11144
12337
  })
11145
12338
  });
11146
- function OtpForm(props) {
12339
+ function OtpForm2(props) {
11147
12340
  const { tipo, credentialsConfig, onLoginSuccess, onLoginClick } = props;
11148
- const [isLoading, setLoading] = useState23(false);
11149
- const [error, setError] = useState23(false);
11150
- const { gerarOtpVerificationCode } = useCredentials6(credentialsConfig);
11151
- const { handleChange, changeValue, data, validate, validationErrors } = useForm2({ contato: "" }, contatoSchema);
11152
- const [isOpenVerificar, setOpenVerificar] = useState23(false);
12341
+ const [isLoading, setLoading] = useState30(false);
12342
+ const [error, setError] = useState30(false);
12343
+ const { gerarOtpVerificationCode } = useCredentials7(credentialsConfig);
12344
+ const { handleChange, changeValue, data, validate, validationErrors } = useForm4({ contato: "" }, contatoSchema2);
12345
+ const [isOpenVerificar, setOpenVerificar] = useState30(false);
11153
12346
  const handleSubmit = async (e) => {
11154
12347
  e.preventDefault();
11155
12348
  validate(
@@ -11171,11 +12364,11 @@ function OtpForm(props) {
11171
12364
  { context: { tipo } }
11172
12365
  );
11173
12366
  };
11174
- return /* @__PURE__ */ jsxs73(Fragment10, { children: [
11175
- /* @__PURE__ */ jsx161("form", { onSubmit: handleSubmit, children: /* @__PURE__ */ jsxs73(Stack41, { spacing: 2, children: [
11176
- /* @__PURE__ */ jsx161(Typography23, { variant: "subtitle2", children: tipo === "otp-email" ? " Informe seu e-mail para receber um c\xF3digo de acesso" : "Informe seu n\xFAmero de WhatsApp para receber um c\xF3digo de acesso" }),
11177
- tipo === "otp-email" && /* @__PURE__ */ jsx161(
11178
- TextField11,
12367
+ return /* @__PURE__ */ jsxs84(Fragment11, { children: [
12368
+ /* @__PURE__ */ jsx174("form", { onSubmit: handleSubmit, children: /* @__PURE__ */ jsxs84(Stack49, { spacing: 2, children: [
12369
+ /* @__PURE__ */ jsx174(Typography31, { variant: "subtitle2", children: tipo === "otp-email" ? " Informe seu e-mail para receber um c\xF3digo de acesso" : "Informe seu n\xFAmero de WhatsApp para receber um c\xF3digo de acesso" }),
12370
+ tipo === "otp-email" && /* @__PURE__ */ jsx174(
12371
+ TextField15,
11179
12372
  {
11180
12373
  autoFocus: true,
11181
12374
  name: "contato",
@@ -11186,7 +12379,7 @@ function OtpForm(props) {
11186
12379
  ...validationErrors("contato")
11187
12380
  }
11188
12381
  ),
11189
- tipo === "otp-whatsapp" && /* @__PURE__ */ jsx161(
12382
+ tipo === "otp-whatsapp" && /* @__PURE__ */ jsx174(
11190
12383
  WhatsAppTextField,
11191
12384
  {
11192
12385
  autoFocus: true,
@@ -11200,8 +12393,8 @@ function OtpForm(props) {
11200
12393
  ...validationErrors("contato")
11201
12394
  }
11202
12395
  ),
11203
- /* @__PURE__ */ jsxs73(Stack41, { children: [
11204
- /* @__PURE__ */ jsx161(
12396
+ /* @__PURE__ */ jsxs84(Stack49, { children: [
12397
+ /* @__PURE__ */ jsx174(
11205
12398
  Button_default,
11206
12399
  {
11207
12400
  isLoading,
@@ -11211,7 +12404,7 @@ function OtpForm(props) {
11211
12404
  children: "Enviar c\xF3digo"
11212
12405
  }
11213
12406
  ),
11214
- /* @__PURE__ */ jsxs73(
12407
+ /* @__PURE__ */ jsxs84(
11215
12408
  ButtonContainer,
11216
12409
  {
11217
12410
  sx: {
@@ -11221,7 +12414,7 @@ function OtpForm(props) {
11221
12414
  marginTop: 1
11222
12415
  },
11223
12416
  children: [
11224
- /* @__PURE__ */ jsx161(
12417
+ /* @__PURE__ */ jsx174(
11225
12418
  Button_default,
11226
12419
  {
11227
12420
  onClick: onLoginClick,
@@ -11235,23 +12428,23 @@ function OtpForm(props) {
11235
12428
  children: "Voltar para o Login"
11236
12429
  }
11237
12430
  ),
11238
- /* @__PURE__ */ jsx161(
12431
+ /* @__PURE__ */ jsx174(
11239
12432
  "a",
11240
12433
  {
11241
12434
  href: "https://datacsistemashelp.zendesk.com/hc/pt-br/articles/36489079108756-Login-OTP-via-WhatsApp",
11242
12435
  target: "_blank",
11243
12436
  rel: "noopener noreferrer",
11244
- children: /* @__PURE__ */ jsx161(IconButton14, { children: /* @__PURE__ */ jsx161(HelpOutline, { color: "primary" }) })
12437
+ children: /* @__PURE__ */ jsx174(IconButton15, { children: /* @__PURE__ */ jsx174(HelpOutline2, { color: "primary" }) })
11245
12438
  }
11246
12439
  )
11247
12440
  ]
11248
12441
  }
11249
12442
  )
11250
12443
  ] }),
11251
- error && /* @__PURE__ */ jsx161(Alert7, { severity: "error", children: error })
12444
+ error && /* @__PURE__ */ jsx174(Alert12, { severity: "error", children: error })
11252
12445
  ] }) }),
11253
- /* @__PURE__ */ jsx161(
11254
- DialogVerificarOtp,
12446
+ /* @__PURE__ */ jsx174(
12447
+ DialogVerificarOtp2,
11255
12448
  {
11256
12449
  onLoginSuccess,
11257
12450
  open: isOpenVerificar,
@@ -11269,15 +12462,15 @@ function OtpForm(props) {
11269
12462
  }
11270
12463
 
11271
12464
  // src/MioAuth/components/LoginSection/index.tsx
11272
- import { jsx as jsx162, jsxs as jsxs74 } from "react/jsx-runtime";
11273
- var pageLabelMap = {
12465
+ import { jsx as jsx175, jsxs as jsxs85 } from "react/jsx-runtime";
12466
+ var pageLabelMap2 = {
11274
12467
  login: "Acesse sua conta",
11275
12468
  licensa: "Selecione a licen\xE7a",
11276
12469
  "esqueci-senha": "Recupere a sua senha",
11277
12470
  "otp-email": "Entrar com senha tempor\xE1ria (E-mail)",
11278
12471
  "otp-whatsapp": "Entrar com senha tempor\xE1ria (WhatsApp)"
11279
12472
  };
11280
- function LoginSection(props) {
12473
+ function LoginSection2(props) {
11281
12474
  const {
11282
12475
  credentialsConfig,
11283
12476
  onLoginSuccess,
@@ -11285,12 +12478,12 @@ function LoginSection(props) {
11285
12478
  onAlreadyLogged,
11286
12479
  appName
11287
12480
  } = props;
11288
- const [loginData, setLoginData] = useState24();
11289
- const { selecionarLicenca, isAuthenticated } = useCredentials7(credentialsConfig);
11290
- const [view, setView] = useState24("login");
11291
- const theme2 = useTheme9();
11292
- const fullScreen = useMediaQuery4(theme2.breakpoints.up("md"));
11293
- useEffect18(() => {
12481
+ const [loginData, setLoginData] = useState31();
12482
+ const { selecionarLicenca, isAuthenticated } = useCredentials8(credentialsConfig);
12483
+ const [view, setView] = useState31("login");
12484
+ const theme2 = useTheme14();
12485
+ const fullScreen = useMediaQuery8(theme2.breakpoints.up("md"));
12486
+ useEffect22(() => {
11294
12487
  if (isAuthenticated && onAlreadyLogged) {
11295
12488
  onAlreadyLogged();
11296
12489
  }
@@ -11326,12 +12519,12 @@ function LoginSection(props) {
11326
12519
  function handleExibirLogin() {
11327
12520
  setView("login");
11328
12521
  }
11329
- const pageLabel = pageLabelMap[view];
11330
- return /* @__PURE__ */ jsxs74(Stack42, { children: [
11331
- /* @__PURE__ */ jsx162(Header, { label: appName, subTitle: pageLabel }),
11332
- /* @__PURE__ */ jsxs74(Box21, { sx: { marginTop: 2 }, children: [
11333
- view === "login" && /* @__PURE__ */ jsx162(
11334
- LoginForm,
12522
+ const pageLabel = pageLabelMap2[view];
12523
+ return /* @__PURE__ */ jsxs85(Stack50, { children: [
12524
+ /* @__PURE__ */ jsx175(Header, { label: appName, subTitle: pageLabel }),
12525
+ /* @__PURE__ */ jsxs85(Box26, { sx: { marginTop: 2 }, children: [
12526
+ view === "login" && /* @__PURE__ */ jsx175(
12527
+ LoginForm2,
11335
12528
  {
11336
12529
  credentialsConfig,
11337
12530
  onLoginSuccess: handleLoginSuccess,
@@ -11339,8 +12532,8 @@ function LoginSection(props) {
11339
12532
  onOptionsClick: handleOptionsClick
11340
12533
  }
11341
12534
  ),
11342
- view === "licensa" && /* @__PURE__ */ jsx162(
11343
- LicencaForm,
12535
+ view === "licensa" && /* @__PURE__ */ jsx175(
12536
+ LicencaForm2,
11344
12537
  {
11345
12538
  loginData,
11346
12539
  credentialsConfig,
@@ -11348,15 +12541,15 @@ function LoginSection(props) {
11348
12541
  onLoginFailed
11349
12542
  }
11350
12543
  ),
11351
- view === "esqueci-senha" && /* @__PURE__ */ jsx162(
11352
- EsqueciSenhaForm,
12544
+ view === "esqueci-senha" && /* @__PURE__ */ jsx175(
12545
+ EsqueciSenhaForm2,
11353
12546
  {
11354
12547
  onLoginClick: handleExibirLogin,
11355
12548
  credentialsConfig
11356
12549
  }
11357
12550
  ),
11358
- view === "otp-email" && /* @__PURE__ */ jsx162(
11359
- OtpForm,
12551
+ view === "otp-email" && /* @__PURE__ */ jsx175(
12552
+ OtpForm2,
11360
12553
  {
11361
12554
  onLoginClick: handleExibirLogin,
11362
12555
  onLoginSuccess: handleLoginSuccess,
@@ -11364,8 +12557,8 @@ function LoginSection(props) {
11364
12557
  credentialsConfig
11365
12558
  }
11366
12559
  ),
11367
- view === "otp-whatsapp" && /* @__PURE__ */ jsx162(
11368
- OtpForm,
12560
+ view === "otp-whatsapp" && /* @__PURE__ */ jsx175(
12561
+ OtpForm2,
11369
12562
  {
11370
12563
  onLoginClick: handleExibirLogin,
11371
12564
  onLoginSuccess: handleLoginSuccess,
@@ -11378,14 +12571,14 @@ function LoginSection(props) {
11378
12571
  }
11379
12572
 
11380
12573
  // src/MioAuth/components/DefaultBanner/index.tsx
11381
- import ArrowRight from "@mui/icons-material/ArrowRight";
11382
- import { Link, Stack as Stack43, Typography as Typography25, useMediaQuery as useMediaQuery5, useTheme as useTheme10 } from "@mui/material";
11383
- import { jsx as jsx163, jsxs as jsxs75 } from "react/jsx-runtime";
11384
- function DefaultBanner() {
11385
- const theme2 = useTheme10();
11386
- const fullScreen = useMediaQuery5(theme2.breakpoints.up("md"));
11387
- return /* @__PURE__ */ jsx163(
11388
- Stack43,
12574
+ import ArrowRight2 from "@mui/icons-material/ArrowRight";
12575
+ import { Link as Link2, Stack as Stack51, Typography as Typography33, useMediaQuery as useMediaQuery9, useTheme as useTheme15 } from "@mui/material";
12576
+ import { jsx as jsx176, jsxs as jsxs86 } from "react/jsx-runtime";
12577
+ function DefaultBanner2() {
12578
+ const theme2 = useTheme15();
12579
+ const fullScreen = useMediaQuery9(theme2.breakpoints.up("md"));
12580
+ return /* @__PURE__ */ jsx176(
12581
+ Stack51,
11389
12582
  {
11390
12583
  component: "section",
11391
12584
  display: fullScreen ? "flex" : "none",
@@ -11399,9 +12592,9 @@ function DefaultBanner() {
11399
12592
  backgroundPosition: "right",
11400
12593
  backgroundRepeat: "no-repeat"
11401
12594
  },
11402
- children: /* @__PURE__ */ jsxs75(Stack43, { padding: "2rem", children: [
11403
- /* @__PURE__ */ jsx163(
11404
- Typography25,
12595
+ children: /* @__PURE__ */ jsxs86(Stack51, { padding: "2rem", children: [
12596
+ /* @__PURE__ */ jsx176(
12597
+ Typography33,
11405
12598
  {
11406
12599
  component: "h1",
11407
12600
  fontSize: "3.5rem",
@@ -11413,8 +12606,8 @@ function DefaultBanner() {
11413
12606
  children: "Inova\xE7\xE3o e tecnologia"
11414
12607
  }
11415
12608
  ),
11416
- /* @__PURE__ */ jsx163(
11417
- Typography25,
12609
+ /* @__PURE__ */ jsx176(
12610
+ Typography33,
11418
12611
  {
11419
12612
  component: "h2",
11420
12613
  color: "white",
@@ -11426,8 +12619,8 @@ function DefaultBanner() {
11426
12619
  children: "para empresas de resultado"
11427
12620
  }
11428
12621
  ),
11429
- /* @__PURE__ */ jsx163(
11430
- Typography25,
12622
+ /* @__PURE__ */ jsx176(
12623
+ Typography33,
11431
12624
  {
11432
12625
  component: "span",
11433
12626
  fontSize: "1.25rem",
@@ -11441,7 +12634,7 @@ function DefaultBanner() {
11441
12634
  children: "Mais de 30 anos de exist\xEAncia e muitas hist\xF3rias de sucesso."
11442
12635
  }
11443
12636
  ),
11444
- /* @__PURE__ */ jsx163(Link, { href: "https://site.datac.com.br/services/", target: "_blank", children: /* @__PURE__ */ jsxs75(
12637
+ /* @__PURE__ */ jsx176(Link2, { href: "https://site.datac.com.br/services/", target: "_blank", children: /* @__PURE__ */ jsxs86(
11445
12638
  Button_default,
11446
12639
  {
11447
12640
  component: "a",
@@ -11464,8 +12657,8 @@ function DefaultBanner() {
11464
12657
  },
11465
12658
  children: [
11466
12659
  "Conhe\xE7a nossos produtos",
11467
- /* @__PURE__ */ jsx163(
11468
- ArrowRight,
12660
+ /* @__PURE__ */ jsx176(
12661
+ ArrowRight2,
11469
12662
  {
11470
12663
  fontSize: "medium",
11471
12664
  sx: { color: (theme3) => theme3.palette.success.light }
@@ -11480,12 +12673,12 @@ function DefaultBanner() {
11480
12673
  }
11481
12674
 
11482
12675
  // src/MioAuth/index.tsx
11483
- import { jsx as jsx164, jsxs as jsxs76 } from "react/jsx-runtime";
11484
- function LoginContainer({ children }) {
11485
- const theme2 = useTheme11();
11486
- const fullScreen = useMediaQuery6(theme2.breakpoints.up("md"));
11487
- return /* @__PURE__ */ jsxs76(
11488
- Stack44,
12676
+ import { jsx as jsx177, jsxs as jsxs87 } from "react/jsx-runtime";
12677
+ function LoginContainer2({ children }) {
12678
+ const theme2 = useTheme16();
12679
+ const fullScreen = useMediaQuery10(theme2.breakpoints.up("md"));
12680
+ return /* @__PURE__ */ jsxs87(
12681
+ Stack52,
11489
12682
  {
11490
12683
  component: "section",
11491
12684
  width: fullScreen ? "46%" : "100%",
@@ -11495,17 +12688,17 @@ function LoginContainer({ children }) {
11495
12688
  alignItems: "center",
11496
12689
  padding: "2rem",
11497
12690
  children: [
11498
- /* @__PURE__ */ jsx164(Stack44, { width: "100%", maxWidth: "28rem", margin: "auto 0", children }),
11499
- /* @__PURE__ */ jsxs76(Stack44, { direction: "row", alignItems: "center", marginBottom: -3, children: [
11500
- /* @__PURE__ */ jsx164(
12691
+ /* @__PURE__ */ jsx177(Stack52, { width: "100%", maxWidth: "28rem", margin: "auto 0", children }),
12692
+ /* @__PURE__ */ jsxs87(Stack52, { direction: "row", alignItems: "center", marginBottom: -3, children: [
12693
+ /* @__PURE__ */ jsx177(
11501
12694
  "img",
11502
12695
  {
11503
12696
  width: "60",
11504
12697
  src: "https://datac-site-assets.s3.sa-east-1.amazonaws.com/logomarca.png"
11505
12698
  }
11506
12699
  ),
11507
- /* @__PURE__ */ jsx164(
11508
- Typography26,
12700
+ /* @__PURE__ */ jsx177(
12701
+ Typography34,
11509
12702
  {
11510
12703
  variant: "body1",
11511
12704
  component: "span",
@@ -11521,25 +12714,25 @@ function LoginContainer({ children }) {
11521
12714
  }
11522
12715
  function MioAuth(props) {
11523
12716
  const { banner, loginSection } = props;
11524
- return /* @__PURE__ */ jsxs76(Stack44, { component: "main", direction: "row", height: "100vh", children: [
11525
- banner ? /* @__PURE__ */ jsx164(BannerSection, { children: banner }) : /* @__PURE__ */ jsx164(DefaultBanner, {}),
11526
- /* @__PURE__ */ jsx164(LoginContainer, { children: loginSection ? loginSection : /* @__PURE__ */ jsx164(LoginSection, { ...props }) })
12717
+ return /* @__PURE__ */ jsxs87(Stack52, { component: "main", direction: "row", height: "100vh", children: [
12718
+ banner ? /* @__PURE__ */ jsx177(BannerSection, { children: banner }) : /* @__PURE__ */ jsx177(DefaultBanner2, {}),
12719
+ /* @__PURE__ */ jsx177(LoginContainer2, { children: loginSection ? loginSection : /* @__PURE__ */ jsx177(LoginSection2, { ...props }) })
11527
12720
  ] });
11528
12721
  }
11529
12722
 
11530
12723
  // src/AlterarLicenca/index.tsx
11531
12724
  import { formatDocumento as formatDocumento2, normalizeText } from "@data-c/hooks";
11532
12725
  import ArrowDropDown from "@mui/icons-material/ArrowDropDown";
11533
- import { Button as Button12, Stack as Stack45, Typography as Typography27 } from "@mui/material";
11534
- import { useState as useState25 } from "react";
11535
- import { jsx as jsx165, jsxs as jsxs77 } from "react/jsx-runtime";
12726
+ import { Button as Button12, Stack as Stack53, Typography as Typography35 } from "@mui/material";
12727
+ import { useState as useState32 } from "react";
12728
+ import { jsx as jsx178, jsxs as jsxs88 } from "react/jsx-runtime";
11536
12729
  function AlterarLicenca(props) {
11537
12730
  const { licencas, licencaSelecionada, onAlterarLicenca } = props;
11538
- const [query, setQuery] = useState25("");
12731
+ const [query, setQuery] = useState32("");
11539
12732
  if (licencas.length === 0)
11540
- return /* @__PURE__ */ jsxs77(Stack45, { overflow: "hidden", children: [
11541
- /* @__PURE__ */ jsx165(Typography27, { overflow: "hidden", textOverflow: "ellipsis", variant: "body1", children: licencaSelecionada.nome }),
11542
- /* @__PURE__ */ jsx165(Typography27, { overflow: "hidden", textOverflow: "ellipsis", variant: "body2", children: formatDocumento2(licencaSelecionada.documento) })
12733
+ return /* @__PURE__ */ jsxs88(Stack53, { overflow: "hidden", children: [
12734
+ /* @__PURE__ */ jsx178(Typography35, { overflow: "hidden", textOverflow: "ellipsis", variant: "body1", children: licencaSelecionada.nome }),
12735
+ /* @__PURE__ */ jsx178(Typography35, { overflow: "hidden", textOverflow: "ellipsis", variant: "body2", children: formatDocumento2(licencaSelecionada.documento) })
11543
12736
  ] });
11544
12737
  function handleSearch(val) {
11545
12738
  setQuery(val);
@@ -11549,8 +12742,8 @@ function AlterarLicenca(props) {
11549
12742
  (field) => normalizeText(String(item[field])).includes(normalizeText(query))
11550
12743
  )
11551
12744
  ) : licencas;
11552
- return /* @__PURE__ */ jsxs77(Popover_default.Root, { children: [
11553
- /* @__PURE__ */ jsx165(Popover_default.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs77(
12745
+ return /* @__PURE__ */ jsxs88(Popover_default.Root, { children: [
12746
+ /* @__PURE__ */ jsx178(Popover_default.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs88(
11554
12747
  Button12,
11555
12748
  {
11556
12749
  sx: {
@@ -11559,11 +12752,11 @@ function AlterarLicenca(props) {
11559
12752
  variant: "text",
11560
12753
  children: [
11561
12754
  licencaSelecionada.nome,
11562
- /* @__PURE__ */ jsx165(ArrowDropDown, {})
12755
+ /* @__PURE__ */ jsx178(ArrowDropDown, {})
11563
12756
  ]
11564
12757
  }
11565
12758
  ) }),
11566
- /* @__PURE__ */ jsx165(
12759
+ /* @__PURE__ */ jsx178(
11567
12760
  Popover_default.Content,
11568
12761
  {
11569
12762
  sx: {
@@ -11574,7 +12767,7 @@ function AlterarLicenca(props) {
11574
12767
  p: 0.5
11575
12768
  }
11576
12769
  },
11577
- children: /* @__PURE__ */ jsxs77(
12770
+ children: /* @__PURE__ */ jsxs88(
11578
12771
  List_default.Root,
11579
12772
  {
11580
12773
  sx: {
@@ -11584,16 +12777,16 @@ function AlterarLicenca(props) {
11584
12777
  overflow: "auto"
11585
12778
  },
11586
12779
  children: [
11587
- /* @__PURE__ */ jsx165(SearchTextField, { autoFocus: true, onSearch: handleSearch }),
11588
- /* @__PURE__ */ jsx165(List_default.Content, { children: filteredData.map((e) => {
11589
- return /* @__PURE__ */ jsx165(Popover_default.Close, { asChild: true, children: /* @__PURE__ */ jsx165(
12780
+ /* @__PURE__ */ jsx178(SearchTextField, { autoFocus: true, onSearch: handleSearch }),
12781
+ /* @__PURE__ */ jsx178(List_default.Content, { children: filteredData.map((e) => {
12782
+ return /* @__PURE__ */ jsx178(Popover_default.Close, { asChild: true, children: /* @__PURE__ */ jsx178(
11590
12783
  List_default.Item,
11591
12784
  {
11592
12785
  selected: licencaSelecionada.uuid === e.uuid,
11593
12786
  onClick: () => onAlterarLicenca(e),
11594
- children: /* @__PURE__ */ jsxs77(Stack45, { children: [
11595
- /* @__PURE__ */ jsx165(Typography27, { variant: "body1", textOverflow: "ellipsis", children: e.nome }),
11596
- /* @__PURE__ */ jsx165(Typography27, { variant: "body2", textOverflow: "ellipsis", children: formatDocumento2(e.documento) })
12787
+ children: /* @__PURE__ */ jsxs88(Stack53, { children: [
12788
+ /* @__PURE__ */ jsx178(Typography35, { variant: "body1", textOverflow: "ellipsis", children: e.nome }),
12789
+ /* @__PURE__ */ jsx178(Typography35, { variant: "body2", textOverflow: "ellipsis", children: formatDocumento2(e.documento) })
11597
12790
  ] })
11598
12791
  }
11599
12792
  ) }, e.uuid);
@@ -11614,15 +12807,15 @@ import { styled as styled9 } from "@mui/material/styles";
11614
12807
  import { List as List5 } from "@mui/material";
11615
12808
 
11616
12809
  // src/DrawerMenu/components/FullMenu/components/FullMenuItem/index.tsx
11617
- import { useState as useState26 } from "react";
12810
+ import { useState as useState33 } from "react";
11618
12811
  import ExpandLess from "@mui/icons-material/ExpandLess";
11619
12812
  import ExpandMore from "@mui/icons-material/ExpandMore";
11620
- import { Box as Box22, Collapse as Collapse3, Icon as Icon4, ListItemText as ListItemText3 } from "@mui/material";
12813
+ import { Box as Box27, Collapse as Collapse3, Icon as Icon4, ListItemText as ListItemText3 } from "@mui/material";
11621
12814
 
11622
12815
  // src/DrawerMenu/components/MenuItem/index.tsx
11623
12816
  import { MenuItem as MuiMenuItem } from "@mui/material";
11624
12817
  import { styled as styled8 } from "@mui/material/styles";
11625
- import { jsx as jsx166 } from "react/jsx-runtime";
12818
+ import { jsx as jsx179 } from "react/jsx-runtime";
11626
12819
  var StyledMuiMenuItem = styled8(
11627
12820
  MuiMenuItem,
11628
12821
  {}
@@ -11658,14 +12851,14 @@ var StyledMuiMenuItem = styled8(
11658
12851
  fontSize: "24px"
11659
12852
  }
11660
12853
  }));
11661
- var MenuItem7 = (props) => /* @__PURE__ */ jsx166(StyledMuiMenuItem, { ...props });
11662
- var MenuItem_default = MenuItem7;
12854
+ var MenuItem8 = (props) => /* @__PURE__ */ jsx179(StyledMuiMenuItem, { ...props });
12855
+ var MenuItem_default = MenuItem8;
11663
12856
 
11664
12857
  // src/DrawerMenu/components/FullMenu/components/FullMenuItem/index.tsx
11665
- import { jsx as jsx167, jsxs as jsxs78 } from "react/jsx-runtime";
12858
+ import { jsx as jsx180, jsxs as jsxs89 } from "react/jsx-runtime";
11666
12859
  function FullMenuItem2(props) {
11667
12860
  const { menuItem, activeMenu, onMenuClick } = props;
11668
- const [expanded, setExpanded] = useState26(false);
12861
+ const [expanded, setExpanded] = useState33(false);
11669
12862
  if (!menuItem.visible)
11670
12863
  return null;
11671
12864
  const isExpandable = Boolean(
@@ -11674,8 +12867,8 @@ function FullMenuItem2(props) {
11674
12867
  function toggleExpand() {
11675
12868
  setExpanded(!expanded);
11676
12869
  }
11677
- return /* @__PURE__ */ jsxs78(Box22, { children: [
11678
- /* @__PURE__ */ jsxs78(
12870
+ return /* @__PURE__ */ jsxs89(Box27, { children: [
12871
+ /* @__PURE__ */ jsxs89(
11679
12872
  MenuItem_default,
11680
12873
  {
11681
12874
  onClick: () => {
@@ -11687,14 +12880,14 @@ function FullMenuItem2(props) {
11687
12880
  },
11688
12881
  selected: activeMenu === menuItem.link,
11689
12882
  children: [
11690
- !!menuItem.icon && /* @__PURE__ */ jsx167(Icon4, { children: menuItem.icon }),
11691
- /* @__PURE__ */ jsx167(ListItemText3, { primary: menuItem.label }),
11692
- isExpandable && !expanded && /* @__PURE__ */ jsx167(ExpandMore, {}),
11693
- isExpandable && expanded && /* @__PURE__ */ jsx167(ExpandLess, {})
12883
+ !!menuItem.icon && /* @__PURE__ */ jsx180(Icon4, { children: menuItem.icon }),
12884
+ /* @__PURE__ */ jsx180(ListItemText3, { primary: menuItem.label }),
12885
+ isExpandable && !expanded && /* @__PURE__ */ jsx180(ExpandMore, {}),
12886
+ isExpandable && expanded && /* @__PURE__ */ jsx180(ExpandLess, {})
11694
12887
  ]
11695
12888
  }
11696
12889
  ),
11697
- menuItem?.items && /* @__PURE__ */ jsx167(Collapse3, { in: expanded, timeout: "auto", unmountOnExit: true, children: /* @__PURE__ */ jsx167(
12890
+ menuItem?.items && /* @__PURE__ */ jsx180(Collapse3, { in: expanded, timeout: "auto", unmountOnExit: true, children: /* @__PURE__ */ jsx180(
11698
12891
  FullMenu,
11699
12892
  {
11700
12893
  activeMenu,
@@ -11709,11 +12902,11 @@ function FullMenuItem2(props) {
11709
12902
  }
11710
12903
 
11711
12904
  // src/DrawerMenu/components/FullMenu/index.tsx
11712
- import { jsx as jsx168 } from "react/jsx-runtime";
12905
+ import { jsx as jsx181 } from "react/jsx-runtime";
11713
12906
  function FullMenu(props) {
11714
12907
  const { menus, activeMenu, onMenuClick, ...rest } = props;
11715
- return /* @__PURE__ */ jsx168(List5, { component: "nav", disablePadding: true, ...rest, children: menus.map((menuItem) => {
11716
- return /* @__PURE__ */ jsx168(
12908
+ return /* @__PURE__ */ jsx181(List5, { component: "nav", disablePadding: true, ...rest, children: menus.map((menuItem) => {
12909
+ return /* @__PURE__ */ jsx181(
11717
12910
  FullMenuItem2,
11718
12911
  {
11719
12912
  onMenuClick,
@@ -11726,12 +12919,12 @@ function FullMenu(props) {
11726
12919
  }
11727
12920
 
11728
12921
  // src/DrawerMenu/components/MinMenu/index.tsx
11729
- import { useState as useState27 } from "react";
12922
+ import { useState as useState34 } from "react";
11730
12923
  import { List as List6, Icon as Icon5, ListItemIcon as ListItemIcon3, Popper as Popper3 } from "@mui/material";
11731
- import { jsx as jsx169, jsxs as jsxs79 } from "react/jsx-runtime";
12924
+ import { jsx as jsx182, jsxs as jsxs90 } from "react/jsx-runtime";
11732
12925
  function MinMenu(props) {
11733
12926
  const { menus, activeMenu, onMenuClick } = props;
11734
- const [opened, setOpened] = useState27(null);
12927
+ const [opened, setOpened] = useState34(null);
11735
12928
  const handleOpen = (event, id, items) => {
11736
12929
  setOpened({
11737
12930
  element: event.currentTarget,
@@ -11742,10 +12935,10 @@ function MinMenu(props) {
11742
12935
  const handleClose = () => {
11743
12936
  setOpened(null);
11744
12937
  };
11745
- return /* @__PURE__ */ jsx169(List6, { component: "nav", disablePadding: true, children: menus.map((menuItem) => {
12938
+ return /* @__PURE__ */ jsx182(List6, { component: "nav", disablePadding: true, children: menus.map((menuItem) => {
11746
12939
  if (!menuItem.visible)
11747
12940
  return null;
11748
- return /* @__PURE__ */ jsxs79(
12941
+ return /* @__PURE__ */ jsxs90(
11749
12942
  MenuItem_default,
11750
12943
  {
11751
12944
  onMouseEnter: (e) => {
@@ -11765,8 +12958,8 @@ function MinMenu(props) {
11765
12958
  },
11766
12959
  selected: activeMenu === menuItem.link,
11767
12960
  children: [
11768
- /* @__PURE__ */ jsx169(ListItemIcon3, { children: /* @__PURE__ */ jsx169(Icon5, { children: menuItem.icon }) }),
11769
- opened?.id === menuItem.id && /* @__PURE__ */ jsx169(
12961
+ /* @__PURE__ */ jsx182(ListItemIcon3, { children: /* @__PURE__ */ jsx182(Icon5, { children: menuItem.icon }) }),
12962
+ opened?.id === menuItem.id && /* @__PURE__ */ jsx182(
11770
12963
  Popper3,
11771
12964
  {
11772
12965
  sx: {
@@ -11775,7 +12968,7 @@ function MinMenu(props) {
11775
12968
  anchorEl: opened?.element,
11776
12969
  open: Boolean(opened?.element),
11777
12970
  placement: "right-start",
11778
- children: /* @__PURE__ */ jsx169(
12971
+ children: /* @__PURE__ */ jsx182(
11779
12972
  FullMenu,
11780
12973
  {
11781
12974
  activeMenu,
@@ -11800,7 +12993,7 @@ function MinMenu(props) {
11800
12993
  }
11801
12994
 
11802
12995
  // src/DrawerMenu/index.tsx
11803
- import { jsx as jsx170, jsxs as jsxs80 } from "react/jsx-runtime";
12996
+ import { jsx as jsx183, jsxs as jsxs91 } from "react/jsx-runtime";
11804
12997
  var openedMixin2 = (width, theme2) => ({
11805
12998
  width,
11806
12999
  transition: theme2.transitions.create("width", {
@@ -11840,7 +13033,7 @@ var Drawer2 = styled9(MuiDrawer3, {
11840
13033
  }));
11841
13034
  function DrawerMenu(props) {
11842
13035
  const { open, items, width, activeMenu, onMenuClick, toggleMenu, ...rest } = props;
11843
- return /* @__PURE__ */ jsxs80(
13036
+ return /* @__PURE__ */ jsxs91(
11844
13037
  Drawer2,
11845
13038
  {
11846
13039
  width,
@@ -11848,8 +13041,8 @@ function DrawerMenu(props) {
11848
13041
  onClose: () => toggleMenu(false),
11849
13042
  ...rest,
11850
13043
  children: [
11851
- /* @__PURE__ */ jsx170(Toolbar5, {}),
11852
- open && /* @__PURE__ */ jsx170(
13044
+ /* @__PURE__ */ jsx183(Toolbar5, {}),
13045
+ open && /* @__PURE__ */ jsx183(
11853
13046
  FullMenu,
11854
13047
  {
11855
13048
  onMenuClick,
@@ -11857,7 +13050,7 @@ function DrawerMenu(props) {
11857
13050
  menus: items
11858
13051
  }
11859
13052
  ),
11860
- !open && /* @__PURE__ */ jsx170(
13053
+ !open && /* @__PURE__ */ jsx183(
11861
13054
  MinMenu,
11862
13055
  {
11863
13056
  onMenuClick,
@@ -11871,11 +13064,11 @@ function DrawerMenu(props) {
11871
13064
  }
11872
13065
 
11873
13066
  // src/Content/index.tsx
11874
- import { Box as Box23 } from "@mui/material";
11875
- import { jsx as jsx171 } from "react/jsx-runtime";
13067
+ import { Box as Box28 } from "@mui/material";
13068
+ import { jsx as jsx184 } from "react/jsx-runtime";
11876
13069
  function Content2(props) {
11877
- return /* @__PURE__ */ jsx171(
11878
- Box23,
13070
+ return /* @__PURE__ */ jsx184(
13071
+ Box28,
11879
13072
  {
11880
13073
  m: 2,
11881
13074
  sx: {
@@ -11891,10 +13084,10 @@ function Content2(props) {
11891
13084
  // src/Avatar/index.tsx
11892
13085
  import { useUserContext } from "@data-c/providers";
11893
13086
  import MuiAvatar from "@mui/material/Avatar";
11894
- import { jsx as jsx172 } from "react/jsx-runtime";
13087
+ import { jsx as jsx185 } from "react/jsx-runtime";
11895
13088
  function Avatar(props) {
11896
13089
  const { user } = useUserContext();
11897
- return /* @__PURE__ */ jsx172(
13090
+ return /* @__PURE__ */ jsx185(
11898
13091
  MuiAvatar,
11899
13092
  {
11900
13093
  src: user?.avatarUrl,
@@ -11905,18 +13098,18 @@ function Avatar(props) {
11905
13098
  }
11906
13099
 
11907
13100
  // src/Profile/index.tsx
11908
- import { Stack as Stack50, Tab, Tabs } from "@mui/material";
11909
- import { useState as useState32 } from "react";
13101
+ import { Stack as Stack58, Tab, Tabs } from "@mui/material";
13102
+ import { useState as useState39 } from "react";
11910
13103
 
11911
13104
  // src/Profile/TabPanel.tsx
11912
- import { Box as Box24 } from "@mui/material";
11913
- import { jsx as jsx173 } from "react/jsx-runtime";
13105
+ import { Box as Box29 } from "@mui/material";
13106
+ import { jsx as jsx186 } from "react/jsx-runtime";
11914
13107
  function TabPanel(props) {
11915
13108
  const { children, value, index, ...others } = props;
11916
13109
  if (value !== index)
11917
13110
  return null;
11918
- return /* @__PURE__ */ jsx173(
11919
- Box24,
13111
+ return /* @__PURE__ */ jsx186(
13112
+ Box29,
11920
13113
  {
11921
13114
  role: "tabpanel",
11922
13115
  hidden: value !== index,
@@ -11935,21 +13128,21 @@ function TabPanel(props) {
11935
13128
 
11936
13129
  // src/Profile/MinhaConta.tsx
11937
13130
  import {
11938
- useCredentials as useCredentials8,
11939
- useForm as useForm3
13131
+ useCredentials as useCredentials9,
13132
+ useForm as useForm5
11940
13133
  } from "@data-c/hooks";
11941
13134
  import {
11942
- Alert as Alert8,
11943
- Divider as Divider5,
11944
- Grid as Grid2,
11945
- Stack as Stack47,
11946
- TextField as TextField12,
11947
- Typography as Typography28
13135
+ Alert as Alert13,
13136
+ Divider as Divider7,
13137
+ Grid as Grid3,
13138
+ Stack as Stack55,
13139
+ TextField as TextField16,
13140
+ Typography as Typography36
11948
13141
  } from "@mui/material";
11949
- import { useEffect as useEffect19, useState as useState29 } from "react";
13142
+ import { useEffect as useEffect23, useState as useState36 } from "react";
11950
13143
 
11951
13144
  // src/Profile/AvatarUploader.tsx
11952
- import { useState as useState28, useCallback as useCallback5 } from "react";
13145
+ import { useState as useState35, useCallback as useCallback5 } from "react";
11953
13146
  import Cropper from "react-easy-crop";
11954
13147
  import Slider from "@mui/material/Slider";
11955
13148
  import Button13 from "@mui/material/Button";
@@ -11985,15 +13178,15 @@ function getCroppedImg(imageSrc, crop) {
11985
13178
  }
11986
13179
 
11987
13180
  // src/Profile/AvatarUploader.tsx
11988
- import { Stack as Stack46 } from "@mui/material";
11989
- import { jsx as jsx174, jsxs as jsxs81 } from "react/jsx-runtime";
13181
+ import { Stack as Stack54 } from "@mui/material";
13182
+ import { jsx as jsx187, jsxs as jsxs92 } from "react/jsx-runtime";
11990
13183
  var AvatarUploader = ({ onSave, src }) => {
11991
- const [image, setImage] = useState28(null);
11992
- const [croppedImage, setCroppedImage] = useState28(null);
11993
- const [crop, setCrop] = useState28({ x: 0, y: 0 });
11994
- const [zoom, setZoom] = useState28(1);
11995
- const [croppedAreaPixels, setCroppedAreaPixels] = useState28(null);
11996
- const [open, setOpen] = useState28(false);
13184
+ const [image, setImage] = useState35(null);
13185
+ const [croppedImage, setCroppedImage] = useState35(null);
13186
+ const [crop, setCrop] = useState35({ x: 0, y: 0 });
13187
+ const [zoom, setZoom] = useState35(1);
13188
+ const [croppedAreaPixels, setCroppedAreaPixels] = useState35(null);
13189
+ const [open, setOpen] = useState35(false);
11997
13190
  const onCropComplete = useCallback5((_, croppedAreaPixels2) => {
11998
13191
  setCroppedAreaPixels(croppedAreaPixels2);
11999
13192
  }, []);
@@ -12018,23 +13211,23 @@ var AvatarUploader = ({ onSave, src }) => {
12018
13211
  };
12019
13212
  reader.readAsDataURL(file);
12020
13213
  };
12021
- return /* @__PURE__ */ jsxs81(Stack46, { direction: "row", spacing: 2, alignItems: "center", children: [
12022
- croppedImage ? /* @__PURE__ */ jsx174(
13214
+ return /* @__PURE__ */ jsxs92(Stack54, { direction: "row", spacing: 2, alignItems: "center", children: [
13215
+ croppedImage ? /* @__PURE__ */ jsx187(
12023
13216
  Avatar2,
12024
13217
  {
12025
13218
  src: croppedImage,
12026
13219
  alt: "Preview",
12027
13220
  sx: { width: 64, height: 64, margin: "auto", mb: 2 }
12028
13221
  }
12029
- ) : /* @__PURE__ */ jsx174(
13222
+ ) : /* @__PURE__ */ jsx187(
12030
13223
  Avatar2,
12031
13224
  {
12032
13225
  src,
12033
13226
  sx: { width: 64, height: 64, margin: "auto", mb: 2 }
12034
13227
  }
12035
13228
  ),
12036
- /* @__PURE__ */ jsxs81("label", { children: [
12037
- /* @__PURE__ */ jsx174(
13229
+ /* @__PURE__ */ jsxs92("label", { children: [
13230
+ /* @__PURE__ */ jsx187(
12038
13231
  "input",
12039
13232
  {
12040
13233
  type: "file",
@@ -12043,9 +13236,9 @@ var AvatarUploader = ({ onSave, src }) => {
12043
13236
  style: { display: "none" }
12044
13237
  }
12045
13238
  ),
12046
- /* @__PURE__ */ jsx174(Button13, { variant: "contained", component: "span", children: "Alterar foto" })
13239
+ /* @__PURE__ */ jsx187(Button13, { variant: "contained", component: "span", children: "Alterar foto" })
12047
13240
  ] }),
12048
- /* @__PURE__ */ jsxs81(
13241
+ /* @__PURE__ */ jsxs92(
12049
13242
  Dialog4,
12050
13243
  {
12051
13244
  open,
@@ -12053,7 +13246,7 @@ var AvatarUploader = ({ onSave, src }) => {
12053
13246
  maxWidth: "sm",
12054
13247
  fullWidth: true,
12055
13248
  children: [
12056
- /* @__PURE__ */ jsx174("div", { style: { position: "relative", height: 400, background: "#333" }, children: image && /* @__PURE__ */ jsx174(
13249
+ /* @__PURE__ */ jsx187("div", { style: { position: "relative", height: 400, background: "#333" }, children: image && /* @__PURE__ */ jsx187(
12057
13250
  Cropper,
12058
13251
  {
12059
13252
  image,
@@ -12067,8 +13260,8 @@ var AvatarUploader = ({ onSave, src }) => {
12067
13260
  onCropComplete
12068
13261
  }
12069
13262
  ) }),
12070
- /* @__PURE__ */ jsxs81("div", { style: { padding: 20 }, children: [
12071
- /* @__PURE__ */ jsx174(
13263
+ /* @__PURE__ */ jsxs92("div", { style: { padding: 20 }, children: [
13264
+ /* @__PURE__ */ jsx187(
12072
13265
  Slider,
12073
13266
  {
12074
13267
  value: zoom,
@@ -12078,7 +13271,7 @@ var AvatarUploader = ({ onSave, src }) => {
12078
13271
  onChange: (_, value) => setZoom(value)
12079
13272
  }
12080
13273
  ),
12081
- /* @__PURE__ */ jsx174(ButtonContainer, { children: /* @__PURE__ */ jsx174(Button13, { variant: "contained", onClick: handleSave, children: "Salvar" }) })
13274
+ /* @__PURE__ */ jsx187(ButtonContainer, { children: /* @__PURE__ */ jsx187(Button13, { variant: "contained", onClick: handleSave, children: "Salvar" }) })
12082
13275
  ] })
12083
13276
  ]
12084
13277
  }
@@ -12088,31 +13281,31 @@ var AvatarUploader = ({ onSave, src }) => {
12088
13281
  var AvatarUploader_default = AvatarUploader;
12089
13282
 
12090
13283
  // src/Profile/MinhaConta.tsx
12091
- import { jsx as jsx175, jsxs as jsxs82 } from "react/jsx-runtime";
12092
- var schema4 = create$3().shape({
13284
+ import { jsx as jsx188, jsxs as jsxs93 } from "react/jsx-runtime";
13285
+ var schema7 = create$3().shape({
12093
13286
  name: create$6().required("Informe o nome")
12094
13287
  });
12095
13288
  function MinhaConta(props) {
12096
13289
  const { usuario, credentialsConfig, onUploadComplete } = props;
12097
- const { data, setData, handleChange, validate, validationErrors } = useForm3(
13290
+ const { data, setData, handleChange, validate, validationErrors } = useForm5(
12098
13291
  usuario,
12099
- schema4
13292
+ schema7
12100
13293
  );
12101
- const [error, setErro] = useState29(false);
12102
- const [isAlterando, setAlterando] = useState29(false);
12103
- const [isAlteradoComSucesso, setAlteradoComSucesso] = useState29(false);
12104
- const { uploadAvatar, atualizarUsuario } = useCredentials8(credentialsConfig);
12105
- useEffect19(() => {
13294
+ const [error, setErro] = useState36(false);
13295
+ const [isAlterando, setAlterando] = useState36(false);
13296
+ const [isAlteradoComSucesso, setAlteradoComSucesso] = useState36(false);
13297
+ const { uploadAvatar, atualizarUsuario } = useCredentials9(credentialsConfig);
13298
+ useEffect23(() => {
12106
13299
  setData(usuario);
12107
13300
  }, [usuario]);
12108
- useEffect19(() => {
13301
+ useEffect23(() => {
12109
13302
  if (isAlteradoComSucesso) {
12110
13303
  setTimeout(() => {
12111
13304
  setAlteradoComSucesso(false);
12112
13305
  }, 3e3);
12113
13306
  }
12114
13307
  }, [isAlteradoComSucesso]);
12115
- useEffect19(() => {
13308
+ useEffect23(() => {
12116
13309
  if (error) {
12117
13310
  setTimeout(() => {
12118
13311
  setErro(false);
@@ -12132,9 +13325,9 @@ function MinhaConta(props) {
12132
13325
  }
12133
13326
  });
12134
13327
  }
12135
- return /* @__PURE__ */ jsxs82(Stack47, { spacing: 2, children: [
12136
- /* @__PURE__ */ jsx175(Typography28, { variant: "h6", children: "Avatar" }),
12137
- /* @__PURE__ */ jsx175(
13328
+ return /* @__PURE__ */ jsxs93(Stack55, { spacing: 2, children: [
13329
+ /* @__PURE__ */ jsx188(Typography36, { variant: "h6", children: "Avatar" }),
13330
+ /* @__PURE__ */ jsx188(
12138
13331
  AvatarUploader_default,
12139
13332
  {
12140
13333
  src: data?.avatarUrl,
@@ -12154,11 +13347,11 @@ function MinhaConta(props) {
12154
13347
  }
12155
13348
  }
12156
13349
  ),
12157
- /* @__PURE__ */ jsx175(Divider5, {}),
12158
- /* @__PURE__ */ jsx175(Typography28, { variant: "h6", children: "Informa\xE7\xF5es da Conta" }),
12159
- /* @__PURE__ */ jsxs82(Grid2, { container: true, spacing: 1.5, children: [
12160
- /* @__PURE__ */ jsx175(Grid2, { size: { xl: 4, lg: 4, md: 4, sm: 12, xs: 12 }, children: /* @__PURE__ */ jsx175(
12161
- TextField12,
13350
+ /* @__PURE__ */ jsx188(Divider7, {}),
13351
+ /* @__PURE__ */ jsx188(Typography36, { variant: "h6", children: "Informa\xE7\xF5es da Conta" }),
13352
+ /* @__PURE__ */ jsxs93(Grid3, { container: true, spacing: 1.5, children: [
13353
+ /* @__PURE__ */ jsx188(Grid3, { size: { xl: 4, lg: 4, md: 4, sm: 12, xs: 12 }, children: /* @__PURE__ */ jsx188(
13354
+ TextField16,
12162
13355
  {
12163
13356
  disabled: true,
12164
13357
  fullWidth: true,
@@ -12166,8 +13359,8 @@ function MinhaConta(props) {
12166
13359
  value: data?.email || ""
12167
13360
  }
12168
13361
  ) }),
12169
- /* @__PURE__ */ jsx175(Grid2, { size: { xl: 4, lg: 4, md: 4, sm: 12, xs: 12 }, children: /* @__PURE__ */ jsx175(
12170
- TextField12,
13362
+ /* @__PURE__ */ jsx188(Grid3, { size: { xl: 4, lg: 4, md: 4, sm: 12, xs: 12 }, children: /* @__PURE__ */ jsx188(
13363
+ TextField16,
12171
13364
  {
12172
13365
  name: "name",
12173
13366
  fullWidth: true,
@@ -12177,8 +13370,8 @@ function MinhaConta(props) {
12177
13370
  ...validationErrors("name")
12178
13371
  }
12179
13372
  ) }),
12180
- /* @__PURE__ */ jsx175(Grid2, { size: { xl: 4, lg: 4, md: 4, sm: 12, xs: 12 }, children: /* @__PURE__ */ jsx175(
12181
- TextField12,
13373
+ /* @__PURE__ */ jsx188(Grid3, { size: { xl: 4, lg: 4, md: 4, sm: 12, xs: 12 }, children: /* @__PURE__ */ jsx188(
13374
+ TextField16,
12182
13375
  {
12183
13376
  name: "surname",
12184
13377
  fullWidth: true,
@@ -12188,7 +13381,7 @@ function MinhaConta(props) {
12188
13381
  }
12189
13382
  ) })
12190
13383
  ] }),
12191
- /* @__PURE__ */ jsx175(Grid2, { size: { xl: 4, lg: 4, md: 4, sm: 12, xs: 12 }, children: /* @__PURE__ */ jsx175(ButtonContainer, { children: /* @__PURE__ */ jsx175(
13384
+ /* @__PURE__ */ jsx188(Grid3, { size: { xl: 4, lg: 4, md: 4, sm: 12, xs: 12 }, children: /* @__PURE__ */ jsx188(ButtonContainer, { children: /* @__PURE__ */ jsx188(
12192
13385
  Button_default,
12193
13386
  {
12194
13387
  isLoading: isAlterando,
@@ -12197,34 +13390,34 @@ function MinhaConta(props) {
12197
13390
  children: "Salvar"
12198
13391
  }
12199
13392
  ) }) }),
12200
- isAlteradoComSucesso && /* @__PURE__ */ jsx175(Alert8, { children: "Dados da conta alterados com sucesso!" }),
12201
- error && /* @__PURE__ */ jsx175(Alert8, { severity: "error", children: error })
13393
+ isAlteradoComSucesso && /* @__PURE__ */ jsx188(Alert13, { children: "Dados da conta alterados com sucesso!" }),
13394
+ error && /* @__PURE__ */ jsx188(Alert13, { severity: "error", children: error })
12202
13395
  ] });
12203
13396
  }
12204
13397
 
12205
13398
  // src/Profile/LoginSeguranca.tsx
12206
13399
  import {
12207
- useCredentials as useCredentials10,
12208
- useForm as useForm4
13400
+ useCredentials as useCredentials11,
13401
+ useForm as useForm6
12209
13402
  } from "@data-c/hooks";
12210
13403
  import Verified from "@mui/icons-material/Verified";
12211
- import { Alert as Alert10, Divider as Divider6, Stack as Stack49, Typography as Typography30 } from "@mui/material";
12212
- import { useEffect as useEffect21, useState as useState31 } from "react";
13404
+ import { Alert as Alert15, Divider as Divider8, Stack as Stack57, Typography as Typography38 } from "@mui/material";
13405
+ import { useEffect as useEffect25, useState as useState38 } from "react";
12213
13406
 
12214
13407
  // src/Profile/DialogVerificarWhastapp.tsx
12215
13408
  import {
12216
- useCredentials as useCredentials9
13409
+ useCredentials as useCredentials10
12217
13410
  } from "@data-c/hooks";
12218
- import { Alert as Alert9, Stack as Stack48, Typography as Typography29 } from "@mui/material";
12219
- import { useEffect as useEffect20, useState as useState30 } from "react";
12220
- import { jsx as jsx176, jsxs as jsxs83 } from "react/jsx-runtime";
13411
+ import { Alert as Alert14, Stack as Stack56, Typography as Typography37 } from "@mui/material";
13412
+ import { useEffect as useEffect24, useState as useState37 } from "react";
13413
+ import { jsx as jsx189, jsxs as jsxs94 } from "react/jsx-runtime";
12221
13414
  function DialogVerificarWhastapp(props) {
12222
13415
  const { open, onClose, payload, onCodigoVerificado, credentialsConfig } = props;
12223
- const [code, setCode] = useState30("");
12224
- const [error, setError] = useState30(false);
12225
- const [isLoading, setLoading] = useState30(false);
12226
- const { validarCodigoWhatsapp } = useCredentials9(credentialsConfig);
12227
- useEffect20(() => {
13416
+ const [code, setCode] = useState37("");
13417
+ const [error, setError] = useState37(false);
13418
+ const [isLoading, setLoading] = useState37(false);
13419
+ const { validarCodigoWhatsapp } = useCredentials10(credentialsConfig);
13420
+ useEffect24(() => {
12228
13421
  if (error) {
12229
13422
  setTimeout(() => {
12230
13423
  setError(false);
@@ -12242,36 +13435,36 @@ function DialogVerificarWhastapp(props) {
12242
13435
  setLoading(false);
12243
13436
  }
12244
13437
  }
12245
- return /* @__PURE__ */ jsxs83(Dialog_default.Root, { open, onClose: (_) => onClose(), maxWidth: "xs", children: [
12246
- /* @__PURE__ */ jsxs83(Dialog_default.Header, { children: [
12247
- /* @__PURE__ */ jsx176(Dialog_default.Title, { children: "Verifica\xE7\xE3o do seu n\xFAmero de WhatsApp" }),
12248
- /* @__PURE__ */ jsx176(Dialog_default.ActionClose, { onClose })
13438
+ return /* @__PURE__ */ jsxs94(Dialog_default.Root, { open, onClose: (_) => onClose(), maxWidth: "xs", children: [
13439
+ /* @__PURE__ */ jsxs94(Dialog_default.Header, { children: [
13440
+ /* @__PURE__ */ jsx189(Dialog_default.Title, { children: "Verifica\xE7\xE3o do seu n\xFAmero de WhatsApp" }),
13441
+ /* @__PURE__ */ jsx189(Dialog_default.ActionClose, { onClose })
12249
13442
  ] }),
12250
- /* @__PURE__ */ jsx176(Dialog_default.Content, { children: /* @__PURE__ */ jsxs83(
12251
- Stack48,
13443
+ /* @__PURE__ */ jsx189(Dialog_default.Content, { children: /* @__PURE__ */ jsxs94(
13444
+ Stack56,
12252
13445
  {
12253
13446
  spacing: 2,
12254
13447
  justifyContent: "center",
12255
13448
  alignContent: "center",
12256
13449
  alignItems: "center",
12257
13450
  children: [
12258
- /* @__PURE__ */ jsx176(
12259
- Typography29,
13451
+ /* @__PURE__ */ jsx189(
13452
+ Typography37,
12260
13453
  {
12261
13454
  variant: "subtitle1",
12262
13455
  sx: { fontWeight: "bolder", fontSize: "11pt" },
12263
13456
  children: "\u{1F510} Verifique seu n\xFAmero"
12264
13457
  }
12265
13458
  ),
12266
- /* @__PURE__ */ jsxs83(Typography29, { variant: "body1", sx: { fontSize: "10pt" }, children: [
13459
+ /* @__PURE__ */ jsxs94(Typography37, { variant: "body1", sx: { fontSize: "10pt" }, children: [
12267
13460
  "Enviamos um c\xF3digo via WhatsApp para +55",
12268
13461
  " ",
12269
- /* @__PURE__ */ jsx176("b", { children: `(${payload?.whatsappNumber?.slice(0, 2)}) ${payload?.whatsappNumber?.slice(2, 7)}-${payload?.whatsappNumber?.slice(7)}` }),
13462
+ /* @__PURE__ */ jsx189("b", { children: `(${payload?.whatsappNumber?.slice(0, 2)}) ${payload?.whatsappNumber?.slice(2, 7)}-${payload?.whatsappNumber?.slice(7)}` }),
12270
13463
  ". ",
12271
- /* @__PURE__ */ jsx176("br", {}),
13464
+ /* @__PURE__ */ jsx189("br", {}),
12272
13465
  "Digite o c\xF3digo abaixo para confirmar que este n\xFAmero \xE9 seu."
12273
13466
  ] }),
12274
- /* @__PURE__ */ jsx176(
13467
+ /* @__PURE__ */ jsx189(
12275
13468
  VerificationCodeInput,
12276
13469
  {
12277
13470
  value: code,
@@ -12280,13 +13473,13 @@ function DialogVerificarWhastapp(props) {
12280
13473
  }
12281
13474
  }
12282
13475
  ),
12283
- error && /* @__PURE__ */ jsx176(Alert9, { sx: { flexGrow: 1 }, severity: "error", children: error })
13476
+ error && /* @__PURE__ */ jsx189(Alert14, { sx: { flexGrow: 1 }, severity: "error", children: error })
12284
13477
  ]
12285
13478
  }
12286
13479
  ) }),
12287
- /* @__PURE__ */ jsx176(Dialog_default.Footer, { children: /* @__PURE__ */ jsxs83(Dialog_default.Actions, { children: [
12288
- /* @__PURE__ */ jsx176(Dialog_default.ActionCancelar, { onClick: () => onClose() }),
12289
- /* @__PURE__ */ jsx176(
13480
+ /* @__PURE__ */ jsx189(Dialog_default.Footer, { children: /* @__PURE__ */ jsxs94(Dialog_default.Actions, { children: [
13481
+ /* @__PURE__ */ jsx189(Dialog_default.ActionCancelar, { onClick: () => onClose() }),
13482
+ /* @__PURE__ */ jsx189(
12290
13483
  Dialog_default.ActionSalvar,
12291
13484
  {
12292
13485
  label: "Verificar",
@@ -12300,19 +13493,19 @@ function DialogVerificarWhastapp(props) {
12300
13493
  }
12301
13494
 
12302
13495
  // src/Profile/LoginSeguranca.tsx
12303
- import { jsx as jsx177, jsxs as jsxs84 } from "react/jsx-runtime";
12304
- var schema5 = create$3().shape({
13496
+ import { jsx as jsx190, jsxs as jsxs95 } from "react/jsx-runtime";
13497
+ var schema8 = create$3().shape({
12305
13498
  whatsappNumber: create$6().required("Informe o n\xFAmero do whastapp").length(15)
12306
13499
  });
12307
13500
  function LoginSeguranca(props) {
12308
13501
  const { usuario, credentialsConfig, onWhastappSaved } = props;
12309
- const [isOpenAlterarSenha, setOpenAlterarSenha] = useState31(false);
12310
- const [isAlterando, setAlterando] = useState31(false);
12311
- const { data, setData, changeValue, validate, validationErrors } = useForm4(usuario);
12312
- const [isGerandoNumero, setGerandoNumero] = useState31(false);
12313
- const [isOpenVerificarWhastapp, setOpenVerificarWhatsapp] = useState31(false);
12314
- const { atualizarUsuario, gerarWhatsappVerificationCode } = useCredentials10(credentialsConfig);
12315
- useEffect21(() => {
13502
+ const [isOpenAlterarSenha, setOpenAlterarSenha] = useState38(false);
13503
+ const [isAlterando, setAlterando] = useState38(false);
13504
+ const { data, setData, changeValue, validate, validationErrors } = useForm6(usuario);
13505
+ const [isGerandoNumero, setGerandoNumero] = useState38(false);
13506
+ const [isOpenVerificarWhastapp, setOpenVerificarWhatsapp] = useState38(false);
13507
+ const { atualizarUsuario, gerarWhatsappVerificationCode } = useCredentials11(credentialsConfig);
13508
+ useEffect25(() => {
12316
13509
  setData(usuario);
12317
13510
  }, [usuario]);
12318
13511
  function handleSalvarWhastapp() {
@@ -12338,9 +13531,9 @@ function LoginSeguranca(props) {
12338
13531
  setGerandoNumero(false);
12339
13532
  }
12340
13533
  }
12341
- return /* @__PURE__ */ jsxs84(Stack49, { spacing: 2, children: [
12342
- /* @__PURE__ */ jsx177(Typography30, { variant: "h6", children: "Senha" }),
12343
- /* @__PURE__ */ jsx177(
13534
+ return /* @__PURE__ */ jsxs95(Stack57, { spacing: 2, children: [
13535
+ /* @__PURE__ */ jsx190(Typography38, { variant: "h6", children: "Senha" }),
13536
+ /* @__PURE__ */ jsx190(
12344
13537
  Button_default,
12345
13538
  {
12346
13539
  onClick: () => {
@@ -12352,7 +13545,7 @@ function LoginSeguranca(props) {
12352
13545
  children: "Alterar Senha"
12353
13546
  }
12354
13547
  ),
12355
- /* @__PURE__ */ jsx177(
13548
+ /* @__PURE__ */ jsx190(
12356
13549
  AlterarSenha,
12357
13550
  {
12358
13551
  isOpen: isOpenAlterarSenha,
@@ -12360,10 +13553,10 @@ function LoginSeguranca(props) {
12360
13553
  credentialsConfig
12361
13554
  }
12362
13555
  ),
12363
- /* @__PURE__ */ jsx177(Divider6, {}),
12364
- /* @__PURE__ */ jsx177(Typography30, { variant: "h6", children: "Login com Whastapp" }),
12365
- /* @__PURE__ */ jsxs84(Stack49, { direction: "row", spacing: 2, children: [
12366
- /* @__PURE__ */ jsx177(
13556
+ /* @__PURE__ */ jsx190(Divider8, {}),
13557
+ /* @__PURE__ */ jsx190(Typography38, { variant: "h6", children: "Login com Whastapp" }),
13558
+ /* @__PURE__ */ jsxs95(Stack57, { direction: "row", spacing: 2, children: [
13559
+ /* @__PURE__ */ jsx190(
12367
13560
  WhatsAppTextField,
12368
13561
  {
12369
13562
  disabled: Boolean(data?.whatsappVerifiedAt),
@@ -12376,26 +13569,26 @@ function LoginSeguranca(props) {
12376
13569
  }
12377
13570
  }
12378
13571
  ),
12379
- data.whatsappVerifiedAt && /* @__PURE__ */ jsxs84(
12380
- Stack49,
13572
+ data.whatsappVerifiedAt && /* @__PURE__ */ jsxs95(
13573
+ Stack57,
12381
13574
  {
12382
13575
  direction: "row",
12383
13576
  spacing: 1,
12384
13577
  justifyContent: "center",
12385
13578
  alignItems: "center",
12386
13579
  children: [
12387
- /* @__PURE__ */ jsx177(Verified, { color: "success" }),
12388
- /* @__PURE__ */ jsx177(Typography30, { variant: "body2", children: "N\xFAmero Verificado" })
13580
+ /* @__PURE__ */ jsx190(Verified, { color: "success" }),
13581
+ /* @__PURE__ */ jsx190(Typography38, { variant: "body2", children: "N\xFAmero Verificado" })
12389
13582
  ]
12390
13583
  }
12391
13584
  ),
12392
- data.whatsappNumber && data.whatsappNumber.replace(/\D/g, "").length === 11 && !data.whatsappVerifiedAt && /* @__PURE__ */ jsx177(Button_default, { isLoading: isAlterando, onClick: handleSalvarWhastapp, children: "Salvar Whatsapp" })
13585
+ data.whatsappNumber && data.whatsappNumber.replace(/\D/g, "").length === 11 && !data.whatsappVerifiedAt && /* @__PURE__ */ jsx190(Button_default, { isLoading: isAlterando, onClick: handleSalvarWhastapp, children: "Salvar Whatsapp" })
12393
13586
  ] }),
12394
- usuario.whatsappNumber && usuario.whatsappNumber.replace(/\D/g, "").length === 11 && !data.whatsappVerifiedAt && /* @__PURE__ */ jsx177(
12395
- Alert10,
13587
+ usuario.whatsappNumber && usuario.whatsappNumber.replace(/\D/g, "").length === 11 && !data.whatsappVerifiedAt && /* @__PURE__ */ jsx190(
13588
+ Alert15,
12396
13589
  {
12397
13590
  severity: "warning",
12398
- action: /* @__PURE__ */ jsx177(
13591
+ action: /* @__PURE__ */ jsx190(
12399
13592
  Button_default,
12400
13593
  {
12401
13594
  isLoading: isGerandoNumero,
@@ -12406,7 +13599,7 @@ function LoginSeguranca(props) {
12406
13599
  children: "O seu n\xFAmero de whatsapp ainda n\xE3o est\xE1 validado"
12407
13600
  }
12408
13601
  ),
12409
- /* @__PURE__ */ jsx177(
13602
+ /* @__PURE__ */ jsx190(
12410
13603
  DialogVerificarWhastapp,
12411
13604
  {
12412
13605
  open: isOpenVerificarWhastapp,
@@ -12426,16 +13619,16 @@ function LoginSeguranca(props) {
12426
13619
 
12427
13620
  // src/Profile/index.tsx
12428
13621
  import { useUserContext as useUserContext2 } from "@data-c/providers";
12429
- import { Fragment as Fragment11, jsx as jsx178, jsxs as jsxs85 } from "react/jsx-runtime";
13622
+ import { Fragment as Fragment12, jsx as jsx191, jsxs as jsxs96 } from "react/jsx-runtime";
12430
13623
  function Profile(props) {
12431
- const [tabValue, setTabValue] = useState32(0);
13624
+ const [tabValue, setTabValue] = useState39(0);
12432
13625
  const {
12433
13626
  user: usuarioLogado,
12434
13627
  setUser: setUsuarioLogado,
12435
13628
  credentialsConfig
12436
13629
  } = useUserContext2();
12437
- return /* @__PURE__ */ jsx178(Fragment11, { children: /* @__PURE__ */ jsxs85(Stack50, { spacing: 2, direction: "row", children: [
12438
- /* @__PURE__ */ jsx178(Stack50, { sx: { width: "200px" }, children: /* @__PURE__ */ jsxs85(
13630
+ return /* @__PURE__ */ jsx191(Fragment12, { children: /* @__PURE__ */ jsxs96(Stack58, { spacing: 2, direction: "row", children: [
13631
+ /* @__PURE__ */ jsx191(Stack58, { sx: { width: "200px" }, children: /* @__PURE__ */ jsxs96(
12439
13632
  Tabs,
12440
13633
  {
12441
13634
  orientation: "vertical",
@@ -12449,20 +13642,20 @@ function Profile(props) {
12449
13642
  }
12450
13643
  },
12451
13644
  children: [
12452
- /* @__PURE__ */ jsx178(Tab, { label: "Minha Conta", value: 0 }),
12453
- /* @__PURE__ */ jsx178(Tab, { label: "Login e Seguran\xE7a", value: 1 })
13645
+ /* @__PURE__ */ jsx191(Tab, { label: "Minha Conta", value: 0 }),
13646
+ /* @__PURE__ */ jsx191(Tab, { label: "Login e Seguran\xE7a", value: 1 })
12454
13647
  ]
12455
13648
  }
12456
13649
  ) }),
12457
- /* @__PURE__ */ jsxs85(Stack50, { sx: { flexGrow: 1 }, children: [
12458
- /* @__PURE__ */ jsx178(TabPanel, { value: tabValue, index: 0, children: /* @__PURE__ */ jsx178(
13650
+ /* @__PURE__ */ jsxs96(Stack58, { sx: { flexGrow: 1 }, children: [
13651
+ /* @__PURE__ */ jsx191(TabPanel, { value: tabValue, index: 0, children: /* @__PURE__ */ jsx191(
12459
13652
  MinhaConta,
12460
13653
  {
12461
13654
  credentialsConfig,
12462
13655
  usuario: usuarioLogado || {}
12463
13656
  }
12464
13657
  ) }),
12465
- /* @__PURE__ */ jsx178(TabPanel, { value: tabValue, index: 1, children: /* @__PURE__ */ jsx178(
13658
+ /* @__PURE__ */ jsx191(TabPanel, { value: tabValue, index: 1, children: /* @__PURE__ */ jsx191(
12466
13659
  LoginSeguranca,
12467
13660
  {
12468
13661
  onWhastappSaved: (u) => {
@@ -12482,11 +13675,13 @@ import {
12482
13675
  createTheme as createTheme2,
12483
13676
  styled as styled10,
12484
13677
  ThemeProvider,
12485
- useTheme as useTheme12
13678
+ useTheme as useTheme17
12486
13679
  } from "@mui/material/styles";
12487
13680
  export {
12488
13681
  AlterarLicenca,
12489
13682
  AlterarSenha,
13683
+ AlterarSenhaV2,
13684
+ Auth,
12490
13685
  Autocomplete,
12491
13686
  Avatar,
12492
13687
  Breadcrumbs,
@@ -12499,6 +13694,7 @@ export {
12499
13694
  ColorsGrid,
12500
13695
  Content2 as Content,
12501
13696
  ContentTitle_default as ContentTitle,
13697
+ CredentialsProvider,
12502
13698
  default2 as CssBaseline,
12503
13699
  CurrencyCellStyle,
12504
13700
  CurrencyTextField_default as CurrencyTextField,
@@ -12544,11 +13740,12 @@ export {
12544
13740
  renderMenuItems,
12545
13741
  styled10 as styled,
12546
13742
  theme_default as theme,
13743
+ useCredentialsContext,
12547
13744
  useDialogs2 as useDialogs,
12548
13745
  useFilter,
12549
13746
  useFilterApi3 as useFilterApi,
12550
13747
  useMenu,
12551
- useTheme12 as useTheme,
13748
+ useTheme17 as useTheme,
12552
13749
  useTransporter
12553
13750
  };
12554
13751
  //# sourceMappingURL=index.mjs.map