go-captcha-vue 2.0.5 → 2.0.7

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.
@@ -1,5 +1,5 @@
1
- import { defineComponent as q, openBlock as z, createElementBlock as H, mergeProps as oe, createElementVNode as o, reactive as T, toRaw as V, watch as F, computed as L, withDirectives as K, normalizeClass as se, normalizeStyle as D, toDisplayString as ie, vShow as Q, createVNode as I, unref as v, Fragment as $e, renderList as ze, ref as ee, onMounted as _e, nextTick as be, onUnmounted as we, toRefs as Ce, createBlock as le, createCommentVNode as Se } from "vue";
2
- const Ee = () => ({
1
+ import { defineComponent as U, openBlock as E, createElementBlock as D, mergeProps as ce, createElementVNode as l, reactive as T, toRaw as I, watch as Y, computed as z, withDirectives as ge, normalizeClass as te, normalizeStyle as C, toDisplayString as oe, createCommentVNode as ne, createVNode as A, unref as v, Fragment as Te, renderList as Pe, vShow as fe, ref as Q, onMounted as be, nextTick as we, onUnmounted as Ee, withModifiers as xe, toRefs as Xe, createBlock as le } from "vue";
2
+ const Le = () => ({
3
3
  width: 300,
4
4
  height: 220,
5
5
  thumbWidth: 150,
@@ -11,31 +11,31 @@ const Ee = () => ({
11
11
  buttonText: "确认",
12
12
  iconSize: 22,
13
13
  dotSize: 24
14
- }), Be = /* @__PURE__ */ o("path", { d: `M100.1,189.9C100.1,189.9,100,189.9,100.1,189.9c-49.7,0-90-40.4-90-89.9c0-49.6,40.4-89.9,89.9-89.9
14
+ }), We = /* @__PURE__ */ l("path", { d: `M100.1,189.9C100.1,189.9,100,189.9,100.1,189.9c-49.7,0-90-40.4-90-89.9c0-49.6,40.4-89.9,89.9-89.9
15
15
  c49.6,0,89.9,40.4,89.9,89.9c0,18.2-5.4,35.7-15.6,50.7c-1.5,2.1-3.6,3.4-6.1,3.9c-2.5,0.4-5-0.1-7-1.6c-4.2-3-5.3-8.6-2.4-12.9
16
16
  c8.1-11.9,12.4-25.7,12.4-40.1c0-39.2-31.9-71.1-71.1-71.1c-39.2,0-71.1,31.9-71.1,71.1c0,39.2,31.9,71.1,71.1,71.1
17
17
  c7.7,0,15.3-1.2,22.6-3.6c2.4-0.8,4.9-0.6,7.2,0.5c2.2,1.1,3.9,3.1,4.7,5.5c1.6,4.9-1,10.2-5.9,11.9
18
18
  C119.3,188.4,109.8,189.9,100.1,189.9z M73,136.4C73,136.4,73,136.4,73,136.4c-2.5,0-4.9-1-6.7-2.8c-3.7-3.7-3.7-9.6,0-13.3
19
19
  L86.7,100L66.4,79.7c-3.7-3.7-3.7-9.6,0-13.3c3.7-3.7,9.6-3.7,13.3,0L100,86.7l20.3-20.3c1.8-1.8,4.1-2.8,6.7-2.8c0,0,0,0,0,0
20
20
  c2.5,0,4.9,1,6.7,2.8c1.8,1.8,2.8,4.1,2.8,6.7c0,2.5-1,4.9-2.8,6.7L113.3,100l20.3,20.3c3.7,3.7,3.7,9.6,0,13.3
21
- c-3.7,3.7-9.6,3.7-13.3,0L100,113.3l-20.3,20.3C77.9,135.4,75.5,136.4,73,136.4z` }, null, -1), Te = [
22
- Be
23
- ], fe = /* @__PURE__ */ q({
21
+ c-3.7,3.7-9.6,3.7-13.3,0L100,113.3l-20.3,20.3C77.9,135.4,75.5,136.4,73,136.4z` }, null, -1), Me = [
22
+ We
23
+ ], ve = /* @__PURE__ */ U({
24
24
  __name: "close-icon",
25
25
  emits: ["click"],
26
- setup(s, { emit: t }) {
27
- const a = t;
28
- function r(i) {
29
- a("click", i);
26
+ setup(c, { emit: t }) {
27
+ const i = t;
28
+ function r(o) {
29
+ i("click", o);
30
30
  }
31
- return (i, m) => (z(), H("svg", oe({
31
+ return (o, m) => (E(), D("svg", ce({
32
32
  xmlns: "http://www.w3.org/2000/svg",
33
33
  viewBox: "0 0 200 200",
34
34
  width: "20",
35
35
  height: "20"
36
- }, i.$attrs, { onClick: r }), Te, 16));
36
+ }, o.$attrs, { onClick: r }), Me, 16));
37
37
  }
38
- }), Pe = /* @__PURE__ */ o("path", { d: `M135,149.9c-10.7,7.6-23.2,11.4-36,11.2c-1.7,0-3.4-0.1-5-0.3c-0.7-0.1-1.4-0.2-2-0.3c-1.3-0.2-2.6-0.4-3.9-0.6
38
+ }), Fe = /* @__PURE__ */ l("path", { d: `M135,149.9c-10.7,7.6-23.2,11.4-36,11.2c-1.7,0-3.4-0.1-5-0.3c-0.7-0.1-1.4-0.2-2-0.3c-1.3-0.2-2.6-0.4-3.9-0.6
39
39
  c-0.8-0.2-1.6-0.4-2.3-0.5c-1.2-0.3-2.5-0.6-3.7-1c-0.6-0.2-1.2-0.4-1.7-0.6c-1.4-0.5-2.8-1-4.2-1.5c-0.3-0.1-0.6-0.3-0.9-0.4
40
40
  c-1.6-0.7-3.2-1.4-4.7-2.3c-0.1,0-0.1-0.1-0.2-0.1c-5.1-2.9-9.8-6.4-14-10.6c-0.1-0.1-0.1-0.1-0.2-0.2c-1.3-1.3-2.5-2.7-3.7-4.1
41
41
  c-0.2-0.3-0.5-0.6-0.7-0.9c-8.4-10.6-13.5-24.1-13.5-38.8h14.3c0.4,0,0.7-0.2,0.9-0.5c0.2-0.3,0.2-0.8,0-1.1L29.5,60.9
@@ -52,29 +52,29 @@ const Ee = () => ({
52
52
  c0.6,0.1,1.3,0.3,1.9,0.4c1.4,0.3,2.8,0.7,4.2,1.1c0.4,0.1,0.9,0.3,1.3,0.4c1.6,0.5,3.1,1.1,4.6,1.7c0.2,0.1,0.3,0.1,0.5,0.2
53
53
  c9,3.9,17,10,23.2,17.6c0,0,0.1,0.1,0.1,0.2c8.7,10.7,14,24.5,14,39.4H147c-0.4,0-0.7,0.2-0.9,0.5c-0.2,0.3-0.2,0.8,0,1.1l24,36.4
54
54
  c0.2,0.3,0.5,0.5,0.9,0.5c0.4,0,0.7-0.2,0.9-0.5l23.9-36.4c0.2-0.3,0.2-0.7,0-1.1c-0.2-0.3-0.5-0.5-0.9-0.5L180.6,98.9L180.6,98.9
55
- L180.6,98.9z` }, null, -1), Xe = [
56
- Pe
57
- ], ve = /* @__PURE__ */ q({
55
+ L180.6,98.9z` }, null, -1), Ye = [
56
+ Fe
57
+ ], me = /* @__PURE__ */ U({
58
58
  __name: "refresh-icon",
59
59
  emits: ["click"],
60
- setup(s, { emit: t }) {
61
- const a = t;
62
- function r(i) {
63
- a("click", i);
60
+ setup(c, { emit: t }) {
61
+ const i = t;
62
+ function r(o) {
63
+ i("click", o);
64
64
  }
65
- return (i, m) => (z(), H("svg", oe({
65
+ return (o, m) => (E(), D("svg", ce({
66
66
  xmlns: "http://www.w3.org/2000/svg",
67
67
  viewBox: "0 0 200 200",
68
68
  width: "20",
69
69
  height: "20"
70
- }, i.$attrs, { onClick: r }), Xe, 16));
70
+ }, o.$attrs, { onClick: r }), Ye, 16));
71
71
  }
72
- }), We = /* @__PURE__ */ o("circle", {
72
+ }), Re = /* @__PURE__ */ l("circle", {
73
73
  cx: "50",
74
74
  cy: "36.8101",
75
75
  r: "10"
76
76
  }, [
77
- /* @__PURE__ */ o("animate", {
77
+ /* @__PURE__ */ l("animate", {
78
78
  attributeName: "cy",
79
79
  dur: "1s",
80
80
  repeatCount: "indefinite",
@@ -83,190 +83,188 @@ const Ee = () => ({
83
83
  keyTimes: "0;0.5;1",
84
84
  values: "23;77;23"
85
85
  })
86
- ], -1), Me = [
87
- We
88
- ], me = /* @__PURE__ */ q({
86
+ ], -1), He = [
87
+ Re
88
+ ], pe = /* @__PURE__ */ U({
89
89
  __name: "loading-icon",
90
90
  emits: ["click"],
91
- setup(s, { emit: t }) {
92
- const a = t;
93
- function r(i) {
94
- a("click", i);
91
+ setup(c, { emit: t }) {
92
+ const i = t;
93
+ function r(o) {
94
+ i("click", o);
95
95
  }
96
- return (i, m) => (z(), H("svg", oe({
96
+ return (o, m) => (E(), D("svg", ce({
97
97
  xmlns: "http://www.w3.org/2000/svg",
98
98
  viewBox: "0 0 100 100",
99
99
  preserveAspectRatio: "xMidYMid",
100
100
  width: "84",
101
101
  height: "84"
102
- }, i.$attrs, { onClick: r }), Me, 16));
102
+ }, o.$attrs, { onClick: r }), He, 16));
103
103
  }
104
104
  });
105
- function Fe(s) {
106
- let t = 0, a = 0;
107
- if (s.getBoundingClientRect) {
108
- const r = s.getBoundingClientRect(), i = document.documentElement;
109
- t = r.left + Math.max(i.scrollLeft, document.body.scrollLeft) - i.clientLeft, a = r.top + Math.max(i.scrollTop, document.body.scrollTop) - i.clientTop;
105
+ function Oe(c) {
106
+ let t = 0, i = 0;
107
+ if (c.getBoundingClientRect) {
108
+ const r = c.getBoundingClientRect(), o = document.documentElement;
109
+ t = r.left + Math.max(o.scrollLeft, document.body.scrollLeft) - o.clientLeft, i = r.top + Math.max(o.scrollTop, document.body.scrollTop) - o.clientTop;
110
110
  } else
111
- for (; s !== document.body; )
112
- t += s.offsetLeft, a += s.offsetTop, s = s.offsetParent;
111
+ for (; c !== document.body; )
112
+ t += c.offsetLeft, i += c.offsetTop, c = c.offsetParent;
113
113
  return {
114
114
  domX: t,
115
- domY: a
115
+ domY: i
116
116
  };
117
117
  }
118
- function ae(s, t) {
119
- let a = t.relatedTarget;
118
+ function ie(c, t) {
119
+ let i = t.relatedTarget;
120
120
  try {
121
- for (; a && a !== s; )
122
- a = a.parentNode;
121
+ for (; i && i !== c; )
122
+ i = i.parentNode;
123
123
  } catch (r) {
124
124
  console.warn(r);
125
125
  }
126
- return a !== s;
126
+ return i !== c;
127
127
  }
128
- function Ye(s, t, a) {
129
- const r = T({ list: [] }), i = (n) => {
130
- const _ = n.currentTarget, x = Fe(_), l = n.pageX || n.clientX, b = n.pageY || n.clientY, h = x.domX, S = x.domY, Y = l - h, w = b - S, g = parseInt(Y.toString()), f = parseInt(w.toString()), E = /* @__PURE__ */ new Date(), B = r.list.length;
131
- return r.list.push({ key: E.getTime(), index: B + 1, x: g, y: f }), t.click && t.click(g, f), n.cancelBubble = !0, n.preventDefault(), !1;
132
- }, m = (n) => (t.confirm && t.confirm(V(r.list), () => {
133
- y();
134
- }), n.cancelBubble = !0, n.preventDefault(), !1), c = (n) => (e(), n.cancelBubble = !0, n.preventDefault(), !1), u = (n) => (d(), n.cancelBubble = !0, n.preventDefault(), !1), e = () => {
135
- t.close && t.close(), y();
128
+ function je(c, t, i) {
129
+ const r = T({ list: [] }), o = (s) => {
130
+ const b = s.currentTarget, x = Oe(b), a = s.pageX || s.clientX, _ = s.pageY || s.clientY, h = x.domX, w = x.domY, y = a - h, g = _ - w, f = parseInt(y.toString()), L = parseInt(g.toString()), P = /* @__PURE__ */ new Date(), q = r.list.length;
131
+ return r.list.push({ key: P.getTime(), index: q + 1, x: f, y: L }), t.click && t.click(f, L), s.cancelBubble = !0, s.preventDefault(), !1;
132
+ }, m = (s) => (t.confirm && t.confirm(I(r.list), () => {
133
+ k();
134
+ }), s.cancelBubble = !0, s.preventDefault(), !1), n = (s) => (e(), s.cancelBubble = !0, s.preventDefault(), !1), u = (s) => (d(), s.cancelBubble = !0, s.preventDefault(), !1), e = () => {
135
+ t.close && t.close(), k();
136
136
  }, d = () => {
137
- t.refresh && t.refresh(), y();
138
- }, y = () => {
137
+ t.refresh && t.refresh(), k();
138
+ }, k = () => {
139
139
  r.list = [];
140
140
  };
141
141
  return {
142
142
  dots: r,
143
- clickEvent: i,
143
+ clickEvent: o,
144
144
  confirmEvent: m,
145
- closeEvent: c,
145
+ closeEvent: n,
146
146
  refreshEvent: u,
147
- resetData: y,
147
+ resetData: k,
148
148
  clearData: () => {
149
- y(), a && a();
149
+ k(), i && i();
150
150
  },
151
151
  refresh: d,
152
152
  close: e
153
153
  };
154
154
  }
155
- const Re = { class: "gc-header" }, He = ["src"], Oe = { class: "gc-loading" }, je = ["src"], Ae = { class: "gc-dots" }, Ie = { class: "gc-footer" }, Ve = { class: "gc-icon-block gc-icon-block2" }, Ne = { class: "gc-button-block" }, re = /* @__PURE__ */ q({
155
+ const Ae = { class: "gc-header" }, Ie = ["src"], Ve = { class: "gc-loading" }, Ne = ["src"], Ue = { class: "gc-dots" }, qe = { class: "gc-footer" }, Ge = { class: "gc-icon-block gc-icon-block2" }, Je = { class: "gc-button-block" }, ae = /* @__PURE__ */ U({
156
156
  __name: "index",
157
157
  props: {
158
- config: { default: Ee },
158
+ config: { default: Le },
159
159
  events: { default: () => ({}) },
160
160
  data: { default: () => ({}) }
161
161
  },
162
- setup(s, { expose: t }) {
163
- const a = s, { data: r, events: i, config: m } = a, c = T({ ...V(r) }), u = T({ ...V(i) }), e = T({ ...Ee(), ...V(m) });
164
- F(() => a.data, (l, b) => {
165
- Object.assign(c, l);
166
- }, { deep: !0 }), F(() => a.events, (l, b) => {
167
- Object.assign(u, l);
168
- }, { deep: !0 }), F(() => a.config, (l, b) => {
169
- Object.assign(e, l);
162
+ setup(c, { expose: t }) {
163
+ const i = c, { data: r, events: o, config: m } = i, n = T({ ...I(r) }), u = T({ ...I(o) }), e = T({ ...Le(), ...I(m) });
164
+ Y(() => i.data, (a, _) => {
165
+ Object.assign(n, a);
166
+ }, { deep: !0 }), Y(() => i.events, (a, _) => {
167
+ Object.assign(u, a);
168
+ }, { deep: !0 }), Y(() => i.config, (a, _) => {
169
+ Object.assign(e, a);
170
170
  }, { deep: !0 });
171
- const d = Ye(c, u, () => {
172
- c.thumb = "", c.image = "";
173
- }), y = L(() => {
174
- const l = e.horizontalPadding || 0, b = e.verticalPadding || 0;
171
+ const d = je(n, u, () => {
172
+ n.thumb = "", n.image = "";
173
+ }), k = z(() => {
174
+ const a = e.horizontalPadding || 0, _ = e.verticalPadding || 0;
175
175
  return {
176
- width: (e.width || 0) + l * 2 + (e.showTheme ? 2 : 0) + "px",
177
- paddingLeft: l + "px",
178
- paddingRight: l + "px",
179
- paddingTop: b + "px",
180
- paddingBottom: b + "px"
176
+ width: (e.width || 0) + a * 2 + (e.showTheme ? 2 : 0) + "px",
177
+ paddingLeft: a + "px",
178
+ paddingRight: a + "px",
179
+ paddingTop: _ + "px",
180
+ paddingBottom: _ + "px"
181
181
  };
182
- }), p = L(() => ({
182
+ }), p = z(() => ({
183
183
  width: e.thumbWidth + "px",
184
184
  height: e.thumbHeight + "px"
185
- })), n = L(() => ({
185
+ })), s = z(() => ({
186
186
  width: e.width + "px",
187
187
  height: e.height + "px"
188
- })), _ = L(() => c.image != "" || c.thumb != ""), x = L(() => (e.width || 0) > 0 || (e.height || 0) > 0);
188
+ })), b = z(() => n.image && n.image.length > 0 || n.thumb && n.thumb.length > 0), x = z(() => (e.width || 0) > 0 || (e.height || 0) > 0);
189
189
  return t({
190
190
  reset: d.resetData,
191
191
  clear: d.clearData,
192
192
  refresh: d.refresh,
193
193
  close: d.close
194
- }), (l, b) => K((z(), H("div", {
195
- class: se(`go-captcha gc-wrapper ${e.showTheme && "gc-theme"}`),
196
- style: D(y.value)
194
+ }), (a, _) => ge((E(), D("div", {
195
+ class: te(`go-captcha gc-wrapper ${e.showTheme && "gc-theme"}`),
196
+ style: C(k.value)
197
197
  }, [
198
- o("div", Re, [
199
- o("span", null, ie(e.title), 1),
200
- K(o("img", {
201
- style: D(p.value),
202
- src: c.thumb,
198
+ l("div", Ae, [
199
+ l("span", null, oe(e.title), 1),
200
+ n.thumb ? (E(), D("img", {
201
+ key: 0,
202
+ style: C(p.value),
203
+ src: n.thumb,
203
204
  alt: ""
204
- }, null, 12, He), [
205
- [Q, _.value]
206
- ])
205
+ }, null, 12, Ie)) : ne("", !0)
207
206
  ]),
208
- o("div", {
207
+ l("div", {
209
208
  class: "gc-body",
210
- style: D(n.value)
209
+ style: C(s.value)
211
210
  }, [
212
- o("div", Oe, [
213
- I(me)
211
+ l("div", Ve, [
212
+ A(pe)
214
213
  ]),
215
- K(o("img", {
216
- style: D(n.value),
214
+ n.image ? (E(), D("img", {
215
+ key: 0,
216
+ style: C(s.value),
217
217
  class: "gc-picture",
218
- src: c.image,
219
- onClick: b[0] || (b[0] = //@ts-ignore
218
+ src: n.image,
219
+ onClick: _[0] || (_[0] = //@ts-ignore
220
220
  (...h) => v(d).clickEvent && v(d).clickEvent(...h)),
221
221
  alt: ""
222
- }, null, 12, je), [
223
- [Q, _.value]
224
- ]),
225
- o("div", Ae, [
226
- (z(!0), H($e, null, ze(v(d).dots.list, (h) => (z(), H("div", {
222
+ }, null, 12, Ne)) : ne("", !0),
223
+ l("div", Ue, [
224
+ (E(!0), D(Te, null, Pe(v(d).dots.list, (h) => (E(), D("div", {
227
225
  class: "gc-dot",
228
226
  key: `${h.key + "-" + h.index}`,
229
- style: D({
227
+ style: C({
230
228
  width: e.dotSize + "px",
231
229
  height: e.dotSize + "px",
232
230
  borderRadius: e.dotSize + "px",
233
231
  top: h.y - (e.dotSize || 1) / 2 - 1 + "px",
234
232
  left: h.x - (e.dotSize || 1) / 2 - 1 + "px"
235
233
  })
236
- }, ie(h.index), 5))), 128))
234
+ }, oe(h.index), 5))), 128))
237
235
  ])
238
236
  ], 4),
239
- o("div", Ie, [
240
- o("div", Ve, [
241
- I(fe, {
237
+ l("div", qe, [
238
+ l("div", Ge, [
239
+ A(ve, {
242
240
  width: e.iconSize,
243
241
  height: e.iconSize,
244
242
  onClick: v(d).closeEvent
245
243
  }, null, 8, ["width", "height", "onClick"]),
246
- I(ve, {
244
+ A(me, {
247
245
  width: e.iconSize,
248
246
  height: e.iconSize,
249
247
  onClick: v(d).refreshEvent
250
248
  }, null, 8, ["width", "height", "onClick"])
251
249
  ]),
252
- o("div", Ne, [
253
- o("button", {
254
- class: se(!_.value && "disabled"),
255
- onClick: b[1] || (b[1] = //@ts-ignore
250
+ l("div", Je, [
251
+ l("button", {
252
+ class: te(!b.value && "disabled"),
253
+ onClick: _[1] || (_[1] = //@ts-ignore
256
254
  (...h) => v(d).confirmEvent && v(d).confirmEvent(...h))
257
- }, ie(e.buttonText), 3)
255
+ }, oe(e.buttonText), 3)
258
256
  ])
259
257
  ])
260
258
  ], 6)), [
261
- [Q, x.value]
259
+ [fe, x.value]
262
260
  ]);
263
261
  }
264
262
  });
265
- re.name = "gocaptcha-click";
266
- re.install = function(s) {
267
- s.component("gocaptcha-click", re);
263
+ ae.name = "gocaptcha-click";
264
+ ae.install = function(c) {
265
+ c.component("gocaptcha-click", ae);
268
266
  };
269
- const xe = () => ({
267
+ const ke = () => ({
270
268
  width: 300,
271
269
  height: 220,
272
270
  thumbWidth: 150,
@@ -277,26 +275,26 @@ const xe = () => ({
277
275
  title: "请拖动滑块完成拼图",
278
276
  iconSize: 22,
279
277
  scope: !0
280
- }), Ue = /* @__PURE__ */ o("path", { d: `M131.6,116.3c0,0-75.6,0-109.7,0c-9.1,0-16.2-7.4-16.2-16.2c0-9.1,7.4-16.2,16.2-16.2c28.7,0,109.7,0,109.7,0
278
+ }), Ke = /* @__PURE__ */ l("path", { d: `M131.6,116.3c0,0-75.6,0-109.7,0c-9.1,0-16.2-7.4-16.2-16.2c0-9.1,7.4-16.2,16.2-16.2c28.7,0,109.7,0,109.7,0
281
279
  s-5.4-5.4-30.4-30.7c-6.4-6.4-6.4-16.7,0-23.1s16.7-6.4,23.1,0l58.4,58.4c6.4,6.4,6.4,16.7,0,23.1c0,0-32.9,32.9-57.9,57.9
282
- c-6.4,6.4-16.7,6.4-23.1,0c-6.4-6.4-6.4-16.7,0-23.1C121.8,126.2,131.6,116.3,131.6,116.3z` }, null, -1), qe = [
283
- Ue
284
- ], ke = /* @__PURE__ */ q({
280
+ c-6.4,6.4-16.7,6.4-23.1,0c-6.4-6.4-6.4-16.7,0-23.1C121.8,126.2,131.6,116.3,131.6,116.3z` }, null, -1), Qe = [
281
+ Ke
282
+ ], Se = /* @__PURE__ */ U({
285
283
  __name: "arrows-icon",
286
284
  emits: ["click"],
287
- setup(s, { emit: t }) {
288
- const a = t;
289
- function r(i) {
290
- a("click", i);
285
+ setup(c, { emit: t }) {
286
+ const i = t;
287
+ function r(o) {
288
+ i("click", o);
291
289
  }
292
- return (i, m) => (z(), H("svg", oe({
290
+ return (o, m) => (E(), D("svg", ce({
293
291
  xmlns: "http://www.w3.org/2000/svg",
294
292
  viewBox: "0 0 200 200",
295
293
  width: "20",
296
294
  height: "20"
297
- }, i.$attrs, { onClick: r }), qe, 16));
295
+ }, o.$attrs, { onClick: r }), Qe, 16));
298
296
  }
299
- }), Ge = () => ({
297
+ }), ye = () => ({
300
298
  thumbX: 0,
301
299
  thumbY: 0,
302
300
  thumbWidth: 0,
@@ -304,208 +302,209 @@ const xe = () => ({
304
302
  image: "",
305
303
  thumb: ""
306
304
  });
307
- function Je(s, t, a, r, i, m, c, u, e) {
308
- const d = T({ dragLeft: 0, thumbLeft: s.thumbX || 0, isFreeze: !1 });
309
- F(() => s, (h, S) => {
305
+ function Ze(c, t, i, r, o, m, n, u, e) {
306
+ const d = T({ dragLeft: 0, thumbLeft: c.thumbX || 0, isFreeze: !1 });
307
+ Y(() => c, (h, w) => {
310
308
  d.isFreeze || (d.thumbLeft = h.thumbX || 0);
311
309
  }, { deep: !0 });
312
- const y = (h) => {
313
- if (!ae(u.value, h))
310
+ const k = (h) => {
311
+ if (!ie(u.value, h))
314
312
  return;
315
- const S = h.touches && h.touches[0], Y = c.value.offsetLeft, w = i.value.offsetWidth, g = c.value.offsetWidth, f = w - g, E = m.value.offsetWidth, B = m.value.offsetLeft, te = w - E, G = (w - (E + B)) / f;
316
- let N = !1, P = null, Z = 0, O = 0;
317
- S ? Z = S.pageX - Y : Z = h.clientX - Y;
318
- const R = (W) => {
319
- N = !0;
320
- const J = W.touches && W.touches[0];
321
- let M = 0;
322
- J ? M = J.pageX - Z : M = W.clientX - Z;
323
- let De = B + M * G;
324
- if (M >= f) {
325
- d.dragLeft = f, d.thumbLeft = O = te;
313
+ const w = h.touches && h.touches[0], y = n.value.offsetLeft, g = o.value.offsetWidth, f = n.value.offsetWidth, L = g - f, P = m.value.offsetWidth, q = m.value.offsetLeft, Z = g - P, G = (g - (P + q)) / L;
314
+ let V = !1, X = null, K = 0, H = 0;
315
+ w ? K = w.pageX - y : K = h.clientX - y;
316
+ const R = (M) => {
317
+ V = !0;
318
+ const J = M.touches && M.touches[0];
319
+ let F = 0;
320
+ J ? F = J.pageX - K : F = M.clientX - K;
321
+ let Be = q + F * G;
322
+ if (F >= L) {
323
+ d.dragLeft = L, d.thumbLeft = H = Z;
326
324
  return;
327
325
  }
328
- if (M <= 0) {
329
- d.dragLeft = 0, d.thumbLeft = O = B;
326
+ if (F <= 0) {
327
+ d.dragLeft = 0, d.thumbLeft = H = q;
330
328
  return;
331
329
  }
332
- d.dragLeft = M, d.thumbLeft = O = De, t.move && t.move(O, s.thumbY || 0), W.cancelBubble = !0, W.preventDefault();
333
- }, U = (W) => {
334
- ae(u.value, W) && (X(), N && (N = !1, !(O < 0) && (t.confirm && t.confirm({ x: parseInt(O.toString()), y: s.thumbY || 0 }, () => {
335
- l();
336
- }), W.cancelBubble = !0, W.preventDefault())));
337
- }, j = (W) => {
338
- P = W;
339
- }, A = () => {
340
- P = null;
341
- }, ce = (W) => {
342
- P && (U(P), X());
343
- }, k = a.scope, $ = k ? r.value : u.value, C = k ? r.value : document.body, X = () => {
344
- C.removeEventListener("mousemove", R, !1), C.removeEventListener("touchmove", R, { passive: !1 }), $.removeEventListener("mouseup", U, !1), $.removeEventListener("mouseenter", A, !1), $.removeEventListener("mouseleave", j, !1), $.removeEventListener("touchend", U, !1), C.removeEventListener("mouseleave", U, !1), C.removeEventListener("mouseup", ce, !1), d.isFreeze = !1;
330
+ d.dragLeft = F, d.thumbLeft = H = Be, t.move && t.move(H, c.thumbY || 0), M.cancelBubble = !0, M.preventDefault();
331
+ }, N = (M) => {
332
+ ie(u.value, M) && (W(), V && (V = !1, !(H < 0) && (t.confirm && t.confirm({ x: parseInt(H.toString()), y: c.thumbY || 0 }, () => {
333
+ a();
334
+ }), M.cancelBubble = !0, M.preventDefault())));
335
+ }, O = (M) => {
336
+ X = M;
337
+ }, j = () => {
338
+ X = null;
339
+ }, se = (M) => {
340
+ X && (N(X), W());
341
+ }, $ = i.scope, S = $ ? r.value : u.value, B = $ ? r.value : document.body, W = () => {
342
+ B.removeEventListener("mousemove", R, !1), B.removeEventListener("touchmove", R, { passive: !1 }), S.removeEventListener("mouseup", N, !1), S.removeEventListener("mouseenter", j, !1), S.removeEventListener("mouseleave", O, !1), S.removeEventListener("touchend", N, !1), B.removeEventListener("mouseleave", N, !1), B.removeEventListener("mouseup", se, !1), d.isFreeze = !1;
345
343
  };
346
- d.isFreeze = !0, C.addEventListener("mousemove", R, !1), C.addEventListener("touchmove", R, { passive: !1 }), $.addEventListener("mouseup", U, !1), $.addEventListener("mouseenter", A, !1), $.addEventListener("mouseleave", j, !1), $.addEventListener("touchend", U, !1), C.addEventListener("mouseleave", U, !1), C.addEventListener("mouseup", ce, !1);
347
- }, p = (h) => (_(), h.cancelBubble = !0, h.preventDefault(), !1), n = (h) => (x(), h.cancelBubble = !0, h.preventDefault(), !1), _ = () => {
348
- t && t.close && t.close(), l();
344
+ d.isFreeze = !0, B.addEventListener("mousemove", R, !1), B.addEventListener("touchmove", R, { passive: !1 }), S.addEventListener("mouseup", N, !1), S.addEventListener("mouseenter", j, !1), S.addEventListener("mouseleave", O, !1), S.addEventListener("touchend", N, !1), B.addEventListener("mouseleave", N, !1), B.addEventListener("mouseup", se, !1);
345
+ }, p = (h) => (b(), h.cancelBubble = !0, h.preventDefault(), !1), s = (h) => (x(), h.cancelBubble = !0, h.preventDefault(), !1), b = () => {
346
+ t && t.close && t.close(), a();
349
347
  }, x = () => {
350
- t && t.refresh && t.refresh(), l();
351
- }, l = () => {
352
- d.dragLeft = 0, d.thumbLeft = s.thumbX || 0;
348
+ t && t.refresh && t.refresh(), a();
349
+ }, a = () => {
350
+ d.dragLeft = 0, d.thumbLeft = c.thumbX || 0;
353
351
  };
354
352
  return {
355
353
  state: d,
356
- dragEvent: y,
354
+ dragEvent: k,
357
355
  closeEvent: p,
358
- refreshEvent: n,
359
- resetData: l,
356
+ refreshEvent: s,
357
+ resetData: a,
360
358
  clearData: () => {
361
- e && e(), l();
359
+ e && e(), a();
362
360
  },
363
361
  refresh: x,
364
- close: _
362
+ close: b
365
363
  };
366
364
  }
367
- const Ke = { class: "gc-header" }, Qe = { class: "gc-icon-block" }, Ze = { class: "gc-loading" }, et = ["src"], tt = ["src"], nt = { class: "gc-footer" }, st = /* @__PURE__ */ o("div", { class: "gc-drag-line" }, null, -1), ue = /* @__PURE__ */ q({
365
+ const et = { class: "gc-header" }, tt = { class: "gc-icon-block" }, nt = { class: "gc-loading" }, st = ["src"], ct = ["src"], ot = { class: "gc-footer" }, it = /* @__PURE__ */ l("div", { class: "gc-drag-line" }, null, -1), re = /* @__PURE__ */ U({
368
366
  __name: "index",
369
367
  props: {
370
- config: { default: xe },
368
+ config: { default: ke },
371
369
  events: { default: () => ({}) },
372
- data: { default: () => ({}) }
370
+ data: { default: ye }
373
371
  },
374
- setup(s, { expose: t }) {
375
- const a = s, { data: r, events: i, config: m } = a, c = T({ ...Ge(), ...V(r) }), u = T({ ...V(i) }), e = T({ ...xe(), ...V(m) });
376
- F(() => a.data, (f, E) => {
377
- Object.assign(c, f);
378
- }, { deep: !0 }), F(() => a.events, (f, E) => {
372
+ setup(c, { expose: t }) {
373
+ const i = c, { data: r, events: o, config: m } = i, n = T({ ...ye(), ...I(r) }), u = T({ ...I(o) }), e = T({ ...ke(), ...I(m) });
374
+ Y(() => i.data, (f, L) => {
375
+ Object.assign(n, f);
376
+ }, { deep: !0 }), Y(() => i.events, (f, L) => {
379
377
  Object.assign(u, f);
380
- }, { deep: !0 }), F(() => a.config, (f, E) => {
378
+ }, { deep: !0 }), Y(() => i.config, (f, L) => {
381
379
  Object.assign(e, f);
382
380
  }, { deep: !0 });
383
- const d = ee(null), y = ee(null), p = ee(null), n = ee(null), _ = ee(null), x = Je(
384
- c,
381
+ const d = Q(null), k = Q(null), p = Q(null), s = Q(null), b = Q(null), x = Ze(
382
+ n,
385
383
  u,
386
384
  e,
387
385
  d,
388
386
  p,
389
- _,
390
- n,
391
- y,
387
+ b,
388
+ s,
389
+ k,
392
390
  () => {
393
- c.thumb = "", c.image = "", c.thumbX = 0, c.thumbY = 0, c.thumbWidth = 0, c.thumbHeight = 0;
391
+ n.thumb = "", n.image = "", n.thumbX = 0, n.thumbY = 0, n.thumbWidth = 0, n.thumbHeight = 0;
394
392
  }
395
- ), l = L(() => {
396
- const f = e.horizontalPadding || 0, E = e.verticalPadding || 0;
393
+ ), a = z(() => {
394
+ const f = e.horizontalPadding || 0, L = e.verticalPadding || 0;
397
395
  return {
398
396
  width: (e.width || 0) + f * 2 + (e.showTheme ? 2 : 0) + "px",
399
397
  paddingLeft: f + "px",
400
398
  paddingRight: f + "px",
401
- paddingTop: E + "px",
402
- paddingBottom: E + "px"
399
+ paddingTop: L + "px",
400
+ paddingBottom: L + "px"
403
401
  };
404
- }), b = L(() => ({
405
- width: c.thumbWidth + "px",
406
- height: c.thumbHeight + "px",
407
- top: c.thumbY + "px",
402
+ }), _ = z(() => ({
403
+ width: n.thumbWidth + "px",
404
+ height: n.thumbHeight + "px",
405
+ top: n.thumbY + "px",
408
406
  left: x.state.thumbLeft + "px"
409
- })), h = L(() => ({
407
+ })), h = z(() => ({
410
408
  width: e.width + "px",
411
409
  height: e.height + "px"
412
- })), S = L(() => c.image != ""), Y = L(() => c.thumb != ""), w = L(() => (e.width || 0) > 0 || (e.height || 0) > 0), g = (f) => f.preventDefault();
413
- return _e(async () => {
414
- await be(), n.value && n.value.addEventListener("dragstart", g);
415
- }), we(() => {
416
- n.value && n.value.removeEventListener("dragstart", g);
410
+ })), w = z(() => n.image && n.image.length > 0), y = z(() => (e.width || 0) > 0 || (e.height || 0) > 0), g = (f) => f.preventDefault();
411
+ return be(async () => {
412
+ await we(), s.value && s.value.addEventListener("dragstart", g);
413
+ }), Ee(() => {
414
+ s.value && s.value.removeEventListener("dragstart", g);
417
415
  }), t({
418
416
  reset: x.resetData,
419
417
  clear: x.clearData,
420
418
  refresh: x.refresh,
421
419
  close: x.close
422
- }), (f, E) => K((z(), H("div", {
423
- class: se(`go-captcha gc-wrapper ${e.showTheme && "gc-theme"}`),
424
- style: D(l.value),
420
+ }), (f, L) => ge((E(), D("div", {
421
+ class: te(`go-captcha gc-wrapper ${e.showTheme && "gc-theme"}`),
422
+ style: C(a.value),
425
423
  ref_key: "rootRef",
426
424
  ref: d
427
425
  }, [
428
- o("div", Ke, [
429
- o("span", null, ie(e.title), 1),
430
- o("div", Qe, [
431
- I(fe, {
426
+ l("div", et, [
427
+ l("span", null, oe(e.title), 1),
428
+ l("div", tt, [
429
+ A(ve, {
432
430
  width: e.iconSize,
433
431
  height: e.iconSize,
434
432
  onClick: v(x).closeEvent
435
433
  }, null, 8, ["width", "height", "onClick"]),
436
- I(ve, {
434
+ A(me, {
437
435
  width: e.iconSize,
438
436
  height: e.iconSize,
439
437
  onClick: v(x).refreshEvent
440
438
  }, null, 8, ["width", "height", "onClick"])
441
439
  ])
442
440
  ]),
443
- o("div", {
441
+ l("div", {
444
442
  class: "gc-body",
445
443
  ref_key: "containerRef",
446
444
  ref: p,
447
- style: D(h.value)
445
+ style: C(h.value)
448
446
  }, [
449
- o("div", Ze, [
450
- I(me)
447
+ l("div", nt, [
448
+ A(pe)
451
449
  ]),
452
- K(o("img", {
450
+ n.image ? (E(), D("img", {
451
+ key: 0,
453
452
  class: "gc-picture",
454
- style: D(h.value),
455
- src: c.image,
453
+ style: C(h.value),
454
+ src: n.image,
456
455
  alt: ""
457
- }, null, 12, et), [
458
- [Q, S.value]
459
- ]),
460
- o("div", {
456
+ }, null, 12, st)) : ne("", !0),
457
+ l("div", {
461
458
  class: "gc-tile",
462
459
  ref_key: "tileRef",
463
- ref: _,
464
- style: D(b.value)
460
+ ref: b,
461
+ style: C(_.value)
465
462
  }, [
466
- K(o("img", {
467
- src: c.thumb,
463
+ n.thumb ? (E(), D("img", {
464
+ key: 0,
465
+ src: n.thumb,
468
466
  alt: ""
469
- }, null, 8, tt), [
470
- [Q, Y.value]
471
- ])
467
+ }, null, 8, ct)) : ne("", !0)
472
468
  ], 4)
473
469
  ], 4),
474
- o("div", nt, [
475
- o("div", {
470
+ l("div", ot, [
471
+ l("div", {
476
472
  class: "gc-drag-slide-bar",
477
473
  ref_key: "dragBarRef",
478
- ref: y
474
+ ref: k
479
475
  }, [
480
- st,
481
- o("div", {
482
- class: se(["gc-drag-block", !S.value && "disabled"]),
476
+ it,
477
+ l("div", {
478
+ class: te(["gc-drag-block", !w.value && "disabled"]),
483
479
  ref_key: "dragBlockRef",
484
- ref: n,
485
- onMousedown: E[1] || (E[1] = //@ts-ignore
486
- (...B) => v(x).dragEvent && v(x).dragEvent(...B)),
487
- style: D({ left: v(x).state.dragLeft + "px" })
480
+ ref: s,
481
+ onMousedown: L[1] || (L[1] = //@ts-ignore
482
+ (...P) => v(x).dragEvent && v(x).dragEvent(...P)),
483
+ style: C({ left: v(x).state.dragLeft + "px" })
488
484
  }, [
489
- o("div", {
485
+ l("div", {
490
486
  class: "gc-drag-block-inline",
491
- onTouchstart: E[0] || (E[0] = //@ts-ignore
492
- (...B) => v(x).dragEvent && v(x).dragEvent(...B))
487
+ onTouchstart: L[0] || (L[0] = xe(
488
+ //@ts-ignore
489
+ (...P) => v(x).dragEvent && v(x).dragEvent(...P),
490
+ ["prevent"]
491
+ ))
493
492
  }, [
494
- I(ke)
493
+ A(Se)
495
494
  ], 32)
496
495
  ], 38)
497
496
  ], 512)
498
497
  ])
499
498
  ], 6)), [
500
- [Q, w.value]
499
+ [fe, y.value]
501
500
  ]);
502
501
  }
503
502
  });
504
- ue.name = "gocaptcha-slide";
505
- ue.install = function(s) {
506
- s.component("gocaptcha-slide", ue);
503
+ re.name = "gocaptcha-slide";
504
+ re.install = function(c) {
505
+ c.component("gocaptcha-slide", re);
507
506
  };
508
- const Le = () => ({
507
+ const $e = () => ({
509
508
  width: 300,
510
509
  height: 220,
511
510
  verticalPadding: 16,
@@ -514,7 +513,7 @@ const Le = () => ({
514
513
  title: "请拖拽贴图完成拼图",
515
514
  iconSize: 22,
516
515
  scope: !0
517
- }), ct = () => ({
516
+ }), De = () => ({
518
517
  thumbX: 0,
519
518
  thumbY: 0,
520
519
  thumbWidth: 0,
@@ -522,177 +521,178 @@ const Le = () => ({
522
521
  image: "",
523
522
  thumb: ""
524
523
  });
525
- function ot(s, t, a, r, i, m, c) {
526
- const u = T({ x: s.thumbX || 0, y: s.thumbY || 0, isFreeze: !1 });
527
- F(() => s, (l, b) => {
528
- u.isFreeze || (u.x = l.thumbX || 0, u.y = l.thumbY || 0);
524
+ function lt(c, t, i, r, o, m, n) {
525
+ const u = T({ x: c.thumbX || 0, y: c.thumbY || 0, isFreeze: !1 });
526
+ Y(() => c, (a, _) => {
527
+ u.isFreeze || (u.x = a.thumbX || 0, u.y = a.thumbY || 0);
529
528
  }, { deep: !0 });
530
- const e = (l) => {
531
- if (!ae(i.value, l))
529
+ const e = (a) => {
530
+ if (!ie(o.value, a))
532
531
  return;
533
- const b = l.touches && l.touches[0], h = m.value.offsetLeft, S = m.value.offsetTop, Y = i.value.offsetWidth, w = i.value.offsetHeight, g = m.value.offsetWidth, f = m.value.offsetHeight, E = Y - g, B = w - f;
534
- let te = !1, ne = null, G = 0, N = 0, P = 0, Z = 0;
535
- b ? (G = b.pageX - h, N = b.pageY - S) : (G = l.clientX - h, N = l.clientY - S);
536
- const O = (X) => {
537
- te = !0;
538
- const W = X.touches && X.touches[0];
539
- let J = 0, M = 0;
540
- W ? (J = W.pageX - G, M = W.pageY - N) : (J = X.clientX - G, M = X.clientY - N), J <= 0 && (J = 0), M <= 0 && (M = 0), J >= E && (J = E), M >= B && (M = B), u.x = J, u.y = M, P = J, Z = M, t.move && t.move(J, M), X.cancelBubble = !0, X.preventDefault();
541
- }, R = (X) => {
542
- ae(i.value, X) && (C(), te && (te = !1, !(P < 0 || Z < 0) && (t.confirm && t.confirm({ x: P, y: Z }, () => {
543
- _();
544
- }), X.cancelBubble = !0, X.preventDefault())));
545
- }, U = (X) => {
546
- ne = X;
547
- }, j = () => {
548
- ne = null;
549
- }, A = (X) => {
550
- ne && (R(ne), C());
551
- }, ce = a.scope, k = ce ? r.value : i.value, $ = ce ? r.value : document.body, C = () => {
552
- $.removeEventListener("mousemove", O, !1), $.removeEventListener("touchmove", O, { passive: !1 }), k.removeEventListener("mouseup", R, !1), k.removeEventListener("mouseenter", j, !1), k.removeEventListener("mouseleave", U, !1), k.removeEventListener("touchend", R, !1), $.removeEventListener("mouseleave", R, !1), $.removeEventListener("mouseup", A, !1), u.isFreeze = !1;
532
+ const _ = a.touches && a.touches[0], h = m.value.offsetLeft, w = m.value.offsetTop, y = o.value.offsetWidth, g = o.value.offsetHeight, f = m.value.offsetWidth, L = m.value.offsetHeight, P = y - f, q = g - L;
533
+ let Z = !1, ee = null, G = 0, V = 0, X = 0, K = 0;
534
+ _ ? (G = _.pageX - h, V = _.pageY - w) : (G = a.clientX - h, V = a.clientY - w);
535
+ const H = (W) => {
536
+ Z = !0;
537
+ const M = W.touches && W.touches[0];
538
+ let J = 0, F = 0;
539
+ M ? (J = M.pageX - G, F = M.pageY - V) : (J = W.clientX - G, F = W.clientY - V), J <= 0 && (J = 0), F <= 0 && (F = 0), J >= P && (J = P), F >= q && (F = q), u.x = J, u.y = F, X = J, K = F, t.move && t.move(J, F), W.cancelBubble = !0, W.preventDefault();
540
+ }, R = (W) => {
541
+ ie(o.value, W) && (B(), Z && (Z = !1, !(X < 0 || K < 0) && (t.confirm && t.confirm({ x: X, y: K }, () => {
542
+ b();
543
+ }), W.cancelBubble = !0, W.preventDefault())));
544
+ }, N = (W) => {
545
+ ee = W;
546
+ }, O = () => {
547
+ ee = null;
548
+ }, j = (W) => {
549
+ ee && (R(ee), B());
550
+ }, se = i.scope, $ = se ? r.value : o.value, S = se ? r.value : document.body, B = () => {
551
+ S.removeEventListener("mousemove", H, !1), S.removeEventListener("touchmove", H, { passive: !1 }), $.removeEventListener("mouseup", R, !1), $.removeEventListener("mouseenter", O, !1), $.removeEventListener("mouseleave", N, !1), $.removeEventListener("touchend", R, !1), S.removeEventListener("mouseleave", R, !1), S.removeEventListener("mouseup", j, !1), u.isFreeze = !1;
553
552
  };
554
- u.isFreeze = !0, $.addEventListener("mousemove", O, !1), $.addEventListener("touchmove", O, { passive: !1 }), k.addEventListener("mouseup", R, !1), k.addEventListener("mouseenter", j, !1), k.addEventListener("mouseleave", U, !1), k.addEventListener("touchend", R, !1), $.addEventListener("mouseleave", R, !1), $.addEventListener("mouseup", A, !1);
555
- }, d = (l) => (p(), l.cancelBubble = !0, l.preventDefault(), !1), y = (l) => (n(), l.cancelBubble = !0, l.preventDefault(), !1), p = () => {
556
- t && t.close && t.close(), _();
557
- }, n = () => {
558
- t && t.refresh && t.refresh(), _();
559
- }, _ = () => {
560
- u.x = s.thumbX || 0, u.y = s.thumbY || 0;
553
+ u.isFreeze = !0, S.addEventListener("mousemove", H, !1), S.addEventListener("touchmove", H, { passive: !1 }), $.addEventListener("mouseup", R, !1), $.addEventListener("mouseenter", O, !1), $.addEventListener("mouseleave", N, !1), $.addEventListener("touchend", R, !1), S.addEventListener("mouseleave", R, !1), S.addEventListener("mouseup", j, !1);
554
+ }, d = (a) => (p(), a.cancelBubble = !0, a.preventDefault(), !1), k = (a) => (s(), a.cancelBubble = !0, a.preventDefault(), !1), p = () => {
555
+ t && t.close && t.close(), b();
556
+ }, s = () => {
557
+ t && t.refresh && t.refresh(), b();
558
+ }, b = () => {
559
+ u.x = c.thumbX || 0, u.y = c.thumbY || 0;
561
560
  };
562
561
  return {
563
562
  state: u,
564
563
  dragEvent: e,
565
564
  closeEvent: d,
566
- refreshEvent: y,
567
- resetData: _,
565
+ refreshEvent: k,
566
+ resetData: b,
568
567
  clearData: () => {
569
- c && c(), _();
568
+ n && n(), b();
570
569
  },
571
- refresh: n,
570
+ refresh: s,
572
571
  close: p
573
572
  };
574
573
  }
575
- const it = { class: "gc-header gc-header2" }, at = { class: "gc-loading" }, lt = ["src"], rt = ["src"], ut = { class: "gc-footer" }, dt = { class: "gc-icon-block" }, de = /* @__PURE__ */ q({
574
+ const at = { class: "gc-header gc-header2" }, rt = { class: "gc-loading" }, ut = ["src"], dt = ["src"], ht = { class: "gc-footer" }, gt = { class: "gc-icon-block" }, ue = /* @__PURE__ */ U({
576
575
  __name: "index",
577
576
  props: {
578
- config: { default: Le },
577
+ config: { default: $e },
579
578
  events: { default: () => ({}) },
580
- data: { default: () => ({}) }
579
+ data: { default: De }
581
580
  },
582
- setup(s, { expose: t }) {
583
- const a = s, { data: r, events: i, config: m } = a, c = T({ ...ct(), ...V(r) }), u = T({ ...V(i) }), e = T({ ...Le(), ...V(m) });
584
- F(() => a.data, (w, g) => {
585
- Object.assign(c, w);
586
- }, { deep: !0 }), F(() => a.events, (w, g) => {
581
+ setup(c, { expose: t }) {
582
+ const i = c, { data: r, events: o, config: m } = i, n = T({ ...De(), ...I(r) }), u = T({ ...I(o) }), e = T({ ...$e(), ...I(m) });
583
+ Y(() => i.data, (w, y) => {
584
+ Object.assign(n, w);
585
+ }, { deep: !0 }), Y(() => i.events, (w, y) => {
587
586
  Object.assign(u, w);
588
- }, { deep: !0 }), F(() => a.config, (w, g) => {
587
+ }, { deep: !0 }), Y(() => i.config, (w, y) => {
589
588
  Object.assign(e, w);
590
589
  }, { deep: !0 });
591
- const d = ee(null), y = ee(null), p = ee(null), n = ot(
592
- c,
590
+ const d = Q(null), k = Q(null), p = Q(null), s = lt(
591
+ n,
593
592
  u,
594
593
  e,
595
594
  d,
596
- y,
595
+ k,
597
596
  p,
598
597
  () => {
599
- c.thumb = "", c.image = "", c.thumbX = 0, c.thumbY = 0, c.thumbWidth = 0, c.thumbHeight = 0;
598
+ n.thumb = "", n.image = "", n.thumbX = 0, n.thumbY = 0, n.thumbWidth = 0, n.thumbHeight = 0;
600
599
  }
601
- ), _ = L(() => {
602
- const w = e.horizontalPadding || 0, g = e.verticalPadding || 0;
600
+ ), b = z(() => {
601
+ const w = e.horizontalPadding || 0, y = e.verticalPadding || 0;
603
602
  return {
604
603
  width: (e.width || 0) + w * 2 + (e.showTheme ? 2 : 0) + "px",
605
604
  paddingLeft: w + "px",
606
605
  paddingRight: w + "px",
607
- paddingTop: g + "px",
608
- paddingBottom: g + "px"
606
+ paddingTop: y + "px",
607
+ paddingBottom: y + "px"
609
608
  };
610
- }), x = L(() => ({
611
- width: c.thumbWidth + "px",
612
- height: c.thumbHeight + "px",
613
- top: n.state.y + "px",
614
- left: n.state.x + "px"
615
- })), l = L(() => ({
609
+ }), x = z(() => ({
610
+ width: n.thumbWidth + "px",
611
+ height: n.thumbHeight + "px",
612
+ top: s.state.y + "px",
613
+ left: s.state.x + "px"
614
+ })), a = z(() => ({
616
615
  width: e.width + "px",
617
616
  height: e.height + "px"
618
- })), b = L(() => c.image != ""), h = L(() => c.thumb != ""), S = L(() => (e.width || 0) > 0 || (e.height || 0) > 0), Y = (w) => w.preventDefault();
619
- return _e(async () => {
620
- await be(), p.value && p.value.addEventListener("dragstart", Y);
621
- }), we(() => {
622
- p.value && p.value.removeEventListener("dragstart", Y);
617
+ })), _ = z(() => (e.width || 0) > 0 || (e.height || 0) > 0), h = (w) => w.preventDefault();
618
+ return be(async () => {
619
+ await we(), p.value && p.value.addEventListener("dragstart", h);
620
+ }), Ee(() => {
621
+ p.value && p.value.removeEventListener("dragstart", h);
623
622
  }), t({
624
- reset: n.resetData,
625
- clear: n.clearData,
626
- refresh: n.refresh,
627
- close: n.close
628
- }), (w, g) => K((z(), H("div", {
629
- class: se(`go-captcha gc-wrapper ${e.showTheme && "gc-theme"}`),
630
- style: D(_.value),
623
+ reset: s.resetData,
624
+ clear: s.clearData,
625
+ refresh: s.refresh,
626
+ close: s.close
627
+ }), (w, y) => ge((E(), D("div", {
628
+ class: te(`go-captcha gc-wrapper ${e.showTheme && "gc-theme"}`),
629
+ style: C(b.value),
631
630
  ref_key: "rootRef",
632
631
  ref: d
633
632
  }, [
634
- o("div", it, [
635
- o("span", null, ie(e.title), 1)
633
+ l("div", at, [
634
+ l("span", null, oe(e.title), 1)
636
635
  ]),
637
- o("div", {
636
+ l("div", {
638
637
  class: "gc-body",
639
638
  ref_key: "containerRef",
640
- ref: y,
641
- style: D(l.value)
639
+ ref: k,
640
+ style: C(a.value)
642
641
  }, [
643
- o("div", at, [
644
- I(me)
642
+ l("div", rt, [
643
+ A(pe)
645
644
  ]),
646
- K(o("img", {
645
+ n.image ? (E(), D("img", {
646
+ key: 0,
647
647
  class: "gc-picture",
648
- style: D(l.value),
649
- src: c.image,
648
+ style: C(a.value),
649
+ src: n.image,
650
650
  alt: ""
651
- }, null, 12, lt), [
652
- [Q, b.value]
653
- ]),
654
- o("div", {
651
+ }, null, 12, ut)) : ne("", !0),
652
+ l("div", {
655
653
  class: "gc-tile",
656
654
  ref_key: "tileRef",
657
655
  ref: p,
658
- style: D(x.value),
659
- onMousedown: g[0] || (g[0] = //@ts-ignore
660
- (...f) => v(n).dragEvent && v(n).dragEvent(...f)),
661
- onTouchstart: g[1] || (g[1] = //@ts-ignore
662
- (...f) => v(n).dragEvent && v(n).dragEvent(...f))
656
+ style: C(x.value),
657
+ onMousedown: y[0] || (y[0] = //@ts-ignore
658
+ (...g) => v(s).dragEvent && v(s).dragEvent(...g)),
659
+ onTouchstart: y[1] || (y[1] = xe(
660
+ //@ts-ignore
661
+ (...g) => v(s).dragEvent && v(s).dragEvent(...g),
662
+ ["prevent"]
663
+ ))
663
664
  }, [
664
- K(o("img", {
665
- src: c.thumb,
665
+ n.thumb ? (E(), D("img", {
666
+ key: 0,
667
+ src: n.thumb,
666
668
  alt: ""
667
- }, null, 8, rt), [
668
- [Q, h.value]
669
- ])
669
+ }, null, 8, dt)) : ne("", !0)
670
670
  ], 36)
671
671
  ], 4),
672
- o("div", ut, [
673
- o("div", dt, [
674
- I(fe, {
672
+ l("div", ht, [
673
+ l("div", gt, [
674
+ A(ve, {
675
675
  width: e.iconSize,
676
676
  height: e.iconSize,
677
- onClick: v(n).closeEvent
677
+ onClick: v(s).closeEvent
678
678
  }, null, 8, ["width", "height", "onClick"]),
679
- I(ve, {
679
+ A(me, {
680
680
  width: e.iconSize,
681
681
  height: e.iconSize,
682
- onClick: v(n).refreshEvent
682
+ onClick: v(s).refreshEvent
683
683
  }, null, 8, ["width", "height", "onClick"])
684
684
  ])
685
685
  ])
686
686
  ], 6)), [
687
- [Q, S.value]
687
+ [fe, _.value]
688
688
  ]);
689
689
  }
690
690
  });
691
- de.name = "gocaptcha-slide-region";
692
- de.install = function(s) {
693
- s.component("gocaptcha-slide-region", de);
691
+ ue.name = "gocaptcha-slide-region";
692
+ ue.install = function(c) {
693
+ c.component("gocaptcha-slide-region", ue);
694
694
  };
695
- const pe = () => ({
695
+ const _e = () => ({
696
696
  width: 300,
697
697
  height: 220,
698
698
  size: 220,
@@ -702,96 +702,97 @@ const pe = () => ({
702
702
  title: "请拖动滑块完成拼图",
703
703
  iconSize: 22,
704
704
  scope: !0
705
- }), ht = () => ({
705
+ }), ze = () => ({
706
706
  angle: 0,
707
707
  image: "",
708
- thumb: ""
708
+ thumb: "",
709
+ thumbSize: 0
709
710
  });
710
- function gt(s, t, a, r, i, m, c) {
711
- const u = T({ dragLeft: 0, thumbAngle: s.angle || 0, isFreeze: !1 });
712
- F(() => s, (l, b) => {
713
- u.isFreeze || (u.thumbAngle = l.angle || 0);
711
+ function ft(c, t, i, r, o, m, n) {
712
+ const u = T({ dragLeft: 0, thumbAngle: c.angle || 0, isFreeze: !1 });
713
+ Y(() => c, (a, _) => {
714
+ u.isFreeze || (u.thumbAngle = a.angle || 0);
714
715
  }, { deep: !0 });
715
- const e = (l) => {
716
- if (!ae(m.value, l))
716
+ const e = (a) => {
717
+ if (!ie(m.value, a))
717
718
  return;
718
- const b = l.touches && l.touches[0], h = i.value.offsetLeft, S = m.value.offsetWidth, Y = i.value.offsetWidth, w = S - Y, g = 360, f = (g - s.angle) / w;
719
- let E = 0, B = !1, te = null, ne = 0, G = 0;
720
- b ? ne = b.pageX - h : ne = l.clientX - h;
721
- const N = (k) => {
722
- B = !0;
723
- const $ = k.touches && k.touches[0];
724
- let C = 0;
725
- if ($ ? C = $.pageX - ne : C = k.clientX - ne, E = s.angle + C * f, C >= w) {
726
- u.dragLeft = w, u.thumbAngle = G = g;
719
+ const _ = a.touches && a.touches[0], h = o.value.offsetLeft, w = m.value.offsetWidth, y = o.value.offsetWidth, g = w - y, f = 360, L = (f - c.angle) / g;
720
+ let P = 0, q = !1, Z = null, ee = 0, G = 0;
721
+ _ ? ee = _.pageX - h : ee = a.clientX - h;
722
+ const V = ($) => {
723
+ q = !0;
724
+ const S = $.touches && $.touches[0];
725
+ let B = 0;
726
+ if (S ? B = S.pageX - ee : B = $.clientX - ee, P = c.angle + B * L, B >= g) {
727
+ u.dragLeft = g, u.thumbAngle = G = f;
727
728
  return;
728
729
  }
729
- if (C <= 0) {
730
- u.dragLeft = 0, u.thumbAngle = G = s.angle;
730
+ if (B <= 0) {
731
+ u.dragLeft = 0, u.thumbAngle = G = c.angle;
731
732
  return;
732
733
  }
733
- u.dragLeft = C, u.thumbAngle = G = E, t.rotate && t.rotate(E), k.cancelBubble = !0, k.preventDefault();
734
- }, P = (k) => {
735
- ae(m.value, k) && (ce(), B && (B = !1, !(G < 0) && (t.confirm && t.confirm(parseInt(G.toString()), () => {
736
- _();
737
- }), k.cancelBubble = !0, k.preventDefault())));
738
- }, Z = (k) => {
739
- te = k;
740
- }, O = () => {
741
- te = null;
742
- }, R = (k) => {
743
- te && (P(te), ce());
744
- }, U = a.scope, j = U ? r.value : m.value, A = U ? r.value : document.body, ce = () => {
745
- A.removeEventListener("mousemove", N, !1), A.removeEventListener("touchmove", N, { passive: !1 }), j.removeEventListener("mouseup", P, !1), j.removeEventListener("mouseenter", O, !1), j.removeEventListener("mouseleave", Z, !1), j.removeEventListener("touchend", P, !1), A.removeEventListener("mouseleave", P, !1), A.removeEventListener("mouseup", R, !1), u.isFreeze = !1;
734
+ u.dragLeft = B, u.thumbAngle = G = P, t.rotate && t.rotate(P), $.cancelBubble = !0, $.preventDefault();
735
+ }, X = ($) => {
736
+ ie(m.value, $) && (se(), q && (q = !1, !(G < 0) && (t.confirm && t.confirm(parseInt(G.toString()), () => {
737
+ b();
738
+ }), $.cancelBubble = !0, $.preventDefault())));
739
+ }, K = ($) => {
740
+ Z = $;
741
+ }, H = () => {
742
+ Z = null;
743
+ }, R = ($) => {
744
+ Z && (X(Z), se());
745
+ }, N = i.scope, O = N ? r.value : m.value, j = N ? r.value : document.body, se = () => {
746
+ j.removeEventListener("mousemove", V, !1), j.removeEventListener("touchmove", V, { passive: !1 }), O.removeEventListener("mouseup", X, !1), O.removeEventListener("mouseenter", H, !1), O.removeEventListener("mouseleave", K, !1), O.removeEventListener("touchend", X, !1), j.removeEventListener("mouseleave", X, !1), j.removeEventListener("mouseup", R, !1), u.isFreeze = !1;
746
747
  };
747
- u.isFreeze = !0, A.addEventListener("mousemove", N, !1), A.addEventListener("touchmove", N, { passive: !1 }), j.addEventListener("mouseup", P, !1), j.addEventListener("mouseenter", O, !1), j.addEventListener("mouseleave", Z, !1), j.addEventListener("touchend", P, !1), A.addEventListener("mouseleave", P, !1), A.addEventListener("mouseup", R, !1);
748
- }, d = (l) => (p(), l.cancelBubble = !0, l.preventDefault(), !1), y = (l) => (n(), l.cancelBubble = !0, l.preventDefault(), !1), p = () => {
749
- t && t.close && t.close(), _();
750
- }, n = () => {
751
- t && t.refresh && t.refresh(), _();
752
- }, _ = () => {
753
- u.dragLeft = 0, u.thumbAngle = s.angle;
748
+ u.isFreeze = !0, j.addEventListener("mousemove", V, !1), j.addEventListener("touchmove", V, { passive: !1 }), O.addEventListener("mouseup", X, !1), O.addEventListener("mouseenter", H, !1), O.addEventListener("mouseleave", K, !1), O.addEventListener("touchend", X, !1), j.addEventListener("mouseleave", X, !1), j.addEventListener("mouseup", R, !1);
749
+ }, d = (a) => (p(), a.cancelBubble = !0, a.preventDefault(), !1), k = (a) => (s(), a.cancelBubble = !0, a.preventDefault(), !1), p = () => {
750
+ t && t.close && t.close(), b();
751
+ }, s = () => {
752
+ t && t.refresh && t.refresh(), b();
753
+ }, b = () => {
754
+ u.dragLeft = 0, u.thumbAngle = c.angle;
754
755
  };
755
756
  return {
756
757
  state: u,
757
758
  dragEvent: e,
758
759
  closeEvent: d,
759
- refreshEvent: y,
760
- resetData: _,
760
+ refreshEvent: k,
761
+ resetData: b,
761
762
  clearData: () => {
762
- c && c(), _();
763
+ n && n(), b();
763
764
  },
764
- refresh: n,
765
+ refresh: s,
765
766
  close: p
766
767
  };
767
768
  }
768
- const ft = { class: "gc-header" }, vt = { class: "gc-icon-block" }, mt = { class: "gc-loading" }, pt = ["src"], _t = /* @__PURE__ */ o("div", { class: "gc-round" }, null, -1), bt = { class: "gc-thumb gc-rotate-thumb" }, wt = ["src"], Et = { class: "gc-footer" }, xt = /* @__PURE__ */ o("div", { class: "gc-drag-line" }, null, -1), he = /* @__PURE__ */ q({
769
+ const vt = { class: "gc-header" }, mt = { class: "gc-icon-block" }, pt = { class: "gc-loading" }, _t = ["src"], bt = /* @__PURE__ */ l("div", { class: "gc-round" }, null, -1), wt = { class: "gc-thumb gc-rotate-thumb" }, Et = ["src"], xt = { class: "gc-footer" }, Lt = /* @__PURE__ */ l("div", { class: "gc-drag-line" }, null, -1), de = /* @__PURE__ */ U({
769
770
  __name: "index",
770
771
  props: {
771
- config: { default: pe },
772
+ config: { default: _e },
772
773
  events: { default: () => ({}) },
773
- data: { default: () => ({}) }
774
+ data: { default: ze }
774
775
  },
775
- setup(s, { expose: t }) {
776
- const a = s, { data: r, events: i, config: m } = a, c = T({ ...ht(), ...V(r) }), u = T({ ...V(i) }), e = T({ ...pe(), ...V(m) });
777
- F(() => a.data, (g, f) => {
778
- Object.assign(c, g);
779
- }, { deep: !0 }), F(() => a.events, (g, f) => {
776
+ setup(c, { expose: t }) {
777
+ const i = c, { data: r, events: o, config: m } = i, n = T({ ...ze(), ...I(r) }), u = T({ ...I(o) }), e = T({ ..._e(), ...I(m) });
778
+ Y(() => i.data, (g, f) => {
779
+ Object.assign(n, g);
780
+ }, { deep: !0 }), Y(() => i.events, (g, f) => {
780
781
  Object.assign(u, g);
781
- }, { deep: !0 }), F(() => a.config, (g, f) => {
782
+ }, { deep: !0 }), Y(() => i.config, (g, f) => {
782
783
  Object.assign(e, g);
783
784
  }, { deep: !0 });
784
- const d = ee(null), y = ee(null), p = ee(null), n = gt(
785
- c,
785
+ const d = Q(null), k = Q(null), p = Q(null), s = ft(
786
+ n,
786
787
  u,
787
788
  e,
788
789
  d,
789
790
  p,
790
- y,
791
+ k,
791
792
  () => {
792
- c.thumb = "", c.image = "", c.angle = 0;
793
+ n.thumb = "", n.image = "", n.angle = 0;
793
794
  }
794
- ), _ = L(() => {
795
+ ), b = z(() => {
795
796
  const g = e.horizontalPadding || 0, f = e.verticalPadding || 0;
796
797
  return {
797
798
  width: (e.width || 0) + g * 2 + (e.showTheme ? 2 : 0) + "px",
@@ -800,278 +801,283 @@ const ft = { class: "gc-header" }, vt = { class: "gc-icon-block" }, mt = { class
800
801
  paddingTop: f + "px",
801
802
  paddingBottom: f + "px"
802
803
  };
803
- }), x = L(() => ({
804
- transform: `rotate(${n.state.thumbAngle}deg)`
805
- })), l = L(() => ({
804
+ }), x = z(() => ({
805
+ transform: `rotate(${s.state.thumbAngle}deg)`,
806
+ ...n.thumbSize > 0 ? {
807
+ width: n.thumbSize + "px",
808
+ height: n.thumbSize + "px"
809
+ } : {}
810
+ })), a = z(() => ({
806
811
  width: e.width + "px",
807
812
  height: e.height + "px"
808
- })), b = L(() => {
809
- const g = (e.size || 0) > 0 ? e.size : pe().size;
813
+ })), _ = z(() => {
814
+ const g = (e.size || 0) > 0 ? e.size : _e().size;
810
815
  return {
811
816
  width: g + "px",
812
817
  height: g + "px"
813
818
  };
814
- }), h = L(() => c.image != ""), S = L(() => c.thumb != ""), Y = L(() => (e.width || 0) > 0 || (e.height || 0) > 0), w = (g) => g.preventDefault();
815
- return _e(async () => {
816
- await be(), p.value && p.value.addEventListener("dragstart", w);
817
- }), we(() => {
818
- p.value && p.value.removeEventListener("dragstart", w);
819
+ }), h = z(() => n.image && n.image.length > 0), w = z(() => (e.width || 0) > 0 || (e.height || 0) > 0), y = (g) => g.preventDefault();
820
+ return be(async () => {
821
+ await we(), p.value && p.value.addEventListener("dragstart", y);
822
+ }), Ee(() => {
823
+ p.value && p.value.removeEventListener("dragstart", y);
819
824
  }), t({
820
- reset: n.resetData,
821
- clear: n.clearData,
822
- refresh: n.refresh,
823
- close: n.close
824
- }), (g, f) => K((z(), H("div", {
825
- class: se(`go-captcha gc-wrapper ${e.showTheme && "gc-theme"}`),
826
- style: D(_.value),
825
+ reset: s.resetData,
826
+ clear: s.clearData,
827
+ refresh: s.refresh,
828
+ close: s.close
829
+ }), (g, f) => ge((E(), D("div", {
830
+ class: te(`go-captcha gc-wrapper ${e.showTheme && "gc-theme"}`),
831
+ style: C(b.value),
827
832
  ref_key: "rootRef",
828
833
  ref: d
829
834
  }, [
830
- o("div", ft, [
831
- o("span", null, ie(e.title), 1),
832
- o("div", vt, [
833
- I(fe, {
835
+ l("div", vt, [
836
+ l("span", null, oe(e.title), 1),
837
+ l("div", mt, [
838
+ A(ve, {
834
839
  width: e.iconSize,
835
840
  height: e.iconSize,
836
- onClick: v(n).closeEvent
841
+ onClick: v(s).closeEvent
837
842
  }, null, 8, ["width", "height", "onClick"]),
838
- I(ve, {
843
+ A(me, {
839
844
  width: e.iconSize,
840
845
  height: e.iconSize,
841
- onClick: v(n).refreshEvent
846
+ onClick: v(s).refreshEvent
842
847
  }, null, 8, ["width", "height", "onClick"])
843
848
  ])
844
849
  ]),
845
- o("div", {
850
+ l("div", {
846
851
  class: "gc-body gc-rotate-body",
847
852
  ref: "containerRef",
848
- style: D(l.value)
853
+ style: C(a.value)
849
854
  }, [
850
- o("div", {
855
+ l("div", {
851
856
  class: "gc-body-inner",
852
- style: D(b.value)
857
+ style: C(_.value)
853
858
  }, [
854
- o("div", mt, [
855
- I(me)
859
+ l("div", pt, [
860
+ A(pe)
856
861
  ]),
857
- o("div", {
862
+ l("div", {
858
863
  class: "gc-picture gc-rotate-picture",
859
- style: D(b.value)
864
+ style: C(_.value)
860
865
  }, [
861
- K(o("img", {
862
- src: c.image,
866
+ n.image ? (E(), D("img", {
867
+ key: 0,
868
+ src: n.image,
863
869
  alt: ""
864
- }, null, 8, pt), [
865
- [Q, h.value]
866
- ]),
867
- _t
870
+ }, null, 8, _t)) : ne("", !0),
871
+ bt
868
872
  ], 4),
869
- o("div", bt, [
870
- o("div", {
873
+ l("div", wt, [
874
+ l("div", {
871
875
  class: "gc-rotate-thumb-block",
872
- style: D(x.value)
876
+ style: C(x.value)
873
877
  }, [
874
- K(o("img", {
875
- src: c.thumb,
878
+ n.thumb ? (E(), D("img", {
879
+ key: 0,
880
+ src: n.thumb,
876
881
  alt: ""
877
- }, null, 8, wt), [
878
- [Q, S.value]
879
- ])
882
+ }, null, 8, Et)) : ne("", !0)
880
883
  ], 4)
881
884
  ])
882
885
  ], 4)
883
886
  ], 4),
884
- o("div", Et, [
885
- o("div", {
887
+ l("div", xt, [
888
+ l("div", {
886
889
  class: "gc-drag-slide-bar",
887
890
  ref_key: "dragBarRef",
888
- ref: y
891
+ ref: k
889
892
  }, [
890
- xt,
891
- o("div", {
892
- class: se(["gc-drag-block", !h.value && "disabled"]),
893
+ Lt,
894
+ l("div", {
895
+ class: te(["gc-drag-block", !h.value && "disabled"]),
893
896
  ref_key: "dragBlockRef",
894
897
  ref: p,
895
898
  onMousedown: f[1] || (f[1] = //@ts-ignore
896
- (...E) => v(n).dragEvent && v(n).dragEvent(...E)),
897
- style: D({ left: v(n).state.dragLeft + "px" })
899
+ (...L) => v(s).dragEvent && v(s).dragEvent(...L)),
900
+ style: C({ left: v(s).state.dragLeft + "px" })
898
901
  }, [
899
- o("div", {
902
+ l("div", {
900
903
  class: "gc-drag-block-inline",
901
- onTouchstart: f[0] || (f[0] = //@ts-ignore
902
- (...E) => v(n).dragEvent && v(n).dragEvent(...E))
904
+ onTouchstart: f[0] || (f[0] = xe(
905
+ //@ts-ignore
906
+ (...L) => v(s).dragEvent && v(s).dragEvent(...L),
907
+ ["prevent"]
908
+ ))
903
909
  }, [
904
- I(ke)
910
+ A(Se)
905
911
  ], 32)
906
912
  ], 38)
907
913
  ], 512)
908
914
  ])
909
915
  ], 6)), [
910
- [Q, Y.value]
916
+ [fe, w.value]
911
917
  ]);
912
918
  }
913
919
  });
914
- he.name = "gocaptcha-rotate";
915
- he.install = function(s) {
916
- s.component("gocaptcha-rotate", he);
920
+ de.name = "gocaptcha-rotate";
921
+ de.install = function(c) {
922
+ c.component("gocaptcha-rotate", de);
917
923
  };
918
- const Lt = /* @__PURE__ */ o("circle", {
924
+ const kt = /* @__PURE__ */ l("circle", {
919
925
  fill: "#3E7CFF",
920
926
  cx: "100",
921
927
  cy: "100",
922
928
  r: "96.3"
923
- }, null, -1), yt = /* @__PURE__ */ o("path", {
929
+ }, null, -1), yt = /* @__PURE__ */ l("path", {
924
930
  fill: "#FFFFFF",
925
931
  d: `M140.8,64.4l-39.6-11.9h-2.4L59.2,64.4c-1.6,0.8-2.8,2.4-2.8,4v24.1c0,25.3,15.8,45.9,42.3,54.6
926
932
  c0.4,0,0.8,0.4,1.2,0.4c0.4,0,0.8,0,1.2-0.4c26.5-8.7,42.3-28.9,42.3-54.6V68.3C143.5,66.8,142.3,65.2,140.8,64.4z`
927
- }, null, -1), kt = [
928
- Lt,
933
+ }, null, -1), $t = [
934
+ kt,
929
935
  yt
930
- ], Dt = /* @__PURE__ */ q({
936
+ ], Dt = /* @__PURE__ */ U({
931
937
  __name: "btn-default-icon",
932
938
  emits: ["click"],
933
- setup(s, { emit: t }) {
934
- const a = t;
935
- function r(i) {
936
- a("click", i);
939
+ setup(c, { emit: t }) {
940
+ const i = t;
941
+ function r(o) {
942
+ i("click", o);
937
943
  }
938
- return (i, m) => (z(), H("svg", oe({
944
+ return (o, m) => (E(), D("svg", ce({
939
945
  xmlns: "http://www.w3.org/2000/svg",
940
946
  viewBox: "0 0 200 200",
941
947
  width: "20",
942
948
  height: "20"
943
- }, i.$attrs, { onClick: r }), kt, 16));
949
+ }, o.$attrs, { onClick: r }), $t, 16));
944
950
  }
945
- }), $t = /* @__PURE__ */ o("path", {
951
+ }), zt = /* @__PURE__ */ l("path", {
946
952
  fill: "#FFA000",
947
953
  d: `M184,26.6L102.4,2.1h-4.9L16,26.6c-3.3,1.6-5.7,4.9-5.7,8.2v49.8c0,52.2,32.6,94.7,87.3,112.6
948
954
  c0.8,0,1.6,0.8,2.4,0.8s1.6,0,2.4-0.8c54.7-18,87.3-59.6,87.3-112.6V34.7C189.8,31.5,187.3,28.2,184,26.6z M107.3,109.1
949
955
  c-0.5,5.4-3.9,7.9-7.3,7.9c-2.5,0,0,0,0,0c-3.2-0.6-5.7-2-6.8-7.4l-4.4-50.9c0-5.1,6.2-9.7,11.5-9.7c5.3,0,11,4.7,11,9.9
950
956
  L107.3,109.1z M109.3,133.3c0,5.1-4.2,9.3-9.3,9.3c-5.1,0-9.3-4.2-9.3-9.3c0-5.1,4.2-9.3,9.3-9.3C105.1,124,109.3,128.1,109.3,133.3
951
957
  z`
952
- }, null, -1), zt = [
953
- $t
954
- ], Ct = /* @__PURE__ */ q({
958
+ }, null, -1), Ct = [
959
+ zt
960
+ ], St = /* @__PURE__ */ U({
955
961
  __name: "btn-warn-icon",
956
962
  emits: ["click"],
957
- setup(s, { emit: t }) {
958
- const a = t;
959
- function r(i) {
960
- a("click", i);
963
+ setup(c, { emit: t }) {
964
+ const i = t;
965
+ function r(o) {
966
+ i("click", o);
961
967
  }
962
- return (i, m) => (z(), H("svg", oe({
968
+ return (o, m) => (E(), D("svg", ce({
963
969
  xmlns: "http://www.w3.org/2000/svg",
964
970
  viewBox: "0 0 200 200",
965
971
  width: "20",
966
972
  height: "20"
967
- }, i.$attrs, { onClick: r }), zt, 16));
973
+ }, o.$attrs, { onClick: r }), Ct, 16));
968
974
  }
969
- }), St = /* @__PURE__ */ o("path", {
975
+ }), Bt = /* @__PURE__ */ l("path", {
970
976
  fill: "#ED4630",
971
977
  d: `M184,26.6L102.4,2.1h-4.9L16,26.6c-3.3,1.6-5.7,4.9-5.7,8.2v49.8c0,52.2,32.6,94.7,87.3,112.6
972
978
  c0.8,0,1.6,0.8,2.4,0.8s1.6,0,2.4-0.8c54.7-18,87.3-59.6,87.3-112.6V34.7C189.8,31.5,187.3,28.2,184,26.6z M134.5,123.1
973
979
  c3.1,3.1,3.1,8.2,0,11.3c-1.6,1.6-3.6,2.3-5.7,2.3s-4.1-0.8-5.7-2.3L100,111.3l-23.1,23.1c-1.6,1.6-3.6,2.3-5.7,2.3
974
980
  c-2,0-4.1-0.8-5.7-2.3c-3.1-3.1-3.1-8.2,0-11.3L88.7,100L65.5,76.9c-3.1-3.1-3.1-8.2,0-11.3c3.1-3.1,8.2-3.1,11.3,0L100,88.7
975
981
  l23.1-23.1c3.1-3.1,8.2-3.1,11.3,0c3.1,3.1,3.1,8.2,0,11.3L111.3,100L134.5,123.1z`
976
- }, null, -1), Bt = [
977
- St
978
- ], Tt = /* @__PURE__ */ q({
982
+ }, null, -1), Tt = [
983
+ Bt
984
+ ], Pt = /* @__PURE__ */ U({
979
985
  __name: "btn-error-icon",
980
986
  emits: ["click"],
981
- setup(s, { emit: t }) {
982
- const a = t;
983
- function r(i) {
984
- a("click", i);
987
+ setup(c, { emit: t }) {
988
+ const i = t;
989
+ function r(o) {
990
+ i("click", o);
985
991
  }
986
- return (i, m) => (z(), H("svg", oe({
992
+ return (o, m) => (E(), D("svg", ce({
987
993
  xmlns: "http://www.w3.org/2000/svg",
988
994
  viewBox: "0 0 200 200",
989
995
  width: "20",
990
996
  height: "20"
991
- }, i.$attrs, { onClick: r }), Bt, 16));
997
+ }, o.$attrs, { onClick: r }), Tt, 16));
992
998
  }
993
- }), Pt = /* @__PURE__ */ o("path", {
999
+ }), Xt = /* @__PURE__ */ l("path", {
994
1000
  fill: "#5EAA2F",
995
1001
  d: `M183.3,27.2L102.4,2.9h-4.9L16.7,27.2C13.4,28.8,11,32,11,35.3v49.4c0,51.8,32.4,93.9,86.6,111.7
996
1002
  c0.8,0,1.6,0.8,2.4,0.8c0.8,0,1.6,0,2.4-0.8c54.2-17.8,86.6-59.1,86.6-111.7V35.3C189,32,186.6,28.8,183.3,27.2z M146.1,81.4
997
1003
  l-48.5,48.5c-1.6,1.6-3.2,2.4-5.7,2.4c-2.4,0-4-0.8-5.7-2.4L62,105.7c-3.2-3.2-3.2-8.1,0-11.3c3.2-3.2,8.1-3.2,11.3,0l18.6,18.6
998
1004
  l42.9-42.9c3.2-3.2,8.1-3.2,11.3,0C149.4,73.3,149.4,78.2,146.1,81.4L146.1,81.4z`
999
- }, null, -1), Xt = [
1000
- Pt
1001
- ], Wt = /* @__PURE__ */ q({
1005
+ }, null, -1), Wt = [
1006
+ Xt
1007
+ ], Mt = /* @__PURE__ */ U({
1002
1008
  __name: "btn-success-icon",
1003
1009
  emits: ["click"],
1004
- setup(s, { emit: t }) {
1005
- const a = t;
1006
- function r(i) {
1007
- a("click", i);
1010
+ setup(c, { emit: t }) {
1011
+ const i = t;
1012
+ function r(o) {
1013
+ i("click", o);
1008
1014
  }
1009
- return (i, m) => (z(), H("svg", oe({
1015
+ return (o, m) => (E(), D("svg", ce({
1010
1016
  xmlns: "http://www.w3.org/2000/svg",
1011
1017
  viewBox: "0 0 200 200",
1012
1018
  width: "20",
1013
1019
  height: "20"
1014
- }, i.$attrs, { onClick: r }), Xt, 16));
1020
+ }, o.$attrs, { onClick: r }), Wt, 16));
1015
1021
  }
1016
- }), ye = () => ({
1022
+ }), Ce = () => ({
1017
1023
  width: 330,
1018
1024
  height: 44,
1019
1025
  verticalPadding: 12,
1020
1026
  horizontalPadding: 16
1021
- }), ge = /* @__PURE__ */ q({
1027
+ }), he = /* @__PURE__ */ U({
1022
1028
  __name: "index",
1023
1029
  props: {
1024
- config: { default: ye },
1030
+ config: { default: Ce },
1025
1031
  clickEvent: {},
1026
1032
  disabled: { type: Boolean, default: !1 },
1027
1033
  type: { default: "default" },
1028
1034
  title: { default: "点击按键进行验证" }
1029
1035
  },
1030
1036
  emits: ["click-event"],
1031
- setup(s, { emit: t }) {
1032
- const a = s, { type: r, title: i, disabled: m, config: c } = Ce(a), u = T({ ...ye(), ...V(c) });
1033
- F(() => a.config, (n, _) => {
1034
- Object.assign(u, n);
1037
+ setup(c, { emit: t }) {
1038
+ const i = c, { type: r, title: o, disabled: m, config: n } = Xe(i), u = T({ ...Ce(), ...I(n) });
1039
+ Y(() => i.config, (s, b) => {
1040
+ Object.assign(u, s);
1035
1041
  }, { deep: !0 });
1036
- const e = L(() => ["go-captcha", "gc-btn-block", `gc-${r.value}`, m.value ? "gc-disabled" : ""]), d = L(() => ({
1042
+ const e = z(() => ["go-captcha", "gc-btn-block", `gc-${r.value}`, m.value ? "gc-disabled" : ""]), d = z(() => ({
1037
1043
  width: u.width + "px",
1038
1044
  height: u.height + "px",
1039
1045
  paddingLeft: u.horizontalPadding + "px",
1040
1046
  paddingRight: u.horizontalPadding + "px",
1041
1047
  paddingTop: u.verticalPadding + "px",
1042
1048
  paddingBottom: u.verticalPadding + "px"
1043
- })), y = t;
1044
- function p(n) {
1045
- y("click-event", n);
1049
+ })), k = t;
1050
+ function p(s) {
1051
+ k("click-event", s);
1046
1052
  }
1047
- return (n, _) => (z(), H("div", {
1048
- class: se(e.value),
1049
- style: D(d.value),
1053
+ return (s, b) => (E(), D("div", {
1054
+ class: te(e.value),
1055
+ style: C(d.value),
1050
1056
  onClick: p
1051
1057
  }, [
1052
- o("div", {
1053
- class: se(v(r) === "default" ? "gc-ripple" : "")
1058
+ l("div", {
1059
+ class: te(v(r) === "default" ? "gc-ripple" : "")
1054
1060
  }, [
1055
- v(r) === "default" ? (z(), le(Dt, { key: 0 })) : v(r) === "warn" ? (z(), le(Ct, { key: 1 })) : v(r) === "error" ? (z(), le(Tt, { key: 2 })) : v(r) === "success" ? (z(), le(Wt, { key: 3 })) : Se("", !0)
1061
+ v(r) === "default" ? (E(), le(Dt, { key: 0 })) : v(r) === "warn" ? (E(), le(St, { key: 1 })) : v(r) === "error" ? (E(), le(Pt, { key: 2 })) : v(r) === "success" ? (E(), le(Mt, { key: 3 })) : ne("", !0)
1056
1062
  ], 2),
1057
- o("span", null, ie(v(i)), 1)
1063
+ l("span", null, oe(v(o)), 1)
1058
1064
  ], 6));
1059
1065
  }
1060
1066
  });
1061
- ge.name = "gocaptcha-button";
1062
- ge.install = function(s) {
1063
- s.component("gocaptcha-button", ge);
1067
+ he.name = "gocaptcha-button";
1068
+ he.install = function(c) {
1069
+ c.component("gocaptcha-button", he);
1064
1070
  };
1065
- const Ft = {
1066
- install(s) {
1067
- re.install(s), ue.install(s), de.install(s), he.install(s), ge.install(s);
1071
+ const Yt = {
1072
+ install(c) {
1073
+ ae.install(c), re.install(c), ue.install(c), de.install(c), he.install(c);
1068
1074
  }
1069
1075
  };
1070
1076
  export {
1071
- ge as Button,
1072
- re as Click,
1073
- he as Rotate,
1074
- ue as Slide,
1075
- de as SlideRegion,
1076
- Ft as default
1077
+ he as Button,
1078
+ ae as Click,
1079
+ de as Rotate,
1080
+ re as Slide,
1081
+ ue as SlideRegion,
1082
+ Yt as default
1077
1083
  };