@car-cutter/react-webplayer 3.0.3 → 3.1.1
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/dist/index.cjs +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.js +137 -100
- package/dist/legacy.cjs +1 -1
- package/dist/legacy.d.ts +7 -0
- package/dist/legacy.js +133 -96
- package/dist/shared-BeSqCz-A.cjs +27 -0
- package/dist/shared-DVyC4OMr.js +5915 -0
- package/package.json +10 -6
- package/dist/shared-BQBvv8Dz.cjs +0 -27
- package/dist/shared-rIRhmgIF.js +0 -5603
package/dist/legacy.js
CHANGED
|
@@ -1,19 +1,13 @@
|
|
|
1
|
-
import { W as
|
|
2
|
-
import { A as
|
|
1
|
+
import { W as w, a as I, b as D, c as R, d as V, e as M, f as j } from "./shared-DVyC4OMr.js";
|
|
2
|
+
import { A as ce, g as le, h as ue, D as pe, E as fe, i as me, j as Ee, k as be, l as he, m as de, n as ye, o as ge, p as _e, q as Ce, r as Ae, s as Oe, t as Te, u as Ne } from "./shared-DVyC4OMr.js";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
var
|
|
7
|
-
const
|
|
8
|
-
stringify: (e) => e,
|
|
9
|
-
parse: (e) => e
|
|
10
|
-
}, x = {
|
|
11
|
-
stringify: (e) => `${e}`,
|
|
12
|
-
parse: (e) => parseFloat(e)
|
|
13
|
-
}, j = {
|
|
4
|
+
import v from "react";
|
|
5
|
+
import A from "react-dom";
|
|
6
|
+
var k = Object.defineProperty, x = (e, t, n) => t in e ? k(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, h = (e, t, n) => x(e, typeof t != "symbol" ? t + "" : t, n);
|
|
7
|
+
const F = {
|
|
14
8
|
stringify: (e) => e ? "true" : "false",
|
|
15
9
|
parse: (e) => /^[ty1-9]/i.test(e)
|
|
16
|
-
},
|
|
10
|
+
}, G = {
|
|
17
11
|
stringify: (e) => e.name,
|
|
18
12
|
parse: (e, t, n) => {
|
|
19
13
|
const s = (() => {
|
|
@@ -24,102 +18,144 @@ const v = {
|
|
|
24
18
|
})();
|
|
25
19
|
return typeof s == "function" ? s.bind(n) : void 0;
|
|
26
20
|
}
|
|
27
|
-
},
|
|
21
|
+
}, Y = {
|
|
28
22
|
stringify: (e) => JSON.stringify(e),
|
|
29
23
|
parse: (e) => JSON.parse(e)
|
|
30
|
-
}, g = {
|
|
31
|
-
string: v,
|
|
32
|
-
number: x,
|
|
33
|
-
boolean: j,
|
|
34
|
-
function: k,
|
|
35
|
-
json: F
|
|
36
24
|
};
|
|
37
|
-
function
|
|
25
|
+
function $(e) {
|
|
38
26
|
return e.replace(
|
|
39
27
|
/([a-z0-9])([A-Z])/g,
|
|
40
28
|
(t, n, s) => `${n}-${s.toLowerCase()}`
|
|
41
29
|
);
|
|
42
30
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
31
|
+
function L(e) {
|
|
32
|
+
return e.replace(/[-:]([a-z])/g, (t, n) => `${n.toUpperCase()}`);
|
|
33
|
+
}
|
|
34
|
+
const U = {
|
|
35
|
+
stringify: (e) => e.name,
|
|
36
|
+
parse: (e, t, n) => {
|
|
37
|
+
const s = (() => {
|
|
38
|
+
const m = L(t);
|
|
39
|
+
if (typeof n < "u" && m in n.container)
|
|
40
|
+
return n.container[m];
|
|
41
|
+
})();
|
|
42
|
+
return typeof s == "function" ? s.bind(n) : void 0;
|
|
43
|
+
}
|
|
44
|
+
}, B = {
|
|
45
|
+
stringify: (e) => `${e}`,
|
|
46
|
+
parse: (e) => parseFloat(e)
|
|
47
|
+
}, H = {
|
|
48
|
+
stringify: (e) => e,
|
|
49
|
+
parse: (e) => e
|
|
50
|
+
}, C = {
|
|
51
|
+
string: H,
|
|
52
|
+
number: B,
|
|
53
|
+
boolean: F,
|
|
54
|
+
function: G,
|
|
55
|
+
method: U,
|
|
56
|
+
json: Y
|
|
57
|
+
}, b = Symbol.for("r2wc.render"), d = Symbol.for("r2wc.connected"), f = Symbol.for("r2wc.context"), i = Symbol.for("r2wc.props");
|
|
58
|
+
function z(e, t, n) {
|
|
59
|
+
var s, m, T;
|
|
60
|
+
t.props || (t.props = e.propTypes ? Object.keys(e.propTypes) : []), t.events || (t.events = []);
|
|
61
|
+
const y = Array.isArray(t.props) ? t.props.slice() : Object.keys(t.props), N = Array.isArray(t.events) ? t.events.slice() : Object.keys(t.events), E = {}, P = {}, g = {}, _ = {};
|
|
62
|
+
for (const o of y) {
|
|
63
|
+
E[o] = Array.isArray(t.props) ? "string" : t.props[o];
|
|
64
|
+
const r = $(o);
|
|
65
|
+
g[o] = r, _[r] = o;
|
|
52
66
|
}
|
|
53
|
-
|
|
67
|
+
for (const o of N)
|
|
68
|
+
P[o] = Array.isArray(t.events) ? {} : t.events[o];
|
|
69
|
+
class S extends HTMLElement {
|
|
54
70
|
constructor() {
|
|
55
|
-
super(),
|
|
71
|
+
super(), h(this, T, !0), h(this, m), h(this, s, {}), h(this, "container"), t.shadow ? this.container = this.attachShadow({
|
|
56
72
|
mode: t.shadow
|
|
57
|
-
}) : this.container = this, this[
|
|
58
|
-
for (const
|
|
59
|
-
const
|
|
60
|
-
|
|
73
|
+
}) : this.container = this, this[i].container = this.container;
|
|
74
|
+
for (const r of y) {
|
|
75
|
+
const l = g[r], a = this.getAttribute(l), c = E[r], u = c ? C[c] : null;
|
|
76
|
+
if (c === "method") {
|
|
77
|
+
const p = L(l);
|
|
78
|
+
Object.defineProperty(this[i].container, p, {
|
|
79
|
+
enumerable: !0,
|
|
80
|
+
configurable: !0,
|
|
81
|
+
get() {
|
|
82
|
+
return this[i][p];
|
|
83
|
+
},
|
|
84
|
+
set(W) {
|
|
85
|
+
this[i][p] = W, this[b]();
|
|
86
|
+
}
|
|
87
|
+
}), this[i][r] = u.parse(a, l, this);
|
|
88
|
+
}
|
|
89
|
+
u != null && u.parse && a && (this[i][r] = u.parse(a, l, this));
|
|
61
90
|
}
|
|
91
|
+
for (const r of N)
|
|
92
|
+
this[i][r] = (l) => {
|
|
93
|
+
const a = r.replace(/^on/, "").toLowerCase();
|
|
94
|
+
this.dispatchEvent(
|
|
95
|
+
new CustomEvent(a, { detail: l, ...P[r] })
|
|
96
|
+
);
|
|
97
|
+
};
|
|
62
98
|
}
|
|
63
99
|
static get observedAttributes() {
|
|
64
|
-
return Object.keys(
|
|
100
|
+
return Object.keys(_);
|
|
65
101
|
}
|
|
66
102
|
connectedCallback() {
|
|
67
|
-
this[
|
|
103
|
+
this[d] = !0, this[b]();
|
|
68
104
|
}
|
|
69
105
|
disconnectedCallback() {
|
|
70
|
-
this[
|
|
106
|
+
this[d] = !1, this[f] && n.unmount(this[f]), delete this[f];
|
|
71
107
|
}
|
|
72
|
-
attributeChangedCallback(
|
|
73
|
-
const
|
|
74
|
-
|
|
108
|
+
attributeChangedCallback(r, l, a) {
|
|
109
|
+
const c = _[r], u = E[c], p = u ? C[u] : null;
|
|
110
|
+
c in E && p != null && p.parse && a && (this[i][c] = p.parse(a, r, this), this[b]());
|
|
75
111
|
}
|
|
76
|
-
[(
|
|
77
|
-
this[
|
|
112
|
+
[(T = d, m = f, s = i, b)]() {
|
|
113
|
+
this[d] && (this[f] ? n.update(this[f], this[i]) : this[f] = n.mount(
|
|
78
114
|
this.container,
|
|
79
115
|
e,
|
|
80
|
-
this[
|
|
116
|
+
this[i]
|
|
81
117
|
));
|
|
82
118
|
}
|
|
83
119
|
}
|
|
84
|
-
for (const
|
|
85
|
-
const
|
|
86
|
-
Object.defineProperty(
|
|
120
|
+
for (const o of y) {
|
|
121
|
+
const r = g[o], l = E[o];
|
|
122
|
+
Object.defineProperty(S.prototype, o, {
|
|
87
123
|
enumerable: !0,
|
|
88
124
|
configurable: !0,
|
|
89
125
|
get() {
|
|
90
|
-
return this[
|
|
126
|
+
return this[i][o];
|
|
91
127
|
},
|
|
92
|
-
set(
|
|
93
|
-
this[
|
|
94
|
-
const
|
|
95
|
-
if (
|
|
96
|
-
const
|
|
97
|
-
this.getAttribute(
|
|
128
|
+
set(a) {
|
|
129
|
+
this[i][o] = a;
|
|
130
|
+
const c = l ? C[l] : null;
|
|
131
|
+
if (c != null && c.stringify) {
|
|
132
|
+
const u = c.stringify(a, r, this);
|
|
133
|
+
this.getAttribute(r) !== u && this.setAttribute(r, u);
|
|
98
134
|
} else
|
|
99
135
|
this[b]();
|
|
100
136
|
}
|
|
101
137
|
});
|
|
102
138
|
}
|
|
103
|
-
return
|
|
139
|
+
return S;
|
|
104
140
|
}
|
|
105
|
-
function
|
|
106
|
-
const s =
|
|
107
|
-
return
|
|
141
|
+
function J(e, t, n) {
|
|
142
|
+
const s = v.createElement(t, n);
|
|
143
|
+
return A.render(s, e), {
|
|
108
144
|
container: e,
|
|
109
145
|
ReactComponent: t
|
|
110
146
|
};
|
|
111
147
|
}
|
|
112
|
-
function
|
|
113
|
-
const s =
|
|
114
|
-
|
|
148
|
+
function X({ container: e, ReactComponent: t }, n) {
|
|
149
|
+
const s = v.createElement(t, n);
|
|
150
|
+
A.render(s, e);
|
|
115
151
|
}
|
|
116
|
-
function
|
|
117
|
-
|
|
152
|
+
function q({ container: e }) {
|
|
153
|
+
A.unmountComponentAtNode(e);
|
|
118
154
|
}
|
|
119
155
|
function O(e, t = {}) {
|
|
120
|
-
return
|
|
156
|
+
return z(e, t, { mount: J, update: X, unmount: q });
|
|
121
157
|
}
|
|
122
|
-
const
|
|
158
|
+
const K = O(w, {
|
|
123
159
|
shadow: "closed",
|
|
124
160
|
props: {
|
|
125
161
|
compositionUrl: "string",
|
|
@@ -140,6 +176,7 @@ const H = O(S, {
|
|
|
140
176
|
eventPrefix: "string",
|
|
141
177
|
demoSpin: "boolean",
|
|
142
178
|
reverse360: "boolean",
|
|
179
|
+
spinCursor: "string",
|
|
143
180
|
// Analytics
|
|
144
181
|
analyticsEventPrefix: "string",
|
|
145
182
|
analyticsUrl: "string",
|
|
@@ -148,47 +185,47 @@ const H = O(S, {
|
|
|
148
185
|
analyticsDryRun: "boolean",
|
|
149
186
|
analyticsDebug: "boolean"
|
|
150
187
|
}
|
|
151
|
-
}),
|
|
188
|
+
}), Z = O(I, {
|
|
152
189
|
shadow: "closed",
|
|
153
190
|
props: {
|
|
154
191
|
index: "number",
|
|
155
192
|
thumbnailSrc: "string"
|
|
156
193
|
}
|
|
157
|
-
}),
|
|
194
|
+
}), Q = O(D, {
|
|
158
195
|
shadow: "closed",
|
|
159
196
|
props: {
|
|
160
197
|
name: "string"
|
|
161
198
|
}
|
|
162
199
|
});
|
|
163
|
-
function
|
|
164
|
-
customElements.define(
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
), customElements.define(
|
|
200
|
+
function ee() {
|
|
201
|
+
customElements.define(V, K), customElements.define(
|
|
202
|
+
M,
|
|
203
|
+
Z
|
|
204
|
+
), customElements.define(j, Q);
|
|
168
205
|
}
|
|
169
|
-
function
|
|
170
|
-
|
|
206
|
+
function te() {
|
|
207
|
+
R() || ee();
|
|
171
208
|
}
|
|
172
|
-
|
|
209
|
+
te();
|
|
173
210
|
export {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
211
|
+
ce as ANALYTICS_EVENT_IDENTIFY,
|
|
212
|
+
le as ANALYTICS_EVENT_PAGE,
|
|
213
|
+
ue as ANALYTICS_EVENT_TRACK,
|
|
214
|
+
pe as DEFAULT_EVENT_PREFIX,
|
|
215
|
+
fe as EVENT_COMPOSITION_LOADED,
|
|
216
|
+
me as EVENT_COMPOSITION_LOADING,
|
|
217
|
+
Ee as EVENT_COMPOSITION_LOAD_ERROR,
|
|
218
|
+
be as EVENT_EXTEND_MODE_OFF,
|
|
219
|
+
he as EVENT_EXTEND_MODE_ON,
|
|
220
|
+
de as EVENT_GALLERY_CLOSE,
|
|
221
|
+
ye as EVENT_GALLERY_OPEN,
|
|
222
|
+
ge as EVENT_HOTSPOTS_OFF,
|
|
223
|
+
_e as EVENT_HOTSPOTS_ON,
|
|
224
|
+
Ce as EVENT_ITEM_CHANGE,
|
|
225
|
+
j as WEB_PLAYER_ICON_WC_TAG,
|
|
226
|
+
V as WEB_PLAYER_WC_TAG,
|
|
227
|
+
Ae as WebPlayer,
|
|
228
|
+
Oe as WebPlayerCustomMedia,
|
|
229
|
+
Te as WebPlayerIcon,
|
|
230
|
+
Ne as generateCompositionUrl
|
|
194
231
|
};
|