@chili-publish/studio-sdk 1.34.0 → 1.35.0
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/_bundles/main.es.js +825 -711
- package/_bundles/main.es.js.map +1 -1
- package/_bundles/main.js +66 -18
- package/_bundles/main.js.map +1 -1
- package/connector-types/src/Common.d.ts +7 -0
- package/connector-types/src/Common.js +9 -0
- package/connector-types/src/Common.js.map +1 -0
- package/connector-types/src/ComponentConnector.d.ts +28 -0
- package/connector-types/src/ComponentConnector.js +3 -0
- package/connector-types/src/ComponentConnector.js.map +1 -0
- package/connector-types/src/index.d.ts +2 -0
- package/connector-types/src/index.js +2 -0
- package/connector-types/src/index.js.map +1 -1
- package/lib/editor-engine.json +1 -1
- package/lib/package.json +1 -1
- package/lib/src/controllers/BarcodeController.d.ts +17 -17
- package/lib/src/controllers/BarcodeController.js +17 -17
- package/lib/src/controllers/ComponentConnectorController.d.ts +64 -0
- package/lib/src/controllers/ComponentConnectorController.js +123 -0
- package/lib/src/controllers/ComponentConnectorController.js.map +1 -0
- package/lib/src/controllers/ComponentController.d.ts +28 -0
- package/lib/src/controllers/ComponentController.js +63 -0
- package/lib/src/controllers/ComponentController.js.map +1 -0
- package/lib/src/controllers/FrameController.d.ts +21 -3
- package/lib/src/controllers/FrameController.js +32 -3
- package/lib/src/controllers/FrameController.js.map +1 -1
- package/lib/src/controllers/LayoutController.d.ts +1 -1
- package/lib/src/controllers/LayoutController.js.map +1 -1
- package/lib/src/controllers/SubscriberController.js.map +1 -1
- package/lib/src/controllers/UtilsController.d.ts +1 -1
- package/lib/src/controllers/UtilsController.js.map +1 -1
- package/lib/src/index.d.ts +4 -3
- package/lib/src/index.js +4 -3
- package/lib/src/index.js.map +1 -1
- package/lib/src/interactions/Connector.d.ts +1 -1
- package/lib/src/interactions/Connector.js +97 -19
- package/lib/src/interactions/Connector.js.map +1 -1
- package/lib/src/next/types/ConnectorTypes.d.ts +5 -1
- package/lib/src/next/types/ConnectorTypes.js +4 -0
- package/lib/src/next/types/ConnectorTypes.js.map +1 -1
- package/lib/src/sdk.d.ts +8 -1
- package/lib/src/sdk.js +10 -1
- package/lib/src/sdk.js.map +1 -1
- package/lib/src/tests/controllers/ComponentConnectorController.test.js +73 -0
- package/lib/src/tests/controllers/ComponentConnectorController.test.js.map +1 -0
- package/lib/src/tests/controllers/ComponentController.test.js +52 -0
- package/lib/src/tests/controllers/ComponentController.test.js.map +1 -0
- package/lib/src/tests/controllers/FrameConstraintController.test.js +32 -8
- package/lib/src/tests/controllers/FrameConstraintController.test.js.map +1 -1
- package/lib/src/tests/controllers/FrameController.test.js +8 -1
- package/lib/src/tests/controllers/FrameController.test.js.map +1 -1
- package/lib/src/tests/controllers/LayoutController.test.js +1 -1
- package/lib/src/tests/controllers/LayoutController.test.js.map +1 -1
- package/lib/src/tests/controllers/UtilsController.test.js +1 -1
- package/lib/src/tests/controllers/UtilsController.test.js.map +1 -1
- package/lib/src/types/CommonTypes.d.ts +5 -0
- package/lib/src/types/CommonTypes.js.map +1 -1
- package/lib/src/types/ComponentConnectorTypes.d.ts +9 -0
- package/lib/src/types/ComponentConnectorTypes.js +10 -0
- package/lib/src/types/ComponentConnectorTypes.js.map +1 -0
- package/lib/src/types/ConfigurationTypes.d.ts +2 -2
- package/lib/src/types/ConfigurationTypes.js +2 -2
- package/lib/src/types/ConfigurationTypes.js.map +1 -1
- package/lib/src/types/ConnectorTypes.d.ts +5 -1
- package/lib/src/types/ConnectorTypes.js +4 -0
- package/lib/src/types/ConnectorTypes.js.map +1 -1
- package/lib/src/types/FrameTypes.d.ts +35 -16
- package/lib/src/types/FrameTypes.js +5 -0
- package/lib/src/types/FrameTypes.js.map +1 -1
- package/lib/src/types/LayoutTypes.d.ts +2 -7
- package/lib/src/types/LayoutTypes.js +1 -8
- package/lib/src/types/LayoutTypes.js.map +1 -1
- package/package.json +1 -1
package/_bundles/main.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Me = (s) => {
|
|
2
2
|
throw TypeError(s);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var a = (s, o, t) => (
|
|
6
|
-
const
|
|
7
|
-
current:
|
|
8
|
-
},
|
|
9
|
-
version:
|
|
4
|
+
var xe = (s, o, t) => o.has(s) || Me("Cannot " + t);
|
|
5
|
+
var a = (s, o, t) => (xe(s, o, "read from private field"), t ? t.call(s) : o.get(s)), u = (s, o, t) => o.has(s) ? Me("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(s) : o.set(s, t), g = (s, o, t, e) => (xe(s, o, "write to private field"), e ? e.call(s, t) : o.set(s, t), t);
|
|
6
|
+
const Ms = "2.18.latest", Ss = {
|
|
7
|
+
current: Ms
|
|
8
|
+
}, xs = "1.35.0", bs = {
|
|
9
|
+
version: xs
|
|
10
10
|
};
|
|
11
11
|
var z;
|
|
12
12
|
(function(s) {
|
|
@@ -16,19 +16,19 @@ var ut;
|
|
|
16
16
|
(function(s) {
|
|
17
17
|
s.Fulfilled = "fulfilled", s.Rejected = "rejected";
|
|
18
18
|
})(ut || (ut = {}));
|
|
19
|
-
var
|
|
19
|
+
var Gt;
|
|
20
20
|
(function(s) {
|
|
21
21
|
s.ConnectionDestroyed = "ConnectionDestroyed", s.ConnectionTimeout = "ConnectionTimeout", s.NoIframeSrc = "NoIframeSrc";
|
|
22
|
-
})(
|
|
23
|
-
var
|
|
22
|
+
})(Gt || (Gt = {}));
|
|
23
|
+
var ne;
|
|
24
24
|
(function(s) {
|
|
25
25
|
s.DataCloneError = "DataCloneError";
|
|
26
|
-
})(
|
|
26
|
+
})(ne || (ne = {}));
|
|
27
27
|
var dt;
|
|
28
28
|
(function(s) {
|
|
29
29
|
s.Message = "message";
|
|
30
30
|
})(dt || (dt = {}));
|
|
31
|
-
const
|
|
31
|
+
const Rs = (s, o) => {
|
|
32
32
|
const t = [];
|
|
33
33
|
let e = !1;
|
|
34
34
|
return {
|
|
@@ -41,59 +41,59 @@ const Os = (s, o) => {
|
|
|
41
41
|
e ? r() : t.push(r);
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
|
-
},
|
|
44
|
+
}, Vs = (s) => (...o) => {
|
|
45
45
|
s && console.log("[Penpal]", ...o);
|
|
46
|
-
},
|
|
46
|
+
}, Js = {
|
|
47
47
|
"http:": "80",
|
|
48
48
|
"https:": "443"
|
|
49
|
-
},
|
|
50
|
-
if (s &&
|
|
49
|
+
}, Gs = /^(https?:)?\/\/([^/:]+)?(:(\d+))?/, Bs = ["file:", "data:"], Us = (s) => {
|
|
50
|
+
if (s && Bs.find((h) => s.startsWith(h)))
|
|
51
51
|
return "null";
|
|
52
|
-
const o = document.location, t =
|
|
52
|
+
const o = document.location, t = Gs.exec(s);
|
|
53
53
|
let e, r, n;
|
|
54
54
|
t ? (e = t[1] ? t[1] : o.protocol, r = t[2], n = t[4]) : (e = o.protocol, r = o.hostname, n = o.port);
|
|
55
|
-
const c = n && n !==
|
|
55
|
+
const c = n && n !== Js[e] ? `:${n}` : "";
|
|
56
56
|
return `${e}//${r}${c}`;
|
|
57
|
-
},
|
|
57
|
+
}, Re = ({ name: s, message: o, stack: t }) => ({
|
|
58
58
|
name: s,
|
|
59
59
|
message: o,
|
|
60
60
|
stack: t
|
|
61
|
-
}),
|
|
61
|
+
}), ks = (s) => {
|
|
62
62
|
const o = new Error();
|
|
63
63
|
return Object.keys(s).forEach((t) => o[t] = s[t]), o;
|
|
64
|
-
},
|
|
65
|
-
const { localName: e, local: r, remote: n, originForSending: c, originForReceiving:
|
|
66
|
-
let
|
|
64
|
+
}, _s = (s, o, t) => {
|
|
65
|
+
const { localName: e, local: r, remote: n, originForSending: c, originForReceiving: h } = s;
|
|
66
|
+
let l = !1;
|
|
67
67
|
const p = (y) => {
|
|
68
68
|
if (y.source !== n || y.data.penpal !== z.Call)
|
|
69
69
|
return;
|
|
70
|
-
if (y.origin !==
|
|
71
|
-
t(`${e} received message from origin ${y.origin} which did not match expected origin ${
|
|
70
|
+
if (y.origin !== h) {
|
|
71
|
+
t(`${e} received message from origin ${y.origin} which did not match expected origin ${h}`);
|
|
72
72
|
return;
|
|
73
73
|
}
|
|
74
|
-
const v = y.data, { methodName:
|
|
75
|
-
t(`${e}: Received ${
|
|
76
|
-
const I = (
|
|
77
|
-
if (t(`${e}: Sending ${
|
|
78
|
-
t(`${e}: Unable to send ${
|
|
74
|
+
const v = y.data, { methodName: f, args: b, id: A } = v;
|
|
75
|
+
t(`${e}: Received ${f}() call`);
|
|
76
|
+
const I = (S) => (M) => {
|
|
77
|
+
if (t(`${e}: Sending ${f}() reply`), l) {
|
|
78
|
+
t(`${e}: Unable to send ${f}() reply due to destroyed connection`);
|
|
79
79
|
return;
|
|
80
80
|
}
|
|
81
81
|
const E = {
|
|
82
82
|
penpal: z.Reply,
|
|
83
83
|
id: A,
|
|
84
|
-
resolution:
|
|
84
|
+
resolution: S,
|
|
85
85
|
returnValue: M
|
|
86
86
|
};
|
|
87
|
-
|
|
87
|
+
S === ut.Rejected && M instanceof Error && (E.returnValue = Re(M), E.returnValueIsError = !0);
|
|
88
88
|
try {
|
|
89
89
|
n.postMessage(E, c);
|
|
90
90
|
} catch (P) {
|
|
91
|
-
if (P.name ===
|
|
91
|
+
if (P.name === ne.DataCloneError) {
|
|
92
92
|
const W = {
|
|
93
93
|
penpal: z.Reply,
|
|
94
94
|
id: A,
|
|
95
95
|
resolution: ut.Rejected,
|
|
96
|
-
returnValue:
|
|
96
|
+
returnValue: Re(P),
|
|
97
97
|
returnValueIsError: !0
|
|
98
98
|
};
|
|
99
99
|
n.postMessage(W, c);
|
|
@@ -101,58 +101,58 @@ const Os = (s, o) => {
|
|
|
101
101
|
throw P;
|
|
102
102
|
}
|
|
103
103
|
};
|
|
104
|
-
new Promise((
|
|
104
|
+
new Promise((S) => S(o[f].apply(o, b))).then(I(ut.Fulfilled), I(ut.Rejected));
|
|
105
105
|
};
|
|
106
106
|
return r.addEventListener(dt.Message, p), () => {
|
|
107
|
-
|
|
107
|
+
l = !0, r.removeEventListener(dt.Message, p);
|
|
108
108
|
};
|
|
109
109
|
};
|
|
110
|
-
let
|
|
111
|
-
const
|
|
112
|
-
const t =
|
|
113
|
-
return t.push(s),
|
|
114
|
-
},
|
|
115
|
-
const e =
|
|
110
|
+
let Hs = 0;
|
|
111
|
+
const Ts = () => ++Hs, vs = ".", Is = (s) => s ? s.split(vs) : [], $s = (s) => s.join(vs), Ks = (s, o) => {
|
|
112
|
+
const t = Is(o || "");
|
|
113
|
+
return t.push(s), $s(t);
|
|
114
|
+
}, zs = (s, o, t) => {
|
|
115
|
+
const e = Is(o);
|
|
116
116
|
return e.reduce((r, n, c) => (typeof r[n] > "u" && (r[n] = {}), c === e.length - 1 && (r[n] = t), r[n]), s), s;
|
|
117
|
-
},
|
|
117
|
+
}, As = (s, o) => {
|
|
118
118
|
const t = {};
|
|
119
119
|
return Object.keys(s).forEach((e) => {
|
|
120
|
-
const r = s[e], n =
|
|
121
|
-
typeof r == "object" && Object.assign(t,
|
|
120
|
+
const r = s[e], n = Ks(e, o);
|
|
121
|
+
typeof r == "object" && Object.assign(t, As(r, n)), typeof r == "function" && (t[n] = r);
|
|
122
122
|
}), t;
|
|
123
|
-
},
|
|
123
|
+
}, Ws = (s) => {
|
|
124
124
|
const o = {};
|
|
125
125
|
for (const t in s)
|
|
126
|
-
|
|
126
|
+
zs(o, t, s[t]);
|
|
127
127
|
return o;
|
|
128
|
-
},
|
|
129
|
-
const { localName: n, local: c, remote:
|
|
128
|
+
}, js = (s, o, t, e, r) => {
|
|
129
|
+
const { localName: n, local: c, remote: h, originForSending: l, originForReceiving: p } = o;
|
|
130
130
|
let y = !1;
|
|
131
131
|
r(`${n}: Connecting call sender`);
|
|
132
132
|
const v = (b) => (...A) => {
|
|
133
133
|
r(`${n}: Sending ${b}() call`);
|
|
134
134
|
let I;
|
|
135
135
|
try {
|
|
136
|
-
|
|
136
|
+
h.closed && (I = !0);
|
|
137
137
|
} catch {
|
|
138
138
|
I = !0;
|
|
139
139
|
}
|
|
140
140
|
if (I && e(), y) {
|
|
141
|
-
const
|
|
142
|
-
throw
|
|
141
|
+
const S = new Error(`Unable to send ${b}() call due to destroyed connection`);
|
|
142
|
+
throw S.code = Gt.ConnectionDestroyed, S;
|
|
143
143
|
}
|
|
144
|
-
return new Promise((
|
|
145
|
-
const E =
|
|
146
|
-
if (j.source !==
|
|
144
|
+
return new Promise((S, M) => {
|
|
145
|
+
const E = Ts(), P = (j) => {
|
|
146
|
+
if (j.source !== h || j.data.penpal !== z.Reply || j.data.id !== E)
|
|
147
147
|
return;
|
|
148
148
|
if (j.origin !== p) {
|
|
149
149
|
r(`${n} received message from origin ${j.origin} which did not match expected origin ${p}`);
|
|
150
150
|
return;
|
|
151
151
|
}
|
|
152
|
-
const
|
|
152
|
+
const St = j.data;
|
|
153
153
|
r(`${n}: Received ${b}() reply`), c.removeEventListener(dt.Message, P);
|
|
154
|
-
let
|
|
155
|
-
|
|
154
|
+
let bt = St.returnValue;
|
|
155
|
+
St.returnValueIsError && (bt = ks(bt)), (St.resolution === ut.Fulfilled ? S : M)(bt);
|
|
156
156
|
};
|
|
157
157
|
c.addEventListener(dt.Message, P);
|
|
158
158
|
const W = {
|
|
@@ -161,15 +161,15 @@ const Bs = () => ++Js, ps = ".", Cs = (s) => s ? s.split(ps) : [], Gs = (s) => s
|
|
|
161
161
|
methodName: b,
|
|
162
162
|
args: A
|
|
163
163
|
};
|
|
164
|
-
|
|
164
|
+
h.postMessage(W, l);
|
|
165
165
|
});
|
|
166
|
-
},
|
|
167
|
-
return Object.assign(s,
|
|
166
|
+
}, f = t.reduce((b, A) => (b[A] = v(A), b), {});
|
|
167
|
+
return Object.assign(s, Ws(f)), () => {
|
|
168
168
|
y = !0;
|
|
169
169
|
};
|
|
170
|
-
},
|
|
170
|
+
}, qs = (s, o, t, e, r) => {
|
|
171
171
|
const { destroy: n, onDestroy: c } = e;
|
|
172
|
-
let
|
|
172
|
+
let h, l;
|
|
173
173
|
const p = {};
|
|
174
174
|
return (y) => {
|
|
175
175
|
if (y.origin !== o) {
|
|
@@ -184,13 +184,13 @@ const Bs = () => ++Js, ps = ".", Cs = (s) => s ? s.split(ps) : [], Gs = (s) => s
|
|
|
184
184
|
originForSending: t,
|
|
185
185
|
originForReceiving: o
|
|
186
186
|
};
|
|
187
|
-
|
|
187
|
+
h && h(), h = _s(v, s, r), c(h), l && l.forEach((b) => {
|
|
188
188
|
delete p[b];
|
|
189
|
-
}),
|
|
190
|
-
const
|
|
191
|
-
return c(
|
|
189
|
+
}), l = y.data.methodNames;
|
|
190
|
+
const f = js(p, v, l, n, r);
|
|
191
|
+
return c(f), p;
|
|
192
192
|
};
|
|
193
|
-
},
|
|
193
|
+
}, Ys = (s, o, t, e) => (r) => {
|
|
194
194
|
if (r.origin !== t) {
|
|
195
195
|
s(`Parent: Handshake - Received SYN message from origin ${r.origin} which did not match expected origin ${t}`);
|
|
196
196
|
return;
|
|
@@ -201,37 +201,37 @@ const Bs = () => ++Js, ps = ".", Cs = (s) => s ? s.split(ps) : [], Gs = (s) => s
|
|
|
201
201
|
methodNames: Object.keys(o)
|
|
202
202
|
};
|
|
203
203
|
r.source.postMessage(n, e);
|
|
204
|
-
},
|
|
204
|
+
}, Zs = 6e4, Qs = (s, o) => {
|
|
205
205
|
const { destroy: t, onDestroy: e } = o, r = setInterval(() => {
|
|
206
206
|
s.isConnected || (clearInterval(r), t());
|
|
207
|
-
},
|
|
207
|
+
}, Zs);
|
|
208
208
|
e(() => {
|
|
209
209
|
clearInterval(r);
|
|
210
210
|
});
|
|
211
|
-
},
|
|
211
|
+
}, Xs = (s, o) => {
|
|
212
212
|
let t;
|
|
213
213
|
return s !== void 0 && (t = window.setTimeout(() => {
|
|
214
214
|
const e = new Error(`Connection timed out after ${s}ms`);
|
|
215
|
-
e.code =
|
|
215
|
+
e.code = Gt.ConnectionTimeout, o(e);
|
|
216
216
|
}, s)), () => {
|
|
217
217
|
clearTimeout(t);
|
|
218
218
|
};
|
|
219
|
-
},
|
|
219
|
+
}, tr = (s) => {
|
|
220
220
|
if (!s.src && !s.srcdoc) {
|
|
221
221
|
const o = new Error("Iframe must have src or srcdoc property defined.");
|
|
222
|
-
throw o.code =
|
|
222
|
+
throw o.code = Gt.NoIframeSrc, o;
|
|
223
223
|
}
|
|
224
|
-
},
|
|
224
|
+
}, er = (s) => {
|
|
225
225
|
let { iframe: o, methods: t = {}, childOrigin: e, timeout: r, debug: n = !1 } = s;
|
|
226
|
-
const c =
|
|
227
|
-
e || (
|
|
228
|
-
const y = e === "null" ? "*" : e, v =
|
|
226
|
+
const c = Vs(n), h = Rs("Parent", c), { onDestroy: l, destroy: p } = h;
|
|
227
|
+
e || (tr(o), e = Us(o.src));
|
|
228
|
+
const y = e === "null" ? "*" : e, v = As(t), f = Ys(c, v, e, y), b = qs(v, e, y, h, c);
|
|
229
229
|
return {
|
|
230
|
-
promise: new Promise((I,
|
|
231
|
-
const M =
|
|
230
|
+
promise: new Promise((I, S) => {
|
|
231
|
+
const M = Xs(r, p), E = (P) => {
|
|
232
232
|
if (!(P.source !== o.contentWindow || !P.data)) {
|
|
233
233
|
if (P.data.penpal === z.Syn) {
|
|
234
|
-
|
|
234
|
+
f(P);
|
|
235
235
|
return;
|
|
236
236
|
}
|
|
237
237
|
if (P.data.penpal === z.Ack) {
|
|
@@ -241,53 +241,124 @@ const Bs = () => ++Js, ps = ".", Cs = (s) => s ? s.split(ps) : [], Gs = (s) => s
|
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
243
|
};
|
|
244
|
-
window.addEventListener(dt.Message, E), c("Parent: Awaiting handshake"),
|
|
245
|
-
window.removeEventListener(dt.Message, E), P &&
|
|
244
|
+
window.addEventListener(dt.Message, E), c("Parent: Awaiting handshake"), Qs(o, h), l((P) => {
|
|
245
|
+
window.removeEventListener(dt.Message, E), P && S(P);
|
|
246
246
|
});
|
|
247
247
|
}),
|
|
248
248
|
destroy() {
|
|
249
249
|
p();
|
|
250
250
|
}
|
|
251
251
|
};
|
|
252
|
-
},
|
|
252
|
+
}, sr = (s) => {
|
|
253
253
|
const o = new RegExp(/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w.-]+)+[\w]+\/$/);
|
|
254
254
|
let t = "";
|
|
255
255
|
return o.test(s) ? t = s : s.indexOf("/index.html") > -1 ? t = s.replace("/index.html", "/") : s.charAt(-1) !== "/" && (t = `${s}/`), t;
|
|
256
|
-
},
|
|
257
|
-
const e =
|
|
258
|
-
|
|
259
|
-
|
|
256
|
+
}, rr = (s, o, t) => {
|
|
257
|
+
const e = sr(o), n = `<html>
|
|
258
|
+
<head>
|
|
259
|
+
<base href="/" />
|
|
260
260
|
<meta charset="UTF-8"/>
|
|
261
|
-
|
|
261
|
+
<!-- use this property to pass the StudioStyling to the engine -->
|
|
262
262
|
<meta name="studio-styling" content='${JSON.stringify(t || {})}'>
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
263
|
+
</head>
|
|
264
|
+
<body>
|
|
265
|
+
<script>
|
|
266
|
+
const handleIframeError = (event) => {
|
|
267
|
+
if (window.parent && window.parent !== window) {
|
|
268
|
+
window.parent.postMessage(
|
|
269
|
+
{
|
|
270
|
+
type: 'iframe-error',
|
|
271
|
+
error: {
|
|
272
|
+
message: event.message,
|
|
273
|
+
filename: event.filename,
|
|
274
|
+
lineno: event.lineno,
|
|
275
|
+
colno: event.colno,
|
|
276
|
+
error: event.error?.toString(),
|
|
277
|
+
},
|
|
278
|
+
},
|
|
279
|
+
window.location.ancestorOrigins[0] || window.location.origin,
|
|
280
|
+
);
|
|
281
|
+
}
|
|
282
|
+
};
|
|
283
|
+
const handleUnhandledRejection = (event) => {
|
|
284
|
+
if (window.parent && window.parent !== window) {
|
|
285
|
+
window.parent.postMessage(
|
|
286
|
+
{
|
|
287
|
+
type: 'iframe-error',
|
|
288
|
+
error: { message: event.reason?.toString() || 'Unhandled promise rejection' },
|
|
289
|
+
},
|
|
290
|
+
window.location.ancestorOrigins[0] || window.location.origin,
|
|
291
|
+
);
|
|
292
|
+
}
|
|
293
|
+
};
|
|
294
|
+
window.addEventListener('error', handleIframeError);
|
|
295
|
+
window.addEventListener('unhandledrejection', handleUnhandledRejection);
|
|
296
|
+
<\/script>
|
|
297
|
+
<script src="${e}init.js" async><\/script>
|
|
298
|
+
<script src="${e}flutter_bootstrap.js"><\/script>
|
|
299
|
+
<script>
|
|
300
|
+
try {
|
|
301
|
+
if(!window?.initializeStudioEngine){
|
|
302
|
+
throw new Error('Failed to initialize studio engine: initializeStudioEngine not found');
|
|
303
|
+
}
|
|
304
|
+
initializeStudioEngine({
|
|
305
|
+
assetBase: '${e}',
|
|
306
|
+
});
|
|
307
|
+
} catch(error) {
|
|
308
|
+
if (window.parent && window.parent !== window) {
|
|
309
|
+
window.parent.postMessage({
|
|
310
|
+
type: 'iframe-error',
|
|
311
|
+
error: {
|
|
312
|
+
message: error?.message || 'Error initializing studio engine',
|
|
313
|
+
error: error?.toString()
|
|
314
|
+
}
|
|
315
|
+
}, window.location.ancestorOrigins[0] || window.location.origin);
|
|
316
|
+
}
|
|
317
|
+
throw error;
|
|
318
|
+
} finally {
|
|
319
|
+
window.removeEventListener('error', handleIframeError);
|
|
320
|
+
window.removeEventListener('unhandledrejection', handleUnhandledRejection);
|
|
321
|
+
}
|
|
322
|
+
<\/script>
|
|
323
|
+
</body>
|
|
324
|
+
</html>`;
|
|
277
325
|
s.srcdoc = n;
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
326
|
+
};
|
|
327
|
+
let Qt = null;
|
|
328
|
+
const nr = (s, o, t, e = "chili-editor", r, n) => {
|
|
329
|
+
Qt && window.removeEventListener("message", Qt);
|
|
330
|
+
const c = `#${e}`, h = document.createElement("iframe");
|
|
331
|
+
h.setAttribute("srcdoc", " "), h.setAttribute("title", "Chili-Editor"), h.setAttribute("style", "width: 100%; height: 100%;"), h.setAttribute("frameBorder", "0"), h.setAttribute("referrerpolicy", "origin");
|
|
332
|
+
const l = () => {
|
|
333
|
+
const p = document.querySelector(c);
|
|
334
|
+
if (p) {
|
|
335
|
+
p == null || p.appendChild(h), h.addEventListener(
|
|
336
|
+
"error",
|
|
337
|
+
() => {
|
|
338
|
+
const y = new Error("Failed to setup frame: iframe failed to load");
|
|
339
|
+
n == null || n(y);
|
|
340
|
+
},
|
|
341
|
+
{ capture: !0, once: !0 }
|
|
342
|
+
);
|
|
343
|
+
try {
|
|
344
|
+
rr(h, s, r);
|
|
345
|
+
} catch (y) {
|
|
346
|
+
y instanceof Error ? n == null || n(y) : n == null || n(new Error(`Failed to setup frame: ${y}`));
|
|
347
|
+
}
|
|
348
|
+
}
|
|
284
349
|
};
|
|
285
|
-
document.readyState === "complete" || document.readyState === "interactive" ?
|
|
286
|
-
|
|
287
|
-
}),
|
|
288
|
-
|
|
350
|
+
document.readyState === "complete" || document.readyState === "interactive" ? l() : document.addEventListener("DOMContentLoaded", () => {
|
|
351
|
+
l();
|
|
352
|
+
}), Qt = (p) => {
|
|
353
|
+
var y;
|
|
354
|
+
if (p.source === h.contentWindow && ((y = p.data) == null ? void 0 : y.type) === "iframe-error") {
|
|
355
|
+
const v = p.data.error, f = new Error(v.message || "Failed to setup frame: error in iframe");
|
|
356
|
+
n == null || n(f);
|
|
357
|
+
}
|
|
358
|
+
}, window.addEventListener("message", Qt), t(
|
|
359
|
+
er({
|
|
289
360
|
// The iframe to which a connection should be made
|
|
290
|
-
iframe:
|
|
361
|
+
iframe: h,
|
|
291
362
|
// All the methods that we want to expose to the child should be inside the methods object
|
|
292
363
|
// f.e. stateChange(documentJson)
|
|
293
364
|
methods: {
|
|
@@ -336,8 +407,8 @@ const Bs = () => ++Js, ps = ".", Cs = (s) => s ? s.split(ps) : [], Gs = (s) => s
|
|
|
336
407
|
})
|
|
337
408
|
);
|
|
338
409
|
};
|
|
339
|
-
var tt = /* @__PURE__ */ ((s) => (s.GraFxStudioEnvironmentApiUrl = "ENVIRONMENT_API", s.GraFxStudioSdkVersion = "SDK_VERSION", s.GraFxStudioDocumentType = "DOCUMENT_TYPE", s.GraFxStudioTemplateId = "TEMPLATE_ID", s.GraFxStudioAuthToken = "GRAFX_AUTH_TOKEN", s.QueryCallCacheEnabled = "ENABLE_QUERY_CALL_CACHE", s))(tt || {});
|
|
340
|
-
const
|
|
410
|
+
var tt = /* @__PURE__ */ ((s) => (s.GraFxStudioEnvironmentApiUrl = "ENVIRONMENT_API", s.GraFxStudioSdkVersion = "SDK_VERSION", s.GraFxStudioDocumentType = "DOCUMENT_TYPE", s.GraFxStudioTemplateId = "TEMPLATE_ID", s.GraFxStudioAuthToken = "GRAFX_AUTH_TOKEN", s.QueryCallCacheEnabled = "ENABLE_QUERY_CALL_CACHE", s))(tt || {}), ar = /* @__PURE__ */ ((s) => (s.full = "full", s.followConstraints = "followConstraints", s))(ar || {});
|
|
411
|
+
const ir = {
|
|
341
412
|
shortcutOptions: {
|
|
342
413
|
debugPanel: { enabled: !1 },
|
|
343
414
|
ellipse: { enabled: !1 },
|
|
@@ -351,27 +422,27 @@ const Xs = {
|
|
|
351
422
|
copyPaste: { enabled: !1 },
|
|
352
423
|
viewMode: { enabled: !1 }
|
|
353
424
|
},
|
|
354
|
-
frameEditingMode:
|
|
425
|
+
frameEditingMode: "full"
|
|
355
426
|
/* full */
|
|
356
427
|
};
|
|
357
|
-
var
|
|
358
|
-
const
|
|
359
|
-
function
|
|
428
|
+
var or = /* @__PURE__ */ ((s) => (s.overflow = "overflow", s.fontLoading = "fontLoading", s.actionRegister = "actionRegister", s.actionExecution = "actionExecution", s.actionCircular = "actionCircular", s))(or || {}), Ps = /* @__PURE__ */ ((s) => (s.project = "project", s.template = "template", s.component = "component", s))(Ps || {});
|
|
429
|
+
const cr = 404075;
|
|
430
|
+
function ge(s) {
|
|
360
431
|
const o = s.error ?? "Yikes, something went wrong", t = {
|
|
361
432
|
cause: {
|
|
362
433
|
name: String(s.status),
|
|
363
434
|
message: s.error ?? "Yikes, something went wrong"
|
|
364
435
|
}
|
|
365
436
|
};
|
|
366
|
-
if (s.status ===
|
|
437
|
+
if (s.status === cr) {
|
|
367
438
|
const r = JSON.parse(s.data).statusCode;
|
|
368
|
-
throw new
|
|
439
|
+
throw new hr(r, o, t);
|
|
369
440
|
} else
|
|
370
441
|
throw new Error(o, t);
|
|
371
442
|
}
|
|
372
443
|
function i(s, o = !0) {
|
|
373
444
|
try {
|
|
374
|
-
s.success ||
|
|
445
|
+
s.success || ge(s);
|
|
375
446
|
const t = s.data && o;
|
|
376
447
|
return {
|
|
377
448
|
...s,
|
|
@@ -381,13 +452,13 @@ function i(s, o = !0) {
|
|
|
381
452
|
throw console.error(t), t;
|
|
382
453
|
}
|
|
383
454
|
}
|
|
384
|
-
class
|
|
455
|
+
class hr extends Error {
|
|
385
456
|
constructor(o, t, e) {
|
|
386
457
|
super(t, e), this.statusCode = o;
|
|
387
458
|
}
|
|
388
459
|
}
|
|
389
460
|
var N;
|
|
390
|
-
class
|
|
461
|
+
class Ve {
|
|
391
462
|
/**
|
|
392
463
|
* @ignore
|
|
393
464
|
*/
|
|
@@ -400,8 +471,8 @@ class Le {
|
|
|
400
471
|
}
|
|
401
472
|
}
|
|
402
473
|
N = new WeakMap();
|
|
403
|
-
var
|
|
404
|
-
class
|
|
474
|
+
var L;
|
|
475
|
+
class Je {
|
|
405
476
|
/**
|
|
406
477
|
* @ignore
|
|
407
478
|
*/
|
|
@@ -409,15 +480,15 @@ class Ne {
|
|
|
409
480
|
/**
|
|
410
481
|
* @ignore
|
|
411
482
|
*/
|
|
412
|
-
u(this,
|
|
413
|
-
this.getAllOnSelectedLayout = async () => (await a(this,
|
|
483
|
+
u(this, L);
|
|
484
|
+
this.getAllOnSelectedLayout = async () => (await a(this, L)).getAnimationsOnSelectedLayout().then((e) => i(e)), this.getByFrameId = async (t, e) => (await a(this, L)).getAnimationByFrameId(t, e).then((n) => i(n)), this.getByLayoutId = async (t) => (await a(this, L)).getAnimationsByLayoutId(t).then((r) => i(r)), this.setFrameAnimation = async (t) => (await a(this, L)).setFrameAnimation(JSON.stringify(t)).then(
|
|
414
485
|
(r) => i({ ...r, data: JSON.stringify(t) })
|
|
415
|
-
), this.play = async () => (await a(this,
|
|
486
|
+
), this.play = async () => (await a(this, L)).playAnimation().then((e) => i(e)), this.pause = async () => (await a(this, L)).pauseAnimation().then((e) => i(e)), this.setScrubberPosition = async (t) => (await a(this, L)).setScrubberPosition(t).then((r) => i(r)), this.setDuration = async (t) => (await a(this, L)).setAnimationDuration(t).then((r) => i(r)), this.resetFrameAnimation = async (t) => (await a(this, L)).resetFrameAnimation(t).then((r) => i(r)), this.reset = async () => (await a(this, L)).resetAnimation().then((e) => i(e)), g(this, L, o);
|
|
416
487
|
}
|
|
417
488
|
}
|
|
418
|
-
|
|
419
|
-
var
|
|
420
|
-
class
|
|
489
|
+
L = new WeakMap();
|
|
490
|
+
var $ = /* @__PURE__ */ ((s) => (s.code39 = "code39", s.code93 = "code93", s.code128 = "code128", s.dataMatrix = "dataMatrix", s.ean13 = "ean13", s.ean8 = "ean8", s.qr = "qr", s.upca = "upca", s.upce = "upce", s.gs1128 = "gs1128", s))($ || {}), Rt = /* @__PURE__ */ ((s) => (s.low = "low", s.medium = "medium", s.quartile = "quartile", s.high = "high", s))(Rt || {}), vt = /* @__PURE__ */ ((s) => (s.utf8 = "utf8", s.iso8859_1 = "iso8859_1", s.code128a = "code128a", s.code128b = "code128b", s.code128c = "code128c", s))(vt || {}), lr = /* @__PURE__ */ ((s) => (s.success = "success", s.empty = "empty", s.invalidLength = "invalidLength", s.invalidCharacters = "invalidCharacters", s.invalidChecksum = "invalidChecksum", s.invalidUPCE = "invalidUPCE", s.otherError = "otherError", s))(lr || {}), dr = /* @__PURE__ */ ((s) => (s.px = "px", s.mm = "mm", s.cm = "cm", s.inch = "inch", s.pt = "pt", s))(dr || {}), X = /* @__PURE__ */ ((s) => (s.top = "top", s.right = "right", s.bottom = "bottom", s.left = "left", s))(X || {}), ur = /* @__PURE__ */ ((s) => (s.top = "top", s.child = "child", s))(ur || {}), gr = /* @__PURE__ */ ((s) => (s.print = "print", s.digitalStatic = "digitalStatic", s.digitalAnimated = "digitalAnimated", s))(gr || {}), yr = /* @__PURE__ */ ((s) => (s.locked = "locked", s.range = "range", s.none = "none", s))(yr || {}), k;
|
|
491
|
+
class Ge {
|
|
421
492
|
/**
|
|
422
493
|
* @ignore
|
|
423
494
|
*/
|
|
@@ -425,8 +496,8 @@ class Me {
|
|
|
425
496
|
/**
|
|
426
497
|
* @ignore
|
|
427
498
|
*/
|
|
428
|
-
u(this,
|
|
429
|
-
this.setBarcodeProperties = async (t, e) => (await a(this,
|
|
499
|
+
u(this, k);
|
|
500
|
+
this.setBarcodeProperties = async (t, e) => (await a(this, k)).setBarcodeProperties(t, JSON.stringify(e)).then((n) => i(n)), this.setEnableBackground = async (t, e) => {
|
|
430
501
|
const r = { enableBackground: e };
|
|
431
502
|
return this.setBarcodeProperties(t, r);
|
|
432
503
|
}, this.setBackgroundColor = async (t, e) => {
|
|
@@ -438,7 +509,7 @@ class Me {
|
|
|
438
509
|
}, this.setBarColor = async (t, e) => {
|
|
439
510
|
const r = { barColor: e };
|
|
440
511
|
return this.setBarcodeProperties(t, r);
|
|
441
|
-
}, this.setBarcodeSource = async (t, e) => (await a(this,
|
|
512
|
+
}, this.setBarcodeSource = async (t, e) => (await a(this, k)).setBarcodeSource(t, JSON.stringify(e)).then((n) => i(n)), this.removeBarcodeSource = async (t) => (await a(this, k)).setBarcodeSource(t, null).then((r) => i(r)), this.setEnableText = async (t, e) => {
|
|
442
513
|
const r = { enableText: e };
|
|
443
514
|
return this.setBarcodeProperties(t, r);
|
|
444
515
|
}, this.setBarHeight = async (t, e) => {
|
|
@@ -454,47 +525,47 @@ class Me {
|
|
|
454
525
|
right: r === X.right ? e : void 0,
|
|
455
526
|
bottom: r === X.bottom ? e : void 0
|
|
456
527
|
} : { left: e, top: e, right: e, bottom: e };
|
|
457
|
-
return (await a(this,
|
|
528
|
+
return (await a(this, k)).setBarcodeProperties(t, JSON.stringify({ quietZone: n })).then((h) => i(h));
|
|
458
529
|
}, this.setAreQuietZoneValuesCombined = async (t, e) => {
|
|
459
530
|
const r = { areQuietZoneValuesCombined: e };
|
|
460
|
-
return (await a(this,
|
|
461
|
-
}, this.setErrorCorrectionLevel = async (t, e) => (await a(this,
|
|
531
|
+
return (await a(this, k)).setBarcodeProperties(t, JSON.stringify({ quietZone: r })).then((c) => i(c));
|
|
532
|
+
}, this.setErrorCorrectionLevel = async (t, e) => (await a(this, k)).setBarcodeProperties(t, JSON.stringify({ errorCorrectionLevel: e })).then((n) => i(n)), this.setCharacterSet = async (t, e) => (await a(this, k)).setBarcodeProperties(t, JSON.stringify({ characterSet: e })).then((n) => i(n)), this.setDrawLightMarginIndicator = async (t, e) => {
|
|
462
533
|
const r = { drawStartStopChars: e };
|
|
463
534
|
return this.setBarcodeProperties(t, r);
|
|
464
535
|
}, this.setDrawStartStopChars = async (t, e) => {
|
|
465
536
|
const r = { drawStartStopChars: e };
|
|
466
537
|
return this.setBarcodeProperties(t, r);
|
|
467
538
|
}, this.getBarcodeConfigationOptions = (t) => {
|
|
468
|
-
let e = !0, r = !0, n = !0, c,
|
|
539
|
+
let e = !0, r = !0, n = !0, c, h, l = !1, p = !1, y = !1;
|
|
469
540
|
switch (t) {
|
|
470
|
-
case
|
|
471
|
-
c = [
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
541
|
+
case $.qr:
|
|
542
|
+
c = [vt.iso8859_1, vt.utf8], h = [
|
|
543
|
+
Rt.low,
|
|
544
|
+
Rt.medium,
|
|
545
|
+
Rt.quartile,
|
|
546
|
+
Rt.high
|
|
476
547
|
];
|
|
477
|
-
case
|
|
478
|
-
e = !1, r = !1, n = !1,
|
|
548
|
+
case $.dataMatrix:
|
|
549
|
+
e = !1, r = !1, n = !1, l = !0;
|
|
479
550
|
break;
|
|
480
|
-
case
|
|
551
|
+
case $.ean13:
|
|
481
552
|
e = !1, p = !0;
|
|
482
553
|
break;
|
|
483
|
-
case
|
|
554
|
+
case $.ean8:
|
|
484
555
|
p = !0;
|
|
485
|
-
case
|
|
486
|
-
case
|
|
556
|
+
case $.upca:
|
|
557
|
+
case $.upce:
|
|
487
558
|
e = !1;
|
|
488
559
|
break;
|
|
489
|
-
case
|
|
490
|
-
case
|
|
560
|
+
case $.code128:
|
|
561
|
+
case $.gs1128:
|
|
491
562
|
c = [
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
563
|
+
vt.code128a,
|
|
564
|
+
vt.code128b,
|
|
565
|
+
vt.code128c
|
|
495
566
|
];
|
|
496
567
|
break;
|
|
497
|
-
case
|
|
568
|
+
case $.code39:
|
|
498
569
|
y = !0;
|
|
499
570
|
break;
|
|
500
571
|
}
|
|
@@ -503,47 +574,47 @@ class Me {
|
|
|
503
574
|
allowBarHeight: r,
|
|
504
575
|
allowQuietZone: !0,
|
|
505
576
|
allowedCharacterSets: c,
|
|
506
|
-
allowedErrorCorrectionLevels:
|
|
577
|
+
allowedErrorCorrectionLevels: h,
|
|
507
578
|
allowToggleText: e,
|
|
508
|
-
quietZoneAlwaysCombined:
|
|
579
|
+
quietZoneAlwaysCombined: l,
|
|
509
580
|
allowToggleLightMarginIndicator: p,
|
|
510
581
|
allowToggleDrawStartAndEndChar: y
|
|
511
582
|
};
|
|
512
|
-
}, g(this,
|
|
583
|
+
}, g(this, k, o);
|
|
513
584
|
}
|
|
514
585
|
}
|
|
515
|
-
|
|
516
|
-
var
|
|
517
|
-
const
|
|
518
|
-
const o =
|
|
519
|
-
return
|
|
520
|
-
...
|
|
521
|
-
...!
|
|
586
|
+
k = new WeakMap();
|
|
587
|
+
var T = /* @__PURE__ */ ((s) => (s.rgb = "rgb", s.hex = "hex", s.cmyk = "cmyk", s.spotCmyk = "spotCmyk", s.spotRgb = "spotRgb", s.spotHex = "spotHex", s))(T || {}), q = /* @__PURE__ */ ((s) => (s.rgb = "rgb", s.hex = "hex", s.cmyk = "cmyk", s.gray = "gray", s.hsl = "hsl", s.spot = "spot", s.spotCMYK = "spotCMYK", s.spotRGB = "spotRGB", s.spotHEX = "spotHEX", s))(q || {}), ae = /* @__PURE__ */ ((s) => (s.local = "local", s.brandKit = "brandKit", s.stylekit = "brandKit", s))(ae || {});
|
|
588
|
+
const Be = (s) => s.type === T.hex, ie = (s) => s.type === T.spotHex, pr = (s) => s.type === T.spotRgb, wr = (s) => s.type === T.spotCmyk, Cr = (s) => pr(s) || wr(s) || ie(s), mr = (s) => {
|
|
589
|
+
const o = fr(s.type);
|
|
590
|
+
return Cr(s) ? {
|
|
591
|
+
...ie(s) && { value: s.displayValue },
|
|
592
|
+
...!ie(s) && { ...s.displayValue },
|
|
522
593
|
spotName: s.value,
|
|
523
594
|
type: o
|
|
524
595
|
} : {
|
|
525
|
-
...
|
|
526
|
-
...!
|
|
596
|
+
...Be(s) && { value: s.value },
|
|
597
|
+
...!Be(s) && { ...s.value },
|
|
527
598
|
type: o
|
|
528
599
|
};
|
|
529
|
-
},
|
|
600
|
+
}, Ue = (s, o, t, e) => {
|
|
530
601
|
const {
|
|
531
602
|
brandKitColorGuid: r,
|
|
532
603
|
brandKitFontFamilyGuid: n,
|
|
533
604
|
fontStyleId: c,
|
|
534
|
-
textStrokeColorGuid:
|
|
535
|
-
textStrokeColorApplied:
|
|
605
|
+
textStrokeColorGuid: h,
|
|
606
|
+
textStrokeColorApplied: l,
|
|
536
607
|
textStrokeWidth: p,
|
|
537
608
|
...y
|
|
538
609
|
} = s;
|
|
539
610
|
return {
|
|
540
|
-
...Object.keys(y).reduce((
|
|
611
|
+
...Object.keys(y).reduce((f, b) => ({ ...f, [b]: { value: s[b] } }), {}),
|
|
541
612
|
...o && {
|
|
542
613
|
color: {
|
|
543
614
|
value: {
|
|
544
615
|
id: o.id,
|
|
545
616
|
color: o.color,
|
|
546
|
-
type:
|
|
617
|
+
type: ae.brandKit,
|
|
547
618
|
isApplied: y.fillColorApplied
|
|
548
619
|
}
|
|
549
620
|
}
|
|
@@ -553,12 +624,12 @@ const xe = (s) => s.type === H.hex, se = (s) => s.type === H.spotHex, cr = (s) =
|
|
|
553
624
|
value: {
|
|
554
625
|
id: t.id,
|
|
555
626
|
color: t.color,
|
|
556
|
-
type:
|
|
557
|
-
isApplied:
|
|
627
|
+
type: ae.brandKit,
|
|
628
|
+
isApplied: l || !1
|
|
558
629
|
}
|
|
559
630
|
},
|
|
560
631
|
strokeColorApplied: {
|
|
561
|
-
value:
|
|
632
|
+
value: l || !1
|
|
562
633
|
},
|
|
563
634
|
strokeWidth: {
|
|
564
635
|
value: p != null ? p.toString() : p
|
|
@@ -568,31 +639,31 @@ const xe = (s) => s.type === H.hex, se = (s) => s.type === H.spotHex, cr = (s) =
|
|
|
568
639
|
value: e ?? null
|
|
569
640
|
}
|
|
570
641
|
};
|
|
571
|
-
},
|
|
642
|
+
}, fr = (s) => {
|
|
572
643
|
switch (s) {
|
|
573
|
-
case
|
|
644
|
+
case T.rgb:
|
|
574
645
|
return q.rgb;
|
|
575
|
-
case
|
|
646
|
+
case T.cmyk:
|
|
576
647
|
return q.cmyk;
|
|
577
|
-
case
|
|
648
|
+
case T.hex:
|
|
578
649
|
return q.hex;
|
|
579
|
-
case
|
|
650
|
+
case T.spotRgb:
|
|
580
651
|
return q.spotRGB;
|
|
581
|
-
case
|
|
652
|
+
case T.spotCmyk:
|
|
582
653
|
return q.spotCMYK;
|
|
583
|
-
case
|
|
654
|
+
case T.spotHex:
|
|
584
655
|
return q.spotHEX;
|
|
585
656
|
}
|
|
586
|
-
},
|
|
657
|
+
}, Xt = (s, o) => {
|
|
587
658
|
if (!(s === null || o === void 0))
|
|
588
659
|
return (s || []).find((t) => t.id === o);
|
|
589
|
-
},
|
|
660
|
+
}, ke = (s, o, t) => {
|
|
590
661
|
var e, r;
|
|
591
662
|
if (!(s === null || o === void 0 || t === void 0))
|
|
592
663
|
return (r = (e = (s || []).find((n) => n.id === o)) == null ? void 0 : e.fontStyles.find((n) => n.fontStyleId === t)) == null ? void 0 : r.id;
|
|
593
664
|
};
|
|
594
|
-
var
|
|
595
|
-
class
|
|
665
|
+
var D;
|
|
666
|
+
class _e {
|
|
596
667
|
/**
|
|
597
668
|
* @ignore
|
|
598
669
|
*/
|
|
@@ -600,12 +671,12 @@ class Je {
|
|
|
600
671
|
/**
|
|
601
672
|
* @ignore
|
|
602
673
|
*/
|
|
603
|
-
u(this,
|
|
604
|
-
this.getId = async () => (await a(this,
|
|
605
|
-
const e = await this.getId(), r = await this.getVersion(), n = await this.getName(), c = this.colorStyleController.getAll(),
|
|
674
|
+
u(this, D);
|
|
675
|
+
this.getId = async () => (await a(this, D)).getBrandKitId().then((r) => i(r)), this.getVersion = async () => (await a(this, D)).getBrandKitVersion().then((r) => i(r)), this.getName = async () => (await a(this, D)).getBrandKitName().then((r) => i(r)), this.rename = async (e) => (await a(this, D)).renameBrandKit(e).then((n) => i(n)), this.updateIdAndVersion = async (e, r) => (await a(this, D)).updateBrandKitIdAndVersion(e, r).then((c) => i(c)), this.get = async () => {
|
|
676
|
+
const e = await this.getId(), r = await this.getVersion(), n = await this.getName(), c = this.colorStyleController.getAll(), h = this.gradientStyleController.getAll(), l = this.fontController.getFontFamilies(), p = this.characterStyleController.getAll(), y = this.paragraphStyleController.getAll(), v = this.getAllMedia(), [f, b, A, I, S, M] = await Promise.all([
|
|
606
677
|
c,
|
|
607
|
-
d,
|
|
608
678
|
h,
|
|
679
|
+
l,
|
|
609
680
|
y,
|
|
610
681
|
p,
|
|
611
682
|
v
|
|
@@ -615,11 +686,11 @@ class Je {
|
|
|
615
686
|
id: e.parsedData,
|
|
616
687
|
name: n.parsedData,
|
|
617
688
|
lastModifiedDate: r.parsedData,
|
|
618
|
-
colors:
|
|
689
|
+
colors: f.parsedData,
|
|
619
690
|
gradients: b.parsedData,
|
|
620
691
|
fonts: A.parsedData,
|
|
621
692
|
paragraphStyles: I.parsedData,
|
|
622
|
-
characterStyles:
|
|
693
|
+
characterStyles: S.parsedData,
|
|
623
694
|
media: M.parsedData
|
|
624
695
|
}
|
|
625
696
|
}, P = {
|
|
@@ -629,21 +700,21 @@ class Je {
|
|
|
629
700
|
status: 200
|
|
630
701
|
};
|
|
631
702
|
return i(P);
|
|
632
|
-
}, this.getAllMedia = async () => (await a(this,
|
|
633
|
-
const r = (await this.colorStyleController.getAll()).parsedData || [], c = (await this.gradientStyleController.getAll()).parsedData || [],
|
|
703
|
+
}, this.getAllMedia = async () => (await a(this, D)).getAllBrandKitMedia().then((r) => i(r)), this.addMedia = async (e, r, n) => (await a(this, D)).addBrandKitMedia(e, r, n).then((h) => i(h)), this.updateMedia = async (e, r, n) => (await a(this, D)).updateBrandKitMedia(e, r, n).then((h) => i(h)), this.renameMedia = async (e, r) => (await a(this, D)).renameBrandKitMedia(e, r).then((c) => i(c)), this.removeMedia = async (e) => (await a(this, D)).removeBrandKitMedia(e).then((n) => i(n)), this.remove = async () => {
|
|
704
|
+
const r = (await this.colorStyleController.getAll()).parsedData || [], c = (await this.gradientStyleController.getAll()).parsedData || [], l = (await this.paragraphStyleController.getAll()).parsedData || [], y = (await this.characterStyleController.getAll()).parsedData || [], f = (await this.fontController.getFontFamilies()).parsedData || [], A = (await this.getAllMedia()).parsedData || [];
|
|
634
705
|
await this.undoManagerController.record("brandKit.remove", async (I) => {
|
|
635
|
-
for (const
|
|
636
|
-
await I.colorStyle.remove(
|
|
637
|
-
for (const
|
|
638
|
-
await I.gradientStyle.remove(
|
|
639
|
-
for (const
|
|
640
|
-
await I.paragraphStyle.remove(
|
|
641
|
-
for (const
|
|
642
|
-
await I.characterStyle.remove(
|
|
643
|
-
for (const
|
|
644
|
-
await I.font.removeFontFamily(
|
|
645
|
-
for (const
|
|
646
|
-
await this.removeMedia(
|
|
706
|
+
for (const S of r)
|
|
707
|
+
await I.colorStyle.remove(S.id);
|
|
708
|
+
for (const S of c)
|
|
709
|
+
await I.gradientStyle.remove(S.id);
|
|
710
|
+
for (const S of l)
|
|
711
|
+
await I.paragraphStyle.remove(S.id);
|
|
712
|
+
for (const S of y)
|
|
713
|
+
await I.characterStyle.remove(S.id);
|
|
714
|
+
for (const S of f)
|
|
715
|
+
await I.font.removeFontFamily(S.id);
|
|
716
|
+
for (const S of A)
|
|
717
|
+
await this.removeMedia(S.name);
|
|
647
718
|
});
|
|
648
719
|
}, this.set = async (e) => {
|
|
649
720
|
let r = {
|
|
@@ -664,19 +735,19 @@ class Je {
|
|
|
664
735
|
return await this.undoManagerController.record("brandKit.set", async (n) => {
|
|
665
736
|
const c = await this.setColors(e, n);
|
|
666
737
|
await this.setGradients(e, n);
|
|
667
|
-
const
|
|
738
|
+
const h = await this.setFonts(e, n), { parsedData: l = [] } = await n.colorStyle.getAll(), { parsedData: p = [] } = await n.gradientStyle.getAll(), { parsedData: y } = await n.font.getFontFamilies();
|
|
668
739
|
await this.setParagraphStyles(e, n, {
|
|
669
|
-
localColors:
|
|
740
|
+
localColors: l,
|
|
670
741
|
localFonts: y,
|
|
671
742
|
localColorGuidMap: c,
|
|
672
|
-
localFontGuidMap:
|
|
743
|
+
localFontGuidMap: h
|
|
673
744
|
}), await this.setCharacterStyles(e, n, {
|
|
674
|
-
localColors:
|
|
745
|
+
localColors: l,
|
|
675
746
|
localFonts: y,
|
|
676
747
|
localColorGuidMap: c,
|
|
677
|
-
localFontGuidMap:
|
|
748
|
+
localFontGuidMap: h
|
|
678
749
|
}), await this.setMedia(e);
|
|
679
|
-
const { parsedData: v } = await n.paragraphStyle.getAll(), { parsedData:
|
|
750
|
+
const { parsedData: v } = await n.paragraphStyle.getAll(), { parsedData: f } = await n.characterStyle.getAll(), { parsedData: b } = await this.getAllMedia();
|
|
680
751
|
await n.brandKit.updateIdAndVersion(e.id, e.brandKit.lastModifiedDate), await n.brandKit.rename(e.brandKit.name), r = {
|
|
681
752
|
success: !0,
|
|
682
753
|
status: 200,
|
|
@@ -684,16 +755,16 @@ class Je {
|
|
|
684
755
|
id: e.id,
|
|
685
756
|
version: e.brandKit.lastModifiedDate,
|
|
686
757
|
name: e.brandKit.name,
|
|
687
|
-
colors:
|
|
758
|
+
colors: l || [],
|
|
688
759
|
gradients: p || [],
|
|
689
760
|
fonts: y || [],
|
|
690
761
|
paragraphStyles: v || [],
|
|
691
|
-
characterStyles:
|
|
762
|
+
characterStyles: f || [],
|
|
692
763
|
media: b || []
|
|
693
764
|
}
|
|
694
765
|
};
|
|
695
766
|
}), r;
|
|
696
|
-
}, g(this,
|
|
767
|
+
}, g(this, D, o), this.colorStyleController = t.colorStyle, this.gradientStyleController = t.gradientStyle, this.fontController = t.font, this.mediaController = t.mediaConnector, this.paragraphStyleController = t.paragraphStyle, this.characterStyleController = t.characterStyle, this.undoManagerController = t.undoManager;
|
|
697
768
|
}
|
|
698
769
|
async setColors(o, t) {
|
|
699
770
|
const e = /* @__PURE__ */ new Map();
|
|
@@ -701,7 +772,7 @@ class Je {
|
|
|
701
772
|
const { parsedData: n } = await t.colorStyle.create();
|
|
702
773
|
if (!n) continue;
|
|
703
774
|
e.set(r.guid, n);
|
|
704
|
-
const c =
|
|
775
|
+
const c = mr(r);
|
|
705
776
|
await t.colorStyle.rename(n, r.name), await t.colorStyle.update(n, c);
|
|
706
777
|
}
|
|
707
778
|
return e;
|
|
@@ -715,41 +786,41 @@ class Je {
|
|
|
715
786
|
for (const n of o.brandKit.fonts || []) {
|
|
716
787
|
const { parsedData: c = [] } = await t.fontConnector.detail(e, n.fontFamilyId);
|
|
717
788
|
if (!(c != null && c[0])) throw new Error(`No font styles for family ID: ${n.fontFamilyId}`);
|
|
718
|
-
const { parsedData:
|
|
789
|
+
const { parsedData: h } = await t.font.addFontFamily(e, {
|
|
719
790
|
name: c[0].familyName,
|
|
720
791
|
fontFamilyId: n.fontFamilyId
|
|
721
792
|
});
|
|
722
|
-
|
|
793
|
+
h && r.set(n.fontFamilyBrandKitGuid, h);
|
|
723
794
|
}
|
|
724
795
|
return r;
|
|
725
796
|
}
|
|
726
797
|
async setParagraphStyles(o, t, e) {
|
|
727
|
-
const { localColors: r, localFonts: n, localColorGuidMap: c, localFontGuidMap:
|
|
728
|
-
for (const
|
|
729
|
-
const p = c.get(
|
|
730
|
-
if (!v || !
|
|
731
|
-
throw new Error(`Paragraph style could not be created with an empty font family: ${
|
|
732
|
-
const b =
|
|
733
|
-
if (!b) throw new Error(`Paragraph style could not be created with an empty color: ${
|
|
734
|
-
const { parsedData: I } = await t.paragraphStyle.create(),
|
|
735
|
-
|
|
798
|
+
const { localColors: r, localFonts: n, localColorGuidMap: c, localFontGuidMap: h } = e;
|
|
799
|
+
for (const l of o.brandKit.paragraphStyles || []) {
|
|
800
|
+
const p = c.get(l.brandKitColorGuid), y = c.get(l.textStrokeColorGuid), v = h.get(l.brandKitFontFamilyGuid), f = ke(n, v, l.fontStyleId);
|
|
801
|
+
if (!v || !f)
|
|
802
|
+
throw new Error(`Paragraph style could not be created with an empty font family: ${l.name}`);
|
|
803
|
+
const b = Xt(r, p), A = Xt(r, y);
|
|
804
|
+
if (!b) throw new Error(`Paragraph style could not be created with an empty color: ${l.name}`);
|
|
805
|
+
const { parsedData: I } = await t.paragraphStyle.create(), S = Ue(
|
|
806
|
+
l,
|
|
736
807
|
b,
|
|
737
808
|
A,
|
|
738
|
-
`${
|
|
809
|
+
`${f}`
|
|
739
810
|
);
|
|
740
|
-
await t.paragraphStyle.rename(I,
|
|
811
|
+
await t.paragraphStyle.rename(I, l.name), await t.paragraphStyle.update(I, S);
|
|
741
812
|
}
|
|
742
813
|
}
|
|
743
814
|
async setCharacterStyles(o, t, e) {
|
|
744
|
-
const { localColors: r, localFonts: n, localColorGuidMap: c, localFontGuidMap:
|
|
745
|
-
for (const
|
|
746
|
-
const p =
|
|
747
|
-
|
|
748
|
-
|
|
815
|
+
const { localColors: r, localFonts: n, localColorGuidMap: c, localFontGuidMap: h } = e;
|
|
816
|
+
for (const l of o.brandKit.characterStyles || []) {
|
|
817
|
+
const p = l.brandKitColorGuid ? c.get(l.brandKitColorGuid) : void 0, y = l.textStrokeColorGuid ? c.get(l.textStrokeColorGuid) : void 0, v = l.brandKitFontFamilyGuid ? h.get(l.brandKitFontFamilyGuid) : void 0, f = Xt(r, p), b = Xt(r, y), A = ke(n, v, l.fontStyleId), { parsedData: I } = await t.characterStyle.create(), S = Ue(
|
|
818
|
+
l,
|
|
819
|
+
f,
|
|
749
820
|
b,
|
|
750
821
|
A
|
|
751
822
|
);
|
|
752
|
-
await t.characterStyle.rename(I,
|
|
823
|
+
await t.characterStyle.rename(I, l.name), await t.characterStyle.update(I, S);
|
|
753
824
|
}
|
|
754
825
|
}
|
|
755
826
|
async setMedia(o) {
|
|
@@ -757,9 +828,9 @@ class Je {
|
|
|
757
828
|
await this.addMedia(t.name, t.mediaConnectorId, t.mediaId);
|
|
758
829
|
}
|
|
759
830
|
}
|
|
760
|
-
|
|
831
|
+
D = new WeakMap();
|
|
761
832
|
var st;
|
|
762
|
-
class
|
|
833
|
+
class oe {
|
|
763
834
|
/**
|
|
764
835
|
* @ignore
|
|
765
836
|
*/
|
|
@@ -768,12 +839,12 @@ class re {
|
|
|
768
839
|
* @ignore
|
|
769
840
|
*/
|
|
770
841
|
u(this, st);
|
|
771
|
-
this.zoomToPage = async (t, e, r, n, c) => (t !== void 0 && console.warn("id has no effect and will be deprecated in the future"), (await a(this, st)).zoomToPage(e, r, n, c).then((
|
|
842
|
+
this.zoomToPage = async (t, e, r, n, c) => (t !== void 0 && console.warn("id has no effect and will be deprecated in the future"), (await a(this, st)).zoomToPage(e, r, n, c).then((l) => i(l))), this.getZoomPercentage = async () => (await a(this, st)).getZoomPercentage().then((e) => i(e)), this.setZoomPercentage = async (t) => (await a(this, st)).setZoomPercentage(t).then((r) => i(r)), this.setViewMode = async (t) => (await a(this, st)).setViewMode(t).then((r) => i(r)), g(this, st, o);
|
|
772
843
|
}
|
|
773
844
|
}
|
|
774
845
|
st = new WeakMap();
|
|
775
846
|
var R;
|
|
776
|
-
class
|
|
847
|
+
class He {
|
|
777
848
|
/**
|
|
778
849
|
* @ignore
|
|
779
850
|
*/
|
|
@@ -787,7 +858,7 @@ class Be {
|
|
|
787
858
|
}
|
|
788
859
|
R = new WeakMap();
|
|
789
860
|
var rt;
|
|
790
|
-
class
|
|
861
|
+
class Te {
|
|
791
862
|
/**
|
|
792
863
|
* @ignore
|
|
793
864
|
*/
|
|
@@ -812,8 +883,8 @@ class Ge {
|
|
|
812
883
|
}
|
|
813
884
|
}
|
|
814
885
|
rt = new WeakMap();
|
|
815
|
-
var
|
|
816
|
-
class
|
|
886
|
+
var _t;
|
|
887
|
+
class $e {
|
|
817
888
|
/**
|
|
818
889
|
* @ignore
|
|
819
890
|
*/
|
|
@@ -821,13 +892,13 @@ class ke {
|
|
|
821
892
|
/**
|
|
822
893
|
* @ignore
|
|
823
894
|
*/
|
|
824
|
-
u(this,
|
|
825
|
-
this.convertToRgb = async (t) => (await a(this,
|
|
895
|
+
u(this, _t);
|
|
896
|
+
this.convertToRgb = async (t) => (await a(this, _t)).colorToRgb(JSON.stringify(t)).then((r) => i(r)), g(this, _t, o);
|
|
826
897
|
}
|
|
827
898
|
}
|
|
828
|
-
|
|
899
|
+
_t = new WeakMap();
|
|
829
900
|
var V;
|
|
830
|
-
class
|
|
901
|
+
class Ke {
|
|
831
902
|
/**
|
|
832
903
|
* @ignore
|
|
833
904
|
*/
|
|
@@ -843,45 +914,45 @@ class Ue {
|
|
|
843
914
|
}
|
|
844
915
|
}
|
|
845
916
|
V = new WeakMap();
|
|
846
|
-
var
|
|
847
|
-
class
|
|
917
|
+
var Bt = /* @__PURE__ */ ((s) => (s[s.file = 0] = "file", s[s.collection = 1] = "collection", s))(Bt || {}), ce = /* @__PURE__ */ ((s) => (s.LowResolutionWeb = "lowresWeb", s.HighResolutionWeb = "highresWeb", s))(ce || {}), Ut = /* @__PURE__ */ ((s) => (s.file = "file", s.collection = "collection", s))(Ut || {}), Sr = /* @__PURE__ */ ((s) => (s.media = "media", s.fonts = "fonts", s.data = "data", s.components = "components", s))(Sr || {}), br = /* @__PURE__ */ ((s) => (s.name = "name", s.path = "relativePath", s.id = "id", s))(br || {}), vr = /* @__PURE__ */ ((s) => (s.ascending = "asc", s.descending = "desc", s))(vr || {}), Ir = /* @__PURE__ */ ((s) => (s.text = "text", s.boolean = "boolean", s))(Ir || {}), Ar = /* @__PURE__ */ ((s) => (s.query = "query", s.upload = "upload", s))(Ar || {}), Vt = /* @__PURE__ */ ((s) => (s.url = "url", s.grafx = "grafx", s.local = "local", s))(Vt || {});
|
|
918
|
+
class Hn {
|
|
848
919
|
constructor(o, t, e, r = "engineToConnector") {
|
|
849
920
|
this.direction = "engineToConnector", this.name = o, this.direction = r, t === "var" ? this.value = `${t}.${e}` : this.value = e;
|
|
850
921
|
}
|
|
851
922
|
}
|
|
852
|
-
var
|
|
853
|
-
const
|
|
923
|
+
var Pr = /* @__PURE__ */ ((s) => (s.variable = "var", s.value = "value", s))(Pr || {}), Fr = /* @__PURE__ */ ((s) => (s.engineToConnector = "engineToConnector", s.connectorToEngine = "connectorToEngine", s))(Fr || {}), he = /* @__PURE__ */ ((s) => (s.loading = "loading", s.loaded = "loaded", s.running = "running", s.ready = "ready", s.error = "error", s))(he || {}), Er = /* @__PURE__ */ ((s) => (s.stateChanged = "stateChanged", s.authChanged = "authChanged", s.reloadRequired = "reloadRequired", s.unloaded = "unloaded", s))(Er || {});
|
|
924
|
+
const Tn = {
|
|
854
925
|
url: "grafx-media.json",
|
|
855
926
|
source: "local"
|
|
856
927
|
/* local */
|
|
857
928
|
};
|
|
858
|
-
class
|
|
929
|
+
class $n {
|
|
859
930
|
constructor(o) {
|
|
860
931
|
this.type = "grafxToken", this.token = o;
|
|
861
932
|
}
|
|
862
933
|
}
|
|
863
|
-
class
|
|
934
|
+
class Kn {
|
|
864
935
|
constructor() {
|
|
865
936
|
this.type = "refreshed";
|
|
866
937
|
}
|
|
867
938
|
}
|
|
868
|
-
var
|
|
869
|
-
class
|
|
939
|
+
var Or = /* @__PURE__ */ ((s) => (s.grafxToken = "grafxToken", s.refreshed = "refreshed", s))(Or || {}), Lr = /* @__PURE__ */ ((s) => (s.grafxToken = "grafxToken", s.any = "any", s))(Lr || {}), Fs = /* @__PURE__ */ ((s) => (s.minDimension = "minDimension", s))(Fs || {});
|
|
940
|
+
class Dr extends Error {
|
|
870
941
|
constructor(o, t) {
|
|
871
942
|
super(o), this.type = t;
|
|
872
943
|
}
|
|
873
944
|
}
|
|
874
|
-
class
|
|
945
|
+
class ye {
|
|
875
946
|
constructor() {
|
|
876
947
|
this.makeConnectorSourceForwardsCompatible = (o) => {
|
|
877
|
-
if (o.source !=
|
|
948
|
+
if (o.source != Vt.grafx || this.isSourceMigrated(o))
|
|
878
949
|
return o;
|
|
879
950
|
let t = o.url;
|
|
880
951
|
for (; t.endsWith("/"); )
|
|
881
952
|
t = t.substring(0, t.length - 1);
|
|
882
953
|
const e = t.split("/");
|
|
883
|
-
return { id: e[e.length - 1], source:
|
|
884
|
-
}, this.makeMultipleConnectorsBackwardsCompatible = (o, t) => o.map((e) => this.makeSingleConnectorBackwardsCompatible(e, t)), this.makeSingleConnectorBackwardsCompatible = (o, t) => o.source.source !=
|
|
954
|
+
return { id: e[e.length - 1], source: Vt.grafx };
|
|
955
|
+
}, this.makeMultipleConnectorsBackwardsCompatible = (o, t) => o.map((e) => this.makeSingleConnectorBackwardsCompatible(e, t)), this.makeSingleConnectorBackwardsCompatible = (o, t) => o.source.source != Vt.grafx ? o : {
|
|
885
956
|
id: o.id,
|
|
886
957
|
name: o.name,
|
|
887
958
|
iconUrl: o.iconUrl,
|
|
@@ -892,13 +963,13 @@ class he {
|
|
|
892
963
|
e = e.substring(0, e.length - 1);
|
|
893
964
|
return {
|
|
894
965
|
url: `${e}/connectors/${o.id}`,
|
|
895
|
-
source:
|
|
966
|
+
source: Vt.grafx
|
|
896
967
|
};
|
|
897
968
|
}, this.isSourceMigrated = (o) => "id" in o;
|
|
898
969
|
}
|
|
899
970
|
}
|
|
900
|
-
var J,
|
|
901
|
-
let
|
|
971
|
+
var J, It, gt, Cs;
|
|
972
|
+
let ze = (Cs = class {
|
|
902
973
|
/**
|
|
903
974
|
* @ignore
|
|
904
975
|
*/
|
|
@@ -907,47 +978,47 @@ let _e = (ls = class {
|
|
|
907
978
|
* @ignore
|
|
908
979
|
*/
|
|
909
980
|
u(this, J);
|
|
910
|
-
u(this,
|
|
981
|
+
u(this, It);
|
|
911
982
|
u(this, gt);
|
|
912
983
|
this.getById = async (e) => (await a(this, J)).getConnectorById(e).then((n) => i(n)).then((n) => {
|
|
913
984
|
const c = { ...n, parsedData: null };
|
|
914
985
|
return n.parsedData && (c.parsedData = a(this, gt).makeSingleConnectorBackwardsCompatible(
|
|
915
986
|
n.parsedData,
|
|
916
|
-
a(this,
|
|
987
|
+
a(this, It).get(tt.GraFxStudioEnvironmentApiUrl)
|
|
917
988
|
)), c;
|
|
918
989
|
}), this.getAllByType = async (e) => (await a(this, J)).getConnectors(e).then((n) => i(n)).then((n) => {
|
|
919
990
|
const c = { ...n, parsedData: null };
|
|
920
991
|
return n.parsedData && (c.parsedData = a(this, gt).makeMultipleConnectorsBackwardsCompatible(
|
|
921
992
|
n.parsedData,
|
|
922
|
-
a(this,
|
|
993
|
+
a(this, It).get(tt.GraFxStudioEnvironmentApiUrl)
|
|
923
994
|
)), c;
|
|
924
995
|
}), this.register = async (e) => {
|
|
925
996
|
const r = await a(this, J), n = a(this, gt).makeConnectorSourceForwardsCompatible(e);
|
|
926
997
|
return r.registerConnector(JSON.stringify(n)).then((c) => i(c));
|
|
927
998
|
}, this.unregister = async (e) => (await a(this, J)).unregisterConnector(e).then((n) => i(n)), this.configure = async (e, r) => {
|
|
928
999
|
const n = await a(this, J);
|
|
929
|
-
return await this.waitToBeReady(e), await r(new
|
|
1000
|
+
return await this.waitToBeReady(e), await r(new Nr(e, n)), n.updateConnectorConfiguration(e).then((c) => i(c));
|
|
930
1001
|
}, this.getState = async (e) => (await a(this, J)).getConnectorState(e).then((n) => i(n)), this.getOptions = async (e) => (await a(this, J)).getConnectorOptions(e).then((n) => i(n)), this.waitToBeReady = async (e, r = 2e3) => {
|
|
931
1002
|
let n = Math.max(r, 500);
|
|
932
1003
|
n = Math.min(n, 5e3);
|
|
933
1004
|
const c = 100;
|
|
934
|
-
let
|
|
1005
|
+
let h = 0;
|
|
935
1006
|
try {
|
|
936
|
-
for (;
|
|
937
|
-
const
|
|
938
|
-
if (
|
|
1007
|
+
for (; h * c < n; ) {
|
|
1008
|
+
const l = await this.getState(e);
|
|
1009
|
+
if (l.success && l.parsedData && (l.parsedData.type === he.running || l.parsedData.type === he.ready))
|
|
939
1010
|
return i(
|
|
940
1011
|
{ data: null, success: !0, error: void 0, status: 0, parsedData: void 0 },
|
|
941
1012
|
!1
|
|
942
1013
|
);
|
|
943
|
-
await new Promise((p) => setTimeout(p, c)),
|
|
1014
|
+
await new Promise((p) => setTimeout(p, c)), h++;
|
|
944
1015
|
}
|
|
945
|
-
} catch (
|
|
1016
|
+
} catch (l) {
|
|
946
1017
|
return i(
|
|
947
1018
|
{
|
|
948
1019
|
data: null,
|
|
949
1020
|
success: !1,
|
|
950
|
-
error: `Error while getting connector state ${
|
|
1021
|
+
error: `Error while getting connector state ${l}`,
|
|
951
1022
|
status: 5e4,
|
|
952
1023
|
parsedData: void 0
|
|
953
1024
|
},
|
|
@@ -965,13 +1036,13 @@ let _e = (ls = class {
|
|
|
965
1036
|
!1
|
|
966
1037
|
);
|
|
967
1038
|
}, this.updateMappings = async (e, r) => await this.configure(e, async (n) => {
|
|
968
|
-
const { parsedData: c } = await this.getMappings(e),
|
|
1039
|
+
const { parsedData: c } = await this.getMappings(e), h = (c == null ? void 0 : c.filter(
|
|
969
1040
|
(y) => !r.some(
|
|
970
1041
|
(v) => v.name === y.name && v.direction === y.direction
|
|
971
1042
|
)
|
|
972
|
-
)) ?? [],
|
|
1043
|
+
)) ?? [], l = r.filter((y) => y.name !== "" && y.value !== ""), p = [...h, ...l];
|
|
973
1044
|
await n.setMappings(p);
|
|
974
|
-
}), g(this, J, o), g(this,
|
|
1045
|
+
}), g(this, J, o), g(this, It, t), g(this, gt, new ye());
|
|
975
1046
|
}
|
|
976
1047
|
async getMappings(o, t) {
|
|
977
1048
|
return (await a(this, J)).getConnectorMappings(o).then((r) => i(r)).then(
|
|
@@ -984,9 +1055,9 @@ let _e = (ls = class {
|
|
|
984
1055
|
}
|
|
985
1056
|
);
|
|
986
1057
|
}
|
|
987
|
-
}, J = new WeakMap(),
|
|
1058
|
+
}, J = new WeakMap(), It = new WeakMap(), gt = new WeakMap(), Cs);
|
|
988
1059
|
var yt, pt;
|
|
989
|
-
class
|
|
1060
|
+
class Nr {
|
|
990
1061
|
/**
|
|
991
1062
|
* @ignore
|
|
992
1063
|
*/
|
|
@@ -1008,8 +1079,8 @@ class Ar {
|
|
|
1008
1079
|
}
|
|
1009
1080
|
}
|
|
1010
1081
|
yt = new WeakMap(), pt = new WeakMap();
|
|
1011
|
-
var nt,
|
|
1012
|
-
class
|
|
1082
|
+
var nt, Ht;
|
|
1083
|
+
class We {
|
|
1013
1084
|
/**
|
|
1014
1085
|
* @ignore
|
|
1015
1086
|
*/
|
|
@@ -1018,21 +1089,21 @@ class He {
|
|
|
1018
1089
|
* @ignore
|
|
1019
1090
|
*/
|
|
1020
1091
|
u(this, nt);
|
|
1021
|
-
u(this,
|
|
1022
|
-
this.getPage = async (e, r, n = {}) => (await a(this, nt)).dataConnectorGetPage(e, JSON.stringify(r), JSON.stringify(n)).then((
|
|
1023
|
-
const
|
|
1024
|
-
return
|
|
1025
|
-
data:
|
|
1026
|
-
(p) => a(this,
|
|
1092
|
+
u(this, Ht);
|
|
1093
|
+
this.getPage = async (e, r, n = {}) => (await a(this, nt)).dataConnectorGetPage(e, JSON.stringify(r), JSON.stringify(n)).then((h) => i(h)).then((h) => {
|
|
1094
|
+
const l = { ...h, parsedData: null };
|
|
1095
|
+
return h.parsedData && (l.parsedData = {
|
|
1096
|
+
data: h.parsedData.data.map(
|
|
1097
|
+
(p) => a(this, Ht).mapEngineToDataItem(p)
|
|
1027
1098
|
),
|
|
1028
|
-
continuationToken:
|
|
1029
|
-
}),
|
|
1030
|
-
}), this.getModel = async (e, r = {}) => (await a(this, nt)).dataConnectorGetModel(e, JSON.stringify(r)).then((c) => i(c)), this.getConfigurationOptions = async (e) => (await a(this, nt)).dataConnectorGetConfigurationOptions(e).then((n) => i(n)), this.getCapabilities = async (e) => (await a(this, nt)).dataConnectorGetCapabilities(e).then((n) => i(n)), g(this, nt, o), g(this,
|
|
1099
|
+
continuationToken: h.parsedData.continuationToken
|
|
1100
|
+
}), l;
|
|
1101
|
+
}), this.getModel = async (e, r = {}) => (await a(this, nt)).dataConnectorGetModel(e, JSON.stringify(r)).then((c) => i(c)), this.getConfigurationOptions = async (e) => (await a(this, nt)).dataConnectorGetConfigurationOptions(e).then((n) => i(n)), this.getCapabilities = async (e) => (await a(this, nt)).dataConnectorGetCapabilities(e).then((n) => i(n)), g(this, nt, o), g(this, Ht, t);
|
|
1031
1102
|
}
|
|
1032
1103
|
}
|
|
1033
|
-
nt = new WeakMap(),
|
|
1034
|
-
var at,
|
|
1035
|
-
class
|
|
1104
|
+
nt = new WeakMap(), Ht = new WeakMap();
|
|
1105
|
+
var at, Tt;
|
|
1106
|
+
class je {
|
|
1036
1107
|
/**
|
|
1037
1108
|
* @ignore
|
|
1038
1109
|
*/
|
|
@@ -1041,16 +1112,16 @@ class Te {
|
|
|
1041
1112
|
* @ignore
|
|
1042
1113
|
*/
|
|
1043
1114
|
u(this, at);
|
|
1044
|
-
u(this,
|
|
1115
|
+
u(this, Tt);
|
|
1045
1116
|
this.setDataSource = async (e) => (await a(this, at)).setDataSource(e).then((n) => i(n)), this.getDataSource = async () => (await a(this, at)).getDataSource().then((r) => i(r)), this.removeDataSource = async () => (await a(this, at)).removeDataSource().then((r) => i(r)), this.setDataRow = async (e) => {
|
|
1046
|
-
const r = await a(this, at), n = a(this,
|
|
1117
|
+
const r = await a(this, at), n = a(this, Tt).mapDataItemToEngine(e);
|
|
1047
1118
|
return r.setDataRow(JSON.stringify(n)).then((c) => i(c));
|
|
1048
|
-
}, g(this, at, o), g(this,
|
|
1119
|
+
}, g(this, at, o), g(this, Tt, t);
|
|
1049
1120
|
}
|
|
1050
1121
|
}
|
|
1051
|
-
at = new WeakMap(),
|
|
1122
|
+
at = new WeakMap(), Tt = new WeakMap();
|
|
1052
1123
|
var it;
|
|
1053
|
-
class
|
|
1124
|
+
class qe {
|
|
1054
1125
|
/**
|
|
1055
1126
|
* @ignore
|
|
1056
1127
|
*/
|
|
@@ -1063,8 +1134,8 @@ class Ke {
|
|
|
1063
1134
|
}
|
|
1064
1135
|
}
|
|
1065
1136
|
it = new WeakMap();
|
|
1066
|
-
var
|
|
1067
|
-
class
|
|
1137
|
+
var wt;
|
|
1138
|
+
class Ye {
|
|
1068
1139
|
/**
|
|
1069
1140
|
* @ignore
|
|
1070
1141
|
*/
|
|
@@ -1072,30 +1143,30 @@ class $e {
|
|
|
1072
1143
|
/**
|
|
1073
1144
|
* @ignore
|
|
1074
1145
|
*/
|
|
1075
|
-
u(this,
|
|
1076
|
-
this.getCurrentState = async () => (await a(this,
|
|
1077
|
-
const r = await a(this,
|
|
1146
|
+
u(this, wt);
|
|
1147
|
+
this.getCurrentState = async () => (await a(this, wt)).getCurrentDocumentState().then((e) => i(e)), this.load = async (t, e = { keepConnectors: !1 }) => {
|
|
1148
|
+
const r = await a(this, wt), n = typeof t != "string" ? JSON.stringify(t) : t;
|
|
1078
1149
|
return r.loadDocument(n, JSON.stringify(e)).then((c) => i(c));
|
|
1079
1150
|
}, this.createAndLoad = async (t) => {
|
|
1080
|
-
const e = await a(this,
|
|
1151
|
+
const e = await a(this, wt), r = JSON.stringify(t);
|
|
1081
1152
|
return e.createAndLoadDocument(r).then((n) => i(n));
|
|
1082
|
-
}, g(this,
|
|
1153
|
+
}, g(this, wt, o);
|
|
1083
1154
|
}
|
|
1084
1155
|
}
|
|
1085
|
-
|
|
1086
|
-
var
|
|
1087
|
-
class
|
|
1156
|
+
wt = new WeakMap();
|
|
1157
|
+
var Mr = /* @__PURE__ */ ((s) => (s.top = "top", s.bottom = "bottom", s.left = "left", s.right = "right", s))(Mr || {}), te = /* @__PURE__ */ ((s) => (s.url = "url", s.variable = "variable", s.connector = "connector", s.brandKitMedia = "brandKitMedia", s))(te || {}), xr = /* @__PURE__ */ ((s) => (s.connector = "connector", s))(xr || {}), Rr = /* @__PURE__ */ ((s) => (s.text = "text", s.image = "image", s.shape = "shape", s.barcode = "barcode", s.component = "component", s))(Rr || {}), Vr = /* @__PURE__ */ ((s) => (s.variable = "variable", s.text = "text", s))(Vr || {}), Jr = /* @__PURE__ */ ((s) => (s.leftToRight = "leftToRight", s.rightToLeft = "rightToLeft", s.weak = "weak", s))(Jr || {}), Gr = /* @__PURE__ */ ((s) => (s.horizontal = "horizontal", s.vertical = "vertical", s.onPath = "onPath", s))(Gr || {}), Br = /* @__PURE__ */ ((s) => (s.top = "top", s.bottom = "bottom", s.middle = "middle", s.justify = "justify", s))(Br || {}), Ur = /* @__PURE__ */ ((s) => (s.normal = "normal", s.screen = "screen", s.overlay = "overlay", s.darken = "darken", s.lighten = "lighten", s.colorDodge = "colorDodge", s.colorBurn = "colorBurn", s.hardLight = "hardLight", s.softLight = "softLight", s.difference = "difference", s.exclusion = "exclusion", s.multiply = "multiply", s.hue = "hue", s.saturation = "saturation", s.color = "color", s.luminosity = "luminosity", s))(Ur || {}), kr = /* @__PURE__ */ ((s) => (s.fill = "fill", s.fit = "fit", s.smartCrop = "smartCrop", s.manualCrop = "manualCrop", s))(kr || {}), _r = /* @__PURE__ */ ((s) => (s.topLeft = "topLeft", s.topCenter = "topCenter", s.topRight = "topRight", s.centerLeft = "centerLeft", s.center = "center", s.centerRight = "centerRight", s.bottomLeft = "bottomLeft", s.bottomCenter = "bottomCenter", s.bottomRight = "bottomRight", s))(_r || {}), Hr = /* @__PURE__ */ ((s) => (s.bringToFront = "bringToFront", s.sendToBack = "sendToBack", s.bringForward = "bringForward", s.sendBackward = "sendBackward", s))(Hr || {}), Tr = /* @__PURE__ */ ((s) => (s.relative = "relative", s.start = "start", s.end = "end", s.startAndEnd = "startAndEnd", s.center = "center", s))(Tr || {}), $r = /* @__PURE__ */ ((s) => (s.page = "page", s.frame = "frame", s))($r || {}), Kr = /* @__PURE__ */ ((s) => (s.start = "start", s.end = "end", s.center = "center", s))(Kr || {});
|
|
1158
|
+
class Wn {
|
|
1088
1159
|
constructor() {
|
|
1089
1160
|
this.type = "page";
|
|
1090
1161
|
}
|
|
1091
1162
|
}
|
|
1092
|
-
class
|
|
1163
|
+
class jn {
|
|
1093
1164
|
constructor(o, t) {
|
|
1094
1165
|
this.type = "frame", this.frameId = o, this.edge = t;
|
|
1095
1166
|
}
|
|
1096
1167
|
}
|
|
1097
|
-
var
|
|
1098
|
-
class
|
|
1168
|
+
var Es = /* @__PURE__ */ ((s) => (s.frameCrop = "frameCrop", s.assetCrop = "assetCrop", s))(Es || {}), G;
|
|
1169
|
+
class Ze {
|
|
1099
1170
|
/**
|
|
1100
1171
|
* @ignore
|
|
1101
1172
|
*/
|
|
@@ -1103,16 +1174,16 @@ class ze {
|
|
|
1103
1174
|
/**
|
|
1104
1175
|
* @ignore
|
|
1105
1176
|
*/
|
|
1106
|
-
u(this,
|
|
1177
|
+
u(this, G);
|
|
1107
1178
|
this.insertImageVariableToFrame = async (t, e) => {
|
|
1108
|
-
const r = await a(this,
|
|
1179
|
+
const r = await a(this, G), n = { id: e, type: te.variable };
|
|
1109
1180
|
return r.setImageSource(t, JSON.stringify(n)).then((c) => i(c));
|
|
1110
|
-
}, this.insertTextVariable = async (t) => (await a(this,
|
|
1181
|
+
}, this.insertTextVariable = async (t) => (await a(this, G)).insertTextVariable(t).then((r) => i(r)), this.enterTextEditMode = async (t) => (await a(this, G)).enterTextEditMode(t).then((r) => i(r)), this.exitTextEditMode = async () => (await a(this, G)).exitTextEditMode().then((e) => i(e)), this.getText = async (t, e) => (await a(this, G)).getTextByFrameId(t, e).then((n) => i(n)), this.setText = async (t, e) => (await a(this, G)).setTextByFrameId(t, e).then((n) => i(n)), this.selectText = async (t, e, r) => (await a(this, G)).selectTextById(t, e, r).then((c) => i(c)), this.addCustomUndoData = async (t, e, r) => (await a(this, G)).setCustomUndoData(t, e, r ?? !1).then((c) => i(c)), g(this, G, o);
|
|
1111
1182
|
}
|
|
1112
1183
|
}
|
|
1113
|
-
|
|
1114
|
-
var ot,
|
|
1115
|
-
class
|
|
1184
|
+
G = new WeakMap();
|
|
1185
|
+
var ot, At;
|
|
1186
|
+
class Qe {
|
|
1116
1187
|
/**
|
|
1117
1188
|
* @ignore
|
|
1118
1189
|
*/
|
|
@@ -1121,16 +1192,16 @@ class We {
|
|
|
1121
1192
|
* @ignore
|
|
1122
1193
|
*/
|
|
1123
1194
|
u(this, ot);
|
|
1124
|
-
u(this,
|
|
1125
|
-
this.query = async (t, e, r = {}) => (await a(this, ot)).fontConnectorQuery(t, JSON.stringify(e), JSON.stringify(r)).then((c) => i(c)), this.detail = async (t, e, r = {}) => (await a(this, ot)).fontConnectorDetail(t, e, JSON.stringify(r)).then((c) => i(c)), this.download = async (t, e, r = {}) => (await a(this,
|
|
1126
|
-
if (t ===
|
|
1127
|
-
if (t ===
|
|
1128
|
-
}, g(this, ot, o), g(this,
|
|
1195
|
+
u(this, At);
|
|
1196
|
+
this.query = async (t, e, r = {}) => (await a(this, ot)).fontConnectorQuery(t, JSON.stringify(e), JSON.stringify(r)).then((c) => i(c)), this.detail = async (t, e, r = {}) => (await a(this, ot)).fontConnectorDetail(t, e, JSON.stringify(r)).then((c) => i(c)), this.download = async (t, e, r = {}) => (await a(this, At)).fontConnectorDownload(t, e, JSON.stringify(r)).then((c) => c ?? c), this.preview = async (t, e, r, n = {}) => (await a(this, At)).fontConnectorPreview(t, e, r, JSON.stringify(n)).then((h) => h ?? h), this.getConfigurationOptions = async (t) => (await a(this, ot)).fontConnectorGetConfigurationOptions(t).then((r) => i(r)), this.getCapabilities = async (t) => (await a(this, ot)).fontConnectorGetCapabilities(t).then((r) => i(r)), this.parseDeprecatedFontType = (t) => {
|
|
1197
|
+
if (t === Bt.file) return Ut.file;
|
|
1198
|
+
if (t === Bt.collection) return Ut.collection;
|
|
1199
|
+
}, g(this, ot, o), g(this, At, o);
|
|
1129
1200
|
}
|
|
1130
1201
|
}
|
|
1131
|
-
ot = new WeakMap(),
|
|
1202
|
+
ot = new WeakMap(), At = new WeakMap();
|
|
1132
1203
|
var F;
|
|
1133
|
-
class
|
|
1204
|
+
class Xe {
|
|
1134
1205
|
/**
|
|
1135
1206
|
* @ignore
|
|
1136
1207
|
*/
|
|
@@ -1143,8 +1214,8 @@ class je {
|
|
|
1143
1214
|
}
|
|
1144
1215
|
}
|
|
1145
1216
|
F = new WeakMap();
|
|
1146
|
-
var
|
|
1147
|
-
class
|
|
1217
|
+
var Pt;
|
|
1218
|
+
class le {
|
|
1148
1219
|
/**
|
|
1149
1220
|
* @ignore
|
|
1150
1221
|
*/
|
|
@@ -1152,8 +1223,8 @@ class ie {
|
|
|
1152
1223
|
/**
|
|
1153
1224
|
* @ignore
|
|
1154
1225
|
*/
|
|
1155
|
-
u(this,
|
|
1156
|
-
this.setShapeProperties = async (t, e) => (await a(this,
|
|
1226
|
+
u(this, Pt);
|
|
1227
|
+
this.setShapeProperties = async (t, e) => (await a(this, Pt)).setShapeProperties(t, JSON.stringify(e)).then((n) => i(n)), this.setEnableFill = async (t, e) => {
|
|
1157
1228
|
const r = { enableFill: e };
|
|
1158
1229
|
return this.setShapeProperties(t, r);
|
|
1159
1230
|
}, this.setFillColor = async (t, e) => {
|
|
@@ -1171,7 +1242,7 @@ class ie {
|
|
|
1171
1242
|
}, this.setFlagAllCornersSame = async (t, e) => {
|
|
1172
1243
|
const r = { allCornersSame: e };
|
|
1173
1244
|
return this.setShapeProperties(t, r);
|
|
1174
|
-
}, this.setShapeCorners = async (t, e) => (await a(this,
|
|
1245
|
+
}, this.setShapeCorners = async (t, e) => (await a(this, Pt)).setShapeCorners(t, JSON.stringify(e)).then((n) => i(n)), this.setRadiusAll = async (t, e) => {
|
|
1175
1246
|
const r = { radiusAll: e };
|
|
1176
1247
|
return this.setShapeCorners(t, r);
|
|
1177
1248
|
}, this.setRadiusTopLeft = async (t, e) => {
|
|
@@ -1186,12 +1257,12 @@ class ie {
|
|
|
1186
1257
|
}, this.setRadiusBottomRight = async (t, e) => {
|
|
1187
1258
|
const r = { bottomRight: e };
|
|
1188
1259
|
return this.setShapeCorners(t, r);
|
|
1189
|
-
}, g(this,
|
|
1260
|
+
}, g(this, Pt, o);
|
|
1190
1261
|
}
|
|
1191
1262
|
}
|
|
1192
|
-
|
|
1193
|
-
var
|
|
1194
|
-
class
|
|
1263
|
+
Pt = new WeakMap();
|
|
1264
|
+
var d;
|
|
1265
|
+
class ts {
|
|
1195
1266
|
/**
|
|
1196
1267
|
* @ignore
|
|
1197
1268
|
*/
|
|
@@ -1199,48 +1270,48 @@ class qe {
|
|
|
1199
1270
|
/**
|
|
1200
1271
|
* @ignore
|
|
1201
1272
|
*/
|
|
1202
|
-
u(this,
|
|
1203
|
-
this.getAll = async () => (await a(this,
|
|
1204
|
-
const r = await a(this,
|
|
1273
|
+
u(this, d);
|
|
1274
|
+
this.getAll = async () => (await a(this, d)).getFrames().then((e) => i(e)), this.getSelected = async () => (await a(this, d)).getSelectedFrames().then((e) => i(e)), this.getAllByPageId = async (t) => (await a(this, d)).getFramesByPageId(t).then((r) => i(r)), this.getByName = async (t) => (await a(this, d)).getFrameByName(t).then((r) => i(r)), this.getById = async (t) => (await a(this, d)).getFrameById(t).then((r) => i(r)), this.getPropertiesOnSelectedLayout = async () => (await a(this, d)).getFramePropertiesOnSelectedLayout().then((e) => i(e)), this.getLayoutProperties = async (t, e) => (await a(this, d)).getFramePropertiesByFrameId(t, e).then((n) => i(n)), this.getAllLayoutProperties = async (t) => (await a(this, d)).getFramesProperties(t).then((r) => i(r)), this.resetTransformation = async (t) => (await a(this, d)).resetFrameTransformation(t).then((r) => i(r)), this.resetSize = async (t) => (await a(this, d)).resetFrameTransformation(t).then((r) => i(r)), this.select = async (t) => (await a(this, d)).selectFrames([t]).then((r) => i(r)), this.selectMultiple = async (t) => (await a(this, d)).selectFrames(t).then((r) => i(r)), this.deselectAll = async () => (await a(this, d)).deselectFrames().then((e) => i(e)), this.reorderFrames = async (t, e) => (await a(this, d)).reorderFrames(t, e).then((n) => i(n)), this.setZIndex = async (t, e) => (await a(this, d)).setFrameZIndex(t, e).then((n) => i(n)), this.setHeight = async (t, e) => (await a(this, d)).setFrameHeight(t, e).then((n) => i(n)), this.setRotation = async (t, e) => (await a(this, d)).setFrameRotation(t, e).then((n) => i(n)), this.setWidth = async (t, e) => (await a(this, d)).setFrameWidth(t, e).then((n) => i(n)), this.setX = async (t, e) => (await a(this, d)).setFrameX(t, e).then((n) => i(n)), this.setY = async (t, e) => (await a(this, d)).setFrameY(t, e).then((n) => i(n)), this.setOpacity = async (t, e) => (await a(this, d)).setFrameOpacity(t, e).then((n) => i(n)), this.rename = async (t, e) => (await a(this, d)).renameFrame(t, e).then((n) => i(n)), this.reset = async (t) => (await a(this, d)).resetFrame(t).then((r) => i(r)), this.resetX = async (t) => (await a(this, d)).resetFrameTransformation(t).then((r) => i(r)), this.resetY = async (t) => (await a(this, d)).resetFrameTransformation(t).then((r) => i(r)), this.resetRotation = async (t) => (await a(this, d)).resetFrameTransformation(t).then((r) => i(r)), this.resetWidth = async (t) => (await a(this, d)).resetFrameTransformation(t).then((r) => i(r)), this.resetHeight = async (t) => (await a(this, d)).resetFrameTransformation(t).then((r) => i(r)), this.resetImageFrameFitMode = async (t) => (await a(this, d)).resetImageFrameFitMode(t).then((r) => i(r)), this.setVisibility = async (t, e) => (await a(this, d)).setFrameIsVisible(t, e).then((n) => i(n)), this.setIsVisible = async (t, e) => (await a(this, d)).setFrameIsVisible(t, e).then((n) => i(n)), this.remove = async (t) => (await a(this, d)).removeFrames([t]).then((r) => i(r)), this.removeFrames = async (t) => (await a(this, d)).removeFrames(t).then((r) => i(r)), this.create = async (t, e, r, n, c) => (await a(this, d)).addFrame(t, e, r, n, c).then((l) => i(l)), this.createShapeFrame = async (t, e, r, n, c) => (await a(this, d)).addFrame(t, e, r, n, c).then((l) => i(l)), this.createBarcodeFrame = async (t, e) => (await a(this, d)).addBarcodeFrame(t, e == null ? void 0 : e.x, e == null ? void 0 : e.y).then((n) => i(n)), this.createComponentFrame = async (t, e, r, n, c) => (await a(this, d)).addComponentFrame(e, r, n, c, JSON.stringify(t)).then((l) => i(l)), this.duplicateFrames = async (t) => (await a(this, d)).duplicateFrames(t).then((r) => i(r)), this.updateImageSource = async (t, e) => {
|
|
1275
|
+
const r = await a(this, d), n = e !== null ? JSON.stringify(e) : null;
|
|
1205
1276
|
return r.setImageSource(t, n).then((c) => i(c));
|
|
1206
1277
|
}, this.removeImageSource = async (t) => this.updateImageSource(t, null), this.setImageFromConnector = async (t, e, r) => {
|
|
1207
1278
|
const n = {
|
|
1208
1279
|
id: e,
|
|
1209
1280
|
assetId: r,
|
|
1210
|
-
type:
|
|
1281
|
+
type: te.connector
|
|
1211
1282
|
};
|
|
1212
1283
|
return this.updateImageSource(t, n);
|
|
1213
1284
|
}, this.setImageFromUrl = async (t, e) => {
|
|
1214
|
-
const r = { url: e, type:
|
|
1285
|
+
const r = { url: e, type: te.url };
|
|
1215
1286
|
return this.updateImageSource(t, r);
|
|
1216
|
-
}, this.setImageFrameFitMode = async (t, e) => (await a(this,
|
|
1287
|
+
}, this.setImageFrameFitMode = async (t, e) => (await a(this, d)).setImageFrameFitMode(t, e).then((n) => i(n)), this.setImageFrameFitModePosition = async (t, e) => (await a(this, d)).setImageFrameFitModePosition(t, e).then((n) => i(n)), this.setFrameConstrainProportions = async (t, e) => (console.error("setFrameConstrainProportions is not supported anymore"), i({
|
|
1217
1288
|
success: !1,
|
|
1218
1289
|
status: 0,
|
|
1219
1290
|
error: "setFrameConstrainProportions is not supported anymore",
|
|
1220
1291
|
parsedData: null
|
|
1221
|
-
})), this.setVerticalAlign = async (t, e) => (await a(this,
|
|
1292
|
+
})), this.setVerticalAlign = async (t, e) => (await a(this, d)).setVerticalAlignment(t, e).then((n) => i(n)), this.setMinCopyfitting = async (t, e) => (await a(this, d)).setMinCopyfitting(t, e).then((n) => i(n)), this.setMaxCopyfitting = async (t, e) => (await a(this, d)).setMaxCopyfitting(t, e).then((n) => i(n)), this.setEnableCopyfitting = async (t, e) => (await a(this, d)).setEnableCopyfitting(t, e).then((n) => i(n)), this.resetMinCopyfitting = async (t) => (await a(this, d)).resetMinCopyfitting(t).then((r) => i(r)), this.resetMaxCopyfitting = async (t) => (await a(this, d)).resetMaxCopyfitting(t).then((r) => i(r)), this.resetEnableCopyfitting = async (t) => (await a(this, d)).resetEnableCopyfitting(t).then((r) => i(r)), this.setShapeFrameEnableFill = async (t, e) => this.shapeController.setEnableFill(t, e), this.setShapeFrameFillColor = async (t, e) => this.shapeController.setFillColor(t, e), this.setShapeFrameEnableStroke = async (t, e) => this.shapeController.setEnableStroke(t, e), this.setShapeFrameStrokeColor = async (t, e) => this.shapeController.setStrokeColor(t, e), this.setShapeFrameStrokeWeight = async (t, e) => this.shapeController.setStrokeWeight(t, e), this.setBlendMode = async (t, e) => (await a(this, d)).setFrameBlendMode(t, e).then((n) => i(n)), this.enterCropMode = async (t, e = Es.frameCrop) => (await a(this, d)).enterCropMode(t, e).then((n) => i(n)), this.applyCropMode = async () => (await a(this, d)).applyCropMode().then((e) => i(e)), this.exitCropMode = async () => (await a(this, d)).cancelCropMode().then((e) => i(e)), this.enterSubjectMode = async (t) => (await a(this, d)).enterSubjectMode(t).then((r) => i(r)), this.applySubjectMode = async () => (await a(this, d)).applySubjectMode().then((e) => i(e)), this.exitSubjectMode = async () => (await a(this, d)).cancelSubjectMode().then((e) => i(e)), this.enterGradientMode = async (t) => (await a(this, d)).enterGradientMode(t).then((r) => i(r)), this.applyGradientMode = async () => (await a(this, d)).applyGradientMode().then((e) => i(e)), this.cancelGradientMode = async () => (await a(this, d)).cancelGradientMode().then((e) => i(e)), this.resetCropMode = async (t) => (console.error("resetCropMode is not supported anymore"), i({
|
|
1222
1293
|
success: !1,
|
|
1223
1294
|
status: 0,
|
|
1224
1295
|
error: "resetCropMode is not supported anymore",
|
|
1225
1296
|
parsedData: null
|
|
1226
1297
|
})), this.setEnableAutoGrow = async (t, e) => {
|
|
1227
1298
|
const r = { enabled: { value: e } };
|
|
1228
|
-
return (await a(this,
|
|
1299
|
+
return (await a(this, d)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => i(c));
|
|
1229
1300
|
}, this.setAutoGrowMinWidth = async (t, e) => {
|
|
1230
1301
|
const r = { minWidth: { value: e } };
|
|
1231
|
-
return (await a(this,
|
|
1302
|
+
return (await a(this, d)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => i(c));
|
|
1232
1303
|
}, this.setAutoGrowMaxWidth = async (t, e) => {
|
|
1233
1304
|
const r = { maxWidth: { value: e } };
|
|
1234
|
-
return (await a(this,
|
|
1305
|
+
return (await a(this, d)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => i(c));
|
|
1235
1306
|
}, this.setAutoGrowMinHeight = async (t, e) => {
|
|
1236
1307
|
const r = { minHeight: { value: e } };
|
|
1237
|
-
return (await a(this,
|
|
1308
|
+
return (await a(this, d)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => i(c));
|
|
1238
1309
|
}, this.setAutoGrowMaxHeight = async (t, e) => {
|
|
1239
1310
|
const r = { maxHeight: { value: e } };
|
|
1240
|
-
return (await a(this,
|
|
1311
|
+
return (await a(this, d)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => i(c));
|
|
1241
1312
|
}, this.setAutoGrowDirections = async (t, e) => {
|
|
1242
1313
|
const r = { directions: { value: e } };
|
|
1243
|
-
return (await a(this,
|
|
1314
|
+
return (await a(this, d)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => i(c));
|
|
1244
1315
|
}, this.resetAutoGrowSettingsEnabled = async (t) => (console.error("resetAutoGrowSettingsEnabled is not supported anymore"), i({
|
|
1245
1316
|
success: !1,
|
|
1246
1317
|
status: 0,
|
|
@@ -1278,42 +1349,42 @@ class qe {
|
|
|
1278
1349
|
parsedData: null
|
|
1279
1350
|
})), this.setShadowEnabled = async (t, e) => {
|
|
1280
1351
|
const r = { enabled: { value: e } };
|
|
1281
|
-
return (await a(this,
|
|
1352
|
+
return (await a(this, d)).updateFrameShadowSettings(t, JSON.stringify(r)).then((c) => i(c));
|
|
1282
1353
|
}, this.setShadowDistance = async (t, e) => {
|
|
1283
1354
|
const r = { distance: { value: e } };
|
|
1284
|
-
return (await a(this,
|
|
1355
|
+
return (await a(this, d)).updateFrameShadowSettings(t, JSON.stringify(r)).then((c) => i(c));
|
|
1285
1356
|
}, this.setShadowAngleDegrees = async (t, e) => {
|
|
1286
1357
|
const r = { angleDegrees: { value: e } };
|
|
1287
|
-
return (await a(this,
|
|
1358
|
+
return (await a(this, d)).updateFrameShadowSettings(t, JSON.stringify(r)).then((c) => i(c));
|
|
1288
1359
|
}, this.setShadowBlurRadius = async (t, e) => {
|
|
1289
1360
|
const r = { blurRadius: { value: e } };
|
|
1290
|
-
return (await a(this,
|
|
1361
|
+
return (await a(this, d)).updateFrameShadowSettings(t, JSON.stringify(r)).then((c) => i(c));
|
|
1291
1362
|
}, this.setShadowColor = async (t, e) => {
|
|
1292
1363
|
const r = { color: { value: e } };
|
|
1293
|
-
return (await a(this,
|
|
1364
|
+
return (await a(this, d)).updateFrameShadowSettings(t, JSON.stringify(r)).then((c) => i(c));
|
|
1294
1365
|
}, this.setAnchor = async (t, e, r, n, c) => {
|
|
1295
|
-
const
|
|
1366
|
+
const h = {
|
|
1296
1367
|
horizontal: e,
|
|
1297
1368
|
type: r,
|
|
1298
1369
|
target: n,
|
|
1299
1370
|
endTarget: c
|
|
1300
1371
|
};
|
|
1301
|
-
return (await a(this,
|
|
1302
|
-
}, this.setVerticalAnchor = async (t, e, r, n) => this.setAnchor(t, !1, e, r, n), this.setHorizontalAnchor = async (t, e, r, n) => this.setAnchor(t, !0, e, r, n), this.resetAnchoring = async (t) => (await a(this,
|
|
1372
|
+
return (await a(this, d)).setAnchorProperties(t, JSON.stringify(h)).then((p) => i(p));
|
|
1373
|
+
}, this.setVerticalAnchor = async (t, e, r, n) => this.setAnchor(t, !1, e, r, n), this.setHorizontalAnchor = async (t, e, r, n) => this.setAnchor(t, !0, e, r, n), this.resetAnchoring = async (t) => (await a(this, d)).resetFrameTransformation(t).then((r) => i(r)), this.resetVisibility = async (t) => (await a(this, d)).setFrameIsVisible(t, null).then((r) => i(r)), this.getConfiguration = async (t) => (await a(this, d)).getFrameConfiguration(t).then((r) => i(r)), this.resetAssetCropOverride = async (t) => (await a(this, d)).resetAssetCropOverride(t).then((r) => i(r)), this.resetAllAssetCropOverrides = async (t) => (await a(this, d)).resetAllAssetCropOverrides(t).then((r) => i(r)), this.setGradientApplied = async (t, e) => {
|
|
1303
1374
|
const r = { isApplied: e };
|
|
1304
|
-
return (await a(this,
|
|
1375
|
+
return (await a(this, d)).updateFrameGradientSettings(t, JSON.stringify(r)).then((c) => i(c));
|
|
1305
1376
|
}, this.setLocalGradient = async (t, e) => {
|
|
1306
1377
|
const r = { gradient: e };
|
|
1307
|
-
return (await a(this,
|
|
1378
|
+
return (await a(this, d)).updateFrameGradientSettings(t, JSON.stringify(r)).then((c) => i(c));
|
|
1308
1379
|
}, this.setBrandKitGradient = async (t, e) => {
|
|
1309
1380
|
const r = { id: e };
|
|
1310
|
-
return (await a(this,
|
|
1311
|
-
}, g(this,
|
|
1381
|
+
return (await a(this, d)).updateFrameGradientSettings(t, JSON.stringify(r)).then((c) => i(c));
|
|
1382
|
+
}, g(this, d, o), this.shapeController = new le(a(this, d)), this.constraints = new zr(a(this, d));
|
|
1312
1383
|
}
|
|
1313
1384
|
}
|
|
1314
|
-
|
|
1315
|
-
var
|
|
1316
|
-
class
|
|
1385
|
+
d = new WeakMap();
|
|
1386
|
+
var _;
|
|
1387
|
+
class zr {
|
|
1317
1388
|
/**
|
|
1318
1389
|
* @ignore
|
|
1319
1390
|
*/
|
|
@@ -1321,33 +1392,36 @@ class Gr {
|
|
|
1321
1392
|
/**
|
|
1322
1393
|
* @ignore
|
|
1323
1394
|
*/
|
|
1324
|
-
u(this,
|
|
1325
|
-
this.get = async (t) => (await a(this,
|
|
1326
|
-
const r = {
|
|
1327
|
-
return (await a(this,
|
|
1395
|
+
u(this, _);
|
|
1396
|
+
this.get = async (t) => (await a(this, _)).getFrameConstraints(t).then((r) => i(r)), this.setSelectable = async (t, e) => {
|
|
1397
|
+
const r = { selectionAllowed: { value: e } };
|
|
1398
|
+
return (await a(this, _)).updateFrameConstraints(t, JSON.stringify(r)).then((c) => i(c));
|
|
1328
1399
|
}, this.setHorizontalMovement = async (t, e) => {
|
|
1329
1400
|
const r = { horizontalMovementAllowed: { value: e } };
|
|
1330
|
-
return (await a(this,
|
|
1401
|
+
return (await a(this, _)).updateFrameConstraints(t, JSON.stringify(r)).then((c) => i(c));
|
|
1331
1402
|
}, this.setVerticalMovement = async (t, e) => {
|
|
1332
1403
|
const r = { verticalMovementAllowed: { value: e } };
|
|
1333
|
-
return (await a(this,
|
|
1404
|
+
return (await a(this, _)).updateFrameConstraints(t, JSON.stringify(r)).then((c) => i(c));
|
|
1334
1405
|
}, this.setRotation = async (t, e) => {
|
|
1335
1406
|
const r = { rotationAllowed: { value: e } };
|
|
1336
|
-
return (await a(this,
|
|
1407
|
+
return (await a(this, _)).updateFrameConstraints(t, JSON.stringify(r)).then((c) => i(c));
|
|
1337
1408
|
}, this.setResize = async (t, e) => {
|
|
1338
1409
|
const r = { resizeAllowed: { value: e } };
|
|
1339
|
-
return (await a(this,
|
|
1340
|
-
},
|
|
1410
|
+
return (await a(this, _)).updateFrameConstraints(t, JSON.stringify(r)).then((c) => i(c));
|
|
1411
|
+
}, this.setCrop = async (t, e) => {
|
|
1412
|
+
const r = { cropAllowed: { value: e } };
|
|
1413
|
+
return (await a(this, _)).updateFrameConstraints(t, JSON.stringify(r)).then((c) => i(c));
|
|
1414
|
+
}, g(this, _, o);
|
|
1341
1415
|
}
|
|
1342
1416
|
}
|
|
1343
|
-
|
|
1344
|
-
class
|
|
1417
|
+
_ = new WeakMap();
|
|
1418
|
+
class es {
|
|
1345
1419
|
constructor() {
|
|
1346
|
-
this.currentEngineVersion =
|
|
1420
|
+
this.currentEngineVersion = Ss.current, this.currentSDKVersion = bs.version;
|
|
1347
1421
|
}
|
|
1348
1422
|
}
|
|
1349
|
-
var
|
|
1350
|
-
class
|
|
1423
|
+
var m, $t;
|
|
1424
|
+
class ss {
|
|
1351
1425
|
/**
|
|
1352
1426
|
* @ignore
|
|
1353
1427
|
*/
|
|
@@ -1355,33 +1429,33 @@ class Ze {
|
|
|
1355
1429
|
/**
|
|
1356
1430
|
* @ignore
|
|
1357
1431
|
*/
|
|
1358
|
-
u(this,
|
|
1359
|
-
u(this,
|
|
1360
|
-
this.getAll = async () => (await a(this,
|
|
1361
|
-
const r = await a(this,
|
|
1432
|
+
u(this, m);
|
|
1433
|
+
u(this, $t);
|
|
1434
|
+
this.getAll = async () => (await a(this, m)).getLayouts().then((e) => i(e)), this.getById = async (t) => (await a(this, m)).getLayoutById(t).then((r) => i(r)), this.getByName = async (t) => (await a(this, m)).getLayoutByName(t).then((r) => i(r)), this.getSelected = async () => (await a(this, m)).getSelectedLayout().then((e) => i(e)), this.remove = async (t) => (await a(this, m)).removeLayout(t).then((r) => i(r)), this.create = async (t, e) => {
|
|
1435
|
+
const r = await a(this, m);
|
|
1362
1436
|
return e != null && e.length ? r.addLayouts(t, JSON.stringify(e)).then((n) => i(n)) : r.addLayout(t).then((n) => i(n));
|
|
1363
|
-
}, this.rename = async (t, e) => (await a(this,
|
|
1364
|
-
const r = await a(this,
|
|
1437
|
+
}, this.rename = async (t, e) => (await a(this, m)).renameLayout(t, e).then((n) => i(n)), this.select = async (t) => (await a(this, m)).selectLayoutWithOptions(t, null).then((r) => i(r)), this.selectWithPageSize = async (t, e) => {
|
|
1438
|
+
const r = await a(this, m), n = {
|
|
1365
1439
|
pageSize: e
|
|
1366
1440
|
};
|
|
1367
1441
|
return r.selectLayoutWithOptions(t, JSON.stringify(n)).then((c) => i(c));
|
|
1368
|
-
}, this.duplicate = async (t) => (await a(this,
|
|
1442
|
+
}, this.duplicate = async (t) => (await a(this, m)).duplicateLayout(t).then((r) => i(r)), this.reset = async (t) => (await a(this, m)).resetLayout(t).then((r) => i(r)), this.setHeight = async (t, e) => (await a(this, m)).setLayoutHeight(t, e).then((n) => i(n)), this.setWidth = async (t, e) => (await a(this, m)).setLayoutWidth(t, e).then((n) => i(n)), this.setUnit = async (t, e) => (await a(this, m)).setLayoutUnit(t, e).then((n) => i(n)), this.resetHeight = async (t) => (await a(this, m)).resetLayoutHeight(t).then((r) => i(r)), this.resetWidth = async (t) => (await a(this, m)).resetLayoutWidth(t).then((r) => i(r)), this.resetUnit = async (t) => (await a(this, m)).resetLayoutUnit(t).then((r) => i(r)), this.getSelectedSnapshot = async () => (await a(this, $t)).getPageSnapshot().then((e) => e ?? e), this.setIntent = async (t, e) => (await a(this, m)).setLayoutIntent(t, e).then((n) => i(n)), this.resetIntent = async (t) => (await a(this, m)).resetLayoutIntent(t).then((r) => i(r)), this.setFillColor = async (t, e) => (await a(this, m)).setLayoutFillColor(t, JSON.stringify(e)).then((n) => i(n)), this.setFillColorEnabled = async (t, e) => (await a(this, m)).setLayoutFillColorEnabled(t, e).then((n) => i(n)), this.resetFillColor = async (t) => (await a(this, m)).resetLayoutFillColor(t).then((r) => i(r)), this.setBleedValue = async (t, e, r) => {
|
|
1369
1443
|
const n = r ? {
|
|
1370
1444
|
left: r === X.left ? e : void 0,
|
|
1371
1445
|
top: r === X.top ? e : void 0,
|
|
1372
1446
|
right: r === X.right ? e : void 0,
|
|
1373
1447
|
bottom: r === X.bottom ? e : void 0
|
|
1374
1448
|
} : { left: e, top: e, right: e, bottom: e };
|
|
1375
|
-
return (await a(this,
|
|
1449
|
+
return (await a(this, m)).updateLayoutBleed(t, JSON.stringify(n)).then((h) => i(h));
|
|
1376
1450
|
}, this.setAreBleedValuesCombined = async (t, e) => {
|
|
1377
1451
|
const r = { areBleedValuesCombined: e };
|
|
1378
|
-
return (await a(this,
|
|
1379
|
-
}, this.resetBleedValues = async (t) => (await a(this,
|
|
1452
|
+
return (await a(this, m)).updateLayoutBleed(t, JSON.stringify(r)).then((c) => i(c));
|
|
1453
|
+
}, this.resetBleedValues = async (t) => (await a(this, m)).updateLayoutBleed(t, null).then((r) => i(r)), this.setPrivateData = async (t, e) => (await a(this, m)).setLayoutPrivateData(t, JSON.stringify(e)).then((n) => i(n)), this.getPrivateData = async (t) => (await a(this, m)).getLayoutPrivateData(t).then((r) => i(r)), this.setDisplayName = async (t, e) => (await a(this, m)).setLayoutDisplayName(t, e).then((n) => i(n)), this.getDisplayName = async (t) => (await a(this, m)).getLayoutDisplayName(t).then((r) => i(r)), this.resetDisplayName = async (t) => (await a(this, m)).setLayoutDisplayName(t, null).then((r) => i(r)), this.setAvailableForUser = async (t, e) => (await a(this, m)).setLayoutAvailableForUser(t, e).then((n) => i(n)), this.setSelectedByUser = async (t, e) => (await a(this, m)).setLayoutSelectedByUser(t, e).then((n) => i(n)), this.setResizableByUser = async (t, e) => (await a(this, m)).setLayoutResizableByUser(t, JSON.stringify(e)).then((n) => i(n)), g(this, m, o), g(this, $t, o);
|
|
1380
1454
|
}
|
|
1381
1455
|
}
|
|
1382
|
-
|
|
1383
|
-
var
|
|
1384
|
-
class
|
|
1456
|
+
m = new WeakMap(), $t = new WeakMap();
|
|
1457
|
+
var de = /* @__PURE__ */ ((s) => (s.thumbnail = "thumbnail", s.mediumres = "mediumres", s.highres = "highres", s.original = "original", s))(de || {}), Os = /* @__PURE__ */ ((s) => (s.web = "web", s.print = "print", s.animation = "animation", s))(Os || {}), Y, Kt;
|
|
1458
|
+
class rs {
|
|
1385
1459
|
/**
|
|
1386
1460
|
* @ignore
|
|
1387
1461
|
*/
|
|
@@ -1390,26 +1464,26 @@ class Qe {
|
|
|
1390
1464
|
* @ignore
|
|
1391
1465
|
*/
|
|
1392
1466
|
u(this, Y);
|
|
1393
|
-
u(this,
|
|
1467
|
+
u(this, Kt);
|
|
1394
1468
|
this.query = async (t, e, r = {}) => (await a(this, Y)).mediaConnectorQuery(t, JSON.stringify(e), JSON.stringify(r)).then((c) => i(c)), this.detail = async (t, e, r = {}) => (await a(this, Y)).mediaConnectorDetail(t, e, JSON.stringify(r)).then((c) => i(c)), this.download = async (t, e, r, n = {}) => {
|
|
1395
1469
|
const c = this.parseDeprecatedMediaDownloadType(
|
|
1396
1470
|
r
|
|
1397
1471
|
);
|
|
1398
|
-
return (await a(this,
|
|
1472
|
+
return (await a(this, Kt)).mediaConnectorDownload(
|
|
1399
1473
|
t,
|
|
1400
1474
|
e,
|
|
1401
1475
|
c,
|
|
1402
|
-
|
|
1476
|
+
Os.web,
|
|
1403
1477
|
JSON.stringify(n)
|
|
1404
|
-
).then((
|
|
1405
|
-
if (
|
|
1406
|
-
return
|
|
1407
|
-
throw typeof
|
|
1478
|
+
).then((l) => {
|
|
1479
|
+
if (l instanceof Uint8Array)
|
|
1480
|
+
return l;
|
|
1481
|
+
throw typeof l == "object" && l !== null && "success" in l && !l.success && ge(l), new Error(`Unexpected response type: ${typeof l}.`);
|
|
1408
1482
|
});
|
|
1409
1483
|
}, this.getConfigurationOptions = async (t) => (await a(this, Y)).mediaConnectorGetConfigurationOptions(t).then((r) => i(r)), this.getCapabilities = async (t) => (await a(this, Y)).mediaConnectorGetCapabilities(t).then((r) => i(r)), this.parseDeprecatedMediaType = (t) => {
|
|
1410
|
-
if (t ===
|
|
1411
|
-
if (t ===
|
|
1412
|
-
}, this.upload = async (t, e, r = {}) => (await a(this, Y)).mediaConnectorUpload(t, JSON.stringify(e), JSON.stringify(r)).then((c) => i(c)), g(this, Y, o), g(this,
|
|
1484
|
+
if (t === Bt.file) return Ut.file;
|
|
1485
|
+
if (t === Bt.collection) return Ut.collection;
|
|
1486
|
+
}, this.upload = async (t, e, r = {}) => (await a(this, Y)).mediaConnectorUpload(t, JSON.stringify(e), JSON.stringify(r)).then((c) => i(c)), g(this, Y, o), g(this, Kt, o);
|
|
1413
1487
|
}
|
|
1414
1488
|
/**
|
|
1415
1489
|
* This method will parse the deprecatedMediaDownloadType to the new media download type.
|
|
@@ -1419,18 +1493,18 @@ class Qe {
|
|
|
1419
1493
|
*/
|
|
1420
1494
|
parseDeprecatedMediaDownloadType(o) {
|
|
1421
1495
|
switch (o) {
|
|
1422
|
-
case
|
|
1423
|
-
return
|
|
1424
|
-
case
|
|
1425
|
-
return
|
|
1496
|
+
case ce.HighResolutionWeb:
|
|
1497
|
+
return de.highres;
|
|
1498
|
+
case ce.LowResolutionWeb:
|
|
1499
|
+
return de.thumbnail;
|
|
1426
1500
|
default:
|
|
1427
1501
|
return o;
|
|
1428
1502
|
}
|
|
1429
1503
|
}
|
|
1430
1504
|
}
|
|
1431
|
-
Y = new WeakMap(),
|
|
1432
|
-
var O,
|
|
1433
|
-
let
|
|
1505
|
+
Y = new WeakMap(), Kt = new WeakMap();
|
|
1506
|
+
var O, zt, ms;
|
|
1507
|
+
let ns = (ms = class {
|
|
1434
1508
|
/**
|
|
1435
1509
|
* @ignore
|
|
1436
1510
|
*/
|
|
@@ -1442,12 +1516,12 @@ let Xe = (ds = class {
|
|
|
1442
1516
|
/**
|
|
1443
1517
|
* @ignore
|
|
1444
1518
|
*/
|
|
1445
|
-
u(this,
|
|
1446
|
-
this.add = async () => (await a(this, O)).addPage().then((e) => i(e)), this.remove = async (t) => (await a(this, O)).removePage(t).then((r) => i(r)), this.select = async (t) => (await a(this, O)).selectPage(t).then((r) => i(r)), this.setVisibility = async (t, e) => (await a(this, O)).setPageIsVisible(t, e).then((n) => i(n)), this.duplicate = async (t) => (await a(this, O)).duplicatePage(t).then((r) => i(r)), this.getAll = async () => (await a(this, O)).getPages().then((e) => i(e)), this.getById = async (t) => (await a(this, O)).getPageById(t).then((r) => i(r)), this.getSnapshot = async (t, e) => (await a(this,
|
|
1519
|
+
u(this, zt);
|
|
1520
|
+
this.add = async () => (await a(this, O)).addPage().then((e) => i(e)), this.remove = async (t) => (await a(this, O)).removePage(t).then((r) => i(r)), this.select = async (t) => (await a(this, O)).selectPage(t).then((r) => i(r)), this.setVisibility = async (t, e) => (await a(this, O)).setPageIsVisible(t, e).then((n) => i(n)), this.duplicate = async (t) => (await a(this, O)).duplicatePage(t).then((r) => i(r)), this.getAll = async () => (await a(this, O)).getPages().then((e) => i(e)), this.getById = async (t) => (await a(this, O)).getPageById(t).then((r) => i(r)), this.getSnapshot = async (t, e) => (await a(this, zt)).getPageSnapshotWithSettings(t, e == null ? null : JSON.stringify(e)).then((n) => n ?? n), this.setWidth = async (t, e) => (t !== void 0 && console.warn("pageId has no effect since all pages are being updated simultaneously."), (await a(this, O)).setPageWidth(e).then((n) => i(n))), this.setHeight = async (t, e) => (t !== void 0 && console.warn("pageId has no effect since all pages are being updated simultaneously."), (await a(this, O)).setPageHeight(e).then((n) => i(n))), this.setSize = async (t, e) => (await a(this, O)).setPageSize(t, e).then((n) => i(n)), this.move = async (t, e) => (await a(this, O)).reorderPages(t, e).then((n) => i(n)), g(this, O, o), g(this, zt, o);
|
|
1447
1521
|
}
|
|
1448
|
-
}, O = new WeakMap(),
|
|
1449
|
-
var
|
|
1450
|
-
class
|
|
1522
|
+
}, O = new WeakMap(), zt = new WeakMap(), ms);
|
|
1523
|
+
var B;
|
|
1524
|
+
class as {
|
|
1451
1525
|
/**
|
|
1452
1526
|
* @ignore
|
|
1453
1527
|
*/
|
|
@@ -1455,24 +1529,24 @@ class ts {
|
|
|
1455
1529
|
/**
|
|
1456
1530
|
* @ignore
|
|
1457
1531
|
*/
|
|
1458
|
-
u(this,
|
|
1459
|
-
this.getAll = async () => (await a(this,
|
|
1532
|
+
u(this, B);
|
|
1533
|
+
this.getAll = async () => (await a(this, B)).getParagraphStyles().then((e) => i(e)), this.getById = async (t) => (await a(this, B)).getParagraphStyleById(t).then((r) => i(r)), this.create = async () => (await a(this, B)).createParagraphStyle().then((e) => i(e)), this.duplicate = async (t) => (await a(this, B)).duplicateParagraphStyle(t).then((r) => i(r)), this.update = async (t, e) => (await a(this, B)).updateParagraphStyle(t, JSON.stringify(e)).then((n) => i(n)), this.rename = async (t, e) => (await a(this, B)).renameParagraphStyle(t, e).then((n) => i(n)), this.remove = async (t) => (await a(this, B)).removeParagraphStyle(t).then((r) => i(r)), this.move = async (t, e) => (await a(this, B)).moveParagraphStyles(t, e).then((n) => i(n)), g(this, B, o);
|
|
1460
1534
|
}
|
|
1461
1535
|
}
|
|
1462
|
-
|
|
1463
|
-
var x = /* @__PURE__ */ ((s) => (s.info = "info", s.warn = "warn", s.error = "error", s))(x || {}),
|
|
1464
|
-
class
|
|
1536
|
+
B = new WeakMap();
|
|
1537
|
+
var x = /* @__PURE__ */ ((s) => (s.info = "info", s.warn = "warn", s.error = "error", s))(x || {}), Ls = /* @__PURE__ */ ((s) => (s.general = "general", s.connector = "connector", s.event = "event", s.engine = "engine", s))(Ls || {}), kt = /* @__PURE__ */ ((s) => (s.throw = "throw", s.log = "log", s))(kt || {});
|
|
1538
|
+
class Wr {
|
|
1465
1539
|
constructor(o, t, e, r) {
|
|
1466
1540
|
this.type = "action", this.message = o, this.id = t, this.event = e, this.eventChain = r;
|
|
1467
1541
|
}
|
|
1468
1542
|
}
|
|
1469
|
-
class
|
|
1543
|
+
class jr {
|
|
1470
1544
|
constructor(o, t, e) {
|
|
1471
1545
|
this.type = "dataRow", this.count = o, this.message = t, this.exceptions = e;
|
|
1472
1546
|
}
|
|
1473
1547
|
}
|
|
1474
|
-
var
|
|
1475
|
-
let
|
|
1548
|
+
var pe = /* @__PURE__ */ ((s) => (s.shortText = "shortText", s.longText = "longText", s.image = "image", s.list = "list", s.boolean = "boolean", s.group = "group", s.number = "number", s.date = "date", s))(pe || {}), qr = /* @__PURE__ */ ((s) => (s.Monday = "monday", s.Tuesday = "tuesday", s.Wednesday = "wednesday", s.Thursday = "thursday", s.Friday = "friday", s.Saturday = "saturday", s.Sunday = "sunday", s))(qr || {}), Yr = /* @__PURE__ */ ((s) => (s.en_US = "en_US", s.cs = "cs", s.da = "da", s.nl = "nl", s.fi = "fi", s.fr = "fr", s.de = "de", s.it = "it", s.no = "no", s.pl = "pl", s.pt_PT = "pt_PT", s.es_ES = "es_ES", s.sv = "sv", s))(Yr || {}), Jt = /* @__PURE__ */ ((s) => (s.visible = "visible", s.invisible = "invisible", s.conditional = "conditional", s))(Jt || {}), Zr = /* @__PURE__ */ ((s) => (s.boolean = "boolean", s.text = "text", s.number = "number", s))(Zr || {}), Qr = /* @__PURE__ */ ((s) => (s.equals = "=", s.notEquals = "!=", s.greaterThan = ">", s.greaterThanOrEquals = ">=", s.lessThan = "<", s.lessThanOrEquals = "<=", s))(Qr || {});
|
|
1549
|
+
let Xr = class {
|
|
1476
1550
|
/**
|
|
1477
1551
|
* @ignore
|
|
1478
1552
|
*/
|
|
@@ -1515,13 +1589,13 @@ let $r = class {
|
|
|
1515
1589
|
}, this.onVariableListChanged = (e) => {
|
|
1516
1590
|
const n = JSON.parse(e).map(
|
|
1517
1591
|
(c) => {
|
|
1518
|
-
var
|
|
1519
|
-
return c.type ===
|
|
1592
|
+
var h;
|
|
1593
|
+
return c.type === pe.list ? {
|
|
1520
1594
|
...c,
|
|
1521
1595
|
items: c.items.map(
|
|
1522
|
-
(
|
|
1596
|
+
(l) => l.value
|
|
1523
1597
|
),
|
|
1524
|
-
selected: (
|
|
1598
|
+
selected: (h = c.selected) == null ? void 0 : h.value
|
|
1525
1599
|
} : c;
|
|
1526
1600
|
}
|
|
1527
1601
|
);
|
|
@@ -1553,7 +1627,7 @@ let $r = class {
|
|
|
1553
1627
|
}, this.onConnectorEvent = (e) => {
|
|
1554
1628
|
this.config.events.onConnectorEvent.trigger(JSON.parse(e));
|
|
1555
1629
|
}, this.onConnectorsChanged = (e) => {
|
|
1556
|
-
const n = new
|
|
1630
|
+
const n = new ye().makeMultipleConnectorsBackwardsCompatible(
|
|
1557
1631
|
JSON.parse(e),
|
|
1558
1632
|
this.localConfig.get(tt.GraFxStudioEnvironmentApiUrl)
|
|
1559
1633
|
);
|
|
@@ -1573,14 +1647,14 @@ let $r = class {
|
|
|
1573
1647
|
}, this.onAsyncError = (e) => {
|
|
1574
1648
|
const r = JSON.parse(e);
|
|
1575
1649
|
if ((r == null ? void 0 : r.type) === "dataRow") {
|
|
1576
|
-
const n = new
|
|
1650
|
+
const n = new jr(
|
|
1577
1651
|
r.count,
|
|
1578
1652
|
r.message,
|
|
1579
1653
|
r.exceptions
|
|
1580
1654
|
);
|
|
1581
1655
|
this.config.events.onAsyncError.trigger(n);
|
|
1582
1656
|
} else if ((r == null ? void 0 : r.type) === "action") {
|
|
1583
|
-
const n = new
|
|
1657
|
+
const n = new Wr(
|
|
1584
1658
|
r.message,
|
|
1585
1659
|
r.id,
|
|
1586
1660
|
r.event,
|
|
@@ -1604,8 +1678,8 @@ let $r = class {
|
|
|
1604
1678
|
}, this.config = o, this.localConfig = t;
|
|
1605
1679
|
}
|
|
1606
1680
|
};
|
|
1607
|
-
var
|
|
1608
|
-
class
|
|
1681
|
+
var Ct;
|
|
1682
|
+
class is {
|
|
1609
1683
|
/**
|
|
1610
1684
|
* @ignore
|
|
1611
1685
|
*/
|
|
@@ -1613,13 +1687,13 @@ class es {
|
|
|
1613
1687
|
/**
|
|
1614
1688
|
* @ignore
|
|
1615
1689
|
*/
|
|
1616
|
-
u(this,
|
|
1617
|
-
this.set = async (t) => (await a(this,
|
|
1690
|
+
u(this, Ct);
|
|
1691
|
+
this.set = async (t) => (await a(this, Ct)).selectedTextStyleDeltaUpdate(JSON.stringify(t)).then((r) => i(r)), this.removeSelected = async () => (await a(this, Ct)).selectedTextStyleClean().then((e) => i(e)), this.getSelected = async () => (await a(this, Ct)).getSelectedTextStyle().then((e) => i(e)), g(this, Ct, o);
|
|
1618
1692
|
}
|
|
1619
1693
|
}
|
|
1620
|
-
|
|
1621
|
-
var
|
|
1622
|
-
class
|
|
1694
|
+
Ct = new WeakMap();
|
|
1695
|
+
var tn = /* @__PURE__ */ ((s) => (s.FRAME_X = "frameX", s.FRAME_Y = "frameY", s.WIDTH = "width", s.HEIGHT = "height", s.FRAME_ROTATION = "frameRotation", s))(tn || {}), en = /* @__PURE__ */ ((s) => (s.LAYOUT_HEIGHT = "layoutHeight", s.LAYOUT_WIDTH = "layoutWidth", s.BLEED_TOP = "bleedTop", s.BLEED_BOTTOM = "bleedBottom", s.BLEED_LEFT = "bleedLeft", s.BLEED_RIGHT = "bleedRight", s.BLEED_VALUES_COMBINED = "areBleedValuesCombined", s))(en || {}), K = /* @__PURE__ */ ((s) => (s.SELECT = "select", s.ZOOM = "zoom", s.HAND = "hand", s.IMAGE_FRAME = "imageFrame", s.TEXT_FRAME = "textFrame", s.SHAPE_RECT = "rect", s.SHAPE_ELLIPSE = "ellipse", s.SHAPE_POLYGON = "polygon", s))(K || {}), sn = /* @__PURE__ */ ((s) => (s.MP4 = "mp4", s.GIF = "gif", s.PNG = "png", s.JPG = "jpg", s.PDF = "pdf", s.HTML = "html", s))(sn || {}), ue = /* @__PURE__ */ ((s) => (s.SANDBOX = "sandbox", s.PRODUCTION = "online", s))(ue || {}), Ft;
|
|
1696
|
+
class os {
|
|
1623
1697
|
/**
|
|
1624
1698
|
* @ignore
|
|
1625
1699
|
*/
|
|
@@ -1627,13 +1701,13 @@ class ss {
|
|
|
1627
1701
|
/**
|
|
1628
1702
|
* @ignore
|
|
1629
1703
|
*/
|
|
1630
|
-
u(this,
|
|
1631
|
-
this.setTool = async (t) => (await a(this,
|
|
1704
|
+
u(this, Ft);
|
|
1705
|
+
this.setTool = async (t) => (await a(this, Ft)).setTool(t).then((r) => i(r)), this.getSelected = async () => (await a(this, Ft)).getSelectedTool().then((e) => i(e)), this.setPointer = async () => this.setTool(K.SELECT), this.setSelect = async () => this.setTool(K.SELECT), this.setHand = async () => this.setTool(K.HAND), this.setZoom = async () => this.setTool(K.ZOOM), this.setTextFrame = async () => this.setTool(K.TEXT_FRAME), this.setImageFrame = async () => this.setTool(K.IMAGE_FRAME), this.setShapeRect = async () => this.setTool(K.SHAPE_RECT), this.setShapeEllipse = async () => this.setTool(K.SHAPE_ELLIPSE), this.setShapePolygon = async () => this.setTool(K.SHAPE_POLYGON), g(this, Ft, o);
|
|
1632
1706
|
}
|
|
1633
1707
|
}
|
|
1634
|
-
|
|
1635
|
-
var Z,
|
|
1636
|
-
class
|
|
1708
|
+
Ft = new WeakMap();
|
|
1709
|
+
var Z, H, Wt;
|
|
1710
|
+
class cs {
|
|
1637
1711
|
/**
|
|
1638
1712
|
* @ignore
|
|
1639
1713
|
*/
|
|
@@ -1642,13 +1716,13 @@ class rs {
|
|
|
1642
1716
|
* @ignore
|
|
1643
1717
|
*/
|
|
1644
1718
|
u(this, Z);
|
|
1645
|
-
u(this,
|
|
1646
|
-
u(this,
|
|
1719
|
+
u(this, H);
|
|
1720
|
+
u(this, Wt);
|
|
1647
1721
|
this.undo = async () => (await a(this, Z)).undo().then((r) => i(r)), this.redo = async () => (await a(this, Z)).redo().then((r) => i(r)), this.addCustomData = async (e, r) => (await a(this, Z)).setCustomUndoData(e, r, !1).then((c) => i(c)), this.record = async (e, r) => {
|
|
1648
1722
|
try {
|
|
1649
|
-
await a(this,
|
|
1723
|
+
await a(this, H).beginIfNoneActive(e), await r(a(this, Wt)), await a(this, H).end();
|
|
1650
1724
|
} catch (n) {
|
|
1651
|
-
throw await a(this,
|
|
1725
|
+
throw await a(this, H).abort(), n;
|
|
1652
1726
|
}
|
|
1653
1727
|
}, this.pause = async () => (await a(this, Z)).pause().then((r) => i(r)), this.resume = async () => (await a(this, Z)).resume().then((r) => i(r)), this.advanced = {
|
|
1654
1728
|
/**
|
|
@@ -1657,34 +1731,34 @@ class rs {
|
|
|
1657
1731
|
* @experimental This method is experimental and may change in future versions.
|
|
1658
1732
|
* @returns
|
|
1659
1733
|
*/
|
|
1660
|
-
begin: async (e) => a(this,
|
|
1734
|
+
begin: async (e) => a(this, H).begin(e),
|
|
1661
1735
|
/**
|
|
1662
1736
|
* This will start a new undo operation if there is no other undo operation recording.
|
|
1663
1737
|
* This does not throw.
|
|
1664
1738
|
* @experimental This method is experimental and may change in future versions.
|
|
1665
1739
|
* @returns
|
|
1666
1740
|
*/
|
|
1667
|
-
beginIfNoneActive: async (e) => a(this,
|
|
1741
|
+
beginIfNoneActive: async (e) => a(this, H).beginIfNoneActive(e),
|
|
1668
1742
|
/**
|
|
1669
1743
|
* Ends the currently active recording operation.
|
|
1670
1744
|
* If there is no recording operation currently running this will throw an exception.
|
|
1671
1745
|
* @experimental This method is experimental and may change in future versions.
|
|
1672
1746
|
* @returns
|
|
1673
1747
|
*/
|
|
1674
|
-
end: async () => a(this,
|
|
1748
|
+
end: async () => a(this, H).end(),
|
|
1675
1749
|
/**
|
|
1676
1750
|
* Aborts the currently active recording operation.
|
|
1677
1751
|
* If there is no recording operation currently running this will throw an exception.
|
|
1678
1752
|
* @experimental This method is experimental and may change in future versions.
|
|
1679
1753
|
* @returns
|
|
1680
1754
|
*/
|
|
1681
|
-
abort: async () => a(this,
|
|
1682
|
-
}, g(this, Z, o), g(this,
|
|
1755
|
+
abort: async () => a(this, H).abort()
|
|
1756
|
+
}, g(this, Z, o), g(this, Wt, t), g(this, H, new rn(o));
|
|
1683
1757
|
}
|
|
1684
1758
|
}
|
|
1685
|
-
Z = new WeakMap(),
|
|
1759
|
+
Z = new WeakMap(), H = new WeakMap(), Wt = new WeakMap();
|
|
1686
1760
|
var ct;
|
|
1687
|
-
class
|
|
1761
|
+
class rn {
|
|
1688
1762
|
/**
|
|
1689
1763
|
* @ignore
|
|
1690
1764
|
*/
|
|
@@ -1697,12 +1771,12 @@ class qr {
|
|
|
1697
1771
|
}
|
|
1698
1772
|
}
|
|
1699
1773
|
ct = new WeakMap();
|
|
1700
|
-
const
|
|
1774
|
+
const nn = (s, o = 2) => {
|
|
1701
1775
|
const t = Math.pow(10, o);
|
|
1702
1776
|
return Math.round(s * t) / t;
|
|
1703
1777
|
};
|
|
1704
|
-
var
|
|
1705
|
-
class
|
|
1778
|
+
var jt, Et;
|
|
1779
|
+
class hs {
|
|
1706
1780
|
/**
|
|
1707
1781
|
* @ignore
|
|
1708
1782
|
*/
|
|
@@ -1710,27 +1784,27 @@ class ns {
|
|
|
1710
1784
|
/**
|
|
1711
1785
|
* @ignore
|
|
1712
1786
|
*/
|
|
1713
|
-
u(this,
|
|
1714
|
-
u(this,
|
|
1787
|
+
u(this, jt);
|
|
1788
|
+
u(this, Et);
|
|
1715
1789
|
this.round = (e, r) => i({
|
|
1716
|
-
data: String(
|
|
1790
|
+
data: String(nn(e, r)),
|
|
1717
1791
|
success: !0,
|
|
1718
1792
|
status: 200,
|
|
1719
1793
|
parsedData: null
|
|
1720
1794
|
}), this.createEnvironmentBaseURL = (e) => {
|
|
1721
|
-
const { type: r =
|
|
1722
|
-
return `https://${n}.${
|
|
1795
|
+
const { type: r = ue.SANDBOX, environment: n = "ft-nostress", version: c = "1" } = e, h = r == ue.SANDBOX ? "chili-publish-sandbox" : "chili-publish";
|
|
1796
|
+
return `https://${n}.${h}.online/grafx/api/v${c}/environment/${n}`;
|
|
1723
1797
|
}, this.stageFiles = async (e, r, n) => {
|
|
1724
|
-
const c = a(this,
|
|
1798
|
+
const c = a(this, Et).get(tt.GraFxStudioEnvironmentApiUrl);
|
|
1725
1799
|
if (!c)
|
|
1726
1800
|
throw new Error("GraFx Studio Environment API URL is not set");
|
|
1727
|
-
const
|
|
1728
|
-
if (!
|
|
1801
|
+
const h = `${c}connectors/${r}/stage`, l = a(this, Et).get(tt.GraFxStudioAuthToken);
|
|
1802
|
+
if (!l)
|
|
1729
1803
|
throw new Error("GraFx Studio Auth Token is not set");
|
|
1730
1804
|
const p = new FormData();
|
|
1731
|
-
e.forEach((
|
|
1732
|
-
const A =
|
|
1733
|
-
p.append("files",
|
|
1805
|
+
e.forEach((f, b) => {
|
|
1806
|
+
const A = f instanceof File ? f.name : `blob-${b}`;
|
|
1807
|
+
p.append("files", f, A);
|
|
1734
1808
|
}), n && p.append(
|
|
1735
1809
|
"validationJson",
|
|
1736
1810
|
JSON.stringify({
|
|
@@ -1741,28 +1815,28 @@ class ns {
|
|
|
1741
1815
|
}
|
|
1742
1816
|
})
|
|
1743
1817
|
);
|
|
1744
|
-
const y = await fetch(
|
|
1818
|
+
const y = await fetch(h, {
|
|
1745
1819
|
method: "POST",
|
|
1746
1820
|
body: p,
|
|
1747
1821
|
headers: {
|
|
1748
|
-
Authorization: `Bearer ${
|
|
1822
|
+
Authorization: `Bearer ${l}`
|
|
1749
1823
|
}
|
|
1750
1824
|
});
|
|
1751
1825
|
if (y.status === 422) {
|
|
1752
|
-
const
|
|
1753
|
-
throw new
|
|
1826
|
+
const f = await y.json();
|
|
1827
|
+
throw new Dr(f.message, Fs.minDimension);
|
|
1754
1828
|
}
|
|
1755
1829
|
if (!y.ok)
|
|
1756
1830
|
throw new Error("Failed to stage files");
|
|
1757
1831
|
return await y.json();
|
|
1758
|
-
}, this.unitEvaluate = async (e, r) => (await a(this,
|
|
1832
|
+
}, this.unitEvaluate = async (e, r) => (await a(this, jt)).unitEvaluate(e, r).then((c) => i(c)), g(this, jt, o), g(this, Et, t);
|
|
1759
1833
|
}
|
|
1760
1834
|
}
|
|
1761
|
-
|
|
1762
|
-
var
|
|
1763
|
-
class
|
|
1835
|
+
jt = new WeakMap(), Et = new WeakMap();
|
|
1836
|
+
var qt;
|
|
1837
|
+
class an {
|
|
1764
1838
|
constructor(o) {
|
|
1765
|
-
u(this,
|
|
1839
|
+
u(this, qt);
|
|
1766
1840
|
this.setMinimum = async (t, e) => {
|
|
1767
1841
|
const r = { minValue: { value: e } };
|
|
1768
1842
|
return this.applyPropertiesUpdate(t, r);
|
|
@@ -1787,18 +1861,18 @@ class Zr {
|
|
|
1787
1861
|
}, this.setNumberOfDecimals = async (t, e) => {
|
|
1788
1862
|
const r = { numberOfDecimals: { value: e } };
|
|
1789
1863
|
return this.applyPropertiesUpdate(t, r);
|
|
1790
|
-
}, g(this,
|
|
1864
|
+
}, g(this, qt, o);
|
|
1791
1865
|
}
|
|
1792
1866
|
async applyPropertiesUpdate(o, t) {
|
|
1793
|
-
const r = await (await a(this,
|
|
1867
|
+
const r = await (await a(this, qt)).updateNumberVariableProperties(o, JSON.stringify(t));
|
|
1794
1868
|
return i(r);
|
|
1795
1869
|
}
|
|
1796
1870
|
}
|
|
1797
|
-
|
|
1798
|
-
var
|
|
1799
|
-
class
|
|
1871
|
+
qt = new WeakMap();
|
|
1872
|
+
var Yt;
|
|
1873
|
+
class on {
|
|
1800
1874
|
constructor(o) {
|
|
1801
|
-
u(this,
|
|
1875
|
+
u(this, Yt);
|
|
1802
1876
|
this.setDisplayFormat = async (t, e) => {
|
|
1803
1877
|
const r = { displayFormat: { value: e } };
|
|
1804
1878
|
return this.applyPropertiesUpdate(t, r);
|
|
@@ -1814,16 +1888,16 @@ class Qr {
|
|
|
1814
1888
|
}, this.setExcludedDays = async (t, e) => {
|
|
1815
1889
|
const r = { excludedDays: { value: e } };
|
|
1816
1890
|
return this.applyPropertiesUpdate(t, r);
|
|
1817
|
-
}, g(this,
|
|
1891
|
+
}, g(this, Yt, o);
|
|
1818
1892
|
}
|
|
1819
1893
|
async applyPropertiesUpdate(o, t) {
|
|
1820
|
-
const r = await (await a(this,
|
|
1894
|
+
const r = await (await a(this, Yt)).updateDateVariableProperties(o, JSON.stringify(t));
|
|
1821
1895
|
return i(r);
|
|
1822
1896
|
}
|
|
1823
1897
|
}
|
|
1824
|
-
|
|
1825
|
-
var
|
|
1826
|
-
let
|
|
1898
|
+
Yt = new WeakMap();
|
|
1899
|
+
var C, Ot, Lt, fs;
|
|
1900
|
+
let ls = (fs = class {
|
|
1827
1901
|
/**
|
|
1828
1902
|
* @ignore
|
|
1829
1903
|
*/
|
|
@@ -1831,31 +1905,31 @@ let as = (us = class {
|
|
|
1831
1905
|
/**
|
|
1832
1906
|
* @ignore
|
|
1833
1907
|
*/
|
|
1834
|
-
u(this,
|
|
1835
|
-
u(this, Et);
|
|
1908
|
+
u(this, C);
|
|
1836
1909
|
u(this, Ot);
|
|
1837
|
-
|
|
1910
|
+
u(this, Lt);
|
|
1911
|
+
this.getAll = async () => (await a(this, C)).getVariables().then((e) => i(e)).then((e) => {
|
|
1838
1912
|
const r = e;
|
|
1839
1913
|
return r.parsedData && (r.parsedData = this.makeVariablesBackwardsCompatible(r.parsedData)), r;
|
|
1840
|
-
}), this.getById = async (t) => (await a(this,
|
|
1914
|
+
}), this.getById = async (t) => (await a(this, C)).getVariableById(t).then((r) => i(r)).then((r) => {
|
|
1841
1915
|
const n = r;
|
|
1842
1916
|
return n.parsedData && (n.parsedData = this.makeVariableBackwardsCompatible(n.parsedData)), n;
|
|
1843
|
-
}), this.getByName = async (t) => (await a(this,
|
|
1917
|
+
}), this.getByName = async (t) => (await a(this, C)).getVariableByName(t).then((r) => i(r)).then((r) => {
|
|
1844
1918
|
const n = r;
|
|
1845
1919
|
return n.parsedData && (n.parsedData = this.makeVariableBackwardsCompatible(n.parsedData)), n;
|
|
1846
|
-
}), this.create = async (t, e) => (await a(this,
|
|
1920
|
+
}), this.create = async (t, e) => (await a(this, C)).addVariable(t, e).then((n) => i(n)), this.remove = async (t) => (await a(this, C)).removeVariables(t).then((r) => i(r)), this.rename = async (t, e) => (await a(this, C)).setVariableName(t, e).then((n) => i(n)), this.setLabel = async (t, e) => (await a(this, C)).setVariableLabel(t, e).then((n) => i(n)), g(this, Ot, async (t, e) => (await a(this, C)).setVariablePlaceholder(t, e).then((n) => i(n))), this.setPlaceholder = async (t, e) => a(this, Ot).call(this, t, e), this.resetPlaceholder = async (t) => a(this, Ot).call(this, t, null), g(this, Lt, async (t, e) => (await a(this, C)).setVariableHelpText(t, e).then((n) => i(n))), this.setHelpText = async (t, e) => a(this, Lt).call(this, t, e), this.resetHelpText = async (t) => a(this, Lt).call(this, t, null), this.setType = async (t, e) => (await a(this, C)).setVariableType(t, e).then((n) => i(n)), this.setListVariable = async (t, e) => (await a(this, C)).setListVariableItems(
|
|
1847
1921
|
t,
|
|
1848
1922
|
e.map((n) => JSON.stringify({ value: n }))
|
|
1849
|
-
).then((n) => i(n)), this.setValue = async (t, e) => (await a(this,
|
|
1850
|
-
const r = e ? { type:
|
|
1923
|
+
).then((n) => i(n)), this.setValue = async (t, e) => (await a(this, C)).setVariableValue(t, e).then((n) => i(n)), this.duplicate = async (t) => (await a(this, C)).duplicateVariable(t).then((r) => i(r)), this.groupVariables = async (t, e) => (await a(this, C)).groupVariables(t, e).then((n) => i(n)), this.ungroupVariables = async (t) => (await a(this, C)).ungroupVariable(t).then((r) => i(r)), this.move = async (t, e, r) => (await a(this, C)).moveVariable(e, r, t).then((c) => i(c)), this.moveVariables = async (t, e, r) => (await a(this, C)).moveVariables(e, r, t).then((c) => i(c)), this.setIsVisible = async (t, e) => {
|
|
1924
|
+
const r = e ? { type: Jt.visible } : { type: Jt.invisible };
|
|
1851
1925
|
return this.setVariableVisibility(t, r);
|
|
1852
1926
|
}, this.setIsHidden = async (t, e) => {
|
|
1853
|
-
const r = e ? { type:
|
|
1927
|
+
const r = e ? { type: Jt.invisible } : { type: Jt.visible };
|
|
1854
1928
|
return this.setVariableVisibility(t, r);
|
|
1855
|
-
}, this.setVariableVisibility = async (t, e) => (await a(this,
|
|
1856
|
-
const r = await a(this,
|
|
1857
|
-
return r.setImageVariableConnector(t, JSON.stringify(c)).then((
|
|
1858
|
-
}, this.setImageVariableValueWithContext = async (t, e, r) => (await a(this,
|
|
1929
|
+
}, this.setVariableVisibility = async (t, e) => (await a(this, C)).setVariableVisibility(t, JSON.stringify(e)).then((n) => i(n)), this.setLayoutsForVariableVisibility = async (t) => (await a(this, C)).setLayoutsForVariableVisibility(t ? JSON.stringify(t) : null).then((r) => i(r)), this.setIsRequired = async (t, e) => (await a(this, C)).setVariableIsRequired(t, e).then((n) => i(n)), this.setRemoveParagraphIfEmpty = async (t, e) => (await a(this, C)).setVariableRemoveParagraphIfEmpty(t, e).then((n) => i(n)), this.setIsReadonly = async (t, e) => (await a(this, C)).setVariableIsReadonly(t, e).then((n) => i(n)), this.getImageVariableConnectorId = async (t) => (await a(this, C)).getImageVariableConnectorId(t).then((r) => i(r)), this.setImageVariableConnector = async (t, e) => {
|
|
1930
|
+
const r = await a(this, C), c = new ye().makeConnectorSourceForwardsCompatible(e);
|
|
1931
|
+
return r.setImageVariableConnector(t, JSON.stringify(c)).then((h) => i(h));
|
|
1932
|
+
}, this.setImageVariableValueWithContext = async (t, e, r) => (await a(this, C)).setImageVariableValueWithContext(t, e, JSON.stringify(r)).then((c) => i(c)), this.removeSource = async (t) => this.setValue(t, null), this.setPrefix = async (t, e) => {
|
|
1859
1933
|
const r = { prefix: { value: e } };
|
|
1860
1934
|
return this.applyPrefixSuffixDeltaUpdate(t, r);
|
|
1861
1935
|
}, this.setSuffix = async (t, e) => {
|
|
@@ -1867,24 +1941,24 @@ let as = (us = class {
|
|
|
1867
1941
|
}, this.setSuffixCharacterStyle = async (t, e) => {
|
|
1868
1942
|
const r = { suffixCharacterStyleId: { value: e } };
|
|
1869
1943
|
return this.applyPrefixSuffixDeltaUpdate(t, r);
|
|
1870
|
-
}, this.setPrivateData = async (t, e) => (await a(this,
|
|
1944
|
+
}, this.setPrivateData = async (t, e) => (await a(this, C)).setVariablePrivateData(t, JSON.stringify(e)).then((n) => i(n)), this.getPrivateData = async (t) => (await a(this, C)).getVariablePrivateData(t).then((r) => i(r)), this.setAllowImageQuery = async (t, e) => (await a(this, C)).setImageVariableAllowQuery(t, e).then((n) => i(n)), this.setAllowImageUpload = async (t, e) => (await a(this, C)).setImageVariableAllowUpload(t, e).then((n) => i(n)), this.setMinImageUploadSize = async (t, e, r) => (await a(this, C)).setImageVariableUploadMinSize(t, e, r).then((c) => i(c)), this.setIsDontBreak = async (t, e) => (await a(this, C)).setVariableIsDontBreak(t, e).then((n) => i(n)), g(this, C, o), this.number = new an(a(this, C)), this.date = new on(a(this, C));
|
|
1871
1945
|
}
|
|
1872
1946
|
makeVariablesBackwardsCompatible(o) {
|
|
1873
1947
|
return o.map((t) => this.makeVariableBackwardsCompatible(t));
|
|
1874
1948
|
}
|
|
1875
1949
|
makeVariableBackwardsCompatible(o) {
|
|
1876
|
-
return o.type !==
|
|
1950
|
+
return o.type !== pe.list ? o : this.makeListVariableBackwardsCompatible(o);
|
|
1877
1951
|
}
|
|
1878
1952
|
makeListVariableBackwardsCompatible(o) {
|
|
1879
1953
|
const t = o, e = o.items, r = o.selected, n = e.map((c) => c.value);
|
|
1880
1954
|
return t.items = n, t.selected = r == null ? void 0 : r.value, t;
|
|
1881
1955
|
}
|
|
1882
1956
|
async applyPrefixSuffixDeltaUpdate(o, t) {
|
|
1883
|
-
const r = await (await a(this,
|
|
1957
|
+
const r = await (await a(this, C)).updateVariablePrefixSuffixProperties(o, JSON.stringify(t));
|
|
1884
1958
|
return i(r);
|
|
1885
1959
|
}
|
|
1886
|
-
},
|
|
1887
|
-
class
|
|
1960
|
+
}, C = new WeakMap(), Ot = new WeakMap(), Lt = new WeakMap(), fs);
|
|
1961
|
+
class cn {
|
|
1888
1962
|
/**
|
|
1889
1963
|
* @ignore
|
|
1890
1964
|
*/
|
|
@@ -1901,7 +1975,7 @@ class Xr {
|
|
|
1901
1975
|
}
|
|
1902
1976
|
}
|
|
1903
1977
|
var ht;
|
|
1904
|
-
class
|
|
1978
|
+
class hn {
|
|
1905
1979
|
/**
|
|
1906
1980
|
* @ignore
|
|
1907
1981
|
*/
|
|
@@ -1913,20 +1987,20 @@ class tn {
|
|
|
1913
1987
|
this.getAll = async () => (await a(this, ht)).getVariables().then((e) => i(e)), this.getById = async (t) => (await a(this, ht)).getVariableById(t).then((r) => i(r)), this.getByName = async (t) => (await a(this, ht)).getVariableByName(t).then((r) => i(r)), this.setListVariable = async (t, e) => (await a(this, ht)).setListVariableItems(
|
|
1914
1988
|
t,
|
|
1915
1989
|
e.map((n) => JSON.stringify(n))
|
|
1916
|
-
).then((n) => i(n)), g(this, ht, o), this.image = new
|
|
1990
|
+
).then((n) => i(n)), g(this, ht, o), this.image = new ln(o);
|
|
1917
1991
|
}
|
|
1918
1992
|
}
|
|
1919
1993
|
ht = new WeakMap();
|
|
1920
1994
|
var Q;
|
|
1921
|
-
class
|
|
1995
|
+
class ln {
|
|
1922
1996
|
constructor(o) {
|
|
1923
1997
|
u(this, Q);
|
|
1924
1998
|
this.setAllowQuery = async (t, e) => (await a(this, Q)).setImageVariableAllowQuery(t, e).then((n) => i(n)), this.setAllowUpload = async (t, e) => (await a(this, Q)).setImageVariableAllowUpload(t, e).then((n) => i(n)), this.setMinUploadSize = async (t, e, r) => (await a(this, Q)).setImageVariableUploadMinSize(t, e, r).then((c) => i(c)), this.setConnector = async (t, e) => (await a(this, Q)).setImageVariableConnector(t, JSON.stringify(e)).then((n) => i(n)), this.setConnectorContext = async (t, e) => (await a(this, Q)).setImageVariableConnectorContext(t, JSON.stringify(e)).then((n) => i(n)), g(this, Q, o);
|
|
1925
1999
|
}
|
|
1926
2000
|
}
|
|
1927
2001
|
Q = new WeakMap();
|
|
1928
|
-
var
|
|
1929
|
-
class
|
|
2002
|
+
var mt;
|
|
2003
|
+
class dn {
|
|
1930
2004
|
/**
|
|
1931
2005
|
* @ignore
|
|
1932
2006
|
*/
|
|
@@ -1934,13 +2008,13 @@ class sn {
|
|
|
1934
2008
|
/**
|
|
1935
2009
|
* @ignore
|
|
1936
2010
|
*/
|
|
1937
|
-
u(this,
|
|
1938
|
-
this.register = async (t) => (await a(this,
|
|
2011
|
+
u(this, mt);
|
|
2012
|
+
this.register = async (t) => (await a(this, mt)).registerConnector(JSON.stringify(t)).then((r) => i(r)), this.getById = async (t) => (await a(this, mt)).getConnectorById(t).then((r) => i(r)), this.getAllByType = async (t) => (await a(this, mt)).getConnectors(t).then((r) => i(r)), g(this, mt, o);
|
|
1939
2013
|
}
|
|
1940
2014
|
}
|
|
1941
|
-
|
|
1942
|
-
var Dt,
|
|
1943
|
-
class
|
|
2015
|
+
mt = new WeakMap();
|
|
2016
|
+
var Dt, ee;
|
|
2017
|
+
class un {
|
|
1944
2018
|
/**
|
|
1945
2019
|
* @ignore
|
|
1946
2020
|
*/
|
|
@@ -1952,22 +2026,22 @@ class rn {
|
|
|
1952
2026
|
/**
|
|
1953
2027
|
* @ignore
|
|
1954
2028
|
*/
|
|
1955
|
-
u(this,
|
|
1956
|
-
this.setWidth = async (t) => (await a(this, Dt)).setPageWidth(t).then((r) => i(r)), this.setHeight = async (t) => (await a(this, Dt)).setPageHeight(t).then((r) => i(r)), g(this, Dt, o), g(this,
|
|
2029
|
+
u(this, ee);
|
|
2030
|
+
this.setWidth = async (t) => (await a(this, Dt)).setPageWidth(t).then((r) => i(r)), this.setHeight = async (t) => (await a(this, Dt)).setPageHeight(t).then((r) => i(r)), g(this, Dt, o), g(this, ee, o);
|
|
1957
2031
|
}
|
|
1958
2032
|
}
|
|
1959
|
-
Dt = new WeakMap(),
|
|
1960
|
-
class
|
|
2033
|
+
Dt = new WeakMap(), ee = new WeakMap();
|
|
2034
|
+
class ds {
|
|
1961
2035
|
/**
|
|
1962
2036
|
* The next initiator is a split off on SDK level to tag next features
|
|
1963
2037
|
* The SDK should be configured clientside and it exposes all controllers to work with in other applications
|
|
1964
2038
|
* @param config The configuration object where the SDK and editor can get configured
|
|
1965
2039
|
*/
|
|
1966
2040
|
constructor(o, t, e) {
|
|
1967
|
-
this.config = o, this.connection = t, this.editorAPI = e, this.subscriber = new
|
|
2041
|
+
this.config = o, this.connection = t, this.editorAPI = e, this.subscriber = new cn(o), this.variable = new hn(this.editorAPI), this.connector = new dn(this.editorAPI), this.page = new un(this.editorAPI), this.canvas = new oe(this.editorAPI);
|
|
1968
2042
|
}
|
|
1969
2043
|
}
|
|
1970
|
-
class
|
|
2044
|
+
class Ds {
|
|
1971
2045
|
constructor(o) {
|
|
1972
2046
|
this.logger = o;
|
|
1973
2047
|
}
|
|
@@ -1983,13 +2057,13 @@ class As {
|
|
|
1983
2057
|
}
|
|
1984
2058
|
handleError(o, t, e) {
|
|
1985
2059
|
var r;
|
|
1986
|
-
if (t ===
|
|
1987
|
-
(r = this.logger) == null || r.call(this, x.error,
|
|
2060
|
+
if (t === kt.log)
|
|
2061
|
+
(r = this.logger) == null || r.call(this, x.error, Ls.event, `Error in callback ${e}: ${o}`);
|
|
1988
2062
|
else
|
|
1989
2063
|
throw o;
|
|
1990
2064
|
}
|
|
1991
2065
|
}
|
|
1992
|
-
class
|
|
2066
|
+
class us extends Ds {
|
|
1993
2067
|
constructor(o, t) {
|
|
1994
2068
|
super(t), this.handler = o;
|
|
1995
2069
|
}
|
|
@@ -2002,10 +2076,10 @@ class os extends As {
|
|
|
2002
2076
|
trigger(...o) {
|
|
2003
2077
|
const t = this.handler();
|
|
2004
2078
|
if (t)
|
|
2005
|
-
return this.createEventHandlerFn(t,
|
|
2079
|
+
return this.createEventHandlerFn(t, kt.throw)(...o);
|
|
2006
2080
|
}
|
|
2007
2081
|
}
|
|
2008
|
-
class
|
|
2082
|
+
class w extends Ds {
|
|
2009
2083
|
constructor(o, t) {
|
|
2010
2084
|
super(t), this.legacyHandler = o, this.subscriptions = /* @__PURE__ */ new Set();
|
|
2011
2085
|
}
|
|
@@ -2017,7 +2091,7 @@ class C extends As {
|
|
|
2017
2091
|
*/
|
|
2018
2092
|
trigger(...o) {
|
|
2019
2093
|
const t = this.legacyHandler();
|
|
2020
|
-
t && this.createEventHandlerFn(t,
|
|
2094
|
+
t && this.createEventHandlerFn(t, kt.log)(...o);
|
|
2021
2095
|
for (const e of this.subscriptions)
|
|
2022
2096
|
e(...o);
|
|
2023
2097
|
}
|
|
@@ -2031,14 +2105,14 @@ class C extends As {
|
|
|
2031
2105
|
* - "throw": Throws an error. Keep in mind that throwing of error in one of the callback will prevent calling of others
|
|
2032
2106
|
* @returns A function to unsubscribe the callback, preventing it from being invoked in the future.
|
|
2033
2107
|
*/
|
|
2034
|
-
registerCallback(o, t =
|
|
2108
|
+
registerCallback(o, t = kt.log) {
|
|
2035
2109
|
const e = this.createEventHandlerFn(o, t);
|
|
2036
2110
|
return this.subscriptions.add(e), () => {
|
|
2037
2111
|
this.subscriptions.delete(e);
|
|
2038
2112
|
};
|
|
2039
2113
|
}
|
|
2040
2114
|
}
|
|
2041
|
-
class
|
|
2115
|
+
class we {
|
|
2042
2116
|
/**
|
|
2043
2117
|
* Creates a runtime configuration object from the provided configuration object.
|
|
2044
2118
|
*
|
|
@@ -2046,181 +2120,181 @@ class de {
|
|
|
2046
2120
|
* @returns The runtime configuration object.
|
|
2047
2121
|
*/
|
|
2048
2122
|
static createRuntimeConfig(o) {
|
|
2049
|
-
var e, r, n, c,
|
|
2123
|
+
var e, r, n, c, h, l, p, y, v, f, b, A, I, S, M, E, P, W, j, St, bt, Ce, me, fe, Se, be, ve, Ie, Ae, Pe, Fe, Ee, Oe, Le, De;
|
|
2050
2124
|
const t = { ...o };
|
|
2051
2125
|
return t.logging = {
|
|
2052
2126
|
logLevel: ((e = o.logging) == null ? void 0 : e.logLevel) || x.error,
|
|
2053
|
-
logger: ((r = o.logging) == null ? void 0 : r.logger) || ((
|
|
2054
|
-
var
|
|
2055
|
-
if (
|
|
2056
|
-
switch (
|
|
2127
|
+
logger: ((r = o.logging) == null ? void 0 : r.logger) || ((xt, se, re) => {
|
|
2128
|
+
var Ne;
|
|
2129
|
+
if (we.isLoggingEnabled(xt, ((Ne = t.logging) == null ? void 0 : Ne.logLevel) ?? x.error))
|
|
2130
|
+
switch (xt) {
|
|
2057
2131
|
case x.error:
|
|
2058
|
-
console.error(`[${
|
|
2132
|
+
console.error(`[${se}] [${xt}] ${re}`);
|
|
2059
2133
|
break;
|
|
2060
2134
|
case x.warn:
|
|
2061
|
-
console.warn(`[${
|
|
2135
|
+
console.warn(`[${se}] [${xt}] ${re}`);
|
|
2062
2136
|
break;
|
|
2063
2137
|
default:
|
|
2064
|
-
console.log(`[${
|
|
2138
|
+
console.log(`[${se}] [${xt}] ${re}`);
|
|
2065
2139
|
}
|
|
2066
2140
|
})
|
|
2067
2141
|
}, t.handlers = {
|
|
2068
|
-
onAuthExpired: new
|
|
2069
|
-
onViewportRequested: new
|
|
2142
|
+
onAuthExpired: new us(() => t.onAuthExpired, (n = t.logging) == null ? void 0 : n.logger),
|
|
2143
|
+
onViewportRequested: new us(
|
|
2070
2144
|
() => t.onViewportRequested,
|
|
2071
2145
|
(c = t.logging) == null ? void 0 : c.logger
|
|
2072
2146
|
)
|
|
2073
2147
|
}, t.events = {
|
|
2074
|
-
onActionsChanged: new
|
|
2148
|
+
onActionsChanged: new w(
|
|
2075
2149
|
() => t.onActionsChanged,
|
|
2076
|
-
(
|
|
2150
|
+
(h = t.logging) == null ? void 0 : h.logger
|
|
2077
2151
|
),
|
|
2078
|
-
onStateChanged: new
|
|
2152
|
+
onStateChanged: new w(
|
|
2079
2153
|
() => t.onStateChanged,
|
|
2080
|
-
(
|
|
2154
|
+
(l = t.logging) == null ? void 0 : l.logger
|
|
2081
2155
|
),
|
|
2082
|
-
onDocumentLoaded: new
|
|
2156
|
+
onDocumentLoaded: new w(
|
|
2083
2157
|
() => t.onDocumentLoaded,
|
|
2084
2158
|
(p = t.logging) == null ? void 0 : p.logger
|
|
2085
2159
|
),
|
|
2086
|
-
onSelectedFramesLayoutChanged: new
|
|
2160
|
+
onSelectedFramesLayoutChanged: new w(
|
|
2087
2161
|
() => t.onSelectedFramesLayoutChanged,
|
|
2088
2162
|
(y = t.logging) == null ? void 0 : y.logger
|
|
2089
2163
|
),
|
|
2090
|
-
onFramesLayoutChanged: new
|
|
2164
|
+
onFramesLayoutChanged: new w(
|
|
2091
2165
|
() => t.onFramesLayoutChanged,
|
|
2092
2166
|
(v = t.logging) == null ? void 0 : v.logger
|
|
2093
2167
|
),
|
|
2094
|
-
onSelectedFramesContentChanged: new
|
|
2168
|
+
onSelectedFramesContentChanged: new w(
|
|
2095
2169
|
() => t.onSelectedFramesContentChanged,
|
|
2096
|
-
(
|
|
2170
|
+
(f = t.logging) == null ? void 0 : f.logger
|
|
2097
2171
|
),
|
|
2098
|
-
onPageSelectionChanged: new
|
|
2172
|
+
onPageSelectionChanged: new w(
|
|
2099
2173
|
() => t.onPageSelectionChanged,
|
|
2100
2174
|
(b = t.logging) == null ? void 0 : b.logger
|
|
2101
2175
|
),
|
|
2102
|
-
onSelectedLayoutPropertiesChanged: new
|
|
2176
|
+
onSelectedLayoutPropertiesChanged: new w(
|
|
2103
2177
|
() => t.onSelectedLayoutPropertiesChanged,
|
|
2104
2178
|
(A = t.logging) == null ? void 0 : A.logger
|
|
2105
2179
|
),
|
|
2106
|
-
onSelectedLayoutUnitChanged: new
|
|
2180
|
+
onSelectedLayoutUnitChanged: new w(
|
|
2107
2181
|
() => t.onSelectedLayoutUnitChanged,
|
|
2108
2182
|
(I = t.logging) == null ? void 0 : I.logger
|
|
2109
2183
|
),
|
|
2110
|
-
onScrubberPositionChanged: new
|
|
2184
|
+
onScrubberPositionChanged: new w(
|
|
2111
2185
|
() => t.onScrubberPositionChanged,
|
|
2112
|
-
(
|
|
2186
|
+
(S = t.logging) == null ? void 0 : S.logger
|
|
2113
2187
|
),
|
|
2114
|
-
onFrameAnimationsChanged: new
|
|
2188
|
+
onFrameAnimationsChanged: new w(
|
|
2115
2189
|
() => t.onFrameAnimationsChanged,
|
|
2116
2190
|
(M = t.logging) == null ? void 0 : M.logger
|
|
2117
2191
|
),
|
|
2118
|
-
onVariableListChanged: new
|
|
2192
|
+
onVariableListChanged: new w(
|
|
2119
2193
|
() => t.onVariableListChanged,
|
|
2120
2194
|
(E = t.logging) == null ? void 0 : E.logger
|
|
2121
2195
|
),
|
|
2122
|
-
onSelectedToolChanged: new
|
|
2196
|
+
onSelectedToolChanged: new w(
|
|
2123
2197
|
() => t.onSelectedToolChanged,
|
|
2124
2198
|
(P = t.logging) == null ? void 0 : P.logger
|
|
2125
2199
|
),
|
|
2126
|
-
onUndoStackStateChanged: new
|
|
2200
|
+
onUndoStackStateChanged: new w(
|
|
2127
2201
|
() => t.onUndoStackStateChanged,
|
|
2128
2202
|
(W = t.logging) == null ? void 0 : W.logger
|
|
2129
2203
|
),
|
|
2130
|
-
onSelectedLayoutFramesChanged: new
|
|
2204
|
+
onSelectedLayoutFramesChanged: new w(
|
|
2131
2205
|
() => t.onSelectedLayoutFramesChanged,
|
|
2132
2206
|
(j = t.logging) == null ? void 0 : j.logger
|
|
2133
2207
|
),
|
|
2134
|
-
onSelectedTextStyleChanged: new
|
|
2208
|
+
onSelectedTextStyleChanged: new w(
|
|
2135
2209
|
() => t.onSelectedTextStyleChanged,
|
|
2136
|
-
(
|
|
2210
|
+
(St = t.logging) == null ? void 0 : St.logger
|
|
2137
2211
|
),
|
|
2138
|
-
onColorsChanged: new
|
|
2212
|
+
onColorsChanged: new w(
|
|
2139
2213
|
() => t.onColorsChanged,
|
|
2140
|
-
(
|
|
2214
|
+
(bt = t.logging) == null ? void 0 : bt.logger
|
|
2141
2215
|
),
|
|
2142
|
-
onParagraphStylesChanged: new
|
|
2216
|
+
onParagraphStylesChanged: new w(
|
|
2143
2217
|
() => t.onParagraphStylesChanged,
|
|
2144
|
-
(
|
|
2218
|
+
(Ce = t.logging) == null ? void 0 : Ce.logger
|
|
2145
2219
|
),
|
|
2146
|
-
onCharacterStylesChanged: new
|
|
2220
|
+
onCharacterStylesChanged: new w(
|
|
2147
2221
|
() => t.onCharacterStylesChanged,
|
|
2148
|
-
(
|
|
2222
|
+
(me = t.logging) == null ? void 0 : me.logger
|
|
2149
2223
|
),
|
|
2150
|
-
onFontFamiliesChanged: new
|
|
2224
|
+
onFontFamiliesChanged: new w(
|
|
2151
2225
|
() => t.onFontFamiliesChanged,
|
|
2152
|
-
(
|
|
2226
|
+
(fe = t.logging) == null ? void 0 : fe.logger
|
|
2153
2227
|
),
|
|
2154
|
-
onSelectedLayoutIdChanged: new
|
|
2228
|
+
onSelectedLayoutIdChanged: new w(
|
|
2155
2229
|
() => t.onSelectedLayoutIdChanged,
|
|
2156
|
-
(
|
|
2230
|
+
(Se = t.logging) == null ? void 0 : Se.logger
|
|
2157
2231
|
),
|
|
2158
|
-
onLayoutsChanged: new
|
|
2232
|
+
onLayoutsChanged: new w(
|
|
2159
2233
|
() => t.onLayoutsChanged,
|
|
2160
|
-
(
|
|
2234
|
+
(be = t.logging) == null ? void 0 : be.logger
|
|
2161
2235
|
),
|
|
2162
|
-
onConnectorEvent: new
|
|
2236
|
+
onConnectorEvent: new w(
|
|
2163
2237
|
() => t.onConnectorEvent,
|
|
2164
|
-
(
|
|
2238
|
+
(ve = t.logging) == null ? void 0 : ve.logger
|
|
2165
2239
|
),
|
|
2166
|
-
onConnectorsChanged: new
|
|
2240
|
+
onConnectorsChanged: new w(
|
|
2167
2241
|
() => t.onConnectorsChanged,
|
|
2168
|
-
(
|
|
2242
|
+
(Ie = t.logging) == null ? void 0 : Ie.logger
|
|
2169
2243
|
),
|
|
2170
|
-
onZoomChanged: new
|
|
2244
|
+
onZoomChanged: new w(
|
|
2171
2245
|
() => t.onZoomChanged,
|
|
2172
|
-
(
|
|
2246
|
+
(Ae = t.logging) == null ? void 0 : Ae.logger
|
|
2173
2247
|
),
|
|
2174
|
-
onSelectedPageIdChanged: new
|
|
2248
|
+
onSelectedPageIdChanged: new w(
|
|
2175
2249
|
() => t.onSelectedPageIdChanged,
|
|
2176
2250
|
t.logging.logger
|
|
2177
2251
|
),
|
|
2178
|
-
onPagesChanged: new
|
|
2252
|
+
onPagesChanged: new w(
|
|
2179
2253
|
() => t.onPagesChanged,
|
|
2180
2254
|
t.logging.logger
|
|
2181
2255
|
),
|
|
2182
|
-
onPageSnapshotInvalidated: new
|
|
2256
|
+
onPageSnapshotInvalidated: new w(
|
|
2183
2257
|
() => t.onPageSnapshotInvalidated,
|
|
2184
2258
|
t.logging.logger
|
|
2185
2259
|
),
|
|
2186
|
-
onPageSizeChanged: new
|
|
2260
|
+
onPageSizeChanged: new w(
|
|
2187
2261
|
() => t.onPageSizeChanged,
|
|
2188
|
-
(
|
|
2262
|
+
(Pe = t.logging) == null ? void 0 : Pe.logger
|
|
2189
2263
|
),
|
|
2190
|
-
onShapeCornerRadiusChanged: new
|
|
2264
|
+
onShapeCornerRadiusChanged: new w(
|
|
2191
2265
|
() => t.onShapeCornerRadiusChanged,
|
|
2192
|
-
(
|
|
2266
|
+
(Fe = t.logging) == null ? void 0 : Fe.logger
|
|
2193
2267
|
),
|
|
2194
|
-
onCropActiveFrameIdChanged: new
|
|
2268
|
+
onCropActiveFrameIdChanged: new w(
|
|
2195
2269
|
() => t.onCropActiveFrameIdChanged,
|
|
2196
|
-
(
|
|
2270
|
+
(Ee = t.logging) == null ? void 0 : Ee.logger
|
|
2197
2271
|
),
|
|
2198
|
-
onAsyncError: new
|
|
2272
|
+
onAsyncError: new w(
|
|
2199
2273
|
() => t.onAsyncError,
|
|
2200
|
-
(
|
|
2274
|
+
(Oe = t.logging) == null ? void 0 : Oe.logger
|
|
2201
2275
|
),
|
|
2202
|
-
onViewModeChanged: new
|
|
2276
|
+
onViewModeChanged: new w(
|
|
2203
2277
|
() => t.onViewModeChanged,
|
|
2204
|
-
(
|
|
2278
|
+
(Le = t.logging) == null ? void 0 : Le.logger
|
|
2205
2279
|
),
|
|
2206
|
-
onBarcodeValidationChanged: new
|
|
2207
|
-
onDataSourceIdChanged: new
|
|
2280
|
+
onBarcodeValidationChanged: new w(() => t.onBarcodeValidationChanged, (De = t.logging) == null ? void 0 : De.logger),
|
|
2281
|
+
onDataSourceIdChanged: new w(
|
|
2208
2282
|
() => t.onDataSourceIdChanged,
|
|
2209
2283
|
t.logging.logger
|
|
2210
2284
|
),
|
|
2211
|
-
onDocumentIssueListChanged: new
|
|
2285
|
+
onDocumentIssueListChanged: new w(
|
|
2212
2286
|
() => t.onDocumentIssueListChanged,
|
|
2213
2287
|
t.logging.logger
|
|
2214
2288
|
),
|
|
2215
|
-
onCustomUndoDataChanged: new
|
|
2289
|
+
onCustomUndoDataChanged: new w(
|
|
2216
2290
|
() => t.onCustomUndoDataChanged,
|
|
2217
2291
|
t.logging.logger
|
|
2218
2292
|
),
|
|
2219
|
-
onEngineEditModeChanged: new
|
|
2293
|
+
onEngineEditModeChanged: new w(
|
|
2220
2294
|
() => t.onEngineEditModeChanged,
|
|
2221
2295
|
t.logging.logger
|
|
2222
2296
|
),
|
|
2223
|
-
onBrandKitMediaChanged: new
|
|
2297
|
+
onBrandKitMediaChanged: new w(
|
|
2224
2298
|
() => t.onBrandKitMediaChanged,
|
|
2225
2299
|
t.logging.logger
|
|
2226
2300
|
)
|
|
@@ -2230,7 +2304,7 @@ class de {
|
|
|
2230
2304
|
return t == x.info || t == x.warn && (o == x.warn || o == x.error) ? !0 : t == x.error && o == x.error;
|
|
2231
2305
|
}
|
|
2232
2306
|
}
|
|
2233
|
-
class
|
|
2307
|
+
class gn {
|
|
2234
2308
|
/**
|
|
2235
2309
|
* Checks if the given value is a `DatePropertyWrapper`.
|
|
2236
2310
|
*
|
|
@@ -2281,7 +2355,7 @@ class nn {
|
|
|
2281
2355
|
}
|
|
2282
2356
|
}
|
|
2283
2357
|
var lt;
|
|
2284
|
-
class
|
|
2358
|
+
class yn {
|
|
2285
2359
|
/**
|
|
2286
2360
|
* @ignore
|
|
2287
2361
|
*/
|
|
@@ -2324,8 +2398,8 @@ class an {
|
|
|
2324
2398
|
}
|
|
2325
2399
|
}
|
|
2326
2400
|
lt = new WeakMap();
|
|
2327
|
-
var
|
|
2328
|
-
class
|
|
2401
|
+
var Nt;
|
|
2402
|
+
class gs extends yn {
|
|
2329
2403
|
/**
|
|
2330
2404
|
* @ignore
|
|
2331
2405
|
*/
|
|
@@ -2334,8 +2408,8 @@ class cs extends an {
|
|
|
2334
2408
|
/**
|
|
2335
2409
|
* @ignore
|
|
2336
2410
|
*/
|
|
2337
|
-
u(this,
|
|
2338
|
-
g(this,
|
|
2411
|
+
u(this, Nt);
|
|
2412
|
+
g(this, Nt, e);
|
|
2339
2413
|
}
|
|
2340
2414
|
/**
|
|
2341
2415
|
* This method returns the value for a given configuration key. If a value was not found in the configuration store,
|
|
@@ -2343,7 +2417,7 @@ class cs extends an {
|
|
|
2343
2417
|
* @returns value for a given configuration key
|
|
2344
2418
|
*/
|
|
2345
2419
|
async getValue(t) {
|
|
2346
|
-
const e = a(this,
|
|
2420
|
+
const e = a(this, Nt).get(t);
|
|
2347
2421
|
return e != null ? i(
|
|
2348
2422
|
{
|
|
2349
2423
|
status: 200,
|
|
@@ -2362,12 +2436,12 @@ class cs extends an {
|
|
|
2362
2436
|
*/
|
|
2363
2437
|
async setValue(t, e) {
|
|
2364
2438
|
const r = super.setValue(t, e);
|
|
2365
|
-
return a(this,
|
|
2439
|
+
return a(this, Nt).set(t, e), r;
|
|
2366
2440
|
}
|
|
2367
2441
|
}
|
|
2368
|
-
|
|
2369
|
-
var
|
|
2370
|
-
class
|
|
2442
|
+
Nt = new WeakMap();
|
|
2443
|
+
var U;
|
|
2444
|
+
class ys {
|
|
2371
2445
|
/**
|
|
2372
2446
|
* @ignore
|
|
2373
2447
|
*/
|
|
@@ -2375,26 +2449,59 @@ class hs {
|
|
|
2375
2449
|
/**
|
|
2376
2450
|
* @ignore
|
|
2377
2451
|
*/
|
|
2378
|
-
u(this,
|
|
2379
|
-
this.getAll = async () => (await a(this,
|
|
2380
|
-
const r = await a(this,
|
|
2452
|
+
u(this, U);
|
|
2453
|
+
this.getAll = async () => (await a(this, U)).getGradients().then((e) => i(e)), this.getById = async (t) => (await a(this, U)).getGradientById(t).then((r) => i(r)), this.create = async () => (await a(this, U)).createGradient().then((e) => i(e)), this.duplicate = async (t) => (await a(this, U)).duplicateGradient(t).then((r) => i(r)), this.move = async (t, e) => (await a(this, U)).moveGradients(t, e).then((n) => i(n)), this.rename = async (t, e) => (await a(this, U)).renameGradient(t, e).then((n) => i(n)), this.update = async (t, e) => {
|
|
2454
|
+
const r = await a(this, U), n = e;
|
|
2381
2455
|
return r.updateGradient(t, JSON.stringify(n)).then((c) => i(c));
|
|
2382
|
-
}, this.remove = async (t) => (await a(this,
|
|
2456
|
+
}, this.remove = async (t) => (await a(this, U)).removeGradient(t).then((r) => i(r)), g(this, U, o);
|
|
2383
2457
|
}
|
|
2384
2458
|
}
|
|
2385
|
-
|
|
2386
|
-
|
|
2459
|
+
U = new WeakMap();
|
|
2460
|
+
var ft, Zt;
|
|
2461
|
+
class ps {
|
|
2462
|
+
/**
|
|
2463
|
+
* @ignore
|
|
2464
|
+
*/
|
|
2465
|
+
constructor(o) {
|
|
2466
|
+
/**
|
|
2467
|
+
* @ignore
|
|
2468
|
+
*/
|
|
2469
|
+
u(this, ft);
|
|
2470
|
+
u(this, Zt);
|
|
2471
|
+
this.query = async (t, e, r = {}) => (await a(this, ft)).componentConnectorQuery(t, JSON.stringify(e), JSON.stringify(r)).then((c) => i(c)), this.preview = async (t, e, r, n = {}) => (await a(this, Zt)).componentConnectorPreview(t, e, r, JSON.stringify(n)).then((h) => {
|
|
2472
|
+
if (h instanceof Uint8Array)
|
|
2473
|
+
return h;
|
|
2474
|
+
throw typeof h == "object" && h !== null && "success" in h && !h.success && ge(h), new Error(`Unexpected response type: ${typeof h}.`);
|
|
2475
|
+
}), this.getConfigurationOptions = async (t) => (await a(this, ft)).componentConnectorGetConfigurationOptions(t).then((r) => i(r)), this.getCapabilities = async (t) => (await a(this, ft)).componentConnectorGetCapabilities(t).then((r) => i(r)), g(this, ft, o), g(this, Zt, o);
|
|
2476
|
+
}
|
|
2477
|
+
}
|
|
2478
|
+
ft = new WeakMap(), Zt = new WeakMap();
|
|
2479
|
+
var Mt;
|
|
2480
|
+
class ws {
|
|
2481
|
+
/**
|
|
2482
|
+
* @ignore
|
|
2483
|
+
*/
|
|
2484
|
+
constructor(o) {
|
|
2485
|
+
/**
|
|
2486
|
+
* @ignore
|
|
2487
|
+
*/
|
|
2488
|
+
u(this, Mt);
|
|
2489
|
+
this.linkVariable = async (t, e, r) => (await a(this, Mt)).linkComponentVariable(t, e, r, null).then((c) => i(c)), this.getComponentVariables = async (t) => (await a(this, Mt)).getComponentVariables(t).then((r) => i(r)), g(this, Mt, o);
|
|
2490
|
+
}
|
|
2491
|
+
}
|
|
2492
|
+
Mt = new WeakMap();
|
|
2493
|
+
const pn = "studio-cdn.chiligrafx.com", wn = `https://${pn}/editor/${Ss.current}/web`;
|
|
2387
2494
|
let et;
|
|
2388
|
-
class
|
|
2495
|
+
class Qn {
|
|
2389
2496
|
/**
|
|
2390
2497
|
* The SDK should be configured clientside and it exposes all controllers to work with in other applications
|
|
2391
2498
|
* @param config The configuration object where the SDK and editor can get configured
|
|
2392
2499
|
*/
|
|
2393
2500
|
constructor(o) {
|
|
2394
|
-
this.localConfig = /* @__PURE__ */ new Map(), this.dataItemMappingTools = new
|
|
2501
|
+
this.localConfig = /* @__PURE__ */ new Map(), this.dataItemMappingTools = new gn(), this.loadEditor = () => {
|
|
2395
2502
|
var t;
|
|
2396
|
-
|
|
2397
|
-
this.config.editorLink ||
|
|
2503
|
+
nr(
|
|
2504
|
+
this.config.editorLink || wn,
|
|
2398
2505
|
{
|
|
2399
2506
|
onActionsChanged: this.subscriber.onActionsChanged,
|
|
2400
2507
|
onStateChanged: this.subscriber.onStateChanged,
|
|
@@ -2449,117 +2556,124 @@ class Tn {
|
|
|
2449
2556
|
},
|
|
2450
2557
|
this.setConnection,
|
|
2451
2558
|
this.config.editorId,
|
|
2452
|
-
this.config.studioStyling
|
|
2453
|
-
|
|
2559
|
+
this.config.studioStyling,
|
|
2560
|
+
(e) => {
|
|
2561
|
+
var r, n;
|
|
2562
|
+
(n = (r = this.config).onConnectionError) == null || n.call(r, e);
|
|
2563
|
+
}
|
|
2564
|
+
), this.editorAPI = et == null ? void 0 : et.promise.then((e) => e), this.action = new Ve(this.editorAPI), this.layout = new ss(this.editorAPI), this.frame = new ts(this.editorAPI), this.barcode = new Ge(this.editorAPI), this.component = new ws(this.editorAPI), this.animation = new Je(this.editorAPI), this.document = new Ye(this.editorAPI), this.configuration = new gs(this.editorAPI, this.localConfig), this.utils = new hs(this.editorAPI, this.localConfig), this.tool = new os(this.editorAPI), this.page = new ns(this.editorAPI), this.debug = new qe(this.editorAPI), this.undoManager = new cs(this.editorAPI, this), this.textSelection = new is(this.editorAPI), this.colorStyle = new Ke(this.editorAPI), this.gradientStyle = new ys(this.editorAPI), this.paragraphStyle = new as(this.editorAPI), this.characterStyle = new He(this.editorAPI), this.mediaConnector = new rs(this.editorAPI), this.fontConnector = new Qe(this.editorAPI), this.componentConnector = new ps(this.editorAPI), this.dataConnector = new We(this.editorAPI, this.dataItemMappingTools), this.dataSource = new je(this.editorAPI, this.dataItemMappingTools), this.connector = new ze(this.editorAPI, this.localConfig), this.variable = new ls(this.editorAPI), this.font = new Xe(this.editorAPI), this.experiment = new Ze(this.editorAPI), this.canvas = new oe(this.editorAPI), this.shape = new le(this.editorAPI), this.colorConversion = new $e(this.editorAPI), this.info = new es(), this.clipboard = new Te(this.editorAPI), this.brandKit = new _e(this.editorAPI, this), this.next = new ds(this.config, this.connection, this.editorAPI), this.configuration.setValue(tt.GraFxStudioSdkVersion, bs.version), this.configuration.setValue(
|
|
2454
2565
|
tt.GraFxStudioDocumentType,
|
|
2455
|
-
this.config.documentType ||
|
|
2456
|
-
), this.configuration.updateStudioOptions(this.config.studioOptions ||
|
|
2566
|
+
this.config.documentType || Ps.template
|
|
2567
|
+
), this.configuration.updateStudioOptions(this.config.studioOptions || ir), this.configuration.setValue(
|
|
2457
2568
|
tt.QueryCallCacheEnabled,
|
|
2458
2569
|
((t = this.config.enableQueryCallCache) == null ? void 0 : t.toString()) || "false"
|
|
2459
2570
|
);
|
|
2460
2571
|
}, this.setConnection = (t) => {
|
|
2461
2572
|
et = t;
|
|
2462
|
-
}, this.config =
|
|
2573
|
+
}, this.config = we.createRuntimeConfig(o), this.connection = et, this.editorAPI = et == null ? void 0 : et.promise.then((t) => t), this.action = new Ve(this.editorAPI), this.layout = new ss(this.editorAPI), this.frame = new ts(this.editorAPI), this.shape = new le(this.editorAPI), this.barcode = new Ge(this.editorAPI), this.component = new ws(this.editorAPI), this.undoManager = new cs(this.editorAPI, this), this.connector = new ze(this.editorAPI, this.localConfig), this.mediaConnector = new rs(this.editorAPI), this.fontConnector = new Qe(this.editorAPI), this.componentConnector = new ps(this.editorAPI), this.dataConnector = new We(this.editorAPI, this.dataItemMappingTools), this.dataSource = new je(this.editorAPI, this.dataItemMappingTools), this.animation = new Je(this.editorAPI), this.document = new Ye(this.editorAPI), this.configuration = new gs(this.editorAPI, this.localConfig), this.variable = new ls(this.editorAPI), this.utils = new hs(this.editorAPI, this.localConfig), this.subscriber = new Xr(this.config, this.localConfig), this.tool = new os(this.editorAPI), this.page = new ns(this.editorAPI), this.debug = new qe(this.editorAPI), this.textSelection = new is(this.editorAPI), this.colorStyle = new Ke(this.editorAPI), this.gradientStyle = new ys(this.editorAPI), this.paragraphStyle = new as(this.editorAPI), this.characterStyle = new He(this.editorAPI), this.font = new Xe(this.editorAPI), this.experiment = new Ze(this.editorAPI), this.canvas = new oe(this.editorAPI), this.colorConversion = new $e(this.editorAPI), this.info = new es(), this.clipboard = new Te(this.editorAPI), this.next = new ds(this.config, this.connection, this.editorAPI), this.enabledNextSubscribers = this.config.enableNextSubscribers, this.brandKit = new _e(this.editorAPI, this);
|
|
2463
2574
|
}
|
|
2464
2575
|
}
|
|
2465
|
-
var
|
|
2466
|
-
const
|
|
2576
|
+
var Cn = /* @__PURE__ */ ((s) => (s.top = "top", s.left = "left", s.right = "right", s.bottom = "bottom", s.topLeft = "topLeft", s.topRight = "topRight", s.bottomLeft = "bottomLeft", s.bottomRight = "bottomRight", s))(Cn || {}), mn = /* @__PURE__ */ ((s) => (s.horizontal = "horizontal", s.vertical = "vertical", s))(mn || {}), fn = /* @__PURE__ */ ((s) => (s.easeIn = "easeIn", s.easeOut = "easeOut", s.easeInOut = "easeInOut", s))(fn || {}), Sn = /* @__PURE__ */ ((s) => (s.quadratic = "Quadratic", s.cubic = "Cubic", s.quartic = "Quartic", s.quintic = "Quintic", s.sine = "Sine", s.exponential = "Exponential", s.circular = "Circular", s.elastic = "Elastic", s.bounce = "Bounce", s.back = "Back", s))(Sn || {}), bn = /* @__PURE__ */ ((s) => (s.bounce = "bounce", s.flash = "flash", s.headshake = "headShake", s.heartbeat = "heartbeat", s.pulse = "pulse", s.rubberBand = "rubberBand", s.vertical = "vertical", s.horizontal = "horizontal", s.swing = "swing", s.tada = "tada", s))(bn || {}), vn = /* @__PURE__ */ ((s) => (s.preview = "preview", s.normal = "normal", s))(vn || {}), In = /* @__PURE__ */ ((s) => (s.linear = "linear", s))(In || {}), An = /* @__PURE__ */ ((s) => (s.local = "linearLocal", s.linearBrandKit = "linearBrandKit", s))(An || {}), Pn = /* @__PURE__ */ ((s) => (s.Square = "square", s.Line = "line", s))(Pn || {}), Fn = /* @__PURE__ */ ((s) => (s.thumbnail = "thumbnail", s.highest = "highest", s.medium = "medium", s))(Fn || {}), En = /* @__PURE__ */ ((s) => (s.BOLD = "Bold", s.ITALIC = "Italic", s.REGULAR = "Regular", s))(En || {}), On = /* @__PURE__ */ ((s) => (s.LEFT = "left", s.CENTER = "center", s.RIGHT = "right", s.JUSTIFY = "justify", s))(On || {}), Ln = /* @__PURE__ */ ((s) => (s.TOP = "top", s.CENTER = "center", s.BOTTOM = "bottom", s))(Ln || {}), Dn = /* @__PURE__ */ ((s) => (s.TO_LOWER_CASE = "lowercase", s.TO_UPPER_CASE = "uppercase", s.NORMAL = "normal", s))(Dn || {}), Nn = /* @__PURE__ */ ((s) => (s.SUPERSCRIPT = "superscript", s.SUBSCRIPT = "subscript", s.NORMAL = "normal", s))(Nn || {}), Mn = /* @__PURE__ */ ((s) => (s.none = "none", s.bullet = "bullet", s.number = "number", s))(Mn || {}), xn = /* @__PURE__ */ ((s) => (s.STYLE = "textStyle", s.PROPERTIES = "textProperties", s.APPEARANCE = "appearance", s))(xn || {}), Rn = /* @__PURE__ */ ((s) => (s.PARAGRAPH = "paragraphStyleId", s.CHARACTER = "characterStyleId", s.FONT_FAMILY = "fontKey", s.FONT_STYLE = "fontStyle", s.FONT_SIZE = "fontSize", s.LETTER_SPACING = "letterSpacing", s.LINE_HEIGHT = "lineHeight", s.TEXT_ALIGN = "textAlign", s.VERTICAL_ALIGN = "verticalAlign", s.TYPOGRAPHIC_CASE = "typographicCase", s.SUB_SUPER_SCRIPT = "subSuperScript", s.UNDERLINE = "underline", s.LINE_THROUGH = "lineThrough", s.FILL_COLOR = "fillColor", s.COLOR = "color", s.FILL_COLOR_APPLIED = "fillColorApplied", s.STROKE_COLOR = "strokeColor", s.STROKE_COLOR_APPLIED = "strokeColorApplied", s.DROP_SHADOW_COLOR = "dropShadowColor", s.BLEND_MODE = "blendMode", s.OPACITY = "opacity", s.TRACKING_RIGHT = "trackingRight", s.BASELINE_SHIFT = "baselineShiftValue", s.STROKE_WIDTH = "strokeWidth", s.MARKED_LIST_TYPE = "markedListType", s.MARKED_LIST_GROUP = "markedListGroup", s.MARKED_LIST_LEVEL = "markedListLevel", s))(Rn || {}), Vn = /* @__PURE__ */ ((s) => (s.arabic = "arabic", s.romanUpperCase = "romanUpperCase", s.romanLowerCase = "romanLowerCase", s.latinUpperCase = "latinUpperCase", s.latinLowerCase = "latinLowerCase", s))(Vn || {}), Jn = /* @__PURE__ */ ((s) => (s.none = "none", s.dash = "dash", s.dot = "dot", s.colon = "colon", s.roundBracket = "roundBracket", s))(Jn || {}), Gn = /* @__PURE__ */ ((s) => (s.selectedLayoutChanged = "selectedLayoutChanged", s.frameMoved = "frameMoved", s.pageSizeChanged = "pageSizeChanged", s.documentLoaded = "documentLoaded", s.variableValueChanged = "variableValueChanged", s))(Gn || {}), Bn = /* @__PURE__ */ ((s) => (s.ellipse = "ellipse", s.rectangle = "rectangle", s.polygon = "polygon", s))(Bn || {}), Un = /* @__PURE__ */ ((s) => (s.all = "all", s.only = "only", s.none = "none", s))(Un || {}), kn = /* @__PURE__ */ ((s) => (s.normal = "normal", s.textEdit = "textEdit", s.customCrop = "customCrop", s.frameSubjectArea = "frameSubjectArea", s.perAssetCrop = "perAssetCrop", s.gradient = "gradient", s))(kn || {}), Ns = /* @__PURE__ */ ((s) => (s.url = "url", s.grafx = "grafx", s.local = "local", s))(Ns || {});
|
|
2577
|
+
const Xn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2467
2578
|
__proto__: null,
|
|
2468
|
-
ConnectorRegistrationSource:
|
|
2579
|
+
ConnectorRegistrationSource: Ns
|
|
2469
2580
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2470
2581
|
export {
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2582
|
+
Wr as ActionAsyncError,
|
|
2583
|
+
Gn as ActionEditorEvent,
|
|
2584
|
+
On as Alignment,
|
|
2585
|
+
Kr as AnchorTargetEdgeType,
|
|
2586
|
+
$r as AnchorTargetType,
|
|
2587
|
+
Or as AuthCredentialsTypeEnum,
|
|
2588
|
+
Lr as AuthRefreshTypeEnum,
|
|
2589
|
+
Mr as AutoGrowDirection,
|
|
2590
|
+
vt as BarcodeCharacterSet,
|
|
2591
|
+
Rt as BarcodeErrorCorrectionLevel,
|
|
2592
|
+
Vr as BarcodeSourceTypeEnum,
|
|
2593
|
+
$ as BarcodeType,
|
|
2594
|
+
lr as BarcodeValidationResult,
|
|
2595
|
+
bn as BasicAnimationsEmphasisStyles,
|
|
2596
|
+
Ur as BlendMode,
|
|
2597
|
+
Dn as Case,
|
|
2487
2598
|
q as ColorType,
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2599
|
+
ae as ColorUsageType,
|
|
2600
|
+
Fn as ComponentPreviewType,
|
|
2601
|
+
xr as ComponentSourceTypeEnum,
|
|
2602
|
+
Ar as ConnectorConfigContextType,
|
|
2603
|
+
Ir as ConnectorConfigValueType,
|
|
2604
|
+
Er as ConnectorEventType,
|
|
2605
|
+
hr as ConnectorHttpError,
|
|
2606
|
+
Hn as ConnectorMapping,
|
|
2607
|
+
Fr as ConnectorMappingDirection,
|
|
2608
|
+
Pr as ConnectorMappingSource,
|
|
2609
|
+
Vt as ConnectorRegistrationSource,
|
|
2610
|
+
he as ConnectorStateType,
|
|
2611
|
+
Sr as ConnectorType,
|
|
2612
|
+
yr as ConstraintMode,
|
|
2613
|
+
Un as CornerRadiusType,
|
|
2614
|
+
Es as CropType,
|
|
2615
|
+
jr as DataRowAsyncError,
|
|
2616
|
+
qr as Day,
|
|
2617
|
+
ce as DeprecatedMediaConnectorDownloadType,
|
|
2618
|
+
Bt as DeprecatedMediaType,
|
|
2619
|
+
or as DocumentIssueTypeEnum,
|
|
2620
|
+
Ps as DocumentType,
|
|
2621
|
+
sn as DownloadFormats,
|
|
2622
|
+
fn as EaseTypes,
|
|
2623
|
+
kn as EngineEditModeType,
|
|
2624
|
+
ue as EnvironmentType,
|
|
2625
|
+
kr as FitMode,
|
|
2626
|
+
_r as FitModePosition,
|
|
2627
|
+
Gr as FlowDirection,
|
|
2628
|
+
Pn as FontPreviewFormat,
|
|
2629
|
+
En as FontWeights,
|
|
2630
|
+
jn as FrameAnchorTarget,
|
|
2631
|
+
Tr as FrameAnchorType,
|
|
2632
|
+
ar as FrameEditingMode,
|
|
2633
|
+
tn as FramePropertyNames,
|
|
2634
|
+
Rr as FrameTypeEnum,
|
|
2635
|
+
In as GradientType,
|
|
2636
|
+
An as GradientUsageType,
|
|
2637
|
+
$n as GrafxTokenAuthCredentials,
|
|
2638
|
+
te as ImageSourceTypeEnum,
|
|
2639
|
+
gr as LayoutIntent,
|
|
2640
|
+
en as LayoutPropertyNames,
|
|
2641
|
+
ur as LayoutType,
|
|
2642
|
+
Yr as Locale,
|
|
2643
|
+
Mn as MarkedListType,
|
|
2644
|
+
dr as MeasurementUnit,
|
|
2645
|
+
Os as MediaDownloadIntent,
|
|
2646
|
+
de as MediaDownloadType,
|
|
2647
|
+
Ut as MediaType,
|
|
2648
|
+
Xn as Next,
|
|
2649
|
+
Vn as NumberListFormat,
|
|
2650
|
+
Jn as NumberListSeparatorSymbol,
|
|
2651
|
+
Wn as PageAnchorTarget,
|
|
2538
2652
|
X as PositionEnum,
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2653
|
+
Kn as RefreshedAuthCredendentials,
|
|
2654
|
+
Nn as Scripting,
|
|
2655
|
+
xn as SelectedTextStyleSections,
|
|
2656
|
+
Rn as SelectedTextStyles,
|
|
2657
|
+
mn as ShakeDirections,
|
|
2658
|
+
Bn as ShapeType,
|
|
2659
|
+
Cn as SlideDirections,
|
|
2660
|
+
br as SortBy,
|
|
2661
|
+
vr as SortOrder,
|
|
2662
|
+
Jr as TextDirection,
|
|
2663
|
+
Ln as TextPosition,
|
|
2550
2664
|
K as ToolType,
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2665
|
+
Sn as TweenTypes,
|
|
2666
|
+
Hr as UpdateZIndexMethod,
|
|
2667
|
+
Dr as UploadAssetValidationError,
|
|
2668
|
+
Fs as UploadAssetValidationErrorType,
|
|
2669
|
+
pe as VariableType,
|
|
2670
|
+
Qr as VariableVisibilityOperator,
|
|
2671
|
+
Zr as VariableVisibilityTargetType,
|
|
2672
|
+
Jt as VariableVisibilityType,
|
|
2673
|
+
Br as VerticalAlign,
|
|
2674
|
+
vn as ViewMode,
|
|
2561
2675
|
tt as WellKnownConfigurationKeys,
|
|
2562
|
-
|
|
2563
|
-
|
|
2676
|
+
Qn as default,
|
|
2677
|
+
Tn as grafxMediaConnectorRegistration
|
|
2564
2678
|
};
|
|
2565
2679
|
//# sourceMappingURL=main.es.js.map
|