@emailmaker/emailmaker 1.1.81 → 1.1.84
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/CHANGELOG.md +30 -0
- package/README.md +18 -7
- package/{emailmaker-core.5550faa5.js → emailmaker-core.79ea451d.js} +6 -6
- package/emailmaker-esm.js +4 -4
- package/{emailmaker-po.5550faa5.js → emailmaker-po.79ea451d.js} +1 -1
- package/emailmaker.d.ts +51 -24
- package/emailmaker.js +3 -3
- package/iframe/css/sandbox-dark.css +1 -1
- package/iframe/css/sandbox-darktheme.css +3 -3
- package/iframe/css/sandbox-light.css +1 -1
- package/iframe/css/sandbox.css +2 -2
- package/iframe/js/amp.BX1rGa_X.js +1 -0
- package/iframe/js/iframe-eblock.js +1 -1
- package/iframe/js/iframe.js +1 -1
- package/iframe/js/rules.B-wCbIo7.js +1 -1
- package/package.json +1 -1
- package/static/core/{8fe345a7.js → 12f8b705.js} +6 -6
- package/static/core/{438f4766.js → 1b3e2d70.js} +4 -4
- package/static/core/{4d48fdcd.js → 2180385a.js} +33 -33
- package/static/core/{26d559d32.js → 3834896e2.js} +124 -124
- package/static/core/{20625a132.js → 5ec924792.js} +857 -857
- package/static/core/{d34d3cc0.js → 62284a79.js} +77 -4
- package/static/core/{60e2f0e02.js → 69d13cd82.js} +49 -49
- package/static/core/{1cb65d65.js → 860577ca.js} +300 -300
- package/static/core/{ed08ded22.js → 8bf24c892.js} +982 -974
- package/static/core/{395f82fa.js → af78f5c5.js} +3 -3
- package/static/core/{adc7cd4e.js → c62226dd.js} +7 -7
- package/static/core/{f6e0d3702.js → d31af2772.js} +849 -836
- package/static/core/{5be7581f.js → d6d05bc8.js} +13058 -12638
- package/static/core/{d239a2a0.js → d825fdc8.js} +7 -7
- package/static/core/{16751762.js → dd044cfd.js} +7 -7
- package/static/core/{758a0c3c.js → f422bc19.js} +3 -3
- package/static/core/{d0a3e529.js → f4cfd2a7.js} +544 -539
- package/static/core/{544a8fe8.js → f740dd7d.js} +35 -35
- package/static/umd-runtime/{DntxC9N-.js → Py_VRWLn.js} +7 -1
- package/static/umd-runtime/runtime.js +2 -2
- package/static/umd-runtime/ui-kit.js +1742 -1734
- package/ui-kit/index.js +1859 -1851
- package/iframe/js/amp.BtGCOg7N.js +0 -1
- /package/iframe/{iframe-eblock.5550faa5.html → iframe-eblock.79ea451d.html} +0 -0
- /package/iframe/{iframe.5550faa5.html → iframe.79ea451d.html} +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
(function(){try{if(typeof document<"u"){var e=document.createElement("style");e.setAttribute("data-emailmaker","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(--em-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(--em-borderRadiusXL) * 1.5px)}.blocks-app .premium-features-modal .slick-slide{padding:0 5px}.blocks-app .premium-features-modal .carousel-slide{border-radius:calc(var(--em-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(--em-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 .trial-suggest-modal{max-width:calc(100vw - 24px)}.blocks-app .trial-suggest-modal .ant-modal-container{border-radius:16px;padding:0;overflow:hidden}.blocks-app .trial-suggest-modal__layout{align-items:stretch;display:flex}.blocks-app .trial-suggest-modal__gallery{background:var(--em-colorFillQuaternary);flex:0 0 300px;width:300px;max-width:300px;position:relative;overflow:hidden}.blocks-app .trial-suggest-modal__slide-image{border-right:1px solid var(--em-colorFillSecondary);background-repeat:no-repeat;background-size:cover;transition:opacity .4s;position:absolute;inset:0}.blocks-app .trial-suggest-modal__content{flex:auto;min-width:0;max-width:100%;padding:32px}.blocks-app .trial-suggest-modal__badge{background:var(--em-colorPrimaryBg);color:var(--em-colorPrimary);border-radius:12px;margin-bottom:12px;padding:2px 10px;font-size:12px;font-weight:600;line-height:20px;display:inline-block}.blocks-app .trial-suggest-modal__title{color:var(--em-colorText);margin:0 0 8px;font-size:22px;font-weight:600;line-height:1.25}.blocks-app .trial-suggest-modal__intro{color:var(--em-colorTextSecondary);margin:0 0 16px}.blocks-app .trial-suggest-modal__features{margin:0 0 20px;padding:0;list-style:none}.blocks-app .trial-suggest-modal__features li{color:var(--em-colorText);align-items:flex-start;gap:10px;margin-bottom:10px;display:flex}.blocks-app .trial-suggest-modal__feature-icon,.blocks-app .trial-suggest-modal__promise-icon{flex:none;width:20px;height:20px;margin-top:2px;font-size:20px;line-height:20px}.blocks-app .trial-suggest-modal__feature-icon svg,.blocks-app .trial-suggest-modal__promise-icon svg{width:100%;height:100%}.blocks-app .trial-suggest-modal__feature-icon{color:var(--em-colorPrimary)}.blocks-app .trial-suggest-modal__promise{background:var(--em-colorFillQuaternary);color:var(--em-colorText);border-radius:8px;align-items:flex-start;gap:10px;margin:0 0 8px;padding:12px;display:flex}.blocks-app .trial-suggest-modal__promise-icon{color:var(--em-colorSuccess)}.blocks-app .trial-suggest-modal__note{color:var(--em-colorTextTertiary);margin:0 0 24px;font-size:12px;line-height:140%}.blocks-app .trial-suggest-modal__buttons{justify-content:space-between;align-items:center;gap:8px;display:flex}.blocks-app .trial-suggest-modal__decline.ant-btn{box-shadow:none;color:var(--em-colorTextSecondary);border:1px solid #0000}.blocks-app .trial-suggest-modal__decline.ant-btn:hover,.blocks-app .trial-suggest-modal__decline.ant-btn:focus,.blocks-app .trial-suggest-modal__decline.ant-btn:focus-visible,.blocks-app .trial-suggest-modal__decline.ant-btn:active{box-shadow:none;border:1px solid #0000;transform:none}.blocks-app .trial-suggest-modal__decline.ant-btn:hover:not(:disabled){background:var(--em-colorFillTertiary);color:var(--em-colorText)}@media (width<=720px){.blocks-app .trial-suggest-modal__layout{flex-direction:column}.blocks-app .trial-suggest-modal__gallery{flex:none;width:auto;max-width:none;height:180px}.blocks-app .trial-suggest-modal__content{padding:24px}}.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(--em-colorBgContainer);flex-direction:column;align-items:center;width:400px;max-width:100%;display:flex}.blocks-app .limit-upgrade-modal__header{z-index:1;box-sizing:border-box;justify-content:flex-end;align-items:center;display:flex;position:absolute;top:20px;right:20px}.blocks-app .limit-upgrade-modal__close{background:var(--em-colorBgContainer);width:34px;height:34px;color:var(--em-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(--em-colorFillTertiary);color:var(--em-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:44px 40px 24px;display:flex}.blocks-app .limit-upgrade-modal__title{text-align:center;max-width:320px;color:var(--em-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(--em-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(--em-colorText);width:34px;height:34px;color:var(--em-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(--em-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(--em-colorBorder);min-width:147px;height:32px;color:var(--em-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
|
-
__emailmaker__.define("static/core/
|
|
2
|
+
__emailmaker__.define("static/core/5ec924792.js", [
|
|
3
3
|
"require",
|
|
4
4
|
"exports",
|
|
5
5
|
"module",
|
|
6
6
|
"static/core/7df48ae1.js",
|
|
7
|
-
"static/core/
|
|
8
|
-
"static/core/
|
|
9
|
-
"static/core/
|
|
10
|
-
"static/core/
|
|
11
|
-
"static/core/
|
|
7
|
+
"static/core/62284a79.js",
|
|
8
|
+
"static/core/f422bc19.js",
|
|
9
|
+
"static/core/d31af2772.js",
|
|
10
|
+
"static/core/8bf24c892.js",
|
|
11
|
+
"static/core/69d13cd82.js",
|
|
12
12
|
"static/core/5f203ce92.js",
|
|
13
13
|
"static/core/b33e034e.js",
|
|
14
14
|
"react",
|
|
@@ -18,11 +18,11 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
18
18
|
"@ant-design/icons",
|
|
19
19
|
"react-dom/client",
|
|
20
20
|
"@ant-design/cssinjs"
|
|
21
|
-
], function(ze,
|
|
22
|
-
const
|
|
23
|
-
let d = ze("react"), De =
|
|
24
|
-
d =
|
|
25
|
-
let
|
|
21
|
+
], function(ze, he, vo) {
|
|
22
|
+
const Ht = ze("./7df48ae1.js"), fe = ze("./62284a79.js"), gt = ze("./f422bc19.js"), h = ze("./d31af2772.js"), be = ze("./8bf24c892.js"), se = ze("./69d13cd82.js"), Pt = ze("./5f203ce92.js"), dt = ze("./b33e034e.js");
|
|
23
|
+
let d = ze("react"), De = Ht.__toESM(d, 1);
|
|
24
|
+
d = Ht.__toESM(d);
|
|
25
|
+
let Kt = ze("react-dom"), g = ze("antd"), l = ze("react/jsx-runtime"), qe = ze("@ant-design/icons");
|
|
26
26
|
ze("react-dom/client");
|
|
27
27
|
let Ji = ze("@ant-design/cssinjs");
|
|
28
28
|
var Yt = ({ size: e = 24, color: t = "currentColor", ...r }) => De.createElement("svg", {
|
|
@@ -193,8 +193,8 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
193
193
|
async function la(e, t, r, a, i, s, o) {
|
|
194
194
|
const c = await t(e), u = r("Could not activate the trial. Please try again later or contact support.");
|
|
195
195
|
if ("error" in c && c.error) {
|
|
196
|
-
const n = c.error,
|
|
197
|
-
return o((
|
|
196
|
+
const n = c.error, m = "data" in n ? n.data : void 0;
|
|
197
|
+
return o((m && typeof m == "object" && m !== null && "message" in m ? String(m.message) : void 0) || u), !1;
|
|
198
198
|
}
|
|
199
199
|
if ("data" in c && c.data && typeof c.data == "object") {
|
|
200
200
|
const n = aa(c.data, u, r("Trial period activated."));
|
|
@@ -206,7 +206,7 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
206
206
|
return a(fe.changeConfig("pro")), await i(void 0), s(r("Trial period activated.")), !0;
|
|
207
207
|
}
|
|
208
208
|
function sa() {
|
|
209
|
-
const { __: e } = be.useI18n(), t = fe.useDispatch(), r = ir(), { success: a, notify: i } = be.useNotification(), s = fe.usePushToDataLayer(), [o] = fe.useLazyGetMeQuery(), [c, { isLoading: u }] = fe.useActivateTrialMutation(), [n] = gt.useInvalidatePlanCacheMutation(),
|
|
209
|
+
const { __: e } = be.useI18n(), t = fe.useDispatch(), r = ir(), { success: a, notify: i } = be.useNotification(), s = fe.usePushToDataLayer(), [o] = fe.useLazyGetMeQuery(), [c, { isLoading: u }] = fe.useActivateTrialMutation(), [n] = gt.useInvalidatePlanCacheMutation(), m = (0, d.useCallback)((y) => {
|
|
210
210
|
i({
|
|
211
211
|
title: y,
|
|
212
212
|
type: "error"
|
|
@@ -215,15 +215,15 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
215
215
|
return {
|
|
216
216
|
activate: (0, d.useCallback)(async () => {
|
|
217
217
|
const y = r.get(fe.APP_COOKIES.em_token);
|
|
218
|
-
if (!y) return
|
|
218
|
+
if (!y) return m(e("Sign in to your account to activate the trial period.")), !1;
|
|
219
219
|
try {
|
|
220
|
-
const f = await la(y, c, e, t, o, a,
|
|
220
|
+
const f = await la(y, c, e, t, o, a, m);
|
|
221
221
|
return f && (await n(), t(fe.projectsApi.util.invalidateTags(["project"])), t(gt.projectSettingsV2Api.util.invalidateTags(["Plan"])), s({
|
|
222
222
|
event: "change",
|
|
223
223
|
action: "activate_trial"
|
|
224
224
|
})), f;
|
|
225
225
|
} catch (f) {
|
|
226
|
-
return
|
|
226
|
+
return m(f?.data?.message || e("Could not activate the trial. Please try again later or contact support.")), !1;
|
|
227
227
|
}
|
|
228
228
|
}, [
|
|
229
229
|
e,
|
|
@@ -232,7 +232,7 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
232
232
|
t,
|
|
233
233
|
o,
|
|
234
234
|
n,
|
|
235
|
-
|
|
235
|
+
m,
|
|
236
236
|
a,
|
|
237
237
|
s
|
|
238
238
|
]),
|
|
@@ -240,7 +240,7 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
240
240
|
};
|
|
241
241
|
}
|
|
242
242
|
var oa = ({ open: e, sideOnOk: t, onCancel: r, initialSlide: a = 0 }) => {
|
|
243
|
-
const { __: i } = be.useI18n(), s = fe.useNavigate(), [o, c] = (0, d.useState)(a), u = (0, d.useRef)(null), n = fe.usePushToDataLayer(),
|
|
243
|
+
const { __: i } = be.useI18n(), s = fe.useNavigate(), [o, c] = (0, d.useState)(a), u = (0, d.useRef)(null), n = fe.usePushToDataLayer(), m = () => {
|
|
244
244
|
t && t(), s("/billing"), r(!1);
|
|
245
245
|
};
|
|
246
246
|
(0, d.useEffect)(() => {
|
|
@@ -379,7 +379,7 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
379
379
|
}), (0, l.jsx)(be.Button, {
|
|
380
380
|
type: "primary",
|
|
381
381
|
size: "large",
|
|
382
|
-
onClick:
|
|
382
|
+
onClick: m,
|
|
383
383
|
style: { padding: "0 30px" },
|
|
384
384
|
children: i("Select plan")
|
|
385
385
|
})]
|
|
@@ -501,21 +501,21 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
501
501
|
})]
|
|
502
502
|
})
|
|
503
503
|
});
|
|
504
|
-
},
|
|
505
|
-
const s = fe.useSelector(fe.selectedCurrentUser), o = fe.useSelector(fe.selectProject), c = fe.usePushToDataLayer(), { activate: u, isActivating: n } = sa(),
|
|
504
|
+
}, ma = ({ open: e, onCancel: t, initialSlide: r = 0, onTrialActivated: a, sideOnOk: i }) => {
|
|
505
|
+
const s = fe.useSelector(fe.selectedCurrentUser), o = fe.useSelector(fe.selectProject), c = fe.usePushToDataLayer(), { activate: u, isActivating: n } = sa(), m = ta({
|
|
506
506
|
isPlanLocked: St(o, { isPlugin: fe.PLUGIN.isPlugin }),
|
|
507
507
|
trialEnabled: !!s?.trial_enabled,
|
|
508
508
|
canStartTrial: ia(o, s)
|
|
509
509
|
}) === "trial";
|
|
510
510
|
(0, d.useEffect)(() => {
|
|
511
|
-
!e || !
|
|
511
|
+
!e || !m || c({
|
|
512
512
|
event: "open_modal",
|
|
513
513
|
action: "open_trial-suggest_modal",
|
|
514
514
|
modal_id: "trial-suggest"
|
|
515
515
|
});
|
|
516
516
|
}, [
|
|
517
517
|
e,
|
|
518
|
-
|
|
518
|
+
m,
|
|
519
519
|
c
|
|
520
520
|
]);
|
|
521
521
|
const y = (0, d.useCallback)(() => {
|
|
@@ -531,7 +531,7 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
531
531
|
t,
|
|
532
532
|
a
|
|
533
533
|
]);
|
|
534
|
-
return
|
|
534
|
+
return m ? (0, l.jsx)(ua, {
|
|
535
535
|
open: e,
|
|
536
536
|
onCancel: t,
|
|
537
537
|
onConfirm: y,
|
|
@@ -589,7 +589,7 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
589
589
|
"stock_gif",
|
|
590
590
|
"stock_icons",
|
|
591
591
|
"image_editor"
|
|
592
|
-
],
|
|
592
|
+
], ha = {
|
|
593
593
|
export_platforms: 1,
|
|
594
594
|
export_html: 1,
|
|
595
595
|
export_amp: 1,
|
|
@@ -728,8 +728,8 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
728
728
|
}
|
|
729
729
|
return e;
|
|
730
730
|
}
|
|
731
|
-
var wa = ({ open: e, onClose: t, title: r, subtitle: a, usageResource: i, icon: s, previousDisplay: o, nextDisplay: c, onChangePlan: u, secondaryAction: n, changePlanLabel:
|
|
732
|
-
const { __: y } = be.useI18n(), f =
|
|
731
|
+
var wa = ({ open: e, onClose: t, title: r, subtitle: a, usageResource: i, icon: s, previousDisplay: o, nextDisplay: c, onChangePlan: u, secondaryAction: n, changePlanLabel: m }) => {
|
|
732
|
+
const { __: y } = be.useI18n(), f = m ?? y("Change plan"), w = !!n, I = i != null ? (0, l.jsx)(ct, { icon: dr[i] }) : s ?? null;
|
|
733
733
|
return (0, l.jsx)(be.Modal, {
|
|
734
734
|
open: e,
|
|
735
735
|
onCancel: t,
|
|
@@ -948,13 +948,13 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
948
948
|
function ur(e) {
|
|
949
949
|
return !e || e.is_unlimited || e.total_limit <= 0 ? !1 : e.remaining <= 0 || e.used >= e.total_limit;
|
|
950
950
|
}
|
|
951
|
-
function
|
|
951
|
+
function mr(e) {
|
|
952
952
|
return !!e && !e?.is_unlimited && (e?.total_limit ?? 0) <= 0;
|
|
953
953
|
}
|
|
954
954
|
function Fa(e) {
|
|
955
|
-
return !e || e.is_unlimited ? !1 :
|
|
955
|
+
return !e || e.is_unlimited ? !1 : mr(e) ? !0 : ur(e);
|
|
956
956
|
}
|
|
957
|
-
function
|
|
957
|
+
function hr(e, t) {
|
|
958
958
|
return Fa(t) ? {
|
|
959
959
|
presetId: Ca[e],
|
|
960
960
|
previousLimit: t?.total_limit ?? 0,
|
|
@@ -962,7 +962,7 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
962
962
|
} : null;
|
|
963
963
|
}
|
|
964
964
|
function xa(e, t) {
|
|
965
|
-
return
|
|
965
|
+
return hr(e, t);
|
|
966
966
|
}
|
|
967
967
|
function Pa(e) {
|
|
968
968
|
for (let t = e.length - 1; t >= 0; t--) {
|
|
@@ -998,7 +998,7 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
998
998
|
function Ta(e) {
|
|
999
999
|
return e.error instanceof Error && e.error.message ? e.error : typeof e.error == "string" && e.error ? new Error(e.error) : new Error(Sa);
|
|
1000
1000
|
}
|
|
1001
|
-
var Ma = () => (0, l.jsx)(
|
|
1001
|
+
var Ma = () => (0, l.jsx)(qe.LoadingOutlined, {
|
|
1002
1002
|
style: {
|
|
1003
1003
|
fontSize: 48,
|
|
1004
1004
|
height: "100%"
|
|
@@ -1082,33 +1082,33 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
1082
1082
|
function Ua(e) {
|
|
1083
1083
|
return e.flat();
|
|
1084
1084
|
}
|
|
1085
|
-
function
|
|
1085
|
+
function Ga(e) {
|
|
1086
1086
|
return new Set(pr(e));
|
|
1087
1087
|
}
|
|
1088
|
-
function
|
|
1088
|
+
function Va(e) {
|
|
1089
1089
|
return new Map(pr(e));
|
|
1090
1090
|
}
|
|
1091
|
-
function
|
|
1091
|
+
function Wa(e) {
|
|
1092
1092
|
return e.at(-1);
|
|
1093
1093
|
}
|
|
1094
1094
|
var _t = {
|
|
1095
1095
|
mergeRecords: za,
|
|
1096
1096
|
mergeArrays: Ua,
|
|
1097
|
-
mergeSets:
|
|
1098
|
-
mergeMaps:
|
|
1099
|
-
mergeOthers:
|
|
1097
|
+
mergeSets: Ga,
|
|
1098
|
+
mergeMaps: Va,
|
|
1099
|
+
mergeOthers: Wa
|
|
1100
1100
|
};
|
|
1101
|
-
function
|
|
1102
|
-
return
|
|
1101
|
+
function $a(...e) {
|
|
1102
|
+
return qa({})(...e);
|
|
1103
1103
|
}
|
|
1104
|
-
function
|
|
1105
|
-
let r =
|
|
1104
|
+
function qa(e, t) {
|
|
1105
|
+
let r = Ha(e, a);
|
|
1106
1106
|
function a(...i) {
|
|
1107
1107
|
return vr(i, r, t);
|
|
1108
1108
|
}
|
|
1109
1109
|
return a;
|
|
1110
1110
|
}
|
|
1111
|
-
function
|
|
1111
|
+
function Ha(e, t) {
|
|
1112
1112
|
return {
|
|
1113
1113
|
defaultMergeFunctions: _t,
|
|
1114
1114
|
mergeFunctions: {
|
|
@@ -1131,14 +1131,14 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
1131
1131
|
for (let s = 1; s < a.length; s++) if (fr(a[s]) !== i) return Et(a, t, r);
|
|
1132
1132
|
}
|
|
1133
1133
|
switch (i) {
|
|
1134
|
-
case 1: return
|
|
1134
|
+
case 1: return Ka(a, t, r);
|
|
1135
1135
|
case 2: return Ya(a, t, r);
|
|
1136
1136
|
case 3: return Qa(a, t, r);
|
|
1137
1137
|
case 4: return Za(a, t, r);
|
|
1138
1138
|
default: return Et(a, t, r);
|
|
1139
1139
|
}
|
|
1140
1140
|
}
|
|
1141
|
-
function
|
|
1141
|
+
function Ka(e, t, r) {
|
|
1142
1142
|
let a = t.mergeFunctions.mergeRecords(e, t, r);
|
|
1143
1143
|
return a === it.defaultMerge || t.useImplicitDefaultMerging && a === void 0 && t.mergeFunctions.mergeRecords !== t.defaultMergeFunctions.mergeRecords ? t.defaultMergeFunctions.mergeRecords(e, t, r) : a;
|
|
1144
1144
|
}
|
|
@@ -1226,12 +1226,12 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
1226
1226
|
fontSize: 16,
|
|
1227
1227
|
fontSizeLG: 16
|
|
1228
1228
|
} }
|
|
1229
|
-
}, Ir = ({ externalTheme: e =
|
|
1230
|
-
let a = matchMedia("(prefers-color-scheme: dark)").matches ?
|
|
1229
|
+
}, Ir = ({ externalTheme: e = h.S, children: t, customThemeToken: r }) => {
|
|
1230
|
+
let a = matchMedia("(prefers-color-scheme: dark)").matches ? h.C : h.S, i = e === "system" ? a : e, [s, o] = (0, d.useState)(i), [c, u] = (0, d.useState)(s === "light" ? yr : wr);
|
|
1231
1231
|
return (0, d.useEffect)(() => {
|
|
1232
1232
|
o(i);
|
|
1233
1233
|
}, [i]), (0, d.useEffect)(() => {
|
|
1234
|
-
let n = s === "light" ? yr : wr,
|
|
1234
|
+
let n = s === "light" ? yr : wr, m = r, y = m ? $a(n.token, m) : n.token;
|
|
1235
1235
|
u({
|
|
1236
1236
|
...n,
|
|
1237
1237
|
token: y
|
|
@@ -1284,18 +1284,18 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
1284
1284
|
i18n: e,
|
|
1285
1285
|
defaultNS: t
|
|
1286
1286
|
}), [e, t]);
|
|
1287
|
-
return (0, d.createElement)(
|
|
1287
|
+
return (0, d.createElement)(h.Pn.Provider, { value: a }, r);
|
|
1288
1288
|
}
|
|
1289
|
-
var Xa =
|
|
1290
|
-
let { t: a } =
|
|
1291
|
-
return (0, d.useEffect)(() => (o.current = (0, Xa.debounce)((
|
|
1292
|
-
e(
|
|
1289
|
+
var Xa = h.tr(), el = ({ onSearch: e, placeholder: t, className: r }) => {
|
|
1290
|
+
let { t: a } = h.zn(), [i, s] = (0, d.useState)(""), o = (0, d.useRef)(null), { options: c } = h.B(), { config: u } = c, n = t || a("Search files...");
|
|
1291
|
+
return (0, d.useEffect)(() => (o.current = (0, Xa.debounce)((m) => {
|
|
1292
|
+
e(m);
|
|
1293
1293
|
}, 500), () => {
|
|
1294
1294
|
o.current?.cancel();
|
|
1295
1295
|
}), [e]), (0, l.jsx)(g.Input, {
|
|
1296
1296
|
value: i,
|
|
1297
|
-
onChange: (
|
|
1298
|
-
let y =
|
|
1297
|
+
onChange: (m) => {
|
|
1298
|
+
let y = m.target.value;
|
|
1299
1299
|
s(y), o.current?.(y);
|
|
1300
1300
|
},
|
|
1301
1301
|
placeholder: n,
|
|
@@ -1418,18 +1418,18 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
1418
1418
|
function al(e) {
|
|
1419
1419
|
if (!e || e.isFolder) return !1;
|
|
1420
1420
|
let t = e.extension || (e.name && e.name.includes(".") ? e.name.split(".").pop() : void 0) || (e.type?.startsWith("image/") ? e.type.split("/")[1]?.split(";")[0]?.trim() : void 0);
|
|
1421
|
-
return !!(t &&
|
|
1421
|
+
return !!(t && h.A.includes(t.toLowerCase()));
|
|
1422
1422
|
}
|
|
1423
|
-
var Cr = d.default.memo(({ files: e, filesById: t, currentSortOption: r, isSmallScreen: a, iconStrokeWidth: i, multiSelectEnabled: s = !0, features: o, viewMode: c, setViewMode: u, handleSearch: n, handleSortOptionChange:
|
|
1424
|
-
let v = (0, d.useMemo)(() => y?.length ? Nt.filter((
|
|
1425
|
-
let Z = t.get(
|
|
1423
|
+
var Cr = d.default.memo(({ files: e, filesById: t, currentSortOption: r, isSmallScreen: a, iconStrokeWidth: i, multiSelectEnabled: s = !0, features: o, viewMode: c, setViewMode: u, handleSearch: n, handleSortOptionChange: m, sortOptions: y, onClearSelection: f, onRename: w, onDelete: I, onCopy: b, onMove: F, onEdit: V, t: _ }) => {
|
|
1424
|
+
let v = (0, d.useMemo)(() => y?.length ? Nt.filter((W) => y.includes(W.value)) : Nt, [y]), C = (0, d.useMemo)(() => v.map((W) => W.value).join("|") || "all", [v]), O = h.sa((W) => W.selectedFiles), R = h.sa((W) => W.selectedFiles.size), oe = h.sa((W) => W.selectAllVisible), k = e.length > 0 && R === e.length, U = (0, d.useMemo)(() => Array.from(O)[0], [O]), D = (0, d.useMemo)(() => U ? t.get(U) : void 0, [t, U]), Q = D?.isFolder ? o?.enableRenameFolder !== !1 : o?.enableRenameFile !== !1, $ = (0, d.useMemo)(() => Array.from(O).every((W) => {
|
|
1425
|
+
let Z = t.get(W);
|
|
1426
1426
|
return Z ? Z.isFolder ? o?.enableMoveFolder !== !1 : o?.enableMoveItem !== !1 : !1;
|
|
1427
1427
|
}), [
|
|
1428
1428
|
o,
|
|
1429
1429
|
t,
|
|
1430
1430
|
O
|
|
1431
|
-
]),
|
|
1432
|
-
let Z = t.get(
|
|
1431
|
+
]), K = (0, d.useMemo)(() => Array.from(O).every((W) => {
|
|
1432
|
+
let Z = t.get(W);
|
|
1433
1433
|
return Z ? Z.isFolder ? o?.enableCopyFolder !== !1 : o?.enableCopyItem !== !1 : !1;
|
|
1434
1434
|
}), [
|
|
1435
1435
|
o,
|
|
@@ -1477,12 +1477,12 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
1477
1477
|
size: 16,
|
|
1478
1478
|
strokeWidth: i
|
|
1479
1479
|
}),
|
|
1480
|
-
onClick: () =>
|
|
1480
|
+
onClick: () => V(D),
|
|
1481
1481
|
disabled: !M,
|
|
1482
1482
|
children: _("Edit")
|
|
1483
1483
|
})
|
|
1484
1484
|
}),
|
|
1485
|
-
|
|
1485
|
+
$ && (0, l.jsx)(g.Tooltip, {
|
|
1486
1486
|
title: a ? _("Move to") : null,
|
|
1487
1487
|
children: (0, l.jsx)(g.Button, {
|
|
1488
1488
|
icon: (0, l.jsx)(jt, {
|
|
@@ -1493,7 +1493,7 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
1493
1493
|
children: _("Move to")
|
|
1494
1494
|
})
|
|
1495
1495
|
}),
|
|
1496
|
-
|
|
1496
|
+
K && (0, l.jsx)(g.Tooltip, {
|
|
1497
1497
|
title: a ? _("Copy") : null,
|
|
1498
1498
|
children: (0, l.jsx)(g.Button, {
|
|
1499
1499
|
icon: (0, l.jsx)(se.a$1, {
|
|
@@ -1524,8 +1524,8 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
1524
1524
|
size: 16,
|
|
1525
1525
|
strokeWidth: i
|
|
1526
1526
|
}),
|
|
1527
|
-
onClick: (
|
|
1528
|
-
|
|
1527
|
+
onClick: (W) => {
|
|
1528
|
+
W.stopPropagation(), W.preventDefault(), I();
|
|
1529
1529
|
},
|
|
1530
1530
|
children: _("Delete")
|
|
1531
1531
|
})
|
|
@@ -1546,17 +1546,17 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
1546
1546
|
className: "sort-container",
|
|
1547
1547
|
children: (0, l.jsx)(g.Select, {
|
|
1548
1548
|
value: r,
|
|
1549
|
-
onChange:
|
|
1549
|
+
onChange: m,
|
|
1550
1550
|
className: T.sortSelect,
|
|
1551
1551
|
popupMatchSelectWidth: !1,
|
|
1552
1552
|
suffixIcon: (0, l.jsx)(be.t, {
|
|
1553
1553
|
size: 16,
|
|
1554
1554
|
strokeWidth: i
|
|
1555
1555
|
}),
|
|
1556
|
-
children: v.map(({ value:
|
|
1557
|
-
value:
|
|
1556
|
+
children: v.map(({ value: W, labelKey: Z }) => (0, l.jsx)(il, {
|
|
1557
|
+
value: W,
|
|
1558
1558
|
children: _(Z)
|
|
1559
|
-
},
|
|
1559
|
+
}, W))
|
|
1560
1560
|
}, C)
|
|
1561
1561
|
}), (0, l.jsx)("div", {
|
|
1562
1562
|
className: T.actionsContainer,
|
|
@@ -1575,7 +1575,7 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
1575
1575
|
})
|
|
1576
1576
|
}],
|
|
1577
1577
|
value: c,
|
|
1578
|
-
onChange: (
|
|
1578
|
+
onChange: (W) => u(W)
|
|
1579
1579
|
})
|
|
1580
1580
|
})]
|
|
1581
1581
|
})]
|
|
@@ -1583,7 +1583,7 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
1583
1583
|
});
|
|
1584
1584
|
Cr.displayName = "FileContentHeader";
|
|
1585
1585
|
var Tt = d.default.memo(({ fileId: e, style: t }) => {
|
|
1586
|
-
let r =
|
|
1586
|
+
let r = h.sa((i) => i.selectedFiles.has(e)), a = h.sa((i) => i.toggleFileSelection);
|
|
1587
1587
|
return (0, l.jsx)(g.Checkbox, {
|
|
1588
1588
|
checked: r,
|
|
1589
1589
|
style: t,
|
|
@@ -1603,7 +1603,7 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
1603
1603
|
});
|
|
1604
1604
|
Tt.displayName = "FileSelectionCheckbox";
|
|
1605
1605
|
var Fr = d.default.memo(({ className: e, ...t }) => {
|
|
1606
|
-
let r = t["data-row-key"], a = r == null ? "" : String(r), i = [e,
|
|
1606
|
+
let r = t["data-row-key"], a = r == null ? "" : String(r), i = [e, h.sa((s) => a ? s.selectedFiles.has(a) : !1) ? T.selectedRow : ""].filter(Boolean).join(" ");
|
|
1607
1607
|
return (0, l.jsx)("tr", {
|
|
1608
1608
|
...t,
|
|
1609
1609
|
className: i
|
|
@@ -1611,8 +1611,8 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
1611
1611
|
});
|
|
1612
1612
|
Fr.displayName = "SelectableTableRow";
|
|
1613
1613
|
var Mt = d.default.memo(({ item: e, variant: t = "table", t: r, iconStrokeWidth: a, setCurrentMenuFile: i, showMoveModal: s, showCopyModal: o, showRenameModal: c, showDeleteConfirm: u, onEdit: n }) => {
|
|
1614
|
-
let [
|
|
1615
|
-
if (!
|
|
1614
|
+
let [m, y] = (0, d.useState)(!1), f = (0, d.useMemo)(() => {
|
|
1615
|
+
if (!m) return [];
|
|
1616
1616
|
let I = [];
|
|
1617
1617
|
return e.canEdit && I.push({
|
|
1618
1618
|
key: "edit",
|
|
@@ -1653,7 +1653,7 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
1653
1653
|
}), I;
|
|
1654
1654
|
}, [
|
|
1655
1655
|
a,
|
|
1656
|
-
|
|
1656
|
+
m,
|
|
1657
1657
|
e.canCopy,
|
|
1658
1658
|
e.canDelete,
|
|
1659
1659
|
e.canEdit,
|
|
@@ -1731,11 +1731,11 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
1731
1731
|
r,
|
|
1732
1732
|
t,
|
|
1733
1733
|
e
|
|
1734
|
-
]),
|
|
1734
|
+
]), m = h.Ia(u), y = h.Ia(n), { handleError: f, handleLoad: w } = y, I = m.src ?? "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAiIGhlaWdodD0iODAiIHZpZXdCb3g9IjAgMCA4MCA4MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjgwIiBoZWlnaHQ9IjgwIiBmaWxsPSIjRjVGNUY1Ii8+CjxwYXRoIGQ9Ik0yNCAzMkw0MCA0OEw1NiAzMkw2NCA0MEw2NCA2NEgyNFYzMloiIGZpbGw9IiNEOUQ5RDkiLz4KPC9zdmc+", b = y.src ?? m.src, F = (0, d.useRef)(!1);
|
|
1735
1735
|
(0, d.useEffect)(() => {
|
|
1736
1736
|
F.current = !1;
|
|
1737
1737
|
}, [b]);
|
|
1738
|
-
let
|
|
1738
|
+
let V = (0, d.useCallback)((_) => d.default.cloneElement(_, {
|
|
1739
1739
|
key: b ?? "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAiIGhlaWdodD0iODAiIHZpZXdCb3g9IjAgMCA4MCA4MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjgwIiBoZWlnaHQ9IjgwIiBmaWxsPSIjRjVGNUY1Ii8+CjxwYXRoIGQ9Ik0yNCAzMkw0MCA0OEw1NiAzMkw2NCA0MEw2NCA2NEgyNFYzMloiIGZpbGw9IiNEOUQ5RDkiLz4KPC9zdmc+",
|
|
1740
1740
|
src: b ?? "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAiIGhlaWdodD0iODAiIHZpZXdCb3g9IjAgMCA4MCA4MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjgwIiBoZWlnaHQ9IjgwIiBmaWxsPSIjRjVGNUY1Ii8+CjxwYXRoIGQ9Ik0yNCAzMkw0MCA0OEw1NiAzMkw2NCA0MEw2NCA2NEgyNFYzMloiIGZpbGw9IiNEOUQ5RDkiLz4KPC9zdmc+",
|
|
1741
1741
|
fallback: void 0,
|
|
@@ -1762,18 +1762,18 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
1762
1762
|
src: b,
|
|
1763
1763
|
actionsRender: () => null,
|
|
1764
1764
|
destroyOnHidden: !0,
|
|
1765
|
-
cover: (0, l.jsx)(
|
|
1766
|
-
imageRender:
|
|
1765
|
+
cover: (0, l.jsx)(qe.EyeOutlined, { style: { fontSize: "20px" } }),
|
|
1766
|
+
imageRender: V
|
|
1767
1767
|
} : !1, [
|
|
1768
1768
|
c,
|
|
1769
1769
|
b,
|
|
1770
|
-
|
|
1770
|
+
V
|
|
1771
1771
|
]),
|
|
1772
|
-
onLoad:
|
|
1772
|
+
onLoad: m.handleLoad,
|
|
1773
1773
|
onError: () => {
|
|
1774
|
-
|
|
1774
|
+
m.handleError().catch(() => {});
|
|
1775
1775
|
},
|
|
1776
|
-
fallback:
|
|
1776
|
+
fallback: h.k
|
|
1777
1777
|
});
|
|
1778
1778
|
}, At = d.default.memo(({ item: e, variant: t = "table", FolderIcon: r, getFileData: a, className: i, width: s, height: o }) => e.isFolder ? t === "grid" ? (0, l.jsx)("div", {
|
|
1779
1779
|
className: T.gridFolderIcon,
|
|
@@ -1814,12 +1814,12 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
1814
1814
|
function Pr(e) {
|
|
1815
1815
|
if (e.isFolder) return !1;
|
|
1816
1816
|
let t = typeof e.name == "string" ? e.name : "", r = t ? t.split(".").pop()?.toLowerCase() : void 0, a = e.extension?.toLowerCase() ?? r;
|
|
1817
|
-
return typeof e.type == "string" && e.type.startsWith("image/") || typeof a == "string" &&
|
|
1817
|
+
return typeof e.type == "string" && e.type.startsWith("image/") || typeof a == "string" && h.ne.includes(a);
|
|
1818
1818
|
}
|
|
1819
|
-
var kr = d.default.memo(({ item: e, t, iconStrokeWidth: r, FolderIcon: a, handleItemClick: i, setCurrentMenuFile: s, showMoveModal: o, showCopyModal: c, showRenameModal: u, showDeleteConfirm: n, onEdit:
|
|
1820
|
-
let I =
|
|
1821
|
-
let
|
|
1822
|
-
if (!(
|
|
1819
|
+
var kr = d.default.memo(({ item: e, t, iconStrokeWidth: r, FolderIcon: a, handleItemClick: i, setCurrentMenuFile: s, showMoveModal: o, showCopyModal: c, showRenameModal: u, showDeleteConfirm: n, onEdit: m, onEditorOk: y, getFileData: f, showSelectionCheckbox: w = !0 }) => {
|
|
1820
|
+
let I = h.sa((F) => F.selectedFiles.has(e.id)), b = (0, d.useCallback)((F) => {
|
|
1821
|
+
let V = F.target;
|
|
1822
|
+
if (!(V.closest(".gridFileMenuButton") || V.closest(".ant-dropdown-menu")) && !xr(V) && F.detail === 1) {
|
|
1823
1823
|
if (e.isFolder) {
|
|
1824
1824
|
i(e.file);
|
|
1825
1825
|
return;
|
|
@@ -1883,7 +1883,7 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
1883
1883
|
showCopyModal: c,
|
|
1884
1884
|
showRenameModal: u,
|
|
1885
1885
|
showDeleteConfirm: n,
|
|
1886
|
-
onEdit:
|
|
1886
|
+
onEdit: m
|
|
1887
1887
|
})
|
|
1888
1888
|
}),
|
|
1889
1889
|
w ? (0, l.jsx)("div", {
|
|
@@ -1901,7 +1901,7 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
1901
1901
|
});
|
|
1902
1902
|
});
|
|
1903
1903
|
kr.displayName = "FileGridItem";
|
|
1904
|
-
var jr = d.default.memo(({ rows: e, topOffset: t = 0, bottomOffset: r = 0, t: a, iconStrokeWidth: i, FolderIcon: s, handleItemClick: o, setCurrentMenuFile: c, showMoveModal: u, showCopyModal: n, showRenameModal:
|
|
1904
|
+
var jr = d.default.memo(({ rows: e, topOffset: t = 0, bottomOffset: r = 0, t: a, iconStrokeWidth: i, FolderIcon: s, handleItemClick: o, setCurrentMenuFile: c, showMoveModal: u, showCopyModal: n, showRenameModal: m, showDeleteConfirm: y, onEdit: f, onEditorOk: w, getFileData: I, showSelectionCheckbox: b = !0 }) => (0, l.jsx)(l.Fragment, { children: (0, l.jsx)("div", {
|
|
1905
1905
|
style: {
|
|
1906
1906
|
paddingTop: t,
|
|
1907
1907
|
paddingBottom: r
|
|
@@ -1923,7 +1923,7 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
1923
1923
|
setCurrentMenuFile: c,
|
|
1924
1924
|
showMoveModal: u,
|
|
1925
1925
|
showCopyModal: n,
|
|
1926
|
-
showRenameModal:
|
|
1926
|
+
showRenameModal: m,
|
|
1927
1927
|
showDeleteConfirm: y,
|
|
1928
1928
|
onEdit: f,
|
|
1929
1929
|
onEditorOk: w,
|
|
@@ -2052,11 +2052,11 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
2052
2052
|
}
|
|
2053
2053
|
function Rt(e) {
|
|
2054
2054
|
let t = Ar(e);
|
|
2055
|
-
return !!(t &&
|
|
2055
|
+
return !!(t && h.ne.includes(t));
|
|
2056
2056
|
}
|
|
2057
|
-
function
|
|
2057
|
+
function ml(e) {
|
|
2058
2058
|
let t = Ar(e);
|
|
2059
|
-
return !!(t &&
|
|
2059
|
+
return !!(t && h.A.includes(t));
|
|
2060
2060
|
}
|
|
2061
2061
|
function Rr(e, t) {
|
|
2062
2062
|
if (t.previewFallbackToFileUrl !== !1) return e.url && Rt(e) ? e.url : void 0;
|
|
@@ -2081,8 +2081,8 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
2081
2081
|
], i = r.getDate(), s = a[r.getMonth()];
|
|
2082
2082
|
return t("Added", { date: `${i} ${s} ${r.getFullYear()}` });
|
|
2083
2083
|
}
|
|
2084
|
-
function
|
|
2085
|
-
let r = !!e.isFolder, a = r ? Mr(e, t.folderFileCounts) : null, i = r ? a === null ? "u" : String(a) : "0", s = Lr(e.date, t.t), o = !r && e.size ? String(e.size) : "", c = e.thumbnailUrl || e.thumbnail, u = e.url && Rt(e) ? e.url : "", n = Rr(e, t) ?? "",
|
|
2084
|
+
function hl(e, t) {
|
|
2085
|
+
let r = !!e.isFolder, a = r ? Mr(e, t.folderFileCounts) : null, i = r ? a === null ? "u" : String(a) : "0", s = Lr(e.date, t.t), o = !r && e.size ? String(e.size) : "", c = e.thumbnailUrl || e.thumbnail, u = e.url && Rt(e) ? e.url : "", n = Rr(e, t) ?? "", m = [
|
|
2086
2086
|
t.features?.enableEdit !== !1,
|
|
2087
2087
|
t.features?.enableMoveFolder !== !1,
|
|
2088
2088
|
t.features?.enableMoveItem !== !1,
|
|
@@ -2109,14 +2109,14 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
2109
2109
|
s,
|
|
2110
2110
|
r ? "1" : "0",
|
|
2111
2111
|
i,
|
|
2112
|
-
|
|
2112
|
+
m
|
|
2113
2113
|
].join("::");
|
|
2114
2114
|
}
|
|
2115
2115
|
var fl = {
|
|
2116
2116
|
getId: (e) => e.id,
|
|
2117
|
-
buildSignature: (e, t) =>
|
|
2117
|
+
buildSignature: (e, t) => hl(e, t),
|
|
2118
2118
|
buildRowModel: (e, t, r) => {
|
|
2119
|
-
let a = !!e.isFolder, i = a ? Mr(e, t.folderFileCounts) : null, s = a && i === null ? cl : a ? `${i} ${i === 1 ? t.t("item") : t.t("items")}` : "", o = e.dimensions || "", c = !a && e.size ?
|
|
2119
|
+
let a = !!e.isFolder, i = a ? Mr(e, t.folderFileCounts) : null, s = a && i === null ? cl : a ? `${i} ${i === 1 ? t.t("item") : t.t("items")}` : "", o = e.dimensions || "", c = !a && e.size ? h.Jn(e.size) : "", u = a ? t.t("Folder") : ul(e), n = Lr(e.date, t.t), m = a ? s : [
|
|
2120
2120
|
o,
|
|
2121
2121
|
c,
|
|
2122
2122
|
u
|
|
@@ -2133,11 +2133,11 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
2133
2133
|
sizeText: c,
|
|
2134
2134
|
typeText: u,
|
|
2135
2135
|
dateText: n,
|
|
2136
|
-
gridInfoText:
|
|
2136
|
+
gridInfoText: m,
|
|
2137
2137
|
thumbnailSrc: y,
|
|
2138
2138
|
previewSrc: w,
|
|
2139
2139
|
lightboxSrc: f,
|
|
2140
|
-
canEdit: !a && t.features?.enableEdit !== !1 &&
|
|
2140
|
+
canEdit: !a && t.features?.enableEdit !== !1 && ml(e),
|
|
2141
2141
|
canMove: a ? t.features?.enableMoveFolder !== !1 : t.features?.enableMoveItem !== !1,
|
|
2142
2142
|
canCopy: a ? t.features?.enableCopyFolder !== !1 : t.features?.enableCopyItem !== !1,
|
|
2143
2143
|
canRename: a ? t.features?.enableRenameFolder !== !1 : t.features?.enableRenameFile !== !1,
|
|
@@ -2175,18 +2175,18 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
2175
2175
|
e.length,
|
|
2176
2176
|
c,
|
|
2177
2177
|
i
|
|
2178
|
-
]), { engineOptions:
|
|
2178
|
+
]), { engineOptions: m, handleViewportChange: y } = dl({
|
|
2179
2179
|
totalCount: e.length,
|
|
2180
2180
|
plan: n
|
|
2181
2181
|
}), { rowModels: f, renderWindow: w } = se.X({
|
|
2182
2182
|
items: e,
|
|
2183
2183
|
context: o,
|
|
2184
2184
|
adapter: fl,
|
|
2185
|
-
options:
|
|
2185
|
+
options: m
|
|
2186
2186
|
}), I = (0, d.useMemo)(() => f.some((F) => !!F.dateText), [f]), b = (0, d.useCallback)((F) => {
|
|
2187
2187
|
if (i === "grid") {
|
|
2188
|
-
let
|
|
2189
|
-
u((_) => _ ===
|
|
2188
|
+
let V = Math.max(1, Math.floor(F.viewportWidth / Or));
|
|
2189
|
+
u((_) => _ === V ? _ : V);
|
|
2190
2190
|
}
|
|
2191
2191
|
y(F);
|
|
2192
2192
|
}, [y, i]);
|
|
@@ -2198,20 +2198,20 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
2198
2198
|
handleViewportChange: b
|
|
2199
2199
|
};
|
|
2200
2200
|
}
|
|
2201
|
-
var Dr = d.default.memo(({ files: e, searchTerm: t, handleSearch: r, sortBy: a, sortOrder: i, handleSortOptionChange: s, pagination: o, setPagination: c, loading: u, handleItemClick: n, onClearSelection:
|
|
2202
|
-
let { t: R } =
|
|
2201
|
+
var Dr = d.default.memo(({ files: e, searchTerm: t, handleSearch: r, sortBy: a, sortOrder: i, handleSortOptionChange: s, pagination: o, setPagination: c, loading: u, handleItemClick: n, onClearSelection: m, onRename: y, onDelete: f, onCopy: w, onMove: I, showRenameModal: b, showDeleteConfirm: F, showCopyModal: V, showMoveModal: _, onEdit: v, getFileData: C, handleAddFile: O }) => {
|
|
2202
|
+
let { t: R } = h.zn(), oe = h.mr(), { DropZoneFileIcon: k, BigStockIcon: U, BigAIIcon: D, FolderIcon: Q } = se.K(), { options: $, actions: K, state: M } = h.B(), { dataProviders: W, config: Z } = $, ae = Z?.disablePagination, { setCurrentMenuFile: pe, setActiveLibraryItem: te } = K, Ne = M?.selectedFolder === "Trash", E = M?.multiSelect !== !1, { viewMode: we, setViewMode: Be } = ol(), [Fe, S] = (0, d.useState)({}), [q, B] = (0, d.useState)(!1), ue = (0, d.useRef)(0), ve = (0, d.useRef)(null);
|
|
2203
2203
|
(0, d.useEffect)(() => {
|
|
2204
|
-
let z = window.matchMedia("(max-width: 1199px)"),
|
|
2204
|
+
let z = window.matchMedia("(max-width: 1199px)"), G = (Se) => {
|
|
2205
2205
|
B(Se.matches);
|
|
2206
2206
|
};
|
|
2207
|
-
|
|
2208
|
-
let ce = (Se) =>
|
|
2207
|
+
G(z);
|
|
2208
|
+
let ce = (Se) => G(Se);
|
|
2209
2209
|
return typeof z.addEventListener == "function" ? (z.addEventListener("change", ce), () => z.removeEventListener("change", ce)) : (z.addListener(ce), () => z.removeListener(ce));
|
|
2210
2210
|
}, []);
|
|
2211
|
-
let
|
|
2211
|
+
let H = (0, d.useMemo)(() => Z?.features || {}, [Z?.features]), x = Z?.iconStrokeWidth, j = Z?.sortOptions, ne = (0, d.useMemo)(() => j?.length ? new Set(j) : null, [j]), J = `${a}-${i}`;
|
|
2212
2212
|
(0, d.useEffect)(() => {
|
|
2213
2213
|
if (ne && !ne.has(J)) {
|
|
2214
|
-
let z = Nt.find((
|
|
2214
|
+
let z = Nt.find((G) => ne.has(G.value))?.value;
|
|
2215
2215
|
z && s(z);
|
|
2216
2216
|
}
|
|
2217
2217
|
}, [
|
|
@@ -2219,33 +2219,33 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
2219
2219
|
J,
|
|
2220
2220
|
s
|
|
2221
2221
|
]);
|
|
2222
|
-
let xe = (0, d.useMemo)(() => new Map(e.map((z) => [z.id, z])), [e]), { renderRows:
|
|
2222
|
+
let xe = (0, d.useMemo)(() => new Map(e.map((z) => [z.id, z])), [e]), { renderRows: me, renderWindow: L, hasAnyValidDate: re, handleViewportChange: X } = Il({
|
|
2223
2223
|
files: e,
|
|
2224
2224
|
folderFileCounts: Fe,
|
|
2225
|
-
features:
|
|
2225
|
+
features: H,
|
|
2226
2226
|
t: R,
|
|
2227
2227
|
viewMode: we,
|
|
2228
2228
|
previewFallbackToFileUrl: Z?.previewFallbackToFileUrl
|
|
2229
2229
|
}), Pe = (0, d.useCallback)(async (z) => {
|
|
2230
2230
|
try {
|
|
2231
|
-
if (
|
|
2232
|
-
if (
|
|
2233
|
-
let { files:
|
|
2231
|
+
if (W?.getChildrenCount) return await W.getChildrenCount(z === "folders" ? void 0 : z);
|
|
2232
|
+
if (W?.getFiles) {
|
|
2233
|
+
let { files: G, pagination: ce } = await W.getFiles({
|
|
2234
2234
|
folderId: z === "folders" ? void 0 : z,
|
|
2235
2235
|
itemType: "all",
|
|
2236
2236
|
page: ae ? void 0 : 1,
|
|
2237
2237
|
limit: ae ? void 0 : 1
|
|
2238
2238
|
});
|
|
2239
|
-
return ae ? Array.isArray(
|
|
2239
|
+
return ae ? Array.isArray(G) ? G.length : 0 : ce?.total ?? (Array.isArray(G) ? G.length : 0);
|
|
2240
2240
|
}
|
|
2241
2241
|
return 0;
|
|
2242
|
-
} catch (
|
|
2243
|
-
if (
|
|
2244
|
-
let ce =
|
|
2242
|
+
} catch (G) {
|
|
2243
|
+
if (G?.name === "StaleLoad") return 0;
|
|
2244
|
+
let ce = G;
|
|
2245
2245
|
if (ce?.status === 404 || ce?.code === "FileNotFound" || ce?.code === "path_folder_not_found" || ce?.data?.code === "path_folder_not_found" || ce?.data?.data?.status === 404) return 0;
|
|
2246
|
-
let Se = await
|
|
2246
|
+
let Se = await h.Ci({
|
|
2247
2247
|
folderId: z,
|
|
2248
|
-
dataProviders:
|
|
2248
|
+
dataProviders: W,
|
|
2249
2249
|
folders: Array.isArray(M.folders) ? M.folders : [],
|
|
2250
2250
|
pathHistory: M.pathHistory,
|
|
2251
2251
|
t: R
|
|
@@ -2254,17 +2254,17 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
2254
2254
|
id: "FOLDER_CHILDREN_COUNT_FAILED",
|
|
2255
2255
|
message: R("Failed to load folder items count in folder", { folderName: Se }),
|
|
2256
2256
|
placement: "bottomRight",
|
|
2257
|
-
innerException:
|
|
2257
|
+
innerException: G,
|
|
2258
2258
|
notificationDedupe: !0,
|
|
2259
2259
|
data: {
|
|
2260
2260
|
folderId: z === "folders" ? null : z,
|
|
2261
2261
|
folderName: Se,
|
|
2262
|
-
reason:
|
|
2262
|
+
reason: G instanceof Error ? G.message : String(G)
|
|
2263
2263
|
}
|
|
2264
2264
|
}), null;
|
|
2265
2265
|
}
|
|
2266
2266
|
}, [
|
|
2267
|
-
|
|
2267
|
+
W,
|
|
2268
2268
|
ae,
|
|
2269
2269
|
oe,
|
|
2270
2270
|
M.folders,
|
|
@@ -2273,12 +2273,12 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
2273
2273
|
]), Oe = (0, d.useCallback)(async () => {
|
|
2274
2274
|
let z = ue.current + 1;
|
|
2275
2275
|
ue.current = z;
|
|
2276
|
-
let
|
|
2277
|
-
if (
|
|
2276
|
+
let G = e.filter((Te) => Te.isFolder);
|
|
2277
|
+
if (G.length === 0) {
|
|
2278
2278
|
S((Te) => Object.keys(Te).length === 0 ? Te : {});
|
|
2279
2279
|
return;
|
|
2280
2280
|
}
|
|
2281
|
-
let ce = {}, Se =
|
|
2281
|
+
let ce = {}, Se = G.map(async (Te) => {
|
|
2282
2282
|
if (typeof Te.childCount == "number") {
|
|
2283
2283
|
ce[Te.id] = Te.childCount;
|
|
2284
2284
|
return;
|
|
@@ -2287,41 +2287,41 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
2287
2287
|
});
|
|
2288
2288
|
await Promise.all(Se), ue.current === z && S((Te) => {
|
|
2289
2289
|
let Ee = Object.keys(Te), tt = Object.keys(ce);
|
|
2290
|
-
return Ee.length === tt.length && Ee.every((
|
|
2290
|
+
return Ee.length === tt.length && Ee.every(($e) => Te[$e] === ce[$e]) ? Te : ce;
|
|
2291
2291
|
});
|
|
2292
2292
|
}, [e, Pe]);
|
|
2293
2293
|
(0, d.useEffect)(() => {
|
|
2294
2294
|
Oe();
|
|
2295
2295
|
}, [Oe]), (0, d.useEffect)(() => {
|
|
2296
|
-
ve.current && X(
|
|
2296
|
+
ve.current && X(h.Ya(ve.current));
|
|
2297
2297
|
}, [
|
|
2298
2298
|
e.length,
|
|
2299
2299
|
X,
|
|
2300
2300
|
we
|
|
2301
2301
|
]), (0, d.useEffect)(() => {
|
|
2302
2302
|
if (!ve.current || typeof ResizeObserver > "u") return;
|
|
2303
|
-
let z = ve.current,
|
|
2304
|
-
X(
|
|
2303
|
+
let z = ve.current, G = new ResizeObserver(() => {
|
|
2304
|
+
X(h.Ya(z));
|
|
2305
2305
|
});
|
|
2306
|
-
return
|
|
2307
|
-
|
|
2306
|
+
return G.observe(z), () => {
|
|
2307
|
+
G.disconnect();
|
|
2308
2308
|
};
|
|
2309
2309
|
}, [X]);
|
|
2310
2310
|
let Ue = (0, d.useCallback)((z) => {
|
|
2311
|
-
let
|
|
2312
|
-
X(
|
|
2311
|
+
let G = h.Ya(z);
|
|
2312
|
+
X(G);
|
|
2313
2313
|
}, [X]);
|
|
2314
2314
|
(0, d.useEffect)(() => {
|
|
2315
2315
|
let z = ve.current;
|
|
2316
2316
|
if (!z) return;
|
|
2317
|
-
let
|
|
2317
|
+
let G = () => {
|
|
2318
2318
|
Ue(z);
|
|
2319
|
-
}, ce =
|
|
2319
|
+
}, ce = h.Wa(z);
|
|
2320
2320
|
return ce.forEach((Se) => {
|
|
2321
|
-
Se.addEventListener("scroll",
|
|
2321
|
+
Se.addEventListener("scroll", G, { passive: !0 });
|
|
2322
2322
|
}), () => {
|
|
2323
2323
|
ce.forEach((Se) => {
|
|
2324
|
-
Se.removeEventListener("scroll",
|
|
2324
|
+
Se.removeEventListener("scroll", G);
|
|
2325
2325
|
});
|
|
2326
2326
|
};
|
|
2327
2327
|
}, [
|
|
@@ -2329,19 +2329,19 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
2329
2329
|
Ue,
|
|
2330
2330
|
we
|
|
2331
2331
|
]);
|
|
2332
|
-
let Ae = (0, d.useCallback)((z,
|
|
2332
|
+
let Ae = (0, d.useCallback)((z, G) => z !== G, []), at = (0, d.useMemo)(() => [
|
|
2333
2333
|
...E ? [{
|
|
2334
2334
|
key: "selection",
|
|
2335
2335
|
width: 46,
|
|
2336
2336
|
shouldCellUpdate: Ae,
|
|
2337
|
-
render: (z,
|
|
2337
|
+
render: (z, G) => (0, l.jsx)(Tt, { fileId: G.id })
|
|
2338
2338
|
}] : [],
|
|
2339
2339
|
{
|
|
2340
2340
|
key: "preview",
|
|
2341
2341
|
width: 60,
|
|
2342
2342
|
shouldCellUpdate: Ae,
|
|
2343
|
-
render: (z,
|
|
2344
|
-
item:
|
|
2343
|
+
render: (z, G) => (0, l.jsx)(At, {
|
|
2344
|
+
item: G,
|
|
2345
2345
|
variant: "table",
|
|
2346
2346
|
FolderIcon: Q,
|
|
2347
2347
|
getFileData: C,
|
|
@@ -2357,16 +2357,16 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
2357
2357
|
key: "name",
|
|
2358
2358
|
className: T.fileNameCol,
|
|
2359
2359
|
shouldCellUpdate: Ae,
|
|
2360
|
-
render: (z,
|
|
2360
|
+
render: (z, G) => (0, l.jsx)(Nr, { item: G })
|
|
2361
2361
|
},
|
|
2362
2362
|
{
|
|
2363
2363
|
title: R("Dimensions"),
|
|
2364
2364
|
key: "dimensions",
|
|
2365
2365
|
width: 100,
|
|
2366
2366
|
shouldCellUpdate: Ae,
|
|
2367
|
-
render: (z,
|
|
2367
|
+
render: (z, G) => G.dimensionsText && (0, l.jsx)("div", {
|
|
2368
2368
|
className: T.fileSize,
|
|
2369
|
-
children:
|
|
2369
|
+
children: G.dimensionsText
|
|
2370
2370
|
})
|
|
2371
2371
|
},
|
|
2372
2372
|
{
|
|
@@ -2374,9 +2374,9 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
2374
2374
|
key: "size",
|
|
2375
2375
|
width: 90,
|
|
2376
2376
|
shouldCellUpdate: Ae,
|
|
2377
|
-
render: (z,
|
|
2377
|
+
render: (z, G) => G.sizeText ? (0, l.jsx)("div", {
|
|
2378
2378
|
className: T.fileSize,
|
|
2379
|
-
children:
|
|
2379
|
+
children: G.sizeText
|
|
2380
2380
|
}) : null
|
|
2381
2381
|
},
|
|
2382
2382
|
{
|
|
@@ -2384,9 +2384,9 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
2384
2384
|
key: "type",
|
|
2385
2385
|
width: 90,
|
|
2386
2386
|
shouldCellUpdate: Ae,
|
|
2387
|
-
render: (z,
|
|
2387
|
+
render: (z, G) => (0, l.jsx)("div", {
|
|
2388
2388
|
className: T.fileSize,
|
|
2389
|
-
children:
|
|
2389
|
+
children: G.typeText
|
|
2390
2390
|
})
|
|
2391
2391
|
},
|
|
2392
2392
|
...re ? [{
|
|
@@ -2395,7 +2395,7 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
2395
2395
|
key: "date",
|
|
2396
2396
|
width: 200,
|
|
2397
2397
|
shouldCellUpdate: Ae,
|
|
2398
|
-
render: (z,
|
|
2398
|
+
render: (z, G) => (0, l.jsx)(Er, { item: G })
|
|
2399
2399
|
}] : [],
|
|
2400
2400
|
{
|
|
2401
2401
|
width: 40,
|
|
@@ -2404,14 +2404,14 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
2404
2404
|
key: "x",
|
|
2405
2405
|
onCell: () => ({ style: { padding: 0 } }),
|
|
2406
2406
|
shouldCellUpdate: Ae,
|
|
2407
|
-
render: (z,
|
|
2408
|
-
item:
|
|
2407
|
+
render: (z, G) => (0, l.jsx)(Mt, {
|
|
2408
|
+
item: G,
|
|
2409
2409
|
variant: "table",
|
|
2410
2410
|
t: R,
|
|
2411
2411
|
iconStrokeWidth: x,
|
|
2412
2412
|
setCurrentMenuFile: pe,
|
|
2413
2413
|
showMoveModal: _,
|
|
2414
|
-
showCopyModal:
|
|
2414
|
+
showCopyModal: V,
|
|
2415
2415
|
showRenameModal: b,
|
|
2416
2416
|
showDeleteConfirm: F,
|
|
2417
2417
|
onEdit: v
|
|
@@ -2426,30 +2426,30 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
2426
2426
|
v,
|
|
2427
2427
|
pe,
|
|
2428
2428
|
Ae,
|
|
2429
|
-
|
|
2429
|
+
V,
|
|
2430
2430
|
F,
|
|
2431
2431
|
_,
|
|
2432
2432
|
b,
|
|
2433
2433
|
R
|
|
2434
|
-
]), _e = (0, d.useMemo)(() => ({ body: { row: Fr } }), []), et = (0, d.useCallback)((z) => ({ onClick: (
|
|
2435
|
-
if (
|
|
2436
|
-
let ce =
|
|
2434
|
+
]), _e = (0, d.useMemo)(() => ({ body: { row: Fr } }), []), et = (0, d.useCallback)((z) => ({ onClick: (G) => {
|
|
2435
|
+
if (G.stopPropagation(), G.preventDefault(), G.detail !== 1) return;
|
|
2436
|
+
let ce = G.target, Se = !!ce.closest(".ant-checkbox-wrapper"), Te = !!ce.closest(".tableMenuButton"), Ee = !!ce.closest(".ant-dropdown-menu");
|
|
2437
2437
|
if (!(Se || xr(ce) || Te || Ee)) {
|
|
2438
2438
|
if (z.isFolder) {
|
|
2439
2439
|
n(z.file);
|
|
2440
2440
|
return;
|
|
2441
2441
|
}
|
|
2442
|
-
|
|
2442
|
+
$.onEditorOk && Pr(z.file) && $.onEditorOk(z.file);
|
|
2443
2443
|
}
|
|
2444
|
-
} }), [n,
|
|
2445
|
-
rows:
|
|
2444
|
+
} }), [n, $]), mt = we === "table" ? (0, l.jsx)(Sr, {
|
|
2445
|
+
rows: me,
|
|
2446
2446
|
columns: at,
|
|
2447
2447
|
topOffset: L.topOffset,
|
|
2448
2448
|
bottomOffset: L.bottomOffset,
|
|
2449
2449
|
onRow: et,
|
|
2450
2450
|
components: _e
|
|
2451
2451
|
}) : (0, l.jsx)(jr, {
|
|
2452
|
-
rows:
|
|
2452
|
+
rows: me,
|
|
2453
2453
|
topOffset: L.topOffset,
|
|
2454
2454
|
bottomOffset: L.bottomOffset,
|
|
2455
2455
|
t: R,
|
|
@@ -2458,15 +2458,15 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
2458
2458
|
handleItemClick: n,
|
|
2459
2459
|
setCurrentMenuFile: pe,
|
|
2460
2460
|
showMoveModal: _,
|
|
2461
|
-
showCopyModal:
|
|
2461
|
+
showCopyModal: V,
|
|
2462
2462
|
showRenameModal: b,
|
|
2463
2463
|
showDeleteConfirm: F,
|
|
2464
2464
|
onEdit: v,
|
|
2465
|
-
onEditorOk:
|
|
2465
|
+
onEditorOk: $.onEditorOk,
|
|
2466
2466
|
getFileData: C,
|
|
2467
2467
|
showSelectionCheckbox: E
|
|
2468
2468
|
});
|
|
2469
|
-
t && !e.length && (
|
|
2469
|
+
t && !e.length && (mt = (0, l.jsx)(se.J, {}));
|
|
2470
2470
|
let ie = Z?.availableImageExtensions?.map((z) => "." + z).join(", "), ge = Ne ? (0, l.jsxs)("div", {
|
|
2471
2471
|
className: `${T.noFiles} ant-layout-sider-light`,
|
|
2472
2472
|
children: [
|
|
@@ -2555,16 +2555,16 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
2555
2555
|
files: e,
|
|
2556
2556
|
filesById: xe,
|
|
2557
2557
|
currentSortOption: J,
|
|
2558
|
-
isSmallScreen:
|
|
2558
|
+
isSmallScreen: q,
|
|
2559
2559
|
iconStrokeWidth: x,
|
|
2560
2560
|
multiSelectEnabled: E,
|
|
2561
|
-
features:
|
|
2561
|
+
features: H,
|
|
2562
2562
|
viewMode: we,
|
|
2563
2563
|
setViewMode: Be,
|
|
2564
2564
|
handleSearch: r,
|
|
2565
2565
|
handleSortOptionChange: s,
|
|
2566
2566
|
sortOptions: j,
|
|
2567
|
-
onClearSelection:
|
|
2567
|
+
onClearSelection: m,
|
|
2568
2568
|
onRename: y,
|
|
2569
2569
|
onDelete: f,
|
|
2570
2570
|
onCopy: w,
|
|
@@ -2575,7 +2575,7 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
2575
2575
|
(0, l.jsxs)("div", {
|
|
2576
2576
|
ref: ve,
|
|
2577
2577
|
className: T.filesContainer,
|
|
2578
|
-
children: [
|
|
2578
|
+
children: [mt, u ? (0, l.jsx)("div", {
|
|
2579
2579
|
className: T.filesLoadingOverlay,
|
|
2580
2580
|
"aria-busy": "true",
|
|
2581
2581
|
"aria-live": "polite",
|
|
@@ -2588,9 +2588,9 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
2588
2588
|
current: o.current,
|
|
2589
2589
|
pageSize: o.pageSize,
|
|
2590
2590
|
total: o.total,
|
|
2591
|
-
onChange: (z,
|
|
2591
|
+
onChange: (z, G) => c({
|
|
2592
2592
|
current: z,
|
|
2593
|
-
pageSize:
|
|
2593
|
+
pageSize: G,
|
|
2594
2594
|
total: o.total
|
|
2595
2595
|
}),
|
|
2596
2596
|
showSizeChanger: !0,
|
|
@@ -2604,7 +2604,7 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
2604
2604
|
Dr.displayName = "FileContent";
|
|
2605
2605
|
var _l = (0, d.memo)(({ folderId: e, activeFormField: t, EmptyFolderIcon: r, targetForm: a, handleModalOk: i, onComplete: s, t: o, setIsLoading: c, defaultFolderName: u }) => {
|
|
2606
2606
|
let n = (0, d.useCallback)(() => {
|
|
2607
|
-
c(!0), i(a).then((
|
|
2607
|
+
c(!0), i(a).then((m) => s(m?.id)).finally(() => c(!1));
|
|
2608
2608
|
}, [
|
|
2609
2609
|
i,
|
|
2610
2610
|
a,
|
|
@@ -2617,7 +2617,7 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
2617
2617
|
initialValue: u,
|
|
2618
2618
|
rules: [{
|
|
2619
2619
|
required: !0,
|
|
2620
|
-
validator: (
|
|
2620
|
+
validator: (m, y) => typeof y == "string" && y.trim().length === 0 ? Promise.reject(Error(o("Enter the name of the folder"))) : Promise.resolve()
|
|
2621
2621
|
}],
|
|
2622
2622
|
children: (0, l.jsx)(g.Input, {
|
|
2623
2623
|
className: "form-input",
|
|
@@ -2635,11 +2635,11 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
2635
2635
|
});
|
|
2636
2636
|
});
|
|
2637
2637
|
_l.displayName = "CustomFolderInput";
|
|
2638
|
-
var bl = ({ isModalVisible: e, handleModalOk: t, handleModalCancel: r, form: a, selectedFolder: i, folders: s, isUrlModalVisible: o, setIsUrlModalVisible: c, handleAddFileByUrl: u, urlForm: n, isRenameModalVisible:
|
|
2639
|
-
let { t: E } =
|
|
2638
|
+
var bl = ({ isModalVisible: e, handleModalOk: t, handleModalCancel: r, form: a, selectedFolder: i, folders: s, isUrlModalVisible: o, setIsUrlModalVisible: c, handleAddFileByUrl: u, urlForm: n, isRenameModalVisible: m, handleRenameOk: y, handleRenameCancel: f, renameForm: w, fileToRename: I, files: b, isMoveModalVisible: F, handleMoveOk: V, handleMoveCancel: _, moveForm: v, selectedFiles: C, isRenameFolderModalVisible: O, handleRenameFolderOk: R, handleRenameFolderCancel: oe, renameFolderForm: k, folderToRename: U, isCopyModalVisible: D, handleCopyOk: Q, handleCopyCancel: $, copyForm: K, isDeleteConfirmVisible: M, handleDeleteConfirmOk: W, handleDeleteConfirmCancel: Z, isClearTrashConfirmVisible: ae, handleClearTrashConfirm: pe, handleClearTrashCancel: te, fetchChildFolders: Ne }) => {
|
|
2639
|
+
let { t: E } = h.zn(), { state: we, actions: Be, options: Fe } = h.B(), { setCurrentMenuFile: S } = Be, { config: q, getModalContainer: B } = Fe, { currentMenuFile: ue } = we, ve = g.Form.useWatch("folderName", a), { EmptyFolderIcon: H } = se.K(), [x, j] = (0, d.useState)(!1), ne = (0, d.useMemo)(() => q?.defaultFolderName?.trim() || E("New folder"), [q?.defaultFolderName, E]), J = !ve || String(ve).trim().length === 0, xe = (0, d.useMemo)(() => Array.isArray(b) ? b : [], [b]), me = I ? xe.find((ie) => ie.id === I)?.name : "", L = Array.isArray(s) ? s : [], re = U ? L.find((ie) => ie.id === U)?.name : "", { activeFormField: X, setActiveFormField: Pe, generateMenuItemsFromFolders: Oe } = se.oe({
|
|
2640
2640
|
folders: L,
|
|
2641
2641
|
selectedFolder: i,
|
|
2642
|
-
EmptyFolderIcon:
|
|
2642
|
+
EmptyFolderIcon: H,
|
|
2643
2643
|
handleCreateFolderModalOk: t,
|
|
2644
2644
|
setIsLoading: (ie) => j(!!ie),
|
|
2645
2645
|
t: E
|
|
@@ -2651,8 +2651,8 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
2651
2651
|
if (ge) {
|
|
2652
2652
|
let z = ge.querySelector(".ant-modal-footer");
|
|
2653
2653
|
if (z) {
|
|
2654
|
-
let
|
|
2655
|
-
|
|
2654
|
+
let G = z.querySelector(".ant-btn-primary");
|
|
2655
|
+
G && G.focus();
|
|
2656
2656
|
}
|
|
2657
2657
|
}
|
|
2658
2658
|
}, 100);
|
|
@@ -2666,26 +2666,26 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
2666
2666
|
X,
|
|
2667
2667
|
Pe
|
|
2668
2668
|
]), at = (0, d.useCallback)(async (ie) => {
|
|
2669
|
-
ie.length > 0 && (
|
|
2669
|
+
ie.length > 0 && (K.setFieldsValue({ targetFolder: ie[0] }), X !== ie[0].toString() && Pe(""));
|
|
2670
2670
|
}, [
|
|
2671
2671
|
X,
|
|
2672
|
-
|
|
2672
|
+
K,
|
|
2673
2673
|
Pe
|
|
2674
2674
|
]), _e = (0, d.useCallback)(async (ie) => {
|
|
2675
2675
|
j(!0);
|
|
2676
2676
|
try {
|
|
2677
|
-
await
|
|
2677
|
+
await V(ie);
|
|
2678
2678
|
} finally {
|
|
2679
2679
|
j(!1);
|
|
2680
2680
|
}
|
|
2681
|
-
}, [
|
|
2681
|
+
}, [V]), et = (0, d.useCallback)(async (ie) => {
|
|
2682
2682
|
j(!0);
|
|
2683
2683
|
try {
|
|
2684
2684
|
await Q(ie);
|
|
2685
2685
|
} finally {
|
|
2686
2686
|
j(!1);
|
|
2687
2687
|
}
|
|
2688
|
-
}, [Q]),
|
|
2688
|
+
}, [Q]), mt = (0, d.useMemo)(() => {
|
|
2689
2689
|
let ie = Array.from(C).filter((ge) => xe.find((z) => z.id === ge)?.isFolder || s.some((z) => z.id === ge));
|
|
2690
2690
|
return i && i !== "folders" ? ie.push(i) : (!i || i === "folders") && ie.push("folders"), ie;
|
|
2691
2691
|
}, [
|
|
@@ -2795,7 +2795,7 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
2795
2795
|
}, { validator: (ie, ge) => {
|
|
2796
2796
|
if (!ge || !String(ge).trim()) return Promise.resolve();
|
|
2797
2797
|
try {
|
|
2798
|
-
return
|
|
2798
|
+
return h.Hr(String(ge), E), Promise.resolve();
|
|
2799
2799
|
} catch (z) {
|
|
2800
2800
|
return Promise.reject(Error(z instanceof Error ? z.message : E("The specified URL is not valid.")));
|
|
2801
2801
|
}
|
|
@@ -2823,9 +2823,9 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
2823
2823
|
(0, l.jsx)(g.Modal, {
|
|
2824
2824
|
title: (0, l.jsx)("div", {
|
|
2825
2825
|
className: "modal-title",
|
|
2826
|
-
children: Ue ? `${E("Rename folder")} ${
|
|
2826
|
+
children: Ue ? `${E("Rename folder")} ${me}` : E("Rename file", { currentFileName: me })
|
|
2827
2827
|
}),
|
|
2828
|
-
open:
|
|
2828
|
+
open: m,
|
|
2829
2829
|
onOk: y,
|
|
2830
2830
|
okText: E("Rename"),
|
|
2831
2831
|
okButtonProps: { loading: x },
|
|
@@ -2888,7 +2888,7 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
2888
2888
|
loading: x,
|
|
2889
2889
|
children: [(0, l.jsx)(Pt.s, {
|
|
2890
2890
|
size: 18,
|
|
2891
|
-
strokeWidth:
|
|
2891
|
+
strokeWidth: q?.iconStrokeWidth
|
|
2892
2892
|
}), E("Create folder")]
|
|
2893
2893
|
}), (0, l.jsx)(g.Button, {
|
|
2894
2894
|
type: "primary",
|
|
@@ -2936,7 +2936,7 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
2936
2936
|
actionButtonText: E("Move here")
|
|
2937
2937
|
}),
|
|
2938
2938
|
fetchChildFolders: Ne,
|
|
2939
|
-
disabledFolders:
|
|
2939
|
+
disabledFolders: mt,
|
|
2940
2940
|
mode: "selection",
|
|
2941
2941
|
className: "folderSelectionTree",
|
|
2942
2942
|
defaultExpandAll: !0
|
|
@@ -2967,14 +2967,14 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
2967
2967
|
children: E("Copy to folder")
|
|
2968
2968
|
}),
|
|
2969
2969
|
open: D,
|
|
2970
|
-
onCancel:
|
|
2970
|
+
onCancel: $,
|
|
2971
2971
|
footer: (0, l.jsxs)("div", {
|
|
2972
2972
|
className: se.Q.formFooter,
|
|
2973
2973
|
children: [(0, l.jsxs)(g.Button, {
|
|
2974
2974
|
className: se.Q.folderButton,
|
|
2975
2975
|
onClick: () => {
|
|
2976
2976
|
let ie = i ?? "folders";
|
|
2977
|
-
Pe(ie),
|
|
2977
|
+
Pe(ie), K.setFieldsValue({
|
|
2978
2978
|
folderName: ne,
|
|
2979
2979
|
targetFolder: ie
|
|
2980
2980
|
});
|
|
@@ -2982,12 +2982,12 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
2982
2982
|
loading: x,
|
|
2983
2983
|
children: [(0, l.jsx)(Pt.s, {
|
|
2984
2984
|
size: 18,
|
|
2985
|
-
strokeWidth:
|
|
2985
|
+
strokeWidth: q?.iconStrokeWidth
|
|
2986
2986
|
}), E("Create folder")]
|
|
2987
2987
|
}), (0, l.jsx)(g.Button, {
|
|
2988
2988
|
type: "primary",
|
|
2989
2989
|
className: se.Q.folderButton,
|
|
2990
|
-
onClick:
|
|
2990
|
+
onClick: $,
|
|
2991
2991
|
loading: x,
|
|
2992
2992
|
children: E("Done")
|
|
2993
2993
|
})]
|
|
@@ -3004,7 +3004,7 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
3004
3004
|
className: se.Q.modalLoaderOverlay,
|
|
3005
3005
|
children: (0, l.jsx)(dt.r, {})
|
|
3006
3006
|
}), (0, l.jsx)(g.Form, {
|
|
3007
|
-
form:
|
|
3007
|
+
form: K,
|
|
3008
3008
|
layout: "vertical",
|
|
3009
3009
|
initialValues: {
|
|
3010
3010
|
targetFolder: "folders",
|
|
@@ -3024,13 +3024,13 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
3024
3024
|
children: (0, l.jsx)(se.ie, {
|
|
3025
3025
|
onSelect: at,
|
|
3026
3026
|
generateMenuItems: () => Oe({
|
|
3027
|
-
targetForm:
|
|
3027
|
+
targetForm: K,
|
|
3028
3028
|
onTreeSelect: at,
|
|
3029
3029
|
onComplete: et,
|
|
3030
3030
|
actionButtonText: E("Copy here")
|
|
3031
3031
|
}),
|
|
3032
3032
|
fetchChildFolders: Ne,
|
|
3033
|
-
disabledFolders:
|
|
3033
|
+
disabledFolders: mt,
|
|
3034
3034
|
mode: "selection",
|
|
3035
3035
|
className: "folderSelectionTree",
|
|
3036
3036
|
defaultExpandAll: !0
|
|
@@ -3110,43 +3110,43 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
3110
3110
|
className: `${se.Q.deleteModal} deleteModal`,
|
|
3111
3111
|
title: (0, l.jsx)("div", {
|
|
3112
3112
|
className: "modal-title",
|
|
3113
|
-
children:
|
|
3113
|
+
children: q?.enableTrashFolder && i === "Trash" || !q?.enableTrashFolder ? E("Permanently delete") : E("Move to Trash")
|
|
3114
3114
|
}),
|
|
3115
3115
|
open: !!M,
|
|
3116
3116
|
onOk: () => {
|
|
3117
3117
|
j(!0);
|
|
3118
3118
|
try {
|
|
3119
|
-
|
|
3119
|
+
W && W();
|
|
3120
3120
|
} catch {
|
|
3121
3121
|
j(!1);
|
|
3122
3122
|
}
|
|
3123
3123
|
},
|
|
3124
3124
|
onCancel: () => Z && Z(),
|
|
3125
|
-
okText:
|
|
3125
|
+
okText: q?.enableTrashFolder && i === "Trash" ? E("Delete permanently") : q?.enableTrashFolder ? E("Move to Trash") : E("Delete"),
|
|
3126
3126
|
cancelText: E("Cancel"),
|
|
3127
3127
|
okButtonProps: {
|
|
3128
|
-
danger:
|
|
3128
|
+
danger: !q?.enableTrashFolder || i === "Trash",
|
|
3129
3129
|
loading: x
|
|
3130
3130
|
},
|
|
3131
3131
|
cancelButtonProps: { disabled: x },
|
|
3132
3132
|
afterClose: () => {
|
|
3133
3133
|
j(!1), S && S("");
|
|
3134
3134
|
},
|
|
3135
|
-
closeIcon: (0, l.jsx)(
|
|
3135
|
+
closeIcon: (0, l.jsx)(qe.CloseOutlined, { className: se.Q.closeIcon }),
|
|
3136
3136
|
centered: !0,
|
|
3137
3137
|
getContainer: B,
|
|
3138
3138
|
children: (() => {
|
|
3139
|
-
let ie = (ue ? [ue] : Array.from(C || [])).map((Ee) => xe.find((tt) => tt.id === Ee)).filter((Ee) => !!Ee), ge = ie.filter((Ee) => Ee.isFolder || Ee.id.startsWith("folder_")), z = ie.filter((Ee) => !(Ee.isFolder || Ee.id.startsWith("folder_"))),
|
|
3139
|
+
let ie = (ue ? [ue] : Array.from(C || [])).map((Ee) => xe.find((tt) => tt.id === Ee)).filter((Ee) => !!Ee), ge = ie.filter((Ee) => Ee.isFolder || Ee.id.startsWith("folder_")), z = ie.filter((Ee) => !(Ee.isFolder || Ee.id.startsWith("folder_"))), G = ie.length, ce = ge.length, Se = z.length, Te = !!q?.enableTrashFolder;
|
|
3140
3140
|
if (!Te || Te && i === "Trash") {
|
|
3141
3141
|
let Ee;
|
|
3142
|
-
if (
|
|
3143
|
-
let tt = ge[0],
|
|
3142
|
+
if (G === 1 && ce === 1) {
|
|
3143
|
+
let tt = ge[0], $e = tt?.name || "", xt = tt?.childCount ?? 0;
|
|
3144
3144
|
Ee = E("delete_folder_permanent", {
|
|
3145
|
-
name:
|
|
3145
|
+
name: $e,
|
|
3146
3146
|
count: xt
|
|
3147
3147
|
});
|
|
3148
3148
|
} else Ee = ce === 0 && Se > 0 ? E("delete_files_permanent", { count: Se }) : E("delete_mixed_permanent", {
|
|
3149
|
-
total:
|
|
3149
|
+
total: G,
|
|
3150
3150
|
folders: ce,
|
|
3151
3151
|
images: Se
|
|
3152
3152
|
});
|
|
@@ -3155,15 +3155,15 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
3155
3155
|
children: E("permanent_delete_warning")
|
|
3156
3156
|
})] });
|
|
3157
3157
|
}
|
|
3158
|
-
if (
|
|
3159
|
-
let Ee = ge[0], tt = Ee?.name || "",
|
|
3158
|
+
if (G === 1 && ce === 1) {
|
|
3159
|
+
let Ee = ge[0], tt = Ee?.name || "", $e = Ee?.childCount ?? 0;
|
|
3160
3160
|
return (0, l.jsx)("div", { children: E("move_folder_to_trash", {
|
|
3161
3161
|
name: tt,
|
|
3162
|
-
count:
|
|
3162
|
+
count: $e
|
|
3163
3163
|
}) });
|
|
3164
3164
|
}
|
|
3165
3165
|
return ce === 0 && Se > 0 ? (0, l.jsx)("div", { children: E("move_files_to_trash", { count: Se }) }) : (0, l.jsx)("div", { children: E("move_mixed_to_trash", {
|
|
3166
|
-
total:
|
|
3166
|
+
total: G,
|
|
3167
3167
|
folders: ce,
|
|
3168
3168
|
images: Se
|
|
3169
3169
|
}) });
|
|
@@ -3190,7 +3190,7 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
3190
3190
|
afterClose: () => {
|
|
3191
3191
|
j(!1);
|
|
3192
3192
|
},
|
|
3193
|
-
closeIcon: (0, l.jsx)(
|
|
3193
|
+
closeIcon: (0, l.jsx)(qe.CloseOutlined, { className: se.Q.closeIcon }),
|
|
3194
3194
|
centered: !0,
|
|
3195
3195
|
getContainer: B,
|
|
3196
3196
|
children: [(0, l.jsx)("div", { children: E("Are you sure you want to permanently delete all items from Trash?") }), x && (0, l.jsxs)("div", {
|
|
@@ -3235,31 +3235,31 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
3235
3235
|
lockedTabIcon: "lockedTabIcon",
|
|
3236
3236
|
lockedTabLock: "lockedTabLock",
|
|
3237
3237
|
lockedTabLabel: "lockedTabLabel"
|
|
3238
|
-
}, Br = (0, d.memo)((0, d.forwardRef)(({ selectedFolder: e, generateMenuItems: t, onFolderSelect: r, folders: a, fetchChildFolders: i, handleAddFile: s, setIsUrlModalVisible: o, handleCreateFolder: c, activeLibraryItem: u, setActiveLibraryItem: n },
|
|
3239
|
-
let y = (0, d.useMemo)(() => Array.isArray(a) ? a : [], [a]), { t: f } =
|
|
3238
|
+
}, Br = (0, d.memo)((0, d.forwardRef)(({ selectedFolder: e, generateMenuItems: t, onFolderSelect: r, folders: a, fetchChildFolders: i, handleAddFile: s, setIsUrlModalVisible: o, handleCreateFolder: c, activeLibraryItem: u, setActiveLibraryItem: n }, m) => {
|
|
3239
|
+
let y = (0, d.useMemo)(() => Array.isArray(a) ? a : [], [a]), { t: f } = h.zn(), w = h.mr(), [I, b] = (0, d.useState)({}), { options: F, state: V } = h.B(), { dataProviders: _, config: v } = F, C = V.pathHistory, O = v?.features?.enableGif !== !1 && (!v?.enabledTabs || v.enabledTabs.includes("gif")), R = v?.features?.enableStockImages !== !1 && (!v?.enabledTabs || v.enabledTabs.includes("stock")), oe = v?.features?.enableIconStock !== !1 && (!v?.enabledTabs || v.enabledTabs.includes("icons")), k = v?.features?.enableQrBarcodeTab !== !1 && (!v?.enabledTabs || v.enabledTabs.includes("codes")), U = (0, d.useCallback)((S, q) => h.Qn(q, v) ? (0, l.jsxs)("span", {
|
|
3240
3240
|
className: Je.lockedTabIcon,
|
|
3241
3241
|
children: [S, (0, l.jsx)(be.i, {
|
|
3242
3242
|
size: 12,
|
|
3243
3243
|
strokeWidth: 2.5,
|
|
3244
3244
|
className: Je.lockedTabLock
|
|
3245
3245
|
})]
|
|
3246
|
-
}) : S, [v]), D = (0, d.useCallback)((S,
|
|
3246
|
+
}) : S, [v]), D = (0, d.useCallback)((S, q) => h.Qn(q, v) ? (0, l.jsx)("span", {
|
|
3247
3247
|
className: Je.lockedTabLabel,
|
|
3248
3248
|
children: S
|
|
3249
3249
|
}) : S, [v]), Q = (0, d.useCallback)((S) => {
|
|
3250
|
-
let
|
|
3250
|
+
let q = [], B = (ue) => {
|
|
3251
3251
|
ue.forEach((ve) => {
|
|
3252
|
-
|
|
3252
|
+
q.push(ve.key), ve.children && B(ve.children);
|
|
3253
3253
|
});
|
|
3254
3254
|
};
|
|
3255
|
-
return B(S),
|
|
3256
|
-
}, []), [K
|
|
3255
|
+
return B(S), q;
|
|
3256
|
+
}, []), [$, K] = (0, d.useState)(() => {
|
|
3257
3257
|
if (v?.expandAllFoldersOnInit === !0 && v?.folderTreeLoading !== "lazy") {
|
|
3258
3258
|
let S = t();
|
|
3259
3259
|
return Q(S);
|
|
3260
3260
|
}
|
|
3261
3261
|
return v?.expandRootFolderOnInit === !0 ? ["folders"] : [];
|
|
3262
|
-
}), M = (0, d.useRef)(!1),
|
|
3262
|
+
}), M = (0, d.useRef)(!1), W = (0, d.useRef)(!1);
|
|
3263
3263
|
(0, d.useEffect)(() => {
|
|
3264
3264
|
M.current || v?.folderTreeLoading === "lazy" && v?.expandRootFolderOnInit === !0 && (M.current = !0, (async () => {
|
|
3265
3265
|
try {
|
|
@@ -3271,18 +3271,18 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
3271
3271
|
v?.expandRootFolderOnInit,
|
|
3272
3272
|
i
|
|
3273
3273
|
]), (0, d.useEffect)(() => {
|
|
3274
|
-
v?.expandRootFolderOnInit === !0 && Array.isArray(y) && y.length > 0 && !
|
|
3274
|
+
v?.expandRootFolderOnInit === !0 && Array.isArray(y) && y.length > 0 && !W.current && (!$ || $.length === 0) && (W.current = !0, K(["folders"]));
|
|
3275
3275
|
}, [
|
|
3276
3276
|
v?.expandRootFolderOnInit,
|
|
3277
3277
|
y,
|
|
3278
|
-
|
|
3278
|
+
$
|
|
3279
3279
|
]), (0, d.useEffect)(() => {
|
|
3280
3280
|
if (v?.expandAllFoldersOnInit === !0 && v?.folderTreeLoading !== "lazy") {
|
|
3281
|
-
let S = t(),
|
|
3282
|
-
|
|
3281
|
+
let S = t(), q = Q(S);
|
|
3282
|
+
K(q);
|
|
3283
3283
|
return;
|
|
3284
3284
|
}
|
|
3285
|
-
v?.expandRootFolderOnInit === !0 &&
|
|
3285
|
+
v?.expandRootFolderOnInit === !0 && K((S) => S && S.length > 0 ? [...S] : ["folders"]);
|
|
3286
3286
|
}, [
|
|
3287
3287
|
y,
|
|
3288
3288
|
t,
|
|
@@ -3295,20 +3295,20 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
3295
3295
|
try {
|
|
3296
3296
|
if (_?.getChildrenCount) return await _.getChildrenCount(S === "folders" ? void 0 : S);
|
|
3297
3297
|
if (_?.getFiles) {
|
|
3298
|
-
let { files:
|
|
3298
|
+
let { files: q, pagination: B } = await _.getFiles({
|
|
3299
3299
|
folderId: S === "folders" ? void 0 : S,
|
|
3300
3300
|
itemType: "all",
|
|
3301
3301
|
page: Z ? void 0 : 1,
|
|
3302
3302
|
limit: Z ? void 0 : 1
|
|
3303
3303
|
});
|
|
3304
|
-
return Z ? Array.isArray(
|
|
3304
|
+
return Z ? Array.isArray(q) ? q.length : 0 : B?.total ?? (Array.isArray(q) ? q.length : 0);
|
|
3305
3305
|
}
|
|
3306
3306
|
return 0;
|
|
3307
|
-
} catch (
|
|
3308
|
-
if (
|
|
3309
|
-
let B =
|
|
3307
|
+
} catch (q) {
|
|
3308
|
+
if (q?.name === "StaleLoad") return 0;
|
|
3309
|
+
let B = q;
|
|
3310
3310
|
if (B?.status === 404 || B?.code === "FileNotFound" || B?.code === "path_folder_not_found" || B?.data?.code === "path_folder_not_found" || B?.data?.data?.status === 404) return 0;
|
|
3311
|
-
let ue = await
|
|
3311
|
+
let ue = await h.Ci({
|
|
3312
3312
|
folderId: S,
|
|
3313
3313
|
dataProviders: _,
|
|
3314
3314
|
folders: y,
|
|
@@ -3319,12 +3319,12 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
3319
3319
|
id: "FOLDER_CHILDREN_COUNT_FAILED",
|
|
3320
3320
|
message: f("Failed to load folder items count in folder", { folderName: ue }),
|
|
3321
3321
|
placement: "bottomRight",
|
|
3322
|
-
innerException:
|
|
3322
|
+
innerException: q,
|
|
3323
3323
|
notificationDedupe: !0,
|
|
3324
3324
|
data: {
|
|
3325
3325
|
folderId: S === "folders" ? null : S,
|
|
3326
3326
|
folderName: ue,
|
|
3327
|
-
reason:
|
|
3327
|
+
reason: q instanceof Error ? q.message : String(q)
|
|
3328
3328
|
}
|
|
3329
3329
|
}), null;
|
|
3330
3330
|
}
|
|
@@ -3339,22 +3339,22 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
3339
3339
|
if (y.length === 0) return;
|
|
3340
3340
|
let S = {};
|
|
3341
3341
|
S.folders = await ae("folders");
|
|
3342
|
-
let
|
|
3342
|
+
let q = y.map(async (B) => {
|
|
3343
3343
|
if (typeof B.childCount == "number") {
|
|
3344
3344
|
S[B.id] = B.childCount;
|
|
3345
3345
|
return;
|
|
3346
3346
|
}
|
|
3347
3347
|
S[B.id] = await ae(B.id);
|
|
3348
3348
|
});
|
|
3349
|
-
await Promise.all(
|
|
3349
|
+
await Promise.all(q), b(S);
|
|
3350
3350
|
}, [y, ae]), te = (0, d.useCallback)(async (S) => {
|
|
3351
|
-
let
|
|
3351
|
+
let q = await ae(S);
|
|
3352
3352
|
b((B) => ({
|
|
3353
3353
|
...B,
|
|
3354
|
-
[S]:
|
|
3354
|
+
[S]: q
|
|
3355
3355
|
}));
|
|
3356
3356
|
}, [ae]);
|
|
3357
|
-
(0, d.useImperativeHandle)(
|
|
3357
|
+
(0, d.useImperativeHandle)(m, () => ({ refreshFileCounts: pe }), [pe]), (0, d.useEffect)(() => {
|
|
3358
3358
|
pe();
|
|
3359
3359
|
}, [pe]), (0, d.useEffect)(() => {
|
|
3360
3360
|
if (!e || e === "folders") return;
|
|
@@ -3362,13 +3362,13 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
3362
3362
|
if (ue.has(B)) return [];
|
|
3363
3363
|
let ve = y.find((x) => x.id === B);
|
|
3364
3364
|
if (!ve || !ve.parentId) return [];
|
|
3365
|
-
let
|
|
3366
|
-
return
|
|
3367
|
-
},
|
|
3368
|
-
|
|
3365
|
+
let H = new Set(ue);
|
|
3366
|
+
return H.add(B), [...S(ve.parentId, H), ve.parentId];
|
|
3367
|
+
}, q = S(e);
|
|
3368
|
+
q.length > 0 ? K((B) => {
|
|
3369
3369
|
let ue = new Set(B);
|
|
3370
|
-
return
|
|
3371
|
-
}) :
|
|
3370
|
+
return q.forEach((ve) => ue.add(ve)), ue.add("folders"), Array.from(ue);
|
|
3371
|
+
}) : K((B) => B.includes("folders") ? B : [...B, "folders"]);
|
|
3372
3372
|
}, [e, y]);
|
|
3373
3373
|
let Ne = (0, d.useCallback)(async () => {
|
|
3374
3374
|
await s(), e ? await te(e) : await te("folders");
|
|
@@ -3378,12 +3378,12 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
3378
3378
|
te
|
|
3379
3379
|
]), E = [
|
|
3380
3380
|
{
|
|
3381
|
-
key:
|
|
3382
|
-
label: D(f("My files"),
|
|
3381
|
+
key: h.g,
|
|
3382
|
+
label: D(f("My files"), h.g),
|
|
3383
3383
|
icon: U((0, l.jsx)(be.a, {
|
|
3384
3384
|
size: 20,
|
|
3385
3385
|
strokeWidth: v?.iconStrokeWidth
|
|
3386
|
-
}),
|
|
3386
|
+
}), h.g)
|
|
3387
3387
|
},
|
|
3388
3388
|
{
|
|
3389
3389
|
key: "gif",
|
|
@@ -3395,30 +3395,30 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
3395
3395
|
disabled: !O
|
|
3396
3396
|
},
|
|
3397
3397
|
{
|
|
3398
|
-
key:
|
|
3399
|
-
label: D(f("Stock images"),
|
|
3398
|
+
key: h._,
|
|
3399
|
+
label: D(f("Stock images"), h._),
|
|
3400
3400
|
icon: U((0, l.jsx)(Yt, {
|
|
3401
3401
|
size: 20,
|
|
3402
3402
|
strokeWidth: v?.iconStrokeWidth
|
|
3403
|
-
}),
|
|
3403
|
+
}), h._),
|
|
3404
3404
|
disabled: !R
|
|
3405
3405
|
},
|
|
3406
3406
|
{
|
|
3407
|
-
key:
|
|
3408
|
-
label: D(f("Icons"),
|
|
3407
|
+
key: h.v,
|
|
3408
|
+
label: D(f("Icons"), h.v),
|
|
3409
3409
|
icon: U((0, l.jsx)(se.s$1, {
|
|
3410
3410
|
size: 20,
|
|
3411
3411
|
strokeWidth: v?.iconStrokeWidth
|
|
3412
|
-
}),
|
|
3412
|
+
}), h.v),
|
|
3413
3413
|
disabled: !oe
|
|
3414
3414
|
},
|
|
3415
3415
|
{
|
|
3416
|
-
key:
|
|
3417
|
-
label: D(f("QR & Barcode"),
|
|
3416
|
+
key: h.y,
|
|
3417
|
+
label: D(f("QR & Barcode"), h.y),
|
|
3418
3418
|
icon: U((0, l.jsx)(Jt, {
|
|
3419
3419
|
size: 20,
|
|
3420
3420
|
strokeWidth: v?.iconStrokeWidth
|
|
3421
|
-
}),
|
|
3421
|
+
}), h.y),
|
|
3422
3422
|
disabled: !k
|
|
3423
3423
|
},
|
|
3424
3424
|
{
|
|
@@ -3431,26 +3431,26 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
3431
3431
|
disabled: !v?.sseQuery
|
|
3432
3432
|
}
|
|
3433
3433
|
].filter((S) => !S.disabled), we = (0, d.useCallback)(async (S) => {
|
|
3434
|
-
let
|
|
3435
|
-
|
|
3434
|
+
let q = S[0];
|
|
3435
|
+
!q || q === "empty" || (u !== "my_files" && n("my_files"), r?.(q), await i?.(q === "folders" ? null : q));
|
|
3436
3436
|
}, [
|
|
3437
3437
|
r,
|
|
3438
3438
|
u,
|
|
3439
3439
|
n,
|
|
3440
3440
|
i
|
|
3441
3441
|
]), Be = (0, d.useCallback)(({ key: S }) => {
|
|
3442
|
-
if (
|
|
3442
|
+
if (h.Qn(S, v)) {
|
|
3443
3443
|
v?.onLockedTabClick?.(S);
|
|
3444
3444
|
return;
|
|
3445
3445
|
}
|
|
3446
3446
|
n(S);
|
|
3447
|
-
}, [v, n]), Fe = (0, d.useCallback)(async (S,
|
|
3448
|
-
if (
|
|
3449
|
-
let B =
|
|
3447
|
+
}, [v, n]), Fe = (0, d.useCallback)(async (S, q) => {
|
|
3448
|
+
if (K(S), v?.folderTreeLoading !== "lazy") return;
|
|
3449
|
+
let B = q?.node?.key || void 0;
|
|
3450
3450
|
if (!(!B || B === "folders")) try {
|
|
3451
3451
|
await i?.(B);
|
|
3452
3452
|
} catch (ue) {
|
|
3453
|
-
let ve = await
|
|
3453
|
+
let ve = await h.Ci({
|
|
3454
3454
|
folderId: B,
|
|
3455
3455
|
dataProviders: _,
|
|
3456
3456
|
folders: y,
|
|
@@ -3515,7 +3515,7 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
3515
3515
|
(0, l.jsx)(g.Menu, {
|
|
3516
3516
|
className: "folder-menu",
|
|
3517
3517
|
items: E,
|
|
3518
|
-
defaultSelectedKeys: [
|
|
3518
|
+
defaultSelectedKeys: [h.g],
|
|
3519
3519
|
onSelect: ({ key: S }) => Be({ key: S }),
|
|
3520
3520
|
selectedKeys: [u]
|
|
3521
3521
|
}),
|
|
@@ -3530,8 +3530,8 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
3530
3530
|
fetchChildFolders: i,
|
|
3531
3531
|
showFileCounts: !0,
|
|
3532
3532
|
folderFileCounts: I,
|
|
3533
|
-
expandedKeys:
|
|
3534
|
-
setExpandedKeys:
|
|
3533
|
+
expandedKeys: $,
|
|
3534
|
+
setExpandedKeys: K,
|
|
3535
3535
|
showTrashFolder: v?.enableTrashFolder
|
|
3536
3536
|
}), (0, l.jsx)("div", {
|
|
3537
3537
|
className: Je.folderActions,
|
|
@@ -3552,7 +3552,7 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
3552
3552
|
});
|
|
3553
3553
|
}));
|
|
3554
3554
|
Br.displayName = "FolderSidebar";
|
|
3555
|
-
var Cl = d.default.lazy(async () => ({ default: (await Promise.resolve().then(() => ze("./
|
|
3555
|
+
var Cl = d.default.lazy(async () => ({ default: (await Promise.resolve().then(() => ze("./2180385a.js"))).PixieEditor })), Fl = {
|
|
3556
3556
|
position: "fixed",
|
|
3557
3557
|
inset: 0,
|
|
3558
3558
|
display: "flex",
|
|
@@ -3633,16 +3633,16 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
3633
3633
|
uploadProgressFileList: "uploadProgress__file-list",
|
|
3634
3634
|
slideInFromLeft: "slideInFromLeft"
|
|
3635
3635
|
}, { Text: ut } = g.Typography, xl = ({ visible: e, files: t, totalFiles: r, completedFiles: a, onClose: i, onMinimize: s, onInsert: o, minimized: c = !1 }) => {
|
|
3636
|
-
let { token: u } = g.theme.useToken(), { t: n } =
|
|
3636
|
+
let { token: u } = g.theme.useToken(), { t: n } = h.zn();
|
|
3637
3637
|
if (!e) return null;
|
|
3638
|
-
let
|
|
3638
|
+
let m = (v) => {
|
|
3639
3639
|
switch (v) {
|
|
3640
3640
|
case "success": return (0, l.jsx)("div", {
|
|
3641
3641
|
className: Ce["uploadProgress__status-icon"],
|
|
3642
|
-
children: (0, l.jsx)(
|
|
3642
|
+
children: (0, l.jsx)(qe.CheckCircleOutlined, { style: { color: u.colorSuccess } })
|
|
3643
3643
|
});
|
|
3644
|
-
case "error": return (0, l.jsx)(
|
|
3645
|
-
default: return (0, l.jsx)(
|
|
3644
|
+
case "error": return (0, l.jsx)(qe.ExclamationCircleOutlined, { style: { color: u.colorError } });
|
|
3645
|
+
default: return (0, l.jsx)(qe.FileImageOutlined, { style: { color: "#1890ff" } });
|
|
3646
3646
|
}
|
|
3647
3647
|
}, y = (v) => {
|
|
3648
3648
|
if (!v) return null;
|
|
@@ -3667,7 +3667,7 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
3667
3667
|
})
|
|
3668
3668
|
})
|
|
3669
3669
|
});
|
|
3670
|
-
let w = t.filter((v) => v.status === "uploading").length, I = t.filter((v) => v.status === "success").length, b = t.filter((v) => v.status === "error").length, F = t.filter((v) => v.status === "error"),
|
|
3670
|
+
let w = t.filter((v) => v.status === "uploading").length, I = t.filter((v) => v.status === "success").length, b = t.filter((v) => v.status === "error").length, F = t.filter((v) => v.status === "error"), V = F.length > 1 && F.every((v) => v.error && v.error === F[0]?.error), _ = V ? F[0]?.error : null;
|
|
3671
3671
|
return (0, l.jsx)("div", {
|
|
3672
3672
|
className: Ce.uploadProgress + " fm-upload-progress",
|
|
3673
3673
|
children: (0, l.jsxs)("div", {
|
|
@@ -3689,7 +3689,7 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
3689
3689
|
children: (0, l.jsx)(g.Button, {
|
|
3690
3690
|
type: "text",
|
|
3691
3691
|
size: "small",
|
|
3692
|
-
icon: (0, l.jsx)(
|
|
3692
|
+
icon: (0, l.jsx)(qe.CloseOutlined, { className: Ce["uploadProgress__close-icon"] }),
|
|
3693
3693
|
onClick: i,
|
|
3694
3694
|
className: Ce["uploadProgress__header-button"]
|
|
3695
3695
|
})
|
|
@@ -3710,7 +3710,7 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
3710
3710
|
children: (0, l.jsx)(g.List.Item.Meta, {
|
|
3711
3711
|
avatar: (0, l.jsx)(g.Avatar, {
|
|
3712
3712
|
size: "small",
|
|
3713
|
-
icon:
|
|
3713
|
+
icon: m(v.status),
|
|
3714
3714
|
className: Ce["uploadProgress__file-avatar"]
|
|
3715
3715
|
}),
|
|
3716
3716
|
title: (0, l.jsxs)("div", {
|
|
@@ -3722,7 +3722,7 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
3722
3722
|
}), (0, l.jsx)(ut, {
|
|
3723
3723
|
type: "secondary",
|
|
3724
3724
|
className: Ce["uploadProgress__file-size"],
|
|
3725
|
-
children: v.size === void 0 ? "" :
|
|
3725
|
+
children: v.size === void 0 ? "" : h.Jn(v.size)
|
|
3726
3726
|
})]
|
|
3727
3727
|
}),
|
|
3728
3728
|
description: v.status === "uploading" ? (0, l.jsx)(g.Progress, {
|
|
@@ -3731,7 +3731,7 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
3731
3731
|
status: "active",
|
|
3732
3732
|
showInfo: !1,
|
|
3733
3733
|
className: Ce["uploadProgress__progress-bar"]
|
|
3734
|
-
}) : C ?
|
|
3734
|
+
}) : C ? V ? null : (0, l.jsxs)("div", {
|
|
3735
3735
|
className: Ce["uploadProgress__error-item"],
|
|
3736
3736
|
children: [(0, l.jsx)(ut, {
|
|
3737
3737
|
type: "danger",
|
|
@@ -3751,7 +3751,7 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
3751
3751
|
className: Ce["uploadProgress__common-error"],
|
|
3752
3752
|
children: [(0, l.jsxs)("div", {
|
|
3753
3753
|
className: Ce["uploadProgress__common-error-row"],
|
|
3754
|
-
children: [(0, l.jsx)(
|
|
3754
|
+
children: [(0, l.jsx)(qe.ExclamationCircleOutlined, { style: {
|
|
3755
3755
|
color: u.colorError,
|
|
3756
3756
|
marginRight: 8,
|
|
3757
3757
|
flexShrink: 0
|
|
@@ -3769,26 +3769,26 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
3769
3769
|
})
|
|
3770
3770
|
});
|
|
3771
3771
|
}, { Header: Pl } = g.Layout, { Title: kl } = g.Typography, jl = 200, Sl = ({ activeLibraryItem: e, selectedFolder: t, isTrashFolder: r, onClearTrash: a, files: i, loading: s, onRefresh: o, refreshDisabled: c, showRefresh: u = !1 }) => {
|
|
3772
|
-
let { t: n } =
|
|
3773
|
-
[
|
|
3772
|
+
let { t: n } = h.zn(), m = e === "my_files" && (r ?? t === "Trash"), [y, f] = d.useState(!1), w = {
|
|
3773
|
+
[h.g]: n("My files"),
|
|
3774
3774
|
gif: n("GIF"),
|
|
3775
|
-
[
|
|
3776
|
-
[
|
|
3777
|
-
[
|
|
3775
|
+
[h._]: n("Stock images"),
|
|
3776
|
+
[h.v]: n("Icons"),
|
|
3777
|
+
[h.y]: n("QR & Barcode"),
|
|
3778
3778
|
ai: n("AI image generation")
|
|
3779
3779
|
};
|
|
3780
3780
|
d.useEffect(() => {
|
|
3781
3781
|
let b = setTimeout(() => {
|
|
3782
|
-
f(
|
|
3782
|
+
f(m && i.length > 0 && !s);
|
|
3783
3783
|
}, jl);
|
|
3784
3784
|
return () => clearTimeout(b);
|
|
3785
3785
|
}, [
|
|
3786
|
-
|
|
3786
|
+
m,
|
|
3787
3787
|
i.length,
|
|
3788
3788
|
s
|
|
3789
3789
|
]);
|
|
3790
3790
|
let I;
|
|
3791
|
-
return I = e === "my_files" ?
|
|
3791
|
+
return I = e === "my_files" ? m ? n("Trash") : t : w[e], (0, l.jsx)(Pl, {
|
|
3792
3792
|
className: "actions-header",
|
|
3793
3793
|
children: (0, l.jsxs)("div", {
|
|
3794
3794
|
className: "header-title-container",
|
|
@@ -3819,7 +3819,7 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
3819
3819
|
})
|
|
3820
3820
|
});
|
|
3821
3821
|
}, Ur = ({ imageId: e, sourceUrl: t, shouldLoad: r = !0, loader: a, onLoad: i, ...s }) => {
|
|
3822
|
-
let o =
|
|
3822
|
+
let o = h.Ia((0, d.useMemo)(() => [t], [t])), [c, u] = (0, d.useState)(() => a.getSnapshot(e, t)), n = (0, d.useRef)(null);
|
|
3823
3823
|
return (0, d.useEffect)(() => (u(a.getSnapshot(e, t)), a.subscribe(e, t, u)), [
|
|
3824
3824
|
e,
|
|
3825
3825
|
a,
|
|
@@ -3836,24 +3836,24 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
3836
3836
|
ref: n,
|
|
3837
3837
|
src: o.src,
|
|
3838
3838
|
loading: s.loading ?? "lazy",
|
|
3839
|
-
onLoad: (
|
|
3840
|
-
o.handleLoad(), a.markLoaded(e), i?.(
|
|
3839
|
+
onLoad: (m) => {
|
|
3840
|
+
o.handleLoad(), a.markLoaded(e), i?.(m);
|
|
3841
3841
|
},
|
|
3842
|
-
onError: async (
|
|
3843
|
-
(await o.handleError()).exhausted && a.markError(e), s.onError?.(
|
|
3842
|
+
onError: async (m) => {
|
|
3843
|
+
(await o.handleError()).exhausted && a.markError(e), s.onError?.(m);
|
|
3844
3844
|
}
|
|
3845
3845
|
});
|
|
3846
|
-
},
|
|
3846
|
+
}, Gr = 42, El = 6;
|
|
3847
3847
|
function Nl(e) {
|
|
3848
|
-
if (e.length <=
|
|
3849
|
-
let t = e.slice(0,
|
|
3848
|
+
if (e.length <= Gr) return e;
|
|
3849
|
+
let t = e.slice(0, Gr), r = t.lastIndexOf(" ");
|
|
3850
3850
|
return (r > 0 ? t.slice(0, r) : t).trimEnd();
|
|
3851
3851
|
}
|
|
3852
|
-
function
|
|
3853
|
-
let r = Nl(
|
|
3852
|
+
function Vr(e, t) {
|
|
3853
|
+
let r = Nl(h.Ti(e?.trim() ?? "").base.replace(/[\\/]+/g, "-").trim());
|
|
3854
3854
|
return r ? `${r}-${t.slice(0, El)}` : void 0;
|
|
3855
3855
|
}
|
|
3856
|
-
var
|
|
3856
|
+
var Ge = {
|
|
3857
3857
|
"em-filemanager": "em-filemanager",
|
|
3858
3858
|
emFilemanager: "em-filemanager",
|
|
3859
3859
|
gifTab: "gifTab",
|
|
@@ -3875,42 +3875,42 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
3875
3875
|
playButton: "playButton",
|
|
3876
3876
|
title: "title",
|
|
3877
3877
|
subtitle: "subtitle"
|
|
3878
|
-
}, Lt = 50, Tl = 6,
|
|
3878
|
+
}, Lt = 50, Tl = 6, Wr = 240, Ml = 320, Al = (e) => {
|
|
3879
3879
|
let t = typeof window < "u" ? window.innerWidth : e;
|
|
3880
3880
|
return t <= 700 ? 1 : t <= 1100 ? 2 : t <= 1600 ? 3 : 4;
|
|
3881
|
-
},
|
|
3882
|
-
let { t: o } =
|
|
3881
|
+
}, $r = (e) => e.images.downsized.url, Rl = ({ setImageGifList: e, imageGifList: t = [], currentReqGif: r, setCurrentReqGif: a, inputRef: i, customRequest: s }) => {
|
|
3882
|
+
let { t: o } = h.zn(), { GifPlayIcon: c } = se.K(), { options: u } = h.B(), { config: n } = u, m = h.Oa({ maxConcurrent: Tl }), [y, f] = (0, d.useState)(null), [w, I] = (0, d.useState)(new Set()), [b, F] = (0, d.useState)(!1), [V, _] = (0, d.useState)(!1), [v, C] = (0, d.useState)(!1), [O] = g.Form.useForm(), R = (0, d.useRef)(r), oe = (0, d.useRef)(null), k = (0, d.useRef)(null), U = (0, d.useRef)(null), D = (0, d.useRef)(0), Q = (0, d.useRef)(0), $ = (0, d.useRef)(new Set());
|
|
3883
3883
|
(0, d.useEffect)(() => {
|
|
3884
3884
|
R.current = r;
|
|
3885
3885
|
}, [r]), (0, d.useEffect)(() => {
|
|
3886
3886
|
O.setFieldsValue({ keywords: r.keywords });
|
|
3887
3887
|
}, []);
|
|
3888
|
-
let
|
|
3889
|
-
let j =
|
|
3888
|
+
let K = n?.handleProxyUrl, M = n?.fetchWithProxy, W = async (H) => K ? await Promise.resolve(K(H)) ?? H : H, Z = (0, d.useCallback)(async (H) => M ? Promise.resolve(M(H, void 0, { intent: "metadata" })) : fetch(await W(H)), [M, W]), ae = async function({ query: H, page: x }) {
|
|
3889
|
+
let j = H.keywords.replace(/[^\w\sа-яёА-ЯЁ]|_/g, "").replace(/[\s_-]+/g, " ");
|
|
3890
3890
|
try {
|
|
3891
|
-
let ne = `${
|
|
3891
|
+
let ne = `${h.O}/search?api_key=${n?.REACT_APP_GIPHY_KEY ?? "Nh77eBlPeMn1ed9MBAvL542NUGeNO26F"}&q=${encodeURIComponent(j)}&limit=${Lt}&offset=${x}&lang=en`;
|
|
3892
3892
|
return { data: await (await Z(ne)).json() };
|
|
3893
3893
|
} catch {}
|
|
3894
3894
|
}, { positionedItems: pe, containerHeight: te, isNearEnd: Ne, viewportMetrics: E, handleViewportChange: we } = se.ge({
|
|
3895
3895
|
items: t,
|
|
3896
|
-
getId: (
|
|
3897
|
-
getPreviewSrc:
|
|
3898
|
-
getAltText: (
|
|
3899
|
-
getWidth: (
|
|
3900
|
-
getHeight: (
|
|
3896
|
+
getId: (H) => H.id,
|
|
3897
|
+
getPreviewSrc: $r,
|
|
3898
|
+
getAltText: (H) => H.title,
|
|
3899
|
+
getWidth: (H) => H.images.downsized.width ? Number(H.images.downsized.width) : void 0,
|
|
3900
|
+
getHeight: (H) => H.images.downsized.height ? Number(H.images.downsized.height) : void 0,
|
|
3901
3901
|
layoutMode: "masonry",
|
|
3902
3902
|
minColumnWidth: 240,
|
|
3903
3903
|
estimatedItemHeight: 220,
|
|
3904
3904
|
prefetchThresholdPx: Ml,
|
|
3905
3905
|
resolveColumnCount: Al
|
|
3906
|
-
}), Be =
|
|
3906
|
+
}), Be = h.Xa(we, [t.length]), Fe = () => {
|
|
3907
3907
|
oe.current &&= (clearTimeout(oe.current), null);
|
|
3908
|
-
}, S = (
|
|
3909
|
-
|
|
3908
|
+
}, S = (H) => $.current.has(H) ? !1 : ($.current.add(H), !0), q = (H) => {
|
|
3909
|
+
$.current.delete(H);
|
|
3910
3910
|
}, B = (0, d.useCallback)(async () => {
|
|
3911
|
-
let
|
|
3912
|
-
if (!
|
|
3913
|
-
let x = `gif:${
|
|
3911
|
+
let H = R.current.keywords?.trim();
|
|
3912
|
+
if (!H || b || V || !v) return;
|
|
3913
|
+
let x = `gif:${H}:${Q.current}`;
|
|
3914
3914
|
if (!S(x)) return;
|
|
3915
3915
|
let j = D.current;
|
|
3916
3916
|
_(!0);
|
|
@@ -3927,30 +3927,30 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
3927
3927
|
}
|
|
3928
3928
|
let xe = J;
|
|
3929
3929
|
if (j !== D.current) return;
|
|
3930
|
-
e((
|
|
3931
|
-
let L = new Set(
|
|
3932
|
-
return re.length > 0 ? [...
|
|
3930
|
+
e((me) => {
|
|
3931
|
+
let L = new Set(me.map((X) => X.id)), re = xe.filter((X) => !L.has(X.id));
|
|
3932
|
+
return re.length > 0 ? [...me, ...re] : me;
|
|
3933
3933
|
}), Q.current += J.length, C(J.length === Lt);
|
|
3934
3934
|
} finally {
|
|
3935
|
-
|
|
3935
|
+
q(x), j === D.current && _(!1);
|
|
3936
3936
|
}
|
|
3937
3937
|
}, [
|
|
3938
3938
|
v,
|
|
3939
3939
|
b,
|
|
3940
|
-
|
|
3940
|
+
V,
|
|
3941
3941
|
e
|
|
3942
3942
|
]), ue = async () => {
|
|
3943
3943
|
Fe();
|
|
3944
|
-
let
|
|
3945
|
-
if (!
|
|
3944
|
+
let H = R.current.keywords?.trim();
|
|
3945
|
+
if (!H) {
|
|
3946
3946
|
k.current = null, U.current = null, D.current += 1, Q.current = 0, e([]), I(new Set()), C(!1), _(!1);
|
|
3947
3947
|
return;
|
|
3948
3948
|
}
|
|
3949
|
-
if (U.current ===
|
|
3950
|
-
let x = `gif:${
|
|
3949
|
+
if (U.current === H || k.current === H || b && k.current === H) return;
|
|
3950
|
+
let x = `gif:${H}:0`;
|
|
3951
3951
|
if (!S(x)) return;
|
|
3952
3952
|
let j = D.current + 1;
|
|
3953
|
-
D.current = j, k.current =
|
|
3953
|
+
D.current = j, k.current = H, Q.current = 0, e([]), I(new Set()), C(!1), _(!1), F(!0);
|
|
3954
3954
|
try {
|
|
3955
3955
|
let ne = await ae({
|
|
3956
3956
|
query: R.current,
|
|
@@ -3963,52 +3963,52 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
3963
3963
|
if (j !== D.current) return;
|
|
3964
3964
|
e(xe), Q.current = J.length, C(J.length === Lt);
|
|
3965
3965
|
} else e([]), C(!1);
|
|
3966
|
-
U.current =
|
|
3966
|
+
U.current = H;
|
|
3967
3967
|
} catch {
|
|
3968
3968
|
C(!1);
|
|
3969
3969
|
} finally {
|
|
3970
|
-
|
|
3970
|
+
q(x), k.current === H && (k.current = null), F(!1);
|
|
3971
3971
|
}
|
|
3972
|
-
}, ve = async (
|
|
3972
|
+
}, ve = async (H, x, j) => {
|
|
3973
3973
|
f(x), setTimeout(() => {
|
|
3974
3974
|
f(null);
|
|
3975
|
-
}, 2e3), s(
|
|
3975
|
+
}, 2e3), s(H, Vr(j, x) ?? x);
|
|
3976
3976
|
};
|
|
3977
3977
|
return (0, d.useEffect)(() => () => {
|
|
3978
3978
|
Fe();
|
|
3979
3979
|
}, []), (0, d.useEffect)(() => {
|
|
3980
|
-
!b && !
|
|
3980
|
+
!b && !V && v && t.length > 0 && Ne && B();
|
|
3981
3981
|
}, [
|
|
3982
3982
|
v,
|
|
3983
3983
|
t.length,
|
|
3984
3984
|
Ne,
|
|
3985
3985
|
B,
|
|
3986
3986
|
b,
|
|
3987
|
-
|
|
3987
|
+
V
|
|
3988
3988
|
]), (0, l.jsx)("div", {
|
|
3989
|
-
className:
|
|
3989
|
+
className: Ge.gifTab,
|
|
3990
3990
|
children: (0, l.jsx)("div", {
|
|
3991
|
-
className:
|
|
3991
|
+
className: Ge.searchOutputWrapper,
|
|
3992
3992
|
children: (0, l.jsxs)("div", {
|
|
3993
3993
|
id: "scrollableDiv",
|
|
3994
3994
|
ref: Be,
|
|
3995
|
-
className:
|
|
3995
|
+
className: Ge.scrollableDiv,
|
|
3996
3996
|
children: [
|
|
3997
3997
|
(0, l.jsxs)(g.Form, {
|
|
3998
3998
|
form: O,
|
|
3999
|
-
onValuesChange: (
|
|
4000
|
-
if (
|
|
3999
|
+
onValuesChange: (H) => {
|
|
4000
|
+
if (H.keywords !== void 0) {
|
|
4001
4001
|
let x = {
|
|
4002
4002
|
...R.current,
|
|
4003
|
-
keywords:
|
|
4003
|
+
keywords: H.keywords
|
|
4004
4004
|
};
|
|
4005
4005
|
a(x), R.current = x, Fe(), oe.current = setTimeout(ue, 800);
|
|
4006
4006
|
}
|
|
4007
4007
|
},
|
|
4008
|
-
className: t.length > 0 ?
|
|
4008
|
+
className: t.length > 0 ? Ge.searchResults : Ge.search,
|
|
4009
4009
|
children: [(0, l.jsx)(g.Form.Item, {
|
|
4010
4010
|
name: "keywords",
|
|
4011
|
-
className:
|
|
4011
|
+
className: Ge.gifSearchInput,
|
|
4012
4012
|
children: (0, l.jsx)(g.Input, {
|
|
4013
4013
|
onPressEnter: () => {
|
|
4014
4014
|
ue();
|
|
@@ -4026,35 +4026,35 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
4026
4026
|
})
|
|
4027
4027
|
})
|
|
4028
4028
|
}), t.length > 0 && !b && (0, l.jsx)("div", {
|
|
4029
|
-
className: `ant-divider ${
|
|
4029
|
+
className: `ant-divider ${Ge.divider}`,
|
|
4030
4030
|
role: "separator"
|
|
4031
4031
|
})]
|
|
4032
4032
|
}),
|
|
4033
4033
|
!t.length && !b && (0, l.jsx)(l.Fragment, { children: r.keywords ? (0, l.jsx)(se.J, {}) : (0, l.jsxs)("div", {
|
|
4034
|
-
className:
|
|
4034
|
+
className: Ge.resultsContainer,
|
|
4035
4035
|
children: [
|
|
4036
4036
|
(0, l.jsx)("div", {
|
|
4037
|
-
className:
|
|
4038
|
-
children: (0, l.jsx)(c, { className:
|
|
4037
|
+
className: Ge.videoIcon,
|
|
4038
|
+
children: (0, l.jsx)(c, { className: Ge.playButton })
|
|
4039
4039
|
}),
|
|
4040
4040
|
(0, l.jsx)("h1", {
|
|
4041
|
-
className:
|
|
4041
|
+
className: Ge.title,
|
|
4042
4042
|
children: o("Over 350,000 live images")
|
|
4043
4043
|
}),
|
|
4044
4044
|
(0, l.jsx)("p", {
|
|
4045
|
-
className:
|
|
4045
|
+
className: Ge.subtitle,
|
|
4046
4046
|
children: o("Enter a search query and we'll find the perfect image for you")
|
|
4047
4047
|
})
|
|
4048
4048
|
]
|
|
4049
4049
|
}) }),
|
|
4050
4050
|
!t.length && b && (0, l.jsx)(dt.r, {}),
|
|
4051
4051
|
t.length > 0 && (0, l.jsxs)(l.Fragment, { children: [(0, l.jsx)("div", {
|
|
4052
|
-
className:
|
|
4052
|
+
className: Ge.virtualCanvas,
|
|
4053
4053
|
style: { height: te },
|
|
4054
|
-
children: pe.map(({ row:
|
|
4055
|
-
let j =
|
|
4054
|
+
children: pe.map(({ row: H, layout: x }) => {
|
|
4055
|
+
let j = H.item, ne = w.has(j.id), J = $r(j), xe = x.bottom >= E.scrollTop - Wr && x.top <= E.scrollTop + E.viewportHeight + Wr;
|
|
4056
4056
|
return (0, l.jsxs)("div", {
|
|
4057
|
-
className: `${
|
|
4057
|
+
className: `${Ge.listItem} ${ne ? Ge.loaded : ""}`,
|
|
4058
4058
|
onClick: () => ve(j.images.downsized.url, j.id, j.title),
|
|
4059
4059
|
style: {
|
|
4060
4060
|
position: "absolute",
|
|
@@ -4071,16 +4071,16 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
4071
4071
|
imageId: j.id,
|
|
4072
4072
|
sourceUrl: J,
|
|
4073
4073
|
shouldLoad: xe,
|
|
4074
|
-
loader:
|
|
4075
|
-
className: y === j.id ?
|
|
4074
|
+
loader: m,
|
|
4075
|
+
className: y === j.id ? Ge.loadedImage : "",
|
|
4076
4076
|
width: "100%",
|
|
4077
4077
|
height: "100%",
|
|
4078
4078
|
alt: j.title,
|
|
4079
4079
|
decoding: "async",
|
|
4080
4080
|
onLoad: () => {
|
|
4081
|
-
I((
|
|
4082
|
-
if (
|
|
4083
|
-
let L = new Set(
|
|
4081
|
+
I((me) => {
|
|
4082
|
+
if (me.has(j.id)) return me;
|
|
4083
|
+
let L = new Set(me);
|
|
4084
4084
|
return L.add(j.id), L;
|
|
4085
4085
|
});
|
|
4086
4086
|
}
|
|
@@ -4089,13 +4089,13 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
4089
4089
|
rel: "noreferrer",
|
|
4090
4090
|
href: "https://giphy.com/",
|
|
4091
4091
|
target: "_blank",
|
|
4092
|
-
onClick: (
|
|
4092
|
+
onClick: (me) => me.stopPropagation()
|
|
4093
4093
|
}),
|
|
4094
|
-
y === j.id && (0, l.jsx)(g.Spin, { className:
|
|
4094
|
+
y === j.id && (0, l.jsx)(g.Spin, { className: Ge.antSpin })
|
|
4095
4095
|
]
|
|
4096
4096
|
}, j.id);
|
|
4097
4097
|
})
|
|
4098
|
-
}),
|
|
4098
|
+
}), V && (0, l.jsx)(dt.r, {})] })
|
|
4099
4099
|
]
|
|
4100
4100
|
})
|
|
4101
4101
|
})
|
|
@@ -4136,22 +4136,22 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
4136
4136
|
title: "title",
|
|
4137
4137
|
subtitle: "subtitle",
|
|
4138
4138
|
dark: "dark"
|
|
4139
|
-
}, Ll = "https://api.unsplash.com", Ot = 30, Ol = 6,
|
|
4139
|
+
}, Ll = "https://api.unsplash.com", Ot = 30, Ol = 6, qr = 240, Dl = 320, Bl = 540, zl = 1200, Ul = (e) => {
|
|
4140
4140
|
let t = typeof window < "u" ? window.innerWidth : e;
|
|
4141
4141
|
return t <= 650 ? 1 : t <= 1e3 ? 2 : t <= 1450 ? 3 : 4;
|
|
4142
|
-
},
|
|
4142
|
+
}, Hr = (e, t) => {
|
|
4143
4143
|
let r = new URL(e);
|
|
4144
4144
|
return r.searchParams.set("w", t.toString()), r.toString();
|
|
4145
|
-
},
|
|
4146
|
-
let { t: o } =
|
|
4147
|
-
|
|
4145
|
+
}, Gl = ({ imageStockList: e, setImageStockList: t, currentReq: r, setCurrentReq: a, inputRef: i, customRequest: s }) => {
|
|
4146
|
+
let { t: o } = h.zn(), { StockBigIcon: c, MixedViewIcon: u, LandscapeViewIcon: n, PortraitViewIcon: m, SquareViewIcon: y } = se.K(), { options: f } = h.B(), { config: w } = f, I = h.Oa({ maxConcurrent: Ol }), [b, F] = (0, d.useState)(!1), [V, _] = (0, d.useState)(!1), [v, C] = (0, d.useState)(!1), [O, R] = (0, d.useState)(null), [oe, k] = (0, d.useState)(new Set()), [U] = g.Form.useForm(), D = w?.fetchWithProxy, Q = w?.handleProxyUrl, $ = w?.UNSPLASH_KEY ?? "HX2_qqq3F3ljmtYtfmb9P6h0dn2u9mnnOl36IdV8el0", K = w?.locale?.slice(0, 2) || "ru", M = (0, d.useRef)(r), W = (0, d.useRef)(null), Z = (0, d.useRef)(null), ae = (0, d.useRef)(0), pe = (0, d.useRef)(1), te = (0, d.useRef)(new Set()), Ne = async (L) => Q ? await Promise.resolve(Q(L)) ?? L : L, E = (0, d.useCallback)(async (L) => D ? Promise.resolve(D(L, void 0, { intent: "metadata" })) : fetch(await Ne(L)), [D, Ne]), we = () => {
|
|
4147
|
+
W.current &&= (clearTimeout(W.current), null);
|
|
4148
4148
|
}, Be = (L) => te.current.has(L) ? !1 : (te.current.add(L), !0), Fe = (L) => {
|
|
4149
4149
|
te.current.delete(L);
|
|
4150
4150
|
}, S = (L) => L.map((re) => ({
|
|
4151
4151
|
...re,
|
|
4152
4152
|
urls: {
|
|
4153
|
-
raw:
|
|
4154
|
-
small:
|
|
4153
|
+
raw: Hr(re.urls.raw, zl),
|
|
4154
|
+
small: Hr(re.urls.raw, Bl)
|
|
4155
4155
|
}
|
|
4156
4156
|
}));
|
|
4157
4157
|
(0, d.useEffect)(() => {
|
|
@@ -4168,18 +4168,18 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
4168
4168
|
orientation: r.orientation
|
|
4169
4169
|
});
|
|
4170
4170
|
}, []);
|
|
4171
|
-
let
|
|
4171
|
+
let q = async function(L) {
|
|
4172
4172
|
try {
|
|
4173
|
-
let re = `${L}${L.includes("?") ? "&" : "?"}client_id=${
|
|
4173
|
+
let re = `${L}${L.includes("?") ? "&" : "?"}client_id=${$}`;
|
|
4174
4174
|
return { data: await (await E(re)).json() };
|
|
4175
4175
|
} catch {}
|
|
4176
4176
|
}, B = async function({ query: L, page: re }) {
|
|
4177
4177
|
let X = L.keywords.replace(/[^\w\sа-яёА-ЯЁ]|_/g, "").replace(/[\s_-]+/g, " ");
|
|
4178
4178
|
try {
|
|
4179
|
-
let Pe = `${Ll}/search/photos?client_id=${
|
|
4179
|
+
let Pe = `${Ll}/search/photos?client_id=${$}&lang=${K}&per_page=${Ot}&query=${encodeURIComponent(X)}&page=${re}`;
|
|
4180
4180
|
return L.color !== "" && (Pe += `&color=${L.color}`), L.orientation !== "" && (Pe += `&orientation=${L.orientation}`), { data: await (await E(Pe)).json() };
|
|
4181
4181
|
} catch {}
|
|
4182
|
-
}, { positionedItems: ue, containerHeight: ve, isNearEnd:
|
|
4182
|
+
}, { positionedItems: ue, containerHeight: ve, isNearEnd: H, viewportMetrics: x, handleViewportChange: j } = se.ge({
|
|
4183
4183
|
items: e,
|
|
4184
4184
|
getId: (L) => L.id,
|
|
4185
4185
|
getPreviewSrc: (L) => L.urls.small,
|
|
@@ -4191,8 +4191,8 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
4191
4191
|
estimatedItemHeight: 220,
|
|
4192
4192
|
prefetchThresholdPx: Dl,
|
|
4193
4193
|
resolveColumnCount: Ul
|
|
4194
|
-
}), ne =
|
|
4195
|
-
if (b ||
|
|
4194
|
+
}), ne = h.Xa(j, [e.length]), J = (0, d.useCallback)(async () => {
|
|
4195
|
+
if (b || V || !v || !M.current.keywords.trim()) return;
|
|
4196
4196
|
let L = ae.current, re = pe.current, X = `stock:${`${M.current.keywords.trim()}|${M.current.color}|${M.current.orientation}`}:${re}`;
|
|
4197
4197
|
if (Be(X)) {
|
|
4198
4198
|
_(!0);
|
|
@@ -4220,7 +4220,7 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
4220
4220
|
}, [
|
|
4221
4221
|
v,
|
|
4222
4222
|
b,
|
|
4223
|
-
|
|
4223
|
+
V,
|
|
4224
4224
|
t
|
|
4225
4225
|
]), xe = async () => {
|
|
4226
4226
|
we();
|
|
@@ -4254,19 +4254,19 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
4254
4254
|
(0, d.useEffect)(() => () => {
|
|
4255
4255
|
we();
|
|
4256
4256
|
}, []), (0, d.useEffect)(() => {
|
|
4257
|
-
!b && !
|
|
4257
|
+
!b && !V && v && e.length > 0 && H && J();
|
|
4258
4258
|
}, [
|
|
4259
4259
|
v,
|
|
4260
4260
|
e.length,
|
|
4261
|
-
|
|
4261
|
+
H,
|
|
4262
4262
|
J,
|
|
4263
4263
|
b,
|
|
4264
|
-
|
|
4264
|
+
V
|
|
4265
4265
|
]);
|
|
4266
|
-
let
|
|
4267
|
-
|
|
4266
|
+
let me = async (L, re, X, Pe) => {
|
|
4267
|
+
q(re.download_location), R(X), setTimeout(() => R(null), 2e3);
|
|
4268
4268
|
let Oe = L.raw;
|
|
4269
|
-
s(Oe,
|
|
4269
|
+
s(Oe, Vr(Pe, X) ?? h.ji(Oe));
|
|
4270
4270
|
};
|
|
4271
4271
|
return (0, l.jsx)("div", {
|
|
4272
4272
|
className: ye.stockTab,
|
|
@@ -4279,13 +4279,13 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
4279
4279
|
children: [
|
|
4280
4280
|
(0, l.jsxs)(g.Form, {
|
|
4281
4281
|
form: U,
|
|
4282
|
-
initialValues:
|
|
4282
|
+
initialValues: h.ie,
|
|
4283
4283
|
onValuesChange: (L, re) => {
|
|
4284
4284
|
let X = {
|
|
4285
|
-
...
|
|
4285
|
+
...h.ie,
|
|
4286
4286
|
...re
|
|
4287
4287
|
};
|
|
4288
|
-
a(X), M.current = X, we(), X.keywords === "" ? (Z.current = null, ae.current += 1, pe.current = 1, t([]), k(new Set()), C(!1), _(!1), a({ ...
|
|
4288
|
+
a(X), M.current = X, we(), X.keywords === "" ? (Z.current = null, ae.current += 1, pe.current = 1, t([]), k(new Set()), C(!1), _(!1), a({ ...h.ie }), M.current = h.ie, U.resetFields()) : W.current = setTimeout(xe, 800);
|
|
4289
4289
|
},
|
|
4290
4290
|
className: e.length > 0 ? ye.searchResults : ye.search,
|
|
4291
4291
|
children: [(0, l.jsxs)(g.Row, {
|
|
@@ -4335,7 +4335,7 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
4335
4335
|
placement: "top",
|
|
4336
4336
|
children: (0, l.jsx)(g.Radio.Button, {
|
|
4337
4337
|
value: "portrait",
|
|
4338
|
-
children: (0, l.jsx)(
|
|
4338
|
+
children: (0, l.jsx)(m, {})
|
|
4339
4339
|
})
|
|
4340
4340
|
}),
|
|
4341
4341
|
(0, l.jsx)(g.Tooltip, {
|
|
@@ -4486,10 +4486,10 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
4486
4486
|
className: ye.virtualCanvas,
|
|
4487
4487
|
style: { height: ve },
|
|
4488
4488
|
children: ue.map(({ row: L, layout: re }) => {
|
|
4489
|
-
let X = L.item, Pe = oe.has(X.id), Oe = re.bottom >= x.scrollTop -
|
|
4489
|
+
let X = L.item, Pe = oe.has(X.id), Oe = re.bottom >= x.scrollTop - qr && re.top <= x.scrollTop + x.viewportHeight + qr;
|
|
4490
4490
|
return (0, l.jsxs)("div", {
|
|
4491
4491
|
className: `${ye.listItem} ${Pe ? ye.loaded : ""}`,
|
|
4492
|
-
onClick: () =>
|
|
4492
|
+
onClick: () => me(X.urls, X.links, X.id, X.alt_description || X.description),
|
|
4493
4493
|
style: {
|
|
4494
4494
|
position: "absolute",
|
|
4495
4495
|
top: re.top,
|
|
@@ -4546,12 +4546,12 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
4546
4546
|
]
|
|
4547
4547
|
}, X.id);
|
|
4548
4548
|
})
|
|
4549
|
-
}),
|
|
4549
|
+
}), V && (0, l.jsx)(dt.r, {})] })
|
|
4550
4550
|
]
|
|
4551
4551
|
})
|
|
4552
4552
|
})
|
|
4553
4553
|
});
|
|
4554
|
-
},
|
|
4554
|
+
}, Vl = (e, t) => {
|
|
4555
4555
|
let r = () => {
|
|
4556
4556
|
try {
|
|
4557
4557
|
let a = {
|
|
@@ -4562,37 +4562,37 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
4562
4562
|
} catch {}
|
|
4563
4563
|
};
|
|
4564
4564
|
t ? setTimeout(r, t) : r();
|
|
4565
|
-
},
|
|
4566
|
-
let { options: e } =
|
|
4565
|
+
}, Wl = () => {
|
|
4566
|
+
let { options: e } = h.B(), t = e.config;
|
|
4567
4567
|
return (0, d.useCallback)((r, a) => {
|
|
4568
|
-
t?.pushToGTM !== !1 &&
|
|
4568
|
+
t?.pushToGTM !== !1 && Vl(r, a);
|
|
4569
4569
|
}, [t?.pushToGTM]);
|
|
4570
4570
|
};
|
|
4571
|
-
function
|
|
4571
|
+
function Kr(e) {
|
|
4572
4572
|
let t = e.trim();
|
|
4573
4573
|
return /^(https?:)?\/\//i.test(t) || /^data:/i.test(t);
|
|
4574
4574
|
}
|
|
4575
|
-
function
|
|
4575
|
+
function $l(e) {
|
|
4576
4576
|
let t = e.trim();
|
|
4577
|
-
return
|
|
4577
|
+
return Kr(t) ? t : `data:image/jpeg;base64, ${e}`;
|
|
4578
4578
|
}
|
|
4579
|
-
function
|
|
4580
|
-
let { t:
|
|
4579
|
+
function ql({ setFrameHeight: e, customRequest: t, aiTabRef: r, isImageUploaded: a, setIsImageUploaded: i, aiImageRequest: s, imageAiList: o, setImageAiList: c, isLoadingAi: u, setIsLoadingAi: n }) {
|
|
4580
|
+
let { t: m } = h.zn(), { options: y } = h.B(), f = y.config, w = h.mr(), I = Wl(), { messages: b } = y.config, [F, V] = (0, d.useState)([]), [_, v] = (0, d.useState)(0), [C, O] = (0, d.useState)(null), [R, oe] = (0, d.useState)(!1), [k, U] = (0, d.useState)(m("Evaluating the task")), [D, Q] = (0, d.useState)(!1), $ = (0, d.useRef)(new Set()), K = (0, d.useRef)(new Set()), M = (0, d.useRef)(new Set());
|
|
4581
4581
|
(0, d.useEffect)(() => {
|
|
4582
|
-
|
|
4582
|
+
V(b);
|
|
4583
4583
|
}, [b]), (0, d.useEffect)(() => {
|
|
4584
|
-
!o.length && !C && (
|
|
4584
|
+
!o.length && !C && (V([]), $.current.clear(), K.current.clear(), M.current.clear(), ae.current = -1);
|
|
4585
4585
|
}, [o, C]);
|
|
4586
|
-
let
|
|
4586
|
+
let W = (0, d.useMemo)(() => f && typeof f?.sendAIImageRequest == "function" ? f?.sendAIImageRequest : () => Promise.resolve({}), [f]), Z = (0, d.useCallback)((x) => {
|
|
4587
4587
|
let j = `${C}-${x.progress}-${JSON.stringify(x.images || x.data)}`;
|
|
4588
4588
|
if (!M.current.has(j)) if (M.current.add(j), x.status !== "error" && x.status !== "Canceled") {
|
|
4589
4589
|
if (x.images) {
|
|
4590
4590
|
if (U(String(x.status)), x.progress === 100) {
|
|
4591
4591
|
n(!1), c(x.images);
|
|
4592
4592
|
let ne = C, J = Array.isArray(x.images) ? x.images : [];
|
|
4593
|
-
J.length > 0 && ne &&
|
|
4593
|
+
J.length > 0 && ne && !$.current.has(ne) && ($.current.add(ne), w.success({
|
|
4594
4594
|
id: "AI_IMAGE_GENERERATION_SUCCESS",
|
|
4595
|
-
message:
|
|
4595
|
+
message: m("Images generated successfully"),
|
|
4596
4596
|
placement: "bottomRight",
|
|
4597
4597
|
data: {
|
|
4598
4598
|
request: s,
|
|
@@ -4604,9 +4604,9 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
4604
4604
|
} else if (x.data && (c([String(x.data)]), x.progress === 100)) {
|
|
4605
4605
|
n(!1);
|
|
4606
4606
|
let ne = C, J = x.data ? [String(x.data)] : [];
|
|
4607
|
-
J.length > 0 && ne &&
|
|
4607
|
+
J.length > 0 && ne && !$.current.has(ne) && ($.current.add(ne), w.success({
|
|
4608
4608
|
id: "AI_IMAGE_GENERERATION_SUCCESS",
|
|
4609
|
-
message:
|
|
4609
|
+
message: m("Images generated successfully"),
|
|
4610
4610
|
placement: "bottomRight",
|
|
4611
4611
|
data: {
|
|
4612
4612
|
request: s,
|
|
@@ -4615,9 +4615,9 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
4615
4615
|
}
|
|
4616
4616
|
})), O(null), Q(!1);
|
|
4617
4617
|
}
|
|
4618
|
-
} else n(!1), Q(!1), C && !
|
|
4618
|
+
} else n(!1), Q(!1), C && !K.current.has(C) && (K.current.add(C), w.error({
|
|
4619
4619
|
id: "AI_RESPONSE_INVALID",
|
|
4620
|
-
message:
|
|
4620
|
+
message: m("Something went wrong, please try again"),
|
|
4621
4621
|
placement: "bottomRight",
|
|
4622
4622
|
description: String(C) || void 0,
|
|
4623
4623
|
data: {
|
|
@@ -4631,7 +4631,7 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
4631
4631
|
s,
|
|
4632
4632
|
c,
|
|
4633
4633
|
U,
|
|
4634
|
-
|
|
4634
|
+
m,
|
|
4635
4635
|
n,
|
|
4636
4636
|
C,
|
|
4637
4637
|
w,
|
|
@@ -4649,7 +4649,7 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
4649
4649
|
return (j) => x(j);
|
|
4650
4650
|
}
|
|
4651
4651
|
return (x) => {};
|
|
4652
|
-
}, [f]), te = (0, d.useMemo)(() => f && typeof f?.handleLimitUsageEmitter == "object" ? f?.handleLimitUsageEmitter : { fire: () => {} }, [f]), Ne = f?.elementId, { projectId: E } = f, { limits: we } = f?.limits ? f : { limits: { ai_img_limit: 0 } }, { ai_img_limit: Be } = we, Fe = Be > 0 && _ >= Be, S = !!(f?.limits && f.counters) &&
|
|
4652
|
+
}, [f]), te = (0, d.useMemo)(() => f && typeof f?.handleLimitUsageEmitter == "object" ? f?.handleLimitUsageEmitter : { fire: () => {} }, [f]), Ne = f?.elementId, { projectId: E } = f, { limits: we } = f?.limits ? f : { limits: { ai_img_limit: 0 } }, { ai_img_limit: Be } = we, Fe = Be > 0 && _ >= Be, S = !!(f?.limits && f.counters) && h.E.isPlugin, q = (0, d.useCallback)(() => {
|
|
4653
4653
|
te.fire({
|
|
4654
4654
|
name: "AiImgCount",
|
|
4655
4655
|
count: _ + 1
|
|
@@ -4660,12 +4660,12 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
4660
4660
|
_,
|
|
4661
4661
|
Be
|
|
4662
4662
|
]), ue = (0, d.useCallback)(async () => {
|
|
4663
|
-
U(
|
|
4663
|
+
U(m("Evaluating the task")), s !== "" && !u && (n(!0), Q(!0), c([]), V([]), I({
|
|
4664
4664
|
event: "submit_form",
|
|
4665
4665
|
action: "ai_image_generation",
|
|
4666
4666
|
entity_id: Ne,
|
|
4667
4667
|
project_id: E
|
|
4668
|
-
}),
|
|
4668
|
+
}), W({ body: {
|
|
4669
4669
|
project_id: E,
|
|
4670
4670
|
request: "create-image",
|
|
4671
4671
|
connection: "midjourney",
|
|
@@ -4681,8 +4681,8 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
4681
4681
|
c(re), n(!1), Q(!1), O(null);
|
|
4682
4682
|
return;
|
|
4683
4683
|
}
|
|
4684
|
-
let
|
|
4685
|
-
J?.status === 200 || J?.data?.status === 200 ? (
|
|
4684
|
+
let me = J?.task || J?.data?.task, L = me?.id ?? C ?? void 0;
|
|
4685
|
+
J?.status === 200 || J?.data?.status === 200 ? (me?.id && (U(me.message), O(me.id)), J?.message && w.success({
|
|
4686
4686
|
id: "AI_IMAGE_GENERATION_STARTED",
|
|
4687
4687
|
message: J.message,
|
|
4688
4688
|
placement: "bottomRight",
|
|
@@ -4692,11 +4692,11 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
4692
4692
|
response: J?.data
|
|
4693
4693
|
}
|
|
4694
4694
|
}), pe({
|
|
4695
|
-
task_id:
|
|
4695
|
+
task_id: me?.id,
|
|
4696
4696
|
entity_id: Ne
|
|
4697
|
-
})) : (n(!1), Q(!1), L && !
|
|
4697
|
+
})) : (n(!1), Q(!1), L && !K.current.has(L) && (K.current.add(L), w.error({
|
|
4698
4698
|
id: "AI_IMAGE_GENERATION_FAILED",
|
|
4699
|
-
message: J?.message ||
|
|
4699
|
+
message: J?.message || m("Something went wrong, please try again"),
|
|
4700
4700
|
placement: "bottomRight",
|
|
4701
4701
|
description: s,
|
|
4702
4702
|
data: {
|
|
@@ -4709,9 +4709,9 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
4709
4709
|
}).catch((x) => {
|
|
4710
4710
|
n(!1), Q(!1);
|
|
4711
4711
|
let j = x;
|
|
4712
|
-
return (j?.error || j?.data) && C && !
|
|
4712
|
+
return (j?.error || j?.data) && C && !K.current.has(C) && (K.current.add(C), w?.error({
|
|
4713
4713
|
id: "AI_IMAGE_GENERATION_FAILED",
|
|
4714
|
-
message:
|
|
4714
|
+
message: m("Something went wrong, please try again"),
|
|
4715
4715
|
placement: "bottomRight",
|
|
4716
4716
|
description: s,
|
|
4717
4717
|
innerException: x,
|
|
@@ -4719,7 +4719,7 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
4719
4719
|
request: s,
|
|
4720
4720
|
taskId: C,
|
|
4721
4721
|
response: j?.data,
|
|
4722
|
-
error:
|
|
4722
|
+
error: h.W(j?.error)
|
|
4723
4723
|
}
|
|
4724
4724
|
})), j;
|
|
4725
4725
|
}));
|
|
@@ -4732,16 +4732,16 @@ __emailmaker__.define("static/core/20625a132.js", [
|
|
|
4732
4732
|
I,
|
|
4733
4733
|
Ne,
|
|
4734
4734
|
E,
|
|
4735
|
-
|
|
4735
|
+
W,
|
|
4736
4736
|
w,
|
|
4737
4737
|
pe,
|
|
4738
|
-
|
|
4738
|
+
m,
|
|
4739
4739
|
C
|
|
4740
4740
|
]), ve = (0, d.useCallback)(() => {
|
|
4741
|
-
B ? (S && (v((x) => x + 1),
|
|
4741
|
+
B ? (S && (v((x) => x + 1), q()), ue()) : S && w.error({
|
|
4742
4742
|
id: "AI_IMAGE_GENERATION_LIMIT_EXCEEDED",
|
|
4743
|
-
message:
|
|
4744
|
-
description:
|
|
4743
|
+
message: m("The usage limit has been exceeded"),
|
|
4744
|
+
description: m(`The maximum number of requests for the current subscription period has been reached.
|
|
4745
4745
|
Select the appropriate plan to fulfil more requests`),
|
|
4746
4746
|
placement: "bottomRight"
|
|
4747
4747
|
});
|
|
@@ -4749,22 +4749,22 @@ Select the appropriate plan to fulfil more requests`),
|
|
|
4749
4749
|
B,
|
|
4750
4750
|
S,
|
|
4751
4751
|
v,
|
|
4752
|
-
|
|
4752
|
+
q,
|
|
4753
4753
|
ue,
|
|
4754
4754
|
w,
|
|
4755
|
-
|
|
4755
|
+
m
|
|
4756
4756
|
]);
|
|
4757
4757
|
(0, d.useEffect)(() => {
|
|
4758
4758
|
S && v(f?.counters?.ai_img_counter || 0);
|
|
4759
4759
|
}, [f, S]);
|
|
4760
|
-
let
|
|
4760
|
+
let H = (0, d.useCallback)(async (x) => {
|
|
4761
4761
|
if (a) return;
|
|
4762
4762
|
let j;
|
|
4763
4763
|
try {
|
|
4764
|
-
if (
|
|
4764
|
+
if (Kr(x)) j = await (await fetch(x)).blob();
|
|
4765
4765
|
else {
|
|
4766
4766
|
let J = atob(x), xe = Array(J.length);
|
|
4767
|
-
for (let
|
|
4767
|
+
for (let me = 0; me < J.length; me++) xe[me] = J.charCodeAt(me);
|
|
4768
4768
|
j = new Blob([new Uint8Array(xe)], { type: "image/jpeg" });
|
|
4769
4769
|
}
|
|
4770
4770
|
} catch {
|
|
@@ -4815,8 +4815,8 @@ Select the appropriate plan to fulfil more requests`),
|
|
|
4815
4815
|
requestStatus: k,
|
|
4816
4816
|
setRequestStatus: U,
|
|
4817
4817
|
handleGenerate: ve,
|
|
4818
|
-
handleLimitAiImgCount:
|
|
4819
|
-
convertBase64ToFile:
|
|
4818
|
+
handleLimitAiImgCount: q,
|
|
4819
|
+
convertBase64ToFile: H,
|
|
4820
4820
|
isShiftPressed: R,
|
|
4821
4821
|
setIsShiftPressed: oe,
|
|
4822
4822
|
currentReqId: C,
|
|
@@ -4829,7 +4829,7 @@ Select the appropriate plan to fulfil more requests`),
|
|
|
4829
4829
|
emFilemanager: "em-filemanager",
|
|
4830
4830
|
slideshowContainer: "slideshowContainer",
|
|
4831
4831
|
slideshowImage: "slideshowImage"
|
|
4832
|
-
},
|
|
4832
|
+
}, Hl = ({ images: e, transitionDuration: t = 1e3, frameHeight: r }) => {
|
|
4833
4833
|
let [a, i] = (0, d.useState)([]), [s, o] = (0, d.useState)(r);
|
|
4834
4834
|
(0, d.useEffect)(() => {
|
|
4835
4835
|
let u = () => {
|
|
@@ -4837,13 +4837,13 @@ Select the appropriate plan to fulfil more requests`),
|
|
|
4837
4837
|
o(r);
|
|
4838
4838
|
return;
|
|
4839
4839
|
}
|
|
4840
|
-
let n = window.innerHeight,
|
|
4841
|
-
o(typeof r == "number" ? Math.min(r,
|
|
4840
|
+
let n = window.innerHeight, m = Math.max(n - 260, 130);
|
|
4841
|
+
o(typeof r == "number" ? Math.min(r, m) : m);
|
|
4842
4842
|
};
|
|
4843
4843
|
if (u(), typeof window < "u") return window.addEventListener("resize", u), () => window.removeEventListener("resize", u);
|
|
4844
4844
|
}, [r]);
|
|
4845
4845
|
let c = () => {
|
|
4846
|
-
i((u) => u.map((n,
|
|
4846
|
+
i((u) => u.map((n, m) => m === u.length - 1 ? {
|
|
4847
4847
|
...n,
|
|
4848
4848
|
opacity: 1
|
|
4849
4849
|
} : n));
|
|
@@ -4863,7 +4863,7 @@ Select the appropriate plan to fulfil more requests`),
|
|
|
4863
4863
|
minHeight: 130
|
|
4864
4864
|
},
|
|
4865
4865
|
children: a.map((u, n) => (0, l.jsx)("img", {
|
|
4866
|
-
src:
|
|
4866
|
+
src: $l(u.src),
|
|
4867
4867
|
alt: `Slide ${n + 1}`,
|
|
4868
4868
|
className: Yr.slideshowImage,
|
|
4869
4869
|
style: {
|
|
@@ -4873,7 +4873,7 @@ Select the appropriate plan to fulfil more requests`),
|
|
|
4873
4873
|
}
|
|
4874
4874
|
}, n))
|
|
4875
4875
|
});
|
|
4876
|
-
},
|
|
4876
|
+
}, Kl = ({ className: e, style: t, color: r, text: a, variant: i, ...s }) => {
|
|
4877
4877
|
let o = a || "";
|
|
4878
4878
|
return (0, l.jsx)(g.Tag, {
|
|
4879
4879
|
style: t,
|
|
@@ -4884,11 +4884,11 @@ Select the appropriate plan to fulfil more requests`),
|
|
|
4884
4884
|
children: o
|
|
4885
4885
|
});
|
|
4886
4886
|
}, Yl = ({ text: e, counter: t, limits: r, wrapperStyles: a }) => {
|
|
4887
|
-
let { t: i } =
|
|
4887
|
+
let { t: i } = h.zn(), { options: s } = h.B(), o = s.config, { token: c } = g.theme.useToken(), u = +r > 0, n = !u || t < +r, m = o?.billingPageUrl || "/billing";
|
|
4888
4888
|
return (0, l.jsxs)("div", {
|
|
4889
4889
|
className: "limits-couter-wrapper",
|
|
4890
4890
|
style: a,
|
|
4891
|
-
children: [(0, l.jsx)(
|
|
4891
|
+
children: [(0, l.jsx)(Kl, {
|
|
4892
4892
|
variant: "filled",
|
|
4893
4893
|
text: t + " " + i("of") + " " + (u ? r : "∞") + " " + (e || i("tests", { count: r })) + " " + i("was used", { count: t }),
|
|
4894
4894
|
className: "limit-counter",
|
|
@@ -4900,7 +4900,7 @@ Select the appropriate plan to fulfil more requests`),
|
|
|
4900
4900
|
textDecoration: "underline",
|
|
4901
4901
|
cursor: "pointer"
|
|
4902
4902
|
},
|
|
4903
|
-
onClick: () => window.location.assign(
|
|
4903
|
+
onClick: () => window.location.assign(m),
|
|
4904
4904
|
children: i("Need more?")
|
|
4905
4905
|
})]
|
|
4906
4906
|
});
|
|
@@ -4938,7 +4938,7 @@ Select the appropriate plan to fulfil more requests`),
|
|
|
4938
4938
|
children: (0, l.jsx)(g.Button, {
|
|
4939
4939
|
className: `${Le.arrowBtn} ${Le.arrowBtnNext}`,
|
|
4940
4940
|
size: "large",
|
|
4941
|
-
icon: (0, l.jsx)(
|
|
4941
|
+
icon: (0, l.jsx)(qe.ArrowRightOutlined, {})
|
|
4942
4942
|
})
|
|
4943
4943
|
}));
|
|
4944
4944
|
Qr.displayName = "SampleNextArrow";
|
|
@@ -4948,12 +4948,12 @@ Select the appropriate plan to fulfil more requests`),
|
|
|
4948
4948
|
children: (0, l.jsx)(g.Button, {
|
|
4949
4949
|
className: `${Le.arrowBtn} ${Le.arrowBtnPrev}`,
|
|
4950
4950
|
size: "large",
|
|
4951
|
-
icon: (0, l.jsx)(
|
|
4951
|
+
icon: (0, l.jsx)(qe.ArrowLeftOutlined, {})
|
|
4952
4952
|
})
|
|
4953
4953
|
}));
|
|
4954
4954
|
Zr.displayName = "SamplePrevArrow";
|
|
4955
4955
|
var Ql = ({ customRequest: e, inputAiRef: t, isImageUploaded: r, setIsImageUploaded: a, aiImageRequest: i, setAiImageRequest: s, imageAiList: o, setImageAiList: c, isLoadingAi: u, setIsLoadingAi: n }) => {
|
|
4956
|
-
let { t:
|
|
4956
|
+
let { t: m } = h.zn(), { AiIcon_2: y } = se.K(), f = d.default.useRef(null), [w, I] = (0, d.useState)("auto"), { aiImageCounter: b, currentAiImgLimits: F, loadingDuringGeneration: V, requestStatus: _, handleGenerate: v, convertBase64ToFile: C, isShiftPressed: O, setIsShiftPressed: R, limitsInPlugin: oe } = ql({
|
|
4957
4957
|
setFrameHeight: I,
|
|
4958
4958
|
customRequest: e,
|
|
4959
4959
|
aiTabRef: f,
|
|
@@ -4966,14 +4966,14 @@ Select the appropriate plan to fulfil more requests`),
|
|
|
4966
4966
|
setIsLoadingAi: n
|
|
4967
4967
|
});
|
|
4968
4968
|
(0, d.useEffect)(() => {}, [r]);
|
|
4969
|
-
let [k, U] = (0, d.useState)(!1), D = (0, d.useCallback)(() => U(!0), []), Q = (0, d.useCallback)(() => U(!1), []),
|
|
4970
|
-
|
|
4969
|
+
let [k, U] = (0, d.useState)(!1), D = (0, d.useCallback)(() => U(!0), []), Q = (0, d.useCallback)(() => U(!1), []), $ = (0, d.useCallback)((W) => s(W.target.value), [s]), K = (0, d.useCallback)((W) => {
|
|
4970
|
+
W.key === "Shift" ? R(!0) : W.key === "Enter" && !O && (W.preventDefault(), v());
|
|
4971
4971
|
}, [
|
|
4972
4972
|
O,
|
|
4973
4973
|
v,
|
|
4974
4974
|
R
|
|
4975
|
-
]), M = (0, d.useCallback)((
|
|
4976
|
-
|
|
4975
|
+
]), M = (0, d.useCallback)((W) => {
|
|
4976
|
+
W.key === "Shift" && R(!1);
|
|
4977
4977
|
}, [R]);
|
|
4978
4978
|
return (0, l.jsxs)("div", {
|
|
4979
4979
|
className: Le.imageAi,
|
|
@@ -4994,20 +4994,20 @@ Select the appropriate plan to fulfil more requests`),
|
|
|
4994
4994
|
className: `ant-input-affix-wrapper ant-input-affix-wrapper-lg ${Le.inputAffixWrapper}${k ? " ant-input-affix-wrapper-focused" : ""}`,
|
|
4995
4995
|
children: [(0, l.jsx)(g.Input.TextArea, {
|
|
4996
4996
|
ref: t,
|
|
4997
|
-
onKeyDown:
|
|
4997
|
+
onKeyDown: K,
|
|
4998
4998
|
onKeyUp: M,
|
|
4999
4999
|
onFocus: D,
|
|
5000
5000
|
onBlur: Q,
|
|
5001
5001
|
autoSize: !0,
|
|
5002
5002
|
allowClear: !0,
|
|
5003
5003
|
className: `${Le.textAreaInputHybrid} ${Le.textarea}`,
|
|
5004
|
-
placeholder:
|
|
5004
|
+
placeholder: m("Generate image"),
|
|
5005
5005
|
value: i,
|
|
5006
|
-
onChange:
|
|
5006
|
+
onChange: $,
|
|
5007
5007
|
spellCheck: "false"
|
|
5008
5008
|
}), (0, l.jsx)("span", {
|
|
5009
5009
|
className: `ant-input-suffix ${Le.inputSuffix}`,
|
|
5010
|
-
children: u ||
|
|
5010
|
+
children: u || V ? (0, l.jsx)(qe.LoadingOutlined, {
|
|
5011
5011
|
className: `${Le.inputIcon} input-icon`,
|
|
5012
5012
|
spin: !0
|
|
5013
5013
|
}) : (0, l.jsx)(y, {
|
|
@@ -5018,9 +5018,9 @@ Select the appropriate plan to fulfil more requests`),
|
|
|
5018
5018
|
}) }), (0, l.jsxs)("div", {
|
|
5019
5019
|
className: Le.imageAiExample,
|
|
5020
5020
|
children: [
|
|
5021
|
-
(0, l.jsx)("span", { children:
|
|
5021
|
+
(0, l.jsx)("span", { children: m("For example:") }),
|
|
5022
5022
|
" ",
|
|
5023
|
-
|
|
5023
|
+
m("A beautiful image of a sunset over a calm ocean.")
|
|
5024
5024
|
]
|
|
5025
5025
|
})]
|
|
5026
5026
|
})
|
|
@@ -5036,7 +5036,7 @@ Select the appropriate plan to fulfil more requests`),
|
|
|
5036
5036
|
className: Le.loading,
|
|
5037
5037
|
children: (0, l.jsxs)("div", {
|
|
5038
5038
|
className: "spin",
|
|
5039
|
-
children: [(0, l.jsx)(
|
|
5039
|
+
children: [(0, l.jsx)(qe.LoadingOutlined, {
|
|
5040
5040
|
style: { fontSize: 48 },
|
|
5041
5041
|
spin: !0
|
|
5042
5042
|
}), (0, l.jsx)("p", {
|
|
@@ -5044,18 +5044,18 @@ Select the appropriate plan to fulfil more requests`),
|
|
|
5044
5044
|
children: _
|
|
5045
5045
|
})]
|
|
5046
5046
|
})
|
|
5047
|
-
}), o.length > 0 && o.map((
|
|
5047
|
+
}), o.length > 0 && o.map((W, Z) => (0, l.jsxs)("div", {
|
|
5048
5048
|
className: Le.imageItem,
|
|
5049
|
-
children: [(0, l.jsx)(
|
|
5049
|
+
children: [(0, l.jsx)(Hl, {
|
|
5050
5050
|
images: o,
|
|
5051
5051
|
frameHeight: w
|
|
5052
5052
|
}), (0, l.jsx)("div", {
|
|
5053
5053
|
className: "buttons",
|
|
5054
5054
|
children: o.length > 0 && !u && (0, l.jsx)(g.Button, {
|
|
5055
|
-
onClick: () => C(
|
|
5055
|
+
onClick: () => C(W),
|
|
5056
5056
|
loading: r,
|
|
5057
|
-
icon: (0, l.jsx)(
|
|
5058
|
-
children:
|
|
5057
|
+
icon: (0, l.jsx)(qe.CheckOutlined, {}),
|
|
5058
|
+
children: m("Use this variant")
|
|
5059
5059
|
})
|
|
5060
5060
|
})]
|
|
5061
5061
|
}, Z))]
|
|
@@ -5063,22 +5063,22 @@ Select the appropriate plan to fulfil more requests`),
|
|
|
5063
5063
|
]
|
|
5064
5064
|
});
|
|
5065
5065
|
}, Zl = (e) => {
|
|
5066
|
-
let { state: t, actions: r, options: a } =
|
|
5067
|
-
|
|
5066
|
+
let { state: t, actions: r, options: a } = h.B(), { t: i } = h.zn(), s = h.mr(), { folders: o, folderToRename: c, renameFolderForm: u, isRenameFolderModalVisible: n } = t, { setFolderToRename: m, setIsRenameFolderModalVisible: y } = r, { apiEndpoints: f, dataProviders: w, config: I } = a, b = (0, d.useCallback)((_) => {
|
|
5067
|
+
m?.(_), y?.(!0);
|
|
5068
5068
|
let v = o?.find((C) => C.id === _);
|
|
5069
5069
|
v && u && u.setFieldsValue({ newFolderName: v.name });
|
|
5070
5070
|
}, [
|
|
5071
|
-
|
|
5071
|
+
m,
|
|
5072
5072
|
y,
|
|
5073
5073
|
o,
|
|
5074
5074
|
u
|
|
5075
5075
|
]), F = (0, d.useCallback)(() => {
|
|
5076
|
-
y?.(!1),
|
|
5076
|
+
y?.(!1), m?.(null), u?.resetFields();
|
|
5077
5077
|
}, [
|
|
5078
5078
|
y,
|
|
5079
|
-
|
|
5079
|
+
m,
|
|
5080
5080
|
u
|
|
5081
|
-
]),
|
|
5081
|
+
]), V = (0, d.useCallback)(async () => {
|
|
5082
5082
|
if (!(!c || !u)) try {
|
|
5083
5083
|
let _ = await u.validateFields();
|
|
5084
5084
|
if (!_?.newFolderName) {
|
|
@@ -5162,11 +5162,11 @@ Select the appropriate plan to fulfil more requests`),
|
|
|
5162
5162
|
actions: {
|
|
5163
5163
|
showRenameFolderModal: b,
|
|
5164
5164
|
handleRenameFolderCancel: F,
|
|
5165
|
-
handleRenameFolderOk:
|
|
5165
|
+
handleRenameFolderOk: V
|
|
5166
5166
|
}
|
|
5167
5167
|
};
|
|
5168
5168
|
}, Jl = () => {
|
|
5169
|
-
let [e, t] = (0, d.useState)([]), [r, a] = (0, d.useState)(!1), [i, s] = (0, d.useState)(!1), o = (0, d.useRef)(0), c = (0, d.useRef)(new Map()), u = (0, d.useCallback)(() => (o.current += 1, `upload_${o.current}_${Date.now()}`), []), n = (0, d.useCallback)((_) =>
|
|
5169
|
+
let [e, t] = (0, d.useState)([]), [r, a] = (0, d.useState)(!1), [i, s] = (0, d.useState)(!1), o = (0, d.useRef)(0), c = (0, d.useRef)(new Map()), u = (0, d.useCallback)(() => (o.current += 1, `upload_${o.current}_${Date.now()}`), []), n = (0, d.useCallback)((_) => h.Jn(_.size), []), m = (0, d.useCallback)((_, v) => {
|
|
5170
5170
|
let C = v.map((O) => ({
|
|
5171
5171
|
id: u(),
|
|
5172
5172
|
folderId: _,
|
|
@@ -5199,7 +5199,7 @@ Select the appropriate plan to fulfil more requests`),
|
|
|
5199
5199
|
status: "success",
|
|
5200
5200
|
progress: 100
|
|
5201
5201
|
};
|
|
5202
|
-
return v?.name && (R.name = v.name), v?.size && O.size === void 0 && (R.size =
|
|
5202
|
+
return v?.name && (R.name = v.name), v?.size && O.size === void 0 && (R.size = h.Jn(v.size)), R;
|
|
5203
5203
|
}
|
|
5204
5204
|
return O;
|
|
5205
5205
|
}));
|
|
@@ -5215,19 +5215,19 @@ Select the appropriate plan to fulfil more requests`),
|
|
|
5215
5215
|
}, 300);
|
|
5216
5216
|
}, []), F = (0, d.useCallback)(() => {
|
|
5217
5217
|
s((_) => !_);
|
|
5218
|
-
}, []),
|
|
5218
|
+
}, []), V = (0, d.useCallback)((_) => c.current.get(_), []);
|
|
5219
5219
|
return {
|
|
5220
5220
|
uploadFiles: e,
|
|
5221
5221
|
isUploadVisible: r,
|
|
5222
5222
|
isUploadMinimized: i,
|
|
5223
5223
|
totalFiles: e.length,
|
|
5224
5224
|
completedFiles: e.filter((_) => _.status === "success" || _.status === "error").length,
|
|
5225
|
-
startUpload:
|
|
5225
|
+
startUpload: m,
|
|
5226
5226
|
startUploadByUrl: y,
|
|
5227
5227
|
updateProgress: f,
|
|
5228
5228
|
markAsSuccess: w,
|
|
5229
5229
|
markAsError: I,
|
|
5230
|
-
getUploadedFile:
|
|
5230
|
+
getUploadedFile: V,
|
|
5231
5231
|
closeUpload: b,
|
|
5232
5232
|
minimizeUpload: F
|
|
5233
5233
|
};
|
|
@@ -5238,7 +5238,7 @@ Select the appropriate plan to fulfil more requests`),
|
|
|
5238
5238
|
if (r.type = "text/css", r.dataset.themeVariablesFm = "true", r.setAttribute("data-file-manager", "true"), Object.entries(e).length) {
|
|
5239
5239
|
let a = "";
|
|
5240
5240
|
Object.entries(e).forEach(([s, o]) => {
|
|
5241
|
-
typeof o != "object" && (a += ` ${
|
|
5241
|
+
typeof o != "object" && (a += ` ${h.ni(s)}: ${o};
|
|
5242
5242
|
`);
|
|
5243
5243
|
}), a = `.em-filemanager {
|
|
5244
5244
|
${a}}`, r.appendChild(document.createTextNode(a));
|
|
@@ -5249,20 +5249,20 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
5249
5249
|
e?.customTheme && Xl(e?.customTheme);
|
|
5250
5250
|
}, ts = (e) => {
|
|
5251
5251
|
if (e === "system") {
|
|
5252
|
-
let t = matchMedia("(prefers-color-scheme: dark)").matches ?
|
|
5252
|
+
let t = matchMedia("(prefers-color-scheme: dark)").matches ? h.C : h.S;
|
|
5253
5253
|
e = e === "system" ? t : e;
|
|
5254
5254
|
}
|
|
5255
5255
|
document.documentElement.setAttribute("data-theme", e);
|
|
5256
|
-
}, { Sider: rs, Content: is } = g.Layout, as = d.default.lazy(() => Promise.resolve().then(() => ze("./
|
|
5256
|
+
}, { Sider: rs, Content: is } = g.Layout, as = d.default.lazy(() => Promise.resolve().then(() => ze("./3834896e2.js"))), ls = d.default.lazy(() => Promise.resolve().then(() => ze("./f740dd7d.js"))), Jr = { keywords: "" }, ss = {
|
|
5257
5257
|
imageStock: "jpg",
|
|
5258
5258
|
gif: "gif"
|
|
5259
5259
|
}, os = () => {
|
|
5260
|
-
let e =
|
|
5261
|
-
|
|
5262
|
-
let B = d.default.useRef(null), ue = d.default.useRef([]), [ve,
|
|
5263
|
-
let p =
|
|
5260
|
+
let e = h.Fr(), t = h.Sa(), r = h.Ca(), a = h.wa(), i = Jl(), s = h.Qi(), { deleteItems: o } = h.Lr(), c = h.mr(), { t: u } = h.zn(), { options: n, state: m, actions: y } = h.B(), f = n, w = f?.onChangeSelection, I = m, b = f?.config, { dataProviders: F } = f, { form: V, urlForm: _, renameForm: v, moveForm: C, renameFolderForm: O, copyForm: R, isModalVisible: oe, isUrlModalVisible: k, isMoveModalVisible: U, isRenameFolderModalVisible: D, isCopyModalVisible: Q, isDeleteConfirmVisible: $, folderToRename: K, activeLibraryItem: M } = m, { setIsUrlModalVisible: W, setActiveLibraryItem: Z } = y, { config: ae } = n, { DropZoneFileIcon: pe } = se.K(), [te, Ne] = (0, d.useState)(!1), [E, we] = (0, d.useState)(!1), [Be, Fe] = (0, d.useState)(!1), S = (0, d.useRef)(0), q = (0, d.useRef)(!1);
|
|
5261
|
+
q.current = E;
|
|
5262
|
+
let B = d.default.useRef(null), ue = d.default.useRef([]), [ve, H] = (0, d.useState)(!1), [x, j] = (0, d.useState)(!1), ne = h.sa((p) => p.selectedFiles), J = h.sa((p) => p.clearSelection), xe = h.sa((p) => p.syncVisibleFiles), { folders: me, loading: L } = e.state, { fetchFolders: re, fetchChildFolders: X, handleCreateFolder: Pe, handleModalOk: Oe, handleModalCancel: Ue, generateMenuItems: Ae } = e.actions, at = Zl(re), { files: _e, loading: et, isRenamingFile: mt, fileToRename: ie } = t.state, { fetchFiles: ge, handleDeleteFile: z, handleDeleteFolder: G, handleAddFile: ce, handleAddFileByUrl: Se, showRenameModal: Te, handleRenameCancel: Ee, handleRenameOk: tt, handleDroppedFiles: $e, showMoveModal: xt, handleMoveCancel: Ds, handleMoveOk: pi, handleCopyOk: gi, handleCopyCancel: Bs, showDeleteConfirm: vi, handleDeleteConfirmCancel: zs, handleDeleteConfirmOk: yi } = t.actions, { selectedFolder: ke, pathHistory: wi } = r.state, { handleFolderSelect: lt, handleItemClick: Ii } = r.actions, { pagination: ht } = a.state, _i = h.sr(ge), { searchTerm: Gt, sortBy: Vt, sortOrder: Wt } = _i.state, { handleSearch: $t, handleSort: bi, handlePaginationChange: Ci } = _i.actions, Us = (0, d.useCallback)(async () => {
|
|
5263
|
+
let p = h.Mr(wi || []);
|
|
5264
5264
|
try {
|
|
5265
|
-
await
|
|
5265
|
+
await h.Nr({
|
|
5266
5266
|
options: f,
|
|
5267
5267
|
pathFolder: p,
|
|
5268
5268
|
dataProviders: f?.dataProviders
|
|
@@ -5270,33 +5270,33 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
5270
5270
|
} catch {}
|
|
5271
5271
|
await re(), await ge({
|
|
5272
5272
|
folderId: ke || "",
|
|
5273
|
-
page:
|
|
5274
|
-
limit:
|
|
5275
|
-
search:
|
|
5276
|
-
sortBy:
|
|
5277
|
-
sortOrder:
|
|
5273
|
+
page: ht.current,
|
|
5274
|
+
limit: ht.pageSize,
|
|
5275
|
+
search: Gt,
|
|
5276
|
+
sortBy: Vt,
|
|
5277
|
+
sortOrder: Wt,
|
|
5278
5278
|
itemType: "all"
|
|
5279
5279
|
});
|
|
5280
5280
|
}, [
|
|
5281
5281
|
ge,
|
|
5282
5282
|
re,
|
|
5283
5283
|
f,
|
|
5284
|
-
|
|
5284
|
+
ht,
|
|
5285
5285
|
wi,
|
|
5286
|
-
|
|
5286
|
+
Gt,
|
|
5287
5287
|
ke,
|
|
5288
|
-
|
|
5289
|
-
|
|
5290
|
-
]), Ze =
|
|
5288
|
+
Vt,
|
|
5289
|
+
Wt
|
|
5290
|
+
]), Ze = h.Ea({
|
|
5291
5291
|
files: _e || [],
|
|
5292
5292
|
fetchFiles: ge,
|
|
5293
5293
|
selectedFolder: ke || null
|
|
5294
|
-
}), [Fi, st] = (0, d.useState)(!1),
|
|
5294
|
+
}), [Fi, st] = (0, d.useState)(!1), Gs = (0, d.useCallback)((p) => {
|
|
5295
5295
|
if (p.preventDefault(), p.stopPropagation(), !p.dataTransfer || !p.dataTransfer.types || !p.dataTransfer.types.includes("Files")) return;
|
|
5296
5296
|
p.dataTransfer.dropEffect = "copy";
|
|
5297
5297
|
let P = p.relatedTarget, Y = p.currentTarget;
|
|
5298
5298
|
P && Y.contains(P) || (S.current += 1, S.current > 0 && Ne(!0));
|
|
5299
|
-
}, []),
|
|
5299
|
+
}, []), Vs = (0, d.useCallback)((p) => {
|
|
5300
5300
|
p.preventDefault(), p.stopPropagation();
|
|
5301
5301
|
let P = p.relatedTarget, Y = p.currentTarget;
|
|
5302
5302
|
if (!P || Y.contains(P)) {
|
|
@@ -5307,9 +5307,9 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
5307
5307
|
return;
|
|
5308
5308
|
}
|
|
5309
5309
|
S.current = Math.max(0, S.current - 1), S.current <= 0 && Ne(!1);
|
|
5310
|
-
}, []),
|
|
5310
|
+
}, []), Ws = (0, d.useCallback)((p) => {
|
|
5311
5311
|
p.preventDefault(), p.stopPropagation(), p.dataTransfer && (p.dataTransfer.dropEffect = "copy");
|
|
5312
|
-
}, []),
|
|
5312
|
+
}, []), $s = (0, d.useCallback)((p) => {
|
|
5313
5313
|
p.preventDefault(), p.stopPropagation(), Ne(!1), S.current = 0;
|
|
5314
5314
|
let P = (() => {
|
|
5315
5315
|
let Y = p.dataTransfer;
|
|
@@ -5322,12 +5322,12 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
5322
5322
|
}
|
|
5323
5323
|
return ee;
|
|
5324
5324
|
})();
|
|
5325
|
-
P.length && (st(!0),
|
|
5325
|
+
P.length && (st(!0), $e(P).catch((Y) => {
|
|
5326
5326
|
Y?.name;
|
|
5327
5327
|
}).finally(() => {
|
|
5328
5328
|
st(!1);
|
|
5329
5329
|
}));
|
|
5330
|
-
}, [
|
|
5330
|
+
}, [$e]), ot = (0, d.useCallback)(() => {
|
|
5331
5331
|
Ne(!1), S.current = 0, document.body.removeAttribute("data-fm-dragging"), Fe(!1), we(!1);
|
|
5332
5332
|
}, []);
|
|
5333
5333
|
d.default.useEffect(() => {
|
|
@@ -5362,11 +5362,11 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
5362
5362
|
let le = p(A.dataTransfer);
|
|
5363
5363
|
if (!le.length) return;
|
|
5364
5364
|
let de = A.target, Ie = de.closest(`.${T.filesContainer.replace(/\s+/g, ".")}`) || de.closest("[data-files-container]"), Re = de.closest(".em-filemanager") || de.closest(".file-manager__layout") || de.closest("[data-drop-overlay]") || de.closest("[data-drag-capture]");
|
|
5365
|
-
(
|
|
5365
|
+
(q.current || te || Ie || Re) && (A.preventDefault(), A.stopPropagation(), we(!1), Ne(!1), S.current = 0, st(!0), $e(le).catch((Xe) => {
|
|
5366
5366
|
Xe?.name;
|
|
5367
5367
|
}).finally(() => st(!1)));
|
|
5368
5368
|
}, Y = (A) => {
|
|
5369
|
-
A.dataTransfer?.types?.includes("Files") && (A.preventDefault(), A.dataTransfer.dropEffect = "copy", document.body.hasAttribute("data-fm-dragging") || (document.body.setAttribute("data-fm-dragging", "true"), Fe(!0)), yt === "my_files" &&
|
|
5369
|
+
A.dataTransfer?.types?.includes("Files") && (A.preventDefault(), A.dataTransfer.dropEffect = "copy", document.body.hasAttribute("data-fm-dragging") || (document.body.setAttribute("data-fm-dragging", "true"), Fe(!0)), yt === "my_files" && !q.current && we(!0));
|
|
5370
5370
|
}, ee = (A) => {
|
|
5371
5371
|
A.dataTransfer?.types?.includes("Files") && (A.preventDefault(), A.dataTransfer.dropEffect = "copy", document.body.setAttribute("data-fm-dragging", "true"), Fe(!0));
|
|
5372
5372
|
}, N = {
|
|
@@ -5378,7 +5378,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
5378
5378
|
};
|
|
5379
5379
|
}, [
|
|
5380
5380
|
te,
|
|
5381
|
-
|
|
5381
|
+
$e,
|
|
5382
5382
|
yt
|
|
5383
5383
|
]), (0, d.useEffect)(() => {
|
|
5384
5384
|
let p = (P) => {
|
|
@@ -5411,7 +5411,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
5411
5411
|
document.removeEventListener("click", p, !0);
|
|
5412
5412
|
};
|
|
5413
5413
|
}, [te, ot]);
|
|
5414
|
-
let
|
|
5414
|
+
let qs = d.default.useCallback(async () => {
|
|
5415
5415
|
await yi(), await re(), ke === "Trash" && X && await X("Trash"), requestAnimationFrame(() => {
|
|
5416
5416
|
requestAnimationFrame(() => B.current?.refreshFileCounts?.());
|
|
5417
5417
|
});
|
|
@@ -5420,9 +5420,9 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
5420
5420
|
X,
|
|
5421
5421
|
yi,
|
|
5422
5422
|
ke
|
|
5423
|
-
]),
|
|
5423
|
+
]), Hs = d.default.useCallback(() => {
|
|
5424
5424
|
j(!0);
|
|
5425
|
-
}, []),
|
|
5425
|
+
}, []), Ks = d.default.useCallback(async () => {
|
|
5426
5426
|
if (ke !== "Trash") {
|
|
5427
5427
|
j(!1);
|
|
5428
5428
|
return;
|
|
@@ -5430,7 +5430,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
5430
5430
|
try {
|
|
5431
5431
|
if (F?.cleanTrash) {
|
|
5432
5432
|
let p = await F.cleanTrash();
|
|
5433
|
-
await ge({ folderId:
|
|
5433
|
+
await ge({ folderId: h.x }), await B.current?.refreshFileCounts(), p.success ? c.success({
|
|
5434
5434
|
id: "TRASH_CLEARED_SUCCESS",
|
|
5435
5435
|
message: u("Trash cleared successfully"),
|
|
5436
5436
|
description: u("{{count}} items permanently deleted", { count: p.deletedCount || 0 }),
|
|
@@ -5451,11 +5451,11 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
5451
5451
|
isFolder: A.isFolder
|
|
5452
5452
|
})), Y = await o({
|
|
5453
5453
|
items: P,
|
|
5454
|
-
selectedFolder:
|
|
5454
|
+
selectedFolder: h.x,
|
|
5455
5455
|
getItemNameById: (A) => p.find((le) => le.id === A)?.name || A || "",
|
|
5456
5456
|
showNotifications: !1
|
|
5457
5457
|
});
|
|
5458
|
-
await ge({ folderId:
|
|
5458
|
+
await ge({ folderId: h.x }), await B.current?.refreshFileCounts();
|
|
5459
5459
|
let { successCount: ee, failCount: N } = Y;
|
|
5460
5460
|
N === 0 ? c.success({
|
|
5461
5461
|
id: "TRASH_CLEARED_SUCCESS",
|
|
@@ -5503,14 +5503,14 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
5503
5503
|
onStartBatch: (ee) => {
|
|
5504
5504
|
p = i.startUpload(ke || void 0, ee), P = new Map(), ee.forEach((N, A) => {
|
|
5505
5505
|
let le = p[A];
|
|
5506
|
-
le && (P.set(N.name, le), P.set(
|
|
5506
|
+
le && (P.set(N.name, le), P.set(h.Me(N.name, Y), le));
|
|
5507
5507
|
});
|
|
5508
5508
|
},
|
|
5509
5509
|
onStart: (ee) => {
|
|
5510
5510
|
if (p.length === 0) {
|
|
5511
5511
|
p = i.startUpload(ke || void 0, [ee]);
|
|
5512
5512
|
let N = p[0];
|
|
5513
|
-
N && (P.set(ee.name, N), P.set(
|
|
5513
|
+
N && (P.set(ee.name, N), P.set(h.Me(ee.name, Y), N));
|
|
5514
5514
|
}
|
|
5515
5515
|
},
|
|
5516
5516
|
onProgress: (ee, N) => {
|
|
@@ -5562,8 +5562,8 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
5562
5562
|
f?.config
|
|
5563
5563
|
]), nt = d.default.useCallback(async (p, P, Y, ee) => {
|
|
5564
5564
|
try {
|
|
5565
|
-
|
|
5566
|
-
let N =
|
|
5565
|
+
H(!0);
|
|
5566
|
+
let N = h.Me(Y || p && h.ji(p) || "uploaded-file", b), A = ss[ee ?? ""], le = A && !h.wi(N) ? `${N}.${A}` : N, de = i.startUploadByUrl(ke || void 0, le);
|
|
5567
5567
|
try {
|
|
5568
5568
|
let Ie = await Se(p, P, !0, ee ?? "uploadByUrl", Y);
|
|
5569
5569
|
if (i.updateProgress(de, 100), Ie) {
|
|
@@ -5573,11 +5573,11 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
5573
5573
|
} else i.markAsSuccess(de);
|
|
5574
5574
|
await B.current?.refreshFileCounts();
|
|
5575
5575
|
} catch (Ie) {
|
|
5576
|
-
let Re =
|
|
5576
|
+
let Re = h.Er(h.W(Ie), u);
|
|
5577
5577
|
i.markAsError(de, Re);
|
|
5578
5578
|
}
|
|
5579
5579
|
} finally {
|
|
5580
|
-
|
|
5580
|
+
H(!1);
|
|
5581
5581
|
}
|
|
5582
5582
|
}, [
|
|
5583
5583
|
Se,
|
|
@@ -5611,7 +5611,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
5611
5611
|
_e,
|
|
5612
5612
|
lt
|
|
5613
5613
|
]), ki = d.default.useCallback(async (p) => {
|
|
5614
|
-
if (
|
|
5614
|
+
if ($e) {
|
|
5615
5615
|
let P = i.startUpload(ke || void 0, p);
|
|
5616
5616
|
p.forEach(async (Y, ee) => {
|
|
5617
5617
|
let N = P[ee];
|
|
@@ -5622,17 +5622,17 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
5622
5622
|
setTimeout(() => {
|
|
5623
5623
|
clearInterval(le);
|
|
5624
5624
|
}, 2e3);
|
|
5625
|
-
}), await
|
|
5625
|
+
}), await $e(p), P.forEach((Y) => {
|
|
5626
5626
|
i.updateProgress(Y, 100), i.markAsSuccess(Y);
|
|
5627
5627
|
}), await B.current?.refreshFileCounts();
|
|
5628
5628
|
}
|
|
5629
5629
|
}, [
|
|
5630
|
-
|
|
5630
|
+
$e,
|
|
5631
5631
|
i,
|
|
5632
5632
|
ke
|
|
5633
5633
|
]), ji = d.default.useCallback(async (p) => {
|
|
5634
|
-
await
|
|
5635
|
-
}, [
|
|
5634
|
+
await G(p), await re(), await B.current?.refreshFileCounts();
|
|
5635
|
+
}, [G, re]), wt = h.Ta({
|
|
5636
5636
|
files: _e || [],
|
|
5637
5637
|
clearSelection: J,
|
|
5638
5638
|
showRenameModal: Te,
|
|
@@ -5658,8 +5658,8 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
5658
5658
|
J
|
|
5659
5659
|
]), (0, d.useEffect)(() => {
|
|
5660
5660
|
if (!w || M !== "my_files") return;
|
|
5661
|
-
if (!
|
|
5662
|
-
|
|
5661
|
+
if (!Vi.current) {
|
|
5662
|
+
Vi.current = !0;
|
|
5663
5663
|
return;
|
|
5664
5664
|
}
|
|
5665
5665
|
let p = (Array.isArray(_e) ? _e : []).filter((P) => ne.has(P.id));
|
|
@@ -5670,11 +5670,11 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
5670
5670
|
ne,
|
|
5671
5671
|
w
|
|
5672
5672
|
]), d.default.useEffect(() => {
|
|
5673
|
-
if (!lt ||
|
|
5673
|
+
if (!lt || me.length === 0) return;
|
|
5674
5674
|
let p = b?.rememberLastFolder !== !1, P = `em_fm:lastFolder:${b?.projectId || "default"}`;
|
|
5675
5675
|
if (p && typeof window < "u") try {
|
|
5676
5676
|
let Y = localStorage.getItem(P);
|
|
5677
|
-
if (Y &&
|
|
5677
|
+
if (Y && me.some((ee) => ee.id === Y)) {
|
|
5678
5678
|
lt(Y);
|
|
5679
5679
|
return;
|
|
5680
5680
|
}
|
|
@@ -5683,7 +5683,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
5683
5683
|
}, [
|
|
5684
5684
|
ke,
|
|
5685
5685
|
lt,
|
|
5686
|
-
|
|
5686
|
+
me,
|
|
5687
5687
|
b?.rememberLastFolder,
|
|
5688
5688
|
b?.projectId
|
|
5689
5689
|
]);
|
|
@@ -5719,18 +5719,18 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
5719
5719
|
nt,
|
|
5720
5720
|
ki
|
|
5721
5721
|
]);
|
|
5722
|
-
let
|
|
5722
|
+
let qt = (0, d.useRef)(ht);
|
|
5723
5723
|
(0, d.useEffect)(() => {
|
|
5724
|
-
|
|
5725
|
-
}, [
|
|
5724
|
+
qt.current = ht;
|
|
5725
|
+
}, [ht]);
|
|
5726
5726
|
let Xs = (0, d.useCallback)((p) => {
|
|
5727
|
-
Ci(p.current ||
|
|
5727
|
+
Ci(p.current || qt.current.current, p.pageSize || qt.current.pageSize);
|
|
5728
5728
|
}, [Ci]), eo = (0, d.useCallback)((p) => {
|
|
5729
5729
|
Ii?.(p);
|
|
5730
5730
|
}, [Ii]), to = d.default.useCallback((p) => {
|
|
5731
5731
|
let { sortBy: P, sortOrder: Y } = tl(p);
|
|
5732
5732
|
bi(P, Y);
|
|
5733
|
-
}, [bi]), [ro, Ni] = (0, d.useState)(Jr), [io, Ti] = (0, d.useState)([]), Mi = (0, d.useRef)(null), [ao, Ai] = (0, d.useState)(
|
|
5733
|
+
}, [bi]), [ro, Ni] = (0, d.useState)(Jr), [io, Ti] = (0, d.useState)([]), Mi = (0, d.useRef)(null), [ao, Ai] = (0, d.useState)(h.ie), [lo, Ri] = (0, d.useState)([]), Li = (0, d.useRef)(null), [so, oo] = (0, d.useState)(""), Oi = (0, d.useRef)(null), [no, Di] = (0, d.useState)(""), [co, Bi] = (0, d.useState)([]), It = d.default.useRef(void 0), [uo, zi] = (0, d.useState)(!1), [mo, Ui] = (0, d.useState)(!1), Gi = d.default.useRef(null), Vi = d.default.useRef(!1), [ho, fo] = (0, d.useState)({
|
|
5734
5734
|
mode: "qr",
|
|
5735
5735
|
rawText: "",
|
|
5736
5736
|
foregroundHex: "#000000",
|
|
@@ -5738,7 +5738,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
5738
5738
|
transparentBackground: !1,
|
|
5739
5739
|
qrSidePx: 200,
|
|
5740
5740
|
barcodeBarHeightPx: 60
|
|
5741
|
-
}),
|
|
5741
|
+
}), Wi = d.default.useRef(M), $i = d.default.useCallback((p) => {
|
|
5742
5742
|
let P = p.indexOf(",");
|
|
5743
5743
|
if (P === -1) return null;
|
|
5744
5744
|
let Y = p.substring(0, P), ee = Y.match(/^data:([^;]+)/), N = ee && ee[1] || "image/svg+xml", A = "svg";
|
|
@@ -5753,7 +5753,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
5753
5753
|
le = new Blob([de], { type: N });
|
|
5754
5754
|
}
|
|
5755
5755
|
return new File([le], `icon_${Date.now()}.${A}`, { type: N });
|
|
5756
|
-
}, []),
|
|
5756
|
+
}, []), qi = d.default.useCallback(async (p) => {
|
|
5757
5757
|
let P = i.startUpload(ke || void 0, [p])[0], Y = 0, ee = setInterval(() => {
|
|
5758
5758
|
Y = Math.min(Y + 10 + Math.floor(Date.now() % 10), 90), i.updateProgress(P, Y);
|
|
5759
5759
|
}, 200);
|
|
@@ -5777,17 +5777,17 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
5777
5777
|
ke
|
|
5778
5778
|
]), po = (0, d.useCallback)(async (p) => {
|
|
5779
5779
|
if (p && p.startsWith("data:")) {
|
|
5780
|
-
let P =
|
|
5780
|
+
let P = $i(p);
|
|
5781
5781
|
if (!P) return;
|
|
5782
|
-
await
|
|
5782
|
+
await qi(P);
|
|
5783
5783
|
return;
|
|
5784
5784
|
}
|
|
5785
5785
|
p && await nt(p, void 0, void 0, "iconStock");
|
|
5786
5786
|
}, [
|
|
5787
|
-
|
|
5787
|
+
$i,
|
|
5788
5788
|
nt,
|
|
5789
|
-
|
|
5790
|
-
]),
|
|
5789
|
+
qi
|
|
5790
|
+
]), Hi = (0, d.useCallback)(async () => {
|
|
5791
5791
|
let p = ae?.fileForEdit;
|
|
5792
5792
|
if (It.current !== p && M === "editor" && p && !Ze.editingFile) {
|
|
5793
5793
|
It.current = p;
|
|
@@ -5814,20 +5814,20 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
5814
5814
|
s
|
|
5815
5815
|
]);
|
|
5816
5816
|
(0, d.useEffect)(() => {
|
|
5817
|
-
|
|
5818
|
-
}, [
|
|
5819
|
-
let p =
|
|
5820
|
-
|
|
5821
|
-
}, [M,
|
|
5817
|
+
Hi();
|
|
5818
|
+
}, [Hi]), (0, d.useEffect)(() => {
|
|
5819
|
+
let p = Wi.current;
|
|
5820
|
+
Wi.current = M, M === "my_files" ? (Ti([]), Ni(Jr), Ri([]), Ai(h.ie), Bi([]), Di(""), Ui(!1), zi(!1), p !== "my_files" && (p === "stock_images" || p === "gif" || p === "ai") && $t("")) : M === "ai" ? Gi.current?.focus() : M === "gif" ? Mi.current?.focus() : M === "stock_images" ? Li.current?.focus() : M === "icons" && Oi.current?.focus();
|
|
5821
|
+
}, [M, $t]);
|
|
5822
5822
|
let go = d.default.useCallback(async () => {
|
|
5823
5823
|
await Ei(), await B.current?.refreshFileCounts();
|
|
5824
|
-
}, [Ei]),
|
|
5824
|
+
}, [Ei]), Ki = (0, d.useCallback)((p) => p ? p.files?.length ? Array.from(p.files) : p.items ? Array.from(p.items).map((P) => P.getAsFile()).filter((P) => !!P) : [] : [], []);
|
|
5825
5825
|
return (0, l.jsxs)(l.Fragment, { children: [
|
|
5826
|
-
Be && yt === "my_files" && (0,
|
|
5826
|
+
Be && yt === "my_files" && (0, Kt.createPortal)((0, l.jsx)("div", {
|
|
5827
5827
|
className: T.dragCaptureLayer,
|
|
5828
5828
|
"data-drag-capture": "true",
|
|
5829
5829
|
onDragOver: (p) => {
|
|
5830
|
-
p.preventDefault(), p.stopPropagation(), p.dataTransfer && (p.dataTransfer.dropEffect = "copy"), p.dataTransfer?.types?.includes("Files") &&
|
|
5830
|
+
p.preventDefault(), p.stopPropagation(), p.dataTransfer && (p.dataTransfer.dropEffect = "copy"), p.dataTransfer?.types?.includes("Files") && !q.current && we(!0);
|
|
5831
5831
|
},
|
|
5832
5832
|
onDragEnter: (p) => {
|
|
5833
5833
|
p.preventDefault(), p.stopPropagation(), p.dataTransfer?.types?.includes("Files") && we(!0);
|
|
@@ -5838,14 +5838,14 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
5838
5838
|
},
|
|
5839
5839
|
onDrop: (p) => {
|
|
5840
5840
|
p.preventDefault(), p.stopPropagation(), Fe(!1), we(!1), document.body.removeAttribute("data-fm-dragging");
|
|
5841
|
-
let P =
|
|
5842
|
-
P.length && (st(!0),
|
|
5841
|
+
let P = Ki(p.dataTransfer);
|
|
5842
|
+
P.length && (st(!0), $e(P).catch((Y) => {
|
|
5843
5843
|
Y?.name;
|
|
5844
5844
|
}).finally(() => st(!1)));
|
|
5845
5845
|
},
|
|
5846
5846
|
"aria-hidden": "true"
|
|
5847
5847
|
}), document.body),
|
|
5848
|
-
E && (0,
|
|
5848
|
+
E && (0, Kt.createPortal)((0, l.jsx)("div", {
|
|
5849
5849
|
className: T.dragOverlayGlobal,
|
|
5850
5850
|
"data-drop-overlay": "true",
|
|
5851
5851
|
onDragOver: (p) => {
|
|
@@ -5854,8 +5854,8 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
5854
5854
|
onDragEnter: (p) => p.preventDefault(),
|
|
5855
5855
|
onDrop: (p) => {
|
|
5856
5856
|
p.preventDefault(), p.stopPropagation(), we(!1), Fe(!1), document.body.removeAttribute("data-fm-dragging");
|
|
5857
|
-
let P =
|
|
5858
|
-
P.length && (st(!0),
|
|
5857
|
+
let P = Ki(p.dataTransfer);
|
|
5858
|
+
P.length && (st(!0), $e(P).catch((Y) => {
|
|
5859
5859
|
Y?.name;
|
|
5860
5860
|
}).finally(() => st(!1)));
|
|
5861
5861
|
},
|
|
@@ -5883,10 +5883,10 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
5883
5883
|
children: (0, l.jsxs)("div", {
|
|
5884
5884
|
className: T.filesContainer,
|
|
5885
5885
|
"data-files-container": "true",
|
|
5886
|
-
onDragOver:
|
|
5887
|
-
onDragLeave:
|
|
5888
|
-
onDragEnter:
|
|
5889
|
-
onDrop:
|
|
5886
|
+
onDragOver: Ws,
|
|
5887
|
+
onDragLeave: Vs,
|
|
5888
|
+
onDragEnter: Gs,
|
|
5889
|
+
onDrop: $s,
|
|
5890
5890
|
children: [
|
|
5891
5891
|
te && (0, l.jsx)("div", {
|
|
5892
5892
|
className: T.dragOverlay,
|
|
@@ -5919,11 +5919,11 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
5919
5919
|
selectedFolder: ke || "folders",
|
|
5920
5920
|
generateMenuItems: Ae,
|
|
5921
5921
|
onFolderSelect: (p) => lt?.(p),
|
|
5922
|
-
folders:
|
|
5922
|
+
folders: me || [],
|
|
5923
5923
|
fetchFolders: re,
|
|
5924
5924
|
fetchChildFolders: X,
|
|
5925
5925
|
handleAddFile: xi,
|
|
5926
|
-
setIsUrlModalVisible: (p) =>
|
|
5926
|
+
setIsUrlModalVisible: (p) => W?.(p),
|
|
5927
5927
|
handleDeleteFolder: ji,
|
|
5928
5928
|
handleCreateFolder: Pe,
|
|
5929
5929
|
activeLibraryItem: M,
|
|
@@ -5944,9 +5944,9 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
5944
5944
|
children: [
|
|
5945
5945
|
(0, l.jsx)(Sl, {
|
|
5946
5946
|
activeLibraryItem: M,
|
|
5947
|
-
selectedFolder:
|
|
5947
|
+
selectedFolder: me?.find((p) => p?.id === ke)?.name || u("Folders"),
|
|
5948
5948
|
isTrashFolder: ke === "Trash",
|
|
5949
|
-
onClearTrash:
|
|
5949
|
+
onClearTrash: Hs,
|
|
5950
5950
|
files: _e || [],
|
|
5951
5951
|
loading: Si,
|
|
5952
5952
|
onRefresh: Us,
|
|
@@ -5955,14 +5955,14 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
5955
5955
|
}),
|
|
5956
5956
|
(0, l.jsx)(g.Divider, { className: "zero-divider" }),
|
|
5957
5957
|
M === "my_files" && (0, l.jsx)(Dr, {
|
|
5958
|
-
searchTerm:
|
|
5958
|
+
searchTerm: Gt,
|
|
5959
5959
|
handleAddFile: xi,
|
|
5960
5960
|
files: _e || [],
|
|
5961
|
-
handleSearch:
|
|
5962
|
-
sortBy:
|
|
5963
|
-
sortOrder:
|
|
5961
|
+
handleSearch: $t,
|
|
5962
|
+
sortBy: Vt,
|
|
5963
|
+
sortOrder: Wt,
|
|
5964
5964
|
handleSortOptionChange: to,
|
|
5965
|
-
pagination:
|
|
5965
|
+
pagination: ht,
|
|
5966
5966
|
setPagination: Xs,
|
|
5967
5967
|
loading: Si,
|
|
5968
5968
|
handleItemClick: eo,
|
|
@@ -5986,7 +5986,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
5986
5986
|
inputRef: Mi,
|
|
5987
5987
|
customRequest: (p, P) => nt(p, void 0, P, "gif")
|
|
5988
5988
|
}),
|
|
5989
|
-
M === "stock_images" && (0, l.jsx)(
|
|
5989
|
+
M === "stock_images" && (0, l.jsx)(Gl, {
|
|
5990
5990
|
imageStockList: lo,
|
|
5991
5991
|
setImageStockList: Ri,
|
|
5992
5992
|
currentReq: ao,
|
|
@@ -6021,7 +6021,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
6021
6021
|
}),
|
|
6022
6022
|
children: (0, l.jsx)(ls, {
|
|
6023
6023
|
customRequest: Pi,
|
|
6024
|
-
state:
|
|
6024
|
+
state: ho,
|
|
6025
6025
|
setState: fo
|
|
6026
6026
|
})
|
|
6027
6027
|
}),
|
|
@@ -6030,11 +6030,11 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
6030
6030
|
setImageAiList: Bi,
|
|
6031
6031
|
aiImageRequest: no,
|
|
6032
6032
|
setAiImageRequest: Di,
|
|
6033
|
-
inputAiRef:
|
|
6033
|
+
inputAiRef: Gi,
|
|
6034
6034
|
customRequest: Pi,
|
|
6035
6035
|
isLoadingAi: uo,
|
|
6036
6036
|
setIsLoadingAi: zi,
|
|
6037
|
-
isImageUploaded:
|
|
6037
|
+
isImageUploaded: mo,
|
|
6038
6038
|
setIsImageUploaded: Ui
|
|
6039
6039
|
}),
|
|
6040
6040
|
M === "editor" && (0, l.jsx)(l.Fragment, {})
|
|
@@ -6059,14 +6059,14 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
6059
6059
|
isModalVisible: oe,
|
|
6060
6060
|
handleModalOk: Oe,
|
|
6061
6061
|
handleModalCancel: Ue,
|
|
6062
|
-
form:
|
|
6062
|
+
form: V,
|
|
6063
6063
|
selectedFolder: ke || null,
|
|
6064
|
-
folders:
|
|
6064
|
+
folders: me || [],
|
|
6065
6065
|
isUrlModalVisible: k,
|
|
6066
|
-
setIsUrlModalVisible: (p) =>
|
|
6066
|
+
setIsUrlModalVisible: (p) => W?.(p),
|
|
6067
6067
|
handleAddFileByUrl: nt,
|
|
6068
6068
|
urlForm: _,
|
|
6069
|
-
isRenameModalVisible:
|
|
6069
|
+
isRenameModalVisible: mt,
|
|
6070
6070
|
handleRenameOk: () => tt?.(),
|
|
6071
6071
|
handleRenameCancel: () => Ee?.(),
|
|
6072
6072
|
renameForm: v,
|
|
@@ -6081,16 +6081,16 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
6081
6081
|
handleRenameFolderOk: go,
|
|
6082
6082
|
handleRenameFolderCancel: Js,
|
|
6083
6083
|
renameFolderForm: O,
|
|
6084
|
-
folderToRename:
|
|
6084
|
+
folderToRename: K,
|
|
6085
6085
|
isCopyModalVisible: Q,
|
|
6086
6086
|
handleCopyOk: Zs,
|
|
6087
6087
|
handleCopyCancel: Bs,
|
|
6088
6088
|
copyForm: R,
|
|
6089
|
-
isDeleteConfirmVisible:
|
|
6090
|
-
handleDeleteConfirmOk:
|
|
6089
|
+
isDeleteConfirmVisible: $,
|
|
6090
|
+
handleDeleteConfirmOk: qs,
|
|
6091
6091
|
handleDeleteConfirmCancel: () => zs?.(),
|
|
6092
6092
|
isClearTrashConfirmVisible: x,
|
|
6093
|
-
handleClearTrashConfirm:
|
|
6093
|
+
handleClearTrashConfirm: Ks,
|
|
6094
6094
|
handleClearTrashCancel: Ys,
|
|
6095
6095
|
fetchChildFolders: X
|
|
6096
6096
|
}),
|
|
@@ -6118,14 +6118,14 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
6118
6118
|
})
|
|
6119
6119
|
})
|
|
6120
6120
|
] });
|
|
6121
|
-
}, Xr = (0, d.memo)(({ config: e = {}, onPathChange: t, onChangeSelection: r, onEditorOk: a, searchQuery: i = "", sortBySize: s = "name", apiEndpoints: o = {}, customIcons: c, dragDropIcon: u, dataProviders: n, handleNotify:
|
|
6121
|
+
}, Xr = (0, d.memo)(({ config: e = {}, onPathChange: t, onChangeSelection: r, onEditorOk: a, searchQuery: i = "", sortBySize: s = "name", apiEndpoints: o = {}, customIcons: c, dragDropIcon: u, dataProviders: n, handleNotify: m, handleError: y, handleSuccess: f }) => {
|
|
6122
6122
|
let w = d.default.useMemo(() => {
|
|
6123
6123
|
let F = {
|
|
6124
6124
|
transliterate: !0,
|
|
6125
6125
|
replaceSpaces: !0,
|
|
6126
6126
|
removeForbiddenChars: !0,
|
|
6127
6127
|
toLowerCase: !0
|
|
6128
|
-
},
|
|
6128
|
+
}, V = {
|
|
6129
6129
|
transliterate: !0,
|
|
6130
6130
|
replaceSpaces: !0,
|
|
6131
6131
|
removeForbiddenChars: !0,
|
|
@@ -6147,7 +6147,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
6147
6147
|
...e.fileNameProcessing
|
|
6148
6148
|
},
|
|
6149
6149
|
folderNameProcessing: {
|
|
6150
|
-
...
|
|
6150
|
+
...V,
|
|
6151
6151
|
...e.folderNameProcessing
|
|
6152
6152
|
},
|
|
6153
6153
|
...e
|
|
@@ -6156,14 +6156,14 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
6156
6156
|
d.default.useEffect(() => {
|
|
6157
6157
|
w.theme && ts(w.theme), es(w);
|
|
6158
6158
|
}, [w]), (0, d.useEffect)(() => {
|
|
6159
|
-
w.locale && w.locale !==
|
|
6159
|
+
w.locale && w.locale !== h.Gn.language && h.Gn.changeLanguage(w.locale), w.customLocale && w.locale && h.Gn.addResourceBundle(w.locale, "translation", w.customLocale, !0, !0);
|
|
6160
6160
|
}, [w.locale, w.customLocale]);
|
|
6161
6161
|
let I = (0, d.useRef)(null), b = (0, d.useCallback)(() => I.current ?? document.body, []);
|
|
6162
6162
|
return (0, l.jsx)(g.App, {
|
|
6163
6163
|
className: "em-filemanager",
|
|
6164
6164
|
children: (0, l.jsxs)(l.Fragment, { children: [(0, l.jsx)(g.ConfigProvider, {
|
|
6165
6165
|
getPopupContainer: () => I.current || document.body,
|
|
6166
|
-
children: (0, l.jsx)(
|
|
6166
|
+
children: (0, l.jsx)(h.er, {
|
|
6167
6167
|
options: d.default.useMemo(() => ({
|
|
6168
6168
|
apiEndpoints: o,
|
|
6169
6169
|
searchQuery: i,
|
|
@@ -6175,7 +6175,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
6175
6175
|
customIcons: c,
|
|
6176
6176
|
dragDropIcon: u,
|
|
6177
6177
|
dataProviders: n,
|
|
6178
|
-
handleNotify:
|
|
6178
|
+
handleNotify: m,
|
|
6179
6179
|
handleError: y,
|
|
6180
6180
|
handleSuccess: f,
|
|
6181
6181
|
getModalContainer: b
|
|
@@ -6190,7 +6190,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
6190
6190
|
c,
|
|
6191
6191
|
u,
|
|
6192
6192
|
n,
|
|
6193
|
-
|
|
6193
|
+
m,
|
|
6194
6194
|
y,
|
|
6195
6195
|
f,
|
|
6196
6196
|
b
|
|
@@ -6228,14 +6228,14 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
6228
6228
|
};
|
|
6229
6229
|
}
|
|
6230
6230
|
var ei = g.Alert.ErrorBoundary, ds = (e) => (0, l.jsx)(br, {
|
|
6231
|
-
i18n:
|
|
6231
|
+
i18n: h.Gn,
|
|
6232
6232
|
children: (0, l.jsx)(Ir, {
|
|
6233
6233
|
externalTheme: e.config?.theme ?? "light",
|
|
6234
6234
|
customThemeToken: e.config?.customTheme,
|
|
6235
6235
|
children: (0, l.jsx)(ei, { children: (0, l.jsx)(Xr, { ...e }) })
|
|
6236
6236
|
})
|
|
6237
6237
|
}), cs = (e) => {
|
|
6238
|
-
let { onClose: t, onSave: r, dataProviders: a, theme: i, locale: s, hasPagination: o, disablePagination: c, paginationAvailable: u, dedupeUploadNamesOnClient: n, saveCopyToCurrentFolder:
|
|
6238
|
+
let { onClose: t, onSave: r, dataProviders: a, theme: i, locale: s, hasPagination: o, disablePagination: c, paginationAvailable: u, dedupeUploadNamesOnClient: n, saveCopyToCurrentFolder: m, enableUpdateFile: y, handleProxyUrl: f, notificationDedupeTtlMs: w } = e, I = d.default.useMemo(() => ns(e), [
|
|
6239
6239
|
i,
|
|
6240
6240
|
s,
|
|
6241
6241
|
e.baseUrl,
|
|
@@ -6252,13 +6252,13 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
6252
6252
|
c,
|
|
6253
6253
|
u,
|
|
6254
6254
|
n,
|
|
6255
|
-
|
|
6255
|
+
m,
|
|
6256
6256
|
w,
|
|
6257
6257
|
y
|
|
6258
6258
|
]), b = d.default.useCallback(async (k, U, D, Q) => {
|
|
6259
6259
|
if (!k && !U || !a?.getFiles) return null;
|
|
6260
6260
|
try {
|
|
6261
|
-
let [
|
|
6261
|
+
let [$] = (await a.getFiles({
|
|
6262
6262
|
folderId: Q ? void 0 : D ?? void 0,
|
|
6263
6263
|
noFolder: Q,
|
|
6264
6264
|
search: U || void 0,
|
|
@@ -6266,7 +6266,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
6266
6266
|
page: 1,
|
|
6267
6267
|
limit: 1
|
|
6268
6268
|
})).files;
|
|
6269
|
-
return
|
|
6269
|
+
return !$ || k && $.id !== k ? null : $;
|
|
6270
6270
|
} catch {
|
|
6271
6271
|
return null;
|
|
6272
6272
|
}
|
|
@@ -6277,7 +6277,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
6277
6277
|
} catch {
|
|
6278
6278
|
return null;
|
|
6279
6279
|
}
|
|
6280
|
-
}, [a]),
|
|
6280
|
+
}, [a]), V = d.default.useMemo(() => {
|
|
6281
6281
|
if (e.file) return e.file;
|
|
6282
6282
|
let k = e.name || "edited-image", U = e.extension || (e.type ? e.type.split("/")[1] : "png"), D = e.type || `image/${U}`;
|
|
6283
6283
|
return {
|
|
@@ -6296,11 +6296,11 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
6296
6296
|
e.type
|
|
6297
6297
|
]), _ = d.default.useCallback(async (k, U) => {
|
|
6298
6298
|
if (a?.updateFile && k.thumbnail) try {
|
|
6299
|
-
let D = U?.mimeType ||
|
|
6299
|
+
let D = U?.mimeType || h.se(k.thumbnail, k.type), Q = h.ce(D), $ = k.name.substring(0, k.name.lastIndexOf(".")) + "." + Q, K = U?.blob || h.he(k.thumbnail, D);
|
|
6300
6300
|
return await a.updateFile(k.id, {
|
|
6301
|
-
name:
|
|
6301
|
+
name: $,
|
|
6302
6302
|
type: D,
|
|
6303
|
-
data:
|
|
6303
|
+
data: K
|
|
6304
6304
|
});
|
|
6305
6305
|
} catch {
|
|
6306
6306
|
return null;
|
|
@@ -6309,8 +6309,8 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
6309
6309
|
}, [a]), v = d.default.useCallback(async (k, U) => {
|
|
6310
6310
|
if (!k.thumbnail) return null;
|
|
6311
6311
|
try {
|
|
6312
|
-
let D = I.saveCopyToCurrentFolder === !0 ? k.saveWithoutFolder ?? !k.id : !0, Q = D ? "" : k.folderId || "",
|
|
6313
|
-
type:
|
|
6312
|
+
let D = I.saveCopyToCurrentFolder === !0 ? k.saveWithoutFolder ?? !k.id : !0, Q = D ? "" : k.folderId || "", $ = U?.mimeType || h.se(k.thumbnail, k.type), K = U?.blob || h.he(k.thumbnail, $), M = h.Me(k.name, I), W = await h.Zn(a, M, Q, D, h.Pe(I)), Z = new File([K], W, {
|
|
6313
|
+
type: $,
|
|
6314
6314
|
lastModified: Date.now()
|
|
6315
6315
|
});
|
|
6316
6316
|
if (a?.uploadFiles) {
|
|
@@ -6322,7 +6322,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
6322
6322
|
folderId: Q,
|
|
6323
6323
|
noFolder: D,
|
|
6324
6324
|
data: Z,
|
|
6325
|
-
extension:
|
|
6325
|
+
extension: h.ce($)
|
|
6326
6326
|
}],
|
|
6327
6327
|
folderId: Q
|
|
6328
6328
|
}), pe = ae.detailed?.[0];
|
|
@@ -6334,7 +6334,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
6334
6334
|
folderId: te.folderId ?? Q,
|
|
6335
6335
|
type: te.type || Z.type,
|
|
6336
6336
|
size: te.size ?? Z.size,
|
|
6337
|
-
extension: te.extension ||
|
|
6337
|
+
extension: te.extension || h.ce($),
|
|
6338
6338
|
url: te.url,
|
|
6339
6339
|
thumbnailUrl: te.thumbnailUrl,
|
|
6340
6340
|
thumbnail: te.thumbnail,
|
|
@@ -6355,7 +6355,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
6355
6355
|
folderId: Q,
|
|
6356
6356
|
noFolder: D,
|
|
6357
6357
|
data: Z,
|
|
6358
|
-
extension:
|
|
6358
|
+
extension: h.ce($)
|
|
6359
6359
|
});
|
|
6360
6360
|
return ae ? ae.url || ae.thumbnailUrl || ae.thumbnail ? ae : await F(ae.id) || null : null;
|
|
6361
6361
|
}
|
|
@@ -6392,16 +6392,16 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
6392
6392
|
v
|
|
6393
6393
|
]), R = (0, d.useRef)(null), oe = (0, d.useCallback)(() => R.current ?? document.body, []);
|
|
6394
6394
|
return (0, d.useEffect)(() => {
|
|
6395
|
-
s && s !==
|
|
6395
|
+
s && s !== h.Gn.language && h.Gn.changeLanguage(s);
|
|
6396
6396
|
}, [s]), (0, l.jsx)(g.App, {
|
|
6397
6397
|
className: "em-filemanager",
|
|
6398
6398
|
children: (0, l.jsxs)(l.Fragment, { children: [(0, l.jsx)(g.ConfigProvider, {
|
|
6399
6399
|
getPopupContainer: () => R.current || document.body,
|
|
6400
6400
|
children: (0, l.jsx)(br, {
|
|
6401
|
-
i18n:
|
|
6401
|
+
i18n: h.Gn,
|
|
6402
6402
|
children: (0, l.jsx)(Ir, {
|
|
6403
6403
|
externalTheme: i ?? "light",
|
|
6404
|
-
children: (0, l.jsx)(ei, { children: (0, l.jsx)(
|
|
6404
|
+
children: (0, l.jsx)(ei, { children: (0, l.jsx)(h.er, {
|
|
6405
6405
|
options: {
|
|
6406
6406
|
dataProviders: a,
|
|
6407
6407
|
handleNotify: e.handleNotify,
|
|
@@ -6413,7 +6413,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
6413
6413
|
children: (0, l.jsx)(zr, {
|
|
6414
6414
|
visible: !0,
|
|
6415
6415
|
onClose: t,
|
|
6416
|
-
file:
|
|
6416
|
+
file: V,
|
|
6417
6417
|
onSave: C,
|
|
6418
6418
|
onSaveCopy: O
|
|
6419
6419
|
})
|
|
@@ -6497,7 +6497,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
6497
6497
|
function bt(e) {
|
|
6498
6498
|
return e != null && String(e).trim() !== "";
|
|
6499
6499
|
}
|
|
6500
|
-
function
|
|
6500
|
+
function ms(e, t) {
|
|
6501
6501
|
let { sortBy: r } = ti(t);
|
|
6502
6502
|
switch (r) {
|
|
6503
6503
|
case "date": return bt(e.date) ? !Number.isNaN(new Date(e.date).getTime()) : !1;
|
|
@@ -6506,13 +6506,13 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
6506
6506
|
default: return bt(e.name);
|
|
6507
6507
|
}
|
|
6508
6508
|
}
|
|
6509
|
-
function
|
|
6509
|
+
function hs(e, t) {
|
|
6510
6510
|
let r = typeof t?.search == "string" ? t.search.trim() : "";
|
|
6511
6511
|
if (!r) return !0;
|
|
6512
6512
|
let a = r.toLowerCase();
|
|
6513
6513
|
return (e.name?.toLowerCase().includes(a) ?? !1) || (e.type?.toLowerCase().includes(a) ?? !1) || (e.extension?.toLowerCase().includes(a) ?? !1);
|
|
6514
6514
|
}
|
|
6515
|
-
var fs = ri, ps =
|
|
6515
|
+
var fs = ri, ps = hs, gs = ms;
|
|
6516
6516
|
function ii(e = {}) {
|
|
6517
6517
|
return {
|
|
6518
6518
|
...e,
|
|
@@ -6522,25 +6522,25 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
6522
6522
|
};
|
|
6523
6523
|
}
|
|
6524
6524
|
var pt = "Trash";
|
|
6525
|
-
function
|
|
6525
|
+
function He(e) {
|
|
6526
6526
|
return e.replace(/\\/g, "/").replace(/^\/+|\/+$/g, "");
|
|
6527
6527
|
}
|
|
6528
6528
|
function ai(e, t, r = pt) {
|
|
6529
|
-
let a =
|
|
6529
|
+
let a = He(e);
|
|
6530
6530
|
if (!a) return [];
|
|
6531
6531
|
let i = [e, a];
|
|
6532
|
-
if (a ===
|
|
6532
|
+
if (a === He(t)) {
|
|
6533
6533
|
i.push(t);
|
|
6534
|
-
let s =
|
|
6535
|
-
s === "Trash" || s.toLowerCase() === "trash" ? i.push(r, pt, pt.toLowerCase()) : r !== "Trash" &&
|
|
6534
|
+
let s = He(t);
|
|
6535
|
+
s === "Trash" || s.toLowerCase() === "trash" ? i.push(r, pt, pt.toLowerCase()) : r !== "Trash" && He(r) !== s && i.push(r);
|
|
6536
6536
|
}
|
|
6537
|
-
return Array.from(new Set(i.map(
|
|
6537
|
+
return Array.from(new Set(i.map(He).filter(Boolean)));
|
|
6538
6538
|
}
|
|
6539
6539
|
function vs(e) {
|
|
6540
6540
|
let t = new Map();
|
|
6541
|
-
for (let [r, a] of Object.entries(e)) a.id && t.set(
|
|
6541
|
+
for (let [r, a] of Object.entries(e)) a.id && t.set(He(r), a);
|
|
6542
6542
|
return (r) => {
|
|
6543
|
-
let a = t.get(
|
|
6543
|
+
let a = t.get(He(r));
|
|
6544
6544
|
if (a) return {
|
|
6545
6545
|
id: a.id,
|
|
6546
6546
|
name: a.name ?? a.id,
|
|
@@ -6550,7 +6550,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
6550
6550
|
};
|
|
6551
6551
|
}
|
|
6552
6552
|
var li = "", Dt = 1800 * 1e3;
|
|
6553
|
-
function
|
|
6553
|
+
function Ve(e) {
|
|
6554
6554
|
return e == null || e === "" ? li : e;
|
|
6555
6555
|
}
|
|
6556
6556
|
function Bt(e) {
|
|
@@ -6561,7 +6561,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
6561
6561
|
function ys(e) {
|
|
6562
6562
|
return !e || typeof e.search != "string" ? !1 : e.search.trim().length > 0;
|
|
6563
6563
|
}
|
|
6564
|
-
function
|
|
6564
|
+
function Ke(e) {
|
|
6565
6565
|
if (!e) return null;
|
|
6566
6566
|
let t = e.folderId;
|
|
6567
6567
|
return t == null ? null : String(t);
|
|
@@ -6642,25 +6642,25 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
6642
6642
|
return r && je(r) ? r : void 0;
|
|
6643
6643
|
}
|
|
6644
6644
|
getChildrenIds(t, r = {}) {
|
|
6645
|
-
let a =
|
|
6645
|
+
let a = Ve(t), i = this.childrenByParent.get(a);
|
|
6646
6646
|
return i ? r.onlyFileSystemItems ? Array.from(i.files) : r.onlyFolders ? Array.from(i.folders) : [...Array.from(i.folders), ...Array.from(i.files)] : [];
|
|
6647
6647
|
}
|
|
6648
6648
|
searchByUrl(t) {
|
|
6649
|
-
let r =
|
|
6649
|
+
let r = h.ki(t);
|
|
6650
6650
|
for (let a of this.entities.values()) {
|
|
6651
6651
|
let i = a.value.url;
|
|
6652
|
-
if (i && (i === t ||
|
|
6652
|
+
if (i && (i === t || h.ki(i) === r)) return a.value;
|
|
6653
6653
|
}
|
|
6654
6654
|
return null;
|
|
6655
6655
|
}
|
|
6656
6656
|
upsertEntity(t) {
|
|
6657
|
-
let r = this.entities.get(t.id) ?? null, a = r ? r.value : null, i = a ?
|
|
6657
|
+
let r = this.entities.get(t.id) ?? null, a = r ? r.value : null, i = a ? Ke(a) : null, s = Ke(t), o = a ? je(a) : !1, c = je(t), u;
|
|
6658
6658
|
if (a && je(a) && c) {
|
|
6659
6659
|
let f = a.childrenCount, w = t.childrenCount;
|
|
6660
6660
|
f !== void 0 && w === void 0 && (u = f);
|
|
6661
6661
|
}
|
|
6662
6662
|
if (a && (i !== s || o !== c)) {
|
|
6663
|
-
let f =
|
|
6663
|
+
let f = Ve(i), w = this.childrenByParent.get(f);
|
|
6664
6664
|
w && (o ? w.folders.delete(t.id) : w.files.delete(t.id), w.files.size === 0 && w.folders.size === 0 && this.childrenByParent.delete(f));
|
|
6665
6665
|
}
|
|
6666
6666
|
let n = t;
|
|
@@ -6671,11 +6671,11 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
6671
6671
|
value: { ...n },
|
|
6672
6672
|
updatedAt: this.now()
|
|
6673
6673
|
}), this.checkCacheSize();
|
|
6674
|
-
let
|
|
6674
|
+
let m = Ve(s), y = this.childrenByParent.get(m);
|
|
6675
6675
|
y || (y = {
|
|
6676
6676
|
files: new Set(),
|
|
6677
6677
|
folders: new Set()
|
|
6678
|
-
}, this.childrenByParent.set(
|
|
6678
|
+
}, this.childrenByParent.set(m, y)), c ? y.folders.add(t.id) : y.files.add(t.id);
|
|
6679
6679
|
}
|
|
6680
6680
|
updateServerChildrenCount(t, r) {
|
|
6681
6681
|
if (t == null || r == null || Number.isNaN(r)) return;
|
|
@@ -6696,7 +6696,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
6696
6696
|
entity: null,
|
|
6697
6697
|
parentId: null
|
|
6698
6698
|
};
|
|
6699
|
-
let a = r.value, i =
|
|
6699
|
+
let a = r.value, i = Ke(a), s = Ve(i), o = this.childrenByParent.get(s);
|
|
6700
6700
|
return o && (je(a) ? o.folders.delete(t) : o.files.delete(t), o.files.size === 0 && o.folders.size === 0 && this.childrenByParent.delete(s)), this.entities.delete(t), {
|
|
6701
6701
|
entity: { ...a },
|
|
6702
6702
|
parentId: i
|
|
@@ -6710,37 +6710,37 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
6710
6710
|
};
|
|
6711
6711
|
let a = [{
|
|
6712
6712
|
id: t,
|
|
6713
|
-
parentId:
|
|
6713
|
+
parentId: Ke(r.value)
|
|
6714
6714
|
}], i = [], s = [];
|
|
6715
6715
|
for (; a.length;) {
|
|
6716
6716
|
let u = a.shift();
|
|
6717
6717
|
i.push(u);
|
|
6718
|
-
let n = this.childrenByParent.get(
|
|
6718
|
+
let n = this.childrenByParent.get(Ve(u.id));
|
|
6719
6719
|
if (n) {
|
|
6720
|
-
for (let
|
|
6721
|
-
let y = this.entities.get(
|
|
6720
|
+
for (let m of Array.from(n.folders)) {
|
|
6721
|
+
let y = this.entities.get(m);
|
|
6722
6722
|
y && a.push({
|
|
6723
|
-
id:
|
|
6724
|
-
parentId:
|
|
6723
|
+
id: m,
|
|
6724
|
+
parentId: Ke(y.value)
|
|
6725
6725
|
});
|
|
6726
6726
|
}
|
|
6727
|
-
for (let
|
|
6727
|
+
for (let m of Array.from(n.files)) s.push(m);
|
|
6728
6728
|
}
|
|
6729
6729
|
}
|
|
6730
6730
|
let o = [];
|
|
6731
6731
|
for (let u of s) {
|
|
6732
6732
|
let n = this.entities.get(u);
|
|
6733
6733
|
if (!n) continue;
|
|
6734
|
-
let
|
|
6735
|
-
f && (f.files.delete(u), f.files.size === 0 && f.folders.size === 0 && this.childrenByParent.delete(y)), this.entities.delete(u), o.push({ ...
|
|
6734
|
+
let m = n.value, y = Ve(Ke(m)), f = this.childrenByParent.get(y);
|
|
6735
|
+
f && (f.files.delete(u), f.files.size === 0 && f.folders.size === 0 && this.childrenByParent.delete(y)), this.entities.delete(u), o.push({ ...m });
|
|
6736
6736
|
}
|
|
6737
6737
|
let c = [];
|
|
6738
6738
|
for (let u = i.length - 1; u >= 0; u--) {
|
|
6739
|
-
let { id: n, parentId:
|
|
6739
|
+
let { id: n, parentId: m } = i[u], y = this.entities.get(n);
|
|
6740
6740
|
if (!y) continue;
|
|
6741
|
-
let f = y.value, w =
|
|
6741
|
+
let f = y.value, w = Ve(f.id);
|
|
6742
6742
|
this.childrenByParent.delete(w);
|
|
6743
|
-
let I =
|
|
6743
|
+
let I = Ve(m), b = this.childrenByParent.get(I);
|
|
6744
6744
|
b && (b.folders.delete(n), b.files.size === 0 && b.folders.size === 0 && this.childrenByParent.delete(I)), this.entities.delete(n), c.push({ ...f });
|
|
6745
6745
|
}
|
|
6746
6746
|
return {
|
|
@@ -6751,21 +6751,21 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
6751
6751
|
moveEntityById(t, r) {
|
|
6752
6752
|
let a = this.entities.get(t) ?? null;
|
|
6753
6753
|
if (!a) return null;
|
|
6754
|
-
let i = a.value, s =
|
|
6754
|
+
let i = a.value, s = Ve(Ke(i)), o = this.childrenByParent.get(s);
|
|
6755
6755
|
o && (je(i) ? o.folders.delete(t) : o.files.delete(t), o.files.size === 0 && o.folders.size === 0 && this.childrenByParent.delete(s));
|
|
6756
6756
|
let c = {
|
|
6757
6757
|
...i,
|
|
6758
6758
|
folderId: r
|
|
6759
6759
|
};
|
|
6760
6760
|
if (je(i) && je(c)) {
|
|
6761
|
-
let
|
|
6762
|
-
|
|
6761
|
+
let m = i.childrenCount;
|
|
6762
|
+
m !== void 0 && (c.childrenCount = m);
|
|
6763
6763
|
}
|
|
6764
6764
|
this.entities.set(t, {
|
|
6765
6765
|
value: c,
|
|
6766
6766
|
updatedAt: this.now()
|
|
6767
6767
|
});
|
|
6768
|
-
let u =
|
|
6768
|
+
let u = Ve(r), n = this.childrenByParent.get(u);
|
|
6769
6769
|
return n || (n = {
|
|
6770
6770
|
files: new Set(),
|
|
6771
6771
|
folders: new Set()
|
|
@@ -6804,27 +6804,27 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
6804
6804
|
}
|
|
6805
6805
|
searchByName(t, r) {
|
|
6806
6806
|
if (!t || t.trim() === "") return [];
|
|
6807
|
-
let a = r?.parentId, i = r?.recursive ?? !1, s = r?.itemType ?? "all", o = r?.caseSensitive ?? !1, c = r?.limit ?? Infinity, u = o ? t.trim() : t.trim().toLowerCase(), n = [],
|
|
6807
|
+
let a = r?.parentId, i = r?.recursive ?? !1, s = r?.itemType ?? "all", o = r?.caseSensitive ?? !1, c = r?.limit ?? Infinity, u = o ? t.trim() : t.trim().toLowerCase(), n = [], m = null;
|
|
6808
6808
|
if (a !== void 0) {
|
|
6809
|
-
|
|
6810
|
-
let y =
|
|
6811
|
-
if (
|
|
6809
|
+
m = new Set();
|
|
6810
|
+
let y = Ve(a);
|
|
6811
|
+
if (m.add(y), i) {
|
|
6812
6812
|
let f = [y], w = new Set();
|
|
6813
6813
|
for (; f.length > 0;) {
|
|
6814
6814
|
let I = f.shift();
|
|
6815
6815
|
if (w.has(I)) continue;
|
|
6816
6816
|
w.add(I);
|
|
6817
6817
|
let b = this.childrenByParent.get(I);
|
|
6818
|
-
if (b) for (let F of b.folders)
|
|
6818
|
+
if (b) for (let F of b.folders) m.add(F), f.push(F);
|
|
6819
6819
|
}
|
|
6820
6820
|
}
|
|
6821
6821
|
}
|
|
6822
6822
|
for (let [, y] of this.entities) {
|
|
6823
6823
|
if (n.length >= c) break;
|
|
6824
6824
|
let f = y.value;
|
|
6825
|
-
if (
|
|
6826
|
-
let I =
|
|
6827
|
-
if (!
|
|
6825
|
+
if (m !== null) {
|
|
6826
|
+
let I = Ve(Ke(f));
|
|
6827
|
+
if (!m.has(I)) continue;
|
|
6828
6828
|
}
|
|
6829
6829
|
if (s === "file" && je(f) || s === "folder" && !je(f)) continue;
|
|
6830
6830
|
let w = f.name ?? "";
|
|
@@ -6878,7 +6878,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
6878
6878
|
return Date.now();
|
|
6879
6879
|
}
|
|
6880
6880
|
parentKey(t) {
|
|
6881
|
-
return
|
|
6881
|
+
return Ve(t ?? null);
|
|
6882
6882
|
}
|
|
6883
6883
|
isExpired(t) {
|
|
6884
6884
|
return t == null || this.ttl !== Infinity && this.now() - t > this.ttl;
|
|
@@ -6917,8 +6917,8 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
6917
6917
|
loadId: null
|
|
6918
6918
|
}
|
|
6919
6919
|
}, c.set(o, n), this.cleanupOldViews(c));
|
|
6920
|
-
let
|
|
6921
|
-
if (
|
|
6920
|
+
let m = this.failedRequests.getFreshError(u, this.errorTtl);
|
|
6921
|
+
if (m != null) throw m;
|
|
6922
6922
|
if (n.view.value && !this.isExpired(n.view.updatedAt) && !this.areEntitiesStale(n.view.value, i) && !n.view.meta?.stale) {
|
|
6923
6923
|
let w = n.view.value.map((b) => i.getEntity(b)).filter(Boolean), I = n.params?.itemType || "all";
|
|
6924
6924
|
return {
|
|
@@ -6941,13 +6941,13 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
6941
6941
|
}
|
|
6942
6942
|
for (let oe of b.items) i.upsertEntity(oe);
|
|
6943
6943
|
n.view.value = b.items.map((oe) => oe.id);
|
|
6944
|
-
let { items:
|
|
6944
|
+
let { items: V, ..._ } = b, v = { ..._ };
|
|
6945
6945
|
n.view.meta = v, n.view.meta && (n.view.meta.stale = !1), this.failedRequests.delete(u), n.view.updatedAt = this.now(), !I && typeof v.total == "number" && (this.serverChildrenCountHandler ? this.serverChildrenCountHandler(t ?? null, v.total, i) : i.updateServerChildrenCount(t, v.total));
|
|
6946
6946
|
let C = this.strategy.preloadPagesAfter ?? 0, O = this.strategy.preloadPagesBefore ?? 0, R = Bt(r?.pageSize);
|
|
6947
6947
|
if ((C > 0 || O > 0) && Number.isFinite(R)) {
|
|
6948
|
-
let oe = t, k = { ...r }, U = typeof v.totalPages == "number" ? v.totalPages : 1, D = r?.page ?? 1, Q = R,
|
|
6948
|
+
let oe = t, k = { ...r }, U = typeof v.totalPages == "number" ? v.totalPages : 1, D = r?.page ?? 1, Q = R, $ = a, K = y;
|
|
6949
6949
|
setTimeout(() => {
|
|
6950
|
-
this.preloadPagesAsync(oe, k, D, U, Q, C, O, i, v, K
|
|
6950
|
+
this.preloadPagesAsync(oe, k, D, U, Q, C, O, i, v, $, K);
|
|
6951
6951
|
}, 0);
|
|
6952
6952
|
}
|
|
6953
6953
|
return b;
|
|
@@ -6968,7 +6968,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
6968
6968
|
})();
|
|
6969
6969
|
return n.view.promise = f, f;
|
|
6970
6970
|
}
|
|
6971
|
-
async preloadPagesAsync(t, r, a, i, s, o, c, u, n,
|
|
6971
|
+
async preloadPagesAsync(t, r, a, i, s, o, c, u, n, m, y) {
|
|
6972
6972
|
try {
|
|
6973
6973
|
let f = this.parentKey(t), w = this.views.get(f);
|
|
6974
6974
|
if (!w) return;
|
|
@@ -6978,13 +6978,13 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
6978
6978
|
if (!b?.view.meta) return;
|
|
6979
6979
|
let F = typeof b.view.meta.totalPages == "number" ? b.view.meta.totalPages : 1;
|
|
6980
6980
|
if (F !== i) return;
|
|
6981
|
-
let
|
|
6981
|
+
let V = async (_) => {
|
|
6982
6982
|
let v = {
|
|
6983
6983
|
...r,
|
|
6984
6984
|
page: _
|
|
6985
6985
|
};
|
|
6986
6986
|
try {
|
|
6987
|
-
let C = await
|
|
6987
|
+
let C = await m(t, v), O = this.views.get(f);
|
|
6988
6988
|
if (!O) return;
|
|
6989
6989
|
let R = O.get(Qe(r));
|
|
6990
6990
|
if (!R || y != null && R.view.loadId !== y || R.view.loadId !== y) return;
|
|
@@ -7015,14 +7015,14 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
7015
7015
|
...r,
|
|
7016
7016
|
page: v
|
|
7017
7017
|
}), O = w.get(C);
|
|
7018
|
-
(!O?.view.value || this.isExpired(O.view.updatedAt)) &&
|
|
7018
|
+
(!O?.view.value || this.isExpired(O.view.updatedAt)) && V(v);
|
|
7019
7019
|
}
|
|
7020
7020
|
if (c > 0 && a > 1) for (let _ = 1; _ <= Math.min(c, a - 1); _++) {
|
|
7021
7021
|
let v = a - _, C = Qe({
|
|
7022
7022
|
...r,
|
|
7023
7023
|
page: v
|
|
7024
7024
|
}), O = w.get(C);
|
|
7025
|
-
(!O?.view.value || this.isExpired(O.view.updatedAt)) &&
|
|
7025
|
+
(!O?.view.value || this.isExpired(O.view.updatedAt)) && V(v);
|
|
7026
7026
|
}
|
|
7027
7027
|
} catch {}
|
|
7028
7028
|
}
|
|
@@ -7054,7 +7054,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
7054
7054
|
for (let [, c] of t) this.isParamsSame(c.params ?? {}, r.params ?? {}) && (c.view.meta || (c.view.meta = {}), c.view.meta.total = i, o !== void 0 && (c.view.meta.totalPages = o));
|
|
7055
7055
|
}
|
|
7056
7056
|
cascadeShiftPages(t, r, a, i, s, o, c) {
|
|
7057
|
-
let u = r, n = a,
|
|
7057
|
+
let u = r, n = a, m = !1, y = 0;
|
|
7058
7058
|
for (; u.view.value && u.view.value.length < i && n < s && y < 100;) {
|
|
7059
7059
|
y++;
|
|
7060
7060
|
let f = Qe({
|
|
@@ -7077,13 +7077,13 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
7077
7077
|
break;
|
|
7078
7078
|
}
|
|
7079
7079
|
if (u.view.value = [...u.view.value, ...b], u.view.updatedAt = Date.now(), w.view.value = w.view.value.slice(b.length), w.view.updatedAt = Date.now(), w.view.value.length === 0) {
|
|
7080
|
-
let F = n + 1,
|
|
7081
|
-
if (F < (
|
|
7080
|
+
let F = n + 1, V = w.view.meta;
|
|
7081
|
+
if (F < (V && typeof V.totalPages == "number" ? V.totalPages : 1)) {
|
|
7082
7082
|
let _ = Qe({
|
|
7083
7083
|
...c,
|
|
7084
7084
|
page: F
|
|
7085
7085
|
});
|
|
7086
|
-
t.delete(_),
|
|
7086
|
+
t.delete(_), m = !0;
|
|
7087
7087
|
}
|
|
7088
7088
|
break;
|
|
7089
7089
|
}
|
|
@@ -7092,7 +7092,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
7092
7092
|
return (!u.view.value || u.view.value.length < i) && n >= s && (u.view.meta = {
|
|
7093
7093
|
...u.view.meta ?? {},
|
|
7094
7094
|
stale: !0
|
|
7095
|
-
}),
|
|
7095
|
+
}), m;
|
|
7096
7096
|
}
|
|
7097
7097
|
cascadeShiftToNextPage(t, r, a, i, s, o, c) {
|
|
7098
7098
|
if (!r.view.value || r.view.value.length <= i) return !1;
|
|
@@ -7103,9 +7103,9 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
7103
7103
|
let u = {
|
|
7104
7104
|
...c,
|
|
7105
7105
|
page: a + 1
|
|
7106
|
-
}, n = Qe(u),
|
|
7107
|
-
if (!
|
|
7108
|
-
|
|
7106
|
+
}, n = Qe(u), m = t.get(n), y = !1;
|
|
7107
|
+
if (!m?.view.value || this.isExpired(m.view.updatedAt)) if (a >= s) {
|
|
7108
|
+
m = {
|
|
7109
7109
|
params: u,
|
|
7110
7110
|
view: {
|
|
7111
7111
|
promise: null,
|
|
@@ -7114,9 +7114,9 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
7114
7114
|
updatedAt: 0,
|
|
7115
7115
|
loadId: null
|
|
7116
7116
|
}
|
|
7117
|
-
}, t.set(n,
|
|
7117
|
+
}, t.set(n, m), this.cleanupOldViews(t);
|
|
7118
7118
|
let I = r.view.meta;
|
|
7119
|
-
I && (
|
|
7119
|
+
I && (m.view.meta = {
|
|
7120
7120
|
...I,
|
|
7121
7121
|
page: a + 1
|
|
7122
7122
|
}), y = !0;
|
|
@@ -7126,12 +7126,12 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
7126
7126
|
}, !1;
|
|
7127
7127
|
let f = r.view.value.slice(i).filter((I) => o.getEntity(I));
|
|
7128
7128
|
if (f.length === 0) return y && t.delete(n), !1;
|
|
7129
|
-
r.view.value = r.view.value.slice(0, i), r.view.updatedAt = Date.now(),
|
|
7130
|
-
let w =
|
|
7131
|
-
if (!y && this.cascadeShiftToNextPage(t,
|
|
7132
|
-
if (!
|
|
7133
|
-
let I = a + 1, b =
|
|
7134
|
-
this.removeEmptyPageIfNeeded(t,
|
|
7129
|
+
r.view.value = r.view.value.slice(0, i), r.view.updatedAt = Date.now(), m.view.value = [...f, ...m.view.value ?? []], m.view.updatedAt = Date.now();
|
|
7130
|
+
let w = m.view.meta && typeof m.view.meta.totalPages == "number" ? m.view.meta.totalPages : s;
|
|
7131
|
+
if (!y && this.cascadeShiftToNextPage(t, m, a + 1, i, w, o, c)) return !0;
|
|
7132
|
+
if (!m.view.value || m.view.value.length === 0) {
|
|
7133
|
+
let I = a + 1, b = m.view.meta, F = b && typeof b.totalPages == "number" ? b.totalPages : 1;
|
|
7134
|
+
this.removeEmptyPageIfNeeded(t, m, I, F, c);
|
|
7135
7135
|
}
|
|
7136
7136
|
return y;
|
|
7137
7137
|
}
|
|
@@ -7149,16 +7149,16 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
7149
7149
|
if (o.length === 0) {
|
|
7150
7150
|
let n = t.params ?? {};
|
|
7151
7151
|
if (n.sortBy || n.sortOrder) {
|
|
7152
|
-
let
|
|
7153
|
-
if (typeof
|
|
7152
|
+
let m = i(r, r, t.params);
|
|
7153
|
+
if (typeof m != "number" || Number.isNaN(m)) return !1;
|
|
7154
7154
|
}
|
|
7155
7155
|
return t.view.value.includes(r.id) ? (t.view.updatedAt = this.now(), !0) : (t.view.value = [r.id], t.view.updatedAt = this.now(), !0);
|
|
7156
7156
|
}
|
|
7157
7157
|
let c = 0, u = o.length;
|
|
7158
7158
|
for (; c < u;) {
|
|
7159
|
-
let n = Math.floor((c + u) / 2),
|
|
7160
|
-
if (typeof
|
|
7161
|
-
|
|
7159
|
+
let n = Math.floor((c + u) / 2), m = i(r, o[n], t.params);
|
|
7160
|
+
if (typeof m != "number" || Number.isNaN(m)) return !1;
|
|
7161
|
+
m >= 0 ? c = n + 1 : u = n;
|
|
7162
7162
|
}
|
|
7163
7163
|
return t.view.value.includes(r.id) ? (t.view.updatedAt = this.now(), !0) : (t.view.value = [
|
|
7164
7164
|
...t.view.value.slice(0, c),
|
|
@@ -7167,7 +7167,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
7167
7167
|
], t.view.updatedAt = this.now(), !0);
|
|
7168
7168
|
}
|
|
7169
7169
|
updateChildrenCountForOperation(t, r, a, i) {
|
|
7170
|
-
let s =
|
|
7170
|
+
let s = Ke(r);
|
|
7171
7171
|
switch (t) {
|
|
7172
7172
|
case "delete":
|
|
7173
7173
|
this.adjustChildrenCount(i, s, -1), this.childrenCountInvalidator?.(s);
|
|
@@ -7194,10 +7194,10 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
7194
7194
|
this.updateChildrenCountForOperation(a, r, s, i);
|
|
7195
7195
|
let c = this.parentKey(t), u = this.views.get(c);
|
|
7196
7196
|
if (u) for (let [, n] of u) {
|
|
7197
|
-
let
|
|
7197
|
+
let m = n.params ?? {}, y = m?.page ?? 1, f = Bt(m?.pageSize), w = Number.isFinite(f), I = !!(m?.sortBy || m?.sortOrder), b = !!m?.search, F = m?.itemType || "all";
|
|
7198
7198
|
if (this.isEntityTypeCompatible(r, F)) {
|
|
7199
7199
|
if (b && this.strategy.filterMatch && !this.strategy.filterMatch(r, n.params)) {
|
|
7200
|
-
n.view.value?.includes(r.id) && (n.view.value = n.view.value.filter((
|
|
7200
|
+
n.view.value?.includes(r.id) && (n.view.value = n.view.value.filter((V) => V !== r.id), n.view.meta && typeof n.view.meta.total == "number" && (n.view.meta.total = Math.max(0, n.view.meta.total - 1)), this.markViewStaleForReload(n));
|
|
7201
7201
|
continue;
|
|
7202
7202
|
}
|
|
7203
7203
|
if (!n.view.value) {
|
|
@@ -7245,8 +7245,8 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
7245
7245
|
this.syncTotalsInSameViews(t, r);
|
|
7246
7246
|
}
|
|
7247
7247
|
if (r.view.updatedAt = Date.now(), u && s && r.view.value.length < i && c) {
|
|
7248
|
-
let n = r.view.meta,
|
|
7249
|
-
if (this.cascadeShiftPages(t, r, a, i,
|
|
7248
|
+
let n = r.view.meta, m = n && typeof n.totalPages == "number" ? n.totalPages : 1;
|
|
7249
|
+
if (this.cascadeShiftPages(t, r, a, i, m, c, r.params ?? {}) && r.view.meta && typeof r.view.meta.totalPages == "number") {
|
|
7250
7250
|
let y = Math.max(1, r.view.meta.totalPages - 1);
|
|
7251
7251
|
r.view.meta.totalPages = y, this.updateTotalPagesForAllViews(t, y);
|
|
7252
7252
|
}
|
|
@@ -7264,8 +7264,8 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
7264
7264
|
this.syncTotalsInSameViews(t, r);
|
|
7265
7265
|
}
|
|
7266
7266
|
if (r.view.updatedAt = Date.now(), s && (r.view.value?.length ?? 0) > i && u) {
|
|
7267
|
-
let n = r.view.meta,
|
|
7268
|
-
if (this.cascadeShiftToNextPage(t, r, a, i,
|
|
7267
|
+
let n = r.view.meta, m = n && typeof n.totalPages == "number" ? n.totalPages : 1;
|
|
7268
|
+
if (this.cascadeShiftToNextPage(t, r, a, i, m, u, r.params ?? {}) && r.view.meta && typeof r.view.meta.totalPages == "number") {
|
|
7269
7269
|
let y = r.view.meta.totalPages + 1;
|
|
7270
7270
|
r.view.meta.totalPages = y, this.updateTotalPagesForAllViews(t, y);
|
|
7271
7271
|
}
|
|
@@ -7285,8 +7285,8 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
7285
7285
|
}
|
|
7286
7286
|
}
|
|
7287
7287
|
handleUpdate(t, r, a, i, s, o, c, u, n) {
|
|
7288
|
-
let
|
|
7289
|
-
if (
|
|
7288
|
+
let m = r.view.value.includes(u.id), y = this.isEntityTypeCompatible(u, r.params?.itemType || "all");
|
|
7289
|
+
if (m && !y) {
|
|
7290
7290
|
if (r.view.value = r.view.value.filter((f) => f !== u.id), r.view.meta && typeof r.view.meta.total == "number" && (r.view.meta.total = Math.max(0, r.view.meta.total - 1), s && Number.isFinite(i) && typeof r.view.meta.total == "number")) {
|
|
7291
7291
|
let f = i;
|
|
7292
7292
|
f > 0 && (r.view.meta.totalPages = Math.max(1, Math.ceil(r.view.meta.total / f)));
|
|
@@ -7301,11 +7301,11 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
7301
7301
|
r.view.loadId = Ye(), r.view.abortController && (r.view.abortController.abort(), r.view.abortController = void 0);
|
|
7302
7302
|
return;
|
|
7303
7303
|
}
|
|
7304
|
-
if (
|
|
7304
|
+
if (m && (o || c)) {
|
|
7305
7305
|
r.view.value = r.view.value.filter((f) => f !== u.id), this.tryReinsertEntity(r, u, n, s, i) ? (r.view.updatedAt = Date.now(), r.view.loadId = Ye(), r.view.abortController && (r.view.abortController.abort(), r.view.abortController = void 0)) : this.markViewStaleForReload(r);
|
|
7306
7306
|
return;
|
|
7307
7307
|
}
|
|
7308
|
-
if (
|
|
7308
|
+
if (m) {
|
|
7309
7309
|
r.view.updatedAt = Date.now(), r.view.loadId = Ye(), r.view.abortController && (r.view.abortController.abort(), r.view.abortController = void 0);
|
|
7310
7310
|
return;
|
|
7311
7311
|
}
|
|
@@ -7335,12 +7335,12 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
7335
7335
|
}
|
|
7336
7336
|
handleMove(t, r, a, i, s, o, c, u, n) {
|
|
7337
7337
|
if (r.view.value.includes(c.id)) {
|
|
7338
|
-
if (r.view.value = r.view.value.filter((
|
|
7339
|
-
let
|
|
7340
|
-
|
|
7338
|
+
if (r.view.value = r.view.value.filter((m) => m !== c.id), r.view.meta && typeof r.view.meta.total == "number" && (r.view.meta.total = Math.max(0, r.view.meta.total - 1), s && Number.isFinite(i) && typeof r.view.meta.total == "number")) {
|
|
7339
|
+
let m = i;
|
|
7340
|
+
m > 0 && (r.view.meta.totalPages = Math.max(1, Math.ceil(r.view.meta.total / m)));
|
|
7341
7341
|
}
|
|
7342
7342
|
if (r.view.updatedAt = Date.now(), s && r.view.value.length < i && n) {
|
|
7343
|
-
let
|
|
7343
|
+
let m = r.view.meta, y = m && typeof m.totalPages == "number" ? m.totalPages : 1;
|
|
7344
7344
|
if (this.cascadeShiftPages(t, r, a, i, y, n, r.params ?? {}) && r.view.meta && typeof r.view.meta.totalPages == "number") {
|
|
7345
7345
|
let f = Math.max(1, r.view.meta.totalPages - 1);
|
|
7346
7346
|
r.view.meta.totalPages = f, this.updateTotalPagesForAllViews(t, f);
|
|
@@ -7388,9 +7388,9 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
7388
7388
|
let a = r?.ttl ?? t?.ttl ?? 18e5, i = r?.errorTtl ?? t?.errorTtl ?? a, s = r?.failedRequests ?? new ft(), o = new Qi({}, a, i, void 0, s, r?.isFolderNotFoundError);
|
|
7389
7389
|
for (let [c, u] of t.views ?? []) {
|
|
7390
7390
|
let n = new Map();
|
|
7391
|
-
for (let [
|
|
7391
|
+
for (let [m, y] of u) {
|
|
7392
7392
|
let f = y;
|
|
7393
|
-
f?.view && "error" in f.view && delete f.view.error, n.set(
|
|
7393
|
+
f?.view && "error" in f.view && delete f.view.error, n.set(m, f);
|
|
7394
7394
|
}
|
|
7395
7395
|
o.views.set(c, n);
|
|
7396
7396
|
}
|
|
@@ -7398,7 +7398,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
7398
7398
|
}
|
|
7399
7399
|
}, Is = class Zi {
|
|
7400
7400
|
invalidateChildrenCountCache(t) {
|
|
7401
|
-
let r =
|
|
7401
|
+
let r = Ve(t ?? "");
|
|
7402
7402
|
this.childrenCountPromises.delete(r), this.failedRequests.delete(ft.childrenCountKey(r));
|
|
7403
7403
|
}
|
|
7404
7404
|
constructor(t = {}, r = Dt, a, i) {
|
|
@@ -7421,7 +7421,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
7421
7421
|
return this.views.getOrCreateChildren(t, r, a, this.entities);
|
|
7422
7422
|
}
|
|
7423
7423
|
upsertEntity(t) {
|
|
7424
|
-
let r = this.entities.getEntity(t.id), a = r ?
|
|
7424
|
+
let r = this.entities.getEntity(t.id), a = r ? Ke(r) : null, i = Ke(t), s = r ? je(r) : !1, o = je(t);
|
|
7425
7425
|
if (this.entities.upsertEntity(t), r) {
|
|
7426
7426
|
if (a !== i || s !== o) {
|
|
7427
7427
|
this.views.smartInvalidateChildrenViews(a, r, "delete", this.entities), this.views.smartInvalidateChildrenViews(i, t, "insert", this.entities);
|
|
@@ -7433,17 +7433,17 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
7433
7433
|
isAncestor(t, r) {
|
|
7434
7434
|
let a = r, i = new Set();
|
|
7435
7435
|
for (; a && !i.has(a);) {
|
|
7436
|
-
if (i.add(a),
|
|
7436
|
+
if (i.add(a), Ve(a) === Ve(t)) return !0;
|
|
7437
7437
|
let s = this.entities.getEntity(a);
|
|
7438
7438
|
if (!s) break;
|
|
7439
|
-
a =
|
|
7439
|
+
a = Ke(s), a === null && (a = li);
|
|
7440
7440
|
}
|
|
7441
7441
|
return !1;
|
|
7442
7442
|
}
|
|
7443
7443
|
moveEntity(t, r) {
|
|
7444
7444
|
let a = this.entities.getEntity(t);
|
|
7445
7445
|
if (!a || je(a) && r !== null && this.isAncestor(t, r)) return null;
|
|
7446
|
-
let i =
|
|
7446
|
+
let i = Ke(a), s = this.entities.moveEntityById(t, r);
|
|
7447
7447
|
return s ? (this.views.smartInvalidateChildrenViews(i, a, "delete", this.entities), this.views.smartInvalidateChildrenViews(r, s, "insert", this.entities), s) : null;
|
|
7448
7448
|
}
|
|
7449
7449
|
copyEntity(t, r, a, i) {
|
|
@@ -7453,24 +7453,24 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
7453
7453
|
if (je(s)) {
|
|
7454
7454
|
let c = [t], u = [];
|
|
7455
7455
|
for (; c.length;) {
|
|
7456
|
-
let
|
|
7457
|
-
u.push(
|
|
7458
|
-
let y = this.entities.getChildrenIds(
|
|
7456
|
+
let m = c.shift();
|
|
7457
|
+
u.push(m);
|
|
7458
|
+
let y = this.entities.getChildrenIds(m, { onlyFolders: !0 });
|
|
7459
7459
|
for (let f of y) c.push(f);
|
|
7460
7460
|
}
|
|
7461
7461
|
let n = new Map();
|
|
7462
|
-
for (let
|
|
7463
|
-
for (let
|
|
7464
|
-
let y = this.entities.getFolder(
|
|
7462
|
+
for (let m of u) n.set(m, Ye());
|
|
7463
|
+
for (let m of u) {
|
|
7464
|
+
let y = this.entities.getFolder(m), f = n.get(m), w = Ke(y), I = w === null ? r : n.get(w) ?? null, b = {
|
|
7465
7465
|
...y,
|
|
7466
|
-
...
|
|
7466
|
+
...m === t ? i : void 0,
|
|
7467
7467
|
id: f,
|
|
7468
|
-
folderId: (
|
|
7468
|
+
folderId: (m === t ? i?.folderId : void 0) ?? I
|
|
7469
7469
|
};
|
|
7470
7470
|
this.entities.upsertEntity(b);
|
|
7471
7471
|
}
|
|
7472
|
-
for (let
|
|
7473
|
-
let y = n.get(
|
|
7472
|
+
for (let m of u) {
|
|
7473
|
+
let y = n.get(m), f = this.entities.getChildrenIds(m, { onlyFileSystemItems: !0 });
|
|
7474
7474
|
for (let w of f) {
|
|
7475
7475
|
let I = this.entities.getFileSystemItem(w);
|
|
7476
7476
|
if (!I) continue;
|
|
@@ -7555,7 +7555,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
7555
7555
|
return this.entities.searchByName(t, r);
|
|
7556
7556
|
}
|
|
7557
7557
|
async getChildrenCount(t = "", r) {
|
|
7558
|
-
let a =
|
|
7558
|
+
let a = Ve(t), i = ft.childrenCountKey(a), s = this.failedRequests.getFreshError(i, this.errorTtl);
|
|
7559
7559
|
if (s != null) return Promise.reject(s);
|
|
7560
7560
|
let o = this.childrenCountPromises.get(a);
|
|
7561
7561
|
if (o) return o;
|
|
@@ -7566,8 +7566,8 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
7566
7566
|
let n = this.views.getKnownTotal(t);
|
|
7567
7567
|
if (typeof n == "number") return u && this.handleServerReportedChildrenCount(t, n, this.entities), this.failedRequests.delete(i), n;
|
|
7568
7568
|
if (r) {
|
|
7569
|
-
let
|
|
7570
|
-
return this.entities.getFolder(t) && this.handleServerReportedChildrenCount(t,
|
|
7569
|
+
let m = await r(t);
|
|
7570
|
+
return this.entities.getFolder(t) && this.handleServerReportedChildrenCount(t, m, this.entities), this.failedRequests.delete(i), m;
|
|
7571
7571
|
}
|
|
7572
7572
|
return this.failedRequests.delete(i), this.entities.getChildrenIds(t).length;
|
|
7573
7573
|
} catch (u) {
|
|
@@ -7606,8 +7606,8 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
7606
7606
|
filterMatch: n.filterMatch
|
|
7607
7607
|
};
|
|
7608
7608
|
}
|
|
7609
|
-
return o.entities = c, o.views = u, u.setServerChildrenCountHandler((n,
|
|
7610
|
-
o.handleServerReportedChildrenCount(n,
|
|
7609
|
+
return o.entities = c, o.views = u, u.setServerChildrenCountHandler((n, m, y) => {
|
|
7610
|
+
o.handleServerReportedChildrenCount(n, m, y ?? c);
|
|
7611
7611
|
}), u.setChildrenCountInvalidator((n) => {
|
|
7612
7612
|
o.invalidateChildrenCountCache(n);
|
|
7613
7613
|
}), o;
|
|
@@ -7625,7 +7625,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
7625
7625
|
let s = a.getFolder(i)?.childrenCount;
|
|
7626
7626
|
s !== void 0 && s !== r && this.views.forceInvalidateChildrenViews(i), a.updateServerChildrenCount(i, r);
|
|
7627
7627
|
}
|
|
7628
|
-
}, _s = "", bs = "Trash", Cs = "Edited", di = 1e4, ci = 1e4, ui = 25,
|
|
7628
|
+
}, _s = "", bs = "Trash", Cs = "Edited", di = 1e4, ci = 1e4, ui = 25, mi = 10;
|
|
7629
7629
|
function Ct(e, t) {
|
|
7630
7630
|
let r = e ?? {}, a = Array.isArray(r.detailed) ? r.detailed.map((i) => ({
|
|
7631
7631
|
requestId: i.requestId ?? i.id,
|
|
@@ -7668,8 +7668,8 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
7668
7668
|
return ai(e, this._getTrashPath(), pt);
|
|
7669
7669
|
}
|
|
7670
7670
|
_folderFromResolvedPath(e, t) {
|
|
7671
|
-
if (e.isFolder !== !0) throw new
|
|
7672
|
-
if (!e.id) throw new
|
|
7671
|
+
if (e.isFolder !== !0) throw new h.G(e.isFolder === !1 ? "Path '%s' resolves to a file, not a folder".replace("%s", t) : "Path '%s' resolved to an item that is not marked as a folder".replace("%s", t), "ValidationError");
|
|
7672
|
+
if (!e.id) throw new h.G("Path '%s' resolved to a folder without id".replace("%s", t), "ValidationError");
|
|
7673
7673
|
let r = {
|
|
7674
7674
|
id: e.id,
|
|
7675
7675
|
name: e.name || e.id,
|
|
@@ -7690,7 +7690,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
7690
7690
|
}
|
|
7691
7691
|
async _findOrCreateFolderByPath(e) {
|
|
7692
7692
|
let t = xs(e);
|
|
7693
|
-
if (t.length >
|
|
7693
|
+
if (t.length > mi) throw new h.G("Path depth exceeds maximum limit of %s".replace("%s", String(mi)), "ValidationError");
|
|
7694
7694
|
let r = await this._resolveFolderByPath(e);
|
|
7695
7695
|
if (r) return r;
|
|
7696
7696
|
let a;
|
|
@@ -7700,14 +7700,14 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
7700
7700
|
itemType: "folder"
|
|
7701
7701
|
}), o = s.find((c) => c.name === i);
|
|
7702
7702
|
if (o) {
|
|
7703
|
-
if (!o.isFolder) throw new
|
|
7703
|
+
if (!o.isFolder) throw new h.G("Path component '%s' in '%s' is not a folder".replace("%s", i).replace("%s", e), "ValidationError");
|
|
7704
7704
|
a = {
|
|
7705
7705
|
id: o.id,
|
|
7706
7706
|
name: o.name,
|
|
7707
7707
|
parentId: o.folderId
|
|
7708
7708
|
};
|
|
7709
7709
|
} else {
|
|
7710
|
-
if (typeof this._dataProvider.createFolder != "function") throw new
|
|
7710
|
+
if (typeof this._dataProvider.createFolder != "function") throw new h.G("Create folder operation is not supported by data provider", "UnsupportedOperation");
|
|
7711
7711
|
a = await this.createFolder({
|
|
7712
7712
|
name: i,
|
|
7713
7713
|
parentId: a?.id
|
|
@@ -7718,7 +7718,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
7718
7718
|
}
|
|
7719
7719
|
async getTrashFolder() {
|
|
7720
7720
|
let e = await this._findOrCreateFolderByPath(this._getTrashPath());
|
|
7721
|
-
if (!e) throw new
|
|
7721
|
+
if (!e) throw new h.G("Trash folder path '%s' could not be resolved".replace("%s", this._getTrashPath()), "FolderNotFound");
|
|
7722
7722
|
return e;
|
|
7723
7723
|
}
|
|
7724
7724
|
async getTempFolder() {
|
|
@@ -7726,7 +7726,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
7726
7726
|
if (e) try {
|
|
7727
7727
|
return await this._findOrCreateFolderByPath(e);
|
|
7728
7728
|
} catch (t) {
|
|
7729
|
-
if (t instanceof
|
|
7729
|
+
if (t instanceof h.G && t.code === "ValidationError") throw t;
|
|
7730
7730
|
return;
|
|
7731
7731
|
}
|
|
7732
7732
|
}
|
|
@@ -7798,17 +7798,17 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
7798
7798
|
};
|
|
7799
7799
|
}
|
|
7800
7800
|
_validateName(e, t = !1) {
|
|
7801
|
-
if (!e || e.trim().length === 0) throw new
|
|
7801
|
+
if (!e || e.trim().length === 0) throw new h.G(t ? "Folder name cannot be empty" : "File name cannot be empty", t ? "FolderInvalidName" : "FileInvalidName");
|
|
7802
7802
|
if (/[/\\:*?"<>|]/.test(e)) {
|
|
7803
7803
|
let r = t ? "FolderInvalidName" : "FileInvalidName";
|
|
7804
|
-
throw new
|
|
7804
|
+
throw new h.G(t ? "Folder name contains invalid characters: %s".replace("%s", e) : "File name contains invalid characters: %s".replace("%s", e), r);
|
|
7805
7805
|
}
|
|
7806
7806
|
}
|
|
7807
7807
|
_validateTargetFolderType(e) {
|
|
7808
7808
|
let t = this.normalizeId(e);
|
|
7809
7809
|
if (t === this._rootId) return;
|
|
7810
7810
|
let r = this._cache.getEntity(t);
|
|
7811
|
-
if (r && !r.isFolder) throw new
|
|
7811
|
+
if (r && !r.isFolder) throw new h.G("Target item with id '%s' is not a folder".replace("%s", e), "ValidationError");
|
|
7812
7812
|
}
|
|
7813
7813
|
_checkNameExistsInCache(e, t, r, a) {
|
|
7814
7814
|
let i = this.normalizeId(e), s = this._cache.getChildrenIds(i);
|
|
@@ -7882,28 +7882,28 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
7882
7882
|
}
|
|
7883
7883
|
async getFiles({ folderId: e, search: t, sortBy: r, sortOrder: a, page: i, limit: s, itemType: o = "all", noFolder: c = !1 }) {
|
|
7884
7884
|
c && (e = (await this.getTempFolder())?.id);
|
|
7885
|
-
let u = this.normalizeId(e ?? this._rootId), n = this._options.enablePagination === !1,
|
|
7886
|
-
if (this._isDeletingId(u)) return
|
|
7885
|
+
let u = this.normalizeId(e ?? this._rootId), n = this._options.enablePagination === !1, m = n ? 1 : i, y = n ? di : s, f = this._options.clientSideFilter, w = this._options.clientSideSorting, I = this._options.clientSidePaging, b = I ? Math.max(1, i ?? 1) : void 0, F = I ? typeof s == "number" && Number.isFinite(s) && s > 0 ? s : ui : void 0, V = this._emptyFilesResult(I ? b : m, I ? F : y);
|
|
7886
|
+
if (this._isDeletingId(u)) return V;
|
|
7887
7887
|
let _ = this._options.unifiedCatalogFetch !== !1 && n && (o === "folder" || o === "file"), v = _ ? "all" : o, C = {
|
|
7888
7888
|
folderId: u,
|
|
7889
7889
|
itemType: v
|
|
7890
7890
|
};
|
|
7891
|
-
f || (C.search = t), w || (C.sortBy = r ?? (v === "folder" ? void 0 : "date"), C.sortOrder = a ?? (v === "folder" ? void 0 : "desc")), I || (C.page =
|
|
7891
|
+
f || (C.search = t), w || (C.sortBy = r ?? (v === "folder" ? void 0 : "date"), C.sortOrder = a ?? (v === "folder" ? void 0 : "desc")), I || (C.page = m, C.limit = _ ? ci : y);
|
|
7892
7892
|
let O = _ ? ci : I ? void 0 : y, R = {
|
|
7893
7893
|
folderId: u,
|
|
7894
7894
|
itemType: v,
|
|
7895
7895
|
search: f ? void 0 : t,
|
|
7896
7896
|
sortBy: w ? void 0 : C.sortBy,
|
|
7897
7897
|
sortOrder: w ? void 0 : C.sortOrder,
|
|
7898
|
-
page: I ? void 0 :
|
|
7898
|
+
page: I ? void 0 : m,
|
|
7899
7899
|
pageSize: O
|
|
7900
7900
|
}, oe;
|
|
7901
7901
|
try {
|
|
7902
|
-
oe = await this._cache.getOrCreateChildren(u, R, async (K
|
|
7903
|
-
let M =
|
|
7904
|
-
...
|
|
7905
|
-
folderId:
|
|
7906
|
-
limit:
|
|
7902
|
+
oe = await this._cache.getOrCreateChildren(u, R, async ($, K) => {
|
|
7903
|
+
let M = K.pageSize, W = M != null && Number.isFinite(Number(M)) ? Number(M) : di, Z = await this._dataProvider.getItems({
|
|
7904
|
+
...K,
|
|
7905
|
+
folderId: $,
|
|
7906
|
+
limit: W
|
|
7907
7907
|
}), ae = Fs(Z.items);
|
|
7908
7908
|
return I ? {
|
|
7909
7909
|
items: ae,
|
|
@@ -7913,16 +7913,16 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
7913
7913
|
...Z.pagination
|
|
7914
7914
|
};
|
|
7915
7915
|
});
|
|
7916
|
-
} catch (
|
|
7917
|
-
if (this._isDeletingId(u)) return
|
|
7918
|
-
throw
|
|
7916
|
+
} catch ($) {
|
|
7917
|
+
if (this._isDeletingId(u)) return V;
|
|
7918
|
+
throw $;
|
|
7919
7919
|
}
|
|
7920
7920
|
let k = oe.items;
|
|
7921
|
-
if (_ && (o === "folder" ? k = k.filter((
|
|
7921
|
+
if (_ && (o === "folder" ? k = k.filter(($) => $.isFolder) : o === "file" && (k = k.filter(($) => !$.isFolder))), f) {
|
|
7922
7922
|
if (typeof this._options.clientSideFilter == "function") k = this._options.clientSideFilter(k, t);
|
|
7923
7923
|
else if (t) {
|
|
7924
|
-
let
|
|
7925
|
-
k = k.filter((
|
|
7924
|
+
let $ = t.toLowerCase();
|
|
7925
|
+
k = k.filter((K) => K.name?.toLowerCase().includes($));
|
|
7926
7926
|
}
|
|
7927
7927
|
}
|
|
7928
7928
|
w && (k = typeof this._options.clientSideSorting == "function" ? this._options.clientSideSorting(k, r, a) : this._defaultClientSideSort(k, r, a));
|
|
@@ -7931,20 +7931,20 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
7931
7931
|
let D = k;
|
|
7932
7932
|
if (I) if (typeof this._options.clientSidePaging == "function") D = this._options.clientSidePaging(k, b, F);
|
|
7933
7933
|
else {
|
|
7934
|
-
let
|
|
7935
|
-
D = k.slice(K
|
|
7934
|
+
let $ = (b - 1) * F, K = $ + F;
|
|
7935
|
+
D = k.slice($, K);
|
|
7936
7936
|
}
|
|
7937
7937
|
if (typeof this._dataProvider.getUrl == "function" || typeof this._dataProvider.getThumbnailUrl == "function") {
|
|
7938
|
-
let
|
|
7939
|
-
if (
|
|
7940
|
-
let [M,
|
|
7938
|
+
let $ = D.map(async (K) => {
|
|
7939
|
+
if (K.isFolder) return K;
|
|
7940
|
+
let [M, W] = await Promise.all([K.url ? Promise.resolve(K.url) : typeof this._dataProvider.getUrl == "function" ? this._dataProvider.getUrl(K) : Promise.resolve(void 0), K.thumbnailUrl ? Promise.resolve(K.thumbnailUrl) : typeof this._dataProvider.getThumbnailUrl == "function" ? this._dataProvider.getThumbnailUrl(K) : Promise.resolve(void 0)]);
|
|
7941
7941
|
return {
|
|
7942
|
-
...
|
|
7942
|
+
...K,
|
|
7943
7943
|
url: M,
|
|
7944
|
-
thumbnailUrl:
|
|
7944
|
+
thumbnailUrl: W
|
|
7945
7945
|
};
|
|
7946
7946
|
});
|
|
7947
|
-
D = await Promise.all(
|
|
7947
|
+
D = await Promise.all($);
|
|
7948
7948
|
}
|
|
7949
7949
|
let Q = I ? {
|
|
7950
7950
|
page: b,
|
|
@@ -7954,7 +7954,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
7954
7954
|
hasNext: b * F < U,
|
|
7955
7955
|
hasPrev: b > 1
|
|
7956
7956
|
} : {
|
|
7957
|
-
page:
|
|
7957
|
+
page: m,
|
|
7958
7958
|
limit: y,
|
|
7959
7959
|
total: U,
|
|
7960
7960
|
...!I && oe.totalPages && { totalPages: oe.totalPages },
|
|
@@ -7987,10 +7987,10 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
7987
7987
|
childrenCount: e.childCount
|
|
7988
7988
|
});
|
|
7989
7989
|
if (typeof this._dataProvider.getFileData == "function") return await this._dataProvider.getFileData(i, a);
|
|
7990
|
-
if (!i.url && typeof this._dataProvider.getUrl != "function") throw new
|
|
7990
|
+
if (!i.url && typeof this._dataProvider.getUrl != "function") throw new h.G("Cannot read file", "FileReadError");
|
|
7991
7991
|
let s = i.url || (typeof this._dataProvider.getUrl == "function" ? await this._dataProvider.getUrl(i) : "");
|
|
7992
7992
|
if (s) return (await (this._config.fetchWithProxy ?? fetch)(s, a?.forceReload ? { cache: "no-store" } : void 0)).blob();
|
|
7993
|
-
throw new
|
|
7993
|
+
throw new h.G("Unable to get file data", "FileReadError");
|
|
7994
7994
|
}
|
|
7995
7995
|
async findFileByUrl(e) {
|
|
7996
7996
|
let t = this._cache.searchByUrl(e);
|
|
@@ -8037,8 +8037,8 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
8037
8037
|
}
|
|
8038
8038
|
async _uploadFile(e) {
|
|
8039
8039
|
let t = this.normalizeId(e.folderId ?? this._rootId);
|
|
8040
|
-
if (typeof this._dataProvider.uploadFile != "function") throw new
|
|
8041
|
-
if (this._validateName(e.name, !1), this._validateDuplicates && this._checkNameExistsInCache(t, e.name, !1)) throw new
|
|
8040
|
+
if (typeof this._dataProvider.uploadFile != "function") throw new h.G("Upload file operation is not supported by data provider", "UnsupportedOperation");
|
|
8041
|
+
if (this._validateName(e.name, !1), this._validateDuplicates && this._checkNameExistsInCache(t, e.name, !1)) throw new h.G("File '%s' already exists in target folder".replace("%s", e.name), "FileAlreadyExists");
|
|
8042
8042
|
let r = await this._dataProvider.uploadFile({
|
|
8043
8043
|
...e,
|
|
8044
8044
|
folderId: t
|
|
@@ -8065,7 +8065,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
8065
8065
|
for (let o of r) if (o.name) {
|
|
8066
8066
|
this._validateName(o.name, !1);
|
|
8067
8067
|
let c = this.normalizeId(o.folderId ?? i);
|
|
8068
|
-
if (this._checkNameExistsInCache(c, o.name, !1)) throw new
|
|
8068
|
+
if (this._checkNameExistsInCache(c, o.name, !1)) throw new h.G("File '%s' already exists in target folder".replace("%s", o.name), "FileAlreadyExists");
|
|
8069
8069
|
}
|
|
8070
8070
|
}
|
|
8071
8071
|
let s = {
|
|
@@ -8093,16 +8093,16 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
8093
8093
|
let u = c?.detailed;
|
|
8094
8094
|
if (s.detailed && s.detailed.length) {
|
|
8095
8095
|
for (let n = 0; n < s.detailed.length; n++) {
|
|
8096
|
-
let
|
|
8097
|
-
if (
|
|
8098
|
-
let y =
|
|
8096
|
+
let m = s.detailed[n];
|
|
8097
|
+
if (m && m.success) {
|
|
8098
|
+
let y = m.data, f = y?.id ?? m.requestId, w = u?.[n]?.data, I = Me({
|
|
8099
8099
|
...w,
|
|
8100
8100
|
...y,
|
|
8101
8101
|
id: f,
|
|
8102
8102
|
folderId: y?.folderId ?? w?.folderId ?? i,
|
|
8103
8103
|
isFolder: !1
|
|
8104
8104
|
});
|
|
8105
|
-
this._cache.upsertEntity(I),
|
|
8105
|
+
this._cache.upsertEntity(I), m.requestId = f;
|
|
8106
8106
|
}
|
|
8107
8107
|
}
|
|
8108
8108
|
s.success === void 0 && (s.success = !s.detailed.some((n) => !n.success));
|
|
@@ -8127,7 +8127,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
8127
8127
|
};
|
|
8128
8128
|
}
|
|
8129
8129
|
})), s.success = !s.detailed.some((o) => !o.success);
|
|
8130
|
-
else throw new
|
|
8130
|
+
else throw new h.G("Upload files is not supported by data provider", "UnsupportedOperation");
|
|
8131
8131
|
if (s.success && this._enableTrash) try {
|
|
8132
8132
|
this._cache.forceInvalidate(i);
|
|
8133
8133
|
} catch {}
|
|
@@ -8182,7 +8182,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
8182
8182
|
if (!s) return {
|
|
8183
8183
|
requestId: i,
|
|
8184
8184
|
success: !1,
|
|
8185
|
-
error: new
|
|
8185
|
+
error: new h.G("Item with id '%s' not found".replace("%s", i), "FileNotFound")
|
|
8186
8186
|
};
|
|
8187
8187
|
try {
|
|
8188
8188
|
return await this._dataProvider.deleteItem(s, t), a ? this._cache.moveEntity(i, a.id) : this._cache.deleteEntity(i), {
|
|
@@ -8204,8 +8204,8 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
8204
8204
|
}
|
|
8205
8205
|
async hardDeleteItem(e) {
|
|
8206
8206
|
let t = this._cache.getEntity(e);
|
|
8207
|
-
if (!t) throw new
|
|
8208
|
-
if (typeof this._dataProvider.deleteItem != "function") throw new
|
|
8207
|
+
if (!t) throw new h.G("Item with id '%s' not found in cache".replace("%s", e), "FileNotFound");
|
|
8208
|
+
if (typeof this._dataProvider.deleteItem != "function") throw new h.G("Delete item operation is not supported by data provider", "DeleteNotAllowed");
|
|
8209
8209
|
if (await this._dataProvider.deleteItem(t, { permanent: !0 }), this._cache.deleteEntity(e), this._enableTrash) try {
|
|
8210
8210
|
let r = await this.getTrashFolder();
|
|
8211
8211
|
r && this._cache.forceInvalidate(r.id);
|
|
@@ -8213,7 +8213,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
8213
8213
|
return !0;
|
|
8214
8214
|
}
|
|
8215
8215
|
async cleanTrash() {
|
|
8216
|
-
if (!this._enableTrash) throw new
|
|
8216
|
+
if (!this._enableTrash) throw new h.G("Trash is not enabled", "UnsupportedOperation");
|
|
8217
8217
|
if (typeof this._dataProvider.cleanTrash == "function") {
|
|
8218
8218
|
let e = await this._dataProvider.cleanTrash();
|
|
8219
8219
|
try {
|
|
@@ -8222,11 +8222,11 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
8222
8222
|
} catch {}
|
|
8223
8223
|
return e;
|
|
8224
8224
|
}
|
|
8225
|
-
throw new
|
|
8225
|
+
throw new h.G("Clean trash is not supported by data provider", "UnsupportedOperation");
|
|
8226
8226
|
}
|
|
8227
8227
|
async createFolder({ name: e, parentId: t, is_force_create: r }) {
|
|
8228
8228
|
let a = this.normalizeId(t ?? this._rootId);
|
|
8229
|
-
if (this._validateName(e, !0), this._validateDuplicates && this._checkNameExistsInCache(a, e, !0)) throw new
|
|
8229
|
+
if (this._validateName(e, !0), this._validateDuplicates && this._checkNameExistsInCache(a, e, !0)) throw new h.G("Folder '%s' already exists in parent folder".replace("%s", e), "FolderAlreadyExists");
|
|
8230
8230
|
let i = await this._dataProvider.createFolder(e, a, r), s = Me({
|
|
8231
8231
|
id: i.id,
|
|
8232
8232
|
folderId: a,
|
|
@@ -8259,12 +8259,12 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
8259
8259
|
}
|
|
8260
8260
|
}
|
|
8261
8261
|
async renameFolder(e, t) {
|
|
8262
|
-
if (typeof this._dataProvider.renameItem != "function") throw new
|
|
8262
|
+
if (typeof this._dataProvider.renameItem != "function") throw new h.G("Rename folder is not supported", "RenameNotAllowed");
|
|
8263
8263
|
let r = this.normalizeId(e), a = this._cache.getEntity(r);
|
|
8264
|
-
if (!a) throw new
|
|
8264
|
+
if (!a) throw new h.G("Folder with id '%s' not found in cache".replace("%s", e), "FolderNotFound");
|
|
8265
8265
|
if (this._validateName(t, !0), this._validateDuplicates) {
|
|
8266
8266
|
let s = this.normalizeId(a.folderId);
|
|
8267
|
-
if (this._checkNameExistsInCache(s, t, !0, r)) throw new
|
|
8267
|
+
if (this._checkNameExistsInCache(s, t, !0, r)) throw new h.G("Folder '%s' already exists in parent folder".replace("%s", t), "FolderAlreadyExists");
|
|
8268
8268
|
}
|
|
8269
8269
|
let i = rt(await this._dataProvider.renameItem(a, t));
|
|
8270
8270
|
return this._cache.upsertEntity(Me({
|
|
@@ -8273,13 +8273,13 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
8273
8273
|
})), this._cache.getEntity(i.id);
|
|
8274
8274
|
}
|
|
8275
8275
|
async renameFile(e, t) {
|
|
8276
|
-
if (typeof this._dataProvider.renameItem != "function") throw new
|
|
8276
|
+
if (typeof this._dataProvider.renameItem != "function") throw new h.G("Rename file is not supported", "RenameNotAllowed");
|
|
8277
8277
|
let r = this._cache.getEntity(e);
|
|
8278
|
-
if (!r) throw new
|
|
8278
|
+
if (!r) throw new h.G("File with id '%s' not found in cache".replace("%s", e), "FileNotFound");
|
|
8279
8279
|
let a = this.normalizeId(e);
|
|
8280
8280
|
if (this._validateName(t, !1), this._validateDuplicates) {
|
|
8281
8281
|
let s = this.normalizeId(r.folderId);
|
|
8282
|
-
if (this._checkNameExistsInCache(s, t, !1, a)) throw new
|
|
8282
|
+
if (this._checkNameExistsInCache(s, t, !1, a)) throw new h.G("File '%s' already exists in parent folder".replace("%s", t), "FileAlreadyExists");
|
|
8283
8283
|
}
|
|
8284
8284
|
let i = rt(await this._dataProvider.renameItem(r, t));
|
|
8285
8285
|
return i && this._cache.upsertEntity(Me({
|
|
@@ -8288,7 +8288,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
8288
8288
|
})), this._cache.getEntity(a);
|
|
8289
8289
|
}
|
|
8290
8290
|
async moveItem({ itemId: e, targetFolderId: t, isFolder: r }) {
|
|
8291
|
-
if (typeof this._dataProvider.moveItem != "function") throw new
|
|
8291
|
+
if (typeof this._dataProvider.moveItem != "function") throw new h.G("Move item operation is not supported by data provider", "MoveNotAllowed");
|
|
8292
8292
|
let a = this.normalizeId(t);
|
|
8293
8293
|
this._validateTargetFolderType(t);
|
|
8294
8294
|
let i = this._cache.getEntity(e);
|
|
@@ -8314,12 +8314,12 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
8314
8314
|
return !0;
|
|
8315
8315
|
}
|
|
8316
8316
|
if (i.isFolder) {
|
|
8317
|
-
if (e === a) throw new
|
|
8318
|
-
if (this._isAncestor(e, a)) throw new
|
|
8317
|
+
if (e === a) throw new h.G("Cannot move folder into itself", "MoveIntoSelf");
|
|
8318
|
+
if (this._isAncestor(e, a)) throw new h.G("Cannot move folder into its descendant", "MoveIntoDescendant");
|
|
8319
8319
|
}
|
|
8320
8320
|
if (this._validateDuplicates && a !== this.normalizeId(i.folderId) && i.name && this._checkNameExistsInCache(a, i.name, !!i.isFolder, e)) {
|
|
8321
8321
|
let o = i.isFolder ? "FolderAlreadyExists" : "FileAlreadyExists";
|
|
8322
|
-
throw new
|
|
8322
|
+
throw new h.G(`${i.isFolder ? "Folder" : "File"} '${i.name}' already exists in target folder`, o);
|
|
8323
8323
|
}
|
|
8324
8324
|
let s = rt(await this._dataProvider.moveItem(i, a));
|
|
8325
8325
|
if (s.id === e) {
|
|
@@ -8343,12 +8343,12 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
8343
8343
|
let a = t.map((s) => this._cache.getEntity(s));
|
|
8344
8344
|
for (let s of a) if (s) {
|
|
8345
8345
|
if (s.isFolder) {
|
|
8346
|
-
if (s.id === r) throw new
|
|
8347
|
-
if (this._isAncestor(s.id, r)) throw new
|
|
8346
|
+
if (s.id === r) throw new h.G("Cannot move folder '%s' into itself".replace("%s", s.name), "MoveIntoSelf");
|
|
8347
|
+
if (this._isAncestor(s.id, r)) throw new h.G("Cannot move folder '%s' into its descendant".replace("%s", s.name), "MoveIntoDescendant");
|
|
8348
8348
|
}
|
|
8349
8349
|
if (this._validateDuplicates && r !== this.normalizeId(s.folderId) && s.name && this._checkNameExistsInCache(r, s.name, !!s.isFolder, s.id)) {
|
|
8350
8350
|
let o = s.isFolder ? "FolderAlreadyExists" : "FileAlreadyExists";
|
|
8351
|
-
throw new
|
|
8351
|
+
throw new h.G(`${s.isFolder ? "Folder" : "File"} '${s.name}' already exists in target folder`, o);
|
|
8352
8352
|
}
|
|
8353
8353
|
}
|
|
8354
8354
|
let i = {
|
|
@@ -8377,7 +8377,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
8377
8377
|
};
|
|
8378
8378
|
}
|
|
8379
8379
|
}));
|
|
8380
|
-
else throw new
|
|
8380
|
+
else throw new h.G("Move items is not supported", "MoveNotAllowed");
|
|
8381
8381
|
if (i.success) {
|
|
8382
8382
|
let s = i.detailed || t.map((o) => ({
|
|
8383
8383
|
requestId: o,
|
|
@@ -8400,11 +8400,11 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
8400
8400
|
return i;
|
|
8401
8401
|
} else return {
|
|
8402
8402
|
success: !1,
|
|
8403
|
-
error: i.error || new
|
|
8403
|
+
error: i.error || new h.G("Move items failed", "MoveNotAllowed")
|
|
8404
8404
|
};
|
|
8405
8405
|
}
|
|
8406
8406
|
async copyItem({ itemId: e, targetFolderId: t }) {
|
|
8407
|
-
if (typeof this._dataProvider.copyItem != "function") throw new
|
|
8407
|
+
if (typeof this._dataProvider.copyItem != "function") throw new h.G("Copy item is not supported", "CopyNotAllowed");
|
|
8408
8408
|
let r = this.normalizeId(t);
|
|
8409
8409
|
this._validateTargetFolderType(t);
|
|
8410
8410
|
let a = this._cache.getEntity(e);
|
|
@@ -8422,7 +8422,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
8422
8422
|
let s = r === this.normalizeId(a.folderId) ? e : void 0;
|
|
8423
8423
|
if (this._checkNameExistsInCache(r, a.name, !!a.isFolder, s)) {
|
|
8424
8424
|
let o = a.isFolder ? "FolderAlreadyExists" : "FileAlreadyExists";
|
|
8425
|
-
throw new
|
|
8425
|
+
throw new h.G(`${a.isFolder ? "Folder" : "File"} '${a.name}' already exists in target folder`, o);
|
|
8426
8426
|
}
|
|
8427
8427
|
}
|
|
8428
8428
|
let i = rt(await this._dataProvider.copyItem(a, r));
|
|
@@ -8438,10 +8438,10 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
8438
8438
|
let r = this.normalizeId(e);
|
|
8439
8439
|
this._validateTargetFolderType(e);
|
|
8440
8440
|
let a = t.map((c) => typeof c == "string" ? { id: c } : c), i = a.map((c) => c.id), s = i.map((c, u) => {
|
|
8441
|
-
let n = this._cache.getEntity(c),
|
|
8442
|
-
return n ?
|
|
8441
|
+
let n = this._cache.getEntity(c), m = a[u]?.newName;
|
|
8442
|
+
return n ? m ? {
|
|
8443
8443
|
...n,
|
|
8444
|
-
name:
|
|
8444
|
+
name: m
|
|
8445
8445
|
} : n : void 0;
|
|
8446
8446
|
});
|
|
8447
8447
|
if (this._validateDuplicates) for (let c = 0; c < s.length; c++) {
|
|
@@ -8449,8 +8449,8 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
8449
8449
|
if (u && u.name) {
|
|
8450
8450
|
let n = r === this.normalizeId(u.folderId) ? i[c] : void 0;
|
|
8451
8451
|
if (this._checkNameExistsInCache(r, u.name, !!u.isFolder, n)) {
|
|
8452
|
-
let
|
|
8453
|
-
throw new
|
|
8452
|
+
let m = u.isFolder ? "FolderAlreadyExists" : "FileAlreadyExists";
|
|
8453
|
+
throw new h.G(`${u.isFolder ? "Folder" : "File"} '${u.name}' already exists in target folder`, m);
|
|
8454
8454
|
}
|
|
8455
8455
|
}
|
|
8456
8456
|
}
|
|
@@ -8471,29 +8471,29 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
8471
8471
|
data: rt(await this._dataProvider.copyItem(n, r)),
|
|
8472
8472
|
success: !0
|
|
8473
8473
|
};
|
|
8474
|
-
} catch (
|
|
8474
|
+
} catch (m) {
|
|
8475
8475
|
return {
|
|
8476
8476
|
requestId: c,
|
|
8477
8477
|
success: !1,
|
|
8478
|
-
error:
|
|
8478
|
+
error: m
|
|
8479
8479
|
};
|
|
8480
8480
|
}
|
|
8481
8481
|
}));
|
|
8482
|
-
else throw new
|
|
8482
|
+
else throw new h.G("Copy items is not supported", "CopyNotAllowed");
|
|
8483
8483
|
if (o.success && o.detailed) for (let c = 0, u = o.detailed.length; c < u; c++) {
|
|
8484
8484
|
let n = o.detailed[c];
|
|
8485
8485
|
if (n.success && n.data?.id) {
|
|
8486
|
-
let
|
|
8487
|
-
!this._cache.copyEntity(n.requestId,
|
|
8486
|
+
let m = n.data.folderId || r;
|
|
8487
|
+
!this._cache.copyEntity(n.requestId, m, n.data.id, {
|
|
8488
8488
|
...n.data,
|
|
8489
|
-
folderId:
|
|
8489
|
+
folderId: m
|
|
8490
8490
|
}) && n.data && this._cache.upsertEntity(Me({
|
|
8491
8491
|
...n.data,
|
|
8492
|
-
folderId:
|
|
8492
|
+
folderId: m
|
|
8493
8493
|
}));
|
|
8494
8494
|
}
|
|
8495
8495
|
}
|
|
8496
|
-
else if (!o.detailed) throw new
|
|
8496
|
+
else if (!o.detailed) throw new h.G("batchResult in copy method must have detailed results", "ValidationError");
|
|
8497
8497
|
return o;
|
|
8498
8498
|
}
|
|
8499
8499
|
async uploadFileByUrl(e) {
|
|
@@ -8516,12 +8516,12 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
8516
8516
|
}
|
|
8517
8517
|
}
|
|
8518
8518
|
async updateFile(e, t) {
|
|
8519
|
-
if (typeof this._dataProvider.updateFile != "function") throw new
|
|
8519
|
+
if (typeof this._dataProvider.updateFile != "function") throw new h.G("Update file is not supported", "UnsupportedOperation");
|
|
8520
8520
|
let r = this.normalizeId(e), a = this._cache.getEntity(r);
|
|
8521
|
-
if (!a) throw new
|
|
8521
|
+
if (!a) throw new h.G("File with id '%s' not found in cache".replace("%s", e), "FileNotFound");
|
|
8522
8522
|
if (t.name && t.name !== a.name && this._validateName(t.name, !1), this._validateDuplicates && t.name && t.name !== a.name) {
|
|
8523
8523
|
let s = this.normalizeId(a.folderId);
|
|
8524
|
-
if (this._checkNameExistsInCache(s, t.name, !1, r)) throw new
|
|
8524
|
+
if (this._checkNameExistsInCache(s, t.name, !1, r)) throw new h.G("File '%s' already exists in parent folder".replace("%s", t.name), "FileAlreadyExists");
|
|
8525
8525
|
}
|
|
8526
8526
|
let i = rt(await this._dataProvider.updateFile(a, { ...t }));
|
|
8527
8527
|
return this._cache.upsertEntity(Me({
|
|
@@ -8530,18 +8530,18 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
8530
8530
|
...t
|
|
8531
8531
|
})), this._cache.getEntity(r);
|
|
8532
8532
|
}
|
|
8533
|
-
},
|
|
8533
|
+
}, We = [], Ut = 0; Ut < 256; ++Ut) We.push((Ut + 256).toString(16).slice(1));
|
|
8534
8534
|
function ks(e, t = 0) {
|
|
8535
|
-
return (
|
|
8535
|
+
return (We[e[t + 0]] + We[e[t + 1]] + We[e[t + 2]] + We[e[t + 3]] + "-" + We[e[t + 4]] + We[e[t + 5]] + "-" + We[e[t + 6]] + We[e[t + 7]] + "-" + We[e[t + 8]] + We[e[t + 9]] + "-" + We[e[t + 10]] + We[e[t + 11]] + We[e[t + 12]] + We[e[t + 13]] + We[e[t + 14]] + We[e[t + 15]]).toLowerCase();
|
|
8536
8536
|
}
|
|
8537
8537
|
var Ft, js = new Uint8Array(16);
|
|
8538
8538
|
function Ss() {
|
|
8539
8539
|
if (!Ft && (Ft = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !Ft)) throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
8540
8540
|
return Ft(js);
|
|
8541
8541
|
}
|
|
8542
|
-
var
|
|
8542
|
+
var hi = { randomUUID: typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto) };
|
|
8543
8543
|
function Es(e, t, r) {
|
|
8544
|
-
if (
|
|
8544
|
+
if (hi.randomUUID && !t && !e) return hi.randomUUID();
|
|
8545
8545
|
e ||= {};
|
|
8546
8546
|
var a = e.random || (e.rng || Ss)();
|
|
8547
8547
|
if (a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, t) {
|
|
@@ -8592,12 +8592,12 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
8592
8592
|
let t = (a, i, s) => {
|
|
8593
8593
|
if (!a) return;
|
|
8594
8594
|
if (a.isFolder !== !0) return a;
|
|
8595
|
-
let o =
|
|
8595
|
+
let o = He(He(s) === He(this.trashPath) ? this.trashPath : i), c = a.folderId != null && a.folderId !== "" ? He(a.folderId) : this.rootPath;
|
|
8596
8596
|
return {
|
|
8597
8597
|
...a,
|
|
8598
8598
|
id: this._getOrGenerateId(o),
|
|
8599
8599
|
name: a.name,
|
|
8600
|
-
folderId: c ===
|
|
8600
|
+
folderId: c === He(this.rootPath) ? this.rootPath || "" : this._getOrGenerateId(c),
|
|
8601
8601
|
isFolder: !0
|
|
8602
8602
|
};
|
|
8603
8603
|
}, r = ai(e, this.trashPath, this.trashId);
|
|
@@ -8610,8 +8610,8 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
8610
8610
|
}
|
|
8611
8611
|
_getOrGenerateId(e) {
|
|
8612
8612
|
if (e === this.rootPath) return "";
|
|
8613
|
-
let t =
|
|
8614
|
-
if (t ===
|
|
8613
|
+
let t = He(e);
|
|
8614
|
+
if (t === He(this.trashPath)) return this.trashId;
|
|
8615
8615
|
if (this._pathToId.has(t)) return this._pathToId.get(t);
|
|
8616
8616
|
let r = Es();
|
|
8617
8617
|
return this._pathToId.set(t, r), this._idToPath.set(r, t), r;
|
|
@@ -8622,7 +8622,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
8622
8622
|
let a = this._idToPath.get(e);
|
|
8623
8623
|
if (!a) {
|
|
8624
8624
|
if (r) return `unknown folder ${e}`;
|
|
8625
|
-
throw new
|
|
8625
|
+
throw new h.G(`Path for id '${e}' not found in mapping`, "FileNotFound");
|
|
8626
8626
|
}
|
|
8627
8627
|
let i = 0;
|
|
8628
8628
|
for (; i < this.rootPath.length && this.rootPath[i] === "/";) i++;
|
|
@@ -8664,7 +8664,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
8664
8664
|
};
|
|
8665
8665
|
}
|
|
8666
8666
|
async renameItem(e, t) {
|
|
8667
|
-
if (typeof this._inner.renameItem != "function") throw new
|
|
8667
|
+
if (typeof this._inner.renameItem != "function") throw new h.G("Rename item is not supported by inner storage", "RenameNotAllowed");
|
|
8668
8668
|
let r = this.pathForId(e.id, e.isFolder ?? !1), a = r, { ...i } = await this._inner.renameItem({
|
|
8669
8669
|
...e,
|
|
8670
8670
|
id: r,
|
|
@@ -8679,7 +8679,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
8679
8679
|
};
|
|
8680
8680
|
}
|
|
8681
8681
|
async deleteItem(e, t) {
|
|
8682
|
-
if (typeof this._inner.deleteItem != "function") throw new
|
|
8682
|
+
if (typeof this._inner.deleteItem != "function") throw new h.G("Delete item is not supported by inner storage", "DeleteNotAllowed");
|
|
8683
8683
|
let r = this.pathForId(e.id, e.isFolder ?? !1);
|
|
8684
8684
|
await this._inner.deleteItem({
|
|
8685
8685
|
...e,
|
|
@@ -8688,7 +8688,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
8688
8688
|
}, t), this.recursivelyRemoveMappings(e.id, r);
|
|
8689
8689
|
}
|
|
8690
8690
|
async uploadFile(e) {
|
|
8691
|
-
if (typeof this._inner.uploadFile != "function") throw new
|
|
8691
|
+
if (typeof this._inner.uploadFile != "function") throw new h.G("Upload file is not supported by inner storage", "UnsupportedOperation");
|
|
8692
8692
|
let t = e.folderId ? this.pathForId(e.folderId, !0) : this.rootPath, r = await this._inner.uploadFile({
|
|
8693
8693
|
...e,
|
|
8694
8694
|
folderId: t
|
|
@@ -8746,7 +8746,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
8746
8746
|
};
|
|
8747
8747
|
}
|
|
8748
8748
|
async moveItem(e, t) {
|
|
8749
|
-
if (typeof this._inner.moveItem != "function") throw new
|
|
8749
|
+
if (typeof this._inner.moveItem != "function") throw new h.G("Move item is not supported by inner storage", "MoveNotAllowed");
|
|
8750
8750
|
let r = this.pathForId(e.id, e.isFolder ?? !1), a = t ? this.pathForId(t, !0) : this.rootPath, i = await this._inner.moveItem({
|
|
8751
8751
|
...e,
|
|
8752
8752
|
id: r,
|
|
@@ -8761,7 +8761,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
8761
8761
|
};
|
|
8762
8762
|
}
|
|
8763
8763
|
async moveItems(e, t) {
|
|
8764
|
-
if (typeof this._inner.moveItems != "function") throw new
|
|
8764
|
+
if (typeof this._inner.moveItems != "function") throw new h.G("Move items is not supported by inner storage", "MoveNotAllowed");
|
|
8765
8765
|
let r = t ? this.pathForId(t, !0) : this.rootPath, a = e.map((o) => ({
|
|
8766
8766
|
...o,
|
|
8767
8767
|
id: this.pathForId(o.id, o.isFolder ?? !1),
|
|
@@ -8813,7 +8813,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
8813
8813
|
};
|
|
8814
8814
|
}
|
|
8815
8815
|
async copyItems(e, t) {
|
|
8816
|
-
if (typeof this._inner.copyItems != "function") throw new
|
|
8816
|
+
if (typeof this._inner.copyItems != "function") throw new h.G("Copy items is not supported by inner storage", "CopyNotAllowed");
|
|
8817
8817
|
let r = t ? this.pathForId(t, !0) : this.rootPath, a = e.map((c) => ({
|
|
8818
8818
|
...c,
|
|
8819
8819
|
id: this.pathForId(c.id, c.isFolder ?? !1),
|
|
@@ -8822,24 +8822,24 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
8822
8822
|
if (i.detailed && i.detailed.length > 0) {
|
|
8823
8823
|
let c = new Map();
|
|
8824
8824
|
for (let u = 0; u < i.detailed.length; u++) {
|
|
8825
|
-
let n = i.detailed[u],
|
|
8826
|
-
|
|
8825
|
+
let n = i.detailed[u], m = n.requestId || (u < e.length ? e[u].id : void 0);
|
|
8826
|
+
m && c.set(m, n);
|
|
8827
8827
|
}
|
|
8828
8828
|
for (let u of e) {
|
|
8829
8829
|
let n = c.get(u.id) || (i.detailed.length === e.length ? i.detailed[e.indexOf(u)] : void 0);
|
|
8830
8830
|
if (n?.success && n.data?.id) {
|
|
8831
|
-
let
|
|
8831
|
+
let m = this._getOrGenerateId(n.data.id);
|
|
8832
8832
|
s.push({
|
|
8833
8833
|
requestId: u.id,
|
|
8834
8834
|
success: !0,
|
|
8835
8835
|
data: {
|
|
8836
8836
|
...n.data,
|
|
8837
|
-
id:
|
|
8837
|
+
id: m,
|
|
8838
8838
|
folderId: n.data.folderId ? this._getOrGenerateId(n.data.folderId) : t || this._getOrGenerateId(this.rootPath)
|
|
8839
8839
|
}
|
|
8840
8840
|
});
|
|
8841
8841
|
} else {
|
|
8842
|
-
let
|
|
8842
|
+
let m = n ? n.success ? n.data ? n.data.id ? {
|
|
8843
8843
|
message: "Unknown copy error",
|
|
8844
8844
|
code: "CopyNotAllowed"
|
|
8845
8845
|
} : {
|
|
@@ -8858,7 +8858,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
8858
8858
|
s.push({
|
|
8859
8859
|
requestId: u.id,
|
|
8860
8860
|
success: !1,
|
|
8861
|
-
error:
|
|
8861
|
+
error: m
|
|
8862
8862
|
});
|
|
8863
8863
|
}
|
|
8864
8864
|
}
|
|
@@ -8881,7 +8881,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
8881
8881
|
};
|
|
8882
8882
|
}
|
|
8883
8883
|
async deleteItems(e, t) {
|
|
8884
|
-
if (typeof this._inner.deleteItems != "function") throw new
|
|
8884
|
+
if (typeof this._inner.deleteItems != "function") throw new h.G("Delete items is not supported by inner storage", "DeleteNotAllowed");
|
|
8885
8885
|
let r = e.map((o) => ({
|
|
8886
8886
|
...o,
|
|
8887
8887
|
id: this.pathForId(o.id, o.isFolder ?? !1),
|
|
@@ -8899,8 +8899,8 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
8899
8899
|
let n = this.pathForId(c.id, c.isFolder ?? !1);
|
|
8900
8900
|
if (t.permanent) this.recursivelyRemoveMappings(c.id, n);
|
|
8901
8901
|
else if (this._updateIdMapping(c.id, this.trashPath + "/" + n + (c.isFolder ? "/" : "")), c.isFolder) {
|
|
8902
|
-
let
|
|
8903
|
-
this.remapCachedFolderContents(c.id,
|
|
8902
|
+
let m = this.pathForId(c.id, c.isFolder ?? !1);
|
|
8903
|
+
this.remapCachedFolderContents(c.id, m, this.trashPath + "/" + n + (c.isFolder ? "/" : ""));
|
|
8904
8904
|
}
|
|
8905
8905
|
i.push({
|
|
8906
8906
|
requestId: c.id,
|
|
@@ -8967,7 +8967,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
8967
8967
|
for (let s = 0; s < a.length; s++) this._idToPath.delete(a[s]), this._pathToId.delete(i[s]);
|
|
8968
8968
|
}
|
|
8969
8969
|
async copyItem(e, t) {
|
|
8970
|
-
if (typeof this._inner.copyItem != "function") throw new
|
|
8970
|
+
if (typeof this._inner.copyItem != "function") throw new h.G("Copy item is not supported by inner storage", "CopyNotAllowed");
|
|
8971
8971
|
let r = this.pathForId(e.id, e.isFolder ?? !1), a = t ? this.pathForId(t, !0) : this.rootPath, i = await this._inner.copyItem({
|
|
8972
8972
|
...e,
|
|
8973
8973
|
id: r,
|
|
@@ -8980,7 +8980,7 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
8980
8980
|
};
|
|
8981
8981
|
}
|
|
8982
8982
|
async updateFile(e, t) {
|
|
8983
|
-
if (typeof this._inner.updateFile != "function") throw new
|
|
8983
|
+
if (typeof this._inner.updateFile != "function") throw new h.G("Update file is not supported by inner storage", "UnsupportedOperation");
|
|
8984
8984
|
let r = this.pathForId(e.id, !1), { ...a } = await this._inner.updateFile({
|
|
8985
8985
|
...e,
|
|
8986
8986
|
id: r,
|
|
@@ -9002,11 +9002,11 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
9002
9002
|
folderId: this.pathForId(e.folderId ?? "", !0)
|
|
9003
9003
|
}, t);
|
|
9004
9004
|
let a = e.url || (typeof this.getUrl == "function" ? await this.getUrl(e) : void 0);
|
|
9005
|
-
if (!a) throw new
|
|
9005
|
+
if (!a) throw new h.G("Cannot get file data: no url and no inner.getFileData", "FileReadError");
|
|
9006
9006
|
return fetch(a, t?.forceReload ? { cache: "no-store" } : void 0).then((i) => i.blob());
|
|
9007
9007
|
}
|
|
9008
9008
|
async cleanTrash() {
|
|
9009
|
-
if (typeof this._inner.cleanTrash != "function") throw new
|
|
9009
|
+
if (typeof this._inner.cleanTrash != "function") throw new h.G("Clean trash is not supported by inner storage", "UnsupportedOperation");
|
|
9010
9010
|
return await this._inner.cleanTrash();
|
|
9011
9011
|
}
|
|
9012
9012
|
};
|
|
@@ -9019,8 +9019,8 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
9019
9019
|
var fi = (0, d.createContext)(null), Rs = (e) => e.includes("UPLOAD_IMAGE_") || e.includes("UPLOAD_BACKGROUND_"), Ls = ({ children: e }) => {
|
|
9020
9020
|
const t = fe.useDispatch(), r = fe.useSelector(gt.selectActiveModal), [a, i] = (0, d.useState)(null), s = (0, d.useRef)(null), o = (0, d.useCallback)((n) => {
|
|
9021
9021
|
s.current?.(n), s.current = null;
|
|
9022
|
-
}, []), c = (0, d.useCallback)((n) => (o(null), i(n), t(gt.openModal(n.entryModal)), new Promise((
|
|
9023
|
-
s.current =
|
|
9022
|
+
}, []), c = (0, d.useCallback)((n) => (o(null), i(n), t(gt.openModal(n.entryModal)), new Promise((m) => {
|
|
9023
|
+
s.current = m;
|
|
9024
9024
|
})), [t, o]);
|
|
9025
9025
|
(0, d.useEffect)(() => {
|
|
9026
9026
|
Rs(r) || (i(null), s.current && o(null));
|
|
@@ -9043,172 +9043,172 @@ ${a}}`, r.appendChild(document.createTextNode(a));
|
|
|
9043
9043
|
if (!e) throw new Error("useImagePicker must be used within ImagePickerProvider");
|
|
9044
9044
|
return e;
|
|
9045
9045
|
};
|
|
9046
|
-
Object.defineProperty(
|
|
9046
|
+
Object.defineProperty(he, "Di", {
|
|
9047
9047
|
enumerable: !0,
|
|
9048
9048
|
get: function() {
|
|
9049
9049
|
return ds;
|
|
9050
9050
|
}
|
|
9051
|
-
}), Object.defineProperty(
|
|
9051
|
+
}), Object.defineProperty(he, "Ea", {
|
|
9052
9052
|
enumerable: !0,
|
|
9053
9053
|
get: function() {
|
|
9054
9054
|
return Ps;
|
|
9055
9055
|
}
|
|
9056
|
-
}), Object.defineProperty(
|
|
9056
|
+
}), Object.defineProperty(he, "EmIcons", {
|
|
9057
9057
|
enumerable: !0,
|
|
9058
9058
|
get: function() {
|
|
9059
9059
|
return ct;
|
|
9060
9060
|
}
|
|
9061
|
-
}), Object.defineProperty(
|
|
9061
|
+
}), Object.defineProperty(he, "FEATURE_UPSELL_SLIDE", {
|
|
9062
9062
|
enumerable: !0,
|
|
9063
9063
|
get: function() {
|
|
9064
|
-
return
|
|
9064
|
+
return ha;
|
|
9065
9065
|
}
|
|
9066
|
-
}), Object.defineProperty(
|
|
9066
|
+
}), Object.defineProperty(he, "ImagePickerProvider", {
|
|
9067
9067
|
enumerable: !0,
|
|
9068
9068
|
get: function() {
|
|
9069
9069
|
return Ls;
|
|
9070
9070
|
}
|
|
9071
|
-
}), Object.defineProperty(
|
|
9071
|
+
}), Object.defineProperty(he, "LIMIT_TYPE_TO_USAGE_CARD_ICON", {
|
|
9072
9072
|
enumerable: !0,
|
|
9073
9073
|
get: function() {
|
|
9074
9074
|
return dr;
|
|
9075
9075
|
}
|
|
9076
|
-
}), Object.defineProperty(
|
|
9076
|
+
}), Object.defineProperty(he, "La", {
|
|
9077
9077
|
enumerable: !0,
|
|
9078
9078
|
get: function() {
|
|
9079
9079
|
return Ms;
|
|
9080
9080
|
}
|
|
9081
|
-
}), Object.defineProperty(
|
|
9081
|
+
}), Object.defineProperty(he, "LimitUpgradeModal", {
|
|
9082
9082
|
enumerable: !0,
|
|
9083
9083
|
get: function() {
|
|
9084
9084
|
return wa;
|
|
9085
9085
|
}
|
|
9086
|
-
}), Object.defineProperty(
|
|
9086
|
+
}), Object.defineProperty(he, "Mi", {
|
|
9087
9087
|
enumerable: !0,
|
|
9088
9088
|
get: function() {
|
|
9089
9089
|
return cs;
|
|
9090
9090
|
}
|
|
9091
|
-
}), Object.defineProperty(
|
|
9091
|
+
}), Object.defineProperty(he, "PlanUpgradePrompt", {
|
|
9092
9092
|
enumerable: !0,
|
|
9093
9093
|
get: function() {
|
|
9094
|
-
return
|
|
9094
|
+
return ma;
|
|
9095
9095
|
}
|
|
9096
|
-
}), Object.defineProperty(
|
|
9096
|
+
}), Object.defineProperty(he, "Qi", {
|
|
9097
9097
|
enumerable: !0,
|
|
9098
9098
|
get: function() {
|
|
9099
9099
|
return vs;
|
|
9100
9100
|
}
|
|
9101
|
-
}), Object.defineProperty(
|
|
9101
|
+
}), Object.defineProperty(he, "Yi", {
|
|
9102
9102
|
enumerable: !0,
|
|
9103
9103
|
get: function() {
|
|
9104
9104
|
return pt;
|
|
9105
9105
|
}
|
|
9106
|
-
}), Object.defineProperty(
|
|
9106
|
+
}), Object.defineProperty(he, "ea", {
|
|
9107
9107
|
enumerable: !0,
|
|
9108
9108
|
get: function() {
|
|
9109
9109
|
return Dt;
|
|
9110
9110
|
}
|
|
9111
|
-
}), Object.defineProperty(
|
|
9111
|
+
}), Object.defineProperty(he, "fireUploadImageEvent", {
|
|
9112
9112
|
enumerable: !0,
|
|
9113
9113
|
get: function() {
|
|
9114
9114
|
return Ea;
|
|
9115
9115
|
}
|
|
9116
|
-
}), Object.defineProperty(
|
|
9116
|
+
}), Object.defineProperty(he, "getLimitUpgradePresetDefinition", {
|
|
9117
9117
|
enumerable: !0,
|
|
9118
9118
|
get: function() {
|
|
9119
9119
|
return _a;
|
|
9120
9120
|
}
|
|
9121
|
-
}), Object.defineProperty(
|
|
9121
|
+
}), Object.defineProperty(he, "getMyProjectRole", {
|
|
9122
9122
|
enumerable: !0,
|
|
9123
9123
|
get: function() {
|
|
9124
9124
|
return rr;
|
|
9125
9125
|
}
|
|
9126
|
-
}), Object.defineProperty(
|
|
9126
|
+
}), Object.defineProperty(he, "isEditorLockedByPlan", {
|
|
9127
9127
|
enumerable: !0,
|
|
9128
9128
|
get: function() {
|
|
9129
9129
|
return St;
|
|
9130
9130
|
}
|
|
9131
|
-
}), Object.defineProperty(
|
|
9131
|
+
}), Object.defineProperty(he, "isLimitAbsentOnPlan", {
|
|
9132
9132
|
enumerable: !0,
|
|
9133
9133
|
get: function() {
|
|
9134
|
-
return
|
|
9134
|
+
return mr;
|
|
9135
9135
|
}
|
|
9136
|
-
}), Object.defineProperty(
|
|
9136
|
+
}), Object.defineProperty(he, "isLimitStatsBlockExhausted", {
|
|
9137
9137
|
enumerable: !0,
|
|
9138
9138
|
get: function() {
|
|
9139
9139
|
return ur;
|
|
9140
9140
|
}
|
|
9141
|
-
}), Object.defineProperty(
|
|
9141
|
+
}), Object.defineProperty(he, "pickFileProxyBlobFromFireResults", {
|
|
9142
9142
|
enumerable: !0,
|
|
9143
9143
|
get: function() {
|
|
9144
9144
|
return ka;
|
|
9145
9145
|
}
|
|
9146
|
-
}), Object.defineProperty(
|
|
9146
|
+
}), Object.defineProperty(he, "pickProxyUrlOverrideFromFireResults", {
|
|
9147
9147
|
enumerable: !0,
|
|
9148
9148
|
get: function() {
|
|
9149
9149
|
return ja;
|
|
9150
9150
|
}
|
|
9151
|
-
}), Object.defineProperty(
|
|
9151
|
+
}), Object.defineProperty(he, "presetLimitDisplay", {
|
|
9152
9152
|
enumerable: !0,
|
|
9153
9153
|
get: function() {
|
|
9154
9154
|
return ba;
|
|
9155
9155
|
}
|
|
9156
|
-
}), Object.defineProperty(
|
|
9156
|
+
}), Object.defineProperty(he, "resolveLimitActionPreflightExceeded", {
|
|
9157
9157
|
enumerable: !0,
|
|
9158
9158
|
get: function() {
|
|
9159
|
-
return
|
|
9159
|
+
return hr;
|
|
9160
9160
|
}
|
|
9161
|
-
}), Object.defineProperty(
|
|
9161
|
+
}), Object.defineProperty(he, "resolveLimitActionPreflightExceededForType", {
|
|
9162
9162
|
enumerable: !0,
|
|
9163
9163
|
get: function() {
|
|
9164
9164
|
return xa;
|
|
9165
9165
|
}
|
|
9166
|
-
}), Object.defineProperty(
|
|
9166
|
+
}), Object.defineProperty(he, "resolvePluginRouteEmailId", {
|
|
9167
9167
|
enumerable: !0,
|
|
9168
9168
|
get: function() {
|
|
9169
9169
|
return Xi;
|
|
9170
9170
|
}
|
|
9171
|
-
}), Object.defineProperty(
|
|
9171
|
+
}), Object.defineProperty(he, "sanitizeHtml", {
|
|
9172
9172
|
enumerable: !0,
|
|
9173
9173
|
get: function() {
|
|
9174
9174
|
return ar;
|
|
9175
9175
|
}
|
|
9176
|
-
}), Object.defineProperty(
|
|
9176
|
+
}), Object.defineProperty(he, "shouldFallbackToBuiltInUpload", {
|
|
9177
9177
|
enumerable: !0,
|
|
9178
9178
|
get: function() {
|
|
9179
9179
|
return Na;
|
|
9180
9180
|
}
|
|
9181
|
-
}), Object.defineProperty(
|
|
9181
|
+
}), Object.defineProperty(he, "toUploadImageError", {
|
|
9182
9182
|
enumerable: !0,
|
|
9183
9183
|
get: function() {
|
|
9184
9184
|
return Ta;
|
|
9185
9185
|
}
|
|
9186
|
-
}), Object.defineProperty(
|
|
9186
|
+
}), Object.defineProperty(he, "useCookieManager", {
|
|
9187
9187
|
enumerable: !0,
|
|
9188
9188
|
get: function() {
|
|
9189
9189
|
return ir;
|
|
9190
9190
|
}
|
|
9191
|
-
}), Object.defineProperty(
|
|
9191
|
+
}), Object.defineProperty(he, "useImagePicker", {
|
|
9192
9192
|
enumerable: !0,
|
|
9193
9193
|
get: function() {
|
|
9194
9194
|
return Os;
|
|
9195
9195
|
}
|
|
9196
|
-
}), Object.defineProperty(
|
|
9196
|
+
}), Object.defineProperty(he, "useOpenPlanCatalog", {
|
|
9197
9197
|
enumerable: !0,
|
|
9198
9198
|
get: function() {
|
|
9199
9199
|
return As;
|
|
9200
9200
|
}
|
|
9201
|
-
}), Object.defineProperty(
|
|
9201
|
+
}), Object.defineProperty(he, "usePlanFeatureGate", {
|
|
9202
9202
|
enumerable: !0,
|
|
9203
9203
|
get: function() {
|
|
9204
9204
|
return ya;
|
|
9205
9205
|
}
|
|
9206
|
-
}), Object.defineProperty(
|
|
9206
|
+
}), Object.defineProperty(he, "usePlanFeatureLocks", {
|
|
9207
9207
|
enumerable: !0,
|
|
9208
9208
|
get: function() {
|
|
9209
9209
|
return va;
|
|
9210
9210
|
}
|
|
9211
|
-
}), Object.defineProperty(
|
|
9211
|
+
}), Object.defineProperty(he, "useRouteEmailId", {
|
|
9212
9212
|
enumerable: !0,
|
|
9213
9213
|
get: function() {
|
|
9214
9214
|
return ea;
|