@seresweb/website-component 2.0.0 → 2.0.2

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/es/video.mjs CHANGED
@@ -1,246 +1,273 @@
1
- import { defineComponent as z, ref as m, watch as V, nextTick as A, onMounted as T, onBeforeUnmount as E, createElementBlock as h, openBlock as y, normalizeClass as p, createElementVNode as i, createCommentVNode as L, renderSlot as O, onUnmounted as M, createBlock as x, normalizeProps as S, mergeProps as $, Fragment as U, normalizeStyle as H, createVNode as I, unref as N, toDisplayString as X, Teleport as F } from "vue";
2
- import { P as n } from "../_vars-BV4QQF-p.js";
3
- import { ScLayzImage as Y } from "./layz-image.mjs";
4
- const j = ["controls", "poster", "src"], R = /* @__PURE__ */ z({
1
+ import { defineComponent as L, ref as d, watch as A, nextTick as E, onMounted as O, onBeforeUnmount as M, createElementBlock as h, openBlock as r, normalizeClass as f, createElementVNode as y, createCommentVNode as _, renderSlot as V, onUnmounted as U, Fragment as S, createBlock as $, mergeProps as T, normalizeStyle as H, unref as N, toDisplayString as X, Teleport as F, createVNode as Y } from "vue";
2
+ import { P as u } from "../_vars-BV4QQF-p.js";
3
+ import { ScLayzImage as j } from "./layz-image.mjs";
4
+ const D = ["controls", "poster", "src"], z = /* @__PURE__ */ L({
5
5
  __name: "video-wrapper",
6
6
  props: {
7
- class: { default: "" },
8
- style: { default: "" },
9
- playerButtonClass: { default: "" },
7
+ class: {},
8
+ style: {},
9
+ playerButtonClass: {},
10
10
  playerButtonText: { default: "PLAY" },
11
- poster: { default: "" },
12
- url: { default: "" },
11
+ poster: {},
12
+ url: {},
13
13
  autoPlay: { type: Boolean, default: !0 },
14
- playable: { type: Boolean, default: !0 }
14
+ playable: { type: Boolean, default: !0 },
15
+ multiple: { type: Boolean },
16
+ urlSmall: {}
15
17
  },
16
- setup(v, { expose: a }) {
17
- const e = v, b = /xiaomi|miui/i, g = `${n}-player-wrapper`, _ = `${n}-player-is-fullscreen`, C = `${n}-player-close-btn`, w = `${n}-player-icon`, l = m(), s = m(!0), r = m(b.test(navigator.userAgent) ? void 0 : e.url);
18
- let o = null;
19
- const f = (t) => {
20
- var u, c;
21
- t.target !== l.value && ((u = l.value) == null || u.pause(), s.value = !!((c = l.value) != null && c.paused));
22
- }, d = (t) => {
23
- const u = t[0], c = l.value;
24
- !c || !e.playable || (u.isIntersecting && e.autoPlay && c.paused ? (c.play().catch(console.warn), s.value = !1) : !u.isIntersecting && !c.paused && (c.pause(), s.value = !0));
25
- }, B = () => {
26
- e.autoPlay && e.playable && l.value && (o = new IntersectionObserver(d, {
18
+ emits: ["paused"],
19
+ setup(m, { expose: e, emit: C }) {
20
+ const l = m, k = C, g = /xiaomi|miui/i, x = `${u}-player-wrapper`, w = `${u}-player-is-fullscreen`, B = `${u}-player-close-btn`, b = `${u}-player-icon`, t = d(), s = d(!0), p = d(g.test(navigator.userAgent) ? void 0 : l.url);
21
+ let n = null;
22
+ const o = (a) => {
23
+ var c, i;
24
+ a.target !== t.value && ((c = t.value) == null || c.pause(), s.value = !!((i = t.value) != null && i.paused), k("paused"));
25
+ }, v = (a) => {
26
+ const c = a[0], i = t.value;
27
+ !i || !l.playable || (c.isIntersecting && l.autoPlay && i.paused ? (i.play().catch(console.warn), s.value = !1) : !c.isIntersecting && !i.paused && (i.pause(), s.value = !0));
28
+ }, P = () => {
29
+ l.autoPlay && l.playable && t.value && (n = new IntersectionObserver(v, {
27
30
  threshold: 0.25
28
31
  // 可根据需求调整可见区域百分比
29
- }), o.observe(l.value));
30
- }, k = () => {
31
- o == null || o.disconnect(), o = null;
32
+ }), n.observe(t.value));
33
+ }, I = () => {
34
+ n == null || n.disconnect(), n = null;
32
35
  };
33
- return V(
34
- () => e.playable,
36
+ return A(
37
+ () => l.playable,
35
38
  () => {
36
- k(), A(() => B());
39
+ I(), E(() => P());
37
40
  }
38
- ), a({
41
+ ), e({
39
42
  play() {
40
- l.value.play(), s.value = l.value.paused;
43
+ t.value.play(), s.value = t.value.paused;
44
+ },
45
+ pause() {
46
+ t.value.pause(), s.value = t.value.paused;
41
47
  }
42
- }), T(() => {
43
- b.test(navigator.userAgent) && fetch(e.url).then((t) => {
44
- if (!t.ok)
45
- throw new Error(`HTTP error! status: ${t.status}`);
46
- return t.blob();
47
- }).then((t) => {
48
- r.value = URL.createObjectURL(t);
49
- }).catch((t) => {
50
- console.error("获取视频失败:", t);
51
- }), B();
52
- }), E(() => {
53
- k();
54
- }), (t, u) => (y(), h(
48
+ }), O(() => {
49
+ g.test(navigator.userAgent) && fetch(l.url).then((a) => {
50
+ if (!a.ok)
51
+ throw new Error(`HTTP error! status: ${a.status}`);
52
+ return a.blob();
53
+ }).then((a) => {
54
+ p.value = URL.createObjectURL(a);
55
+ }).catch((a) => {
56
+ console.error("获取视频失败:", a);
57
+ }), P();
58
+ }), M(() => {
59
+ I();
60
+ }), (a, c) => (r(), h(
55
61
  "div",
56
62
  {
57
- class: p([g, e.class, !s.value && !e.autoPlay && _])
63
+ class: f([x, l.class, !s.value && !l.autoPlay && w])
58
64
  },
59
65
  [
60
- i("video", {
66
+ y("video", {
61
67
  ref_key: "videoRef",
62
- ref: l,
68
+ ref: t,
63
69
  muted: "",
64
70
  loop: "",
65
71
  playsinline: "",
66
72
  "webkit-playsinline": "",
67
73
  "x5-video-player-type": "h5",
68
- controls: !s.value && !e.autoPlay,
69
- poster: e.poster,
70
- src: r.value
71
- }, null, 8, j),
72
- !s.value && !e.autoPlay ? (y(), h("button", {
73
- key: 0,
74
- class: p(C),
75
- onClick: f
76
- }, [
77
- O(t.$slots, "close", {}, () => [
78
- (y(), h("svg", {
79
- class: p(w),
80
- viewBox: "0 0 1121 1024",
81
- version: "1.1",
82
- xmlns: "http://www.w3.org/2000/svg",
83
- width: "200",
84
- height: "200"
85
- }, [...u[0] || (u[0] = [
86
- i(
87
- "path",
88
- {
89
- d: "M1040.725333 49.005714l-965.485714 965.436953-48.420571-48.469334L992.256 0.487619l48.469333 48.518095z",
90
- fill: "#ffffff"
91
- },
92
- null,
93
- -1
94
- /* CACHED */
95
- ),
96
- i(
97
- "path",
98
- {
99
- d: "M1040.725333 1014.442667l-965.485714-965.485715 48.518095-48.420571L1089.194667 965.973333l-48.469334 48.469334z",
100
- fill: "#ffffff"
101
- },
102
- null,
103
- -1
104
- /* CACHED */
105
- )
106
- ])]))
107
- ])
108
- ])) : L("v-if", !0)
74
+ controls: !s.value && !l.autoPlay,
75
+ poster: l.poster,
76
+ src: p.value
77
+ }, null, 8, D),
78
+ !s.value && !l.autoPlay ? (r(), h(
79
+ "button",
80
+ {
81
+ key: 0,
82
+ class: f([B, l.playerButtonClass]),
83
+ onClick: o
84
+ },
85
+ [
86
+ V(a.$slots, "close", {}, () => [
87
+ (r(), h("svg", {
88
+ class: f(b),
89
+ viewBox: "0 0 1121 1024",
90
+ version: "1.1",
91
+ xmlns: "http://www.w3.org/2000/svg",
92
+ width: "200",
93
+ height: "200"
94
+ }, [...c[0] || (c[0] = [
95
+ y(
96
+ "path",
97
+ {
98
+ d: "M1040.725333 49.005714l-965.485714 965.436953-48.420571-48.469334L992.256 0.487619l48.469333 48.518095z",
99
+ fill: "#ffffff"
100
+ },
101
+ null,
102
+ -1
103
+ /* CACHED */
104
+ ),
105
+ y(
106
+ "path",
107
+ {
108
+ d: "M1040.725333 1014.442667l-965.485714-965.485715 48.518095-48.420571L1089.194667 965.973333l-48.469334 48.469334z",
109
+ fill: "#ffffff"
110
+ },
111
+ null,
112
+ -1
113
+ /* CACHED */
114
+ )
115
+ ])]))
116
+ ])
117
+ ],
118
+ 2
119
+ /* CLASS */
120
+ )) : _("v-if", !0)
109
121
  ],
110
122
  2
111
123
  /* CLASS */
112
124
  ));
113
125
  }
114
- }), P = /* @__PURE__ */ z({
126
+ }), R = /* @__PURE__ */ L({
115
127
  __name: "video",
116
128
  props: {
117
- class: { default: "" },
118
- style: { default: "" },
119
- playerButtonClass: { default: "" },
129
+ class: {},
130
+ style: {},
131
+ playerButtonClass: {},
120
132
  playerButtonText: { default: "PLAY" },
121
133
  poster: { default: "" },
122
- url: { default: "" },
134
+ url: {},
123
135
  autoPlay: { type: Boolean, default: !0 },
124
- playable: { type: Boolean, default: !0 }
136
+ playable: { type: Boolean, default: !0 },
137
+ multiple: { type: Boolean },
138
+ urlSmall: {}
125
139
  },
126
- setup(v) {
127
- const a = v, e = `${n}-player-wrapper`, b = `${n}-player-poster`, g = `${n}-player-btn`, _ = `${n}-player-btn-text`, C = `${n}-player-icon`, w = m(), l = m(), s = (f) => {
128
- var d;
129
- f.stopPropagation(), (d = l.value) == null || d.play();
140
+ setup(m) {
141
+ const e = m, C = `${u}-player-wrapper`, l = `${u}-player-poster`, k = `${u}-player-btn`, g = `${u}-player-btn-text`, x = `${u}-player-icon`, w = d(), B = d(), b = d(), t = (o) => {
142
+ var v, P;
143
+ o.stopPropagation(), (v = b.value) == null || v.pause(), (P = B.value) == null || P.play();
144
+ }, s = () => {
145
+ var o;
146
+ (o = b.value) == null || o.play();
130
147
  };
131
- let r = null;
132
- const o = m(!1);
133
- return T(() => {
134
- r = new IntersectionObserver(
135
- ([f]) => {
136
- f.isIntersecting && (o.value = !0);
148
+ let p = null;
149
+ const n = d(!1);
150
+ return O(() => {
151
+ p = new IntersectionObserver(
152
+ ([o]) => {
153
+ o.isIntersecting && (n.value = !0);
137
154
  },
138
155
  { threshold: 0.1 }
139
- ), w.value && r.observe(w.value);
140
- }), M(() => {
141
- r == null || r.disconnect();
142
- }), (f, d) => a.autoPlay ? (y(), x(
143
- R,
144
- S($({ key: 0 }, a)),
156
+ ), w.value && p.observe(w.value);
157
+ }), U(() => {
158
+ p == null || p.disconnect();
159
+ }), (o, v) => (r(), h(
160
+ S,
145
161
  null,
146
- 16
147
- /* FULL_PROPS */
148
- )) : (y(), h(
149
- U,
150
- { key: 1 },
151
162
  [
152
- i(
153
- "div",
154
- {
155
- class: p([e, a.class]),
156
- style: H(a.style)
157
- },
163
+ e.autoPlay || e.multiple ? (r(), $(z, T({ key: 0 }, e, {
164
+ url: e.multiple && e.urlSmall || e.url,
165
+ ref_key: "autoPlayRef",
166
+ ref: b
167
+ }), null, 16, ["url"])) : _("v-if", !0),
168
+ !e.autoPlay || e.multiple ? (r(), h(
169
+ S,
170
+ { key: 1 },
158
171
  [
159
- I(N(Y), {
160
- class: p(b),
161
- src: a.poster,
162
- alt: "AITO"
163
- }, null, 8, ["src"]),
164
- i(
165
- "button",
172
+ y(
173
+ "div",
166
174
  {
167
- ref_key: "btnRef",
168
- ref: w,
169
- class: p([g, a.playerButtonClass]),
170
- onClick: s
175
+ class: f([C, e.class, { "is-multiple": e.multiple }]),
176
+ style: H(e.style)
171
177
  },
172
178
  [
173
- O(f.$slots, "play", {}, () => [
174
- (y(), h("svg", {
175
- class: p(C),
176
- viewBox: "0 0 1024 1024",
177
- version: "1.1",
178
- xmlns: "http://www.w3.org/2000/svg",
179
- width: "200",
180
- height: "200"
181
- }, [...d[0] || (d[0] = [
182
- i(
183
- "path",
184
- {
185
- d: "M671.744 495.616c20.48 12.288 20.48 36.864 0 49.152l-217.088 126.976c-20.48 12.288-45.056-4.096-45.056-24.576V393.216c0-20.48 24.576-36.864 45.056-24.576l217.088 126.976z",
186
- fill: "#ffffff"
187
- },
188
- null,
189
- -1
190
- /* CACHED */
191
- ),
192
- i(
193
- "path",
194
- {
195
- d: "M512 1011.712C237.568 1011.712 12.288 786.432 12.288 512 12.288 237.568 237.568 12.288 512 12.288c274.432 0 499.712 225.28 499.712 499.712 0 274.432-225.28 499.712-499.712 499.712z m0-958.464c-253.952 0-458.752 204.8-458.752 458.752s204.8 458.752 458.752 458.752 458.752-204.8 458.752-458.752-204.8-458.752-458.752-458.752z",
196
- fill: "#ffffff"
197
- },
198
- null,
199
- -1
200
- /* CACHED */
201
- )
202
- ])])),
203
- i(
204
- "span",
205
- {
206
- class: p(_)
207
- },
208
- X(a.playerButtonText),
209
- 1
210
- /* TEXT */
211
- )
212
- ])
179
+ e.poster ? (r(), $(N(j), {
180
+ key: 0,
181
+ class: f(l),
182
+ src: e.poster,
183
+ alt: "AITO"
184
+ }, null, 8, ["src"])) : _("v-if", !0),
185
+ y(
186
+ "button",
187
+ {
188
+ ref_key: "btnRef",
189
+ ref: w,
190
+ class: f([k, e.playerButtonClass]),
191
+ onClick: t
192
+ },
193
+ [
194
+ V(o.$slots, "play", {}, () => [
195
+ (r(), h("svg", {
196
+ class: f(x),
197
+ viewBox: "0 0 1024 1024",
198
+ version: "1.1",
199
+ xmlns: "http://www.w3.org/2000/svg",
200
+ width: "200",
201
+ height: "200"
202
+ }, [...v[0] || (v[0] = [
203
+ y(
204
+ "path",
205
+ {
206
+ d: "M671.744 495.616c20.48 12.288 20.48 36.864 0 49.152l-217.088 126.976c-20.48 12.288-45.056-4.096-45.056-24.576V393.216c0-20.48 24.576-36.864 45.056-24.576l217.088 126.976z",
207
+ fill: "#ffffff"
208
+ },
209
+ null,
210
+ -1
211
+ /* CACHED */
212
+ ),
213
+ y(
214
+ "path",
215
+ {
216
+ d: "M512 1011.712C237.568 1011.712 12.288 786.432 12.288 512 12.288 237.568 237.568 12.288 512 12.288c274.432 0 499.712 225.28 499.712 499.712 0 274.432-225.28 499.712-499.712 499.712z m0-958.464c-253.952 0-458.752 204.8-458.752 458.752s204.8 458.752 458.752 458.752 458.752-204.8 458.752-458.752-204.8-458.752-458.752-458.752z",
217
+ fill: "#ffffff"
218
+ },
219
+ null,
220
+ -1
221
+ /* CACHED */
222
+ )
223
+ ])])),
224
+ y(
225
+ "span",
226
+ {
227
+ class: f(g)
228
+ },
229
+ X(e.playerButtonText),
230
+ 1
231
+ /* TEXT */
232
+ )
233
+ ])
234
+ ],
235
+ 2
236
+ /* CLASS */
237
+ )
213
238
  ],
214
- 2
215
- /* CLASS */
216
- )
239
+ 6
240
+ /* CLASS, STYLE */
241
+ ),
242
+ n.value ? (r(), $(F, {
243
+ key: 0,
244
+ to: "body"
245
+ }, [
246
+ Y(
247
+ z,
248
+ T(e, {
249
+ autoPlay: !1,
250
+ ref_key: "vwRef",
251
+ ref: B,
252
+ onPaused: s
253
+ }),
254
+ null,
255
+ 16
256
+ /* FULL_PROPS */
257
+ )
258
+ ])) : _("v-if", !0)
217
259
  ],
218
- 6
219
- /* CLASS, STYLE */
220
- ),
221
- o.value ? (y(), x(F, {
222
- key: 0,
223
- to: "body"
224
- }, [
225
- I(
226
- R,
227
- $(a, {
228
- ref_key: "vwRef",
229
- ref: l
230
- }),
231
- null,
232
- 16
233
- /* FULL_PROPS */
234
- )
235
- ])) : L("v-if", !0)
260
+ 64
261
+ /* STABLE_FRAGMENT */
262
+ )) : _("v-if", !0)
236
263
  ],
237
264
  64
238
265
  /* STABLE_FRAGMENT */
239
266
  ));
240
267
  }
241
268
  });
242
- P.install = (v) => (v.component("ScVideo", P), v);
243
- const q = P;
269
+ R.install = (m) => (m.component("ScVideo", R), m);
270
+ const J = R;
244
271
  export {
245
- q as ScVideo
272
+ J as ScVideo
246
273
  };
package/dist/global.d.ts CHANGED
@@ -8,6 +8,7 @@ declare module 'vue' {
8
8
  ScRadio: typeof import("@seresweb/website-component")["ScRadio"];
9
9
  ScParameterBox: typeof import("@seresweb/website-component")["ScParameterBox"];
10
10
  ScLayzImage: typeof import("@seresweb/website-component")["ScLayzImage"];
11
+ ScInput: typeof import("@seresweb/website-component")["ScInput"];
11
12
  ScImageIndicator: typeof import("@seresweb/website-component")["ScImageIndicator"];
12
13
  ScHorizontalViewer: typeof import("@seresweb/website-component")["ScHorizontalViewer"];
13
14
  ScGradualHighlight: typeof import("@seresweb/website-component")["ScGradualHighlight"];
@@ -15,7 +16,6 @@ declare module 'vue' {
15
16
  ScDrawer: typeof import("@seresweb/website-component")["ScDrawer"];
16
17
  ScAnimatedNumber: typeof import("@seresweb/website-component")["ScAnimatedNumber"];
17
18
  ScAccordionInfoPanel: typeof import("@seresweb/website-component")["ScAccordionInfoPanel"];
18
- ScInput: typeof import("@seresweb/website-component")["ScInput"];
19
19
  }
20
20
  }
21
21
 
@@ -1,13 +1,13 @@
1
1
  import { defineComponent as H, ref as g, reactive as Z, onMounted as D, onBeforeUnmount as X, createElementBlock as s, openBlock as r, normalizeStyle as B, normalizeClass as n, unref as t, createElementVNode as h, createCommentVNode as $, Fragment as T, renderList as M, createVNode as x, mergeProps as V, createBlock as k, normalizeProps as U, computed as S, watch as A, createStaticVNode as j } from "vue";
2
2
  import { a as q } from "./index-BrggpRcU.js";
3
3
  import { P as i } from "./_vars-BV4QQF-p.js";
4
- import "./es/Input.mjs";
5
4
  import "./es/accordion-info-panel.mjs";
6
5
  import "./es/animated-number.mjs";
7
6
  import "./es/drawer.mjs";
8
7
  import "./es/dropdown.mjs";
9
8
  import "./es/gradual-highlight.mjs";
10
9
  import { getRootOffset as G } from "@vavt/util";
10
+ import "./es/input.mjs";
11
11
  import { ScLayzImage as W } from "./es/layz-image.mjs";
12
12
  import "./es/parameter-box.mjs";
13
13
  import "./es/radio.mjs";
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),$=require("./index-DrnEpWXW.cjs"),n=require("./_vars-CyrPevgT.cjs");require("./cjs/accordion-info-panel.cjs");require("./cjs/animated-number.cjs");require("./cjs/drawer.cjs");require("./cjs/dropdown.cjs");require("./cjs/gradual-highlight.cjs");const b=require("@vavt/util");require("./cjs/input.cjs");const I=require("./cjs/layz-image.cjs");require("./cjs/parameter-box.cjs");require("./cjs/radio.cjs");const F=require("./cjs/tab-indicator.cjs"),T=require("./cjs/video.cjs"),S=["innerHTML"],H=["innerHTML"],N=["innerHTML"],X=["innerHTML"],M=e.defineComponent({__name:"pc-viewer",props:{title:{},desc:{},dataList:{}},setup(c){const u=e.ref(),a=e.ref(),r=e.ref(),l=e.ref(),s=e.ref(),h=e.ref(),i=e.reactive({container:"",root:"",item:""}),k=()=>{var g;if(!r.value)return;const t=r.value.offsetHeight,m=window.innerHeight,v=((g=h.value)==null?void 0:g.offsetHeight)||0,w=o(h.value);i.container=`padding-top: ${(m-v-t-w)/2}px;`,i.root=`height: ${r.value.scrollWidth}px`},d=()=>{const t=document.documentElement.getAttribute("dir")||"ltr",m=t==="rtl"?"right":"left";if(!u.value||!r.value||!l.value||!s.value)return;const w=u.value.clientHeight-window.innerHeight,{offsetTop:g}=b.getRootOffset(u.value),B=document.documentElement.scrollTop-g;if(B<0){r.value.scrollTo({left:0}),s.value.style[m]="0px";return}if(B>w){const C=r.value.scrollWidth-window.innerWidth;r.value.scrollTo({left:t==="rtl"?-C:C}),s.value.style[m]=l.value.clientWidth-s.value.clientWidth+"px";return}const L=B/w,z=L*(r.value.scrollWidth-window.innerWidth),P=L*(l.value.clientWidth*2/3);r.value.scrollTo({left:t==="rtl"?-z:z}),s.value.style[m]=`${P}px`},p=()=>{i.container="",k()},o=t=>{if(!(t instanceof HTMLElement))return 0;const m=window.getComputedStyle(t),v=parseFloat(m.marginTop)||0,w=parseFloat(m.marginBottom)||0;return v+w};let f;return e.onMounted(()=>{f=new IntersectionObserver(t=>{t.forEach(m=>{m.isIntersecting&&(i.container="",k())})},{root:null,rootMargin:"200px 0px 200px 0px",threshold:0}),window.addEventListener("scroll",d),window.addEventListener("resize",p),u.value&&f.observe(u.value)}),e.onBeforeUnmount(()=>{window.removeEventListener("scroll",d),window.removeEventListener("resize",p),f&&f.disconnect()}),(t,m)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"rootRef",ref:u,class:e.normalizeClass(`${e.unref(n.PREFIX)}-horizontal-viewer`),style:e.normalizeStyle(i.root)},[e.createElementVNode("div",{ref_key:"containerRef",ref:a,class:e.normalizeClass([`${e.unref(n.PREFIX)}-horizontal-viewer__container`,(t.title||t.desc)&&"has-header"]),style:e.normalizeStyle(i.container)},[t.title||t.desc?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(`${e.unref(n.PREFIX)}-horizontal-viewer__header`),ref_key:"headerRef",ref:h},[t.title?(e.openBlock(),e.createElementBlock("p",{key:0,innerHTML:t.title},null,8,S)):e.createCommentVNode("v-if",!0),t.desc?(e.openBlock(),e.createElementBlock("p",{key:1,innerHTML:t.desc},null,8,H)):e.createCommentVNode("v-if",!0)],2)):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{ref_key:"scrollerRef",ref:r,class:e.normalizeClass(`${e.unref(n.PREFIX)}-horizontal-viewer__scroller`)},[e.createElementVNode("div",{class:e.normalizeClass(`${e.unref(n.PREFIX)}-horizontal-viewer__content`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataList,v=>(e.openBlock(),e.createElementBlock("div",{key:v.title,class:e.normalizeClass(`${e.unref(n.PREFIX)}-horizontal-viewer__content-item`)},[e.createVNode(e.unref(I.ScLayzImage),{src:v.url,alt:v.alt},null,8,["src","alt"]),e.createElementVNode("div",{class:e.normalizeClass(`${e.unref(n.PREFIX)}-horizontal-viewer__content-item-footer`)},[e.createElementVNode("p",{innerHTML:v.title},null,8,N),e.createElementVNode("p",{innerHTML:v.desc},null,8,X)],2)],2))),128))],2)],2),e.createElementVNode("div",{ref_key:"paginationRef",ref:l,class:e.normalizeClass(`${e.unref(n.PREFIX)}-horizontal-viewer__pagination`)},[e.createElementVNode("div",{class:e.normalizeClass(`${e.unref(n.PREFIX)}-horizontal-viewer__scrollbar`)},[e.createElementVNode("div",{ref_key:"scrollbarDragRef",ref:s,class:e.normalizeClass(`${e.unref(n.PREFIX)}-horizontal-viewer__scrollbar-drag`)},null,2)],2)],2)],6)],6))}}),q=e.defineComponent({__name:"mb-viewer",props:{title:{},desc:{},isMobile:{type:Boolean},modelValue:{},dataList:{},swiperOptions:{},effect:{},showIntro:{type:Boolean},videoProps:{},indicatorClass:{},tabIndicatorBottom:{},widthType:{},indicatorType:{},showIndicator:{type:Boolean},indicatorPosition:{}},setup(c){const u=c,a=e.ref();return(r,l)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"rootRef",ref:a,class:e.normalizeClass(`${e.unref(n.PREFIX)}-horizontal-viewer-mb`)},[e.createVNode(e.unref(V),e.mergeProps(u,{indicatorType:"image"}),null,16)],2))}}),_=e.defineComponent({__name:"horizontal-viewer",props:{title:{},desc:{},isMobile:{type:Boolean},modelValue:{},dataList:{},swiperOptions:{},effect:{},showIntro:{type:Boolean},videoProps:{},indicatorClass:{},tabIndicatorBottom:{},widthType:{},indicatorType:{},showIndicator:{type:Boolean,default:!0},indicatorPosition:{}},setup(c){const u=c;return(a,r)=>a.isMobile?(e.openBlock(),e.createBlock(q,e.normalizeProps(e.mergeProps({key:0},u)),null,16)):(e.openBlock(),e.createBlock(M,e.normalizeProps(e.mergeProps({key:1},u)),null,16))}});_.install=c=>(c.component("ScHorizontalViewer",_),c);const x=_,W=["onClick"],O=["innerHTML"],U=["innerHTML"],E=e.defineComponent({__name:"image-indicator",props:{dataList:{},showIntro:{type:Boolean,default:!0}},emits:["change"],setup(c,{emit:u}){const a=u,r=e.ref(0),l=e.ref([]),s=e.computed(()=>{const i=l.value[r.value];return{height:`${i==null?void 0:i.offsetHeight}px`}}),h=i=>{r.value=i,a("change",i)};return(i,k)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`${e.unref(n.PREFIX)}-image-indicator`)},[e.createElementVNode("div",{class:e.normalizeClass(`${e.unref(n.PREFIX)}-image-indicator__list`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.dataList,(d,p)=>(e.openBlock(),e.createElementBlock("div",{key:d.url,class:e.normalizeClass([`${e.unref(n.PREFIX)}-image-indicator__list-item`,r.value===p?`${e.unref(n.PREFIX)}-image-indicator__active`:""]),onClick:o=>h(p)},[e.createVNode(e.unref(I.ScLayzImage),{src:d.url,alt:d.alt},null,8,["src","alt"])],10,W))),128))],2),i.showIntro?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(`${e.unref(n.PREFIX)}-image-indicator__intro`),style:e.normalizeStyle(s.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.dataList,(d,p)=>(e.openBlock(),e.createElementBlock("div",{key:d.url,ref_for:!0,ref_key:"introItemRef",ref:l,class:e.normalizeClass([`${e.unref(n.PREFIX)}-image-indicator__intro-item`,r.value===p&&`${e.unref(n.PREFIX)}-image-indicator__active`])},[d.title?(e.openBlock(),e.createElementBlock("p",{key:0,class:e.normalizeClass(`${e.unref(n.PREFIX)}-image-indicator__intro-title`),innerHTML:d.title},null,10,O)):e.createCommentVNode("v-if",!0),d.desc?(e.openBlock(),e.createElementBlock("p",{key:1,class:e.normalizeClass(`${e.unref(n.PREFIX)}-image-indicator__intro-desc`),innerHTML:d.desc},null,10,U)):e.createCommentVNode("v-if",!0)],2))),128))],6)):e.createCommentVNode("v-if",!0)],2))}});E.install=c=>(c.component("ScImageIndicator",E),c);const R=E,D={class:"swiper-wrapper"},y=e.defineComponent({__name:"swiper-normal",props:{modelValue:{default:0},dataList:{},swiperOptions:{default:()=>({})},effect:{},showIntro:{type:Boolean,default:!0},videoProps:{},indicatorClass:{},tabIndicatorBottom:{},widthType:{default:"full"},indicatorType:{default:"tab"},showIndicator:{type:Boolean,default:!0},indicatorPosition:{default:"relative"}},emits:["change","update:modelValue"],setup(c,{emit:u}){const a=c,r=u;let l=null;const s=e.ref(a.modelValue),h=e.ref(),i=e.computed(()=>{const o=[`${n.PREFIX}-swiper-main`];return a.widthType==="middle"?o.push(`${n.PREFIX}-swiper-main__middle`):o.push(`${n.PREFIX}-swiper-main__full`),o}),k=e.computed(()=>{const o={};return a.tabIndicatorBottom&&(o.position="absolute",o.zIndex=1,o.bottom=typeof a.tabIndicatorBottom=="number"?`${a.tabIndicatorBottom}px`:a.tabIndicatorBottom),o});e.watch(()=>a.modelValue,()=>{s.value=a.modelValue,d(s.value)});const d=o=>{l==null||l.slideTo(o)},p=()=>{l==null||l.destroy(),h.value&&(l=new $.Swiper(h.value,{slidesPerView:1,allowTouchMove:!1,effect:a.effect,navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},...a.swiperOptions}),l.on("slideChange",o=>{s.value=o.activeIndex,r("change",o.activeIndex),r("update:modelValue",o.activeIndex)}))};return e.onMounted(()=>{p(),window.addEventListener("resize",p)}),e.onBeforeUnmount(()=>{l==null||l.destroy(),window.removeEventListener("resize",p)}),(o,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`${e.unref(n.PREFIX)}-swiper`)},[e.createElementVNode("div",{ref_key:"swiperRef",ref:h,class:e.normalizeClass(i.value)},[e.createElementVNode("div",D,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.dataList,(t,m)=>(e.openBlock(),e.createElementBlock("div",{key:t.title,class:"swiper-slide"},[t.type==="img"?(e.openBlock(),e.createBlock(e.unref(I.ScLayzImage),{key:0,src:t.url,alt:t.alt},null,8,["src","alt"])):(e.openBlock(),e.createBlock(e.unref(T.ScVideo),e.mergeProps({key:1,ref_for:!0},o.videoProps,{url:t.url,poster:t.poster,playable:s.value===m}),null,16,["url","poster","playable"])),t.mask?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(`${e.unref(n.PREFIX)}-swiper-mask`)},null,2)):e.createCommentVNode("v-if",!0)]))),128))]),f[2]||(f[2]=e.createStaticVNode('<div class="swiper-button-next"><svg xmlns="http://www.w3.org/2000/svg" width="25" height="24" viewBox="0 0 25 24" fill="none"><path d="M9.64299 3.12871L9.51887 5.83301L15.6859 12L9.51887 18.167L9.64299 20.8713L18.5143 12L9.64299 3.12871Z" fill="white"></path></svg></div><div class="swiper-button-prev"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M15.1289 3.12871L15.2531 5.83301L9.08609 12L15.2531 18.167L15.1289 20.8713L6.25766 12L15.1289 3.12871Z" fill="white"></path></svg></div>',2))],2),o.showIndicator?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[o.indicatorType==="tab"?(e.openBlock(),e.createBlock(e.unref(F.ScTabIndicator),{key:0,modelValue:s.value,"onUpdate:modelValue":f[0]||(f[0]=t=>s.value=t),class:e.normalizeClass([o.indicatorClass,o.indicatorPosition==="absolute"&&`${e.unref(n.PREFIX)}-swiper-indicator-absolute`]),dataList:o.dataList,"show-intro":o.showIntro,style:e.normalizeStyle(k.value),onChange:d},null,8,["modelValue","class","dataList","show-intro","style"])):(e.openBlock(),e.createBlock(e.unref(R),{key:1,modelValue:s.value,"onUpdate:modelValue":f[1]||(f[1]=t=>s.value=t),dataList:a.dataList,onChange:d},null,8,["modelValue","dataList"]))],64)):e.createCommentVNode("v-if",!0)],2))}});y.install=c=>(c.component("ScSwiperNormal",y),c);const V=y;exports.ScHorizontalViewer=x;exports.ScImageIndicator=R;exports.ScSwiperNormal=V;