microboard-temp 0.1.21 → 0.1.22

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/node.js CHANGED
@@ -17214,6 +17214,7 @@ __export(exports_node, {
17214
17214
  isHotkeyPushed: () => isHotkeyPushed,
17215
17215
  isFiniteNumber: () => isFiniteNumber,
17216
17216
  isControlCharacter: () => isControlCharacter,
17217
+ initI18N: () => initI18N,
17217
17218
  getYouTubeVideoPreview: () => getYouTubeVideoPreview,
17218
17219
  getYouTubeThumbnail: () => getYouTubeThumbnail,
17219
17220
  getVideoMetadata: () => getVideoMetadata,
@@ -23224,7 +23225,7 @@ var Browser = /* @__PURE__ */ function() {
23224
23225
  }();
23225
23226
  Browser.type = "languageDetector";
23226
23227
 
23227
- // src/api/initI18N.ts
23228
+ // src/api/initDefaultI18N.ts
23228
23229
  var defaultNS = "default";
23229
23230
  var resources = {
23230
23231
  en: {
@@ -23234,7 +23235,7 @@ var resources = {
23234
23235
  default: {}
23235
23236
  }
23236
23237
  };
23237
- function initI18N(isNode = false) {
23238
+ function initDefaultI18N() {
23238
23239
  instance.use(Browser).init({
23239
23240
  debug: conf2.debug,
23240
23241
  detection: {
@@ -23591,7 +23592,7 @@ var conf2 = {
23591
23592
  FALLBACK_LNG: "en",
23592
23593
  cursorsMap
23593
23594
  };
23594
- initI18N();
23595
+ initDefaultI18N();
23595
23596
 
23596
23597
  // src/Items/Transformation/Matrix.ts
23597
23598
  class Matrix2 {
@@ -35312,8 +35313,6 @@ function setNodeStyles({
35312
35313
  }
35313
35314
 
35314
35315
  // src/Items/RichText/editorHelpers/markdown/markdownProcessor.ts
35315
- var { i18n: i18n2 } = conf2;
35316
-
35317
35316
  class MarkdownProcessor {
35318
35317
  chunksQueue = [];
35319
35318
  isProcessingChunk = false;
@@ -35344,7 +35343,7 @@ class MarkdownProcessor {
35344
35343
  this.subject.publish(this);
35345
35344
  return true;
35346
35345
  }
35347
- if (i18n2.t && text3.startsWith(i18n2.t("AIInput.generatingResponse"))) {
35346
+ if (text3.startsWith(conf2.i18n.t("AIInput.generatingResponse"))) {
35348
35347
  return true;
35349
35348
  }
35350
35349
  const isPrevTextEmpty = isTextEmpty(this.editor.children);
@@ -35402,7 +35401,7 @@ class MarkdownProcessor {
35402
35401
  return;
35403
35402
  }
35404
35403
  const prevText = this.getText()?.[this.getText().length - 1]?.children[0]?.text;
35405
- if (i18n2.t && prevText?.startsWith(i18n2.t("AIInput.generatingResponse"))) {
35404
+ if (prevText?.startsWith(conf2.i18n.t("AIInput.generatingResponse"))) {
35406
35405
  clearText(this.editor);
35407
35406
  }
35408
35407
  if (chunk.includes(`
@@ -37710,7 +37709,6 @@ class BaseItem extends Mbr {
37710
37709
  }
37711
37710
 
37712
37711
  // src/Items/RichText/RichText.ts
37713
- var { i18n: i18n3 } = conf2;
37714
37712
  var isEditInProcessValue = false;
37715
37713
  var counter = 0;
37716
37714
 
@@ -37746,7 +37744,7 @@ class RichText extends BaseItem {
37746
37744
  shrinkWidth = false;
37747
37745
  prevMbr = null;
37748
37746
  rtCounter = 0;
37749
- 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) {
37747
+ constructor(board, container, id = "", transformation = new Transformation(id, board.events), linkTo, placeholderText = conf2.i18n?.t("board.textPlaceholder"), isInShape = false, autoSize = false, insideOf, initialTextStyles = conf2.DEFAULT_TEXT_STYLES) {
37750
37748
  super(board, id);
37751
37749
  this.container = container;
37752
37750
  this.transformation = transformation;
@@ -52883,7 +52881,6 @@ function getLine(lineStyle, start, end, middle) {
52883
52881
  }
52884
52882
  }
52885
52883
  // src/Items/Connector/Connector.ts
52886
- var { i18n: i18n4 } = conf2;
52887
52884
  var ConnectionLineWidths = [1, 2, 3, 4, 5, 6, 7, 8, 12];
52888
52885
  var CONNECTOR_COLOR = "rgb(20, 21, 26)";
52889
52886
  var CONNECTOR_LINE_WIDTH = 1;
@@ -52938,7 +52935,7 @@ class Connector2 extends BaseItem {
52938
52935
  this.lineColor = lineColor ?? CONNECTOR_COLOR;
52939
52936
  this.lineWidth = lineWidth ?? CONNECTOR_LINE_WIDTH;
52940
52937
  this.borderStyle = strokeStyle ?? CONNECTOR_BORDER_STYLE;
52941
- this.text = new RichText(board, this.getMbr(), this.id, new Transformation, this.linkTo, i18n4.t("connector.textPlaceholder", {
52938
+ this.text = new RichText(board, this.getMbr(), this.id, new Transformation, this.linkTo, conf2.i18n.t("connector.textPlaceholder", {
52942
52939
  ns: "default"
52943
52940
  }), true, false, "Connector", {
52944
52941
  ...conf2.DEFAULT_TEXT_STYLES,
@@ -72633,54 +72630,26 @@ function handleChatChunk(chunk, board) {
72633
72630
  const item = board.items.getById(itemId);
72634
72631
  switch (chunk.type) {
72635
72632
  case "chunk":
72636
- if (!item || item.itemType !== "AINode") {
72633
+ if (!item2 || item2.itemType !== "AINode") {
72637
72634
  return;
72638
72635
  }
72639
- item.text.editor.markdownProcessor.processMarkdown(chunk.content || "");
72636
+ item2.getRichText()?.editor.markdownProcessor.processMarkdown(chunk.content || "");
72640
72637
  break;
72641
72638
  case "done":
72642
- if (!item || item.itemType !== "AINode") {
72639
+ if (!item2 || item2.itemType !== "AINode") {
72643
72640
  board.aiGeneratingOnItem = undefined;
72644
72641
  return;
72645
72642
  }
72646
- item.getRichText().editor.markdownProcessor.processMarkdown("StopProcessingMarkdown");
72643
+ item2.getRichText()?.editor.markdownProcessor.processMarkdown("StopProcessingMarkdown");
72647
72644
  break;
72648
72645
  case "end":
72649
- if (!item || item.itemType !== "AINode") {
72646
+ if (!item2 || item2.itemType !== "AINode") {
72650
72647
  board.aiGeneratingOnItem = undefined;
72651
72648
  return;
72652
72649
  }
72653
- item.getRichText().editor.markdownProcessor.processMarkdown("StopProcessingMarkdown");
72650
+ item2.getRichText()?.editor.markdownProcessor.processMarkdown("StopProcessingMarkdown");
72654
72651
  break;
72655
72652
  case "error":
72656
- board.camera.unsubscribeFromItem();
72657
- if (board.aiGeneratingOnItem) {
72658
- const item2 = board.items.getById(board.aiGeneratingOnItem);
72659
- if (item2) {
72660
- board.selection.removeAll();
72661
- board.selection.add(item2);
72662
- if (item2.itemType === "AINode") {
72663
- item2.getRichText().editor.markdownProcessor.setStopProcessingMarkDownCb(null);
72664
- if (chunk.isExternalApiError) {
72665
- const editor = item2.getRichText().editor;
72666
- editor.clearText();
72667
- editor.insertCopiedText(conf2.i18n.t("AIInput.nodeErrorText"));
72668
- }
72669
- }
72670
- board.camera.zoomToFit(item2.getMbr(), 20);
72671
- }
72672
- }
72673
- console.log("Error AI generate", chunk.error);
72674
- if (!chunk.isExternalApiError) {
72675
- conf2.notify({
72676
- header: conf2.i18n.t("AIInput.textGenerationError.header"),
72677
- body: conf2.i18n.t("AIInput.textGenerationError.body"),
72678
- variant: "error",
72679
- duration: 4000
72680
- });
72681
- }
72682
- board.aiGeneratingOnItem = undefined;
72683
- break;
72684
72653
  default:
72685
72654
  board.camera.unsubscribeFromItem();
72686
72655
  if (!chunk.isExternalApiError) {
@@ -72691,23 +72660,23 @@ function handleChatChunk(chunk, board) {
72691
72660
  duration: 4000
72692
72661
  });
72693
72662
  }
72694
- if (board.aiGeneratingOnItem) {
72695
- const item2 = board.items.getById(board.aiGeneratingOnItem);
72696
- if (item2) {
72697
- board.selection.removeAll();
72698
- board.selection.add(item2);
72699
- if (item2.itemType === "AINode") {
72700
- item2.getRichText().editor.markdownProcessor.setStopProcessingMarkDownCb(null);
72701
- if (chunk.isExternalApiError) {
72702
- const editor = item2.getRichText().editor;
72703
- editor.clearText();
72704
- editor.insertCopiedText(conf2.i18n.t("AIInput.nodeErrorText"));
72705
- }
72663
+ const item2 = board.items.getById(board.aiGeneratingOnItem || "");
72664
+ if (board.aiGeneratingOnItem && item2) {
72665
+ board.selection.removeAll();
72666
+ board.selection.add(item2);
72667
+ const rt = item2?.getRichText();
72668
+ if (item2.itemType === "AINode" && rt) {
72669
+ const editor = rt.editor;
72670
+ editor.markdownProcessor.setStopProcessingMarkDownCb(null);
72671
+ if (chunk.isExternalApiError) {
72672
+ editor.clearText();
72673
+ editor.insertCopiedText(conf2.i18n.t("AIInput.nodeErrorText"));
72706
72674
  }
72707
- board.camera.zoomToFit(item2.getMbr(), 20);
72708
72675
  }
72676
+ board.camera.zoomToFit(item2.getMbr(), 20);
72709
72677
  }
72710
72678
  board.aiGeneratingOnItem = undefined;
72679
+ break;
72711
72680
  }
72712
72681
  }
72713
72682
  function handleAudioGenerate(response, board) {
@@ -73098,6 +73067,15 @@ messageRouter.addHandler("AiChat", handleAiChatMassage);
73098
73067
  messageRouter.addHandler("Mode", handleModeMessage);
73099
73068
  messageRouter.addHandler("PresenceEvent", handlePresenceEventMessage);
73100
73069
  messageRouter.addHandler("UserJoin", handleUserJoinMessage);
73070
+ // src/api/initI18N.ts
73071
+ function initI18N(i18nInstance) {
73072
+ conf2.i18n = i18nInstance;
73073
+ conf2.planNames = {
73074
+ basic: i18nInstance.t("userPlan.plans.basic.name"),
73075
+ plus: i18nInstance.t("userPlan.plans.plus.name")
73076
+ };
73077
+ return i18nInstance;
73078
+ }
73101
73079
  // src/api/NodeDOMParser.ts
73102
73080
  function getNodeDOMParser() {
73103
73081
  const { JSDOM } = require("jsdom");
@@ -7993,7 +7993,7 @@ var Browser = /* @__PURE__ */ function() {
7993
7993
  }();
7994
7994
  Browser.type = "languageDetector";
7995
7995
 
7996
- // src/api/initI18N.ts
7996
+ // src/api/initDefaultI18N.ts
7997
7997
  var defaultNS = "default";
7998
7998
  var resources = {
7999
7999
  en: {
@@ -8003,7 +8003,7 @@ var resources = {
8003
8003
  default: {}
8004
8004
  }
8005
8005
  };
8006
- function initI18N(isNode = false) {
8006
+ function initDefaultI18N() {
8007
8007
  instance.use(Browser).init({
8008
8008
  debug: conf2.debug,
8009
8009
  detection: {
@@ -8360,7 +8360,7 @@ var conf2 = {
8360
8360
  FALLBACK_LNG: "en",
8361
8361
  cursorsMap
8362
8362
  };
8363
- initI18N();
8363
+ initDefaultI18N();
8364
8364
 
8365
8365
  // src/Items/Transformation/Matrix.ts
8366
8366
  class Matrix2 {
@@ -26670,8 +26670,6 @@ function setNodeStyles({
26670
26670
  }
26671
26671
 
26672
26672
  // src/Items/RichText/editorHelpers/markdown/markdownProcessor.ts
26673
- var { i18n: i18n2 } = conf2;
26674
-
26675
26673
  class MarkdownProcessor {
26676
26674
  chunksQueue = [];
26677
26675
  isProcessingChunk = false;
@@ -26702,7 +26700,7 @@ class MarkdownProcessor {
26702
26700
  this.subject.publish(this);
26703
26701
  return true;
26704
26702
  }
26705
- if (i18n2.t && text3.startsWith(i18n2.t("AIInput.generatingResponse"))) {
26703
+ if (text3.startsWith(conf2.i18n.t("AIInput.generatingResponse"))) {
26706
26704
  return true;
26707
26705
  }
26708
26706
  const isPrevTextEmpty = isTextEmpty(this.editor.children);
@@ -26760,7 +26758,7 @@ class MarkdownProcessor {
26760
26758
  return;
26761
26759
  }
26762
26760
  const prevText = this.getText()?.[this.getText().length - 1]?.children[0]?.text;
26763
- if (i18n2.t && prevText?.startsWith(i18n2.t("AIInput.generatingResponse"))) {
26761
+ if (prevText?.startsWith(conf2.i18n.t("AIInput.generatingResponse"))) {
26764
26762
  clearText(this.editor);
26765
26763
  }
26766
26764
  if (chunk.includes(`
@@ -29045,7 +29043,6 @@ class BaseItem extends Mbr {
29045
29043
  }
29046
29044
 
29047
29045
  // src/Items/RichText/RichText.ts
29048
- var { i18n: i18n3 } = conf2;
29049
29046
  var isEditInProcessValue = false;
29050
29047
  var counter = 0;
29051
29048
 
@@ -29081,7 +29078,7 @@ class RichText extends BaseItem {
29081
29078
  shrinkWidth = false;
29082
29079
  prevMbr = null;
29083
29080
  rtCounter = 0;
29084
- 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) {
29081
+ constructor(board, container, id = "", transformation = new Transformation(id, board.events), linkTo, placeholderText = conf2.i18n?.t("board.textPlaceholder"), isInShape = false, autoSize = false, insideOf, initialTextStyles = conf2.DEFAULT_TEXT_STYLES) {
29085
29082
  super(board, id);
29086
29083
  this.container = container;
29087
29084
  this.transformation = transformation;
@@ -44217,7 +44214,6 @@ function getLine(lineStyle, start2, end2, middle) {
44217
44214
  }
44218
44215
  }
44219
44216
  // src/Items/Connector/Connector.ts
44220
- var { i18n: i18n4 } = conf2;
44221
44217
  var ConnectionLineWidths = [1, 2, 3, 4, 5, 6, 7, 8, 12];
44222
44218
  var CONNECTOR_COLOR = "rgb(20, 21, 26)";
44223
44219
  var CONNECTOR_LINE_WIDTH = 1;
@@ -44272,7 +44268,7 @@ class Connector2 extends BaseItem {
44272
44268
  this.lineColor = lineColor ?? CONNECTOR_COLOR;
44273
44269
  this.lineWidth = lineWidth ?? CONNECTOR_LINE_WIDTH;
44274
44270
  this.borderStyle = strokeStyle ?? CONNECTOR_BORDER_STYLE;
44275
- this.text = new RichText(board, this.getMbr(), this.id, new Transformation, this.linkTo, i18n4.t("connector.textPlaceholder", {
44271
+ this.text = new RichText(board, this.getMbr(), this.id, new Transformation, this.linkTo, conf2.i18n.t("connector.textPlaceholder", {
44276
44272
  ns: "default"
44277
44273
  }), true, false, "Connector", {
44278
44274
  ...conf2.DEFAULT_TEXT_STYLES,
@@ -64006,54 +64002,26 @@ function handleChatChunk(chunk, board) {
64006
64002
  const item = board.items.getById(itemId);
64007
64003
  switch (chunk.type) {
64008
64004
  case "chunk":
64009
- if (!item || item.itemType !== "AINode") {
64005
+ if (!item2 || item2.itemType !== "AINode") {
64010
64006
  return;
64011
64007
  }
64012
- item.text.editor.markdownProcessor.processMarkdown(chunk.content || "");
64008
+ item2.getRichText()?.editor.markdownProcessor.processMarkdown(chunk.content || "");
64013
64009
  break;
64014
64010
  case "done":
64015
- if (!item || item.itemType !== "AINode") {
64011
+ if (!item2 || item2.itemType !== "AINode") {
64016
64012
  board.aiGeneratingOnItem = undefined;
64017
64013
  return;
64018
64014
  }
64019
- item.getRichText().editor.markdownProcessor.processMarkdown("StopProcessingMarkdown");
64015
+ item2.getRichText()?.editor.markdownProcessor.processMarkdown("StopProcessingMarkdown");
64020
64016
  break;
64021
64017
  case "end":
64022
- if (!item || item.itemType !== "AINode") {
64018
+ if (!item2 || item2.itemType !== "AINode") {
64023
64019
  board.aiGeneratingOnItem = undefined;
64024
64020
  return;
64025
64021
  }
64026
- item.getRichText().editor.markdownProcessor.processMarkdown("StopProcessingMarkdown");
64022
+ item2.getRichText()?.editor.markdownProcessor.processMarkdown("StopProcessingMarkdown");
64027
64023
  break;
64028
64024
  case "error":
64029
- board.camera.unsubscribeFromItem();
64030
- if (board.aiGeneratingOnItem) {
64031
- const item2 = board.items.getById(board.aiGeneratingOnItem);
64032
- if (item2) {
64033
- board.selection.removeAll();
64034
- board.selection.add(item2);
64035
- if (item2.itemType === "AINode") {
64036
- item2.getRichText().editor.markdownProcessor.setStopProcessingMarkDownCb(null);
64037
- if (chunk.isExternalApiError) {
64038
- const editor = item2.getRichText().editor;
64039
- editor.clearText();
64040
- editor.insertCopiedText(conf2.i18n.t("AIInput.nodeErrorText"));
64041
- }
64042
- }
64043
- board.camera.zoomToFit(item2.getMbr(), 20);
64044
- }
64045
- }
64046
- console.log("Error AI generate", chunk.error);
64047
- if (!chunk.isExternalApiError) {
64048
- conf2.notify({
64049
- header: conf2.i18n.t("AIInput.textGenerationError.header"),
64050
- body: conf2.i18n.t("AIInput.textGenerationError.body"),
64051
- variant: "error",
64052
- duration: 4000
64053
- });
64054
- }
64055
- board.aiGeneratingOnItem = undefined;
64056
- break;
64057
64025
  default:
64058
64026
  board.camera.unsubscribeFromItem();
64059
64027
  if (!chunk.isExternalApiError) {
@@ -64064,23 +64032,23 @@ function handleChatChunk(chunk, board) {
64064
64032
  duration: 4000
64065
64033
  });
64066
64034
  }
64067
- if (board.aiGeneratingOnItem) {
64068
- const item2 = board.items.getById(board.aiGeneratingOnItem);
64069
- if (item2) {
64070
- board.selection.removeAll();
64071
- board.selection.add(item2);
64072
- if (item2.itemType === "AINode") {
64073
- item2.getRichText().editor.markdownProcessor.setStopProcessingMarkDownCb(null);
64074
- if (chunk.isExternalApiError) {
64075
- const editor = item2.getRichText().editor;
64076
- editor.clearText();
64077
- editor.insertCopiedText(conf2.i18n.t("AIInput.nodeErrorText"));
64078
- }
64035
+ const item2 = board.items.getById(board.aiGeneratingOnItem || "");
64036
+ if (board.aiGeneratingOnItem && item2) {
64037
+ board.selection.removeAll();
64038
+ board.selection.add(item2);
64039
+ const rt = item2?.getRichText();
64040
+ if (item2.itemType === "AINode" && rt) {
64041
+ const editor = rt.editor;
64042
+ editor.markdownProcessor.setStopProcessingMarkDownCb(null);
64043
+ if (chunk.isExternalApiError) {
64044
+ editor.clearText();
64045
+ editor.insertCopiedText(conf2.i18n.t("AIInput.nodeErrorText"));
64079
64046
  }
64080
- board.camera.zoomToFit(item2.getMbr(), 20);
64081
64047
  }
64048
+ board.camera.zoomToFit(item2.getMbr(), 20);
64082
64049
  }
64083
64050
  board.aiGeneratingOnItem = undefined;
64051
+ break;
64084
64052
  }
64085
64053
  }
64086
64054
  function handleAudioGenerate(response, board) {
@@ -64471,6 +64439,15 @@ messageRouter.addHandler("AiChat", handleAiChatMassage);
64471
64439
  messageRouter.addHandler("Mode", handleModeMessage);
64472
64440
  messageRouter.addHandler("PresenceEvent", handlePresenceEventMessage);
64473
64441
  messageRouter.addHandler("UserJoin", handleUserJoinMessage);
64442
+ // src/api/initI18N.ts
64443
+ function initI18N(i18nInstance) {
64444
+ conf2.i18n = i18nInstance;
64445
+ conf2.planNames = {
64446
+ basic: i18nInstance.t("userPlan.plans.basic.name"),
64447
+ plus: i18nInstance.t("userPlan.plans.plus.name")
64448
+ };
64449
+ return i18nInstance;
64450
+ }
64474
64451
  // src/api/getMeasureCtx.ts
64475
64452
  function getMeasureCtx() {
64476
64453
  if (typeof document !== "undefined") {
@@ -64535,86 +64512,6 @@ function initPaths(path2D) {
64535
64512
  };
64536
64513
  }
64537
64514
 
64538
- // node_modules/react-i18next/dist/es/unescape.js
64539
- var matchHtmlEntity = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
64540
- var htmlEntities = {
64541
- "&": "&",
64542
- "&": "&",
64543
- "&lt;": "<",
64544
- "&#60;": "<",
64545
- "&gt;": ">",
64546
- "&#62;": ">",
64547
- "&apos;": "'",
64548
- "&#39;": "'",
64549
- "&quot;": '"',
64550
- "&#34;": '"',
64551
- "&nbsp;": " ",
64552
- "&#160;": " ",
64553
- "&copy;": "©",
64554
- "&#169;": "©",
64555
- "&reg;": "®",
64556
- "&#174;": "®",
64557
- "&hellip;": "…",
64558
- "&#8230;": "…",
64559
- "&#x2F;": "/",
64560
- "&#47;": "/"
64561
- };
64562
- var unescapeHtmlEntity = (m) => htmlEntities[m];
64563
- var unescape = (text5) => text5.replace(matchHtmlEntity, unescapeHtmlEntity);
64564
-
64565
- // node_modules/react-i18next/dist/es/defaults.js
64566
- var defaultOptions = {
64567
- bindI18n: "languageChanged",
64568
- bindI18nStore: "",
64569
- transEmptyNodeValue: "",
64570
- transSupportBasicHtmlNodes: true,
64571
- transWrapTextNodes: "",
64572
- transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"],
64573
- useSuspense: true,
64574
- unescape
64575
- };
64576
- function setDefaults() {
64577
- let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
64578
- defaultOptions = {
64579
- ...defaultOptions,
64580
- ...options
64581
- };
64582
- }
64583
-
64584
- // node_modules/react-i18next/dist/es/i18nInstance.js
64585
- var i18nInstance;
64586
- function setI18n(instance2) {
64587
- i18nInstance = instance2;
64588
- }
64589
-
64590
- // node_modules/react-i18next/dist/es/initReactI18next.js
64591
- var initReactI18next = {
64592
- type: "3rdParty",
64593
- init(instance2) {
64594
- setDefaults(instance2.options.react);
64595
- setI18n(instance2);
64596
- }
64597
- };
64598
- // src/api/initI18NBrowser.ts
64599
- function initI18NReact(isNode = false) {
64600
- const i18nBrowser = createInstance();
64601
- i18nBrowser.use(initReactI18next).use(Browser).init({
64602
- debug: conf2.debug,
64603
- detection: {
64604
- order: ["navigator"]
64605
- },
64606
- supportedLngs: ["en", "ru"],
64607
- defaultNS,
64608
- resources,
64609
- fallbackLng: conf2.FALLBACK_LNG,
64610
- interpolation: {
64611
- escapeValue: false
64612
- }
64613
- });
64614
- conf2.i18n = i18nBrowser;
64615
- return i18nBrowser;
64616
- }
64617
-
64618
64515
  // src/api/initBrowserSettings.ts
64619
64516
  function initBrowserSettings() {
64620
64517
  conf2.documentFactory = new BrowserDocumentFactory;
@@ -64624,7 +64521,6 @@ function initBrowserSettings() {
64624
64521
  conf2.getDocumentHeight = () => document.documentElement.clientHeight;
64625
64522
  conf2.getDPI = () => window.devicePixelRatio;
64626
64523
  conf2.getDOMParser = getBrowserDOMParser;
64627
- initI18NReact();
64628
64524
  initPaths(BrowserPath2D);
64629
64525
  conf2.reactEditorFocus = (editor) => {
64630
64526
  try {
@@ -64687,6 +64583,7 @@ export {
64687
64583
  isHotkeyPushed,
64688
64584
  isFiniteNumber,
64689
64585
  isControlCharacter,
64586
+ initI18N,
64690
64587
  getYouTubeVideoPreview,
64691
64588
  getYouTubeThumbnail,
64692
64589
  getVideoMetadata,