go-captcha-vue 2.0.0 → 2.0.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.
@@ -1,5 +1,5 @@
1
- import { defineComponent as M, openBlock as b, createElementBlock as C, mergeProps as A, createElementVNode as c, reactive as U, toRaw as rt, ref as D, watch as j, computed as z, normalizeClass as I, normalizeStyle as m, toDisplayString as V, withDirectives as H, unref as i, vShow as F, createVNode as P, Fragment as dt, renderList as ht, onMounted as nt, nextTick as ct, toRefs as vt, createBlock as q, createCommentVNode as gt } from "vue";
2
- const lt = () => ({
1
+ import { defineComponent as M, openBlock as b, createElementBlock as C, mergeProps as A, createElementVNode as c, reactive as U, toRaw as re, ref as D, watch as j, computed as z, normalizeClass as I, normalizeStyle as m, toDisplayString as V, withDirectives as H, unref as i, vShow as F, createVNode as P, Fragment as de, renderList as he, onMounted as ne, nextTick as ce, toRefs as ve, createBlock as q, createCommentVNode as ge } from "vue";
2
+ const le = () => ({
3
3
  width: 300,
4
4
  height: 220,
5
5
  thumbWidth: 150,
@@ -9,31 +9,31 @@ const lt = () => ({
9
9
  showTheme: !0,
10
10
  title: "请在下图依次点击",
11
11
  buttonText: "确认"
12
- }), ft = /* @__PURE__ */ c("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
12
+ }), fe = /* @__PURE__ */ c("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
13
13
  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
14
14
  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
15
15
  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
16
16
  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
17
17
  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
18
18
  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
19
- 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), pt = [
20
- ft
19
+ 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), pe = [
20
+ fe
21
21
  ], Z = /* @__PURE__ */ M({
22
22
  __name: "close-icon",
23
23
  emits: ["click"],
24
- setup(s, { emit: n }) {
25
- const e = n;
26
- function l(t) {
27
- e("click", t);
24
+ setup(l, { emit: t }) {
25
+ const n = t;
26
+ function s(e) {
27
+ n("click", e);
28
28
  }
29
- return (t, a) => (b(), C("svg", A({
29
+ return (e, a) => (b(), C("svg", A({
30
30
  xmlns: "http://www.w3.org/2000/svg",
31
31
  viewBox: "0 0 200 200",
32
32
  width: "20",
33
33
  height: "20"
34
- }, t.$attrs, { onClick: l }), pt, 16));
34
+ }, e.$attrs, { onClick: s }), pe, 16));
35
35
  }
36
- }), mt = /* @__PURE__ */ c("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
36
+ }), me = /* @__PURE__ */ c("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
37
37
  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
38
38
  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
39
39
  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
@@ -50,24 +50,24 @@ const lt = () => ({
50
50
  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
51
51
  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
52
52
  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
53
- L180.6,98.9z` }, null, -1), _t = [
54
- mt
53
+ L180.6,98.9z` }, null, -1), _e = [
54
+ me
55
55
  ], R = /* @__PURE__ */ M({
56
56
  __name: "refresh-icon",
57
57
  emits: ["click"],
58
- setup(s, { emit: n }) {
59
- const e = n;
60
- function l(t) {
61
- e("click", t);
58
+ setup(l, { emit: t }) {
59
+ const n = t;
60
+ function s(e) {
61
+ n("click", e);
62
62
  }
63
- return (t, a) => (b(), C("svg", A({
63
+ return (e, a) => (b(), C("svg", A({
64
64
  xmlns: "http://www.w3.org/2000/svg",
65
65
  viewBox: "0 0 200 200",
66
66
  width: "20",
67
67
  height: "20"
68
- }, t.$attrs, { onClick: l }), _t, 16));
68
+ }, e.$attrs, { onClick: s }), _e, 16));
69
69
  }
70
- }), wt = /* @__PURE__ */ c("circle", {
70
+ }), we = /* @__PURE__ */ c("circle", {
71
71
  cx: "50",
72
72
  cy: "36.8101",
73
73
  r: "10"
@@ -81,127 +81,127 @@ const lt = () => ({
81
81
  keyTimes: "0;0.5;1",
82
82
  values: "23;77;23"
83
83
  })
84
- ], -1), bt = [
85
- wt
86
- ], tt = /* @__PURE__ */ M({
84
+ ], -1), be = [
85
+ we
86
+ ], ee = /* @__PURE__ */ M({
87
87
  __name: "loading-icon",
88
88
  emits: ["click"],
89
- setup(s, { emit: n }) {
90
- const e = n;
91
- function l(t) {
92
- e("click", t);
89
+ setup(l, { emit: t }) {
90
+ const n = t;
91
+ function s(e) {
92
+ n("click", e);
93
93
  }
94
- return (t, a) => (b(), C("svg", A({
94
+ return (e, a) => (b(), C("svg", A({
95
95
  xmlns: "http://www.w3.org/2000/svg",
96
96
  viewBox: "0 0 100 100",
97
97
  preserveAspectRatio: "xMidYMid",
98
98
  width: "84",
99
99
  height: "84"
100
- }, t.$attrs, { onClick: l }), bt, 16));
100
+ }, e.$attrs, { onClick: s }), be, 16));
101
101
  }
102
102
  });
103
- function xt(s) {
104
- let n = 0, e = 0;
105
- if (s.getBoundingClientRect) {
106
- const l = s.getBoundingClientRect(), t = document.documentElement;
107
- n = l.left + Math.max(t.scrollLeft, document.body.scrollLeft) - t.clientLeft, e = l.top + Math.max(t.scrollTop, document.body.scrollTop) - t.clientTop;
103
+ function xe(l) {
104
+ let t = 0, n = 0;
105
+ if (l.getBoundingClientRect) {
106
+ const s = l.getBoundingClientRect(), e = document.documentElement;
107
+ t = s.left + Math.max(e.scrollLeft, document.body.scrollLeft) - e.clientLeft, n = s.top + Math.max(e.scrollTop, document.body.scrollTop) - e.clientTop;
108
108
  } else
109
- for (; s !== document.body; )
110
- n += s.offsetLeft, e += s.offsetTop, s = s.offsetParent;
109
+ for (; l !== document.body; )
110
+ t += l.offsetLeft, n += l.offsetTop, l = l.offsetParent;
111
111
  return {
112
- domX: n,
113
- domY: e
112
+ domX: t,
113
+ domY: n
114
114
  };
115
115
  }
116
- function st(s, n) {
117
- let e = n.relatedTarget;
116
+ function se(l, t) {
117
+ let n = t.relatedTarget;
118
118
  try {
119
- for (; e && e !== s; )
120
- e = e.parentNode;
121
- } catch (l) {
122
- console.warn(l);
119
+ for (; n && n !== l; )
120
+ n = n.parentNode;
121
+ } catch (s) {
122
+ console.warn(s);
123
123
  }
124
- return e !== s;
124
+ return n !== l;
125
125
  }
126
- function Et(s, n) {
127
- const e = U({ list: [] });
126
+ function Ee(l, t) {
127
+ const n = U({ list: [] });
128
128
  return {
129
- dots: e,
129
+ dots: n,
130
130
  clickEvent: (o) => {
131
- const E = o.currentTarget, u = xt(E), g = o.pageX || o.clientX, r = o.pageY || o.clientY, h = u.domX, _ = u.domY, w = g - h, v = r - _, f = parseInt(w.toString()), k = parseInt(v.toString()), $ = /* @__PURE__ */ new Date(), S = e.list.length, y = e.list;
132
- return y.push({ key: $.getTime(), index: S + 1, x: f, y: k }), e.list = y, n.click && n.click(f, k), o.cancelBubble = !0, o.preventDefault(), !1;
131
+ const E = o.currentTarget, u = xe(E), g = o.pageX || o.clientX, r = o.pageY || o.clientY, h = u.domX, _ = u.domY, w = g - h, v = r - _, f = parseInt(w.toString()), k = parseInt(v.toString()), $ = /* @__PURE__ */ new Date(), S = n.list.length, y = n.list;
132
+ return y.push({ key: $.getTime(), index: S + 1, x: f, y: k }), n.list = y, t.click && t.click(f, k), o.cancelBubble = !0, o.preventDefault(), !1;
133
133
  },
134
- confirmEvent: (o) => (n.confirm && n.confirm(rt(e.list), () => {
135
- e.list = [];
134
+ confirmEvent: (o) => (t.confirm && t.confirm(re(n.list), () => {
135
+ n.list = [];
136
136
  }), o.cancelBubble = !0, o.preventDefault(), !1),
137
- closeEvent: (o) => (n.close && n.close(), e.list = [], o.cancelBubble = !0, o.preventDefault(), !1),
138
- refreshEvent: (o) => (n.refresh && n.refresh(), e.list = [], o.cancelBubble = !0, o.preventDefault(), !1)
137
+ closeEvent: (o) => (t.close && t.close(), n.list = [], o.cancelBubble = !0, o.preventDefault(), !1),
138
+ refreshEvent: (o) => (t.refresh && t.refresh(), n.list = [], o.cancelBubble = !0, o.preventDefault(), !1)
139
139
  };
140
140
  }
141
- const kt = { class: "gc-header" }, yt = ["src"], Lt = { class: "gc-loading" }, $t = ["src"], Ct = { class: "gc-dots" }, Tt = { class: "gc-footer" }, Pt = { class: "gc-icon-block gc-icon-block2" }, zt = { class: "gc-button-block" }, G = /* @__PURE__ */ M({
141
+ const ke = { class: "gc-header" }, ye = ["src"], Le = { class: "gc-loading" }, $e = ["src"], Ce = { class: "gc-dots" }, Te = { class: "gc-footer" }, Pe = { class: "gc-icon-block gc-icon-block2" }, ze = { class: "gc-button-block" }, G = /* @__PURE__ */ M({
142
142
  __name: "index",
143
143
  props: {
144
- config: { default: lt },
144
+ config: { default: le },
145
145
  events: { default: () => ({}) },
146
146
  data: { default: () => ({}) }
147
147
  },
148
- setup(s) {
149
- const n = s, { data: e, events: l } = n, t = D({
150
- ...lt(),
151
- ...n.config
148
+ setup(l) {
149
+ const t = l, { data: n, events: s } = t, e = D({
150
+ ...le(),
151
+ ...t.config
152
152
  });
153
- j(() => n.config, () => {
154
- t.value = {
155
- ...t.value,
156
- ...n.config
153
+ j(() => t.config, () => {
154
+ e.value = {
155
+ ...e.value,
156
+ ...t.config
157
157
  };
158
158
  });
159
- const a = Et(e, l), d = t.value.horizontalPadding || 0, o = t.value.verticalPadding || 0, E = (t.value.width || 0) + d * 2 + (t.value.showTheme ? 2 : 0), u = a.dots, g = z(() => ({
159
+ const a = Ee(n, s), d = e.value.horizontalPadding || 0, o = e.value.verticalPadding || 0, E = (e.value.width || 0) + d * 2 + (e.value.showTheme ? 2 : 0), u = a.dots, g = z(() => ({
160
160
  width: E + "px",
161
161
  paddingLeft: d + "px",
162
162
  paddingRight: d + "px",
163
163
  paddingTop: o + "px",
164
164
  paddingBottom: o + "px"
165
165
  })), r = z(() => ({
166
- width: t.value.thumbWidth + "px",
167
- height: t.value.thumbHeight + "px"
166
+ width: e.value.thumbWidth + "px",
167
+ height: e.value.thumbHeight + "px"
168
168
  })), h = z(() => ({
169
- width: t.value.width + "px",
170
- height: t.value.height + "px"
169
+ width: e.value.width + "px",
170
+ height: e.value.height + "px"
171
171
  }));
172
172
  return (_, w) => (b(), C("div", {
173
- class: I(`go-captcha gc-wrapper ${t.value.showTheme ? "gc-theme" : ""}`),
173
+ class: I(`go-captcha gc-wrapper ${e.value.showTheme ? "gc-theme" : ""}`),
174
174
  style: m(g.value)
175
175
  }, [
176
- c("div", kt, [
177
- c("span", null, V(t.value.title), 1),
176
+ c("div", ke, [
177
+ c("span", null, V(e.value.title), 1),
178
178
  H(c("img", {
179
179
  style: m(r.value),
180
- src: i(e).thumb,
180
+ src: i(n).thumb,
181
181
  alt: "..."
182
- }, null, 12, yt), [
183
- [F, i(e).thumb !== ""]
182
+ }, null, 12, ye), [
183
+ [F, i(n).thumb !== ""]
184
184
  ])
185
185
  ]),
186
186
  c("div", {
187
187
  class: "gc-body",
188
188
  style: m(h.value)
189
189
  }, [
190
- c("div", Lt, [
191
- P(tt)
190
+ c("div", Le, [
191
+ P(ee)
192
192
  ]),
193
193
  H(c("img", {
194
194
  style: m(h.value),
195
195
  class: "gc-picture",
196
- src: i(e).image,
196
+ src: i(n).image,
197
197
  alt: "...",
198
198
  onClick: w[0] || (w[0] = //@ts-ignore
199
199
  (...v) => i(a).clickEvent && i(a).clickEvent(...v))
200
- }, null, 12, $t), [
201
- [F, i(e).image !== ""]
200
+ }, null, 12, $e), [
201
+ [F, i(n).image !== ""]
202
202
  ]),
203
- c("div", Ct, [
204
- (b(!0), C(dt, null, ht(i(u).list, (v) => (b(), C("div", {
203
+ c("div", Ce, [
204
+ (b(!0), C(de, null, he(i(u).list, (v) => (b(), C("div", {
205
205
  class: "gc-dot",
206
206
  key: `${v.key + "-" + v.index}`,
207
207
  style: m({
@@ -211,8 +211,8 @@ const kt = { class: "gc-header" }, yt = ["src"], Lt = { class: "gc-loading" }, $
211
211
  }, V(v.index), 5))), 128))
212
212
  ])
213
213
  ], 4),
214
- c("div", Tt, [
215
- c("div", Pt, [
214
+ c("div", Te, [
215
+ c("div", Pe, [
216
216
  P(Z, {
217
217
  width: 22,
218
218
  height: 22,
@@ -224,21 +224,21 @@ const kt = { class: "gc-header" }, yt = ["src"], Lt = { class: "gc-loading" }, $
224
224
  onClick: i(a).refreshEvent
225
225
  }, null, 8, ["onClick"])
226
226
  ]),
227
- c("div", zt, [
227
+ c("div", ze, [
228
228
  c("button", {
229
229
  onClick: w[1] || (w[1] = //@ts-ignore
230
230
  (...v) => i(a).confirmEvent && i(a).confirmEvent(...v))
231
- }, V(t.value.buttonText), 1)
231
+ }, V(e.value.buttonText), 1)
232
232
  ])
233
233
  ])
234
234
  ], 6));
235
235
  }
236
236
  });
237
- G.name = "goCaptchaClick";
238
- G.install = function(s) {
239
- s.component("gocaptcha-click", G);
237
+ G.name = "gocaptcha-click";
238
+ G.install = function(l) {
239
+ l.component("gocaptcha-click", G);
240
240
  };
241
- const ot = () => ({
241
+ const oe = () => ({
242
242
  width: 300,
243
243
  height: 220,
244
244
  thumbWidth: 150,
@@ -247,34 +247,34 @@ const ot = () => ({
247
247
  horizontalPadding: 12,
248
248
  showTheme: !0,
249
249
  title: "请拖动滑块完成拼图"
250
- }), Xt = /* @__PURE__ */ c("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
250
+ }), Xe = /* @__PURE__ */ c("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
251
251
  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
252
- 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), Dt = [
253
- Xt
254
- ], ut = /* @__PURE__ */ M({
252
+ 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), De = [
253
+ Xe
254
+ ], ue = /* @__PURE__ */ M({
255
255
  __name: "arrows-icon",
256
256
  emits: ["click"],
257
- setup(s, { emit: n }) {
258
- const e = n;
259
- function l(t) {
260
- e("click", t);
257
+ setup(l, { emit: t }) {
258
+ const n = t;
259
+ function s(e) {
260
+ n("click", e);
261
261
  }
262
- return (t, a) => (b(), C("svg", A({
262
+ return (e, a) => (b(), C("svg", A({
263
263
  xmlns: "http://www.w3.org/2000/svg",
264
264
  viewBox: "0 0 200 200",
265
265
  width: "20",
266
266
  height: "20"
267
- }, t.$attrs, { onClick: l }), Dt, 16));
267
+ }, e.$attrs, { onClick: s }), De, 16));
268
268
  }
269
269
  });
270
- function Mt(s, n, e, l, t, a) {
271
- const d = U({ dragLeft: 0, thumbLeft: s.thumbX || 0 }), o = () => {
270
+ function Me(l, t, n, s, e, a) {
271
+ const d = U({ dragLeft: 0, thumbLeft: l.thumbX || 0 }), o = () => {
272
272
  d.dragLeft = 0, d.thumbLeft = 0;
273
273
  };
274
274
  return {
275
275
  state: d,
276
276
  dragEvent: (r) => {
277
- const h = r.touches && r.touches[0], _ = t.value.offsetLeft, w = e.value.offsetWidth, v = t.value.offsetWidth, f = w - v, k = s.thumbX || 0, $ = l.value.offsetWidth, S = v - $, y = (f - k + S) / f;
277
+ const h = r.touches && r.touches[0], _ = e.value.offsetLeft, w = n.value.offsetWidth, v = e.value.offsetWidth, f = w - v, k = l.thumbX || 0, $ = s.value.offsetWidth, S = v - $, y = (f - k + S) / f;
278
278
  let x = !1, B = 0, T = 0;
279
279
  h ? B = h.pageX - _ : B = r.clientX - _;
280
280
  const W = (p) => {
@@ -289,60 +289,60 @@ function Mt(s, n, e, l, t, a) {
289
289
  d.dragLeft = 0;
290
290
  return;
291
291
  }
292
- d.dragLeft = L, T = k + L * y, d.thumbLeft = T, n.move && n.move(T, s.thumbY || 0), p.cancelBubble = !0, p.preventDefault();
292
+ d.dragLeft = L, T = k + L * y, d.thumbLeft = T, t.move && t.move(T, l.thumbY || 0), p.cancelBubble = !0, p.preventDefault();
293
293
  }, X = (p) => {
294
- st(a.value, p) && x && (a.value.removeEventListener("mousemove", W, !1), a.value.removeEventListener("touchmove", W, { passive: !1 }), a.value.removeEventListener("mouseup", X, !1), a.value.removeEventListener("mouseout", X, !1), a.value.removeEventListener("touchend", X, !1), x = !1, n.confirm && n.confirm({ x: parseInt(T.toString()), y: s.thumbY || 0 }, () => {
294
+ se(a.value, p) && x && (a.value.removeEventListener("mousemove", W, !1), a.value.removeEventListener("touchmove", W, { passive: !1 }), a.value.removeEventListener("mouseup", X, !1), a.value.removeEventListener("mouseout", X, !1), a.value.removeEventListener("touchend", X, !1), x = !1, t.confirm && t.confirm({ x: parseInt(T.toString()), y: l.thumbY || 0 }, () => {
295
295
  o();
296
296
  }), p.cancelBubble = !0, p.preventDefault());
297
297
  };
298
298
  a.value.addEventListener("mousemove", W, !1), a.value.addEventListener("touchmove", W, { passive: !1 }), a.value.addEventListener("mouseup", X, !1), a.value.addEventListener("mouseout", X, !1), a.value.addEventListener("touchend", X, !1);
299
299
  },
300
- closeEvent: (r) => (n && n.close && n.close(), o(), r.cancelBubble = !0, r.preventDefault(), !1),
301
- refreshEvent: (r) => (n && n.refresh && n.refresh(), o(), r.cancelBubble = !0, r.preventDefault(), !1)
300
+ closeEvent: (r) => (t && t.close && t.close(), o(), r.cancelBubble = !0, r.preventDefault(), !1),
301
+ refreshEvent: (r) => (t && t.refresh && t.refresh(), o(), r.cancelBubble = !0, r.preventDefault(), !1)
302
302
  };
303
303
  }
304
- const St = { class: "gc-header" }, Bt = { class: "gc-icon-block" }, Wt = { class: "gc-loading" }, Yt = ["src"], Ht = ["src"], Ft = { class: "gc-footer" }, At = /* @__PURE__ */ c("div", { class: "gc-drag-line" }, null, -1), J = /* @__PURE__ */ M({
304
+ const Se = { class: "gc-header" }, Be = { class: "gc-icon-block" }, We = { class: "gc-loading" }, Ye = ["src"], He = ["src"], Fe = { class: "gc-footer" }, Ae = /* @__PURE__ */ c("div", { class: "gc-drag-line" }, null, -1), J = /* @__PURE__ */ M({
305
305
  __name: "index",
306
306
  props: {
307
- config: { default: ot },
307
+ config: { default: oe },
308
308
  events: { default: () => ({}) },
309
309
  data: { default: () => ({}) }
310
310
  },
311
- setup(s) {
312
- const n = s, { data: e, events: l } = n, t = D({
313
- ...ot(),
314
- ...n.config
311
+ setup(l) {
312
+ const t = l, { data: n, events: s } = t, e = D({
313
+ ...oe(),
314
+ ...t.config
315
315
  });
316
- j(() => n.config, () => {
317
- t.value = {
318
- ...t.value,
319
- ...n.config
316
+ j(() => t.config, () => {
317
+ e.value = {
318
+ ...e.value,
319
+ ...t.config
320
320
  };
321
321
  });
322
- const a = D(null), d = D(null), o = D(null), E = D(null), u = Mt(e, l, d, E, o, a), g = t.value.horizontalPadding || 0, r = t.value.verticalPadding || 0, h = (t.value.width || 0) + g * 2 + (t.value.showTheme ? 2 : 0), _ = z(() => ({
322
+ const a = D(null), d = D(null), o = D(null), E = D(null), u = Me(n, s, d, E, o, a), g = e.value.horizontalPadding || 0, r = e.value.verticalPadding || 0, h = (e.value.width || 0) + g * 2 + (e.value.showTheme ? 2 : 0), _ = z(() => ({
323
323
  width: h + "px",
324
324
  paddingLeft: g + "px",
325
325
  paddingRight: g + "px",
326
326
  paddingTop: r + "px",
327
327
  paddingBottom: r + "px"
328
328
  })), w = z(() => ({
329
- width: e.thumbWidth + "px",
330
- height: e.thumbHeight + "px",
331
- top: e.thumbY + "px",
329
+ width: n.thumbWidth + "px",
330
+ height: n.thumbHeight + "px",
331
+ top: n.thumbY + "px",
332
332
  left: u.state.thumbLeft + "px"
333
333
  })), v = z(() => ({
334
- width: t.value.width + "px",
335
- height: t.value.height + "px"
334
+ width: e.value.width + "px",
335
+ height: e.value.height + "px"
336
336
  }));
337
- return nt(async () => {
338
- await ct(), o.value && o.value.addEventListener("dragstart", (f) => f.preventDefault());
337
+ return ne(async () => {
338
+ await ce(), o.value && o.value.addEventListener("dragstart", (f) => f.preventDefault());
339
339
  }), (f, k) => (b(), C("div", {
340
- class: I(`go-captcha gc-wrapper ${t.value.showTheme ? "gc-theme" : ""}`),
340
+ class: I(`go-captcha gc-wrapper ${e.value.showTheme ? "gc-theme" : ""}`),
341
341
  style: m(_.value)
342
342
  }, [
343
- c("div", St, [
344
- c("span", null, V(t.value.title), 1),
345
- c("div", Bt, [
343
+ c("div", Se, [
344
+ c("span", null, V(e.value.title), 1),
345
+ c("div", Be, [
346
346
  P(Z, {
347
347
  width: 22,
348
348
  height: 22,
@@ -361,16 +361,16 @@ const St = { class: "gc-header" }, Bt = { class: "gc-icon-block" }, Wt = { class
361
361
  ref: d,
362
362
  style: m(v.value)
363
363
  }, [
364
- c("div", Wt, [
365
- P(tt)
364
+ c("div", We, [
365
+ P(ee)
366
366
  ]),
367
367
  H(c("img", {
368
368
  class: "gc-picture",
369
369
  style: m(v.value),
370
- src: i(e).image,
370
+ src: i(n).image,
371
371
  alt: "..."
372
- }, null, 12, Yt), [
373
- [F, i(e).image !== ""]
372
+ }, null, 12, Ye), [
373
+ [F, i(n).image !== ""]
374
374
  ]),
375
375
  c("div", {
376
376
  class: "gc-tile",
@@ -379,14 +379,14 @@ const St = { class: "gc-header" }, Bt = { class: "gc-icon-block" }, Wt = { class
379
379
  style: m(w.value)
380
380
  }, [
381
381
  H(c("img", {
382
- src: i(e).thumb,
382
+ src: i(n).thumb,
383
383
  alt: "..."
384
- }, null, 8, Ht), [
385
- [F, i(e).thumb !== ""]
384
+ }, null, 8, He), [
385
+ [F, i(n).thumb !== ""]
386
386
  ])
387
387
  ], 4)
388
388
  ], 4),
389
- c("div", Ft, [
389
+ c("div", Fe, [
390
390
  c("div", {
391
391
  class: "gc-drag-slide-bar",
392
392
  ref_key: "dragBarRef",
@@ -394,7 +394,7 @@ const St = { class: "gc-header" }, Bt = { class: "gc-icon-block" }, Wt = { class
394
394
  onMousedown: k[1] || (k[1] = //@ts-ignore
395
395
  (...$) => i(u).dragEvent && i(u).dragEvent(...$))
396
396
  }, [
397
- At,
397
+ Ae,
398
398
  c("div", {
399
399
  class: "gc-drag-block",
400
400
  ref_key: "dragBlockRef",
@@ -403,18 +403,18 @@ const St = { class: "gc-header" }, Bt = { class: "gc-icon-block" }, Wt = { class
403
403
  (...$) => i(u).dragEvent && i(u).dragEvent(...$)),
404
404
  style: m({ left: i(u).state.dragLeft + "px" })
405
405
  }, [
406
- P(ut)
406
+ P(ue)
407
407
  ], 36)
408
408
  ], 544)
409
409
  ])
410
410
  ], 6));
411
411
  }
412
412
  });
413
- J.name = "goCaptchaSlide";
414
- J.install = function(s) {
415
- s.component("gocaptcha-slide", J);
413
+ J.name = "gocaptcha-slide";
414
+ J.install = function(l) {
415
+ l.component("gocaptcha-slide", J);
416
416
  };
417
- const it = () => ({
417
+ const ie = () => ({
418
418
  width: 300,
419
419
  height: 220,
420
420
  verticalPadding: 16,
@@ -422,52 +422,52 @@ const it = () => ({
422
422
  showTheme: !0,
423
423
  title: "请拖拽贴图完成拼图"
424
424
  });
425
- function Vt(s, n, e, l) {
426
- const t = U({ x: s.thumbX || 0, y: s.thumbY || 0 }), a = () => {
427
- t.x = s.thumbX || 0, t.y = s.thumbY || 0;
425
+ function Ve(l, t, n, s) {
426
+ const e = U({ x: l.thumbX || 0, y: l.thumbY || 0 }), a = () => {
427
+ e.x = l.thumbX || 0, e.y = l.thumbY || 0;
428
428
  };
429
429
  return {
430
- state: t,
430
+ state: e,
431
431
  dragEvent: (u) => {
432
- const g = u.touches && u.touches[0], r = l.value.offsetLeft, h = l.value.offsetTop, _ = e.value.offsetWidth, w = e.value.offsetHeight, v = l.value.offsetWidth, f = l.value.offsetHeight, k = _ - v, $ = w - f;
432
+ const g = u.touches && u.touches[0], r = s.value.offsetLeft, h = s.value.offsetTop, _ = n.value.offsetWidth, w = n.value.offsetHeight, v = s.value.offsetWidth, f = s.value.offsetHeight, k = _ - v, $ = w - f;
433
433
  let S = !1, y = 0, x = 0, B = 0, T = 0;
434
434
  g ? (y = g.pageX - r, x = g.pageY - h) : (y = u.clientX - r, x = u.clientY - h);
435
435
  const W = (p) => {
436
436
  S = !0;
437
437
  const N = p.touches && p.touches[0];
438
438
  let L = 0, Y = 0;
439
- N ? (L = N.pageX - y, Y = N.pageY - x) : (L = p.clientX - y, Y = p.clientY - x), L <= 0 && (L = 0), Y <= 0 && (Y = 0), L >= k && (L = k), Y >= $ && (Y = $), t.x = L, t.y = Y, B = L, T = Y, n.move && n.move(L, Y), p.cancelBubble = !0, p.preventDefault();
439
+ N ? (L = N.pageX - y, Y = N.pageY - x) : (L = p.clientX - y, Y = p.clientY - x), L <= 0 && (L = 0), Y <= 0 && (Y = 0), L >= k && (L = k), Y >= $ && (Y = $), e.x = L, e.y = Y, B = L, T = Y, t.move && t.move(L, Y), p.cancelBubble = !0, p.preventDefault();
440
440
  }, X = (p) => {
441
- st(e.value, p) && S && (S = !1, e.value.removeEventListener("mousemove", W, !1), e.value.removeEventListener("touchmove", W, { passive: !1 }), e.value.removeEventListener("mouseup", X, !1), e.value.removeEventListener("mouseout", X, !1), e.value.removeEventListener("touchend", X, !1), n.confirm && n.confirm({ x: B, y: T }, () => {
441
+ se(n.value, p) && S && (S = !1, n.value.removeEventListener("mousemove", W, !1), n.value.removeEventListener("touchmove", W, { passive: !1 }), n.value.removeEventListener("mouseup", X, !1), n.value.removeEventListener("mouseout", X, !1), n.value.removeEventListener("touchend", X, !1), t.confirm && t.confirm({ x: B, y: T }, () => {
442
442
  a();
443
443
  }), p.cancelBubble = !0, p.preventDefault());
444
444
  };
445
- e.value.addEventListener("mousemove", W, !1), e.value.addEventListener("touchmove", W, { passive: !1 }), e.value.addEventListener("mouseup", X, !1), e.value.addEventListener("mouseout", X, !1), e.value.addEventListener("touchend", X, !1);
445
+ n.value.addEventListener("mousemove", W, !1), n.value.addEventListener("touchmove", W, { passive: !1 }), n.value.addEventListener("mouseup", X, !1), n.value.addEventListener("mouseout", X, !1), n.value.addEventListener("touchend", X, !1);
446
446
  },
447
- closeEvent: (u) => (n && n.close && n.close(), a(), u.cancelBubble = !0, u.preventDefault(), !1),
448
- refreshEvent: (u) => (n && n.refresh && n.refresh(), a(), u.cancelBubble = !0, u.preventDefault(), !1)
447
+ closeEvent: (u) => (t && t.close && t.close(), a(), u.cancelBubble = !0, u.preventDefault(), !1),
448
+ refreshEvent: (u) => (t && t.refresh && t.refresh(), a(), u.cancelBubble = !0, u.preventDefault(), !1)
449
449
  };
450
450
  }
451
- const Nt = { class: "gc-header gc-header2" }, It = { class: "gc-loading" }, jt = ["src"], qt = ["src"], Gt = { class: "gc-footer" }, Jt = { class: "gc-icon-block" }, K = /* @__PURE__ */ M({
451
+ const Ne = { class: "gc-header gc-header2" }, Ie = { class: "gc-loading" }, je = ["src"], qe = ["src"], Ge = { class: "gc-footer" }, Je = { class: "gc-icon-block" }, K = /* @__PURE__ */ M({
452
452
  __name: "index",
453
453
  props: {
454
- config: { default: it },
454
+ config: { default: ie },
455
455
  events: { default: () => ({}) },
456
456
  data: { default: () => ({}) }
457
457
  },
458
- setup(s) {
459
- const n = s, { data: e, events: l } = n, t = D({
460
- ...it(),
461
- ...n.config
458
+ setup(l) {
459
+ const t = l, { data: n, events: s } = t, e = D({
460
+ ...ie(),
461
+ ...t.config
462
462
  });
463
- j(() => n.config, () => {
464
- t.value = {
465
- ...t.value,
466
- ...n.config
463
+ j(() => t.config, () => {
464
+ e.value = {
465
+ ...e.value,
466
+ ...t.config
467
467
  };
468
468
  });
469
- const a = D(null), d = D(null), o = Vt(e, l, a, d), E = t.value.horizontalPadding || 0, u = t.value.verticalPadding || 0;
470
- let g = (t.value.width || 0) + E * 2 + (t.value.showTheme ? 2 : 0);
469
+ const a = D(null), d = D(null), o = Ve(n, s, a, d), E = e.value.horizontalPadding || 0, u = e.value.verticalPadding || 0;
470
+ let g = (e.value.width || 0) + E * 2 + (e.value.showTheme ? 2 : 0);
471
471
  const r = z(() => ({
472
472
  width: g + "px",
473
473
  paddingLeft: E + "px",
@@ -475,22 +475,22 @@ const Nt = { class: "gc-header gc-header2" }, It = { class: "gc-loading" }, jt =
475
475
  paddingTop: u + "px",
476
476
  paddingBottom: u + "px"
477
477
  })), h = z(() => ({
478
- width: e.thumbWidth + "px",
479
- height: e.thumbHeight + "px",
478
+ width: n.thumbWidth + "px",
479
+ height: n.thumbHeight + "px",
480
480
  top: o.state.y + "px",
481
481
  left: o.state.x + "px"
482
482
  })), _ = z(() => ({
483
- width: t.value.width + "px",
484
- height: t.value.height + "px"
483
+ width: e.value.width + "px",
484
+ height: e.value.height + "px"
485
485
  }));
486
- return nt(async () => {
487
- await ct(), d.value && d.value.addEventListener("dragstart", (w) => w.preventDefault());
486
+ return ne(async () => {
487
+ await ce(), d.value && d.value.addEventListener("dragstart", (w) => w.preventDefault());
488
488
  }), (w, v) => (b(), C("div", {
489
- class: I(`go-captcha gc-wrapper ${t.value.showTheme ? "gc-theme" : ""}`),
489
+ class: I(`go-captcha gc-wrapper ${e.value.showTheme ? "gc-theme" : ""}`),
490
490
  style: m(r.value)
491
491
  }, [
492
- c("div", Nt, [
493
- c("span", null, V(t.value.title), 1)
492
+ c("div", Ne, [
493
+ c("span", null, V(e.value.title), 1)
494
494
  ]),
495
495
  c("div", {
496
496
  class: "gc-body",
@@ -498,16 +498,16 @@ const Nt = { class: "gc-header gc-header2" }, It = { class: "gc-loading" }, jt =
498
498
  ref: a,
499
499
  style: m(_.value)
500
500
  }, [
501
- c("div", It, [
502
- P(tt)
501
+ c("div", Ie, [
502
+ P(ee)
503
503
  ]),
504
504
  H(c("img", {
505
505
  class: "gc-picture",
506
506
  style: m(_.value),
507
- src: i(e).image,
507
+ src: i(n).image,
508
508
  alt: "..."
509
- }, null, 12, jt), [
510
- [F, i(e).image !== ""]
509
+ }, null, 12, je), [
510
+ [F, i(n).image !== ""]
511
511
  ]),
512
512
  c("div", {
513
513
  class: "gc-tile",
@@ -520,15 +520,15 @@ const Nt = { class: "gc-header gc-header2" }, It = { class: "gc-loading" }, jt =
520
520
  (...f) => i(o).dragEvent && i(o).dragEvent(...f))
521
521
  }, [
522
522
  H(c("img", {
523
- src: i(e).thumb,
523
+ src: i(n).thumb,
524
524
  alt: "..."
525
- }, null, 8, qt), [
526
- [F, i(e).thumb !== ""]
525
+ }, null, 8, qe), [
526
+ [F, i(n).thumb !== ""]
527
527
  ])
528
528
  ], 36)
529
529
  ], 4),
530
- c("div", Gt, [
531
- c("div", Jt, [
530
+ c("div", Ge, [
531
+ c("div", Je, [
532
532
  P(Z, {
533
533
  width: 22,
534
534
  height: 22,
@@ -544,11 +544,11 @@ const Nt = { class: "gc-header gc-header2" }, It = { class: "gc-loading" }, jt =
544
544
  ], 6));
545
545
  }
546
546
  });
547
- K.name = "goCaptchaSlideRegion";
548
- K.install = function(s) {
549
- s.component("gocaptcha-slide-region", K);
547
+ K.name = "gocaptcha-slide-region";
548
+ K.install = function(l) {
549
+ l.component("gocaptcha-slide-region", K);
550
550
  };
551
- const et = () => ({
551
+ const te = () => ({
552
552
  width: 300,
553
553
  height: 220,
554
554
  size: 220,
@@ -557,14 +557,14 @@ const et = () => ({
557
557
  showTheme: !0,
558
558
  title: "请拖动滑块完成拼图"
559
559
  });
560
- function Kt(s, n, e, l) {
561
- const t = U({ dragLeft: 0, thumbAngle: s.angle || 0 }), a = () => {
562
- t.dragLeft = 0, t.thumbAngle = 0;
560
+ function Ke(l, t, n, s) {
561
+ const e = U({ dragLeft: 0, thumbAngle: l.angle || 0 }), a = () => {
562
+ e.dragLeft = 0, e.thumbAngle = 0;
563
563
  };
564
564
  return {
565
- state: t,
565
+ state: e,
566
566
  dragEvent: (u) => {
567
- const g = u.touches && u.touches[0], r = e.value.offsetLeft, h = l.value.offsetWidth, _ = e.value.offsetWidth, w = h - _, v = 360 / w;
567
+ const g = u.touches && u.touches[0], r = n.value.offsetLeft, h = s.value.offsetWidth, _ = n.value.offsetWidth, w = h - _, v = 360 / w;
568
568
  let f = 0, k = !1, $ = 0;
569
569
  g ? $ = g.pageX - r : $ = u.clientX - r;
570
570
  const S = (x) => {
@@ -572,47 +572,47 @@ function Kt(s, n, e, l) {
572
572
  const B = x.touches && x.touches[0];
573
573
  let T = 0;
574
574
  if (B ? T = B.pageX - $ : T = x.clientX - $, T >= w) {
575
- t.dragLeft = w;
575
+ e.dragLeft = w;
576
576
  return;
577
577
  }
578
578
  if (T <= 0) {
579
- t.dragLeft = 0;
579
+ e.dragLeft = 0;
580
580
  return;
581
581
  }
582
- t.dragLeft = T, f = T * v, t.thumbAngle = f, n.rotate && n.rotate(f), x.cancelBubble = !0, x.preventDefault();
582
+ e.dragLeft = T, f = T * v, e.thumbAngle = f, t.rotate && t.rotate(f), x.cancelBubble = !0, x.preventDefault();
583
583
  }, y = (x) => {
584
- st(l.value, x) && k && (l.value.removeEventListener("mousemove", S, !1), l.value.removeEventListener("touchmove", S, { passive: !1 }), l.value.removeEventListener("mouseup", y, !1), l.value.removeEventListener("mouseout", y, !1), l.value.removeEventListener("touchend", y, !1), k = !1, n.confirm && n.confirm(parseInt(f.toString()), () => {
584
+ se(s.value, x) && k && (s.value.removeEventListener("mousemove", S, !1), s.value.removeEventListener("touchmove", S, { passive: !1 }), s.value.removeEventListener("mouseup", y, !1), s.value.removeEventListener("mouseout", y, !1), s.value.removeEventListener("touchend", y, !1), k = !1, t.confirm && t.confirm(parseInt(f.toString()), () => {
585
585
  a();
586
586
  }), x.cancelBubble = !0, x.preventDefault());
587
587
  };
588
- l.value.addEventListener("mousemove", S, !1), l.value.addEventListener("touchmove", S, { passive: !1 }), l.value.addEventListener("mouseup", y, !1), l.value.addEventListener("mouseout", y, !1), l.value.addEventListener("touchend", y, !1);
588
+ s.value.addEventListener("mousemove", S, !1), s.value.addEventListener("touchmove", S, { passive: !1 }), s.value.addEventListener("mouseup", y, !1), s.value.addEventListener("mouseout", y, !1), s.value.addEventListener("touchend", y, !1);
589
589
  },
590
- closeEvent: (u) => (n && n.close && n.close(), a(), u.cancelBubble = !0, u.preventDefault(), !1),
591
- refreshEvent: (u) => (n && n.refresh && n.refresh(), a(), u.cancelBubble = !0, u.preventDefault(), !1)
590
+ closeEvent: (u) => (t && t.close && t.close(), a(), u.cancelBubble = !0, u.preventDefault(), !1),
591
+ refreshEvent: (u) => (t && t.refresh && t.refresh(), a(), u.cancelBubble = !0, u.preventDefault(), !1)
592
592
  };
593
593
  }
594
- const Ot = { class: "gc-header" }, Qt = { class: "gc-icon-block" }, Ut = { class: "gc-loading" }, Zt = ["src"], Rt = /* @__PURE__ */ c("div", { class: "gc-round" }, null, -1), te = { class: "gc-thumb gc-rotate-thumb" }, ee = ["src"], ne = { class: "gc-footer" }, ce = /* @__PURE__ */ c("div", { class: "gc-drag-line" }, null, -1), O = /* @__PURE__ */ M({
594
+ const Oe = { class: "gc-header" }, Qe = { class: "gc-icon-block" }, Ue = { class: "gc-loading" }, Ze = ["src"], Re = /* @__PURE__ */ c("div", { class: "gc-round" }, null, -1), et = { class: "gc-thumb gc-rotate-thumb" }, tt = ["src"], nt = { class: "gc-footer" }, ct = /* @__PURE__ */ c("div", { class: "gc-drag-line" }, null, -1), O = /* @__PURE__ */ M({
595
595
  __name: "index",
596
596
  props: {
597
- config: { default: et },
597
+ config: { default: te },
598
598
  events: { default: () => ({}) },
599
599
  data: { default: () => ({}) }
600
600
  },
601
- setup(s) {
602
- const n = s, { data: e, events: l } = n, t = D({
603
- ...et(),
604
- ...n.config
601
+ setup(l) {
602
+ const t = l, { data: n, events: s } = t, e = D({
603
+ ...te(),
604
+ ...t.config
605
605
  });
606
- j(() => n.config, () => {
607
- t.value = {
608
- ...t.value,
609
- ...n.config
606
+ j(() => t.config, () => {
607
+ e.value = {
608
+ ...e.value,
609
+ ...t.config
610
610
  };
611
611
  });
612
- const a = D(null), d = D(null), o = Kt(e, l, d, a), E = z(() => {
613
- const r = t.value.horizontalPadding || 0, h = t.value.verticalPadding || 0;
612
+ const a = D(null), d = D(null), o = Ke(n, s, d, a), E = z(() => {
613
+ const r = e.value.horizontalPadding || 0, h = e.value.verticalPadding || 0;
614
614
  return {
615
- width: (t.value.width || 0) + r * 2 + (t.value.showTheme ? 2 : 0) + "px",
615
+ width: (e.value.width || 0) + r * 2 + (e.value.showTheme ? 2 : 0) + "px",
616
616
  paddingLeft: r + "px",
617
617
  paddingRight: r + "px",
618
618
  paddingTop: h + "px",
@@ -622,21 +622,21 @@ const Ot = { class: "gc-header" }, Qt = { class: "gc-icon-block" }, Ut = { class
622
622
  transform: `rotate(${o.state.thumbAngle}deg)`
623
623
  })), g = z(() => {
624
624
  var h;
625
- const r = (((h = t.value) == null ? void 0 : h.size) || 0) > 0 ? t.value.size : et().size;
625
+ const r = (((h = e.value) == null ? void 0 : h.size) || 0) > 0 ? e.value.size : te().size;
626
626
  return {
627
627
  width: r + "px",
628
628
  height: r + "px"
629
629
  };
630
630
  });
631
- return nt(async () => {
632
- await ct(), d.value && d.value.addEventListener("dragstart", (r) => r.preventDefault());
631
+ return ne(async () => {
632
+ await ce(), d.value && d.value.addEventListener("dragstart", (r) => r.preventDefault());
633
633
  }), (r, h) => (b(), C("div", {
634
- class: I(`go-captcha gc-wrapper ${t.value.showTheme ? "gc-theme" : ""}`),
634
+ class: I(`go-captcha gc-wrapper ${e.value.showTheme ? "gc-theme" : ""}`),
635
635
  style: m(E.value)
636
636
  }, [
637
- c("div", Ot, [
638
- c("span", null, V(t.value.title), 1),
639
- c("div", Qt, [
637
+ c("div", Oe, [
638
+ c("span", null, V(e.value.title), 1),
639
+ c("div", Qe, [
640
640
  P(Z, {
641
641
  width: 22,
642
642
  height: 22,
@@ -654,36 +654,36 @@ const Ot = { class: "gc-header" }, Qt = { class: "gc-icon-block" }, Ut = { class
654
654
  ref: "containerRef",
655
655
  style: m(g.value)
656
656
  }, [
657
- c("div", Ut, [
658
- P(tt)
657
+ c("div", Ue, [
658
+ P(ee)
659
659
  ]),
660
660
  c("div", {
661
661
  class: "gc-picture gc-rotate-picture",
662
662
  style: m(g.value)
663
663
  }, [
664
664
  H(c("img", {
665
- src: i(e).image,
665
+ src: i(n).image,
666
666
  alt: "..."
667
- }, null, 8, Zt), [
668
- [F, i(e).image !== ""]
667
+ }, null, 8, Ze), [
668
+ [F, i(n).image !== ""]
669
669
  ]),
670
- Rt
670
+ Re
671
671
  ], 4),
672
- c("div", te, [
672
+ c("div", et, [
673
673
  c("div", {
674
674
  class: "gc-rotate-thumb-block",
675
675
  style: m(u.value)
676
676
  }, [
677
677
  H(c("img", {
678
- src: i(e).thumb,
678
+ src: i(n).thumb,
679
679
  alt: "..."
680
- }, null, 8, ee), [
681
- [F, i(e).thumb !== ""]
680
+ }, null, 8, tt), [
681
+ [F, i(n).thumb !== ""]
682
682
  ])
683
683
  ], 4)
684
684
  ])
685
685
  ], 4),
686
- c("div", ne, [
686
+ c("div", nt, [
687
687
  c("div", {
688
688
  class: "gc-drag-slide-bar",
689
689
  ref_key: "dragBarRef",
@@ -691,7 +691,7 @@ const Ot = { class: "gc-header" }, Qt = { class: "gc-icon-block" }, Ut = { class
691
691
  onMousedown: h[1] || (h[1] = //@ts-ignore
692
692
  (..._) => i(o).dragEvent && i(o).dragEvent(..._))
693
693
  }, [
694
- ce,
694
+ ct,
695
695
  c("div", {
696
696
  class: "gc-drag-block",
697
697
  ref_key: "dragBlockRef",
@@ -700,116 +700,116 @@ const Ot = { class: "gc-header" }, Qt = { class: "gc-icon-block" }, Ut = { class
700
700
  (..._) => i(o).dragEvent && i(o).dragEvent(..._)),
701
701
  style: m({ left: i(o).state.dragLeft + "px" })
702
702
  }, [
703
- P(ut)
703
+ P(ue)
704
704
  ], 36)
705
705
  ], 544)
706
706
  ])
707
707
  ], 6));
708
708
  }
709
709
  });
710
- O.name = "goCaptchaRotate";
711
- O.install = function(s) {
712
- s.component("gocaptcha-rotate", O);
710
+ O.name = "gocaptcha-rotate";
711
+ O.install = function(l) {
712
+ l.component("gocaptcha-rotate", O);
713
713
  };
714
- const se = /* @__PURE__ */ c("circle", {
714
+ const st = /* @__PURE__ */ c("circle", {
715
715
  fill: "#3E7CFF",
716
716
  cx: "100",
717
717
  cy: "100",
718
718
  r: "96.3"
719
- }, null, -1), le = /* @__PURE__ */ c("path", {
719
+ }, null, -1), lt = /* @__PURE__ */ c("path", {
720
720
  fill: "#FFFFFF",
721
721
  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
722
722
  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`
723
- }, null, -1), oe = [
724
- se,
725
- le
726
- ], ie = /* @__PURE__ */ M({
723
+ }, null, -1), ot = [
724
+ st,
725
+ lt
726
+ ], it = /* @__PURE__ */ M({
727
727
  __name: "btn-default-icon",
728
728
  emits: ["click"],
729
- setup(s, { emit: n }) {
730
- const e = n;
731
- function l(t) {
732
- e("click", t);
729
+ setup(l, { emit: t }) {
730
+ const n = t;
731
+ function s(e) {
732
+ n("click", e);
733
733
  }
734
- return (t, a) => (b(), C("svg", A({
734
+ return (e, a) => (b(), C("svg", A({
735
735
  xmlns: "http://www.w3.org/2000/svg",
736
736
  viewBox: "0 0 200 200",
737
737
  width: "20",
738
738
  height: "20"
739
- }, t.$attrs, { onClick: l }), oe, 16));
739
+ }, e.$attrs, { onClick: s }), ot, 16));
740
740
  }
741
- }), ae = /* @__PURE__ */ c("path", {
741
+ }), at = /* @__PURE__ */ c("path", {
742
742
  fill: "#FFA000",
743
743
  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
744
744
  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
745
745
  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
746
746
  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
747
747
  z`
748
- }, null, -1), ue = [
749
- ae
750
- ], re = /* @__PURE__ */ M({
748
+ }, null, -1), ut = [
749
+ at
750
+ ], rt = /* @__PURE__ */ M({
751
751
  __name: "btn-warn-icon",
752
752
  emits: ["click"],
753
- setup(s, { emit: n }) {
754
- const e = n;
755
- function l(t) {
756
- e("click", t);
753
+ setup(l, { emit: t }) {
754
+ const n = t;
755
+ function s(e) {
756
+ n("click", e);
757
757
  }
758
- return (t, a) => (b(), C("svg", A({
758
+ return (e, a) => (b(), C("svg", A({
759
759
  xmlns: "http://www.w3.org/2000/svg",
760
760
  viewBox: "0 0 200 200",
761
761
  width: "20",
762
762
  height: "20"
763
- }, t.$attrs, { onClick: l }), ue, 16));
763
+ }, e.$attrs, { onClick: s }), ut, 16));
764
764
  }
765
- }), de = /* @__PURE__ */ c("path", {
765
+ }), dt = /* @__PURE__ */ c("path", {
766
766
  fill: "#ED4630",
767
767
  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
768
768
  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
769
769
  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
770
770
  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
771
771
  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`
772
- }, null, -1), he = [
773
- de
774
- ], ve = /* @__PURE__ */ M({
772
+ }, null, -1), ht = [
773
+ dt
774
+ ], vt = /* @__PURE__ */ M({
775
775
  __name: "btn-error-icon",
776
776
  emits: ["click"],
777
- setup(s, { emit: n }) {
778
- const e = n;
779
- function l(t) {
780
- e("click", t);
777
+ setup(l, { emit: t }) {
778
+ const n = t;
779
+ function s(e) {
780
+ n("click", e);
781
781
  }
782
- return (t, a) => (b(), C("svg", A({
782
+ return (e, a) => (b(), C("svg", A({
783
783
  xmlns: "http://www.w3.org/2000/svg",
784
784
  viewBox: "0 0 200 200",
785
785
  width: "20",
786
786
  height: "20"
787
- }, t.$attrs, { onClick: l }), he, 16));
787
+ }, e.$attrs, { onClick: s }), ht, 16));
788
788
  }
789
- }), ge = /* @__PURE__ */ c("path", {
789
+ }), gt = /* @__PURE__ */ c("path", {
790
790
  fill: "#5EAA2F",
791
791
  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
792
792
  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
793
793
  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
794
794
  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`
795
- }, null, -1), fe = [
796
- ge
797
- ], pe = /* @__PURE__ */ M({
795
+ }, null, -1), ft = [
796
+ gt
797
+ ], pt = /* @__PURE__ */ M({
798
798
  __name: "btn-success-icon",
799
799
  emits: ["click"],
800
- setup(s, { emit: n }) {
801
- const e = n;
802
- function l(t) {
803
- e("click", t);
800
+ setup(l, { emit: t }) {
801
+ const n = t;
802
+ function s(e) {
803
+ n("click", e);
804
804
  }
805
- return (t, a) => (b(), C("svg", A({
805
+ return (e, a) => (b(), C("svg", A({
806
806
  xmlns: "http://www.w3.org/2000/svg",
807
807
  viewBox: "0 0 200 200",
808
808
  width: "20",
809
809
  height: "20"
810
- }, t.$attrs, { onClick: l }), fe, 16));
810
+ }, e.$attrs, { onClick: s }), ft, 16));
811
811
  }
812
- }), at = () => ({
812
+ }), ae = () => ({
813
813
  width: 330,
814
814
  height: 44,
815
815
  verticalPadding: 12,
@@ -817,32 +817,32 @@ const se = /* @__PURE__ */ c("circle", {
817
817
  }), Q = /* @__PURE__ */ M({
818
818
  __name: "index",
819
819
  props: {
820
- config: { default: at },
820
+ config: { default: ae },
821
821
  clickEvent: {},
822
822
  disabled: { type: Boolean, default: !1 },
823
823
  type: { default: "default" },
824
824
  title: { default: "点击按键进行验证" }
825
825
  },
826
826
  emits: ["click-event"],
827
- setup(s, { emit: n }) {
828
- const e = s, { type: l, title: t, disabled: a } = vt(e), d = D({
829
- ...at(),
830
- ...e.config
827
+ setup(l, { emit: t }) {
828
+ const n = l, { type: s, title: e, disabled: a } = ve(n), d = D({
829
+ ...ae(),
830
+ ...n.config
831
831
  });
832
- j(() => e.config, () => {
832
+ j(() => n.config, () => {
833
833
  d.value = {
834
834
  ...d.value,
835
- ...e.config
835
+ ...n.config
836
836
  };
837
837
  });
838
- const o = z(() => ["go-captcha", "gc-btn-block", `gc-${l.value}`, a.value ? "gc-disabled" : ""]), E = z(() => ({
838
+ const o = z(() => ["go-captcha", "gc-btn-block", `gc-${s.value}`, a.value ? "gc-disabled" : ""]), E = z(() => ({
839
839
  width: d.value.width + "px",
840
840
  height: d.value.height + "px",
841
841
  paddingLeft: d.value.horizontalPadding + "px",
842
842
  paddingRight: d.value.horizontalPadding + "px",
843
843
  paddingTop: d.value.verticalPadding + "px",
844
844
  paddingBottom: d.value.verticalPadding + "px"
845
- })), u = n;
845
+ })), u = t;
846
846
  function g(r) {
847
847
  u("click-event", r);
848
848
  }
@@ -852,22 +852,20 @@ const se = /* @__PURE__ */ c("circle", {
852
852
  onClick: g
853
853
  }, [
854
854
  c("div", {
855
- class: I(i(l) === "default" ? "gc-ripple" : "")
855
+ class: I(i(s) === "default" ? "gc-ripple" : "")
856
856
  }, [
857
- i(l) === "default" ? (b(), q(ie, { key: 0 })) : i(l) === "warn" ? (b(), q(re, { key: 1 })) : i(l) === "error" ? (b(), q(ve, { key: 2 })) : i(l) === "success" ? (b(), q(pe, { key: 3 })) : gt("", !0)
857
+ i(s) === "default" ? (b(), q(it, { key: 0 })) : i(s) === "warn" ? (b(), q(rt, { key: 1 })) : i(s) === "error" ? (b(), q(vt, { key: 2 })) : i(s) === "success" ? (b(), q(pt, { key: 3 })) : ge("", !0)
858
858
  ], 2),
859
- c("span", null, V(i(t)), 1)
859
+ c("span", null, V(i(e)), 1)
860
860
  ], 6));
861
861
  }
862
862
  });
863
- Q.name = "goCaptchaButton";
864
- Q.install = function(s) {
865
- s.component("gocaptcha-button", Q);
863
+ Q.name = "gocaptcha-button";
864
+ Q.install = function(l) {
865
+ l.component("gocaptcha-button", Q);
866
866
  };
867
- const _e = {
868
- install(s) {
869
- G.install(s), J.install(s), K.install(s), O.install(s), Q.install(s);
870
- }
867
+ const _t = (l) => {
868
+ l.installed || (l.installed = !0, [G, J, K, O, Q].map((t) => l.use(t)));
871
869
  };
872
870
  export {
873
871
  Q as Button,
@@ -875,5 +873,5 @@ export {
875
873
  O as Rotate,
876
874
  J as Slide,
877
875
  K as SlideRegion,
878
- _e as default
876
+ _t as default
879
877
  };