@celke/kole-react 0.4.1 → 0.5.0
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/README.md +113 -0
- package/dist/components/Site/CabecalhoSecao.d.ts +18 -0
- package/dist/components/Site/CampoPesquisa.d.ts +15 -0
- package/dist/components/Site/CardConteudo.d.ts +28 -0
- package/dist/components/Site/CardDepoimento.d.ts +14 -0
- package/dist/components/Site/CardPlano.d.ts +22 -0
- package/dist/components/Site/CardRecurso.d.ts +22 -0
- package/dist/components/Site/ConteudoArtigo.d.ts +12 -0
- package/dist/components/Site/DestaqueSite.d.ts +27 -0
- package/dist/components/Site/EstruturaSite.d.ts +60 -0
- package/dist/components/Site/FaixaChamada.d.ts +14 -0
- package/dist/components/Site/FaixaNumeros.d.ts +20 -0
- package/dist/components/Site/FiltroPilulas.d.ts +17 -0
- package/dist/components/Site/ListaNumerada.d.ts +21 -0
- package/dist/components/Site/Newsletter.d.ts +16 -0
- package/dist/components/Site/SecaoSite.d.ts +15 -0
- package/dist/components/Site/SumarioPagina.d.ts +17 -0
- package/dist/components/Site/linkSite.d.ts +18 -0
- package/dist/estilos.css +1 -1
- package/dist/index.d.ts +16 -0
- package/dist/index.js +906 -174
- package/dist/index.js.map +1 -1
- package/dist/tailwind.css +14 -0
- package/dist/tokens.css +28 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6188,31 +6188,763 @@ function Fo({ valor: e = 0, max: t = 100, segmentos: n, cor: r = "pri", aparenci
|
|
|
6188
6188
|
});
|
|
6189
6189
|
}
|
|
6190
6190
|
//#endregion
|
|
6191
|
+
//#region src/components/Site/linkSite.tsx
|
|
6192
|
+
var Io = xt({}), Lo = Io.Provider;
|
|
6193
|
+
function Ro(e) {
|
|
6194
|
+
return e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey;
|
|
6195
|
+
}
|
|
6196
|
+
function zo() {
|
|
6197
|
+
let { aoNavegar: e, renderLink: t, aoNavegou: n } = Tt(Io);
|
|
6198
|
+
return (r, i, a, o) => {
|
|
6199
|
+
let s = {
|
|
6200
|
+
href: r,
|
|
6201
|
+
className: a,
|
|
6202
|
+
children: i,
|
|
6203
|
+
"aria-current": o?.atual ? "page" : void 0,
|
|
6204
|
+
onClick: (i) => {
|
|
6205
|
+
o?.aoClicar?.(), !Ro(i) && (e && !t && (i.preventDefault(), e(r)), n?.());
|
|
6206
|
+
}
|
|
6207
|
+
};
|
|
6208
|
+
return o?.rotulo && (s["aria-label"] = o.rotulo), t ? t(s) : /* @__PURE__ */ K("a", { ...s });
|
|
6209
|
+
};
|
|
6210
|
+
}
|
|
6211
|
+
//#endregion
|
|
6212
|
+
//#region src/components/Site/EstruturaSite.tsx
|
|
6213
|
+
var Bo = "lp-site-conteudo";
|
|
6214
|
+
function Vo(e, t, n) {
|
|
6215
|
+
return t === e || e !== "/" && e !== n && t.startsWith(`${e}/`);
|
|
6216
|
+
}
|
|
6217
|
+
function Ho(e, t, n) {
|
|
6218
|
+
if (t) return e.map((e) => e.rota).filter((e) => Vo(e, t, n)).sort((e, t) => t.length - e.length)[0];
|
|
6219
|
+
}
|
|
6220
|
+
function Uo({ marca: e, nav: t, rotaAtual: n, aoNavegar: r, renderLink: i, acoes: a, alternarTema: o = !0, aviso: s, avisoLateral: c, rodape: l, children: u, className: d }) {
|
|
6221
|
+
let [f, p] = X(!1);
|
|
6222
|
+
return /* @__PURE__ */ K(Lo, {
|
|
6223
|
+
value: {
|
|
6224
|
+
aoNavegar: r,
|
|
6225
|
+
renderLink: i,
|
|
6226
|
+
aoNavegou: () => p(!1)
|
|
6227
|
+
},
|
|
6228
|
+
children: /* @__PURE__ */ K(Wo, {
|
|
6229
|
+
marca: e,
|
|
6230
|
+
nav: t,
|
|
6231
|
+
rotaAtual: n,
|
|
6232
|
+
acoes: a,
|
|
6233
|
+
alternarTema: o,
|
|
6234
|
+
aviso: s,
|
|
6235
|
+
avisoLateral: c,
|
|
6236
|
+
rodape: l,
|
|
6237
|
+
menuAberto: f,
|
|
6238
|
+
setMenuAberto: p,
|
|
6239
|
+
className: d,
|
|
6240
|
+
children: u
|
|
6241
|
+
})
|
|
6242
|
+
});
|
|
6243
|
+
}
|
|
6244
|
+
function Wo({ marca: e, nav: t, rotaAtual: n, acoes: r, alternarTema: i, aviso: a, avisoLateral: o, rodape: s, menuAberto: c, setMenuAberto: l, children: u, className: d }) {
|
|
6245
|
+
let f = zo(), p = ri(), [m, h] = X(!0), g = Ho(t, n, e.href ?? "/"), _ = (e) => t.map((t) => /* @__PURE__ */ K("li", { children: f(t.rota, t.rotulo, Z(e, t.rota === g && "is-ativo"), { atual: t.rota === g }) }, t.rota)), v = i && p ? /* @__PURE__ */ K("button", {
|
|
6246
|
+
type: "button",
|
|
6247
|
+
className: "lp-site-tema",
|
|
6248
|
+
onClick: p.alternarTema,
|
|
6249
|
+
"aria-label": p.escuro ? "Usar o tema claro" : "Usar o tema escuro",
|
|
6250
|
+
title: p.escuro ? "Tema claro" : "Tema escuro",
|
|
6251
|
+
children: /* @__PURE__ */ K(Q, { icone: p.escuro ? "sun" : "moon" })
|
|
6252
|
+
}) : null;
|
|
6253
|
+
return /* @__PURE__ */ K(ui, {
|
|
6254
|
+
value: {
|
|
6255
|
+
itens: [],
|
|
6256
|
+
link: (e, t, n) => f(e, t, n)
|
|
6257
|
+
},
|
|
6258
|
+
children: /* @__PURE__ */ q("div", {
|
|
6259
|
+
className: Z("lp-site", d),
|
|
6260
|
+
children: [
|
|
6261
|
+
/* @__PURE__ */ K("a", {
|
|
6262
|
+
className: "lp-site-pular",
|
|
6263
|
+
href: `#${Bo}`,
|
|
6264
|
+
children: "Pular para o conteúdo"
|
|
6265
|
+
}),
|
|
6266
|
+
a && /* @__PURE__ */ K("div", {
|
|
6267
|
+
className: "lp-site-aviso",
|
|
6268
|
+
children: /* @__PURE__ */ q("div", {
|
|
6269
|
+
className: "lp-site-aviso-in",
|
|
6270
|
+
children: [/* @__PURE__ */ K("div", {
|
|
6271
|
+
className: "lp-site-aviso-tx",
|
|
6272
|
+
children: a
|
|
6273
|
+
}), o && /* @__PURE__ */ K("div", {
|
|
6274
|
+
className: "lp-site-aviso-lateral",
|
|
6275
|
+
children: o
|
|
6276
|
+
})]
|
|
6277
|
+
})
|
|
6278
|
+
}),
|
|
6279
|
+
/* @__PURE__ */ K("header", {
|
|
6280
|
+
className: "lp-site-topo",
|
|
6281
|
+
children: /* @__PURE__ */ q("div", {
|
|
6282
|
+
className: "lp-site-topo-in",
|
|
6283
|
+
children: [
|
|
6284
|
+
f(e.href ?? "/", /* @__PURE__ */ q(G, { children: [e.logo && m ? /* @__PURE__ */ K("img", {
|
|
6285
|
+
className: "lp-site-logo",
|
|
6286
|
+
src: e.logo,
|
|
6287
|
+
alt: "",
|
|
6288
|
+
onError: () => h(!1)
|
|
6289
|
+
}) : /* @__PURE__ */ K("span", {
|
|
6290
|
+
className: "lp-site-logo lp-site-logo--letra",
|
|
6291
|
+
"aria-hidden": "true",
|
|
6292
|
+
children: e.nome.slice(0, 1)
|
|
6293
|
+
}), /* @__PURE__ */ q("span", {
|
|
6294
|
+
className: "lp-site-marca-tx",
|
|
6295
|
+
children: [/* @__PURE__ */ q("span", {
|
|
6296
|
+
className: "lp-site-marca-nome",
|
|
6297
|
+
children: [e.nome, /* @__PURE__ */ K("span", {
|
|
6298
|
+
className: "lp-site-marca-ponto",
|
|
6299
|
+
children: "."
|
|
6300
|
+
})]
|
|
6301
|
+
}), e.subtitulo && /* @__PURE__ */ K("span", {
|
|
6302
|
+
className: "lp-site-marca-sub",
|
|
6303
|
+
children: e.subtitulo
|
|
6304
|
+
})]
|
|
6305
|
+
})] }), "lp-site-marca", { rotulo: `${e.nome}: página inicial` }),
|
|
6306
|
+
/* @__PURE__ */ K("nav", {
|
|
6307
|
+
className: "lp-site-nav",
|
|
6308
|
+
"aria-label": "Menu principal",
|
|
6309
|
+
children: /* @__PURE__ */ K("ul", { children: _("lp-site-nav-item") })
|
|
6310
|
+
}),
|
|
6311
|
+
/* @__PURE__ */ q("div", {
|
|
6312
|
+
className: "lp-site-acoes",
|
|
6313
|
+
children: [
|
|
6314
|
+
v,
|
|
6315
|
+
r && /* @__PURE__ */ K("div", {
|
|
6316
|
+
className: "lp-site-acoes-extra",
|
|
6317
|
+
children: r
|
|
6318
|
+
}),
|
|
6319
|
+
/* @__PURE__ */ K("button", {
|
|
6320
|
+
type: "button",
|
|
6321
|
+
className: "lp-site-menu",
|
|
6322
|
+
"aria-label": "Abrir o menu",
|
|
6323
|
+
"aria-expanded": c,
|
|
6324
|
+
onClick: () => l(!0),
|
|
6325
|
+
children: /* @__PURE__ */ K(Q, { icone: "menu" })
|
|
6326
|
+
})
|
|
6327
|
+
]
|
|
6328
|
+
})
|
|
6329
|
+
]
|
|
6330
|
+
})
|
|
6331
|
+
}),
|
|
6332
|
+
/* @__PURE__ */ q(ra, {
|
|
6333
|
+
aberto: c,
|
|
6334
|
+
aoFechar: () => l(!1),
|
|
6335
|
+
titulo: e.nome,
|
|
6336
|
+
aparencia: "lateral",
|
|
6337
|
+
tamanho: "pequeno",
|
|
6338
|
+
children: [/* @__PURE__ */ K("nav", {
|
|
6339
|
+
"aria-label": "Menu principal",
|
|
6340
|
+
children: /* @__PURE__ */ K("ul", {
|
|
6341
|
+
className: "lp-site-gaveta",
|
|
6342
|
+
children: _("lp-site-gaveta-item")
|
|
6343
|
+
})
|
|
6344
|
+
}), r && /* @__PURE__ */ K("div", {
|
|
6345
|
+
className: "lp-site-gaveta-acoes",
|
|
6346
|
+
children: r
|
|
6347
|
+
})]
|
|
6348
|
+
}),
|
|
6349
|
+
/* @__PURE__ */ K("main", {
|
|
6350
|
+
className: "lp-site-main",
|
|
6351
|
+
id: Bo,
|
|
6352
|
+
tabIndex: -1,
|
|
6353
|
+
children: u
|
|
6354
|
+
}),
|
|
6355
|
+
s
|
|
6356
|
+
]
|
|
6357
|
+
})
|
|
6358
|
+
});
|
|
6359
|
+
}
|
|
6360
|
+
function Go({ nome: e, descricao: t, colunas: n = [], extra: r, copyright: i, redes: a = [], className: o }) {
|
|
6361
|
+
let s = zo();
|
|
6362
|
+
return /* @__PURE__ */ q("footer", {
|
|
6363
|
+
className: Z("lp-site-rodape", o),
|
|
6364
|
+
children: [/* @__PURE__ */ q("div", {
|
|
6365
|
+
className: "lp-site-rodape-in",
|
|
6366
|
+
children: [/* @__PURE__ */ q("div", {
|
|
6367
|
+
className: Z("lp-site-rodape-marca", !!r && "lp-site-rodape-marca--larga"),
|
|
6368
|
+
children: [
|
|
6369
|
+
/* @__PURE__ */ q("div", {
|
|
6370
|
+
className: "lp-site-rodape-nome",
|
|
6371
|
+
children: [e, /* @__PURE__ */ K("span", {
|
|
6372
|
+
className: "lp-site-marca-ponto",
|
|
6373
|
+
children: "."
|
|
6374
|
+
})]
|
|
6375
|
+
}),
|
|
6376
|
+
t && /* @__PURE__ */ K("p", {
|
|
6377
|
+
className: "lp-site-rodape-desc",
|
|
6378
|
+
children: t
|
|
6379
|
+
}),
|
|
6380
|
+
r
|
|
6381
|
+
]
|
|
6382
|
+
}), n.map((e) => /* @__PURE__ */ q("nav", {
|
|
6383
|
+
className: "lp-site-rodape-col",
|
|
6384
|
+
"aria-label": e.titulo,
|
|
6385
|
+
children: [/* @__PURE__ */ K("div", {
|
|
6386
|
+
className: "lp-site-rodape-titulo",
|
|
6387
|
+
children: e.titulo
|
|
6388
|
+
}), /* @__PURE__ */ K("ul", { children: e.links.map((e) => /* @__PURE__ */ K("li", { children: s(e.rota, e.rotulo, "lp-site-rodape-link") }, `${e.rota}-${e.rotulo}`)) })]
|
|
6389
|
+
}, e.titulo))]
|
|
6390
|
+
}), (i || a.length > 0) && /* @__PURE__ */ q("div", {
|
|
6391
|
+
className: "lp-site-rodape-base",
|
|
6392
|
+
children: [/* @__PURE__ */ K("span", { children: i }), a.length > 0 && /* @__PURE__ */ K("ul", {
|
|
6393
|
+
className: "lp-site-rodape-redes",
|
|
6394
|
+
"aria-label": "Redes sociais",
|
|
6395
|
+
children: a.map((e) => /* @__PURE__ */ K("li", { children: s(e.rota, e.rotulo, "lp-site-rodape-link") }, e.rotulo))
|
|
6396
|
+
})]
|
|
6397
|
+
})]
|
|
6398
|
+
});
|
|
6399
|
+
}
|
|
6400
|
+
//#endregion
|
|
6401
|
+
//#region src/components/Site/SecaoSite.tsx
|
|
6402
|
+
function Ko({ children: e, fundo: t = "padrao", largura: n = "padrao", espaco: r = "medio", rotulo: i, className: a }) {
|
|
6403
|
+
return /* @__PURE__ */ K("section", {
|
|
6404
|
+
className: Z("lp-site-secao", `lp-site-secao--${t}`, `lp-site-secao--${r}`, n === "estreita" && "lp-site-secao--estreita", a),
|
|
6405
|
+
"aria-label": i,
|
|
6406
|
+
children: /* @__PURE__ */ K("div", {
|
|
6407
|
+
className: "lp-site-secao-in",
|
|
6408
|
+
children: e
|
|
6409
|
+
})
|
|
6410
|
+
});
|
|
6411
|
+
}
|
|
6412
|
+
//#endregion
|
|
6413
|
+
//#region src/components/Site/DestaqueSite.tsx
|
|
6414
|
+
function qo(e, t) {
|
|
6415
|
+
let n = t ? e.indexOf(t) : -1;
|
|
6416
|
+
return !t || n < 0 ? e : /* @__PURE__ */ q(G, { children: [
|
|
6417
|
+
e.slice(0, n),
|
|
6418
|
+
/* @__PURE__ */ K("span", {
|
|
6419
|
+
className: "lp-destaque-realce",
|
|
6420
|
+
children: t
|
|
6421
|
+
}),
|
|
6422
|
+
e.slice(n + t.length)
|
|
6423
|
+
] });
|
|
6424
|
+
}
|
|
6425
|
+
function Jo({ topo: e, titulo: t, realce: n, selo: r, sobretitulo: i, descricao: a, children: o, aparencia: s = "escuro", lateral: c, midia: l, nivel: u = 1, className: d }) {
|
|
6426
|
+
let f = u === 1 ? "h1" : "h2", p = s === "claro";
|
|
6427
|
+
return /* @__PURE__ */ q("section", {
|
|
6428
|
+
className: Z("lp-destaque", p && "lp-destaque--claro", d),
|
|
6429
|
+
children: [
|
|
6430
|
+
/* @__PURE__ */ K("div", {
|
|
6431
|
+
className: "lp-destaque-brilho",
|
|
6432
|
+
"aria-hidden": "true"
|
|
6433
|
+
}),
|
|
6434
|
+
/* @__PURE__ */ q("div", {
|
|
6435
|
+
className: Z("lp-destaque-in", !p && !!c && "lp-destaque-in--lateral"),
|
|
6436
|
+
children: [/* @__PURE__ */ q("div", {
|
|
6437
|
+
className: "lp-destaque-texto",
|
|
6438
|
+
children: [
|
|
6439
|
+
e,
|
|
6440
|
+
r && /* @__PURE__ */ q("div", {
|
|
6441
|
+
className: "lp-destaque-selo",
|
|
6442
|
+
children: [/* @__PURE__ */ K("span", {
|
|
6443
|
+
className: "lp-destaque-selo-ponto",
|
|
6444
|
+
"aria-hidden": "true"
|
|
6445
|
+
}), r]
|
|
6446
|
+
}),
|
|
6447
|
+
i && /* @__PURE__ */ K("div", {
|
|
6448
|
+
className: "lp-destaque-sobre",
|
|
6449
|
+
children: i
|
|
6450
|
+
}),
|
|
6451
|
+
/* @__PURE__ */ K(f, {
|
|
6452
|
+
className: "lp-destaque-titulo",
|
|
6453
|
+
children: qo(t, n)
|
|
6454
|
+
}),
|
|
6455
|
+
a && /* @__PURE__ */ K("p", {
|
|
6456
|
+
className: "lp-destaque-desc",
|
|
6457
|
+
children: a
|
|
6458
|
+
}),
|
|
6459
|
+
o
|
|
6460
|
+
]
|
|
6461
|
+
}), !p && c && /* @__PURE__ */ K("div", {
|
|
6462
|
+
className: "lp-destaque-lateral",
|
|
6463
|
+
children: c
|
|
6464
|
+
})]
|
|
6465
|
+
}),
|
|
6466
|
+
p && l && /* @__PURE__ */ K("div", {
|
|
6467
|
+
className: "lp-destaque-midia",
|
|
6468
|
+
children: l
|
|
6469
|
+
})
|
|
6470
|
+
]
|
|
6471
|
+
});
|
|
6472
|
+
}
|
|
6473
|
+
//#endregion
|
|
6474
|
+
//#region src/components/Site/CampoPesquisa.tsx
|
|
6475
|
+
function Yo({ valor: e, aoMudar: t, aoPesquisar: n, placeholder: r = "Pesquisar", rotulo: i, rotuloBotao: a = "Buscar", aparencia: o = "padrao", className: s }) {
|
|
6476
|
+
let c = Et();
|
|
6477
|
+
return /* @__PURE__ */ q("form", {
|
|
6478
|
+
role: "search",
|
|
6479
|
+
className: Z("lp-pesquisa", `lp-pesquisa--${o}`, s),
|
|
6480
|
+
onSubmit: (t) => {
|
|
6481
|
+
t.preventDefault(), n?.(e.trim());
|
|
6482
|
+
},
|
|
6483
|
+
children: [
|
|
6484
|
+
/* @__PURE__ */ K("label", {
|
|
6485
|
+
className: "lp-sr",
|
|
6486
|
+
htmlFor: c,
|
|
6487
|
+
children: i ?? r
|
|
6488
|
+
}),
|
|
6489
|
+
/* @__PURE__ */ K(Q, {
|
|
6490
|
+
icone: "search",
|
|
6491
|
+
className: "lp-pesquisa-ic"
|
|
6492
|
+
}),
|
|
6493
|
+
/* @__PURE__ */ K("input", {
|
|
6494
|
+
id: c,
|
|
6495
|
+
className: "lp-pesquisa-input",
|
|
6496
|
+
type: "search",
|
|
6497
|
+
value: e,
|
|
6498
|
+
placeholder: r,
|
|
6499
|
+
onChange: (e) => t(e.target.value)
|
|
6500
|
+
}),
|
|
6501
|
+
/* @__PURE__ */ K("button", {
|
|
6502
|
+
type: "submit",
|
|
6503
|
+
className: "lp-pesquisa-botao",
|
|
6504
|
+
children: a
|
|
6505
|
+
})
|
|
6506
|
+
]
|
|
6507
|
+
});
|
|
6508
|
+
}
|
|
6509
|
+
//#endregion
|
|
6510
|
+
//#region src/components/Site/CabecalhoSecao.tsx
|
|
6511
|
+
function Xo({ titulo: e, sobretitulo: t, descricao: n, acao: r, nivel: i = 2, tamanho: a = "secao", alinhamento: o = "inicio", className: s }) {
|
|
6512
|
+
let c = `h${i}`;
|
|
6513
|
+
return /* @__PURE__ */ q("div", {
|
|
6514
|
+
className: Z("lp-cab-secao", `lp-cab-secao--${a}`, o === "centro" && "lp-cab-secao--centro", s),
|
|
6515
|
+
children: [/* @__PURE__ */ q("div", {
|
|
6516
|
+
className: "lp-cab-secao-tx",
|
|
6517
|
+
children: [
|
|
6518
|
+
t && /* @__PURE__ */ K("div", {
|
|
6519
|
+
className: "lp-cab-secao-sobre",
|
|
6520
|
+
children: t
|
|
6521
|
+
}),
|
|
6522
|
+
/* @__PURE__ */ K(c, {
|
|
6523
|
+
className: "lp-cab-secao-titulo",
|
|
6524
|
+
children: e
|
|
6525
|
+
}),
|
|
6526
|
+
n && /* @__PURE__ */ K("p", {
|
|
6527
|
+
className: "lp-cab-secao-desc",
|
|
6528
|
+
children: n
|
|
6529
|
+
})
|
|
6530
|
+
]
|
|
6531
|
+
}), r && /* @__PURE__ */ K("div", {
|
|
6532
|
+
className: "lp-cab-secao-acao",
|
|
6533
|
+
children: r
|
|
6534
|
+
})]
|
|
6535
|
+
});
|
|
6536
|
+
}
|
|
6537
|
+
//#endregion
|
|
6538
|
+
//#region src/components/Site/CardConteudo.tsx
|
|
6539
|
+
function Zo({ titulo: e, formato: t = "vertical", resumo: n, etiquetas: r, midia: i, rodape: a, lateral: o, href: s, aoClicar: c, nivel: l = 3, className: u }) {
|
|
6540
|
+
let d = zo(), f = `h${l}`, p = !!s || !!c, m = s ? d(s, e, "lp-cc-link", { aoClicar: c }) : c ? /* @__PURE__ */ K("button", {
|
|
6541
|
+
type: "button",
|
|
6542
|
+
className: "lp-cc-link",
|
|
6543
|
+
onClick: c,
|
|
6544
|
+
children: e
|
|
6545
|
+
}) : e;
|
|
6546
|
+
return /* @__PURE__ */ q("article", {
|
|
6547
|
+
className: Z("lp-cc", `lp-cc--${t}`, p && "lp-cc--acionavel", u),
|
|
6548
|
+
children: [
|
|
6549
|
+
i && /* @__PURE__ */ K("div", {
|
|
6550
|
+
className: "lp-cc-midia",
|
|
6551
|
+
children: i
|
|
6552
|
+
}),
|
|
6553
|
+
/* @__PURE__ */ q("div", {
|
|
6554
|
+
className: "lp-cc-corpo",
|
|
6555
|
+
children: [
|
|
6556
|
+
r && /* @__PURE__ */ K("div", {
|
|
6557
|
+
className: "lp-cc-etiquetas",
|
|
6558
|
+
children: r
|
|
6559
|
+
}),
|
|
6560
|
+
/* @__PURE__ */ K(f, {
|
|
6561
|
+
className: "lp-cc-titulo",
|
|
6562
|
+
children: m
|
|
6563
|
+
}),
|
|
6564
|
+
n && /* @__PURE__ */ K("p", {
|
|
6565
|
+
className: "lp-cc-resumo",
|
|
6566
|
+
children: n
|
|
6567
|
+
}),
|
|
6568
|
+
a && /* @__PURE__ */ K("div", {
|
|
6569
|
+
className: "lp-cc-rodape",
|
|
6570
|
+
children: a
|
|
6571
|
+
})
|
|
6572
|
+
]
|
|
6573
|
+
}),
|
|
6574
|
+
o && t === "linha" && /* @__PURE__ */ K("div", {
|
|
6575
|
+
className: "lp-cc-lateral",
|
|
6576
|
+
children: o
|
|
6577
|
+
})
|
|
6578
|
+
]
|
|
6579
|
+
});
|
|
6580
|
+
}
|
|
6581
|
+
//#endregion
|
|
6582
|
+
//#region src/components/Site/ListaNumerada.tsx
|
|
6583
|
+
function Qo({ itens: e, tamanho: t = "padrao", rotulo: n, className: r }) {
|
|
6584
|
+
let i = zo();
|
|
6585
|
+
return /* @__PURE__ */ K("ol", {
|
|
6586
|
+
className: Z("lp-lnum", `lp-lnum--${t}`, r),
|
|
6587
|
+
"aria-label": n,
|
|
6588
|
+
children: e.map((e, n) => /* @__PURE__ */ q("li", {
|
|
6589
|
+
className: "lp-lnum-item",
|
|
6590
|
+
children: [/* @__PURE__ */ K("span", {
|
|
6591
|
+
className: "lp-lnum-n",
|
|
6592
|
+
"aria-hidden": "true",
|
|
6593
|
+
children: t === "compacto" ? n + 1 : String(n + 1).padStart(2, "0")
|
|
6594
|
+
}), /* @__PURE__ */ q("span", {
|
|
6595
|
+
className: "lp-lnum-tx",
|
|
6596
|
+
children: [
|
|
6597
|
+
e.href ? i(e.href, e.titulo, "lp-lnum-titulo lp-lnum-titulo--link") : /* @__PURE__ */ K("span", {
|
|
6598
|
+
className: "lp-lnum-titulo",
|
|
6599
|
+
children: e.titulo
|
|
6600
|
+
}),
|
|
6601
|
+
e.descricao && /* @__PURE__ */ K("span", {
|
|
6602
|
+
className: "lp-lnum-desc",
|
|
6603
|
+
children: e.descricao
|
|
6604
|
+
}),
|
|
6605
|
+
e.detalhe && /* @__PURE__ */ K("span", {
|
|
6606
|
+
className: "lp-lnum-detalhe",
|
|
6607
|
+
children: e.detalhe
|
|
6608
|
+
})
|
|
6609
|
+
]
|
|
6610
|
+
})]
|
|
6611
|
+
}, e.id ?? e.titulo))
|
|
6612
|
+
});
|
|
6613
|
+
}
|
|
6614
|
+
//#endregion
|
|
6615
|
+
//#region src/components/Site/FiltroPilulas.tsx
|
|
6616
|
+
function $o({ opcoes: e, valor: t, aoMudar: n, rotulo: r, disposicao: i = "quebrar", alinhamento: a = "inicio", className: o }) {
|
|
6617
|
+
return /* @__PURE__ */ K("div", {
|
|
6618
|
+
className: Z("lp-pilulas", `lp-pilulas--${i}`, `lp-pilulas--${a}`, o),
|
|
6619
|
+
role: "group",
|
|
6620
|
+
"aria-label": r,
|
|
6621
|
+
children: e.map((e) => /* @__PURE__ */ K("button", {
|
|
6622
|
+
type: "button",
|
|
6623
|
+
className: "lp-pilula",
|
|
6624
|
+
"aria-pressed": e.valor === t,
|
|
6625
|
+
onClick: () => n(e.valor),
|
|
6626
|
+
children: e.rotulo
|
|
6627
|
+
}, e.valor))
|
|
6628
|
+
});
|
|
6629
|
+
}
|
|
6630
|
+
//#endregion
|
|
6631
|
+
//#region src/components/Site/CardRecurso.tsx
|
|
6632
|
+
function es({ titulo: e, children: t, icone: n, numero: r, sobretitulo: i, acao: a, formato: o = "vertical", nivel: s = 3, className: c }) {
|
|
6633
|
+
let l = `h${s}`;
|
|
6634
|
+
return /* @__PURE__ */ q("article", {
|
|
6635
|
+
className: Z("lp-recurso", `lp-recurso--${o}`, c),
|
|
6636
|
+
children: [n ? /* @__PURE__ */ K("span", {
|
|
6637
|
+
className: "lp-recurso-ic",
|
|
6638
|
+
"aria-hidden": "true",
|
|
6639
|
+
children: /* @__PURE__ */ K(Q, { icone: n })
|
|
6640
|
+
}) : r ? /* @__PURE__ */ K("span", {
|
|
6641
|
+
className: "lp-recurso-num",
|
|
6642
|
+
"aria-hidden": "true",
|
|
6643
|
+
children: r
|
|
6644
|
+
}) : null, /* @__PURE__ */ q("div", {
|
|
6645
|
+
className: "lp-recurso-tx",
|
|
6646
|
+
children: [
|
|
6647
|
+
i && /* @__PURE__ */ K("div", {
|
|
6648
|
+
className: "lp-recurso-sobre",
|
|
6649
|
+
children: i
|
|
6650
|
+
}),
|
|
6651
|
+
/* @__PURE__ */ K(l, {
|
|
6652
|
+
className: "lp-recurso-titulo",
|
|
6653
|
+
children: e
|
|
6654
|
+
}),
|
|
6655
|
+
t && /* @__PURE__ */ K("div", {
|
|
6656
|
+
className: "lp-recurso-desc",
|
|
6657
|
+
children: t
|
|
6658
|
+
}),
|
|
6659
|
+
a && /* @__PURE__ */ K("div", {
|
|
6660
|
+
className: "lp-recurso-acao",
|
|
6661
|
+
children: a
|
|
6662
|
+
})
|
|
6663
|
+
]
|
|
6664
|
+
})]
|
|
6665
|
+
});
|
|
6666
|
+
}
|
|
6667
|
+
//#endregion
|
|
6668
|
+
//#region src/components/Site/FaixaNumeros.tsx
|
|
6669
|
+
function ts({ itens: e, aparencia: t = "faixa", rotulo: n, className: r }) {
|
|
6670
|
+
return /* @__PURE__ */ q("div", {
|
|
6671
|
+
className: Z("lp-numeros", `lp-numeros--${t}`, r),
|
|
6672
|
+
role: "list",
|
|
6673
|
+
"aria-label": n,
|
|
6674
|
+
children: [t === "faixa" && /* @__PURE__ */ K("div", {
|
|
6675
|
+
className: "lp-numeros-brilho",
|
|
6676
|
+
"aria-hidden": "true"
|
|
6677
|
+
}), e.map((e) => /* @__PURE__ */ q("div", {
|
|
6678
|
+
className: "lp-numeros-item",
|
|
6679
|
+
role: "listitem",
|
|
6680
|
+
children: [/* @__PURE__ */ q("div", {
|
|
6681
|
+
className: "lp-numeros-valor",
|
|
6682
|
+
children: [e.valor, e.sufixo && /* @__PURE__ */ K("span", {
|
|
6683
|
+
className: "lp-numeros-sufixo",
|
|
6684
|
+
children: e.sufixo
|
|
6685
|
+
})]
|
|
6686
|
+
}), /* @__PURE__ */ K("div", {
|
|
6687
|
+
className: "lp-numeros-rotulo",
|
|
6688
|
+
children: e.rotulo
|
|
6689
|
+
})]
|
|
6690
|
+
}, e.rotulo))]
|
|
6691
|
+
});
|
|
6692
|
+
}
|
|
6693
|
+
//#endregion
|
|
6694
|
+
//#region src/components/Site/CardDepoimento.tsx
|
|
6695
|
+
function ns({ texto: e, nome: t, cargo: n, foto: r, nota: i = 5, className: a }) {
|
|
6696
|
+
let o = Math.max(0, Math.min(5, Math.round(i)));
|
|
6697
|
+
return /* @__PURE__ */ q("figure", {
|
|
6698
|
+
className: Z("lp-depo", a),
|
|
6699
|
+
children: [
|
|
6700
|
+
o > 0 && /* @__PURE__ */ q("div", {
|
|
6701
|
+
className: "lp-depo-nota",
|
|
6702
|
+
role: "img",
|
|
6703
|
+
"aria-label": `Nota ${o} de 5`,
|
|
6704
|
+
children: ["★".repeat(o), /* @__PURE__ */ K("span", {
|
|
6705
|
+
className: "lp-depo-nota-vazia",
|
|
6706
|
+
children: "★".repeat(5 - o)
|
|
6707
|
+
})]
|
|
6708
|
+
}),
|
|
6709
|
+
/* @__PURE__ */ q("blockquote", {
|
|
6710
|
+
className: "lp-depo-texto",
|
|
6711
|
+
children: [
|
|
6712
|
+
"“",
|
|
6713
|
+
e,
|
|
6714
|
+
"”"
|
|
6715
|
+
]
|
|
6716
|
+
}),
|
|
6717
|
+
/* @__PURE__ */ q("figcaption", {
|
|
6718
|
+
className: "lp-depo-autor",
|
|
6719
|
+
children: [/* @__PURE__ */ K(oi, {
|
|
6720
|
+
nome: t,
|
|
6721
|
+
foto: r,
|
|
6722
|
+
tamanho: "2.5rem"
|
|
6723
|
+
}), /* @__PURE__ */ q("span", { children: [/* @__PURE__ */ K("span", {
|
|
6724
|
+
className: "lp-depo-nome",
|
|
6725
|
+
children: t
|
|
6726
|
+
}), n && /* @__PURE__ */ K("span", {
|
|
6727
|
+
className: "lp-depo-cargo",
|
|
6728
|
+
children: n
|
|
6729
|
+
})] })]
|
|
6730
|
+
})
|
|
6731
|
+
]
|
|
6732
|
+
});
|
|
6733
|
+
}
|
|
6734
|
+
//#endregion
|
|
6735
|
+
//#region src/components/Site/CardPlano.tsx
|
|
6736
|
+
function rs({ nome: e, descricao: t, preco: n, moeda: r = "R$", periodo: i, itens: a, destaque: o, rotuloDestaque: s = "Mais escolhido", acao: c, className: l }) {
|
|
6737
|
+
return /* @__PURE__ */ q("article", {
|
|
6738
|
+
className: Z("lp-plano", o && "lp-plano--destaque", l),
|
|
6739
|
+
children: [
|
|
6740
|
+
o && /* @__PURE__ */ K("span", {
|
|
6741
|
+
className: "lp-plano-selo",
|
|
6742
|
+
children: s
|
|
6743
|
+
}),
|
|
6744
|
+
/* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("h3", {
|
|
6745
|
+
className: "lp-plano-nome",
|
|
6746
|
+
children: e
|
|
6747
|
+
}), t && /* @__PURE__ */ K("p", {
|
|
6748
|
+
className: "lp-plano-desc",
|
|
6749
|
+
children: t
|
|
6750
|
+
})] }),
|
|
6751
|
+
/* @__PURE__ */ q("div", {
|
|
6752
|
+
className: "lp-plano-preco",
|
|
6753
|
+
children: [
|
|
6754
|
+
/* @__PURE__ */ K("span", {
|
|
6755
|
+
className: "lp-plano-moeda",
|
|
6756
|
+
children: r
|
|
6757
|
+
}),
|
|
6758
|
+
/* @__PURE__ */ K("span", {
|
|
6759
|
+
className: "lp-plano-valor",
|
|
6760
|
+
children: n
|
|
6761
|
+
}),
|
|
6762
|
+
i && /* @__PURE__ */ K("span", {
|
|
6763
|
+
className: "lp-plano-periodo",
|
|
6764
|
+
children: i
|
|
6765
|
+
})
|
|
6766
|
+
]
|
|
6767
|
+
}),
|
|
6768
|
+
/* @__PURE__ */ K("ul", {
|
|
6769
|
+
className: "lp-plano-itens",
|
|
6770
|
+
children: a.map((e) => /* @__PURE__ */ q("li", { children: [/* @__PURE__ */ K(Q, {
|
|
6771
|
+
icone: "check",
|
|
6772
|
+
className: "lp-plano-check"
|
|
6773
|
+
}), /* @__PURE__ */ K("span", { children: e })] }, e))
|
|
6774
|
+
}),
|
|
6775
|
+
c && /* @__PURE__ */ K("div", {
|
|
6776
|
+
className: "lp-plano-acao",
|
|
6777
|
+
children: c
|
|
6778
|
+
})
|
|
6779
|
+
]
|
|
6780
|
+
});
|
|
6781
|
+
}
|
|
6782
|
+
//#endregion
|
|
6783
|
+
//#region src/components/Site/FaixaChamada.tsx
|
|
6784
|
+
function is({ titulo: e, descricao: t, acoes: n, cor: r = "pri", nivel: i = 2, className: a }) {
|
|
6785
|
+
let o = `h${i}`;
|
|
6786
|
+
return /* @__PURE__ */ q("div", {
|
|
6787
|
+
className: Z("lp-faixa-cta", `lp-faixa-cta--${r}`, a),
|
|
6788
|
+
children: [/* @__PURE__ */ q("div", {
|
|
6789
|
+
className: "lp-faixa-cta-tx",
|
|
6790
|
+
children: [/* @__PURE__ */ K(o, {
|
|
6791
|
+
className: "lp-faixa-cta-titulo",
|
|
6792
|
+
children: e
|
|
6793
|
+
}), t && /* @__PURE__ */ K("p", {
|
|
6794
|
+
className: "lp-faixa-cta-desc",
|
|
6795
|
+
children: t
|
|
6796
|
+
})]
|
|
6797
|
+
}), n && /* @__PURE__ */ K("div", {
|
|
6798
|
+
className: "lp-faixa-cta-acoes",
|
|
6799
|
+
children: n
|
|
6800
|
+
})]
|
|
6801
|
+
});
|
|
6802
|
+
}
|
|
6803
|
+
//#endregion
|
|
6804
|
+
//#region src/components/Site/ConteudoArtigo.tsx
|
|
6805
|
+
function as({ children: e, className: t }) {
|
|
6806
|
+
return /* @__PURE__ */ K("div", {
|
|
6807
|
+
className: Z("lp-artigo", t),
|
|
6808
|
+
children: e
|
|
6809
|
+
});
|
|
6810
|
+
}
|
|
6811
|
+
//#endregion
|
|
6812
|
+
//#region src/components/Site/Newsletter.tsx
|
|
6813
|
+
function os({ aoInscrever: e, titulo: t = "Receba novidades", descricao: n, placeholder: r = "Seu e-mail", rotuloBotao: i = "Inscrever", mensagemSucesso: a = "Inscrição feita. Confira seu e-mail.", aparencia: o = "cartao", className: s }) {
|
|
6814
|
+
let c = Et(), [l, u] = X(""), [d, f] = X(""), [p, m] = X(!1), [h, g] = X(!1);
|
|
6815
|
+
return /* @__PURE__ */ q("form", {
|
|
6816
|
+
className: Z("lp-news", `lp-news--${o}`, s),
|
|
6817
|
+
onSubmit: async (t) => {
|
|
6818
|
+
t.preventDefault();
|
|
6819
|
+
let n = l.trim();
|
|
6820
|
+
if (!Yt(n)) f("Informe um e-mail válido.");
|
|
6821
|
+
else {
|
|
6822
|
+
f(""), m(!0);
|
|
6823
|
+
try {
|
|
6824
|
+
await e(n), g(!0), u("");
|
|
6825
|
+
} catch {
|
|
6826
|
+
f("Não foi possível inscrever agora. Tente de novo.");
|
|
6827
|
+
} finally {
|
|
6828
|
+
m(!1);
|
|
6829
|
+
}
|
|
6830
|
+
}
|
|
6831
|
+
},
|
|
6832
|
+
noValidate: !0,
|
|
6833
|
+
"aria-label": t,
|
|
6834
|
+
children: [
|
|
6835
|
+
o === "cartao" && /* @__PURE__ */ K("h3", {
|
|
6836
|
+
className: "lp-news-titulo",
|
|
6837
|
+
children: t
|
|
6838
|
+
}),
|
|
6839
|
+
n && /* @__PURE__ */ K("p", {
|
|
6840
|
+
className: "lp-news-desc",
|
|
6841
|
+
children: n
|
|
6842
|
+
}),
|
|
6843
|
+
/* @__PURE__ */ q("div", {
|
|
6844
|
+
className: "lp-news-campo",
|
|
6845
|
+
children: [
|
|
6846
|
+
/* @__PURE__ */ K("label", {
|
|
6847
|
+
className: "lp-sr",
|
|
6848
|
+
htmlFor: c,
|
|
6849
|
+
children: "E-mail"
|
|
6850
|
+
}),
|
|
6851
|
+
/* @__PURE__ */ K("input", {
|
|
6852
|
+
id: c,
|
|
6853
|
+
className: "lp-news-input",
|
|
6854
|
+
type: "email",
|
|
6855
|
+
autoComplete: "email",
|
|
6856
|
+
maxLength: 254,
|
|
6857
|
+
value: l,
|
|
6858
|
+
placeholder: r,
|
|
6859
|
+
"aria-invalid": d ? !0 : void 0,
|
|
6860
|
+
"aria-describedby": d || h ? `${c}-msg` : void 0,
|
|
6861
|
+
onChange: (e) => {
|
|
6862
|
+
u(e.target.value), h && g(!1);
|
|
6863
|
+
}
|
|
6864
|
+
}),
|
|
6865
|
+
/* @__PURE__ */ K("button", {
|
|
6866
|
+
type: "submit",
|
|
6867
|
+
className: "lp-news-botao",
|
|
6868
|
+
disabled: p,
|
|
6869
|
+
children: i
|
|
6870
|
+
})
|
|
6871
|
+
]
|
|
6872
|
+
}),
|
|
6873
|
+
(d || h) && /* @__PURE__ */ K("p", {
|
|
6874
|
+
id: `${c}-msg`,
|
|
6875
|
+
className: Z("lp-news-msg", d && "is-erro"),
|
|
6876
|
+
role: d ? "alert" : "status",
|
|
6877
|
+
children: d || a
|
|
6878
|
+
})
|
|
6879
|
+
]
|
|
6880
|
+
});
|
|
6881
|
+
}
|
|
6882
|
+
//#endregion
|
|
6883
|
+
//#region src/components/Site/SumarioPagina.tsx
|
|
6884
|
+
function ss({ itens: e, titulo: t = "Nesta página", className: n }) {
|
|
6885
|
+
let [r, i] = X(e[0]?.id);
|
|
6886
|
+
J(() => {
|
|
6887
|
+
let t = e.map((e) => document.getElementById(e.id)).filter((e) => !!e);
|
|
6888
|
+
if (!t.length || typeof IntersectionObserver > "u") return;
|
|
6889
|
+
let n = () => {
|
|
6890
|
+
let e = window.scrollY + window.innerHeight >= document.documentElement.scrollHeight - 2, n = t.filter((e) => e.getBoundingClientRect().top < window.innerHeight * .3);
|
|
6891
|
+
i((e ? t[t.length - 1] : n[n.length - 1] ?? t[0]).id);
|
|
6892
|
+
}, r = new IntersectionObserver(n, { rootMargin: "0px 0px -70% 0px" });
|
|
6893
|
+
return t.forEach((e) => r.observe(e)), window.addEventListener("scroll", n, { passive: !0 }), () => {
|
|
6894
|
+
r.disconnect(), window.removeEventListener("scroll", n);
|
|
6895
|
+
};
|
|
6896
|
+
}, [e]);
|
|
6897
|
+
let a = (e, t) => {
|
|
6898
|
+
let n = document.getElementById(t);
|
|
6899
|
+
n && (e.preventDefault(), n.scrollIntoView({
|
|
6900
|
+
behavior: window.matchMedia("(prefers-reduced-motion: reduce)").matches ? "auto" : "smooth",
|
|
6901
|
+
block: "start"
|
|
6902
|
+
}), n.hasAttribute("tabindex") || n.setAttribute("tabindex", "-1"), n.focus({ preventScroll: !0 }), i(t));
|
|
6903
|
+
};
|
|
6904
|
+
return /* @__PURE__ */ q("nav", {
|
|
6905
|
+
className: Z("lp-sumario", n),
|
|
6906
|
+
"aria-label": t,
|
|
6907
|
+
children: [/* @__PURE__ */ K("div", {
|
|
6908
|
+
className: "lp-sumario-titulo",
|
|
6909
|
+
children: t
|
|
6910
|
+
}), /* @__PURE__ */ K("ol", {
|
|
6911
|
+
className: "lp-sumario-lista",
|
|
6912
|
+
children: e.map((e) => /* @__PURE__ */ K("li", { children: /* @__PURE__ */ K("a", {
|
|
6913
|
+
className: Z("lp-sumario-link", r === e.id && "is-atual"),
|
|
6914
|
+
href: `#${e.id}`,
|
|
6915
|
+
"aria-current": r === e.id ? "location" : void 0,
|
|
6916
|
+
onClick: (t) => a(t, e.id),
|
|
6917
|
+
children: e.rotulo
|
|
6918
|
+
}) }, e.id))
|
|
6919
|
+
})]
|
|
6920
|
+
});
|
|
6921
|
+
}
|
|
6922
|
+
//#endregion
|
|
6191
6923
|
//#region src/components/Grafico/escalas.ts
|
|
6192
|
-
var
|
|
6193
|
-
function
|
|
6924
|
+
var cs = new Intl.NumberFormat("pt-BR", { maximumFractionDigits: 2 });
|
|
6925
|
+
function ls(e, t) {
|
|
6194
6926
|
if (e == null || !Number.isFinite(e)) return "sem dado";
|
|
6195
|
-
let n = t?.formatar ? t.formatar(e) :
|
|
6927
|
+
let n = t?.formatar ? t.formatar(e) : cs.format(e);
|
|
6196
6928
|
return t?.unidade ? `${n} ${t.unidade}` : n;
|
|
6197
6929
|
}
|
|
6198
|
-
function
|
|
6930
|
+
function us(e, t) {
|
|
6199
6931
|
return t?.formatar ? t.formatar(e) : En(e, { compacto: Math.abs(e) >= 1e4 });
|
|
6200
6932
|
}
|
|
6201
|
-
function
|
|
6933
|
+
function ds(e) {
|
|
6202
6934
|
return typeof e == "number" && Number.isFinite(e) ? e : null;
|
|
6203
6935
|
}
|
|
6204
|
-
function
|
|
6936
|
+
function fs(e) {
|
|
6205
6937
|
if (!(e > 0)) return 1;
|
|
6206
6938
|
let t = 10 ** Math.floor(Math.log10(e)), n = e / t;
|
|
6207
6939
|
return (n <= 1 ? 1 : n <= 2 ? 2 : n <= 5 ? 5 : 10) * t;
|
|
6208
6940
|
}
|
|
6209
|
-
function
|
|
6941
|
+
function ps(e, t, n = 5) {
|
|
6210
6942
|
let r = e, i = t;
|
|
6211
6943
|
if (r === i) {
|
|
6212
6944
|
let e = r === 0 ? 1 : Math.abs(r) * .1;
|
|
6213
6945
|
r -= e, i += e;
|
|
6214
6946
|
}
|
|
6215
|
-
let a =
|
|
6947
|
+
let a = fs((i - r) / Math.max(1, n)), o = Math.max(0, -Math.floor(Math.log10(a))), s = Math.floor(r / a + 1e-9) * a, c = Math.ceil(i / a - 1e-9) * a, l = [];
|
|
6216
6948
|
for (let e = s; e <= c + a / 2; e += a) l.push(Number(e.toFixed(o)));
|
|
6217
6949
|
return {
|
|
6218
6950
|
de: l[0],
|
|
@@ -6220,14 +6952,14 @@ function Vo(e, t, n = 5) {
|
|
|
6220
6952
|
passos: l
|
|
6221
6953
|
};
|
|
6222
6954
|
}
|
|
6223
|
-
function
|
|
6955
|
+
function ms(e, t, n) {
|
|
6224
6956
|
let { de: r, ate: i } = e, a = i === r ? 0 : (n - t) / (i - r), o = ((e) => t + (e - r) * a);
|
|
6225
6957
|
return o.de = r, o.ate = i, o.passos = e.passos, o;
|
|
6226
6958
|
}
|
|
6227
|
-
function
|
|
6959
|
+
function hs(e, t, n, r) {
|
|
6228
6960
|
let i = e.length ? Math.min(...e) : 0, a = e.length ? Math.max(...e) : 1;
|
|
6229
6961
|
r && (i = Math.min(i, 0), a = Math.max(a, 0)), t?.minimo !== void 0 && (i = t.minimo), t?.maximo !== void 0 && (a = t.maximo);
|
|
6230
|
-
let o =
|
|
6962
|
+
let o = ps(i, a, n);
|
|
6231
6963
|
if (t?.minimo === void 0 && t?.maximo === void 0) return o;
|
|
6232
6964
|
let s = t?.minimo ?? o.de, c = t?.maximo ?? o.ate;
|
|
6233
6965
|
return {
|
|
@@ -6236,7 +6968,7 @@ function Uo(e, t, n, r) {
|
|
|
6236
6968
|
passos: o.passos.filter((e) => e >= s - 1e-9 && e <= c + 1e-9)
|
|
6237
6969
|
};
|
|
6238
6970
|
}
|
|
6239
|
-
function
|
|
6971
|
+
function gs(e, t, n, r = .2) {
|
|
6240
6972
|
let i = e > 0 ? (n - t) / e : 0, a = i * (1 - r);
|
|
6241
6973
|
return {
|
|
6242
6974
|
inicio: (e) => t + e * i + (i - a) / 2,
|
|
@@ -6246,7 +6978,7 @@ function Wo(e, t, n, r = .2) {
|
|
|
6246
6978
|
indice: (n) => Math.min(e - 1, Math.max(0, Math.floor((n - t) / (i || 1))))
|
|
6247
6979
|
};
|
|
6248
6980
|
}
|
|
6249
|
-
var
|
|
6981
|
+
var _s = [
|
|
6250
6982
|
"jan",
|
|
6251
6983
|
"fev",
|
|
6252
6984
|
"mar",
|
|
@@ -6260,7 +6992,7 @@ var Go = [
|
|
|
6260
6992
|
"nov",
|
|
6261
6993
|
"dez"
|
|
6262
6994
|
];
|
|
6263
|
-
function
|
|
6995
|
+
function vs(e) {
|
|
6264
6996
|
if (e instanceof Date) return Number.isNaN(e.getTime()) ? null : e;
|
|
6265
6997
|
if (typeof e == "number") return Number.isFinite(e) ? new Date(e) : null;
|
|
6266
6998
|
if (typeof e != "string") return null;
|
|
@@ -6269,27 +7001,27 @@ function Ko(e) {
|
|
|
6269
7001
|
let n = Date.parse(e);
|
|
6270
7002
|
return Number.isNaN(n) ? null : new Date(n);
|
|
6271
7003
|
}
|
|
6272
|
-
function
|
|
7004
|
+
function ys(e) {
|
|
6273
7005
|
let t = e.map((e) => e.getTime()).sort((e, t) => e - t), n = Infinity;
|
|
6274
7006
|
for (let e = 1; e < t.length; e++) t[e] > t[e - 1] && (n = Math.min(n, t[e] - t[e - 1]));
|
|
6275
7007
|
let r = n / 864e5;
|
|
6276
7008
|
return Number.isFinite(r) ? r >= 360 ? "ano" : r >= 28 ? "mes" : "dia" : e.every((e) => e.getMonth() === 0 && e.getDate() === 1) ? "ano" : "dia";
|
|
6277
7009
|
}
|
|
6278
|
-
var
|
|
6279
|
-
function
|
|
6280
|
-
let t =
|
|
7010
|
+
var bs = (e) => String(e).padStart(2, "0");
|
|
7011
|
+
function xs(e) {
|
|
7012
|
+
let t = ys(e);
|
|
6281
7013
|
return t === "ano" ? {
|
|
6282
7014
|
curto: (e) => String(e.getFullYear()),
|
|
6283
7015
|
completo: (e) => String(e.getFullYear())
|
|
6284
7016
|
} : t === "mes" ? {
|
|
6285
|
-
curto: (e) => `${
|
|
6286
|
-
completo: (e) => `${
|
|
7017
|
+
curto: (e) => `${_s[e.getMonth()]}/${String(e.getFullYear()).slice(2)}`,
|
|
7018
|
+
completo: (e) => `${_s[e.getMonth()]}/${e.getFullYear()}`
|
|
6287
7019
|
} : {
|
|
6288
|
-
curto: (e) => `${
|
|
7020
|
+
curto: (e) => `${bs(e.getDate())}/${bs(e.getMonth() + 1)}`,
|
|
6289
7021
|
completo: Fn
|
|
6290
7022
|
};
|
|
6291
7023
|
}
|
|
6292
|
-
function
|
|
7024
|
+
function Ss(e, t) {
|
|
6293
7025
|
if (t.formatar) {
|
|
6294
7026
|
let n = t.formatar, r = e.map((e) => e == null ? "" : n(e));
|
|
6295
7027
|
return {
|
|
@@ -6298,14 +7030,14 @@ function Xo(e, t) {
|
|
|
6298
7030
|
};
|
|
6299
7031
|
}
|
|
6300
7032
|
if (t.tipo === "data") {
|
|
6301
|
-
let t = e.map(
|
|
7033
|
+
let t = e.map(vs), { curto: n, completo: r } = xs(t.filter((e) => !!e));
|
|
6302
7034
|
return {
|
|
6303
7035
|
curtos: t.map((e) => e ? n(e) : ""),
|
|
6304
7036
|
completos: t.map((e) => e ? r(e) : "")
|
|
6305
7037
|
};
|
|
6306
7038
|
}
|
|
6307
7039
|
if (t.tipo === "numero") {
|
|
6308
|
-
let t = e.map((e) => typeof e == "number" ?
|
|
7040
|
+
let t = e.map((e) => typeof e == "number" ? cs.format(e) : String(e ?? ""));
|
|
6309
7041
|
return {
|
|
6310
7042
|
curtos: t,
|
|
6311
7043
|
completos: t
|
|
@@ -6317,24 +7049,24 @@ function Xo(e, t) {
|
|
|
6317
7049
|
completos: n
|
|
6318
7050
|
};
|
|
6319
7051
|
}
|
|
6320
|
-
function
|
|
6321
|
-
return t === "data" ?
|
|
7052
|
+
function Cs(e, t) {
|
|
7053
|
+
return t === "data" ? vs(e)?.getTime() ?? null : ds(e);
|
|
6322
7054
|
}
|
|
6323
|
-
function
|
|
7055
|
+
function ws(e, t = 12) {
|
|
6324
7056
|
return e.length * t * .56;
|
|
6325
7057
|
}
|
|
6326
|
-
function
|
|
7058
|
+
function Ts(e, t, n = 10) {
|
|
6327
7059
|
let r = [], i = -Infinity;
|
|
6328
7060
|
return e.forEach((e, a) => {
|
|
6329
|
-
let o =
|
|
7061
|
+
let o = ws(t[a]) / 2;
|
|
6330
7062
|
!t[a] || e - o < i + n || (r.push(a), i = e + o);
|
|
6331
7063
|
}), r;
|
|
6332
7064
|
}
|
|
6333
|
-
function
|
|
6334
|
-
let r = Math.max(0, ...t.map((e) =>
|
|
7065
|
+
function Es(e, t, n = 10) {
|
|
7066
|
+
let r = Math.max(0, ...t.map((e) => ws(e))), i = Math.max(1, Math.ceil((r + n) / Math.max(1, e)));
|
|
6335
7067
|
return t.map((e, t) => t).filter((e) => e % i === 0);
|
|
6336
7068
|
}
|
|
6337
|
-
function
|
|
7069
|
+
function Ds(e) {
|
|
6338
7070
|
let t = e.filter((e) => typeof e.x == "number" && typeof e.y == "number" && Number.isFinite(e.x) && Number.isFinite(e.y)), n = t.length;
|
|
6339
7071
|
if (n < 3) return null;
|
|
6340
7072
|
let r = t.reduce((e, t) => e + t.x, 0) / n, i = t.reduce((e, t) => e + t.y, 0) / n, a = 0, o = 0, s = 0;
|
|
@@ -6351,7 +7083,7 @@ function ts(e) {
|
|
|
6351
7083
|
}
|
|
6352
7084
|
//#endregion
|
|
6353
7085
|
//#region src/components/Grafico/MolduraGrafico.tsx
|
|
6354
|
-
function
|
|
7086
|
+
function Os() {
|
|
6355
7087
|
let e = Y(null), [t, n] = X(0);
|
|
6356
7088
|
return Ot(() => {
|
|
6357
7089
|
let t = e.current;
|
|
@@ -6362,7 +7094,7 @@ function ns() {
|
|
|
6362
7094
|
return i.observe(t), () => i.disconnect();
|
|
6363
7095
|
}, []), [e, t];
|
|
6364
7096
|
}
|
|
6365
|
-
function
|
|
7097
|
+
function ks({ cor: e, forma: t, tracejada: n }) {
|
|
6366
7098
|
return /* @__PURE__ */ K("svg", {
|
|
6367
7099
|
className: "lp-graf-amostra",
|
|
6368
7100
|
width: "16",
|
|
@@ -6393,8 +7125,8 @@ function rs({ cor: e, forma: t, tracejada: n }) {
|
|
|
6393
7125
|
})
|
|
6394
7126
|
});
|
|
6395
7127
|
}
|
|
6396
|
-
function
|
|
6397
|
-
let [m, h] = X(!1), [g, _] =
|
|
7128
|
+
function As({ titulo: e, altura: t = 280, legenda: n = !0, carregando: r, textoVazio: i = "Sem dados para mostrar.", verDados: a = !0, animacao: o, className: s, semDados: c, itensLegenda: l = [], aoAlternarSerie: u, tabela: d, nota: f, children: p }) {
|
|
7129
|
+
let [m, h] = X(!1), [g, _] = Os(), v = n && l.length > 1 && !r && !c && !m, y = m && !r && !c ? d() : null;
|
|
6398
7130
|
return /* @__PURE__ */ q("figure", {
|
|
6399
7131
|
className: Z("lp-graf", o && "lp-graf--animado", s),
|
|
6400
7132
|
children: [
|
|
@@ -6423,7 +7155,7 @@ function is({ titulo: e, altura: t = 280, legenda: n = !0, carregando: r, textoV
|
|
|
6423
7155
|
"aria-pressed": e.visivel,
|
|
6424
7156
|
title: e.visivel ? "Esconder a série" : "Mostrar a série",
|
|
6425
7157
|
onClick: () => u?.(e.chave),
|
|
6426
|
-
children: [/* @__PURE__ */ K(
|
|
7158
|
+
children: [/* @__PURE__ */ K(ks, {
|
|
6427
7159
|
cor: e.cor,
|
|
6428
7160
|
forma: e.forma,
|
|
6429
7161
|
tracejada: e.tracejada
|
|
@@ -6450,7 +7182,7 @@ function is({ titulo: e, altura: t = 280, legenda: n = !0, carregando: r, textoV
|
|
|
6450
7182
|
]
|
|
6451
7183
|
});
|
|
6452
7184
|
}
|
|
6453
|
-
function
|
|
7185
|
+
function js() {
|
|
6454
7186
|
let [e, t] = X(/* @__PURE__ */ new Set());
|
|
6455
7187
|
return [e, wt((e, n) => {
|
|
6456
7188
|
t((t) => {
|
|
@@ -6459,7 +7191,7 @@ function as() {
|
|
|
6459
7191
|
});
|
|
6460
7192
|
}, [])];
|
|
6461
7193
|
}
|
|
6462
|
-
function
|
|
7194
|
+
function Ms(e) {
|
|
6463
7195
|
let [t, n] = X(null);
|
|
6464
7196
|
return {
|
|
6465
7197
|
ativo: t !== null && t < e ? t : null,
|
|
@@ -6471,7 +7203,7 @@ function os(e) {
|
|
|
6471
7203
|
}
|
|
6472
7204
|
};
|
|
6473
7205
|
}
|
|
6474
|
-
function
|
|
7206
|
+
function Ns({ x: e, y: t = 8, largura: n, titulo: r, linhas: i }) {
|
|
6475
7207
|
let a = e <= n / 2;
|
|
6476
7208
|
return /* @__PURE__ */ q("div", {
|
|
6477
7209
|
className: "lp-graf-caixa",
|
|
@@ -6489,7 +7221,7 @@ function ss({ x: e, y: t = 8, largura: n, titulo: r, linhas: i }) {
|
|
|
6489
7221
|
}), i.map((e) => /* @__PURE__ */ q("div", {
|
|
6490
7222
|
className: "lp-graf-caixa-linha",
|
|
6491
7223
|
children: [
|
|
6492
|
-
/* @__PURE__ */ K(
|
|
7224
|
+
/* @__PURE__ */ K(ks, {
|
|
6493
7225
|
cor: e.cor,
|
|
6494
7226
|
forma: e.forma
|
|
6495
7227
|
}),
|
|
@@ -6505,10 +7237,10 @@ function ss({ x: e, y: t = 8, largura: n, titulo: r, linhas: i }) {
|
|
|
6505
7237
|
}, e.chave))]
|
|
6506
7238
|
});
|
|
6507
7239
|
}
|
|
6508
|
-
function
|
|
7240
|
+
function Ps(e, t) {
|
|
6509
7241
|
return [e, ...t.map((e) => `${e.rotulo}: ${e.valor}`)].join(". ");
|
|
6510
7242
|
}
|
|
6511
|
-
function
|
|
7243
|
+
function Fs(e, t, n) {
|
|
6512
7244
|
let r = `lp-graf-rev-${Et().replace(/[^a-zA-Z0-9_-]/g, "")}`;
|
|
6513
7245
|
return e ? {
|
|
6514
7246
|
recorte: `url(#${r})`,
|
|
@@ -6527,33 +7259,33 @@ function ls(e, t, n) {
|
|
|
6527
7259
|
definicao: null
|
|
6528
7260
|
};
|
|
6529
7261
|
}
|
|
6530
|
-
function
|
|
7262
|
+
function Is(e, t) {
|
|
6531
7263
|
return t ?? `var(--graf-${e % 6 + 1})`;
|
|
6532
7264
|
}
|
|
6533
7265
|
//#endregion
|
|
6534
7266
|
//#region src/components/Grafico/Cartesiano.tsx
|
|
6535
|
-
var
|
|
7267
|
+
var Ls = {
|
|
6536
7268
|
categoria: "Categoria",
|
|
6537
7269
|
data: "Data",
|
|
6538
7270
|
numero: "Valor"
|
|
6539
|
-
},
|
|
6540
|
-
function
|
|
7271
|
+
}, Rs = new Intl.NumberFormat("pt-BR", { maximumFractionDigits: 2 });
|
|
7272
|
+
function zs(e) {
|
|
6541
7273
|
return e ? e.rotulo && e.unidade ? `${e.rotulo} (${e.unidade})` : e.rotulo ?? e.unidade ?? "" : "";
|
|
6542
7274
|
}
|
|
6543
|
-
function
|
|
7275
|
+
function Bs(e) {
|
|
6544
7276
|
let t = "", n = !0;
|
|
6545
7277
|
for (let r of e) r ? (t += `${n ? "M" : "L"}${r[0].toFixed(1)} ${r[1].toFixed(1)}`, n = !1) : n = !0;
|
|
6546
7278
|
return t;
|
|
6547
7279
|
}
|
|
6548
|
-
function
|
|
7280
|
+
function Vs(e) {
|
|
6549
7281
|
let t = [], n = [];
|
|
6550
7282
|
for (let r of e) r ? n.push(r) : n.length && (t.push(n), n = []);
|
|
6551
7283
|
return n.length && t.push(n), t;
|
|
6552
7284
|
}
|
|
6553
|
-
function
|
|
6554
|
-
if (
|
|
6555
|
-
let n = Math.max(2, Math.floor(t /
|
|
6556
|
-
for (; r.length &&
|
|
7285
|
+
function Hs(e, t) {
|
|
7286
|
+
if (ws(e) <= t) return [e];
|
|
7287
|
+
let n = Math.max(2, Math.floor(t / ws("m"))), r = e.split(" "), i = "";
|
|
7288
|
+
for (; r.length && ws(i ? `${i} ${r[0]}` : r[0]) <= t;) i = i ? `${i} ${r.shift()}` : r.shift() ?? "";
|
|
6557
7289
|
if (!i) {
|
|
6558
7290
|
let e = r.shift() ?? "";
|
|
6559
7291
|
i = e.length > n ? `${e.slice(0, n - 1)}…` : e;
|
|
@@ -6561,17 +7293,17 @@ function gs(e, t) {
|
|
|
6561
7293
|
let a = r.join(" ");
|
|
6562
7294
|
return a ? [i, a.length > n ? `${a.slice(0, n - 1)}…` : a] : [i];
|
|
6563
7295
|
}
|
|
6564
|
-
function
|
|
6565
|
-
let r =
|
|
7296
|
+
function Us(e, t, n) {
|
|
7297
|
+
let r = ws(t) / 2;
|
|
6566
7298
|
return e - r < 0 ? "start" : e + r > n ? "end" : "middle";
|
|
6567
7299
|
}
|
|
6568
|
-
function
|
|
6569
|
-
let { dados: t, eixoX: n, eixoY: r, eixoYDireito: i, series: a } = e, [o, s] =
|
|
7300
|
+
function Ws(e) {
|
|
7301
|
+
let { dados: t, eixoX: n, eixoY: r, eixoYDireito: i, series: a } = e, [o, s] = js(), c = !!i, l = (e) => c ? e.eixo ?? (e.tipo === "barra" ? "esquerdo" : "direito") : "esquerdo", u = (e) => e === "direito" ? i : r, { completos: d } = Ss(t.map((e) => e[n.chave]), n), f = a.map((t, n) => {
|
|
6570
7302
|
let r = l(t), i = u(r)?.unidade, a = c ? ` (${i ? `${i}, ` : ""}eixo ${r})` : "";
|
|
6571
7303
|
return {
|
|
6572
7304
|
chave: t.chave,
|
|
6573
7305
|
rotulo: t.rotulo + a,
|
|
6574
|
-
cor: e.divergente && t.tipo === "barra" ? "var(--graf-pos)" :
|
|
7306
|
+
cor: e.divergente && t.tipo === "barra" ? "var(--graf-pos)" : Is(n, t.cor),
|
|
6575
7307
|
forma: t.tipo === "barra" ? "barra" : "linha",
|
|
6576
7308
|
tracejada: t.tracejada,
|
|
6577
7309
|
visivel: !o.has(t.chave)
|
|
@@ -6579,14 +7311,14 @@ function vs(e) {
|
|
|
6579
7311
|
}), p = () => ({
|
|
6580
7312
|
colunas: [{
|
|
6581
7313
|
campo: "__x",
|
|
6582
|
-
rotulo: n.rotulo ??
|
|
7314
|
+
rotulo: n.rotulo ?? Ls[n.tipo]
|
|
6583
7315
|
}, ...a.map((e) => {
|
|
6584
7316
|
let t = u(l(e));
|
|
6585
7317
|
return {
|
|
6586
7318
|
campo: e.chave,
|
|
6587
7319
|
rotulo: t?.unidade ? `${e.rotulo} (${t.unidade})` : e.rotulo,
|
|
6588
7320
|
alinhamento: "direita",
|
|
6589
|
-
formato: (e) =>
|
|
7321
|
+
formato: (e) => ls(ds(e), {
|
|
6590
7322
|
...t,
|
|
6591
7323
|
unidade: void 0
|
|
6592
7324
|
})
|
|
@@ -6597,13 +7329,13 @@ function vs(e) {
|
|
|
6597
7329
|
__x: d[t]
|
|
6598
7330
|
}))
|
|
6599
7331
|
});
|
|
6600
|
-
return /* @__PURE__ */ K(
|
|
7332
|
+
return /* @__PURE__ */ K(As, {
|
|
6601
7333
|
...e,
|
|
6602
7334
|
semDados: t.length === 0 || a.length === 0,
|
|
6603
7335
|
itensLegenda: f,
|
|
6604
7336
|
aoAlternarSerie: (e) => s(e, a.length),
|
|
6605
7337
|
tabela: p,
|
|
6606
|
-
children: (t) => /* @__PURE__ */ K(
|
|
7338
|
+
children: (t) => /* @__PURE__ */ K(Gs, {
|
|
6607
7339
|
...e,
|
|
6608
7340
|
largura: t,
|
|
6609
7341
|
ocultas: o,
|
|
@@ -6612,8 +7344,8 @@ function vs(e) {
|
|
|
6612
7344
|
})
|
|
6613
7345
|
});
|
|
6614
7346
|
}
|
|
6615
|
-
function
|
|
6616
|
-
let b = r.length, { ativo: x, setAtivo: S, aoTeclar: C } =
|
|
7347
|
+
function Gs({ titulo: e, descricao: t, altura: n = 280, dados: r, eixoX: i, eixoY: a, eixoYDireito: o, series: s, orientacao: c = "vertical", pontos: l, area: u, referencias: d = [], faixas: f = [], divergente: p, rotulosNasBarras: m, animacao: h, largura: g, ocultas: _, ladoDe: v, completos: y }) {
|
|
7348
|
+
let b = r.length, { ativo: x, setAtivo: S, aoTeclar: C } = Ms(b), [w, T] = X(!1), E = c === "horizontal", D = new Map(s.map((e, t) => [e.chave, t])), O = s.filter((e) => !_.has(e.chave)), k = O.filter((e) => e.tipo === "barra"), A = O.filter((e) => e.tipo === "linha"), j = E || s.some((e) => e.tipo === "barra") || i.tipo === "categoria", M = (e) => e === "direito" ? o : a, N = (e, t) => ds(r[t][e.chave]), P = (e, t) => p && e.tipo === "barra" ? t != null && t < 0 ? "var(--graf-neg)" : "var(--graf-pos)" : Is(D.get(e.chave) ?? 0, e.cor), { curtos: F } = Ss(r.map((e) => e[i.chave]), i), I = (e) => {
|
|
6617
7349
|
let t = [];
|
|
6618
7350
|
for (let n of O) if (v(n) === e) for (let e = 0; e < b; e++) {
|
|
6619
7351
|
let r = N(n, e);
|
|
@@ -6621,27 +7353,27 @@ function ys({ titulo: e, descricao: t, altura: n = 280, dados: r, eixoX: i, eixo
|
|
|
6621
7353
|
}
|
|
6622
7354
|
for (let n of d) (n.eixo ?? "esquerdo") === e && t.push(n.valor);
|
|
6623
7355
|
return t;
|
|
6624
|
-
}, L = A[0], ee = (e) => k.some((t) => v(t) === e) || !!u && !!L && v(L) === e, R =
|
|
7356
|
+
}, L = A[0], ee = (e) => k.some((t) => v(t) === e) || !!u && !!L && v(L) === e, R = zs(a), te = zs(o), ne = R || te ? 24 : 10, re = (g - 90) / Math.max(1, b), ie = !E && i.tipo === "categoria" && F.some((e) => ws(e) > re - 6) ? F.map((e) => Hs(e, re - 6)) : null, ae = !!ie && re >= ws("mmm") + 6, oe = ae ? 40 : 26, se = g * .5 - 12, ce = E ? F.map((e) => Hs(e, se)) : [], le = ce.some((e) => e.length > 1), ue = E ? Math.max(n, b * (le ? 36 : 24) + ne + oe) : n, de = Math.max(2, Math.round((ue - ne - oe) / 50)), z, B, V = ne, fe = ue - oe, H, pe = null, me = [];
|
|
6625
7357
|
if (E) {
|
|
6626
|
-
let e = Math.max(0, ...ce.flat().map((e) =>
|
|
7358
|
+
let e = Math.max(0, ...ce.flat().map((e) => ws(e)));
|
|
6627
7359
|
z = Math.min(e + 12, g * .5);
|
|
6628
|
-
let t = I("esquerdo"), n = m ? Math.max(0, ...t.map((e) =>
|
|
7360
|
+
let t = I("esquerdo"), n = m ? Math.max(0, ...t.map((e) => ws(ls(e, {
|
|
6629
7361
|
...a,
|
|
6630
7362
|
unidade: void 0
|
|
6631
7363
|
})))) + 8 : 0;
|
|
6632
7364
|
B = g - Math.max(14, n);
|
|
6633
|
-
let r = Math.max(2, Math.floor((B - z) / 60)), i =
|
|
6634
|
-
for (; r > 2 && (B - z) / Math.max(1, i.passos.length - 1) < o(i) + 16;) i =
|
|
6635
|
-
H =
|
|
7365
|
+
let r = Math.max(2, Math.floor((B - z) / 60)), i = hs(t, a, r, !0), o = (e) => Math.max(...e.passos.map((e) => ws(us(e, a))));
|
|
7366
|
+
for (; r > 2 && (B - z) / Math.max(1, i.passos.length - 1) < o(i) + 16;) i = hs(t, a, --r, !0);
|
|
7367
|
+
H = ms(i, z, B);
|
|
6636
7368
|
} else {
|
|
6637
|
-
let e =
|
|
6638
|
-
if (e.passos.forEach((e) => me.push(
|
|
6639
|
-
let e =
|
|
6640
|
-
B = g - Math.max(28, t + 12), pe =
|
|
7369
|
+
let e = hs(I("esquerdo"), a, de, ee("esquerdo"));
|
|
7370
|
+
if (e.passos.forEach((e) => me.push(us(e, a))), z = Math.max(28, Math.max(...me.map((e) => ws(e))) + 12), o) {
|
|
7371
|
+
let e = hs(I("direito"), o, de, ee("direito")), t = Math.max(...e.passos.map((e) => ws(us(e, o))));
|
|
7372
|
+
B = g - Math.max(28, t + 12), pe = ms(e, fe, V);
|
|
6641
7373
|
} else B = g - 12;
|
|
6642
|
-
H =
|
|
7374
|
+
H = ms(e, fe, V);
|
|
6643
7375
|
}
|
|
6644
|
-
let he = (e) => e === "direito" && pe ? pe : H, ge = (e) => e(Math.min(e.ate, Math.max(e.de, 0))), U = E ?
|
|
7376
|
+
let he = (e) => e === "direito" && pe ? pe : H, ge = (e) => e(Math.min(e.ate, Math.max(e.de, 0))), U = E ? gs(b, V, fe, .25) : gs(b, z, B, k.length ? .2 : 0), _e = j ? [] : r.map((e) => Cs(e[i.chave], i.tipo)), ve = _e.filter((e) => e !== null), W = !j && ve.length ? ms({
|
|
6645
7377
|
de: Math.min(...ve),
|
|
6646
7378
|
ate: Math.max(...ve),
|
|
6647
7379
|
passos: []
|
|
@@ -6656,19 +7388,19 @@ function ys({ titulo: e, descricao: t, altura: n = 280, dados: r, eixoX: i, eixo
|
|
|
6656
7388
|
texto: F[t],
|
|
6657
7389
|
linhas: e
|
|
6658
7390
|
}));
|
|
6659
|
-
else if (j) for (let e of
|
|
7391
|
+
else if (j) for (let e of Es(U.passo, F)) be.push({
|
|
6660
7392
|
x: U.centro(e),
|
|
6661
7393
|
texto: F[e]
|
|
6662
7394
|
});
|
|
6663
7395
|
else if (i.tipo === "numero" && W && !i.formatar) {
|
|
6664
|
-
let e =
|
|
7396
|
+
let e = ps(W.de, W.ate, Math.max(2, Math.floor((B - z) / 80))).passos.filter((e) => e >= W.de && e <= W.ate);
|
|
6665
7397
|
for (let t of e) be.push({
|
|
6666
7398
|
x: W(t),
|
|
6667
|
-
texto:
|
|
7399
|
+
texto: Rs.format(t)
|
|
6668
7400
|
});
|
|
6669
7401
|
} else {
|
|
6670
7402
|
let e = r.map((e, t) => ye(t) ?? -Infinity);
|
|
6671
|
-
for (let t of
|
|
7403
|
+
for (let t of Ts(e, F)) be.push({
|
|
6672
7404
|
x: e[t],
|
|
6673
7405
|
texto: F[t]
|
|
6674
7406
|
});
|
|
@@ -6681,7 +7413,7 @@ function ys({ titulo: e, descricao: t, altura: n = 280, dados: r, eixoX: i, eixo
|
|
|
6681
7413
|
if (r < 0 || i < 0) return [];
|
|
6682
7414
|
t = U.centro(Math.min(r, i)) - U.passo / 2, n = U.centro(Math.max(r, i)) + U.passo / 2;
|
|
6683
7415
|
} else {
|
|
6684
|
-
let r =
|
|
7416
|
+
let r = Cs(e.de, i.tipo), a = Cs(e.ate, i.tipo);
|
|
6685
7417
|
if (r === null || a === null || !W || (t = Math.max(z, Math.min(W(r), W(a))), n = Math.min(B, Math.max(W(r), W(a))), n <= t)) return [];
|
|
6686
7418
|
}
|
|
6687
7419
|
return [{
|
|
@@ -6696,7 +7428,7 @@ function ys({ titulo: e, descricao: t, altura: n = 280, dados: r, eixoX: i, eixo
|
|
|
6696
7428
|
rotulo: t.rotulo,
|
|
6697
7429
|
cor: P(t, n),
|
|
6698
7430
|
forma: t.tipo === "barra" ? "barra" : "linha",
|
|
6699
|
-
valor:
|
|
7431
|
+
valor: ls(n, M(v(t)))
|
|
6700
7432
|
};
|
|
6701
7433
|
}), we = (e) => {
|
|
6702
7434
|
if (!b) return null;
|
|
@@ -6712,7 +7444,7 @@ function ys({ titulo: e, descricao: t, altura: n = 280, dados: r, eixoX: i, eixo
|
|
|
6712
7444
|
r < a && (a = r, i = e);
|
|
6713
7445
|
}
|
|
6714
7446
|
return i < 0 ? null : i;
|
|
6715
|
-
}, Te = new Set(E ?
|
|
7447
|
+
}, Te = new Set(E ? Ts(H.passos.map((e) => H(e)), H.passos.map((e) => us(e, a))) : []), Ee = l ?? b <= 60, De = t ? `${e}. ${t}` : e, Oe = [], ke = [], { recorte: Ae, definicao: je } = Fs(h, g, ue);
|
|
6716
7448
|
if (k.length) {
|
|
6717
7449
|
let e = k.length, t = U.largura / e, n = e > 1 ? Math.min(2, t * .15) : 0;
|
|
6718
7450
|
k.forEach((e, r) => {
|
|
@@ -6738,7 +7470,7 @@ function ys({ titulo: e, descricao: t, altura: n = 280, dados: r, eixoX: i, eixo
|
|
|
6738
7470
|
rx: 1.5,
|
|
6739
7471
|
fill: p
|
|
6740
7472
|
}, `b${e.chave}${o}`)), m) {
|
|
6741
|
-
let n =
|
|
7473
|
+
let n = ls(s, {
|
|
6742
7474
|
...M(v(e)),
|
|
6743
7475
|
unidade: void 0
|
|
6744
7476
|
});
|
|
@@ -6748,7 +7480,7 @@ function ys({ titulo: e, descricao: t, altura: n = 280, dados: r, eixoX: i, eixo
|
|
|
6748
7480
|
y: d + f / 2 + 4,
|
|
6749
7481
|
textAnchor: s < 0 ? "end" : "start",
|
|
6750
7482
|
children: n
|
|
6751
|
-
}, `r${e.chave}${o}`)) :
|
|
7483
|
+
}, `r${e.chave}${o}`)) : ws(n) <= t + 6 && Oe.push(/* @__PURE__ */ K("text", {
|
|
6752
7484
|
className: "lp-graf-texto lp-graf-depois",
|
|
6753
7485
|
x: d + f / 2,
|
|
6754
7486
|
y: s < 0 ? c + 14 : c - 4,
|
|
@@ -6766,9 +7498,9 @@ function ys({ titulo: e, descricao: t, altura: n = 280, dados: r, eixoX: i, eixo
|
|
|
6766
7498
|
});
|
|
6767
7499
|
if (u && e === L) {
|
|
6768
7500
|
let r = ge(t);
|
|
6769
|
-
|
|
7501
|
+
Vs(i).forEach((t, i) => {
|
|
6770
7502
|
if (t.length < 2) return;
|
|
6771
|
-
let a = `${
|
|
7503
|
+
let a = `${Bs(t)}L${t[t.length - 1][0].toFixed(1)} ${r.toFixed(1)}L${t[0][0].toFixed(1)} ${r.toFixed(1)}Z`;
|
|
6772
7504
|
ke.push(/* @__PURE__ */ K("path", {
|
|
6773
7505
|
className: "lp-graf-area-serie",
|
|
6774
7506
|
d: a,
|
|
@@ -6778,10 +7510,10 @@ function ys({ titulo: e, descricao: t, altura: n = 280, dados: r, eixoX: i, eixo
|
|
|
6778
7510
|
}
|
|
6779
7511
|
ke.push(/* @__PURE__ */ K("path", {
|
|
6780
7512
|
className: "lp-graf-linha",
|
|
6781
|
-
d:
|
|
7513
|
+
d: Bs(i),
|
|
6782
7514
|
stroke: n,
|
|
6783
7515
|
strokeDasharray: e.tracejada ? "6 4" : void 0
|
|
6784
|
-
}, `l${e.chave}`)),
|
|
7516
|
+
}, `l${e.chave}`)), Vs(i).forEach((t, r) => {
|
|
6785
7517
|
(Ee || t.length === 1) && t.forEach(([t, i], a) => ke.push(/* @__PURE__ */ K("circle", {
|
|
6786
7518
|
className: "lp-graf-ponto",
|
|
6787
7519
|
cx: t,
|
|
@@ -6849,8 +7581,8 @@ function ys({ titulo: e, descricao: t, altura: n = 280, dados: r, eixoX: i, eixo
|
|
|
6849
7581
|
className: "lp-graf-texto",
|
|
6850
7582
|
x: H(e),
|
|
6851
7583
|
y: fe + 17,
|
|
6852
|
-
textAnchor:
|
|
6853
|
-
children:
|
|
7584
|
+
textAnchor: Us(H(e), us(e, a), g),
|
|
7585
|
+
children: us(e, a)
|
|
6854
7586
|
})] }, `g${e}`)) : H.passos.map((e, t) => /* @__PURE__ */ q("g", { children: [/* @__PURE__ */ K("line", {
|
|
6855
7587
|
className: "lp-graf-grade",
|
|
6856
7588
|
x1: z,
|
|
@@ -6868,7 +7600,7 @@ function ys({ titulo: e, descricao: t, altura: n = 280, dados: r, eixoX: i, eixo
|
|
|
6868
7600
|
className: "lp-graf-texto",
|
|
6869
7601
|
x: B + 6,
|
|
6870
7602
|
y: pe(e) + 4,
|
|
6871
|
-
children:
|
|
7603
|
+
children: us(e, o)
|
|
6872
7604
|
}, `d${e}`)),
|
|
6873
7605
|
R && /* @__PURE__ */ K("text", {
|
|
6874
7606
|
className: "lp-graf-texto lp-graf-texto--eixo",
|
|
@@ -6919,7 +7651,7 @@ function ys({ titulo: e, descricao: t, altura: n = 280, dados: r, eixoX: i, eixo
|
|
|
6919
7651
|
className: "lp-graf-texto",
|
|
6920
7652
|
x: e.x,
|
|
6921
7653
|
y: fe + 17,
|
|
6922
|
-
textAnchor:
|
|
7654
|
+
textAnchor: Us(e.x, e.texto, g),
|
|
6923
7655
|
children: e.texto
|
|
6924
7656
|
}, `x${t}`))] }),
|
|
6925
7657
|
(p || H.de < 0 && H.ate > 0) && (E ? /* @__PURE__ */ K("line", {
|
|
@@ -6991,7 +7723,7 @@ function ys({ titulo: e, descricao: t, altura: n = 280, dados: r, eixoX: i, eixo
|
|
|
6991
7723
|
}, `m${e.chave}`);
|
|
6992
7724
|
})
|
|
6993
7725
|
]
|
|
6994
|
-
}), x !== null && /* @__PURE__ */ K(
|
|
7726
|
+
}), x !== null && /* @__PURE__ */ K(Ns, {
|
|
6995
7727
|
x: E ? B : Me ?? z,
|
|
6996
7728
|
y: E ? Math.min(ue - 70, U.centro(x) + U.passo / 2 + 4) : V,
|
|
6997
7729
|
largura: g,
|
|
@@ -7001,13 +7733,13 @@ function ys({ titulo: e, descricao: t, altura: n = 280, dados: r, eixoX: i, eixo
|
|
|
7001
7733
|
}), /* @__PURE__ */ K("div", {
|
|
7002
7734
|
className: "lp-sr",
|
|
7003
7735
|
"aria-live": "polite",
|
|
7004
|
-
children: x === null ? "" :
|
|
7736
|
+
children: x === null ? "" : Ps(y[x], Ce(x))
|
|
7005
7737
|
})] });
|
|
7006
7738
|
}
|
|
7007
7739
|
//#endregion
|
|
7008
7740
|
//#region src/components/Grafico/GraficoLinha.tsx
|
|
7009
|
-
function
|
|
7010
|
-
return /* @__PURE__ */ K(
|
|
7741
|
+
function Ks({ series: e, ...t }) {
|
|
7742
|
+
return /* @__PURE__ */ K(Ws, {
|
|
7011
7743
|
...t,
|
|
7012
7744
|
series: e.map((e) => ({
|
|
7013
7745
|
...e,
|
|
@@ -7018,8 +7750,8 @@ function bs({ series: e, ...t }) {
|
|
|
7018
7750
|
}
|
|
7019
7751
|
//#endregion
|
|
7020
7752
|
//#region src/components/Grafico/GraficoBarras.tsx
|
|
7021
|
-
function
|
|
7022
|
-
return /* @__PURE__ */ K(
|
|
7753
|
+
function qs({ series: e, ...t }) {
|
|
7754
|
+
return /* @__PURE__ */ K(Ws, {
|
|
7023
7755
|
...t,
|
|
7024
7756
|
series: e.map((e) => ({
|
|
7025
7757
|
...e,
|
|
@@ -7030,8 +7762,8 @@ function xs({ series: e, ...t }) {
|
|
|
7030
7762
|
}
|
|
7031
7763
|
//#endregion
|
|
7032
7764
|
//#region src/components/Grafico/GraficoCombinado.tsx
|
|
7033
|
-
function
|
|
7034
|
-
return /* @__PURE__ */ K(
|
|
7765
|
+
function Js({ barras: e = [], linhas: t = [], eixoYDireito: n, ...r }) {
|
|
7766
|
+
return /* @__PURE__ */ K(Ws, {
|
|
7035
7767
|
...r,
|
|
7036
7768
|
eixoYDireito: n ?? {},
|
|
7037
7769
|
series: [...e.map((e) => ({
|
|
@@ -7045,15 +7777,15 @@ function Ss({ barras: e = [], linhas: t = [], eixoYDireito: n, ...r }) {
|
|
|
7045
7777
|
}
|
|
7046
7778
|
//#endregion
|
|
7047
7779
|
//#region src/components/Grafico/GraficoDispersao.tsx
|
|
7048
|
-
var
|
|
7780
|
+
var Ys = new Intl.NumberFormat("pt-BR", {
|
|
7049
7781
|
minimumFractionDigits: 2,
|
|
7050
7782
|
maximumFractionDigits: 2
|
|
7051
7783
|
});
|
|
7052
|
-
function
|
|
7784
|
+
function Xs(e) {
|
|
7053
7785
|
return e ? e.rotulo && e.unidade ? `${e.rotulo} (${e.unidade})` : e.rotulo ?? e.unidade ?? "" : "";
|
|
7054
7786
|
}
|
|
7055
|
-
function
|
|
7056
|
-
let { dados: t, chaveX: n, chaveY: r, chaveRotulo: i, chaveDestaque: a, regressao: o, eixoX: s, eixoY: c } = e, { rotuloPontos: l = "Pontos", rotuloDestaque: u = "Destaque", rotuloRegressao: d = "Tendência linear" } = e, [f, p] =
|
|
7787
|
+
function Zs(e) {
|
|
7788
|
+
let { dados: t, chaveX: n, chaveY: r, chaveRotulo: i, chaveDestaque: a, regressao: o, eixoX: s, eixoY: c } = e, { rotuloPontos: l = "Pontos", rotuloDestaque: u = "Destaque", rotuloRegressao: d = "Tendência linear" } = e, [f, p] = js(), m = [
|
|
7057
7789
|
{
|
|
7058
7790
|
chave: "pontos",
|
|
7059
7791
|
rotulo: l,
|
|
@@ -7084,18 +7816,18 @@ function Ts(e) {
|
|
|
7084
7816
|
}] : [],
|
|
7085
7817
|
{
|
|
7086
7818
|
campo: n,
|
|
7087
|
-
rotulo:
|
|
7819
|
+
rotulo: Xs(s) || n,
|
|
7088
7820
|
alinhamento: "direita",
|
|
7089
|
-
formato: (e) =>
|
|
7821
|
+
formato: (e) => ls(ds(e), {
|
|
7090
7822
|
...s,
|
|
7091
7823
|
unidade: void 0
|
|
7092
7824
|
})
|
|
7093
7825
|
},
|
|
7094
7826
|
{
|
|
7095
7827
|
campo: r,
|
|
7096
|
-
rotulo:
|
|
7828
|
+
rotulo: Xs(c) || r,
|
|
7097
7829
|
alinhamento: "direita",
|
|
7098
|
-
formato: (e) =>
|
|
7830
|
+
formato: (e) => ls(ds(e), {
|
|
7099
7831
|
...c,
|
|
7100
7832
|
unidade: void 0
|
|
7101
7833
|
})
|
|
@@ -7108,23 +7840,23 @@ function Ts(e) {
|
|
|
7108
7840
|
],
|
|
7109
7841
|
registros: t
|
|
7110
7842
|
});
|
|
7111
|
-
return /* @__PURE__ */ K(
|
|
7843
|
+
return /* @__PURE__ */ K(As, {
|
|
7112
7844
|
...e,
|
|
7113
7845
|
semDados: t.length === 0,
|
|
7114
7846
|
itensLegenda: m,
|
|
7115
7847
|
aoAlternarSerie: (e) => p(e, m.length),
|
|
7116
7848
|
tabela: h,
|
|
7117
|
-
children: (t) => /* @__PURE__ */ K(
|
|
7849
|
+
children: (t) => /* @__PURE__ */ K(Qs, {
|
|
7118
7850
|
...e,
|
|
7119
7851
|
largura: t,
|
|
7120
7852
|
ocultas: f
|
|
7121
7853
|
})
|
|
7122
7854
|
});
|
|
7123
7855
|
}
|
|
7124
|
-
function
|
|
7856
|
+
function Qs({ titulo: e, descricao: t, altura: n = 280, dados: r, eixoX: i, eixoY: a, chaveX: o, chaveY: s, chaveRotulo: c, chaveDestaque: l, regressao: u, animacao: d, largura: f, ocultas: p }) {
|
|
7125
7857
|
let m = [];
|
|
7126
7858
|
r.forEach((e, t) => {
|
|
7127
|
-
let n =
|
|
7859
|
+
let n = ds(e[o]), r = ds(e[s]);
|
|
7128
7860
|
n !== null && r !== null && m.push({
|
|
7129
7861
|
indice: t,
|
|
7130
7862
|
x: n,
|
|
@@ -7133,18 +7865,18 @@ function Es({ titulo: e, descricao: t, altura: n = 280, dados: r, eixoX: i, eixo
|
|
|
7133
7865
|
rotulo: c ? String(e[c] ?? "") : `Ponto ${t + 1}`
|
|
7134
7866
|
});
|
|
7135
7867
|
}), m.sort((e, t) => e.x - t.x || e.y - t.y);
|
|
7136
|
-
let h = m.filter((e) => !p.has(e.destaque ? "destaque" : "pontos")), { ativo: g, setAtivo: _, aoTeclar: v } =
|
|
7868
|
+
let h = m.filter((e) => !p.has(e.destaque ? "destaque" : "pontos")), { ativo: g, setAtivo: _, aoTeclar: v } = Ms(h.length), [y, b] = X(!1), x = u ? Ds(m) : null, S = Xs(i), C = Xs(a), w = C ? 24 : 10, T = S ? 42 : 26, E = w, D = n - T, O = hs(m.map((e) => e.y), a, Math.max(2, Math.round((D - E) / 50)), !1), k = O.passos.map((e) => us(e, a)), A = Math.max(28, Math.max(...k.map((e) => ws(e))) + 12), j = f - 12, M = hs(m.map((e) => e.x), i, Math.max(2, Math.floor((j - A) / 80)), !1), N = ms(M, A, j), P = ms(O, D, E), F = (e) => [{
|
|
7137
7869
|
chave: "x",
|
|
7138
7870
|
rotulo: i?.rotulo ?? o,
|
|
7139
7871
|
cor: e.destaque ? "var(--graf-2)" : "var(--graf-1)",
|
|
7140
7872
|
forma: "ponto",
|
|
7141
|
-
valor:
|
|
7873
|
+
valor: ls(e.x, i)
|
|
7142
7874
|
}, {
|
|
7143
7875
|
chave: "y",
|
|
7144
7876
|
rotulo: a?.rotulo ?? s,
|
|
7145
7877
|
cor: e.destaque ? "var(--graf-2)" : "var(--graf-1)",
|
|
7146
7878
|
forma: "ponto",
|
|
7147
|
-
valor:
|
|
7879
|
+
valor: ls(e.y, a)
|
|
7148
7880
|
}], I = (e) => {
|
|
7149
7881
|
let t = e.currentTarget.getBoundingClientRect(), n = e.clientX - t.left, r = e.clientY - t.top, i = null, a = 1024;
|
|
7150
7882
|
return h.forEach((e, t) => {
|
|
@@ -7165,7 +7897,7 @@ function Es({ titulo: e, descricao: t, altura: n = 280, dados: r, eixoX: i, eixo
|
|
|
7165
7897
|
P(e(r))
|
|
7166
7898
|
]);
|
|
7167
7899
|
}
|
|
7168
|
-
let ee = x ? `r = ${
|
|
7900
|
+
let ee = x ? `r = ${Ys.format(x.r)} · r² = ${Ys.format(x.r2)} · n = ${x.n}` : "", R = g === null ? null : h[g];
|
|
7169
7901
|
return /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ q("div", {
|
|
7170
7902
|
className: "lp-graf-plot",
|
|
7171
7903
|
role: "img",
|
|
@@ -7205,7 +7937,7 @@ function Es({ titulo: e, descricao: t, altura: n = 280, dados: r, eixoX: i, eixo
|
|
|
7205
7937
|
children: k[t]
|
|
7206
7938
|
})] }, `y${e}`)),
|
|
7207
7939
|
M.passos.map((e, t) => {
|
|
7208
|
-
let n =
|
|
7940
|
+
let n = us(e, i);
|
|
7209
7941
|
return /* @__PURE__ */ q("g", { children: [/* @__PURE__ */ K("line", {
|
|
7210
7942
|
className: "lp-graf-grade",
|
|
7211
7943
|
x1: N(e),
|
|
@@ -7277,7 +8009,7 @@ function Es({ titulo: e, descricao: t, altura: n = 280, dados: r, eixoX: i, eixo
|
|
|
7277
8009
|
children: ee
|
|
7278
8010
|
})
|
|
7279
8011
|
]
|
|
7280
|
-
}), R && /* @__PURE__ */ K(
|
|
8012
|
+
}), R && /* @__PURE__ */ K(Ns, {
|
|
7281
8013
|
x: N(R.x),
|
|
7282
8014
|
y: Math.max(4, Math.min(n - 80, P(R.y) - 30)),
|
|
7283
8015
|
largura: f,
|
|
@@ -7287,14 +8019,14 @@ function Es({ titulo: e, descricao: t, altura: n = 280, dados: r, eixoX: i, eixo
|
|
|
7287
8019
|
}), /* @__PURE__ */ K("div", {
|
|
7288
8020
|
className: "lp-sr",
|
|
7289
8021
|
"aria-live": "polite",
|
|
7290
|
-
children: R ?
|
|
8022
|
+
children: R ? Ps(R.rotulo, F(R)) : ""
|
|
7291
8023
|
})] });
|
|
7292
8024
|
}
|
|
7293
8025
|
//#endregion
|
|
7294
8026
|
//#region src/components/Grafico/MapaCalor.tsx
|
|
7295
|
-
var
|
|
7296
|
-
function
|
|
7297
|
-
let { linhas: t, colunas: n, valores: r, formatar: i, unidade: a, rotuloLinhas: o = "Linha" } = e, s = new Map(r.map((e) => [
|
|
8027
|
+
var $s = 5, ec = (e, t) => `${e}\u0000${t}`;
|
|
8028
|
+
function tc(e) {
|
|
8029
|
+
let { linhas: t, colunas: n, valores: r, formatar: i, unidade: a, rotuloLinhas: o = "Linha" } = e, s = new Map(r.map((e) => [ec(e.linha, e.coluna), e.valor])), c = {
|
|
7298
8030
|
formatar: i,
|
|
7299
8031
|
unidade: a
|
|
7300
8032
|
}, l = () => ({
|
|
@@ -7305,19 +8037,19 @@ function ks(e) {
|
|
|
7305
8037
|
campo: `c${t}`,
|
|
7306
8038
|
rotulo: String(e),
|
|
7307
8039
|
alinhamento: "direita",
|
|
7308
|
-
formato: (e) =>
|
|
8040
|
+
formato: (e) => ls(typeof e == "number" ? e : null, { formatar: i })
|
|
7309
8041
|
}))],
|
|
7310
8042
|
registros: t.map((e) => {
|
|
7311
8043
|
let t = { __linha: String(e) };
|
|
7312
|
-
return n.forEach((n, r) => t[`c${r}`] = s.get(
|
|
8044
|
+
return n.forEach((n, r) => t[`c${r}`] = s.get(ec(e, n)) ?? null), t;
|
|
7313
8045
|
})
|
|
7314
8046
|
});
|
|
7315
|
-
return /* @__PURE__ */ K(
|
|
8047
|
+
return /* @__PURE__ */ K(As, {
|
|
7316
8048
|
...e,
|
|
7317
8049
|
legenda: !1,
|
|
7318
8050
|
semDados: !t.length || !n.length,
|
|
7319
8051
|
tabela: l,
|
|
7320
|
-
children: (t) => /* @__PURE__ */ K(
|
|
8052
|
+
children: (t) => /* @__PURE__ */ K(nc, {
|
|
7321
8053
|
...e,
|
|
7322
8054
|
largura: t,
|
|
7323
8055
|
mapa: s,
|
|
@@ -7325,8 +8057,8 @@ function ks(e) {
|
|
|
7325
8057
|
})
|
|
7326
8058
|
});
|
|
7327
8059
|
}
|
|
7328
|
-
function
|
|
7329
|
-
let [f, p] = X(null), m = [...u.values()].filter((e) => typeof e == "number" && Number.isFinite(e)), h = a ?? (m.length ? Math.min(...m) : 0), g = o ?? (m.length ? Math.max(...m) : 1), _ = r.some((e) => i.some((t) => u.get(
|
|
8060
|
+
function nc({ titulo: e, descricao: t, altura: n = 280, linhas: r, colunas: i, minimo: a, maximo: o, legendaEscala: s = !0, animacao: c, largura: l, mapa: u, eixo: d }) {
|
|
8061
|
+
let [f, p] = X(null), m = [...u.values()].filter((e) => typeof e == "number" && Number.isFinite(e)), h = a ?? (m.length ? Math.min(...m) : 0), g = o ?? (m.length ? Math.max(...m) : 1), _ = r.some((e) => i.some((t) => u.get(ec(e, t)) == null)), v = (e) => g === h ? $s : Math.min($s, Math.max(1, Math.floor((e - h) / (g - h) * $s) + 1)), y = (e, t) => u.get(ec(r[e], i[t])) ?? null, b = f ? `${r[f[0]]} · ${i[f[1]]}: ${ls(y(f[0], f[1]), d)}` : "", x = (e) => {
|
|
7330
8062
|
let [t, n] = f ?? [0, 0], a = {
|
|
7331
8063
|
ArrowUp: [t - 1, n],
|
|
7332
8064
|
ArrowDown: [t + 1, n],
|
|
@@ -7338,7 +8070,7 @@ function As({ titulo: e, descricao: t, altura: n = 280, linhas: r, colunas: i, m
|
|
|
7338
8070
|
if (e.key === "Escape") return p(null);
|
|
7339
8071
|
let o = a[e.key];
|
|
7340
8072
|
o && (e.preventDefault(), p([Math.min(r.length - 1, Math.max(0, o[0])), Math.min(i.length - 1, Math.max(0, o[1]))]));
|
|
7341
|
-
}, S = (l - (Math.max(...r.map((e) =>
|
|
8073
|
+
}, S = (l - (Math.max(...r.map((e) => ws(String(e)))) + 8)) / Math.max(1, i.length), C = Math.max(...i.map((e) => ws(String(e)))), w = Math.max(1, Math.ceil((C + 4) / Math.max(1, S))), T = {
|
|
7342
8074
|
"--mapa-colunas": i.length,
|
|
7343
8075
|
maxHeight: `${n}px`
|
|
7344
8076
|
};
|
|
@@ -7392,13 +8124,13 @@ function As({ titulo: e, descricao: t, altura: n = 280, linhas: r, colunas: i, m
|
|
|
7392
8124
|
}), s && /* @__PURE__ */ q("span", {
|
|
7393
8125
|
className: "lp-graf-mapa-escala",
|
|
7394
8126
|
children: [
|
|
7395
|
-
/* @__PURE__ */ K("span", { children:
|
|
8127
|
+
/* @__PURE__ */ K("span", { children: ls(h, d) }),
|
|
7396
8128
|
/* @__PURE__ */ K("span", {
|
|
7397
8129
|
className: "lp-graf-mapa-cores",
|
|
7398
8130
|
"aria-hidden": "true",
|
|
7399
|
-
children: Array.from({ length:
|
|
8131
|
+
children: Array.from({ length: $s }, (e, t) => /* @__PURE__ */ K("span", { style: { background: `var(--graf-seq-${t + 1})` } }, t))
|
|
7400
8132
|
}),
|
|
7401
|
-
/* @__PURE__ */ K("span", { children:
|
|
8133
|
+
/* @__PURE__ */ K("span", { children: ls(g, d) }),
|
|
7402
8134
|
_ && /* @__PURE__ */ q("span", {
|
|
7403
8135
|
className: "lp-graf-mapa-falha",
|
|
7404
8136
|
children: [/* @__PURE__ */ K("span", {
|
|
@@ -7413,8 +8145,8 @@ function As({ titulo: e, descricao: t, altura: n = 280, linhas: r, colunas: i, m
|
|
|
7413
8145
|
}
|
|
7414
8146
|
//#endregion
|
|
7415
8147
|
//#region src/components/Conversa/Conversa.tsx
|
|
7416
|
-
var
|
|
7417
|
-
function
|
|
8148
|
+
var rc = 24;
|
|
8149
|
+
function ic({ children: e, vazio: t, campo: n, larguraMaxima: r, rotulo: i = "Conversa", rotuloIrParaFim: a = "Ir para o fim", className: o }) {
|
|
7418
8150
|
let s = Y(null), c = Y(null), l = Y(!0), [u, d] = X(!1), f = vt.toArray(e), p = f.length === 0, m = Y(f.length), h = f.length > m.current && f.slice(m.current).some((e) => Ct(e) && e.props.autor === "usuario"), g = wt(() => {
|
|
7419
8151
|
let e = s.current;
|
|
7420
8152
|
e && (e.scrollTop = e.scrollHeight, l.current = !0, d(!1));
|
|
@@ -7433,7 +8165,7 @@ function Ms({ children: e, vazio: t, campo: n, larguraMaxima: r, rotulo: i = "Co
|
|
|
7433
8165
|
let _ = () => {
|
|
7434
8166
|
let e = s.current;
|
|
7435
8167
|
if (!e) return;
|
|
7436
|
-
let t = e.scrollHeight - e.scrollTop - e.clientHeight <=
|
|
8168
|
+
let t = e.scrollHeight - e.scrollTop - e.clientHeight <= rc;
|
|
7437
8169
|
l.current = t, d(!t);
|
|
7438
8170
|
}, v = r ? { "--conversa-largura": r } : void 0;
|
|
7439
8171
|
return /* @__PURE__ */ q("div", {
|
|
@@ -7478,10 +8210,10 @@ function Ms({ children: e, vazio: t, campo: n, larguraMaxima: r, rotulo: i = "Co
|
|
|
7478
8210
|
}
|
|
7479
8211
|
//#endregion
|
|
7480
8212
|
//#region src/components/Mensagem/Mensagem.tsx
|
|
7481
|
-
function
|
|
8213
|
+
function ac(e) {
|
|
7482
8214
|
return e.toDateString() === (/* @__PURE__ */ new Date()).toDateString() ? Ln(e) : zn(e);
|
|
7483
8215
|
}
|
|
7484
|
-
function
|
|
8216
|
+
function oc({ autor: e = "assistente", children: t, nome: n, avatar: r, hora: i, estado: a = "concluida", erro: o, aoTentarNovamente: s, copiavel: c = !1, textoCopia: l, acoes: u, rodape: d, rotuloTentarNovamente: f = "Tentar novamente", rotuloCopiar: p = "Copiar mensagem", rotuloGerando: m = "Gerando resposta", rotuloEnviando: h = "Enviando", className: g }) {
|
|
7485
8217
|
let _ = Ur(), v = Y(null), y = Y(void 0), [b, x] = X(!1);
|
|
7486
8218
|
J(() => () => window.clearTimeout(y.current), []);
|
|
7487
8219
|
let S = t == null || t === !1 || t === "", C = typeof t == "string", w = a === "gerando", T = a === "erro", E = async () => {
|
|
@@ -7523,7 +8255,7 @@ function Ps({ autor: e = "assistente", children: t, nome: n, avatar: r, hora: i,
|
|
|
7523
8255
|
children: n
|
|
7524
8256
|
}), i && /* @__PURE__ */ K("time", {
|
|
7525
8257
|
dateTime: k,
|
|
7526
|
-
children: i instanceof Date ?
|
|
8258
|
+
children: i instanceof Date ? ac(i) : i
|
|
7527
8259
|
})]
|
|
7528
8260
|
}),
|
|
7529
8261
|
(!S || w || d) && /* @__PURE__ */ q("div", {
|
|
@@ -7595,7 +8327,7 @@ function Ps({ autor: e = "assistente", children: t, nome: n, avatar: r, hora: i,
|
|
|
7595
8327
|
}
|
|
7596
8328
|
//#endregion
|
|
7597
8329
|
//#region src/components/CampoMensagem/CampoMensagem.tsx
|
|
7598
|
-
var
|
|
8330
|
+
var sc = .8, cc = St(function({ valor: e, aoMudar: t, aoEnviar: n, gerando: r = !1, aoParar: i, desabilitado: a = !1, placeholder: o = "Escreva uma mensagem", maxCaracteres: s, linhasMaximas: c = 6, autoFocus: l, acoesExtras: u, rotulo: d = "Mensagem", rotuloEnviar: f = "Enviar mensagem", rotuloParar: p = "Parar", id: m, className: h }, g) {
|
|
7599
8331
|
let { id: _ } = Mi(m), v = Y(null);
|
|
7600
8332
|
Dt(g, () => v.current);
|
|
7601
8333
|
let y = e.trim(), b = !a && !r && y !== "" && (!s || e.length <= s), x = s ? e.length / s : 0, S = wt(() => {
|
|
@@ -7648,7 +8380,7 @@ var Fs = .8, Is = St(function({ valor: e, aoMudar: t, aoEnviar: n, gerando: r =
|
|
|
7648
8380
|
className: "lp-campo-mensagem-extras",
|
|
7649
8381
|
children: u
|
|
7650
8382
|
}),
|
|
7651
|
-
s && x >=
|
|
8383
|
+
s && x >= sc && /* @__PURE__ */ q("span", {
|
|
7652
8384
|
className: Z("lp-campo-mensagem-contador", x >= 1 ? "is-err" : x >= .9 && "is-warn"),
|
|
7653
8385
|
"aria-hidden": "true",
|
|
7654
8386
|
children: [
|
|
@@ -7675,8 +8407,8 @@ var Fs = .8, Is = St(function({ valor: e, aoMudar: t, aoEnviar: n, gerando: r =
|
|
|
7675
8407
|
})
|
|
7676
8408
|
]
|
|
7677
8409
|
});
|
|
7678
|
-
}),
|
|
7679
|
-
function
|
|
8410
|
+
}), lc = (e) => e === 1 ? "1 fonte" : `${e} fontes`;
|
|
8411
|
+
function uc({ children: e, mais: t, menos: n }) {
|
|
7680
8412
|
let r = Y(null), [i, a] = X(!1), [o, s] = X(!1);
|
|
7681
8413
|
return Ot(() => {
|
|
7682
8414
|
let e = r.current;
|
|
@@ -7697,7 +8429,7 @@ function Rs({ children: e, mais: t, menos: n }) {
|
|
|
7697
8429
|
children: i ? n : t
|
|
7698
8430
|
})] });
|
|
7699
8431
|
}
|
|
7700
|
-
function
|
|
8432
|
+
function dc({ itens: e, abertoInicial: t = !1, rotulo: n = lc, rotuloMostrarMais: r = "Mostrar trecho completo", rotuloMostrarMenos: i = "Mostrar menos", className: a }) {
|
|
7701
8433
|
let o = Et(), [s, c] = X(t);
|
|
7702
8434
|
return e.length ? /* @__PURE__ */ q("div", {
|
|
7703
8435
|
className: Z("lp-referencias", s && "is-aberto", a),
|
|
@@ -7743,7 +8475,7 @@ function zs({ itens: e, abertoInicial: t = !1, rotulo: n = Ls, rotuloMostrarMais
|
|
|
7743
8475
|
className: "lp-referencias-detalhe",
|
|
7744
8476
|
children: e.detalhe
|
|
7745
8477
|
})]
|
|
7746
|
-
}), e.trecho && /* @__PURE__ */ K(
|
|
8478
|
+
}), e.trecho && /* @__PURE__ */ K(uc, {
|
|
7747
8479
|
mais: r,
|
|
7748
8480
|
menos: i,
|
|
7749
8481
|
children: e.trecho
|
|
@@ -7756,24 +8488,24 @@ function zs({ itens: e, abertoInicial: t = !1, rotulo: n = Ls, rotuloMostrarMais
|
|
|
7756
8488
|
}
|
|
7757
8489
|
//#endregion
|
|
7758
8490
|
//#region src/components/Arquivo/VisualizadorArquivo.tsx
|
|
7759
|
-
var
|
|
8491
|
+
var fc = [
|
|
7760
8492
|
1,
|
|
7761
8493
|
1.5,
|
|
7762
8494
|
2,
|
|
7763
8495
|
3,
|
|
7764
8496
|
4
|
|
7765
8497
|
];
|
|
7766
|
-
function
|
|
8498
|
+
function pc({ arquivo: e, aoFalhar: t, className: n }) {
|
|
7767
8499
|
let r = e ? `${e.url ?? ""}|${e.nome}` : "vazio";
|
|
7768
8500
|
return /* @__PURE__ */ K("div", {
|
|
7769
8501
|
className: Z("lp-visu", n),
|
|
7770
|
-
children: /* @__PURE__ */ K(
|
|
8502
|
+
children: /* @__PURE__ */ K(mc, {
|
|
7771
8503
|
arquivo: e,
|
|
7772
8504
|
aoFalhar: t
|
|
7773
8505
|
}, r)
|
|
7774
8506
|
});
|
|
7775
8507
|
}
|
|
7776
|
-
function
|
|
8508
|
+
function mc({ arquivo: e, aoFalhar: t }) {
|
|
7777
8509
|
let [n, r] = X(!1), i = e?.url?.trim(), a = e ? Jn(e.tipo, e.nome) : "outro", o = () => {
|
|
7778
8510
|
r(!0), e && t?.(e);
|
|
7779
8511
|
};
|
|
@@ -7796,7 +8528,7 @@ function Hs({ arquivo: e, aoFalhar: t }) {
|
|
|
7796
8528
|
})
|
|
7797
8529
|
});
|
|
7798
8530
|
}
|
|
7799
|
-
return a === "imagem" ? /* @__PURE__ */ K(
|
|
8531
|
+
return a === "imagem" ? /* @__PURE__ */ K(hc, {
|
|
7800
8532
|
url: i,
|
|
7801
8533
|
nome: e.nome,
|
|
7802
8534
|
aoFalhar: o
|
|
@@ -7828,11 +8560,11 @@ function Hs({ arquivo: e, aoFalhar: t }) {
|
|
|
7828
8560
|
]
|
|
7829
8561
|
});
|
|
7830
8562
|
}
|
|
7831
|
-
function
|
|
8563
|
+
function hc({ url: e, nome: t, aoFalhar: n }) {
|
|
7832
8564
|
let [r, i] = X(0), [a, o] = X(0), [s, c] = X({
|
|
7833
8565
|
x: 0,
|
|
7834
8566
|
y: 0
|
|
7835
|
-
}), l = Y(null), u = Y(null), d =
|
|
8567
|
+
}), l = Y(null), u = Y(null), d = fc[r], f = (e, t) => {
|
|
7836
8568
|
let n = l.current?.getBoundingClientRect();
|
|
7837
8569
|
if (!n) return {
|
|
7838
8570
|
x: e,
|
|
@@ -7844,7 +8576,7 @@ function Us({ url: e, nome: t, aoFalhar: n }) {
|
|
|
7844
8576
|
y: Math.max(-i, Math.min(i, t))
|
|
7845
8577
|
};
|
|
7846
8578
|
}, p = (e) => {
|
|
7847
|
-
let t = Math.max(0, Math.min(
|
|
8579
|
+
let t = Math.max(0, Math.min(fc.length - 1, e));
|
|
7848
8580
|
i(t), t === 0 && c({
|
|
7849
8581
|
x: 0,
|
|
7850
8582
|
y: 0
|
|
@@ -7876,7 +8608,7 @@ function Us({ url: e, nome: t, aoFalhar: n }) {
|
|
|
7876
8608
|
else return;
|
|
7877
8609
|
e.preventDefault();
|
|
7878
8610
|
},
|
|
7879
|
-
onDoubleClick: () => r === 0 ? i(
|
|
8611
|
+
onDoubleClick: () => r === 0 ? i(fc.indexOf(2)) : m(),
|
|
7880
8612
|
onPointerDown: (e) => {
|
|
7881
8613
|
d <= 1 || (e.currentTarget.setPointerCapture(e.pointerId), u.current = {
|
|
7882
8614
|
x: e.clientX,
|
|
@@ -7923,7 +8655,7 @@ function Us({ url: e, nome: t, aoFalhar: n }) {
|
|
|
7923
8655
|
aparencia: "texto",
|
|
7924
8656
|
dica: "Ampliar",
|
|
7925
8657
|
"aria-label": "Ampliar",
|
|
7926
|
-
disabled: r ===
|
|
8658
|
+
disabled: r === fc.length - 1,
|
|
7927
8659
|
onClick: () => p(r + 1)
|
|
7928
8660
|
}),
|
|
7929
8661
|
/* @__PURE__ */ K($, {
|
|
@@ -7948,13 +8680,13 @@ function Us({ url: e, nome: t, aoFalhar: n }) {
|
|
|
7948
8680
|
}
|
|
7949
8681
|
//#endregion
|
|
7950
8682
|
//#region src/components/Arquivo/DialogoArquivo.tsx
|
|
7951
|
-
var
|
|
7952
|
-
function
|
|
8683
|
+
var gc = "video, audio, input, textarea, select, [contenteditable=\"\"], [contenteditable=\"true\"]";
|
|
8684
|
+
function _c({ aberto: e, aoFechar: t, arquivos: n, indice: r, aoMudarIndice: i }) {
|
|
7953
8685
|
let a = n.length, o = Math.max(0, Math.min(r, a - 1)), s = n[o] ?? null;
|
|
7954
8686
|
return J(() => {
|
|
7955
8687
|
if (!e || a < 2) return;
|
|
7956
8688
|
let t = (e) => {
|
|
7957
|
-
e.target?.closest?.(
|
|
8689
|
+
e.target?.closest?.(gc) || (e.key === "ArrowLeft" && o > 0 ? i(o - 1) : e.key === "ArrowRight" && o < a - 1 && i(o + 1));
|
|
7958
8690
|
};
|
|
7959
8691
|
return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
|
|
7960
8692
|
}, [
|
|
@@ -7996,14 +8728,14 @@ function Gs({ aberto: e, aoFechar: t, arquivos: n, indice: r, aoMudarIndice: i }
|
|
|
7996
8728
|
onClick: () => i(o + 1)
|
|
7997
8729
|
})
|
|
7998
8730
|
] }) : void 0,
|
|
7999
|
-
children: /* @__PURE__ */ K(
|
|
8731
|
+
children: /* @__PURE__ */ K(pc, { arquivo: s })
|
|
8000
8732
|
});
|
|
8001
8733
|
}
|
|
8002
8734
|
//#endregion
|
|
8003
8735
|
//#region src/components/Arquivo/CampoAnexo.tsx
|
|
8004
|
-
var
|
|
8736
|
+
var vc = (e) => `${e.nome}|${e.tamanho}`, yc = St(function({ rotulo: e, dica: t, erro: n, aviso: r, className: i, id: a, valor: o = [], aoMudar: s, accept: c, multiple: l = !0, maxTamanho: u = 0, minimo: d = 0, disabled: f = !1 }, p) {
|
|
8005
8737
|
let { id: m, msgId: h } = Mi(a), g = Y(null), _ = Y(/* @__PURE__ */ new Map()), v = Y(/* @__PURE__ */ new Map()), [y, b] = X(!1), [x, S] = X(""), [C, w] = X(null), [T, E] = X(!1), D = Tt(ki);
|
|
8006
|
-
Dt(p, () => ({ arquivoDe: (e) => _.current.get(
|
|
8738
|
+
Dt(p, () => ({ arquivoDe: (e) => _.current.get(vc(e)) ?? null }), []), J(() => () => v.current.forEach((e) => URL.revokeObjectURL(e)), []);
|
|
8007
8739
|
let O = (e) => {
|
|
8008
8740
|
if (!e?.length || f) return;
|
|
8009
8741
|
E(!0);
|
|
@@ -8013,7 +8745,7 @@ var Ks = (e) => `${e.nome}|${e.tamanho}`, qs = St(function({ rotulo: e, dica: t,
|
|
|
8013
8745
|
n.push(r.name);
|
|
8014
8746
|
continue;
|
|
8015
8747
|
}
|
|
8016
|
-
let e =
|
|
8748
|
+
let e = vc({
|
|
8017
8749
|
nome: r.name,
|
|
8018
8750
|
tamanho: r.size
|
|
8019
8751
|
});
|
|
@@ -8029,12 +8761,12 @@ var Ks = (e) => `${e.nome}|${e.tamanho}`, qs = St(function({ rotulo: e, dica: t,
|
|
|
8029
8761
|
if (S(n.length ? `${mn(n)} excede${n.length > 1 ? "m" : ""} ${Kn(u)}.` : ""), t.length) {
|
|
8030
8762
|
if (!l) s?.(t.slice(0, 1));
|
|
8031
8763
|
else {
|
|
8032
|
-
let e = new Set(o.map(
|
|
8033
|
-
s?.([...o, ...t.filter((t) => !e.has(
|
|
8764
|
+
let e = new Set(o.map(vc));
|
|
8765
|
+
s?.([...o, ...t.filter((t) => !e.has(vc(t)))]);
|
|
8034
8766
|
}
|
|
8035
8767
|
}
|
|
8036
8768
|
}, k = (e) => {
|
|
8037
|
-
E(!0), s?.(o.filter((t) =>
|
|
8769
|
+
E(!0), s?.(o.filter((t) => vc(t) !== vc(e)));
|
|
8038
8770
|
}, A = (e) => {
|
|
8039
8771
|
e.preventDefault(), b(!1), O(e.dataTransfer.files);
|
|
8040
8772
|
}, j = d > 0 && o.length < d && (T || D > 0), M = n || x || (j ? d === 1 ? "Anexe pelo menos um arquivo" : `Anexe pelo menos ${d} arquivos` : void 0);
|
|
@@ -8117,9 +8849,9 @@ var Ks = (e) => `${e.nome}|${e.tamanho}`, qs = St(function({ rotulo: e, dica: t,
|
|
|
8117
8849
|
severidade: "err",
|
|
8118
8850
|
onClick: () => k(e)
|
|
8119
8851
|
})]
|
|
8120
|
-
},
|
|
8852
|
+
}, vc(e)))
|
|
8121
8853
|
}),
|
|
8122
|
-
/* @__PURE__ */ K(
|
|
8854
|
+
/* @__PURE__ */ K(_c, {
|
|
8123
8855
|
aberto: C !== null,
|
|
8124
8856
|
aoFechar: () => w(null),
|
|
8125
8857
|
arquivos: o,
|
|
@@ -8128,18 +8860,18 @@ var Ks = (e) => `${e.nome}|${e.tamanho}`, qs = St(function({ rotulo: e, dica: t,
|
|
|
8128
8860
|
})
|
|
8129
8861
|
]
|
|
8130
8862
|
});
|
|
8131
|
-
}),
|
|
8863
|
+
}), bc = {
|
|
8132
8864
|
sm: "3rem",
|
|
8133
8865
|
md: "4.5rem",
|
|
8134
8866
|
lg: "6rem"
|
|
8135
|
-
},
|
|
8867
|
+
}, xc = (e) => (e == null ? [] : Array.isArray(e) ? e : [e]).map((e) => typeof e == "string" ? {
|
|
8136
8868
|
nome: "",
|
|
8137
8869
|
tamanho: 0,
|
|
8138
8870
|
tipo: "image/*",
|
|
8139
8871
|
url: e
|
|
8140
8872
|
} : e).filter((e) => !!e?.url?.trim());
|
|
8141
|
-
function
|
|
8142
|
-
let f =
|
|
8873
|
+
function Sc({ fotos: e, nome: t, tamanho: n = "md", altura: r, largura: i, ampliavel: a = !1, indice: o, aoMudarIndice: s, aoAmpliar: c, semFoto: l, sobreposto: u, className: d }) {
|
|
8874
|
+
let f = xc(e), [p, m] = X(0), [h, g] = X(!1), _ = Math.max(0, Math.min(o ?? p, f.length - 1)), v = (e) => {
|
|
8143
8875
|
m(e), s?.(e);
|
|
8144
8876
|
}, y = f[_], b = {
|
|
8145
8877
|
height: r,
|
|
@@ -8152,7 +8884,7 @@ function Xs({ fotos: e, nome: t, tamanho: n = "md", altura: r, largura: i, ampli
|
|
|
8152
8884
|
nome: t,
|
|
8153
8885
|
tom: "escuro",
|
|
8154
8886
|
formato: "quadrado",
|
|
8155
|
-
tamanho:
|
|
8887
|
+
tamanho: bc[n]
|
|
8156
8888
|
}), u && /* @__PURE__ */ K("div", {
|
|
8157
8889
|
className: "lp-foto-sobreposto",
|
|
8158
8890
|
children: u
|
|
@@ -8190,7 +8922,7 @@ function Xs({ fotos: e, nome: t, tamanho: n = "md", altura: r, largura: i, ampli
|
|
|
8190
8922
|
className: "lp-foto-sobreposto",
|
|
8191
8923
|
children: u
|
|
8192
8924
|
}),
|
|
8193
|
-
a && /* @__PURE__ */ K(
|
|
8925
|
+
a && /* @__PURE__ */ K(_c, {
|
|
8194
8926
|
aberto: h,
|
|
8195
8927
|
aoFechar: () => g(!1),
|
|
8196
8928
|
arquivos: f.map((e, t) => ({
|
|
@@ -8204,6 +8936,6 @@ function Xs({ fotos: e, nome: t, tamanho: n = "md", altura: r, largura: i, ampli
|
|
|
8204
8936
|
});
|
|
8205
8937
|
}
|
|
8206
8938
|
//#endregion
|
|
8207
|
-
export { _a as Aba, va as Abas, Aa as AcaoLinha, Oa as Acordeao, Oi as Alerta, Za as Avaliacao, oi as Avatar, to as BUSCA_ATRASO_MS, Co as Badge, Ia as Balao, ua as BarraBotoes, Ei as BoasVindas, $ as Botao, ko as BotaoFechar, ci as Busca, Si as CabecalhoPagina, Pi as Campo,
|
|
8939
|
+
export { _a as Aba, va as Abas, Aa as AcaoLinha, Oa as Acordeao, Oi as Alerta, Za as Avaliacao, oi as Avatar, to as BUSCA_ATRASO_MS, Co as Badge, Ia as Balao, ua as BarraBotoes, Ei as BoasVindas, $ as Botao, ko as BotaoFechar, ci as Busca, Si as CabecalhoPagina, Xo as CabecalhoSecao, Pi as Campo, yc as CampoAnexo, ro as CampoBusca, Vi as CampoCep, Gi as CampoChassi, io as CampoCidade, Ki as CampoCnh, zi as CampoCnpj, Ri as CampoCpf, Bi as CampoCpfCnpj, Yi as CampoData, Zi as CampoDataHora, Ui as CampoEmail, Xi as CampoHora, qi as CampoImei, ea as CampoInteiro, Fi as CampoMarcacao, cc as CampoMensagem, $i as CampoMoeda, Yo as CampoPesquisa, Hi as CampoPlaca, Wi as CampoRenavam, Ua as CampoSelect, Wa as CampoSelectMultiplo, na as CampoSenha, Ji as CampoTelefone, Ba as CampoTextarea, Ii as CampoTexto, Ja as CampoTipoPessoa, Ka as CampoUf, qa as CampoUfMultiplo, ya as Card, Zo as CardConteudo, ns as CardDepoimento, rs as CardPlano, es as CardRecurso, Ao as Carregando, Ca as Carrossel, Qa as Chip, Eo as Citacao, wo as ComBadge, as as ConteudoArtigo, ic as Conversa, Jo as DestaqueSite, So as Detalhes, ra as Dialogo, _c as DialogoArquivo, Dr as Dica, un as ESTADOS, Ya as Escolha, xi as Estrutura, Uo as EstruturaSite, is as FaixaChamada, ts as FaixaNumeros, Oo as Figura, $o as FiltroPilulas, $a as Filtros, Ra as Form, za as FormSecao, Sc as Foto, Mo as Girador, qs as GraficoBarras, Js as GraficoCombinado, Zs as GraficoDispersao, Ks as GraficoLinha, la as GrupoAlternancia, ca as GrupoBotoes, ba as GrupoCards, Q as Icone, Do as Imagem, bo as Indicador, xo as Indicadores, ka as ItemAcordeao, ho as ItemLista, mo as Lista, go as ListaCards, Qo as ListaNumerada, Vt as MASCARAS, Ai as MSG_OBRIGATORIO, tc as MapaCalor, oc as Mensagem, ga as MenuSuspenso, _o as Minigrafico, os as Newsletter, fn as OPCOES_ESTADOS, ur as PICKLIST_VAZIO, ar as POLITICA_PADRAO, oo as Paginacao, eo as Picklist, To as Placa, Fo as Progresso, Fr as ProvedorConfirmacao, ei as ProvedorPreferencias, Vr as ProvedorToast, ni as ProvedorUi, Ea as QuadroArrastavel, xa as Recolhivel, dc as Referencias, ki as RevelarCamposCtx, Go as RodapeSite, tr as SEVERIDADES, Ko as SecaoSite, so as Skeleton, ia as Status, ss as SumarioPagina, ln as TIPOS_CAMPO, Ht as TIPOS_DE_CAMPO, pn as TIPOS_PESSOA, po as Tabela, sa as TelaErro, oa as TelaLogin, Rr as Toast, mi as Trilha, dn as UF_SIGLAS, co as Vazio, pc as VisualizadorArquivo, er as apiDefinida, Bt as aplicarMascara, fi as caminhoNoMenu, Z as cx, Vn as dataBrParaIso, Xn as decodificarJwt, ir as ehSeveridade, Zn as expiracaoJwt, vr as filtrarItens, cr as forcaSenha, Kn as formatBytes, An as formatCpfCnpj, Fn as formatDataBr, zn as formatDataHoraBr, Ln as formatHoraBr, En as formatarNumero, Yn as iconeArquivo, On as iniciais, Xt as isCep, en as isChassi, tn as isCnh, qt as isCnpj, Kt as isCpf, Jt as isCpfCnpj, an as isData, on as isDataHora, Yt as isEmail, rn as isHora, nn as isImei, Qt as isPlaca, $t as isRenavam, Zt as isTelefone, Bn as isoParaDataBr, Qn as jwtExpirado, Cn as lerCampo, mn as listaPorExtenso, $n as margemRefreshJwt, pr as moverParaAlvo, mr as moverParaFonte, hr as moverTudoParaAlvo, gr as moverTudoParaFonte, Mn as nomeCurto, Wn as nomeDeArquivo, jn as nomeProprio, kn as normalizar, dr as normalizarPicklistValor, xn as numeroPorExtenso, Pn as parseDataBr, Rn as parseDataHoraBr, In as parseHoraBr, Nt as registrarIcones, Ds as regressaoLinear, _r as reordenarLista, Dn as saudacaoPorHora, $r as scriptTemaInicial, zt as semMascara, lr as senhasIguais, rr as severidadeCor, Jn as tipoDeArquivo, Un as tituloDeEntidade, no as useBuscaAssincrona, Mi as useCampoIds, Ir as useConfirmacao, ti as usePreferencias, ri as usePreferenciasOpcional, Hr as useToast, di as useTrilha, ji as useValidacaoCampo, cn as validar, sr as validarSenha, sn as validarTelefone, lo as valorDoCampo, Sn as valorMonetarioPorExtenso };
|
|
8208
8940
|
|
|
8209
8941
|
//# sourceMappingURL=index.js.map
|