﻿// =====================================================================
// Utilitários das cenas G, H, I, K (agente w-google, 17/10). ES3.
// Estrutura de cada cena (por causa da inclinação 3D medida no original):
//   "MUNDO <id>"  comp quadrada 1080+2*margem; CAM (camera.jsx) no centro; todo o mundo é filho do CAM.
//   "CENA <id>"   1080x1080: só a camada "MUNDO <id>" centrada + Corner Pin (resto projetivo da câmera medida).
// Coordenadas do mundo = px do quadro de referência do original (como no contrato).
// Carregar:  $.evalFile(WG_P + "ae/wg-util.jsx")  com WG_P = caminho decodificado do projeto.
// =====================================================================
var WG = {};
WG.P = File.decode("<HOME>/Documents/Cria%C3%A7%C3%A3o%20de%20conteudo/07-videos/projetos/2026-10-17-subzmotion-recriacao/");
WG.DUR = 814 / 24;
// ajudantes do projeto (camera.jsx, digitar.jsx) carregados aqui e guardados no WG (evita problema de escopo do $.evalFile)
$.evalFile(WG.P + "ae/camera.jsx");
$.evalFile(WG.P + "ae/digitar.jsx");
WG.CAMERA_criar = CAMERA_criar; WG.CAMERA_lerJSON = CAMERA_lerJSON; WG.CAMERA_encaixe = CAMERA_encaixe; WG.DIGITAR = DIGITAR;
// textos de letra (17/10): lidos por slot de ae/letra.json (O autor cola a letra; vazio = "reserva" em inglês)
$.evalFile(WG.P + "ae/letra.jsx");
WG.LETRA = LETRA;
// tempos de digitação: as palavras do slot entram na janela [d0, d1] que o original usa na tela,
// na mesma proporção dos tempos em que são cantadas (palavra 1 começa em d0; a última termina em d1)
// início de cada palavra NA TELA do original (contado quadro a quadro; a voz vem antes porque a câmera ainda chega)
WG.DIG = {
  G1: { t: [17.20], fim: 17.60 }, G2: { t: [17.85, 18.12, 18.36], fim: 18.60 },
  H1: { t: [19.17, 19.45, 19.85, 20.05], fim: 20.33 }, H2: { t: [20.85, 21.12, 21.40, 21.78, 22.00], fim: 22.25 },
  I1: { t: [22.48, 22.70, 23.20], fim: 23.45 },
  K1: { t: [28.33], fim: 29.00 }, K2: { t: [29.25, 29.55, 29.80, 30.10, 30.40, 30.70, 30.85], fim: 31.00 },
  K3: { t: [31.15, 31.29], fim: 31.75 }, K4: { t: [32.45, 32.62, 32.85, 32.92, 33.00], fim: 33.30 }
};
// tempos de digitação do slot: os do original se o texto tem o mesmo nº de palavras; senão, proporcionais à voz na mesma janela
WG.tempoDig = function (id, s) {
  var o = WG.DIG[id];
  if (o.t.length == s.palavras.length) return o.t;
  return WG.janela(s, o.t[0], o.fim);
};
WG.janela = function (s, d0, d1) {
  var t = s.tempos, n = t.length, r = [];
  if (n == 1) return [d0];
  var passo = (t[n - 1] - t[0]) / (n - 1), tot = t[n - 1] - t[0] + passo;
  for (var i = 0; i < n; i++) r.push(d0 + (t[i] - t[0]) / tot * (d1 - d0));
  return r;
};
WG.FPS = 24;
// ---- constantes compartilhadas entre cenas (para os "fundos" das cenas vizinhas)
WG.H_MAPA = { x: -226, y: 34, k: 1.1 };      // mapa-satelite.png: canto sup. esq. no mundo H e escala (px do mundo por px da imagem)
WG.H_M1 = [470, 408];                         // marcador 1 (@mari.frames, anel amarelo) no mundo H
WG.H_M1_R = 47;                               // raio externo do marcador (anel incluso)
WG.AMARELO = "#F5AB06";
// página grande da busca de imagens (cena I): grupo com coordenadas locais = tela do original em 23,083
WG.I_PAG = { anc: [540, 540], pos: [2140.78, 1228.53], esc: 263.92, rot: 2.534 };   // câmera de I no quadro 23,083 (onde a página foi medida)
WG.I_CEL = { c1: [405, 270, 186, 188], c2: [597, 270, 435, 188], c3: [405, 464, 372, 196], c4: [783, 464, 249, 196], r: 22 };   // c1 tirada do recorte do mapa em H (22,2) levado pela câmera
WG.I_IMGS = ["assets/I-imagens/ceu-1.png", "assets/I-imagens/ceu-2.png", "assets/I-imagens/ceu-3.png", "assets/I-imagens/ceu-4.png"];
// ponto local da página grande -> mundo I
WG.iLocalParaMundo = function (p) {
  var r = WG.I_PAG.rot * Math.PI / 180, e = WG.I_PAG.esc / 100, dx = p[0] - WG.I_PAG.anc[0], dy = p[1] - WG.I_PAG.anc[1];
  return [WG.I_PAG.pos[0] + e * (Math.cos(r) * dx - Math.sin(r) * dy), WG.I_PAG.pos[1] + e * (Math.sin(r) * dx + Math.cos(r) * dy)];
};
// ponto do mundo B -> mundo A (mesma tela no instante t; ca, cb = câmeras)
WG.mundoBparaA = function (W, ca, cb) {
  var e = Math.pow(2, cb.z - ca.z), r = (cb.g - ca.g) * Math.PI / 180, dx = W[0] - cb.mx, dy = W[1] - cb.my;
  return [ca.mx + e * (Math.cos(r) * dx - Math.sin(r) * dy), ca.my + e * (Math.sin(r) * dx + Math.cos(r) * dy)];
};

