@emailmaker/emailmaker 1.1.46 → 1.1.49

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.
Files changed (80) hide show
  1. package/{emailmaker-core.0eca2ff8.js → emailmaker-core.686599cb.js} +78 -72
  2. package/emailmaker-esm.js +620 -3190
  3. package/emailmaker.d.ts +184 -52
  4. package/emailmaker.js +818 -12588
  5. package/iframe/js/amp.V09Q6hy6.js +1 -0
  6. package/iframe/js/iframe-eblock.js +1 -1
  7. package/iframe/js/iframe.js +1 -1
  8. package/iframe/js/rules.B-wCbIo7.js +1 -1
  9. package/monacoeditorwork/css.worker.bundle.js +40524 -40442
  10. package/monacoeditorwork/editor.worker.bundle.js +9740 -9697
  11. package/monacoeditorwork/html.worker.bundle.js +50513 -50431
  12. package/monacoeditorwork/json.worker.bundle.js +14570 -14527
  13. package/monacoeditorwork/ts.worker.bundle.js +119593 -119455
  14. package/npm-publish.manifest.json +7 -7
  15. package/package.json +1 -1
  16. package/runtime/@ant-design/cssinjs/index.js +1 -1
  17. package/runtime/@ant-design/icons/index.js +2 -2
  18. package/runtime/README.md +1 -1
  19. package/runtime/THIRD_PARTY_LICENSES.txt +70 -42
  20. package/runtime/antd/index.js +1 -1
  21. package/runtime/react/index.js +3 -3
  22. package/runtime/react/jsx-runtime/index.js +1 -1
  23. package/runtime/react-dom/client/index.js +4 -4
  24. package/runtime/react-dom/index.js +3 -3
  25. package/runtime/react-router-dom/index.js +2 -2
  26. package/singlepage_headless_plugin.html +1 -1
  27. package/static/core/1724d302.js +649 -0
  28. package/static/core/{7db5498f2.js → 23692b142.js} +184 -155
  29. package/static/core/{f62c7573.js → 2638406e.js} +3 -3
  30. package/static/core/{e7554764.js → 28d0ee07.js} +537 -518
  31. package/static/core/{62495fd5.js → 2c90e83d.js} +177 -173
  32. package/static/core/{9833df3b.js → 35b2febf.js} +3 -3
  33. package/static/core/5a79f04d.js +924 -0
  34. package/static/core/{3c7560b7.js → 5cd9928a.js} +55 -55
  35. package/static/core/{139b301d.js → 67b72215.js} +1349 -1297
  36. package/static/core/{1f63a578.js → 7b48c5bf.js} +3949 -3707
  37. package/static/core/{3cf9dc9b.js → b61ea992.js} +7639 -6595
  38. package/static/core/{868e86a7.js → bfec1c65.js} +3573 -3559
  39. package/static/core/c78634e5.js +2090 -0
  40. package/static/core/{6410579b.js → c9f81757.js} +7 -7
  41. package/static/core/{dc3b3081.js → cf9b492f.js} +26 -26
  42. package/static/core/{ac8a414a.js → dde3447a.js} +17037 -16857
  43. package/static/core/{8833ee6c.js → e19a9688.js} +745 -664
  44. package/static/core/{36e22fa5.js → f5401fe7.js} +22 -22
  45. package/static/esm/{e21389f1.js → 1ce2bc32.js} +50 -47
  46. package/static/esm/{c951742a.js → c9e541a3.js} +70 -70
  47. package/static/runtime/{DownloadOutlined-CgJ8OpH_.js → DownloadOutlined-Dg_G2xO7.js} +4 -4
  48. package/static/runtime/client-CfXgU5Vo.js +7580 -0
  49. package/static/runtime/{defineProperty-B-FyVNQF.js → defineProperty-C_9hhJHt.js} +1 -1
  50. package/static/runtime/dom-export-CHgQ7Ws9.js +8069 -0
  51. package/static/runtime/{es-DnZp8dh1.js → es-BPfImJ0x.js} +5 -5
  52. package/static/runtime/{es-B2DS-PLP.js → es-DcH6fwd6.js} +2 -2
  53. package/static/runtime/{es-deqzngIL.js → es-_OY-D9g1.js} +2 -2
  54. package/static/runtime/{jsx-dev-runtime-Wj1_6O79.js → jsx-dev-runtime-DDukXY54.js} +2 -2
  55. package/static/runtime/jsx-runtime-BodCQYDg.js +22 -0
  56. package/static/runtime/react-BHNx_xzv.js +290 -0
  57. package/static/runtime/react-dom-CyByzibb.js +127 -0
  58. package/two_step_headless_plugin.html +1 -1
  59. package/vite/index.cjs +46 -21
  60. package/vite/index.d.ts +0 -1
  61. package/vite/index.js +46 -21
  62. package/vite/pluginDev/index.d.ts +0 -1
  63. package/webpack/index.cjs +46 -21
  64. package/webpack/index.d.ts +0 -1
  65. package/webpack/index.js +46 -21
  66. package/webpack/pluginDev/index.d.ts +0 -1
  67. package/iframe/js/amp.Op4DZt9X.js +0 -1
  68. package/static/core/4da039b3.js +0 -1119
  69. package/static/core/6130a367.js +0 -869
  70. package/static/core/bdd1d845.js +0 -2063
  71. package/static/esm/352121c5.js +0 -55
  72. package/static/esm/64966e1c.js +0 -18
  73. package/static/esm/b8792b4f.js +0 -3480
  74. package/static/runtime/client-CM3WFcip.js +0 -7
  75. package/static/runtime/dist-DUS42Hru.js +0 -3421
  76. package/static/runtime/jsx-runtime-DmPQfqtr.js +0 -28
  77. package/static/runtime/react-DIf5CLST.js +0 -258
  78. package/static/runtime/react-dom-Cc3IcUkg.js +0 -5604
  79. /package/iframe/{iframe-eblock.0eca2ff8.html → iframe-eblock.686599cb.html} +0 -0
  80. /package/iframe/{iframe.0eca2ff8.html → iframe.686599cb.html} +0 -0
