@fraczled/sdk 1.30.8 → 1.30.9
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.
|
@@ -10784,7 +10784,7 @@ endobj\r
|
|
|
10784
10784
|
var u = d.getContext("2d");
|
|
10785
10785
|
u.fillStyle = "#fff", u.fillRect(0, 0, d.width, d.height);
|
|
10786
10786
|
var m = { ignoreMouse: !0, ignoreAnimation: !0, ignoreDimensions: !0 }, g = this;
|
|
10787
|
-
return (cn.canvg ? Promise.resolve(cn.canvg) : import("./index.es-
|
|
10787
|
+
return (cn.canvg ? Promise.resolve(cn.canvg) : import("./index.es-Bdk3_1Mz.js")).catch(function(v) {
|
|
10788
10788
|
return Promise.reject(new Error("Could not load canvg: " + v));
|
|
10789
10789
|
}).then(function(v) {
|
|
10790
10790
|
return v.default ? v.default : v;
|
|
@@ -16914,7 +16914,7 @@ function Oc({
|
|
|
16914
16914
|
})
|
|
16915
16915
|
);
|
|
16916
16916
|
}
|
|
16917
|
-
var
|
|
16917
|
+
var ix = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
16918
16918
|
function py(e) {
|
|
16919
16919
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
16920
16920
|
}
|
|
@@ -20479,7 +20479,26 @@ const Xy = () => {
|
|
|
20479
20479
|
Ce && /* @__PURE__ */ a.createElement(Dh, { content: e.content, color: e.color || "#000000", backgroundColor: e.backgroundColor || "#ffffff" })
|
|
20480
20480
|
)
|
|
20481
20481
|
), tn);
|
|
20482
|
-
}
|
|
20482
|
+
};
|
|
20483
|
+
class rv extends a.Component {
|
|
20484
|
+
constructor() {
|
|
20485
|
+
super(...arguments), this.state = { hasError: !1 };
|
|
20486
|
+
}
|
|
20487
|
+
static getDerivedStateFromError() {
|
|
20488
|
+
return { hasError: !0 };
|
|
20489
|
+
}
|
|
20490
|
+
componentDidCatch(t) {
|
|
20491
|
+
const n = this.props.elementId || "unknown", r = this.props.elementType || "unknown";
|
|
20492
|
+
console.error(`[ElementRenderer] Failed to render element ${n} (${r})`, t);
|
|
20493
|
+
}
|
|
20494
|
+
render() {
|
|
20495
|
+
return this.state.hasError ? null : this.props.children;
|
|
20496
|
+
}
|
|
20497
|
+
}
|
|
20498
|
+
const av = (e) => {
|
|
20499
|
+
var t, n;
|
|
20500
|
+
return /* @__PURE__ */ a.createElement(rv, { elementId: (t = e.element) == null ? void 0 : t.id, elementType: (n = e.element) == null ? void 0 : n.type }, /* @__PURE__ */ a.createElement(nv, { ...e }));
|
|
20501
|
+
}, iv = 20, pl = 10, Fh = (e) => ({
|
|
20483
20502
|
...e,
|
|
20484
20503
|
anchors: e.anchors.map((t) => ({
|
|
20485
20504
|
...t,
|
|
@@ -20492,7 +20511,7 @@ const Xy = () => {
|
|
|
20492
20511
|
anchors: e.anchors.map(
|
|
20493
20512
|
(r) => r.id === t ? { ...r, ...n } : r
|
|
20494
20513
|
)
|
|
20495
|
-
}),
|
|
20514
|
+
}), sv = ({
|
|
20496
20515
|
zoom: e,
|
|
20497
20516
|
pageWidth: t,
|
|
20498
20517
|
pageHeight: n,
|
|
@@ -20679,7 +20698,7 @@ const Xy = () => {
|
|
|
20679
20698
|
}, be = (ge) => {
|
|
20680
20699
|
ge.stopPropagation(), ge.preventDefault();
|
|
20681
20700
|
const We = z(S(ge.clientX, ge.clientY));
|
|
20682
|
-
if (K(We), !g || g.closed || !Q ? R(!1) : R(Ti(We, Q.position) <=
|
|
20701
|
+
if (K(We), !g || g.closed || !Q ? R(!1) : R(Ti(We, Q.position) <= iv / A), !ye || !g || !$) return;
|
|
20683
20702
|
const Oe = g.anchors.find((Me) => Me.id === $);
|
|
20684
20703
|
if (Oe) {
|
|
20685
20704
|
if (ue) {
|
|
@@ -21028,7 +21047,7 @@ const Xy = () => {
|
|
|
21028
21047
|
return n.moveTo(e * r, 0), n.lineTo(e * (1 - r), 0), n.lineTo(e * (1 - r), t * r), n.lineTo(e, t * r), n.lineTo(e, t * (1 - r)), n.lineTo(e * (1 - r), t * (1 - r)), n.lineTo(e * (1 - r), t), n.lineTo(e * r, t), n.lineTo(e * r, t * (1 - r)), n.lineTo(0, t * (1 - r)), n.lineTo(0, t * r), n.lineTo(e * r, t * r), n.closePath(), n;
|
|
21029
21048
|
}
|
|
21030
21049
|
};
|
|
21031
|
-
class
|
|
21050
|
+
class ov {
|
|
21032
21051
|
constructor(t) {
|
|
21033
21052
|
this.canvas = document.createElement("canvas"), this.ctx = this.canvas.getContext("2d", { willReadFrequently: !0 }), this.colorMap = {
|
|
21034
21053
|
colorToId: /* @__PURE__ */ new Map(),
|
|
@@ -21165,8 +21184,8 @@ class iv {
|
|
|
21165
21184
|
return this.redraw(), this.canvas;
|
|
21166
21185
|
}
|
|
21167
21186
|
}
|
|
21168
|
-
function
|
|
21169
|
-
const { enabled: n = !0 } = t, r = qt(null), i = qt(e), s = St(() => (r.current || (r.current = new
|
|
21187
|
+
function lv(e, t = {}) {
|
|
21188
|
+
const { enabled: n = !0 } = t, r = qt(null), i = qt(e), s = St(() => (r.current || (r.current = new ov(i.current)), r.current), []);
|
|
21170
21189
|
Jt(() => () => {
|
|
21171
21190
|
r.current && (r.current.dispose(), r.current = null);
|
|
21172
21191
|
}, []);
|
|
@@ -21190,7 +21209,7 @@ function sv(e, t = {}) {
|
|
|
21190
21209
|
getDebugCanvas: g
|
|
21191
21210
|
};
|
|
21192
21211
|
}
|
|
21193
|
-
const
|
|
21212
|
+
const cv = {
|
|
21194
21213
|
maxWaitMs: 16,
|
|
21195
21214
|
// ~1 frame at 60fps
|
|
21196
21215
|
maxBatchSize: 50,
|
|
@@ -21198,7 +21217,7 @@ const ov = {
|
|
|
21198
21217
|
};
|
|
21199
21218
|
class Sf {
|
|
21200
21219
|
constructor(t) {
|
|
21201
|
-
this.config = { ...
|
|
21220
|
+
this.config = { ...cv, ...t }, this.pendingUpdates = /* @__PURE__ */ new Map(), this.dirtyRects = [], this.rafId = null, this.timeoutId = null, this.updateCallback = null, this.flushCallbacks = /* @__PURE__ */ new Set(), this.lastFlushTime = 0, this.updateCount = 0;
|
|
21202
21221
|
}
|
|
21203
21222
|
/**
|
|
21204
21223
|
* Set the callback that receives batched updates.
|
|
@@ -21350,12 +21369,12 @@ class Sf {
|
|
|
21350
21369
|
}
|
|
21351
21370
|
}
|
|
21352
21371
|
let jc = null;
|
|
21353
|
-
function
|
|
21372
|
+
function dv() {
|
|
21354
21373
|
return jc || (jc = new Sf()), jc;
|
|
21355
21374
|
}
|
|
21356
|
-
function
|
|
21375
|
+
function uv(e = {}) {
|
|
21357
21376
|
const { onUpdate: t, useGlobal: n = !0 } = e, r = qt(
|
|
21358
|
-
n ?
|
|
21377
|
+
n ? dv() : new Sf()
|
|
21359
21378
|
);
|
|
21360
21379
|
Jt(() => (t && r.current.setUpdateCallback(t), () => {
|
|
21361
21380
|
n || r.current.dispose();
|
|
@@ -21381,7 +21400,7 @@ function cv(e = {}) {
|
|
|
21381
21400
|
scheduler: r.current
|
|
21382
21401
|
};
|
|
21383
21402
|
}
|
|
21384
|
-
class
|
|
21403
|
+
class hv {
|
|
21385
21404
|
constructor() {
|
|
21386
21405
|
this._cache = /* @__PURE__ */ new Map(), this._activeOverlays = /* @__PURE__ */ new Set();
|
|
21387
21406
|
}
|
|
@@ -21523,13 +21542,13 @@ class dv {
|
|
|
21523
21542
|
return this._activeOverlays.has(t);
|
|
21524
21543
|
}
|
|
21525
21544
|
}
|
|
21526
|
-
const yi = new
|
|
21527
|
-
function
|
|
21545
|
+
const yi = new hv();
|
|
21546
|
+
function fv(e) {
|
|
21528
21547
|
var m;
|
|
21529
21548
|
const t = window.getComputedStyle(e), n = t.getPropertyValue("-webkit-text-stroke-width") !== "0px" || t.getPropertyValue("text-stroke-width") !== "0px", r = t.textShadow !== "none", i = t.boxShadow !== "none", s = t.filter !== "none", o = t.getPropertyValue("backdrop-filter") !== "none" || t.getPropertyValue("-webkit-backdrop-filter") !== "none", l = (m = t.filter) == null ? void 0 : m.includes("url("), d = t.getPropertyValue("mask") !== "none" || t.getPropertyValue("-webkit-mask") !== "none", u = t.clipPath !== "none";
|
|
21530
21549
|
return n || r || i || s || o || l || d || u;
|
|
21531
21550
|
}
|
|
21532
|
-
function
|
|
21551
|
+
function pv(e = {}) {
|
|
21533
21552
|
const {
|
|
21534
21553
|
enabled: t = typeof window < "u" && "ontouchstart" in window,
|
|
21535
21554
|
threshold: n = 5,
|
|
@@ -21543,7 +21562,7 @@ function hv(e = {}) {
|
|
|
21543
21562
|
i.current.activeIds = new Set(L), i.current.isCaching = !1, s.current = { x: x.clientX, y: x.clientY }, o.current = !1, l.current.clear();
|
|
21544
21563
|
const C = L.map(async (I) => {
|
|
21545
21564
|
const F = document.querySelector(`[data-element-id="${I}"]`);
|
|
21546
|
-
if (!F || !
|
|
21565
|
+
if (!F || !fv(F)) return;
|
|
21547
21566
|
await yi.createCache(I, F, { padding: r });
|
|
21548
21567
|
const $ = F.getBoundingClientRect();
|
|
21549
21568
|
l.current.set(I, {
|
|
@@ -21617,7 +21636,7 @@ const Rl = 10, as = (e, t, n) => Math.min(n, Math.max(t, e)), ml = (e, t) => {
|
|
|
21617
21636
|
}, Oh = (e) => {
|
|
21618
21637
|
const t = e == null ? void 0 : e.trim().toLowerCase();
|
|
21619
21638
|
return t ? t === "ellipse" ? "circle" : t : null;
|
|
21620
|
-
},
|
|
21639
|
+
}, mv = (e, t, n, r, i, s, o, l, d, u) => {
|
|
21621
21640
|
if (o <= 0 || l <= 0)
|
|
21622
21641
|
return e;
|
|
21623
21642
|
const m = e.x * o, g = e.y * l, v = e.width * o, p = e.height * l, L = m + v, x = g + p, C = m + v / 2, I = g + p / 2, F = Math.max(1, v), $ = Math.max(1, p), U = i / F, ue = s / $, se = n / U, ye = r / ue;
|
|
@@ -21639,7 +21658,7 @@ const Rl = 10, as = (e, t, n) => Math.min(n, Math.max(t, e)), ml = (e, t) => {
|
|
|
21639
21658
|
width: me / o,
|
|
21640
21659
|
height: j / l
|
|
21641
21660
|
};
|
|
21642
|
-
},
|
|
21661
|
+
}, gv = (e, t, n, r, i, s, o, l, d, u) => {
|
|
21643
21662
|
if (o <= 0 || l <= 0)
|
|
21644
21663
|
return e;
|
|
21645
21664
|
const m = e.width * o, g = e.height * l, v = i / Math.max(1, m), p = s / Math.max(1, g), L = o * v, x = l * p, C = -(e.x * o) * v, I = -(e.y * l) * p, F = C + L, $ = I + x, U = C + L / 2, ue = I + x / 2;
|
|
@@ -21663,7 +21682,7 @@ const Rl = 10, as = (e, t, n) => Math.min(n, Math.max(t, e)), ml = (e, t) => {
|
|
|
21663
21682
|
width: A,
|
|
21664
21683
|
height: _
|
|
21665
21684
|
});
|
|
21666
|
-
},
|
|
21685
|
+
}, bv = (e, t, n, r, i, s, o, l) => {
|
|
21667
21686
|
if (s <= 0 || o <= 0)
|
|
21668
21687
|
return e;
|
|
21669
21688
|
const d = e.width * s, u = e.height * o, m = r / Math.max(1, d), g = i / Math.max(1, u), v = -t / m, p = -n / g, L = e.x + v / s, x = e.y + p / o, C = -0.9, I = 1 - 0.1 * e.width, F = -0.9, $ = 1 - 0.1 * e.height;
|
|
@@ -21672,7 +21691,7 @@ const Rl = 10, as = (e, t, n) => Math.min(n, Math.max(t, e)), ml = (e, t) => {
|
|
|
21672
21691
|
x: as(L, C, I),
|
|
21673
21692
|
y: as(x, F, $)
|
|
21674
21693
|
};
|
|
21675
|
-
},
|
|
21694
|
+
}, yv = ({
|
|
21676
21695
|
pages: e,
|
|
21677
21696
|
activePageId: t,
|
|
21678
21697
|
zoom: n,
|
|
@@ -21704,14 +21723,14 @@ const Rl = 10, as = (e, t, n) => Math.min(n, Math.max(t, e)), ml = (e, t) => {
|
|
|
21704
21723
|
invalidate: R,
|
|
21705
21724
|
updateElements: te,
|
|
21706
21725
|
updateConfig: J
|
|
21707
|
-
} =
|
|
21726
|
+
} = lv({
|
|
21708
21727
|
width: j,
|
|
21709
21728
|
height: K,
|
|
21710
21729
|
scale: n / 100,
|
|
21711
21730
|
offsetX: 0,
|
|
21712
21731
|
offsetY: 0
|
|
21713
21732
|
});
|
|
21714
|
-
|
|
21733
|
+
uv({
|
|
21715
21734
|
onUpdate: St((W) => {
|
|
21716
21735
|
W.forEach((ve, ze) => {
|
|
21717
21736
|
u(ze, ve, !1);
|
|
@@ -21722,7 +21741,7 @@ const Rl = 10, as = (e, t, n) => Math.min(n, Math.max(t, e)), ml = (e, t) => {
|
|
|
21722
21741
|
onDragStart: T,
|
|
21723
21742
|
onDragMove: Y,
|
|
21724
21743
|
onDragEnd: le
|
|
21725
|
-
} =
|
|
21744
|
+
} = pv({ padding: 30 }), q = qt(e), ne = qt(t), A = qt(i), _ = qt(null), b = qt(null), k = qt(() => {
|
|
21726
21745
|
});
|
|
21727
21746
|
No(() => {
|
|
21728
21747
|
q.current = e, ne.current = t, A.current = i;
|
|
@@ -22565,7 +22584,7 @@ const Rl = 10, as = (e, t, n) => Math.min(n, Math.max(t, e)), ml = (e, t) => {
|
|
|
22565
22584
|
M,
|
|
22566
22585
|
E.naturalWidth ?? M.width,
|
|
22567
22586
|
E.naturalHeight ?? M.height
|
|
22568
|
-
), He = (E.rotation || 0) * (Math.PI / 180), Ie = Math.cos(He), lt = Math.sin(He), mt = xe * Ie + f * lt, ht = -xe * lt + f * Ie, $e = M.flipX ? -1 : 1, Gt = M.flipY ? -1 : 1, rt = mt * $e, zt = ht * Gt, Xt = E.naturalWidth ?? M.width, Cn = E.naturalHeight ?? M.height, ar =
|
|
22587
|
+
), He = (E.rotation || 0) * (Math.PI / 180), Ie = Math.cos(He), lt = Math.sin(He), mt = xe * Ie + f * lt, ht = -xe * lt + f * Ie, $e = M.flipX ? -1 : 1, Gt = M.flipY ? -1 : 1, rt = mt * $e, zt = ht * Gt, Xt = E.naturalWidth ?? M.width, Cn = E.naturalHeight ?? M.height, ar = bv(
|
|
22569
22588
|
Le,
|
|
22570
22589
|
rt,
|
|
22571
22590
|
zt,
|
|
@@ -22612,7 +22631,7 @@ const Rl = 10, as = (e, t, n) => Math.min(n, Math.max(t, e)), ml = (e, t) => {
|
|
|
22612
22631
|
const qi = (M.imageRotation ?? 0) * (Math.PI / 180), _i = Math.cos(qi), or = Math.sin(qi);
|
|
22613
22632
|
$a = ya * _i + Xr * or, Sa = -ya * or + Xr * _i;
|
|
22614
22633
|
}
|
|
22615
|
-
const fi = ra === "image" ?
|
|
22634
|
+
const fi = ra === "image" ? gv(
|
|
22616
22635
|
Fn,
|
|
22617
22636
|
Ge,
|
|
22618
22637
|
$a,
|
|
@@ -22623,7 +22642,7 @@ const Rl = 10, as = (e, t, n) => Math.min(n, Math.max(t, e)), ml = (e, t) => {
|
|
|
22623
22642
|
hi,
|
|
22624
22643
|
W.altKey,
|
|
22625
22644
|
na
|
|
22626
|
-
) :
|
|
22645
|
+
) : mv(
|
|
22627
22646
|
Fn,
|
|
22628
22647
|
Ge,
|
|
22629
22648
|
$a,
|
|
@@ -22863,7 +22882,7 @@ const Rl = 10, as = (e, t, n) => Math.min(n, Math.max(t, e)), ml = (e, t) => {
|
|
|
22863
22882
|
return /* @__PURE__ */ a.createElement("div", { "data-no-export": "true", key: lt, className: `absolute z-[60] pointer-events-none ${mt}`, style: { left: Ie.orientation === "vertical" ? Ie.position : Ie.start, top: Ie.orientation === "horizontal" ? Ie.position : Ie.start, width: Ie.orientation === "vertical" ? "1px" : Ie.end - Ie.start + "px", height: Ie.orientation === "horizontal" ? "1px" : Ie.end - Ie.start + "px" } });
|
|
22864
22883
|
}),
|
|
22865
22884
|
W.elements.map((Ie) => Ie.visible ? /* @__PURE__ */ a.createElement(
|
|
22866
|
-
|
|
22885
|
+
av,
|
|
22867
22886
|
{
|
|
22868
22887
|
key: Ie.id,
|
|
22869
22888
|
element: Ie,
|
|
@@ -22914,7 +22933,7 @@ const Rl = 10, as = (e, t, n) => Math.min(n, Math.max(t, e)), ml = (e, t) => {
|
|
|
22914
22933
|
)
|
|
22915
22934
|
),
|
|
22916
22935
|
ue === "pen" && t === W.id && /* @__PURE__ */ a.createElement(
|
|
22917
|
-
|
|
22936
|
+
sv,
|
|
22918
22937
|
{
|
|
22919
22938
|
zoom: n,
|
|
22920
22939
|
pageWidth: ze,
|
|
@@ -22931,7 +22950,7 @@ const Rl = 10, as = (e, t, n) => Math.min(n, Math.max(t, e)), ml = (e, t) => {
|
|
|
22931
22950
|
}),
|
|
22932
22951
|
/* @__PURE__ */ a.createElement("div", { className: "h-96 w-full flex-shrink-0" })
|
|
22933
22952
|
);
|
|
22934
|
-
},
|
|
22953
|
+
}, vv = ({
|
|
22935
22954
|
zoom: e,
|
|
22936
22955
|
setZoom: t,
|
|
22937
22956
|
pageCount: n,
|
|
@@ -22963,7 +22982,7 @@ const Rl = 10, as = (e, t, n) => Math.min(n, Math.max(t, e)), ml = (e, t) => {
|
|
|
22963
22982
|
className: "w-24 h-1 bg-slate-300 rounded-lg appearance-none cursor-pointer accent-slate-800"
|
|
22964
22983
|
}
|
|
22965
22984
|
), /* @__PURE__ */ a.createElement("span", { className: "w-9 text-right font-medium" }, e, "%"), /* @__PURE__ */ a.createElement("button", { onClick: () => t(Math.min(200, e + 10)), className: "p-0.5 hover:text-blue-600" }, /* @__PURE__ */ a.createElement(ki, { size: 12 }))), /* @__PURE__ */ a.createElement("div", { className: "h-4 w-px bg-gray-300 mx-1" }), /* @__PURE__ */ a.createElement("button", { className: "hover:text-blue-600 transition-colors", title: "Presentation Mode" }, /* @__PURE__ */ a.createElement(Q1, { size: 16 }))));
|
|
22966
|
-
},
|
|
22985
|
+
}, xv = [
|
|
22967
22986
|
{ name: "None", adjustments: { hue: 0, saturation: 0, brightness: 0, contrast: 0 }, stroke: { width: 0, color: "#000000", style: "none" } },
|
|
22968
22987
|
{ name: "Epic", adjustments: { hue: 0, saturation: 20, brightness: 10, contrast: 20 }, stroke: { width: 3, color: "#1a1a2e", style: "solid" } },
|
|
22969
22988
|
{ name: "Retro", adjustments: { hue: -10, saturation: -20, brightness: 0, contrast: 10 }, stroke: { width: 4, color: "#d4a574", style: "solid" } },
|
|
@@ -22976,7 +22995,7 @@ const Rl = 10, as = (e, t, n) => Math.min(n, Math.max(t, e)), ml = (e, t) => {
|
|
|
22976
22995
|
{ name: "Warm", adjustments: { hue: -15, saturation: 10, brightness: 5, contrast: 0 }, stroke: { width: 2, color: "#e07b53", style: "solid" } },
|
|
22977
22996
|
{ name: "Cool", adjustments: { hue: 15, saturation: 0, brightness: 5, contrast: 0 }, stroke: { width: 2, color: "#5b8fb9", style: "solid" } },
|
|
22978
22997
|
{ name: "Afterglow", adjustments: { hue: -10, saturation: 20, brightness: -10, contrast: 20 }, stroke: { width: 3, color: "#9b59b6", style: "solid" } }
|
|
22979
|
-
],
|
|
22998
|
+
], wv = ({ effect: e, onChange: t, onElementUpdate: n, onClose: r, position: i }) => {
|
|
22980
22999
|
const s = e.adjustments || { hue: 0, saturation: 0, brightness: 0, contrast: 0 }, o = (d) => s.hue === d.hue && s.saturation === d.saturation && s.brightness === d.brightness && s.contrast === d.contrast, l = (d) => {
|
|
22981
23000
|
t({
|
|
22982
23001
|
...e,
|
|
@@ -22994,7 +23013,7 @@ const Rl = 10, as = (e, t, n) => Math.min(n, Math.max(t, e)), ml = (e, t) => {
|
|
|
22994
23013
|
style: i ? { top: i.top, left: i.left } : void 0
|
|
22995
23014
|
},
|
|
22996
23015
|
/* @__PURE__ */ a.createElement("div", { className: "flex items-center justify-between px-4 py-3 border-b border-gray-100 bg-white sticky top-0 z-10" }, /* @__PURE__ */ a.createElement("h3", { className: "font-bold text-slate-800 text-sm" }, "Filters"), /* @__PURE__ */ a.createElement("button", { onClick: r, className: "text-slate-400 hover:bg-gray-100 rounded-full p-1 transition-colors" }, /* @__PURE__ */ a.createElement(da, { size: 18 }))),
|
|
22997
|
-
/* @__PURE__ */ a.createElement("div", { className: "flex-1 overflow-y-auto p-4 custom-scrollbar" }, /* @__PURE__ */ a.createElement("div", { className: "grid grid-cols-3 gap-3" },
|
|
23016
|
+
/* @__PURE__ */ a.createElement("div", { className: "flex-1 overflow-y-auto p-4 custom-scrollbar" }, /* @__PURE__ */ a.createElement("div", { className: "grid grid-cols-3 gap-3" }, xv.map((d) => {
|
|
22998
23017
|
const u = o(d.adjustments), { hue: m, saturation: g, brightness: v, contrast: p } = d.adjustments, L = `hue-rotate(${m}deg) saturate(${100 + g}%) brightness(${100 + v}%) contrast(${100 + p}%)`;
|
|
22999
23018
|
return /* @__PURE__ */ a.createElement(
|
|
23000
23019
|
"button",
|
|
@@ -23092,7 +23111,7 @@ const Rl = 10, as = (e, t, n) => Math.min(n, Math.max(t, e)), ml = (e, t) => {
|
|
|
23092
23111
|
}
|
|
23093
23112
|
)))
|
|
23094
23113
|
);
|
|
23095
|
-
},
|
|
23114
|
+
}, Ev = ({ element: e, onChange: t, onClose: n, position: r }) => {
|
|
23096
23115
|
const i = e.textStrokeWidth || 0, s = e.textStrokePosition || "behind", o = e.textStrokeStyle || "round";
|
|
23097
23116
|
return /* @__PURE__ */ a.createElement(
|
|
23098
23117
|
"div",
|
|
@@ -23149,7 +23168,7 @@ const Rl = 10, as = (e, t, n) => Math.min(n, Math.max(t, e)), ml = (e, t) => {
|
|
|
23149
23168
|
"Flat"
|
|
23150
23169
|
))))
|
|
23151
23170
|
);
|
|
23152
|
-
},
|
|
23171
|
+
}, kv = ({
|
|
23153
23172
|
selection: e,
|
|
23154
23173
|
elements: t,
|
|
23155
23174
|
updateElement: n,
|
|
@@ -23535,7 +23554,7 @@ const Rl = 10, as = (e, t, n) => Math.min(n, Math.max(t, e)), ml = (e, t) => {
|
|
|
23535
23554
|
},
|
|
23536
23555
|
/* @__PURE__ */ a.createElement(Lc, { size: 16, className: "rotate-90" })
|
|
23537
23556
|
), U && q && /* @__PURE__ */ a.createElement(
|
|
23538
|
-
|
|
23557
|
+
Ev,
|
|
23539
23558
|
{
|
|
23540
23559
|
element: D,
|
|
23541
23560
|
onChange: ae,
|
|
@@ -23680,7 +23699,7 @@ const Rl = 10, as = (e, t, n) => Math.min(n, Math.max(t, e)), ml = (e, t) => {
|
|
|
23680
23699
|
/* @__PURE__ */ a.createElement(d3, { size: 14 }),
|
|
23681
23700
|
/* @__PURE__ */ a.createElement("span", { className: "hidden sm:inline" }, "Filters")
|
|
23682
23701
|
), C && J && /* @__PURE__ */ a.createElement(
|
|
23683
|
-
|
|
23702
|
+
wv,
|
|
23684
23703
|
{
|
|
23685
23704
|
effect: D.effect,
|
|
23686
23705
|
onChange: Ze,
|
|
@@ -23831,7 +23850,7 @@ const Rl = 10, as = (e, t, n) => Math.min(n, Math.max(t, e)), ml = (e, t) => {
|
|
|
23831
23850
|
/* @__PURE__ */ a.createElement(Ga, { size: 16 })
|
|
23832
23851
|
), oe.length > 0 && /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement("div", { className: "h-4 w-px bg-gray-300 mx-2 hidden sm:block" }), /* @__PURE__ */ a.createElement("div", { className: "flex items-center gap-1" }, oe.map(P))))
|
|
23833
23852
|
);
|
|
23834
|
-
}, $c = 80,
|
|
23853
|
+
}, $c = 80, Nv = ({
|
|
23835
23854
|
pages: e,
|
|
23836
23855
|
activePageId: t,
|
|
23837
23856
|
setActivePage: n,
|
|
@@ -23930,7 +23949,7 @@ const Rl = 10, as = (e, t, n) => Math.min(n, Math.max(t, e)), ml = (e, t) => {
|
|
|
23930
23949
|
/* @__PURE__ */ a.createElement("div", { className: "w-10 h-10 rounded-full border border-gray-300 group-hover:border-indigo-300 flex items-center justify-center transition-colors" }, /* @__PURE__ */ a.createElement(ki, { size: 20 })),
|
|
23931
23950
|
/* @__PURE__ */ a.createElement("span", { className: "text-[10px] font-medium" }, "Add Page")
|
|
23932
23951
|
)));
|
|
23933
|
-
},
|
|
23952
|
+
}, Sv = ({ open: e, title: t, description: n, upgradeUrl: r, onClose: i }) => e ? /* @__PURE__ */ a.createElement("div", { className: "fixed inset-0 z-[200] flex items-center justify-center bg-black/40 px-4", "data-no-export": !0 }, /* @__PURE__ */ a.createElement("div", { className: "w-full max-w-md rounded-2xl bg-white shadow-2xl border border-slate-200 overflow-hidden" }, /* @__PURE__ */ a.createElement("div", { className: "flex items-center justify-between px-5 py-4 border-b border-slate-100" }, /* @__PURE__ */ a.createElement("div", { className: "flex items-center gap-3" }, /* @__PURE__ */ a.createElement("div", { className: "h-9 w-9 rounded-full bg-amber-50 text-amber-600 flex items-center justify-center" }, /* @__PURE__ */ a.createElement(xi, { size: 18 })), /* @__PURE__ */ a.createElement("div", null, /* @__PURE__ */ a.createElement("div", { className: "text-sm font-semibold text-slate-900" }, t), /* @__PURE__ */ a.createElement("div", { className: "text-xs text-slate-500" }, "Fraczled Pro"))), /* @__PURE__ */ a.createElement("button", { onClick: i, className: "p-1.5 rounded-full text-slate-400 hover:text-slate-600 hover:bg-slate-100" }, /* @__PURE__ */ a.createElement(da, { size: 18 }))), /* @__PURE__ */ a.createElement("div", { className: "px-5 py-4 text-sm text-slate-600" }, n), /* @__PURE__ */ a.createElement("div", { className: "px-5 pb-5 flex items-center justify-end gap-2" }, /* @__PURE__ */ a.createElement("button", { onClick: i, className: "px-4 py-2 text-sm font-medium text-slate-600 hover:text-slate-800" }, "Not now"), r ? /* @__PURE__ */ a.createElement(
|
|
23934
23953
|
"a",
|
|
23935
23954
|
{
|
|
23936
23955
|
href: r,
|
|
@@ -23939,21 +23958,21 @@ const Rl = 10, as = (e, t, n) => Math.min(n, Math.max(t, e)), ml = (e, t) => {
|
|
|
23939
23958
|
className: "px-4 py-2 rounded-lg bg-slate-900 text-white text-sm font-semibold hover:bg-slate-800"
|
|
23940
23959
|
},
|
|
23941
23960
|
"Upgrade"
|
|
23942
|
-
) : /* @__PURE__ */ a.createElement("button", { disabled: !0, className: "px-4 py-2 rounded-lg bg-slate-300 text-white text-sm font-semibold cursor-not-allowed" }, "Upgrade")))) : null,
|
|
23961
|
+
) : /* @__PURE__ */ a.createElement("button", { disabled: !0, className: "px-4 py-2 rounded-lg bg-slate-300 text-white text-sm font-semibold cursor-not-allowed" }, "Upgrade")))) : null, Cv = [
|
|
23943
23962
|
{ name: "Instagram Post", width: 1080, height: 1080, unit: "px", dpi: 72, icon: /* @__PURE__ */ a.createElement(Z1, { size: 20 }) },
|
|
23944
23963
|
{ name: "Instagram Story", width: 1080, height: 1920, unit: "px", dpi: 72, icon: /* @__PURE__ */ a.createElement(F4, { size: 20 }) },
|
|
23945
23964
|
{ name: "Facebook Post", width: 1200, height: 630, unit: "px", dpi: 72, icon: /* @__PURE__ */ a.createElement(vb, { size: 20 }) },
|
|
23946
23965
|
{ name: "Twitter Post", width: 1200, height: 675, unit: "px", dpi: 72, icon: /* @__PURE__ */ a.createElement(n3, { size: 20 }) },
|
|
23947
23966
|
{ name: "LinkedIn Banner", width: 1584, height: 396, unit: "px", dpi: 72, icon: /* @__PURE__ */ a.createElement(Q1, { size: 20 }) },
|
|
23948
23967
|
{ name: "YouTube Thumbnail", width: 1280, height: 720, unit: "px", dpi: 72, icon: /* @__PURE__ */ a.createElement(is, { size: 20 }) }
|
|
23949
|
-
],
|
|
23968
|
+
], Av = [
|
|
23950
23969
|
{ name: "Business Card", width: 3.5, height: 2, unit: "in", dpi: 300, bleed: 0.25, icon: /* @__PURE__ */ a.createElement(cb, { size: 20 }) },
|
|
23951
23970
|
{ name: "Postcard (4x6)", width: 6, height: 4, unit: "in", dpi: 300, bleed: 0.25, icon: /* @__PURE__ */ a.createElement(Bs, { size: 20 }) },
|
|
23952
23971
|
{ name: "Flyer (Letter)", width: 8.5, height: 11, unit: "in", dpi: 300, bleed: 0.25, icon: /* @__PURE__ */ a.createElement(Bs, { size: 20 }) },
|
|
23953
23972
|
{ name: "Poster (11x17)", width: 11, height: 17, unit: "in", dpi: 300, bleed: 0.25, icon: /* @__PURE__ */ a.createElement(Fd, { size: 20 }) },
|
|
23954
23973
|
{ name: "A4 Document", width: 210, height: 297, unit: "mm", dpi: 300, bleed: 6, icon: /* @__PURE__ */ a.createElement(Bs, { size: 20 }) },
|
|
23955
23974
|
{ name: "A5 Flyer", width: 148, height: 210, unit: "mm", dpi: 300, bleed: 6, icon: /* @__PURE__ */ a.createElement(Bs, { size: 20 }) }
|
|
23956
|
-
],
|
|
23975
|
+
], _v = ({
|
|
23957
23976
|
open: e,
|
|
23958
23977
|
onClose: t,
|
|
23959
23978
|
onSkipFuture: n,
|
|
@@ -23974,9 +23993,7 @@ const Rl = 10, as = (e, t, n) => Math.min(n, Math.max(t, e)), ml = (e, t) => {
|
|
|
23974
23993
|
return S && (z = z.filter(
|
|
23975
23994
|
(H) => H.name.toLowerCase().includes(S) || H.tags.some((ce) => ce.toLowerCase().includes(S))
|
|
23976
23995
|
)), z;
|
|
23977
|
-
}, [se, de, me]), J = me.length > 0
|
|
23978
|
-
if (!e) return null;
|
|
23979
|
-
const T = (w, S) => {
|
|
23996
|
+
}, [se, de, me]), J = me.length > 0, T = (w, S) => {
|
|
23980
23997
|
we.loadTemplate(w), ((S == null ? void 0 : S.transparentBackground) ?? U) && we.updateSettings({ backgroundColor: "transparent" }), ((S == null ? void 0 : S.skipFuture) ?? F) && n(), t();
|
|
23981
23998
|
}, Y = (w, S) => {
|
|
23982
23999
|
const z = cr(w.width, w.unit), H = cr(w.height, w.unit), ce = typeof w.bleed == "number" ? cr(w.bleed, w.unit) : 0, V = typeof w.dpi == "number" ? w.dpi : ce > 0 ? 300 : 72, D = typeof w.safeArea == "number" ? cr(w.safeArea, w.unit) : V >= 150 ? cr(0.25, "in") : 0, Q = ce > 0, oe = D > 0, P = (S == null ? void 0 : S.transparentBackground) ?? U;
|
|
@@ -24033,7 +24050,7 @@ const Rl = 10, as = (e, t, n) => Math.min(n, Math.max(t, e)), ml = (e, t) => {
|
|
|
24033
24050
|
var w;
|
|
24034
24051
|
return ne(
|
|
24035
24052
|
(w = i == null ? void 0 : i.sizePresets) == null ? void 0 : w.social,
|
|
24036
|
-
|
|
24053
|
+
Cv,
|
|
24037
24054
|
{ dpi: 72, icon: /* @__PURE__ */ a.createElement(is, { size: 20 }) }
|
|
24038
24055
|
);
|
|
24039
24056
|
},
|
|
@@ -24043,7 +24060,7 @@ const Rl = 10, as = (e, t, n) => Math.min(n, Math.max(t, e)), ml = (e, t) => {
|
|
|
24043
24060
|
var w;
|
|
24044
24061
|
return ne(
|
|
24045
24062
|
(w = i == null ? void 0 : i.sizePresets) == null ? void 0 : w.print,
|
|
24046
|
-
|
|
24063
|
+
Av,
|
|
24047
24064
|
{ dpi: 300, icon: /* @__PURE__ */ a.createElement(Bs, { size: 20 }) }
|
|
24048
24065
|
);
|
|
24049
24066
|
},
|
|
@@ -24076,6 +24093,7 @@ const Rl = 10, as = (e, t, n) => Math.min(n, Math.max(t, e)), ml = (e, t) => {
|
|
|
24076
24093
|
});
|
|
24077
24094
|
}
|
|
24078
24095
|
};
|
|
24096
|
+
if (!e) return null;
|
|
24079
24097
|
if (s && (i != null && i.render)) {
|
|
24080
24098
|
const w = i.render;
|
|
24081
24099
|
return /* @__PURE__ */ a.createElement(w, { ...k });
|
|
@@ -24235,18 +24253,18 @@ const Rl = 10, as = (e, t, n) => Math.min(n, Math.max(t, e)), ml = (e, t) => {
|
|
|
24235
24253
|
"Skip for now"
|
|
24236
24254
|
))));
|
|
24237
24255
|
};
|
|
24238
|
-
function
|
|
24256
|
+
function Lv(e, t, n, r = 8192, i = 67108864) {
|
|
24239
24257
|
const s = e * n, o = t * n, l = s * o;
|
|
24240
24258
|
return s > r || o > r || l > i;
|
|
24241
24259
|
}
|
|
24242
|
-
function
|
|
24260
|
+
function Pv(e, t, n) {
|
|
24243
24261
|
const r = e * t * n * n * 4;
|
|
24244
24262
|
return {
|
|
24245
24263
|
bytes: r,
|
|
24246
24264
|
mb: r / (1024 * 1024)
|
|
24247
24265
|
};
|
|
24248
24266
|
}
|
|
24249
|
-
const
|
|
24267
|
+
const Mv = {
|
|
24250
24268
|
format: "png",
|
|
24251
24269
|
quality: 1,
|
|
24252
24270
|
includeBleed: !1,
|
|
@@ -24255,14 +24273,14 @@ const Lv = {
|
|
|
24255
24273
|
};
|
|
24256
24274
|
class Cf {
|
|
24257
24275
|
constructor(t, n) {
|
|
24258
|
-
this.abortController = null, this.cache = t ?? vf(), this.config = { ...
|
|
24276
|
+
this.abortController = null, this.cache = t ?? vf(), this.config = { ...Mv, ...n };
|
|
24259
24277
|
}
|
|
24260
24278
|
/**
|
|
24261
24279
|
* Check if export should use tiled rendering.
|
|
24262
24280
|
*/
|
|
24263
24281
|
shouldUseTiling(t, n, r) {
|
|
24264
24282
|
const i = Eo() ? 4096 : 8192, s = Eo() ? 16777216 : 67108864;
|
|
24265
|
-
return
|
|
24283
|
+
return Lv(t, n, r, i, s);
|
|
24266
24284
|
}
|
|
24267
24285
|
/**
|
|
24268
24286
|
* Get safe pixel ratio for export dimensions.
|
|
@@ -24280,7 +24298,7 @@ class Cf {
|
|
|
24280
24298
|
* Estimate export memory requirements.
|
|
24281
24299
|
*/
|
|
24282
24300
|
estimateMemory(t, n, r) {
|
|
24283
|
-
return
|
|
24301
|
+
return Pv(t, n, r);
|
|
24284
24302
|
}
|
|
24285
24303
|
/**
|
|
24286
24304
|
* Pre-warm cache for elements that should be cached.
|
|
@@ -24400,12 +24418,12 @@ class Cf {
|
|
|
24400
24418
|
}
|
|
24401
24419
|
}
|
|
24402
24420
|
let qc = null;
|
|
24403
|
-
function
|
|
24421
|
+
function Iv() {
|
|
24404
24422
|
return qc || (qc = new Cf()), qc;
|
|
24405
24423
|
}
|
|
24406
|
-
function
|
|
24424
|
+
function Dv(e = {}) {
|
|
24407
24425
|
const { useGlobal: t = !0, ...n } = e, r = qt(
|
|
24408
|
-
t ?
|
|
24426
|
+
t ? Iv() : new Cf(void 0, n)
|
|
24409
24427
|
);
|
|
24410
24428
|
xf();
|
|
24411
24429
|
const [i, s] = De(null), [o, l] = De(!1), d = St(
|
|
@@ -24470,7 +24488,7 @@ const Uc = () => Math.random().toString(36).substring(2, 9), Bh = {
|
|
|
24470
24488
|
toolPen: ["p"],
|
|
24471
24489
|
toolHand: ["h"],
|
|
24472
24490
|
toolZoom: ["z"]
|
|
24473
|
-
},
|
|
24491
|
+
}, Fv = (e) => {
|
|
24474
24492
|
const t = e.toLowerCase();
|
|
24475
24493
|
return t === "+" ? "plus" : t === "=" ? "equals" : t === "esc" ? "escape" : t === "del" ? "delete" : t;
|
|
24476
24494
|
}, jh = (e) => {
|
|
@@ -24500,16 +24518,16 @@ const Uc = () => Math.random().toString(36).substring(2, 9), Bh = {
|
|
|
24500
24518
|
n.mod = !0;
|
|
24501
24519
|
return;
|
|
24502
24520
|
default:
|
|
24503
|
-
n.key =
|
|
24521
|
+
n.key = Fv(r);
|
|
24504
24522
|
}
|
|
24505
24523
|
}), n.key ? n : null;
|
|
24506
|
-
},
|
|
24524
|
+
}, Tv = (e) => {
|
|
24507
24525
|
const t = e.toLowerCase();
|
|
24508
24526
|
return t === " " ? "space" : t === "+" ? "plus" : t === "=" ? "equals" : t === "-" ? "minus" : t === "esc" ? "escape" : t === "del" ? "delete" : t;
|
|
24509
|
-
},
|
|
24510
|
-
const n =
|
|
24527
|
+
}, Rv = (e, t) => {
|
|
24528
|
+
const n = Tv(t.key), r = e.key === "plus" || e.key === "equals", i = t.ctrlKey || t.metaKey;
|
|
24511
24529
|
return e.mod && !i || !e.mod && (e.ctrl !== t.ctrlKey || e.meta !== t.metaKey) || e.alt !== t.altKey || !r && e.shift !== t.shiftKey || r && e.shift && !t.shiftKey ? !1 : e.key === n || e.key === "plus" && n === "equals" || e.key === "equals" && n === "plus";
|
|
24512
|
-
},
|
|
24530
|
+
}, Ov = ({
|
|
24513
24531
|
apiKey: e,
|
|
24514
24532
|
className: t,
|
|
24515
24533
|
showCredit: n,
|
|
@@ -24540,7 +24558,7 @@ const Uc = () => Math.random().toString(36).substring(2, 9), Bh = {
|
|
|
24540
24558
|
}, [X]);
|
|
24541
24559
|
const {
|
|
24542
24560
|
isExporting: me
|
|
24543
|
-
} =
|
|
24561
|
+
} = Dv(), j = we.canUndo(), K = we.canRedo(), O = $.entitlements.ai, R = $.entitlements.export.web, te = $.entitlements.export.print, J = $.showWatermark || n !== !1, T = $.showWatermark, Y = $.upgradeUrl, le = $.entitlements.features || {}, q = $.entitlements.limits || {}, A = $.isValid && le.topbarActions === !0 && (v == null ? void 0 : v.topbarMode) === "custom" ? "custom" : "default", _ = le.saveLoad !== !1, b = $.isValid && le.templateSave !== !1, k = $.isValid && le.newDesignModal === !0, w = $.isValid && le.templateSizes === !0, S = $.state ?? ($.isValid ? "valid" : "invalid"), z = S === "pending" ? "VALIDATING..." : S === "invalid" ? "INVALID LICENSE" : S === "offline" ? "OFFLINE" : $.plan ? $.plan.toUpperCase() : "FREE", [H, ce] = De(null), V = {
|
|
24544
24562
|
[Ct.TEMPLATES]: "Templates",
|
|
24545
24563
|
[Ct.DESIGN]: "Design",
|
|
24546
24564
|
[Ct.ELEMENTS]: "Elements",
|
|
@@ -24742,7 +24760,7 @@ const Uc = () => Math.random().toString(36).substring(2, 9), Bh = {
|
|
|
24742
24760
|
const Wt = Ve.target;
|
|
24743
24761
|
if (Wt && (Wt.tagName === "INPUT" || Wt.tagName === "TEXTAREA" || Wt.isContentEditable)) return;
|
|
24744
24762
|
for (const mn of wn)
|
|
24745
|
-
if (
|
|
24763
|
+
if (Rv(mn.parsed, Ve)) {
|
|
24746
24764
|
Ve.preventDefault(), mn.handler();
|
|
24747
24765
|
return;
|
|
24748
24766
|
}
|
|
@@ -25332,7 +25350,7 @@ const Uc = () => Math.random().toString(36).substring(2, 9), Bh = {
|
|
|
25332
25350
|
topbarMode: A
|
|
25333
25351
|
},
|
|
25334
25352
|
/* @__PURE__ */ a.createElement(
|
|
25335
|
-
|
|
25353
|
+
kv,
|
|
25336
25354
|
{
|
|
25337
25355
|
selection: C.selection,
|
|
25338
25356
|
elements: Hn,
|
|
@@ -25417,7 +25435,7 @@ const Uc = () => Math.random().toString(36).substring(2, 9), Bh = {
|
|
|
25417
25435
|
title: oe(Ce)
|
|
25418
25436
|
}
|
|
25419
25437
|
))), /* @__PURE__ */ a.createElement("div", { className: "flex-1 flex flex-col h-full overflow-hidden relative z-0" }, /* @__PURE__ */ a.createElement(
|
|
25420
|
-
|
|
25438
|
+
yv,
|
|
25421
25439
|
{
|
|
25422
25440
|
pages: C.pages,
|
|
25423
25441
|
activePageId: C.activePageId,
|
|
@@ -25453,7 +25471,7 @@ const Uc = () => Math.random().toString(36).substring(2, 9), Bh = {
|
|
|
25453
25471
|
showWatermark: T
|
|
25454
25472
|
}
|
|
25455
25473
|
), je && /* @__PURE__ */ a.createElement(
|
|
25456
|
-
|
|
25474
|
+
Nv,
|
|
25457
25475
|
{
|
|
25458
25476
|
pages: C.pages,
|
|
25459
25477
|
activePageId: C.activePageId,
|
|
@@ -25472,7 +25490,7 @@ const Uc = () => Math.random().toString(36).substring(2, 9), Bh = {
|
|
|
25472
25490
|
onClose: () => ge(!1)
|
|
25473
25491
|
}
|
|
25474
25492
|
), /* @__PURE__ */ a.createElement("div", { className: "hidden md:block" }, /* @__PURE__ */ a.createElement(
|
|
25475
|
-
|
|
25493
|
+
vv,
|
|
25476
25494
|
{
|
|
25477
25495
|
zoom: C.zoom,
|
|
25478
25496
|
setZoom: (Se) => we.setZoom(Se),
|
|
@@ -25495,7 +25513,7 @@ const Uc = () => Math.random().toString(36).substring(2, 9), Bh = {
|
|
|
25495
25513
|
onLoadJson: (Se) => we.loadJSON(Se)
|
|
25496
25514
|
}
|
|
25497
25515
|
), /* @__PURE__ */ a.createElement(
|
|
25498
|
-
|
|
25516
|
+
Sv,
|
|
25499
25517
|
{
|
|
25500
25518
|
open: !!H,
|
|
25501
25519
|
title: (H == null ? void 0 : H.title) || "",
|
|
@@ -25504,7 +25522,7 @@ const Uc = () => Math.random().toString(36).substring(2, 9), Bh = {
|
|
|
25504
25522
|
onClose: () => ce(null)
|
|
25505
25523
|
}
|
|
25506
25524
|
), /* @__PURE__ */ a.createElement(
|
|
25507
|
-
|
|
25525
|
+
_v,
|
|
25508
25526
|
{
|
|
25509
25527
|
open: We,
|
|
25510
25528
|
onClose: () => Oe(!1),
|
|
@@ -25536,7 +25554,7 @@ const Uc = () => Math.random().toString(36).substring(2, 9), Bh = {
|
|
|
25536
25554
|
},
|
|
25537
25555
|
"Cancel"
|
|
25538
25556
|
)))))));
|
|
25539
|
-
},
|
|
25557
|
+
}, zv = ({
|
|
25540
25558
|
store: e,
|
|
25541
25559
|
className: t,
|
|
25542
25560
|
apiKey: n,
|
|
@@ -25586,8 +25604,8 @@ const Uc = () => Math.random().toString(36).substring(2, 9), Bh = {
|
|
|
25586
25604
|
className: "inline-flex items-center justify-center rounded-lg bg-white/10 px-4 py-2 text-sm font-semibold text-white hover:bg-white/20 transition-colors"
|
|
25587
25605
|
},
|
|
25588
25606
|
"Manage License"
|
|
25589
|
-
))) : /* @__PURE__ */ a.createElement(L2, { store: e }, /* @__PURE__ */ a.createElement("div", { className: `our-editor-sdk ${t || ""}` }, /* @__PURE__ */ a.createElement(
|
|
25590
|
-
|
|
25607
|
+
))) : /* @__PURE__ */ a.createElement(L2, { store: e }, /* @__PURE__ */ a.createElement("div", { className: `our-editor-sdk ${t || ""}` }, /* @__PURE__ */ a.createElement(Bv, null, /* @__PURE__ */ a.createElement(
|
|
25608
|
+
Ov,
|
|
25591
25609
|
{
|
|
25592
25610
|
apiKey: n,
|
|
25593
25611
|
showCredit: C,
|
|
@@ -25605,8 +25623,30 @@ const Uc = () => Math.random().toString(36).substring(2, 9), Bh = {
|
|
|
25605
25623
|
getLicenseStatus: () => e.getLicenseStatus(),
|
|
25606
25624
|
subscribeLicense: (U) => e.subscribeLicense(U)
|
|
25607
25625
|
}
|
|
25608
|
-
)));
|
|
25609
|
-
}
|
|
25626
|
+
))));
|
|
25627
|
+
};
|
|
25628
|
+
class Bv extends a.Component {
|
|
25629
|
+
constructor() {
|
|
25630
|
+
super(...arguments), this.state = { hasError: !1 };
|
|
25631
|
+
}
|
|
25632
|
+
static getDerivedStateFromError() {
|
|
25633
|
+
return { hasError: !0 };
|
|
25634
|
+
}
|
|
25635
|
+
componentDidCatch(t, n) {
|
|
25636
|
+
console.error("[Editor] Render error", t), console.error("[Editor] Component stack:", n.componentStack);
|
|
25637
|
+
}
|
|
25638
|
+
render() {
|
|
25639
|
+
return this.state.hasError ? /* @__PURE__ */ a.createElement("div", { className: "fixed inset-0 bg-slate-950 text-white flex items-center justify-center p-6" }, /* @__PURE__ */ a.createElement("div", { className: "max-w-md text-center space-y-3" }, /* @__PURE__ */ a.createElement("div", { className: "text-lg font-semibold" }, "Editor failed to render"), /* @__PURE__ */ a.createElement("div", { className: "text-sm text-slate-300" }, "Check the console for the component stack to pinpoint the cause."), /* @__PURE__ */ a.createElement(
|
|
25640
|
+
"button",
|
|
25641
|
+
{
|
|
25642
|
+
onClick: () => window.location.reload(),
|
|
25643
|
+
className: "inline-flex items-center justify-center rounded-lg bg-white/10 px-4 py-2 text-sm font-semibold text-white hover:bg-white/20 transition-colors"
|
|
25644
|
+
},
|
|
25645
|
+
"Reload"
|
|
25646
|
+
))) : this.props.children;
|
|
25647
|
+
}
|
|
25648
|
+
}
|
|
25649
|
+
const jv = "https://cdn.tailwindcss.com", $v = "https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap", qv = ".our-editor-sdk { font-family: 'Inter', sans-serif; }", Uv = "fraczled-sdk-loader-styles", Hv = 3500, Wv = 220, Gv = "1.30.9", Yv = '<svg id="Layer_2" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 118.1846 24.1172"><defs><linearGradient id="linear-gradient" x1="109.7684" y1="15.3657" x2="116.6286" y2="22.226" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#99d1a7"/><stop offset="1" stop-color="#8fd4f0"/></linearGradient></defs><g id="Layer_1-2"><path d="M86.0219,13.5526c-.0564-.5503-.1717-1.0508-.3545-1.494-.2642-.6402-.6581-1.1357-1.1813-1.4864-.5236-.3506-1.1715-.5259-1.9438-.5259s-1.4254.1779-1.9588.5335c-.5336.3559-.9428.8385-1.2273,1.4482-.2133.4568-.3465.965-.3999,1.5245h7.0657Z" fill="none"/><path d="M29.4248,16.3577c-.315.0609-.6302.1143-.9452.16-.315.0458-.5997.0892-.8536.1296-.5591.0815-1.0468.211-1.4636.3888-.4168.1779-.7392.4168-.9679.7164-.2287.3-.3431.6735-.3431,1.1206,0,.6402.2337,1.1281.7013,1.4635.4674.3354,1.0671.5031,1.7988.5031.691,0,1.3036-.1396,1.837-.4193.5336-.2794.9502-.6555,1.2502-1.1281.2995-.4726.4497-1.0035.4497-1.5931v-1.8141c-.1426.0914-.3431.1779-.6023.2591-.259.0815-.5463.1525-.8613.2135Z" fill="none"/><path d="M100.9591,10.8924c-.5389-.4116-1.1891-.6173-1.9514-.6173-.7723,0-1.4228.2134-1.9512.6402-.5286.4268-.9299,1.0138-1.2044,1.7608-.2744.7469-.4116,1.6136-.4116,2.5992s.1371,1.8575.4116,2.6144c.2744.7573.6784,1.3492,1.212,1.7761s1.1815.6402,1.9436.6402,1.4102-.2108,1.9438-.6326c.5336-.4216.94-1.0085,1.2196-1.7608.2792-.752.4192-1.6312.4192-2.6373,0-1.0162-.1373-1.8979-.4116-2.645-.2744-.7469-.681-1.3262-1.2196-1.7379Z" fill="none"/><path d="M7.104,5.6101c0-.5793.1371-1.029.4116-1.3491s.7571-.4802,1.4483-.4802c.2947,0,.574.0255.8384.0762.2642.051.4929.1018.686.1525l.8233-3.5368c-.2847-.0812-.7294-.1803-1.3341-.2972-.6047-.1167-1.2728-.1754-2.0046-.1754-1.0671,0-2.0199.2034-2.8583.6098-.8386.4065-1.4993,1.0164-1.982,1.8294-.4828.8132-.7242,1.8346-.7242,3.0642v1.2348H0v3.5673h2.4086v13.4764h4.6955v-13.4764h3.3995v-3.5673h-3.3995v-1.1281Z" fill="#0f1925"/><path d="M33.3808,7.8891c-.676-.4624-1.4459-.8054-2.3096-1.029-.8639-.2234-1.7683-.3354-2.7135-.3354-1.362,0-2.5588.2058-3.5903.6175-1.0315.4116-1.8725.9961-2.523,1.7532-.3151.3668-.579.767-.7939,1.1993v-3.4175c-.2134-.061-.4549-.1041-.7242-.1296-.2692-.0253-.5258-.0381-.7697-.0381-.9452,0-1.7836.2721-2.5154.8156-.7318.5439-1.2554,1.3442-1.5702,2.401h-.1831v-2.988h-4.5581v17.0437h4.7107v-9.6347c0-.691.1548-1.3035.465-1.837.3098-.5335.7392-.9502,1.2881-1.2501.5489-.2996,1.1636-.4497,1.8446-.4497.3355,0,.6987.0228,1.0899.0686.2454.0287.4538.063.6332.1017-.091.2586-.1679.5265-.228.8054l4.3753.3506c.1624-.5691.4955-1.039.9986-1.4102.5031-.3708,1.1763-.5564,2.0199-.5564.8026,0,1.4254.1932,1.8675.5793.4421.3864.6631.9299.6631,1.6312v.0762c0,.3559-.1397.6277-.4192.8156-.2797.1882-.7191.3277-1.3188.4193-.5997.0914-1.3925.1829-2.378.2743-.8536.0815-1.6617.2237-2.424.4268-.7621.2035-1.4431.5031-2.0428.8995-.5997.3963-1.0723.9123-1.4178,1.5473-.3455.6353-.5182,1.4307-.5182,2.3858,0,1.1182.2439,2.0531.7318,2.8051.4876.7523,1.1608,1.3187,2.0199,1.6998.8587.3812,1.8267.5717,2.904.5717.8434,0,1.5854-.1143,2.2257-.343.6405-.2287,1.1891-.5436,1.6465-.9452.4573-.4013.8233-.8713,1.0976-1.4101h.1221v2.3781h4.4971v-11.4945c0-1.0061-.1982-1.8751-.5945-2.6068-.3963-.7318-.9326-1.3288-1.6083-1.7913ZM30.8884,17.6992c0,.5896-.1502,1.1205-.4497,1.5931-.3.4726-.7165.8487-1.2502,1.1281-.5334.2797-1.146.4193-1.837.4193-.7318,0-1.3315-.1677-1.7988-.5031-.4676-.3354-.7013-.8232-.7013-1.4635,0-.4471.1144-.8206.3431-1.1206.2287-.2996.5511-.5385.9679-.7164.4168-.1778.9044-.3073,1.4636-.3888.254-.0404.5387-.0838.8536-.1296.315-.0457.6302-.0991.9452-.16.315-.061.6023-.132.8613-.2135.2592-.0812.4597-.1676.6023-.2591v1.8141Z" fill="#0f1925"/><path d="M42.91,10.8009c.5434-.3911,1.1815-.5869,1.9133-.5869.5792,0,1.0873.117,1.5244.3506.4368.2339.7874.564,1.0518.9909.2642.4269.4368.9249.5184,1.494h4.4515c-.061-1.321-.417-2.4696-1.0673-3.4453-.6505-.9756-1.532-1.7326-2.6449-2.2714-1.1128-.5385-2.4114-.808-3.895-.808-1.728,0-3.2166.3711-4.4668,1.1129-1.2499.7419-2.213,1.7736-2.8888,3.0947-.676,1.3212-1.0139,2.856-1.0139,4.6039,0,1.7279.3355,3.2497,1.0062,4.5658.6708,1.3162,1.6312,2.3476,2.8812,3.0947,1.2502.7469,2.744,1.1205,4.4821,1.1205,1.5244,0,2.8404-.2771,3.9484-.8309,1.1076-.5538,1.9765-1.3262,2.6067-2.3172.6302-.9909.9807-2.1366,1.052-3.4377h-4.4515c-.1321.9048-.4778,1.6136-1.0365,2.1267-.5591.5134-1.2452.7698-2.058.7698-.7318,0-1.3698-.2032-1.9133-.6097-.5439-.4064-.9657-.996-1.2654-1.7684-.2997-.7722-.4497-1.6972-.4497-2.7746s.15-1.9945.4497-2.7517c.2997-.757.7215-1.3313,1.2654-1.7227Z" fill="#0f1925"/><polygon points="59.2611 19.8792 67.0815 9.8328 67.0815 6.7381 53.3462 6.7381 53.3462 10.5188 61.4107 10.5188 61.4107 10.6408 53.0718 20.9616 53.0718 23.7818 67.3714 23.7818 67.3714 20.0011 59.2611 20.0011 59.2611 19.8792" fill="#0f1925"/><rect x="68.7445" y="1.0672" width="4.7105" height="22.7147" fill="#0f1925"/><path d="M88.2286,8.6818c-.7318-.7164-1.5854-1.2551-2.5612-1.6158-.9755-.3607-2.0275-.5413-3.1556-.5413-1.667,0-3.1175.3711-4.3524,1.1129-1.2349.7419-2.1901,1.7736-2.8659,3.0947-.6762,1.3212-1.0139,2.856-1.0139,4.6039,0,1.7988.3377,3.3564,1.0139,4.6725.6758,1.3163,1.6486,2.3301,2.9193,3.0413,1.2702.7115,2.7796,1.0672,4.5276,1.0672,1.4025,0,2.6374-.216,3.7045-.6479s1.9386-1.0366,2.6146-1.8141c.6758-.7776,1.1205-1.6896,1.3339-2.7365l-4.36-.2896c-.1524.4168-.3839.7724-.6936,1.0672-.3102.2948-.6784.5183-1.1052.6708-.4268.1524-.9047.2287-1.4331.2287-.7623,0-1.4357-.1754-2.0199-.526-.5846-.3506-1.0394-.8536-1.3644-1.5092-.2927-.5895-.4523-1.2887-.4817-2.0961h11.6103v-1.2806c0-1.4532-.2034-2.7212-.6097-3.8036-.4065-1.0824-.9757-1.9818-1.7075-2.6984ZM80.5835,10.5799c.5334-.3556,1.1863-.5335,1.9588-.5335s1.4202.1753,1.9438.5259c.5232.3506.9171.8461,1.1813,1.4864.1829.4431.2982.9437.3545,1.494h-7.0657c.0534-.5595.1867-1.0677.3999-1.5245.2845-.6097.6936-1.0923,1.2273-1.4482Z" fill="#0f1925"/><path d="M102.4835,1.0672v8.5522h-.1371c-.2034-.4673-.5031-.9399-.8994-1.4177-.3963-.4776-.9147-.8766-1.5549-1.1968-.6405-.3201-1.4383-.4802-2.3935-.4802-1.2401,0-2.3835.3228-3.4301.9681-1.047.6455-1.8854,1.6186-2.5154,2.9193-.6302,1.3011-.9452,2.927-.9452,4.8784,0,1.8903.305,3.4887.9147,4.7944.6097,1.3061,1.4381,2.2943,2.4849,2.9651,1.0468.6709,2.2204,1.0062,3.5216,1.0062.9147,0,1.6894-.1525,2.3249-.4573.635-.305,1.156-.6884,1.5625-1.151.4063-.4624.7165-.9273.9299-1.3949h.2134v2.7288h4.6497V1.0672h-4.726ZM102.1711,17.9126c-.2797.7523-.686,1.3392-1.2196,1.7608-.5336.4218-1.1815.6326-1.9438.6326s-1.41-.2134-1.9436-.6402-.9376-1.0188-1.212-1.7761c-.2744-.757-.4116-1.6285-.4116-2.6144s.1371-1.8523.4116-2.5992c.2744-.747.6758-1.334,1.2044-1.7608.5284-.4268,1.1789-.6402,1.9512-.6402.7623,0,1.4126.2058,1.9514.6173.5387.4117.9452.991,1.2196,1.7379.2742.747.4116,1.6288.4116,2.645,0,1.0061-.1399,1.8854-.4192,2.6373Z" fill="#0f1925"/><circle cx="113.1907" cy="18.7881" r="4.9939" fill="url(#linear-gradient)"/></g></svg>', Vv = `
|
|
25610
25650
|
.fraczled-sdk-root {
|
|
25611
25651
|
width: 100%;
|
|
25612
25652
|
height: 100%;
|
|
@@ -25663,7 +25703,7 @@ const Uc = () => Math.random().toString(36).substring(2, 9), Bh = {
|
|
|
25663
25703
|
e.setAttribute("data-fraczled-loaded", "true"), e.removeEventListener("load", n), e.removeEventListener("error", n), t();
|
|
25664
25704
|
};
|
|
25665
25705
|
e.addEventListener("load", n), e.addEventListener("error", n);
|
|
25666
|
-
}),
|
|
25706
|
+
}), Xv = (e, t) => {
|
|
25667
25707
|
if (typeof document > "u") return Promise.resolve();
|
|
25668
25708
|
const n = document.getElementById(e);
|
|
25669
25709
|
if (n) return Gs(n);
|
|
@@ -25673,7 +25713,7 @@ const Uc = () => Math.random().toString(36).substring(2, 9), Bh = {
|
|
|
25673
25713
|
i.id = e, i.src = t, i.async = !0;
|
|
25674
25714
|
const s = Gs(i);
|
|
25675
25715
|
return document.head.appendChild(i), s;
|
|
25676
|
-
},
|
|
25716
|
+
}, Kv = (e, t) => {
|
|
25677
25717
|
if (typeof document > "u") return Promise.resolve();
|
|
25678
25718
|
const n = document.getElementById(e);
|
|
25679
25719
|
if (n) return Gs(n);
|
|
@@ -25687,12 +25727,12 @@ const Uc = () => Math.random().toString(36).substring(2, 9), Bh = {
|
|
|
25687
25727
|
if (typeof document > "u" || document.getElementById(e)) return;
|
|
25688
25728
|
const n = document.createElement("style");
|
|
25689
25729
|
n.id = e, n.textContent = t, document.head.appendChild(n);
|
|
25690
|
-
},
|
|
25730
|
+
}, Zv = (e) => {
|
|
25691
25731
|
if (typeof document > "u") return Promise.resolve();
|
|
25692
|
-
const t = (e == null ? void 0 : e.injectTailwind) !== !1, n = (e == null ? void 0 : e.injectFont) !== !1, r = (e == null ? void 0 : e.injectBaseStyles) !== !1, i = (e == null ? void 0 : e.tailwindCdnUrl) ||
|
|
25693
|
-
return t && o.push(
|
|
25732
|
+
const t = (e == null ? void 0 : e.injectTailwind) !== !1, n = (e == null ? void 0 : e.injectFont) !== !1, r = (e == null ? void 0 : e.injectBaseStyles) !== !1, i = (e == null ? void 0 : e.tailwindCdnUrl) || jv, s = (e == null ? void 0 : e.fontHref) || $v, o = [];
|
|
25733
|
+
return t && o.push(Xv("fraczled-sdk-tailwind", i)), n && o.push(Kv("fraczled-sdk-font", s)), r && Af("fraczled-sdk-base-styles", qv), o.length ? Promise.all(o).then(() => {
|
|
25694
25734
|
}) : Promise.resolve();
|
|
25695
|
-
},
|
|
25735
|
+
}, Jv = (e, t) => {
|
|
25696
25736
|
const n = document.createElement("div");
|
|
25697
25737
|
n.className = "fraczled-sdk-root", n.style.width = "100%", n.style.height = "100%", e.appendChild(n);
|
|
25698
25738
|
const r = e.style.position;
|
|
@@ -25702,19 +25742,19 @@ const Uc = () => Math.random().toString(36).substring(2, 9), Bh = {
|
|
|
25702
25742
|
(!d || d === "static") && (e.style.position = "relative", i = !0);
|
|
25703
25743
|
}
|
|
25704
25744
|
let s = null;
|
|
25705
|
-
return t ? (Af(
|
|
25745
|
+
return t ? (Af(Uv, Vv), s = document.createElement("div"), s.className = "fraczled-sdk-loader", s.setAttribute("role", "status"), s.setAttribute("aria-live", "polite"), s.innerHTML = `
|
|
25706
25746
|
<div class="fraczled-sdk-loader__content">
|
|
25707
|
-
<div class="fraczled-sdk-loader__logo fraczled-sdk-loader__pulse">${
|
|
25747
|
+
<div class="fraczled-sdk-loader__logo fraczled-sdk-loader__pulse">${Yv}</div>
|
|
25708
25748
|
<div class="fraczled-sdk-loader__text">Loading editor</div>
|
|
25709
25749
|
</div>
|
|
25710
25750
|
`.trim(), e.appendChild(s)) : n.classList.add("fraczled-sdk-root--ready"), { mount: n, reveal: () => {
|
|
25711
25751
|
!t || !s || (n.classList.add("fraczled-sdk-root--ready"), s.classList.add("fraczled-sdk-loader--hide"), window.setTimeout(() => {
|
|
25712
25752
|
s && s.parentNode && s.remove();
|
|
25713
|
-
},
|
|
25753
|
+
}, Wv));
|
|
25714
25754
|
}, cleanup: () => {
|
|
25715
25755
|
s && s.parentNode && s.remove(), n.parentNode && n.remove(), i && (e.style.position = r);
|
|
25716
25756
|
} };
|
|
25717
|
-
},
|
|
25757
|
+
}, Qv = ({
|
|
25718
25758
|
store: e,
|
|
25719
25759
|
className: t,
|
|
25720
25760
|
apiKey: n,
|
|
@@ -25733,7 +25773,7 @@ const Uc = () => Math.random().toString(36).substring(2, 9), Bh = {
|
|
|
25733
25773
|
onReady: x
|
|
25734
25774
|
}) => (a.useEffect(() => {
|
|
25735
25775
|
x();
|
|
25736
|
-
}, []), a.createElement(
|
|
25776
|
+
}, []), a.createElement(zv, {
|
|
25737
25777
|
store: e,
|
|
25738
25778
|
className: t,
|
|
25739
25779
|
apiKey: n,
|
|
@@ -25750,19 +25790,19 @@ const Uc = () => Math.random().toString(36).substring(2, 9), Bh = {
|
|
|
25750
25790
|
ui: p,
|
|
25751
25791
|
sdkVersion: L
|
|
25752
25792
|
}));
|
|
25753
|
-
function
|
|
25793
|
+
function ex(e) {
|
|
25754
25794
|
var u, m, g;
|
|
25755
25795
|
if (Hh(Uh(e, { source: "embed" }), {
|
|
25756
25796
|
throwOnError: !0,
|
|
25757
25797
|
prefix: "[Fraczled SDK]"
|
|
25758
25798
|
}), !e.container) throw new Error("Container required");
|
|
25759
|
-
const t = ((u = e.assets) == null ? void 0 : u.showLoader) !== !1, n =
|
|
25799
|
+
const t = ((u = e.assets) == null ? void 0 : u.showLoader) !== !1, n = Jv(e.container, t), r = Zv(e.assets);
|
|
25760
25800
|
(m = e.services) != null && m.unsplashProxyBaseUrl && C3(e.services.unsplashProxyBaseUrl);
|
|
25761
25801
|
const i = Wh(e), s = p2.createRoot(n.mount), o = t ? new Promise((v) => {
|
|
25762
25802
|
let p = !1;
|
|
25763
25803
|
const L = window.setTimeout(() => {
|
|
25764
25804
|
p || (p = !0, v());
|
|
25765
|
-
},
|
|
25805
|
+
}, Hv);
|
|
25766
25806
|
r.then(() => {
|
|
25767
25807
|
p || (p = !0, window.clearTimeout(L), v());
|
|
25768
25808
|
});
|
|
@@ -25773,7 +25813,7 @@ function Zv(e) {
|
|
|
25773
25813
|
l || (l = !0, n.reveal());
|
|
25774
25814
|
});
|
|
25775
25815
|
};
|
|
25776
|
-
return s.render(a.createElement(
|
|
25816
|
+
return s.render(a.createElement(Qv, {
|
|
25777
25817
|
store: i,
|
|
25778
25818
|
className: e.className,
|
|
25779
25819
|
apiKey: (g = e.services) == null ? void 0 : g.geminiApiKey,
|
|
@@ -25788,7 +25828,7 @@ function Zv(e) {
|
|
|
25788
25828
|
customElementTypes: e.customElementTypes,
|
|
25789
25829
|
theme: e.theme,
|
|
25790
25830
|
ui: e.ui,
|
|
25791
|
-
sdkVersion:
|
|
25831
|
+
sdkVersion: Gv,
|
|
25792
25832
|
onReady: d
|
|
25793
25833
|
})), {
|
|
25794
25834
|
store: i,
|
|
@@ -25799,13 +25839,13 @@ function Zv(e) {
|
|
|
25799
25839
|
}
|
|
25800
25840
|
};
|
|
25801
25841
|
}
|
|
25802
|
-
const
|
|
25842
|
+
const sx = ex;
|
|
25803
25843
|
export {
|
|
25804
25844
|
A2 as S,
|
|
25805
25845
|
Un as _,
|
|
25806
|
-
|
|
25807
|
-
|
|
25808
|
-
|
|
25846
|
+
ex as a,
|
|
25847
|
+
sx as b,
|
|
25848
|
+
ix as c,
|
|
25809
25849
|
Wh as d,
|
|
25810
25850
|
py as g
|
|
25811
25851
|
};
|