go-captcha-vue 1.0.0 → 1.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.
- package/README.md +7 -4
- package/dist/go-captcha-vue.es.js +5 -5
- package/dist/go-captcha-vue.umd.js +3 -3
- package/package.json +14 -1
package/README.md
CHANGED
|
@@ -192,19 +192,22 @@ interface RotateEvents {
|
|
|
192
192
|
|
|
193
193
|
## Button
|
|
194
194
|
```vue
|
|
195
|
-
<gocaptcha-button />
|
|
195
|
+
<gocaptcha-button @clickEvent="() => console.log('hello')"/>
|
|
196
196
|
```
|
|
197
197
|
|
|
198
198
|
### params
|
|
199
199
|
```ts
|
|
200
|
-
interface
|
|
201
|
-
config?:
|
|
202
|
-
clickEvent?: () => void;
|
|
200
|
+
interface $Attr {
|
|
201
|
+
config?: CaptchaConfig;
|
|
203
202
|
disabled?: boolean;
|
|
204
203
|
type?: "default" | "warn" | "error" | "success";
|
|
205
204
|
title?: string;
|
|
206
205
|
}
|
|
207
206
|
|
|
207
|
+
interface $Event {
|
|
208
|
+
clickEvent?: ()=>void; // event -> @clickEvent=""
|
|
209
|
+
}
|
|
210
|
+
|
|
208
211
|
export interface ButtonConfig {
|
|
209
212
|
width?: number;
|
|
210
213
|
height?: number;
|
|
@@ -370,7 +370,7 @@ function __vue2_injectStyles$9(context) {
|
|
|
370
370
|
var capt$4 = /* @__PURE__ */ function() {
|
|
371
371
|
return __component__$9.exports;
|
|
372
372
|
}();
|
|
373
|
-
capt$4.name = "
|
|
373
|
+
capt$4.name = "gocaptcha-click";
|
|
374
374
|
capt$4.install = function(Vue) {
|
|
375
375
|
Vue.component("gocaptcha-click", capt$4);
|
|
376
376
|
};
|
|
@@ -635,7 +635,7 @@ function __vue2_injectStyles$7(context) {
|
|
|
635
635
|
var capt$3 = /* @__PURE__ */ function() {
|
|
636
636
|
return __component__$7.exports;
|
|
637
637
|
}();
|
|
638
|
-
capt$3.name = "
|
|
638
|
+
capt$3.name = "gocaptcha-slide";
|
|
639
639
|
capt$3.install = function(Vue) {
|
|
640
640
|
Vue.component("gocaptcha-slide", capt$3);
|
|
641
641
|
};
|
|
@@ -868,7 +868,7 @@ function __vue2_injectStyles$6(context) {
|
|
|
868
868
|
var capt$2 = /* @__PURE__ */ function() {
|
|
869
869
|
return __component__$6.exports;
|
|
870
870
|
}();
|
|
871
|
-
capt$2.name = "
|
|
871
|
+
capt$2.name = "gocaptcha-slide-region";
|
|
872
872
|
capt$2.install = function(Vue) {
|
|
873
873
|
Vue.component("gocaptcha-slide-region", capt$2);
|
|
874
874
|
};
|
|
@@ -1087,7 +1087,7 @@ function __vue2_injectStyles$5(context) {
|
|
|
1087
1087
|
var capt$1 = /* @__PURE__ */ function() {
|
|
1088
1088
|
return __component__$5.exports;
|
|
1089
1089
|
}();
|
|
1090
|
-
capt$1.name = "
|
|
1090
|
+
capt$1.name = "gocaptcha-rotate";
|
|
1091
1091
|
capt$1.install = function(Vue) {
|
|
1092
1092
|
Vue.component("gocaptcha-rotate", capt$1);
|
|
1093
1093
|
};
|
|
@@ -1353,7 +1353,7 @@ function __vue2_injectStyles(context) {
|
|
|
1353
1353
|
var capt = /* @__PURE__ */ function() {
|
|
1354
1354
|
return __component__.exports;
|
|
1355
1355
|
}();
|
|
1356
|
-
capt.name = "
|
|
1356
|
+
capt.name = "gocaptcha-button";
|
|
1357
1357
|
capt.install = function(Vue) {
|
|
1358
1358
|
Vue.component("gocaptcha-button", capt);
|
|
1359
1359
|
};
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
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
|
|
23
23
|
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
|
|
24
24
|
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
|
|
25
|
-
L180.6,98.9z`}})])},Ct=[],Fe="";const Q={};var kt=E(K,$t,Ct,!1,Lt,"1120f0d2",null,null);function Lt(t){for(let n in Q)this[n]=Q[n]}var N=function(){return kt.exports}();const Z={};Z.setup=(t,n)=>{const e=n.emit;function s(a){e("click",a)}return{emitClickEvent:s}};var St=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("svg",t._b({attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",width:"84",height:"84"},on:{click:t.emitClickEvent}},"svg",t.$attrs,!1),[e("circle",{attrs:{cx:"50",cy:"36.8101",r:"10"}},[e("animate",{attrs:{attributeName:"cy",dur:"1s",repeatCount:"indefinite",calcMode:"spline",keySplines:"0.45 0 0.9 0.55;0 0.45 0.55 0.9",keyTimes:"0;0.5;1",values:"23;77;23"}})])])},Tt=[],
|
|
25
|
+
L180.6,98.9z`}})])},Ct=[],Fe="";const Q={};var kt=E(K,$t,Ct,!1,Lt,"1120f0d2",null,null);function Lt(t){for(let n in Q)this[n]=Q[n]}var N=function(){return kt.exports}();const Z={};Z.setup=(t,n)=>{const e=n.emit;function s(a){e("click",a)}return{emitClickEvent:s}};var St=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("svg",t._b({attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",width:"84",height:"84"},on:{click:t.emitClickEvent}},"svg",t.$attrs,!1),[e("circle",{attrs:{cx:"50",cy:"36.8101",r:"10"}},[e("animate",{attrs:{attributeName:"cy",dur:"1s",repeatCount:"indefinite",calcMode:"spline",keySplines:"0.45 0 0.9 0.55;0 0.45 0.55 0.9",keyTimes:"0;0.5;1",values:"23;77;23"}})])])},Tt=[],Me="";const tt={};var Ft=E(Z,St,Tt,!1,Mt,"c6fd8106",null,null);function Mt(t){for(let n in tt)this[n]=tt[n]}var R=function(){return Ft.exports}();function Bt(t){let n=0,e=0;if(t.getBoundingClientRect){const s=t.getBoundingClientRect(),a=document.documentElement;n=s.left+Math.max(a.scrollLeft,document.body.scrollLeft)-a.clientLeft,e=s.top+Math.max(a.scrollTop,document.body.scrollTop)-a.clientTop}else for(;t!==document.body;)n+=t.offsetLeft,e+=t.offsetTop,t=t.offsetParent;return{domX:n,domY:e}}function O(t,n){let e=n.relatedTarget;try{for(;e&&e!==t;)e=e.parentNode}catch(s){console.warn(s)}return e!==t}function Dt(t,n){const e=i.reactive({list:[]});return{dots:e,clickEvent:o=>{const r=o.currentTarget,l=Bt(r),f=o.pageX||o.clientX,v=o.pageY||o.clientY,u=l.domX,h=l.domY,g=f-u,k=v-h,m=parseInt(g.toString()),b=parseInt(k.toString()),S=new Date,L=e.list.length,y=e.list;return y.push({key:S.getTime(),index:L+1,x:m,y:b}),e.list=y,n.click&&n.click(m,b),o.cancelBubble=!0,o.preventDefault(),!1},confirmEvent:o=>(n.confirm&&n.confirm(i.toRaw(e.list),()=>{e.list=[]}),o.cancelBubble=!0,o.preventDefault(),!1),closeEvent:o=>(n.close&&n.close(),e.list=[],o.cancelBubble=!0,o.preventDefault(),!1),refreshEvent:o=>(n.refresh&&n.refresh(),e.list=[],o.cancelBubble=!0,o.preventDefault(),!1)}}const D={};D.props={config:{key:"config",required:!1,type:null,default:U},events:{key:"events",required:!1,type:null,default:()=>({})},data:{key:"data",required:!1,type:null,default:()=>({})}},D.setup=(t,n)=>{const e=t,{data:s,events:a}=e,c=i.ref({...U(),...e.config});i.watch(()=>e.config,()=>{c.value={...c.value,...e.config}});const d=Dt(s,a),o=c.value.horizontalPadding||0,r=c.value.verticalPadding||0,l=(c.value.width||0)+o*2+(c.value.showTheme?2:0),f=d.dots,v=i.computed(()=>({width:l+"px",paddingLeft:o+"px",paddingRight:o+"px",paddingTop:r+"px",paddingBottom:r+"px"})),u=i.computed(()=>({width:c.value.thumbWidth+"px",height:c.value.thumbHeight+"px"})),h=i.computed(()=>({width:c.value.width+"px",height:c.value.height+"px"}));return{data:s,config:c,handler:d,dots:f,wrapperStyles:v,thumbStyles:u,imageStyles:h}},D.components=Object.assign({LoadingIcon:R,CloseIcon:A,RefreshIcon:N},D.components);var Pt=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{class:"go-captcha gc-wrapper "+(t.config.showTheme?"gc-theme":""),style:t.wrapperStyles},[e("div",{staticClass:"gc-header"},[e("span",[t._v(t._s(t.config.title))]),e("img",{directives:[{name:"show",rawName:"v-show",value:t.data.thumb!=="",expression:"data.thumb !== ''"}],style:t.thumbStyles,attrs:{src:t.data.thumb,alt:"..."}})]),e("div",{staticClass:"gc-body",style:t.imageStyles},[e("div",{staticClass:"gc-loading"},[e("loading-icon")],1),e("img",{directives:[{name:"show",rawName:"v-show",value:t.data.image!=="",expression:"data.image !== ''"}],staticClass:"gc-picture",style:t.imageStyles,attrs:{src:t.data.image,alt:"..."},on:{click:t.handler.clickEvent}}),e("div",{staticClass:"gc-dots"},t._l(t.dots.list,function(s){return e("div",{key:s.key+"-"+s.index,staticClass:"gc-dot",style:{top:s.y-11+"px",left:s.x-11+"px"}},[t._v(t._s(s.index))])}),0)]),e("div",{staticClass:"gc-footer"},[e("div",{staticClass:"gc-icon-block gc-icon-block2"},[e("close-icon",{attrs:{width:22,height:22},on:{click:t.handler.closeEvent}}),e("refresh-icon",{attrs:{width:22,height:22},on:{click:t.handler.refreshEvent}})],1),e("div",{staticClass:"gc-button-block"},[e("button",{on:{click:t.handler.confirmEvent}},[t._v(t._s(t.config.buttonText))])])])])},Xt=[],Be="";const et={};var zt=E(D,Pt,Xt,!1,Wt,null,null,null);function Wt(t){for(let n in et)this[n]=et[n]}var P=function(){return zt.exports}();P.name="gocaptcha-click",P.install=function(t){t.component("gocaptcha-click",P)};const nt=()=>({width:300,height:220,thumbWidth:150,thumbHeight:40,verticalPadding:16,horizontalPadding:12,showTheme:!0,title:"\u8BF7\u62D6\u52A8\u6ED1\u5757\u5B8C\u6210\u62FC\u56FE"}),st={};st.setup=(t,n)=>{const e=n.emit;function s(a){e("click",a)}return{emitClickEvent:s}};var It=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("svg",t._b({attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 200 200",width:"20",height:"20"},on:{click:t.emitClickEvent}},"svg",t.$attrs,!1),[e("path",{attrs:{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
|
|
26
26
|
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
|
|
27
|
-
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`}})])},jt=[],De="";const ct={};var qt=E(st,It,jt,!1,Yt,"30853052",null,null);function Yt(t){for(let n in ct)this[n]=ct[n]}var at=function(){return qt.exports}();function Ht(t,n,e,s,a,c){const d=i.reactive({dragLeft:0,thumbLeft:t.thumbX||0}),o=()=>{d.dragLeft=0,d.thumbLeft=0};return{state:d,dragEvent:v=>{const u=v.touches&&v.touches[0],h=a.value.offsetLeft,g=e.value.offsetWidth,k=a.value.offsetWidth,m=g-k,b=t.thumbX||0,S=s.value.offsetWidth,L=k-S,y=(m-b+L)/m;let p=!1,T=0,x=0;u?T=u.pageX-h:T=v.clientX-h;const F=_=>{p=!0;const M=_.touches&&_.touches[0];let w=0;if(M?w=M.pageX-T:w=_.clientX-T,w>=m){d.dragLeft=m;return}if(w<=0){d.dragLeft=0;return}d.dragLeft=w,x=b+w*y,d.thumbLeft=x,n.move&&n.move(x,t.thumbY||0),_.cancelBubble=!0,_.preventDefault()},$=_=>{!O(c.value,_)||!p||(c.value.removeEventListener("mousemove",F,!1),c.value.removeEventListener("touchmove",F,{passive:!1}),c.value.removeEventListener("mouseup",$,!1),c.value.removeEventListener("mouseout",$,!1),c.value.removeEventListener("touchend",$,!1),p=!1,n.confirm&&n.confirm({x:parseInt(x.toString()),y:t.thumbY||0},()=>{o()}),_.cancelBubble=!0,_.preventDefault())};c.value.addEventListener("mousemove",F,!1),c.value.addEventListener("touchmove",F,{passive:!1}),c.value.addEventListener("mouseup",$,!1),c.value.addEventListener("mouseout",$,!1),c.value.addEventListener("touchend",$,!1)},closeEvent:v=>(n&&n.close&&n.close(),o(),v.cancelBubble=!0,v.preventDefault(),!1),refreshEvent:v=>(n&&n.refresh&&n.refresh(),o(),v.cancelBubble=!0,v.preventDefault(),!1)}}const X={};X.props={config:{key:"config",required:!1,type:null,default:nt},events:{key:"events",required:!1,type:null,default:()=>({})},data:{key:"data",required:!1,type:null,default:()=>({})}},X.setup=(t,n)=>{const e=t,{data:s,events:a}=e,c=i.ref({...nt(),...e.config});i.watch(()=>e.config,()=>{c.value={...c.value,...e.config}});const d=i.ref(null),o=i.ref(null),r=i.ref(null),l=i.ref(null),f=Ht(s,a,o,l,r,d),v=c.value.horizontalPadding||0,u=c.value.verticalPadding||0,h=(c.value.width||0)+v*2+(c.value.showTheme?2:0),g=i.computed(()=>({width:h+"px",paddingLeft:v+"px",paddingRight:v+"px",paddingTop:u+"px",paddingBottom:u+"px"})),k=i.computed(()=>({width:s.thumbWidth+"px",height:s.thumbHeight+"px",top:s.thumbY+"px",left:f.state.thumbLeft+"px"})),m=i.computed(()=>({width:c.value.width+"px",height:c.value.height+"px"}));return i.onMounted(async()=>{await i.nextTick(),r.value&&r.value.addEventListener("dragstart",b=>b.preventDefault())}),{data:s,config:c,dragBarRef:d,containerRef:o,dragBlockRef:r,tileRef:l,handler:f,wrapperStyles:g,thumbStyles:k,imageStyles:m}},X.components=Object.assign({CloseIcon:A,RefreshIcon:N,LoadingIcon:R,ArrowsIcon:at},X.components);var At=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{class:"go-captcha gc-wrapper "+(t.config.showTheme?"gc-theme":""),style:t.wrapperStyles},[e("div",{staticClass:"gc-header"},[e("span",[t._v(t._s(t.config.title))]),e("div",{staticClass:"gc-icon-block"},[e("close-icon",{attrs:{width:22,height:22},on:{click:t.handler.closeEvent}}),e("refresh-icon",{attrs:{width:22,height:22},on:{click:t.handler.refreshEvent}})],1)]),e("div",{ref:"containerRef",staticClass:"gc-body",style:t.imageStyles},[e("div",{staticClass:"gc-loading"},[e("loading-icon")],1),e("img",{directives:[{name:"show",rawName:"v-show",value:t.data.image!=="",expression:"data.image !== ''"}],staticClass:"gc-picture",style:t.imageStyles,attrs:{src:t.data.image,alt:"..."}}),e("div",{ref:"tileRef",staticClass:"gc-tile",style:t.thumbStyles},[e("img",{directives:[{name:"show",rawName:"v-show",value:t.data.thumb!=="",expression:"data.thumb !== ''"}],attrs:{src:t.data.thumb,alt:"..."}})])]),e("div",{staticClass:"gc-footer"},[e("div",{ref:"dragBarRef",staticClass:"gc-drag-slide-bar",on:{mousedown:t.handler.dragEvent}},[e("div",{staticClass:"gc-drag-line"}),e("div",{ref:"dragBlockRef",staticClass:"gc-drag-block",style:{left:t.handler.state.dragLeft+"px"},on:{touchstart:t.handler.dragEvent}},[e("arrows-icon")],1)])])])},Nt=[],Pe="";const it={};var Rt=E(X,At,Nt,!1,Ot,null,null,null);function Ot(t){for(let n in it)this[n]=it[n]}var z=function(){return Rt.exports}();z.name="goCaptchaSlide",z.install=function(t){t.component("gocaptcha-slide",z)};const lt=()=>({width:300,height:220,verticalPadding:16,horizontalPadding:12,showTheme:!0,title:"\u8BF7\u62D6\u62FD\u8D34\u56FE\u5B8C\u6210\u62FC\u56FE"});function Vt(t,n,e,s){const a=i.reactive({x:t.thumbX||0,y:t.thumbY||0}),c=()=>{a.x=t.thumbX||0,a.y=t.thumbY||0};return{state:a,dragEvent:l=>{const f=l.touches&&l.touches[0],v=s.value.offsetLeft,u=s.value.offsetTop,h=e.value.offsetWidth,g=e.value.offsetHeight,k=s.value.offsetWidth,m=s.value.offsetHeight,b=h-k,S=g-m;let L=!1,y=0,p=0,T=0,x=0;f?(y=f.pageX-v,p=f.pageY-u):(y=l.clientX-v,p=l.clientY-u);const F=_=>{L=!0;const M=_.touches&&_.touches[0];let w=0,B=0;M?(w=M.pageX-y,B=M.pageY-p):(w=_.clientX-y,B=_.clientY-p),w<=0&&(w=0),B<=0&&(B=0),w>=b&&(w=b),B>=S&&(B=S),a.x=w,a.y=B,T=w,x=B,n.move&&n.move(w,B),_.cancelBubble=!0,_.preventDefault()},$=_=>{!O(e.value,_)||!L||(L=!1,e.value.removeEventListener("mousemove",F,!1),e.value.removeEventListener("touchmove",F,{passive:!1}),e.value.removeEventListener("mouseup",$,!1),e.value.removeEventListener("mouseout",$,!1),e.value.removeEventListener("touchend",$,!1),n.confirm&&n.confirm({x:T,y:x},()=>{c()}),_.cancelBubble=!0,_.preventDefault())};e.value.addEventListener("mousemove",F,!1),e.value.addEventListener("touchmove",F,{passive:!1}),e.value.addEventListener("mouseup",$,!1),e.value.addEventListener("mouseout",$,!1),e.value.addEventListener("touchend",$,!1)},closeEvent:l=>(n&&n.close&&n.close(),c(),l.cancelBubble=!0,l.preventDefault(),!1),refreshEvent:l=>(n&&n.refresh&&n.refresh(),c(),l.cancelBubble=!0,l.preventDefault(),!1)}}const W={};W.props={config:{key:"config",required:!1,type:null,default:lt},events:{key:"events",required:!1,type:null,default:()=>({})},data:{key:"data",required:!1,type:null,default:()=>({})}},W.setup=(t,n)=>{const e=t,{data:s,events:a}=e,c=i.ref({...lt(),...e.config});i.watch(()=>e.config,()=>{c.value={...c.value,...e.config}});const d=i.ref(null),o=i.ref(null),r=Vt(s,a,d,o),l=c.value.horizontalPadding||0,f=c.value.verticalPadding||0;let v=(c.value.width||0)+l*2+(c.value.showTheme?2:0);const u=i.computed(()=>({width:v+"px",paddingLeft:l+"px",paddingRight:l+"px",paddingTop:f+"px",paddingBottom:f+"px"})),h=i.computed(()=>({width:s.thumbWidth+"px",height:s.thumbHeight+"px",top:r.state.y+"px",left:r.state.x+"px"})),g=i.computed(()=>({width:c.value.width+"px",height:c.value.height+"px"}));return i.onMounted(async()=>{await i.nextTick(),o.value&&o.value.addEventListener("dragstart",k=>k.preventDefault())}),{data:s,config:c,containerRef:d,tileRef:o,handler:r,wrapperStyles:u,thumbStyles:h,imageStyles:g}},W.components=Object.assign({LoadingIcon:R,CloseIcon:A,RefreshIcon:N},W.components);var Ut=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{class:"go-captcha gc-wrapper "+(t.config.showTheme?"gc-theme":""),style:t.wrapperStyles},[e("div",{staticClass:"gc-header gc-header2"},[e("span",[t._v(t._s(t.config.title))])]),e("div",{ref:"containerRef",staticClass:"gc-body",style:t.imageStyles},[e("div",{staticClass:"gc-loading"},[e("loading-icon")],1),e("img",{directives:[{name:"show",rawName:"v-show",value:t.data.image!=="",expression:"data.image !== ''"}],staticClass:"gc-picture",style:t.imageStyles,attrs:{src:t.data.image,alt:"..."}}),e("div",{ref:"tileRef",staticClass:"gc-tile",style:t.thumbStyles,on:{mousedown:t.handler.dragEvent,touchstart:t.handler.dragEvent}},[e("img",{directives:[{name:"show",rawName:"v-show",value:t.data.thumb!=="",expression:"data.thumb !== ''"}],attrs:{src:t.data.thumb,alt:"..."}})])]),e("div",{staticClass:"gc-footer"},[e("div",{staticClass:"gc-icon-block"},[e("close-icon",{attrs:{width:22,height:22},on:{click:t.handler.closeEvent}}),e("refresh-icon",{attrs:{width:22,height:22},on:{click:t.handler.refreshEvent}})],1)])])},Gt=[],Xe="";const ot={};var Jt=E(W,Ut,Gt,!1,Kt,null,null,null);function Kt(t){for(let n in ot)this[n]=ot[n]}var I=function(){return Jt.exports}();I.name="goCaptchaSlideRegion",I.install=function(t){t.component("gocaptcha-slide-region",I)};const V=()=>({width:300,height:220,size:220,verticalPadding:16,horizontalPadding:12,showTheme:!0,title:"\u8BF7\u62D6\u52A8\u6ED1\u5757\u5B8C\u6210\u62FC\u56FE"});function Qt(t,n,e,s){const a=i.reactive({dragLeft:0,thumbAngle:t.angle||0}),c=()=>{a.dragLeft=0,a.thumbAngle=0};return{state:a,dragEvent:l=>{const f=l.touches&&l.touches[0],v=e.value.offsetLeft,u=s.value.offsetWidth,h=e.value.offsetWidth,g=u-h,k=360/g;let m=0,b=!1,S=0;f?S=f.pageX-v:S=l.clientX-v;const L=p=>{b=!0;const T=p.touches&&p.touches[0];let x=0;if(T?x=T.pageX-S:x=p.clientX-S,x>=g){a.dragLeft=g;return}if(x<=0){a.dragLeft=0;return}a.dragLeft=x,m=x*k,a.thumbAngle=m,n.rotate&&n.rotate(m),p.cancelBubble=!0,p.preventDefault()},y=p=>{!O(s.value,p)||!b||(s.value.removeEventListener("mousemove",L,!1),s.value.removeEventListener("touchmove",L,{passive:!1}),s.value.removeEventListener("mouseup",y,!1),s.value.removeEventListener("mouseout",y,!1),s.value.removeEventListener("touchend",y,!1),b=!1,n.confirm&&n.confirm(parseInt(m.toString()),()=>{c()}),p.cancelBubble=!0,p.preventDefault())};s.value.addEventListener("mousemove",L,!1),s.value.addEventListener("touchmove",L,{passive:!1}),s.value.addEventListener("mouseup",y,!1),s.value.addEventListener("mouseout",y,!1),s.value.addEventListener("touchend",y,!1)},closeEvent:l=>(n&&n.close&&n.close(),c(),l.cancelBubble=!0,l.preventDefault(),!1),refreshEvent:l=>(n&&n.refresh&&n.refresh(),c(),l.cancelBubble=!0,l.preventDefault(),!1)}}const j={};j.props={config:{key:"config",required:!1,type:null,default:V},events:{key:"events",required:!1,type:null,default:()=>({})},data:{key:"data",required:!1,type:null,default:()=>({})}},j.setup=(t,n)=>{const e=t,{data:s,events:a}=e,c=i.ref({...V(),...e.config});i.watch(()=>e.config,()=>{c.value={...c.value,...e.config}});const d=i.ref(null),o=i.ref(null),r=Qt(s,a,o,d),l=i.computed(()=>{const u=c.value.horizontalPadding||0,h=c.value.verticalPadding||0;return{width:(c.value.width||0)+u*2+(c.value.showTheme?2:0)+"px",paddingLeft:u+"px",paddingRight:u+"px",paddingTop:h+"px",paddingBottom:h+"px"}}),f=i.computed(()=>({transform:`rotate(${r.state.thumbAngle}deg)`})),v=i.computed(()=>{var h;const u=(((h=c.value)==null?void 0:h.size)||0)>0?c.value.size:V().size;return{width:u+"px",height:u+"px"}});return i.onMounted(async()=>{await i.nextTick(),o.value&&o.value.addEventListener("dragstart",u=>u.preventDefault())}),{data:s,config:c,dragBarRef:d,dragBlockRef:o,handler:r,wrapperStyles:l,thumbStyles:f,imageStyles:v}},j.components=Object.assign({CloseIcon:A,RefreshIcon:N,LoadingIcon:R,ArrowsIcon:at},j.components);var Zt=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{class:"go-captcha gc-wrapper "+(t.config.showTheme?"gc-theme":""),style:t.wrapperStyles},[e("div",{staticClass:"gc-header"},[e("span",[t._v(t._s(t.config.title))]),e("div",{staticClass:"gc-icon-block"},[e("close-icon",{attrs:{width:22,height:22},on:{click:t.handler.closeEvent}}),e("refresh-icon",{attrs:{width:22,height:22},on:{click:t.handler.refreshEvent}})],1)]),e("div",{ref:"containerRef",staticClass:"gc-body gc-rotate-body",style:t.imageStyles},[e("div",{staticClass:"gc-loading"},[e("loading-icon")],1),e("div",{staticClass:"gc-picture gc-rotate-picture",style:t.imageStyles},[e("img",{directives:[{name:"show",rawName:"v-show",value:t.data.image!=="",expression:"data.image !== ''"}],attrs:{src:t.data.image,alt:"..."}}),e("div",{staticClass:"gc-round"})]),e("div",{staticClass:"gc-thumb gc-rotate-thumb"},[e("div",{staticClass:"gc-rotate-thumb-block",style:t.thumbStyles},[e("img",{directives:[{name:"show",rawName:"v-show",value:t.data.thumb!=="",expression:"data.thumb !== ''"}],attrs:{src:t.data.thumb,alt:"..."}})])])]),e("div",{staticClass:"gc-footer"},[e("div",{ref:"dragBarRef",staticClass:"gc-drag-slide-bar",on:{mousedown:t.handler.dragEvent}},[e("div",{staticClass:"gc-drag-line"}),e("div",{ref:"dragBlockRef",staticClass:"gc-drag-block",style:{left:t.handler.state.dragLeft+"px"},on:{touchstart:t.handler.dragEvent}},[e("arrows-icon")],1)])])])},te=[],ze="";const rt={};var ee=E(j,Zt,te,!1,ne,null,null,null);function ne(t){for(let n in rt)this[n]=rt[n]}var q=function(){return ee.exports}();q.name="goCaptchaRotate",q.install=function(t){t.component("gocaptcha-rotate",q)};const ut={};ut.setup=(t,n)=>{const e=n.emit;function s(a){e("click",a)}return{emitClickEvent:s}};var se=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("svg",t._b({attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 200 200",width:"20",height:"20"},on:{click:t.emitClickEvent}},"svg",t.$attrs,!1),[e("circle",{attrs:{fill:"#3E7CFF",cx:"100",cy:"100",r:"96.3"}}),e("path",{attrs:{fill:"#FFFFFF",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
|
|
27
|
+
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`}})])},jt=[],De="";const ct={};var qt=E(st,It,jt,!1,Yt,"30853052",null,null);function Yt(t){for(let n in ct)this[n]=ct[n]}var at=function(){return qt.exports}();function Ht(t,n,e,s,a,c){const d=i.reactive({dragLeft:0,thumbLeft:t.thumbX||0}),o=()=>{d.dragLeft=0,d.thumbLeft=0};return{state:d,dragEvent:v=>{const u=v.touches&&v.touches[0],h=a.value.offsetLeft,g=e.value.offsetWidth,k=a.value.offsetWidth,m=g-k,b=t.thumbX||0,S=s.value.offsetWidth,L=k-S,y=(m-b+L)/m;let p=!1,T=0,x=0;u?T=u.pageX-h:T=v.clientX-h;const F=_=>{p=!0;const B=_.touches&&_.touches[0];let w=0;if(B?w=B.pageX-T:w=_.clientX-T,w>=m){d.dragLeft=m;return}if(w<=0){d.dragLeft=0;return}d.dragLeft=w,x=b+w*y,d.thumbLeft=x,n.move&&n.move(x,t.thumbY||0),_.cancelBubble=!0,_.preventDefault()},$=_=>{!O(c.value,_)||!p||(c.value.removeEventListener("mousemove",F,!1),c.value.removeEventListener("touchmove",F,{passive:!1}),c.value.removeEventListener("mouseup",$,!1),c.value.removeEventListener("mouseout",$,!1),c.value.removeEventListener("touchend",$,!1),p=!1,n.confirm&&n.confirm({x:parseInt(x.toString()),y:t.thumbY||0},()=>{o()}),_.cancelBubble=!0,_.preventDefault())};c.value.addEventListener("mousemove",F,!1),c.value.addEventListener("touchmove",F,{passive:!1}),c.value.addEventListener("mouseup",$,!1),c.value.addEventListener("mouseout",$,!1),c.value.addEventListener("touchend",$,!1)},closeEvent:v=>(n&&n.close&&n.close(),o(),v.cancelBubble=!0,v.preventDefault(),!1),refreshEvent:v=>(n&&n.refresh&&n.refresh(),o(),v.cancelBubble=!0,v.preventDefault(),!1)}}const X={};X.props={config:{key:"config",required:!1,type:null,default:nt},events:{key:"events",required:!1,type:null,default:()=>({})},data:{key:"data",required:!1,type:null,default:()=>({})}},X.setup=(t,n)=>{const e=t,{data:s,events:a}=e,c=i.ref({...nt(),...e.config});i.watch(()=>e.config,()=>{c.value={...c.value,...e.config}});const d=i.ref(null),o=i.ref(null),r=i.ref(null),l=i.ref(null),f=Ht(s,a,o,l,r,d),v=c.value.horizontalPadding||0,u=c.value.verticalPadding||0,h=(c.value.width||0)+v*2+(c.value.showTheme?2:0),g=i.computed(()=>({width:h+"px",paddingLeft:v+"px",paddingRight:v+"px",paddingTop:u+"px",paddingBottom:u+"px"})),k=i.computed(()=>({width:s.thumbWidth+"px",height:s.thumbHeight+"px",top:s.thumbY+"px",left:f.state.thumbLeft+"px"})),m=i.computed(()=>({width:c.value.width+"px",height:c.value.height+"px"}));return i.onMounted(async()=>{await i.nextTick(),r.value&&r.value.addEventListener("dragstart",b=>b.preventDefault())}),{data:s,config:c,dragBarRef:d,containerRef:o,dragBlockRef:r,tileRef:l,handler:f,wrapperStyles:g,thumbStyles:k,imageStyles:m}},X.components=Object.assign({CloseIcon:A,RefreshIcon:N,LoadingIcon:R,ArrowsIcon:at},X.components);var At=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{class:"go-captcha gc-wrapper "+(t.config.showTheme?"gc-theme":""),style:t.wrapperStyles},[e("div",{staticClass:"gc-header"},[e("span",[t._v(t._s(t.config.title))]),e("div",{staticClass:"gc-icon-block"},[e("close-icon",{attrs:{width:22,height:22},on:{click:t.handler.closeEvent}}),e("refresh-icon",{attrs:{width:22,height:22},on:{click:t.handler.refreshEvent}})],1)]),e("div",{ref:"containerRef",staticClass:"gc-body",style:t.imageStyles},[e("div",{staticClass:"gc-loading"},[e("loading-icon")],1),e("img",{directives:[{name:"show",rawName:"v-show",value:t.data.image!=="",expression:"data.image !== ''"}],staticClass:"gc-picture",style:t.imageStyles,attrs:{src:t.data.image,alt:"..."}}),e("div",{ref:"tileRef",staticClass:"gc-tile",style:t.thumbStyles},[e("img",{directives:[{name:"show",rawName:"v-show",value:t.data.thumb!=="",expression:"data.thumb !== ''"}],attrs:{src:t.data.thumb,alt:"..."}})])]),e("div",{staticClass:"gc-footer"},[e("div",{ref:"dragBarRef",staticClass:"gc-drag-slide-bar",on:{mousedown:t.handler.dragEvent}},[e("div",{staticClass:"gc-drag-line"}),e("div",{ref:"dragBlockRef",staticClass:"gc-drag-block",style:{left:t.handler.state.dragLeft+"px"},on:{touchstart:t.handler.dragEvent}},[e("arrows-icon")],1)])])])},Nt=[],Pe="";const it={};var Rt=E(X,At,Nt,!1,Ot,null,null,null);function Ot(t){for(let n in it)this[n]=it[n]}var z=function(){return Rt.exports}();z.name="gocaptcha-slide",z.install=function(t){t.component("gocaptcha-slide",z)};const lt=()=>({width:300,height:220,verticalPadding:16,horizontalPadding:12,showTheme:!0,title:"\u8BF7\u62D6\u62FD\u8D34\u56FE\u5B8C\u6210\u62FC\u56FE"});function Vt(t,n,e,s){const a=i.reactive({x:t.thumbX||0,y:t.thumbY||0}),c=()=>{a.x=t.thumbX||0,a.y=t.thumbY||0};return{state:a,dragEvent:l=>{const f=l.touches&&l.touches[0],v=s.value.offsetLeft,u=s.value.offsetTop,h=e.value.offsetWidth,g=e.value.offsetHeight,k=s.value.offsetWidth,m=s.value.offsetHeight,b=h-k,S=g-m;let L=!1,y=0,p=0,T=0,x=0;f?(y=f.pageX-v,p=f.pageY-u):(y=l.clientX-v,p=l.clientY-u);const F=_=>{L=!0;const B=_.touches&&_.touches[0];let w=0,M=0;B?(w=B.pageX-y,M=B.pageY-p):(w=_.clientX-y,M=_.clientY-p),w<=0&&(w=0),M<=0&&(M=0),w>=b&&(w=b),M>=S&&(M=S),a.x=w,a.y=M,T=w,x=M,n.move&&n.move(w,M),_.cancelBubble=!0,_.preventDefault()},$=_=>{!O(e.value,_)||!L||(L=!1,e.value.removeEventListener("mousemove",F,!1),e.value.removeEventListener("touchmove",F,{passive:!1}),e.value.removeEventListener("mouseup",$,!1),e.value.removeEventListener("mouseout",$,!1),e.value.removeEventListener("touchend",$,!1),n.confirm&&n.confirm({x:T,y:x},()=>{c()}),_.cancelBubble=!0,_.preventDefault())};e.value.addEventListener("mousemove",F,!1),e.value.addEventListener("touchmove",F,{passive:!1}),e.value.addEventListener("mouseup",$,!1),e.value.addEventListener("mouseout",$,!1),e.value.addEventListener("touchend",$,!1)},closeEvent:l=>(n&&n.close&&n.close(),c(),l.cancelBubble=!0,l.preventDefault(),!1),refreshEvent:l=>(n&&n.refresh&&n.refresh(),c(),l.cancelBubble=!0,l.preventDefault(),!1)}}const W={};W.props={config:{key:"config",required:!1,type:null,default:lt},events:{key:"events",required:!1,type:null,default:()=>({})},data:{key:"data",required:!1,type:null,default:()=>({})}},W.setup=(t,n)=>{const e=t,{data:s,events:a}=e,c=i.ref({...lt(),...e.config});i.watch(()=>e.config,()=>{c.value={...c.value,...e.config}});const d=i.ref(null),o=i.ref(null),r=Vt(s,a,d,o),l=c.value.horizontalPadding||0,f=c.value.verticalPadding||0;let v=(c.value.width||0)+l*2+(c.value.showTheme?2:0);const u=i.computed(()=>({width:v+"px",paddingLeft:l+"px",paddingRight:l+"px",paddingTop:f+"px",paddingBottom:f+"px"})),h=i.computed(()=>({width:s.thumbWidth+"px",height:s.thumbHeight+"px",top:r.state.y+"px",left:r.state.x+"px"})),g=i.computed(()=>({width:c.value.width+"px",height:c.value.height+"px"}));return i.onMounted(async()=>{await i.nextTick(),o.value&&o.value.addEventListener("dragstart",k=>k.preventDefault())}),{data:s,config:c,containerRef:d,tileRef:o,handler:r,wrapperStyles:u,thumbStyles:h,imageStyles:g}},W.components=Object.assign({LoadingIcon:R,CloseIcon:A,RefreshIcon:N},W.components);var Ut=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{class:"go-captcha gc-wrapper "+(t.config.showTheme?"gc-theme":""),style:t.wrapperStyles},[e("div",{staticClass:"gc-header gc-header2"},[e("span",[t._v(t._s(t.config.title))])]),e("div",{ref:"containerRef",staticClass:"gc-body",style:t.imageStyles},[e("div",{staticClass:"gc-loading"},[e("loading-icon")],1),e("img",{directives:[{name:"show",rawName:"v-show",value:t.data.image!=="",expression:"data.image !== ''"}],staticClass:"gc-picture",style:t.imageStyles,attrs:{src:t.data.image,alt:"..."}}),e("div",{ref:"tileRef",staticClass:"gc-tile",style:t.thumbStyles,on:{mousedown:t.handler.dragEvent,touchstart:t.handler.dragEvent}},[e("img",{directives:[{name:"show",rawName:"v-show",value:t.data.thumb!=="",expression:"data.thumb !== ''"}],attrs:{src:t.data.thumb,alt:"..."}})])]),e("div",{staticClass:"gc-footer"},[e("div",{staticClass:"gc-icon-block"},[e("close-icon",{attrs:{width:22,height:22},on:{click:t.handler.closeEvent}}),e("refresh-icon",{attrs:{width:22,height:22},on:{click:t.handler.refreshEvent}})],1)])])},Gt=[],Xe="";const ot={};var Jt=E(W,Ut,Gt,!1,Kt,null,null,null);function Kt(t){for(let n in ot)this[n]=ot[n]}var I=function(){return Jt.exports}();I.name="gocaptcha-slide-region",I.install=function(t){t.component("gocaptcha-slide-region",I)};const V=()=>({width:300,height:220,size:220,verticalPadding:16,horizontalPadding:12,showTheme:!0,title:"\u8BF7\u62D6\u52A8\u6ED1\u5757\u5B8C\u6210\u62FC\u56FE"});function Qt(t,n,e,s){const a=i.reactive({dragLeft:0,thumbAngle:t.angle||0}),c=()=>{a.dragLeft=0,a.thumbAngle=0};return{state:a,dragEvent:l=>{const f=l.touches&&l.touches[0],v=e.value.offsetLeft,u=s.value.offsetWidth,h=e.value.offsetWidth,g=u-h,k=360/g;let m=0,b=!1,S=0;f?S=f.pageX-v:S=l.clientX-v;const L=p=>{b=!0;const T=p.touches&&p.touches[0];let x=0;if(T?x=T.pageX-S:x=p.clientX-S,x>=g){a.dragLeft=g;return}if(x<=0){a.dragLeft=0;return}a.dragLeft=x,m=x*k,a.thumbAngle=m,n.rotate&&n.rotate(m),p.cancelBubble=!0,p.preventDefault()},y=p=>{!O(s.value,p)||!b||(s.value.removeEventListener("mousemove",L,!1),s.value.removeEventListener("touchmove",L,{passive:!1}),s.value.removeEventListener("mouseup",y,!1),s.value.removeEventListener("mouseout",y,!1),s.value.removeEventListener("touchend",y,!1),b=!1,n.confirm&&n.confirm(parseInt(m.toString()),()=>{c()}),p.cancelBubble=!0,p.preventDefault())};s.value.addEventListener("mousemove",L,!1),s.value.addEventListener("touchmove",L,{passive:!1}),s.value.addEventListener("mouseup",y,!1),s.value.addEventListener("mouseout",y,!1),s.value.addEventListener("touchend",y,!1)},closeEvent:l=>(n&&n.close&&n.close(),c(),l.cancelBubble=!0,l.preventDefault(),!1),refreshEvent:l=>(n&&n.refresh&&n.refresh(),c(),l.cancelBubble=!0,l.preventDefault(),!1)}}const j={};j.props={config:{key:"config",required:!1,type:null,default:V},events:{key:"events",required:!1,type:null,default:()=>({})},data:{key:"data",required:!1,type:null,default:()=>({})}},j.setup=(t,n)=>{const e=t,{data:s,events:a}=e,c=i.ref({...V(),...e.config});i.watch(()=>e.config,()=>{c.value={...c.value,...e.config}});const d=i.ref(null),o=i.ref(null),r=Qt(s,a,o,d),l=i.computed(()=>{const u=c.value.horizontalPadding||0,h=c.value.verticalPadding||0;return{width:(c.value.width||0)+u*2+(c.value.showTheme?2:0)+"px",paddingLeft:u+"px",paddingRight:u+"px",paddingTop:h+"px",paddingBottom:h+"px"}}),f=i.computed(()=>({transform:`rotate(${r.state.thumbAngle}deg)`})),v=i.computed(()=>{var h;const u=(((h=c.value)==null?void 0:h.size)||0)>0?c.value.size:V().size;return{width:u+"px",height:u+"px"}});return i.onMounted(async()=>{await i.nextTick(),o.value&&o.value.addEventListener("dragstart",u=>u.preventDefault())}),{data:s,config:c,dragBarRef:d,dragBlockRef:o,handler:r,wrapperStyles:l,thumbStyles:f,imageStyles:v}},j.components=Object.assign({CloseIcon:A,RefreshIcon:N,LoadingIcon:R,ArrowsIcon:at},j.components);var Zt=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{class:"go-captcha gc-wrapper "+(t.config.showTheme?"gc-theme":""),style:t.wrapperStyles},[e("div",{staticClass:"gc-header"},[e("span",[t._v(t._s(t.config.title))]),e("div",{staticClass:"gc-icon-block"},[e("close-icon",{attrs:{width:22,height:22},on:{click:t.handler.closeEvent}}),e("refresh-icon",{attrs:{width:22,height:22},on:{click:t.handler.refreshEvent}})],1)]),e("div",{ref:"containerRef",staticClass:"gc-body gc-rotate-body",style:t.imageStyles},[e("div",{staticClass:"gc-loading"},[e("loading-icon")],1),e("div",{staticClass:"gc-picture gc-rotate-picture",style:t.imageStyles},[e("img",{directives:[{name:"show",rawName:"v-show",value:t.data.image!=="",expression:"data.image !== ''"}],attrs:{src:t.data.image,alt:"..."}}),e("div",{staticClass:"gc-round"})]),e("div",{staticClass:"gc-thumb gc-rotate-thumb"},[e("div",{staticClass:"gc-rotate-thumb-block",style:t.thumbStyles},[e("img",{directives:[{name:"show",rawName:"v-show",value:t.data.thumb!=="",expression:"data.thumb !== ''"}],attrs:{src:t.data.thumb,alt:"..."}})])])]),e("div",{staticClass:"gc-footer"},[e("div",{ref:"dragBarRef",staticClass:"gc-drag-slide-bar",on:{mousedown:t.handler.dragEvent}},[e("div",{staticClass:"gc-drag-line"}),e("div",{ref:"dragBlockRef",staticClass:"gc-drag-block",style:{left:t.handler.state.dragLeft+"px"},on:{touchstart:t.handler.dragEvent}},[e("arrows-icon")],1)])])])},te=[],ze="";const rt={};var ee=E(j,Zt,te,!1,ne,null,null,null);function ne(t){for(let n in rt)this[n]=rt[n]}var q=function(){return ee.exports}();q.name="gocaptcha-rotate",q.install=function(t){t.component("gocaptcha-rotate",q)};const ut={};ut.setup=(t,n)=>{const e=n.emit;function s(a){e("click",a)}return{emitClickEvent:s}};var se=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("svg",t._b({attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 200 200",width:"20",height:"20"},on:{click:t.emitClickEvent}},"svg",t.$attrs,!1),[e("circle",{attrs:{fill:"#3E7CFF",cx:"100",cy:"100",r:"96.3"}}),e("path",{attrs:{fill:"#FFFFFF",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
|
|
28
28
|
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`}})])},ce=[],We="";const dt={};var ae=E(ut,se,ce,!1,ie,"5511614f",null,null);function ie(t){for(let n in dt)this[n]=dt[n]}var le=function(){return ae.exports}();const vt={};vt.setup=(t,n)=>{const e=n.emit;function s(a){e("click",a)}return{emitClickEvent:s}};var oe=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("svg",t._b({attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 200 200",width:"20",height:"20"},on:{click:t.emitClickEvent}},"svg",t.$attrs,!1),[e("path",{attrs:{fill:"#FFA000",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
|
|
29
29
|
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
|
|
30
30
|
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
|
|
@@ -36,4 +36,4 @@
|
|
|
36
36
|
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`}})])},he=[],je="";const _t={};var _e=E(ht,fe,he,!1,pe,"6c20e1c2",null,null);function pe(t){for(let n in _t)this[n]=_t[n]}var ge=function(){return _e.exports}();const pt={};pt.setup=(t,n)=>{const e=n.emit;function s(a){e("click",a)}return{emitClickEvent:s}};var me=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("svg",t._b({attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 200 200",width:"20",height:"20"},on:{click:t.emitClickEvent}},"svg",t.$attrs,!1),[e("path",{attrs:{fill:"#5EAA2F",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
|
|
37
37
|
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
|
|
38
38
|
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
|
|
39
|
-
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`}})])},ye=[],qe="";const gt={};var we=E(pt,me,ye,!1,be,"5a795cd4",null,null);function be(t){for(let n in gt)this[n]=gt[n]}var xe=function(){return we.exports}();const mt=()=>({width:330,height:44,verticalPadding:12,horizontalPadding:16}),Y={};Y.props={config:{key:"config",required:!1,type:null,default:mt},clickEvent:{key:"clickEvent",required:!1,type:Function},disabled:{key:"disabled",required:!1,type:Boolean,default:!1},type:{key:"type",required:!1,type:null,default:"default"},title:{key:"title",required:!1,type:String,default:"\u70B9\u51FB\u6309\u952E\u8FDB\u884C\u9A8C\u8BC1"}},Y.setup=(t,n)=>{const e=t,{type:s,title:a,disabled:c}=i.toRefs(e),d=i.ref({...mt(),...e.config});i.watch(()=>e.config,()=>{d.value={...d.value,...e.config}});const o=i.computed(()=>{const v=`gc-${s.value}`;return["go-captcha","gc-btn-block",v,c.value?"gc-disabled":""]}),r=i.computed(()=>({width:d.value.width+"px",height:d.value.height+"px",paddingLeft:d.value.horizontalPadding+"px",paddingRight:d.value.horizontalPadding+"px",paddingTop:d.value.verticalPadding+"px",paddingBottom:d.value.verticalPadding+"px"})),l=n.emit;function f(v){l("click-event",v)}return{type:s,title:a,btnClass:o,btnStyle:r,emitClickEvent:f}},Y.components=Object.assign({BtnDefaultIcon:le,BtnWarnIcon:ve,BtnErrorIcon:ge,BtnSuccessIcon:xe},Y.components);var Ee=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{class:t.btnClass,style:t.btnStyle,on:{click:t.emitClickEvent}},[e("div",{class:t.type==="default"?"gc-ripple":""},[t.type==="default"?e("btn-default-icon"):t.type==="warn"?e("btn-warn-icon"):t.type==="error"?e("btn-error-icon"):t.type==="success"?e("btn-success-icon"):t._e()],1),e("span",[t._v(t._s(t.title))])])},$e=[],Ye="";const yt={};var Ce=E(Y,Ee,$e,!1,ke,null,null,null);function ke(t){for(let n in yt)this[n]=yt[n]}var H=function(){return Ce.exports}();H.name="
|
|
39
|
+
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`}})])},ye=[],qe="";const gt={};var we=E(pt,me,ye,!1,be,"5a795cd4",null,null);function be(t){for(let n in gt)this[n]=gt[n]}var xe=function(){return we.exports}();const mt=()=>({width:330,height:44,verticalPadding:12,horizontalPadding:16}),Y={};Y.props={config:{key:"config",required:!1,type:null,default:mt},clickEvent:{key:"clickEvent",required:!1,type:Function},disabled:{key:"disabled",required:!1,type:Boolean,default:!1},type:{key:"type",required:!1,type:null,default:"default"},title:{key:"title",required:!1,type:String,default:"\u70B9\u51FB\u6309\u952E\u8FDB\u884C\u9A8C\u8BC1"}},Y.setup=(t,n)=>{const e=t,{type:s,title:a,disabled:c}=i.toRefs(e),d=i.ref({...mt(),...e.config});i.watch(()=>e.config,()=>{d.value={...d.value,...e.config}});const o=i.computed(()=>{const v=`gc-${s.value}`;return["go-captcha","gc-btn-block",v,c.value?"gc-disabled":""]}),r=i.computed(()=>({width:d.value.width+"px",height:d.value.height+"px",paddingLeft:d.value.horizontalPadding+"px",paddingRight:d.value.horizontalPadding+"px",paddingTop:d.value.verticalPadding+"px",paddingBottom:d.value.verticalPadding+"px"})),l=n.emit;function f(v){l("click-event",v)}return{type:s,title:a,btnClass:o,btnStyle:r,emitClickEvent:f}},Y.components=Object.assign({BtnDefaultIcon:le,BtnWarnIcon:ve,BtnErrorIcon:ge,BtnSuccessIcon:xe},Y.components);var Ee=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{class:t.btnClass,style:t.btnStyle,on:{click:t.emitClickEvent}},[e("div",{class:t.type==="default"?"gc-ripple":""},[t.type==="default"?e("btn-default-icon"):t.type==="warn"?e("btn-warn-icon"):t.type==="error"?e("btn-error-icon"):t.type==="success"?e("btn-success-icon"):t._e()],1),e("span",[t._v(t._s(t.title))])])},$e=[],Ye="";const yt={};var Ce=E(Y,Ee,$e,!1,ke,null,null,null);function ke(t){for(let n in yt)this[n]=yt[n]}var H=function(){return Ce.exports}();H.name="gocaptcha-button",H.install=function(t){t.component("gocaptcha-button",H)};const Le={install(t){P.install(t),z.install(t),I.install(t),q.install(t),H.install(t)}};C.Button=H,C.Click=P,C.Rotate=q,C.Slide=z,C.SlideRegion=I,C.default=Le,Object.defineProperties(C,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "go-captcha-vue",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,6 +25,19 @@
|
|
|
25
25
|
"module": "dist/go-captcha-vue.es.js",
|
|
26
26
|
"types": "./dist/index.d.ts",
|
|
27
27
|
"typings": "./dist/index.d.ts",
|
|
28
|
+
"exports": {
|
|
29
|
+
".": {
|
|
30
|
+
"import": {
|
|
31
|
+
"node": "./dist/go-captcha-vue.es.js",
|
|
32
|
+
"default": "./dist/go-captcha-vue.es.js"
|
|
33
|
+
},
|
|
34
|
+
"require": "./dist/go-captcha-vue.es.js",
|
|
35
|
+
"types": "./dist/index.d.ts"
|
|
36
|
+
},
|
|
37
|
+
"./dist/*": "./dist/*",
|
|
38
|
+
"./env.d.ts": "./env.d.ts",
|
|
39
|
+
"./package.json": "./package.json"
|
|
40
|
+
},
|
|
28
41
|
"files": [
|
|
29
42
|
"dist/*",
|
|
30
43
|
"env.d.ts"
|