useblocks 1.1.46 → 1.1.53

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 (82) hide show
  1. package/iframe/js/amp.BP7EklKo.js +1 -0
  2. package/iframe/js/iframe-eblock.js +1 -1
  3. package/iframe/js/iframe.js +1 -1
  4. package/iframe/js/rules.4N5s3OV-.js +1 -1
  5. package/monacoeditorwork/css.worker.bundle.js +40524 -40442
  6. package/monacoeditorwork/editor.worker.bundle.js +9740 -9697
  7. package/monacoeditorwork/html.worker.bundle.js +50513 -50431
  8. package/monacoeditorwork/json.worker.bundle.js +14570 -14527
  9. package/monacoeditorwork/ts.worker.bundle.js +119593 -119455
  10. package/npm-publish.manifest.json +7 -7
  11. package/package.json +1 -1
  12. package/runtime/@ant-design/cssinjs/index.js +1 -1
  13. package/runtime/@ant-design/icons/index.js +2 -2
  14. package/runtime/README.md +1 -1
  15. package/runtime/THIRD_PARTY_LICENSES.txt +71 -43
  16. package/runtime/antd/index.js +1 -1
  17. package/runtime/react/index.js +3 -3
  18. package/runtime/react/jsx-runtime/index.js +1 -1
  19. package/runtime/react-dom/client/index.js +4 -4
  20. package/runtime/react-dom/index.js +3 -3
  21. package/runtime/react-router-dom/index.js +2 -2
  22. package/singlepage_headless_plugin.html +1 -1
  23. package/static/core/{6b8432a3.js → 139e4380.js} +3 -3
  24. package/static/core/{90ec6d2b2.js → 1995fb0a2.js} +182 -153
  25. package/static/core/{6df04323.js → 1f5e1fc9.js} +573 -554
  26. package/static/core/31e98e6e.js +2095 -0
  27. package/static/core/5318562c.js +924 -0
  28. package/static/core/{6e2d88d5.js → 75737a9d.js} +6209 -6155
  29. package/static/core/{cc8f145d.js → 9929a348.js} +64 -64
  30. package/static/core/b408f33a.js +655 -0
  31. package/static/core/{526b23c2.js → bc7e3d2b.js} +7 -7
  32. package/static/core/{4eb628d3.js → c3058168.js} +3958 -3702
  33. package/static/core/ce0410b1.js +467 -0
  34. package/static/core/{b9529b8a.js → d1eb3c68.js} +17060 -16835
  35. package/static/core/{b8b730b2.js → dc1f9e4f.js} +17 -17
  36. package/static/core/{4a2af478.js → e1d239ab.js} +41 -41
  37. package/static/core/{9c1c1b89.js → e5e07f1d.js} +856 -755
  38. package/static/core/{350eac23.js → ebd852b6.js} +1756 -1702
  39. package/static/core/{cefd6620.js → ee0ddb51.js} +7782 -6601
  40. package/static/core/{a321a57d.js → f3cff4c9.js} +159 -159
  41. package/static/esm/{dab4cdfd.js → 448d4bb0.js} +70 -70
  42. package/static/esm/{7c5227f0.js → d180c108.js} +50 -47
  43. package/static/runtime/{DownloadOutlined-CgJ8OpH_.js → DownloadOutlined-Dg_G2xO7.js} +4 -4
  44. package/static/runtime/client-CfXgU5Vo.js +7580 -0
  45. package/static/runtime/{defineProperty-B-FyVNQF.js → defineProperty-C_9hhJHt.js} +1 -1
  46. package/static/runtime/dom-export-CHgQ7Ws9.js +8069 -0
  47. package/static/runtime/{es-DnZp8dh1.js → es-BPfImJ0x.js} +5 -5
  48. package/static/runtime/{es-B2DS-PLP.js → es-DcH6fwd6.js} +2 -2
  49. package/static/runtime/{es-deqzngIL.js → es-_OY-D9g1.js} +2 -2
  50. package/static/runtime/{jsx-dev-runtime-Wj1_6O79.js → jsx-dev-runtime-DDukXY54.js} +2 -2
  51. package/static/runtime/jsx-runtime-BodCQYDg.js +22 -0
  52. package/static/runtime/react-BHNx_xzv.js +290 -0
  53. package/static/runtime/react-dom-CyByzibb.js +127 -0
  54. package/two_step_headless_plugin.html +1 -1
  55. package/ui-kit/index.js +49 -47
  56. package/{useblocks-core.2116f1b9.js → useblocks-core.2a5dade1.js} +82 -76
  57. package/useblocks-esm.js +628 -3198
  58. package/useblocks.d.ts +184 -52
  59. package/useblocks.js +818 -12588
  60. package/vite/index.cjs +46 -21
  61. package/vite/index.d.ts +0 -1
  62. package/vite/index.js +46 -21
  63. package/vite/pluginDev/index.d.ts +0 -1
  64. package/webpack/index.cjs +46 -21
  65. package/webpack/index.d.ts +0 -1
  66. package/webpack/index.js +46 -21
  67. package/webpack/pluginDev/index.d.ts +0 -1
  68. package/iframe/js/amp.CVC2Iq48.js +0 -1
  69. package/static/core/35e13192.js +0 -463
  70. package/static/core/9421a704.js +0 -869
  71. package/static/core/9c79239d.js +0 -2063
  72. package/static/core/df0652cc.js +0 -1119
  73. package/static/esm/2fb07398.js +0 -3480
  74. package/static/esm/352121c5.js +0 -55
  75. package/static/esm/64966e1c.js +0 -18
  76. package/static/runtime/client-CM3WFcip.js +0 -7
  77. package/static/runtime/dist-DUS42Hru.js +0 -3421
  78. package/static/runtime/jsx-runtime-DmPQfqtr.js +0 -28
  79. package/static/runtime/react-DIf5CLST.js +0 -258
  80. package/static/runtime/react-dom-Cc3IcUkg.js +0 -5604
  81. /package/iframe/{iframe-eblock.2116f1b9.html → iframe-eblock.2a5dade1.html} +0 -0
  82. /package/iframe/{iframe.2116f1b9.html → iframe.2a5dade1.html} +0 -0
