@thibezer/ui-components-kit 2.28.1 → 2.29.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 +46 -0
- package/dist/camadas.cjs +87 -87
- package/dist/camadas.js +1864 -1309
- package/dist/canvas.cjs +42 -42
- package/dist/canvas.js +1713 -1609
- package/dist/components/ui-barra-ferramentas/ribbon-atualizacao.d.ts +10 -0
- package/dist/components/ui-barra-ferramentas/ui-ribbon.d.ts +25 -5
- package/dist/components/ui-camadas/camadas-arvore-renderer.d.ts +11 -0
- package/dist/components/ui-camadas/camadas-atualizacao-incremental.d.ts +26 -5
- package/dist/components/ui-camadas/camadas-colecao.d.ts +15 -0
- package/dist/components/ui-camadas/camadas-host.d.ts +12 -0
- package/dist/components/ui-camadas/camadas-janela-dom.d.ts +44 -0
- package/dist/components/ui-camadas/camadas-linha-feicao.d.ts +10 -1
- package/dist/components/ui-camadas/camadas-metricas.d.ts +2 -3
- package/dist/components/ui-camadas/camadas-render.d.ts +19 -2
- package/dist/components/ui-camadas/camadas-selecao-api.d.ts +6 -0
- package/dist/components/ui-camadas/camadas-virtual.d.ts +135 -0
- package/dist/components/ui-camadas/ui-camadas.d.ts +51 -2
- package/dist/components/ui-canvas-cad/cad-hud-coordenadas.d.ts +12 -0
- package/dist/components/ui-canvas-cad/ui-canvas-cad.d.ts +6 -1
- package/dist/custom-elements.json +32278 -30008
- package/dist/feature_caixa-DOchASgS.js +828 -0
- package/dist/feature_caixa-MrJEfMol.cjs +1 -0
- package/dist/{feature_desenho-CC8Mp5Gp.js → feature_desenho-Cq3H27as.js} +2 -2
- package/dist/{feature_desenho-BH-E1Q9Q.cjs → feature_desenho-eq3MIZR9.cjs} +1 -1
- package/dist/feature_metricas-CKQGG2nz.cjs +1 -0
- package/dist/feature_metricas-DGfd21VR.js +130 -0
- package/dist/geometria-px-BlB0OczX.cjs +1 -0
- package/dist/geometria-px-BxTQKrZN.js +577 -0
- package/dist/gerencigeo-canvas/dms.d.ts +7 -0
- package/dist/gerencigeo-canvas/feature_adapters.d.ts +7 -0
- package/dist/gerencigeo-canvas/feature_algoritmos.d.ts +1 -4
- package/dist/gerencigeo-canvas/feature_indice.d.ts +7 -0
- package/dist/gerencigeo-canvas/feature_lod.d.ts +16 -0
- package/dist/gerencigeo-canvas/motor/dados-camada.d.ts +11 -1
- package/dist/gerencigeo-canvas/motor/geometria-px.d.ts +9 -0
- package/dist/gerencigeo-canvas/motor/motor-formas.d.ts +28 -5
- package/dist/gerencigeo-canvas/motor/tipos.d.ts +7 -3
- package/dist/gerencigeo-canvas/qualidade.d.ts +5 -0
- package/dist/gerencigeo-canvas/renderers/canvas_formas_leaflet.d.ts +10 -0
- package/dist/gerencigeo-canvas/renderers/feicoes_canvas_renderer.d.ts +10 -0
- package/dist/gerencigeo-canvas/renderers/renderizador_formas.d.ts +7 -0
- package/dist/gerencigeo-canvas/utils.d.ts +1 -3
- package/dist/index.cjs +4 -4
- package/dist/index.js +84 -82
- package/dist/mapa.cjs +1 -1
- package/dist/mapa.js +1 -1
- package/dist/motor.cjs +1 -1
- package/dist/motor.js +620 -499
- package/dist/prancha-nucleo.cjs +3 -3
- package/dist/prancha-nucleo.js +283 -282
- package/dist/prancha.cjs +1 -1
- package/dist/prancha.js +3 -3
- package/dist/tools.cjs +5 -5
- package/dist/tools.js +438 -369
- package/dist/utils-B2HuBLwz.js +108 -0
- package/dist/utils-DpPysTeU.cjs +1 -0
- package/package.json +1 -1
- package/dist/feature_caixa-4M4MkFH7.cjs +0 -1
- package/dist/feature_caixa-BVc5LenS.js +0 -824
- package/dist/geometria-px-Cyi_oPD6.cjs +0 -1
- package/dist/geometria-px-DHMPUsxC.js +0 -639
- package/dist/utils-ClVgqVyJ.cjs +0 -1
- package/dist/utils-DrHoxxmf.js +0 -83
package/dist/camadas.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var E = (e, t, a) =>
|
|
1
|
+
var wt = Object.defineProperty;
|
|
2
|
+
var At = (e, t, a) => t in e ? wt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a;
|
|
3
|
+
var E = (e, t, a) => At(e, typeof t != "symbol" ? t + "" : t, a);
|
|
4
4
|
/* empty css */
|
|
5
|
-
import { h as
|
|
6
|
-
import { a as
|
|
7
|
-
import { UIMapaBase as
|
|
8
|
-
|
|
5
|
+
import { h as va, K as Et, S as It, A as kt, L as Xe, g as Ze, s as Lt, d as Ne } from "./kit-base-CBXA66aM.js";
|
|
6
|
+
import { a as Ct } from "./ui-seletor-cor-CPjA9vhZ.js";
|
|
7
|
+
import { UIMapaBase as zi, UISeletorMapaBase as Pi } from "./seletor-mapa-base.js";
|
|
8
|
+
import { a as Ft, d as ba } from "./feature_metricas-DGfd21VR.js";
|
|
9
|
+
const A = {
|
|
9
10
|
camadas: `<svg viewBox="0 0 24 24" width="13" height="13" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
10
11
|
<polygon points="12 2 2 7 12 12 22 7 12 2"></polygon>
|
|
11
12
|
<polyline points="2 17 12 22 22 17"></polyline>
|
|
@@ -103,69 +104,54 @@ const y = {
|
|
|
103
104
|
<line x1="9" y1="3" x2="9" y2="21"></line>
|
|
104
105
|
<line x1="15" y1="3" x2="15" y2="21"></line>
|
|
105
106
|
</svg>`
|
|
106
|
-
},
|
|
107
|
-
function
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
1,
|
|
112
|
-
Math.max(
|
|
113
|
-
0,
|
|
114
|
-
Math.sin(n / 2) * Math.sin(n / 2) + Math.cos(a) * Math.cos(i) * Math.sin(s / 2) * Math.sin(s / 2)
|
|
115
|
-
)
|
|
116
|
-
), l = ae * 2 * Math.atan2(Math.sqrt(c), Math.sqrt(1 - c));
|
|
117
|
-
return Number.isFinite(l) ? l : 0;
|
|
107
|
+
}, qe = (e) => Array.isArray(e) && e.length >= 2 && Number.isFinite(e[0]) && Number.isFinite(e[1]);
|
|
108
|
+
function He(e) {
|
|
109
|
+
const t = [];
|
|
110
|
+
for (const r of e) qe(r) && t.push([r[0], r[1]]);
|
|
111
|
+
return t.some((r) => Math.abs(r[0]) > 90) && t.every((r) => Math.abs(r[1]) <= 90) ? t.map((r) => [r[1], r[0]]) : t;
|
|
118
112
|
}
|
|
119
|
-
function
|
|
113
|
+
function Ii(e, t) {
|
|
114
|
+
if (!qe(e) || !qe(t)) return 0;
|
|
115
|
+
const a = He([e, t]);
|
|
116
|
+
if (a.length < 2 || Math.abs(a[0][0]) > 90 || Math.abs(a[1][0]) > 90) return 0;
|
|
117
|
+
const r = ba(a[0], a[1]);
|
|
118
|
+
return Number.isFinite(r) ? r : 0;
|
|
119
|
+
}
|
|
120
|
+
function ya(e) {
|
|
120
121
|
if (!Array.isArray(e) || e.length === 0) return 0;
|
|
121
122
|
if (Array.isArray(e[0]) && Array.isArray(e[0][0]))
|
|
122
|
-
return e.reduce((
|
|
123
|
-
|
|
124
|
-
let
|
|
125
|
-
for (let
|
|
126
|
-
const
|
|
127
|
-
|
|
123
|
+
return e.reduce((r, i) => r + ya(i), 0);
|
|
124
|
+
const t = He(e);
|
|
125
|
+
let a = 0;
|
|
126
|
+
for (let r = 1; r < t.length; r++) {
|
|
127
|
+
const i = ba(t[r - 1], t[r]);
|
|
128
|
+
Number.isFinite(i) && (a += i);
|
|
128
129
|
}
|
|
129
|
-
return
|
|
130
|
+
return a;
|
|
130
131
|
}
|
|
131
|
-
function
|
|
132
|
+
function Ce(e) {
|
|
132
133
|
if (!Array.isArray(e)) return 0;
|
|
133
|
-
const t =
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}
|
|
138
|
-
t.length > 3 && t[0][0] === t[t.length - 1][0] && t[0][1] === t[t.length - 1][1] && t.pop();
|
|
139
|
-
const a = t.length;
|
|
140
|
-
if (a < 3) return 0;
|
|
141
|
-
let r = 0;
|
|
142
|
-
for (let p = 0; p < a; p++)
|
|
143
|
-
r += t[p][0];
|
|
144
|
-
const i = r / a * Math.PI / 180, o = Math.cos(i), n = Math.PI / 180, s = t[0][0], c = t[0][1];
|
|
145
|
-
let l = 0;
|
|
146
|
-
for (let p = 0; p < a; p++) {
|
|
147
|
-
const u = t[p], f = t[(p + 1) % a], m = (u[1] - c) * n * ae * o, g = (u[0] - s) * n * ae, b = (f[1] - c) * n * ae * o, h = (f[0] - s) * n * ae;
|
|
148
|
-
l += m * h - b * g;
|
|
149
|
-
}
|
|
150
|
-
const d = Math.abs(l) / 2;
|
|
151
|
-
return Number.isFinite(d) ? d : 0;
|
|
134
|
+
const t = He(e);
|
|
135
|
+
if (t.length > 3 && t[0][0] === t[t.length - 1][0] && t[0][1] === t[t.length - 1][1] && t.pop(), t.length < 3) return 0;
|
|
136
|
+
const a = Ft([t]);
|
|
137
|
+
return Number.isFinite(a) ? a : 0;
|
|
152
138
|
}
|
|
153
|
-
function
|
|
139
|
+
function xa(e) {
|
|
154
140
|
if (!Array.isArray(e) || e.length === 0) return 0;
|
|
155
141
|
if (Array.isArray(e[0]) && typeof e[0][0] == "number")
|
|
156
|
-
return
|
|
142
|
+
return Ce(e);
|
|
157
143
|
if (Array.isArray(e[0]) && Array.isArray(e[0][0])) {
|
|
158
144
|
if (Array.isArray(e[0][0][0]))
|
|
159
|
-
return e.reduce((r, i) => r +
|
|
160
|
-
const t =
|
|
145
|
+
return e.reduce((r, i) => r + xa(i), 0);
|
|
146
|
+
const t = Ce(e[0]);
|
|
161
147
|
let a = 0;
|
|
162
148
|
for (let r = 1; r < e.length; r++)
|
|
163
|
-
a +=
|
|
149
|
+
a += Ce(e[r]);
|
|
164
150
|
return Math.max(0, t - a);
|
|
165
151
|
}
|
|
166
152
|
return 0;
|
|
167
153
|
}
|
|
168
|
-
function
|
|
154
|
+
function ki(e) {
|
|
169
155
|
if (!e || e.length === 0) return "";
|
|
170
156
|
const t = (i) => i.type || i.geometryType, a = e.filter((i) => {
|
|
171
157
|
const o = t(i);
|
|
@@ -173,7 +159,7 @@ function Sr(e) {
|
|
|
173
159
|
});
|
|
174
160
|
if (a.length > 0) {
|
|
175
161
|
const i = a.reduce(
|
|
176
|
-
(o, n) => o + (
|
|
162
|
+
(o, n) => o + (xa(n.coordinates) || 0),
|
|
177
163
|
0
|
|
178
164
|
);
|
|
179
165
|
return i >= 1e4 ? `${(i / 1e4).toLocaleString("pt-BR", {
|
|
@@ -187,7 +173,7 @@ function Sr(e) {
|
|
|
187
173
|
});
|
|
188
174
|
if (r.length > 0) {
|
|
189
175
|
const i = r.reduce(
|
|
190
|
-
(o, n) => o + (
|
|
176
|
+
(o, n) => o + (ya(n.coordinates) || 0),
|
|
191
177
|
0
|
|
192
178
|
);
|
|
193
179
|
return i >= 1e3 ? `${(i / 1e3).toLocaleString("pt-BR", {
|
|
@@ -197,23 +183,23 @@ function Sr(e) {
|
|
|
197
183
|
}
|
|
198
184
|
return "";
|
|
199
185
|
}
|
|
200
|
-
function
|
|
186
|
+
function S(e) {
|
|
201
187
|
return e == null ? "" : String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
202
188
|
}
|
|
203
|
-
const
|
|
204
|
-
function
|
|
189
|
+
const St = /^(#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})|(?:rgb|hsl)a?\(\s*[\w.%\s,/+-]+\)|[a-z]{3,30})$/i;
|
|
190
|
+
function Z(e, t = "#00E08A") {
|
|
205
191
|
if (!e || typeof e != "string") return t;
|
|
206
192
|
const a = e.trim();
|
|
207
|
-
return
|
|
193
|
+
return St.test(a) ? a : t;
|
|
208
194
|
}
|
|
209
|
-
function
|
|
195
|
+
function Fe(e) {
|
|
210
196
|
return Math.max(0, Math.min(255, Math.round(e))).toString(16).padStart(2, "0");
|
|
211
197
|
}
|
|
212
|
-
function
|
|
213
|
-
const r = t / 100, i = a / 100, o = (
|
|
198
|
+
function $t(e, t, a) {
|
|
199
|
+
const r = t / 100, i = a / 100, o = (l) => (l + e / 30) % 12, n = r * Math.min(i, 1 - i), s = (l) => i - n * Math.max(-1, Math.min(o(l) - 3, Math.min(9 - o(l), 1)));
|
|
214
200
|
return [s(0) * 255, s(8) * 255, s(4) * 255];
|
|
215
201
|
}
|
|
216
|
-
function
|
|
202
|
+
function Mt(e, t = "#000000") {
|
|
217
203
|
if (!e || typeof e != "string") return t;
|
|
218
204
|
const a = e.trim().toLowerCase(), r = /^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.exec(a);
|
|
219
205
|
if (r) {
|
|
@@ -224,19 +210,19 @@ function Za(e, t = "#000000") {
|
|
|
224
210
|
if (i) {
|
|
225
211
|
const o = i[2].split(/[\s,/]+/).filter(Boolean).map((n) => parseFloat(n));
|
|
226
212
|
if (o.length >= 3 && o.slice(0, 3).every((n) => !isNaN(n))) {
|
|
227
|
-
const [n, s,
|
|
228
|
-
return `#${
|
|
213
|
+
const [n, s, l] = o, [c, f, p] = i[1] === "rgb" ? [n, s, l] : $t(n, s, l);
|
|
214
|
+
return `#${Fe(c)}${Fe(f)}${Fe(p)}`;
|
|
229
215
|
}
|
|
230
216
|
}
|
|
231
217
|
return t;
|
|
232
218
|
}
|
|
233
|
-
function
|
|
219
|
+
function M(e, t, a) {
|
|
234
220
|
const r = e.querySelectorAll(`[${t}]`);
|
|
235
221
|
for (let i = 0; i < r.length; i++)
|
|
236
222
|
if (r[i].getAttribute(t) === a) return r[i];
|
|
237
223
|
return null;
|
|
238
224
|
}
|
|
239
|
-
function
|
|
225
|
+
function wa(e, t = 80) {
|
|
240
226
|
let a = null;
|
|
241
227
|
return (...r) => {
|
|
242
228
|
a && clearTimeout(a), a = setTimeout(() => {
|
|
@@ -244,10 +230,10 @@ function ta(e, t = 80) {
|
|
|
244
230
|
}, t);
|
|
245
231
|
};
|
|
246
232
|
}
|
|
247
|
-
function
|
|
233
|
+
function R(e, t) {
|
|
248
234
|
e.setAttribute("title", t), e.setAttribute("aria-label", t);
|
|
249
235
|
}
|
|
250
|
-
const
|
|
236
|
+
const Aa = [
|
|
251
237
|
{
|
|
252
238
|
id: "none",
|
|
253
239
|
nome: "Sem Mapa",
|
|
@@ -290,18 +276,18 @@ const ra = [
|
|
|
290
276
|
thumbnailUrl: "https://images.unsplash.com/photo-1518709268805-4e9042af9f23?w=160&auto=format&fit=crop&q=80"
|
|
291
277
|
}
|
|
292
278
|
];
|
|
293
|
-
function
|
|
279
|
+
function Ea(e, t) {
|
|
294
280
|
const a = Array.isArray(e) ? e.find((r) => r.id === t) : void 0;
|
|
295
281
|
return a && typeof a.nome == "string" ? a.nome : "";
|
|
296
282
|
}
|
|
297
|
-
function
|
|
283
|
+
function zt(e = Aa, t = "satelite", a = !1) {
|
|
298
284
|
if (!e || e.length === 0) return "";
|
|
299
285
|
const r = e.map((i) => {
|
|
300
|
-
const o = t === i.id, n =
|
|
301
|
-
let
|
|
302
|
-
return i.thumbnailUrl ?
|
|
303
|
-
<div class="ui-basemap-card ${o ? "active" : ""}" data-basemap-id="${n}" role="button" tabindex="0" aria-pressed="${o}" title="${
|
|
304
|
-
${
|
|
286
|
+
const o = t === i.id, n = S(i.id), s = S(i.nome), l = S(i.descricao || i.nome);
|
|
287
|
+
let c = "";
|
|
288
|
+
return i.thumbnailUrl ? c = `<img class="ui-basemap-preview" src="${S(i.thumbnailUrl)}" alt="" loading="lazy" referrerpolicy="no-referrer" data-basemap-thumb />` : c = `<div class="ui-basemap-preview-none">${A.gradeCad}</div>`, `
|
|
289
|
+
<div class="ui-basemap-card ${o ? "active" : ""}" data-basemap-id="${n}" role="button" tabindex="0" aria-pressed="${o}" title="${l}">
|
|
290
|
+
${c}
|
|
305
291
|
<span>${s}</span>
|
|
306
292
|
</div>
|
|
307
293
|
`;
|
|
@@ -310,8 +296,8 @@ function et(e = ra, t = "satelite", a = !1) {
|
|
|
310
296
|
<div class="ui-basemap-section ${a ? "recolhido" : ""}" part="mapas-base">
|
|
311
297
|
<button type="button" class="ui-basemap-toggle" data-basemap-toggle="alternar" aria-expanded="${!a}" aria-controls="ui-basemap-grid" title="${a ? "Mostrar mapas base" : "Recolher mapas base"}">
|
|
312
298
|
<span class="ui-basemap-title">Mapa Base</span>
|
|
313
|
-
<span class="ui-basemap-atual" data-basemap-atual>${
|
|
314
|
-
<span class="ui-chevron-icon ${a ? "" : "open"}">${
|
|
299
|
+
<span class="ui-basemap-atual" data-basemap-atual>${S(Ea(e, t))}</span>
|
|
300
|
+
<span class="ui-chevron-icon ${a ? "" : "open"}">${A.chevronDir}</span>
|
|
315
301
|
</button>
|
|
316
302
|
${a ? "" : `<div class="ui-basemap-grid" id="ui-basemap-grid">
|
|
317
303
|
${r}
|
|
@@ -319,50 +305,50 @@ function et(e = ra, t = "satelite", a = !1) {
|
|
|
319
305
|
</div>
|
|
320
306
|
`;
|
|
321
307
|
}
|
|
322
|
-
function
|
|
308
|
+
function te(e) {
|
|
323
309
|
if (!Array.isArray(e) || e.length === 0) return [];
|
|
324
|
-
const t = e.filter((
|
|
325
|
-
t.forEach((
|
|
326
|
-
a.set(
|
|
310
|
+
const t = e.filter((c) => !!(c && typeof c == "object" && c.id)), a = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
|
|
311
|
+
t.forEach((c, f) => {
|
|
312
|
+
a.set(c.id, c), r.set(c.id, f);
|
|
327
313
|
});
|
|
328
314
|
const i = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set();
|
|
329
|
-
for (const
|
|
330
|
-
if (o.has(
|
|
331
|
-
const
|
|
332
|
-
let
|
|
333
|
-
for (;
|
|
334
|
-
if (p.has(
|
|
335
|
-
const
|
|
336
|
-
let
|
|
337
|
-
for (const
|
|
338
|
-
(r.get(
|
|
339
|
-
i.add(
|
|
315
|
+
for (const c of t) {
|
|
316
|
+
if (o.has(c.id)) continue;
|
|
317
|
+
const f = [], p = /* @__PURE__ */ new Map();
|
|
318
|
+
let d = c;
|
|
319
|
+
for (; d && d.parentId && a.has(d.parentId) && d.parentId !== d.id; ) {
|
|
320
|
+
if (p.has(d.id)) {
|
|
321
|
+
const u = p.get(d.id), h = f.slice(u);
|
|
322
|
+
let m = h[0];
|
|
323
|
+
for (const g of h)
|
|
324
|
+
(r.get(g) ?? 1 / 0) < (r.get(m) ?? 1 / 0) && (m = g);
|
|
325
|
+
i.add(m);
|
|
340
326
|
break;
|
|
341
327
|
}
|
|
342
|
-
if (o.has(
|
|
343
|
-
p.set(
|
|
328
|
+
if (o.has(d.id)) break;
|
|
329
|
+
p.set(d.id, f.length), f.push(d.id), d = a.get(d.parentId);
|
|
344
330
|
}
|
|
345
|
-
for (const
|
|
331
|
+
for (const u of f) o.add(u);
|
|
346
332
|
}
|
|
347
333
|
const n = /* @__PURE__ */ new Map(), s = [];
|
|
348
|
-
t.forEach((
|
|
349
|
-
!i.has(
|
|
334
|
+
t.forEach((c) => {
|
|
335
|
+
!i.has(c.id) && !!(c.parentId && a.has(c.parentId) && c.parentId !== c.id) && c.parentId ? (n.has(c.parentId) || n.set(c.parentId, []), n.get(c.parentId).push(c)) : s.push(c);
|
|
350
336
|
});
|
|
351
|
-
function c
|
|
352
|
-
const
|
|
353
|
-
|
|
354
|
-
const
|
|
355
|
-
(
|
|
337
|
+
function l(c, f, p) {
|
|
338
|
+
const d = new Set(p);
|
|
339
|
+
d.add(c.id);
|
|
340
|
+
const h = (n.get(c.id) || (Array.isArray(c.children) ? c.children : [])).filter(
|
|
341
|
+
(m) => !!(m && typeof m == "object" && m.id && !d.has(m.id))
|
|
356
342
|
);
|
|
357
343
|
return {
|
|
358
|
-
camada:
|
|
359
|
-
depth:
|
|
360
|
-
subcamadas:
|
|
344
|
+
camada: c,
|
|
345
|
+
depth: f,
|
|
346
|
+
subcamadas: h.map((m) => l(m, f + 1, d))
|
|
361
347
|
};
|
|
362
348
|
}
|
|
363
|
-
return s.map((
|
|
349
|
+
return s.map((c) => l(c, 0, /* @__PURE__ */ new Set()));
|
|
364
350
|
}
|
|
365
|
-
function
|
|
351
|
+
function Ve(e, t) {
|
|
366
352
|
const a = /* @__PURE__ */ new Set();
|
|
367
353
|
if (!t || !Array.isArray(e)) return a;
|
|
368
354
|
const r = /* @__PURE__ */ new Map();
|
|
@@ -380,12 +366,12 @@ function Be(e, t) {
|
|
|
380
366
|
}
|
|
381
367
|
return a;
|
|
382
368
|
}
|
|
383
|
-
function
|
|
369
|
+
function Pt(e, t, a) {
|
|
384
370
|
if (!a || !Array.isArray(t) || t.length === 0) return [];
|
|
385
|
-
const r =
|
|
371
|
+
const r = Ve(e, a);
|
|
386
372
|
return t.filter((i) => !!(i && i.layerId && r.has(i.layerId)));
|
|
387
373
|
}
|
|
388
|
-
function
|
|
374
|
+
function le(e) {
|
|
389
375
|
const t = /* @__PURE__ */ new Map();
|
|
390
376
|
e.forEach((r) => r && r.id && t.set(r.id, r));
|
|
391
377
|
const a = /* @__PURE__ */ new Map();
|
|
@@ -399,8 +385,8 @@ function he(e) {
|
|
|
399
385
|
}
|
|
400
386
|
return a;
|
|
401
387
|
}
|
|
402
|
-
function
|
|
403
|
-
const t =
|
|
388
|
+
function we(e) {
|
|
389
|
+
const t = le(e);
|
|
404
390
|
return new Set(
|
|
405
391
|
e.filter((a) => {
|
|
406
392
|
var r;
|
|
@@ -408,24 +394,24 @@ function fe(e) {
|
|
|
408
394
|
}).map((a) => a.id)
|
|
409
395
|
);
|
|
410
396
|
}
|
|
411
|
-
function
|
|
412
|
-
const t =
|
|
413
|
-
const o = i.camada, n = i.depth, s = i.subcamadas,
|
|
414
|
-
return
|
|
397
|
+
function Ia(e) {
|
|
398
|
+
const t = te(e), a = we(e), r = (i) => {
|
|
399
|
+
const o = i.camada, n = i.depth, s = i.subcamadas, l = n > 0 ? " ".repeat(n) + "↳ " : s.length > 0 || o.isGroup ? "📁 " : "", c = a.has(o.id), f = `<option value="${S(o.id)}"${c ? " disabled" : ""}>${l}${S(o.name)}${c ? " 🔒" : ""}</option>`, p = s.map((d) => r(d)).join("");
|
|
400
|
+
return f + p;
|
|
415
401
|
};
|
|
416
402
|
return t.map((i) => r(i)).join("");
|
|
417
403
|
}
|
|
418
|
-
function
|
|
404
|
+
function ka(e, t) {
|
|
419
405
|
return t > 0 ? {
|
|
420
|
-
icone:
|
|
406
|
+
icone: A.alvoEnquadrar,
|
|
421
407
|
texto: `${t} ${t > 1 ? "selecionados" : "selecionado"}`
|
|
422
408
|
} : {
|
|
423
|
-
icone:
|
|
409
|
+
icone: A.camadas,
|
|
424
410
|
texto: `${e} ${e > 1 ? "camadas" : "camada"}`
|
|
425
411
|
};
|
|
426
412
|
}
|
|
427
|
-
function
|
|
428
|
-
const r = t.filter((
|
|
413
|
+
function qt(e, t, a) {
|
|
414
|
+
const r = t.filter((l) => a.has(l.id)), i = r.length > 0, o = i ? r.length : e.length, n = ka(e.length, r.length), s = Ia(e);
|
|
429
415
|
return `
|
|
430
416
|
<div class="ui-tree-footer ${i ? "tem-selecao" : "sem-selecao"}" part="rodape">
|
|
431
417
|
<div class="ui-footer-left">
|
|
@@ -436,11 +422,11 @@ function tt(e, t, a) {
|
|
|
436
422
|
<!-- Criação de camadas/grupos quando não há nada selecionado -->
|
|
437
423
|
<div class="ui-footer-actions-gerais" style="display: ${i ? "none" : "flex"};">
|
|
438
424
|
<button type="button" class="ui-footer-chip-btn" id="btn-footer-new-group" title="Criar Nova Pasta/Grupo de Camadas" aria-label="Criar Grupo de Camadas">
|
|
439
|
-
${
|
|
425
|
+
${A.moverPasta}
|
|
440
426
|
<span>Grupo</span>
|
|
441
427
|
</button>
|
|
442
428
|
<button type="button" class="ui-footer-chip-btn primario" id="btn-footer-new-layer" title="Criar Nova Camada Vetorial" aria-label="Criar Nova Camada">
|
|
443
|
-
${
|
|
429
|
+
${A.mais}
|
|
444
430
|
<span>Camada</span>
|
|
445
431
|
</button>
|
|
446
432
|
</div>
|
|
@@ -455,120 +441,131 @@ function tt(e, t, a) {
|
|
|
455
441
|
</div>
|
|
456
442
|
|
|
457
443
|
<button type="button" class="ui-footer-btn btn-danger-footer ${i ? "" : "disabled"}" id="btn-footer-del" title="Excluir selecionados" aria-label="Excluir selecionados" ${i ? "" : "disabled"}>
|
|
458
|
-
${
|
|
444
|
+
${A.lixeira}
|
|
459
445
|
</button>
|
|
460
446
|
</div>
|
|
461
447
|
</div>
|
|
462
448
|
`;
|
|
463
449
|
}
|
|
464
|
-
const
|
|
465
|
-
function
|
|
450
|
+
const Se = 64;
|
|
451
|
+
function ea(e) {
|
|
466
452
|
return Array.isArray(e) && e.length >= 2 && Number.isFinite(e[0]) && Number.isFinite(e[1]);
|
|
467
453
|
}
|
|
468
|
-
function
|
|
469
|
-
return !Array.isArray(e) || e.length === 0 ? [] :
|
|
454
|
+
function La(e) {
|
|
455
|
+
return !Array.isArray(e) || e.length === 0 ? [] : ea(e[0]) ? [e.filter(ea)] : e.flatMap(La);
|
|
470
456
|
}
|
|
471
|
-
function
|
|
472
|
-
if (e.length <=
|
|
473
|
-
const t = e.length /
|
|
474
|
-
for (let r = 0; r <
|
|
457
|
+
function aa(e) {
|
|
458
|
+
if (e.length <= Se) return e;
|
|
459
|
+
const t = e.length / Se, a = [];
|
|
460
|
+
for (let r = 0; r < Se; r++) a.push(e[Math.floor(r * t)]);
|
|
475
461
|
return a.push(e[e.length - 1]), a;
|
|
476
462
|
}
|
|
477
|
-
function
|
|
478
|
-
const r =
|
|
463
|
+
function Bt(e, t, a) {
|
|
464
|
+
const r = La(t).filter((F) => F.length > 0);
|
|
479
465
|
if (r.length === 0) return "";
|
|
480
466
|
let i = 1 / 0, o = -1 / 0, n = 1 / 0, s = -1 / 0;
|
|
481
|
-
for (const
|
|
482
|
-
for (const [
|
|
483
|
-
|
|
484
|
-
const
|
|
485
|
-
if (
|
|
486
|
-
const
|
|
487
|
-
return
|
|
488
|
-
`<path d="${
|
|
467
|
+
for (const F of r)
|
|
468
|
+
for (const [I, P] of F)
|
|
469
|
+
P < i && (i = P), P > o && (o = P), -I < n && (n = -I), -I > s && (s = -I);
|
|
470
|
+
const l = 16, c = 2, f = l - c * 2, p = o - i, d = s - n, u = Math.max(p, d), h = u > 0 ? f / u : 0, m = c + (f - p * h) / 2, g = c + (f - d * h) / 2, y = (F) => Math.round(F * 100) / 100, v = ([F, I]) => `${y(m + (I - i) * h)},${y(g + (-F - n) * h)}`, b = e === "polygon" || e === "multipolygon", w = e === "linestring" || e === "multilinestring", x = (F) => `<svg viewBox="0 0 ${l} ${l}" width="100%" height="100%" aria-hidden="true">${F}</svg>`;
|
|
471
|
+
if (b) {
|
|
472
|
+
const F = r.filter((I) => I.length >= 3).map((I) => `M${aa(I).map(v).join("L")}Z`).join("");
|
|
473
|
+
return F ? x(
|
|
474
|
+
`<path d="${F}" fill="${a}" fill-opacity="0.45" fill-rule="evenodd" stroke="${a}" stroke-width="1.2" stroke-linejoin="round"/>`
|
|
489
475
|
) : "";
|
|
490
476
|
}
|
|
491
|
-
if (
|
|
492
|
-
const
|
|
493
|
-
return
|
|
494
|
-
`<path d="${
|
|
477
|
+
if (w) {
|
|
478
|
+
const F = r.filter((I) => I.length >= 2).map((I) => `M${aa(I).map(v).join("L")}`).join("");
|
|
479
|
+
return F ? x(
|
|
480
|
+
`<path d="${F}" fill="none" stroke="${a}" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>`
|
|
495
481
|
) : "";
|
|
496
482
|
}
|
|
497
483
|
return "";
|
|
498
484
|
}
|
|
499
|
-
function
|
|
500
|
-
const r =
|
|
485
|
+
function Ca(e, t, a) {
|
|
486
|
+
const r = Z(t, "#00E08A"), i = (e || "").toLowerCase(), o = a !== void 0 ? Bt(i, a, r) : "";
|
|
501
487
|
return o || (i === "polygon" || i === "multipolygon" ? `<svg viewBox="0 0 16 16" width="11" height="11"><polygon points="2,14 14,14 12,2 4,4" fill="${r}" fill-opacity="0.45" stroke="${r}" stroke-width="1.5"/></svg>` : i === "linestring" || i === "multilinestring" ? `<svg viewBox="0 0 16 16" width="11" height="11"><polyline points="2,13 8,3 14,10" fill="none" stroke="${r}" stroke-width="2"/></svg>` : i === "text" ? `<svg viewBox="0 0 16 16" width="11" height="11"><text x="8" y="12" font-size="12" font-weight="bold" fill="${r}" text-anchor="middle" font-family="sans-serif">T</text></svg>` : `<svg viewBox="0 0 16 16" width="11" height="11"><circle cx="8" cy="8" r="4.2" fill="${r}" stroke="#ffffff" stroke-width="1.2"/></svg>`);
|
|
502
488
|
}
|
|
503
|
-
function
|
|
489
|
+
function Be(e, t, a) {
|
|
504
490
|
return {
|
|
505
|
-
camadaIdSeguro:
|
|
506
|
-
corCamada:
|
|
491
|
+
camadaIdSeguro: S(e.id),
|
|
492
|
+
corCamada: Z(e.color, "#00E08A"),
|
|
507
493
|
profundidade: t,
|
|
508
494
|
esmaecida: e.visible === !1 || (a == null ? void 0 : a.ocultaPorAncestral) === !0,
|
|
509
495
|
travadaPelaCamada: e.locked === !0 || (a == null ? void 0 : a.travadaPorAncestral) === !0
|
|
510
496
|
};
|
|
511
497
|
}
|
|
512
|
-
const
|
|
513
|
-
function
|
|
514
|
-
return a === 0 ?
|
|
498
|
+
const $e = (e, t, a) => `${e} ${e === 1 ? t : a}`;
|
|
499
|
+
function Fa(e, t, a) {
|
|
500
|
+
return a === 0 ? $e(e, "feição", "feições") : `${$e(e, "feição", "feições")} no grupo (${t} nesta camada) · ${$e(a, "subcamada", "subcamadas")}`;
|
|
515
501
|
}
|
|
516
|
-
function
|
|
517
|
-
return e === 0 && r ? "" : `<span class="ui-count-chip" title="${
|
|
502
|
+
function Sa(e, t, a, r) {
|
|
503
|
+
return e === 0 && r ? "" : `<span class="ui-count-chip" title="${Fa(e, t, a)}">${e}</span>`;
|
|
518
504
|
}
|
|
519
|
-
function
|
|
505
|
+
function $a(e, t) {
|
|
520
506
|
const a = t - e;
|
|
521
507
|
return {
|
|
522
508
|
resumo: `Exibindo ${e} de ${t} feições. Use a busca acima para filtrar.`,
|
|
523
509
|
botao: `Mostrar mais (+${Math.min(80, a)})`
|
|
524
510
|
};
|
|
525
511
|
}
|
|
526
|
-
function
|
|
527
|
-
const r =
|
|
512
|
+
function Ma(e, t, a) {
|
|
513
|
+
const r = $a(t, a);
|
|
528
514
|
return `<div class="ui-truncate-notice" role="note">
|
|
529
515
|
<span>${r.resumo}</span>
|
|
530
516
|
<button type="button" class="ui-truncate-more-btn" data-layer-show-more="${e}">${r.botao}</button>
|
|
531
517
|
</div>`;
|
|
532
518
|
}
|
|
533
|
-
function
|
|
519
|
+
function za(e) {
|
|
534
520
|
return `<div class="ui-empty-row"><span>${e ? "Grupo vazio (adicione subcamadas ou feições)" : "Camada vazia"}</span></div>`;
|
|
535
521
|
}
|
|
536
|
-
const
|
|
537
|
-
function
|
|
538
|
-
|
|
522
|
+
const ta = ["name", "color", "visible", "locked", "status", "type", "geometryType", "coordinates", "layerId"];
|
|
523
|
+
function Dt(e, t) {
|
|
524
|
+
for (let a = 0; a < ta.length; a++) {
|
|
525
|
+
const r = ta[a];
|
|
526
|
+
if (e[r] !== t[r]) return !1;
|
|
527
|
+
}
|
|
528
|
+
return !0;
|
|
529
|
+
}
|
|
530
|
+
function Pa(e) {
|
|
531
|
+
return e ? ` aria-posinset="${e.posicao}" aria-setsize="${e.total}"` : "";
|
|
539
532
|
}
|
|
540
|
-
function
|
|
541
|
-
const
|
|
533
|
+
function ra(e, t, a) {
|
|
534
|
+
const r = Number.isFinite(a) && a > 0 ? Math.round(a) : 0;
|
|
535
|
+
return `<div class="ui-virtual-espaco" data-virtual-espaco="${e}:${t}" aria-hidden="true" style="height: ${r}px;"></div>`;
|
|
536
|
+
}
|
|
537
|
+
function De(e, t, a, r, i) {
|
|
538
|
+
const { camadaIdSeguro: o, corCamada: n, profundidade: s } = t, l = S(e.id), c = S(e.name || "Feição"), f = Z(e.color, n), p = e.visible !== !1, d = t.travadaPelaCamada, u = e.locked === !0 || d, h = d ? "Bloqueada pela camada" : u ? "Desbloquear Feição" : "Bloquear Feição", m = e.status === "previa" ? '<span class="ui-previa-dot" title="Geometria prévia" aria-label="Geometria prévia"></span>' : "";
|
|
542
539
|
return `
|
|
543
|
-
<div class="ui-feat-row ${a ? "selected-row" : ""} ${
|
|
544
|
-
<div class="ui-col ui-col-eye" data-feat-eye="${
|
|
545
|
-
${
|
|
540
|
+
<div class="ui-feat-row ${a ? "selected-row" : ""} ${p ? "" : "hidden-row"} ${t.esmaecida ? "herdado-oculto" : ""}" data-feat-row="${l}" data-feat-select="${l}" data-feat-layer="${o}" role="treeitem" aria-level="${s + 2}" aria-selected="${a}" tabindex="-1" draggable="true" part="${a ? "feicao feicao-selecionada" : "feicao"}" style="--layer-depth: ${s + 1};" title="Clique para selecionar | Arraste para reordenar"${Pa(i)}>
|
|
541
|
+
<div class="ui-col ui-col-eye" data-feat-eye="${l}" role="button" tabindex="0" aria-label="${p ? "Ocultar Feição" : "Exibir Feição"}" title="${p ? "Ocultar Feição" : "Exibir Feição"}">
|
|
542
|
+
${p ? A.olhoAberto : A.olhoFechado}
|
|
546
543
|
</div>
|
|
547
544
|
|
|
548
|
-
<div class="ui-col ui-col-lock ${u ? "" : "ui-lock-open"}" data-feat-lock="${
|
|
549
|
-
${u ?
|
|
545
|
+
<div class="ui-col ui-col-lock ${u ? "" : "ui-lock-open"}" data-feat-lock="${l}" ${d ? 'data-locked-by-layer="true"' : ""} role="button" tabindex="0" aria-label="${h}" title="${h}">
|
|
546
|
+
${u ? A.cadeadoTrancado : A.cadeadoAberto}
|
|
550
547
|
</div>
|
|
551
548
|
|
|
552
|
-
<div class="ui-col ui-col-colorbar" style="background: ${
|
|
549
|
+
<div class="ui-col ui-col-colorbar" style="background: ${n};"></div>
|
|
553
550
|
<div class="ui-col ui-col-thumb">
|
|
554
|
-
<div class="ui-thumb-box">${
|
|
551
|
+
<div class="ui-thumb-box">${Ca(e.type || e.geometryType, f, e.coordinates)}</div>
|
|
555
552
|
</div>
|
|
556
553
|
|
|
557
|
-
<div class="ui-col ui-col-name" data-feat-name-trigger="${
|
|
558
|
-
${r ? `<input type="text" class="ui-inline-rename-input" data-inline-feat-input="${
|
|
554
|
+
<div class="ui-col ui-col-name" data-feat-name-trigger="${l}" title="Duplo clique para renomear">
|
|
555
|
+
${r ? `<input type="text" class="ui-inline-rename-input" data-inline-feat-input="${l}" value="${c}" />` : `<span class="ui-name-text">${c}</span>${m}`}
|
|
559
556
|
</div>
|
|
560
557
|
|
|
561
558
|
<div class="ui-col ui-col-actions">
|
|
562
|
-
<button type="button" class="ui-micro-btn" data-feat-fit="${
|
|
559
|
+
<button type="button" class="ui-micro-btn" data-feat-fit="${l}" title="Enquadrar no mapa" aria-label="Enquadrar feição no mapa">${A.alvoEnquadrar}</button>
|
|
563
560
|
</div>
|
|
564
561
|
|
|
565
|
-
<div class="ui-col ui-col-target" data-feat-target="${
|
|
562
|
+
<div class="ui-col ui-col-target" data-feat-target="${l}" role="button" tabindex="0" aria-label="Selecionar feição" title="Selecionar feição">
|
|
566
563
|
<div class="ui-target-circle ${a ? "selected" : ""}"></div>
|
|
567
564
|
</div>
|
|
568
565
|
</div>
|
|
569
566
|
`;
|
|
570
567
|
}
|
|
571
|
-
function
|
|
568
|
+
function T(e, t, a) {
|
|
572
569
|
const r = /* @__PURE__ */ new Set();
|
|
573
570
|
let i = e.find((o) => o.id === t);
|
|
574
571
|
for (; i && i.parentId; ) {
|
|
@@ -577,46 +574,46 @@ function N(e, t, a) {
|
|
|
577
574
|
}
|
|
578
575
|
return !1;
|
|
579
576
|
}
|
|
580
|
-
function
|
|
577
|
+
function Me(e) {
|
|
581
578
|
return Number.isFinite(e) ? e < 0.25 ? "acima" : e > 0.75 ? "abaixo" : "dentro" : "dentro";
|
|
582
579
|
}
|
|
583
|
-
function
|
|
580
|
+
function ia(e, t, a, r) {
|
|
584
581
|
if (!t || !a || t === a) return null;
|
|
585
|
-
const i = e.find((
|
|
582
|
+
const i = e.find((c) => c.id === t), o = e.find((c) => c.id === a);
|
|
586
583
|
if (!i || !o) return null;
|
|
587
584
|
const n = i.parentId !== void 0 ? i.parentId : null;
|
|
588
585
|
if (r === "dentro")
|
|
589
|
-
return
|
|
590
|
-
if (
|
|
591
|
-
const s = e.findIndex((
|
|
586
|
+
return T(e, o.id, i.id) ? null : (i.parentId = o.id, { tipo: "hierarquia", camada: i, novoParentId: o.id, parentAnteriorId: n });
|
|
587
|
+
if (T(e, o.id, i.id)) return null;
|
|
588
|
+
const s = e.findIndex((c) => c.id === t);
|
|
592
589
|
e.splice(s, 1);
|
|
593
|
-
const
|
|
594
|
-
return
|
|
590
|
+
const l = e.findIndex((c) => c.id === a);
|
|
591
|
+
return l === -1 ? e.push(i) : e.splice(r === "acima" ? l : l + 1, 0, i), i.parentId = o.parentId ?? null, { tipo: "ordem", camada: i, parentAnteriorId: n, novoParentId: i.parentId };
|
|
595
592
|
}
|
|
596
|
-
function
|
|
593
|
+
function Rt(e, t, a, r) {
|
|
597
594
|
const i = e.find((s) => s.id === a), o = t.find((s) => s.id === r);
|
|
598
595
|
if (!i || !o || i.layerId === r) return null;
|
|
599
596
|
const n = i.layerId;
|
|
600
597
|
return i.layerId = r, { feicao: i, camadaOrigemId: n, camadaDestinoId: r, mudouDeCamada: !0 };
|
|
601
598
|
}
|
|
602
|
-
function
|
|
599
|
+
function Tt(e, t, a, r) {
|
|
603
600
|
if (!t || !a || t === a) return null;
|
|
604
601
|
const i = e.findIndex((p) => p.id === t);
|
|
605
602
|
if (i === -1) return null;
|
|
606
603
|
const o = e.find((p) => p.id === a);
|
|
607
604
|
if (!o) return null;
|
|
608
|
-
const [n] = e.splice(i, 1), s = n.layerId,
|
|
609
|
-
|
|
610
|
-
const
|
|
611
|
-
return
|
|
605
|
+
const [n] = e.splice(i, 1), s = n.layerId, l = o.layerId, c = s !== l;
|
|
606
|
+
c && (n.layerId = l);
|
|
607
|
+
const f = e.findIndex((p) => p.id === a);
|
|
608
|
+
return f === -1 ? e.push(n) : e.splice(r ? f : f + 1, 0, n), { feicao: n, camadaOrigemId: s, camadaDestinoId: l, mudouDeCamada: c };
|
|
612
609
|
}
|
|
613
|
-
function
|
|
610
|
+
function O(e) {
|
|
614
611
|
return `L:${e}`;
|
|
615
612
|
}
|
|
616
|
-
function
|
|
613
|
+
function B(e) {
|
|
617
614
|
return `F:${e}`;
|
|
618
615
|
}
|
|
619
|
-
function
|
|
616
|
+
function qa(e, t, a) {
|
|
620
617
|
if (!a || a.length === 0)
|
|
621
618
|
return [
|
|
622
619
|
...e.map((s) => ({ tipo: "layer", nodo: s })),
|
|
@@ -626,53 +623,53 @@ function ma(e, t, a) {
|
|
|
626
623
|
for (const s of a)
|
|
627
624
|
if (!o.has(s)) {
|
|
628
625
|
if (s.startsWith("L:")) {
|
|
629
|
-
const
|
|
630
|
-
|
|
626
|
+
const l = s.slice(2), c = r.get(l);
|
|
627
|
+
c && (o.add(s), n.push({ tipo: "layer", nodo: c }));
|
|
631
628
|
} else if (s.startsWith("F:")) {
|
|
632
|
-
const
|
|
633
|
-
|
|
629
|
+
const l = s.slice(2), c = i.get(l);
|
|
630
|
+
c && (o.add(s), n.push({ tipo: "feature", feicao: c }));
|
|
634
631
|
}
|
|
635
632
|
}
|
|
636
633
|
for (const s of e) {
|
|
637
|
-
const
|
|
638
|
-
o.has(
|
|
634
|
+
const l = O(s.camada.id);
|
|
635
|
+
o.has(l) || (o.add(l), n.push({ tipo: "layer", nodo: s }));
|
|
639
636
|
}
|
|
640
637
|
for (const s of t) {
|
|
641
|
-
const
|
|
642
|
-
o.has(
|
|
638
|
+
const l = B(s.id);
|
|
639
|
+
o.has(l) || (o.add(l), n.push({ tipo: "feature", feicao: s }));
|
|
643
640
|
}
|
|
644
641
|
return n;
|
|
645
642
|
}
|
|
646
|
-
function
|
|
647
|
-
const i = a.filter((
|
|
648
|
-
...i.map(
|
|
649
|
-
...o.map(
|
|
650
|
-
]), s = e.get(t),
|
|
643
|
+
function Ee(e, t, a, r) {
|
|
644
|
+
const i = a.filter((f) => f.parentId === t).map((f) => f.id), o = r.filter((f) => f.layerId === t).map((f) => f.id), n = /* @__PURE__ */ new Set([
|
|
645
|
+
...i.map(O),
|
|
646
|
+
...o.map(B)
|
|
647
|
+
]), s = e.get(t), l = [], c = /* @__PURE__ */ new Set();
|
|
651
648
|
if (s)
|
|
652
|
-
for (const
|
|
653
|
-
n.has(
|
|
654
|
-
for (const
|
|
655
|
-
const p =
|
|
656
|
-
|
|
649
|
+
for (const f of s)
|
|
650
|
+
n.has(f) && !c.has(f) && (c.add(f), l.push(f));
|
|
651
|
+
for (const f of i) {
|
|
652
|
+
const p = O(f);
|
|
653
|
+
c.has(p) || (c.add(p), l.push(p));
|
|
657
654
|
}
|
|
658
|
-
for (const
|
|
659
|
-
const p =
|
|
660
|
-
|
|
655
|
+
for (const f of o) {
|
|
656
|
+
const p = B(f);
|
|
657
|
+
c.has(p) || (c.add(p), l.push(p));
|
|
661
658
|
}
|
|
662
|
-
return
|
|
659
|
+
return l;
|
|
663
660
|
}
|
|
664
|
-
function
|
|
661
|
+
function Ie(e, t, a, r) {
|
|
665
662
|
const i = e.filter((n) => n !== t), o = i.indexOf(a);
|
|
666
663
|
o === -1 ? i.push(t) : i.splice(r ? o : o + 1, 0, t), e.length = 0, e.push(...i);
|
|
667
664
|
}
|
|
668
|
-
function
|
|
665
|
+
function N(e, t, a) {
|
|
669
666
|
if (!t) return;
|
|
670
667
|
const r = e.get(t);
|
|
671
668
|
if (!r) return;
|
|
672
669
|
const i = r.filter((o) => o !== a);
|
|
673
670
|
i.length === 0 ? e.delete(t) : e.set(t, i);
|
|
674
671
|
}
|
|
675
|
-
function
|
|
672
|
+
function Ot(e, t) {
|
|
676
673
|
const a = t.filter((n) => n.startsWith("L:")).map((n) => n.slice(2));
|
|
677
674
|
if (a.length < 2) return;
|
|
678
675
|
const r = new Set(a), i = [], o = /* @__PURE__ */ new Map();
|
|
@@ -684,7 +681,7 @@ function lt(e, t) {
|
|
|
684
681
|
s && (e[i[n]] = s);
|
|
685
682
|
}
|
|
686
683
|
}
|
|
687
|
-
function
|
|
684
|
+
function jt(e, t) {
|
|
688
685
|
const a = t.filter((n) => n.startsWith("F:")).map((n) => n.slice(2));
|
|
689
686
|
if (a.length < 2) return;
|
|
690
687
|
const r = new Set(a), i = [], o = /* @__PURE__ */ new Map();
|
|
@@ -696,168 +693,316 @@ function ct(e, t) {
|
|
|
696
693
|
s && (e[i[n]] = s);
|
|
697
694
|
}
|
|
698
695
|
}
|
|
699
|
-
function
|
|
696
|
+
function oa(e, t, a, r, i, o) {
|
|
700
697
|
if (!r || !i) return null;
|
|
701
698
|
const n = e.find((p) => p.id === r), s = t.find((p) => p.id === i);
|
|
702
699
|
if (!n || !s || !s.layerId) return null;
|
|
703
|
-
const
|
|
704
|
-
if (
|
|
705
|
-
const
|
|
706
|
-
|
|
707
|
-
const
|
|
708
|
-
return
|
|
709
|
-
tipo:
|
|
700
|
+
const l = s.layerId;
|
|
701
|
+
if (l === r || T(e, l, r)) return null;
|
|
702
|
+
const c = n.parentId !== void 0 ? n.parentId : null;
|
|
703
|
+
c && c !== l && N(a, c, O(r)), n.parentId = l;
|
|
704
|
+
const f = Ee(a, l, e, t);
|
|
705
|
+
return Ie(f, O(r), B(i), o), a.set(l, f), Ot(e, f), {
|
|
706
|
+
tipo: c !== l ? "hierarquia" : "ordem",
|
|
710
707
|
camada: n,
|
|
711
|
-
parentAnteriorId:
|
|
712
|
-
novoParentId:
|
|
708
|
+
parentAnteriorId: c,
|
|
709
|
+
novoParentId: l
|
|
713
710
|
};
|
|
714
711
|
}
|
|
715
|
-
function
|
|
712
|
+
function Nt(e, t, a, r, i, o) {
|
|
716
713
|
if (!r || !i) return null;
|
|
717
|
-
const n = t.find((
|
|
714
|
+
const n = t.find((d) => d.id === r), s = e.find((d) => d.id === i);
|
|
718
715
|
if (!n || !s || !s.parentId) return null;
|
|
719
|
-
const
|
|
720
|
-
|
|
721
|
-
const p =
|
|
722
|
-
return
|
|
716
|
+
const l = s.parentId, c = n.layerId, f = c !== l;
|
|
717
|
+
f && (N(a, c, B(r)), n.layerId = l);
|
|
718
|
+
const p = Ee(a, l, e, t);
|
|
719
|
+
return Ie(p, B(r), O(i), o), a.set(l, p), jt(t, p), { feicao: n, camadaOrigemId: c, camadaDestinoId: l, mudouDeCamada: f };
|
|
723
720
|
}
|
|
724
|
-
function
|
|
725
|
-
const
|
|
726
|
-
if (n && (n !== s || o === "dentro") &&
|
|
727
|
-
const
|
|
728
|
-
|
|
721
|
+
function na(e, t, a, r, i, o, n, s) {
|
|
722
|
+
const l = O(r);
|
|
723
|
+
if (n && (n !== s || o === "dentro") && N(a, n, l), o !== "dentro" && s && a.has(s)) {
|
|
724
|
+
const c = Ee(a, s, e, t);
|
|
725
|
+
Ie(c, l, O(i), o === "acima"), a.set(s, c);
|
|
729
726
|
}
|
|
730
727
|
}
|
|
731
|
-
function
|
|
732
|
-
const
|
|
733
|
-
if (n && n !== s &&
|
|
734
|
-
const
|
|
735
|
-
|
|
728
|
+
function Ht(e, t, a, r, i, o, n, s) {
|
|
729
|
+
const l = B(r);
|
|
730
|
+
if (n && n !== s && N(a, n, l), s && a.has(s)) {
|
|
731
|
+
const c = Ee(a, s, e, t);
|
|
732
|
+
Ie(c, l, B(i), o), a.set(s, c);
|
|
736
733
|
}
|
|
737
734
|
}
|
|
738
|
-
function
|
|
739
|
-
const i =
|
|
740
|
-
if (
|
|
735
|
+
function Ba(e, t, a, r) {
|
|
736
|
+
const i = B(t);
|
|
737
|
+
if (N(e, a, i), r && e.has(r)) {
|
|
741
738
|
const o = e.get(r);
|
|
742
739
|
o.includes(i) || o.push(i);
|
|
743
740
|
}
|
|
744
741
|
}
|
|
745
|
-
const
|
|
746
|
-
function
|
|
742
|
+
const _e = 80;
|
|
743
|
+
function Re(e, t) {
|
|
747
744
|
const a = (t || "").trim().toLowerCase();
|
|
748
745
|
return a ? e.filter(
|
|
749
746
|
(r) => (r.name || "").toLowerCase().includes(a) || (r.category || "").toLowerCase().includes(a) || (r.type || "").toLowerCase().includes(a)
|
|
750
747
|
) : e;
|
|
751
748
|
}
|
|
752
|
-
function
|
|
753
|
-
var
|
|
749
|
+
function ke(e, t, a) {
|
|
750
|
+
var d, u;
|
|
754
751
|
const r = (a || "").trim().toLowerCase();
|
|
755
752
|
if (!r) return null;
|
|
756
753
|
const i = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
|
|
757
|
-
for (const
|
|
758
|
-
i.set(
|
|
754
|
+
for (const h of e)
|
|
755
|
+
i.set(h.id, h), h.parentId && h.parentId !== h.id && (o.has(h.parentId) || o.set(h.parentId, []), o.get(h.parentId).push(h.id));
|
|
759
756
|
const n = /* @__PURE__ */ new Map();
|
|
760
|
-
for (const
|
|
761
|
-
const
|
|
762
|
-
n.has(
|
|
763
|
-
}
|
|
764
|
-
const s = /* @__PURE__ */ new Set(),
|
|
765
|
-
for (const
|
|
766
|
-
(typeof
|
|
767
|
-
const
|
|
768
|
-
for (const
|
|
769
|
-
const
|
|
770
|
-
let
|
|
771
|
-
for (;
|
|
772
|
-
|
|
773
|
-
}
|
|
774
|
-
const
|
|
775
|
-
for (;
|
|
776
|
-
const
|
|
777
|
-
for (const
|
|
778
|
-
|
|
757
|
+
for (const h of t) {
|
|
758
|
+
const m = h.layerId || "";
|
|
759
|
+
n.has(m) || n.set(m, []), n.get(m).push(h);
|
|
760
|
+
}
|
|
761
|
+
const s = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Set();
|
|
762
|
+
for (const h of e)
|
|
763
|
+
(typeof h.name == "string" ? h.name.toLowerCase() : "").includes(r) ? (s.add(h.id), l.add(h.id)) : Re(n.get(h.id) || [], r).length > 0 && l.add(h.id);
|
|
764
|
+
const c = new Set(l);
|
|
765
|
+
for (const h of l) {
|
|
766
|
+
const m = /* @__PURE__ */ new Set([h]);
|
|
767
|
+
let g = (d = i.get(h)) == null ? void 0 : d.parentId;
|
|
768
|
+
for (; g && i.has(g) && !m.has(g); )
|
|
769
|
+
m.add(g), c.add(g), g = (u = i.get(g)) == null ? void 0 : u.parentId;
|
|
770
|
+
}
|
|
771
|
+
const f = [...s];
|
|
772
|
+
for (; f.length > 0; ) {
|
|
773
|
+
const h = f.pop();
|
|
774
|
+
for (const m of o.get(h) || [])
|
|
775
|
+
c.has(m) || (c.add(m), f.push(m));
|
|
779
776
|
}
|
|
780
777
|
const p = /* @__PURE__ */ new Map();
|
|
781
|
-
for (const
|
|
782
|
-
const
|
|
783
|
-
p.set(
|
|
778
|
+
for (const h of c) {
|
|
779
|
+
const m = n.get(h) || [];
|
|
780
|
+
p.set(h, s.has(h) ? m : Re(m, r));
|
|
784
781
|
}
|
|
785
|
-
return { camadasVisiveis:
|
|
782
|
+
return { camadasVisiveis: c, feicoesPorCamada: p };
|
|
786
783
|
}
|
|
787
|
-
function
|
|
784
|
+
function Da(e, t, a, r) {
|
|
788
785
|
const i = /* @__PURE__ */ new Map(), o = (n) => {
|
|
789
|
-
const s = n.camada.id,
|
|
790
|
-
let
|
|
791
|
-
for (let
|
|
792
|
-
a.has(
|
|
793
|
-
for (const
|
|
794
|
-
if (r && !r.has(
|
|
795
|
-
const
|
|
796
|
-
|
|
786
|
+
const s = n.camada.id, c = !r || r.has(s) ? t.get(s) ?? [] : [];
|
|
787
|
+
let f = c.length, p = 0;
|
|
788
|
+
for (let u = 0; u < c.length; u++)
|
|
789
|
+
a.has(c[u].id) && p++;
|
|
790
|
+
for (const u of n.subcamadas) {
|
|
791
|
+
if (r && !r.has(u.camada.id)) continue;
|
|
792
|
+
const h = o(u);
|
|
793
|
+
f += h.total, p += h.selecionadas;
|
|
797
794
|
}
|
|
798
|
-
const
|
|
799
|
-
return i.set(s,
|
|
795
|
+
const d = { total: f, selecionadas: p };
|
|
796
|
+
return i.set(s, d), d;
|
|
800
797
|
};
|
|
801
798
|
for (const n of e)
|
|
802
799
|
(!r || r.has(n.camada.id)) && o(n);
|
|
803
800
|
return i;
|
|
804
801
|
}
|
|
805
|
-
function
|
|
802
|
+
function Vt(e, t, a, r = "") {
|
|
806
803
|
if (!a || !Array.isArray(t) || t.length === 0) return [];
|
|
807
|
-
const i =
|
|
804
|
+
const i = Ve(e, a), o = ke(e, t, r);
|
|
808
805
|
if (!o)
|
|
809
806
|
return t.filter((s) => !!(s && s.layerId && i.has(s.layerId)));
|
|
810
807
|
const n = [];
|
|
811
808
|
for (const s of i) {
|
|
812
809
|
if (!o.camadasVisiveis.has(s)) continue;
|
|
813
|
-
const
|
|
814
|
-
|
|
810
|
+
const l = o.feicoesPorCamada.get(s);
|
|
811
|
+
l && l.length > 0 && n.push(...l);
|
|
815
812
|
}
|
|
816
813
|
return n;
|
|
817
814
|
}
|
|
818
|
-
function
|
|
819
|
-
const s =
|
|
820
|
-
for (let
|
|
821
|
-
const
|
|
822
|
-
if (!
|
|
823
|
-
const
|
|
824
|
-
|
|
815
|
+
function _t(e, t, a, r = "", i = _e, o, n) {
|
|
816
|
+
const s = ke(e, t, r), l = [], c = /* @__PURE__ */ new Map();
|
|
817
|
+
for (let d = 0; d < t.length; d++) {
|
|
818
|
+
const u = t[d];
|
|
819
|
+
if (!u || !u.id) continue;
|
|
820
|
+
const h = u.layerId || "";
|
|
821
|
+
c.has(h) || c.set(h, []), c.get(h).push(u);
|
|
825
822
|
}
|
|
826
823
|
if (e.length === 0) {
|
|
827
|
-
const
|
|
828
|
-
return (
|
|
829
|
-
}
|
|
830
|
-
const
|
|
831
|
-
function p(
|
|
832
|
-
const
|
|
833
|
-
if (s && !s.camadasVisiveis.has(
|
|
834
|
-
const
|
|
835
|
-
for (const
|
|
836
|
-
|
|
837
|
-
}
|
|
838
|
-
for (const
|
|
839
|
-
p(
|
|
840
|
-
return
|
|
841
|
-
}
|
|
842
|
-
function
|
|
824
|
+
const d = (r || "").trim().toLowerCase();
|
|
825
|
+
return (c.get("") ?? []).filter((h) => !d || String(h.name ?? "").toLowerCase().includes(d)).slice(0, i).map((h) => h.id);
|
|
826
|
+
}
|
|
827
|
+
const f = te(e);
|
|
828
|
+
function p(d) {
|
|
829
|
+
const u = d.camada;
|
|
830
|
+
if (s && !s.camadasVisiveis.has(u.id) || !(s ? !0 : a.has(u.id))) return;
|
|
831
|
+
const m = s ? s.feicoesPorCamada.get(u.id) || [] : c.get(u.id) || [], g = (o == null ? void 0 : o.get(u.id)) ?? i, y = m.slice(0, g), v = s ? d.subcamadas.filter((w) => s.camadasVisiveis.has(w.camada.id)) : d.subcamadas, b = qa(v, y, n == null ? void 0 : n.get(u.id));
|
|
832
|
+
for (const w of b)
|
|
833
|
+
w.tipo === "layer" ? p(w.nodo) : l.push(w.feicao.id);
|
|
834
|
+
}
|
|
835
|
+
for (const d of f)
|
|
836
|
+
p(d);
|
|
837
|
+
return l;
|
|
838
|
+
}
|
|
839
|
+
function Gt(e, t, a, r, i, o) {
|
|
843
840
|
if (!e.includes(r)) return null;
|
|
844
841
|
const n = new Set(t);
|
|
845
842
|
let s = a;
|
|
846
843
|
if (o && a && e.includes(a)) {
|
|
847
|
-
const
|
|
844
|
+
const l = e.indexOf(a), c = e.indexOf(r), f = Math.min(l, c), p = Math.max(l, c);
|
|
848
845
|
i || n.clear();
|
|
849
|
-
for (let
|
|
850
|
-
n.add(e[
|
|
846
|
+
for (let d = f; d <= p; d++)
|
|
847
|
+
n.add(e[d]);
|
|
851
848
|
} else i ? (n.has(r) ? n.delete(r) : n.add(r), s = r) : (n.clear(), n.add(r), s = r);
|
|
852
849
|
return { selecionados: n, ultimoClicadoId: s };
|
|
853
850
|
}
|
|
854
|
-
function
|
|
851
|
+
function Ra(e, t) {
|
|
855
852
|
if (e.size === 0) return;
|
|
856
853
|
const a = new Set(t.map((r) => r.id));
|
|
857
854
|
for (const r of e)
|
|
858
855
|
a.has(r) || e.delete(r);
|
|
859
856
|
}
|
|
860
|
-
|
|
857
|
+
const Ut = 30, Yt = 4, Ae = { normal: 25, compacto: 22 }, Jt = 42, Kt = 22, Wt = 190, Qt = 1, sa = /* @__PURE__ */ new WeakMap();
|
|
858
|
+
function Xt(e, t) {
|
|
859
|
+
let a = sa.get(e);
|
|
860
|
+
if (!a) {
|
|
861
|
+
a = /* @__PURE__ */ new Map();
|
|
862
|
+
for (const r of e.containers.values())
|
|
863
|
+
if (r.exibido)
|
|
864
|
+
for (const i of r.filhos) {
|
|
865
|
+
if (i.tipo !== "corrida") continue;
|
|
866
|
+
const { chave: o, camadaId: n, feicoes: s } = i.corrida;
|
|
867
|
+
for (let l = 0; l < s.length; l++) {
|
|
868
|
+
const c = s[l].id;
|
|
869
|
+
a.has(c) || a.set(c, { chave: o, indice: l, camadaId: n });
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
sa.set(e, a);
|
|
873
|
+
}
|
|
874
|
+
return a.get(t);
|
|
875
|
+
}
|
|
876
|
+
function Zt(e) {
|
|
877
|
+
const t = /* @__PURE__ */ new Map(), a = e.camadasVisiveis ?? null, r = /* @__PURE__ */ new Set(), i = (n, s) => {
|
|
878
|
+
var w;
|
|
879
|
+
const l = n.camada;
|
|
880
|
+
if (r.has(l.id)) return;
|
|
881
|
+
r.add(l.id);
|
|
882
|
+
const c = a ? n.subcamadas.filter((x) => a.has(x.camada.id)) : n.subcamadas, f = e.feicoesPorCamada.get(l.id) ?? [], p = Number(e.limite(l.id)), d = Number.isFinite(p) || p === 1 / 0 ? Math.max(0, p) : 0, u = f.length > d ? f.slice(0, d) : f, h = s && e.expandida(l.id), m = [];
|
|
883
|
+
let g = 0, y = null, v = 0;
|
|
884
|
+
const b = (w = e.ordemFilhosPorPai) == null ? void 0 : w.get(l.id);
|
|
885
|
+
if (!b || b.length === 0) {
|
|
886
|
+
for (const x of c) m.push({ tipo: "camada", nodo: x, posicao: ++g });
|
|
887
|
+
u.length > 0 && (m.push({
|
|
888
|
+
tipo: "corrida",
|
|
889
|
+
corrida: { chave: `${l.id}#0`, camadaId: l.id, feicoes: u, posInicial: g + 1 }
|
|
890
|
+
}), g += u.length);
|
|
891
|
+
} else for (const x of qa(c, u, b)) {
|
|
892
|
+
if (g++, x.tipo === "layer") {
|
|
893
|
+
y = null, m.push({ tipo: "camada", nodo: x.nodo, posicao: g });
|
|
894
|
+
continue;
|
|
895
|
+
}
|
|
896
|
+
y || (y = { chave: `${l.id}#${v++}`, camadaId: l.id, feicoes: [], posInicial: g }, m.push({ tipo: "corrida", corrida: y })), y.feicoes.push(x.feicao);
|
|
897
|
+
}
|
|
898
|
+
t.set(l.id, {
|
|
899
|
+
camada: l,
|
|
900
|
+
profundidade: n.depth,
|
|
901
|
+
exibido: h,
|
|
902
|
+
filhos: m,
|
|
903
|
+
totalIrmaos: g,
|
|
904
|
+
totalFeicoes: f.length,
|
|
905
|
+
feicoesExibidas: u.length,
|
|
906
|
+
limite: d
|
|
907
|
+
});
|
|
908
|
+
for (const x of c) i(x, h);
|
|
909
|
+
}, o = a ? e.hierarquia.filter((n) => a.has(n.camada.id)) : e.hierarquia;
|
|
910
|
+
for (const n of o) i(n, !0);
|
|
911
|
+
return { raizes: o, containers: t };
|
|
912
|
+
}
|
|
913
|
+
function ye(e, t) {
|
|
914
|
+
return typeof e == "number" && Number.isFinite(e) && e > 0 ? e : t;
|
|
915
|
+
}
|
|
916
|
+
function er(e, t, a, r, i, o = Yt) {
|
|
917
|
+
const n = Math.max(0, Math.floor(Number.isFinite(t) ? t : 0)), s = ye(a, Ae.normal), l = Number.isFinite(e) ? e : 0, c = Number.isFinite(r) ? Math.max(0, r) : 0, f = Number.isFinite(i) ? Math.max(0, i) : 0, p = Math.max(0, o) * s, d = Math.min(n, Math.max(0, Math.floor((c - p - l) / s))), u = Math.min(n, Math.max(d, Math.ceil((c + f + p - l) / s)));
|
|
918
|
+
return { inicio: d, fim: u };
|
|
919
|
+
}
|
|
920
|
+
function Ta(e, t, a = null) {
|
|
921
|
+
const r = t !== null && Number.isFinite(t.altura) && t.altura > 0, i = ye(t == null ? void 0 : t.alturaLinha, Ae.normal), o = ye(t == null ? void 0 : t.alturaDrawer, Wt), n = ye(t == null ? void 0 : t.alturaAviso, Jt), s = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Set();
|
|
922
|
+
let c = 0;
|
|
923
|
+
const f = (p, d) => {
|
|
924
|
+
const u = p.camada.id;
|
|
925
|
+
if (l.has(u)) return;
|
|
926
|
+
l.add(u);
|
|
927
|
+
const h = e.containers.get(u);
|
|
928
|
+
if (!h) return;
|
|
929
|
+
d && (c += i, a === u && (c += o));
|
|
930
|
+
const m = d && h.exibido;
|
|
931
|
+
for (const g of h.filhos) {
|
|
932
|
+
if (g.tipo === "camada") {
|
|
933
|
+
f(g.nodo, m);
|
|
934
|
+
continue;
|
|
935
|
+
}
|
|
936
|
+
const y = g.corrida.feicoes.length;
|
|
937
|
+
if (!m) {
|
|
938
|
+
s.set(g.corrida.chave, { topo: c, inicio: 0, fim: 0, virtual: !1 });
|
|
939
|
+
continue;
|
|
940
|
+
}
|
|
941
|
+
const v = r && y > Ut, b = v ? er(c, y, i, t.topo, t.altura) : { inicio: 0, fim: y };
|
|
942
|
+
s.set(g.corrida.chave, { topo: c, inicio: b.inicio, fim: b.fim, virtual: v }), c += y * i;
|
|
943
|
+
}
|
|
944
|
+
m && (h.totalFeicoes > h.feicoesExibidas && (c += n), h.filhos.length === 0 && h.totalFeicoes === 0 && (c += Kt)), d && (c += Qt);
|
|
945
|
+
};
|
|
946
|
+
for (const p of e.raizes) f(p, !0);
|
|
947
|
+
return { janelas: s, alturaLinha: i };
|
|
948
|
+
}
|
|
949
|
+
function Oa(e) {
|
|
950
|
+
return !!e && Number.isFinite(e.altura) && e.altura > 0;
|
|
951
|
+
}
|
|
952
|
+
function Ge(e, t, a = null) {
|
|
953
|
+
const r = Oa(t), i = Zt(r ? { ...e, limite: () => 1 / 0 } : e), { janelas: o, alturaLinha: n } = Ta(i, t, a);
|
|
954
|
+
return { estrutura: i, janelas: o, alturaLinha: n, semLimite: r };
|
|
955
|
+
}
|
|
956
|
+
function ja(e, t) {
|
|
957
|
+
return e.filhos.some((a) => {
|
|
958
|
+
var r;
|
|
959
|
+
return a.tipo === "corrida" && ((r = t.get(a.corrida.chave)) == null ? void 0 : r.virtual) === !0;
|
|
960
|
+
});
|
|
961
|
+
}
|
|
962
|
+
function ar(e, t, a) {
|
|
963
|
+
for (const r of e.filhos) {
|
|
964
|
+
if (r.tipo !== "corrida") continue;
|
|
965
|
+
const i = t.get(r.corrida.chave), o = a.get(r.corrida.chave);
|
|
966
|
+
if (!i || !o || i.inicio !== o.inicio || i.fim !== o.fim || i.virtual !== o.virtual || o.virtual && i.topo !== o.topo) return !0;
|
|
967
|
+
}
|
|
968
|
+
return !1;
|
|
969
|
+
}
|
|
970
|
+
function tr(e) {
|
|
971
|
+
const t = [], a = /* @__PURE__ */ new Set(), r = (i) => {
|
|
972
|
+
const o = i.camada.id;
|
|
973
|
+
if (a.has(o)) return;
|
|
974
|
+
a.add(o), t.push(`L:${o}`);
|
|
975
|
+
const n = e.containers.get(o);
|
|
976
|
+
if (!(!n || !n.exibido))
|
|
977
|
+
for (const s of n.filhos)
|
|
978
|
+
if (s.tipo === "camada") r(s.nodo);
|
|
979
|
+
else for (const l of s.corrida.feicoes) t.push(`F:${l.id}`);
|
|
980
|
+
};
|
|
981
|
+
for (const i of e.raizes) r(i);
|
|
982
|
+
return t;
|
|
983
|
+
}
|
|
984
|
+
function ze(e, t) {
|
|
985
|
+
const a = Xt(e.estrutura, t);
|
|
986
|
+
if (!a) return null;
|
|
987
|
+
const r = e.janelas.get(a.chave);
|
|
988
|
+
return r ? r.topo + a.indice * e.alturaLinha : null;
|
|
989
|
+
}
|
|
990
|
+
function la(e, t, a, r) {
|
|
991
|
+
return ![e, t, a, r].every(Number.isFinite) || r <= 0 || e + t > a && e < a + r ? null : Math.max(0, Math.round(e - (r - t) / 2));
|
|
992
|
+
}
|
|
993
|
+
function Li(e) {
|
|
994
|
+
return Na(e).html;
|
|
995
|
+
}
|
|
996
|
+
function rr(e, t, a, r, i, o) {
|
|
997
|
+
const n = [], s = S(e.chave);
|
|
998
|
+
t.virtual && n.push(ra(s, "antes", t.inicio * a));
|
|
999
|
+
for (let l = t.inicio; l < t.fim; l++) {
|
|
1000
|
+
const c = o ? { posicao: e.posInicial + l, total: i } : null;
|
|
1001
|
+
n.push(r(e.feicoes[l], c));
|
|
1002
|
+
}
|
|
1003
|
+
return t.virtual && n.push(ra(s, "depois", (e.feicoes.length - t.fim) * a)), n.join("");
|
|
1004
|
+
}
|
|
1005
|
+
function Na(e) {
|
|
861
1006
|
const {
|
|
862
1007
|
camadas: t,
|
|
863
1008
|
feicoes: a,
|
|
@@ -866,69 +1011,81 @@ function mt(e) {
|
|
|
866
1011
|
selectedFeatureIds: o,
|
|
867
1012
|
activeSettingsLayerId: n,
|
|
868
1013
|
editingLayerId: s,
|
|
869
|
-
editingFeatureId:
|
|
870
|
-
searchQuery:
|
|
871
|
-
titulo:
|
|
1014
|
+
editingFeatureId: l,
|
|
1015
|
+
searchQuery: c,
|
|
1016
|
+
titulo: f = "CAMADAS",
|
|
872
1017
|
mostrarBusca: p = !0,
|
|
873
|
-
limitesPorCamada:
|
|
874
|
-
limiteFeicoesPorCamada:
|
|
875
|
-
mostrarBotaoColapsar:
|
|
876
|
-
ordemFilhosPorPai:
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
1018
|
+
limitesPorCamada: d,
|
|
1019
|
+
limiteFeicoesPorCamada: u = _e,
|
|
1020
|
+
mostrarBotaoColapsar: h = !1,
|
|
1021
|
+
ordemFilhosPorPai: m,
|
|
1022
|
+
viewport: g = null
|
|
1023
|
+
} = e, y = (c || "").trim().toLowerCase(), v = ke(t, a, y), b = /* @__PURE__ */ new Map();
|
|
1024
|
+
for (let L = 0; L < a.length; L++) {
|
|
1025
|
+
const K = a[L];
|
|
1026
|
+
if (!K || !K.id) continue;
|
|
1027
|
+
const k = K.layerId || "";
|
|
1028
|
+
b.has(k) || b.set(k, []), b.get(k).push(K);
|
|
1029
|
+
}
|
|
1030
|
+
const w = le(t), x = te(t), F = Da(
|
|
1031
|
+
x,
|
|
1032
|
+
v ? v.feicoesPorCamada : b,
|
|
887
1033
|
o,
|
|
888
|
-
|
|
889
|
-
),
|
|
1034
|
+
v == null ? void 0 : v.camadasVisiveis
|
|
1035
|
+
), I = Ge(
|
|
1036
|
+
{
|
|
1037
|
+
hierarquia: x,
|
|
1038
|
+
feicoesPorCamada: v ? v.feicoesPorCamada : b,
|
|
1039
|
+
camadasVisiveis: (v == null ? void 0 : v.camadasVisiveis) ?? null,
|
|
1040
|
+
expandida: (L) => y ? !0 : i.has(L),
|
|
1041
|
+
limite: (L) => (d == null ? void 0 : d.get(L)) ?? u,
|
|
1042
|
+
ordemFilhosPorPai: m
|
|
1043
|
+
},
|
|
1044
|
+
g,
|
|
1045
|
+
n
|
|
1046
|
+
), P = t.every((L) => L.visible !== !1), Y = t.length > 0 && t.every((L) => i.has(L.id)), de = p ? `
|
|
890
1047
|
<div class="ui-tree-search-wrapper" part="busca">
|
|
891
|
-
<span class="ui-tree-search-icon">${
|
|
892
|
-
<input type="text" class="ui-tree-search-input" id="input-layer-search" aria-label="Buscar camada ou feição" placeholder="Buscar camada ou feição..." value="${
|
|
893
|
-
|
|
1048
|
+
<span class="ui-tree-search-icon">${A.busca}</span>
|
|
1049
|
+
<input type="text" class="ui-tree-search-input" id="input-layer-search" aria-label="Buscar camada ou feição" placeholder="Buscar camada ou feição..." value="${S(
|
|
1050
|
+
c
|
|
894
1051
|
)}" />
|
|
895
|
-
${
|
|
1052
|
+
${c ? `<button type="button" class="ui-tree-search-clear" id="btn-clear-layer-search" title="Limpar busca" aria-label="Limpar busca">${A.fechar}</button>` : ""}
|
|
896
1053
|
</div>
|
|
897
|
-
` : "",
|
|
1054
|
+
` : "", H = `
|
|
898
1055
|
<div class="ui-tree-toolbar" part="toolbar">
|
|
899
1056
|
<div class="ui-tree-title-group">
|
|
900
|
-
<span class="ui-tree-section-title">${
|
|
1057
|
+
<span class="ui-tree-section-title">${S(f || "CAMADAS")}</span>
|
|
901
1058
|
<span class="ui-tree-count-badge">${t.length}</span>
|
|
902
1059
|
</div>
|
|
903
1060
|
<div class="ui-tree-actions">
|
|
904
|
-
<button type="button" id="btn-toggle-all-vis" class="ui-tree-action-btn" title="${
|
|
905
|
-
${
|
|
1061
|
+
<button type="button" id="btn-toggle-all-vis" class="ui-tree-action-btn" title="${P ? "Ocultar Todas as Camadas" : "Exibir Todas as Camadas"}" aria-label="${P ? "Ocultar Todas as Camadas" : "Exibir Todas as Camadas"}">
|
|
1062
|
+
${P ? A.olhoAberto : A.olhoFechado}
|
|
906
1063
|
</button>
|
|
907
|
-
<button type="button" id="btn-toggle-all-expand" class="ui-tree-action-btn" aria-label="${
|
|
908
|
-
<span class="ui-chevron-icon ${
|
|
1064
|
+
<button type="button" id="btn-toggle-all-expand" class="ui-tree-action-btn" aria-label="${Y ? "Recolher Todos os Grupos" : "Expandir Todos os Grupos"}" title="${Y ? "Recolher Todos os Grupos" : "Expandir Todos os Grupos"}">
|
|
1065
|
+
<span class="ui-chevron-icon ${Y ? "open" : ""}">${A.chevronDir}</span>
|
|
909
1066
|
</button>
|
|
910
|
-
${
|
|
1067
|
+
${h ? `<button type="button" id="btn-colapsar" class="ui-camadas-btn-colapsar" title="Recolher painel" aria-label="Recolher painel">${A.recolherPainel}</button>` : ""}
|
|
911
1068
|
</div>
|
|
912
1069
|
</div>
|
|
913
|
-
${
|
|
914
|
-
`,
|
|
915
|
-
const k =
|
|
916
|
-
if (
|
|
917
|
-
const
|
|
918
|
-
const
|
|
919
|
-
return t.filter((
|
|
920
|
-
(
|
|
1070
|
+
${de}
|
|
1071
|
+
`, J = (L, K = null) => {
|
|
1072
|
+
const k = L.camada;
|
|
1073
|
+
if (v && !v.camadasVisiveis.has(k.id)) return "";
|
|
1074
|
+
const j = L.depth, W = L.subcamadas, lt = v ? W.filter(($) => v.camadasVisiveis.has($.camada.id)) : W, D = I.estrutura.containers.get(k.id), fe = !!(k.isGroup || W.length > 0), C = S(k.id), pe = S(k.name || (fe ? "Novo Grupo" : "Camada")), V = Z(k.color, "#00E08A"), me = k.visible !== !1, he = k.locked === !0, ge = y ? !0 : i.has(k.id), ve = n === k.id, Le = r === k.id, _ = w.get(k.id), ct = (_ == null ? void 0 : _.ocultaPorAncestral) === !0, dt = (_ == null ? void 0 : _.travadaPorAncestral) === !0, Q = v ? v.feicoesPorCamada.get(k.id) || [] : b.get(k.id) || [], G = F.get(k.id) ?? { total: 0, selecionadas: 0 }, ut = G.total > 0 && G.selecionadas === G.total, ft = G.selecionadas > 0 && G.selecionadas < G.total, Je = (D == null ? void 0 : D.limite) ?? (d == null ? void 0 : d.get(k.id)) ?? u, pt = Q.length > Je, mt = Be(k, j, _), ht = ($, q) => De($, mt, o.has($.id), l === $.id, q), gt = pt ? Ma(C, Je, Q.length) : "", Ke = Number(k.opacity ?? 1), We = Number.isFinite(Ke) ? Math.min(1, Math.max(0, Ke)) : 1, vt = Math.round(We * 100), bt = ve ? (() => {
|
|
1075
|
+
const $ = Ve(t, k.id);
|
|
1076
|
+
return t.filter((q) => !$.has(q.id)).map(
|
|
1077
|
+
(q) => `<option value="${S(q.id)}" ${k.parentId === q.id ? "selected" : ""}>${q.isGroup ? "📁 " : ""}${S(q.name)}</option>`
|
|
921
1078
|
).join("");
|
|
922
|
-
})() : "",
|
|
923
|
-
<div class="ui-layer-settings-drawer" id="settings-drawer-${
|
|
1079
|
+
})() : "", yt = ve ? `
|
|
1080
|
+
<div class="ui-layer-settings-drawer" id="settings-drawer-${C}" part="drawer" style="--drawer-cor-camada: ${V};">
|
|
924
1081
|
<div class="ui-drawer-header">
|
|
925
1082
|
<div class="ui-drawer-header-left">
|
|
926
|
-
<span class="ui-drawer-icon">${
|
|
1083
|
+
<span class="ui-drawer-icon">${A.engrenagem}</span>
|
|
927
1084
|
<span class="ui-drawer-title">Configurações da Camada</span>
|
|
928
|
-
<span class="ui-drawer-layer-chip" title="${
|
|
1085
|
+
<span class="ui-drawer-layer-chip" title="${pe}">${pe}</span>
|
|
929
1086
|
</div>
|
|
930
|
-
<button type="button" class="ui-drawer-btn-fechar" data-layer-settings-close="${
|
|
931
|
-
${
|
|
1087
|
+
<button type="button" class="ui-drawer-btn-fechar" data-layer-settings-close="${C}" title="Fechar configurações (Esc)" aria-label="Fechar configurações">
|
|
1088
|
+
${A.fechar}
|
|
932
1089
|
</button>
|
|
933
1090
|
</div>
|
|
934
1091
|
|
|
@@ -940,9 +1097,9 @@ function mt(e) {
|
|
|
940
1097
|
</div>
|
|
941
1098
|
<div class="ui-drawer-color-group">
|
|
942
1099
|
<label class="ui-drawer-color-pill" title="Clique para alterar a cor da camada">
|
|
943
|
-
<span class="ui-drawer-color-sample" id="sample-color-${
|
|
944
|
-
<span class="ui-drawer-color-hex" id="hex-color-${
|
|
945
|
-
<input type="color" aria-label="Cor da camada" data-layer-color-picker="${
|
|
1100
|
+
<span class="ui-drawer-color-sample" id="sample-color-${C}" style="background-color: ${V};"></span>
|
|
1101
|
+
<span class="ui-drawer-color-hex" id="hex-color-${C}">${V.toUpperCase()}</span>
|
|
1102
|
+
<input type="color" aria-label="Cor da camada" data-layer-color-picker="${C}" value="${Mt(V, "#00e08a")}" class="ui-drawer-color-native" />
|
|
946
1103
|
</label>
|
|
947
1104
|
</div>
|
|
948
1105
|
</div>
|
|
@@ -951,10 +1108,10 @@ function mt(e) {
|
|
|
951
1108
|
<div class="ui-drawer-row">
|
|
952
1109
|
<div class="ui-drawer-row-label">
|
|
953
1110
|
<span>Opacidade</span>
|
|
954
|
-
<span class="ui-drawer-badge" id="badge-op-${
|
|
1111
|
+
<span class="ui-drawer-badge" id="badge-op-${C}">${vt}%</span>
|
|
955
1112
|
</div>
|
|
956
1113
|
<div class="ui-drawer-slider-container">
|
|
957
|
-
<input type="range" aria-label="Opacidade da camada" min="0.05" max="1" step="0.05" value="${Number(
|
|
1114
|
+
<input type="range" aria-label="Opacidade da camada" min="0.05" max="1" step="0.05" value="${Number(We) || 0}" data-layer-opacity-slider="${C}" class="ui-drawer-slider" />
|
|
958
1115
|
</div>
|
|
959
1116
|
</div>
|
|
960
1117
|
|
|
@@ -964,9 +1121,9 @@ function mt(e) {
|
|
|
964
1121
|
<span>Pertence ao Grupo</span>
|
|
965
1122
|
</div>
|
|
966
1123
|
<div class="ui-drawer-select-wrapper">
|
|
967
|
-
<select class="ui-drawer-select" data-layer-parent-select="${
|
|
1124
|
+
<select class="ui-drawer-select" data-layer-parent-select="${C}" aria-label="Grupo pai da camada">
|
|
968
1125
|
<option value="" ${k.parentId ? "" : "selected"}>(Nenhum - Nível Principal)</option>
|
|
969
|
-
${
|
|
1126
|
+
${bt}
|
|
970
1127
|
</select>
|
|
971
1128
|
</div>
|
|
972
1129
|
</div>
|
|
@@ -974,78 +1131,86 @@ function mt(e) {
|
|
|
974
1131
|
|
|
975
1132
|
<div class="ui-drawer-footer">
|
|
976
1133
|
<div class="ui-drawer-meta-info">
|
|
977
|
-
<span>${
|
|
1134
|
+
<span>${W.length > 0 ? `${W.length} subcamadas · ` : ""}${Q.length} ${Q.length === 1 ? "feição" : "feições"}</span>
|
|
978
1135
|
</div>
|
|
979
1136
|
<div class="ui-drawer-actions">
|
|
980
|
-
<button type="button" class="ui-drawer-btn-sublayer" data-add-sublayer="${
|
|
981
|
-
${
|
|
1137
|
+
<button type="button" class="ui-drawer-btn-sublayer" data-add-sublayer="${C}" title="Adicionar nova camada dentro desta">
|
|
1138
|
+
${A.mais} Subcamada
|
|
982
1139
|
</button>
|
|
983
|
-
<button type="button" class="ui-drawer-btn-danger" data-delete-layer="${
|
|
984
|
-
${
|
|
1140
|
+
<button type="button" class="ui-drawer-btn-danger" data-delete-layer="${C}" title="Excluir esta camada e suas feições">
|
|
1141
|
+
${A.lixeira}
|
|
985
1142
|
<span class="ui-btn-label">Excluir</span>
|
|
986
1143
|
</button>
|
|
987
1144
|
</div>
|
|
988
1145
|
</div>
|
|
989
1146
|
</div>
|
|
990
|
-
` : "",
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
1147
|
+
` : "", Qe = D ? ja(D, I.janelas) : !1, xt = ((D == null ? void 0 : D.filhos) ?? []).map(($) => {
|
|
1148
|
+
if ($.tipo === "camada")
|
|
1149
|
+
return J($.nodo, Qe ? { posicao: $.posicao, total: D.totalIrmaos } : null);
|
|
1150
|
+
const q = I.janelas.get($.corrida.chave);
|
|
1151
|
+
return q ? rr(
|
|
1152
|
+
$.corrida,
|
|
1153
|
+
q,
|
|
1154
|
+
I.alturaLinha,
|
|
1155
|
+
ht,
|
|
1156
|
+
D.totalIrmaos,
|
|
1157
|
+
Qe
|
|
1158
|
+
) : "";
|
|
1159
|
+
}).join("");
|
|
995
1160
|
return `
|
|
996
|
-
<div class="ui-layer-group ${
|
|
997
|
-
<div class="ui-layer-row ${
|
|
998
|
-
<div class="ui-col ui-col-drag" title="Arrastar para reordenar Z-Index">${
|
|
1161
|
+
<div class="ui-layer-group ${j > 0 ? "is-sublayer-group" : ""}" data-layer-id="${C}" data-layer-depth="${j}" role="treeitem" aria-level="${j + 1}" aria-expanded="${ge}" part="grupo" style="--layer-active-color: ${V};"${Pa(K)}>
|
|
1162
|
+
<div class="ui-layer-row ${me ? "" : "hidden-layer"} ${Le ? "active-drawing-layer" : ""} ${j > 0 ? "is-sublayer" : ""} ${fe ? "is-group-row" : ""} ${ct ? "herdado-oculto" : ""} ${dt ? "herdado-travado" : ""}" data-layer-row="${C}" data-layer-id="${C}" tabindex="-1" draggable="true" part="${Le ? "camada camada-ativa" : "camada"}" ${Le ? 'aria-current="true"' : ""} style="--layer-depth: ${j};">
|
|
1163
|
+
<div class="ui-col ui-col-drag" title="Arrastar para reordenar Z-Index">${A.dragHandle}</div>
|
|
999
1164
|
|
|
1000
|
-
<div class="ui-col ui-col-eye" data-layer-eye="${
|
|
1001
|
-
${
|
|
1165
|
+
<div class="ui-col ui-col-eye" data-layer-eye="${C}" role="button" tabindex="0" aria-label="${me ? "Ocultar Camada" : "Exibir Camada"}" title="${me ? "Ocultar Camada" : "Exibir Camada"}">
|
|
1166
|
+
${me ? A.olhoAberto : A.olhoFechado}
|
|
1002
1167
|
</div>
|
|
1003
1168
|
|
|
1004
|
-
<div class="ui-col ui-col-lock ${
|
|
1005
|
-
${
|
|
1169
|
+
<div class="ui-col ui-col-lock ${he ? "" : "ui-lock-open"}" data-layer-lock="${C}" role="button" tabindex="0" aria-label="${he ? "Desbloquear Camada" : "Bloquear Camada"}" title="${he ? "Desbloquear Camada" : "Bloquear Camada"}">
|
|
1170
|
+
${he ? A.cadeadoTrancado : A.cadeadoAberto}
|
|
1006
1171
|
</div>
|
|
1007
1172
|
|
|
1008
|
-
<div class="ui-col ui-col-colorbar ui-col-colorbar-editavel" data-layer-color="${
|
|
1173
|
+
<div class="ui-col ui-col-colorbar ui-col-colorbar-editavel" data-layer-color="${C}" role="button" tabindex="0" style="background: ${V};" aria-label="Alterar cor da camada" title="Alterar cor da camada (usada no destaque de seleção)"></div>
|
|
1009
1174
|
|
|
1010
|
-
<div class="ui-col ui-col-chevron" data-layer-expand="${
|
|
1011
|
-
<span class="ui-chevron-icon ${
|
|
1175
|
+
<div class="ui-col ui-col-chevron" data-layer-expand="${C}" role="button" tabindex="0" aria-label="${ge ? "Recolher grupo" : "Expandir grupo"}">
|
|
1176
|
+
<span class="ui-chevron-icon ${ge ? "open" : ""}">${A.chevronDir}</span>
|
|
1012
1177
|
</div>
|
|
1013
1178
|
|
|
1014
|
-
<div class="ui-col ui-col-name" data-layer-name-trigger="${
|
|
1015
|
-
${s === k.id ? `<input type="text" class="ui-inline-rename-input" data-inline-layer-input="${
|
|
1016
|
-
${
|
|
1179
|
+
<div class="ui-col ui-col-name" data-layer-name-trigger="${C}" title="Clique para ativar camada de desenho | Duplo clique para renomear">
|
|
1180
|
+
${s === k.id ? `<input type="text" class="ui-inline-rename-input" data-inline-layer-input="${C}" value="${pe}" />` : `<span class="ui-name-text">${pe}</span>
|
|
1181
|
+
${Sa(G.total, Q.length, W.length, fe)}`}
|
|
1017
1182
|
</div>
|
|
1018
1183
|
|
|
1019
1184
|
<div class="ui-col ui-col-actions">
|
|
1020
|
-
<button type="button" class="ui-micro-btn" data-layer-fit="${
|
|
1021
|
-
<button type="button" class="ui-micro-btn ${
|
|
1185
|
+
<button type="button" class="ui-micro-btn" data-layer-fit="${C}" title="Enquadrar camada no mapa" aria-label="Enquadrar camada no mapa">${A.alvoEnquadrar}</button>
|
|
1186
|
+
<button type="button" class="ui-micro-btn ${ve ? "active" : ""}" data-layer-settings="${C}" title="Ajustar cor, hierarquia, opacidade e excluir" aria-label="Configurações da camada" aria-expanded="${ve}">${A.engrenagem}</button>
|
|
1022
1187
|
</div>
|
|
1023
1188
|
|
|
1024
|
-
<div class="ui-col ui-col-target" data-layer-target="${
|
|
1025
|
-
<div class="ui-target-circle ${
|
|
1189
|
+
<div class="ui-col ui-col-target" data-layer-target="${C}" role="button" tabindex="0" aria-label="Selecionar todas as feições deste grupo" title="Selecionar todas as feições deste grupo">
|
|
1190
|
+
<div class="ui-target-circle ${ut ? "selected" : ft ? "partial" : ""}"></div>
|
|
1026
1191
|
</div>
|
|
1027
1192
|
</div>
|
|
1028
1193
|
|
|
1029
|
-
${
|
|
1194
|
+
${yt}
|
|
1030
1195
|
|
|
1031
|
-
<div class="ui-children-container ${
|
|
1032
|
-
${
|
|
1033
|
-
${
|
|
1034
|
-
${
|
|
1196
|
+
<div class="ui-children-container ${j > 0 ? "is-subchildren" : ""}" role="group" style="--parent-depth: ${j}; --parent-layer-color: ${V}; display: ${ge ? "block" : "none"};">
|
|
1197
|
+
${xt}
|
|
1198
|
+
${gt}
|
|
1199
|
+
${lt.length === 0 && Q.length === 0 ? za(fe) : ""}
|
|
1035
1200
|
</div>
|
|
1036
1201
|
</div>
|
|
1037
1202
|
`;
|
|
1038
|
-
},
|
|
1039
|
-
return `
|
|
1040
|
-
${
|
|
1203
|
+
}, ue = t.length === 0 ? (b.get("") ?? []).filter((L) => !y || String(L.name ?? "").toLowerCase().includes(y)) : [], nt = Be({ id: "" }, 0, void 0), Ye = ue.slice(0, u).map((L) => De(L, nt, o.has(L.id), l === L.id)).join(""), st = v && v.camadasVisiveis.size === 0 && !Ye ? `<div class="ui-search-empty" role="status">Nenhum resultado para “${S((c || "").trim())}”</div>` : Ye || I.estrutura.raizes.map((L) => J(L)).join("");
|
|
1204
|
+
return { html: `
|
|
1205
|
+
${H}
|
|
1041
1206
|
<div class="ui-panel-box">
|
|
1042
1207
|
<div class="ui-layer-tree" id="ui-layer-tree-mount" role="tree" aria-label="Camadas e feições" aria-multiselectable="true" part="arvore">
|
|
1043
|
-
${
|
|
1208
|
+
${st}
|
|
1044
1209
|
</div>
|
|
1045
1210
|
</div>
|
|
1046
|
-
|
|
1211
|
+
`, plano: I };
|
|
1047
1212
|
}
|
|
1048
|
-
function
|
|
1213
|
+
function ir(e) {
|
|
1049
1214
|
return [
|
|
1050
1215
|
{
|
|
1051
1216
|
gatilho: "data-layer-name-trigger",
|
|
@@ -1075,36 +1240,36 @@ function gt(e) {
|
|
|
1075
1240
|
}
|
|
1076
1241
|
];
|
|
1077
1242
|
}
|
|
1078
|
-
function
|
|
1079
|
-
for (const r of
|
|
1243
|
+
function ca(e, t, a = t) {
|
|
1244
|
+
for (const r of ir(e))
|
|
1080
1245
|
a.querySelectorAll(`[${r.gatilho}]`).forEach((i) => {
|
|
1081
1246
|
i.addEventListener("dblclick", (o) => {
|
|
1082
1247
|
o.stopPropagation();
|
|
1083
1248
|
const n = i.getAttribute(r.gatilho);
|
|
1084
1249
|
if (!n) return;
|
|
1085
1250
|
r.marcarEditando(n), e.solicitarRenderizacao();
|
|
1086
|
-
const s =
|
|
1251
|
+
const s = M(t, r.input, n);
|
|
1087
1252
|
if (!s) return;
|
|
1088
1253
|
s.focus(), s.select();
|
|
1089
|
-
let
|
|
1090
|
-
const
|
|
1091
|
-
var
|
|
1092
|
-
if (!
|
|
1093
|
-
if (
|
|
1094
|
-
const
|
|
1095
|
-
|
|
1254
|
+
let l = !1;
|
|
1255
|
+
const c = (f, p = !1) => {
|
|
1256
|
+
var d, u;
|
|
1257
|
+
if (!l) {
|
|
1258
|
+
if (l = !0, r.marcarEditando(null), f) {
|
|
1259
|
+
const h = r.aplicar(n, s.value.trim());
|
|
1260
|
+
h && (h.salvar && ((d = e.salvarLembrancaEstado) == null || d.call(e)), r.emitir(h.detalhe));
|
|
1096
1261
|
}
|
|
1097
|
-
e.solicitarRenderizacao(), p && ((
|
|
1262
|
+
e.solicitarRenderizacao(), p && ((u = M(t, r.linha, n)) == null || u.focus());
|
|
1098
1263
|
}
|
|
1099
1264
|
};
|
|
1100
|
-
s.addEventListener("keydown", (
|
|
1101
|
-
|
|
1102
|
-
}), s.addEventListener("blur", () =>
|
|
1265
|
+
s.addEventListener("keydown", (f) => {
|
|
1266
|
+
f.key === "Enter" ? (f.preventDefault(), c(!0, !0)) : f.key === "Escape" && (f.preventDefault(), c(!1, !0));
|
|
1267
|
+
}), s.addEventListener("blur", () => c(!0));
|
|
1103
1268
|
});
|
|
1104
1269
|
});
|
|
1105
1270
|
}
|
|
1106
|
-
const
|
|
1107
|
-
class
|
|
1271
|
+
const or = ["dragging", "drop-above", "drop-below", "drop-into"];
|
|
1272
|
+
class nr {
|
|
1108
1273
|
constructor(t, a) {
|
|
1109
1274
|
E(this, "host");
|
|
1110
1275
|
E(this, "shadow");
|
|
@@ -1130,11 +1295,11 @@ class vt {
|
|
|
1130
1295
|
(t = this.cancelarToque) == null || t.call(this), this.cancelarToque = null;
|
|
1131
1296
|
}
|
|
1132
1297
|
bindInlineRename() {
|
|
1133
|
-
|
|
1298
|
+
ca(this.host, this.shadow);
|
|
1134
1299
|
}
|
|
1135
1300
|
limparClassesDeArraste() {
|
|
1136
1301
|
this.shadow.querySelectorAll(".ui-layer-row, .ui-feat-row, .ui-layer-group").forEach((t) => {
|
|
1137
|
-
t.classList.remove(...
|
|
1302
|
+
t.classList.remove(...or);
|
|
1138
1303
|
});
|
|
1139
1304
|
}
|
|
1140
1305
|
/** Depois de qualquer mudança na ordem/hierarquia de camadas. */
|
|
@@ -1156,7 +1321,7 @@ class vt {
|
|
|
1156
1321
|
const r = this.host.feicoes.find((n) => n.id === t), i = r == null ? void 0 : r.layerId;
|
|
1157
1322
|
if (!a || i === a) return !1;
|
|
1158
1323
|
if ((r == null ? void 0 : r.locked) === !0) return !0;
|
|
1159
|
-
const o =
|
|
1324
|
+
const o = we(this.host.camadas);
|
|
1160
1325
|
return o.has(a) || !!i && o.has(i);
|
|
1161
1326
|
}
|
|
1162
1327
|
arrasteBloqueado(t) {
|
|
@@ -1168,7 +1333,7 @@ class vt {
|
|
|
1168
1333
|
}
|
|
1169
1334
|
/** Atualização incremental: liga renomear e arraste só nas linhas de feição novas dentro de `raiz`. */
|
|
1170
1335
|
bindLinhasFeicao(t) {
|
|
1171
|
-
|
|
1336
|
+
ca(this.host, this.shadow, t), this.vincularArrasteFeicoes(t);
|
|
1172
1337
|
}
|
|
1173
1338
|
vincularArrasteCamadas(t) {
|
|
1174
1339
|
t.querySelectorAll('.ui-layer-row[draggable="true"]').forEach((a) => {
|
|
@@ -1183,15 +1348,15 @@ class vt {
|
|
|
1183
1348
|
}), a.addEventListener("dragover", (i) => {
|
|
1184
1349
|
const o = i;
|
|
1185
1350
|
if (o.preventDefault(), o.stopPropagation(), o.dataTransfer && (o.dataTransfer.dropEffect = "move"), this.arraste.tipo === "layer") {
|
|
1186
|
-
if (this.arraste.camadaId === r || this.arraste.camadaId &&
|
|
1351
|
+
if (this.arraste.camadaId === r || this.arraste.camadaId && T(this.host.camadas, r, this.arraste.camadaId))
|
|
1187
1352
|
return;
|
|
1188
|
-
const n = a.getBoundingClientRect(), s = n.height > 0 ?
|
|
1353
|
+
const n = a.getBoundingClientRect(), s = n.height > 0 ? Me((o.clientY - n.top) / n.height) : "dentro";
|
|
1189
1354
|
a.classList.toggle("drop-above", s === "acima"), a.classList.toggle("drop-below", s === "abaixo"), a.classList.toggle("drop-into", s === "dentro");
|
|
1190
1355
|
} else if (this.arraste.tipo === "feature") {
|
|
1191
1356
|
const n = this.host.camadas.find((s) => s.id === r);
|
|
1192
1357
|
if (n != null && n.parentId) {
|
|
1193
|
-
const s = a.getBoundingClientRect(),
|
|
1194
|
-
a.classList.toggle("drop-above",
|
|
1358
|
+
const s = a.getBoundingClientRect(), l = s.height > 0 ? Me((o.clientY - s.top) / s.height) : "dentro";
|
|
1359
|
+
a.classList.toggle("drop-above", l === "acima"), a.classList.toggle("drop-below", l === "abaixo"), a.classList.toggle("drop-into", l === "dentro");
|
|
1195
1360
|
} else
|
|
1196
1361
|
a.classList.remove("drop-above", "drop-below"), a.classList.add("drop-into");
|
|
1197
1362
|
}
|
|
@@ -1199,39 +1364,39 @@ class vt {
|
|
|
1199
1364
|
const o = i.relatedTarget;
|
|
1200
1365
|
o && a.contains(o) || a.classList.remove("drop-above", "drop-below", "drop-into");
|
|
1201
1366
|
}), a.addEventListener("drop", (i) => {
|
|
1202
|
-
var s,
|
|
1367
|
+
var s, l, c, f, p;
|
|
1203
1368
|
const o = i;
|
|
1204
1369
|
o.preventDefault(), o.stopPropagation();
|
|
1205
1370
|
const n = a.classList.contains("drop-into") ? "dentro" : a.classList.contains("drop-above") ? "acima" : "abaixo";
|
|
1206
1371
|
if (this.limparClassesDeArraste(), this.arraste.tipo === "layer") {
|
|
1207
|
-
if (!this.arraste.camadaId || this.arraste.camadaId === r || !this.host.camadas.some((
|
|
1208
|
-
const
|
|
1209
|
-
|
|
1372
|
+
if (!this.arraste.camadaId || this.arraste.camadaId === r || !this.host.camadas.some((u) => u.id === this.arraste.camadaId) || !this.host.camadas.some((u) => u.id === r)) return;
|
|
1373
|
+
const d = ia(this.host.camadas, this.arraste.camadaId, r, n);
|
|
1374
|
+
d && this.host.ordemFilhosPorPai && na(
|
|
1210
1375
|
this.host.camadas,
|
|
1211
1376
|
this.host.feicoes,
|
|
1212
1377
|
this.host.ordemFilhosPorPai,
|
|
1213
1378
|
this.arraste.camadaId,
|
|
1214
1379
|
r,
|
|
1215
1380
|
n,
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
), (
|
|
1219
|
-
camadaId:
|
|
1220
|
-
novoParentId:
|
|
1221
|
-
parentAnteriorId:
|
|
1222
|
-
camada:
|
|
1223
|
-
})) :
|
|
1224
|
-
camadaId:
|
|
1225
|
-
novoParentId:
|
|
1226
|
-
parentAnteriorId:
|
|
1227
|
-
camada:
|
|
1381
|
+
d.parentAnteriorId,
|
|
1382
|
+
d.novoParentId
|
|
1383
|
+
), (d == null ? void 0 : d.tipo) === "hierarquia" ? ((s = this.host.expandedLayers) == null || s.add(d.novoParentId), this.host.dispararEvento("ui-camada-mover-hierarquia", {
|
|
1384
|
+
camadaId: d.camada.id,
|
|
1385
|
+
novoParentId: d.novoParentId,
|
|
1386
|
+
parentAnteriorId: d.parentAnteriorId,
|
|
1387
|
+
camada: d.camada
|
|
1388
|
+
})) : d && d.parentAnteriorId !== d.novoParentId && this.host.dispararEvento("ui-camada-mover-hierarquia", {
|
|
1389
|
+
camadaId: d.camada.id,
|
|
1390
|
+
novoParentId: d.novoParentId,
|
|
1391
|
+
parentAnteriorId: d.parentAnteriorId,
|
|
1392
|
+
camada: d.camada
|
|
1228
1393
|
}), this.aposReordenarCamadas();
|
|
1229
1394
|
} else if (this.arraste.tipo === "feature") {
|
|
1230
1395
|
if (!this.arraste.feicaoId) return;
|
|
1231
|
-
const
|
|
1232
|
-
if (
|
|
1233
|
-
if (this.trocaEntreCamadasTravada(this.arraste.feicaoId,
|
|
1234
|
-
const
|
|
1396
|
+
const d = this.host.camadas.find((u) => u.id === r);
|
|
1397
|
+
if (d != null && d.parentId && (n === "acima" || n === "abaixo")) {
|
|
1398
|
+
if (this.trocaEntreCamadasTravada(this.arraste.feicaoId, d.parentId) || !this.host.ordemFilhosPorPai) return;
|
|
1399
|
+
const u = Nt(
|
|
1235
1400
|
this.host.camadas,
|
|
1236
1401
|
this.host.feicoes,
|
|
1237
1402
|
this.host.ordemFilhosPorPai,
|
|
@@ -1239,17 +1404,17 @@ class vt {
|
|
|
1239
1404
|
r,
|
|
1240
1405
|
n === "acima"
|
|
1241
1406
|
);
|
|
1242
|
-
if (!
|
|
1243
|
-
this.host.dispararEvento("ui-feicoes-reordenadas", { feicoes: [...this.host.feicoes] }),
|
|
1407
|
+
if (!u) return;
|
|
1408
|
+
this.host.dispararEvento("ui-feicoes-reordenadas", { feicoes: [...this.host.feicoes] }), u.mudouDeCamada && this.emitirFeicaoMovida(u), (c = (l = this.host).salvarLembrancaEstado) == null || c.call(l), this.host.solicitarRenderizacao();
|
|
1244
1409
|
} else {
|
|
1245
1410
|
if (this.trocaEntreCamadasTravada(this.arraste.feicaoId, r)) return;
|
|
1246
|
-
const
|
|
1247
|
-
|
|
1411
|
+
const u = Rt(this.host.feicoes, this.host.camadas, this.arraste.feicaoId, r);
|
|
1412
|
+
u && (this.host.ordemFilhosPorPai && Ba(
|
|
1248
1413
|
this.host.ordemFilhosPorPai,
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
), this.emitirFeicaoMovida(
|
|
1414
|
+
u.feicao.id,
|
|
1415
|
+
u.camadaOrigemId,
|
|
1416
|
+
u.camadaDestinoId
|
|
1417
|
+
), this.emitirFeicaoMovida(u), (p = (f = this.host).salvarLembrancaEstado) == null || p.call(f), this.host.solicitarRenderizacao());
|
|
1253
1418
|
}
|
|
1254
1419
|
}
|
|
1255
1420
|
}), a.addEventListener("dragend", () => {
|
|
@@ -1268,48 +1433,48 @@ class vt {
|
|
|
1268
1433
|
}
|
|
1269
1434
|
n.stopPropagation(), this.arraste.tipo = "feature", this.arraste.feicaoId = r, this.arraste.camadaId = i, n.dataTransfer && (n.dataTransfer.setData("text/plain", JSON.stringify({ type: "feature", id: r, layerId: i })), n.dataTransfer.effectAllowed = "move"), a.classList.add("dragging");
|
|
1270
1435
|
}), a.addEventListener("dragover", (o) => {
|
|
1271
|
-
const n = o, s = this.arraste.tipo === "feature" && this.arraste.feicaoId !== r,
|
|
1272
|
-
if (!s && !
|
|
1436
|
+
const n = o, s = this.arraste.tipo === "feature" && this.arraste.feicaoId !== r, l = this.arraste.tipo === "layer" && !!this.arraste.camadaId && !!i && this.arraste.camadaId !== i && !T(this.host.camadas, i, this.arraste.camadaId);
|
|
1437
|
+
if (!s && !l) return;
|
|
1273
1438
|
n.preventDefault(), n.stopPropagation(), n.dataTransfer && (n.dataTransfer.dropEffect = "move");
|
|
1274
|
-
const
|
|
1275
|
-
a.classList.toggle("drop-above",
|
|
1439
|
+
const c = a.getBoundingClientRect(), f = n.clientY - c.top < c.height / 2;
|
|
1440
|
+
a.classList.toggle("drop-above", f), a.classList.toggle("drop-below", !f);
|
|
1276
1441
|
}), a.addEventListener("dragleave", (o) => {
|
|
1277
1442
|
const n = o.relatedTarget;
|
|
1278
1443
|
n && a.contains(n) || a.classList.remove("drop-above", "drop-below");
|
|
1279
1444
|
}), a.addEventListener("drop", (o) => {
|
|
1280
|
-
var
|
|
1281
|
-
const n = o, s = a.getBoundingClientRect(),
|
|
1445
|
+
var c, f, p;
|
|
1446
|
+
const n = o, s = a.getBoundingClientRect(), l = a.classList.contains("drop-above") ? !0 : a.classList.contains("drop-below") ? !1 : s.height > 0 && n.clientY - s.top < s.height / 2;
|
|
1282
1447
|
if (this.arraste.tipo === "feature") {
|
|
1283
1448
|
if (!this.arraste.feicaoId || this.arraste.feicaoId === r || (n.preventDefault(), n.stopPropagation(), this.limparClassesDeArraste(), this.trocaEntreCamadasTravada(this.arraste.feicaoId, i))) return;
|
|
1284
|
-
const
|
|
1285
|
-
if (!
|
|
1286
|
-
this.host.ordemFilhosPorPai &&
|
|
1449
|
+
const d = Tt(this.host.feicoes, this.arraste.feicaoId, r, l);
|
|
1450
|
+
if (!d) return;
|
|
1451
|
+
this.host.ordemFilhosPorPai && Ht(
|
|
1287
1452
|
this.host.camadas,
|
|
1288
1453
|
this.host.feicoes,
|
|
1289
1454
|
this.host.ordemFilhosPorPai,
|
|
1290
1455
|
this.arraste.feicaoId,
|
|
1291
1456
|
r,
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
), this.host.dispararEvento("ui-feicoes-reordenadas", { feicoes: [...this.host.feicoes] }),
|
|
1457
|
+
l,
|
|
1458
|
+
d.camadaOrigemId,
|
|
1459
|
+
d.camadaDestinoId
|
|
1460
|
+
), this.host.dispararEvento("ui-feicoes-reordenadas", { feicoes: [...this.host.feicoes] }), d.mudouDeCamada && this.emitirFeicaoMovida(d), (f = (c = this.host).salvarLembrancaEstado) == null || f.call(c), this.host.solicitarRenderizacao();
|
|
1296
1461
|
} else if (this.arraste.tipo === "layer") {
|
|
1297
1462
|
if (!this.arraste.camadaId || !i || !this.host.ordemFilhosPorPai) return;
|
|
1298
1463
|
n.preventDefault(), n.stopPropagation(), this.limparClassesDeArraste();
|
|
1299
|
-
const
|
|
1464
|
+
const d = oa(
|
|
1300
1465
|
this.host.camadas,
|
|
1301
1466
|
this.host.feicoes,
|
|
1302
1467
|
this.host.ordemFilhosPorPai,
|
|
1303
1468
|
this.arraste.camadaId,
|
|
1304
1469
|
r,
|
|
1305
|
-
|
|
1470
|
+
l
|
|
1306
1471
|
);
|
|
1307
|
-
if (!
|
|
1308
|
-
|
|
1309
|
-
camadaId:
|
|
1310
|
-
novoParentId:
|
|
1311
|
-
parentAnteriorId:
|
|
1312
|
-
camada:
|
|
1472
|
+
if (!d) return;
|
|
1473
|
+
d.parentAnteriorId !== d.novoParentId && d.novoParentId && ((p = this.host.expandedLayers) == null || p.add(d.novoParentId), this.host.dispararEvento("ui-camada-mover-hierarquia", {
|
|
1474
|
+
camadaId: d.camada.id,
|
|
1475
|
+
novoParentId: d.novoParentId,
|
|
1476
|
+
parentAnteriorId: d.parentAnteriorId,
|
|
1477
|
+
camada: d.camada
|
|
1313
1478
|
})), this.aposReordenarCamadas();
|
|
1314
1479
|
}
|
|
1315
1480
|
}), a.addEventListener("dragend", (o) => {
|
|
@@ -1329,55 +1494,55 @@ class vt {
|
|
|
1329
1494
|
if (!a) return;
|
|
1330
1495
|
const r = a.getAttribute("data-layer-id");
|
|
1331
1496
|
r && t.addEventListener("pointerdown", (i) => {
|
|
1332
|
-
var
|
|
1497
|
+
var d;
|
|
1333
1498
|
const o = i;
|
|
1334
1499
|
if (o.pointerType === "mouse" && o.button !== 0 || this.host.editingLayerId || this.host.editingFeatureId) return;
|
|
1335
|
-
(
|
|
1500
|
+
(d = this.cancelarToque) == null || d.call(this);
|
|
1336
1501
|
let n = null, s = "abaixo";
|
|
1337
|
-
const
|
|
1338
|
-
|
|
1339
|
-
const
|
|
1340
|
-
if (n && n !==
|
|
1341
|
-
if (
|
|
1342
|
-
const
|
|
1343
|
-
if (!
|
|
1502
|
+
const l = (u) => {
|
|
1503
|
+
u.preventDefault(), a.classList.add("dragging");
|
|
1504
|
+
const h = this.shadow.elementFromPoint(u.clientX, u.clientY), m = h ? h.closest(".ui-layer-row, .ui-feat-row") : null;
|
|
1505
|
+
if (n && n !== m && n.classList.remove("drop-above", "drop-below", "drop-into"), m && m !== a)
|
|
1506
|
+
if (m.classList.contains("ui-feat-row")) {
|
|
1507
|
+
const y = m.getAttribute("data-feat-layer");
|
|
1508
|
+
if (!y || y === r || T(this.host.camadas, y, r)) {
|
|
1344
1509
|
n = null;
|
|
1345
1510
|
return;
|
|
1346
1511
|
}
|
|
1347
|
-
n =
|
|
1348
|
-
const v =
|
|
1349
|
-
s =
|
|
1512
|
+
n = m;
|
|
1513
|
+
const v = m.getBoundingClientRect(), b = v.height > 0 && u.clientY - v.top < v.height / 2;
|
|
1514
|
+
s = b ? "acima" : "abaixo", m.classList.toggle("drop-above", b), m.classList.toggle("drop-below", !b), m.classList.remove("drop-into");
|
|
1350
1515
|
} else {
|
|
1351
|
-
const
|
|
1352
|
-
if (
|
|
1516
|
+
const y = m.getAttribute("data-layer-id");
|
|
1517
|
+
if (y && T(this.host.camadas, y, r)) {
|
|
1353
1518
|
n = null;
|
|
1354
1519
|
return;
|
|
1355
1520
|
}
|
|
1356
|
-
n =
|
|
1357
|
-
const v =
|
|
1358
|
-
s = v.height > 0 ?
|
|
1521
|
+
n = m;
|
|
1522
|
+
const v = m.getBoundingClientRect();
|
|
1523
|
+
s = v.height > 0 ? Me((u.clientY - v.top) / v.height) : "abaixo", m.classList.toggle("drop-above", s === "acima"), m.classList.toggle("drop-below", s === "abaixo"), m.classList.toggle("drop-into", s === "dentro");
|
|
1359
1524
|
}
|
|
1360
1525
|
else
|
|
1361
1526
|
n = null;
|
|
1362
|
-
},
|
|
1363
|
-
window.removeEventListener("pointermove",
|
|
1364
|
-
},
|
|
1365
|
-
|
|
1527
|
+
}, c = () => {
|
|
1528
|
+
window.removeEventListener("pointermove", l), window.removeEventListener("pointerup", p), window.removeEventListener("pointercancel", f), this.cancelarToque = null;
|
|
1529
|
+
}, f = () => {
|
|
1530
|
+
c(), this.limparClassesDeArraste();
|
|
1366
1531
|
}, p = () => {
|
|
1367
|
-
var
|
|
1368
|
-
|
|
1369
|
-
const
|
|
1370
|
-
if (this.limparClassesDeArraste(),
|
|
1371
|
-
const v =
|
|
1532
|
+
var g, y;
|
|
1533
|
+
c();
|
|
1534
|
+
const u = n == null ? void 0 : n.getAttribute("data-layer-id"), h = n == null ? void 0 : n.getAttribute("data-feat-row");
|
|
1535
|
+
if (this.limparClassesDeArraste(), h && this.host.ordemFilhosPorPai) {
|
|
1536
|
+
const v = oa(
|
|
1372
1537
|
this.host.camadas,
|
|
1373
1538
|
this.host.feicoes,
|
|
1374
1539
|
this.host.ordemFilhosPorPai,
|
|
1375
1540
|
r,
|
|
1376
|
-
|
|
1541
|
+
h,
|
|
1377
1542
|
s === "acima"
|
|
1378
1543
|
);
|
|
1379
1544
|
if (!v) return;
|
|
1380
|
-
v.parentAnteriorId !== v.novoParentId && v.novoParentId && ((
|
|
1545
|
+
v.parentAnteriorId !== v.novoParentId && v.novoParentId && ((g = this.host.expandedLayers) == null || g.add(v.novoParentId), this.host.dispararEvento("ui-camada-mover-hierarquia", {
|
|
1381
1546
|
camadaId: v.camada.id,
|
|
1382
1547
|
novoParentId: v.novoParentId,
|
|
1383
1548
|
parentAnteriorId: v.parentAnteriorId,
|
|
@@ -1385,79 +1550,79 @@ class vt {
|
|
|
1385
1550
|
})), this.aposReordenarCamadas();
|
|
1386
1551
|
return;
|
|
1387
1552
|
}
|
|
1388
|
-
if (!
|
|
1389
|
-
const
|
|
1390
|
-
|
|
1553
|
+
if (!u || u === r) return;
|
|
1554
|
+
const m = ia(this.host.camadas, r, u, s);
|
|
1555
|
+
m && (this.host.ordemFilhosPorPai && na(
|
|
1391
1556
|
this.host.camadas,
|
|
1392
1557
|
this.host.feicoes,
|
|
1393
1558
|
this.host.ordemFilhosPorPai,
|
|
1394
1559
|
r,
|
|
1395
|
-
|
|
1560
|
+
u,
|
|
1396
1561
|
s,
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
),
|
|
1400
|
-
camadaId:
|
|
1401
|
-
novoParentId:
|
|
1402
|
-
parentAnteriorId:
|
|
1403
|
-
camada:
|
|
1404
|
-
})) :
|
|
1405
|
-
camadaId:
|
|
1406
|
-
novoParentId:
|
|
1407
|
-
parentAnteriorId:
|
|
1408
|
-
camada:
|
|
1562
|
+
m.parentAnteriorId,
|
|
1563
|
+
m.novoParentId
|
|
1564
|
+
), m.tipo === "hierarquia" ? ((y = this.host.expandedLayers) == null || y.add(m.novoParentId), this.host.dispararEvento("ui-camada-mover-hierarquia", {
|
|
1565
|
+
camadaId: m.camada.id,
|
|
1566
|
+
novoParentId: m.novoParentId,
|
|
1567
|
+
parentAnteriorId: m.parentAnteriorId,
|
|
1568
|
+
camada: m.camada
|
|
1569
|
+
})) : m.parentAnteriorId !== m.novoParentId && this.host.dispararEvento("ui-camada-mover-hierarquia", {
|
|
1570
|
+
camadaId: m.camada.id,
|
|
1571
|
+
novoParentId: m.novoParentId,
|
|
1572
|
+
parentAnteriorId: m.parentAnteriorId,
|
|
1573
|
+
camada: m.camada
|
|
1409
1574
|
}), this.aposReordenarCamadas());
|
|
1410
1575
|
};
|
|
1411
|
-
this.cancelarToque =
|
|
1576
|
+
this.cancelarToque = f, window.addEventListener("pointermove", l, { passive: !1 }), window.addEventListener("pointerup", p), window.addEventListener("pointercancel", f);
|
|
1412
1577
|
});
|
|
1413
1578
|
});
|
|
1414
1579
|
}
|
|
1415
1580
|
}
|
|
1416
|
-
const
|
|
1417
|
-
function
|
|
1581
|
+
const sr = "ui_camadas_estado_";
|
|
1582
|
+
function lr(e, t) {
|
|
1418
1583
|
const a = (e || t || "default").trim();
|
|
1419
|
-
return `${
|
|
1584
|
+
return `${sr}${a}`;
|
|
1420
1585
|
}
|
|
1421
|
-
function
|
|
1586
|
+
function xe(e) {
|
|
1422
1587
|
return !!e && typeof e == "object" && !Array.isArray(e);
|
|
1423
1588
|
}
|
|
1424
|
-
function
|
|
1589
|
+
function da(e) {
|
|
1425
1590
|
return e !== "__proto__" && e !== "constructor" && e !== "prototype";
|
|
1426
1591
|
}
|
|
1427
|
-
function
|
|
1592
|
+
function re(e) {
|
|
1428
1593
|
return Array.isArray(e) ? e.filter((t) => typeof t == "string") : [];
|
|
1429
1594
|
}
|
|
1430
|
-
function
|
|
1431
|
-
if (!
|
|
1595
|
+
function ua(e) {
|
|
1596
|
+
if (!xe(e)) return;
|
|
1432
1597
|
const t = {};
|
|
1433
1598
|
return typeof e.name == "string" && (t.name = e.name), typeof e.visible == "boolean" && (t.visible = e.visible), typeof e.locked == "boolean" && (t.locked = e.locked), typeof e.opacity == "number" && Number.isFinite(e.opacity) && e.opacity >= 0 && e.opacity <= 1 && (t.opacity = e.opacity), typeof e.color == "string" && (t.color = e.color), (typeof e.parentId == "string" || e.parentId === null) && (t.parentId = e.parentId), t;
|
|
1434
1599
|
}
|
|
1435
|
-
function
|
|
1436
|
-
if (!
|
|
1600
|
+
function cr(e) {
|
|
1601
|
+
if (!xe(e)) return null;
|
|
1437
1602
|
const t = {};
|
|
1438
|
-
if (
|
|
1603
|
+
if (xe(e.camadasOverrides))
|
|
1439
1604
|
for (const [r, i] of Object.entries(e.camadasOverrides)) {
|
|
1440
|
-
if (!
|
|
1441
|
-
const o =
|
|
1605
|
+
if (!da(r)) continue;
|
|
1606
|
+
const o = ua(i);
|
|
1442
1607
|
if (!o) continue;
|
|
1443
|
-
const n =
|
|
1608
|
+
const n = ua(i.origem);
|
|
1444
1609
|
t[r] = n ? { ...o, origem: n } : o;
|
|
1445
1610
|
}
|
|
1446
1611
|
const a = e.altura;
|
|
1447
1612
|
return {
|
|
1448
1613
|
versao: typeof e.versao == "number" ? e.versao : 1,
|
|
1449
|
-
expandedLayerIds:
|
|
1450
|
-
collapsedLayerIds:
|
|
1614
|
+
expandedLayerIds: re(e.expandedLayerIds),
|
|
1615
|
+
collapsedLayerIds: re(e.collapsedLayerIds),
|
|
1451
1616
|
camadaAtivaId: typeof e.camadaAtivaId == "string" ? e.camadaAtivaId : null,
|
|
1452
1617
|
painelColapsado: typeof e.painelColapsado == "boolean" ? e.painelColapsado : void 0,
|
|
1453
|
-
ordemCamadasIds:
|
|
1454
|
-
ordemOrigemIds: Array.isArray(e.ordemOrigemIds) ?
|
|
1618
|
+
ordemCamadasIds: re(e.ordemCamadasIds),
|
|
1619
|
+
ordemOrigemIds: Array.isArray(e.ordemOrigemIds) ? re(e.ordemOrigemIds) : void 0,
|
|
1455
1620
|
ordemFilhosPorPai: (() => {
|
|
1456
|
-
if (!
|
|
1621
|
+
if (!xe(e.ordemFilhosPorPai)) return;
|
|
1457
1622
|
const r = {};
|
|
1458
1623
|
for (const [i, o] of Object.entries(e.ordemFilhosPorPai)) {
|
|
1459
|
-
if (!
|
|
1460
|
-
const n =
|
|
1624
|
+
if (!da(i)) continue;
|
|
1625
|
+
const n = re(o);
|
|
1461
1626
|
n.length > 0 && (r[i] = n);
|
|
1462
1627
|
}
|
|
1463
1628
|
return Object.keys(r).length > 0 ? r : void 0;
|
|
@@ -1469,18 +1634,18 @@ function xt(e) {
|
|
|
1469
1634
|
ultimaAtualizacao: typeof e.ultimaAtualizacao == "number" ? e.ultimaAtualizacao : void 0
|
|
1470
1635
|
};
|
|
1471
1636
|
}
|
|
1472
|
-
function
|
|
1637
|
+
function Te(e) {
|
|
1473
1638
|
if (typeof window > "u" || typeof localStorage > "u")
|
|
1474
1639
|
return null;
|
|
1475
1640
|
try {
|
|
1476
1641
|
const t = localStorage.getItem(e);
|
|
1477
|
-
return t ?
|
|
1642
|
+
return t ? cr(JSON.parse(t)) : null;
|
|
1478
1643
|
} catch (t) {
|
|
1479
1644
|
console.warn(`[UI-Camadas] Não foi possível carregar o estado persistido (${e}):`, t);
|
|
1480
1645
|
}
|
|
1481
1646
|
return null;
|
|
1482
1647
|
}
|
|
1483
|
-
function
|
|
1648
|
+
function dr(e, t) {
|
|
1484
1649
|
if (!(typeof window > "u" || typeof localStorage > "u"))
|
|
1485
1650
|
try {
|
|
1486
1651
|
localStorage.setItem(e, JSON.stringify(t));
|
|
@@ -1488,14 +1653,14 @@ function wt(e, t) {
|
|
|
1488
1653
|
console.warn(`[UI-Camadas] Não foi possível salvar o estado persistido (${e}):`, a);
|
|
1489
1654
|
}
|
|
1490
1655
|
}
|
|
1491
|
-
function
|
|
1656
|
+
function ur(e) {
|
|
1492
1657
|
if (!(typeof window > "u" || typeof localStorage > "u"))
|
|
1493
1658
|
try {
|
|
1494
1659
|
localStorage.removeItem(e);
|
|
1495
1660
|
} catch {
|
|
1496
1661
|
}
|
|
1497
1662
|
}
|
|
1498
|
-
function
|
|
1663
|
+
function Ha(e) {
|
|
1499
1664
|
return {
|
|
1500
1665
|
name: e.name,
|
|
1501
1666
|
visible: e.visible !== !1,
|
|
@@ -1505,61 +1670,61 @@ function ba(e) {
|
|
|
1505
1670
|
parentId: e.parentId !== void 0 ? e.parentId : null
|
|
1506
1671
|
};
|
|
1507
1672
|
}
|
|
1508
|
-
function
|
|
1673
|
+
function fr(e, t, a, r) {
|
|
1509
1674
|
var p;
|
|
1510
1675
|
if (!Array.isArray(e)) return;
|
|
1511
1676
|
const i = (t == null ? void 0 : t.camadasOverrides) || {}, o = new Set((t == null ? void 0 : t.expandedLayerIds) || []), n = new Set((t == null ? void 0 : t.collapsedLayerIds) || []), s = o.size > 0 || n.size > 0;
|
|
1512
|
-
for (let
|
|
1513
|
-
const
|
|
1514
|
-
if (r == null || r.set(
|
|
1515
|
-
const
|
|
1516
|
-
var
|
|
1517
|
-
const v = (
|
|
1518
|
-
return
|
|
1677
|
+
for (let d = 0; d < e.length; d++) {
|
|
1678
|
+
const u = e[d], h = i[u.id];
|
|
1679
|
+
if (r == null || r.set(u.id, Ha(u)), h) {
|
|
1680
|
+
const m = h.origem, g = (y) => {
|
|
1681
|
+
var b;
|
|
1682
|
+
const v = (b = r == null ? void 0 : r.get(u.id)) == null ? void 0 : b[y];
|
|
1683
|
+
return m !== void 0 && m[y] !== v;
|
|
1519
1684
|
};
|
|
1520
|
-
typeof
|
|
1685
|
+
typeof h.name == "string" && h.name.trim() && !g("name") && (u.name = h.name), typeof h.visible == "boolean" && !g("visible") && (u.visible = h.visible), typeof h.locked == "boolean" && !g("locked") && (u.locked = h.locked), typeof h.opacity == "number" && !g("opacity") && (u.opacity = h.opacity), typeof h.color == "string" && !g("color") && (u.color = h.color), h.parentId !== void 0 && !g("parentId") && (u.parentId = h.parentId);
|
|
1521
1686
|
}
|
|
1522
|
-
s ? o.has(
|
|
1687
|
+
s ? o.has(u.id) ? a.add(u.id) : n.has(u.id) ? a.delete(u.id) : a.add(u.id) : a.add(u.id);
|
|
1523
1688
|
}
|
|
1524
|
-
for (let
|
|
1525
|
-
const
|
|
1526
|
-
|
|
1689
|
+
for (let d = 0; d < e.length; d++) {
|
|
1690
|
+
const u = e[d];
|
|
1691
|
+
u.parentId && (u.parentId === u.id || T(e, u.parentId, u.id)) && (u.parentId = ((p = r == null ? void 0 : r.get(u.id)) == null ? void 0 : p.parentId) ?? null);
|
|
1527
1692
|
}
|
|
1528
|
-
const
|
|
1529
|
-
if (!(Array.isArray(
|
|
1530
|
-
const
|
|
1531
|
-
return
|
|
1693
|
+
const l = new Set(e.map((d) => d.id)), c = t == null ? void 0 : t.ordemOrigemIds;
|
|
1694
|
+
if (!(Array.isArray(c) && (() => {
|
|
1695
|
+
const d = new Set(c), u = (h) => h.filter((m) => l.has(m) && d.has(m)).join("|");
|
|
1696
|
+
return u(c) !== u(e.map((h) => h.id));
|
|
1532
1697
|
})()) && Array.isArray(t == null ? void 0 : t.ordemCamadasIds) && t.ordemCamadasIds.length > 0) {
|
|
1533
|
-
const
|
|
1534
|
-
t.ordemCamadasIds.forEach((
|
|
1535
|
-
const
|
|
1536
|
-
return
|
|
1698
|
+
const d = /* @__PURE__ */ new Map();
|
|
1699
|
+
t.ordemCamadasIds.forEach((u, h) => d.set(u, h)), e.sort((u, h) => {
|
|
1700
|
+
const m = d.has(u.id) ? d.get(u.id) : 1 / 0, g = d.has(h.id) ? d.get(h.id) : 1 / 0;
|
|
1701
|
+
return m - g;
|
|
1537
1702
|
});
|
|
1538
1703
|
}
|
|
1539
1704
|
}
|
|
1540
|
-
function
|
|
1705
|
+
function pr(e) {
|
|
1541
1706
|
const { estadoAnterior: t, camadas: a, expandedLayers: r } = e;
|
|
1542
1707
|
let i = (t == null ? void 0 : t.expandedLayerIds) || [], o = (t == null ? void 0 : t.collapsedLayerIds) || [], n = (t == null ? void 0 : t.ordemCamadasIds) || [], s = t == null ? void 0 : t.ordemOrigemIds;
|
|
1543
|
-
const
|
|
1708
|
+
const l = {
|
|
1544
1709
|
...(t == null ? void 0 : t.camadasOverrides) || {}
|
|
1545
1710
|
};
|
|
1546
|
-
a.length > 0 && (i = [], o = [], n = a.map((
|
|
1547
|
-
var p,
|
|
1548
|
-
r.has(
|
|
1549
|
-
name:
|
|
1550
|
-
visible:
|
|
1551
|
-
locked: !!
|
|
1552
|
-
opacity: typeof
|
|
1553
|
-
color:
|
|
1554
|
-
parentId:
|
|
1555
|
-
origem: ((p = e.origensCamadas) == null ? void 0 : p.get(
|
|
1711
|
+
a.length > 0 && (i = [], o = [], n = a.map((f) => f.id), s = e.origensCamadas ? [...e.origensCamadas.keys()] : n, a.forEach((f) => {
|
|
1712
|
+
var p, d;
|
|
1713
|
+
r.has(f.id) ? i.push(f.id) : o.push(f.id), l[f.id] = {
|
|
1714
|
+
name: f.name,
|
|
1715
|
+
visible: f.visible !== !1,
|
|
1716
|
+
locked: !!f.locked,
|
|
1717
|
+
opacity: typeof f.opacity == "number" ? f.opacity : 1,
|
|
1718
|
+
color: f.color || "#00E08A",
|
|
1719
|
+
parentId: f.parentId !== void 0 ? f.parentId : null,
|
|
1720
|
+
origem: ((p = e.origensCamadas) == null ? void 0 : p.get(f.id)) ?? ((d = l[f.id]) == null ? void 0 : d.origem)
|
|
1556
1721
|
};
|
|
1557
1722
|
}));
|
|
1558
|
-
for (const
|
|
1559
|
-
let
|
|
1560
|
-
return e.ordemFilhosPorPai && e.ordemFilhosPorPai.size > 0 ? (
|
|
1561
|
-
|
|
1562
|
-
}), Object.keys(
|
|
1723
|
+
for (const f of e.camadasRemovidas ?? []) delete l[f];
|
|
1724
|
+
let c;
|
|
1725
|
+
return e.ordemFilhosPorPai && e.ordemFilhosPorPai.size > 0 ? (c = {}, e.ordemFilhosPorPai.forEach((f, p) => {
|
|
1726
|
+
f.length > 0 && (c[p] = [...f]);
|
|
1727
|
+
}), Object.keys(c).length === 0 && (c = void 0)) : !a.length && (t != null && t.ordemFilhosPorPai) && (c = t.ordemFilhosPorPai), {
|
|
1563
1728
|
versao: 1,
|
|
1564
1729
|
expandedLayerIds: i,
|
|
1565
1730
|
collapsedLayerIds: o,
|
|
@@ -1567,29 +1732,29 @@ function It(e) {
|
|
|
1567
1732
|
painelColapsado: e.painelColapsado,
|
|
1568
1733
|
ordemCamadasIds: n,
|
|
1569
1734
|
ordemOrigemIds: s,
|
|
1570
|
-
ordemFilhosPorPai:
|
|
1735
|
+
ordemFilhosPorPai: c,
|
|
1571
1736
|
mapaBaseAtivo: e.mapaBaseAtivo,
|
|
1572
1737
|
densidade: e.densidade,
|
|
1573
1738
|
altura: e.altura,
|
|
1574
|
-
camadasOverrides:
|
|
1739
|
+
camadasOverrides: l,
|
|
1575
1740
|
ultimaAtualizacao: Date.now()
|
|
1576
1741
|
};
|
|
1577
1742
|
}
|
|
1578
|
-
const kt = `:host{display:flex;flex-direction:column;box-sizing:border-box;font-family:inherit;font-size:11px;color:var(--ui-cor-texto, #e1e1e6);-webkit-user-select:none;user-select:none;width:100%;height:var(--ui-camadas-altura, 100%);min-height:var(--ui-camadas-min-altura, 140px);position:relative;--camada-respiro: 8px;--camada-barra-altura: 28px;--camada-linha-altura: 25px;--camada-thumb-tamanho: 20px;--camada-indent-nivel: 16px;--camada-transicao: .16s cubic-bezier(.16, 1, .3, 1)}:host([densidade="compacto"]){--camada-linha-altura: 22px;--camada-thumb-tamanho: 17px;font-size:10px}:host([flutuante]){position:absolute;top:10px;right:10px;bottom:46px;z-index:var(--ui-z-workspace-hud, 500);width:auto;height:var(--ui-camadas-altura, auto)}*,*:before,*:after{box-sizing:border-box}:host(:not([flutuante])) .ui-camadas-container{max-width:100%;min-width:0;border:none;box-shadow:none;border-radius:0;background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none}:host(:not([flutuante])) .ui-camadas-container[data-borda-canvas=esquerda]{border-left:2px solid var(--ui-camadas-borda-canvas, color-mix(in srgb, var(--ui-cor-texto, #e1e1e6) 18%, transparent))}:host(:not([flutuante])) .ui-camadas-container[data-borda-canvas=direita]{border-right:2px solid var(--ui-camadas-borda-canvas, color-mix(in srgb, var(--ui-cor-texto, #e1e1e6) 18%, transparent))}:host(:not([flutuante])) .ui-camadas-container[data-borda-canvas=ambas]{border-left:2px solid var(--ui-camadas-borda-canvas, color-mix(in srgb, var(--ui-cor-texto, #e1e1e6) 18%, transparent));border-right:2px solid var(--ui-camadas-borda-canvas, color-mix(in srgb, var(--ui-cor-texto, #e1e1e6) 18%, transparent))}.ui-camadas-container{display:flex;flex-direction:column;flex:1 1 auto;height:100%;min-height:0;width:100%;max-width:380px;min-width:270px;background:var(--ui-degrade-interno, var(--ui-camadas-fundo, var(--ui-fundo-superficie, var(--ui-cor-superficie, #141417))));border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:var(--ui-raio-borda, 8px);box-shadow:var(--ui-sombra-lg, 0 10px 30px -4px rgba(0, 0, 0, .5)),0 0 0 1px color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 5%,transparent);overflow:hidden;position:relative;transition:transform .24s cubic-bezier(.16,1,.3,1),opacity .2s ease;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}:host([colapsado]) .ui-camadas-container{transform:translate(calc(100% + 24px));opacity:0;pointer-events:none}.ui-camadas-toggle-flutuante{display:none;position:absolute;top:10px;right:10px;z-index:calc(var(--ui-z-workspace-hud, 500) - 1);background:var(--ui-camadas-toggle-fundo, var(--ui-fundo-superficie, var(--ui-cor-superficie, #141417)));border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .18));border-radius:var(--ui-raio-borda, 6px);color:var(--ui-cor-texto, #ffffff);width:34px;height:34px;cursor:pointer;align-items:center;justify-content:center;box-shadow:var(--ui-sombra-md, 0 8px 20px rgba(0, 0, 0, .45));transition:all var(--camada-transicao)}:host([colapsado][flutuante]) .ui-camadas-toggle-flutuante{display:flex}.ui-camadas-toggle-flutuante:hover{border-color:var(--ui-cor-primaria, #00E08A);color:var(--ui-cor-primaria, #00E08A);transform:scale(1.08);box-shadow:0 0 14px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 35%,transparent)}.ui-camadas-btn-colapsar{background:transparent;border:none;color:var(--ui-cor-texto-secundario, #888899);width:22px;height:22px;cursor:pointer;border-radius:var(--ui-raio-sm, 4px);display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:all var(--camada-transicao)}.ui-camadas-btn-colapsar:hover{color:var(--ui-cor-texto, #ffffff);background:var(--ui-cor-hover-menu, rgba(255, 255, 255, .09))}.ui-camadas-corpo{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;padding:0 var(--camada-respiro) var(--camada-respiro);display:flex;flex-direction:column;gap:6px;scrollbar-width:thin;scrollbar-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 16%,transparent) transparent}.ui-camadas-corpo::-webkit-scrollbar{width:4px}.ui-camadas-corpo::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 18%,transparent);border-radius:var(--ui-raio-sm, 4px)}.ui-camadas-corpo::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 32%,transparent)}.ui-tree-toolbar{display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;height:var(--camada-barra-altura);min-height:var(--camada-barra-altura);flex-shrink:0;margin:0 calc(-1 * var(--camada-respiro));padding:0 var(--camada-respiro);gap:8px;border-bottom:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .06))}.ui-tree-title-group{display:flex;align-items:center;gap:5px}.ui-tree-section-title{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.6px;color:var(--ui-cor-texto-secundario, #888899)}.ui-tree-count-badge{font-size:9px;font-family:var(--ui-fonte-codigo, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);font-variant-numeric:tabular-nums;background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 7%,transparent);color:var(--ui-cor-texto-secundario, #888899);padding:1px 5px;border-radius:8px;border:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 6%,transparent)}.ui-tree-actions{display:flex;align-items:center;gap:3px}.ui-tree-action-btn{background:transparent;border:none;color:var(--ui-cor-texto-secundario, #888899);border-radius:var(--ui-raio-sm, 4px);width:24px;height:24px;padding:0;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all var(--camada-transicao)}.ui-tree-action-btn:hover{color:var(--ui-cor-texto, #ffffff);background:var(--ui-cor-hover-menu, rgba(255, 255, 255, .09))}.ui-tree-btn-new{background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 14%,transparent);border:none;color:var(--ui-cor-primaria, #00E08A);border-radius:var(--ui-raio-sm, 4px);height:24px;padding:0 8px;font-size:10px;font-weight:600;cursor:pointer;display:flex;align-items:center;gap:4px;transition:all var(--camada-transicao)}.ui-tree-btn-new:hover{background:var(--ui-cor-primaria, #00E08A);color:var(--ui-cor-texto-sobre-primaria, #000000)}.ui-tree-search-wrapper{position:relative;display:flex;align-items:center;margin:1px 0}.ui-tree-search-icon{position:absolute;left:8px;color:var(--ui-cor-texto-secundario, #888899);pointer-events:none;display:flex;align-items:center}.ui-tree-search-input{width:100%;height:25px;background:var(--ui-cor-fundo, #0a0a0c);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .1));border-radius:var(--ui-raio-borda, 5px);padding:0 24px 0 26px;color:var(--ui-cor-texto, #ffffff);font-size:10.5px;outline:none;transition:border-color var(--camada-transicao),box-shadow var(--camada-transicao)}.ui-tree-search-input:focus{border-color:var(--ui-cor-primaria, #00E08A);box-shadow:0 0 0 2px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 18%,transparent)}.ui-tree-search-clear{position:absolute;right:5px;background:transparent;border:none;color:var(--ui-cor-texto-secundario, #888899);cursor:pointer;width:18px;height:18px;display:flex;align-items:center;justify-content:center;border-radius:3px;transition:all var(--camada-transicao)}.ui-tree-search-clear:hover{color:var(--ui-cor-texto, #ffffff);background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 10%,transparent)}.ui-panel-box{background:var(--ui-cor-fundo, #0c0c0f);border:none;border-top:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .08));border-radius:0;margin:0 calc(-1 * var(--camada-respiro)) calc(-1 * var(--camada-respiro));overflow:hidden;display:flex;flex-direction:column;flex:1 1 0%;min-height:140px}.ui-search-empty{padding:14px 10px;text-align:center;font-size:11px;color:var(--ui-cor-texto-secundario, #888899);overflow-wrap:anywhere}.ui-layer-tree{flex:1 1 0%;min-height:40px;overflow-y:auto;overflow-x:hidden}.ui-layer-group{border-bottom:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .04));transition:background var(--camada-transicao)}.ui-layer-group.drop-into{background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 9%,transparent)!important;outline:1.5px dashed var(--ui-cor-primaria, #00E08A);outline-offset:-1.5px}.ui-layer-row,.ui-feat-row{display:flex;align-items:center;height:var(--camada-linha-altura);min-height:var(--camada-linha-altura);max-height:var(--camada-linha-altura);padding:0 4px;-webkit-user-select:none;user-select:none;cursor:default;transition:background .1s ease;position:relative}.ui-layer-row{background:var(--ui-cor-fundo-elevado, #18181d);font-weight:600;cursor:pointer;border-left:3px solid transparent}.ui-layer-row:hover{background:var(--ui-cor-hover-menu, #22222a)}.ui-layer-row.active-drawing-layer{background:color-mix(in srgb,var(--layer-active-color, var(--ui-cor-primaria, #00E08A)) 18%,var(--ui-cor-fundo-elevado, #18181d))!important;border-left:3px solid var(--layer-active-color, var(--ui-cor-primaria, #00E08A))!important;box-shadow:inset 0 0 12px color-mix(in srgb,var(--layer-active-color, var(--ui-cor-primaria, #00E08A)) 10%,transparent)}.ui-layer-row.active-drawing-layer .ui-name-text{color:var(--ui-cor-texto, #e1e1e6);font-weight:700}.ui-feat-row{border-left:3px solid transparent;padding-left:13px;background:var(--ui-cor-fundo, #101014);font-weight:400;cursor:pointer}.ui-feat-row:hover{background:var(--ui-cor-hover-menu, #19191f)}.ui-feat-row.selected-row{background:color-mix(in srgb,var(--layer-active-color, var(--ui-cor-texto-info, #33b5ff)) 20%,var(--ui-cor-fundo, #101014))!important;outline:1px solid color-mix(in srgb,var(--layer-active-color, var(--ui-cor-texto-info, #33b5ff)) 55%,transparent)!important;outline-offset:-1px}.ui-layer-row.hidden-layer,.ui-feat-row.hidden-row{opacity:.52}.ui-layer-row.hidden-layer .ui-col-eye,.ui-feat-row.hidden-row .ui-col-eye{color:var(--ui-cor-texto-alerta, #ffb86c);opacity:.95}.ui-layer-row.dragging,.ui-feat-row.dragging{opacity:.35;background:color-mix(in srgb,var(--ui-cor-texto-info, #33b5ff) 16%,transparent)!important}.ui-layer-row.drop-above:before,.ui-feat-row.drop-above:before{content:"";position:absolute;top:0;left:0;right:0;height:2px;background:var(--ui-cor-texto-info, #33b5ff);box-shadow:0 0 8px color-mix(in srgb,var(--ui-cor-texto-info, #33b5ff) 100%,transparent);z-index:20;pointer-events:none}.ui-layer-row.drop-below:after,.ui-feat-row.drop-below:after{content:"";position:absolute;bottom:0;left:0;right:0;height:2px;background:var(--ui-cor-texto-info, #33b5ff);box-shadow:0 0 8px color-mix(in srgb,var(--ui-cor-texto-info, #33b5ff) 100%,transparent);z-index:20;pointer-events:none}.ui-layer-row.drop-into{background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 16%,transparent)!important;outline:1.5px dashed var(--ui-cor-primaria, #00E08A)!important;outline-offset:-2px;border-radius:var(--ui-raio-sm, 4px)}.ui-layer-row.is-sublayer{background:color-mix(in srgb,var(--ui-cor-fundo-elevado, #18181d) 70%,transparent)}.ui-group-folder-icon{display:inline-flex;align-items:center;justify-content:center;color:var(--ui-cor-texto-alerta, #ffb86c);margin-right:4px;flex-shrink:0}.ui-col{display:flex;align-items:center;justify-content:center;flex-shrink:0;height:var(--camada-linha-altura)}.ui-col-drag{width:8px;margin-right:1px;cursor:grab;color:var(--ui-cor-texto-secundario, #888899);opacity:.35;touch-action:none;transition:opacity var(--camada-transicao),color var(--camada-transicao)}.ui-layer-row:hover .ui-col-drag,.ui-feat-row:hover .ui-col-drag{opacity:.9;color:var(--ui-cor-primaria, #00E08A)}.ui-col-drag:active{cursor:grabbing}.ui-col-eye{width:20px;cursor:pointer;color:var(--ui-cor-texto-secundario, #888899);transition:color var(--camada-transicao)}.ui-col-eye:hover{color:var(--ui-cor-primaria, #00E08A)}.ui-col-lock{width:18px;cursor:pointer;color:var(--ui-cor-texto-secundario, #888899);transition:color var(--camada-transicao)}.ui-col-lock:hover{color:var(--ui-cor-texto-alerta, #ffb86c)}.ui-col-colorbar{width:5px;height:16px;margin:0 3px 0 2px;border-radius:1.5px;flex-shrink:0}.ui-col-colorbar-editavel{position:relative;width:5px;height:18px;cursor:pointer}.ui-col-colorbar-editavel:before{content:"";position:absolute;top:-3px;right:-4px;bottom:-3px;left:-4px}.ui-col-colorbar-editavel:hover,.ui-col-colorbar-editavel:focus-visible{filter:brightness(1.3);outline:none}.ui-col-chevron,.ui-feat-row .ui-col-thumb{margin-left:calc(var(--layer-depth, 0) * var(--camada-indent-nivel, 16px))}.ui-col-chevron{width:14px;cursor:pointer;color:var(--ui-cor-texto-secundario, #888899);display:flex;align-items:center;justify-content:center}.ui-chevron-icon{display:inline-flex;align-items:center;justify-content:center;transition:transform var(--camada-transicao)}.ui-chevron-icon.open{transform:rotate(90deg)}.ui-col-thumb{width:calc(var(--camada-thumb-tamanho) + 3px);margin-right:4px;display:flex;align-items:center;justify-content:center}.ui-thumb-box{width:var(--camada-thumb-tamanho);height:var(--camada-thumb-tamanho);border:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 15%,transparent);border-radius:3px;background:var(--ui-cor-fundo, #0d0d10);box-sizing:border-box;overflow:hidden;display:flex;align-items:center;justify-content:center}.ui-col-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10.5px;color:var(--ui-cor-texto, #e1e1e6);padding-left:2px;padding-right:4px;cursor:pointer;display:flex;align-items:center;justify-content:flex-start;text-align:left;gap:4px}.ui-name-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-count-chip{font-size:9px;font-family:var(--ui-fonte-codigo, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);font-variant-numeric:tabular-nums;color:var(--ui-cor-texto-secundario, #888899);font-weight:400;padding:0 2px;flex-shrink:0}.ui-col-actions{display:flex;align-items:center;gap:2px;opacity:0;transition:opacity var(--camada-transicao)}.ui-layer-row:hover .ui-col-actions,.ui-feat-row:hover .ui-col-actions,.ui-layer-row:focus-within .ui-col-actions,.ui-feat-row:focus-within .ui-col-actions,.ui-col-actions:has(.ui-micro-btn.active){opacity:1}.ui-micro-btn{background:transparent;border:none;color:var(--ui-cor-texto-secundario, #888899);width:18px;height:18px;padding:0;border-radius:3px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all var(--camada-transicao)}.ui-micro-btn:hover{color:var(--ui-cor-primaria, #00E08A);background:var(--ui-cor-hover-menu, rgba(255, 255, 255, .12))}.ui-micro-btn.active{color:var(--ui-cor-primaria, #00E08A);background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 18%,transparent)}.ui-col-target{width:22px;cursor:pointer}.ui-target-circle{width:11px;height:11px;border-radius:50%;border:1.5px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 32%,transparent);background:transparent;transition:all .12s ease}.ui-col-target:hover .ui-target-circle{border-color:var(--ui-cor-texto-info, #33b5ff);transform:scale(1.18)}.ui-target-circle.selected{border:2px solid var(--layer-active-color, var(--ui-cor-texto-info, #33b5ff));background:var(--layer-active-color, var(--ui-cor-texto-info, #33b5ff));box-shadow:inset 0 0 0 2px var(--ui-cor-superficie, #141418)}.ui-target-circle.partial{border:2px solid var(--layer-active-color, var(--ui-cor-texto-info, #33b5ff));background:color-mix(in srgb,var(--layer-active-color, var(--ui-cor-texto-info, #33b5ff)) 40%,transparent)}.ui-inline-rename-input{width:100%;height:20px;background:var(--ui-cor-fundo, #0d0d10);color:var(--ui-cor-texto, #e1e1e6);border:1px solid var(--ui-cor-primaria, #00E08A);border-radius:3px;font-size:10.5px;padding:0 4px;outline:none;box-shadow:0 0 8px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 40%,transparent)}.ui-layer-settings-drawer{background:linear-gradient(180deg,var(--ui-cor-fundo-elevado, #17171e) 0%,var(--ui-cor-superficie, #0f0f13) 100%);padding:10px 14px 12px;border-top:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 8%,transparent);border-bottom:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 12%,transparent);border-left:3px solid var(--drawer-cor-camada, var(--ui-cor-primaria, #00E08A));display:flex;flex-direction:column;gap:10px;box-shadow:inset 0 1px color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 6%,transparent),0 6px 16px #00000073;animation:drawerSlideDown .18s cubic-bezier(.16,1,.3,1);position:relative;z-index:10}@keyframes drawerSlideDown{0%{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}.ui-drawer-header{display:flex;align-items:center;justify-content:space-between;padding-bottom:6px;border-bottom:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 7%,transparent)}.ui-drawer-header-left{display:flex;align-items:center;gap:7px;min-width:0}.ui-drawer-icon{color:var(--drawer-cor-camada, var(--ui-cor-primaria, #00E08A));display:flex;align-items:center;flex-shrink:0}.ui-drawer-title{font-size:10.5px;font-weight:700;color:var(--ui-cor-texto, #e1e1e6);text-transform:uppercase;letter-spacing:.6px;white-space:nowrap}.ui-drawer-layer-chip{font-size:9.5px;font-weight:500;color:var(--ui-cor-texto-secundario, #888899);background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 7%,transparent);padding:1px 6px;border-radius:var(--ui-raio-sm, 4px);border:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 8%,transparent);max-width:130px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-drawer-btn-fechar{background:transparent;border:none;color:var(--ui-cor-texto-secundario, #888899);width:20px;height:20px;padding:0;border-radius:var(--ui-raio-sm, 4px);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all var(--camada-transicao)}.ui-drawer-btn-fechar:hover{color:var(--ui-cor-texto, #e1e1e6);background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 12%,transparent)}.ui-drawer-body{display:flex;flex-direction:column;gap:10px}.ui-drawer-row{display:flex;flex-direction:column;gap:5px}.ui-drawer-row-label{display:flex;justify-content:space-between;align-items:center;font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.4px;color:var(--ui-cor-texto-secundario, #888899)}.ui-drawer-color-group{display:flex;align-items:center;justify-content:space-between;gap:8px}.ui-drawer-color-pill{position:relative;display:inline-flex;align-items:center;gap:6px;padding:3px 8px 3px 5px;background:var(--ui-cor-fundo, #0b0b0d);border:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 16%,transparent);border-radius:var(--ui-raio-sm, 4px);cursor:pointer;transition:all var(--camada-transicao);-webkit-user-select:none;user-select:none}.ui-drawer-color-pill:hover{border-color:var(--drawer-cor-camada, var(--ui-cor-primaria, #00E08A));background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 8%,transparent);box-shadow:0 0 10px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 25%,transparent)}.ui-drawer-color-sample{width:14px;height:14px;border-radius:3px;border:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 35%,transparent);box-shadow:var(--ui-sombra-sm, 0 1px 3px rgba(0, 0, 0, .5));flex-shrink:0;transition:background-color .1s ease}.ui-drawer-color-hex{font-size:10px;font-family:var(--ui-fonte-codigo, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);font-variant-numeric:tabular-nums;font-weight:700;color:var(--ui-cor-texto, #e1e1e6);letter-spacing:.5px}.ui-drawer-color-native{position:absolute;opacity:0;width:0;height:0;pointer-events:none}.ui-drawer-badge{font-size:9.5px;font-family:var(--ui-fonte-codigo, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);font-variant-numeric:tabular-nums;font-weight:700;color:var(--ui-cor-texto, #e1e1e6);background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 10%,transparent);padding:1px 6px;border-radius:var(--ui-raio-sm, 4px);border:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 12%,transparent)}.ui-drawer-slider-container{display:flex;flex-direction:column;gap:4px}.ui-drawer-slider{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;height:5px;background:linear-gradient(90deg,color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 8%,transparent) 0%,var(--drawer-cor-camada, var(--ui-cor-primaria, #00E08A)) 100%);border-radius:3px;outline:none;margin:3px 0;cursor:pointer;border:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 12%,transparent)}.ui-drawer-slider::-webkit-slider-thumb{-webkit-appearance:none;width:14px;height:14px;border-radius:50%;background:var(--ui-camadas-slider-thumb, #ffffff);border:3px solid var(--drawer-cor-camada, var(--ui-cor-primaria, #00E08A));box-shadow:0 0 6px #0009,0 0 10px var(--drawer-cor-camada, rgba(0, 224, 138, .6));cursor:pointer;transition:transform .12s ease}.ui-drawer-slider::-webkit-slider-thumb:hover{transform:scale(1.22)}.ui-drawer-slider::-moz-range-thumb{width:14px;height:14px;border-radius:50%;background:var(--ui-camadas-slider-thumb, #ffffff);border:3px solid var(--drawer-cor-camada, var(--ui-cor-primaria, #00E08A));box-shadow:0 0 6px #0009,0 0 10px var(--drawer-cor-camada, rgba(0, 224, 138, .6));cursor:pointer}.ui-drawer-footer{display:flex;align-items:center;justify-content:space-between;padding-top:8px;border-top:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 7%,transparent)}.ui-drawer-meta-info{font-size:9.5px;color:var(--ui-cor-texto-secundario, #888899);font-style:italic}.ui-drawer-actions{display:flex;align-items:center;gap:6px}.ui-drawer-btn-danger{background:color-mix(in srgb,var(--ui-cor-texto-erro, #ff5555) 10%,transparent);border:1px solid color-mix(in srgb,var(--ui-cor-texto-erro, #ff5555) 35%,transparent);color:var(--ui-cor-texto-erro, #ff5555);border-radius:var(--ui-raio-sm, 4px);height:24px;padding:0 10px;font-size:10px;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;gap:5px;transition:all var(--camada-transicao)}.ui-drawer-btn-danger:hover{background:var(--ui-cor-botao-destrutivo-fundo, #d32f2f);color:var(--ui-cor-botao-destrutivo-texto, #ffffff);border-color:var(--ui-cor-botao-destrutivo-fundo, #d32f2f);box-shadow:0 0 10px color-mix(in srgb,var(--ui-cor-texto-erro, #ff5555) 45%,transparent);transform:translateY(-.5px)}.ui-drawer-btn-danger.confirming{background:var(--ui-cor-botao-destrutivo-hover, #b71c1c);color:var(--ui-cor-botao-destrutivo-texto, #ffffff);border-color:var(--ui-cor-botao-destrutivo-hover, #b71c1c);animation:pulseDanger 1.2s infinite}@keyframes pulseDanger{0%{transform:scale(1)}50%{transform:scale(1.02)}to{transform:scale(1)}}.ui-previa-dot{width:6px;height:6px;margin-left:4px;border-radius:50%;flex-shrink:0;background:var(--ui-cor-texto-alerta, #ffb86c);box-shadow:0 0 0 2px color-mix(in srgb,var(--ui-cor-texto-alerta, #ffb86c) 25%,transparent)}.ui-tree-footer{height:var(--camada-barra-altura);min-height:var(--camada-barra-altura);background:var(--ui-cor-fundo-elevado, #121216);border-top:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .08));display:flex;align-items:center;justify-content:space-between;padding:0 var(--camada-respiro);gap:6px;box-sizing:border-box;overflow:hidden;position:relative;flex-shrink:0;margin:0 calc(-1 * var(--camada-respiro))}.ui-footer-left{display:flex;align-items:center;gap:5px;white-space:nowrap;min-width:0;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis}.ui-footer-count{font-size:11px;font-family:var(--ui-fonte-codigo, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);font-variant-numeric:tabular-nums;font-weight:700;color:var(--ui-cor-primaria, #00E08A);flex-shrink:0}.ui-footer-label{display:inline-flex;align-items:center;color:var(--ui-cor-texto-secundario, #888899);flex-shrink:0}.ui-footer-actions-gerais{display:flex;align-items:center;gap:4px;flex-shrink:0}.ui-footer-chip-btn{background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 6%,transparent);border:none;color:var(--ui-cor-texto-secundario, #a0a0b0);font-size:10px;font-weight:600;height:22px;padding:0 8px;border-radius:var(--ui-raio-sm, 4px);cursor:pointer;display:inline-flex;align-items:center;gap:4px;transition:all var(--camada-transicao)}.ui-footer-chip-btn:hover{background:var(--ui-cor-hover-menu, rgba(255, 255, 255, .12));color:var(--ui-cor-texto, #ffffff)}.ui-footer-chip-btn.primario{background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 14%,transparent);color:var(--ui-cor-primaria, #00E08A)}.ui-footer-chip-btn.primario:hover{background:var(--ui-cor-primaria, #00E08A);color:var(--ui-cor-texto-sobre-primaria, #000000)}.ui-footer-right{display:flex;align-items:center;gap:4px;flex:1 1 auto;min-width:0}.ui-footer-btn{background:transparent;border:none;color:var(--ui-cor-texto-secundario, #888899);width:22px;height:22px;padding:0;cursor:pointer;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:all var(--camada-transicao);flex-shrink:0}.ui-footer-btn:hover:not(.disabled){color:var(--ui-cor-texto, #e1e1e6);background:var(--ui-cor-hover-menu, rgba(255, 255, 255, .12))}.ui-footer-btn.disabled{opacity:.25;cursor:not-allowed}.ui-footer-btn.btn-danger-footer:hover:not(.disabled){color:var(--ui-cor-texto-erro, #ff5555);background:color-mix(in srgb,var(--ui-cor-texto-erro, #ff5555) 15%,transparent)}.ui-footer-btn.confirming{background:var(--ui-cor-botao-destrutivo-hover, #b71c1c)!important;color:var(--ui-cor-botao-destrutivo-texto, #ffffff)!important}.ui-footer-move-wrapper{position:relative;display:flex;align-items:center;flex:1 1 auto;min-width:0}.ui-footer-select{-moz-appearance:none;appearance:none;-webkit-appearance:none;--_chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888899' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");background:var(--_chevron) right 6px center / 10px no-repeat,color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 6%,transparent);border:none;color:var(--ui-cor-texto, #e1e1e6);border-radius:var(--ui-raio-sm, 4px);font:inherit;font-size:10px;font-weight:500;height:22px;padding:0 22px 0 8px;cursor:pointer;width:100%;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-footer-select:hover:not(:disabled){background:var(--_chevron) right 6px center / 10px no-repeat,var(--ui-cor-hover-menu, rgba(255, 255, 255, .12))}.ui-footer-select:focus-visible{outline:1px solid var(--ui-cor-primaria, #00E08A)}.ui-drawer-btn-sublayer{background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 6%,transparent);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));color:var(--ui-cor-texto, #e1e1e6);font-size:10.5px;font-weight:500;padding:4px 8px;border-radius:4px;cursor:pointer;display:inline-flex;align-items:center;gap:4px;transition:all var(--camada-transicao)}.ui-drawer-btn-sublayer:hover{background:var(--ui-cor-hover-menu, rgba(255, 255, 255, .12));color:var(--ui-cor-primaria, #00E08A);border-color:var(--ui-cor-primaria, #00E08A)}.ui-drawer-select-wrapper{display:flex;align-items:center}.ui-drawer-select{background:var(--ui-cor-fundo, #16161c);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .15));color:var(--ui-cor-texto, #e1e1e6);border-radius:4px;font-size:10.5px;height:24px;padding:0 6px;cursor:pointer;max-width:140px}.ui-basemap-section{display:flex;flex-direction:column;gap:4px;flex-shrink:0}.ui-basemap-toggle{display:flex;align-items:center;gap:6px;width:100%;padding:2px;background:transparent;border:0;border-radius:var(--ui-raio-sm, 4px);font:inherit;color:inherit;cursor:pointer;text-align:left}.ui-basemap-toggle:hover .ui-basemap-title{color:var(--ui-cor-texto, #e1e1e6)}.ui-basemap-toggle:focus-visible{outline:2px solid var(--ui-cor-primaria, #00E08A);outline-offset:1px}.ui-basemap-atual{flex:1 1 auto;min-width:0;font-size:10px;color:var(--ui-cor-primaria, #00E08A);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:right}.ui-basemap-title{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.6px;color:var(--ui-cor-texto-secundario, #888899)}.ui-basemap-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:4px}.ui-basemap-section{container-type:inline-size}@container (min-width: 260px){.ui-basemap-grid{grid-template-columns:repeat(3,1fr)}}@container (min-width: 340px){.ui-basemap-grid{grid-template-columns:repeat(4,1fr)}}.ui-basemap-card{display:flex;flex-direction:column;align-items:center;gap:2px;padding:3px;border-radius:var(--ui-raio-borda, 5px);background:var(--ui-cor-fundo, #101014);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .08));cursor:pointer;transition:all var(--camada-transicao);text-align:center;overflow:hidden}.ui-basemap-card:hover{border-color:var(--ui-cor-primaria, #00E08A);background:var(--ui-cor-fundo-elevado, #17171c)}.ui-basemap-card.active{border-color:var(--ui-cor-primaria, #00E08A);background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 12%,transparent);color:var(--ui-cor-primaria, #00E08A);font-weight:600;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 35%,transparent)}.ui-basemap-preview{width:100%;height:22px;border-radius:3px;object-fit:cover;opacity:.85;transition:opacity var(--camada-transicao)}.ui-basemap-preview-none{width:100%;height:22px;display:flex;align-items:center;justify-content:center;background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 4%,transparent);border-radius:3px;color:var(--ui-cor-texto-secundario, #888899)}.ui-basemap-card:hover .ui-basemap-preview,.ui-basemap-card.active .ui-basemap-preview{opacity:1}.ui-basemap-card span{font-size:9.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.ui-layer-row.herdado-oculto,.ui-feat-row.herdado-oculto{opacity:.52}.ui-layer-row.herdado-travado .ui-col-lock.ui-lock-open{color:var(--ui-cor-texto-secundario, #888899);opacity:.7}.ui-search-hidden{display:none!important}.ui-empty-row{height:22px;display:flex;align-items:center;padding-left:36px;font-size:10px;color:var(--ui-cor-texto-secundario, #666677);font-style:italic;background:var(--ui-cor-fundo-recuado, rgba(0, 0, 0, .15))}.ui-camadas-resizer-altura{display:none;flex-shrink:0;width:100%;height:9px;background:var(--ui-cor-superficie, #141417);border-top:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .08));cursor:ns-resize;align-items:center;justify-content:center;-webkit-user-select:none;user-select:none;touch-action:none;transition:background .15s ease,border-color .15s ease;position:relative;z-index:10}:host([redimensionavel]) .ui-camadas-resizer-altura,:host([redimensionavel-altura]) .ui-camadas-resizer-altura{display:flex}.ui-camadas-resizer-altura:hover,.ui-camadas-resizer-altura.ui-camadas-resizer--ativo{background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 9%,transparent);border-top-color:var(--ui-cor-primaria, #00E08A)}.ui-camadas-resizer-grip{width:32px;height:3px;border-radius:2px;background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 22%,transparent);transition:all .15s ease}.ui-camadas-resizer-altura:hover .ui-camadas-resizer-grip,.ui-camadas-resizer-altura.ui-camadas-resizer--ativo .ui-camadas-resizer-grip{background:var(--ui-cor-primaria, #00E08A);width:46px;box-shadow:0 0 8px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 45%,transparent)}:host(.ui-camadas--redimensionando){-webkit-user-select:none!important;user-select:none!important;cursor:ns-resize!important}:host(.ui-camadas--redimensionando) *{-webkit-user-select:none!important;user-select:none!important}.ui-col-lock.ui-lock-open{opacity:.28}.ui-col-lock.ui-lock-open:hover,.ui-col-lock.ui-lock-open:focus-visible{opacity:.8}.ui-col-lock[data-locked-by-layer]{cursor:not-allowed}.ui-col[role=button]:focus-visible,.ui-basemap-card:focus-visible,.ui-feat-row:focus-visible,.ui-layer-row:focus-visible{outline:2px solid var(--ui-cor-primaria, #00E08A);outline-offset:-2px}.ui-footer-btn.confirming{color:var(--ui-cor-botao-destrutivo-texto, #ffffff);background:var(--ui-cor-botao-destrutivo-hover, #b71c1c);width:auto;padding:0 6px}.ui-truncate-notice{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 12px;margin:4px 8px 6px;background:color-mix(in srgb,var(--ui-cor-fundo-elevado, #1a1a1e) 70%,transparent);border:1px dashed var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:var(--ui-raio-borda, 4px);font-size:10px;color:var(--ui-cor-texto-secundario, #9696a6)}.ui-truncate-notice span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-truncate-more-btn{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;background:var(--ui-cor-superficie, #141417);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .18));border-radius:var(--ui-raio-borda, 4px);color:var(--ui-cor-primaria, #00E08A);font-size:10px;font-weight:500;cursor:pointer;white-space:nowrap;transition:all var(--camada-transicao)}.ui-truncate-more-btn:hover{background:var(--ui-cor-hover-menu, rgba(255, 255, 255, .08));border-color:var(--ui-cor-primaria, #00E08A)}.ui-truncate-more-btn:focus-visible{outline:2px solid var(--ui-cor-primaria, #00E08A);outline-offset:1px}:host(.degrade),:host(.gradiente),:host([data-degrade]:not([data-degrade="false"])),.ui-camadas-container[data-degrade]:not([data-degrade=false]){--ui-camadas-fundo: var(--ui-gradiente-superficie);--ui-camadas-toggle-fundo: var(--ui-gradiente-superficie)}`;
|
|
1579
|
-
function
|
|
1743
|
+
const mr = `:host{display:flex;flex-direction:column;box-sizing:border-box;font-family:inherit;font-size:11px;color:var(--ui-cor-texto, #e1e1e6);-webkit-user-select:none;user-select:none;width:100%;height:var(--ui-camadas-altura, 100%);min-height:var(--ui-camadas-min-altura, 140px);position:relative;--camada-respiro: 8px;--camada-barra-altura: 28px;--camada-linha-altura: 25px;--camada-thumb-tamanho: 20px;--camada-indent-nivel: 16px;--camada-transicao: .16s cubic-bezier(.16, 1, .3, 1)}:host([densidade="compacto"]){--camada-linha-altura: 22px;--camada-thumb-tamanho: 17px;font-size:10px}:host([flutuante]){position:absolute;top:10px;right:10px;bottom:46px;z-index:var(--ui-z-workspace-hud, 500);width:auto;height:var(--ui-camadas-altura, auto)}*,*:before,*:after{box-sizing:border-box}:host(:not([flutuante])) .ui-camadas-container{max-width:100%;min-width:0;border:none;box-shadow:none;border-radius:0;background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none}:host(:not([flutuante])) .ui-camadas-container[data-borda-canvas=esquerda]{border-left:2px solid var(--ui-camadas-borda-canvas, color-mix(in srgb, var(--ui-cor-texto, #e1e1e6) 18%, transparent))}:host(:not([flutuante])) .ui-camadas-container[data-borda-canvas=direita]{border-right:2px solid var(--ui-camadas-borda-canvas, color-mix(in srgb, var(--ui-cor-texto, #e1e1e6) 18%, transparent))}:host(:not([flutuante])) .ui-camadas-container[data-borda-canvas=ambas]{border-left:2px solid var(--ui-camadas-borda-canvas, color-mix(in srgb, var(--ui-cor-texto, #e1e1e6) 18%, transparent));border-right:2px solid var(--ui-camadas-borda-canvas, color-mix(in srgb, var(--ui-cor-texto, #e1e1e6) 18%, transparent))}.ui-camadas-container{display:flex;flex-direction:column;flex:1 1 auto;height:100%;min-height:0;width:100%;max-width:380px;min-width:270px;background:var(--ui-degrade-interno, var(--ui-camadas-fundo, var(--ui-fundo-superficie, var(--ui-cor-superficie, #141417))));border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:var(--ui-raio-borda, 8px);box-shadow:var(--ui-sombra-lg, 0 10px 30px -4px rgba(0, 0, 0, .5)),0 0 0 1px color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 5%,transparent);overflow:hidden;position:relative;transition:transform .24s cubic-bezier(.16,1,.3,1),opacity .2s ease;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}:host([colapsado]) .ui-camadas-container{transform:translate(calc(100% + 24px));opacity:0;pointer-events:none}.ui-camadas-toggle-flutuante{display:none;position:absolute;top:10px;right:10px;z-index:calc(var(--ui-z-workspace-hud, 500) - 1);background:var(--ui-camadas-toggle-fundo, var(--ui-fundo-superficie, var(--ui-cor-superficie, #141417)));border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .18));border-radius:var(--ui-raio-borda, 6px);color:var(--ui-cor-texto, #ffffff);width:34px;height:34px;cursor:pointer;align-items:center;justify-content:center;box-shadow:var(--ui-sombra-md, 0 8px 20px rgba(0, 0, 0, .45));transition:all var(--camada-transicao)}:host([colapsado][flutuante]) .ui-camadas-toggle-flutuante{display:flex}.ui-camadas-toggle-flutuante:hover{border-color:var(--ui-cor-primaria, #00E08A);color:var(--ui-cor-primaria, #00E08A);transform:scale(1.08);box-shadow:0 0 14px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 35%,transparent)}.ui-camadas-btn-colapsar{background:transparent;border:none;color:var(--ui-cor-texto-secundario, #888899);width:22px;height:22px;cursor:pointer;border-radius:var(--ui-raio-sm, 4px);display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:all var(--camada-transicao)}.ui-camadas-btn-colapsar:hover{color:var(--ui-cor-texto, #ffffff);background:var(--ui-cor-hover-menu, rgba(255, 255, 255, .09))}.ui-camadas-corpo{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;padding:0 var(--camada-respiro) var(--camada-respiro);display:flex;flex-direction:column;gap:6px;scrollbar-width:thin;scrollbar-color:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 16%,transparent) transparent}.ui-camadas-corpo::-webkit-scrollbar{width:4px}.ui-camadas-corpo::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 18%,transparent);border-radius:var(--ui-raio-sm, 4px)}.ui-camadas-corpo::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 32%,transparent)}.ui-tree-toolbar{display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;height:var(--camada-barra-altura);min-height:var(--camada-barra-altura);flex-shrink:0;margin:0 calc(-1 * var(--camada-respiro));padding:0 var(--camada-respiro);gap:8px;border-bottom:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .06))}.ui-tree-title-group{display:flex;align-items:center;gap:5px}.ui-tree-section-title{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.6px;color:var(--ui-cor-texto-secundario, #888899)}.ui-tree-count-badge{font-size:9px;font-family:var(--ui-fonte-codigo, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);font-variant-numeric:tabular-nums;background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 7%,transparent);color:var(--ui-cor-texto-secundario, #888899);padding:1px 5px;border-radius:8px;border:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 6%,transparent)}.ui-tree-actions{display:flex;align-items:center;gap:3px}.ui-tree-action-btn{background:transparent;border:none;color:var(--ui-cor-texto-secundario, #888899);border-radius:var(--ui-raio-sm, 4px);width:24px;height:24px;padding:0;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all var(--camada-transicao)}.ui-tree-action-btn:hover{color:var(--ui-cor-texto, #ffffff);background:var(--ui-cor-hover-menu, rgba(255, 255, 255, .09))}.ui-tree-btn-new{background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 14%,transparent);border:none;color:var(--ui-cor-primaria, #00E08A);border-radius:var(--ui-raio-sm, 4px);height:24px;padding:0 8px;font-size:10px;font-weight:600;cursor:pointer;display:flex;align-items:center;gap:4px;transition:all var(--camada-transicao)}.ui-tree-btn-new:hover{background:var(--ui-cor-primaria, #00E08A);color:var(--ui-cor-texto-sobre-primaria, #000000)}.ui-tree-search-wrapper{position:relative;display:flex;align-items:center;margin:1px 0}.ui-tree-search-icon{position:absolute;left:8px;color:var(--ui-cor-texto-secundario, #888899);pointer-events:none;display:flex;align-items:center}.ui-tree-search-input{width:100%;height:25px;background:var(--ui-cor-fundo, #0a0a0c);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .1));border-radius:var(--ui-raio-borda, 5px);padding:0 24px 0 26px;color:var(--ui-cor-texto, #ffffff);font-size:10.5px;outline:none;transition:border-color var(--camada-transicao),box-shadow var(--camada-transicao)}.ui-tree-search-input:focus{border-color:var(--ui-cor-primaria, #00E08A);box-shadow:0 0 0 2px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 18%,transparent)}.ui-tree-search-clear{position:absolute;right:5px;background:transparent;border:none;color:var(--ui-cor-texto-secundario, #888899);cursor:pointer;width:18px;height:18px;display:flex;align-items:center;justify-content:center;border-radius:3px;transition:all var(--camada-transicao)}.ui-tree-search-clear:hover{color:var(--ui-cor-texto, #ffffff);background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 10%,transparent)}.ui-panel-box{background:var(--ui-cor-fundo, #0c0c0f);border:none;border-top:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .08));border-radius:0;margin:0 calc(-1 * var(--camada-respiro)) calc(-1 * var(--camada-respiro));overflow:hidden;display:flex;flex-direction:column;flex:1 1 0%;min-height:140px}.ui-search-empty{padding:14px 10px;text-align:center;font-size:11px;color:var(--ui-cor-texto-secundario, #888899);overflow-wrap:anywhere}.ui-layer-tree{flex:1 1 0%;min-height:40px;overflow-y:auto;overflow-x:hidden}.ui-layer-group{border-bottom:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .04));transition:background var(--camada-transicao)}.ui-layer-group.drop-into{background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 9%,transparent)!important;outline:1.5px dashed var(--ui-cor-primaria, #00E08A);outline-offset:-1.5px}.ui-layer-row,.ui-feat-row{display:flex;align-items:center;height:var(--camada-linha-altura);min-height:var(--camada-linha-altura);max-height:var(--camada-linha-altura);padding:0 4px;-webkit-user-select:none;user-select:none;cursor:default;transition:background .1s ease;position:relative}.ui-layer-row{background:var(--ui-cor-fundo-elevado, #18181d);font-weight:600;cursor:pointer;border-left:3px solid transparent}.ui-layer-row:hover{background:var(--ui-cor-hover-menu, #22222a)}.ui-layer-row.active-drawing-layer{background:color-mix(in srgb,var(--layer-active-color, var(--ui-cor-primaria, #00E08A)) 18%,var(--ui-cor-fundo-elevado, #18181d))!important;border-left:3px solid var(--layer-active-color, var(--ui-cor-primaria, #00E08A))!important;box-shadow:inset 0 0 12px color-mix(in srgb,var(--layer-active-color, var(--ui-cor-primaria, #00E08A)) 10%,transparent)}.ui-layer-row.active-drawing-layer .ui-name-text{color:var(--ui-cor-texto, #e1e1e6);font-weight:700}.ui-feat-row{border-left:3px solid transparent;padding-left:13px;background:var(--ui-cor-fundo, #101014);font-weight:400;cursor:pointer}.ui-feat-row:hover{background:var(--ui-cor-hover-menu, #19191f)}.ui-feat-row.selected-row{background:color-mix(in srgb,var(--layer-active-color, var(--ui-cor-texto-info, #33b5ff)) 20%,var(--ui-cor-fundo, #101014))!important;outline:1px solid color-mix(in srgb,var(--layer-active-color, var(--ui-cor-texto-info, #33b5ff)) 55%,transparent)!important;outline-offset:-1px}.ui-layer-row.hidden-layer,.ui-feat-row.hidden-row{opacity:.52}.ui-layer-row.hidden-layer .ui-col-eye,.ui-feat-row.hidden-row .ui-col-eye{color:var(--ui-cor-texto-alerta, #ffb86c);opacity:.95}.ui-layer-row.dragging,.ui-feat-row.dragging{opacity:.35;background:color-mix(in srgb,var(--ui-cor-texto-info, #33b5ff) 16%,transparent)!important}.ui-layer-row.drop-above:before,.ui-feat-row.drop-above:before{content:"";position:absolute;top:0;left:0;right:0;height:2px;background:var(--ui-cor-texto-info, #33b5ff);box-shadow:0 0 8px color-mix(in srgb,var(--ui-cor-texto-info, #33b5ff) 100%,transparent);z-index:20;pointer-events:none}.ui-layer-row.drop-below:after,.ui-feat-row.drop-below:after{content:"";position:absolute;bottom:0;left:0;right:0;height:2px;background:var(--ui-cor-texto-info, #33b5ff);box-shadow:0 0 8px color-mix(in srgb,var(--ui-cor-texto-info, #33b5ff) 100%,transparent);z-index:20;pointer-events:none}.ui-layer-row.drop-into{background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 16%,transparent)!important;outline:1.5px dashed var(--ui-cor-primaria, #00E08A)!important;outline-offset:-2px;border-radius:var(--ui-raio-sm, 4px)}.ui-layer-row.is-sublayer{background:color-mix(in srgb,var(--ui-cor-fundo-elevado, #18181d) 70%,transparent)}.ui-group-folder-icon{display:inline-flex;align-items:center;justify-content:center;color:var(--ui-cor-texto-alerta, #ffb86c);margin-right:4px;flex-shrink:0}.ui-col{display:flex;align-items:center;justify-content:center;flex-shrink:0;height:var(--camada-linha-altura)}.ui-col-drag{width:8px;margin-right:1px;cursor:grab;color:var(--ui-cor-texto-secundario, #888899);opacity:.35;touch-action:none;transition:opacity var(--camada-transicao),color var(--camada-transicao)}.ui-layer-row:hover .ui-col-drag,.ui-feat-row:hover .ui-col-drag{opacity:.9;color:var(--ui-cor-primaria, #00E08A)}.ui-col-drag:active{cursor:grabbing}.ui-col-eye{width:20px;cursor:pointer;color:var(--ui-cor-texto-secundario, #888899);transition:color var(--camada-transicao)}.ui-col-eye:hover{color:var(--ui-cor-primaria, #00E08A)}.ui-col-lock{width:18px;cursor:pointer;color:var(--ui-cor-texto-secundario, #888899);transition:color var(--camada-transicao)}.ui-col-lock:hover{color:var(--ui-cor-texto-alerta, #ffb86c)}.ui-col-colorbar{width:5px;height:16px;margin:0 3px 0 2px;border-radius:1.5px;flex-shrink:0}.ui-col-colorbar-editavel{position:relative;width:5px;height:18px;cursor:pointer}.ui-col-colorbar-editavel:before{content:"";position:absolute;top:-3px;right:-4px;bottom:-3px;left:-4px}.ui-col-colorbar-editavel:hover,.ui-col-colorbar-editavel:focus-visible{filter:brightness(1.3);outline:none}.ui-col-chevron,.ui-feat-row .ui-col-thumb{margin-left:calc(var(--layer-depth, 0) * var(--camada-indent-nivel, 16px))}.ui-col-chevron{width:14px;cursor:pointer;color:var(--ui-cor-texto-secundario, #888899);display:flex;align-items:center;justify-content:center}.ui-chevron-icon{display:inline-flex;align-items:center;justify-content:center;transition:transform var(--camada-transicao)}.ui-chevron-icon.open{transform:rotate(90deg)}.ui-col-thumb{width:calc(var(--camada-thumb-tamanho) + 3px);margin-right:4px;display:flex;align-items:center;justify-content:center}.ui-thumb-box{width:var(--camada-thumb-tamanho);height:var(--camada-thumb-tamanho);border:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 15%,transparent);border-radius:3px;background:var(--ui-cor-fundo, #0d0d10);box-sizing:border-box;overflow:hidden;display:flex;align-items:center;justify-content:center}.ui-col-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10.5px;color:var(--ui-cor-texto, #e1e1e6);padding-left:2px;padding-right:4px;cursor:pointer;display:flex;align-items:center;justify-content:flex-start;text-align:left;gap:4px}.ui-name-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-count-chip{font-size:9px;font-family:var(--ui-fonte-codigo, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);font-variant-numeric:tabular-nums;color:var(--ui-cor-texto-secundario, #888899);font-weight:400;padding:0 2px;flex-shrink:0}.ui-col-actions{display:flex;align-items:center;gap:2px;opacity:0;transition:opacity var(--camada-transicao)}.ui-layer-row:hover .ui-col-actions,.ui-feat-row:hover .ui-col-actions,.ui-layer-row:focus-within .ui-col-actions,.ui-feat-row:focus-within .ui-col-actions,.ui-col-actions:has(.ui-micro-btn.active){opacity:1}.ui-micro-btn{background:transparent;border:none;color:var(--ui-cor-texto-secundario, #888899);width:18px;height:18px;padding:0;border-radius:3px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all var(--camada-transicao)}.ui-micro-btn:hover{color:var(--ui-cor-primaria, #00E08A);background:var(--ui-cor-hover-menu, rgba(255, 255, 255, .12))}.ui-micro-btn.active{color:var(--ui-cor-primaria, #00E08A);background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 18%,transparent)}.ui-col-target{width:22px;cursor:pointer}.ui-target-circle{width:11px;height:11px;border-radius:50%;border:1.5px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 32%,transparent);background:transparent;transition:all .12s ease}.ui-col-target:hover .ui-target-circle{border-color:var(--ui-cor-texto-info, #33b5ff);transform:scale(1.18)}.ui-target-circle.selected{border:2px solid var(--layer-active-color, var(--ui-cor-texto-info, #33b5ff));background:var(--layer-active-color, var(--ui-cor-texto-info, #33b5ff));box-shadow:inset 0 0 0 2px var(--ui-cor-superficie, #141418)}.ui-target-circle.partial{border:2px solid var(--layer-active-color, var(--ui-cor-texto-info, #33b5ff));background:color-mix(in srgb,var(--layer-active-color, var(--ui-cor-texto-info, #33b5ff)) 40%,transparent)}.ui-inline-rename-input{width:100%;height:20px;background:var(--ui-cor-fundo, #0d0d10);color:var(--ui-cor-texto, #e1e1e6);border:1px solid var(--ui-cor-primaria, #00E08A);border-radius:3px;font-size:10.5px;padding:0 4px;outline:none;box-shadow:0 0 8px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 40%,transparent)}.ui-layer-settings-drawer{background:linear-gradient(180deg,var(--ui-cor-fundo-elevado, #17171e) 0%,var(--ui-cor-superficie, #0f0f13) 100%);padding:10px 14px 12px;border-top:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 8%,transparent);border-bottom:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 12%,transparent);border-left:3px solid var(--drawer-cor-camada, var(--ui-cor-primaria, #00E08A));display:flex;flex-direction:column;gap:10px;box-shadow:inset 0 1px color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 6%,transparent),0 6px 16px #00000073;animation:drawerSlideDown .18s cubic-bezier(.16,1,.3,1);position:relative;z-index:10}@keyframes drawerSlideDown{0%{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}.ui-drawer-header{display:flex;align-items:center;justify-content:space-between;padding-bottom:6px;border-bottom:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 7%,transparent)}.ui-drawer-header-left{display:flex;align-items:center;gap:7px;min-width:0}.ui-drawer-icon{color:var(--drawer-cor-camada, var(--ui-cor-primaria, #00E08A));display:flex;align-items:center;flex-shrink:0}.ui-drawer-title{font-size:10.5px;font-weight:700;color:var(--ui-cor-texto, #e1e1e6);text-transform:uppercase;letter-spacing:.6px;white-space:nowrap}.ui-drawer-layer-chip{font-size:9.5px;font-weight:500;color:var(--ui-cor-texto-secundario, #888899);background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 7%,transparent);padding:1px 6px;border-radius:var(--ui-raio-sm, 4px);border:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 8%,transparent);max-width:130px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-drawer-btn-fechar{background:transparent;border:none;color:var(--ui-cor-texto-secundario, #888899);width:20px;height:20px;padding:0;border-radius:var(--ui-raio-sm, 4px);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all var(--camada-transicao)}.ui-drawer-btn-fechar:hover{color:var(--ui-cor-texto, #e1e1e6);background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 12%,transparent)}.ui-drawer-body{display:flex;flex-direction:column;gap:10px}.ui-drawer-row{display:flex;flex-direction:column;gap:5px}.ui-drawer-row-label{display:flex;justify-content:space-between;align-items:center;font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.4px;color:var(--ui-cor-texto-secundario, #888899)}.ui-drawer-color-group{display:flex;align-items:center;justify-content:space-between;gap:8px}.ui-drawer-color-pill{position:relative;display:inline-flex;align-items:center;gap:6px;padding:3px 8px 3px 5px;background:var(--ui-cor-fundo, #0b0b0d);border:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 16%,transparent);border-radius:var(--ui-raio-sm, 4px);cursor:pointer;transition:all var(--camada-transicao);-webkit-user-select:none;user-select:none}.ui-drawer-color-pill:hover{border-color:var(--drawer-cor-camada, var(--ui-cor-primaria, #00E08A));background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 8%,transparent);box-shadow:0 0 10px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 25%,transparent)}.ui-drawer-color-sample{width:14px;height:14px;border-radius:3px;border:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 35%,transparent);box-shadow:var(--ui-sombra-sm, 0 1px 3px rgba(0, 0, 0, .5));flex-shrink:0;transition:background-color .1s ease}.ui-drawer-color-hex{font-size:10px;font-family:var(--ui-fonte-codigo, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);font-variant-numeric:tabular-nums;font-weight:700;color:var(--ui-cor-texto, #e1e1e6);letter-spacing:.5px}.ui-drawer-color-native{position:absolute;opacity:0;width:0;height:0;pointer-events:none}.ui-drawer-badge{font-size:9.5px;font-family:var(--ui-fonte-codigo, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);font-variant-numeric:tabular-nums;font-weight:700;color:var(--ui-cor-texto, #e1e1e6);background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 10%,transparent);padding:1px 6px;border-radius:var(--ui-raio-sm, 4px);border:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 12%,transparent)}.ui-drawer-slider-container{display:flex;flex-direction:column;gap:4px}.ui-drawer-slider{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;height:5px;background:linear-gradient(90deg,color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 8%,transparent) 0%,var(--drawer-cor-camada, var(--ui-cor-primaria, #00E08A)) 100%);border-radius:3px;outline:none;margin:3px 0;cursor:pointer;border:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 12%,transparent)}.ui-drawer-slider::-webkit-slider-thumb{-webkit-appearance:none;width:14px;height:14px;border-radius:50%;background:var(--ui-camadas-slider-thumb, #ffffff);border:3px solid var(--drawer-cor-camada, var(--ui-cor-primaria, #00E08A));box-shadow:0 0 6px #0009,0 0 10px var(--drawer-cor-camada, rgba(0, 224, 138, .6));cursor:pointer;transition:transform .12s ease}.ui-drawer-slider::-webkit-slider-thumb:hover{transform:scale(1.22)}.ui-drawer-slider::-moz-range-thumb{width:14px;height:14px;border-radius:50%;background:var(--ui-camadas-slider-thumb, #ffffff);border:3px solid var(--drawer-cor-camada, var(--ui-cor-primaria, #00E08A));box-shadow:0 0 6px #0009,0 0 10px var(--drawer-cor-camada, rgba(0, 224, 138, .6));cursor:pointer}.ui-drawer-footer{display:flex;align-items:center;justify-content:space-between;padding-top:8px;border-top:1px solid color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 7%,transparent)}.ui-drawer-meta-info{font-size:9.5px;color:var(--ui-cor-texto-secundario, #888899);font-style:italic}.ui-drawer-actions{display:flex;align-items:center;gap:6px}.ui-drawer-btn-danger{background:color-mix(in srgb,var(--ui-cor-texto-erro, #ff5555) 10%,transparent);border:1px solid color-mix(in srgb,var(--ui-cor-texto-erro, #ff5555) 35%,transparent);color:var(--ui-cor-texto-erro, #ff5555);border-radius:var(--ui-raio-sm, 4px);height:24px;padding:0 10px;font-size:10px;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;gap:5px;transition:all var(--camada-transicao)}.ui-drawer-btn-danger:hover{background:var(--ui-cor-botao-destrutivo-fundo, #d32f2f);color:var(--ui-cor-botao-destrutivo-texto, #ffffff);border-color:var(--ui-cor-botao-destrutivo-fundo, #d32f2f);box-shadow:0 0 10px color-mix(in srgb,var(--ui-cor-texto-erro, #ff5555) 45%,transparent);transform:translateY(-.5px)}.ui-drawer-btn-danger.confirming{background:var(--ui-cor-botao-destrutivo-hover, #b71c1c);color:var(--ui-cor-botao-destrutivo-texto, #ffffff);border-color:var(--ui-cor-botao-destrutivo-hover, #b71c1c);animation:pulseDanger 1.2s infinite}@keyframes pulseDanger{0%{transform:scale(1)}50%{transform:scale(1.02)}to{transform:scale(1)}}.ui-previa-dot{width:6px;height:6px;margin-left:4px;border-radius:50%;flex-shrink:0;background:var(--ui-cor-texto-alerta, #ffb86c);box-shadow:0 0 0 2px color-mix(in srgb,var(--ui-cor-texto-alerta, #ffb86c) 25%,transparent)}.ui-tree-footer{height:var(--camada-barra-altura);min-height:var(--camada-barra-altura);background:var(--ui-cor-fundo-elevado, #121216);border-top:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .08));display:flex;align-items:center;justify-content:space-between;padding:0 var(--camada-respiro);gap:6px;box-sizing:border-box;overflow:hidden;position:relative;flex-shrink:0;margin:0 calc(-1 * var(--camada-respiro))}.ui-footer-left{display:flex;align-items:center;gap:5px;white-space:nowrap;min-width:0;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis}.ui-footer-count{font-size:11px;font-family:var(--ui-fonte-codigo, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);font-variant-numeric:tabular-nums;font-weight:700;color:var(--ui-cor-primaria, #00E08A);flex-shrink:0}.ui-footer-label{display:inline-flex;align-items:center;color:var(--ui-cor-texto-secundario, #888899);flex-shrink:0}.ui-footer-actions-gerais{display:flex;align-items:center;gap:4px;flex-shrink:0}.ui-footer-chip-btn{background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 6%,transparent);border:none;color:var(--ui-cor-texto-secundario, #a0a0b0);font-size:10px;font-weight:600;height:22px;padding:0 8px;border-radius:var(--ui-raio-sm, 4px);cursor:pointer;display:inline-flex;align-items:center;gap:4px;transition:all var(--camada-transicao)}.ui-footer-chip-btn:hover{background:var(--ui-cor-hover-menu, rgba(255, 255, 255, .12));color:var(--ui-cor-texto, #ffffff)}.ui-footer-chip-btn.primario{background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 14%,transparent);color:var(--ui-cor-primaria, #00E08A)}.ui-footer-chip-btn.primario:hover{background:var(--ui-cor-primaria, #00E08A);color:var(--ui-cor-texto-sobre-primaria, #000000)}.ui-footer-right{display:flex;align-items:center;gap:4px;flex:1 1 auto;min-width:0}.ui-footer-btn{background:transparent;border:none;color:var(--ui-cor-texto-secundario, #888899);width:22px;height:22px;padding:0;cursor:pointer;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:all var(--camada-transicao);flex-shrink:0}.ui-footer-btn:hover:not(.disabled){color:var(--ui-cor-texto, #e1e1e6);background:var(--ui-cor-hover-menu, rgba(255, 255, 255, .12))}.ui-footer-btn.disabled{opacity:.25;cursor:not-allowed}.ui-footer-btn.btn-danger-footer:hover:not(.disabled){color:var(--ui-cor-texto-erro, #ff5555);background:color-mix(in srgb,var(--ui-cor-texto-erro, #ff5555) 15%,transparent)}.ui-footer-btn.confirming{background:var(--ui-cor-botao-destrutivo-hover, #b71c1c)!important;color:var(--ui-cor-botao-destrutivo-texto, #ffffff)!important}.ui-footer-move-wrapper{position:relative;display:flex;align-items:center;flex:1 1 auto;min-width:0}.ui-footer-select{-moz-appearance:none;appearance:none;-webkit-appearance:none;--_chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888899' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");background:var(--_chevron) right 6px center / 10px no-repeat,color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 6%,transparent);border:none;color:var(--ui-cor-texto, #e1e1e6);border-radius:var(--ui-raio-sm, 4px);font:inherit;font-size:10px;font-weight:500;height:22px;padding:0 22px 0 8px;cursor:pointer;width:100%;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-footer-select:hover:not(:disabled){background:var(--_chevron) right 6px center / 10px no-repeat,var(--ui-cor-hover-menu, rgba(255, 255, 255, .12))}.ui-footer-select:focus-visible{outline:1px solid var(--ui-cor-primaria, #00E08A)}.ui-drawer-btn-sublayer{background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 6%,transparent);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .12));color:var(--ui-cor-texto, #e1e1e6);font-size:10.5px;font-weight:500;padding:4px 8px;border-radius:4px;cursor:pointer;display:inline-flex;align-items:center;gap:4px;transition:all var(--camada-transicao)}.ui-drawer-btn-sublayer:hover{background:var(--ui-cor-hover-menu, rgba(255, 255, 255, .12));color:var(--ui-cor-primaria, #00E08A);border-color:var(--ui-cor-primaria, #00E08A)}.ui-drawer-select-wrapper{display:flex;align-items:center}.ui-drawer-select{background:var(--ui-cor-fundo, #16161c);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .15));color:var(--ui-cor-texto, #e1e1e6);border-radius:4px;font-size:10.5px;height:24px;padding:0 6px;cursor:pointer;max-width:140px}.ui-basemap-section{display:flex;flex-direction:column;gap:4px;flex-shrink:0}.ui-basemap-toggle{display:flex;align-items:center;gap:6px;width:100%;padding:2px;background:transparent;border:0;border-radius:var(--ui-raio-sm, 4px);font:inherit;color:inherit;cursor:pointer;text-align:left}.ui-basemap-toggle:hover .ui-basemap-title{color:var(--ui-cor-texto, #e1e1e6)}.ui-basemap-toggle:focus-visible{outline:2px solid var(--ui-cor-primaria, #00E08A);outline-offset:1px}.ui-basemap-atual{flex:1 1 auto;min-width:0;font-size:10px;color:var(--ui-cor-primaria, #00E08A);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:right}.ui-basemap-title{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.6px;color:var(--ui-cor-texto-secundario, #888899)}.ui-basemap-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:4px}.ui-basemap-section{container-type:inline-size}@container (min-width: 260px){.ui-basemap-grid{grid-template-columns:repeat(3,1fr)}}@container (min-width: 340px){.ui-basemap-grid{grid-template-columns:repeat(4,1fr)}}.ui-basemap-card{display:flex;flex-direction:column;align-items:center;gap:2px;padding:3px;border-radius:var(--ui-raio-borda, 5px);background:var(--ui-cor-fundo, #101014);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .08));cursor:pointer;transition:all var(--camada-transicao);text-align:center;overflow:hidden}.ui-basemap-card:hover{border-color:var(--ui-cor-primaria, #00E08A);background:var(--ui-cor-fundo-elevado, #17171c)}.ui-basemap-card.active{border-color:var(--ui-cor-primaria, #00E08A);background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 12%,transparent);color:var(--ui-cor-primaria, #00E08A);font-weight:600;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 35%,transparent)}.ui-basemap-preview{width:100%;height:22px;border-radius:3px;object-fit:cover;opacity:.85;transition:opacity var(--camada-transicao)}.ui-basemap-preview-none{width:100%;height:22px;display:flex;align-items:center;justify-content:center;background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 4%,transparent);border-radius:3px;color:var(--ui-cor-texto-secundario, #888899)}.ui-basemap-card:hover .ui-basemap-preview,.ui-basemap-card.active .ui-basemap-preview{opacity:1}.ui-basemap-card span{font-size:9.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.ui-layer-row.herdado-oculto,.ui-feat-row.herdado-oculto{opacity:.52}.ui-layer-row.herdado-travado .ui-col-lock.ui-lock-open{color:var(--ui-cor-texto-secundario, #888899);opacity:.7}.ui-virtual-espaco{display:block;pointer-events:none}.ui-feat-row.ui-virtual-retida,.ui-search-hidden{display:none!important}.ui-empty-row{height:22px;display:flex;align-items:center;padding-left:36px;font-size:10px;color:var(--ui-cor-texto-secundario, #666677);font-style:italic;background:var(--ui-cor-fundo-recuado, rgba(0, 0, 0, .15))}.ui-camadas-resizer-altura{display:none;flex-shrink:0;width:100%;height:9px;background:var(--ui-cor-superficie, #141417);border-top:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .08));cursor:ns-resize;align-items:center;justify-content:center;-webkit-user-select:none;user-select:none;touch-action:none;transition:background .15s ease,border-color .15s ease;position:relative;z-index:10}:host([redimensionavel]) .ui-camadas-resizer-altura,:host([redimensionavel-altura]) .ui-camadas-resizer-altura{display:flex}.ui-camadas-resizer-altura:hover,.ui-camadas-resizer-altura.ui-camadas-resizer--ativo{background:color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 9%,transparent);border-top-color:var(--ui-cor-primaria, #00E08A)}.ui-camadas-resizer-grip{width:32px;height:3px;border-radius:2px;background:color-mix(in srgb,var(--ui-cor-texto, #e1e1e6) 22%,transparent);transition:all .15s ease}.ui-camadas-resizer-altura:hover .ui-camadas-resizer-grip,.ui-camadas-resizer-altura.ui-camadas-resizer--ativo .ui-camadas-resizer-grip{background:var(--ui-cor-primaria, #00E08A);width:46px;box-shadow:0 0 8px color-mix(in srgb,var(--ui-cor-primaria, #00E08A) 45%,transparent)}:host(.ui-camadas--redimensionando){-webkit-user-select:none!important;user-select:none!important;cursor:ns-resize!important}:host(.ui-camadas--redimensionando) *{-webkit-user-select:none!important;user-select:none!important}.ui-col-lock.ui-lock-open{opacity:.28}.ui-col-lock.ui-lock-open:hover,.ui-col-lock.ui-lock-open:focus-visible{opacity:.8}.ui-col-lock[data-locked-by-layer]{cursor:not-allowed}.ui-col[role=button]:focus-visible,.ui-basemap-card:focus-visible,.ui-feat-row:focus-visible,.ui-layer-row:focus-visible{outline:2px solid var(--ui-cor-primaria, #00E08A);outline-offset:-2px}.ui-footer-btn.confirming{color:var(--ui-cor-botao-destrutivo-texto, #ffffff);background:var(--ui-cor-botao-destrutivo-hover, #b71c1c);width:auto;padding:0 6px}.ui-truncate-notice{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 12px;margin:4px 8px 6px;background:color-mix(in srgb,var(--ui-cor-fundo-elevado, #1a1a1e) 70%,transparent);border:1px dashed var(--ui-cor-borda, rgba(255, 255, 255, .12));border-radius:var(--ui-raio-borda, 4px);font-size:10px;color:var(--ui-cor-texto-secundario, #9696a6)}.ui-truncate-notice span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-truncate-more-btn{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;background:var(--ui-cor-superficie, #141417);border:1px solid var(--ui-cor-borda, rgba(255, 255, 255, .18));border-radius:var(--ui-raio-borda, 4px);color:var(--ui-cor-primaria, #00E08A);font-size:10px;font-weight:500;cursor:pointer;white-space:nowrap;transition:all var(--camada-transicao)}.ui-truncate-more-btn:hover{background:var(--ui-cor-hover-menu, rgba(255, 255, 255, .08));border-color:var(--ui-cor-primaria, #00E08A)}.ui-truncate-more-btn:focus-visible{outline:2px solid var(--ui-cor-primaria, #00E08A);outline-offset:1px}:host(.degrade),:host(.gradiente),:host([data-degrade]:not([data-degrade="false"])),.ui-camadas-container[data-degrade]:not([data-degrade=false]){--ui-camadas-fundo: var(--ui-gradiente-superficie);--ui-camadas-toggle-fundo: var(--ui-gradiente-superficie)}`;
|
|
1744
|
+
function hr(e, t) {
|
|
1580
1745
|
t.querySelectorAll("[data-layer-row]").forEach((r) => {
|
|
1581
1746
|
const o = r.getAttribute("data-layer-row") === e.camadaAtivaId;
|
|
1582
|
-
r.classList.toggle("active-drawing-layer", o),
|
|
1747
|
+
r.classList.toggle("active-drawing-layer", o), va(r, "camada-ativa", o), o ? r.setAttribute("aria-current", "true") : r.removeAttribute("aria-current");
|
|
1583
1748
|
});
|
|
1584
1749
|
}
|
|
1585
|
-
function
|
|
1750
|
+
function gr(e, t) {
|
|
1586
1751
|
t.querySelectorAll(".ui-feat-row").forEach((o) => {
|
|
1587
1752
|
const n = o.getAttribute("data-feat-row"), s = n ? e.selectedFeatureIds.has(n) : !1;
|
|
1588
|
-
o.classList.toggle("selected-row", s),
|
|
1589
|
-
const
|
|
1590
|
-
|
|
1753
|
+
o.classList.toggle("selected-row", s), va(o, "feicao-selecionada", s), o.setAttribute("aria-selected", String(s));
|
|
1754
|
+
const l = o.querySelector(".ui-target-circle");
|
|
1755
|
+
l && l.classList.toggle("selected", s);
|
|
1591
1756
|
});
|
|
1592
|
-
const a =
|
|
1757
|
+
const a = ke(e.camadas, e.feicoes, e.searchQuery);
|
|
1593
1758
|
let r;
|
|
1594
1759
|
if (a)
|
|
1595
1760
|
r = a.feicoesPorCamada;
|
|
@@ -1598,23 +1763,23 @@ function Lt(e, t) {
|
|
|
1598
1763
|
for (let n = 0; n < e.feicoes.length; n++) {
|
|
1599
1764
|
const s = e.feicoes[n];
|
|
1600
1765
|
if (!s || !s.id) continue;
|
|
1601
|
-
const
|
|
1602
|
-
|
|
1766
|
+
const l = s.layerId || "", c = o.get(l);
|
|
1767
|
+
c ? c.push(s) : o.set(l, [s]);
|
|
1603
1768
|
}
|
|
1604
1769
|
r = o;
|
|
1605
1770
|
}
|
|
1606
|
-
const i =
|
|
1607
|
-
|
|
1771
|
+
const i = Da(
|
|
1772
|
+
te(e.camadas),
|
|
1608
1773
|
r,
|
|
1609
1774
|
e.selectedFeatureIds,
|
|
1610
1775
|
a == null ? void 0 : a.camadasVisiveis
|
|
1611
1776
|
);
|
|
1612
1777
|
t.querySelectorAll(".ui-layer-group").forEach((o) => {
|
|
1613
1778
|
const n = o.getAttribute("data-layer-id") ?? "", s = i.get(n);
|
|
1614
|
-
|
|
1615
|
-
}),
|
|
1779
|
+
Va(o.querySelector(".ui-layer-row .ui-target-circle"), (s == null ? void 0 : s.total) ?? 0, (s == null ? void 0 : s.selecionadas) ?? 0);
|
|
1780
|
+
}), _a(e, t);
|
|
1616
1781
|
}
|
|
1617
|
-
function
|
|
1782
|
+
function Va(e, t, a) {
|
|
1618
1783
|
if (!e) return;
|
|
1619
1784
|
if (t === 0) {
|
|
1620
1785
|
e.classList.remove("selected", "partial");
|
|
@@ -1623,48 +1788,48 @@ function ya(e, t, a) {
|
|
|
1623
1788
|
const r = a === t, i = a > 0 && !r;
|
|
1624
1789
|
e.classList.toggle("selected", r), e.classList.toggle("partial", i);
|
|
1625
1790
|
}
|
|
1626
|
-
function
|
|
1791
|
+
function _a(e, t) {
|
|
1627
1792
|
const a = e.feicoes.filter((p) => e.selectedFeatureIds.has(p.id)), r = a.length > 0, i = t.getElementById("footer-count"), o = t.getElementById("footer-label");
|
|
1628
1793
|
if (i && (i.textContent = String(r ? a.length : e.camadas.length)), o) {
|
|
1629
|
-
const p =
|
|
1794
|
+
const p = ka(e.camadas.length, a.length);
|
|
1630
1795
|
o.innerHTML = p.icone, o.title = p.texto, o.setAttribute("aria-label", p.texto);
|
|
1631
1796
|
}
|
|
1632
1797
|
const n = t.querySelector(".ui-tree-footer");
|
|
1633
1798
|
n && (n.classList.toggle("tem-selecao", r), n.classList.toggle("sem-selecao", !r));
|
|
1634
1799
|
const s = t.querySelector(".ui-footer-actions-gerais");
|
|
1635
1800
|
s && (s.style.display = r ? "none" : "flex");
|
|
1636
|
-
const
|
|
1637
|
-
|
|
1638
|
-
const
|
|
1639
|
-
|
|
1801
|
+
const l = t.querySelector(".ui-footer-bulk-actions");
|
|
1802
|
+
l && (l.style.display = r ? "flex" : "none"), ["btn-footer-del"].forEach((p) => {
|
|
1803
|
+
const d = t.getElementById(p);
|
|
1804
|
+
d && (d.disabled = !r, d.classList.toggle("disabled", !r));
|
|
1640
1805
|
});
|
|
1641
|
-
const
|
|
1642
|
-
|
|
1643
|
-
const
|
|
1644
|
-
|
|
1806
|
+
const c = t.querySelector(".ui-footer-move-wrapper");
|
|
1807
|
+
c && c.classList.toggle("disabled", !r);
|
|
1808
|
+
const f = t.getElementById("select-footer-move");
|
|
1809
|
+
f && (f.disabled = !r);
|
|
1645
1810
|
}
|
|
1646
|
-
function
|
|
1647
|
-
const a =
|
|
1811
|
+
function fa(e, t) {
|
|
1812
|
+
const a = le(e.camadas), r = new Map(e.camadas.map((n) => [n.id, n]));
|
|
1648
1813
|
t.querySelectorAll(".ui-layer-row").forEach((n) => {
|
|
1649
1814
|
const s = a.get(n.getAttribute("data-layer-row") || "");
|
|
1650
1815
|
n.classList.toggle("herdado-oculto", (s == null ? void 0 : s.ocultaPorAncestral) === !0), n.classList.toggle("herdado-travado", (s == null ? void 0 : s.travadaPorAncestral) === !0);
|
|
1651
1816
|
});
|
|
1652
1817
|
const i = new Map(e.feicoes.map((n) => [n.id, n]));
|
|
1653
1818
|
t.querySelectorAll(".ui-feat-row").forEach((n) => {
|
|
1654
|
-
const s = n.getAttribute("data-feat-layer") || "",
|
|
1655
|
-
n.classList.toggle("herdado-oculto", (
|
|
1656
|
-
const
|
|
1657
|
-
if (!
|
|
1658
|
-
const
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1819
|
+
const s = n.getAttribute("data-feat-layer") || "", l = r.get(s), c = a.get(s);
|
|
1820
|
+
n.classList.toggle("herdado-oculto", (l == null ? void 0 : l.visible) === !1 || (c == null ? void 0 : c.ocultaPorAncestral) === !0);
|
|
1821
|
+
const f = n.querySelector("[data-feat-lock]"), p = i.get(n.getAttribute("data-feat-row") || "");
|
|
1822
|
+
if (!f || !p) return;
|
|
1823
|
+
const d = (l == null ? void 0 : l.locked) === !0 || (c == null ? void 0 : c.travadaPorAncestral) === !0, u = p.locked === !0 || d;
|
|
1824
|
+
f.innerHTML = u ? A.cadeadoTrancado : A.cadeadoAberto, f.classList.toggle("ui-lock-open", !u), d ? f.setAttribute("data-locked-by-layer", "true") : f.removeAttribute("data-locked-by-layer"), R(
|
|
1825
|
+
f,
|
|
1826
|
+
d ? "Bloqueada pela camada" : u ? "Desbloquear Feição" : "Bloquear Feição"
|
|
1662
1827
|
);
|
|
1663
1828
|
});
|
|
1664
1829
|
const o = t.getElementById("select-footer-move");
|
|
1665
|
-
o && (o.innerHTML = `<option value="" disabled selected>Mover para...</option>${
|
|
1830
|
+
o && (o.innerHTML = `<option value="" disabled selected>Mover para...</option>${Ia(e.camadas)}`);
|
|
1666
1831
|
}
|
|
1667
|
-
function
|
|
1832
|
+
function vr(e, t) {
|
|
1668
1833
|
t.querySelectorAll("[data-layer-row]").forEach((i) => {
|
|
1669
1834
|
i.addEventListener("click", (o) => {
|
|
1670
1835
|
if (o.target.closest(
|
|
@@ -1676,38 +1841,39 @@ function St(e, t) {
|
|
|
1676
1841
|
});
|
|
1677
1842
|
}), t.querySelectorAll("[data-layer-expand]").forEach((i) => {
|
|
1678
1843
|
i.addEventListener("click", (o) => {
|
|
1844
|
+
var f;
|
|
1679
1845
|
o.stopPropagation();
|
|
1680
1846
|
const n = i.getAttribute("data-layer-expand");
|
|
1681
1847
|
if (!n) return;
|
|
1682
1848
|
e.expandedLayers.has(n) ? e.expandedLayers.delete(n) : e.expandedLayers.add(n);
|
|
1683
|
-
const s = i.closest(".ui-layer-group"),
|
|
1684
|
-
if (
|
|
1685
|
-
s.setAttribute("aria-expanded", String(
|
|
1686
|
-
const
|
|
1687
|
-
|
|
1849
|
+
const s = i.closest(".ui-layer-group"), l = i.querySelector(".ui-chevron-icon"), c = e.expandedLayers.has(n);
|
|
1850
|
+
if (l && l.classList.toggle("open", c), s) {
|
|
1851
|
+
s.setAttribute("aria-expanded", String(c));
|
|
1852
|
+
const p = s.querySelector(".ui-children-container");
|
|
1853
|
+
p && (p.style.display = c ? "block" : "none");
|
|
1688
1854
|
}
|
|
1689
|
-
|
|
1855
|
+
R(i, c ? "Recolher grupo" : "Expandir grupo"), br(e, t), (f = e.atualizarArvoreVirtual) == null || f.call(e, !0), e.salvarLembrancaEstado();
|
|
1690
1856
|
});
|
|
1691
1857
|
}), t.querySelectorAll("[data-layer-eye]").forEach((i) => {
|
|
1692
1858
|
i.addEventListener("click", (o) => {
|
|
1693
1859
|
o.stopPropagation();
|
|
1694
|
-
const n = i.getAttribute("data-layer-eye"), s = e.camadas.find((
|
|
1860
|
+
const n = i.getAttribute("data-layer-eye"), s = e.camadas.find((l) => l.id === n);
|
|
1695
1861
|
if (s) {
|
|
1696
1862
|
s.visible = s.visible === !1;
|
|
1697
|
-
const
|
|
1698
|
-
i.innerHTML =
|
|
1699
|
-
const
|
|
1700
|
-
|
|
1863
|
+
const l = s.visible !== !1;
|
|
1864
|
+
i.innerHTML = l ? A.olhoAberto : A.olhoFechado, R(i, l ? "Ocultar Camada" : "Exibir Camada");
|
|
1865
|
+
const c = i.closest(".ui-layer-row");
|
|
1866
|
+
c && c.classList.toggle("hidden-layer", !l), yr(e, t), fa(e, t), e.salvarLembrancaEstado(), e.dispararEvento("ui-camada-visibilidade", {
|
|
1701
1867
|
camadaId: s.id,
|
|
1702
|
-
visivel:
|
|
1868
|
+
visivel: l
|
|
1703
1869
|
});
|
|
1704
1870
|
}
|
|
1705
1871
|
});
|
|
1706
1872
|
}), t.querySelectorAll("[data-layer-lock]").forEach((i) => {
|
|
1707
1873
|
i.addEventListener("click", (o) => {
|
|
1708
1874
|
o.stopPropagation();
|
|
1709
|
-
const n = i.getAttribute("data-layer-lock"), s = e.camadas.find((
|
|
1710
|
-
s && (s.locked = !s.locked, i.innerHTML = s.locked ?
|
|
1875
|
+
const n = i.getAttribute("data-layer-lock"), s = e.camadas.find((l) => l.id === n);
|
|
1876
|
+
s && (s.locked = !s.locked, i.innerHTML = s.locked ? A.cadeadoTrancado : A.cadeadoAberto, i.classList.toggle("ui-lock-open", !s.locked), R(i, s.locked ? "Desbloquear Camada" : "Bloquear Camada"), fa(e, t), e.salvarLembrancaEstado(), e.dispararEvento("ui-camada-bloqueio", {
|
|
1711
1877
|
camadaId: s.id,
|
|
1712
1878
|
bloqueado: s.locked
|
|
1713
1879
|
}));
|
|
@@ -1730,65 +1896,65 @@ function St(e, t) {
|
|
|
1730
1896
|
});
|
|
1731
1897
|
});
|
|
1732
1898
|
const a = (i, o, n) => {
|
|
1733
|
-
const s = e.camadas.find((
|
|
1899
|
+
const s = e.camadas.find((u) => u.id === i);
|
|
1734
1900
|
if (!s) return;
|
|
1735
|
-
const
|
|
1736
|
-
s.color =
|
|
1737
|
-
const
|
|
1738
|
-
|
|
1739
|
-
const
|
|
1740
|
-
|
|
1901
|
+
const l = Z(o, s.color || "#00E08A");
|
|
1902
|
+
s.color = l;
|
|
1903
|
+
const c = t.getElementById(`sample-color-${i}`);
|
|
1904
|
+
c && (c.style.backgroundColor = l);
|
|
1905
|
+
const f = t.getElementById(`hex-color-${i}`);
|
|
1906
|
+
f && (f.textContent = l.toUpperCase());
|
|
1741
1907
|
const p = t.getElementById(`settings-drawer-${i}`);
|
|
1742
|
-
p && p.style.setProperty("--drawer-cor-camada",
|
|
1743
|
-
const
|
|
1744
|
-
if (
|
|
1745
|
-
const
|
|
1746
|
-
|
|
1747
|
-
const
|
|
1748
|
-
|
|
1749
|
-
const
|
|
1750
|
-
|
|
1751
|
-
const
|
|
1752
|
-
if (
|
|
1753
|
-
const
|
|
1908
|
+
p && p.style.setProperty("--drawer-cor-camada", l);
|
|
1909
|
+
const d = M(t, "data-layer-row", i);
|
|
1910
|
+
if (d) {
|
|
1911
|
+
const u = d.closest(".ui-layer-group");
|
|
1912
|
+
u == null || u.style.setProperty("--layer-active-color", l);
|
|
1913
|
+
const h = u == null ? void 0 : u.querySelector(":scope > .ui-children-container");
|
|
1914
|
+
h == null || h.style.setProperty("--parent-layer-color", l);
|
|
1915
|
+
const m = d.querySelector(".ui-col-colorbar");
|
|
1916
|
+
m && (m.style.backgroundColor = l);
|
|
1917
|
+
const g = u == null ? void 0 : u.querySelectorAll(".ui-feat-row");
|
|
1918
|
+
if (g && g.length > 0) {
|
|
1919
|
+
const y = /* @__PURE__ */ new Map();
|
|
1754
1920
|
for (let v = 0; v < e.feicoes.length; v++) {
|
|
1755
|
-
const
|
|
1756
|
-
|
|
1921
|
+
const b = e.feicoes[v];
|
|
1922
|
+
b && b.layerId === i && y.set(b.id, b);
|
|
1757
1923
|
}
|
|
1758
|
-
|
|
1924
|
+
g.forEach((v) => {
|
|
1759
1925
|
if (v.getAttribute("data-feat-layer") !== i) return;
|
|
1760
|
-
const
|
|
1761
|
-
|
|
1762
|
-
const
|
|
1763
|
-
if (!
|
|
1764
|
-
const
|
|
1765
|
-
|
|
1926
|
+
const b = v.querySelector(".ui-col-colorbar");
|
|
1927
|
+
b && (b.style.backgroundColor = l);
|
|
1928
|
+
const w = y.get(v.getAttribute("data-feat-row") || "");
|
|
1929
|
+
if (!w || w.color) return;
|
|
1930
|
+
const x = v.querySelector(".ui-thumb-box");
|
|
1931
|
+
x && (x.innerHTML = Ca(w.type || w.geometryType, l, w.coordinates));
|
|
1766
1932
|
});
|
|
1767
1933
|
}
|
|
1768
1934
|
}
|
|
1769
|
-
n ? e.salvarLembrancaEstado() : e.agendarSalvarLembranca(), e.dispararEvento("ui-camada-cor", { camadaId: s.id, cor:
|
|
1935
|
+
n ? e.salvarLembrancaEstado() : e.agendarSalvarLembranca(), e.dispararEvento("ui-camada-cor", { camadaId: s.id, cor: l });
|
|
1770
1936
|
};
|
|
1771
1937
|
t.querySelectorAll("[data-layer-color-picker]").forEach((i) => {
|
|
1772
|
-
const o = i, n = (s) => (
|
|
1773
|
-
const
|
|
1774
|
-
if (!
|
|
1775
|
-
const
|
|
1776
|
-
a(
|
|
1938
|
+
const o = i, n = (s) => (l) => {
|
|
1939
|
+
const c = o.getAttribute("data-layer-color-picker");
|
|
1940
|
+
if (!c) return;
|
|
1941
|
+
const f = l.target.value;
|
|
1942
|
+
a(c, f, s);
|
|
1777
1943
|
};
|
|
1778
1944
|
o.addEventListener("input", n(!1)), o.addEventListener("change", n(!0));
|
|
1779
1945
|
}), t.querySelectorAll("[data-layer-color]").forEach((i) => {
|
|
1780
1946
|
const o = (n) => {
|
|
1781
1947
|
n.stopPropagation();
|
|
1782
|
-
const s = i.getAttribute("data-layer-color"),
|
|
1783
|
-
!s || !
|
|
1948
|
+
const s = i.getAttribute("data-layer-color"), l = e.camadas.find((c) => c.id === s);
|
|
1949
|
+
!s || !l || Ct({
|
|
1784
1950
|
ancora: i,
|
|
1785
|
-
titulo: `Cor · ${
|
|
1951
|
+
titulo: `Cor · ${l.name || "Camada"}`,
|
|
1786
1952
|
modo: "simples",
|
|
1787
|
-
cor:
|
|
1953
|
+
cor: Z(l.color, "#00E08A"),
|
|
1788
1954
|
mostrarOpacidade: !1,
|
|
1789
|
-
aoAlterar: (
|
|
1790
|
-
aoConfirmar: (
|
|
1791
|
-
aoCancelar: (
|
|
1955
|
+
aoAlterar: (c) => a(s, c.cor, !1),
|
|
1956
|
+
aoConfirmar: (c) => a(s, c.cor, !0),
|
|
1957
|
+
aoCancelar: (c) => a(s, c.cor, !0)
|
|
1792
1958
|
});
|
|
1793
1959
|
};
|
|
1794
1960
|
i.addEventListener("click", o), i.addEventListener("keydown", (n) => {
|
|
@@ -1797,13 +1963,13 @@ function St(e, t) {
|
|
|
1797
1963
|
});
|
|
1798
1964
|
});
|
|
1799
1965
|
const r = (i, o) => {
|
|
1800
|
-
const n = e.camadas.find((
|
|
1966
|
+
const n = e.camadas.find((c) => c.id === i);
|
|
1801
1967
|
if (!n) return;
|
|
1802
1968
|
n.opacity = o;
|
|
1803
1969
|
const s = t.getElementById(`badge-op-${i}`);
|
|
1804
1970
|
s && (s.textContent = `${Math.round(o * 100)}%`);
|
|
1805
|
-
const
|
|
1806
|
-
|
|
1971
|
+
const l = M(t, "data-layer-opacity-slider", i);
|
|
1972
|
+
l && parseFloat(l.value) !== o && (l.value = String(o)), e.agendarSalvarLembranca(), e.dispararEvento("ui-camada-opacidade", { camadaId: n.id, opacidade: o });
|
|
1807
1973
|
};
|
|
1808
1974
|
t.querySelectorAll("[data-layer-opacity-slider]").forEach((i) => {
|
|
1809
1975
|
i.addEventListener("input", (o) => {
|
|
@@ -1821,36 +1987,36 @@ function St(e, t) {
|
|
|
1821
1987
|
};
|
|
1822
1988
|
i.addEventListener("ui-cancelar-confirmacao", n), i.addEventListener("click", (s) => {
|
|
1823
1989
|
s.stopPropagation();
|
|
1824
|
-
const
|
|
1825
|
-
if (!
|
|
1990
|
+
const l = i.getAttribute("data-delete-layer");
|
|
1991
|
+
if (!l) return;
|
|
1826
1992
|
if (i.classList.contains("confirming")) {
|
|
1827
|
-
n(), e.dispararEvento("ui-camada-excluida", { camadaId:
|
|
1828
|
-
const
|
|
1993
|
+
n(), e.dispararEvento("ui-camada-excluida", { camadaId: l });
|
|
1994
|
+
const f = e.selectedFeatureIds.size;
|
|
1829
1995
|
e.camadas.forEach((p) => {
|
|
1830
|
-
p.parentId ===
|
|
1831
|
-
}), e.removerCamada(
|
|
1996
|
+
p.parentId === l && (p.parentId = null);
|
|
1997
|
+
}), e.removerCamada(l), e.selectedFeatureIds.size !== f && e.notificarMudancaSelecao();
|
|
1832
1998
|
} else {
|
|
1833
1999
|
i.classList.add("confirming");
|
|
1834
|
-
const
|
|
1835
|
-
|
|
2000
|
+
const f = i.querySelector(".ui-btn-label");
|
|
2001
|
+
f && (f.textContent = "Confirmar Exclusão?"), o = setTimeout(() => {
|
|
1836
2002
|
o = null, i.isConnected && n();
|
|
1837
2003
|
}, 3500);
|
|
1838
2004
|
}
|
|
1839
2005
|
});
|
|
1840
2006
|
}), t.querySelectorAll("[data-layer-parent-select]").forEach((i) => {
|
|
1841
2007
|
i.addEventListener("change", (o) => {
|
|
1842
|
-
const n = o.target, s = n.getAttribute("data-layer-parent-select"),
|
|
1843
|
-
if (
|
|
1844
|
-
if (
|
|
1845
|
-
n.value =
|
|
2008
|
+
const n = o.target, s = n.getAttribute("data-layer-parent-select"), l = n.value || null, c = e.camadas.find((f) => f.id === s);
|
|
2009
|
+
if (c) {
|
|
2010
|
+
if (l && (l === c.id || T(e.camadas, l, c.id))) {
|
|
2011
|
+
n.value = c.parentId || "";
|
|
1846
2012
|
return;
|
|
1847
2013
|
}
|
|
1848
|
-
const
|
|
1849
|
-
|
|
1850
|
-
camadaId:
|
|
1851
|
-
novoParentId:
|
|
1852
|
-
parentAnteriorId:
|
|
1853
|
-
camada:
|
|
2014
|
+
const f = c.parentId ?? null;
|
|
2015
|
+
c.parentId = l, l && e.expandedLayers.add(l), e.salvarLembrancaEstado(), e.dispararEvento("ui-camada-mover-hierarquia", {
|
|
2016
|
+
camadaId: c.id,
|
|
2017
|
+
novoParentId: l,
|
|
2018
|
+
parentAnteriorId: f,
|
|
2019
|
+
camada: c
|
|
1854
2020
|
}), e.solicitarRenderizacao();
|
|
1855
2021
|
}
|
|
1856
2022
|
});
|
|
@@ -1860,18 +2026,18 @@ function St(e, t) {
|
|
|
1860
2026
|
const n = i.getAttribute("data-add-sublayer");
|
|
1861
2027
|
e.dispararEvento("ui-camada-adicionar", { parentId: n });
|
|
1862
2028
|
});
|
|
1863
|
-
}),
|
|
2029
|
+
}), Ga(e, t), t.querySelectorAll("[data-layer-target]").forEach((i) => {
|
|
1864
2030
|
i.addEventListener("click", (o) => {
|
|
1865
2031
|
o.stopPropagation();
|
|
1866
2032
|
const n = o, s = i.getAttribute("data-layer-target");
|
|
1867
2033
|
if (!s) return;
|
|
1868
|
-
const
|
|
1869
|
-
if (
|
|
1870
|
-
|
|
2034
|
+
const l = Vt(e.camadas, e.feicoes, s, e.searchQuery);
|
|
2035
|
+
if (l.length === 0) return;
|
|
2036
|
+
l.every((f) => e.selectedFeatureIds.has(f.id)) ? l.forEach((f) => e.selectedFeatureIds.delete(f.id)) : (!n.ctrlKey && !n.metaKey && e.selectedFeatureIds.clear(), l.forEach((f) => e.selectedFeatureIds.add(f.id))), e.lastClickedFeatureId = l[l.length - 1].id, e.sincronizarSelecaoDOM(), e.notificarMudancaSelecao();
|
|
1871
2037
|
});
|
|
1872
2038
|
});
|
|
1873
2039
|
}
|
|
1874
|
-
function
|
|
2040
|
+
function Ga(e, t) {
|
|
1875
2041
|
t.querySelectorAll("[data-layer-show-more]").forEach((a) => {
|
|
1876
2042
|
a.addEventListener("click", (r) => {
|
|
1877
2043
|
r.stopPropagation();
|
|
@@ -1880,53 +2046,53 @@ function wa(e, t) {
|
|
|
1880
2046
|
});
|
|
1881
2047
|
});
|
|
1882
2048
|
}
|
|
1883
|
-
function
|
|
2049
|
+
function br(e, t) {
|
|
1884
2050
|
const a = t.getElementById("btn-toggle-all-expand");
|
|
1885
2051
|
if (!a) return;
|
|
1886
2052
|
const r = e.camadas.length > 0 && e.camadas.every((o) => e.expandedLayers.has(o.id)), i = a.querySelector(".ui-chevron-icon");
|
|
1887
|
-
i && i.classList.toggle("open", r),
|
|
2053
|
+
i && i.classList.toggle("open", r), R(
|
|
1888
2054
|
a,
|
|
1889
2055
|
r ? "Recolher Todos os Grupos" : "Expandir Todos os Grupos"
|
|
1890
2056
|
);
|
|
1891
2057
|
}
|
|
1892
|
-
function
|
|
2058
|
+
function yr(e, t) {
|
|
1893
2059
|
const a = t.getElementById("btn-toggle-all-vis");
|
|
1894
2060
|
if (!a) return;
|
|
1895
2061
|
const r = e.camadas.every((i) => i.visible !== !1);
|
|
1896
|
-
a.innerHTML = r ?
|
|
2062
|
+
a.innerHTML = r ? A.olhoAberto : A.olhoFechado, R(a, r ? "Ocultar Todas as Camadas" : "Exibir Todas as Camadas");
|
|
1897
2063
|
}
|
|
1898
|
-
function
|
|
2064
|
+
function xr(e, t) {
|
|
1899
2065
|
const a = t.getElementById("select-footer-move");
|
|
1900
2066
|
a && a.addEventListener("change", (n) => {
|
|
1901
2067
|
const s = n.target.value;
|
|
1902
2068
|
if (!s) return;
|
|
1903
|
-
const
|
|
1904
|
-
if (
|
|
2069
|
+
const l = we(e.camadas);
|
|
2070
|
+
if (l.has(s)) {
|
|
1905
2071
|
a.value = "";
|
|
1906
2072
|
return;
|
|
1907
2073
|
}
|
|
1908
|
-
const
|
|
1909
|
-
(p) => e.selectedFeatureIds.has(p.id) && !
|
|
2074
|
+
const c = e.feicoes.filter(
|
|
2075
|
+
(p) => e.selectedFeatureIds.has(p.id) && !l.has(p.layerId) && p.locked !== !0
|
|
1910
2076
|
);
|
|
1911
|
-
if (
|
|
2077
|
+
if (c.length === 0) {
|
|
1912
2078
|
a.value = "";
|
|
1913
2079
|
return;
|
|
1914
2080
|
}
|
|
1915
|
-
const
|
|
1916
|
-
|
|
1917
|
-
const
|
|
1918
|
-
p.layerId = s, e.ordemFilhosPorPai &&
|
|
1919
|
-
}),
|
|
1920
|
-
|
|
2081
|
+
const f = new Map(c.map((p) => [p.id, p.layerId]));
|
|
2082
|
+
c.forEach((p) => {
|
|
2083
|
+
const d = p.layerId;
|
|
2084
|
+
p.layerId = s, e.ordemFilhosPorPai && d !== s && Ba(e.ordemFilhosPorPai, p.id, d, s);
|
|
2085
|
+
}), c.forEach((p) => {
|
|
2086
|
+
f.get(p.id) !== s && e.dispararEvento("ui-feicao-movida", {
|
|
1921
2087
|
feicaoId: p.id,
|
|
1922
|
-
camadaOrigemId:
|
|
2088
|
+
camadaOrigemId: f.get(p.id),
|
|
1923
2089
|
camadaDestinoId: s,
|
|
1924
2090
|
feicao: p
|
|
1925
2091
|
});
|
|
1926
2092
|
}), e.dispararEvento("ui-acao-massa", {
|
|
1927
2093
|
acao: "mover",
|
|
1928
|
-
feicoesIds:
|
|
1929
|
-
feicoes:
|
|
2094
|
+
feicoesIds: c.map((p) => p.id),
|
|
2095
|
+
feicoes: c,
|
|
1930
2096
|
valor: s
|
|
1931
2097
|
}), e.salvarLembrancaEstado(), e.solicitarRenderizacao();
|
|
1932
2098
|
});
|
|
@@ -1941,50 +2107,50 @@ function Mt(e, t) {
|
|
|
1941
2107
|
const o = t.getElementById("btn-footer-del");
|
|
1942
2108
|
if (o) {
|
|
1943
2109
|
let n = null;
|
|
1944
|
-
const s = "Excluir selecionados",
|
|
1945
|
-
n && (clearTimeout(n), n = null), o.classList.remove("confirming"),
|
|
2110
|
+
const s = "Excluir selecionados", l = () => {
|
|
2111
|
+
n && (clearTimeout(n), n = null), o.classList.remove("confirming"), R(o, s);
|
|
1946
2112
|
};
|
|
1947
|
-
o.addEventListener("ui-cancelar-confirmacao",
|
|
1948
|
-
const
|
|
1949
|
-
(
|
|
2113
|
+
o.addEventListener("ui-cancelar-confirmacao", l), o.addEventListener("click", () => {
|
|
2114
|
+
const c = we(e.camadas), f = e.feicoes.filter(
|
|
2115
|
+
(u) => e.selectedFeatureIds.has(u.id) && !c.has(u.layerId) && u.locked !== !0
|
|
1950
2116
|
);
|
|
1951
|
-
if (
|
|
1952
|
-
const p =
|
|
2117
|
+
if (f.length === 0) return;
|
|
2118
|
+
const p = f.map((u) => u.id);
|
|
1953
2119
|
if (!o.classList.contains("confirming")) {
|
|
1954
|
-
o.classList.add("confirming"),
|
|
1955
|
-
n = null, o.isConnected &&
|
|
2120
|
+
o.classList.add("confirming"), R(o, `Clique novamente para excluir ${p.length} selecionado(s)`), n = setTimeout(() => {
|
|
2121
|
+
n = null, o.isConnected && l();
|
|
1956
2122
|
}, 3500);
|
|
1957
2123
|
return;
|
|
1958
2124
|
}
|
|
1959
|
-
|
|
1960
|
-
const
|
|
1961
|
-
e.ordemFilhosPorPai &&
|
|
1962
|
-
|
|
1963
|
-
}), e.feicoes = e.feicoes.filter((
|
|
2125
|
+
l();
|
|
2126
|
+
const d = new Set(p);
|
|
2127
|
+
e.ordemFilhosPorPai && f.forEach((u) => {
|
|
2128
|
+
N(e.ordemFilhosPorPai, u.layerId, B(u.id));
|
|
2129
|
+
}), e.feicoes = e.feicoes.filter((u) => !d.has(u.id)), p.forEach((u) => e.selectedFeatureIds.delete(u)), e.lastClickedFeatureId && d.has(e.lastClickedFeatureId) && (e.lastClickedFeatureId = null), e.dispararEvento("ui-acao-massa", {
|
|
1964
2130
|
acao: "excluir",
|
|
1965
2131
|
feicoesIds: p,
|
|
1966
|
-
feicoes:
|
|
2132
|
+
feicoes: f
|
|
1967
2133
|
}), e.salvarLembrancaEstado(), e.notificarMudancaSelecao(), e.solicitarRenderizacao();
|
|
1968
2134
|
});
|
|
1969
2135
|
}
|
|
1970
2136
|
}
|
|
1971
|
-
const
|
|
2137
|
+
const wr = [
|
|
1972
2138
|
{ tipo: "olho", atributo: "data-layer-eye", entidade: "camada" },
|
|
1973
2139
|
{ tipo: "olho", atributo: "data-feat-eye", entidade: "feicao" },
|
|
1974
2140
|
{ tipo: "cadeado", atributo: "data-layer-lock", entidade: "camada" },
|
|
1975
2141
|
{ tipo: "cadeado", atributo: "data-feat-lock", entidade: "feicao" },
|
|
1976
2142
|
{ tipo: "selecao", atributo: "data-layer-target", entidade: "camada" },
|
|
1977
2143
|
{ tipo: "selecao", atributo: "data-feat-target", entidade: "feicao" }
|
|
1978
|
-
],
|
|
2144
|
+
], Oe = {
|
|
1979
2145
|
olho: "[data-layer-eye], [data-feat-eye]",
|
|
1980
2146
|
cadeado: "[data-layer-lock], [data-feat-lock]",
|
|
1981
2147
|
selecao: "[data-layer-target], [data-feat-target]"
|
|
1982
|
-
},
|
|
1983
|
-
function
|
|
1984
|
-
return
|
|
2148
|
+
}, Ar = 3;
|
|
2149
|
+
function Er(e) {
|
|
2150
|
+
return wr.find((t) => e.hasAttribute(t.atributo)) ?? null;
|
|
1985
2151
|
}
|
|
1986
|
-
function
|
|
1987
|
-
const a =
|
|
2152
|
+
function Pe(e, t) {
|
|
2153
|
+
const a = Er(t);
|
|
1988
2154
|
if (!a) return null;
|
|
1989
2155
|
const r = t.getAttribute(a.atributo);
|
|
1990
2156
|
if (!r) return null;
|
|
@@ -1998,13 +2164,13 @@ function Le(e, t) {
|
|
|
1998
2164
|
return o ? o.locked === !0 : null;
|
|
1999
2165
|
}
|
|
2000
2166
|
if (a.entidade === "feicao") return e.selectedFeatureIds.has(r);
|
|
2001
|
-
const i =
|
|
2002
|
-
|
|
2167
|
+
const i = Re(
|
|
2168
|
+
Pt(e.camadas, e.feicoes, r),
|
|
2003
2169
|
e.searchQuery
|
|
2004
2170
|
);
|
|
2005
2171
|
return i.length === 0 ? null : i.every((o) => e.selectedFeatureIds.has(o.id));
|
|
2006
2172
|
}
|
|
2007
|
-
function
|
|
2173
|
+
function pa(e, t, a = !1) {
|
|
2008
2174
|
e.dispatchEvent(
|
|
2009
2175
|
new MouseEvent("click", {
|
|
2010
2176
|
bubbles: !0,
|
|
@@ -2014,54 +2180,54 @@ function Je(e, t, a = !1) {
|
|
|
2014
2180
|
})
|
|
2015
2181
|
);
|
|
2016
2182
|
}
|
|
2017
|
-
let
|
|
2018
|
-
function
|
|
2019
|
-
(
|
|
2183
|
+
let z = null;
|
|
2184
|
+
function Ir(e) {
|
|
2185
|
+
(z == null ? void 0 : z.host) === e && z.cancelar();
|
|
2020
2186
|
}
|
|
2021
|
-
function
|
|
2022
|
-
Object.keys(
|
|
2023
|
-
a.querySelectorAll(
|
|
2024
|
-
i.addEventListener("pointerdown", (o) =>
|
|
2187
|
+
function Ua(e, t, a = t) {
|
|
2188
|
+
Object.keys(Oe).forEach((r) => {
|
|
2189
|
+
a.querySelectorAll(Oe[r]).forEach((i) => {
|
|
2190
|
+
i.addEventListener("pointerdown", (o) => kr(e, t, r, i, o));
|
|
2025
2191
|
});
|
|
2026
2192
|
});
|
|
2027
2193
|
}
|
|
2028
|
-
function
|
|
2029
|
-
if (i.pointerType === "mouse" && i.button !== 0 || e.editingLayerId || e.editingFeatureId ||
|
|
2030
|
-
|
|
2031
|
-
const o =
|
|
2032
|
-
let
|
|
2033
|
-
const p = /* @__PURE__ */ new Set([r]),
|
|
2034
|
-
|
|
2035
|
-
},
|
|
2036
|
-
|
|
2037
|
-
},
|
|
2038
|
-
p.has(
|
|
2039
|
-
},
|
|
2040
|
-
|
|
2041
|
-
},
|
|
2042
|
-
var
|
|
2043
|
-
if (!
|
|
2044
|
-
if (Math.hypot(
|
|
2045
|
-
const
|
|
2046
|
-
if (!
|
|
2047
|
-
|
|
2194
|
+
function kr(e, t, a, r, i) {
|
|
2195
|
+
if (i.pointerType === "mouse" && i.button !== 0 || e.editingLayerId || e.editingFeatureId || Pe(e, r) === null) return;
|
|
2196
|
+
z == null || z.cancelar();
|
|
2197
|
+
const o = Oe[a], n = i.ctrlKey || i.metaKey, s = i.shiftKey;
|
|
2198
|
+
let l = !1, c = !1, f = i.clientY;
|
|
2199
|
+
const p = /* @__PURE__ */ new Set([r]), d = (x) => {
|
|
2200
|
+
x.preventDefault(), x.stopImmediatePropagation();
|
|
2201
|
+
}, u = (x) => {
|
|
2202
|
+
x.stopPropagation(), x.preventDefault();
|
|
2203
|
+
}, h = (x) => x.preventDefault(), m = (x) => {
|
|
2204
|
+
p.has(x) || (p.add(x), Pe(e, x) !== c && pa(x, a === "selecao"));
|
|
2205
|
+
}, g = () => {
|
|
2206
|
+
l = !0, pa(r, n, s), c = Pe(e, r) === !0, t.addEventListener("selectstart", h), document.body.style.userSelect = "none";
|
|
2207
|
+
}, y = (x) => {
|
|
2208
|
+
var Y, de;
|
|
2209
|
+
if (!l) {
|
|
2210
|
+
if (Math.hypot(x.clientX - i.clientX, x.clientY - i.clientY) < Ar) return;
|
|
2211
|
+
const H = (Y = t.elementFromPoint(x.clientX, x.clientY)) == null ? void 0 : Y.closest(o);
|
|
2212
|
+
if (!H || H === r) return;
|
|
2213
|
+
g();
|
|
2048
2214
|
}
|
|
2049
|
-
|
|
2050
|
-
const
|
|
2051
|
-
t.querySelectorAll(o).forEach((
|
|
2052
|
-
const
|
|
2053
|
-
if (
|
|
2054
|
-
const
|
|
2055
|
-
|
|
2215
|
+
x.preventDefault();
|
|
2216
|
+
const F = Math.min(f, x.clientY), I = Math.max(f, x.clientY);
|
|
2217
|
+
t.querySelectorAll(o).forEach((H) => {
|
|
2218
|
+
const J = H.getBoundingClientRect();
|
|
2219
|
+
if (J.height === 0) return;
|
|
2220
|
+
const ue = J.top + J.height / 2;
|
|
2221
|
+
ue >= F && ue <= I && m(H);
|
|
2056
2222
|
});
|
|
2057
|
-
const
|
|
2058
|
-
|
|
2059
|
-
}, v = (
|
|
2060
|
-
(
|
|
2061
|
-
},
|
|
2062
|
-
|
|
2063
|
-
}
|
|
2064
|
-
function
|
|
2223
|
+
const P = (de = t.elementFromPoint(x.clientX, x.clientY)) == null ? void 0 : de.closest(o);
|
|
2224
|
+
P && m(P), f = x.clientY;
|
|
2225
|
+
}, v = (x = !1) => {
|
|
2226
|
+
(z == null ? void 0 : z.cancelar) === w && (z = null), window.removeEventListener("pointermove", y), window.removeEventListener("pointerup", b), window.removeEventListener("pointercancel", b), window.removeEventListener("dragstart", d, !0), t.removeEventListener("selectstart", h), l && (document.body.style.userSelect = "", x || (window.addEventListener("click", u, { capture: !0, once: !0 }), setTimeout(() => window.removeEventListener("click", u, !0), 0)));
|
|
2227
|
+
}, b = () => v(), w = () => v(!0);
|
|
2228
|
+
z = { host: e, cancelar: w }, window.addEventListener("dragstart", d, !0), window.addEventListener("pointermove", y, { passive: !1 }), window.addEventListener("pointerup", b), window.addEventListener("pointercancel", b);
|
|
2229
|
+
}
|
|
2230
|
+
function Lr(e, t) {
|
|
2065
2231
|
const a = t.getElementById("btn-toggle-all-vis");
|
|
2066
2232
|
a && a.addEventListener("click", () => e.alternarVisibilidadeTodas(!0));
|
|
2067
2233
|
const r = t.getElementById("btn-toggle-all-expand");
|
|
@@ -2069,15 +2235,15 @@ function Tt(e, t) {
|
|
|
2069
2235
|
o.stopPropagation(), e.camadas.length > 0 && e.camadas.every((s) => e.expandedLayers.has(s.id)) ? e.colapsarTodas() : e.expandirTodas();
|
|
2070
2236
|
});
|
|
2071
2237
|
const i = t.getElementById("btn-colapsar");
|
|
2072
|
-
i && i.addEventListener("click", () => e.colapsar(!0)),
|
|
2238
|
+
i && i.addEventListener("click", () => e.colapsar(!0)), Cr(e, t);
|
|
2073
2239
|
}
|
|
2074
|
-
function
|
|
2240
|
+
function Cr(e, t) {
|
|
2075
2241
|
const a = t.getElementById("input-layer-search"), r = t.getElementById("btn-clear-layer-search"), i = () => {
|
|
2076
2242
|
var o;
|
|
2077
2243
|
e.searchQuery = "", e.solicitarRenderizacao(), (o = t.getElementById("input-layer-search")) == null || o.focus();
|
|
2078
2244
|
};
|
|
2079
2245
|
if (a) {
|
|
2080
|
-
const o =
|
|
2246
|
+
const o = wa(() => {
|
|
2081
2247
|
a.isConnected && e.solicitarRenderizacao();
|
|
2082
2248
|
}, 75);
|
|
2083
2249
|
a.addEventListener("input", (n) => {
|
|
@@ -2088,7 +2254,7 @@ function Rt(e, t) {
|
|
|
2088
2254
|
}
|
|
2089
2255
|
r && r.addEventListener("click", i);
|
|
2090
2256
|
}
|
|
2091
|
-
function
|
|
2257
|
+
function Ya(e, t) {
|
|
2092
2258
|
t.querySelectorAll("[data-feat-select]").forEach((a) => {
|
|
2093
2259
|
a.addEventListener("click", (r) => {
|
|
2094
2260
|
if (e.editingFeatureId) return;
|
|
@@ -2113,7 +2279,7 @@ function Ea(e, t) {
|
|
|
2113
2279
|
if (o) {
|
|
2114
2280
|
o.visible = o.visible === !1;
|
|
2115
2281
|
const n = o.visible !== !1;
|
|
2116
|
-
a.innerHTML = n ?
|
|
2282
|
+
a.innerHTML = n ? A.olhoAberto : A.olhoFechado, R(a, n ? "Ocultar Feição" : "Exibir Feição");
|
|
2117
2283
|
const s = a.closest(".ui-feat-row");
|
|
2118
2284
|
s && s.classList.toggle("hidden-row", !n), e.dispararEvento("ui-feicao-visibilidade", {
|
|
2119
2285
|
feicaoId: o.id,
|
|
@@ -2125,7 +2291,7 @@ function Ea(e, t) {
|
|
|
2125
2291
|
a.addEventListener("click", (r) => {
|
|
2126
2292
|
if (r.stopPropagation(), a.hasAttribute("data-locked-by-layer")) return;
|
|
2127
2293
|
const i = a.getAttribute("data-feat-lock"), o = e.feicoes.find((n) => n.id === i);
|
|
2128
|
-
o && (o.locked = !o.locked, a.innerHTML = o.locked ?
|
|
2294
|
+
o && (o.locked = !o.locked, a.innerHTML = o.locked ? A.cadeadoTrancado : A.cadeadoAberto, a.classList.toggle("ui-lock-open", !o.locked), R(a, o.locked ? "Desbloquear Feição" : "Bloquear Feição"), e.dispararEvento("ui-feicao-bloqueio", {
|
|
2129
2295
|
feicaoId: o.id,
|
|
2130
2296
|
bloqueado: o.locked
|
|
2131
2297
|
}));
|
|
@@ -2138,7 +2304,7 @@ function Ea(e, t) {
|
|
|
2138
2304
|
});
|
|
2139
2305
|
});
|
|
2140
2306
|
}
|
|
2141
|
-
function
|
|
2307
|
+
function Fr(e, t) {
|
|
2142
2308
|
var a;
|
|
2143
2309
|
(a = t.querySelector("[data-basemap-toggle]")) == null || a.addEventListener("click", () => {
|
|
2144
2310
|
e.alternarMapasBaseRecolhido(!0);
|
|
@@ -2149,10 +2315,341 @@ function Ot(e, t) {
|
|
|
2149
2315
|
});
|
|
2150
2316
|
});
|
|
2151
2317
|
}
|
|
2152
|
-
function
|
|
2153
|
-
|
|
2318
|
+
function Sr(e, t) {
|
|
2319
|
+
Lr(e, t), vr(e, t), Ya(e, t), Fr(e, t), xr(e, t), Ua(e, t);
|
|
2320
|
+
}
|
|
2321
|
+
function Ue(e, t = null, a = /* @__PURE__ */ new Set()) {
|
|
2322
|
+
const r = [];
|
|
2323
|
+
if (!Array.isArray(e)) return r;
|
|
2324
|
+
for (const i of e) {
|
|
2325
|
+
if (!i || typeof i != "object" || !i.id) continue;
|
|
2326
|
+
const o = String(i.id);
|
|
2327
|
+
if (a.has(o)) continue;
|
|
2328
|
+
a.add(o);
|
|
2329
|
+
const n = { ...i, id: o };
|
|
2330
|
+
delete n.children, t && n.parentId === void 0 && (n.parentId = t), r.push(n), Array.isArray(i.children) && i.children.length > 0 && r.push(...Ue(i.children, o, a));
|
|
2331
|
+
}
|
|
2332
|
+
return r;
|
|
2333
|
+
}
|
|
2334
|
+
function $r(e, t) {
|
|
2335
|
+
const a = e ?? { camadas: /* @__PURE__ */ new Set(), idsAlterados: /* @__PURE__ */ new Set(), selecaoAfetada: !1 };
|
|
2336
|
+
if (t.camadas === "todas") a.camadas = "todas";
|
|
2337
|
+
else if (a.camadas !== "todas") for (const r of t.camadas) a.camadas.add(r);
|
|
2338
|
+
for (const r of t.idsAlterados) a.idsAlterados.add(r);
|
|
2339
|
+
return a.selecaoAfetada = a.selecaoAfetada || t.selecaoAfetada, a;
|
|
2340
|
+
}
|
|
2341
|
+
const ce = /* @__PURE__ */ new WeakMap();
|
|
2342
|
+
function ma(e) {
|
|
2343
|
+
const t = /* @__PURE__ */ new Map();
|
|
2344
|
+
for (let a = 0; a < e.length; a++) {
|
|
2345
|
+
const r = e[a];
|
|
2346
|
+
r && r.id && !t.has(r.id) && t.set(r.id, a);
|
|
2347
|
+
}
|
|
2348
|
+
return ce.set(e, { tamanho: e.length, posicoes: t }), t;
|
|
2349
|
+
}
|
|
2350
|
+
function Mr(e) {
|
|
2351
|
+
const t = Array.isArray(e) ? ce.get(e) : void 0;
|
|
2352
|
+
return t !== void 0 && t.tamanho === e.length && t.posicoes.size === e.length;
|
|
2353
|
+
}
|
|
2354
|
+
function ee(e, t) {
|
|
2355
|
+
var s, l;
|
|
2356
|
+
if (!Array.isArray(e)) return -1;
|
|
2357
|
+
const a = ce.get(e), r = a !== void 0 && a.tamanho === e.length, o = (r ? a.posicoes : ma(e)).get(t);
|
|
2358
|
+
if (o === void 0) return -1;
|
|
2359
|
+
if (((s = e[o]) == null ? void 0 : s.id) === t) return o;
|
|
2360
|
+
if (!r) return -1;
|
|
2361
|
+
const n = ma(e).get(t);
|
|
2362
|
+
return n !== void 0 && ((l = e[n]) == null ? void 0 : l.id) === t ? n : -1;
|
|
2363
|
+
}
|
|
2364
|
+
function zr(e, t) {
|
|
2365
|
+
const a = ce.get(e);
|
|
2366
|
+
!a || a.tamanho !== e.length - 1 || (a.posicoes.has(t) || a.posicoes.set(t, e.length - 1), a.tamanho = e.length);
|
|
2367
|
+
}
|
|
2368
|
+
function Pr(e) {
|
|
2369
|
+
const t = e.lastClickedFeatureId;
|
|
2370
|
+
t && !e.feicoes.some((a) => a.id === t) && (e.lastClickedFeatureId = null);
|
|
2371
|
+
}
|
|
2372
|
+
function Ja(e) {
|
|
2373
|
+
if (!Array.isArray(e)) return [];
|
|
2374
|
+
const t = /* @__PURE__ */ new Map(), a = [];
|
|
2375
|
+
for (const r of e) {
|
|
2376
|
+
if (!r || typeof r != "object" || !r.id) continue;
|
|
2377
|
+
const i = String(r.id);
|
|
2378
|
+
t.has(i) || (t.set(i, a.length), a.push({ ...r, id: i }));
|
|
2379
|
+
}
|
|
2380
|
+
return ce.set(a, { tamanho: a.length, posicoes: t }), a;
|
|
2381
|
+
}
|
|
2382
|
+
function qr(e, t, a) {
|
|
2383
|
+
if (e.camadas = Array.isArray(t) ? Ue(t) : [], e.lembranca.limparOrigens(), e.persistir) {
|
|
2384
|
+
const o = e.lembranca.carregar();
|
|
2385
|
+
e.lembranca.reidratar(e.camadas, o, e.expandedLayers, e.ordemFilhosPorPai), o != null && o.camadaAtivaId && e.camadas.some((n) => n.id === o.camadaAtivaId) && (e.camadaAtivaId = o.camadaAtivaId);
|
|
2386
|
+
} else
|
|
2387
|
+
e.camadas.forEach((o) => {
|
|
2388
|
+
e.lembranca.registrarOrigem(o), e.expandedLayers.has(o.id) || e.expandedLayers.add(o.id);
|
|
2389
|
+
});
|
|
2390
|
+
if (Array.isArray(a)) {
|
|
2391
|
+
e.feicoes = Ja(a);
|
|
2392
|
+
const o = new Set(e.camadas.map((s) => s.id)), n = e.feicoes.filter((s) => s.layerId && !o.has(s.layerId));
|
|
2393
|
+
n.length > 0 && console.warn(
|
|
2394
|
+
`[UI-Camadas] ${n.length} feição(ões) possuem 'layerId' não cadastrado nas camadas:`,
|
|
2395
|
+
n.map((s) => ({ id: s.id, nome: s.name, layerId: s.layerId }))
|
|
2396
|
+
), Ra(e.selectedFeatureIds, e.feicoes), Pr(e);
|
|
2397
|
+
}
|
|
2398
|
+
const r = new Set(e.camadas.map((o) => o.id));
|
|
2399
|
+
if (e.activeSettingsLayerId && !r.has(e.activeSettingsLayerId) && (e.activeSettingsLayerId = null), e.editingLayerId && !r.has(e.editingLayerId) && (e.editingLayerId = null), e.expandedFeatureLimits)
|
|
2400
|
+
for (const o of e.expandedFeatureLimits.keys())
|
|
2401
|
+
r.has(o) || e.expandedFeatureLimits.delete(o);
|
|
2402
|
+
const i = e.getAttribute("camada-ativa");
|
|
2403
|
+
e.camadas.length > 0 && (!i || !r.has(i)) && (e.camadaAtivaId = e.camadas[0].id), e.salvarLembrancaEstado(), e.solicitarRenderizacao();
|
|
2404
|
+
}
|
|
2405
|
+
function Br(e, t) {
|
|
2406
|
+
const a = /* @__PURE__ */ new Set();
|
|
2407
|
+
for (let r = 0; r < t.length; r++) {
|
|
2408
|
+
const i = t[r], o = e[r], n = o && o.id === i.id ? o : e[ee(e, i.id)];
|
|
2409
|
+
(!n || !Dt(n, i)) && a.add(i.id);
|
|
2410
|
+
}
|
|
2411
|
+
return a;
|
|
2412
|
+
}
|
|
2413
|
+
function Dr(e, t) {
|
|
2414
|
+
const a = e.feicoes, r = Ja(t);
|
|
2415
|
+
e.feicoes = r;
|
|
2416
|
+
const i = (n) => !!n && ee(r, n) >= 0, o = e.selectedFeatureIds.size;
|
|
2417
|
+
for (const n of e.selectedFeatureIds)
|
|
2418
|
+
i(n) || e.selectedFeatureIds.delete(n);
|
|
2419
|
+
e.lastClickedFeatureId && !i(e.lastClickedFeatureId) && (e.lastClickedFeatureId = null), e.editingFeatureId && !i(e.editingFeatureId) && (e.editingFeatureId = null), e.solicitarAtualizacaoFeicoes({
|
|
2420
|
+
camadas: "todas",
|
|
2421
|
+
idsAlterados: Br(a, e.feicoes),
|
|
2422
|
+
selecaoAfetada: e.selectedFeatureIds.size !== o
|
|
2423
|
+
});
|
|
2424
|
+
}
|
|
2425
|
+
function Rr(e, t) {
|
|
2426
|
+
if (!t || !t.id) return;
|
|
2427
|
+
if (e.camadas.some((r) => r.id === t.id)) {
|
|
2428
|
+
console.warn(`[UI-Camadas] adicionarCamada ignorado: já existe uma camada com id '${t.id}'.`);
|
|
2429
|
+
return;
|
|
2430
|
+
}
|
|
2431
|
+
const a = new Set(e.camadas.map((r) => r.id));
|
|
2432
|
+
for (const r of Ue([t])) {
|
|
2433
|
+
if (a.has(r.id)) {
|
|
2434
|
+
console.warn(`[UI-Camadas] adicionarCamada: subcamada '${r.id}' ignorada, o id já existe.`);
|
|
2435
|
+
continue;
|
|
2436
|
+
}
|
|
2437
|
+
a.add(r.id), e.camadas.push(r), e.lembranca.registrarOrigem(r), e.expandedLayers.add(r.id), r.parentId && e.expandedLayers.add(r.parentId);
|
|
2438
|
+
}
|
|
2439
|
+
e.salvarLembrancaEstado(), e.solicitarRenderizacao();
|
|
2440
|
+
}
|
|
2441
|
+
function Tr(e, t) {
|
|
2442
|
+
var r, i;
|
|
2443
|
+
const a = e.camadas.find((o) => o.id === t);
|
|
2444
|
+
e.camadas.forEach((o) => {
|
|
2445
|
+
o.parentId === t && (o.parentId = null);
|
|
2446
|
+
}), e.camadas = e.camadas.filter((o) => o.id !== t), e.feicoes = e.feicoes.filter((o) => o.layerId !== t), e.ordemFilhosPorPai && (e.ordemFilhosPorPai.delete(t), a != null && a.parentId && N(e.ordemFilhosPorPai, a.parentId, O(t))), e.lembranca.esquecerCamada(t), e.expandedLayers.delete(t), (r = e.expandedFeatureLimits) == null || r.delete(t), e.activeSettingsLayerId === t && (e.activeSettingsLayerId = null), e.editingLayerId === t && (e.editingLayerId = null), e.editingFeatureId && !e.feicoes.some((o) => o.id === e.editingFeatureId) && (e.editingFeatureId = null), Ra(e.selectedFeatureIds, e.feicoes), e.selectedFeatureIds.size === 0 && (e.lastClickedFeatureId = null), e.camadaAtivaId === t && (e.camadaAtivaId = ((i = e.camadas[0]) == null ? void 0 : i.id) ?? null), e.salvarLembrancaEstado(), e.solicitarRenderizacao();
|
|
2447
|
+
}
|
|
2448
|
+
function Or(e, t) {
|
|
2449
|
+
if (!(!t || !t.id)) {
|
|
2450
|
+
if (ee(e.feicoes, t.id) !== -1) {
|
|
2451
|
+
console.warn(`[UI-Camadas] adicionarFeicao ignorado: já existe uma feição com id '${t.id}'.`);
|
|
2452
|
+
return;
|
|
2453
|
+
}
|
|
2454
|
+
e.feicoes.push({ ...t }), zr(e.feicoes, t.id), e.solicitarAtualizacaoFeicoes({
|
|
2455
|
+
camadas: /* @__PURE__ */ new Set([t.layerId || ""]),
|
|
2456
|
+
idsAlterados: /* @__PURE__ */ new Set(),
|
|
2457
|
+
selecaoAfetada: e.selectedFeatureIds.has(t.id)
|
|
2458
|
+
});
|
|
2459
|
+
}
|
|
2460
|
+
}
|
|
2461
|
+
function jr(e, t) {
|
|
2462
|
+
if (!t || typeof t != "object" || !t.id) return;
|
|
2463
|
+
const a = ee(e.feicoes, t.id);
|
|
2464
|
+
if (a !== -1) {
|
|
2465
|
+
const r = e.feicoes[a].layerId || "";
|
|
2466
|
+
e.feicoes[a] = { ...e.feicoes[a], ...t }, e.solicitarAtualizacaoFeicoes({
|
|
2467
|
+
camadas: /* @__PURE__ */ new Set([r, e.feicoes[a].layerId || ""]),
|
|
2468
|
+
idsAlterados: /* @__PURE__ */ new Set([t.id]),
|
|
2469
|
+
selecaoAfetada: !1
|
|
2470
|
+
});
|
|
2471
|
+
}
|
|
2472
|
+
}
|
|
2473
|
+
function Nr(e, t) {
|
|
2474
|
+
const a = e.feicoes.find((i) => i.id === t);
|
|
2475
|
+
e.feicoes = e.feicoes.filter((i) => i.id !== t), a != null && a.layerId && e.ordemFilhosPorPai && N(e.ordemFilhosPorPai, a.layerId, B(t));
|
|
2476
|
+
const r = e.selectedFeatureIds.delete(t);
|
|
2477
|
+
e.lastClickedFeatureId === t && (e.lastClickedFeatureId = null), e.editingFeatureId === t && (e.editingFeatureId = null), e.solicitarAtualizacaoFeicoes({
|
|
2478
|
+
camadas: new Set(a ? [a.layerId || ""] : []),
|
|
2479
|
+
idsAlterados: /* @__PURE__ */ new Set(),
|
|
2480
|
+
selecaoAfetada: r
|
|
2481
|
+
});
|
|
2482
|
+
}
|
|
2483
|
+
const be = "ui-virtual-retida";
|
|
2484
|
+
function oe(e) {
|
|
2485
|
+
var a;
|
|
2486
|
+
const t = e.nextSibling;
|
|
2487
|
+
t && t.nodeType === 3 && !(t.textContent ?? "").trim() && ((a = t.parentNode) == null || a.removeChild(t)), e.remove();
|
|
2488
|
+
}
|
|
2489
|
+
function Hr(e, t) {
|
|
2490
|
+
if (!e || !t.contains(e)) return null;
|
|
2491
|
+
const a = Array.from(e.attributes).find((r) => r.name.startsWith("data-") && r.value !== "");
|
|
2492
|
+
return a ? { nome: a.name, valor: a.value } : null;
|
|
2493
|
+
}
|
|
2494
|
+
function ha(e, t) {
|
|
2495
|
+
if (t) {
|
|
2496
|
+
const a = String(t.posicao), r = String(t.total);
|
|
2497
|
+
e.getAttribute("aria-posinset") !== a && e.setAttribute("aria-posinset", a), e.getAttribute("aria-setsize") !== r && e.setAttribute("aria-setsize", r);
|
|
2498
|
+
} else (e.hasAttribute("aria-posinset") || e.hasAttribute("aria-setsize")) && (e.removeAttribute("aria-posinset"), e.removeAttribute("aria-setsize"));
|
|
2499
|
+
}
|
|
2500
|
+
function Vr(e, t) {
|
|
2501
|
+
const a = ja(e, t.janelas), r = [];
|
|
2502
|
+
for (const i of e.filhos) {
|
|
2503
|
+
if (i.tipo === "camada") {
|
|
2504
|
+
r.push({
|
|
2505
|
+
tipo: "grupo",
|
|
2506
|
+
id: i.nodo.camada.id,
|
|
2507
|
+
aria: a ? { posicao: i.posicao, total: e.totalIrmaos } : null
|
|
2508
|
+
});
|
|
2509
|
+
continue;
|
|
2510
|
+
}
|
|
2511
|
+
const { corrida: o } = i, n = t.janelas.get(o.chave);
|
|
2512
|
+
if (n) {
|
|
2513
|
+
n.virtual && r.push({ tipo: "espaco", chave: `${o.chave}:antes`, altura: n.inicio * t.alturaLinha });
|
|
2514
|
+
for (let s = n.inicio; s < n.fim; s++)
|
|
2515
|
+
r.push({
|
|
2516
|
+
tipo: "feicao",
|
|
2517
|
+
feicao: o.feicoes[s],
|
|
2518
|
+
aria: a ? { posicao: o.posInicial + s, total: e.totalIrmaos } : null
|
|
2519
|
+
});
|
|
2520
|
+
n.virtual && r.push({
|
|
2521
|
+
tipo: "espaco",
|
|
2522
|
+
chave: `${o.chave}:depois`,
|
|
2523
|
+
altura: (o.feicoes.length - n.fim) * t.alturaLinha
|
|
2524
|
+
});
|
|
2525
|
+
}
|
|
2526
|
+
}
|
|
2527
|
+
return r;
|
|
2528
|
+
}
|
|
2529
|
+
function _r(e) {
|
|
2530
|
+
const t = document.createElement("div");
|
|
2531
|
+
return t.className = "ui-virtual-espaco", t.setAttribute("data-virtual-espaco", e), t.setAttribute("aria-hidden", "true"), t;
|
|
2532
|
+
}
|
|
2533
|
+
function Gr(e, t, a) {
|
|
2534
|
+
const r = Vr(a, e.plano), i = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set();
|
|
2535
|
+
for (const m of r)
|
|
2536
|
+
m.tipo === "feicao" ? i.add(m.feicao.id) : m.tipo === "espaco" && o.add(m.chave);
|
|
2537
|
+
const n = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), f = e.shadow.activeElement;
|
|
2538
|
+
for (let m = t.firstElementChild, g; m; m = g) {
|
|
2539
|
+
g = m.nextElementSibling;
|
|
2540
|
+
const y = m.getAttribute("data-feat-row");
|
|
2541
|
+
if (y !== null) {
|
|
2542
|
+
const b = e.idsRefazer.has(y) && i.has(y) && !n.has(y);
|
|
2543
|
+
if (i.has(y) && !n.has(y) && !b) {
|
|
2544
|
+
n.set(y, m), m.classList.contains(be) && m.classList.remove(be);
|
|
2545
|
+
continue;
|
|
2546
|
+
}
|
|
2547
|
+
if (!b && m.classList.contains("dragging")) {
|
|
2548
|
+
m.classList.add(be);
|
|
2549
|
+
continue;
|
|
2550
|
+
}
|
|
2551
|
+
b ? c.set(y, { tabindex: m.getAttribute("tabindex"), foco: Hr(f, m) }) : (f && m.contains(f) && (e.focoPerdido = !0), m.getAttribute("tabindex") === "0" && (e.tabulavelRemovida = !0)), oe(m);
|
|
2552
|
+
continue;
|
|
2553
|
+
}
|
|
2554
|
+
const v = m.getAttribute("data-virtual-espaco");
|
|
2555
|
+
if (v !== null) {
|
|
2556
|
+
o.has(v) && !s.has(v) ? s.set(v, m) : oe(m);
|
|
2557
|
+
continue;
|
|
2558
|
+
}
|
|
2559
|
+
if (m.classList.contains("ui-layer-group")) {
|
|
2560
|
+
const b = m.getAttribute("data-layer-id");
|
|
2561
|
+
b !== null && !l.has(b) && l.set(b, m);
|
|
2562
|
+
}
|
|
2563
|
+
}
|
|
2564
|
+
const p = r.filter(
|
|
2565
|
+
(m) => m.tipo === "feicao" && !n.has(m.feicao.id)
|
|
2566
|
+
), d = /* @__PURE__ */ new Map();
|
|
2567
|
+
if (p.length > 0) {
|
|
2568
|
+
const m = Be(a.camada, a.profundidade, e.herdado().get(a.camada.id)), g = p.map(
|
|
2569
|
+
(b) => De(
|
|
2570
|
+
b.feicao,
|
|
2571
|
+
m,
|
|
2572
|
+
e.selecionadas.has(b.feicao.id),
|
|
2573
|
+
e.editandoFeicaoId === b.feicao.id,
|
|
2574
|
+
b.aria
|
|
2575
|
+
)
|
|
2576
|
+
).join(""), y = document.createElement("template");
|
|
2577
|
+
y.innerHTML = g;
|
|
2578
|
+
const v = Array.from(y.content.children);
|
|
2579
|
+
if (v.length !== p.length) return !1;
|
|
2580
|
+
e.ligar(y.content), v.forEach((b, w) => d.set(p[w].feicao.id, b));
|
|
2581
|
+
}
|
|
2582
|
+
const u = (m) => {
|
|
2583
|
+
let g = m;
|
|
2584
|
+
for (; g && g.classList.contains(be); ) g = g.nextElementSibling;
|
|
2585
|
+
return g;
|
|
2586
|
+
};
|
|
2587
|
+
let h = u(t.firstElementChild);
|
|
2588
|
+
for (const m of r) {
|
|
2589
|
+
let g;
|
|
2590
|
+
if (m.tipo === "grupo") {
|
|
2591
|
+
if (g = l.get(m.id), !g) return !1;
|
|
2592
|
+
ha(g, m.aria);
|
|
2593
|
+
} else if (m.tipo === "espaco") {
|
|
2594
|
+
g = s.get(m.chave) ?? _r(m.chave);
|
|
2595
|
+
const y = `${Math.max(0, Math.round(m.altura))}px`;
|
|
2596
|
+
g.style.height !== y && (g.style.height = y);
|
|
2597
|
+
} else {
|
|
2598
|
+
const y = n.get(m.feicao.id);
|
|
2599
|
+
if (g = y ?? d.get(m.feicao.id), !g) return !1;
|
|
2600
|
+
y && ha(y, m.aria);
|
|
2601
|
+
}
|
|
2602
|
+
g === h ? h = u(g.nextElementSibling) : t.insertBefore(g, h);
|
|
2603
|
+
}
|
|
2604
|
+
return c.forEach((m, g) => {
|
|
2605
|
+
const y = d.get(g);
|
|
2606
|
+
if (!y || (m.tabindex !== null && y.setAttribute("tabindex", m.tabindex), !m.foco)) return;
|
|
2607
|
+
const { nome: v, valor: b } = m.foco, w = y.getAttribute(v) === b ? y : Array.from(y.querySelectorAll(`[${v}]`)).find((x) => x.getAttribute(v) === b);
|
|
2608
|
+
w == null || w.focus({ preventScroll: !0 });
|
|
2609
|
+
}), !0;
|
|
2154
2610
|
}
|
|
2155
|
-
function
|
|
2611
|
+
function ae(e, t) {
|
|
2612
|
+
for (let a = e.firstElementChild; a; a = a.nextElementSibling)
|
|
2613
|
+
if (a.classList.contains(t)) return a;
|
|
2614
|
+
return null;
|
|
2615
|
+
}
|
|
2616
|
+
function Ka(e) {
|
|
2617
|
+
const t = /* @__PURE__ */ new Map(), a = (r) => {
|
|
2618
|
+
for (let i = r.firstElementChild; i; i = i.nextElementSibling) {
|
|
2619
|
+
if (!i.classList.contains("ui-layer-group")) continue;
|
|
2620
|
+
const o = i.getAttribute("data-layer-id");
|
|
2621
|
+
o !== null && !t.has(o) && t.set(o, i);
|
|
2622
|
+
const n = ae(i, "ui-children-container");
|
|
2623
|
+
n && a(n);
|
|
2624
|
+
}
|
|
2625
|
+
};
|
|
2626
|
+
return a(e), t;
|
|
2627
|
+
}
|
|
2628
|
+
function ga(e, t) {
|
|
2629
|
+
var o;
|
|
2630
|
+
const a = "[data-layer-row], [data-feat-row]", r = t ? ie(e, t) : null, i = Array.from(e.querySelectorAll('[data-layer-row][tabindex="0"], [data-feat-row][tabindex="0"]'));
|
|
2631
|
+
if (r) {
|
|
2632
|
+
i.forEach((n) => n !== r && n.setAttribute("tabindex", "-1")), r.getAttribute("tabindex") !== "0" && r.setAttribute("tabindex", "0");
|
|
2633
|
+
return;
|
|
2634
|
+
}
|
|
2635
|
+
if (i.length >= 1) {
|
|
2636
|
+
i.slice(1).forEach((n) => n.setAttribute("tabindex", "-1"));
|
|
2637
|
+
return;
|
|
2638
|
+
}
|
|
2639
|
+
(o = e.querySelector(a)) == null || o.setAttribute("tabindex", "0");
|
|
2640
|
+
}
|
|
2641
|
+
function Wa(e) {
|
|
2642
|
+
if (!e) return null;
|
|
2643
|
+
const t = e.getAttribute("data-layer-row");
|
|
2644
|
+
if (t !== null) return `L:${t}`;
|
|
2645
|
+
const a = e.getAttribute("data-feat-row");
|
|
2646
|
+
return a !== null ? `F:${a}` : null;
|
|
2647
|
+
}
|
|
2648
|
+
function ie(e, t) {
|
|
2649
|
+
const a = t.startsWith("L:") ? "data-layer-row" : t.startsWith("F:") ? "data-feat-row" : null;
|
|
2650
|
+
return a ? M(e, a, t.slice(2)) : null;
|
|
2651
|
+
}
|
|
2652
|
+
function Ur(e) {
|
|
2156
2653
|
if (!e.arvoreRenderizada) return { incremental: !1, motivo: "arvore-nao-renderizada" };
|
|
2157
2654
|
if (e.buscaAtiva) return { incremental: !1, motivo: "busca-ativa" };
|
|
2158
2655
|
if (e.editandoCamada || e.editandoFeicao) return { incremental: !1, motivo: "edicao-inline" };
|
|
@@ -2163,12 +2660,12 @@ function Nt(e) {
|
|
|
2163
2660
|
}
|
|
2164
2661
|
return e.idsDuplicados ? { incremental: !1, motivo: "ids-duplicados" } : { incremental: !0 };
|
|
2165
2662
|
}
|
|
2166
|
-
function
|
|
2663
|
+
function Qa(e, t = /* @__PURE__ */ new Map()) {
|
|
2167
2664
|
for (const a of e)
|
|
2168
|
-
t.set(a.camada.id, a),
|
|
2665
|
+
t.set(a.camada.id, a), Qa(a.subcamadas, t);
|
|
2169
2666
|
return t;
|
|
2170
2667
|
}
|
|
2171
|
-
function
|
|
2668
|
+
function Xa(e) {
|
|
2172
2669
|
const t = /* @__PURE__ */ new Map();
|
|
2173
2670
|
for (let a = 0; a < e.length; a++) {
|
|
2174
2671
|
const r = e[a];
|
|
@@ -2178,24 +2675,17 @@ function Ht(e) {
|
|
|
2178
2675
|
}
|
|
2179
2676
|
return t;
|
|
2180
2677
|
}
|
|
2181
|
-
function
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
if (!i.classList.contains("ui-layer-group")) continue;
|
|
2190
|
-
const o = i.getAttribute("data-layer-id");
|
|
2191
|
-
o !== null && t.set(o, i);
|
|
2192
|
-
const n = te(i, "ui-children-container");
|
|
2193
|
-
n && a(n);
|
|
2194
|
-
}
|
|
2678
|
+
function Za(e, t, a) {
|
|
2679
|
+
return {
|
|
2680
|
+
hierarquia: t,
|
|
2681
|
+
feicoesPorCamada: a,
|
|
2682
|
+
camadasVisiveis: null,
|
|
2683
|
+
expandida: (r) => e.expandedLayers.has(r),
|
|
2684
|
+
limite: (r) => e.expandedFeatureLimits.get(r) ?? _e,
|
|
2685
|
+
ordemFilhosPorPai: e.ordemFilhosPorPai
|
|
2195
2686
|
};
|
|
2196
|
-
return a(e), t;
|
|
2197
2687
|
}
|
|
2198
|
-
function
|
|
2688
|
+
function Yr(e) {
|
|
2199
2689
|
if (!e || e.length < 2) return !1;
|
|
2200
2690
|
const t = /* @__PURE__ */ new Set();
|
|
2201
2691
|
for (const a of e) {
|
|
@@ -2204,7 +2694,7 @@ function _t(e) {
|
|
|
2204
2694
|
}
|
|
2205
2695
|
return !1;
|
|
2206
2696
|
}
|
|
2207
|
-
function
|
|
2697
|
+
function Jr(e, t) {
|
|
2208
2698
|
var i;
|
|
2209
2699
|
const a = new Map(t.map((o) => [o.id, o])), r = /* @__PURE__ */ new Set();
|
|
2210
2700
|
for (const o of e) {
|
|
@@ -2214,159 +2704,127 @@ function Vt(e, t) {
|
|
|
2214
2704
|
}
|
|
2215
2705
|
return r;
|
|
2216
2706
|
}
|
|
2217
|
-
function
|
|
2707
|
+
function je(e) {
|
|
2218
2708
|
const t = document.createElement("template");
|
|
2219
2709
|
return t.innerHTML = e, { modelo: t, elementos: Array.from(t.content.children) };
|
|
2220
2710
|
}
|
|
2221
|
-
function
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
}
|
|
2226
|
-
|
|
2227
|
-
if (!e || !t.contains(e)) return null;
|
|
2228
|
-
const a = Array.from(e.attributes).find((r) => r.name.startsWith("data-") && r.value !== "");
|
|
2229
|
-
return a ? { nome: a.name, valor: a.value } : null;
|
|
2711
|
+
function et(e, t, a) {
|
|
2712
|
+
for (const r of a) {
|
|
2713
|
+
const i = e.plano.estrutura.containers.get(r), o = t.get(r), n = o ? ae(o, "ui-children-container") : null;
|
|
2714
|
+
if (!i || !n || !Gr(e, n, i)) return !1;
|
|
2715
|
+
}
|
|
2716
|
+
return !0;
|
|
2230
2717
|
}
|
|
2231
|
-
function
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
let b = null;
|
|
2239
|
-
for (let x = s.firstElementChild, P; x; x = P) {
|
|
2240
|
-
P = x.nextElementSibling;
|
|
2241
|
-
const C = x.getAttribute("data-feat-row");
|
|
2242
|
-
if (C === null) {
|
|
2243
|
-
!b && !x.classList.contains("ui-layer-group") && (b = x);
|
|
2244
|
-
continue;
|
|
2245
|
-
}
|
|
2246
|
-
const z = i.idsAlterados.has(C) && u.has(C) && !f.has(C);
|
|
2247
|
-
!u.has(C) || f.has(C) || z ? (z && m.set(C, { tabindex: x.getAttribute("tabindex"), foco: Ut(g, x) }), ge(x)) : (f.set(C, x), b || (b = x));
|
|
2248
|
-
}
|
|
2249
|
-
const h = p.filter((x) => !f.has(x.id));
|
|
2250
|
-
let v = [];
|
|
2251
|
-
if (h.length > 0) {
|
|
2252
|
-
e.herdado || (e.herdado = he(a.camadas));
|
|
2253
|
-
const x = Se(c, n.depth, e.herdado.get(t)), P = h.map(
|
|
2254
|
-
(T) => Fe(T, x, a.selectedFeatureIds.has(T.id), a.editingFeatureId === T.id)
|
|
2255
|
-
).join(""), { modelo: C, elementos: z } = me(P);
|
|
2256
|
-
if (z.length !== h.length) return !1;
|
|
2257
|
-
e.ligar(C.content), v = z;
|
|
2258
|
-
}
|
|
2259
|
-
let A = b, I = 0;
|
|
2260
|
-
const w = /* @__PURE__ */ new Map();
|
|
2261
|
-
for (const x of p) {
|
|
2262
|
-
const P = f.get(x.id);
|
|
2263
|
-
if (P)
|
|
2264
|
-
P === A ? A = P.nextElementSibling : s.insertBefore(P, A);
|
|
2265
|
-
else {
|
|
2266
|
-
const C = v[I++];
|
|
2267
|
-
s.insertBefore(C, A), w.set(x.id, C);
|
|
2718
|
+
function at(e, t) {
|
|
2719
|
+
const a = [];
|
|
2720
|
+
return t.estrutura.containers.forEach((r, i) => {
|
|
2721
|
+
const o = e == null ? void 0 : e.estrutura.containers.get(i);
|
|
2722
|
+
if (!e || !o || o.exibido !== r.exibido) {
|
|
2723
|
+
a.push(i);
|
|
2724
|
+
return;
|
|
2268
2725
|
}
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
)
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
function Kt(e, t, a, r, i) {
|
|
2280
|
-
const o = M(a.camada.id), n = !!(a.camada.isGroup || a.subcamadas.length > 0), s = i > r, c = a.subcamadas.length === 0 && i === 0, l = te(t, "ui-truncate-notice"), d = te(t, "ui-empty-row");
|
|
2281
|
-
if (d && !c && ge(d), l && !s && ge(l), s)
|
|
2282
|
-
if (l) {
|
|
2283
|
-
const p = ua(r, i), u = l.querySelector("span"), f = l.querySelector(".ui-truncate-more-btn");
|
|
2284
|
-
if (!u || !f) return !1;
|
|
2285
|
-
u.textContent !== p.resumo && (u.textContent = p.resumo), f.textContent !== p.botao && (f.textContent = p.botao);
|
|
2726
|
+
ar(r, e.janelas, t.janelas) && a.push(i);
|
|
2727
|
+
}), a;
|
|
2728
|
+
}
|
|
2729
|
+
function Kr(e, t, a, r, i) {
|
|
2730
|
+
const o = S(a.camada.id), n = !!(a.camada.isGroup || a.subcamadas.length > 0), s = i > r, l = a.subcamadas.length === 0 && i === 0, c = ae(t, "ui-truncate-notice"), f = ae(t, "ui-empty-row");
|
|
2731
|
+
if (f && !l && oe(f), c && !s && oe(c), s)
|
|
2732
|
+
if (c) {
|
|
2733
|
+
const p = $a(r, i), d = c.querySelector("span"), u = c.querySelector(".ui-truncate-more-btn");
|
|
2734
|
+
if (!d || !u) return !1;
|
|
2735
|
+
d.textContent !== p.resumo && (d.textContent = p.resumo), u.textContent !== p.botao && (u.textContent = p.botao);
|
|
2286
2736
|
} else {
|
|
2287
|
-
const { modelo: p, elementos:
|
|
2288
|
-
if (
|
|
2289
|
-
e.ligar(p.content), t.appendChild(
|
|
2737
|
+
const { modelo: p, elementos: d } = je(Ma(o, r, i));
|
|
2738
|
+
if (d.length !== 1) return !1;
|
|
2739
|
+
e.ligar(p.content), t.appendChild(d[0]);
|
|
2290
2740
|
}
|
|
2291
|
-
if (
|
|
2292
|
-
const { elementos: p } =
|
|
2741
|
+
if (l && !f) {
|
|
2742
|
+
const { elementos: p } = je(za(n));
|
|
2293
2743
|
if (p.length !== 1) return !1;
|
|
2294
2744
|
t.appendChild(p[0]);
|
|
2295
2745
|
}
|
|
2296
2746
|
return !0;
|
|
2297
2747
|
}
|
|
2298
|
-
function
|
|
2748
|
+
function tt(e, t, a) {
|
|
2299
2749
|
let r = 0, i = 0;
|
|
2300
2750
|
const o = t.get(e.camada.id);
|
|
2301
2751
|
if (o && (r += o.length, a.size > 0))
|
|
2302
2752
|
for (let n = 0; n < o.length; n++)
|
|
2303
2753
|
a.has(o[n].id) && i++;
|
|
2304
2754
|
for (const n of e.subcamadas) {
|
|
2305
|
-
const s =
|
|
2755
|
+
const s = tt(n, t, a);
|
|
2306
2756
|
r += s.total, i += s.sel;
|
|
2307
2757
|
}
|
|
2308
2758
|
return { total: r, sel: i };
|
|
2309
2759
|
}
|
|
2310
|
-
function
|
|
2311
|
-
const a = e.grupos.get(t), r = e.nodos.get(t), i = a ?
|
|
2760
|
+
function Wr(e, t) {
|
|
2761
|
+
const a = e.grupos.get(t), r = e.nodos.get(t), i = a ? ae(a, "ui-layer-row") : null, o = i == null ? void 0 : i.querySelector(".ui-col-name");
|
|
2312
2762
|
if (!a || !r || !i || !o) return !1;
|
|
2313
|
-
const { host: n } = e, { total: s, sel:
|
|
2314
|
-
if (
|
|
2763
|
+
const { host: n } = e, { total: s, sel: l } = tt(r, e.porCamada, n.selectedFeatureIds), c = (e.porCamada.get(t) ?? []).length, f = r.subcamadas.length, p = !!(r.camada.isGroup || f > 0), d = o.querySelector(".ui-count-chip");
|
|
2764
|
+
if (d)
|
|
2315
2765
|
if (s === 0 && p)
|
|
2316
|
-
|
|
2766
|
+
oe(d);
|
|
2317
2767
|
else {
|
|
2318
|
-
const
|
|
2319
|
-
|
|
2768
|
+
const u = String(s), h = Fa(s, c, f);
|
|
2769
|
+
d.textContent !== u && (d.textContent = u), d.getAttribute("title") !== h && d.setAttribute("title", h);
|
|
2320
2770
|
}
|
|
2321
2771
|
else {
|
|
2322
|
-
const
|
|
2323
|
-
if (
|
|
2324
|
-
const { elementos:
|
|
2325
|
-
if (
|
|
2326
|
-
o.appendChild(
|
|
2772
|
+
const u = Sa(s, c, f, p);
|
|
2773
|
+
if (u) {
|
|
2774
|
+
const { elementos: h } = je(u);
|
|
2775
|
+
if (h.length !== 1) return !1;
|
|
2776
|
+
o.appendChild(h[0]);
|
|
2327
2777
|
}
|
|
2328
2778
|
}
|
|
2329
|
-
return
|
|
2779
|
+
return Va(i.querySelector(".ui-target-circle"), s, l), !0;
|
|
2330
2780
|
}
|
|
2331
|
-
function
|
|
2781
|
+
function Qr(e, t, a, r, i = null, o) {
|
|
2332
2782
|
if (e.camadas.length === 0) return !1;
|
|
2333
|
-
const
|
|
2334
|
-
existeNoModelo:
|
|
2335
|
-
renderizadaNoDom:
|
|
2336
|
-
drawerAberto: e.activeSettingsLayerId ===
|
|
2783
|
+
const n = t.getElementById("ui-layer-tree-mount"), s = te(e.camadas), l = Qa(s), c = n ? Ka(n) : /* @__PURE__ */ new Map(), f = Xa(e.feicoes), p = a.camadas === "todas" ? Array.from(l.keys()) : Array.from(a.camadas), d = p.map((b) => ({
|
|
2784
|
+
existeNoModelo: l.has(b),
|
|
2785
|
+
renderizadaNoDom: c.has(b),
|
|
2786
|
+
drawerAberto: e.activeSettingsLayerId === b
|
|
2337
2787
|
}));
|
|
2338
|
-
if (!
|
|
2339
|
-
arvoreRenderizada:
|
|
2788
|
+
if (!Ur({
|
|
2789
|
+
arvoreRenderizada: n !== null,
|
|
2340
2790
|
buscaAtiva: (e.searchQuery || "").trim() !== "",
|
|
2341
2791
|
editandoCamada: e.editingLayerId !== null,
|
|
2342
2792
|
editandoFeicao: e.editingFeatureId !== null,
|
|
2343
|
-
|
|
2344
|
-
|
|
2793
|
+
// A lista saneada já vem com índice de ids únicos; só listas sem índice são varridas
|
|
2794
|
+
idsDuplicados: !Mr(e.feicoes) && p.some((b) => Yr(f.get(b))),
|
|
2795
|
+
camadasAfetadas: d
|
|
2345
2796
|
}).incremental) return !1;
|
|
2346
|
-
const
|
|
2347
|
-
|
|
2797
|
+
const h = Ge(Za(e, s, f), i, e.activeSettingsLayerId);
|
|
2798
|
+
let m = null;
|
|
2799
|
+
const g = {
|
|
2348
2800
|
shadow: t,
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2801
|
+
plano: h,
|
|
2802
|
+
selecionadas: e.selectedFeatureIds,
|
|
2803
|
+
editandoFeicaoId: e.editingFeatureId,
|
|
2804
|
+
herdado: () => m ?? (m = le(e.camadas)),
|
|
2805
|
+
idsRefazer: a.idsAlterados,
|
|
2354
2806
|
ligar: r
|
|
2355
|
-
};
|
|
2356
|
-
for (const
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2807
|
+
}, y = new Set(p);
|
|
2808
|
+
for (const b of at(e.planoVirtual, h)) y.add(b);
|
|
2809
|
+
if (!et(g, c, y)) return !1;
|
|
2810
|
+
o && (g.focoPerdido && (o.focoPerdido = !0), g.tabulavelRemovida && (o.tabulavelRemovida = !0));
|
|
2811
|
+
const v = { host: e, porCamada: f, nodos: l, grupos: c, ligar: r };
|
|
2812
|
+
for (const b of p) {
|
|
2813
|
+
const w = h.estrutura.containers.get(b), x = l.get(b), F = c.get(b), I = F ? ae(F, "ui-children-container") : null;
|
|
2814
|
+
if (!w || !x || !I || !Kr(v, I, x, w.limite, w.totalFeicoes)) return !1;
|
|
2815
|
+
}
|
|
2816
|
+
for (const b of Jr(p, e.camadas))
|
|
2817
|
+
if (!Wr(v, b)) return !1;
|
|
2818
|
+
return e.planoVirtual = h, (a.selecaoAfetada || e.selectedFeatureIds.size > 0) && _a(e, t), !0;
|
|
2819
|
+
}
|
|
2820
|
+
function Xr(e) {
|
|
2363
2821
|
if (!e.isConnected) return;
|
|
2364
2822
|
const t = document.createElement("div");
|
|
2365
|
-
t.className = "ui-basemap-preview-none", t.innerHTML =
|
|
2823
|
+
t.className = "ui-basemap-preview-none", t.innerHTML = A.gradeCad, e.replaceWith(t);
|
|
2366
2824
|
}
|
|
2367
|
-
function
|
|
2368
|
-
var
|
|
2369
|
-
const
|
|
2825
|
+
function Zr(e, t, a, r, i = null) {
|
|
2826
|
+
var y, v;
|
|
2827
|
+
const { html: o, plano: n } = Na({
|
|
2370
2828
|
camadas: e.camadas,
|
|
2371
2829
|
feicoes: e.feicoes,
|
|
2372
2830
|
camadaAtivaId: e.camadaAtivaId,
|
|
@@ -2380,50 +2838,145 @@ function Jt(e, t, a, r) {
|
|
|
2380
2838
|
mostrarBusca: e.mostrarBusca,
|
|
2381
2839
|
limitesPorCamada: e.expandedFeatureLimits,
|
|
2382
2840
|
mostrarBotaoColapsar: e.flutuante && e.getAttribute("colapsavel") !== "false",
|
|
2383
|
-
ordemFilhosPorPai: e.ordemFilhosPorPai
|
|
2384
|
-
|
|
2841
|
+
ordemFilhosPorPai: e.ordemFilhosPorPai,
|
|
2842
|
+
viewport: i
|
|
2843
|
+
});
|
|
2844
|
+
e.planoVirtual = n;
|
|
2845
|
+
const s = e.mostrarMapasBase ? zt(e.mapasBase, e.mapaBaseAtivo, e.mapasBaseRecolhido) : "", l = e.mostrarRodape ? qt(e.camadas, e.feicoes, e.selectedFeatureIds) : "", c = t.getElementById("ui-layer-tree-mount"), f = a.scrollTop, p = c ? c.scrollTop : 0, d = t.activeElement, u = d && a.contains(d) ? d.id : "", h = d && !u && a.contains(d) ? Array.from(d.attributes).find((b) => b.name.startsWith("data-") && b.value !== "") : void 0, m = d && "selectionStart" in d ? d.selectionStart : null;
|
|
2385
2846
|
a.innerHTML = `
|
|
2386
|
-
${i}
|
|
2387
|
-
${n}
|
|
2388
2847
|
${o}
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2848
|
+
${l}
|
|
2849
|
+
${s}
|
|
2850
|
+
`, a.scrollTop = f;
|
|
2851
|
+
const g = t.getElementById("ui-layer-tree-mount");
|
|
2852
|
+
if (g && (g.scrollTop = p), u) {
|
|
2853
|
+
const b = t.getElementById(u);
|
|
2854
|
+
if (b && (b.focus({ preventScroll: !0 }), m !== null && typeof b.setSelectionRange == "function"))
|
|
2394
2855
|
try {
|
|
2395
|
-
|
|
2856
|
+
b.setSelectionRange(m, m);
|
|
2396
2857
|
} catch {
|
|
2397
2858
|
}
|
|
2398
2859
|
}
|
|
2399
|
-
!
|
|
2400
|
-
const
|
|
2401
|
-
|
|
2402
|
-
}),
|
|
2860
|
+
!u && h && ((y = M(a, h.name, h.value)) == null || y.focus({ preventScroll: !0 })), (v = t.querySelector("[data-layer-row], [data-feat-row]")) == null || v.setAttribute("tabindex", "0"), a.querySelectorAll("img[data-basemap-thumb]").forEach((b) => {
|
|
2861
|
+
const w = () => Xr(b);
|
|
2862
|
+
b.addEventListener("error", w, { once: !0 }), b.complete && b.naturalWidth === 0 && b.getAttribute("src") && w();
|
|
2863
|
+
}), Sr(e, t), r.bindAll();
|
|
2403
2864
|
}
|
|
2404
|
-
function
|
|
2865
|
+
function ei(e, t, a, r, i = null) {
|
|
2866
|
+
const o = {};
|
|
2405
2867
|
try {
|
|
2406
|
-
return
|
|
2407
|
-
|
|
2408
|
-
}
|
|
2409
|
-
} catch (i) {
|
|
2410
|
-
return console.warn("[UI-Camadas] atualização incremental falhou; redesenhando o painel.", i), !1;
|
|
2868
|
+
return { ok: Qr(e, t, r, rt(e, t, a), i, o), focoPerdido: o.focoPerdido === !0, tabulavelRemovida: o.tabulavelRemovida === !0 };
|
|
2869
|
+
} catch (n) {
|
|
2870
|
+
return console.warn("[UI-Camadas] atualização incremental falhou; redesenhando o painel.", n), { ok: !1, focoPerdido: !1 };
|
|
2411
2871
|
}
|
|
2412
2872
|
}
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2873
|
+
function rt(e, t, a) {
|
|
2874
|
+
return (r) => {
|
|
2875
|
+
Ya(e, r), Ga(e, r), Ua(e, t, r), a.bindLinhasFeicao(r);
|
|
2876
|
+
};
|
|
2416
2877
|
}
|
|
2417
|
-
function
|
|
2418
|
-
|
|
2878
|
+
function ai(e, t, a, r, i = !1) {
|
|
2879
|
+
const o = { ok: !1, focoPerdido: !1 }, n = e.planoVirtual, s = t.getElementById("ui-layer-tree-mount");
|
|
2880
|
+
if (!n || !s) return o;
|
|
2881
|
+
try {
|
|
2882
|
+
let l;
|
|
2883
|
+
if (Oa(r) !== n.semLimite) return o;
|
|
2884
|
+
if (i) {
|
|
2885
|
+
if (e.camadas.length === 0 || (e.searchQuery || "").trim() !== "") return o;
|
|
2886
|
+
const d = te(e.camadas);
|
|
2887
|
+
l = Ge(
|
|
2888
|
+
Za(e, d, Xa(e.feicoes)),
|
|
2889
|
+
r,
|
|
2890
|
+
e.activeSettingsLayerId
|
|
2891
|
+
);
|
|
2892
|
+
} else {
|
|
2893
|
+
const { janelas: d, alturaLinha: u } = Ta(n.estrutura, r, e.activeSettingsLayerId);
|
|
2894
|
+
l = { estrutura: n.estrutura, janelas: d, alturaLinha: u, semLimite: n.semLimite };
|
|
2895
|
+
}
|
|
2896
|
+
const c = at(n, l);
|
|
2897
|
+
if (c.length === 0)
|
|
2898
|
+
return e.planoVirtual = l, { ok: !0, focoPerdido: !1 };
|
|
2899
|
+
let f = null;
|
|
2900
|
+
const p = {
|
|
2901
|
+
shadow: t,
|
|
2902
|
+
plano: l,
|
|
2903
|
+
selecionadas: e.selectedFeatureIds,
|
|
2904
|
+
editandoFeicaoId: e.editingFeatureId,
|
|
2905
|
+
herdado: () => f ?? (f = le(e.camadas)),
|
|
2906
|
+
idsRefazer: /* @__PURE__ */ new Set(),
|
|
2907
|
+
ligar: rt(e, t, a)
|
|
2908
|
+
};
|
|
2909
|
+
return et(p, Ka(s), c) ? (e.planoVirtual = l, { ok: !0, focoPerdido: p.focoPerdido === !0, tabulavelRemovida: p.tabulavelRemovida === !0 }) : o;
|
|
2910
|
+
} catch (l) {
|
|
2911
|
+
return console.warn("[UI-Camadas] atualização da janela virtual falhou; redesenhando o painel.", l), o;
|
|
2912
|
+
}
|
|
2913
|
+
}
|
|
2914
|
+
function it(e) {
|
|
2915
|
+
var a;
|
|
2916
|
+
const t = e.camadas.length > 0 && ((a = e.planoVirtual) == null ? void 0 : a.semLimite) === !0;
|
|
2917
|
+
return _t(
|
|
2918
|
+
e.camadas,
|
|
2919
|
+
e.feicoes,
|
|
2920
|
+
e.expandedLayers,
|
|
2921
|
+
e.searchQuery,
|
|
2922
|
+
t ? 1 / 0 : void 0,
|
|
2923
|
+
t ? void 0 : e.expandedFeatureLimits,
|
|
2924
|
+
e.ordemFilhosPorPai
|
|
2925
|
+
);
|
|
2926
|
+
}
|
|
2927
|
+
function ti(e, t, a, r, i) {
|
|
2928
|
+
const o = it(e), n = !r && !o.includes(t) && e.feicoes.some((l) => l.id === t), s = Gt(
|
|
2929
|
+
n ? [...o, t] : o,
|
|
2930
|
+
e.selectedFeatureIds,
|
|
2931
|
+
e.lastClickedFeatureId,
|
|
2932
|
+
t,
|
|
2933
|
+
a,
|
|
2934
|
+
r
|
|
2935
|
+
);
|
|
2936
|
+
s && (e.selectedFeatureIds = s.selecionados, e.lastClickedFeatureId = s.ultimoClicadoId, e.sincronizarSelecaoDOM(), i && e.notificarMudancaSelecao());
|
|
2937
|
+
}
|
|
2938
|
+
function ri(e, t, a) {
|
|
2939
|
+
const r = t || [];
|
|
2940
|
+
r.length === e.selectedFeatureIds.size && r.every((n) => e.selectedFeatureIds.has(n)) || (e.selectedFeatureIds.clear(), r.forEach((n) => e.selectedFeatureIds.add(n)), e.lastClickedFeatureId = r.length > 0 ? r[r.length - 1] : null, e.sincronizarSelecaoDOM(), a && e.notificarMudancaSelecao());
|
|
2941
|
+
}
|
|
2942
|
+
function ii(e, t) {
|
|
2943
|
+
e.selectedFeatureIds.size !== 0 && (e.selectedFeatureIds.clear(), e.lastClickedFeatureId = null, e.sincronizarSelecaoDOM(), t && e.notificarMudancaSelecao());
|
|
2944
|
+
}
|
|
2945
|
+
function oi(e) {
|
|
2946
|
+
const t = e.feicoes.filter((a) => e.selectedFeatureIds.has(a.id));
|
|
2947
|
+
e.dispararEvento("ui-feicoes-selecionadas", {
|
|
2948
|
+
feicoesIds: Array.from(e.selectedFeatureIds),
|
|
2949
|
+
feicoes: t
|
|
2950
|
+
}), t.length === 1 ? e.dispararEvento("ui-feicao-selecionada", { feicaoId: t[0].id, feicao: t[0] }) : t.length === 0 && e.dispararEvento("ui-feicao-selecionada", { feicaoId: null, feicao: null });
|
|
2951
|
+
}
|
|
2952
|
+
const ni = '[role="button"][tabindex]', ne = "[data-layer-row], [data-feat-row]", si = ["color", "range", "checkbox", "radio", "button"];
|
|
2953
|
+
function ot(e) {
|
|
2954
|
+
return !e || !(e instanceof Element) || e instanceof HTMLInputElement && si.includes(e.type) ? !1 : Et({ composedPath: () => [e] });
|
|
2955
|
+
}
|
|
2956
|
+
function li(e) {
|
|
2957
|
+
return Array.from(e.querySelectorAll(ne)).filter((t) => {
|
|
2419
2958
|
const a = t.closest(".ui-children-container");
|
|
2420
2959
|
return !(a && a.style.display === "none") && !t.classList.contains("ui-search-hidden");
|
|
2421
2960
|
});
|
|
2422
2961
|
}
|
|
2423
|
-
function
|
|
2424
|
-
|
|
2962
|
+
function ci(e, t, a) {
|
|
2963
|
+
var s;
|
|
2964
|
+
const r = ((s = e.ordemLinhasNavegaveis) == null ? void 0 : s.call(e)) ?? null, i = Wa(a), o = r && i ? r.indexOf(i) : -1;
|
|
2965
|
+
if (r && o !== -1 && e.garantirLinhaRenderizada) {
|
|
2966
|
+
const l = e.garantirLinhaRenderizada.bind(e);
|
|
2967
|
+
return {
|
|
2968
|
+
indice: o,
|
|
2969
|
+
total: r.length,
|
|
2970
|
+
linhaEm: (c) => c >= 0 && c < r.length ? l(r[c]) ?? void 0 : void 0
|
|
2971
|
+
};
|
|
2972
|
+
}
|
|
2973
|
+
const n = li(t);
|
|
2974
|
+
return { indice: n.indexOf(a), total: n.length, linhaEm: (l) => n[l] };
|
|
2975
|
+
}
|
|
2976
|
+
function U(e, t) {
|
|
2977
|
+
t && (e.querySelectorAll(ne).forEach((a) => a.setAttribute("tabindex", "-1")), t.setAttribute("tabindex", "0"), t.focus());
|
|
2425
2978
|
}
|
|
2426
|
-
function
|
|
2979
|
+
function di(e, t) {
|
|
2427
2980
|
e.dispatchEvent(
|
|
2428
2981
|
new MouseEvent("click", {
|
|
2429
2982
|
bubbles: !0,
|
|
@@ -2432,9 +2985,9 @@ function rr(e, t) {
|
|
|
2432
2985
|
})
|
|
2433
2986
|
);
|
|
2434
2987
|
}
|
|
2435
|
-
function
|
|
2988
|
+
function ui(e, t, a) {
|
|
2436
2989
|
var i;
|
|
2437
|
-
if (
|
|
2990
|
+
if (ot(a.composedPath()[0])) return;
|
|
2438
2991
|
const r = t.querySelector(".confirming");
|
|
2439
2992
|
if (r) {
|
|
2440
2993
|
a.preventDefault(), r.dispatchEvent(new Event("ui-cancelar-confirmacao")), r.classList.remove("confirming");
|
|
@@ -2443,144 +2996,114 @@ function ir(e, t, a) {
|
|
|
2443
2996
|
if (e.activeSettingsLayerId) {
|
|
2444
2997
|
a.preventDefault();
|
|
2445
2998
|
const o = e.activeSettingsLayerId;
|
|
2446
|
-
e.activeSettingsLayerId = null, e.solicitarRenderizacao(), (i =
|
|
2999
|
+
e.activeSettingsLayerId = null, e.solicitarRenderizacao(), (i = M(t, "data-layer-settings", o)) == null || i.focus();
|
|
2447
3000
|
return;
|
|
2448
3001
|
}
|
|
2449
3002
|
e.selectedFeatureIds.size > 0 && (a.preventDefault(), e.limparSelecao(!0));
|
|
2450
3003
|
}
|
|
2451
|
-
function
|
|
2452
|
-
var
|
|
3004
|
+
function fi(e, t, a, r) {
|
|
3005
|
+
var f, p, d;
|
|
2453
3006
|
const i = r.composedPath()[0];
|
|
2454
|
-
if (!(i instanceof HTMLElement) ||
|
|
2455
|
-
|
|
2456
|
-
|
|
3007
|
+
if (!(i instanceof HTMLElement) || ot(i)) return;
|
|
3008
|
+
let o = i;
|
|
3009
|
+
if (o.id === "ui-layer-tree-mount" && e.chaveLinhaFocada && e.garantirLinhaRenderizada) {
|
|
3010
|
+
const u = e.garantirLinhaRenderizada(e.chaveLinhaFocada);
|
|
3011
|
+
if (!u) return;
|
|
3012
|
+
u.focus({ preventScroll: !0 }), o = u;
|
|
3013
|
+
}
|
|
3014
|
+
if ((r.key === "Enter" || r.key === " ") && o.matches(ni)) {
|
|
3015
|
+
r.preventDefault(), o.click();
|
|
2457
3016
|
return;
|
|
2458
3017
|
}
|
|
2459
|
-
if (!
|
|
2460
|
-
const o =
|
|
3018
|
+
if (!o.matches(ne)) return;
|
|
3019
|
+
const n = o, l = ["ArrowDown", "ArrowUp", "Home", "End", "ArrowRight"].includes(r.key) ? ci(e, t, n) : null, c = l ? l.indice : -1;
|
|
2461
3020
|
if (r.key === "F2") {
|
|
2462
3021
|
r.preventDefault();
|
|
2463
|
-
const
|
|
2464
|
-
|
|
3022
|
+
const u = o.getAttribute("data-layer-row"), h = o.getAttribute("data-feat-row"), m = u ? M(o, "data-layer-name-trigger", u) : h ? M(o, "data-feat-name-trigger", h) : null;
|
|
3023
|
+
m && m.dispatchEvent(new MouseEvent("dblclick", { bubbles: !0 }));
|
|
2465
3024
|
return;
|
|
2466
3025
|
}
|
|
2467
3026
|
if ((r.ctrlKey || r.metaKey) && (r.key === "a" || r.key === "A")) {
|
|
2468
3027
|
r.preventDefault();
|
|
2469
|
-
const
|
|
2470
|
-
|
|
2471
|
-
e.feicoes,
|
|
2472
|
-
e.expandedLayers,
|
|
2473
|
-
e.searchQuery,
|
|
2474
|
-
void 0,
|
|
2475
|
-
e.expandedFeatureLimits,
|
|
2476
|
-
e.ordemFilhosPorPai
|
|
2477
|
-
);
|
|
2478
|
-
d.length > 0 && e.selecionarFeicoes(d, !0);
|
|
3028
|
+
const u = it(e);
|
|
3029
|
+
u.length > 0 && e.selecionarFeicoes(u, !0);
|
|
2479
3030
|
return;
|
|
2480
3031
|
}
|
|
2481
3032
|
if (r.key === "Delete") {
|
|
2482
|
-
const
|
|
2483
|
-
if (
|
|
2484
|
-
r.preventDefault(),
|
|
3033
|
+
const u = a.getElementById("btn-footer-del");
|
|
3034
|
+
if (u && !u.hasAttribute("disabled") && e.selectedFeatureIds.size > 0) {
|
|
3035
|
+
r.preventDefault(), u.click();
|
|
2485
3036
|
return;
|
|
2486
3037
|
}
|
|
2487
3038
|
}
|
|
2488
3039
|
switch (r.key) {
|
|
2489
3040
|
case "ArrowDown":
|
|
2490
|
-
r.preventDefault(),
|
|
3041
|
+
r.preventDefault(), l && U(t, l.linhaEm(Math.min(l.total - 1, c + 1)));
|
|
2491
3042
|
break;
|
|
2492
3043
|
case "ArrowUp":
|
|
2493
|
-
r.preventDefault(),
|
|
3044
|
+
r.preventDefault(), l && U(t, l.linhaEm(Math.max(0, c - 1)));
|
|
2494
3045
|
break;
|
|
2495
3046
|
case "Home":
|
|
2496
|
-
r.preventDefault(),
|
|
3047
|
+
r.preventDefault(), l && U(t, l.linhaEm(0));
|
|
2497
3048
|
break;
|
|
2498
3049
|
case "End":
|
|
2499
|
-
r.preventDefault(),
|
|
3050
|
+
r.preventDefault(), l && U(t, l.linhaEm(l.total - 1));
|
|
2500
3051
|
break;
|
|
2501
3052
|
case "ArrowRight": {
|
|
2502
|
-
const
|
|
2503
|
-
if (!
|
|
2504
|
-
const
|
|
2505
|
-
(
|
|
3053
|
+
const u = n.getAttribute("data-layer-row");
|
|
3054
|
+
if (!u || !l) return;
|
|
3055
|
+
const h = n.closest(".ui-layer-group");
|
|
3056
|
+
if (!((h == null ? void 0 : h.getAttribute("aria-expanded")) === "true"))
|
|
3057
|
+
r.preventDefault(), (f = M(a, "data-layer-expand", u)) == null || f.click();
|
|
3058
|
+
else if (c + 1 < l.total) {
|
|
3059
|
+
const g = l.linhaEm(c + 1);
|
|
3060
|
+
g && (h != null && h.contains(g)) && (r.preventDefault(), U(t, g));
|
|
3061
|
+
}
|
|
2506
3062
|
break;
|
|
2507
3063
|
}
|
|
2508
3064
|
case "ArrowLeft": {
|
|
2509
|
-
const
|
|
2510
|
-
if (
|
|
2511
|
-
const
|
|
2512
|
-
if ((
|
|
2513
|
-
r.preventDefault(), (
|
|
3065
|
+
const u = o.getAttribute("data-layer-row");
|
|
3066
|
+
if (u) {
|
|
3067
|
+
const g = o.closest(".ui-layer-group");
|
|
3068
|
+
if ((g == null ? void 0 : g.getAttribute("aria-expanded")) === "true")
|
|
3069
|
+
r.preventDefault(), (p = M(a, "data-layer-expand", u)) == null || p.click();
|
|
2514
3070
|
else {
|
|
2515
|
-
const
|
|
2516
|
-
|
|
3071
|
+
const v = (d = g == null ? void 0 : g.parentElement) == null ? void 0 : d.closest(".ui-layer-group"), b = v == null ? void 0 : v.getAttribute("data-layer-id"), w = b ? M(t, "data-layer-row", b) : null;
|
|
3072
|
+
w && (r.preventDefault(), U(t, w));
|
|
2517
3073
|
}
|
|
2518
3074
|
return;
|
|
2519
3075
|
}
|
|
2520
|
-
const
|
|
2521
|
-
|
|
3076
|
+
const h = o.getAttribute("data-feat-layer"), m = h ? M(t, "data-layer-row", h) : null;
|
|
3077
|
+
m && (r.preventDefault(), U(t, m));
|
|
2522
3078
|
break;
|
|
2523
3079
|
}
|
|
2524
3080
|
case "Enter":
|
|
2525
3081
|
case " ":
|
|
2526
|
-
r.preventDefault(),
|
|
3082
|
+
r.preventDefault(), di(o, r);
|
|
2527
3083
|
break;
|
|
2528
3084
|
}
|
|
2529
3085
|
}
|
|
2530
|
-
function
|
|
3086
|
+
function pi(e, t, a, r, i) {
|
|
2531
3087
|
i.add(t, "keydown", (o) => {
|
|
2532
|
-
o.key === "Escape" &&
|
|
2533
|
-
}), i.add(r, "keydown", (o) =>
|
|
3088
|
+
o.key === "Escape" && ui(e, a, o);
|
|
3089
|
+
}), i.add(r, "keydown", (o) => fi(e, r, a, o)), i.add(r, "focusin", (o) => {
|
|
2534
3090
|
const n = o.composedPath()[0];
|
|
2535
|
-
n instanceof HTMLElement && n.matches(
|
|
3091
|
+
n instanceof HTMLElement && n.matches(ne) && (r.querySelectorAll(ne).forEach((s) => s.setAttribute("tabindex", "-1")), n.setAttribute("tabindex", "0"), e.chaveLinhaFocada = Wa(n));
|
|
2536
3092
|
});
|
|
2537
3093
|
}
|
|
2538
|
-
|
|
2539
|
-
const o = va(
|
|
2540
|
-
e.camadas,
|
|
2541
|
-
e.feicoes,
|
|
2542
|
-
e.expandedLayers,
|
|
2543
|
-
e.searchQuery,
|
|
2544
|
-
void 0,
|
|
2545
|
-
e.expandedFeatureLimits,
|
|
2546
|
-
e.ordemFilhosPorPai
|
|
2547
|
-
), n = !r && !o.includes(t) && e.feicoes.some((c) => c.id === t), s = ft(
|
|
2548
|
-
n ? [...o, t] : o,
|
|
2549
|
-
e.selectedFeatureIds,
|
|
2550
|
-
e.lastClickedFeatureId,
|
|
2551
|
-
t,
|
|
2552
|
-
a,
|
|
2553
|
-
r
|
|
2554
|
-
);
|
|
2555
|
-
s && (e.selectedFeatureIds = s.selecionados, e.lastClickedFeatureId = s.ultimoClicadoId, e.sincronizarSelecaoDOM(), i && e.notificarMudancaSelecao());
|
|
2556
|
-
}
|
|
2557
|
-
function lr(e, t, a) {
|
|
2558
|
-
const r = t || [];
|
|
2559
|
-
r.length === e.selectedFeatureIds.size && r.every((n) => e.selectedFeatureIds.has(n)) || (e.selectedFeatureIds.clear(), r.forEach((n) => e.selectedFeatureIds.add(n)), e.lastClickedFeatureId = r.length > 0 ? r[r.length - 1] : null, e.sincronizarSelecaoDOM(), a && e.notificarMudancaSelecao());
|
|
2560
|
-
}
|
|
2561
|
-
function cr(e, t) {
|
|
2562
|
-
e.selectedFeatureIds.size !== 0 && (e.selectedFeatureIds.clear(), e.lastClickedFeatureId = null, e.sincronizarSelecaoDOM(), t && e.notificarMudancaSelecao());
|
|
2563
|
-
}
|
|
2564
|
-
function dr(e) {
|
|
2565
|
-
const t = e.feicoes.filter((a) => e.selectedFeatureIds.has(a.id));
|
|
2566
|
-
e.dispararEvento("ui-feicoes-selecionadas", {
|
|
2567
|
-
feicoesIds: Array.from(e.selectedFeatureIds),
|
|
2568
|
-
feicoes: t
|
|
2569
|
-
}), t.length === 1 ? e.dispararEvento("ui-feicao-selecionada", { feicaoId: t[0].id, feicao: t[0] }) : t.length === 0 && e.dispararEvento("ui-feicao-selecionada", { feicaoId: null, feicao: null });
|
|
2570
|
-
}
|
|
2571
|
-
class ur {
|
|
3094
|
+
class mi {
|
|
2572
3095
|
constructor(t) {
|
|
2573
3096
|
E(this, "origens", /* @__PURE__ */ new Map());
|
|
2574
3097
|
E(this, "removidas", /* @__PURE__ */ new Set());
|
|
2575
|
-
E(this, "salvarComDebounce",
|
|
3098
|
+
E(this, "salvarComDebounce", wa(() => this.salvar(), 200));
|
|
2576
3099
|
this.instantaneo = t;
|
|
2577
3100
|
}
|
|
2578
3101
|
chaveAtual() {
|
|
2579
3102
|
const t = this.instantaneo();
|
|
2580
|
-
return
|
|
3103
|
+
return lr(t.storageKey, t.id);
|
|
2581
3104
|
}
|
|
2582
3105
|
carregar() {
|
|
2583
|
-
return
|
|
3106
|
+
return Te(this.chaveAtual());
|
|
2584
3107
|
}
|
|
2585
3108
|
/** Versão com debounce, para interações contínuas (seletor de cor, slider de opacidade). */
|
|
2586
3109
|
agendar() {
|
|
@@ -2589,8 +3112,8 @@ class ur {
|
|
|
2589
3112
|
salvar() {
|
|
2590
3113
|
const t = this.instantaneo();
|
|
2591
3114
|
if (!t.persistir || !t.conectado) return;
|
|
2592
|
-
const a = this.chaveAtual(), r =
|
|
2593
|
-
estadoAnterior:
|
|
3115
|
+
const a = this.chaveAtual(), r = pr({
|
|
3116
|
+
estadoAnterior: Te(a),
|
|
2594
3117
|
origensCamadas: this.origens,
|
|
2595
3118
|
camadas: t.camadas,
|
|
2596
3119
|
expandedLayers: t.expandedLayers,
|
|
@@ -2602,164 +3125,38 @@ class ur {
|
|
|
2602
3125
|
camadasRemovidas: this.removidas,
|
|
2603
3126
|
ordemFilhosPorPai: t.ordemFilhosPorPai
|
|
2604
3127
|
});
|
|
2605
|
-
this.removidas.clear(),
|
|
3128
|
+
this.removidas.clear(), dr(a, r);
|
|
2606
3129
|
}
|
|
2607
3130
|
limpar() {
|
|
2608
|
-
|
|
3131
|
+
ur(this.chaveAtual());
|
|
2609
3132
|
}
|
|
2610
3133
|
// --- Origens (como a camada chegou do consumidor) e remoções ---
|
|
2611
3134
|
limparOrigens() {
|
|
2612
3135
|
this.origens.clear();
|
|
2613
3136
|
}
|
|
2614
3137
|
registrarOrigem(t) {
|
|
2615
|
-
this.origens.set(t.id,
|
|
3138
|
+
this.origens.set(t.id, Ha(t));
|
|
2616
3139
|
}
|
|
2617
3140
|
esquecerCamada(t) {
|
|
2618
3141
|
this.origens.delete(t), this.removidas.add(t);
|
|
2619
3142
|
}
|
|
2620
3143
|
/** Aplica por cima de `camadas` o que foi lembrado (expansão, visibilidade, travas, opacidade, cor, ordem). */
|
|
2621
3144
|
reidratar(t, a, r, i) {
|
|
2622
|
-
if (
|
|
3145
|
+
if (fr(t, a, r, this.origens), i && (i.clear(), a != null && a.ordemFilhosPorPai))
|
|
2623
3146
|
for (const [o, n] of Object.entries(a.ordemFilhosPorPai))
|
|
2624
3147
|
Array.isArray(n) && n.length > 0 && i.set(o, [...n]);
|
|
2625
3148
|
}
|
|
2626
3149
|
}
|
|
2627
|
-
function
|
|
2628
|
-
const r = [];
|
|
2629
|
-
if (!Array.isArray(e)) return r;
|
|
2630
|
-
for (const i of e) {
|
|
2631
|
-
if (!i || typeof i != "object" || !i.id) continue;
|
|
2632
|
-
const o = String(i.id);
|
|
2633
|
-
if (a.has(o)) continue;
|
|
2634
|
-
a.add(o);
|
|
2635
|
-
const n = { ...i, id: o };
|
|
2636
|
-
delete n.children, t && n.parentId === void 0 && (n.parentId = t), r.push(n), Array.isArray(i.children) && i.children.length > 0 && r.push(...Te(i.children, o, a));
|
|
2637
|
-
}
|
|
2638
|
-
return r;
|
|
2639
|
-
}
|
|
2640
|
-
function La(e) {
|
|
2641
|
-
const t = e.lastClickedFeatureId;
|
|
2642
|
-
t && !e.feicoes.some((a) => a.id === t) && (e.lastClickedFeatureId = null);
|
|
2643
|
-
}
|
|
2644
|
-
function Sa(e) {
|
|
2645
|
-
if (!Array.isArray(e)) return [];
|
|
2646
|
-
const t = /* @__PURE__ */ new Set(), a = [];
|
|
2647
|
-
for (const r of e) {
|
|
2648
|
-
if (!r || typeof r != "object" || !r.id) continue;
|
|
2649
|
-
const i = String(r.id);
|
|
2650
|
-
t.has(i) || (t.add(i), a.push({ ...r, id: i }));
|
|
2651
|
-
}
|
|
2652
|
-
return a;
|
|
2653
|
-
}
|
|
2654
|
-
function pr(e, t, a) {
|
|
2655
|
-
if (e.camadas = Array.isArray(t) ? Te(t) : [], e.lembranca.limparOrigens(), e.persistir) {
|
|
2656
|
-
const o = e.lembranca.carregar();
|
|
2657
|
-
e.lembranca.reidratar(e.camadas, o, e.expandedLayers, e.ordemFilhosPorPai), o != null && o.camadaAtivaId && e.camadas.some((n) => n.id === o.camadaAtivaId) && (e.camadaAtivaId = o.camadaAtivaId);
|
|
2658
|
-
} else
|
|
2659
|
-
e.camadas.forEach((o) => {
|
|
2660
|
-
e.lembranca.registrarOrigem(o), e.expandedLayers.has(o.id) || e.expandedLayers.add(o.id);
|
|
2661
|
-
});
|
|
2662
|
-
if (Array.isArray(a)) {
|
|
2663
|
-
e.feicoes = Sa(a);
|
|
2664
|
-
const o = new Set(e.camadas.map((s) => s.id)), n = e.feicoes.filter((s) => s.layerId && !o.has(s.layerId));
|
|
2665
|
-
n.length > 0 && console.warn(
|
|
2666
|
-
`[UI-Camadas] ${n.length} feição(ões) possuem 'layerId' não cadastrado nas camadas:`,
|
|
2667
|
-
n.map((s) => ({ id: s.id, nome: s.name, layerId: s.layerId }))
|
|
2668
|
-
), De(e.selectedFeatureIds, e.feicoes), La(e);
|
|
2669
|
-
}
|
|
2670
|
-
const r = new Set(e.camadas.map((o) => o.id));
|
|
2671
|
-
if (e.activeSettingsLayerId && !r.has(e.activeSettingsLayerId) && (e.activeSettingsLayerId = null), e.editingLayerId && !r.has(e.editingLayerId) && (e.editingLayerId = null), e.expandedFeatureLimits)
|
|
2672
|
-
for (const o of e.expandedFeatureLimits.keys())
|
|
2673
|
-
r.has(o) || e.expandedFeatureLimits.delete(o);
|
|
2674
|
-
const i = e.getAttribute("camada-ativa");
|
|
2675
|
-
e.camadas.length > 0 && (!i || !r.has(i)) && (e.camadaAtivaId = e.camadas[0].id), e.salvarLembrancaEstado(), e.solicitarRenderizacao();
|
|
2676
|
-
}
|
|
2677
|
-
function fr(e, t) {
|
|
2678
|
-
const a = new Map(e.map((i) => [i.id, i])), r = /* @__PURE__ */ new Set();
|
|
2679
|
-
for (const i of t) {
|
|
2680
|
-
const o = a.get(i.id);
|
|
2681
|
-
(!o || !ot(o, i)) && r.add(i.id);
|
|
2682
|
-
}
|
|
2683
|
-
return r;
|
|
2684
|
-
}
|
|
2685
|
-
function mr(e, t) {
|
|
2686
|
-
const a = e.feicoes;
|
|
2687
|
-
e.feicoes = Sa(t);
|
|
2688
|
-
const r = e.selectedFeatureIds.size;
|
|
2689
|
-
De(e.selectedFeatureIds, e.feicoes), La(e), e.editingFeatureId && !e.feicoes.some((i) => i.id === e.editingFeatureId) && (e.editingFeatureId = null), e.solicitarAtualizacaoFeicoes({
|
|
2690
|
-
camadas: "todas",
|
|
2691
|
-
idsAlterados: fr(a, e.feicoes),
|
|
2692
|
-
selecaoAfetada: e.selectedFeatureIds.size !== r
|
|
2693
|
-
});
|
|
2694
|
-
}
|
|
2695
|
-
function gr(e, t) {
|
|
2696
|
-
if (!t || !t.id) return;
|
|
2697
|
-
if (e.camadas.some((r) => r.id === t.id)) {
|
|
2698
|
-
console.warn(`[UI-Camadas] adicionarCamada ignorado: já existe uma camada com id '${t.id}'.`);
|
|
2699
|
-
return;
|
|
2700
|
-
}
|
|
2701
|
-
const a = new Set(e.camadas.map((r) => r.id));
|
|
2702
|
-
for (const r of Te([t])) {
|
|
2703
|
-
if (a.has(r.id)) {
|
|
2704
|
-
console.warn(`[UI-Camadas] adicionarCamada: subcamada '${r.id}' ignorada, o id já existe.`);
|
|
2705
|
-
continue;
|
|
2706
|
-
}
|
|
2707
|
-
a.add(r.id), e.camadas.push(r), e.lembranca.registrarOrigem(r), e.expandedLayers.add(r.id), r.parentId && e.expandedLayers.add(r.parentId);
|
|
2708
|
-
}
|
|
2709
|
-
e.salvarLembrancaEstado(), e.solicitarRenderizacao();
|
|
2710
|
-
}
|
|
2711
|
-
function hr(e, t) {
|
|
2712
|
-
var r, i;
|
|
2713
|
-
const a = e.camadas.find((o) => o.id === t);
|
|
2714
|
-
e.camadas.forEach((o) => {
|
|
2715
|
-
o.parentId === t && (o.parentId = null);
|
|
2716
|
-
}), e.camadas = e.camadas.filter((o) => o.id !== t), e.feicoes = e.feicoes.filter((o) => o.layerId !== t), e.ordemFilhosPorPai && (e.ordemFilhosPorPai.delete(t), a != null && a.parentId && G(e.ordemFilhosPorPai, a.parentId, H(t))), e.lembranca.esquecerCamada(t), e.expandedLayers.delete(t), (r = e.expandedFeatureLimits) == null || r.delete(t), e.activeSettingsLayerId === t && (e.activeSettingsLayerId = null), e.editingLayerId === t && (e.editingLayerId = null), e.editingFeatureId && !e.feicoes.some((o) => o.id === e.editingFeatureId) && (e.editingFeatureId = null), De(e.selectedFeatureIds, e.feicoes), e.selectedFeatureIds.size === 0 && (e.lastClickedFeatureId = null), e.camadaAtivaId === t && (e.camadaAtivaId = ((i = e.camadas[0]) == null ? void 0 : i.id) ?? null), e.salvarLembrancaEstado(), e.solicitarRenderizacao();
|
|
2717
|
-
}
|
|
2718
|
-
function vr(e, t) {
|
|
2719
|
-
if (!(!t || !t.id)) {
|
|
2720
|
-
if (e.feicoes.some((a) => a.id === t.id)) {
|
|
2721
|
-
console.warn(`[UI-Camadas] adicionarFeicao ignorado: já existe uma feição com id '${t.id}'.`);
|
|
2722
|
-
return;
|
|
2723
|
-
}
|
|
2724
|
-
e.feicoes.push({ ...t }), e.solicitarAtualizacaoFeicoes({
|
|
2725
|
-
camadas: /* @__PURE__ */ new Set([t.layerId || ""]),
|
|
2726
|
-
idsAlterados: /* @__PURE__ */ new Set(),
|
|
2727
|
-
selecaoAfetada: e.selectedFeatureIds.has(t.id)
|
|
2728
|
-
});
|
|
2729
|
-
}
|
|
2730
|
-
}
|
|
2731
|
-
function br(e, t) {
|
|
2732
|
-
if (!t || typeof t != "object" || !t.id) return;
|
|
2733
|
-
const a = e.feicoes.findIndex((r) => r.id === t.id);
|
|
2734
|
-
if (a !== -1) {
|
|
2735
|
-
const r = e.feicoes[a].layerId || "";
|
|
2736
|
-
e.feicoes[a] = { ...e.feicoes[a], ...t }, e.solicitarAtualizacaoFeicoes({
|
|
2737
|
-
camadas: /* @__PURE__ */ new Set([r, e.feicoes[a].layerId || ""]),
|
|
2738
|
-
idsAlterados: /* @__PURE__ */ new Set([t.id]),
|
|
2739
|
-
selecaoAfetada: !1
|
|
2740
|
-
});
|
|
2741
|
-
}
|
|
2742
|
-
}
|
|
2743
|
-
function yr(e, t) {
|
|
2744
|
-
const a = e.feicoes.find((i) => i.id === t);
|
|
2745
|
-
e.feicoes = e.feicoes.filter((i) => i.id !== t), a != null && a.layerId && e.ordemFilhosPorPai && G(e.ordemFilhosPorPai, a.layerId, O(t));
|
|
2746
|
-
const r = e.selectedFeatureIds.delete(t);
|
|
2747
|
-
e.lastClickedFeatureId === t && (e.lastClickedFeatureId = null), e.editingFeatureId === t && (e.editingFeatureId = null), e.solicitarAtualizacaoFeicoes({
|
|
2748
|
-
camadas: new Set(a ? [a.layerId || ""] : []),
|
|
2749
|
-
idsAlterados: /* @__PURE__ */ new Set(),
|
|
2750
|
-
selecaoAfetada: r
|
|
2751
|
-
});
|
|
2752
|
-
}
|
|
2753
|
-
function xr(e) {
|
|
3150
|
+
function hi(e) {
|
|
2754
3151
|
function r() {
|
|
2755
3152
|
return e.getMinAltura ? e.getMinAltura() : 140;
|
|
2756
3153
|
}
|
|
2757
3154
|
function i() {
|
|
2758
3155
|
return e.getMaxAltura ? e.getMaxAltura() : 1600;
|
|
2759
3156
|
}
|
|
2760
|
-
function o(
|
|
2761
|
-
if (
|
|
2762
|
-
e.hostElement.style.removeProperty("height"), e.hostElement.style.removeProperty("--ui-camadas-altura"),
|
|
3157
|
+
function o(c, f = !1) {
|
|
3158
|
+
if (c == null || c === "") {
|
|
3159
|
+
e.hostElement.style.removeProperty("height"), e.hostElement.style.removeProperty("--ui-camadas-altura"), f && e.hostElement.dispatchEvent(
|
|
2763
3160
|
new CustomEvent("ui-redimensionar-altura", {
|
|
2764
3161
|
bubbles: !0,
|
|
2765
3162
|
composed: !0,
|
|
@@ -2768,78 +3165,78 @@ function xr(e) {
|
|
|
2768
3165
|
);
|
|
2769
3166
|
return;
|
|
2770
3167
|
}
|
|
2771
|
-
const p = typeof
|
|
3168
|
+
const p = typeof c == "number" ? c : parseFloat(String(c));
|
|
2772
3169
|
if (isNaN(p)) return;
|
|
2773
|
-
const
|
|
2774
|
-
e.hostElement.style.height = `${
|
|
3170
|
+
const d = Math.max(r(), Math.min(i(), Math.round(p)));
|
|
3171
|
+
e.hostElement.style.height = `${d}px`, e.hostElement.style.setProperty("--ui-camadas-altura", `${d}px`), f && e.hostElement.dispatchEvent(
|
|
2775
3172
|
new CustomEvent("ui-redimensionar-altura", {
|
|
2776
3173
|
bubbles: !0,
|
|
2777
3174
|
composed: !0,
|
|
2778
|
-
detail: { altura:
|
|
3175
|
+
detail: { altura: d }
|
|
2779
3176
|
})
|
|
2780
3177
|
);
|
|
2781
3178
|
}
|
|
2782
3179
|
let n = null;
|
|
2783
3180
|
function s() {
|
|
2784
3181
|
if (!e.resizerElement) return;
|
|
2785
|
-
let
|
|
2786
|
-
const
|
|
2787
|
-
if (
|
|
2788
|
-
|
|
3182
|
+
let c = !1, f = 0, p = 0;
|
|
3183
|
+
const d = (h) => {
|
|
3184
|
+
if (h.button !== 0) return;
|
|
3185
|
+
h.preventDefault(), h.stopPropagation(), c = !0, f = h.clientY, p = e.hostElement.getBoundingClientRect().height, e.resizerElement.classList.add("ui-camadas-resizer--ativo"), e.hostElement.classList.add("ui-camadas--redimensionando");
|
|
2789
3186
|
try {
|
|
2790
|
-
e.resizerElement.setPointerCapture(
|
|
3187
|
+
e.resizerElement.setPointerCapture(h.pointerId);
|
|
2791
3188
|
} catch {
|
|
2792
3189
|
}
|
|
2793
|
-
const
|
|
2794
|
-
if (!
|
|
3190
|
+
const m = (v) => {
|
|
3191
|
+
if (!c) return;
|
|
2795
3192
|
v.preventDefault();
|
|
2796
|
-
const
|
|
2797
|
-
e.hostElement.style.height = `${
|
|
3193
|
+
const b = v.clientY - f, w = Math.max(r(), Math.min(i(), Math.round(p + b)));
|
|
3194
|
+
e.hostElement.style.height = `${w}px`, e.hostElement.style.setProperty("--ui-camadas-altura", `${w}px`), e.onRedimensionando && e.onRedimensionando(w), e.hostElement.dispatchEvent(
|
|
2798
3195
|
new CustomEvent("ui-redimensionando-altura", {
|
|
2799
3196
|
bubbles: !0,
|
|
2800
3197
|
composed: !0,
|
|
2801
|
-
detail: { altura:
|
|
3198
|
+
detail: { altura: w }
|
|
2802
3199
|
})
|
|
2803
3200
|
);
|
|
2804
|
-
},
|
|
3201
|
+
}, g = () => {
|
|
2805
3202
|
var v;
|
|
2806
|
-
|
|
2807
|
-
},
|
|
2808
|
-
if (!
|
|
3203
|
+
c = !1, n = null, window.removeEventListener("pointermove", m), window.removeEventListener("pointerup", y), window.removeEventListener("pointercancel", y), (v = e.resizerElement) == null || v.classList.remove("ui-camadas-resizer--ativo"), e.hostElement.classList.remove("ui-camadas--redimensionando");
|
|
3204
|
+
}, y = (v) => {
|
|
3205
|
+
if (!c) return;
|
|
2809
3206
|
try {
|
|
2810
3207
|
e.resizerElement.hasPointerCapture(v.pointerId) && e.resizerElement.releasePointerCapture(v.pointerId);
|
|
2811
3208
|
} catch {
|
|
2812
3209
|
}
|
|
2813
|
-
|
|
2814
|
-
const
|
|
2815
|
-
e.onAlturaAlterada && e.onAlturaAlterada(
|
|
3210
|
+
g();
|
|
3211
|
+
const b = e.hostElement.getBoundingClientRect().height, w = Math.round(b);
|
|
3212
|
+
e.onAlturaAlterada && e.onAlturaAlterada(w), e.hostElement.dispatchEvent(
|
|
2816
3213
|
new CustomEvent("ui-redimensionar-altura", {
|
|
2817
3214
|
bubbles: !0,
|
|
2818
3215
|
composed: !0,
|
|
2819
|
-
detail: { altura:
|
|
3216
|
+
detail: { altura: w }
|
|
2820
3217
|
})
|
|
2821
3218
|
);
|
|
2822
3219
|
};
|
|
2823
|
-
n =
|
|
2824
|
-
},
|
|
2825
|
-
|
|
3220
|
+
n = g, window.addEventListener("pointermove", m), window.addEventListener("pointerup", y), window.addEventListener("pointercancel", y);
|
|
3221
|
+
}, u = (h) => {
|
|
3222
|
+
h.preventDefault(), h.stopPropagation(), o(null, !0), e.onAlturaAlterada && e.onAlturaAlterada(null);
|
|
2826
3223
|
};
|
|
2827
|
-
e.listeners.add(e.resizerElement, "pointerdown",
|
|
3224
|
+
e.listeners.add(e.resizerElement, "pointerdown", d), e.listeners.add(e.resizerElement, "dblclick", u);
|
|
2828
3225
|
}
|
|
2829
|
-
function
|
|
3226
|
+
function l() {
|
|
2830
3227
|
n == null || n(), e.listeners.cleanup();
|
|
2831
3228
|
}
|
|
2832
3229
|
return {
|
|
2833
3230
|
init: s,
|
|
2834
3231
|
definirAltura: o,
|
|
2835
|
-
destruir:
|
|
3232
|
+
destruir: l
|
|
2836
3233
|
};
|
|
2837
3234
|
}
|
|
2838
|
-
const
|
|
3235
|
+
const X = class X extends It {
|
|
2839
3236
|
constructor() {
|
|
2840
3237
|
super();
|
|
2841
3238
|
E(this, "shadow");
|
|
2842
|
-
E(this, "listeners", new
|
|
3239
|
+
E(this, "listeners", new Xe());
|
|
2843
3240
|
E(this, "dragDropManager");
|
|
2844
3241
|
E(this, "resizerController");
|
|
2845
3242
|
E(this, "bordaResizeObserver", null);
|
|
@@ -2849,8 +3246,20 @@ const W = class W extends Ua {
|
|
|
2849
3246
|
E(this, "renderPendente", !1);
|
|
2850
3247
|
/** Mudança de feições à espera do `render()` (consumida nele): permite atualizar só as linhas afetadas. */
|
|
2851
3248
|
E(this, "mudancaFeicoes", null);
|
|
3249
|
+
/** Dentro de `emLote`: alguma mutação exige o render completo (camadas, expansão, busca…). */
|
|
3250
|
+
E(this, "loteExigeCompleto", !1);
|
|
3251
|
+
/** Dentro de `emLote`: mudanças de feições acumuladas, aplicadas por diferença no fim do lote. */
|
|
3252
|
+
E(this, "loteMudanca", null);
|
|
3253
|
+
/** Última área visível lida da árvore (lida em quadro de animação, nunca no meio das escritas). */
|
|
3254
|
+
E(this, "viewport", null);
|
|
3255
|
+
E(this, "alturaLinhaMedida", null);
|
|
3256
|
+
E(this, "quadroJanela", null);
|
|
3257
|
+
/** @internal Plano da lista virtual em uso no DOM (o que cada container mostra e a janela de cada corrida). */
|
|
3258
|
+
E(this, "planoVirtual", null);
|
|
3259
|
+
/** @internal Linha que recebeu o foco por último (`L:<camada>` / `F:<feição>`), mesmo fora da janela virtual. */
|
|
3260
|
+
E(this, "chaveLinhaFocada", null);
|
|
2852
3261
|
/** @internal */
|
|
2853
|
-
E(this, "lembranca", new
|
|
3262
|
+
E(this, "lembranca", new mi(() => ({
|
|
2854
3263
|
persistir: this.persistir,
|
|
2855
3264
|
conectado: this.conectado,
|
|
2856
3265
|
storageKey: this.storageKey,
|
|
@@ -2867,7 +3276,7 @@ const W = class W extends Ua {
|
|
|
2867
3276
|
// Estado interno
|
|
2868
3277
|
E(this, "camadas", []);
|
|
2869
3278
|
E(this, "feicoes", []);
|
|
2870
|
-
E(this, "mapasBase", [...
|
|
3279
|
+
E(this, "mapasBase", [...Aa]);
|
|
2871
3280
|
E(this, "expandedLayers", /* @__PURE__ */ new Set());
|
|
2872
3281
|
E(this, "expandedFeatureLimits", /* @__PURE__ */ new Map());
|
|
2873
3282
|
E(this, "ordemFilhosPorPai", /* @__PURE__ */ new Map());
|
|
@@ -2880,7 +3289,7 @@ const W = class W extends Ua {
|
|
|
2880
3289
|
E(this, "corpoElement");
|
|
2881
3290
|
E(this, "btnExpandirFlutuante");
|
|
2882
3291
|
this.shadow = this.attachShadow({ mode: "open" }), this.shadow.innerHTML = `
|
|
2883
|
-
<style>${
|
|
3292
|
+
<style>${mr}</style>
|
|
2884
3293
|
<div class="ui-camadas-container" id="panel-container" part="base" role="region" aria-label="Painel de Camadas">
|
|
2885
3294
|
<div class="ui-camadas-corpo" id="painel-corpo" part="corpo"></div>
|
|
2886
3295
|
<div class="ui-camadas-resizer-altura" id="resizer-altura" part="resizer" title="Arraste para redimensionar a altura (duplo-clique para resetar)" aria-label="Redimensionar altura">
|
|
@@ -2888,14 +3297,14 @@ const W = class W extends Ua {
|
|
|
2888
3297
|
</div>
|
|
2889
3298
|
</div>
|
|
2890
3299
|
<button type="button" class="ui-camadas-toggle-flutuante" id="btn-expandir-flutuante" part="botao-expandir" title="Expandir Painel de Camadas" aria-label="Expandir Painel de Camadas">
|
|
2891
|
-
${
|
|
3300
|
+
${A.camadas}
|
|
2892
3301
|
</button>
|
|
2893
|
-
`, this.corpoElement = this.shadow.getElementById("painel-corpo"), this.btnExpandirFlutuante = this.shadow.getElementById("btn-expandir-flutuante"), this.dragDropManager = new
|
|
3302
|
+
`, this.corpoElement = this.shadow.getElementById("painel-corpo"), this.btnExpandirFlutuante = this.shadow.getElementById("btn-expandir-flutuante"), this.dragDropManager = new nr(this, this.shadow);
|
|
2894
3303
|
const a = this.shadow.getElementById("resizer-altura");
|
|
2895
|
-
this.resizerController =
|
|
3304
|
+
this.resizerController = hi({
|
|
2896
3305
|
hostElement: this,
|
|
2897
3306
|
resizerElement: a,
|
|
2898
|
-
listeners: new
|
|
3307
|
+
listeners: new Xe(),
|
|
2899
3308
|
getMinAltura: () => {
|
|
2900
3309
|
const r = this.getAttribute("min-altura");
|
|
2901
3310
|
return r && parseFloat(r) || 140;
|
|
@@ -2930,31 +3339,33 @@ const W = class W extends Ua {
|
|
|
2930
3339
|
"min-altura",
|
|
2931
3340
|
"max-altura",
|
|
2932
3341
|
"borda-canvas",
|
|
2933
|
-
...
|
|
3342
|
+
...kt
|
|
2934
3343
|
];
|
|
2935
3344
|
}
|
|
2936
3345
|
connectedCallback() {
|
|
2937
3346
|
var a;
|
|
2938
3347
|
if (this.persistir) {
|
|
2939
|
-
const r =
|
|
3348
|
+
const r = Te(this.obterChaveStorageAtual());
|
|
2940
3349
|
r && (r.painelColapsado === !0 && !this.hasAttribute("colapsado") && (this.colapsado = !0), r.camadaAtivaId && !this.getAttribute("camada-ativa") && (this.camadaAtivaId = r.camadaAtivaId), r.mapaBaseAtivo && !this.getAttribute("mapa-base-ativo") && (this.mapaBaseAtivo = r.mapaBaseAtivo), r.densidade && !this.getAttribute("densidade") && (this.densidade = r.densidade), typeof r.altura == "number" && !this.getAttribute("altura") && !this.style.height && (this.resizerController.definirAltura(r.altura, !1), this.alturaCustomizada = r.altura));
|
|
2941
3350
|
}
|
|
2942
|
-
this.hasAttribute("altura") && this.resizerController.definirAltura(this.getAttribute("altura"), !1), this.persistir && !this.storageKey && !this.id && (
|
|
3351
|
+
this.hasAttribute("altura") && this.resizerController.definirAltura(this.getAttribute("altura"), !1), this.persistir && !this.storageKey && !this.id && (X.instanciasChavePadrao.size > 0 && console.warn(
|
|
2943
3352
|
"[UI-Camadas] Mais de um painel sem 'id' nem 'storage-key' divide a mesma chave de persistência e um sobrescreve o estado do outro. Defina 'storage-key' (ou 'id') em cada um."
|
|
2944
|
-
),
|
|
3353
|
+
), X.instanciasChavePadrao.add(this)), this.resizerController.init(), Ze(this, this.shadow.getElementById("panel-container")), this.atualizarBordaCanvas(), typeof window < "u" && this.listeners.add(window, "resize", () => this.atualizarBordaCanvas()), typeof ResizeObserver < "u" && ((a = this.bordaResizeObserver) == null || a.disconnect(), this.bordaResizeObserver = new ResizeObserver(() => {
|
|
3354
|
+
this.atualizarBordaCanvas(), this.agendarJanelaVirtual();
|
|
3355
|
+
}), this.bordaResizeObserver.observe(this)), this.render(), this.conectarEventosGerais(), this.listeners.add(this.corpoElement, "scroll", () => this.agendarJanelaVirtual(), { capture: !0, passive: !0 }), pi(this, this, this.shadow, this.corpoElement, this.listeners), this.conectado = !0, this.camadas.length > 0 && this.salvarLembrancaEstado();
|
|
2945
3356
|
}
|
|
2946
3357
|
disconnectedCallback() {
|
|
2947
3358
|
var a, r, i;
|
|
2948
|
-
this.conectado = !1,
|
|
3359
|
+
this.conectado = !1, X.instanciasChavePadrao.delete(this), this.quadroJanela !== null && typeof cancelAnimationFrame == "function" && cancelAnimationFrame(this.quadroJanela), this.quadroJanela = null, (a = this.bordaResizeObserver) == null || a.disconnect(), this.bordaResizeObserver = null, (r = this.resizerController) == null || r.destruir(), (i = this.dragDropManager) == null || i.destruir(), Ir(this), this.listeners.cleanup();
|
|
2949
3360
|
}
|
|
2950
3361
|
attributeChangedCallback(a, r, i) {
|
|
2951
3362
|
var o, n;
|
|
2952
3363
|
if (r !== i) {
|
|
2953
|
-
if (
|
|
2954
|
-
|
|
3364
|
+
if (Lt(a)) {
|
|
3365
|
+
Ze(this, this.shadow.getElementById("panel-container"));
|
|
2955
3366
|
return;
|
|
2956
3367
|
}
|
|
2957
|
-
a === "colapsado" ? this.salvarLembrancaEstado() : a === "camada-ativa" ? (this.sincronizarCamadaAtivaDOM(), this.salvarLembrancaEstado()) : a === "densidade" ? this.salvarLembrancaEstado() : a === "mapa-base-ativo" ? (i && this.marcarMapaBaseAtivoNoDOM(i), this.salvarLembrancaEstado()) : a === "titulo" || a === "mostrar-mapas-base" || a === "mapas-base-recolhido" || a === "mostrar-rodape" || a === "mostrar-busca" || a === "colapsavel" || a === "flutuante" ? this.solicitarRenderizacao() : a === "altura" ? (o = this.resizerController) == null || o.definirAltura(i, !1) : a === "min-altura" || a === "max-altura" ? this.alturaCustomizada !== null && ((n = this.resizerController) == null || n.definirAltura(this.alturaCustomizada, !1)) : a === "borda-canvas" && this.atualizarBordaCanvas();
|
|
3368
|
+
a === "colapsado" ? this.salvarLembrancaEstado() : a === "camada-ativa" ? (this.sincronizarCamadaAtivaDOM(), this.salvarLembrancaEstado()) : a === "densidade" ? (this.alturaLinhaMedida = null, this.agendarJanelaVirtual(), this.salvarLembrancaEstado()) : a === "mapa-base-ativo" ? (i && this.marcarMapaBaseAtivoNoDOM(i), this.salvarLembrancaEstado()) : a === "titulo" || a === "mostrar-mapas-base" || a === "mapas-base-recolhido" || a === "mostrar-rodape" || a === "mostrar-busca" || a === "colapsavel" || a === "flutuante" ? this.solicitarRenderizacao() : a === "altura" ? (o = this.resizerController) == null || o.definirAltura(i, !1) : a === "min-altura" || a === "max-altura" ? this.alturaCustomizada !== null && ((n = this.resizerController) == null || n.definirAltura(this.alturaCustomizada, !1)) : a === "borda-canvas" && this.atualizarBordaCanvas();
|
|
2958
3369
|
}
|
|
2959
3370
|
}
|
|
2960
3371
|
/**
|
|
@@ -2973,8 +3384,8 @@ const W = class W extends Ua {
|
|
|
2973
3384
|
if (typeof window < "u" && typeof this.getBoundingClientRect == "function") {
|
|
2974
3385
|
const o = this.getBoundingClientRect(), n = window.innerWidth || 0;
|
|
2975
3386
|
if (o.width > 0 && n > 0) {
|
|
2976
|
-
const s = o.left <= 2,
|
|
2977
|
-
|
|
3387
|
+
const s = o.left <= 2, l = n - o.right <= 2;
|
|
3388
|
+
l && !s ? i = "esquerda" : s && !l ? i = "direita" : s && l ? i = "nenhuma" : i = "ambas";
|
|
2978
3389
|
}
|
|
2979
3390
|
}
|
|
2980
3391
|
a.setAttribute("data-borda-canvas", i);
|
|
@@ -3008,7 +3419,7 @@ const W = class W extends Ua {
|
|
|
3008
3419
|
i.classList.toggle("active", o), i.setAttribute("aria-pressed", String(o));
|
|
3009
3420
|
});
|
|
3010
3421
|
const r = this.shadow.querySelector("[data-basemap-atual]");
|
|
3011
|
-
r && (r.textContent =
|
|
3422
|
+
r && (r.textContent = Ea(this.mapasBase, a));
|
|
3012
3423
|
}
|
|
3013
3424
|
/** Seção "Mapa Base" recolhida (só o cabeçalho com o mapa ativo). Atributo `mapas-base-recolhido`. */
|
|
3014
3425
|
get mapasBaseRecolhido() {
|
|
@@ -3144,10 +3555,10 @@ const W = class W extends Ua {
|
|
|
3144
3555
|
this.definirMapasBase(a);
|
|
3145
3556
|
}
|
|
3146
3557
|
definirCamadas(a, r) {
|
|
3147
|
-
|
|
3558
|
+
qr(this, a, r);
|
|
3148
3559
|
}
|
|
3149
3560
|
definirFeicoes(a) {
|
|
3150
|
-
|
|
3561
|
+
Dr(this, a);
|
|
3151
3562
|
}
|
|
3152
3563
|
definirMapasBase(a) {
|
|
3153
3564
|
this.mapasBase = Array.isArray(a) ? [...a] : [], this.solicitarRenderizacao();
|
|
@@ -3171,28 +3582,154 @@ const W = class W extends Ua {
|
|
|
3171
3582
|
return this.feicoes.filter((a) => this.selectedFeatureIds.has(a.id));
|
|
3172
3583
|
}
|
|
3173
3584
|
adicionarCamada(a) {
|
|
3174
|
-
|
|
3585
|
+
Rr(this, a);
|
|
3175
3586
|
}
|
|
3176
3587
|
removerCamada(a) {
|
|
3177
|
-
|
|
3588
|
+
Tr(this, a);
|
|
3178
3589
|
}
|
|
3179
3590
|
adicionarFeicao(a) {
|
|
3180
|
-
|
|
3591
|
+
Or(this, a);
|
|
3181
3592
|
}
|
|
3182
3593
|
atualizarFeicao(a) {
|
|
3183
|
-
|
|
3594
|
+
jr(this, a);
|
|
3184
3595
|
}
|
|
3185
3596
|
removerFeicao(a) {
|
|
3186
|
-
|
|
3597
|
+
Nr(this, a);
|
|
3187
3598
|
}
|
|
3599
|
+
/** Seleciona uma feição; se a linha dela estiver fora da área visível da árvore, rola até ela. */
|
|
3188
3600
|
selecionarFeicao(a, r = !1, i = !1, o = !1) {
|
|
3189
|
-
|
|
3601
|
+
ti(this, a, r, i, o), this.selectedFeatureIds.has(a) && this.revelarSelecao([a]);
|
|
3190
3602
|
}
|
|
3603
|
+
/**
|
|
3604
|
+
* Substitui a seleção. Se nenhuma das feições estiver na área visível da árvore, rola até a primeira delas
|
|
3605
|
+
* (na ordem da árvore) e a destaca, mesmo que a lista virtual ainda não tenha criado a linha.
|
|
3606
|
+
*/
|
|
3191
3607
|
selecionarFeicoes(a, r = !1) {
|
|
3192
|
-
|
|
3608
|
+
ri(this, a, r), Array.isArray(a) && this.revelarSelecao(a);
|
|
3609
|
+
}
|
|
3610
|
+
/**
|
|
3611
|
+
* Rola a árvore até a linha da feição (centralizada, se estava fora da tela) e garante que ela esteja no DOM.
|
|
3612
|
+
* Com `expandir = true`, expande a camada da feição (e os grupos acima dela) se estiverem recolhidos.
|
|
3613
|
+
* Devolve `false` se a feição não tem linha na tela (não existe, camada recolhida sem `expandir`,
|
|
3614
|
+
* além do "Mostrar mais" quando a árvore não tem altura).
|
|
3615
|
+
*/
|
|
3616
|
+
rolarAteFeicao(a, r = !1) {
|
|
3617
|
+
if (!this.planoVirtual || typeof a != "string" || !a) return !1;
|
|
3618
|
+
r && ze(this.planoVirtual, a) === null && this.expandirAteFeicao(a);
|
|
3619
|
+
const i = this.planoVirtual;
|
|
3620
|
+
if (!i) return !1;
|
|
3621
|
+
const o = ze(i, a);
|
|
3622
|
+
if (o === null) return !1;
|
|
3623
|
+
const n = this.shadow.getElementById("ui-layer-tree-mount");
|
|
3624
|
+
if (!n) return !1;
|
|
3625
|
+
const s = this.lerViewport();
|
|
3626
|
+
if (this.viewport = s, s) {
|
|
3627
|
+
const l = la(o, i.alturaLinha, s.topo, s.altura);
|
|
3628
|
+
l !== null && (n.scrollTop = l, this.viewport = { ...s, topo: Number.isFinite(n.scrollTop) ? n.scrollTop : l });
|
|
3629
|
+
}
|
|
3630
|
+
return this.aplicarJanelaVirtual(!1), ie(this.shadow, `F:${a}`) !== null;
|
|
3631
|
+
}
|
|
3632
|
+
/**
|
|
3633
|
+
* Relê a área visível da árvore e cria/remove as linhas da janela virtual na hora (a rolagem e o
|
|
3634
|
+
* redimensionamento já fazem isso sozinhos, no próximo quadro).
|
|
3635
|
+
*/
|
|
3636
|
+
atualizarJanelaVirtual() {
|
|
3637
|
+
this.viewport = this.lerViewport(), this.aplicarJanelaVirtual(!1);
|
|
3638
|
+
}
|
|
3639
|
+
/** @internal Expansão/recolhimento feito no lugar: cria ou remove as linhas das camadas afetadas. */
|
|
3640
|
+
atualizarArvoreVirtual(a = !0) {
|
|
3641
|
+
this.aplicarJanelaVirtual(a);
|
|
3642
|
+
}
|
|
3643
|
+
/** @internal Chaves das linhas navegáveis por teclado, na ordem da tela (inclui as fora da janela virtual). */
|
|
3644
|
+
ordemLinhasNavegaveis() {
|
|
3645
|
+
return !this.planoVirtual || this.camadas.length === 0 ? null : tr(this.planoVirtual.estrutura);
|
|
3646
|
+
}
|
|
3647
|
+
/** @internal Devolve a linha da chave, criando-a (rolagem até ela) se estiver fora da janela virtual. */
|
|
3648
|
+
garantirLinhaRenderizada(a) {
|
|
3649
|
+
const r = ie(this.shadow, a);
|
|
3650
|
+
return r || (a.startsWith("F:") && this.rolarAteFeicao(a.slice(2)), ie(this.shadow, a));
|
|
3651
|
+
}
|
|
3652
|
+
revelarSelecao(a) {
|
|
3653
|
+
const r = this.planoVirtual;
|
|
3654
|
+
if (!r || a.length === 0) return;
|
|
3655
|
+
const i = this.viewport ?? this.lerViewport();
|
|
3656
|
+
if (!i) return;
|
|
3657
|
+
this.viewport = i;
|
|
3658
|
+
let o = null, n = 1 / 0;
|
|
3659
|
+
for (const l of a) {
|
|
3660
|
+
const c = ze(r, l);
|
|
3661
|
+
if (c !== null) {
|
|
3662
|
+
if (la(c, r.alturaLinha, i.topo, i.altura) === null) return;
|
|
3663
|
+
c < n && (n = c, o = l);
|
|
3664
|
+
}
|
|
3665
|
+
}
|
|
3666
|
+
if (o !== null) {
|
|
3667
|
+
this.rolarAteFeicao(o);
|
|
3668
|
+
return;
|
|
3669
|
+
}
|
|
3670
|
+
const s = a.find((l) => this.selectedFeatureIds.has(l) && ee(this.feicoes, l) >= 0);
|
|
3671
|
+
s && this.rolarAteFeicao(s, !0);
|
|
3672
|
+
}
|
|
3673
|
+
/** Expande a camada da feição e os grupos acima dela (estado lembrado, sem evento). */
|
|
3674
|
+
expandirAteFeicao(a) {
|
|
3675
|
+
var s;
|
|
3676
|
+
const r = this.feicoes[ee(this.feicoes, a)];
|
|
3677
|
+
if (!(r != null && r.layerId)) return;
|
|
3678
|
+
const i = new Map(this.camadas.map((l) => [l.id, l]));
|
|
3679
|
+
let o = !1;
|
|
3680
|
+
const n = /* @__PURE__ */ new Set();
|
|
3681
|
+
for (let l = r.layerId; l && i.has(l) && !n.has(l); l = (s = i.get(l)) == null ? void 0 : s.parentId)
|
|
3682
|
+
n.add(l), this.expandedLayers.has(l) || (this.expandedLayers.add(l), o = !0);
|
|
3683
|
+
o && (this.salvarLembrancaEstado(), this.solicitarRenderizacao());
|
|
3684
|
+
}
|
|
3685
|
+
/** Lê a área visível da árvore (só leituras de layout). Sem altura não há virtualização. */
|
|
3686
|
+
lerViewport() {
|
|
3687
|
+
var s;
|
|
3688
|
+
const a = this.shadow.getElementById("ui-layer-tree-mount"), r = a ? a.clientHeight : ((s = this.corpoElement) == null ? void 0 : s.clientHeight) ?? 0;
|
|
3689
|
+
if (!(r > 0)) return null;
|
|
3690
|
+
const i = this.shadow.querySelector(".ui-layer-settings-drawer"), o = this.shadow.querySelector(".ui-truncate-notice"), n = o ? o.offsetHeight : 0;
|
|
3691
|
+
return {
|
|
3692
|
+
topo: a ? a.scrollTop : 0,
|
|
3693
|
+
altura: r,
|
|
3694
|
+
alturaLinha: this.medirAlturaLinha(),
|
|
3695
|
+
alturaDrawer: i ? i.offsetHeight : void 0,
|
|
3696
|
+
// Margens do aviso (4px + 6px) não entram no offsetHeight
|
|
3697
|
+
alturaAviso: n > 0 ? n + 10 : void 0
|
|
3698
|
+
};
|
|
3699
|
+
}
|
|
3700
|
+
/** Altura real de uma linha (medida uma vez por densidade); antes da primeira medida, a do CSS. */
|
|
3701
|
+
medirAlturaLinha() {
|
|
3702
|
+
if (this.alturaLinhaMedida !== null) return this.alturaLinhaMedida;
|
|
3703
|
+
const a = this.shadow.querySelector(".ui-feat-row, .ui-layer-row"), r = a ? a.offsetHeight : 0;
|
|
3704
|
+
return r > 0 ? (this.alturaLinhaMedida = r, r) : this.densidade === "compacto" ? Ae.compacto : Ae.normal;
|
|
3705
|
+
}
|
|
3706
|
+
/** Rolagem e redimensionamento: relê a área visível e ajusta a janela no próximo quadro (uma vez por quadro). */
|
|
3707
|
+
agendarJanelaVirtual() {
|
|
3708
|
+
this.quadroJanela !== null || !this.conectado || typeof requestAnimationFrame == "function" && (this.quadroJanela = requestAnimationFrame(() => {
|
|
3709
|
+
this.quadroJanela = null, this.conectado && this.atualizarJanelaVirtual();
|
|
3710
|
+
}));
|
|
3711
|
+
}
|
|
3712
|
+
aplicarJanelaVirtual(a) {
|
|
3713
|
+
if (!this.planoVirtual) return;
|
|
3714
|
+
if (this.profundidadeLote > 0) {
|
|
3715
|
+
a && (this.loteExigeCompleto = !0, this.renderPendente = !0);
|
|
3716
|
+
return;
|
|
3717
|
+
}
|
|
3718
|
+
const r = ai(this, this.shadow, this.dragDropManager, this.viewport, a);
|
|
3719
|
+
if (!r.ok) {
|
|
3720
|
+
this.render();
|
|
3721
|
+
return;
|
|
3722
|
+
}
|
|
3723
|
+
this.depoisDeAtualizacaoParcial(r);
|
|
3724
|
+
}
|
|
3725
|
+
/** Linha com foco que saiu da janela: o foco fica na árvore (as setas continuam da linha lembrada). */
|
|
3726
|
+
depoisDeAtualizacaoParcial(a) {
|
|
3727
|
+
if (!a.focoPerdido && !a.tabulavelRemovida) return;
|
|
3728
|
+
const r = this.shadow.getElementById("ui-layer-tree-mount");
|
|
3729
|
+
r && (ga(r, this.chaveLinhaFocada), a.focoPerdido && (r.hasAttribute("tabindex") || r.setAttribute("tabindex", "-1"), r.focus({ preventScroll: !0 })));
|
|
3193
3730
|
}
|
|
3194
3731
|
limparSelecao(a = !1) {
|
|
3195
|
-
|
|
3732
|
+
ii(this, a);
|
|
3196
3733
|
}
|
|
3197
3734
|
expandirTodas() {
|
|
3198
3735
|
this.expandedLayers = new Set(this.camadas.map((a) => a.id)), this.salvarLembrancaEstado(), this.solicitarRenderizacao();
|
|
@@ -3229,7 +3766,7 @@ const W = class W extends Ua {
|
|
|
3229
3766
|
// --- Renderização e Ciclo de Vida ---
|
|
3230
3767
|
solicitarRenderizacao() {
|
|
3231
3768
|
if (this.profundidadeLote > 0) {
|
|
3232
|
-
this.renderPendente = !0;
|
|
3769
|
+
this.renderPendente = !0, this.loteExigeCompleto = !0;
|
|
3233
3770
|
return;
|
|
3234
3771
|
}
|
|
3235
3772
|
this.render();
|
|
@@ -3242,21 +3779,25 @@ const W = class W extends Ua {
|
|
|
3242
3779
|
*/
|
|
3243
3780
|
solicitarAtualizacaoFeicoes(a) {
|
|
3244
3781
|
if (this.profundidadeLote > 0) {
|
|
3245
|
-
this.renderPendente = !0;
|
|
3782
|
+
this.renderPendente = !0, this.loteMudanca = $r(this.loteMudanca, a);
|
|
3246
3783
|
return;
|
|
3247
3784
|
}
|
|
3248
3785
|
this.mudancaFeicoes = a, this.render();
|
|
3249
3786
|
}
|
|
3250
3787
|
/**
|
|
3251
|
-
* Agrupa várias mutações (`adicionarFeicao` em laço, por exemplo) em uma só
|
|
3252
|
-
*
|
|
3788
|
+
* Agrupa várias mutações (`adicionarFeicao` em laço, por exemplo) em uma só atualização, ao fim de `fn`.
|
|
3789
|
+
* Se o lote só mexeu em feições, o DOM é atualizado por diferença (só as linhas que mudaram, dentro da janela
|
|
3790
|
+
* virtual); mudanças de camadas, expansão ou busca levam a um render completo.
|
|
3253
3791
|
*/
|
|
3254
3792
|
emLote(a) {
|
|
3255
3793
|
this.profundidadeLote++;
|
|
3256
3794
|
try {
|
|
3257
3795
|
a();
|
|
3258
3796
|
} finally {
|
|
3259
|
-
this.profundidadeLote--, this.profundidadeLote === 0
|
|
3797
|
+
if (this.profundidadeLote--, this.profundidadeLote === 0) {
|
|
3798
|
+
const r = this.renderPendente, i = this.loteExigeCompleto, o = this.loteMudanca;
|
|
3799
|
+
this.renderPendente = !1, this.loteExigeCompleto = !1, this.loteMudanca = null, r && (this.mudancaFeicoes = i ? null : o, this.render());
|
|
3800
|
+
}
|
|
3260
3801
|
}
|
|
3261
3802
|
}
|
|
3262
3803
|
dispararEvento(a, r) {
|
|
@@ -3270,7 +3811,19 @@ const W = class W extends Ua {
|
|
|
3270
3811
|
}
|
|
3271
3812
|
render() {
|
|
3272
3813
|
const a = this.mudancaFeicoes;
|
|
3273
|
-
this.mudancaFeicoes = null, this.corpoElement
|
|
3814
|
+
if (this.mudancaFeicoes = null, !!this.corpoElement) {
|
|
3815
|
+
if (this.viewport || (this.viewport = this.lerViewport()), a) {
|
|
3816
|
+
const r = ei(this, this.shadow, this.dragDropManager, a, this.viewport);
|
|
3817
|
+
if (r.ok) {
|
|
3818
|
+
this.depoisDeAtualizacaoParcial(r);
|
|
3819
|
+
return;
|
|
3820
|
+
}
|
|
3821
|
+
}
|
|
3822
|
+
if (Zr(this, this.shadow, this.corpoElement, this.dragDropManager, this.viewport), this.chaveLinhaFocada) {
|
|
3823
|
+
const r = this.shadow.getElementById("ui-layer-tree-mount");
|
|
3824
|
+
r && ie(r, this.chaveLinhaFocada) && ga(r, this.chaveLinhaFocada);
|
|
3825
|
+
}
|
|
3826
|
+
}
|
|
3274
3827
|
}
|
|
3275
3828
|
// --- Conexão de Eventos ---
|
|
3276
3829
|
conectarEventosGerais() {
|
|
@@ -3278,27 +3831,27 @@ const W = class W extends Ua {
|
|
|
3278
3831
|
}
|
|
3279
3832
|
// --- Sincronização de DOM (delegada) ---
|
|
3280
3833
|
sincronizarCamadaAtivaDOM() {
|
|
3281
|
-
|
|
3834
|
+
hr(this, this.shadow);
|
|
3282
3835
|
}
|
|
3283
3836
|
sincronizarSelecaoDOM() {
|
|
3284
|
-
|
|
3837
|
+
gr(this, this.shadow);
|
|
3285
3838
|
}
|
|
3286
3839
|
// --- Auxiliares Internos ---
|
|
3287
3840
|
notificarMudancaSelecao() {
|
|
3288
|
-
|
|
3841
|
+
oi(this);
|
|
3289
3842
|
}
|
|
3290
3843
|
};
|
|
3291
3844
|
/** Painéis conectados sem `id` nem `storage-key`: dividem a mesma chave de persistência. */
|
|
3292
|
-
E(
|
|
3293
|
-
let
|
|
3294
|
-
class
|
|
3845
|
+
E(X, "instanciasChavePadrao", /* @__PURE__ */ new Set());
|
|
3846
|
+
let se = X;
|
|
3847
|
+
class gi extends se {
|
|
3295
3848
|
}
|
|
3296
|
-
class
|
|
3849
|
+
class vi extends se {
|
|
3297
3850
|
}
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
function
|
|
3851
|
+
Ne("ui-camadas", se);
|
|
3852
|
+
Ne("ui-painel-camadas", gi);
|
|
3853
|
+
Ne("ui-layer-panel", vi);
|
|
3854
|
+
function Ci(e) {
|
|
3302
3855
|
var t;
|
|
3303
3856
|
return {
|
|
3304
3857
|
id: e.id,
|
|
@@ -3315,7 +3868,7 @@ function Fr(e) {
|
|
|
3315
3868
|
dados: e.dados
|
|
3316
3869
|
};
|
|
3317
3870
|
}
|
|
3318
|
-
function
|
|
3871
|
+
function Fi(e, t = "levantamento", a = "feicoes") {
|
|
3319
3872
|
return {
|
|
3320
3873
|
id: e.id,
|
|
3321
3874
|
nome: e.name,
|
|
@@ -3334,9 +3887,9 @@ function $r(e, t = "levantamento", a = "feicoes") {
|
|
|
3334
3887
|
dados: typeof e.dados == "object" && e.dados !== null ? e.dados : void 0
|
|
3335
3888
|
};
|
|
3336
3889
|
}
|
|
3337
|
-
function
|
|
3338
|
-
var o, n, s,
|
|
3339
|
-
const a = ((o = e.geometria) == null ? void 0 : o.tipo) || ((n = e.geometria) == null ? void 0 : n.type) || e.tipo || e.type || "Polygon", r = ((s = e.geometria) == null ? void 0 : s.coordenadas) || ((
|
|
3890
|
+
function Si(e, t = "") {
|
|
3891
|
+
var o, n, s, l;
|
|
3892
|
+
const a = ((o = e.geometria) == null ? void 0 : o.tipo) || ((n = e.geometria) == null ? void 0 : n.type) || e.tipo || e.type || "Polygon", r = ((s = e.geometria) == null ? void 0 : s.coordenadas) || ((l = e.geometria) == null ? void 0 : l.coordinates) || e.coordinates, i = e.cor || e.color;
|
|
3340
3893
|
return {
|
|
3341
3894
|
id: String(e.id),
|
|
3342
3895
|
name: e.nome || e.name || `Feição ${e.id}`,
|
|
@@ -3353,45 +3906,47 @@ function Mr(e, t = "") {
|
|
|
3353
3906
|
};
|
|
3354
3907
|
}
|
|
3355
3908
|
export {
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3909
|
+
nr as CamadasDragDropManager,
|
|
3910
|
+
A as ICONES,
|
|
3911
|
+
_e as LIMITE_FEICOES_POR_CAMADA,
|
|
3912
|
+
Aa as MAPAS_BASE_PADRAO,
|
|
3913
|
+
se as UICamadas,
|
|
3914
|
+
vi as UILayerPanel,
|
|
3915
|
+
zi as UIMapaBase,
|
|
3916
|
+
gi as UIPainelCamadas,
|
|
3917
|
+
Pi as UISeletorMapaBase,
|
|
3918
|
+
Ce as calcularAreaAnelSimples,
|
|
3919
|
+
xa as calcularAreaPoligono,
|
|
3920
|
+
ya as calcularComprimentoLinha,
|
|
3921
|
+
Ii as calcularDistanciaPontos,
|
|
3922
|
+
Gt as calcularSelecaoFeicao,
|
|
3923
|
+
Te as carregarEstadoPersistido,
|
|
3924
|
+
te as construirHierarquiaCamadas,
|
|
3925
|
+
Fi as converterCamadaItemParaCanvasLayer,
|
|
3926
|
+
Ci as converterCanvasLayerParaCamadaItem,
|
|
3927
|
+
Si as converterFeicaoParaItem,
|
|
3928
|
+
S as escapeHtml,
|
|
3929
|
+
ke as filtrarCamadasPorBusca,
|
|
3930
|
+
Re as filtrarFeicoesPorBusca,
|
|
3931
|
+
ki as formatarMetricaFeicoes,
|
|
3932
|
+
Ia as formatarOpcoesCamadasHierarquicas,
|
|
3933
|
+
lr as gerarChaveStorage,
|
|
3934
|
+
Da as indexarMetricasEscopo,
|
|
3935
|
+
ur as limparEstadoPersistido,
|
|
3936
|
+
pr as montarEstadoPersistido,
|
|
3937
|
+
Ea as nomeDoMapaBase,
|
|
3938
|
+
cr as normalizarEstadoPersistido,
|
|
3939
|
+
Vt as obterFeicoesVisiveisNoEscopo,
|
|
3940
|
+
_t as obterIdsVisiveisFeicoes,
|
|
3941
|
+
fr as reidratarCamadasComOverrides,
|
|
3942
|
+
Ra as removerSelecoesInvalidas,
|
|
3943
|
+
Li as renderizarArvoreCamadas,
|
|
3944
|
+
Na as renderizarArvoreComPlano,
|
|
3945
|
+
rr as renderizarCorridaFeicoes,
|
|
3946
|
+
zt as renderizarGridMapasBase,
|
|
3947
|
+
qt as renderizarRodapeAcoes,
|
|
3948
|
+
Ca as renderizarThumbGeometria,
|
|
3949
|
+
ka as rotuloRodape,
|
|
3950
|
+
dr as salvarEstadoPersistido,
|
|
3951
|
+
Ha as snapshotCamada
|
|
3397
3952
|
};
|