microboard-temp 0.1.10 → 0.1.12

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/dist/cjs/index.js CHANGED
@@ -2157,7 +2157,7 @@ __export(exports_src, {
2157
2157
  cursors: () => defaultCursors,
2158
2158
  createVideoItem: () => createVideoItem,
2159
2159
  createEvents: () => createEvents,
2160
- conf: () => conf,
2160
+ conf: () => conf2,
2161
2161
  checkHotkeys: () => checkHotkeys,
2162
2162
  catmullRomInterpolate: () => catmullRomInterpolate,
2163
2163
  catchErrorResponse: () => catchErrorResponse,
@@ -5114,7 +5114,7 @@ var ExportQuality;
5114
5114
  ExportQuality2[ExportQuality2["STANDARD"] = 2] = "STANDARD";
5115
5115
  ExportQuality2[ExportQuality2["LOW"] = 3] = "LOW";
5116
5116
  })(ExportQuality ||= {});
5117
- var conf = {
5117
+ var conf2 = {
5118
5118
  connection: undefined,
5119
5119
  path2DFactory: typeof Path2D !== "undefined" ? BrowserPath2D : MockPath2D,
5120
5120
  documentFactory: typeof document !== "undefined" ? new BrowserDocumentFactory : undefined,
@@ -5434,7 +5434,11 @@ var conf = {
5434
5434
  overline: false,
5435
5435
  subscript: false,
5436
5436
  superscript: false
5437
- }
5437
+ },
5438
+ LOG_HOTKEYS: false,
5439
+ FORCE_HOTKEYS: "auto",
5440
+ debug: false,
5441
+ FALLBACK_LNG: "en"
5438
5442
  };
5439
5443
 
5440
5444
  // src/Items/Transformation/Matrix.ts
@@ -6156,7 +6160,7 @@ class DrawingContext {
6156
6160
  this.setCamera(camera);
6157
6161
  }
6158
6162
  dpi() {
6159
- return conf.getDPI();
6163
+ return conf2.getDPI();
6160
6164
  }