@@ -1,13 +1,13 @@
1
1
  (function(){try{if(typeof document<"u"){var e=document.createElement("style");e.setAttribute("data-useblocks","true"),e.appendChild(document.createTextNode('@import "https://fonts.googleapis.com/css2?family=Geologica:wght@300;600&display=swap";.blocks-app .ant-modal.premium-features-modal .ant-modal-container{border-radius:calc(var(--borderRadiusXL) * 2px);padding:20px 19px}.blocks-app .premium-features-modal .modal-title{text-align:center;margin-bottom:0;font-size:32px}.blocks-app .premium-features-modal .ant-carousel .slick-dots li button{opacity:.5;background:#fff}.blocks-app .premium-features-modal .ant-carousel .slick-dots li.slick-active button{opacity:1}.blocks-app .premium-features-modal .modal-subtitle{text-align:center;margin-bottom:20px;font-size:18px}.blocks-app .premium-features-modal .carousel-slider{margin-bottom:20px}.blocks-app .premium-features-modal .slick-list{border-radius:calc(var(--borderRadiusXL) * 1.5px)}.blocks-app .premium-features-modal .slick-slide{padding:0 5px}.blocks-app .premium-features-modal .carousel-slide{border-radius:calc(var(--borderRadiusXL) * 1.5px);justify-content:flex-end;align-items:center;height:480px;display:flex}.blocks-app .premium-features-modal .slide-item-image{width:50%;padding:24px 0 24px 32px}.blocks-app .premium-features-modal .slide-item-image img{border-radius:calc(var(--borderRadiusXL) * 1.3px);width:100%}.blocks-app .premium-features-modal .slide-item-content{width:50%;padding:48px}.blocks-app .premium-features-modal .slide-title{margin-bottom:48px;font-size:50px;font-weight:700;line-height:1}.blocks-app .premium-features-modal .slide-description{font-size:22px}.blocks-app .premium-features-modal .modal-buttons{justify-content:center;gap:10px;display:flex}.blocks-app .premium-features-modal .modal-buttons button{padding:0 30px}.blocks-app .limit-upgrade-modal.ant-modal{max-width:calc(100vw - 24px)}.blocks-app .limit-upgrade-modal .ant-modal-content{border-radius:16px;padding:0;overflow:hidden;box-shadow:0 12px 24px -4px #191d3a14}.blocks-app .limit-upgrade-modal .ant-modal-header{display:none}.blocks-app .limit-upgrade-modal .ant-modal-content .ant-modal-body{padding:0}.blocks-app .limit-upgrade-modal__wrap{background:var(--colorBgContainer);flex-direction:column;align-items:center;width:400px;max-width:100%;display:flex}.blocks-app .limit-upgrade-modal__header{box-sizing:border-box;flex-direction:row;justify-content:flex-end;align-items:center;width:100%;min-height:34px;padding:8px 8px 0;display:flex}.blocks-app .limit-upgrade-modal__close{background:var(--colorBgContainer);width:34px;height:34px;color:var(--colorTextSecondary);cursor:pointer;border:none;border-radius:6px;justify-content:center;align-items:center;margin:0;padding:0;transition:background .15s,color .15s;display:flex}.blocks-app .limit-upgrade-modal__close:hover{background:var(--colorFillTertiary);color:var(--colorText)}.blocks-app .limit-upgrade-modal__close .anticon{font-size:16px}.blocks-app .limit-upgrade-modal__body{box-sizing:border-box;flex-direction:column;align-items:center;gap:16px;width:100%;padding:0 40px 24px;display:flex}.blocks-app .limit-upgrade-modal__title{text-align:center;max-width:320px;color:var(--colorText);margin:0;font-size:18px;font-weight:400;line-height:130%}.blocks-app .limit-upgrade-modal__subtitle{text-align:center;max-width:320px;color:var(--colorTextSecondary);margin:0;font-size:14px;font-weight:100;line-height:120%}.blocks-app .limit-upgrade-modal__limits-row{flex-flow:wrap;justify-content:center;align-items:center;gap:8px;width:100%;max-width:320px;display:flex}.blocks-app .limit-upgrade-modal__icon-circle{box-sizing:border-box;border:1px solid var(--colorText);width:34px;height:34px;color:var(--colorText);border-radius:32px;flex:none;justify-content:center;align-items:center;padding:8px;display:flex}.blocks-app .limit-upgrade-modal__icon-circle .anticon{font-size:18px}.blocks-app .limit-upgrade-modal__icon-circle svg{flex-shrink:0;width:18px;height:18px;display:block}.blocks-app .limit-upgrade-modal__limit-old{color:#f85243;flex-shrink:0;font-size:40px;font-weight:100;line-height:100%}.blocks-app .limit-upgrade-modal__arrow-btn{color:#fff;background:#8946fb;border-radius:38px;flex:none;justify-content:center;align-items:center;width:34px;height:34px;display:flex}.blocks-app .limit-upgrade-modal__arrow-icon{font-size:16px;transform:rotate(45deg)}.blocks-app .limit-upgrade-modal__limit-new{color:#7ed846;flex-shrink:0;font-size:40px;font-weight:400;line-height:100%}.blocks-app .limit-upgrade-modal__limit-new--infinity{font-size:36px;line-height:40px}.blocks-app .limit-upgrade-modal__divider{border:none;border-top:1px solid var(--colorBorderSecondary);width:100%;height:0;margin:0}.blocks-app .limit-upgrade-modal__footer{box-sizing:border-box;flex-direction:column;justify-content:center;align-items:center;width:100%;padding:16px 0;display:flex}.blocks-app .limit-upgrade-modal__footer--dual{flex-flow:wrap;justify-content:center;align-items:center;gap:8px;padding:16px}.blocks-app .limit-upgrade-modal__cta.ant-btn-primary{min-width:147px;height:32px;box-shadow:none;background:#2884ff;border-color:#2884ff;border-radius:6px;padding:8px 16px;font-size:14px;font-weight:400;line-height:19px}.blocks-app .limit-upgrade-modal__cta.ant-btn-primary:hover{background:#1a75f0;border-color:#1a75f0}.blocks-app .limit-upgrade-modal__cta-secondary.ant-btn-default{border-color:var(--colorBorder);min-width:147px;height:32px;color:var(--colorText);box-shadow:none;border-radius:6px;padding:8px 16px;font-size:14px;font-weight:400;line-height:19px}.blocks-app .limit-upgrade-modal__cta-secondary.ant-btn-default:hover{color:#2884ff;border-color:#2884ff}')),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
- __useblocks__.define("static/core/90ec6d2b2.js", [
2
+ __useblocks__.define("static/core/1995fb0a2.js", [
3
3
  "require",
4
4
  "exports",
5
5
  "module",
6
6
  "static/core/bd36b180.js",
7
- "static/core/cefd6620.js",
8
- "static/core/9421a704.js",
9
- "static/core/350eac23.js",
10
- "static/core/6e2d88d5.js",
7
+ "static/core/ee0ddb51.js",
8
+ "static/core/5318562c.js",
9
+ "static/core/ebd852b6.js",
10
+ "static/core/75737a9d.js",
11
11
  "react",
12
12
  "react-dom",
13
13
  "react-router-dom",
@@ -16,25 +16,44 @@ __useblocks__.define("static/core/90ec6d2b2.js", [
16
16
  "react-dom/client",
17
17
  "@ant-design/icons",
18
18
  "@ant-design/cssinjs"
19
- ], function(l, s, G) {
20
- const C = l("./bd36b180.js"), b = l("./cefd6620.js"), v = l("./9421a704.js"), d = l("./350eac23.js");
21
- l("./6e2d88d5.js");
22
- let o = l("react");
23
- o = C.__toESM(o);
24
- l("react-dom");
25
- let K = l("react-router-dom"), t = l("react/jsx-runtime");
26
- l("antd");
27
- l("react-dom/client");
28
- l("@ant-design/icons");
29
- l("@ant-design/cssinjs");
30
- var E = ({ open: e, sideOnOk: a, onCancel: r, initialSlide: n = 0 }) => {
31
- const { __: i } = d.useI18n(), m = (0, K.useNavigate)(), [c, h] = (0, o.useState)(n), g = (0, o.useRef)(null), u = b.usePushToDataLayer(), f = () => {
32
- a && a(), m("/billing"), r(!1);
19
+ ], function(c, o, Z) {
20
+ const E = c("./bd36b180.js"), b = c("./ee0ddb51.js"), v = c("./5318562c.js"), m = c("./ebd852b6.js");
21
+ c("./75737a9d.js");
22
+ let s = c("react");
23
+ s = E.__toESM(s);
24
+ c("react-dom");
25
+ let K = c("react-router-dom"), r = c("react/jsx-runtime");
26
+ c("antd");
27
+ c("react-dom/client");
28
+ c("@ant-design/icons");
29
+ c("@ant-design/cssinjs");
30
+ function O(e, t) {
31
+ return e == null || t == null ? !1 : String(e) === String(t);
32
+ }
33
+ function x(e, t) {
34
+ if (e?.myRole === "owner" || e?.myRole === "admin") return e.myRole;
35
+ if (e?.myRole === "user" || e?.myRole === "viewer") return "user";
36
+ const a = Array.isArray(e?.members) ? e.members : [], n = Array.isArray(e?.invites) ? e.invites : [];
37
+ if (t?.id == null || t.id === "") return null;
38
+ const i = a.find((l) => O(l?.userId, t.id));
39
+ if (i) {
40
+ if (i.role === "owner" || i.role === "admin") return i.role;
41
+ if (i.role === "user" || i.role === "viewer") return "user";
42
+ }
43
+ const u = t.email?.trim().toLowerCase();
44
+ return u && n.some((l) => l?.email?.trim().toLowerCase() === u) ? "invited" : null;
45
+ }
46
+ function R(e, t) {
47
+ return x(e, t) === "owner";
48
+ }
49
+ var S = ({ open: e, sideOnOk: t, onCancel: a, initialSlide: n = 0 }) => {
50
+ const { __: i } = m.useI18n(), u = (0, K.useNavigate)(), [l, y] = (0, s.useState)(n), g = (0, s.useRef)(null), d = b.usePushToDataLayer(), f = () => {
51
+ t && t(), u("/billing"), a(!1);
33
52
  };
34
- (0, o.useEffect)(() => {
35
- e && g.current && (g.current.goTo(n, !0), h(n));
53
+ (0, s.useEffect)(() => {
54
+ e && g.current && (g.current.goTo(n, !0), y(n));
36
55
  }, [e, n]);
37
- const _ = (0, o.useMemo)(() => [
56
+ const h = (0, s.useMemo)(() => [
38
57
  {
39
58
  image: i("https://cdn.useblocks.io/1351/241017_18_1sGjUaZ.png"),
40
59
  backgroundColor: "var(--blue-2)",
@@ -96,11 +115,11 @@ __useblocks__.define("static/core/90ec6d2b2.js", [
96
115
  description: i("Let our AI assistant enhance your email template! From creating subject lines and preheaders based on the email copy to generating the whole email with your website in mind!")
97
116
  }
98
117
  ], [i]);
99
- return (0, o.useEffect)(() => {
118
+ return (0, s.useEffect)(() => {
100
119
  if (e && g.current) {
101
- g.current.goTo(n, !0), h(n);
102
- const p = _[n];
103
- u({
120
+ g.current.goTo(n, !0), y(n);
121
+ const p = h[n];
122
+ d({
104
123
  event: "open_modal",
105
124
  action: "open_premium-features_modal",
106
125
  modal_id: "premium-features",
@@ -109,13 +128,13 @@ __useblocks__.define("static/core/90ec6d2b2.js", [
109
128
  }
110
129
  }, [
111
130
  e,
112
- _,
131
+ h,
113
132
  n,
114
- u
115
- ]), (0, t.jsxs)(d.Modal, {
133
+ d
134
+ ]), (0, r.jsxs)(m.Modal, {
116
135
  open: e,
117
136
  footer: null,
118
- onCancel: r,
137
+ onCancel: a,
119
138
  closable: !1,
120
139
  className: "premium-features-modal",
121
140
  classNames: { mask: "premium-features-modal-mask" },
@@ -123,7 +142,7 @@ __useblocks__.define("static/core/90ec6d2b2.js", [
123
142
  width: 1100,
124
143
  style: { maxWidth: "80%" },
125
144
  children: [
126
- (0, t.jsx)(d.Carousel, {
145
+ (0, r.jsx)(m.Carousel, {
127
146
  dots: !0,
128
147
  slidesToShow: 1,
129
148
  slidesToScroll: 1,
@@ -131,40 +150,40 @@ __useblocks__.define("static/core/90ec6d2b2.js", [
131
150
  className: "carousel-slider",
132
151
  draggable: !0,
133
152
  autoplaySpeed: 5e3,
134
- initialSlide: c,
153
+ initialSlide: l,
135
154
  ref: g,
136
- children: _.map((p, k) => (0, t.jsx)("div", { children: (0, t.jsxs)("div", {
155
+ children: h.map((p, k) => (0, r.jsx)("div", { children: (0, r.jsxs)("div", {
137
156
  className: "carousel-slide",
138
157
  style: { background: `${p.backgroundColor}` },
139
- children: [(0, t.jsx)("div", {
158
+ children: [(0, r.jsx)("div", {
140
159
  className: "slide-item-image",
141
- children: (0, t.jsx)("img", {
160
+ children: (0, r.jsx)("img", {
142
161
  src: p.image,
143
162
  alt: `slide-${k}`
144
163
  })
145
- }), (0, t.jsxs)("div", {
164
+ }), (0, r.jsxs)("div", {
146
165
  className: "slide-item-content",
147
- children: [(0, t.jsx)("h3", {
166
+ children: [(0, r.jsx)("h3", {
148
167
  className: "slide-title",
149
168
  children: p.title
150
- }), (0, t.jsx)("p", {
169
+ }), (0, r.jsx)("p", {
151
170
  className: "slide-description",
152
171
  children: p.description
153
172
  })]
154
173
  })]
155
174
  }) }, k))
156
175
  }),
157
- (0, t.jsx)("div", {
176
+ (0, r.jsx)("div", {
158
177
  className: "modal-subtitle",
159
178
  children: i("This and other features are available for you on any paid plan.")
160
179
  }),
161
- (0, t.jsxs)("div", {
180
+ (0, r.jsxs)("div", {
162
181
  className: "modal-buttons",
163
- children: [(0, t.jsx)(d.Button, {
182
+ children: [(0, r.jsx)(m.Button, {
164
183
  size: "large",
165
- onClick: () => r(!1),
184
+ onClick: () => a(!1),
166
185
  children: i("Cancel")
167
- }), (0, t.jsx)(d.Button, {
186
+ }), (0, r.jsx)(m.Button, {
168
187
  type: "primary",
169
188
  size: "large",
170
189
  onClick: f,
@@ -175,26 +194,26 @@ __useblocks__.define("static/core/90ec6d2b2.js", [
175
194
  ]
176
195
  });
177
196
  };
178
- function x(e) {
197
+ function j(e) {
179
198
  return e = e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim, ""), e = e.replace(/<\/?(?:script|embed|object|frameset|frame|iframe|applet|meta)[^>]*>/gi, ""), e = e.replace(/ on\w+="[^"]*"/g, ""), e = e.replace(/ on\w+='[^']*'/g, ""), e;
180
199
  }
181
- var y = o.default.forwardRef(({ icon: e, ...a }, r) => {
200
+ var _ = s.default.forwardRef(({ icon: e, ...t }, a) => {
182
201
  const n = b.useAppConfig();
183
- return (0, t.jsx)(d.EmIcons, {
184
- ref: r,
202
+ return (0, r.jsx)(m.EmIcons, {
203
+ ref: a,
185
204
  icon: e,
186
- configIcons: (0, o.useMemo)(() => {
205
+ configIcons: (0, s.useMemo)(() => {
187
206
  if (!n?.icons) return;
188
207
  const i = {};
189
- for (const [m, c] of Object.entries(n.icons)) typeof c == "string" && (i[m] = x(c));
208
+ for (const [u, l] of Object.entries(n.icons)) typeof l == "string" && (i[u] = j(l));
190
209
  return Object.keys(i).length > 0 ? i : void 0;
191
210
  }, [n?.icons]),
192
211
  strokeWidth: n?.iconStrokeWidth,
193
- ...a
212
+ ...t
194
213
  });
195
214
  });
196
- y.displayName = "EmIcons";
197
- var j = {
215
+ _.displayName = "EmIcons";
216
+ var w = {
198
217
  ai: "AIRequests",
199
218
  email_generate: "EmailEnvelope",
200
219
  image_generate: "Image",
@@ -208,22 +227,22 @@ __useblocks__.define("static/core/90ec6d2b2.js", [
208
227
  blocks: "Block",
209
228
  users: "SliderGroup"
210
229
  };
211
- function w(e, a) {
230
+ function P(e, t) {
212
231
  if (e == null) return null;
213
232
  if (typeof e == "number" || typeof e == "string") {
214
- const r = e === "∞" || e === "∞" || e === "infinity" || typeof e == "string" && e.toLowerCase() === "infinity";
215
- return (0, t.jsx)("span", {
216
- className: a === "old" ? "limit-upgrade-modal__limit-old" : `limit-upgrade-modal__limit-new${r ? " limit-upgrade-modal__limit-new--infinity" : ""}`,
217
- children: r ? "∞" : e
233
+ const a = e === "∞" || typeof e == "string" && e.toLowerCase() === "infinity";
234
+ return (0, r.jsx)("span", {
235
+ className: t === "old" ? "limit-upgrade-modal__limit-old" : `limit-upgrade-modal__limit-new${a ? " limit-upgrade-modal__limit-new--infinity" : ""}`,
236
+ children: a ? "∞" : e
218
237
  });
219
238
  }
220
239
  return e;
221
240
  }
222
- var S = ({ open: e, onClose: a, title: r, subtitle: n, usageResource: i, icon: m, previousDisplay: c, nextDisplay: h, onChangePlan: g, secondaryAction: u, changePlanLabel: f }) => {
223
- const { __: _ } = d.useI18n(), p = f ?? _("Change plan"), k = !!u, z = i != null ? (0, t.jsx)(y, { icon: j[i] }) : m ?? null;
224
- return (0, t.jsx)(d.Modal, {
241
+ var N = ({ open: e, onClose: t, title: a, subtitle: n, usageResource: i, icon: u, previousDisplay: l, nextDisplay: y, onChangePlan: g, secondaryAction: d, changePlanLabel: f }) => {
242
+ const { __: h } = m.useI18n(), p = f ?? h("Change plan"), k = !!d, H = i != null ? (0, r.jsx)(_, { icon: w[i] }) : u ?? null;
243
+ return (0, r.jsx)(m.Modal, {
225
244
  open: e,
226
- onCancel: a,
245
+ onCancel: t,
227
246
  footer: null,
228
247
  closable: !1,
229
248
  width: 400,
@@ -231,65 +250,65 @@ __useblocks__.define("static/core/90ec6d2b2.js", [
231
250
  className: "limit-upgrade-modal",
232
251
  destroyOnHidden: !0,
233
252
  mask: { closable: !0 },
234
- children: (0, t.jsxs)("div", {
253
+ children: (0, r.jsxs)("div", {
235
254
  className: "limit-upgrade-modal__wrap",
236
255
  children: [
237
- (0, t.jsx)("div", {
256
+ (0, r.jsx)("div", {
238
257
  className: "limit-upgrade-modal__header",
239
- children: (0, t.jsx)("button", {
258
+ children: (0, r.jsx)("button", {
240
259
  type: "button",
241
260
  className: "limit-upgrade-modal__close",
242
- onClick: a,
243
- "aria-label": _("Close"),
244
- children: (0, t.jsx)(y, { icon: "CloseOutlined" })
261
+ onClick: t,
262
+ "aria-label": h("Close"),
263
+ children: (0, r.jsx)(_, { icon: "CloseOutlined" })
245
264
  })
246
265
  }),
247
- (0, t.jsxs)("div", {
266
+ (0, r.jsxs)("div", {
248
267
  className: "limit-upgrade-modal__body",
249
268
  children: [
250
- (0, t.jsx)("h1", {
269
+ (0, r.jsx)("h1", {
251
270
  className: "limit-upgrade-modal__title",
252
- children: r
271
+ children: a
253
272
  }),
254
- (0, t.jsx)("p", {
273
+ (0, r.jsx)("p", {
255
274
  className: "limit-upgrade-modal__subtitle",
256
275
  children: n
257
276
  }),
258
- (0, t.jsxs)("div", {
277
+ (0, r.jsxs)("div", {
259
278
  className: "limit-upgrade-modal__limits-row",
260
279
  children: [
261
- (0, t.jsx)("div", {
280
+ (0, r.jsx)("div", {
262
281
  className: "limit-upgrade-modal__icon-circle",
263
282
  "aria-hidden": !0,
264
- children: z
283
+ children: H
265
284
  }),
266
- w(c, "old"),
267
- (0, t.jsx)("div", {
285
+ P(l, "old"),
286
+ (0, r.jsx)("div", {
268
287
  className: "limit-upgrade-modal__arrow-btn",
269
288
  "aria-hidden": !0,
270
- children: (0, t.jsx)(y, {
289
+ children: (0, r.jsx)(_, {
271
290
  icon: "ArrowUpOutlined",
272
291
  className: "limit-upgrade-modal__arrow-icon"
273
292
  })
274
293
  }),
275
- w(h, "new")
294
+ P(y, "new")
276
295
  ]
277
296
  })
278
297
  ]
279
298
  }),
280
- (0, t.jsx)("hr", { className: "limit-upgrade-modal__divider" }),
281
- (0, t.jsx)("div", {
299
+ (0, r.jsx)("hr", { className: "limit-upgrade-modal__divider" }),
300
+ (0, r.jsx)("div", {
282
301
  className: k ? "limit-upgrade-modal__footer limit-upgrade-modal__footer--dual" : "limit-upgrade-modal__footer",
283
- children: u ? (0, t.jsxs)(t.Fragment, { children: [(0, t.jsx)(d.Button, {
302
+ children: d ? (0, r.jsxs)(r.Fragment, { children: [(0, r.jsx)(m.Button, {
284
303
  className: "limit-upgrade-modal__cta-secondary",
285
- onClick: u.onClick,
286
- children: u.label
287
- }), (0, t.jsx)(d.Button, {
304
+ onClick: d.onClick,
305
+ children: d.label
306
+ }), (0, r.jsx)(m.Button, {
288
307
  type: "primary",
289
308
  className: "limit-upgrade-modal__cta",
290
309
  onClick: g,
291
310
  children: p
292
- })] }) : (0, t.jsx)(d.Button, {
311
+ })] }) : (0, r.jsx)(m.Button, {
293
312
  type: "primary",
294
313
  className: "limit-upgrade-modal__cta",
295
314
  onClick: g,
@@ -299,7 +318,7 @@ __useblocks__.define("static/core/90ec6d2b2.js", [
299
318
  ]
300
319
  })
301
320
  });
302
- }, N = {
321
+ }, Y = {
303
322
  email_10_30: {
304
323
  id: "email_10_30",
305
324
  titleKey: "You have used up the number of emails you can create on your current plan",
@@ -421,13 +440,13 @@ __useblocks__.define("static/core/90ec6d2b2.js", [
421
440
  debugLabelKey: "Limit modal: spam_check exhausted"
422
441
  }
423
442
  };
424
- function O(e) {
425
- return N[e];
443
+ function A(e) {
444
+ return Y[e];
426
445
  }
427
- function Y(e) {
446
+ function B(e) {
428
447
  return e === "infinity" ? "∞" : e;
429
448
  }
430
- var R = {
449
+ var F = {
431
450
  ai: "ai_150_inf",
432
451
  email_generate: "email_300_inf",
433
452
  image_generate: "image_generate_exceeded",
@@ -439,135 +458,145 @@ __useblocks__.define("static/core/90ec6d2b2.js", [
439
458
  function L(e) {
440
459
  return !e || e.is_unlimited || e.total_limit <= 0 ? !1 : e.remaining <= 0 || e.used >= e.total_limit;
441
460
  }
442
- function P(e, a) {
443
- return L(a) ? {
444
- presetId: R[e],
445
- previousLimit: a?.total_limit ?? 0,
461
+ function I(e, t) {
462
+ return L(t) ? {
463
+ presetId: F[e],
464
+ previousLimit: t?.total_limit ?? 0,
446
465
  nextLimit: "infinity"
447
466
  } : null;
448
467
  }
449
- function B(e, a) {
450
- return P(e, a);
468
+ function T(e, t) {
469
+ return I(e, t);
451
470
  }
452
- function A(e) {
453
- for (let a = e.length - 1; a >= 0; a--) {
454
- const r = e[a];
455
- if (typeof r == "string" && r) return r;
471
+ function M(e) {
472
+ for (let t = e.length - 1; t >= 0; t--) {
473
+ const a = e[t];
474
+ if (typeof a == "string" && a) return a;
456
475
  }
457
476
  }
458
- function T(e) {
459
- for (let a = 0; a < e.length; a++) {
460
- const r = e[a];
461
- if (r instanceof Blob) return r;
477
+ function D(e) {
478
+ for (let t = 0; t < e.length; t++) {
479
+ const a = e[t];
480
+ if (a instanceof Blob) return a;
462
481
  }
463
482
  }
464
- function F(e, a) {
465
- for (let r = e.length - 1; r >= 0; r--) {
466
- const n = e[r];
467
- if (typeof n == "string" && n && n !== a) return n;
483
+ function U(e, t) {
484
+ for (let a = e.length - 1; a >= 0; a--) {
485
+ const n = e[a];
486
+ if (typeof n == "string" && n && n !== t) return n;
468
487
  }
469
488
  }
470
- var I = (0, o.createContext)(null), M = (e) => e.includes("UPLOAD_IMAGE_") || e.includes("UPLOAD_BACKGROUND_"), D = ({ children: e }) => {
471
- const a = b.useDispatch(), r = b.useSelector(v.selectActiveModal), [n, i] = (0, o.useState)(null), m = (0, o.useRef)(null), c = (0, o.useCallback)((u) => {
472
- m.current?.(u), m.current = null;
473
- }, []), h = (0, o.useCallback)((u) => (c(null), i(u), a(v.openModal(u.entryModal)), new Promise((f) => {
474
- m.current = f;
475
- })), [a, c]);
476
- (0, o.useEffect)(() => {
477
- M(r) || (i(null), m.current && c(null));
478
- }, [r, c]);
479
- const g = (0, o.useMemo)(() => ({
489
+ var C = (0, s.createContext)(null), z = (e) => e.includes("UPLOAD_IMAGE_") || e.includes("UPLOAD_BACKGROUND_"), G = ({ children: e }) => {
490
+ const t = b.useDispatch(), a = b.useSelector(v.selectActiveModal), [n, i] = (0, s.useState)(null), u = (0, s.useRef)(null), l = (0, s.useCallback)((d) => {
491
+ u.current?.(d), u.current = null;
492
+ }, []), y = (0, s.useCallback)((d) => (l(null), i(d), t(v.openModal(d.entryModal)), new Promise((f) => {
493
+ u.current = f;
494
+ })), [t, l]);
495
+ (0, s.useEffect)(() => {
496
+ z(a) || (i(null), u.current && l(null));
497
+ }, [a, l]);
498
+ const g = (0, s.useMemo)(() => ({
480
499
  request: n,
481
- openImagePicker: h,
482
- resolveImagePicker: c
500
+ openImagePicker: y,
501
+ resolveImagePicker: l
483
502
  }), [
484
503
  n,
485
- h,
486
- c
504
+ y,
505
+ l
487
506
  ]);
488
- return (0, t.jsx)(I.Provider, {
507
+ return (0, r.jsx)(C.Provider, {
489
508
  value: g,
490
509
  children: e
491
510
  });
492
- }, U = () => {
493
- const e = (0, o.useContext)(I);
511
+ }, W = () => {
512
+ const e = (0, s.useContext)(C);
494
513
  if (!e) throw new Error("useImagePicker must be used within ImagePickerProvider");
495
514
  return e;
496
515
  };
497
- Object.defineProperty(s, "EmIcons", {
516
+ Object.defineProperty(o, "EmIcons", {
498
517
  enumerable: !0,
499
518
  get: function() {
500
- return y;
519
+ return _;
501
520
  }
502
- }), Object.defineProperty(s, "ImagePickerProvider", {
521
+ }), Object.defineProperty(o, "ImagePickerProvider", {
503
522
  enumerable: !0,
504
523
  get: function() {
505
- return D;
524
+ return G;
506
525
  }
507
- }), Object.defineProperty(s, "LIMIT_TYPE_TO_USAGE_CARD_ICON", {
526
+ }), Object.defineProperty(o, "LIMIT_TYPE_TO_USAGE_CARD_ICON", {
508
527
  enumerable: !0,
509
528
  get: function() {
510
- return j;
529
+ return w;
530
+ }
531
+ }), Object.defineProperty(o, "LimitUpgradeModal", {
532
+ enumerable: !0,
533
+ get: function() {
534
+ return N;
511
535
  }
512
- }), Object.defineProperty(s, "LimitUpgradeModal", {
536
+ }), Object.defineProperty(o, "ModalToChangeConfigOnFree", {
513
537
  enumerable: !0,
514
538
  get: function() {
515
539
  return S;
516
540
  }
517
- }), Object.defineProperty(s, "ModalToChangeConfigOnFree", {
541
+ }), Object.defineProperty(o, "getLimitUpgradePresetDefinition", {
518
542
  enumerable: !0,
519
543
  get: function() {
520
- return E;
544
+ return A;
521
545
  }
522
- }), Object.defineProperty(s, "getLimitUpgradePresetDefinition", {
546
+ }), Object.defineProperty(o, "getMyProjectRole", {
523
547
  enumerable: !0,
524
548
  get: function() {
525
- return O;
549
+ return x;
526
550
  }
527
- }), Object.defineProperty(s, "isLimitStatsBlockExhausted", {
551
+ }), Object.defineProperty(o, "isLimitStatsBlockExhausted", {
528
552
  enumerable: !0,
529
553
  get: function() {
530
554
  return L;
531
555
  }
532
- }), Object.defineProperty(s, "pickFileProxyBlobFromFireResults", {
556
+ }), Object.defineProperty(o, "isProjectOwner", {
533
557
  enumerable: !0,
534
558
  get: function() {
535
- return T;
559
+ return R;
536
560
  }
537
- }), Object.defineProperty(s, "pickProxyUrlOverrideFromFireResults", {
561
+ }), Object.defineProperty(o, "pickFileProxyBlobFromFireResults", {
538
562
  enumerable: !0,
539
563
  get: function() {
540
- return F;
564
+ return D;
541
565
  }
542
- }), Object.defineProperty(s, "pickUploadImageUrlFromFireResults", {
566
+ }), Object.defineProperty(o, "pickProxyUrlOverrideFromFireResults", {
543
567
  enumerable: !0,
544
568
  get: function() {
545
- return A;
569
+ return U;
570
+ }
571
+ }), Object.defineProperty(o, "pickUploadImageUrlFromFireResults", {
572
+ enumerable: !0,
573
+ get: function() {
574
+ return M;
546
575
  }
547
- }), Object.defineProperty(s, "presetLimitDisplay", {
576
+ }), Object.defineProperty(o, "presetLimitDisplay", {
548
577
  enumerable: !0,
549
578
  get: function() {
550
- return Y;
579
+ return B;
551
580
  }
552
- }), Object.defineProperty(s, "resolveLimitActionPreflightExceeded", {
581
+ }), Object.defineProperty(o, "resolveLimitActionPreflightExceeded", {
553
582
  enumerable: !0,
554
583
  get: function() {
555
- return P;
584
+ return I;
556
585
  }
557
- }), Object.defineProperty(s, "resolveLimitActionPreflightExceededForType", {
586
+ }), Object.defineProperty(o, "resolveLimitActionPreflightExceededForType", {
558
587
  enumerable: !0,
559
588
  get: function() {
560
- return B;
589
+ return T;
561
590
  }
562
- }), Object.defineProperty(s, "sanitizeHtml", {
591
+ }), Object.defineProperty(o, "sanitizeHtml", {
563
592
  enumerable: !0,
564
593
  get: function() {
565
- return x;
594
+ return j;
566
595
  }
567
- }), Object.defineProperty(s, "useImagePicker", {
596
+ }), Object.defineProperty(o, "useImagePicker", {
568
597
  enumerable: !0,
569
598
  get: function() {
570
- return U;
599
+ return W;
571
600
  }
572
601
  });
573
602
  });