WG.item = function (nome) {
  for (var i = 1; i <= app.project.numItems; i++) if (app.project.item(i).name == nome) return app.project.item(i);
  return null;
};
WG.pasta = function (nome) {
  var f = WG.item(nome);
  if (!f) f = app.project.items.addFolder(nome);
  return f;
};
WG.comp = function (nome, w, h, pasta) {
  var c = WG.item(nome);
  if (c && c instanceof CompItem) {
    while (c.numLayers > 0) c.layer(1).remove();
    c.width = w; c.height = h;
  } else {
    c = app.project.items.addComp(nome, w, h, 1, WG.DUR, WG.FPS);
  }
  if (pasta) c.parentFolder = pasta;
  c.duration = WG.DUR; c.frameRate = WG.FPS;
  c.motionBlur = true; c.shutterAngle = 90; c.shutterPhase = -45;
  c.motionBlurSamplesPerFrame = 16; c.motionBlurAdaptiveSampleLimit = 128;
  c.bgColor = [0, 0, 0];
  return c;
};
WG._foot = {};
WG.footage = function (rel) {
  if (WG._foot[rel]) return WG._foot[rel];
  var f = new File(WG.P + rel);
  for (var i = 1; i <= app.project.numItems; i++) {
    var it = app.project.item(i);
    if (it instanceof FootageItem && it.file && it.file.fsName == f.fsName) { WG._foot[rel] = it; return it; }
  }
  var io = new ImportOptions(f);
  var it2 = app.project.importFile(io);
  it2.parentFolder = WG.pasta("wg assets");
  WG._foot[rel] = it2;
  return it2;
};
WG.cor = function (hex) {
  hex = hex.replace("#", "");
  return [parseInt(hex.substr(0, 2), 16) / 255, parseInt(hex.substr(2, 2), 16) / 255, parseInt(hex.substr(4, 2), 16) / 255];
};
WG.tr = function (L) { return L.property("ADBE Transform Group"); };
// define o transform (sempre DEPOIS de L.parent = pai, porque o AE compensa ao parentear)
WG.pos = function (L, anc, pos, esc, rot) {
  var t = WG.tr(L);
  t.property("ADBE Anchor Point").setValue(anc);
  t.property("ADBE Position").setValue(pos);
  t.property("ADBE Scale").setValue(esc || [100, 100]);
  t.property("ADBE Rotate Z").setValue(rot || 0);
  t.property("ADBE Opacity").setValue(100);
};
WG.nulo = function (comp, pai, nome, anc, pos, esc, rot) {
  var L = comp.layers.addNull(comp.duration); L.name = nome; L.enabled = false;
  if (pai) L.parent = pai;
  WG.pos(L, anc || [0, 0], pos || [0, 0], esc, rot);
  return L;
};
// ---- formas (camada de forma vetorial)
// o: {x, y, w, h, r, cor, alfa, traco, tracoL, elipse:true}
WG.forma = function (comp, pai, nome, o) {
  var L = comp.layers.addShape(); L.name = nome;
  if (pai) L.parent = pai;
  var root = L.property("ADBE Root Vectors Group");
  root.addProperty("ADBE Vector Group");
  var v = root.property(1).property("ADBE Vectors Group");
  v.addProperty(o.elipse ? "ADBE Vector Shape - Ellipse" : "ADBE Vector Shape - Rect");
  if (o.cor) v.addProperty("ADBE Vector Graphic - Fill");
  if (o.traco) v.addProperty("ADBE Vector Graphic - Stroke");
  v = L.property("ADBE Root Vectors Group").property(1).property("ADBE Vectors Group");
  if (o.elipse) v.property("ADBE Vector Shape - Ellipse").property("ADBE Vector Ellipse Size").setValue([o.w, o.h]);
  else {
    v.property("ADBE Vector Shape - Rect").property("ADBE Vector Rect Size").setValue([o.w, o.h]);
    v.property("ADBE Vector Shape - Rect").property("ADBE Vector Rect Roundness").setValue(o.r || 0);
  }
  if (o.cor) v.property("ADBE Vector Graphic - Fill").property("ADBE Vector Fill Color").setValue(WG.cor(o.cor));
  if (o.traco) {
    v.property("ADBE Vector Graphic - Stroke").property("ADBE Vector Stroke Color").setValue(WG.cor(o.traco));
    v.property("ADBE Vector Graphic - Stroke").property("ADBE Vector Stroke Width").setValue(o.tracoL || 2);
  }
  WG.pos(L, [0, 0], [o.x + o.w / 2, o.y + o.h / 2]);
  if (o.alfa !== undefined) WG.tr(L).property("ADBE Opacity").setValue(o.alfa);
  L.motionBlur = true;
  return L;
};
WG.rectProp = function (L, nome) {   // nome: "ADBE Vector Rect Size" | "...Position" | "...Roundness"
  return L.property("ADBE Root Vectors Group").property(1).property("ADBE Vectors Group").property("ADBE Vector Shape - Rect").property(nome);
};
// ---- texto de ponto. o: {x, y (linha de base), fonte, tam, cor, just: "E"|"C"|"D", track, italico, traco, tracoL}
WG.texto = function (comp, pai, nome, s, o) {
  var L = comp.layers.addText(s); L.name = nome;
  if (pai) L.parent = pai;
  var tp = L.property("ADBE Text Properties").property("ADBE Text Document");
  var td = tp.value;
  td.resetCharStyle(); td.resetParagraphStyle();
  td.font = o.fonte; td.fontSize = o.tam; td.applyFill = true; td.fillColor = WG.cor(o.cor || "#FFFFFF");
  if (o.traco) { td.applyStroke = true; td.strokeColor = WG.cor(o.traco); td.strokeWidth = o.tracoL || 2; td.strokeOverFill = false; }
  else td.applyStroke = false;
  td.justification = (o.just == "C") ? ParagraphJustification.CENTER_JUSTIFY : (o.just == "D") ? ParagraphJustification.RIGHT_JUSTIFY : ParagraphJustification.LEFT_JUSTIFY;
  td.tracking = o.track || 0;
  if (o.italico) td.fauxItalic = true;
  if (o.negrito) td.fauxBold = true;
  if (o.entrelinha) { td.autoLeading = false; td.leading = o.entrelinha; }
  if (o.hscale) td.horizontalScale = o.hscale / 100;   // TextDocument usa 1 = 100%
  tp.setValue(td);
  WG.pos(L, [0, 0], [o.x, o.y]);
  L.motionBlur = true;
  return L;
};
// ---- caminhos de máscara
WG.formaRet = function (x, y, w, h, r) {
  var s = new Shape();
  r = Math.max(0, Math.min(r || 0, w / 2, h / 2));
  if (r < 0.01) {
    s.vertices = [[x, y], [x + w, y], [x + w, y + h], [x, y + h]];
    s.inTangents = [[0, 0], [0, 0], [0, 0], [0, 0]]; s.outTangents = [[0, 0], [0, 0], [0, 0], [0, 0]];
  } else {
    var k = r * 0.5523;
    s.vertices = [[x + r, y], [x + w - r, y], [x + w, y + r], [x + w, y + h - r], [x + w - r, y + h], [x + r, y + h], [x, y + h - r], [x, y + r]];
    s.inTangents = [[-k, 0], [0, 0], [0, -k], [0, 0], [k, 0], [0, 0], [0, k], [0, 0]];
    s.outTangents = [[0, 0], [k, 0], [0, 0], [0, k], [0, 0], [-k, 0], [0, 0], [0, -k]];
  }
  s.closed = true; return s;
};
WG.formaElipse = function (cx, cy, rx, ry) {
  var s = new Shape(); var kx = rx * 0.5523, ky = ry * 0.5523;
  s.vertices = [[cx, cy - ry], [cx + rx, cy], [cx, cy + ry], [cx - rx, cy]];
  s.inTangents = [[-kx, 0], [0, -ky], [kx, 0], [0, ky]];
  s.outTangents = [[kx, 0], [0, ky], [-kx, 0], [0, -ky]];
  s.closed = true; return s;
};
WG.mascara = function (L, shape, nome) {
  var m = L.property("ADBE Mask Parade").addProperty("ADBE Mask Atom");
  m.name = nome || "mascara";
  L.property("ADBE Mask Parade").property(m.name).property("ADBE Mask Shape").setValue(shape);
  return L.property("ADBE Mask Parade").property(m.name);
};
// ---- imagem recortada (cobre w x h, centro opcional deslocado), cantos arredondados r. o: {x,y,w,h,r, fx, fy (0..1 foco), circulo}
WG.imagem = function (comp, pai, nome, rel, o) {
  var it = WG.footage(rel);
  var L = comp.layers.add(it); L.name = nome;
  if (pai) L.parent = pai;
  var fw = it.width, fh = it.height;
  var sc = Math.max(o.w / fw, o.h / fh) * (o.zoom || 1);
  var mw = o.w / sc, mh = o.h / sc;
  var fx = (o.fx === undefined) ? 0.5 : o.fx, fy = (o.fy === undefined) ? 0.5 : o.fy;
  var cx = mw / 2 + (fw - mw) * fx, cy = mh / 2 + (fh - mh) * fy;
  WG.pos(L, [cx, cy], [o.x + o.w / 2, o.y + o.h / 2], [sc * 100, sc * 100]);
  if (o.circulo) WG.mascara(L, WG.formaElipse(cx, cy, mw / 2, mh / 2), "circulo");
  else WG.mascara(L, WG.formaRet(cx - mw / 2, cy - mh / 2, mw, mh, (o.r || 0) / sc), "recorte");
  L.motionBlur = true;
  L.quality = LayerQuality.BEST;
  return L;
};
// ---- ease robusto: tenta 1, 2 e 3 dimensões (Scale pede 3 mesmo em camada 2D; Position espacial pede 1)
WG.ease = function (prop, k, inInf, outInf) {
  var tent = [1, 2, 3];
  for (var j = 0; j < tent.length; j++) {
    var a = [], b = [];
    for (var d = 0; d < tent[j]; d++) { a.push(new KeyframeEase(0, Math.max(0.1, inInf))); b.push(new KeyframeEase(0, Math.max(0.1, outInf))); }
    try { prop.setTemporalEaseAtKey(k, a, b); return true; } catch (e) {}
  }
  return false;
};
// ---- chaves com suavização. lista = [[t, v], ...]; inf = influência (0..100) da suavização
WG.chaves = function (prop, lista, inf, linear) {
  var ts = [], vs = [], i;
  for (i = 0; i < lista.length; i++) { ts.push(lista[i][0]); vs.push(lista[i][1]); }
  prop.setValuesAtTimes(ts, vs);
  for (i = 1; i <= prop.numKeys; i++) {
    if (linear) { prop.setInterpolationTypeAtKey(i, KeyframeInterpolationType.LINEAR, KeyframeInterpolationType.LINEAR); continue; }
    prop.setInterpolationTypeAtKey(i, KeyframeInterpolationType.BEZIER, KeyframeInterpolationType.BEZIER);
    WG.ease(prop, i, inf || 70, inf || 70);
    if (prop.isSpatial) { try { prop.setSpatialAutoBezierAtKey(i, false); prop.setSpatialContinuousAtKey(i, false); } catch (er2) {} }
  }
};
// ---- duas chaves com saída rápida e chegada lenta (cauda longa, como as curvas do autor)
// inSaida = influência na saída da 1ª chave (baixo = arranca rápido); inChegada = influência na chegada da 2ª (alto = pousa devagar)
WG.chave2 = function (prop, t0, v0, t1, v1, inSaida, inChegada) {
  prop.setValuesAtTimes([t0, t1], [v0, v1]);
  var n = prop.numKeys, k0 = prop.nearestKeyIndex(t0), k1 = prop.nearestKeyIndex(t1);
  prop.setInterpolationTypeAtKey(k0, KeyframeInterpolationType.BEZIER, KeyframeInterpolationType.BEZIER);
  prop.setInterpolationTypeAtKey(k1, KeyframeInterpolationType.BEZIER, KeyframeInterpolationType.BEZIER);
  WG.ease(prop, k0, 33, inSaida);
  WG.ease(prop, k1, inChegada, 33);
  if (prop.isSpatial) { try { prop.setSpatialAutoBezierAtKey(k0, false); prop.setSpatialAutoBezierAtKey(k1, false); } catch (er) {} }
};
// ---- câmera: CAM a partir da câmera ajustada; devolve {cam, json}
WG.camera = function (compMundo, id) {
  var arq = WG.P + "camera/cena-" + id + "-ajustada.json";
  var cam = WG.CAMERA_criar(compMundo, arq);
  return { cam: cam, d: WG.CAMERA_lerJSON(arq) };
};
WG.camValor = function (cam, nome, t) { return cam.property("ADBE Effect Parade").property(nome).property(1).valueAtTime(t, false); };
WG.camEm = function (cam, t) {
  return { z: WG.camValor(cam, "Zoom (log2)", t), mx: WG.camValor(cam, "Mira X", t), my: WG.camValor(cam, "Mira Y", t), g: WG.camValor(cam, "Giro", t) };
};
// interpola a câmera direto do JSON (para usar a câmera de OUTRA cena)
WG.camJSON = function (d, t) {
  function iv(lst) {
    if (t <= lst[0][0]) return lst[0][1];
    for (var i = 1; i < lst.length; i++) if (lst[i][0] >= t) { var u = (t - lst[i - 1][0]) / (lst[i][0] - lst[i - 1][0]); return lst[i - 1][1] * (1 - u) + lst[i][1] * u; }
    return lst[lst.length - 1][1];
  }
  return { z: iv(d.chaves.zoom), mx: iv(d.chaves.mx), my: iv(d.chaves.my), g: iv(d.chaves.giro) };
};
// nulo que leva o mundo de outra cena (B) para dentro deste mundo (A), alinhado na tela no instante t:
// ponto Wb -> Wa = Ma + R(gb-ga) * 2^(zb-za) * (Wb - Mb)
WG.nuloOutroMundo = function (comp, cam, nome, ca, cb) {
  var e = 100 * Math.pow(2, cb.z - ca.z);
  return WG.nulo(comp, cam, nome, [cb.mx, cb.my], [ca.mx, ca.my], [e, e], cb.g - ca.g);
};
// ---- comp provisória de encaixe (sólido cinza + nome)
WG.provisoria = function (nome) {
  var c = WG.item(nome);
  if (c && c instanceof CompItem) return c;
  c = app.project.items.addComp(nome, 1080, 1080, 1, WG.DUR, WG.FPS);
  c.parentFolder = WG.pasta("wg encaixes provisorios");
  c.layers.addSolid([0.45, 0.45, 0.47], "cinza", 1080, 1080, 1, WG.DUR);
  var g = c.layers.addShape(); g.name = "grade";
  var gr = g.property("ADBE Root Vectors Group"); gr.addProperty("ADBE Vector Group");
  var v = gr.property(1).property("ADBE Vectors Group"); v.addProperty("ADBE Vector Shape - Rect"); v.addProperty("ADBE Vector Graphic - Stroke");
  v = g.property("ADBE Root Vectors Group").property(1).property("ADBE Vectors Group");
  v.property("ADBE Vector Shape - Rect").property("ADBE Vector Rect Size").setValue([1000, 1000]);
  v.property("ADBE Vector Graphic - Stroke").property("ADBE Vector Stroke Color").setValue([1, 1, 1]);
  v.property("ADBE Vector Graphic - Stroke").property("ADBE Vector Stroke Width").setValue(12);
  WG.pos(g, [0, 0], [540, 540]);
  var t = c.layers.addText(nome); var tp = t.property("ADBE Text Properties").property("ADBE Text Document"); var td = tp.value;
  td.font = "Inter-Bold"; td.fontSize = 90; td.fillColor = [1, 1, 1]; td.justification = ParagraphJustification.CENTER_JUSTIFY; tp.setValue(td);
  WG.pos(t, [0, 0], [540, 570]);
  return c;
};
// ---- monta CENA <id>: camada MUNDO centrada + Corner Pin com os cantos medidos
WG.cena = function (id, compMundo, d, pasta) {
  var cena = WG.comp("CENA " + id, 1080, 1080, pasta);
  var L = cena.layers.add(compMundo); L.name = "MUNDO " + id;
  WG.pos(L, [compMundo.width / 2, compMundo.height / 2], [540, 540]);
  L.motionBlur = true; L.quality = LayerQuality.BEST;
  if (d.cantos) {
    L.property("ADBE Effect Parade").addProperty("ADBE Corner Pin");
    var fx = L.property("ADBE Effect Parade").property("ADBE Corner Pin");
    var nomes = ["ADBE Corner Pin-0001", "ADBE Corner Pin-0002", "ADBE Corner Pin-0003", "ADBE Corner Pin-0004"];
    for (var k = 0; k < 4; k++) {
      var ts = [], vs = [];
      for (var i = 0; i < d.cantos.length; i++) { ts.push(d.cantos[i][0]); vs.push([d.cantos[i][1 + 2 * k], d.cantos[i][2 + 2 * k]]); }
      var p = fx.property(nomes[k]); p.setValuesAtTimes(ts, vs);
      for (var j = 1; j <= p.numKeys; j++) p.setInterpolationTypeAtKey(j, KeyframeInterpolationType.LINEAR, KeyframeInterpolationType.LINEAR);
    }
  }
  return cena;
};