6161
6165
  setCamera(camera) {
6162
6166
  this.camera = camera;
@@ -6166,7 +6170,7 @@ class DrawingContext {
6166
6170
  }
6167
6171
  clear() {
6168
6172
  this.ctx.setTransform(1 * this.dpi(), 0, 0, 1 * this.dpi(), 0, 0);
6169
- this.ctx.clearRect(0, 0, conf.getDocumentWidth(), conf.getDocumentHeight());
6173
+ this.ctx.clearRect(0, 0, conf2.getDocumentWidth(), conf2.getDocumentHeight());
6170
6174
  this.matrix.applyToContext(this.ctx);
6171
6175
  }
6172
6176
  clearCursor() {
@@ -6174,7 +6178,7 @@ class DrawingContext {
6174
6178
  return;
6175
6179
  }
6176
6180
  this.cursorCtx.setTransform(1 * this.dpi(), 0, 0, 1 * this.dpi(), 0, 0);
6177
- this.cursorCtx.clearRect(0, 0, conf.getDocumentWidth(), conf.getDocumentHeight());
6181
+ this.cursorCtx.clearRect(0, 0, conf2.getDocumentWidth(), conf2.getDocumentHeight());
6178
6182
  this.matrix.applyToContext(this.cursorCtx);
6179
6183
  }
6180
6184
  applyChanges() {
@@ -6277,7 +6281,7 @@ class Path {
6277
6281
  this.width = this.getMbr().getWidth();
6278
6282
  this.height = this.getMbr().getHeight();
6279
6283
  this.maxDimension = Math.max(mbr.getWidth(), mbr.getHeight());
6280
- this.path2d = new conf.path2DFactory;
6284
+ this.path2d = new conf2.path2DFactory;
6281
6285
  this.updateCache();
6282
6286
  }
6283
6287
  getBackgroundColor() {
@@ -6354,7 +6358,7 @@ class Path {
6354
6358
  this.y = top - this.paddingTop;
6355
6359
  this.width = right - left + this.paddingLeft + this.paddingRight;
6356
6360
  this.height = bottom - top + this.paddingTop + this.paddingBottom;
6357
- const path2d = new conf.path2DFactory;
6361
+ const path2d = new conf2.path2DFactory;
6358
6362
  if (this.segments.length === 0) {
6359
6363
  return;
6360
6364
  }
@@ -7420,7 +7424,7 @@ var parsersHTML = {
7420
7424
  "comment-item": parseHTMLComment
7421
7425
  };
7422
7426
  var decodeHtml = (htmlString) => {
7423
- const parser = conf.getDOMParser();
7427
+ const parser = conf2.getDOMParser();
7424
7428
  const doc = parser.parseFromString(htmlString, "text/html");
7425
7429
  return doc.documentElement.textContent || "";
7426
7430
  };
@@ -7449,10 +7453,10 @@ function parseHTMLRichText(el, options) {
7449
7453
  italic: node.style.fontStyle === "italic",
7450
7454
  underline: node.style.textDecoration.includes("underline"),
7451
7455
  "line-through": node.style.textDecoration.includes("line-through"),
7452
- fontColor: node.style.color || conf.DEFAULT_TEXT_STYLES.fontColor,
7453
- fontHighlight: node.style.backgroundColor || conf.DEFAULT_TEXT_STYLES.fontHighlight,
7454
- fontSize: parseFloat(node.style.fontSize) || conf.DEFAULT_TEXT_STYLES.fontSize,
7455
- fontFamily: node.style.fontFamily || conf.DEFAULT_TEXT_STYLES.fontFamily,
7456
+ fontColor: node.style.color || conf2.DEFAULT_TEXT_STYLES.fontColor,
7457
+ fontHighlight: node.style.backgroundColor || conf2.DEFAULT_TEXT_STYLES.fontHighlight,
7458
+ fontSize: parseFloat(node.style.fontSize) || conf2.DEFAULT_TEXT_STYLES.fontSize,
7459
+ fontFamily: node.style.fontFamily || conf2.DEFAULT_TEXT_STYLES.fontFamily,
7456
7460
  overline: false,
7457
7461
  subscript: false,
7458
7462
  superscript: false
@@ -7517,7 +7521,7 @@ function parseHTMLRichText(el, options) {
7517
7521
  return {
7518
7522
  type: "paragraph",
7519
7523
  ...extractCommonProps(),
7520
- lineHeight: parseFloat(node.style.lineHeight) || conf.DEFAULT_TEXT_STYLES.lineHeight,
7524
+ lineHeight: parseFloat(node.style.lineHeight) || conf2.DEFAULT_TEXT_STYLES.lineHeight,
7521
7525
  children: children2
7522
7526
  };
7523
7527
  default:
@@ -13997,8 +14001,8 @@ class LinkTo {
13997
14001
  const ctx = context.ctx;
13998
14002
  ctx.save();
13999
14003
  ctx.globalCompositeOperation = "destination-out";
14000
- const size = conf.LINK_BTN_SIZE / scale;
14001
- const offset = conf.LINK_BTN_OFFSET / scale;
14004
+ const size = conf2.LINK_BTN_SIZE / scale;
14005
+ const offset = conf2.LINK_BTN_OFFSET / scale;
14002
14006
  ctx.fillRect(right - size - offset, top + offset, size, size);
14003
14007
  ctx.restore();
14004
14008
  }
@@ -14149,7 +14153,7 @@ function getBlockNode(data, maxWidth, isFrame, listData, listMark, newLine = fal
14149
14153
  } else if (node3.type === "ul_list" && !listData) {
14150
14154
  listData = { level: 0, isNumberedList: false };
14151
14155
  }
14152
- const listMarks = conf[getListMarkType((listData?.level || 0) + 1)];
14156
+ const listMarks = conf2[getListMarkType((listData?.level || 0) + 1)];
14153
14157
  for (let i = 0;i < data.children.length; i++) {
14154
14158
  const child = structuredClone(data.children[i]);
14155
14159
  switch (child.type) {
@@ -14554,8 +14558,8 @@ function measureText(text, style, paddingTop = 0, marginLeft = 0) {
14554
14558
  rect2.height += paddingTop;
14555
14559
  }
14556
14560
  }
14557
- conf.measureCtx.font = style.font;
14558
- const measure = conf.measureCtx.measureText(text);
14561
+ conf2.measureCtx.font = style.font;
14562
+ const measure = conf2.measureCtx.measureText(text);
14559
14563
  const actualBoundingBoxAscent = toFiniteNumber2(measure.actualBoundingBoxAscent);
14560
14564
  const actualBoundingBoxDescent = toFiniteNumber2(measure.actualBoundingBoxDescent);
14561
14565
  const actualBoundingBoxLeft = toFiniteNumber2(measure.actualBoundingBoxLeft);
@@ -23677,7 +23681,7 @@ var convertLinkNodeToTextNode = (node4) => {
23677
23681
  const link = node4.link;
23678
23682
  const text3 = node4.children.map((child) => child.text).join("");
23679
23683
  return {
23680
- ...conf.DEFAULT_TEXT_STYLES,
23684
+ ...conf2.DEFAULT_TEXT_STYLES,
23681
23685
  type: "text",
23682
23686
  text: text3,
23683
23687
  link,
@@ -23693,9 +23697,9 @@ function setNodeChildrenStyles({
23693
23697
  horisontalAlignment,
23694
23698
  node: node4
23695
23699
  }) {
23696
- let fontStyles = conf.DEFAULT_TEXT_STYLES;
23700
+ let fontStyles = conf2.DEFAULT_TEXT_STYLES;
23697
23701
  if (editor) {
23698
- fontStyles = Editor.marks(editor) || conf.DEFAULT_TEXT_STYLES;
23702
+ fontStyles = Editor.marks(editor) || conf2.DEFAULT_TEXT_STYLES;
23699
23703
  }
23700
23704
  switch (node4.type) {
23701
23705
  case "heading_one":
@@ -23727,7 +23731,7 @@ function setNodeChildrenStyles({
23727
23731
  children.text += " ";
23728
23732
  }
23729
23733
  let fontColor = fontStyles.fontColor;
23730
- if (fontColor === conf.DEFAULT_TEXT_STYLES.fontColor && children.link) {
23734
+ if (fontColor === conf2.DEFAULT_TEXT_STYLES.fontColor && children.link) {
23731
23735
  fontColor = "rgba(71, 120, 245, 1)";
23732
23736
  }
23733
23737
  return {
@@ -23767,7 +23771,7 @@ function setNodeStyles({
23767
23771
  }
23768
23772
 
23769
23773
  // src/Items/RichText/editorHelpers/markdown/markdownProcessor.ts
23770
- var { i18n: i18n2 } = conf;
23774
+ var { i18n: i18n2 } = conf2;
23771
23775
 
23772
23776
  class MarkdownProcessor {
23773
23777
  chunksQueue = [];
@@ -24747,7 +24751,7 @@ function setEditorFocus(editor, selectionContext) {
24747
24751
  }
24748
24752
 
24749
24753
  // src/Items/RichText/RichText.ts
24750
- var { i18n: i18n3 } = conf;
24754
+ var { i18n: i18n3 } = conf2;
24751
24755
  var isEditInProcessValue = false;
24752
24756
  var counter = 0;
24753
24757
 
@@ -24770,7 +24774,7 @@ class RichText extends Mbr {
24770
24774
  isContainerSet = false;
24771
24775
  isRenderEnabled = true;
24772
24776
  layoutNodes;
24773
- clipPath = new conf.path2DFactory;
24777
+ clipPath = new conf2.path2DFactory;
24774
24778
  updateRequired = false;
24775
24779
  autoSizeScale = 1;
24776
24780
  containerMaxWidth;
@@ -24785,7 +24789,7 @@ class RichText extends Mbr {
24785
24789
  shrinkWidth = false;
24786
24790
  prevMbr = null;
24787
24791
  rtCounter = 0;
24788
- constructor(board, container, id = "", transformation = new Transformation(id, board.events), linkTo, placeholderText = i18n3?.t("board.textPlaceholder"), isInShape = false, autoSize = false, insideOf, initialTextStyles = conf.DEFAULT_TEXT_STYLES) {
24792
+ constructor(board, container, id = "", transformation = new Transformation(id, board.events), linkTo, placeholderText = i18n3?.t("board.textPlaceholder"), isInShape = false, autoSize = false, insideOf, initialTextStyles = conf2.DEFAULT_TEXT_STYLES) {
24789
24793
  super();
24790
24794
  this.board = board;
24791
24795
  this.container = container;
@@ -24918,11 +24922,11 @@ class RichText extends Mbr {
24918
24922
  return;
24919
24923
  }
24920
24924
  try {
24921
- conf.reactEditorFocus(this.editor.editor);
24925
+ conf2.reactEditorFocus(this.editor.editor);
24922
24926
  } catch {}
24923
24927
  };
24924
24928
  updateElement = () => {
24925
- if (conf.isNode()) {
24929
+ if (conf2.isNode()) {
24926
24930
  return;
24927
24931
  }
24928
24932
  if (this.updateRequired) {
@@ -25051,7 +25055,7 @@ class RichText extends Mbr {
25051
25055
  const container = this.getTransformedContainer();
25052
25056
  const width = container.getWidth();
25053
25057
  const height = container.getHeight();
25054
- this.clipPath = new conf.path2DFactory;
25058
+ this.clipPath = new conf2.path2DFactory;
25055
25059
  this.clipPath.rect(0, 0, width, height);
25056
25060
  }
25057
25061
  setContainer(container) {
@@ -25328,24 +25332,24 @@ class RichText extends Mbr {
25328
25332
  this.clearLastClickPoint();
25329
25333
  const domMbr = ref.getBoundingClientRect();
25330
25334
  const refMbr = new Mbr(domMbr.left, domMbr.top, domMbr.right, domMbr.bottom);
25331
- if (refMbr.isInside(point5) && (conf.documentFactory.caretPositionFromPoint || conf.documentFactory.caretRangeFromPoint)) {
25332
- const domRange = conf.documentFactory.caretPositionFromPoint ? conf.documentFactory.caretPositionFromPoint(point5.x, point5.y) : conf.documentFactory.caretRangeFromPoint(point5.x, point5.y);
25333
- const textNode = conf.documentFactory.caretPositionFromPoint ? domRange.offsetNode : domRange.startContainer;
25334
- const offset = conf.documentFactory.caretPositionFromPoint ? domRange.offset : domRange.startOffset;
25335
- const slatePoint = conf.reactEditorToSlatePoint(this.editor.editor, textNode, offset, {
25335
+ if (refMbr.isInside(point5) && (conf2.documentFactory.caretPositionFromPoint || conf2.documentFactory.caretRangeFromPoint)) {
25336
+ const domRange = conf2.documentFactory.caretPositionFromPoint ? conf2.documentFactory.caretPositionFromPoint(point5.x, point5.y) : conf2.documentFactory.caretRangeFromPoint(point5.x, point5.y);
25337
+ const textNode = conf2.documentFactory.caretPositionFromPoint ? domRange.offsetNode : domRange.startContainer;
25338
+ const offset = conf2.documentFactory.caretPositionFromPoint ? domRange.offset : domRange.startOffset;
25339
+ const slatePoint = conf2.reactEditorToSlatePoint(this.editor.editor, textNode, offset, {
25336
25340
  exactMatch: false,
25337
25341
  suppressThrow: false
25338
25342
  });
25339
25343
  if (slatePoint) {
25340
25344
  const nRange = { anchor: slatePoint, focus: slatePoint };
25341
25345
  this.editorTransforms.select(this.editor.editor, nRange);
25342
- conf.reactEditorFocus(this.editor.editor);
25346
+ conf2.reactEditorFocus(this.editor.editor);
25343
25347
  }
25344
25348
  } else {
25345
- if (!(conf.documentFactory.caretPositionFromPoint || conf.documentFactory.caretRangeFromPoint)) {
25349
+ if (!(conf2.documentFactory.caretPositionFromPoint || conf2.documentFactory.caretRangeFromPoint)) {
25346
25350
  console.error("document.caretPositionFromPoint and document.caretRangeFromPoint are not available!");
25347
25351
  }
25348
- conf.reactEditorFocus(this.editor.editor);
25352
+ conf2.reactEditorFocus(this.editor.editor);
25349
25353
  }
25350
25354
  }
25351
25355
  }
@@ -25452,11 +25456,11 @@ class RichText extends Mbr {
25452
25456
  if (node4.type === "text" || "text" in node4) {
25453
25457
  node4 = node4;
25454
25458
  const text3 = node4.text.trim() !== "" ? decodeHtml(escapeHtml2(node4.text)) : " ";
25455
- const textElement = node4.link ? Object.assign(conf.documentFactory.createElement("a"), {
25459
+ const textElement = node4.link ? Object.assign(conf2.documentFactory.createElement("a"), {
25456
25460
  href: node4.link,
25457
25461
  target: "_blank",
25458
25462
  rel: "noreferrer"
25459
- }) : conf.documentFactory.createElement("span");
25463
+ }) : conf2.documentFactory.createElement("span");
25460
25464
  Object.assign(textElement.style, {
25461
25465
  fontWeight: node4.bold ? "700" : "400",
25462
25466
  fontStyle: node4.italic ? "italic" : "",
@@ -25464,10 +25468,10 @@ class RichText extends Mbr {
25464
25468
  node4.underline ? "underline" : "",
25465
25469
  node4["line-through"] ? "line-through" : ""
25466
25470
  ].filter(Boolean).join(" "),
25467
- color: node4.fontColor || conf.DEFAULT_TEXT_STYLES.fontColor,
25468
- backgroundColor: node4.fontHighlight || conf.DEFAULT_TEXT_STYLES.fontHighlight,
25469
- fontSize: node4.fontSize ? `${node4.fontSize}px` : `${conf.DEFAULT_TEXT_STYLES.fontSize}px`,
25470
- fontFamily: node4.fontFamily || conf.DEFAULT_TEXT_STYLES.fontFamily
25471
+ color: node4.fontColor || conf2.DEFAULT_TEXT_STYLES.fontColor,
25472
+ backgroundColor: node4.fontHighlight || conf2.DEFAULT_TEXT_STYLES.fontHighlight,
25473
+ fontSize: node4.fontSize ? `${node4.fontSize}px` : `${conf2.DEFAULT_TEXT_STYLES.fontSize}px`,
25474
+ fontFamily: node4.fontFamily || conf2.DEFAULT_TEXT_STYLES.fontFamily
25471
25475
  });
25472
25476
  if (this.insideOf === "Frame") {
25473
25477
  Object.assign(textElement.style, {
@@ -25502,14 +25506,14 @@ class RichText extends Mbr {
25502
25506
  four: 4,
25503
25507
  five: 5
25504
25508
  };
25505
- const header = conf.documentFactory.createElement(`h${levels2[level]}`);
25509
+ const header = conf2.documentFactory.createElement(`h${levels2[level]}`);
25506
25510
  applyCommonStyles(header);
25507
25511
  header.append(...children);
25508
25512
  return header;
25509
25513
  }
25510
25514
  case "code_block": {
25511
- const pre = conf.documentFactory.createElement("pre");
25512
- const code = conf.documentFactory.createElement("code");
25515
+ const pre = conf2.documentFactory.createElement("pre");
25516
+ const code = conf2.documentFactory.createElement("code");
25513
25517
  applyCommonStyles(pre);
25514
25518
  if (node4.language) {
25515
25519
  code.classList.add(`language-${node4.language}`);
@@ -25523,35 +25527,35 @@ class RichText extends Mbr {
25523
25527
  return pre;
25524
25528
  }
25525
25529
  case "block-quote": {
25526
- const blockquote = conf.documentFactory.createElement("blockquote");
25530
+ const blockquote = conf2.documentFactory.createElement("blockquote");
25527
25531
  applyCommonStyles(blockquote);
25528
25532
  blockquote.append(...children);
25529
25533
  return blockquote;
25530
25534
  }
25531
25535
  case "ul_list": {
25532
- const ul = conf.documentFactory.createElement("ul");
25536
+ const ul = conf2.documentFactory.createElement("ul");
25533
25537
  applyCommonStyles(ul);
25534
25538
  ul.append(...children);
25535
25539
  return ul;
25536
25540
  }
25537
25541
  case "ol_list": {
25538
- const ol = conf.documentFactory.createElement("ol");
25542
+ const ol = conf2.documentFactory.createElement("ol");
25539
25543
  applyCommonStyles(ol);
25540
25544
  ol.append(...children);
25541
25545
  return ol;
25542
25546
  }
25543
25547
  case "list_item": {
25544
- const li = conf.documentFactory.createElement("li");
25548
+ const li = conf2.documentFactory.createElement("li");
25545
25549
  applyCommonStyles(li);
25546
25550
  li.append(...children);
25547
25551
  return li;
25548
25552
  }
25549
25553
  case "paragraph":
25550
25554
  default: {
25551
- const par = conf.documentFactory.createElement("p");
25555
+ const par = conf2.documentFactory.createElement("p");
25552
25556
  applyCommonStyles(par);
25553
25557
  Object.assign(par.style, {
25554
- lineHeight: node4.lineHeight ? `${node4.lineHeight}` : conf.DEFAULT_TEXT_STYLES.lineHeight,
25558
+ lineHeight: node4.lineHeight ? `${node4.lineHeight}` : conf2.DEFAULT_TEXT_STYLES.lineHeight,
25555
25559
  margin: "0"
25556
25560
  });
25557
25561
  par.append(...children);
@@ -25559,7 +25563,7 @@ class RichText extends Mbr {
25559
25563
  }
25560
25564
  }
25561
25565
  }
25562
- return conf.documentFactory.createElement("div");
25566
+ return conf2.documentFactory.createElement("div");
25563
25567
  };
25564
25568
  const escapeHtml2 = (unsafe) => {
25565
25569
  return unsafe.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;");
@@ -38622,7 +38626,7 @@ var transformHtmlOrTextToMarkdown = async (text5, html4) => {
38622
38626
  markdownString = String(file).trim();
38623
38627
  }
38624
38628
  let slateNodes = [];
38625
- if (conf.URL_REGEX.test(text5)) {
38629
+ if (conf2.URL_REGEX.test(text5)) {
38626
38630
  slateNodes = [createLinkNode(text5)];
38627
38631
  } else {
38628
38632
  slateNodes = await convertMarkdownToSlate(markdownString.replace(/<!--(Start|End)Fragment-->/g, ""));
@@ -38638,7 +38642,7 @@ function createLinkNode(link2) {
38638
38642
  type: "text",
38639
38643
  link: link2,
38640
38644
  text: link2,
38641
- ...conf.DEFAULT_TEXT_STYLES,
38645
+ ...conf2.DEFAULT_TEXT_STYLES,
38642
38646
  fontColor: "rgba(71, 120, 245, 1)"
38643
38647
  };
38644
38648
  }
@@ -38750,7 +38754,7 @@ class AINode {
38750
38754
  constructor(board, isUserRequest = false, parentNodeId, contextItems = [], threadDirection, id = "") {
38751
38755
  this.board = board;
38752
38756
  this.id = id;
38753
- this.buttonIcon = conf.documentFactory.createElement("img");
38757
+ this.buttonIcon = conf2.documentFactory.createElement("img");
38754
38758
  this.buttonIcon.src = ICON_SRC;
38755
38759
  this.contextItems = contextItems;
38756
38760
  this.isUserRequest = isUserRequest;
@@ -39922,7 +39926,7 @@ function getLine(lineStyle, start2, end2, middle) {
39922
39926
  }
39923
39927
 
39924
39928
  // src/Items/Connector/Connector.ts
39925
- var { i18n: i18n4 } = conf;
39929
+ var { i18n: i18n4 } = conf2;
39926
39930
  var ConnectionLineWidths = [1, 2, 3, 4, 5, 6, 7, 8, 12];
39927
39931
  var CONNECTOR_COLOR = "rgb(20, 21, 26)";
39928
39932
  var CONNECTOR_LINE_WIDTH = 1;
@@ -39982,9 +39986,9 @@ class Connector {
39982
39986
  this.text = new RichText(board, this.getMbr(), this.id, new Transformation, this.linkTo, i18n4.t("connector.textPlaceholder", {
39983
39987
  ns: "default"
39984
39988
  }), true, false, "Connector", {
39985
- ...conf.DEFAULT_TEXT_STYLES,
39986
- fontSize: typeof window !== "undefined" && localStorage.getItem("lastConnectorTextSize") ? Number(localStorage.getItem("lastConnectorTextSize")) : conf.DEFAULT_TEXT_STYLES.fontSize,
39987
- fontColor: typeof window !== "undefined" && localStorage.getItem("lastConnectorTextColor") ? localStorage.getItem("lastConnectorTextColor") : conf.DEFAULT_TEXT_STYLES.fontColor
39989
+ ...conf2.DEFAULT_TEXT_STYLES,
39990
+ fontSize: typeof window !== "undefined" && localStorage.getItem("lastConnectorTextSize") ? Number(localStorage.getItem("lastConnectorTextSize")) : conf2.DEFAULT_TEXT_STYLES.fontSize,
39991
+ fontColor: typeof window !== "undefined" && localStorage.getItem("lastConnectorTextColor") ? localStorage.getItem("lastConnectorTextColor") : conf2.DEFAULT_TEXT_STYLES.fontColor
39988
39992
  });
39989
39993
  this.startPointer = getStartPointer(this.startPoint, this.startPointerStyle, this.lineStyle, this.lines, this.lineWidth * 0.1 + 0.3);
39990
39994
  this.endPointer = getEndPointer(this.endPoint, this.endPointerStyle, this.lineStyle, this.lines, this.lineWidth * 0.1 + 0.3);
@@ -40434,7 +40438,7 @@ class Connector {
40434
40438
  this.text.transformation.applyTranslateTo(x - textWidth / 2, y - textHeight / 2);
40435
40439
  this.text.render(context);
40436
40440
  if (DRAW_TEXT_BORDER && (selectionContext === "EditUnderPointer" || selectionContext === "EditTextUnderPointer") && this.board.selection.items.list().includes(this)) {
40437
- ctx.strokeStyle = conf.SELECTION_COLOR;
40441
+ ctx.strokeStyle = conf2.SELECTION_COLOR;
40438
40442
  ctx.lineWidth = 1;
40439
40443
  ctx.beginPath();
40440
40444
  ctx.rect(textMbr.left - TEXT_BORDER_PADDING, textMbr.top - TEXT_BORDER_PADDING, textMbr.getWidth() + TEXT_BORDER_PADDING * 2, textMbr.getHeight() + TEXT_BORDER_PADDING * 2);
@@ -40661,7 +40665,7 @@ class Connector {
40661
40665
  }
40662
40666
  }
40663
40667
  updatePaths() {
40664
- if (conf.isNode()) {
40668
+ if (conf2.isNode()) {
40665
40669
  return;
40666
40670
  }
40667
40671
  const startPoint = this.startPoint;
@@ -41472,7 +41476,7 @@ class DefaultShapeData {
41472
41476
  text;
41473
41477
  linkTo;
41474
41478
  itemType = "Shape";
41475
- constructor(shapeType = "Rectangle", backgroundColor = "none", backgroundOpacity = 1, borderColor = conf.SHAPE_DEFAULT_STROKE_COLOR, borderOpacity = 1, borderStyle = "solid", borderWidth = 1, transformation = new DefaultTransformationData, text5 = new DefaultRichTextData, linkTo) {
41479
+ constructor(shapeType = "Rectangle", backgroundColor = "none", backgroundOpacity = 1, borderColor = conf2.SHAPE_DEFAULT_STROKE_COLOR, borderOpacity = 1, borderStyle = "solid", borderWidth = 1, transformation = new DefaultTransformationData, text5 = new DefaultRichTextData, linkTo) {
41476
41480
  this.shapeType = shapeType;
41477
41481
  this.backgroundColor = backgroundColor;
41478
41482
  this.backgroundOpacity = backgroundOpacity;
@@ -42759,7 +42763,7 @@ class Shape {
42759
42763
  this.text.updateElement();
42760
42764
  }
42761
42765
  transformPath() {
42762
- if (conf.isNode()) {
42766
+ if (conf2.isNode()) {
42763
42767
  return;
42764
42768
  }
42765
42769
  this.path = Shapes[this.shapeType].createPath(this.mbr);
@@ -42988,7 +42992,7 @@ class Sticker {
42988
42992
  return this;
42989
42993
  }
42990
42994
  transformPath() {
42991
- if (conf.isNode()) {
42995
+ if (conf2.isNode()) {
42992
42996
  return;
42993
42997
  }
42994
42998
  this.stickerPath = StickerShape.stickerPath.copy();
@@ -43539,7 +43543,7 @@ class Frame {
43539
43543
  this.path = Frames[this.shapeType].path.copy();
43540
43544
  this.transformation = new Transformation(this.id, this.board.events);
43541
43545
  this.linkTo = new LinkTo(this.id, this.board.events);
43542
- this.text = new RichText(board, this.textContainer, this.id, this.transformation, this.linkTo, this.name, true, false, "Frame", { ...conf.DEFAULT_TEXT_STYLES, fontColor: FRAME_TITLE_COLOR });
43546
+ this.text = new RichText(board, this.textContainer, this.id, this.transformation, this.linkTo, this.name, true, false, "Frame", { ...conf2.DEFAULT_TEXT_STYLES, fontColor: FRAME_TITLE_COLOR });
43543
43547
  this.text.setSelectionHorisontalAlignment("left");
43544
43548
  this.transformation.subject.subscribe(() => {
43545
43549
  this.transformPath();
@@ -44101,10 +44105,10 @@ class VideoCommand {
44101
44105
 
44102
44106
  // src/Items/Video/Video.ts
44103
44107
  var VIDEO_ICON_SRC = "data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 22 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M15 0C15.2652 0 15.5196 0.105357 15.7071 0.292893C15.8946 0.48043 16 0.734784 16 1V5.2L21.213 1.55C21.288 1.49746 21.3759 1.4665 21.4672 1.4605C21.5586 1.4545 21.6498 1.4737 21.731 1.51599C21.8122 1.55829 21.8802 1.62206 21.9276 1.70035C21.9751 1.77865 22.0001 1.86846 22 1.96V14.04C22.0001 14.1315 21.9751 14.2214 21.9276 14.2996C21.8802 14.3779 21.8122 14.4417 21.731 14.484C21.6498 14.5263 21.5586 14.5455 21.4672 14.5395C21.3759 14.5335 21.288 14.5025 21.213 14.45L16 10.8V15C16 15.2652 15.8946 15.5196 15.7071 15.7071C15.5196 15.8946 15.2652 16 15 16H1C0.734784 16 0.48043 15.8946 0.292893 15.7071C0.105357 15.5196 0 15.2652 0 15V1C0 0.734784 0.105357 0.48043 0.292893 0.292893C0.48043 0.105357 0.734784 0 1 0H15ZM14 2H2V14H14V2ZM6.4 4.829C6.47611 4.82879 6.55069 4.8503 6.615 4.891L10.97 7.663C11.0266 7.69917 11.0731 7.749 11.1054 7.80789C11.1376 7.86679 11.1545 7.93285 11.1545 8C11.1545 8.06715 11.1376 8.13321 11.1054 8.19211C11.0731 8.251 11.0266 8.30083 10.97 8.337L6.615 11.11C6.55434 11.1487 6.48438 11.1703 6.41248 11.1725C6.34059 11.1748 6.26941 11.1576 6.20646 11.1228C6.14351 11.088 6.0911 11.0368 6.05477 10.9747C6.01844 10.9127 5.99951 10.8419 6 10.77V5.23C6 5.009 6.18 4.83 6.4 4.83V4.829ZM20 4.84L16 7.64V8.358L20 11.158V4.84Z' fill='%23FFFFFF'/%3E%3C/svg%3E";
44104
- var videoIcon = conf.documentFactory.createElement("img");
44108
+ var videoIcon = conf2.documentFactory.createElement("img");
44105
44109
  videoIcon.src = VIDEO_ICON_SRC;
44106
44110
  var createPlaceholderImage = (width2, height2) => {
44107
- const canvas = conf.documentFactory.createElement("canvas");
44111
+ const canvas = conf2.documentFactory.createElement("canvas");
44108
44112
  canvas.width = width2;
44109
44113
  canvas.height = height2;
44110
44114
  const ctx = canvas.getContext("2d");
@@ -44148,7 +44152,7 @@ class VideoItem extends Mbr {
44148
44152
  this.events = events2;
44149
44153
  this.id = id;
44150
44154
  this.extension = extension2;
44151
- this.isStorageUrl = !conf.getYouTubeId(url);
44155
+ this.isStorageUrl = !conf2.getYouTubeId(url);
44152
44156
  this.preview = createPlaceholderImage(videoDimension.width, videoDimension.height);
44153
44157
  this.linkTo = new LinkTo(this.id, events2);
44154
44158
  this.board = board;
@@ -44518,59 +44522,59 @@ async function fileTosha256(file) {
44518
44522
  var catchErrorResponse = async (response, mediaType) => {
44519
44523
  if (response.status === 403) {
44520
44524
  const data = await response.json();
44521
- let errorBody = conf.i18n.t("toolsPanel.addMedia.limitReached.bodyWithoutLimit");
44525
+ let errorBody = conf2.i18n.t("toolsPanel.addMedia.limitReached.bodyWithoutLimit");
44522
44526
  if (!data.isOwnerRequest) {
44523
- errorBody = conf.i18n.t("toolsPanel.addMedia.limitReached.bodyOwner");
44527
+ errorBody = conf2.i18n.t("toolsPanel.addMedia.limitReached.bodyOwner");
44524
44528
  } else if (data.currentUsage && data.storageLimit) {
44525
- errorBody = conf.i18n.t(`toolsPanel.addMedia.limitReached.body.${parseInt(data.storageLimit) < 1e5 ? "basic" : "plus"}`);
44529
+ errorBody = conf2.i18n.t(`toolsPanel.addMedia.limitReached.body.${parseInt(data.storageLimit) < 1e5 ? "basic" : "plus"}`);
44526
44530
  }
44527
- conf.notify({
44531
+ conf2.notify({
44528
44532
  variant: "warning",
44529
- header: conf.i18n.t("toolsPanel.addMedia.limitReached.header"),
44533
+ header: conf2.i18n.t("toolsPanel.addMedia.limitReached.header"),
44530
44534
  body: errorBody,
44531
44535
  button: data.isOwnerRequest && data.storageLimit <= 100 ? {
44532
- text: conf.i18n.t("toolsPanel.addMedia.upgradeToPlus"),
44533
- onClick: () => conf.openModal("USER_PLAN_MODAL_ID")
44536
+ text: conf2.i18n.t("toolsPanel.addMedia.upgradeToPlus"),
44537
+ onClick: () => conf2.openModal("USER_PLAN_MODAL_ID")
44534
44538
  } : undefined,
44535
44539
  duration: 8000
44536
44540
  });
44537
44541
  } else if (response.status === 413) {
44538
44542
  const data = await response.json();
44539
- let errorBody = conf.i18n.t("toolsPanel.addMedia.tooLarge.bodyWithoutLimit");
44543
+ let errorBody = conf2.i18n.t("toolsPanel.addMedia.tooLarge.bodyWithoutLimit");
44540
44544
  let isBasicPlan = false;
44541
44545
  if (data.fileSizeLimit && data.fileSize) {
44542
44546
  if (mediaType === "image") {
44543
44547
  isBasicPlan = parseInt(data.fileSizeLimit) < 20;
44544
- errorBody = conf.i18n.t(`toolsPanel.addMedia.tooLarge.imageBody.${isBasicPlan ? "basic" : "plus"}`);
44548
+ errorBody = conf2.i18n.t(`toolsPanel.addMedia.tooLarge.imageBody.${isBasicPlan ? "basic" : "plus"}`);
44545
44549
  } else {
44546
44550
  isBasicPlan = parseInt(data.fileSizeLimit) < 1000;
44547
- errorBody = conf.i18n.t(`toolsPanel.addMedia.tooLarge.audioOrVideoBody.${isBasicPlan ? "basic" : "plus"}`);
44551
+ errorBody = conf2.i18n.t(`toolsPanel.addMedia.tooLarge.audioOrVideoBody.${isBasicPlan ? "basic" : "plus"}`);
44548
44552
  }
44549
44553
  }
44550
- conf.notify({
44554
+ conf2.notify({
44551
44555
  variant: "warning",
44552
- header: conf.i18n.t("toolsPanel.addMedia.tooLarge.header"),
44556
+ header: conf2.i18n.t("toolsPanel.addMedia.tooLarge.header"),
44553
44557
  body: errorBody,
44554
44558
  button: isBasicPlan ? {
44555
- text: conf.i18n.t("toolsPanel.addMedia.upgradeToPlus"),
44556
- onClick: () => conf.openModal("USER_PLAN_MODAL_ID")
44559
+ text: conf2.i18n.t("toolsPanel.addMedia.upgradeToPlus"),
44560
+ onClick: () => conf2.openModal("USER_PLAN_MODAL_ID")
44557
44561
  } : undefined,
44558
44562
  duration: 4000
44559
44563
  });
44560
44564
  } else if (response.status === 401) {
44561
- conf.openModal("MEDIA_UNAVAILABLE_MODAL_ID");
44565
+ conf2.openModal("MEDIA_UNAVAILABLE_MODAL_ID");
44562
44566
  } else if (response.status === 415) {
44563
- conf.notify({
44567
+ conf2.notify({
44564
44568
  variant: "warning",
44565
- header: conf.i18n.t("toolsPanel.addMedia.unsupportedFormat.header"),
44566
- body: conf.i18n.t("toolsPanel.addMedia.unsupportedFormat.body"),
44569
+ header: conf2.i18n.t("toolsPanel.addMedia.unsupportedFormat.header"),
44570
+ body: conf2.i18n.t("toolsPanel.addMedia.unsupportedFormat.body"),
44567
44571
  duration: 4000
44568
44572
  });
44569
44573
  } else {
44570
- conf.notify({
44574
+ conf2.notify({
44571
44575
  variant: "error",
44572
- header: conf.i18n.t("toolsPanel.addMedia.unhandled.header"),
44573
- body: conf.i18n.t("toolsPanel.addMedia.unhandled.body"),
44576
+ header: conf2.i18n.t("toolsPanel.addMedia.unhandled.header"),
44577
+ body: conf2.i18n.t("toolsPanel.addMedia.unhandled.body"),
44574
44578
  duration: 4000
44575
44579
  });
44576
44580
  }
@@ -44578,17 +44582,17 @@ var catchErrorResponse = async (response, mediaType) => {
44578
44582
  };
44579
44583
  var catchDuplicateErrorResponse = async (response) => {
44580
44584
  if (response.status === 403) {
44581
- conf.notify({
44585
+ conf2.notify({
44582
44586
  variant: "warning",
44583
- header: conf.i18n.t("toolsPanel.addMedia.limitReached.header"),
44584
- body: conf.i18n.t("toolsPanel.addMedia.limitReached.duplicateBody"),
44587
+ header: conf2.i18n.t("toolsPanel.addMedia.limitReached.header"),
44588
+ body: conf2.i18n.t("toolsPanel.addMedia.limitReached.duplicateBody"),
44585
44589
  duration: 4000
44586
44590
  });
44587
44591
  } else {
44588
- conf.notify({
44592
+ conf2.notify({
44589
44593
  variant: "error",
44590
- header: conf.i18n.t("toolsPanel.addMedia.unhandled.header"),
44591
- body: conf.i18n.t("toolsPanel.addMedia.unhandled.body"),
44594
+ header: conf2.i18n.t("toolsPanel.addMedia.unhandled.header"),
44595
+ body: conf2.i18n.t("toolsPanel.addMedia.unhandled.body"),
44592
44596
  duration: 4000
44593
44597
  });
44594
44598
  }
@@ -44596,40 +44600,40 @@ var catchDuplicateErrorResponse = async (response) => {
44596
44600
  };
44597
44601
  var validateMediaFile = (file, account2) => {
44598
44602
  const fileExtension = file.name.split(".").pop()?.toLowerCase() || "";
44599
- if (!file.type.startsWith("image") && !conf.AUDIO_FORMATS.includes(fileExtension) && !conf.VIDEO_FORMATS.includes(fileExtension)) {
44600
- conf.notify({
44603
+ if (!file.type.startsWith("image") && !conf2.AUDIO_FORMATS.includes(fileExtension) && !conf2.VIDEO_FORMATS.includes(fileExtension)) {
44604
+ conf2.notify({
44601
44605
  variant: "warning",
44602
- header: conf.i18n.t("toolsPanel.addMedia.unsupportedFormat.header"),
44603
- body: conf.i18n.t("toolsPanel.addMedia.unsupportedFormat.body"),
44606
+ header: conf2.i18n.t("toolsPanel.addMedia.unsupportedFormat.header"),
44607
+ body: conf2.i18n.t("toolsPanel.addMedia.unsupportedFormat.body"),
44604
44608
  duration: 4000
44605
44609
  });
44606
44610
  return false;
44607
44611
  }
44608
44612
  const isBasicPlan = account2.billingInfo?.plan.name === "basic";
44609
- let errorBody = conf.i18n.t(`toolsPanel.addMedia.tooLarge.imageBody.${isBasicPlan ? "basic" : "plus"}`);
44610
- if (conf.AUDIO_FORMATS.includes(fileExtension) || conf.VIDEO_FORMATS.includes(fileExtension)) {
44611
- errorBody = conf.i18n.t(`toolsPanel.addMedia.tooLarge.audioOrVideoBody.${isBasicPlan ? "basic" : "plus"}`);
44613
+ let errorBody = conf2.i18n.t(`toolsPanel.addMedia.tooLarge.imageBody.${isBasicPlan ? "basic" : "plus"}`);
44614
+ if (conf2.AUDIO_FORMATS.includes(fileExtension) || conf2.VIDEO_FORMATS.includes(fileExtension)) {
44615
+ errorBody = conf2.i18n.t(`toolsPanel.addMedia.tooLarge.audioOrVideoBody.${isBasicPlan ? "basic" : "plus"}`);
44612
44616
  if (file.size / 1024 ** 2 > (account2.billingInfo?.storage.maxMediaSize || Infinity)) {
44613
- conf.notify({
44617
+ conf2.notify({
44614
44618
  variant: "warning",
44615
- header: conf.i18n.t("toolsPanel.addMedia.tooLarge.header"),
44619
+ header: conf2.i18n.t("toolsPanel.addMedia.tooLarge.header"),
44616
44620
  body: errorBody,
44617
44621
  button: isBasicPlan ? {
44618
- text: conf.i18n.t("toolsPanel.addMedia.upgradeToPlus"),
44619
- onClick: () => conf.openModal("USER_PLAN_MODAL_ID")
44622
+ text: conf2.i18n.t("toolsPanel.addMedia.upgradeToPlus"),
44623
+ onClick: () => conf2.openModal("USER_PLAN_MODAL_ID")
44620
44624
  } : undefined,
44621
44625
  duration: 4000
44622
44626
  });
44623
44627
  return false;
44624
44628
  }
44625
44629
  } else if (file.size / 1024 ** 2 > (account2.billingInfo?.storage.maxImageSize || Infinity)) {
44626
- conf.notify({
44630
+ conf2.notify({
44627
44631
  variant: "warning",
44628
- header: conf.i18n.t("toolsPanel.addMedia.tooLarge.header"),
44632
+ header: conf2.i18n.t("toolsPanel.addMedia.tooLarge.header"),
44629
44633
  body: errorBody,
44630
44634
  button: isBasicPlan ? {
44631
- text: conf.i18n.t("toolsPanel.addMedia.upgradeToPlus"),
44632
- onClick: () => conf.openModal("USER_PLAN_MODAL_ID")
44635
+ text: conf2.i18n.t("toolsPanel.addMedia.upgradeToPlus"),
44636
+ onClick: () => conf2.openModal("USER_PLAN_MODAL_ID")
44633
44637
  } : undefined,
44634
44638
  duration: 4000
44635
44639
  });
@@ -44708,7 +44712,7 @@ var resizeAndConvertToPng = async (inp) => {
44708
44712
  };
44709
44713
  if (base64String.startsWith("data:image/svg+xml")) {
44710
44714
  image2.onload = async () => {
44711
- const parser = conf.getDOMParser();
44715
+ const parser = conf2.getDOMParser();
44712
44716
  const svgDoc = parser.parseFromString(atob(base64String.split(",")[1]), "image/svg+xml");
44713
44717
  const svgElement = svgDoc.documentElement;
44714
44718
  svgElement.removeAttribute("width");
@@ -44939,8 +44943,8 @@ class AudioItem extends Mbr {
44939
44943
  this.subject.publish(this);
44940
44944
  });
44941
44945
  this.transformation.subject.subscribe(this.onTransform);
44942
- this.right = this.left + conf.AUDIO_DIMENSIONS.width;
44943
- this.bottom = this.top + conf.AUDIO_DIMENSIONS.height;
44946
+ this.right = this.left + conf2.AUDIO_DIMENSIONS.width;
44947
+ this.bottom = this.top + conf2.AUDIO_DIMENSIONS.height;
44944
44948
  }
44945
44949
  setCurrentTime(time2) {
44946
44950
  this.currentTime = time2;
@@ -45007,8 +45011,8 @@ class AudioItem extends Mbr {
45007
45011
  const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
45008
45012
  this.left = translateX;
45009
45013
  this.top = translateY;
45010
- this.right = this.left + conf.AUDIO_DIMENSIONS.width * scaleX;
45011
- this.bottom = this.top + conf.AUDIO_DIMENSIONS.height * scaleY;
45014
+ this.right = this.left + conf2.AUDIO_DIMENSIONS.width * scaleX;
45015
+ this.bottom = this.top + conf2.AUDIO_DIMENSIONS.height * scaleY;
45012
45016
  }
45013
45017
  render(context) {
45014
45018
  if (this.transformationRenderBlock) {
@@ -45037,8 +45041,8 @@ class AudioItem extends Mbr {
45037
45041
  const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
45038
45042
  const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY})`;
45039
45043
  div.id = this.getId();
45040
- div.style.width = `${conf.AUDIO_DIMENSIONS.width}px`;
45041
- div.style.height = `${conf.AUDIO_DIMENSIONS.height}px`;
45044
+ div.style.width = `${conf2.AUDIO_DIMENSIONS.width}px`;
45045
+ div.style.height = `${conf2.AUDIO_DIMENSIONS.height}px`;
45042
45046
  div.style.transformOrigin = "top left";
45043
45047
  div.style.transform = transform;
45044
45048
  div.style.position = "absolute";
@@ -45157,7 +45161,7 @@ class AudioItem extends Mbr {
45157
45161
  }
45158
45162
  download() {
45159
45163
  if (this.extension) {
45160
- const linkElem = conf.documentFactory.createElement("a");
45164
+ const linkElem = conf2.documentFactory.createElement("a");
45161
45165
  linkElem.href = this.url;
45162
45166
  linkElem.setAttribute("download", `${this.board.getBoardId()}.${this.extension}`);
45163
45167
  linkElem.click();
@@ -45559,7 +45563,7 @@ class ImageCommand {
45559
45563
 
45560
45564
  // src/Items/Image/Image.ts
45561
45565
  function getPlaceholderImage(board, imageDimension) {
45562
- const placeholderCanvas = conf.documentFactory.createElement("canvas");
45566
+ const placeholderCanvas = conf2.documentFactory.createElement("canvas");
45563
45567
  const placeholderContext = placeholderCanvas.getContext("2d");
45564
45568
  const context = new DrawingContext(board.camera, placeholderContext);
45565
45569
  const placeholder = new Placeholder;
@@ -45910,7 +45914,7 @@ class Drawing extends Mbr {
45910
45914
  itemType = "Drawing";
45911
45915
  parent = "Board";
45912
45916
  transformation;
45913
- path2d = new conf.path2DFactory;
45917
+ path2d = new conf2.path2DFactory;
45914
45918
  subject = new Subject;
45915
45919
  untransformedMbr = new Mbr;
45916
45920
  lines = [];
@@ -45987,7 +45991,7 @@ class Drawing extends Mbr {
45987
45991
  this.bottom = mbr.bottom;
45988
45992
  }
45989
45993
  updatePath2d() {
45990
- this.path2d = new conf.path2DFactory;
45994
+ this.path2d = new conf2.path2DFactory;
45991
45995
  const context = this.path2d;
45992
45996
  const points = this.points;
45993
45997
  if (points.length < 3) {
@@ -47160,9 +47164,9 @@ class Camera {
47160
47164
  matrix = new Matrix2;
47161
47165
  pointer = new Point;
47162
47166
  window = {
47163
- width: conf.getDocumentWidth(),
47164
- height: conf.getDocumentHeight(),
47165
- dpi: conf.getDPI(),
47167
+ width: conf2.getDocumentWidth(),
47168
+ height: conf2.getDocumentHeight(),
47169
+ dpi: conf2.getDPI(),
47166
47170
  getMbr: () => {
47167
47171
  return new Mbr(0, 0, this.window.width, this.window.height);
47168
47172
  }
@@ -47538,9 +47542,9 @@ class Camera {
47538
47542
  this.updateBoardPointer();
47539
47543
  }
47540
47544
  onWindowResize() {
47541
- this.window.width = conf.getDocumentWidth();
47542
- this.window.height = conf.getDocumentHeight();
47543
- this.window.dpi = conf.getDPI();
47545
+ this.window.width = conf2.getDocumentWidth();
47546
+ this.window.height = conf2.getDocumentHeight();
47547
+ this.window.dpi = conf2.getDPI();
47544
47548
  this.resizeSubject.publish(this);
47545
47549
  this.subject.publish(this);
47546
47550
  }
@@ -47553,10 +47557,10 @@ class Camera {
47553
47557
  let y = 0;
47554
47558
  const { activeKeys } = keyboard;
47555
47559
  const directions = {
47556
- ArrowRight: [-conf.NAVIGATION_STEP, 0],
47557
- ArrowLeft: [conf.NAVIGATION_STEP, 0],
47558
- ArrowDown: [0, -conf.NAVIGATION_STEP],
47559
- ArrowUp: [0, conf.NAVIGATION_STEP]
47560
+ ArrowRight: [-conf2.NAVIGATION_STEP, 0],
47561
+ ArrowLeft: [conf2.NAVIGATION_STEP, 0],
47562
+ ArrowDown: [0, -conf2.NAVIGATION_STEP],
47563
+ ArrowUp: [0, conf2.NAVIGATION_STEP]
47560
47564
  };
47561
47565
  const activeArrowKeys = Array.from(activeKeys).filter((key) => (key in directions)).sort();
47562
47566
  if (activeArrowKeys.length === 2) {
@@ -48089,7 +48093,7 @@ var isMacos = () => navigator.platform.toUpperCase().includes("MAC");
48089
48093
 
48090
48094
  // src/Keyboard/logHotkey.ts
48091
48095
  function logHotkey(hotkeyConfig, hotkeyName, status, context) {
48092
- if (!import.meta.env.LOG_HOTKEYS) {
48096
+ if (!conf.LOG_HOTKEYS) {
48093
48097
  return;
48094
48098
  }
48095
48099
  const isFunction = typeof hotkeyConfig === "function";
@@ -48181,7 +48185,7 @@ function checkHotkeys(hotkeyMap, event, board) {
48181
48185
  // src/Keyboard/getHotkeyLabel.ts
48182
48186
  function getHotkeyLabel(hotkey) {
48183
48187
  const hotkeyLabel = hotkeys_default[hotkey].label;
48184
- switch (import.meta.env.FORCE_HOTKEYS || "auto") {
48188
+ switch (conf2.FORCE_HOTKEYS || "auto") {
48185
48189
  case "windows":
48186
48190
  return hotkeyLabel.windows;
48187
48191
  case "macos":
@@ -50158,7 +50162,7 @@ class SpatialIndex {
50158
50162
  this.itemsArray.push(item);
50159
50163
  this.itemsIndex.insert(item);
50160
50164
  }
50161
- if (conf.isNode()) {
50165
+ if (conf2.isNode()) {
50162
50166
  return;
50163
50167
  }
50164
50168
  if (this.Mbr.getWidth() === 0 && this.Mbr.getHeight() === 0) {
@@ -50725,8 +50729,8 @@ class Tool {
50725
50729
 
50726
50730
  // src/Tools/ExportSnapshot/getDecorationResizeType.ts
50727
50731
  function getDecorationResizeType(point7, mbr, tolerance = 10) {
50728
- for (const key in conf.EXPORT_FRAME_DECORATIONS) {
50729
- const decoration = conf.EXPORT_FRAME_DECORATIONS[key];
50732
+ for (const key in conf2.EXPORT_FRAME_DECORATIONS) {
50733
+ const decoration = conf2.EXPORT_FRAME_DECORATIONS[key];
50730
50734
  const decorationBounds = {
50731
50735
  left: mbr.left + (decoration.offsetX ?? 0),
50732
50736
  top: mbr.top + (decoration.offsetY ?? 0),
@@ -50767,7 +50771,7 @@ class ExportSnapshot extends Tool {
50767
50771
  super();
50768
50772
  this.board = board;
50769
50773
  const cameraCenter = this.board.camera.getMbr().getCenter();
50770
- this.mbr = new Mbr(cameraCenter.x - conf.EXPORT_SELECTION_BOX_WIDTH / 2, cameraCenter.y - conf.EXPORT_SELECTION_BOX_HEIGHT / 2, cameraCenter.x + conf.EXPORT_SELECTION_BOX_WIDTH / 2, cameraCenter.y + conf.EXPORT_SELECTION_BOX_HEIGHT / 2, "transparent", "transparent", 1);
50774
+ this.mbr = new Mbr(cameraCenter.x - conf2.EXPORT_SELECTION_BOX_WIDTH / 2, cameraCenter.y - conf2.EXPORT_SELECTION_BOX_HEIGHT / 2, cameraCenter.x + conf2.EXPORT_SELECTION_BOX_WIDTH / 2, cameraCenter.y + conf2.EXPORT_SELECTION_BOX_HEIGHT / 2, "transparent", "transparent", 1);
50771
50775
  this.board.selection.disable();
50772
50776
  this.tempDrawingContext = new DrawingContext(board.camera, this.tempCtx);
50773
50777
  }
@@ -50779,11 +50783,11 @@ class ExportSnapshot extends Tool {
50779
50783
  resize() {
50780
50784
  if (this.resizeType && this.mbr && this.oppositePoint) {
50781
50785
  const resize = getResize(this.resizeType, this.board.pointer.point, this.mbr, this.oppositePoint);
50782
- if (resize.mbr.getWidth() > conf.EXPORT_MIN_WIDTH) {
50786
+ if (resize.mbr.getWidth() > conf2.EXPORT_MIN_WIDTH) {
50783
50787
  this.mbr.left = resize.mbr.left;
50784
50788
  this.mbr.right = resize.mbr.right;
50785
50789
  }
50786
- if (resize.mbr.getHeight() > conf.EXPORT_MIN_HEIGHT) {
50790
+ if (resize.mbr.getHeight() > conf2.EXPORT_MIN_HEIGHT) {
50787
50791
  this.mbr.top = resize.mbr.top;
50788
50792
  this.mbr.bottom = resize.mbr.bottom;
50789
50793
  }
@@ -50872,7 +50876,7 @@ class ExportSnapshot extends Tool {
50872
50876
  }
50873
50877
  const res = await exportBoardSnapshot({
50874
50878
  board: this.board,
50875
- bgColor: conf.CANVAS_BG_COLOR,
50879
+ bgColor: conf2.CANVAS_BG_COLOR,
50876
50880
  selection: this.mbr,
50877
50881
  upscaleTo: 4000,
50878
50882
  nameToExport: this.board.getName()
@@ -50896,18 +50900,18 @@ class ExportSnapshot extends Tool {
50896
50900
  const cameraMbr = context.camera.getMbr();
50897
50901
  this.tempDrawingContext.setCamera(this.board.camera);
50898
50902
  this.tempDrawingContext.clear();
50899
- cameraMbr.backgroundColor = conf.EXPORT_BLUR_BACKGROUND_COLOR;
50903
+ cameraMbr.backgroundColor = conf2.EXPORT_BLUR_BACKGROUND_COLOR;
50900
50904
  cameraMbr.strokeWidth = 0;
50901
50905
  cameraMbr.render(this.tempDrawingContext);
50902
50906
  this.tempCtx.clearRect(this.mbr.left, this.mbr.top, this.mbr.getWidth(), this.mbr.getHeight());
50903
- if (conf.EXPORT_FRAME_DECORATIONS) {
50904
- const topLeft = conf.EXPORT_FRAME_DECORATIONS["top-left"];
50907
+ if (conf2.EXPORT_FRAME_DECORATIONS) {
50908
+ const topLeft = conf2.EXPORT_FRAME_DECORATIONS["top-left"];
50905
50909
  this.renderDecoration(this.tempDrawingContext, topLeft.path, this.mbr.left + (topLeft.offsetX ?? 0), this.mbr.top + (topLeft.offsetY ?? 0), topLeft.color, topLeft.lineWidth);
50906
- const topRight = conf.EXPORT_FRAME_DECORATIONS["top-right"];
50910
+ const topRight = conf2.EXPORT_FRAME_DECORATIONS["top-right"];
50907
50911
  this.renderDecoration(this.tempDrawingContext, topRight.path, this.mbr.right + (topRight.offsetX ?? 0), this.mbr.top + (topRight.offsetY ?? 0), topRight.color, topRight.lineWidth);
50908
- const bottomLeft = conf.EXPORT_FRAME_DECORATIONS["bottom-left"];
50912
+ const bottomLeft = conf2.EXPORT_FRAME_DECORATIONS["bottom-left"];
50909
50913
  this.renderDecoration(this.tempDrawingContext, bottomLeft.path, this.mbr.left + (bottomLeft.offsetX ?? 0), this.mbr.bottom + (bottomLeft.offsetY ?? 0), bottomLeft.color, bottomLeft.lineWidth);
50910
- const bottomRight = conf.EXPORT_FRAME_DECORATIONS["bottom-right"];
50914
+ const bottomRight = conf2.EXPORT_FRAME_DECORATIONS["bottom-right"];
50911
50915
  this.renderDecoration(this.tempDrawingContext, bottomRight.path, this.mbr.left + this.mbr.getWidth() - bottomRight.width, this.mbr.top + this.mbr.getHeight() - bottomRight.width, bottomRight.color, bottomRight.lineWidth);
50912
50916
  }
50913
50917
  }
@@ -51416,14 +51420,14 @@ class AddConnector extends BoardTool {
51416
51420
  class AddDrawing extends BoardTool {
51417
51421
  drawing = null;
51418
51422
  isDown = false;
51419
- strokeWidth = conf.PEN_INITIAL_STROKE_WIDTH;
51420
- strokeColor = conf.PEN_DEFAULT_COLOR;
51421
- strokeStyle = conf.PEN_STROKE_STYLE;
51423
+ strokeWidth = conf2.PEN_INITIAL_STROKE_WIDTH;
51424
+ strokeColor = conf2.PEN_DEFAULT_COLOR;
51425
+ strokeStyle = conf2.PEN_STROKE_STYLE;
51422
51426
  constructor(board) {
51423
51427
  super(board);
51424
51428
  this.setCursor();
51425
- if (conf.PEN_SETTINGS_KEY) {
51426
- const drawingSettings = localStorage.getItem(conf.PEN_SETTINGS_KEY);
51429
+ if (conf2.PEN_SETTINGS_KEY) {
51430
+ const drawingSettings = localStorage.getItem(conf2.PEN_SETTINGS_KEY);
51427
51431
  if (drawingSettings) {
51428
51432
  const { strokeWidth, strokeColor, strokeStyle } = JSON.parse(drawingSettings);
51429
51433
  this.strokeWidth = strokeWidth;
@@ -51433,7 +51437,7 @@ class AddDrawing extends BoardTool {
51433
51437
  }
51434
51438
  }
51435
51439
  updateSettings() {
51436
- localStorage.setItem(conf.PEN_SETTINGS_KEY, JSON.stringify({
51440
+ localStorage.setItem(conf2.PEN_SETTINGS_KEY, JSON.stringify({
51437
51441
  strokeWidth: this.strokeWidth,
51438
51442
  strokeColor: this.strokeColor,
51439
51443
  strokeStyle: this.strokeStyle
@@ -51463,7 +51467,7 @@ class AddDrawing extends BoardTool {
51463
51467
  ctx.beginPath();
51464
51468
  ctx.arc(point7.x, point7.y, this.strokeWidth / 2, 0, 2 * Math.PI, false);
51465
51469
  ctx.lineWidth = 1;
51466
- ctx.strokeStyle = conf.PEN_POINTER_CIRCLE_COLOR;
51470
+ ctx.strokeStyle = conf2.PEN_POINTER_CIRCLE_COLOR;
51467
51471
  ctx.stroke();
51468
51472
  }
51469
51473
  setCursor() {
@@ -51545,7 +51549,7 @@ class AddDrawing extends BoardTool {
51545
51549
  this.setCursor();
51546
51550
  };
51547
51551
  render(context) {
51548
- if (conf.PEN_RENDER_POINTER_CIRCLE) {
51552
+ if (conf2.PEN_RENDER_POINTER_CIRCLE) {
51549
51553
  this.renderPointerCircle(this.board.pointer.point, context);
51550
51554
  }
51551
51555
  if (!this.drawing) {
@@ -51560,14 +51564,14 @@ class AddDrawing extends BoardTool {
51560
51564
  }
51561
51565
  // src/Tools/AddDrawing/AddHighlighter.ts
51562
51566
  class AddHighlighter extends AddDrawing {
51563
- strokeWidth = conf.HIGHLIGHTER_INITIAL_STROKE_WIDTH;
51564
- strokeColor = conf.HIGHLIGHTER_DEFAULT_COLOR;
51565
- strokeStyle = conf.PEN_STROKE_STYLE;
51567
+ strokeWidth = conf2.HIGHLIGHTER_INITIAL_STROKE_WIDTH;
51568
+ strokeColor = conf2.HIGHLIGHTER_DEFAULT_COLOR;
51569
+ strokeStyle = conf2.PEN_STROKE_STYLE;
51566
51570
  constructor(board) {
51567
51571
  super(board);
51568
51572
  this.setCursor();
51569
- if (conf.HIGHLIGHTER_SETTINGS_KEY) {
51570
- const highlighterSettings = localStorage.getItem(conf.HIGHLIGHTER_SETTINGS_KEY);
51573
+ if (conf2.HIGHLIGHTER_SETTINGS_KEY) {
51574
+ const highlighterSettings = localStorage.getItem(conf2.HIGHLIGHTER_SETTINGS_KEY);
51571
51575
  if (highlighterSettings) {
51572
51576
  const { strokeWidth, strokeColor, strokeStyle } = JSON.parse(highlighterSettings);
51573
51577
  this.strokeWidth = strokeWidth;
@@ -51580,7 +51584,7 @@ class AddHighlighter extends AddDrawing {
51580
51584
  return true;
51581
51585
  }
51582
51586
  updateSettings() {
51583
- localStorage.setItem(conf.HIGHLIGHTER_SETTINGS_KEY, JSON.stringify({
51587
+ localStorage.setItem(conf2.HIGHLIGHTER_SETTINGS_KEY, JSON.stringify({
51584
51588
  strokeWidth: this.strokeWidth,
51585
51589
  strokeColor: this.strokeColor,
51586
51590
  strokeStyle: this.strokeStyle
@@ -51904,7 +51908,7 @@ class AddShape extends BoardTool {
51904
51908
  const point7 = this.board.pointer.point;
51905
51909
  this.line = new Line(point7.copy(), point7.copy());
51906
51910
  this.bounds = this.line.getMbr();
51907
- this.bounds.borderColor = conf.SELECTION_COLOR;
51911
+ this.bounds.borderColor = conf2.SELECTION_COLOR;
51908
51912
  this.shape.apply({
51909
51913
  class: "Shape",
51910
51914
  method: "setShapeType",
@@ -51928,7 +51932,7 @@ class AddShape extends BoardTool {
51928
51932
  }
51929
51933
  this.line = new Line(startPoint, endPoint);
51930
51934
  this.bounds = this.line.getMbr();
51931
- this.bounds.borderColor = conf.SELECTION_COLOR;
51935
+ this.bounds.borderColor = conf2.SELECTION_COLOR;
51932
51936
  this.initTransformation();
51933
51937
  this.board.tools.publish();
51934
51938
  return true;
@@ -52000,7 +52004,7 @@ class AddShape extends BoardTool {
52000
52004
  const y = (top + bottom) / 2 - 50;
52001
52005
  this.bounds = new Mbr(x, y, x, y);
52002
52006
  this.line = new Line(new Point(x, y), new Point(x, y));
52003
- this.bounds.borderColor = conf.SELECTION_COLOR;
52007
+ this.bounds.borderColor = conf2.SELECTION_COLOR;
52004
52008
  this.shape.apply({
52005
52009
  class: "Shape",
52006
52010
  method: "setShapeType",
@@ -52033,8 +52037,8 @@ class AddSticker extends BoardTool {
52033
52037
  this.setCursor(this.sticker.getBackgroundColor());
52034
52038
  }
52035
52039
  setCursor(color2) {
52036
- if (conf.STICKER_COLOR_NAMES) {
52037
- const colorName = color2 ? conf.STICKER_COLOR_NAMES[conf.STICKER_COLORS.indexOf(color2)] : undefined;
52040
+ if (conf2.STICKER_COLOR_NAMES) {
52041
+ const colorName = color2 ? conf2.STICKER_COLOR_NAMES[conf2.STICKER_COLORS.indexOf(color2)] : undefined;
52038
52042
  this.board.pointer.setCursor(colorName ? `sticker-${colorName}` : "crosshair");
52039
52043
  } else {
52040
52044
  this.board.pointer.setCursor("crosshair");
@@ -52058,7 +52062,7 @@ class AddSticker extends BoardTool {
52058
52062
  const point7 = this.board.pointer.point;
52059
52063
  this.line = new Line(point7.copy(), point7.copy());
52060
52064
  this.bounds = this.line.getMbr();
52061
- this.bounds.borderColor = conf.SELECTION_COLOR;
52065
+ this.bounds.borderColor = conf2.SELECTION_COLOR;
52062
52066
  this.board.tools.publish();
52063
52067
  return true;
52064
52068
  }
@@ -52067,7 +52071,7 @@ class AddSticker extends BoardTool {
52067
52071
  this.line = new Line(this.line.start.copy(), this.board.pointer.point.copy());
52068
52072
  this.sticker.applyDiagonal(this.line);
52069
52073
  this.bounds = this.sticker.getMbr();
52070
- this.bounds.borderColor = conf.SELECTION_COLOR;
52074
+ this.bounds.borderColor = conf2.SELECTION_COLOR;
52071
52075
  this.board.tools.publish();
52072
52076
  return true;
52073
52077
  }
@@ -52167,7 +52171,7 @@ class AddText extends BoardTool {
52167
52171
  const point7 = this.board.pointer.point;
52168
52172
  this.line = new Line(point7.copy(), point7.copy());
52169
52173
  this.bounds = this.line.getMbr();
52170
- this.bounds.borderColor = conf.SELECTION_COLOR;
52174
+ this.bounds.borderColor = conf2.SELECTION_COLOR;
52171
52175
  this.board.tools.publish();
52172
52176
  return true;
52173
52177
  }
@@ -52178,7 +52182,7 @@ class AddText extends BoardTool {
52178
52182
  const end2 = new Point(cursorPoint.x, start2.y + height2);
52179
52183
  this.line = new Line(start2, end2);
52180
52184
  this.bounds = this.line.getMbr();
52181
- this.bounds.borderColor = conf.SELECTION_COLOR;
52185
+ this.bounds.borderColor = conf2.SELECTION_COLOR;
52182
52186
  this.board.tools.publish();
52183
52187
  return true;
52184
52188
  }
@@ -52243,11 +52247,11 @@ class AddText extends BoardTool {
52243
52247
  class Eraser extends BoardTool {
52244
52248
  itemType = "Eraser";
52245
52249
  isDown = false;
52246
- strokeWidth = conf.ERASER_STROKE_WIDTH;
52247
- strokeColor = conf.ERASER_DEFAULT_COLOR;
52248
- strokeStyle = conf.PEN_STROKE_STYLE;
52250
+ strokeWidth = conf2.ERASER_STROKE_WIDTH;
52251
+ strokeColor = conf2.ERASER_DEFAULT_COLOR;
52252
+ strokeStyle = conf2.PEN_STROKE_STYLE;
52249
52253
  drawing = new Drawing(this.board, []);
52250
- maxPointsInLine = conf.ERASER_MAX_LINE_LENGTH;
52254
+ maxPointsInLine = conf2.ERASER_MAX_LINE_LENGTH;
52251
52255
  constructor(board) {
52252
52256
  super(board);
52253
52257
  this.setCursor();
@@ -52409,7 +52413,7 @@ function createCanvasDrawer(board) {
52409
52413
  borderDiv.id = "canvasBorder";
52410
52414
  borderDiv.style.position = "absolute";
52411
52415
  borderDiv.style.transformOrigin = "left top";
52412
- borderDiv.style.border = `1px solid ${conf.SELECTION_COLOR}`;
52416
+ borderDiv.style.border = `1px solid ${conf2.SELECTION_COLOR}`;
52413
52417
  borderDiv.style.boxSizing = "border-box";
52414
52418
  borderDiv.style.left = `${leftOffset}px`;
52415
52419
  borderDiv.style.top = `${topOffset}px`;
@@ -52419,7 +52423,7 @@ function createCanvasDrawer(board) {
52419
52423
  canvas.style.boxSizing = "border-box";
52420
52424
  container.appendChild(borderDiv);
52421
52425
  } else {
52422
- canvas.style.border = `1px solid ${conf.SELECTION_COLOR}`;
52426
+ canvas.style.border = `1px solid ${conf2.SELECTION_COLOR}`;
52423
52427
  canvas.style.boxSizing = "border-box";
52424
52428
  }
52425
52429
  const createAnchorDiv = (left, top, radius) => {
@@ -52427,8 +52431,8 @@ function createCanvasDrawer(board) {
52427
52431
  anchorDiv.style.position = "absolute";
52428
52432
  anchorDiv.style.width = `${2 * radius}px`;
52429
52433
  anchorDiv.style.height = `${2 * radius}px`;
52430
- anchorDiv.style.backgroundColor = `${conf.SELECTION_ANCHOR_COLOR}`;
52431
- anchorDiv.style.border = `${conf.SELECTION_ANCHOR_WIDTH}px solid ${conf.SELECTION_COLOR}`;
52434
+ anchorDiv.style.backgroundColor = `${conf2.SELECTION_ANCHOR_COLOR}`;
52435
+ anchorDiv.style.border = `${conf2.SELECTION_ANCHOR_WIDTH}px solid ${conf2.SELECTION_COLOR}`;
52432
52436
  anchorDiv.style.borderRadius = "2px";
52433
52437
  anchorDiv.style.left = `calc(${left} - ${radius}px)`;
52434
52438
  anchorDiv.style.top = `calc(${top} - ${radius}px)`;
@@ -52436,10 +52440,10 @@ function createCanvasDrawer(board) {
52436
52440
  return anchorDiv;
52437
52441
  };
52438
52442
  const anchors = [
52439
- createAnchorDiv("0%", "0%", conf.SELECTION_ANCHOR_RADIUS),
52440
- createAnchorDiv("100% + 1px", "0%", conf.SELECTION_ANCHOR_RADIUS),
52441
- createAnchorDiv("0%", "100% + 1px", conf.SELECTION_ANCHOR_RADIUS),
52442
- createAnchorDiv("100% + 1px", "100% + 1px", conf.SELECTION_ANCHOR_RADIUS)
52443
+ createAnchorDiv("0%", "0%", conf2.SELECTION_ANCHOR_RADIUS),
52444
+ createAnchorDiv("100% + 1px", "0%", conf2.SELECTION_ANCHOR_RADIUS),
52445
+ createAnchorDiv("0%", "100% + 1px", conf2.SELECTION_ANCHOR_RADIUS),
52446
+ createAnchorDiv("100% + 1px", "100% + 1px", conf2.SELECTION_ANCHOR_RADIUS)
52443
52447
  ];
52444
52448
  const canvasBorder = Array.from(container.children).find((child) => child.id === "canvasBorder");
52445
52449
  for (const anchor of anchors) {
@@ -53781,8 +53785,8 @@ class Select extends Tool {
53781
53785
  const { x, y } = pointer.point;
53782
53786
  this.line = new Line(new Point(x, y), new Point(x, y));
53783
53787
  this.rect = this.line.getMbr();
53784
- this.rect.borderColor = conf.SELECTION_COLOR;
53785
- this.rect.backgroundColor = conf.SELECTION_BACKGROUND;
53788
+ this.rect.borderColor = conf2.SELECTION_COLOR;
53789
+ this.rect.backgroundColor = conf2.SELECTION_BACKGROUND;
53786
53790
  this.board.tools.publish();
53787
53791
  this.board.presence.throttledEmit({
53788
53792
  method: "DrawSelect",
@@ -53867,8 +53871,8 @@ class Select extends Tool {
53867
53871
  const point7 = this.board.pointer.point.copy();
53868
53872
  this.line = new Line(this.line.start, point7);
53869
53873
  this.rect = this.line.getMbr();
53870
- this.rect.borderColor = conf.SELECTION_COLOR;
53871
- this.rect.backgroundColor = conf.SELECTION_BACKGROUND;
53874
+ this.rect.borderColor = conf2.SELECTION_COLOR;
53875
+ this.rect.backgroundColor = conf2.SELECTION_BACKGROUND;
53872
53876
  this.board.tools.publish();
53873
53877
  this.board.presence.throttledEmit({
53874
53878
  method: "DrawSelect",
@@ -55002,7 +55006,7 @@ class Board {
55002
55006
  const loadLinksImagesScript = LOAD_LINKS_IMAGES_JS;
55003
55007
  const css = INDEX_CSS;
55004
55008
  const boardName = this.getName() || this.getBoardId();
55005
- const items = this.items.getWholeHTML(conf.documentFactory);
55009
+ const items = this.items.getWholeHTML(conf2.documentFactory);
55006
55010
  const itemsDiv = `<div id="items">${items}</div>`;
55007
55011
  const scripts = `
55008
55012
  <script type="module">${customTagsScript}</script>
@@ -55042,7 +55046,7 @@ class Board {
55042
55046
  return `${head}${body}`;
55043
55047
  }
55044
55048
  deserializeHTMLAndEmit(stringedHTML) {
55045
- const parser = conf.getDOMParser();
55049
+ const parser = conf2.getDOMParser();
55046
55050
  const doc = parser.parseFromString(stringedHTML, "text/html");
55047
55051
  const items = doc.body.querySelector("#items");
55048
55052
  if (items) {
@@ -55094,7 +55098,7 @@ class Board {
55094
55098
  return [];
55095
55099
  }
55096
55100
  deserializeHTML(stringedHTML) {
55097
- const parser = conf.getDOMParser();
55101
+ const parser = conf2.getDOMParser();
55098
55102
  const doc = parser.parseFromString(stringedHTML, "text/html");
55099
55103
  const itemsDiv = doc.body.querySelector("#items");
55100
55104
  if (!itemsDiv) {
@@ -55655,7 +55659,7 @@ class RichTextCommand {
55655
55659
  item: id,
55656
55660
  operation: {
55657
55661
  ...this.operation,
55658
- fontColor: this.board.items.getById(id)?.getRichText()?.getFontColor() || conf.DEFAULT_TEXT_STYLES.fontColor
55662
+ fontColor: this.board.items.getById(id)?.getRichText()?.getFontColor() || conf2.DEFAULT_TEXT_STYLES.fontColor
55659
55663
  }
55660
55664
  }));
55661
55665
  case "setBlockType":
@@ -55679,7 +55683,7 @@ class RichTextCommand {
55679
55683
  item: id,
55680
55684
  operation: {
55681
55685
  ...this.operation,
55682
- fontFamily: this.board.items.getById(id)?.getRichText()?.getFontFamily() || conf.DEFAULT_TEXT_STYLES.fontFamily
55686
+ fontFamily: this.board.items.getById(id)?.getRichText()?.getFontFamily() || conf2.DEFAULT_TEXT_STYLES.fontFamily
55683
55687
  }
55684
55688
  }));
55685
55689
  case "setFontSize":
@@ -55687,7 +55691,7 @@ class RichTextCommand {
55687
55691
  item: id,
55688
55692
  operation: {
55689
55693
  ...this.operation,
55690
- fontSize: this.board.items.getById(id)?.getRichText()?.getFontSize() || conf.DEFAULT_TEXT_STYLES.fontSize
55694
+ fontSize: this.board.items.getById(id)?.getRichText()?.getFontSize() || conf2.DEFAULT_TEXT_STYLES.fontSize
55691
55695
  }
55692
55696
  }));
55693
55697
  case "setFontHighlight":
@@ -55695,7 +55699,7 @@ class RichTextCommand {
55695
55699
  item: id,
55696
55700
  operation: {
55697
55701
  ...this.operation,
55698
- fontHighlight: this.board.items.getById(id)?.getRichText()?.getFontHighlight() || conf.DEFAULT_TEXT_STYLES.fontHighlight
55702
+ fontHighlight: this.board.items.getById(id)?.getRichText()?.getFontHighlight() || conf2.DEFAULT_TEXT_STYLES.fontHighlight
55699
55703
  }
55700
55704
  }));
55701
55705
  case "setHorisontalAlignment":
@@ -57036,7 +57040,7 @@ class Transformer extends Tool {
57036
57040
  const isLockedItems = this.selection.getIsLockedSelection();
57037
57041
  if (mbr) {
57038
57042
  mbr.strokeWidth = 1 / context.matrix.scaleX;
57039
- const selectionColor = isLockedItems ? conf.SELECTION_LOCKED_COLOR : conf.SELECTION_COLOR;
57043
+ const selectionColor = isLockedItems ? conf2.SELECTION_LOCKED_COLOR : conf2.SELECTION_COLOR;
57040
57044
  mbr.borderColor = selectionColor;
57041
57045
  mbr.render(context);
57042
57046
  }
@@ -57062,7 +57066,7 @@ class Transformer extends Tool {
57062
57066
  new Point(right, bottom)
57063
57067
  ];
57064
57068
  for (const point7 of points) {
57065
- const circle = new Anchor(point7.x, point7.y, conf.SELECTION_ANCHOR_RADIUS, conf.SELECTION_COLOR, conf.SELECTION_ANCHOR_COLOR, conf.SELECTION_ANCHOR_WIDTH);
57069
+ const circle = new Anchor(point7.x, point7.y, conf2.SELECTION_ANCHOR_RADIUS, conf2.SELECTION_COLOR, conf2.SELECTION_ANCHOR_COLOR, conf2.SELECTION_ANCHOR_WIDTH);
57066
57070
  anchors.push(circle);
57067
57071
  }
57068
57072
  }
@@ -58265,7 +58269,7 @@ class Selection2 {
58265
58269
  renderItemMbr(context, item, customScale) {
58266
58270
  const mbr = item.getMbr();
58267
58271
  mbr.strokeWidth = !customScale ? 1 / context.matrix.scaleX : 1 / customScale;
58268
- const selectionColor = item.transformation.isLocked ? conf.SELECTION_LOCKED_COLOR : conf.SELECTION_COLOR;
58272
+ const selectionColor = item.transformation.isLocked ? conf2.SELECTION_LOCKED_COLOR : conf2.SELECTION_COLOR;
58269
58273
  mbr.borderColor = selectionColor;
58270
58274
  mbr.render(context);
58271
58275
  }
@@ -59120,19 +59124,19 @@ function removeNode_removeNode(confirmed, toTransform) {
59120
59124
  // src/Events/Transform/splitNode_insertNode.ts
59121
59125
  function splitNode_insertNode(confirmed, toTransform) {
59122
59126
  const transformed = { ...toTransform };
59123
- const conf2 = confirmed.path;
59127
+ const conf3 = confirmed.path;
59124
59128
  const path3 = transformed.path;
59125
- if (Path3.equals(conf2, path3)) {
59129
+ if (Path3.equals(conf3, path3)) {
59126
59130
  return transformed;
59127
59131
  }
59128
- const isDescendant = path3.length > conf2.length && path3.slice(0, conf2.length).every((seg, i) => seg === conf2[i]);
59132
+ const isDescendant = path3.length > conf3.length && path3.slice(0, conf3.length).every((seg, i) => seg === conf3[i]);
59129
59133
  if (isDescendant) {
59130
59134
  const newPath = [...path3];
59131
59135
  newPath[0] = newPath[0] + 1;
59132
59136
  transformed.path = newPath;
59133
59137
  return transformed;
59134
59138
  }
59135
- if (Path3.isBefore(conf2, path3)) {
59139
+ if (Path3.isBefore(conf3, path3)) {
59136
59140
  transformPath(confirmed, transformed);
59137
59141
  }
59138
59142
  return transformed;
@@ -59141,23 +59145,23 @@ function splitNode_insertNode(confirmed, toTransform) {
59141
59145
  // src/Events/Transform/splitNode_removeNode.ts
59142
59146
  function splitNode_removeNode(confirmed, toTransform) {
59143
59147
  const transformed = { ...toTransform };
59144
- const conf2 = confirmed.path;
59148
+ const conf3 = confirmed.path;
59145
59149
  const path3 = transformed.path;
59146
- if (Path3.equals(conf2, path3)) {
59150
+ if (Path3.equals(conf3, path3)) {
59147
59151
  return transformed;
59148
59152
  }
59149
- if (path3.length === conf2.length + 1 && path3.slice(0, conf2.length).every((seg, i) => seg === conf2[i])) {
59153
+ if (path3.length === conf3.length + 1 && path3.slice(0, conf3.length).every((seg, i) => seg === conf3[i])) {
59150
59154
  const newPath = [...path3];
59151
- if (conf2.length === 1) {
59155
+ if (conf3.length === 1) {
59152
59156
  newPath[0] = newPath[0] + 1;
59153
59157
  } else {
59154
- newPath[conf2.length] = newPath[conf2.length] + 1;
59158
+ newPath[conf3.length] = newPath[conf3.length] + 1;
59155
59159
  }
59156
59160
  transformed.path = newPath;
59157
59161
  return transformed;
59158
59162
  }
59159
- const isDescendant = path3.length > conf2.length && path3.slice(0, conf2.length).every((seg, i) => seg === conf2[i]);
59160
- if (Path3.isBefore(conf2, path3) && !isDescendant) {
59163
+ const isDescendant = path3.length > conf3.length && path3.slice(0, conf3.length).every((seg, i) => seg === conf3[i]);
59164
+ if (Path3.isBefore(conf3, path3) && !isDescendant) {
59161
59165
  transformPath(confirmed, transformed);
59162
59166
  }
59163
59167
  return transformed;
@@ -59737,8 +59741,8 @@ function transformEvents(confirmed, toTransform) {
59737
59741
  const transformed = [];
59738
59742
  for (const transf of toTransform) {
59739
59743
  let actualyTransformed = { ...transf };
59740
- for (const conf2 of confirmed) {
59741
- const { operation: confOp } = conf2.body;
59744
+ for (const conf3 of confirmed) {
59745
+ const { operation: confOp } = conf3.body;
59742
59746
  const { operation: transfOp } = actualyTransformed.body;
59743
59747
  const transformedOp = transfromOperation(confOp, transfOp);
59744
59748
  if (transformedOp) {
@@ -60370,7 +60374,7 @@ class Events2 {
60370
60374
  return record !== null;
60371
60375
  }
60372
60376
  sendPresenceEvent(event) {
60373
- conf.connection.publishPresenceEvent(this.board.getBoardId(), event);
60377
+ conf2.connection.publishPresenceEvent(this.board.getBoardId(), event);
60374
60378
  }
60375
60379
  canUndoEvent(op, byUserId) {
60376
60380
  if (op.method === "undo") {
@@ -60479,7 +60483,7 @@ function handleChatChunk(chunk, board) {
60479
60483
  if (chunk.isExternalApiError) {
60480
60484
  const editor = item2.getRichText().editor;
60481
60485
  editor.clearText();
60482
- editor.insertCopiedText(conf.i18n.t("AIInput.nodeErrorText"));
60486
+ editor.insertCopiedText(conf2.i18n.t("AIInput.nodeErrorText"));
60483
60487
  }
60484
60488
  }
60485
60489
  board.camera.zoomToFit(item2.getMbr(), 20);
@@ -60487,9 +60491,9 @@ function handleChatChunk(chunk, board) {
60487
60491
  }
60488
60492
  console.log("Error AI generate", chunk.error);
60489
60493
  if (!chunk.isExternalApiError) {
60490
- conf.notify({
60491
- header: conf.i18n.t("AIInput.textGenerationError.header"),
60492
- body: conf.i18n.t("AIInput.textGenerationError.body"),
60494
+ conf2.notify({
60495
+ header: conf2.i18n.t("AIInput.textGenerationError.header"),
60496
+ body: conf2.i18n.t("AIInput.textGenerationError.body"),
60493
60497
  variant: "error",
60494
60498
  duration: 4000
60495
60499
  });
@@ -60499,9 +60503,9 @@ function handleChatChunk(chunk, board) {
60499
60503
  default:
60500
60504
  board.camera.unsubscribeFromItem();
60501
60505
  if (!chunk.isExternalApiError) {
60502
- conf.notify({
60503
- header: conf.i18n.t("AIInput.textGenerationError.header"),
60504
- body: conf.i18n.t("AIInput.textGenerationError.body"),
60506
+ conf2.notify({
60507
+ header: conf2.i18n.t("AIInput.textGenerationError.header"),
60508
+ body: conf2.i18n.t("AIInput.textGenerationError.body"),
60505
60509
  variant: "error",
60506
60510
  duration: 4000
60507
60511
  });
@@ -60516,7 +60520,7 @@ function handleChatChunk(chunk, board) {
60516
60520
  if (chunk.isExternalApiError) {
60517
60521
  const editor = item2.getRichText().editor;
60518
60522
  editor.clearText();
60519
- editor.insertCopiedText(conf.i18n.t("AIInput.nodeErrorText"));
60523
+ editor.insertCopiedText(conf2.i18n.t("AIInput.nodeErrorText"));
60520
60524
  }
60521
60525
  }
60522
60526
  board.camera.zoomToFit(item2.getMbr(), 20);
@@ -60543,7 +60547,7 @@ function handleAudioGenerate(response, board) {
60543
60547
  }
60544
60548
  const audio = new AudioItem(board, true, audioUrl2, board.events, "", "wav");
60545
60549
  const { left, top, right } = placeholderNode.getMbr();
60546
- audio.transformation.applyTranslateTo(left + (right - left - conf.AUDIO_DIMENSIONS.width) / 2, top);
60550
+ audio.transformation.applyTranslateTo(left + (right - left - conf2.AUDIO_DIMENSIONS.width) / 2, top);
60547
60551
  audio.updateMbr();
60548
60552
  const threadDirection = placeholderNode.getThreadDirection();
60549
60553
  board.remove(placeholderNode, false);
@@ -60565,7 +60569,7 @@ function handleAudioGenerate(response, board) {
60565
60569
  type: "audio/wav"
60566
60570
  });
60567
60571
  const audioUrl2 = URL.createObjectURL(audioBlob);
60568
- const linkElem = conf.documentFactory.createElement("a");
60572
+ const linkElem = conf2.documentFactory.createElement("a");
60569
60573
  linkElem.href = audioUrl2;
60570
60574
  linkElem.setAttribute("download", `${board.getBoardId()}-generated.wav`);
60571
60575
  linkElem.click();
@@ -60584,9 +60588,9 @@ function handleAudioGenerate(response, board) {
60584
60588
  board.selection.add(placeholderNode);
60585
60589
  }
60586
60590
  console.error("Audio generation error:", response.message);
60587
- conf.notify({
60588
- header: conf.i18n.t("AIInput.audioGenerationError.header"),
60589
- body: conf.i18n.t("AIInput.audioGenerationError.body"),
60591
+ conf2.notify({
60592
+ header: conf2.i18n.t("AIInput.audioGenerationError.header"),
60593
+ body: conf2.i18n.t("AIInput.audioGenerationError.body"),
60590
60594
  variant: "error",
60591
60595
  duration: 4000
60592
60596
  });
@@ -60649,14 +60653,14 @@ function handleImageGenerate(response, board) {
60649
60653
  board.selection.add(item);
60650
60654
  const editor = item.getRichText()?.editor;
60651
60655
  editor?.clearText();
60652
- editor?.insertCopiedText(conf.i18n.t("AIInput.nodeErrorText"));
60656
+ editor?.insertCopiedText(conf2.i18n.t("AIInput.nodeErrorText"));
60653
60657
  board.camera.zoomToFit(item.getMbr(), 20);
60654
60658
  }
60655
60659
  }
60656
60660
  } else {
60657
- conf.notify({
60658
- header: conf.i18n.t("AIInput.imageGenerationError.header"),
60659
- body: conf.i18n.t("AIInput.imageGenerationError.body"),
60661
+ conf2.notify({
60662
+ header: conf2.i18n.t("AIInput.imageGenerationError.header"),
60663
+ body: conf2.i18n.t("AIInput.imageGenerationError.body"),
60660
60664
  variant: "error",
60661
60665
  duration: 4000
60662
60666
  });
@@ -60723,10 +60727,10 @@ function startIntervals(board) {
60723
60727
  }
60724
60728
  log.publishIntervalTimer = setInterval(() => {
60725
60729
  tryPublishEvent(board);
60726
- }, conf.EVENTS_PUBLISH_INTERVAL);
60730
+ }, conf2.EVENTS_PUBLISH_INTERVAL);
60727
60731
  log.resendIntervalTimer = setInterval(() => {
60728
60732
  tryResendEvent(board);
60729
- }, conf.EVENTS_RESEND_INTERVAL);
60733
+ }, conf2.EVENTS_RESEND_INTERVAL);
60730
60734
  }
60731
60735
  function tryPublishEvent(board) {
60732
60736
  const { log } = board.events;
@@ -60745,14 +60749,14 @@ function tryResendEvent(board) {
60745
60749
  return;
60746
60750
  }
60747
60751
  const date = Date.now();
60748
- const isTimeToSendPendingEvent = date - log.pendingEvent.lastSentTime >= conf.EVENTS_RESEND_INTERVAL;
60752
+ const isTimeToSendPendingEvent = date - log.pendingEvent.lastSentTime >= conf2.EVENTS_RESEND_INTERVAL;
60749
60753
  if (!isTimeToSendPendingEvent) {
60750
60754
  return;
60751
60755
  }
60752
- const isProbablyLostConnection = log.firstSentTime && date - log.firstSentTime >= conf.EVENTS_RESEND_INTERVAL * 5;
60756
+ const isProbablyLostConnection = log.firstSentTime && date - log.firstSentTime >= conf2.EVENTS_RESEND_INTERVAL * 5;
60753
60757
  if (isProbablyLostConnection) {
60754
60758
  board.presence.clear();
60755
- conf.connection?.notifyAboutLostConnection();
60759
+ conf2.connection?.notifyAboutLostConnection();
60756
60760
  }
60757
60761
  sendBoardEvent(board, log.pendingEvent.event, log.currentSequenceNumber);
60758
60762
  }
@@ -60783,12 +60787,12 @@ function sendBoardEvent(board, event, sequenceNumber) {
60783
60787
  lastKnownOrder: log.getLastIndex()
60784
60788
  }
60785
60789
  };
60786
- conf.connection.send({
60790
+ conf2.connection.send({
60787
60791
  type: "BoardEvent",
60788
60792
  boardId: board.getBoardId(),
60789
60793
  event: toSend,
60790
60794
  sequenceNumber,
60791
- userId: conf.connection.getCurrentUser()
60795
+ userId: conf2.connection.getCurrentUser()
60792
60796
  });
60793
60797
  const date = Date.now();
60794
60798
  log.pendingEvent = {
@@ -60834,7 +60838,7 @@ function handleConfirmation(msg2, board) {
60834
60838
  if (!isPendingEventConfirmation) {
60835
60839
  return;
60836
60840
  }
60837
- conf.connection?.dismissNotificationAboutLostConnection();
60841
+ conf2.connection?.dismissNotificationAboutLostConnection();
60838
60842
  log.currentSequenceNumber++;
60839
60843
  log.pendingEvent.event.order = msg2.order;
60840
60844
  log.confirmSentLocalEvent(log.pendingEvent.event);
@@ -60846,7 +60850,7 @@ function handleConfirmation(msg2, board) {
60846
60850
  // src/Events/MessageRouter/handleCreateSnapshotRequestMessage.ts
60847
60851
  function handleCreateSnapshotRequestMessage(msg2, board) {
60848
60852
  const { boardId, snapshot, lastOrder } = getSnapshotToPublish(board);
60849
- conf.connection.send({
60853
+ conf2.connection.send({
60850
60854
  type: "BoardSnapshot",
60851
60855
  boardId,
60852
60856
  snapshot,
@@ -60877,9 +60881,9 @@ function handleModeMessage(message, board) {
60877
60881
  if (isTemplateView()) {
60878
60882
  return;
60879
60883
  }
60880
- conf.notify({
60881
- header: conf.i18n.t("sharing.settingsChanged.heading"),
60882
- body: message.mode === "edit" ? conf.i18n.t("sharing.settingsChanged.bodyEdit") : conf.i18n.t("sharing.settingsChanged.bodyView"),
60884
+ conf2.notify({
60885
+ header: conf2.i18n.t("sharing.settingsChanged.heading"),
60886
+ body: message.mode === "edit" ? conf2.i18n.t("sharing.settingsChanged.bodyEdit") : conf2.i18n.t("sharing.settingsChanged.bodyView"),
60883
60887
  duration: 5000
60884
60888
  });
60885
60889
  }