var __create = Object.create; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; var __markAsModule = (target) => __defProp(target, "__esModule", { value: true }); var __export = (target, all) => { __markAsModule(target); for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __reExport = (target, module2, desc) => { if (module2 && typeof module2 === "object" || typeof module2 === "function") { for (let key of __getOwnPropNames(module2)) if (!__hasOwnProp.call(target, key) && key !== "default") __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable }); } return target; }; var __toModule = (module2) => { return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2); }; var __async = (__this, __arguments, generator) => { return new Promise((resolve, reject) => { var fulfilled = (value) => { try { step(generator.next(value)); } catch (e) { reject(e); } }; var rejected = (value) => { try { step(generator.throw(value)); } catch (e) { reject(e); } }; var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected); step((generator = generator.apply(__this, __arguments)).next()); }); }; // src/main.ts __export(exports, { default: () => LineupBuilderPlugin }); // src/config.ts var KEEPER_COLOUR = "#808080"; var DEFENDER_COLOUR = "#2009ff"; var MIDFIELDER_COLOUR = "#ff0"; var FORWARD_COLOUR = "#f00"; // src/position.ts var GK = { x: 772, y: 1670, circleColour: KEEPER_COLOUR }; var LB = { x: 272, y: 1347, circleColour: DEFENDER_COLOUR }; var CBL = { x: 571, y: 1447, circleColour: DEFENDER_COLOUR }; var CBR = { x: 970, y: 1447, circleColour: DEFENDER_COLOUR }; var RB = { x: 1272, y: 1347, circleColour: DEFENDER_COLOUR }; var LWB = { x: 272, y: 1247, circleColour: DEFENDER_COLOUR }; var LCB = { x: 471, y: 1447, circleColour: DEFENDER_COLOUR }; var CCB = { x: 772, y: 1420, circleColour: DEFENDER_COLOUR }; var RCB = { x: 1070, y: 1447, circleColour: DEFENDER_COLOUR }; var RWB = { x: 1272, y: 1247, circleColour: DEFENDER_COLOUR }; var CDM = { x: 772, y: 1083, circleColour: MIDFIELDER_COLOUR }; var LDM = { x: 551.8, y: 1083, circleColour: MIDFIELDER_COLOUR }; var RDM = { x: 988.8, y: 1083, circleColour: MIDFIELDER_COLOUR }; var CML = { x: 571, y: 976, circleColour: MIDFIELDER_COLOUR }; var CMR = { x: 970, y: 976, circleColour: MIDFIELDER_COLOUR }; var LCM = { x: 417, y: 883, circleColour: MIDFIELDER_COLOUR }; var RCM = { x: 1152, y: 883, circleColour: MIDFIELDER_COLOUR }; var CAM = { x: 772, y: 580.9, circleColour: MIDFIELDER_COLOUR }; var LAM = { x: 319.1, y: 580.9, circleColour: MIDFIELDER_COLOUR }; var RAM = { x: 1211.8, y: 580.9, circleColour: MIDFIELDER_COLOUR }; var LM = { x: 328, y: 775, circleColour: MIDFIELDER_COLOUR }; var RM = { x: 1216, y: 775, circleColour: MIDFIELDER_COLOUR }; var RW = { x: 1258, y: 363, circleColour: FORWARD_COLOUR }; var LW = { x: 282, y: 363, circleColour: FORWARD_COLOUR }; var LS = { x: 588, y: 260, circleColour: FORWARD_COLOUR }; var RS = { x: 962, y: 260, circleColour: FORWARD_COLOUR }; var ST = { x: 772, y: 193, circleColour: FORWARD_COLOUR }; // src/formation.ts var formations = [ { name: "442", positions: [GK, LB, CBL, CBR, RB, LM, CML, CMR, RM, LS, RS] }, { name: "433", positions: [GK, LB, CBL, CBR, RB, LCM, CDM, RCM, LW, ST, RW] }, { name: "4231", positions: [GK, LB, CBL, CBR, RB, LDM, RDM, LAM, CAM, RAM, ST] }, { name: "442-diamond", positions: [GK, LB, CBL, CBR, RB, CDM, LM, RM, CAM, LS, RS] }, { name: "541", positions: [GK, LWB, LCB, CCB, RCB, RWB, LM, CML, CMR, RM, ST] }, { name: "523", positions: [GK, LWB, LCB, CCB, RCB, RWB, CML, CMR, LW, ST, RW] }, { name: "532", positions: [GK, LWB, LCB, CCB, RCB, RWB, LCM, CDM, RCM, LS, RS] }, { name: "343", positions: [GK, LCB, CCB, RCB, LM, CML, CMR, RM, LW, ST, RW] }, { name: "352", positions: [GK, LCB, CCB, RCB, LM, LDM, RDM, RM, CAM, LS, RS] } ]; // src/main.ts var import_obsidian = __toModule(require("obsidian")); // src/svg-builder.ts var LABEL_OFFSET_X = -69; var LABEL_OFFSET_Y = 140; function buildLabels(positions, players) { let labels = []; for (var i = 0; i < positions.length; i++) { labels[i] = buildLabel(positions[i], players[i]); } return labels; } function buildCircles(positions) { return positions.map((position) => buildCircle(position)); } function buildLabel(position, playerName) { return `${playerName}`; } function buildCircle(position) { return ``; } function buildSvg(positions, players) { return ` ${buildCircles(positions).join("\n")} ${buildLabels(positions, players).join("\n")} `; } // src/main.ts var LineupBuilderPlugin = class extends import_obsidian.Plugin { onInit() { } onload() { return __async(this, null, function* () { this.registerMarkdownCodeBlockProcessor("lineup", this.draw_lineup()); }); } draw_lineup() { return (source, el, ctx) => { const { formation, players } = LineupBuilderPlugin.parseCode(source); const xmlns = "http://www.w3.org/2000/svg"; var boxWidth = 346; var boxHeight = 480; var block = document.createElementNS(xmlns, "svg"); block.setAttributeNS(null, "viewBox", "0 0 " + boxWidth + " " + boxHeight); block.setAttributeNS(null, "width", String(boxWidth)); block.setAttributeNS(null, "height", String(boxHeight)); block.innerHTML = buildSvg(formation.positions, players); el.appendChild(block); }; } static parseCode(input) { const lines = input.split(/\r?\n/); let formation = lines[0]; if (formation.startsWith("formation: ")) { formation = formation.replace("formation: ", ""); } let players = []; let playersLine = lines[1]; if (playersLine.startsWith("players: ")) { players = playersLine.replace("players: ", "").split(","); } return { formation: formations.find((x) => x.name === formation), players }; } }; //# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsic3JjL21haW4udHMiLCAic3JjL2Nv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zIwMDAvc3ZnXCI7XHJcbiAgICAgICAgICAgIHZhciBib3hXaWR0aCA9IDM0NjtcclxuICAgICAgICAgICAgdmFyIGJveEhlaWdodCA9IDQ4MDtcclxuICAgICAgICAgICAgdmFyIGJsb2NrID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudE5TKHhtbG5zLCBcInN2Z1wiKTtcclxuICAgICAgICAgICAgYmxvY2suc2V0QXR0cmlidXRlTlMoXHJcbiAgICAgICAgICAgICAgICBudWxsLFxyXG4gICAgICAgICAgICAgICAgXCJ2aWV3Qm94XCIsXHJcbiAgICAgICAgICAgICAgICBcIjAgMCBcIiArIGJveFdpZHRoICsgXCIgXCIgKyBib3hIZWlnaHRcclxuICAgICAgICAgICAgKTtcclxuICAgICAgICAgICAgYmxvY2suc2V0QXR0cmlidXRlTlMobnVsbCwgXCJ3aWR0aFwiLCBTdHJpbmcoYm94V2lkdGgpKTtcclxuICAgICAgICAgICAgYmxvY2suc2V0QXR0cmlidXRlTlMobnVsbCwgXCJoZWlnaHRcIiwgU3RyaW5nKGJveEhlaWdodCkpO1xyXG4gICAgICAgICAgICBibG9jay5pbm5lckhUTUwgPSBidWlsZFN2Zyhmb3JtYXRpb24ucG9zaXRpb25zLCBwbGF5ZXJzKTtcclxuICAgICAgICAgICAgZWwuYXBwZW5kQ2hpbGQoYmxvY2spO1xyXG4gICAgICAgIH07XHJcbiAgICB9XHJcblxyXG4gICAgcHJpdmF0ZSBzdGF0aWMgcGFyc2VDb2RlKGlucHV0OiBzdHJpbmcpOiBQYXJzZWRDb2RlIHtcclxuICAgICAgICBjb25zdCBsaW5lcyA9IGlucHV0LnNwbGl0KC9cXHI/XFxuLyk7XHJcbiAgICAgICAgbGV0IGZvcm1hdGlvbjogc3RyaW5nID0gbGluZXNbMF07XHJcbiAgICAgICAgaWYgKGZvcm1hdGlvbi5zdGFydHNXaXRoKFwiZm9ybWF0aW9uOiBcIikpIHtcclxuICAgICAgICAgICAgZm9ybWF0aW9uID0gZm9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