@luizleon/sf.prefeiturasp.vuecomponents 5.0.1 → 5.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3864,79 +3864,7 @@ const nu = { class: "panel-menu-wrapper" }, ru = ["data-active", "href", "onClic
3864
3864
  ]);
3865
3865
  };
3866
3866
  }
3867
- }), Sm = /* @__PURE__ */ Ft(uu, [["__scopeId", "data-v-fbc3d38a"]]);
3868
- class Un {
3869
- /**
3870
- * https://www.w3.org/TR/mediaqueries-4/#valdef-media-pointer-coarse
3871
- * The primary input mechanism of the device includes a pointing device of limited accuracy. Examples include touchscreens and motion-detection sensors (like the Kinect peripheral for the Xbox.)
3872
- */
3873
- static get IsTouch() {
3874
- return window.matchMedia("(pointer: coarse)").matches;
3875
- }
3876
- /**
3877
- * Retorna o valor do z-index mais alto da página, sendo o valor mínimo 100.
3878
- * Sempre busca em:
3879
- * - body > *:not(script):not(style)
3880
- *
3881
- * Para adicionar outros, informe um array com os seletores.
3882
- * @example ['div.mydiv']
3883
- * @param seletores
3884
- */
3885
- static GetMaxZindex(e = []) {
3886
- let n = "body > *:not(script):not(style)";
3887
- for (const o of e)
3888
- n += `, ${o}`;
3889
- const r = Math.max(
3890
- ...Array.from(document.querySelectorAll(n)).map((o) => {
3891
- const i = getComputedStyle(o).zIndex;
3892
- return +i == +i ? +i : 0;
3893
- })
3894
- );
3895
- return r >= 100 ? r : 100;
3896
- }
3897
- /**
3898
- * Ajusta a data para o fuso horário do usuário.
3899
- *
3900
- * @param dt Data a ser ajustada
3901
- */
3902
- static AjustarFuso(e) {
3903
- const n = e.getTimezoneOffset() / 60;
3904
- e.setHours(e.getHours() - n);
3905
- }
3906
- /**
3907
- * Aplique uma máscara a uma string.
3908
- * @example Mask("12345678901", "###.###.###-##")
3909
- * @param value
3910
- * @param mask
3911
- * @returns
3912
- */
3913
- static Mask(e, n) {
3914
- let r = 0, o = e.toString();
3915
- return n.replace(/#/g, () => o[r++] || "");
3916
- }
3917
- static MaskCpf(e) {
3918
- return Un.Mask(e.padStart(11, "0"), "###.###.###-##");
3919
- }
3920
- static MaskCnpj(e) {
3921
- return Un.Mask(
3922
- e.padStart(14, "0"),
3923
- "##.###.###/####-##"
3924
- );
3925
- }
3926
- static MaskCcm(e) {
3927
- return Un.Mask(e.padStart(8, "0"), "#.###.###-#");
3928
- }
3929
- /**
3930
- * Pausa a execução do código por um determinado tempo, em milissegundos.
3931
- * @example await Utilities.DelayAsync(1000)
3932
- * @param ms
3933
- * @returns
3934
- */
3935
- static async DelayAsync(e) {
3936
- return new Promise((n) => setTimeout(n, e));
3937
- }
3938
- }
3939
- const Ni = Symbol();
3867
+ }), Sm = /* @__PURE__ */ Ft(uu, [["__scopeId", "data-v-fbc3d38a"]]), Ni = Symbol();
3940
3868
  class cu {
3941
3869
  get storedTheme() {
3942
3870
  return localStorage.getItem("color-scheme");
@@ -5391,7 +5319,7 @@ Lr || (Lr = function(e, n, r) {
5391
5319
  Or || (Or = function(e, n) {
5392
5320
  return new e(...n);
5393
5321
  });
5394
- const Rn = Ue(Array.prototype.forEach), li = Ue(Array.prototype.pop), Jt = Ue(Array.prototype.push), Hn = Ue(String.prototype.toLowerCase), mr = Ue(String.prototype.toString), ui = Ue(String.prototype.match), Qt = Ue(String.prototype.replace), rf = Ue(String.prototype.indexOf), of = Ue(String.prototype.trim), Ge = Ue(Object.prototype.hasOwnProperty), Ce = Ue(RegExp.prototype.test), en = sf(TypeError);
5322
+ const Rn = Ue(Array.prototype.forEach), li = Ue(Array.prototype.pop), Jt = Ue(Array.prototype.push), Un = Ue(String.prototype.toLowerCase), mr = Ue(String.prototype.toString), ui = Ue(String.prototype.match), Qt = Ue(String.prototype.replace), rf = Ue(String.prototype.indexOf), of = Ue(String.prototype.trim), Ge = Ue(Object.prototype.hasOwnProperty), Ce = Ue(RegExp.prototype.test), en = sf(TypeError);
5395
5323
  function Ue(t) {
5396
5324
  return function(e) {
5397
5325
  for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), o = 1; o < n; o++)
@@ -5407,7 +5335,7 @@ function sf(t) {
5407
5335
  };
5408
5336
  }
5409
5337
  function z(t, e) {
5410
- let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Hn;
5338
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Un;
5411
5339
  ai && ai(t, null);
5412
5340
  let r = e.length;
5413
5341
  for (; r--; ) {
@@ -5593,7 +5521,7 @@ function vs() {
5593
5521
  let f = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
5594
5522
  if (!(Rt && Rt === f)) {
5595
5523
  if ((!f || typeof f != "object") && (f = {}), f = kt(f), Gt = // eslint-disable-next-line unicorn/prefer-includes
5596
- $s.indexOf(f.PARSER_MEDIA_TYPE) === -1 ? Ms : f.PARSER_MEDIA_TYPE, ue = Gt === "application/xhtml+xml" ? mr : Hn, u = Ge(f, "ALLOWED_TAGS") ? z({}, f.ALLOWED_TAGS, ue) : p, b = Ge(f, "ALLOWED_ATTR") ? z({}, f.ALLOWED_ATTR, ue) : T, rr = Ge(f, "ALLOWED_NAMESPACES") ? z({}, f.ALLOWED_NAMESPACES, mr) : Os, tr = Ge(f, "ADD_URI_SAFE_ATTR") ? z(
5524
+ $s.indexOf(f.PARSER_MEDIA_TYPE) === -1 ? Ms : f.PARSER_MEDIA_TYPE, ue = Gt === "application/xhtml+xml" ? mr : Un, u = Ge(f, "ALLOWED_TAGS") ? z({}, f.ALLOWED_TAGS, ue) : p, b = Ge(f, "ALLOWED_ATTR") ? z({}, f.ALLOWED_ATTR, ue) : T, rr = Ge(f, "ALLOWED_NAMESPACES") ? z({}, f.ALLOWED_NAMESPACES, mr) : Os, tr = Ge(f, "ADD_URI_SAFE_ATTR") ? z(
5597
5525
  kt(so),
5598
5526
  // eslint-disable-line indent
5599
5527
  f.ADD_URI_SAFE_ATTR,
@@ -5623,7 +5551,7 @@ function vs() {
5623
5551
  namespaceURI: Dt,
5624
5552
  tagName: "template"
5625
5553
  });
5626
- const O = Hn(f.tagName), ne = Hn(I.tagName);
5554
+ const O = Un(f.tagName), ne = Un(I.tagName);
5627
5555
  return rr[f.namespaceURI] ? f.namespaceURI === Ln ? I.namespaceURI === lt ? O === "svg" : I.namespaceURI === xn ? O === "svg" && (ne === "annotation-xml" || lo[ne]) : !!co[O] : f.namespaceURI === xn ? I.namespaceURI === lt ? O === "math" : I.namespaceURI === Ln ? O === "math" && uo[ne] : !!fo[O] : f.namespaceURI === lt ? I.namespaceURI === Ln && !uo[ne] || I.namespaceURI === xn && !lo[ne] ? !1 : !fo[O] && (Rs[O] || !co[O]) : !!(Gt === "application/xhtml+xml" && rr[f.namespaceURI]) : !1;
5628
5556
  }, tt = function(f) {
5629
5557
  Jt(e.removed, {
@@ -7400,11 +7328,11 @@ var As = { exports: {} };
7400
7328
  });
7401
7329
  })(As);
7402
7330
  var qf = As.exports;
7403
- const jn = /* @__PURE__ */ Gf(qf), Im = {
7331
+ const Hn = /* @__PURE__ */ Gf(qf), Im = {
7404
7332
  install(t, e) {
7405
7333
  const n = e ?? {};
7406
- jn.setDefaultLevel(
7407
- n.enableLogging ? jn.levels.DEBUG : jn.levels.SILENT
7334
+ Hn.setDefaultLevel(
7335
+ n.enableLogging ? Hn.levels.DEBUG : Hn.levels.SILENT
7408
7336
  );
7409
7337
  const r = 240;
7410
7338
  document.documentElement.style.setProperty(
@@ -7460,7 +7388,7 @@ const jn = /* @__PURE__ */ Gf(qf), Im = {
7460
7388
  i.value = document.documentElement.scrollTop;
7461
7389
  }), Zt.SetInitialTheme();
7462
7390
  }
7463
- }, Tm = jn;
7391
+ }, Tm = Hn;
7464
7392
  class Ps extends Error {
7465
7393
  constructor(n = []) {
7466
7394
  const r = Array.isArray(n) ? n : [n];
@@ -8050,14 +7978,108 @@ const xs = () => Zf(), Jf = { class: "font-percentage" }, yi = "--font-size-incr
8050
7978
  }
8051
7979
  }
8052
7980
  };
8053
- function Om() {
7981
+ class jn {
7982
+ /**
7983
+ * https://www.w3.org/TR/mediaqueries-4/#valdef-media-pointer-coarse
7984
+ * The primary input mechanism of the device includes a pointing device of limited accuracy. Examples include touchscreens and motion-detection sensors (like the Kinect peripheral for the Xbox.)
7985
+ */
7986
+ static get IsTouch() {
7987
+ return window.matchMedia("(pointer: coarse)").matches;
7988
+ }
7989
+ /**
7990
+ * Retorna o valor do z-index mais alto da página, sendo o valor mínimo 100.
7991
+ * Sempre busca em:
7992
+ * - body > *:not(script):not(style)
7993
+ *
7994
+ * Para adicionar outros, informe um array com os seletores.
7995
+ * @example ['div.mydiv']
7996
+ * @param seletores
7997
+ */
7998
+ static GetMaxZindex(e = []) {
7999
+ let n = "body > *:not(script):not(style)";
8000
+ for (const o of e)
8001
+ n += `, ${o}`;
8002
+ const r = Math.max(
8003
+ ...Array.from(document.querySelectorAll(n)).map((o) => {
8004
+ const i = getComputedStyle(o).zIndex;
8005
+ return +i == +i ? +i : 0;
8006
+ })
8007
+ );
8008
+ return r >= 100 ? r : 100;
8009
+ }
8010
+ /**
8011
+ * Ajusta a data para o fuso horário do usuário.
8012
+ *
8013
+ * @param dt Data a ser ajustada
8014
+ */
8015
+ static AjustarFuso(e) {
8016
+ const n = e.getTimezoneOffset() / 60;
8017
+ e.setHours(e.getHours() - n);
8018
+ }
8019
+ /**
8020
+ * Aplique uma máscara a uma string.
8021
+ * @example Mask("12345678901", "###.###.###-##")
8022
+ * @param value
8023
+ * @param mask
8024
+ * @returns
8025
+ */
8026
+ static Mask(e, n) {
8027
+ let r = 0, o = e.toString();
8028
+ return n.replace(/#/g, () => o[r++] || "");
8029
+ }
8030
+ static MaskCpf(e) {
8031
+ return jn.Mask(e.padStart(11, "0"), "###.###.###-##");
8032
+ }
8033
+ static MaskCnpj(e) {
8034
+ return jn.Mask(
8035
+ e.padStart(14, "0"),
8036
+ "##.###.###/####-##"
8037
+ );
8038
+ }
8039
+ static MaskCcm(e) {
8040
+ return jn.Mask(e.padStart(8, "0"), "#.###.###-#");
8041
+ }
8042
+ /**
8043
+ * Pausa a execução do código por um determinado tempo, em milissegundos.
8044
+ * @example await Utilities.DelayAsync(1000)
8045
+ * @param ms
8046
+ * @returns
8047
+ */
8048
+ static async DelayAsync(e) {
8049
+ return new Promise((n) => setTimeout(n, e));
8050
+ }
8051
+ }
8052
+ const Om = (t) => {
8053
+ const e = /* @__PURE__ */ new Set();
8054
+ function n(r) {
8055
+ const { name: o, children: i } = r;
8056
+ if (o) {
8057
+ if (e.has(o))
8058
+ throw new Error(
8059
+ [
8060
+ "Erro na validação das rotas!",
8061
+ `Nome de rota duplicado: ${o}`
8062
+ ].join(`
8063
+ `)
8064
+ );
8065
+ e.add(o);
8066
+ }
8067
+ if (i && Array.isArray(i))
8068
+ for (const a of i)
8069
+ n(a);
8070
+ }
8071
+ for (const r of t)
8072
+ n(r);
8073
+ };
8074
+ function $m() {
8054
8075
  document.documentElement.classList.add("app-mounted");
8055
8076
  }
8056
8077
  export {
8057
8078
  Ps as AppError,
8058
8079
  Yf as AppResult,
8059
8080
  Cm as ConfigAuth,
8060
- Om as RemovePreloader,
8081
+ Om as EnsureUniqueRouteNames,
8082
+ $m as RemovePreloader,
8061
8083
  vm as SfButton,
8062
8084
  ym as SfContent,
8063
8085
  wm as SfDrawer,
@@ -8074,7 +8096,7 @@ export {
8074
8096
  gi as UseAuth,
8075
8097
  wf as UseConfirm,
8076
8098
  km as UseConfirmService,
8077
- Un as Utilities,
8099
+ jn as Utilities,
8078
8100
  Tm as _logger,
8079
8101
  Im as configSF,
8080
8102
  Pm as globalErrorHandler,