@thibezer/ui-components-kit 2.29.0 → 2.31.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/CHANGELOG.md +44 -0
- package/dist/camadas.cjs +1 -1
- package/dist/camadas.js +1 -1
- package/dist/canvas.cjs +66 -65
- package/dist/canvas.js +1799 -1366
- package/dist/components/ui-canvas-cad/cad-hud-coordenadas.d.ts +4 -0
- package/dist/components/ui-canvas-cad/ui-canvas-cad.d.ts +10 -0
- package/dist/components/ui-seletor-mapa-base/index.d.ts +1 -0
- package/dist/components/ui-seletor-mapa-base/seletor-mapa-base-util.d.ts +32 -0
- package/dist/components/ui-seletor-mapa-base/tipos.d.ts +8 -1
- package/dist/components/ui-seletor-mapa-base/ui-seletor-mapa-base.d.ts +9 -0
- package/dist/custom-elements.json +17846 -17403
- package/dist/feature_caixa-DAyED81R.cjs +1 -0
- package/dist/feature_caixa-zoUAn0qg.js +877 -0
- package/dist/{feature_desenho-eq3MIZR9.cjs → feature_desenho-CESNXi8g.cjs} +1 -1
- package/dist/{feature_desenho-Cq3H27as.js → feature_desenho-fQfbVPvn.js} +2 -2
- package/dist/feature_metricas-CnSFE0at.cjs +1 -0
- package/dist/feature_metricas-hUren6kK.js +135 -0
- package/dist/geometria-px-C4xatxmY.cjs +1 -0
- package/dist/{geometria-px-BxTQKrZN.js → geometria-px-wXudjSxA.js} +224 -206
- package/dist/gerencigeo-canvas/motor/motor-formas.d.ts +37 -1
- package/dist/gerencigeo-canvas/motor/tipos.d.ts +8 -2
- package/dist/gerencigeo-canvas/renderers/agenda_fatias.d.ts +56 -0
- package/dist/gerencigeo-canvas/renderers/canvas_formas_leaflet.d.ts +76 -2
- package/dist/gerencigeo-canvas/renderers/feicoes_canvas_renderer.d.ts +20 -0
- package/dist/gerencigeo-canvas/renderers/renderizador_formas.d.ts +21 -11
- package/dist/motor.cjs +1 -1
- package/dist/motor.js +445 -342
- package/dist/prancha-nucleo.cjs +1 -1
- package/dist/prancha-nucleo.js +4 -4
- package/dist/prancha.cjs +1 -1
- package/dist/prancha.js +3 -3
- package/dist/seletor-mapa-base.cjs +16 -16
- package/dist/seletor-mapa-base.js +183 -102
- package/dist/tipos-elementos.d.ts +2 -0
- package/dist/tipos-vue.d.ts +2 -0
- package/package.json +1 -1
- package/dist/feature_caixa-DOchASgS.js +0 -828
- package/dist/feature_caixa-MrJEfMol.cjs +0 -1
- package/dist/feature_metricas-CKQGG2nz.cjs +0 -1
- package/dist/feature_metricas-DGfd21VR.js +0 -130
- package/dist/geometria-px-BlB0OczX.cjs +0 -1
|
@@ -1,37 +1,55 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var y = (t, n, o) =>
|
|
4
|
-
import { l as
|
|
5
|
-
const S = 16,
|
|
6
|
-
function
|
|
7
|
-
const [[o, i], [a, e]] =
|
|
1
|
+
var ht = Object.defineProperty;
|
|
2
|
+
var dt = (t, n, o) => n in t ? ht(t, n, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[n] = o;
|
|
3
|
+
var y = (t, n, o) => dt(t, typeof n != "symbol" ? n + "" : n, o);
|
|
4
|
+
import { l as W, p as tt, b as ft } from "./feature_metricas-hUren6kK.js";
|
|
5
|
+
const S = 16, pt = 256;
|
|
6
|
+
function Xt(t, n) {
|
|
7
|
+
const [[o, i], [a, e]] = W(t.geometria, n);
|
|
8
8
|
return { minLon: i, minLat: o, maxLon: e, maxLat: a };
|
|
9
9
|
}
|
|
10
10
|
function N(t, n) {
|
|
11
11
|
return t.minLon <= n.maxLon && t.maxLon >= n.minLon && t.minLat <= n.maxLat && t.maxLat >= n.minLat;
|
|
12
12
|
}
|
|
13
|
-
function
|
|
13
|
+
function nt(t) {
|
|
14
14
|
let n = 1 / 0, o = 1 / 0, i = -1 / 0, a = -1 / 0;
|
|
15
15
|
for (const e of t)
|
|
16
16
|
e.minLon < n && (n = e.minLon), e.minLat < o && (o = e.minLat), e.maxLon > i && (i = e.maxLon), e.maxLat > a && (a = e.maxLat);
|
|
17
17
|
return { minLon: n, minLat: o, maxLon: i, maxLat: a };
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
const
|
|
19
|
+
function $(t, n, o, i) {
|
|
20
|
+
const a = o - n, e = new Float64Array(a), r = new Uint32Array(a);
|
|
21
|
+
for (let s = 0; s < a; s++)
|
|
22
|
+
e[s] = i(t[n + s]), r[s] = s;
|
|
23
|
+
r.sort((s, u) => e[s] - e[u] || s - u);
|
|
24
|
+
const c = new Array(a);
|
|
25
|
+
for (let s = 0; s < a; s++) c[s] = t[n + r[s]];
|
|
26
|
+
return c;
|
|
27
|
+
}
|
|
28
|
+
const mt = (t) => t.minLon + t.maxLon, Lt = (t) => t.minLat + t.maxLat;
|
|
29
|
+
function U(t) {
|
|
30
|
+
const n = t.length, o = Math.ceil(n / S), a = Math.ceil(Math.sqrt(o)) * S, e = $(t, 0, n, mt), r = [];
|
|
21
31
|
for (let c = 0; c < n; c += a) {
|
|
22
|
-
const s = e.
|
|
32
|
+
const s = $(e, c, Math.min(n, c + a), Lt);
|
|
23
33
|
for (let u = 0; u < s.length; u += S) r.push(s.slice(u, u + S));
|
|
24
34
|
}
|
|
25
35
|
return r;
|
|
26
36
|
}
|
|
27
|
-
function
|
|
37
|
+
function z(t, n) {
|
|
38
|
+
const o = nt(t);
|
|
39
|
+
return n ? { minLon: o.minLon, minLat: o.minLat, maxLon: o.maxLon, maxLat: o.maxLat, folhas: t } : { minLon: o.minLon, minLat: o.minLat, maxLon: o.maxLon, maxLat: o.maxLat, filhos: t };
|
|
40
|
+
}
|
|
41
|
+
function vt(t) {
|
|
28
42
|
if (t.length === 0) return null;
|
|
29
|
-
let n =
|
|
43
|
+
let n = U(t).map((o) => z(o, !0));
|
|
30
44
|
for (; n.length > 1; )
|
|
31
|
-
n =
|
|
45
|
+
n = U(n).map((o) => z(o, !1));
|
|
32
46
|
return n[0];
|
|
33
47
|
}
|
|
34
|
-
|
|
48
|
+
function k(t, n) {
|
|
49
|
+
const [[o, i], [a, e]] = W(t.geometria, n);
|
|
50
|
+
return { id: t.id, minLon: i, minLat: o, maxLon: e, maxLat: a };
|
|
51
|
+
}
|
|
52
|
+
class Zt {
|
|
35
53
|
/** `espaco` define o envelope do círculo (sem ele, o geográfico de sempre). */
|
|
36
54
|
constructor(n) {
|
|
37
55
|
y(this, "raiz", null);
|
|
@@ -51,7 +69,7 @@ class Vt {
|
|
|
51
69
|
construir(n) {
|
|
52
70
|
this.itens.clear();
|
|
53
71
|
for (const o of n)
|
|
54
|
-
o.excluida || this.itens.set(o.id,
|
|
72
|
+
o.excluida || this.itens.set(o.id, k(o, this.espaco));
|
|
55
73
|
this.remontar();
|
|
56
74
|
}
|
|
57
75
|
inserir(n) {
|
|
@@ -63,7 +81,7 @@ class Vt {
|
|
|
63
81
|
this.remover(n.id);
|
|
64
82
|
return;
|
|
65
83
|
}
|
|
66
|
-
const o =
|
|
84
|
+
const o = k(n, this.espaco);
|
|
67
85
|
this.itens.has(n.id) && this.obsoletos.add(n.id), this.itens.set(n.id, o), this.delta.set(n.id, o), this.envelopeCache = void 0, this.compactarSeNecessario();
|
|
68
86
|
}
|
|
69
87
|
remover(n) {
|
|
@@ -95,7 +113,7 @@ class Vt {
|
|
|
95
113
|
const n = [];
|
|
96
114
|
this.raiz && n.push(this.raiz);
|
|
97
115
|
for (const i of this.delta.values()) n.push(i);
|
|
98
|
-
const o = n.length > 0 ?
|
|
116
|
+
const o = n.length > 0 ? nt(n) : null;
|
|
99
117
|
return this.envelopeCache = o && Number.isFinite(o.minLat) && Number.isFinite(o.maxLat) && Number.isFinite(o.minLon) && Number.isFinite(o.maxLon) ? o : null, this.envelopeCache;
|
|
100
118
|
}
|
|
101
119
|
intersecta(n) {
|
|
@@ -106,25 +124,25 @@ class Vt {
|
|
|
106
124
|
return this.itens.get(n);
|
|
107
125
|
}
|
|
108
126
|
compactarSeNecessario() {
|
|
109
|
-
this.delta.size + this.obsoletos.size > Math.max(
|
|
127
|
+
this.delta.size + this.obsoletos.size > Math.max(pt, this.itens.size * 0.1) && this.remontar();
|
|
110
128
|
}
|
|
111
129
|
remontar() {
|
|
112
|
-
this.envelopeCache = void 0, this.raiz =
|
|
130
|
+
this.envelopeCache = void 0, this.raiz = vt([...this.itens.values()]), this.delta.clear(), this.obsoletos.clear();
|
|
113
131
|
}
|
|
114
132
|
}
|
|
115
|
-
const
|
|
116
|
-
function
|
|
117
|
-
return !Number.isFinite(t) || t >=
|
|
133
|
+
const yt = 17, At = 9, Mt = 1.2;
|
|
134
|
+
function xt(t) {
|
|
135
|
+
return !Number.isFinite(t) || t >= yt ? 0 : 360 / (256 * 2 ** t) * Mt;
|
|
118
136
|
}
|
|
119
|
-
function
|
|
137
|
+
function V(t) {
|
|
120
138
|
return Number.isFinite(t) ? 1 / Math.max(0.05, Math.cos(Math.max(-85, Math.min(85, t)) * Math.PI / 180)) : 1;
|
|
121
139
|
}
|
|
122
|
-
function
|
|
140
|
+
function gt(t, n, o, i) {
|
|
123
141
|
const a = o[1] - n[1], e = (o[0] - n[0]) * i, r = a * a + e * e, c = (t[0] - n[0]) * i;
|
|
124
142
|
let s = r === 0 ? 0 : ((t[1] - n[1]) * a + c * e) / r;
|
|
125
143
|
return s = Math.max(0, Math.min(1, s)), Math.hypot(t[1] - (n[1] + s * a), c - s * e);
|
|
126
144
|
}
|
|
127
|
-
function
|
|
145
|
+
function ot(t, n, o = 1) {
|
|
128
146
|
if (!(n > 0) || t.length < 3) return t;
|
|
129
147
|
const i = Number.isFinite(o) && o > 0 ? o : 1, a = new Uint8Array(t.length);
|
|
130
148
|
a[0] = 1, a[t.length - 1] = 1;
|
|
@@ -132,42 +150,42 @@ function W(t, n, o = 1) {
|
|
|
132
150
|
for (; e.length > 0; ) {
|
|
133
151
|
const [r, c] = e.pop();
|
|
134
152
|
let s = 0, u = -1;
|
|
135
|
-
for (let
|
|
136
|
-
const d =
|
|
137
|
-
d > s && (s = d, u =
|
|
153
|
+
for (let h = r + 1; h < c; h++) {
|
|
154
|
+
const d = gt(t[h], t[r], t[c], i);
|
|
155
|
+
d > s && (s = d, u = h);
|
|
138
156
|
}
|
|
139
157
|
u !== -1 && s > n && (a[u] = 1, e.push([r, u], [u, c]));
|
|
140
158
|
}
|
|
141
159
|
return t.filter((r, c) => a[c] === 1);
|
|
142
160
|
}
|
|
143
|
-
function
|
|
161
|
+
function Ct(t, n, o = 1) {
|
|
144
162
|
if (!(n > 0) || t.length < 4) return t;
|
|
145
|
-
const i = [...t, t[0]], a =
|
|
163
|
+
const i = [...t, t[0]], a = ot(i, n, o);
|
|
146
164
|
return a.pop(), a.length >= 3 ? a : t;
|
|
147
165
|
}
|
|
148
|
-
function
|
|
149
|
-
return (t.tipo === "LineString" || t.tipo === "Polygon") && t.curva ? 0 : t.tipo === "LineString" ?
|
|
166
|
+
function It(t) {
|
|
167
|
+
return (t.tipo === "LineString" || t.tipo === "Polygon") && t.curva ? 0 : t.tipo === "LineString" ? tt(t).reduce((n, o) => n + o.length, 0) : t.tipo === "Polygon" ? t.aneis.reduce((n, o) => n + o.length, 0) : 0;
|
|
150
168
|
}
|
|
151
|
-
function
|
|
169
|
+
function Bt(t, n) {
|
|
152
170
|
var i, a, e, r;
|
|
153
|
-
const o =
|
|
154
|
-
if (o === 0 ||
|
|
171
|
+
const o = xt(n);
|
|
172
|
+
if (o === 0 || It(t) < At) return t;
|
|
155
173
|
if (t.tipo === "LineString") {
|
|
156
|
-
const c =
|
|
157
|
-
return
|
|
174
|
+
const c = tt(t), s = V(((a = (i = c[0]) == null ? void 0 : i[0]) == null ? void 0 : a[0]) ?? NaN);
|
|
175
|
+
return ft(c.map((u) => ot(u, o, s)));
|
|
158
176
|
}
|
|
159
177
|
if (t.tipo === "Polygon") {
|
|
160
|
-
const c =
|
|
161
|
-
return { tipo: "Polygon", aneis: t.aneis.map((s) =>
|
|
178
|
+
const c = V(((r = (e = t.aneis[0]) == null ? void 0 : e[0]) == null ? void 0 : r[0]) ?? NaN);
|
|
179
|
+
return { tipo: "Polygon", aneis: t.aneis.map((s) => Ct(s, o, c)) };
|
|
162
180
|
}
|
|
163
181
|
return t;
|
|
164
182
|
}
|
|
165
|
-
const
|
|
166
|
-
function
|
|
183
|
+
const Pt = /* @__PURE__ */ new Set(["previa", "prévia", "preview", "rascunho", "draft", "proposta"]);
|
|
184
|
+
function E(t) {
|
|
167
185
|
var o, i;
|
|
168
186
|
const n = [t.status, (o = t.propriedades) == null ? void 0 : o.status, (i = t.propriedades) == null ? void 0 : i.tipo_geometria];
|
|
169
187
|
for (const a of n)
|
|
170
|
-
if (typeof a == "string" &&
|
|
188
|
+
if (typeof a == "string" && Pt.has(a.trim().toLowerCase())) return "previa";
|
|
171
189
|
return "oficial";
|
|
172
190
|
}
|
|
173
191
|
function T(t) {
|
|
@@ -175,33 +193,33 @@ function T(t) {
|
|
|
175
193
|
const n = t.entidadeId ?? ((o = t.propriedades) == null ? void 0 : o.entidadeId);
|
|
176
194
|
return typeof n == "string" || typeof n == "number" ? String(n) : t.id;
|
|
177
195
|
}
|
|
178
|
-
const
|
|
179
|
-
class
|
|
196
|
+
const w = (t, n) => `${t}\0${n}`;
|
|
197
|
+
class Jt {
|
|
180
198
|
constructor() {
|
|
181
199
|
/** Mostra as prévias de todas as entidades. */
|
|
182
200
|
y(this, "global", !1);
|
|
183
201
|
y(this, "individuais", /* @__PURE__ */ new Set());
|
|
184
202
|
}
|
|
185
203
|
alternarIndividual(n, o) {
|
|
186
|
-
const i =
|
|
204
|
+
const i = w(n, o);
|
|
187
205
|
return this.individuais.has(i) ? this.individuais.delete(i) : this.individuais.add(i), this.individuais.has(i);
|
|
188
206
|
}
|
|
189
207
|
definirIndividual(n, o, i) {
|
|
190
|
-
const a =
|
|
208
|
+
const a = w(n, o);
|
|
191
209
|
i ? this.individuais.add(a) : this.individuais.delete(a);
|
|
192
210
|
}
|
|
193
211
|
individualAtiva(n, o) {
|
|
194
|
-
return this.individuais.has(
|
|
212
|
+
return this.individuais.has(w(n, o));
|
|
195
213
|
}
|
|
196
214
|
/** Entidades da camada que têm geometria oficial. */
|
|
197
215
|
static oficiais(n) {
|
|
198
216
|
const o = /* @__PURE__ */ new Set();
|
|
199
|
-
for (const i of n) !i.excluida &&
|
|
217
|
+
for (const i of n) !i.excluida && E(i) === "oficial" && o.add(T(i));
|
|
200
218
|
return o;
|
|
201
219
|
}
|
|
202
220
|
/** A feição aparece? `comOficial` = entidades da camada com geometria oficial (ver `oficiais`). */
|
|
203
221
|
visivel(n, o) {
|
|
204
|
-
if (
|
|
222
|
+
if (E(n) === "oficial") return !0;
|
|
205
223
|
const i = T(n);
|
|
206
224
|
return this.global || !o.has(i) || this.individualAtiva(n.camadaId, i);
|
|
207
225
|
}
|
|
@@ -210,87 +228,87 @@ class Gt {
|
|
|
210
228
|
return this.global || this.individualAtiva(n.camadaId, T(n));
|
|
211
229
|
}
|
|
212
230
|
}
|
|
213
|
-
const
|
|
214
|
-
function
|
|
231
|
+
const it = /* @__PURE__ */ new Set(["simetrico", "suave", "livre"]), q = 1e-6;
|
|
232
|
+
function Qt(t) {
|
|
215
233
|
if (!t.entrada && !t.saida) return "canto";
|
|
216
|
-
if (t.modo &&
|
|
234
|
+
if (t.modo && it.has(t.modo)) return t.modo;
|
|
217
235
|
if (!t.entrada || !t.saida) return "simetrico";
|
|
218
236
|
const n = t.ponto[0] - t.entrada[0], o = t.ponto[1] - t.entrada[1], i = t.saida[0] - t.ponto[0], a = t.saida[1] - t.ponto[1], e = Math.hypot(n, o), r = Math.hypot(i, a);
|
|
219
|
-
return e === 0 || r === 0 || !(Math.abs(n * a - o * i) <=
|
|
237
|
+
return e === 0 || r === 0 || !(Math.abs(n * a - o * i) <= q * e * r && n * i + o * a > 0) ? "livre" : Math.abs(e - r) <= q * Math.max(e, r) ? "simetrico" : "suave";
|
|
220
238
|
}
|
|
221
|
-
const
|
|
222
|
-
function
|
|
239
|
+
const bt = 24, St = 2, G = (t) => typeof t == "number" && Number.isFinite(t), j = (t) => Array.isArray(t) && t.length === 2 && G(t[0]) && G(t[1]);
|
|
240
|
+
function Yt(t, n) {
|
|
223
241
|
return [2 * t[0] - n[0], 2 * t[1] - n[1]];
|
|
224
242
|
}
|
|
225
|
-
function
|
|
243
|
+
function Nt(t) {
|
|
226
244
|
return t.some((n) => n.entrada !== void 0 || n.saida !== void 0);
|
|
227
245
|
}
|
|
228
|
-
function
|
|
246
|
+
function at(t, n) {
|
|
229
247
|
return [t.saida ?? t.ponto, n.entrada ?? n.ponto];
|
|
230
248
|
}
|
|
231
|
-
function
|
|
249
|
+
function et(t, n) {
|
|
232
250
|
const o = [];
|
|
233
251
|
for (let i = 0; i < t - 1; i++) o.push([i, i + 1]);
|
|
234
252
|
return n && t > 2 && o.push([t - 1, 0]), o;
|
|
235
253
|
}
|
|
236
|
-
function
|
|
254
|
+
function Tt(t, n, o, i, a) {
|
|
237
255
|
const e = 1 - a, r = e * e * e, c = 3 * e * e * a, s = 3 * e * a * a, u = a * a * a;
|
|
238
256
|
return [r * t[0] + c * n[0] + s * o[0] + u * i[0], r * t[1] + c * n[1] + s * o[1] + u * i[1]];
|
|
239
257
|
}
|
|
240
|
-
function
|
|
258
|
+
function Kt(t, n = !1, o = bt) {
|
|
241
259
|
if (t.length === 0) return [];
|
|
242
260
|
const i = [[t[0].ponto[0], t[0].ponto[1]]];
|
|
243
|
-
for (const [a, e] of
|
|
261
|
+
for (const [a, e] of et(t.length, n)) {
|
|
244
262
|
const r = t[a], c = t[e];
|
|
245
263
|
if (!(r.saida === void 0 && c.entrada === void 0)) {
|
|
246
|
-
const [u,
|
|
247
|
-
for (let d = 1; d < o; d++) i.push(
|
|
264
|
+
const [u, h] = at(r, c);
|
|
265
|
+
for (let d = 1; d < o; d++) i.push(Tt(r.ponto, u, h, c.ponto, d / o));
|
|
248
266
|
}
|
|
249
267
|
e !== 0 && i.push([c.ponto[0], c.ponto[1]]);
|
|
250
268
|
}
|
|
251
269
|
return i;
|
|
252
270
|
}
|
|
253
|
-
function
|
|
271
|
+
function wt(t, n) {
|
|
254
272
|
if (t.length === 0) return [];
|
|
255
273
|
const o = [{ cmd: "M", pts: [t[0].ponto] }];
|
|
256
|
-
for (const [i, a] of
|
|
274
|
+
for (const [i, a] of et(t.length, n)) {
|
|
257
275
|
const e = t[i], r = t[a];
|
|
258
276
|
if (e.saida === void 0 && r.entrada === void 0)
|
|
259
277
|
o.push({ cmd: "L", pts: [r.ponto] });
|
|
260
278
|
else {
|
|
261
|
-
const [c, s] =
|
|
279
|
+
const [c, s] = at(e, r);
|
|
262
280
|
o.push({ cmd: "C", pts: [c, s, r.ponto] });
|
|
263
281
|
}
|
|
264
282
|
}
|
|
265
283
|
return o;
|
|
266
284
|
}
|
|
267
|
-
function
|
|
268
|
-
const i = (e) => String(Math.round(e * 100) / 100), a =
|
|
285
|
+
function Wt(t, n, o) {
|
|
286
|
+
const i = (e) => String(Math.round(e * 100) / 100), a = wt(t, n).map((e) => e.cmd + e.pts.map((r) => {
|
|
269
287
|
const c = o(r);
|
|
270
288
|
return `${i(c.x)} ${i(c.y)}`;
|
|
271
289
|
}).join(" ")).join("");
|
|
272
290
|
return a && n ? `${a}Z` : a;
|
|
273
291
|
}
|
|
274
|
-
function
|
|
292
|
+
function tn(t, n = St) {
|
|
275
293
|
if (!Array.isArray(t) || t.length < n) return null;
|
|
276
294
|
const o = [];
|
|
277
295
|
for (const i of t) {
|
|
278
|
-
if (!i || typeof i != "object" || !
|
|
296
|
+
if (!i || typeof i != "object" || !j(i.ponto)) return null;
|
|
279
297
|
const a = i, e = { ponto: [a.ponto[0], a.ponto[1]] };
|
|
280
|
-
|
|
298
|
+
j(a.entrada) && (e.entrada = [a.entrada[0], a.entrada[1]]), j(a.saida) && (e.saida = [a.saida[0], a.saida[1]]), typeof a.modo == "string" && it.has(a.modo) && (e.entrada || e.saida) && (e.modo = a.modo), o.push(e);
|
|
281
299
|
}
|
|
282
|
-
return
|
|
300
|
+
return Nt(o) ? o : null;
|
|
283
301
|
}
|
|
284
|
-
function
|
|
302
|
+
function nn(t, n) {
|
|
285
303
|
return t.map((o) => {
|
|
286
304
|
const i = { ponto: n(o.ponto) };
|
|
287
305
|
return o.entrada && (i.entrada = n(o.entrada)), o.saida && (i.saida = n(o.saida)), o.modo && (i.modo = o.modo), i;
|
|
288
306
|
});
|
|
289
307
|
}
|
|
290
|
-
function
|
|
308
|
+
function on(t) {
|
|
291
309
|
return t.tipo === "LineString" ? t.curva && t.curva.length >= 2 && !(t.partes && t.partes.length > 1) ? t.curva : null : t.tipo === "Polygon" && t.curva && t.curva.length >= 3 && t.aneis.length === 1 ? t.curva : null;
|
|
292
310
|
}
|
|
293
|
-
const
|
|
311
|
+
const jt = [
|
|
294
312
|
"continua",
|
|
295
313
|
"tracejada",
|
|
296
314
|
"tracejada-curta",
|
|
@@ -302,7 +320,7 @@ const St = [
|
|
|
302
320
|
"centro",
|
|
303
321
|
"fantasma",
|
|
304
322
|
"divisa"
|
|
305
|
-
],
|
|
323
|
+
], Ot = {
|
|
306
324
|
tracejada: [12, 6],
|
|
307
325
|
"tracejada-curta": [6, 4],
|
|
308
326
|
"tracejada-longa": [24, 8],
|
|
@@ -313,7 +331,7 @@ const St = [
|
|
|
313
331
|
centro: [24, 4, 6, 4],
|
|
314
332
|
fantasma: [24, 4, 6, 4, 6, 4],
|
|
315
333
|
divisa: [12, 4, 12, 4, 0, 4]
|
|
316
|
-
},
|
|
334
|
+
}, H = { arredondada: "round", reta: "butt", quadrada: "square" }, X = { arredondada: "round", chanfrada: "bevel", angular: "miter" }, Ft = 0.05, Dt = 100, Z = {
|
|
317
335
|
continuous: "continua",
|
|
318
336
|
dashed: "tracejada",
|
|
319
337
|
dashed2: "tracejada-curta",
|
|
@@ -327,70 +345,70 @@ const St = [
|
|
|
327
345
|
phantom: "fantasma",
|
|
328
346
|
border: "divisa"
|
|
329
347
|
};
|
|
330
|
-
function
|
|
331
|
-
return typeof t == "string" &&
|
|
348
|
+
function B(t) {
|
|
349
|
+
return typeof t == "string" && jt.includes(t);
|
|
332
350
|
}
|
|
333
|
-
function
|
|
334
|
-
if (
|
|
351
|
+
function rt(t) {
|
|
352
|
+
if (B(t)) return t;
|
|
335
353
|
if (typeof t != "string") return;
|
|
336
354
|
const n = t.trim().toLowerCase();
|
|
337
|
-
return
|
|
338
|
-
}
|
|
339
|
-
function B(t) {
|
|
340
|
-
return typeof t == "string" && Object.prototype.hasOwnProperty.call(G, t) ? G[t] : void 0;
|
|
355
|
+
return B(n) ? n : Object.prototype.hasOwnProperty.call(Z, n) ? Z[n] : void 0;
|
|
341
356
|
}
|
|
342
357
|
function J(t) {
|
|
343
358
|
return typeof t == "string" && Object.prototype.hasOwnProperty.call(H, t) ? H[t] : void 0;
|
|
344
359
|
}
|
|
345
|
-
function
|
|
346
|
-
return typeof t
|
|
360
|
+
function Q(t) {
|
|
361
|
+
return typeof t == "string" && Object.prototype.hasOwnProperty.call(X, t) ? X[t] : void 0;
|
|
347
362
|
}
|
|
348
|
-
function
|
|
349
|
-
|
|
363
|
+
function Et(t) {
|
|
364
|
+
return typeof t != "number" || !Number.isFinite(t) || t <= 0 ? 1 : Math.min(Dt, Math.max(Ft, t));
|
|
365
|
+
}
|
|
366
|
+
function Y(t, n, o = 1, i = "round") {
|
|
367
|
+
const a = rt(t);
|
|
350
368
|
if (!a || a === "continua") return;
|
|
351
|
-
const e = Number.isFinite(n) && n > 0 ? n : 1, r =
|
|
352
|
-
return
|
|
353
|
-
const d =
|
|
369
|
+
const e = Number.isFinite(n) && n > 0 ? n : 1, r = Et(o) * Math.max(1, e / 2), c = i === "butt" ? e : 0, s = i === "butt" ? 0 : e;
|
|
370
|
+
return Ot[a].map((u, h) => {
|
|
371
|
+
const d = h % 2 === 0 ? u === 0 ? c : u * r : u * r + s;
|
|
354
372
|
return Math.round(d * 100) / 100;
|
|
355
373
|
}).join(" ");
|
|
356
374
|
}
|
|
357
|
-
const
|
|
358
|
-
function
|
|
359
|
-
return typeof t == "string" &&
|
|
375
|
+
const _t = "#38bdf8", Rt = "#38bdf8", $t = /^(#[0-9a-f]{3,8}|(rgb|hsl)a?\([0-9.,%\s\/-]+\)|[a-z]{3,20})$/i;
|
|
376
|
+
function O(t, n) {
|
|
377
|
+
return typeof t == "string" && $t.test(t.trim()) ? t.trim() : n;
|
|
360
378
|
}
|
|
361
|
-
const
|
|
362
|
-
function
|
|
363
|
-
const i = t.estilo ?? {}, a =
|
|
379
|
+
const x = (t) => typeof t == "number" && Number.isFinite(t);
|
|
380
|
+
function an(t, n, o = !1) {
|
|
381
|
+
const i = t.estilo ?? {}, a = O(i.corTraco ?? n.corPrimaria, _t), e = t.geometria.tipo, r = e === "Polygon" || e === "Circle", c = e === "Point", s = c && O(i.corContorno, "") || a, u = c && x(i.espessuraContorno) && i.espessuraContorno >= 0 ? i.espessuraContorno : void 0, h = u ?? (x(i.espessuraTraco) ? i.espessuraTraco : void 0) ?? (x(n.espessuraLinha) ? n.espessuraLinha : 2), d = x(i.opacidadePreenchimento) ? i.opacidadePreenchimento : r ? 0.2 : 0.85, f = o ? h + 2 : h, L = J(i.terminacaoTraco) ?? J(n.terminacaoLinha) ?? "round", A = x(i.opacidadeTraco) ? i.opacidadeTraco : x(n.opacidadeLinha) ? n.opacidadeLinha : 1;
|
|
364
382
|
return {
|
|
365
|
-
cor: o ?
|
|
383
|
+
cor: o ? Rt : s,
|
|
366
384
|
traco: !(u === 0 && !o),
|
|
367
385
|
peso: f,
|
|
368
|
-
dash:
|
|
386
|
+
dash: Ut(t, n, f, L),
|
|
369
387
|
// selecionada fica opaca: a seleção precisa aparecer mesmo numa linha quase transparente
|
|
370
388
|
opacidadeTraco: o ? 1 : Math.min(1, Math.max(0, A)),
|
|
371
389
|
terminacao: L,
|
|
372
|
-
juncao:
|
|
373
|
-
deslocamentoDash:
|
|
390
|
+
juncao: Q(i.juncaoTraco) ?? Q(n.juncaoLinha) ?? "round",
|
|
391
|
+
deslocamentoDash: x(i.deslocamentoTracejado) ? i.deslocamentoTracejado : 0,
|
|
374
392
|
preencher: r || c,
|
|
375
|
-
corPreenchimento:
|
|
393
|
+
corPreenchimento: O(i.corPreenchimento, a),
|
|
376
394
|
opacidadePreenchimento: o ? Math.min(1, d + 0.18) : d
|
|
377
395
|
};
|
|
378
396
|
}
|
|
379
|
-
function
|
|
397
|
+
function Ut(t, n, o, i) {
|
|
380
398
|
const a = t.estilo ?? {};
|
|
381
399
|
if (a.dashArray) return a.dashArray;
|
|
382
400
|
if (a.tipoLinha !== void 0 && a.tipoLinha !== null) {
|
|
383
|
-
const e =
|
|
384
|
-
if (e ||
|
|
401
|
+
const e = Y(a.tipoLinha, o, a.escalaTipoLinha ?? n.escalaTipoLinha, i);
|
|
402
|
+
if (e || rt(a.tipoLinha) === "continua") return e;
|
|
385
403
|
}
|
|
386
|
-
return
|
|
404
|
+
return E(t) === "previa" ? "6 4" : n.dashArray ? n.dashArray : Y(n.tipoLinha, o, n.escalaTipoLinha, i);
|
|
387
405
|
}
|
|
388
|
-
function
|
|
406
|
+
function en(t, n) {
|
|
389
407
|
var i;
|
|
390
408
|
const o = ((i = t.estilo) == null ? void 0 : i.tamanhoIcone) ?? n.tamanhoMarcador ?? 8;
|
|
391
|
-
return (
|
|
409
|
+
return (x(o) && o > 0 ? o : 8) / 2;
|
|
392
410
|
}
|
|
393
|
-
class
|
|
411
|
+
class rn {
|
|
394
412
|
constructor() {
|
|
395
413
|
y(this, "porChave", /* @__PURE__ */ new Map());
|
|
396
414
|
}
|
|
@@ -402,37 +420,37 @@ class tn {
|
|
|
402
420
|
this.porChave.clear();
|
|
403
421
|
}
|
|
404
422
|
}
|
|
405
|
-
const
|
|
406
|
-
function
|
|
423
|
+
const zt = 256, C = 85.0511287798, kt = 4007501668557849e-8;
|
|
424
|
+
function _(t, n, o, i, a) {
|
|
407
425
|
const e = o > C ? C : o < -C ? -C : o, r = Math.sin(e * Math.PI / 180);
|
|
408
426
|
t[n] = (i + 180) / 360 * a, t[n + 1] = (0.5 - Math.log((1 + r) / (1 - r)) / (4 * Math.PI)) * a;
|
|
409
427
|
}
|
|
410
|
-
const P = (t) =>
|
|
411
|
-
function
|
|
428
|
+
const P = (t) => zt * 2 ** t;
|
|
429
|
+
function sn(t, n, o) {
|
|
412
430
|
const i = P(o);
|
|
413
431
|
return [Math.atan(Math.sinh(Math.PI * (1 - 2 * n / i))) * 180 / Math.PI, t / i * 360 - 180];
|
|
414
432
|
}
|
|
415
|
-
function
|
|
433
|
+
function K(t, n) {
|
|
416
434
|
const o = P(n), i = new Float64Array(t.length * 2);
|
|
417
435
|
for (let a = 0; a < t.length; a++) {
|
|
418
436
|
const e = t[a];
|
|
419
|
-
|
|
437
|
+
_(i, a * 2, e[0], e[1], o);
|
|
420
438
|
}
|
|
421
439
|
return i;
|
|
422
440
|
}
|
|
423
|
-
function
|
|
441
|
+
function cn(t, n, o) {
|
|
424
442
|
const i = new Float64Array(2);
|
|
425
|
-
return
|
|
443
|
+
return _(i, 0, t, n, P(o)), i;
|
|
426
444
|
}
|
|
427
|
-
function
|
|
445
|
+
function Vt(t, n) {
|
|
428
446
|
const o = Math.max(-C, Math.min(C, t));
|
|
429
|
-
return
|
|
447
|
+
return kt * Math.cos(o * Math.PI / 180) / P(n);
|
|
430
448
|
}
|
|
431
|
-
function
|
|
432
|
-
const i =
|
|
449
|
+
function un(t, n, o) {
|
|
450
|
+
const i = Vt(t, o), a = n / i;
|
|
433
451
|
return Number.isFinite(a) && a >= 0 ? a : 0;
|
|
434
452
|
}
|
|
435
|
-
function
|
|
453
|
+
function ln(t) {
|
|
436
454
|
let n = 1 / 0, o = 1 / 0, i = -1 / 0, a = -1 / 0;
|
|
437
455
|
for (const e of t)
|
|
438
456
|
for (let r = 0; r + 1 < e.length; r += 2) {
|
|
@@ -441,26 +459,26 @@ function en(t) {
|
|
|
441
459
|
}
|
|
442
460
|
return n <= i && o <= a ? { minX: n, minY: o, maxX: i, maxY: a } : null;
|
|
443
461
|
}
|
|
444
|
-
function
|
|
462
|
+
function st(t, n, o, i, a, e) {
|
|
445
463
|
const r = a - o, c = e - i, s = r * r + c * c;
|
|
446
464
|
let u = s === 0 ? 0 : ((t - o) * r + (n - i) * c) / s;
|
|
447
465
|
return u = u < 0 ? 0 : u > 1 ? 1 : u, Math.hypot(t - (o + u * r), n - (i + u * c));
|
|
448
466
|
}
|
|
449
|
-
let
|
|
450
|
-
const
|
|
451
|
-
function
|
|
467
|
+
let F = new Float64Array(64), D = new Uint8Array(32);
|
|
468
|
+
const qt = [];
|
|
469
|
+
function hn(t, n, o, i) {
|
|
452
470
|
const a = t.length;
|
|
453
|
-
if (!(o > 0) || a < 3) return
|
|
471
|
+
if (!(o > 0) || a < 3) return K(t, n);
|
|
454
472
|
const e = P(n);
|
|
455
|
-
|
|
456
|
-
const r =
|
|
473
|
+
F.length < (a + 1) * 2 && (F = new Float64Array((a + 1) * 2));
|
|
474
|
+
const r = F, c = o * o;
|
|
457
475
|
let s = 0;
|
|
458
|
-
for (let
|
|
459
|
-
const m = t[
|
|
460
|
-
if (
|
|
461
|
-
const M = r[s * 2] - r[(s - 1) * 2], p = r[s * 2 + 1] - r[(s - 1) * 2 + 1],
|
|
462
|
-
if (
|
|
463
|
-
if (
|
|
476
|
+
for (let l = 0; l < a; l++) {
|
|
477
|
+
const m = t[l];
|
|
478
|
+
if (_(r, s * 2, m[0], m[1], e), s > 0) {
|
|
479
|
+
const M = r[s * 2] - r[(s - 1) * 2], p = r[s * 2 + 1] - r[(s - 1) * 2 + 1], g = M * M + p * p < c;
|
|
480
|
+
if (g && !(!i && l === a - 1)) continue;
|
|
481
|
+
if (g && s > 1) {
|
|
464
482
|
r[(s - 1) * 2] = r[s * 2], r[(s - 1) * 2 + 1] = r[s * 2 + 1];
|
|
465
483
|
continue;
|
|
466
484
|
}
|
|
@@ -468,35 +486,35 @@ function rn(t, n, o, i) {
|
|
|
468
486
|
s++;
|
|
469
487
|
}
|
|
470
488
|
if (i && s > 3) {
|
|
471
|
-
const
|
|
472
|
-
|
|
489
|
+
const l = r[(s - 1) * 2] - r[0], m = r[(s - 1) * 2 + 1] - r[1];
|
|
490
|
+
l * l + m * m < c && s--;
|
|
473
491
|
}
|
|
474
|
-
if (i && s < 3) return
|
|
492
|
+
if (i && s < 3) return K(t, n);
|
|
475
493
|
let u = s;
|
|
476
|
-
i && (r[s * 2] = r[0], r[s * 2 + 1] = r[1], u = s + 1),
|
|
477
|
-
const
|
|
478
|
-
|
|
479
|
-
const d =
|
|
494
|
+
i && (r[s * 2] = r[0], r[s * 2 + 1] = r[1], u = s + 1), D.length < u && (D = new Uint8Array(u * 2));
|
|
495
|
+
const h = D;
|
|
496
|
+
h.fill(0, 0, u), h[0] = 1, h[u - 1] = 1;
|
|
497
|
+
const d = qt;
|
|
480
498
|
for (d.length = 0, d.push(0, u - 1); d.length > 0; ) {
|
|
481
|
-
const
|
|
499
|
+
const l = d.pop(), m = d.pop();
|
|
482
500
|
let M = 0, p = -1;
|
|
483
|
-
const
|
|
484
|
-
for (let I = m + 1; I <
|
|
485
|
-
const
|
|
486
|
-
|
|
501
|
+
const g = r[m * 2], ct = r[m * 2 + 1], ut = r[l * 2], lt = r[l * 2 + 1];
|
|
502
|
+
for (let I = m + 1; I < l; I++) {
|
|
503
|
+
const R = st(r[I * 2], r[I * 2 + 1], g, ct, ut, lt);
|
|
504
|
+
R > M && (M = R, p = I);
|
|
487
505
|
}
|
|
488
|
-
p !== -1 && M > o && (
|
|
506
|
+
p !== -1 && M > o && (h[p] = 1, d.push(m, p, p, l));
|
|
489
507
|
}
|
|
490
508
|
const f = i ? u - 1 : u;
|
|
491
509
|
let L = 0;
|
|
492
|
-
for (let
|
|
510
|
+
for (let l = 0; l < f; l++) h[l] && L++;
|
|
493
511
|
const A = i && L < 3, v = new Float64Array((A ? f : L) * 2);
|
|
494
512
|
let b = 0;
|
|
495
|
-
for (let
|
|
496
|
-
!A && !l
|
|
513
|
+
for (let l = 0; l < f; l++)
|
|
514
|
+
!A && !h[l] || (v[b++] = r[l * 2], v[b++] = r[l * 2 + 1]);
|
|
497
515
|
return v;
|
|
498
516
|
}
|
|
499
|
-
function
|
|
517
|
+
function dn(t, n, o) {
|
|
500
518
|
const i = t.length >> 1;
|
|
501
519
|
if (!(n > 0) || i < 3) return t;
|
|
502
520
|
let a = t, e = i;
|
|
@@ -507,10 +525,10 @@ function sn(t, n, o) {
|
|
|
507
525
|
for (; c.length > 0; ) {
|
|
508
526
|
const f = c.pop(), L = c.pop();
|
|
509
527
|
let A = 0, v = -1;
|
|
510
|
-
const b = a[L * 2],
|
|
528
|
+
const b = a[L * 2], l = a[L * 2 + 1], m = a[f * 2], M = a[f * 2 + 1];
|
|
511
529
|
for (let p = L + 1; p < f; p++) {
|
|
512
|
-
const
|
|
513
|
-
|
|
530
|
+
const g = st(a[p * 2], a[p * 2 + 1], b, l, m, M);
|
|
531
|
+
g > A && (A = g, v = p);
|
|
514
532
|
}
|
|
515
533
|
v !== -1 && A > n && (r[v] = 1, c.push(L, v, v, f));
|
|
516
534
|
}
|
|
@@ -518,60 +536,60 @@ function sn(t, n, o) {
|
|
|
518
536
|
let u = 0;
|
|
519
537
|
for (let f = 0; f < s; f++) r[f] && u++;
|
|
520
538
|
if (o && u < 3 || u === s) return t;
|
|
521
|
-
const
|
|
539
|
+
const h = new Float64Array(u * 2);
|
|
522
540
|
let d = 0;
|
|
523
541
|
for (let f = 0; f < s; f++)
|
|
524
|
-
r[f] && (
|
|
525
|
-
return
|
|
542
|
+
r[f] && (h[d++] = a[f * 2], h[d++] = a[f * 2 + 1]);
|
|
543
|
+
return h;
|
|
526
544
|
}
|
|
527
545
|
export {
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
546
|
+
ln as A,
|
|
547
|
+
Y as B,
|
|
548
|
+
Rt as C,
|
|
549
|
+
st as D,
|
|
550
|
+
B as E,
|
|
533
551
|
P as F,
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
552
|
+
V as G,
|
|
553
|
+
Et as H,
|
|
554
|
+
Zt as I,
|
|
555
|
+
Vt as J,
|
|
556
|
+
cn as K,
|
|
557
|
+
_ as L,
|
|
558
|
+
At as M,
|
|
559
|
+
hn as N,
|
|
560
|
+
K as O,
|
|
561
|
+
un as P,
|
|
562
|
+
Ct as Q,
|
|
563
|
+
Jt as R,
|
|
564
|
+
ot as S,
|
|
565
|
+
jt as T,
|
|
566
|
+
dn as U,
|
|
567
|
+
xt as V,
|
|
568
|
+
yt as Z,
|
|
569
|
+
Kt as a,
|
|
570
|
+
Qt as b,
|
|
571
|
+
at as c,
|
|
572
|
+
O as d,
|
|
573
|
+
Yt as e,
|
|
574
|
+
wt as f,
|
|
575
|
+
Wt as g,
|
|
576
|
+
_t as h,
|
|
559
577
|
T as i,
|
|
560
|
-
|
|
578
|
+
Bt as j,
|
|
561
579
|
N as k,
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
580
|
+
an as l,
|
|
581
|
+
nn as m,
|
|
582
|
+
on as n,
|
|
583
|
+
sn as o,
|
|
584
|
+
Tt as p,
|
|
585
|
+
tn as q,
|
|
586
|
+
en as r,
|
|
587
|
+
E as s,
|
|
588
|
+
Nt as t,
|
|
589
|
+
Q as u,
|
|
590
|
+
It as v,
|
|
591
|
+
J as w,
|
|
592
|
+
rt as x,
|
|
593
|
+
rn as y,
|
|
594
|
+
Xt as z
|
|
577
595
|
};
|