// remove sólidos/nulos que ficaram sem uso depois de refazer uma cena
WG.limparSolidos = function () {
  for (var i = app.project.numItems; i >= 1; i--) {
    var it = app.project.item(i);
    if (it instanceof FootageItem && it.mainSource instanceof SolidSource && it.usedIn.length == 0) it.remove();
  }
};

// ---- caminho livre em coordenadas do mundo (curva suave por Catmull-Rom). o: {fechado, cor, alfa, traco, tracoL, tracejado:[traço, vão], reto}
WG.caminho = function (comp, pai, nome, pts, o) {
  var L = comp.layers.addShape(); L.name = nome;
  if (pai) L.parent = pai;
  var root = L.property("ADBE Root Vectors Group"); root.addProperty("ADBE Vector Group");
  var v = root.property(1).property("ADBE Vectors Group");
  v.addProperty("ADBE Vector Shape - Group");
  if (o.cor) v.addProperty("ADBE Vector Graphic - Fill");
  if (o.traco) v.addProperty("ADBE Vector Graphic - Stroke");
  v = L.property("ADBE Root Vectors Group").property(1).property("ADBE Vectors Group");
  var n = pts.length, s = new Shape(), ins = [], outs = [], i;
  for (i = 0; i < n; i++) {
    var a = pts[(i - 1 + n) % n], b = pts[(i + 1) % n];
    if (o.reto || (!o.fechado && (i == 0 || i == n - 1))) { ins.push([0, 0]); outs.push([0, 0]); continue; }
    var tx = (b[0] - a[0]) / 6, ty = (b[1] - a[1]) / 6;
    ins.push([-tx, -ty]); outs.push([tx, ty]);
  }
  s.vertices = pts; s.inTangents = ins; s.outTangents = outs; s.closed = !!o.fechado;
  v.property("ADBE Vector Shape - Group").property("ADBE Vector Shape").setValue(s);
  if (o.cor) v.property("ADBE Vector Graphic - Fill").property("ADBE Vector Fill Color").setValue(WG.cor(o.cor));
  if (o.traco) {
    var st = v.property("ADBE Vector Graphic - Stroke");
    st.property("ADBE Vector Stroke Color").setValue(WG.cor(o.traco));
    st.property("ADBE Vector Stroke Width").setValue(o.tracoL || 2);
    st.property("ADBE Vector Stroke Line Cap").setValue(2); st.property("ADBE Vector Stroke Line Join").setValue(2);
    if (o.tracejado) {
      st.property("ADBE Vector Stroke Dashes").addProperty("ADBE Vector Stroke Dash 1");
      st.property("ADBE Vector Stroke Dashes").addProperty("ADBE Vector Stroke Gap 1");
      st = L.property("ADBE Root Vectors Group").property(1).property("ADBE Vectors Group").property("ADBE Vector Graphic - Stroke");
      st.property("ADBE Vector Stroke Dashes").property("ADBE Vector Stroke Dash 1").setValue(o.tracejado[0]);
      st.property("ADBE Vector Stroke Dashes").property("ADBE Vector Stroke Gap 1").setValue(o.tracejado[1]);
    }
  }
  WG.pos(L, [0, 0], [0, 0]);
  if (o.alfa !== undefined) WG.tr(L).property("ADBE Opacity").setValue(o.alfa);
  L.motionBlur = true;
  return L;
};