@@ -1,25 +1,25 @@
1
- __emailmaker__.define("static/core/36e22fa5.js", [
1
+ __emailmaker__.define("static/core/f5401fe7.js", [
2
2
  "require",
3
3
  "exports",
4
4
  "module",
5
5
  "static/core/16c2710d.js",
6
- "static/core/868e86a7.js",
6
+ "static/core/bfec1c65.js",
7
7
  "react",
8
- "react-dom",
9
8
  "react/jsx-runtime",
10
9
  "antd",
11
10
  "react-dom/client",
12
11
  "@ant-design/icons",
13
- "@ant-design/cssinjs"
12
+ "@ant-design/cssinjs",
13
+ "react-dom"
14
14
  ], function(c, J, se) {
15
- const U = c("./16c2710d.js"), S = c("./868e86a7.js");
15
+ const U = c("./16c2710d.js"), S = c("./bfec1c65.js");
16
16
  let n = c("react");
17
17
  n = U.__toESM(n, 1);
18
- c("react-dom");
19
18
  let t = c("react/jsx-runtime"), d = c("antd");
20
19
  c("react-dom/client");
21
20
  c("@ant-design/icons");
22
21
  c("@ant-design/cssinjs");
22
+ c("react-dom");
23
23
  var _ = ({ size: j = 24, color: N = "currentColor", ...l }) => n.createElement("svg", {
24
24
  viewBox: "0 0 24 24",
25
25
  width: j,
@@ -58,12 +58,12 @@ __emailmaker__.define("static/core/36e22fa5.js", [
58
58
  actions: "actions"
59
59
  }, q = ({ customRequest: j, state: N, setState: l }) => {
60
60
  var P, z;
61
- const { t: o } = S.dr(), { options: I } = S.mn(), A = (z = (P = I?.config) === null || P === void 0 ? void 0 : P.iconStrokeWidth) !== null && z !== void 0 ? z : 1.75, F = (0, n.useRef)(null), { mode: h, rawText: g, foregroundHex: x, backgroundHex: f, transparentBackground: p, qrSidePx: C, barcodeBarHeightPx: k } = N, K = (0, n.useCallback)((e) => l((a) => Object.assign(Object.assign({}, a), { mode: e })), [l]), X = (0, n.useCallback)((e) => l((a) => Object.assign(Object.assign({}, a), { rawText: e })), [l]), Y = (0, n.useCallback)((e) => l((a) => Object.assign(Object.assign({}, a), { foregroundHex: e })), [l]), Z = (0, n.useCallback)((e) => l((a) => Object.assign(Object.assign({}, a), { backgroundHex: e })), [l]), ee = (0, n.useCallback)((e) => l((a) => Object.assign(Object.assign({}, a), { transparentBackground: e })), [l]), ae = (0, n.useCallback)((e) => l((a) => Object.assign(Object.assign({}, a), { qrSidePx: e })), [l]), te = (0, n.useCallback)((e) => l((a) => Object.assign(Object.assign({}, a), { barcodeBarHeightPx: e })), [l]), [E, re] = (0, n.useState)(g), [T, v] = (0, n.useState)(null), [L, G] = (0, n.useState)(!1), y = (0, n.useMemo)(() => S.Sn.debounce((e) => re(e), 300), []);
61
+ const { t: o } = S.dr(), { options: I } = S.mn(), A = (z = (P = I?.config) === null || P === void 0 ? void 0 : P.iconStrokeWidth) !== null && z !== void 0 ? z : 1.75, F = (0, n.useRef)(null), { mode: h, rawText: g, foregroundHex: x, backgroundHex: f, transparentBackground: p, qrSidePx: C, barcodeBarHeightPx: k } = N, K = (0, n.useCallback)((e) => l((a) => Object.assign(Object.assign({}, a), { mode: e })), [l]), X = (0, n.useCallback)((e) => l((a) => Object.assign(Object.assign({}, a), { rawText: e })), [l]), Y = (0, n.useCallback)((e) => l((a) => Object.assign(Object.assign({}, a), { foregroundHex: e })), [l]), Z = (0, n.useCallback)((e) => l((a) => Object.assign(Object.assign({}, a), { backgroundHex: e })), [l]), ee = (0, n.useCallback)((e) => l((a) => Object.assign(Object.assign({}, a), { transparentBackground: e })), [l]), ae = (0, n.useCallback)((e) => l((a) => Object.assign(Object.assign({}, a), { qrSidePx: e })), [l]), te = (0, n.useCallback)((e) => l((a) => Object.assign(Object.assign({}, a), { barcodeBarHeightPx: e })), [l]), [E, re] = (0, n.useState)(g), [T, v] = (0, n.useState)(null), [O, G] = (0, n.useState)(!1), y = (0, n.useMemo)(() => S.Sn.debounce((e) => re(e), 300), []);
62
62
  (0, n.useEffect)(() => (y(g), () => {
63
63
  y.cancel();
64
64
  }), [g, y]);
65
- const M = p ? "#00000000" : f, D = (0, n.useCallback)(async (e, a) => {
66
- const i = (await Promise.resolve().then(() => c("./dc3b3081.js")).then(function(s) {
65
+ const M = p ? "#00000000" : f, Q = (0, n.useCallback)(async (e, a) => {
66
+ const i = (await Promise.resolve().then(() => c("./cf9b492f.js")).then(function(s) {
67
67
  return s.b;
68
68
  })).default, u = a.trim(), m = Math.min(280, Math.max(80, C));
69
69
  if (!u) {
@@ -84,10 +84,10 @@ __emailmaker__.define("static/core/36e22fa5.js", [
84
84
  x,
85
85
  M,
86
86
  C
87
- ]), Q = (0, n.useCallback)(async (e, a) => {
88
- const i = (await Promise.resolve().then(() => c("./f62c7573.js")).then(function(b) {
87
+ ]), D = (0, n.useCallback)(async (e, a) => {
88
+ const i = (await Promise.resolve().then(() => c("./2638406e.js")).then(function(b) {
89
89
  return b.J;
90
- })).default, u = a.trim(), m = p ? "rgba(0,0,0,0)" : f, s = Math.min(72, Math.max(24, k)), R = Math.max(1, Math.round(s / 42)), O = Math.max(4, Math.round(.07 * s)), W = Math.max(10, Math.round(.15 * s));
90
+ })).default, u = a.trim(), m = p ? "rgba(0,0,0,0)" : f, s = Math.min(72, Math.max(24, k)), R = Math.max(1, Math.round(s / 42)), L = Math.max(4, Math.round(.07 * s)), W = Math.max(10, Math.round(.15 * s));
91
91
  if (!u) {
92
92
  e.width = Math.round(4 * s), e.height = Math.round(1.65 * s);
93
93
  const b = e.getContext("2d");
@@ -99,7 +99,7 @@ __emailmaker__.define("static/core/36e22fa5.js", [
99
99
  displayValue: !0,
100
100
  background: m,
101
101
  lineColor: x,
102
- margin: O,
102
+ margin: L,
103
103
  width: R,
104
104
  height: s,
105
105
  fontSize: W
@@ -116,7 +116,7 @@ __emailmaker__.define("static/core/36e22fa5.js", [
116
116
  let a = !1;
117
117
  return (async () => {
118
118
  try {
119
- h === "qr" ? await D(e, E) : await Q(e, E), a || v(null);
119
+ h === "qr" ? await Q(e, E) : await D(e, E), a || v(null);
120
120
  } catch (i) {
121
121
  const u = i instanceof Error ? i.message : String(i);
122
122
  if (!a) {
@@ -131,8 +131,8 @@ __emailmaker__.define("static/core/36e22fa5.js", [
131
131
  }, [
132
132
  h,
133
133
  E,
134
- Q,
135
134
  D,
135
+ Q,
136
136
  o
137
137
  ]);
138
138
  const V = (0, n.useCallback)(async () => {
@@ -142,7 +142,7 @@ __emailmaker__.define("static/core/36e22fa5.js", [
142
142
  const a = typeof window > "u" ? 2 : Math.min(3, Math.max(2, window.devicePixelRatio || 2));
143
143
  if (h === "qr") {
144
144
  const w = Math.round(Math.min(600, Math.max(80, C)) * a), B = document.createElement("canvas");
145
- B.width = w, B.height = w, await (await Promise.resolve().then(() => c("./dc3b3081.js")).then(function(H) {
145
+ B.width = w, B.height = w, await (await Promise.resolve().then(() => c("./cf9b492f.js")).then(function(H) {
146
146
  return H.b;
147
147
  })).default.toCanvas(B, e, {
148
148
  width: w,
@@ -156,16 +156,16 @@ __emailmaker__.define("static/core/36e22fa5.js", [
156
156
  if (!$) throw new Error("PNG export failed");
157
157
  return $;
158
158
  }
159
- const i = (await Promise.resolve().then(() => c("./f62c7573.js")).then(function(w) {
159
+ const i = (await Promise.resolve().then(() => c("./2638406e.js")).then(function(w) {
160
160
  return w.J;
161
- })).default, u = document.createElement("canvas"), m = p ? "rgba(0,0,0,0)" : f, s = Math.min(130, Math.max(24, k)), R = Math.max(6, Math.round(.1 * s)), O = Math.max(2, Math.round(s / 36)), W = Math.max(12, Math.round(.16 * s));
161
+ })).default, u = document.createElement("canvas"), m = p ? "rgba(0,0,0,0)" : f, s = Math.min(130, Math.max(24, k)), R = Math.max(6, Math.round(.1 * s)), L = Math.max(2, Math.round(s / 36)), W = Math.max(12, Math.round(.16 * s));
162
162
  i(u, e, {
163
163
  format: "CODE128",
164
164
  displayValue: !0,
165
165
  background: m,
166
166
  lineColor: x,
167
167
  margin: Math.round(R * a),
168
- width: Math.round(O * a),
168
+ width: Math.round(L * a),
169
169
  height: Math.round(s * a),
170
170
  fontSize: Math.round(W * a)
171
171
  });
@@ -184,7 +184,7 @@ __emailmaker__.define("static/core/36e22fa5.js", [
184
184
  y,
185
185
  o
186
186
  ]), ne = (0, n.useCallback)(async () => {
187
- if (!L && g.trim()) {
187
+ if (!O && g.trim()) {
188
188
  G(!0);
189
189
  try {
190
190
  let e;
@@ -209,7 +209,7 @@ __emailmaker__.define("static/core/36e22fa5.js", [
209
209
  V,
210
210
  h,
211
211
  g,
212
- L
212
+ O
213
213
  ]), oe = !!g.trim() && !T;
214
214
  return (0, t.jsx)("div", {
215
215
  className: r.root,
@@ -365,7 +365,7 @@ __emailmaker__.define("static/core/36e22fa5.js", [
365
365
  onClick: () => {
366
366
  ne();
367
367
  },
368
- loading: L,
368
+ loading: O,
369
369
  disabled: !oe,
370
370
  children: o("Add to My files")
371
371
  })
@@ -1,12 +1,18 @@
1
- import { n as E } from "./64966e1c.js";
2
- var f = class v {
1
+ var E = Object.defineProperty, v = (t, e) => {
2
+ let r = {};
3
+ for (var n in t) E(r, n, {
4
+ get: t[n],
5
+ enumerable: !0
6
+ });
7
+ return e || E(r, Symbol.toStringTag, { value: "Module" }), r;
8
+ }, f = class y {
3
9
  _inner;
4
10
  _isDisposed = !1;
5
11
  constructor(e = []) {
6
12
  this._inner = e;
7
13
  }
8
14
  addDisposable(e) {
9
- return this._inner.push(e), e instanceof v && e.addDispose(() => {
15
+ return this._inner.push(e), e instanceof y && e.addDispose(() => {
10
16
  this.removeDisposable(e);
11
17
  }), e;
12
18
  }
@@ -30,7 +36,7 @@ var f = class v {
30
36
  function p(t) {
31
37
  return `service_container_${t}`;
32
38
  }
33
- var D = class h extends f {
39
+ var T = class h extends f {
34
40
  _parent;
35
41
  _injectCallbacks = [];
36
42
  _injections = /* @__PURE__ */ Object.create(null);
@@ -86,10 +92,10 @@ var D = class h extends f {
86
92
  addServiceFactory(e, r, n) {
87
93
  const s = p(e);
88
94
  let o;
89
- this.injectFactory(s, (u, a = []) => (o = r(u, o), o === void 0 ? a : a.indexOf(o) < 0 ? [...a, o] : a), n);
95
+ this.injectFactory(s, (u, c = []) => (o = r(u, o), o === void 0 ? c : c.indexOf(o) < 0 ? [...c, o] : c), n);
90
96
  const i = new f();
91
97
  return i.addDispose(() => {
92
- this.injectFactory(s, (u, a = []) => o === void 0 ? a : a.filter((d) => d !== o));
98
+ this.injectFactory(s, (u, c = []) => o === void 0 ? c : c.filter((d) => d !== o));
93
99
  }), i;
94
100
  }
95
101
  getServices(e) {
@@ -117,41 +123,41 @@ function A(t) {
117
123
  const e = g(t), r = globalThis;
118
124
  return r[e] ??= {};
119
125
  }
120
- function T(t) {
126
+ function C(t) {
121
127
  return t != null && typeof t == "object" && typeof t.inject == "function" && typeof t.getInstance == "function";
122
128
  }
123
- function C(t) {
129
+ function m(t) {
124
130
  if (t) return g(t);
125
131
  return g("emailmaker".trim());
126
132
  }
127
- function y(t) {
128
- const e = A(C(t));
129
- if (T(e.container)) return e.container;
130
- const r = new D(null);
133
+ function S(t) {
134
+ const e = A(m(t));
135
+ if (C(e.container)) return e.container;
136
+ const r = new T(null);
131
137
  return e.container = r, r;
132
138
  }
133
- function m(t) {
134
- return y(t);
139
+ function x(t) {
140
+ return S(t);
135
141
  }
136
- function x() {
142
+ function O() {
137
143
  let t = (/* @__PURE__ */ new Date()).getTime(), e = typeof performance < "u" && performance.now && performance.now() * 1e3 || 0;
138
144
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(r) {
139
145
  let n = Math.random() * 16;
140
146
  return t > 0 ? (n = (t + n) % 16 | 0, t = Math.floor(t / 16)) : (n = (e + n) % 16 | 0, e = Math.floor(e / 16)), (r === "x" ? n : n & 3 | 8).toString(16);
141
147
  });
142
148
  }
143
- function O() {
144
- return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : x();
149
+ function w() {
150
+ return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : O();
145
151
  }
146
- function c(t = O()) {
152
+ function a(t = w()) {
147
153
  return t;
148
154
  }
149
- function S() {
155
+ function I() {
150
156
  return "esm".trim();
151
157
  }
152
- function w(t) {
158
+ function N(t) {
153
159
  if (typeof globalThis > "u") return;
154
- const e = S(), r = globalThis[t] ?? {};
160
+ const e = I(), r = globalThis[t] ?? {};
155
161
  globalThis[t] = r;
156
162
  const n = r.__diagnostics ??= {}, s = n.diModuleEval ??= {
157
163
  evalCount: 0,
@@ -166,12 +172,12 @@ function w(t) {
166
172
  s.duplicateWarned = !0;
167
173
  s.evalCount, s.records;
168
174
  }
169
- function N() {
175
+ function R() {
170
176
  return `__${"emailmaker".trim()}__`;
171
177
  }
172
- function R(t, e) {
173
- if (w(e), typeof globalThis > "u") return t;
174
- const r = S(), n = globalThis, s = n[e] = n[e] || {}, o = s.__diagnostics = s.__diagnostics || {}, i = o.dependencyResolver = o.dependencyResolver || {
178
+ function b(t, e) {
179
+ if (N(e), typeof globalThis > "u") return t;
180
+ const r = I(), n = globalThis, s = n[e] = n[e] || {}, o = s.__diagnostics = s.__diagnostics || {}, i = o.dependencyResolver = o.dependencyResolver || {
175
181
  entries: [],
176
182
  warnings: []
177
183
  }, u = {
@@ -182,8 +188,8 @@ function R(t, e) {
182
188
  stack: (/* @__PURE__ */ new Error()).stack
183
189
  };
184
190
  if (i.entries.push(u), i.entries.length > 1) {
185
- const a = i.entries[0];
186
- if (i.entries.some((d) => d.container !== a.container) && !i.duplicateWarningShown) {
191
+ const c = i.entries[0];
192
+ if (i.entries.some((d) => d.container !== c.container) && !i.duplicateWarningShown) {
187
193
  i.duplicateWarningShown = !0;
188
194
  const d = {
189
195
  message: "[di] Multiple DependencyResolver instances detected on namespace",
@@ -197,16 +203,16 @@ function R(t, e) {
197
203
  return t;
198
204
  }
199
205
  var _;
200
- function b() {
206
+ function M() {
201
207
  if (_) return _;
202
- const t = N();
203
- return _ = R(y(t), t), _;
208
+ const t = R();
209
+ return _ = b(S(t), t), _;
204
210
  }
205
- var V = new Proxy({}, { get(t, e, r) {
206
- const n = b(), s = Reflect.get(n, e, r);
211
+ new Proxy({}, { get(t, e, r) {
212
+ const n = M(), s = Reflect.get(n, e, r);
207
213
  return typeof s == "function" ? s.bind(n) : s;
208
214
  } });
209
- function M(t, e = "BackendError") {
215
+ function L(t, e = "BackendError") {
210
216
  switch (t) {
211
217
  case 400: return "ValidationError";
212
218
  case 401: return "AuthenticationFailed";
@@ -221,7 +227,7 @@ function M(t, e = "BackendError") {
221
227
  default: return e;
222
228
  }
223
229
  }
224
- var L = class {
230
+ var j = class {
225
231
  _plugins = /* @__PURE__ */ new Map();
226
232
  _listeners = /* @__PURE__ */ new Map();
227
233
  _getOrCreateEntry(t) {
@@ -334,7 +340,7 @@ var L = class {
334
340
  t.add(e, r);
335
341
  } };
336
342
  }
337
- }, j = class {
343
+ }, P = class {
338
344
  resolveRegistry;
339
345
  constructor(t) {
340
346
  this.resolveRegistry = t;
@@ -381,23 +387,20 @@ var L = class {
381
387
  forContext() {
382
388
  return this.target().forContext();
383
389
  }
384
- }, P = "PluginRegistry";
385
- function U(t = m()) {
386
- return t.getOrCreateInstance(P, () => new L());
387
- }
388
- var G = new j(() => U());
389
- function H(t) {
390
- return t;
390
+ }, U = "PluginRegistry";
391
+ function F(t = x()) {
392
+ return t.getOrCreateInstance(U, () => new j());
391
393
  }
394
+ var G = new P(() => F());
392
395
  function l(t) {
393
- return c(t);
396
+ return a(t);
394
397
  }
395
398
  l("HANDLE_ATOM_INSERT");
396
399
  l("SETTINGS_PANEL_EVENT");
397
400
  l("MODAL_SHOW_EVENT");
398
401
  l("MODAL_CLOSE_EVENT");
399
402
  l("MODAL_UPDATE_EVENT");
400
- var ee = c("client"), ie = /* @__PURE__ */ E({ FileManagerApiError: () => F }), F = class I extends Error {
403
+ var oe = /* @__PURE__ */ v({ FileManagerApiError: () => V }), V = class D extends Error {
401
404
  code;
402
405
  status;
403
406
  details;
@@ -405,7 +408,7 @@ var ee = c("client"), ie = /* @__PURE__ */ E({ FileManagerApiError: () => F }),
405
408
  return this.status;
406
409
  }
407
410
  constructor(e, r, n, s) {
408
- super(e), this.name = "FileManagerApiError", this.code = r, this.status = n, this.details = s, Error.captureStackTrace && Error.captureStackTrace(this, I);
411
+ super(e), this.name = "FileManagerApiError", this.code = r, this.status = n, this.details = s, Error.captureStackTrace && Error.captureStackTrace(this, D);
409
412
  }
410
- }, oe = /* @__PURE__ */ E({ mapHttpStatusToErrorCode: () => M });
411
- export { G as a, O as c, f as d, H as i, D as l, ie as n, V as o, ee as r, c as s, oe as t, p as u };
413
+ }, ae = /* @__PURE__ */ v({ mapHttpStatusToErrorCode: () => L });
414
+ export { f as a, a as i, oe as n, G as r, ae as t };
@@ -1,127 +1,127 @@
1
- import { d as P, s as n } from "./e21389f1.js";
1
+ import { a as P, i as I } from "./1ce2bc32.js";
2
2
  import "@emailmaker/emailmaker/runtime/react";
3
- function D(o) {
3
+ function i(o) {
4
4
  if (o instanceof DOMException && o.name === "AbortError") return o;
5
5
  const t = o === void 0 ? "The operation was aborted." : typeof o == "string" ? o : o instanceof Error ? o.message : String(o);
6
6
  return new DOMException(t, "AbortError");
7
7
  }
8
- function S(o) {
9
- if (o?.aborted) throw D(o.reason);
8
+ function f(o) {
9
+ if (o?.aborted) throw i(o.reason);
10
10
  }
11
11
  function l(o, t) {
12
- return t ? (S(t), new Promise((e, E) => {
13
- const _ = () => {
14
- N(), E(D(t.reason));
12
+ return t ? (f(t), new Promise((_, E) => {
13
+ const n = () => {
14
+ N(), E(i(t.reason));
15
15
  }, N = () => {
16
- t.removeEventListener("abort", _);
16
+ t.removeEventListener("abort", n);
17
17
  };
18
- t.addEventListener("abort", _), o.then((i) => {
19
- N(), e(i);
20
- }, (i) => {
21
- N(), E(i);
18
+ t.addEventListener("abort", n), o.then((D) => {
19
+ N(), _(D);
20
+ }, (D) => {
21
+ N(), E(D);
22
22
  });
23
23
  })) : o;
24
24
  }
25
- function p(o) {
25
+ function M(o) {
26
26
  return typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(o) : o.replace(/([^a-zA-Z0-9_-])/g, "\\$1");
27
27
  }
28
- function a(o, t = document) {
28
+ function T(o, t = document) {
29
29
  try {
30
30
  const E = t.querySelector(o);
31
31
  if (E) return E;
32
32
  } catch {
33
33
  return null;
34
34
  }
35
- const e = t.querySelectorAll("*");
36
- for (let E = 0; E < e.length; E++) {
37
- const _ = e[E]?.shadowRoot;
38
- if (!_) continue;
39
- const N = a(o, _);
35
+ const _ = t.querySelectorAll("*");
36
+ for (let E = 0; E < _.length; E++) {
37
+ const n = _[E]?.shadowRoot;
38
+ if (!n) continue;
39
+ const N = T(o, n);
40
40
  if (N) return N;
41
41
  }
42
42
  return null;
43
43
  }
44
- function C(o, t = []) {
45
- const e = o.querySelectorAll("*");
46
- for (let E = 0; E < e.length; E++) {
47
- const _ = e[E]?.shadowRoot;
48
- _ && (t.push(_), C(_, t));
44
+ function R(o, t = []) {
45
+ const _ = o.querySelectorAll("*");
46
+ for (let E = 0; E < _.length; E++) {
47
+ const n = _[E]?.shadowRoot;
48
+ n && (t.push(n), R(n, t));
49
49
  }
50
50
  return t;
51
51
  }
52
- function b(o, t, e) {
52
+ function p(o, t, _) {
53
53
  if (o.isConnected) return o;
54
54
  const E = o.id?.trim();
55
- return E ? M(`#${p(E)}`, t, e) : Promise.reject(D("Editor mount element was disconnected and has no id — pass a CSS selector or call init() again after the host remounts the container."));
55
+ return E ? b(`#${M(E)}`, t, _) : Promise.reject(i("Editor mount element was disconnected and has no id — pass a CSS selector or call init() again after the host remounts the container."));
56
56
  }
57
- function M(o, t, e) {
58
- if (S(e), typeof o < "u") {
57
+ function b(o, t, _) {
58
+ if (f(_), typeof o < "u") {
59
59
  if (typeof o == "string") {
60
- const E = o, _ = a(E);
61
- if (_) return _;
60
+ const E = o, n = T(E);
61
+ if (n) return n;
62
62
  const N = t.addDisposable(new P());
63
- return new Promise((i, T) => {
64
- const c = (I) => {
65
- N.dispose(), I();
66
- }, O = () => {
67
- c(() => T(D(e?.reason)));
63
+ return new Promise((D, a) => {
64
+ const O = (e) => {
65
+ N.dispose(), e();
66
+ }, c = () => {
67
+ O(() => a(i(_?.reason)));
68
68
  };
69
- if (e?.aborted) {
70
- O();
69
+ if (_?.aborted) {
70
+ c();
71
71
  return;
72
72
  }
73
- e?.addEventListener("abort", O), N.addDispose(() => e?.removeEventListener("abort", O));
73
+ _?.addEventListener("abort", c), N.addDispose(() => _?.removeEventListener("abort", c));
74
74
  const u = document.body ?? document.documentElement;
75
75
  if (!u) {
76
- c(() => T(D("Document is not ready to observe mount element")));
76
+ O(() => a(i("Document is not ready to observe mount element")));
77
77
  return;
78
78
  }
79
- const s = /* @__PURE__ */ new Set(), L = new MutationObserver(() => {
80
- const I = a(E);
81
- if (I) {
82
- c(() => i(I));
79
+ const A = /* @__PURE__ */ new Set(), L = new MutationObserver(() => {
80
+ const e = T(E);
81
+ if (e) {
82
+ O(() => D(e));
83
83
  return;
84
84
  }
85
- A();
86
- }), d = (I) => {
87
- s.has(I) || (s.add(I), L.observe(I, {
85
+ S();
86
+ }), d = (e) => {
87
+ A.has(e) || (A.add(e), L.observe(e, {
88
88
  attributes: !0,
89
89
  childList: !0,
90
90
  subtree: !0
91
91
  }));
92
- }, A = () => {
93
- const I = document.documentElement;
94
- if (I) for (const R of C(I)) d(R);
92
+ }, S = () => {
93
+ const e = document.documentElement;
94
+ if (e) for (const C of R(e)) d(C);
95
95
  };
96
- d(u), A(), N.addDispose(() => L.disconnect());
96
+ d(u), S(), N.addDispose(() => L.disconnect());
97
97
  });
98
98
  }
99
- return o instanceof Element ? b(o, t, e) : o;
99
+ return o instanceof Element ? p(o, t, _) : o;
100
100
  }
101
101
  return o;
102
102
  }
103
103
  var w = /* @__PURE__ */ new Map();
104
- n("ELEMENT_INSERT_HTML_PIPELINE");
105
- n("BLOCK_INSERT_HTML_PIPELINE");
106
- n("DomComponentRegistry");
107
- n("ComponentRegistry");
104
+ I("ELEMENT_INSERT_HTML_PIPELINE");
105
+ I("BLOCK_INSERT_HTML_PIPELINE");
106
+ I("DomComponentRegistry");
107
+ I("ComponentRegistry");
108
108
  function r(o) {
109
- return n(o);
109
+ return I(o);
110
110
  }
111
- var f;
111
+ var s;
112
112
  (function(o) {
113
- o.BEFORE_SAVE_EMAIL = r(), o.ON_SAVEBUTTON_CLICK_ID = r(), o.ON_NEXTBUTTON_CLICK_ID = r(), o.ON_PREVIOUSBUTTON_CLICK_ID = r(), o.ON_MODEL_CHANGE = r(), o.WILL_EMAIL_INIT_ID = r(), o.ON_EMAIL_INIT_ID = r(), o.ON_BLOCK_INIT_ID = r(), o.ON_CONTENT_CHANGED_ID = r(), o.ON_PREHEADER_CHANGED_ID = r(), o.ON_SUBJECT_CHANGED_ID = r(), o.ON_EMAIL_CHANGED_ID = r(), o.ON_BLOCK_CHANGED_ID = r(), o.ON_CHUNKS_LOADED = r(), o.ON_SEND_TESTEMAIL_ID = r(), o.ON_SEND_LIVEPREVIEW_ID = r(), o.ON_SHARE_ID = r(), o.ON_SHOW_PREVIEW_ID = r(), o.ON_EMAIL_CLONE_ID = r(), o.ON_SEND_EMAIL_MODAL_ID = r(), o.ON_NOTIFICATION = r(), o.READ_LOCALE = r(), o.ON_TRANSLATE_ID = r(), o.ON_CODE_VALIDATE_ID = r(), o.UPLOAD_EVENT_ID = r(), o.PROXY_URL_EVENT_ID = r(), o.FILE_PROXY_EVENT_ID = r(), o.ON_LIMIT_ID = r(), o.ON_BROWSER_EXTENSION_DETECTED_ID = r(), o.ON_LAYOUT_CONVERT_REQUEST_ID = r(), o.ON_BROWSER_TRANSLATE_DETECTED_ID = r();
114
- })(f || (f = {}));
115
- n();
116
- n();
117
- n("InitPipelineContext");
118
- n();
119
- n();
120
- n();
121
- n();
122
- n();
123
- n();
124
- n("PluginCollection");
113
+ o.BEFORE_SAVE_EMAIL = r(), o.ON_SAVEBUTTON_CLICK_ID = r(), o.ON_NEXTBUTTON_CLICK_ID = r(), o.ON_PREVIOUSBUTTON_CLICK_ID = r(), o.ON_MODEL_CHANGE = r(), o.WILL_EMAIL_INIT_ID = r(), o.ON_EMAIL_INIT_ID = r(), o.ON_BLOCK_INIT_ID = r(), o.ON_CONTENT_CHANGED_ID = r(), o.ON_PREHEADER_CHANGED_ID = r(), o.ON_SUBJECT_CHANGED_ID = r(), o.ON_EMAIL_CHANGED_ID = r(), o.ON_BLOCK_CHANGED_ID = r(), o.ON_CHUNKS_LOADED = r(), o.ON_SEND_TESTEMAIL_ID = r(), o.ON_SEND_LIVEPREVIEW_ID = r(), o.ON_SHARE_ID = r(), o.ON_SHOW_PREVIEW_ID = r(), o.ON_EMAIL_CLONE_ID = r(), o.ON_SEND_EMAIL_MODAL_ID = r(), o.ON_NOTIFICATION = r(), o.READ_LOCALE = r(), o.ON_TRANSLATE_ID = r(), o.ON_CODE_VALIDATE_ID = r(), o.UPLOAD_EVENT_ID = r(), o.PROXY_URL_EVENT_ID = r(), o.FILE_PROXY_EVENT_ID = r(), o.ON_LIMIT_ID = r(), o.ON_BROWSER_EXTENSION_DETECTED_ID = r(), o.ON_LAYOUT_CONVERT_REQUEST_ID = r(), o.ON_BROWSER_TRANSLATE_DETECTED_ID = r(), o.AI_TEXT_REQUEST_ID = r(), o.AI_IMAGE_REQUEST_ID = r(), o.AI_TEXT_PROGRESS_ID = r(), o.AI_IMAGE_PROGRESS_ID = r(), o.AI_TEXT_STREAM_ID = r();
114
+ })(s || (s = {}));
115
+ I();
116
+ I();
117
+ I("InitPipelineContext");
118
+ I();
119
+ I();
120
+ I();
121
+ I();
122
+ I();
123
+ I();
124
+ I("PluginCollection");
125
125
  r("APP_LOAD_EVENT");
126
126
  r("CONFIG_CHANGED_EVENT");
127
- export { S as a, l as i, M as n, D as r, w as t };
127
+ export { f as a, l as i, b as n, i as r, w as t };
@@ -1,8 +1,8 @@
1
1
  import { r as s, t as l } from "./rolldown-runtime-Bklm4c_g.js";
2
- import { t as kt } from "./react-DIf5CLST.js";
3
- import { t as Nt } from "./react-dom-Cc3IcUkg.js";
4
- import { t as Ut } from "./client-CM3WFcip.js";
5
- import { c as Wt, i as Zt, l as Kt, o as Qt, t as b } from "./defineProperty-B-FyVNQF.js";
2
+ import { t as kt } from "./react-BHNx_xzv.js";
3
+ import { t as Nt } from "./react-dom-CyByzibb.js";
4
+ import { t as Ut } from "./client-CfXgU5Vo.js";
5
+ import { c as Wt, i as Zt, l as Kt, o as Qt, t as b } from "./defineProperty-C_9hhJHt.js";
6
6
  var n = s(kt()), Xe = (t) => {
7
7
  const e = n.useRef(t);
8
8
  return e.current = t, n.useCallback((...r) => e.current?.(...r), []);