Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-geetest-captcha

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-geetest-captcha - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

lib/Loading.js

4

dist/react-geetest-captcha.min.js
/**
* react-geetest-captcha v0.0.4
* react-geetest-captcha v0.0.5
*

@@ -26,2 +26,2 @@ * MIT License

*/
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["react-geetest-captcha"]=t():e["react-geetest-captcha"]=t()}("undefined"!=typeof self?self:this,function(){return function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=6)}([function(e,t,n){function o(e){if(!u(e))return!1;var t=r(e);return t==c||t==a||t==i||t==l}var r=n(1),u=n(3),i="[object AsyncFunction]",c="[object Function]",a="[object GeneratorFunction]",l="[object Proxy]";e.exports=o},function(e,t,n){function o(e){return null==e?void 0===e?a:c:l&&l in Object(e)?u(e):i(e)}var r=n(2),u=n(10),i=n(11),c="[object Null]",a="[object Undefined]",l=r?r.toStringTag:void 0;e.exports=o},function(e,t,n){var o=n(7),r=o.Symbol;e.exports=r},function(e,t){function n(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}e.exports=n},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e){return(0,a.default)(e)&&0!==e.length}var i,c,a,l,f,s;Object.defineProperty(t,"__esModule",{value:!0}),i=function(){function e(e,t){var n,o;for(n=0;n<t.length;n++)o=t[n],o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),c=n(12),a=o(c),l=n(0),f=o(l),s=function(){function e(){r(this,e),this.instances={}}return i(e,[{key:"add",value:function(e,t){this.get(e)&&this.remove(e),this.instances[e]=t}},{key:"get",value:function(e){return this.exist(e)?this.instances[e]:null}},{key:"remove",value:function(e){var t=this.get(e);t&&(0,f.default)(t.destroy)&&t.destroy(),delete this.instances[e]}},{key:"exist",value:function(e){return u(e)&&Object.prototype.hasOwnProperty.call(this.instances,e)}}]),e}(),t.default=new s},function(e,t,n){"use strict";function o(e){return function(){return e}}var r=function(){};r.thatReturns=o,r.thatReturnsFalse=o(!1),r.thatReturnsTrue=o(!0),r.thatReturnsNull=o(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){var n=p.default.get(e);return n&&(0,f.default)(n.appendTo)?n.appendTo(t):null}function u(e,t){var n=p.default.get(e);return n&&(0,f.default)(n.bindForm)?n.bindForm(t):null}function i(e){var t=p.default.get(e);return t&&(0,f.default)(t.getValidate)?t.getValidate():null}function c(e){var t=p.default.get(e);return t&&(0,f.default)(t.reset)?t.reset():null}function a(e){var t=p.default.get(e);return t&&(0,f.default)(t.verify)?t.verify():null}var l,f,s,p,d,y;Object.defineProperty(t,"__esModule",{value:!0}),t.storage=t.RGCaptcha=void 0,t.appendTo=r,t.bindForm=u,t.getValidate=i,t.reset=c,t.verify=a,l=n(0),f=o(l),s=n(4),p=o(s),d=n(15),y=o(d),t.RGCaptcha=y.default,t.storage=p.default,t.default={storage:p.default,RGCaptcha:y.default,appendTo:r,bindForm:u,getValidate:i,reset:c,verify:a}},function(e,t,n){var o=n(8),r="object"==typeof self&&self&&self.Object===Object&&self,u=o||r||Function("return this")();e.exports=u},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(t,n(9))},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){function o(e){var t,n,o=i.call(e,a),r=e[a];try{e[a]=void 0,t=!0}catch(e){}return n=c.call(e),t&&(o?e[a]=r:delete e[a]),n}var r=n(2),u=Object.prototype,i=u.hasOwnProperty,c=u.toString,a=r?r.toStringTag:void 0;e.exports=o},function(e,t){function n(e){return r.call(e)}var o=Object.prototype,r=o.toString;e.exports=n},function(e,t,n){function o(e){return"string"==typeof e||!u(e)&&i(e)&&r(e)==c}var r=n(1),u=n(13),i=n(14),c="[object String]";e.exports=o},function(e,t){var n=Array.isArray;e.exports=n},function(e,t){function n(e){return null!=e&&"object"==typeof e}e.exports=n},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function c(){var e,t,n=document.querySelectorAll("head script, head link");if(n&&n.length)for(e=0;e<n.length;e+=1)t=n[e],/geetest\.com/i.test("link"===t.nodeName.toLowerCase()?t.href:t.src)&&t.parentNode.removeChild(t)}function a(e){e.hasBuildEventFunc||((0,b.default)(e.onReady)&&e.onReady(function(){"function"==typeof e.readyFunc&&e.readyFunc()}),(0,b.default)(e.onSuccess)&&e.onSuccess(function(){"function"==typeof e.successFunc&&e.successFunc()}),(0,b.default)(e.onClose)&&e.onClose(function(){"function"==typeof e.closeFunc&&e.closeFunc()}),(0,b.default)(e.onError)&&e.onError(function(){"function"==typeof e.errorFunc&&e.errorFunc()}),e.handleReady=function(t){e.readyFunc=t},e.handleSuccess=function(t){e.successFunc=t},e.handleClose=function(t){e.closeFunc=t},e.handleError=function(t){e.errorFunc=t},e.hasBuildEventFunc=!0)}function l(e,t){var n=e.name,o=e.data,r=e.width,u=e.product,i=e.lang,c=e.protocol,a=e.area,l=e.nextWidth,f=e.bgColor,s=e.timeout,p=e.shouldReinitialize;return(0,b.default)(p)?p(e,t):!(n===t.name&&r===t.width&&u===t.product&&i===t.lang&&c===t.protocol&&a===t.area&&l===t.nextWidth&&f===t.bgColor&&s===t.timeout&&(!(0,v.default)(t.data)||(0,_.default)(o,t)))}var f,s,p,d,y,h,b,g,v,m,_,w,j,O,x,k;Object.defineProperty(t,"__esModule",{value:!0}),f=function(){function e(e,t){var n,o;for(n=0;n<t.length;n++)o=t[n],o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),s=n(16),p=o(s),d=n(20),y=o(d),h=n(0),b=o(h),g=n(3),v=o(g),m=n(24),_=o(m),w=n(4),j=o(w),O=n(25),x=o(O),k=function(e){function t(e){r(this,t);var n=u(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.ins=null,n.state={loading:!1},n}return i(t,e),f(t,[{key:"componentDidMount",value:function(){this.load()}},{key:"componentWillReceiveProps",value:function(e){l(this.props,e)?this.load():this.bindEventFunc(e)}},{key:"shouldComponentUpdate",value:function(e,t){return this.state.loading!==t.loading}},{key:"componentWillUnmount",value:function(){var e=this.props.name;c(),j.default.remove(e)}},{key:"load",value:function(){var e,t=this;window&&window.document&&(e=this.props.data,this.setState({loading:!0}),(0,b.default)(e)?e().then(function(e){t.tryInit(e)}):this.tryInit(e))}},{key:"tryInit",value:function(e){var t=this,n=this.props,o=n.name,r=n.width,u=n.product,i=n.lang,c=n.protocol,l=n.area,f=n.nextWidth,s=n.bgColor,p=n.timeout,d={gt:e.gt,challenge:e.challenge,offline:!e.success,new_captcha:!!e.new_captcha,width:r,product:u,lang:i,protocol:c,area:l,next_width:f,bg_color:s,timeout:p};try{(0,x.default)(d,function(e){a(e),j.default.add(o,e),t.loadIns(e),t.setState({loading:!1})})}catch(e){console.error(e)}}},{key:"loadIns",value:function(e){this.ins=e,this.bindEventFunc(this.props),this.show()}},{key:"bindEventFunc",value:function(e){var t=this.ins,n=e.onReady,o=e.onSuccess,r=e.onClose,u=e.onError;t&&(t.handleReady(n),t.handleSuccess(function(){return o(t.getValidate())}),t.handleClose(r),t.handleError(u))}},{key:"show",value:function(){var e=this.props.product,t=this.ins,n=this.box;t&&"bind"!==e&&t.appendTo(n)}},{key:"render",value:function(){var e=this,t=this.props.product,n=this.state.loading,o=n?p.default.createElement("span",null," loading... "):null;return p.default.createElement("div",{style:{display:"bind"===t?"none":"block",height:44}},p.default.createElement("div",{style:{display:n?"block":"none"}},o),p.default.createElement("div",{style:{display:n?"none":"block"},ref:function(t){e.box=t}}))}}]),t}(p.default.Component),k.propTypes={name:y.default.string.isRequired,data:y.default.oneOfType([y.default.func,y.default.shape({gt:y.default.string.isRequired,challenge:y.default.string.isRequired,success:y.default.number.isRequired,new_captcha:y.default.bool})]).isRequired,width:y.default.oneOfType([y.default.string,y.default.number]),product:y.default.oneOf(["popup","float","custom","bind"]),lang:y.default.oneOf(["zh-cn","en"]),protocol:y.default.oneOf(["http://","https://"]),area:y.default.string,nextWidth:y.default.string,bgColor:y.default.string,timeout:y.default.number,onReady:y.default.func,onSuccess:y.default.func,onClose:y.default.func,onError:y.default.func,shouldReinitialize:y.default.func},k.defaultProps={width:"300px",product:"popup",lang:"zh-cn",protocol:null,area:null,nextWidth:null,bgColor:null,timeout:null,onReady:null,onSuccess:null,onClose:null,onError:null,shouldReinitialize:null},t.default=k},function(e,t,n){"use strict";e.exports=n(17)},function(e,t,n){"use strict";function o(e){for(var t=arguments.length-1,n="Minified React error #"+e+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+e,o=0;o<t;o++)n+="&args[]="+encodeURIComponent(arguments[o+1]);throw t=Error(n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."),t.name="Invariant Violation",t.framesToPop=1,t}function r(e,t,n){this.props=e,this.context=t,this.refs=P,this.updater=n||M}function u(e,t,n){this.props=e,this.context=t,this.refs=P,this.updater=n||M}function i(){}function c(e,t,n){this.props=e,this.context=t,this.refs=P,this.updater=n||M}function a(e,t,n){var o,r,u,i,c={},a=null,l=null;if(null!=t)for(o in void 0!==t.ref&&(l=t.ref),void 0!==t.key&&(a=""+t.key),t)w.call(t,o)&&!j.hasOwnProperty(o)&&(c[o]=t[o]);if(1===(r=arguments.length-2))c.children=n;else if(1<r){for(u=Array(r),i=0;i<r;i++)u[i]=arguments[i+2];c.children=u}if(e&&e.defaultProps)for(o in r=e.defaultProps)void 0===c[o]&&(c[o]=r[o]);return{$$typeof:T,type:e,key:a,ref:l,props:c,_owner:_.current}}function l(e){return"object"==typeof e&&null!==e&&e.$$typeof===T}function f(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,function(e){return t[e]})}function s(e,t,n,o){if(x.length){var r=x.pop();return r.result=e,r.keyPrefix=t,r.func=n,r.context=o,r.count=0,r}return{result:e,keyPrefix:t,func:n,context:o,count:0}}function p(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>x.length&&x.push(e)}function d(e,t,n,r){var u,i,c,a=typeof e;if("undefined"!==a&&"boolean"!==a||(e=null),u=!1,null===e)u=!0;else switch(a){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case T:case q:case A:case I:u=!0}}if(u)return n(r,e,""===t?"."+y(e,0):t),1;if(u=0,t=""===t?".":t+":",Array.isArray(e))for(i=0;i<e.length;i++)a=e[i],c=t+y(a,i),u+=d(a,c,n,r);else if(null===e||void 0===e?c=null:(c=$&&e[$]||e["@@iterator"],c="function"==typeof c?c:null),"function"==typeof c)for(e=c.call(e),i=0;!(a=e.next()).done;)a=a.value,c=t+y(a,i++),u+=d(a,c,n,r);else"object"===a&&(n=""+e,o("31","[object Object]"===n?"object with keys {"+Object.keys(e).join(", ")+"}":n,""));return u}function y(e,t){return"object"==typeof e&&null!==e&&null!=e.key?f(e.key):t.toString(36)}function h(e,t){e.func.call(e.context,t,e.count++)}function b(e,t,n){var o=e.result,r=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?g(e,o,n,C.thatReturnsArgument):null!=e&&(l(e)&&(t=r+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(O,"$&/")+"/")+n,e={$$typeof:T,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}),o.push(e))}function g(e,t,n,o,r){var u="";null!=n&&(u=(""+n).replace(O,"$&/")+"/"),t=s(t,u,o,r),null==e||d(e,"",b,t),p(t)}var v,m,_,w,j,O,x,k,E,R,S=n(18),P=n(19),C=n(5),F="function"==typeof Symbol&&Symbol.for,T=F?Symbol.for("react.element"):60103,q=F?Symbol.for("react.call"):60104,A=F?Symbol.for("react.return"):60105,I=F?Symbol.for("react.portal"):60106,U=F?Symbol.for("react.fragment"):60107,$="function"==typeof Symbol&&Symbol.iterator,M={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}};r.prototype.isReactComponent={},r.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&o("85"),this.updater.enqueueSetState(this,e,t,"setState")},r.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},i.prototype=r.prototype,v=u.prototype=new i,v.constructor=u,S(v,r.prototype),v.isPureReactComponent=!0,m=c.prototype=new i,m.constructor=c,S(m,r.prototype),m.unstable_isAsyncReactComponent=!0,m.render=function(){return this.props.children},_={current:null},w=Object.prototype.hasOwnProperty,j={key:!0,ref:!0,__self:!0,__source:!0},O=/\/+/g,x=[],k={Children:{map:function(e,t,n){if(null==e)return e;var o=[];return g(e,o,null,t,n),o},forEach:function(e,t,n){if(null==e)return e;t=s(null,null,t,n),null==e||d(e,"",h,t),p(t)},count:function(e){return null==e?0:d(e,"",C.thatReturnsNull,null)},toArray:function(e){var t=[];return g(e,t,null,C.thatReturnsArgument),t},only:function(e){return l(e)||o("143"),e}},Component:r,PureComponent:u,unstable_AsyncComponent:c,Fragment:U,createElement:a,cloneElement:function(e,t,n){var o,r,u,i=S({},e.props),c=e.key,a=e.ref,l=e._owner;if(null!=t){void 0!==t.ref&&(a=t.ref,l=_.current),void 0!==t.key&&(c=""+t.key),e.type&&e.type.defaultProps&&(o=e.type.defaultProps);for(r in t)w.call(t,r)&&!j.hasOwnProperty(r)&&(i[r]=void 0===t[r]&&void 0!==o?o[r]:t[r])}if(1===(r=arguments.length-2))i.children=n;else if(1<r){for(o=Array(r),u=0;u<r;u++)o[u]=arguments[u+2];i.children=o}return{$$typeof:T,type:e.type,key:c,ref:a,props:i,_owner:l}},createFactory:function(e){var t=a.bind(null,e);return t.type=e,t},isValidElement:l,version:"16.2.0",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:_,assign:S}},E=Object.freeze({default:k}),R=E&&k||E,e.exports=R.default?R.default:R},function(e,t,n){"use strict";function o(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var r=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=function(){var e,t,n,o,r;try{if(!Object.assign)return!1;if(e=new String("abc"),e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;return o=Object.getOwnPropertyNames(t).map(function(e){return t[e]}),"0123456789"!==o.join("")?!1:(r={},"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join(""))}catch(e){return!1}}()?Object.assign:function(e,t){var n,c,a,l,f,s=o(e);for(a=1;a<arguments.length;a++){n=Object(arguments[a]);for(l in n)u.call(n,l)&&(s[l]=n[l]);if(r)for(c=r(n),f=0;f<c.length;f++)i.call(n,c[f])&&(s[c[f]]=n[c[f]])}return s}},function(e,t,n){"use strict";var o={};e.exports=o},function(e,t,n){e.exports=n(21)()},function(e,t,n){"use strict";var o=n(5),r=n(22),u=n(23);e.exports=function(){function e(e,t,n,o,i,c){c!==u&&r(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=o,n.PropTypes=n,n}},function(e,t,n){"use strict";function o(e,t,n,o,u,i,c,a){var l,f,s;if(r(t),!e)throw void 0===t?l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."):(f=[n,o,u,i,c,a],s=0,l=new Error(t.replace(/%s/g,function(){return f[s++]})),l.name="Invariant Violation"),l.framesToPop=1,l}var r=function(e){};e.exports=o},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){e.exports=function(e,t){var n,o,r,u,i;if(e===t)return!0;if(n=Object.keys(e),o=Object.keys(t),r=n.length,o.length!==r)return!1;for(u=0;u<r;u++)if(i=n[u],e[i]!==t[i])return!1;return!0}},function(e,t){!function(t,n){"use strict";"object"==typeof e&&"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("Geetest requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,function(e,t){"use strict";function n(e){this._obj=e}function o(e){var t=this;new n(e)._each(function(e,n){t[e]=n})}var r,u,i,c,a,l,f,s,p,d,y,h,b,g,v,m,_,w,j,O,x;if(void 0===e)throw new Error("Geetest requires browser environment");return r=e.document,u=e.Math,i=r.getElementsByTagName("head")[0],n.prototype={_each:function(e){var t,n=this._obj;for(t in n)n.hasOwnProperty(t)&&e(t,n[t]);return this}},o.prototype={api_server:"api.geetest.com",protocol:"http://",type_path:"/gettype.php",fallback_config:{slide:{static_servers:["static.geetest.com","dn-staticdown.qbox.me"],type:"slide",slide:"/static/js/geetest.0.0.0.js"},fullpage:{static_servers:["static.geetest.com","dn-staticdown.qbox.me"],type:"fullpage",fullpage:"/static/js/fullpage.0.0.0.js"}},_get_fallback_config:function(){var e=this;return a(e.type)?e.fallback_config[e.type]:e.new_captcha?e.fallback_config.fullpage:e.fallback_config.slide},_extend:function(e){var t=this;new n(e)._each(function(e,n){t[e]=n})}},c=function(e){return"number"==typeof e},a=function(e){return"string"==typeof e},l=function(e){return"boolean"==typeof e},f=function(e){return"object"==typeof e&&null!==e},s=function(e){return"function"==typeof e},p={},d={},y=function(){return parseInt(1e4*u.random())+(new Date).valueOf()},h=function(e,t){var n,o=r.createElement("script");o.charset="UTF-8",o.async=!0,o.onerror=function(){t(!0)},n=!1,o.onload=o.onreadystatechange=function(){n||o.readyState&&"loaded"!==o.readyState&&"complete"!==o.readyState||(n=!0,setTimeout(function(){t(!1)},0))},o.src=e,i.appendChild(o)},b=function(e){return e.replace(/^https?:\/\/|\/$/g,"")},g=function(e){return e=e.replace(/\/+/g,"/"),0!==e.indexOf("/")&&(e="/"+e),e},v=function(e){if(!e)return"";var t="?";return new n(e)._each(function(e,n){(a(n)||c(n)||l(n))&&(t=t+encodeURIComponent(e)+"="+encodeURIComponent(n)+"&")}),"?"===t&&(t=""),t.replace(/&$/,"")},m=function(e,t,n,o){t=b(t);var r=g(n)+v(o);return t&&(r=e+t+r),r},_=function(e,t,n,o,r){var u=function(i){var c=m(e,t[i],n,o);h(c,function(e){e?i>=t.length-1?r(!0):u(i+1):r(!1)})};u(0)},w=function(t,n,o,r){if(f(o.getLib))return o._extend(o.getLib),void r(o);if(o.offline)return void r(o._get_fallback_config());var u="geetest_"+y();e[u]=function(t){r("success"===t.status?t.data:t.status?o._get_fallback_config():t),e[u]=void 0;try{delete e[u]}catch(e){}},_(o.protocol,t,n,{gt:o.gt,callback:u},function(e){e&&r(o._get_fallback_config())})},j=function(e,t){var n={networkError:"网络错误"};if("function"!=typeof t.onError)throw new Error(n[e]);t.onError(n[e])},O=function(){return!!e.Geetest},O()&&(d.slide="loaded"),x=function(t,n){var r=new o(t);t.https?r.protocol="https://":t.protocol||(r.protocol=e.location.protocol+"//"),w([r.api_server||r.apiserver],r.type_path,r,function(t){var o,u=t.type,i=function(){r._extend(t),n(new e.Geetest(r))};p[u]=p[u]||[],o=d[u]||"init","init"===o?(d[u]="loading",p[u].push(i),_(r.protocol,t.static_servers||t.domains,t[u]||t.path,null,function(e){var t,n,o,i;if(e)d[u]="fail",j("networkError",r);else{for(d[u]="loaded",t=p[u],n=0,o=t.length;n<o;n+=1)i=t[n],s(i)&&i();p[u]=[]}})):"loaded"===o?i():"fail"===o?j("networkError",r):"loading"===o&&p[u].push(i)})},e.initGeetest=x,x})}])});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["react-geetest-captcha"]=t():e["react-geetest-captcha"]=t()}("undefined"!=typeof self?self:this,function(){return function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=9)}([function(e,t,n){function o(e){if(!u(e))return!1;var t=r(e);return t==a||t==c||t==i||t==l}var r=n(1),u=n(3),i="[object AsyncFunction]",a="[object Function]",c="[object GeneratorFunction]",l="[object Proxy]";e.exports=o},function(e,t,n){function o(e){return null==e?void 0===e?c:a:l&&l in Object(e)?u(e):i(e)}var r=n(2),u=n(13),i=n(14),a="[object Null]",c="[object Undefined]",l=r?r.toStringTag:void 0;e.exports=o},function(e,t,n){var o=n(10),r=o.Symbol;e.exports=r},function(e,t){function n(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}e.exports=n},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e){return(0,c.default)(e)&&0!==e.length}var i,a,c,l,f,s;Object.defineProperty(t,"__esModule",{value:!0}),i=function(){function e(e,t){var n,o;for(n=0;n<t.length;n++)o=t[n],o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),a=n(15),c=o(a),l=n(0),f=o(l),s=function(){function e(){r(this,e),this.instances={}}return i(e,[{key:"add",value:function(e,t){this.get(e)&&this.remove(e),this.instances[e]=t}},{key:"get",value:function(e){return this.exist(e)?this.instances[e]:null}},{key:"remove",value:function(e){var t=this.get(e);t&&(0,f.default)(t.destroy)&&t.destroy(),delete this.instances[e]}},{key:"exist",value:function(e){return u(e)&&Object.prototype.hasOwnProperty.call(this.instances,e)}}]),e}(),t.default=new s},function(e,t){function n(e){return null!=e&&"object"==typeof e}e.exports=n},function(e,t,n){"use strict";e.exports=n(18)},function(e,t,n){"use strict";function o(e){return function(){return e}}var r=function(){};r.thatReturns=o,r.thatReturnsFalse=o(!1),r.thatReturnsTrue=o(!0),r.thatReturnsNull=o(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r},function(e,t,n){e.exports=n(21)()},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){var n=p.default.get(e);return n&&(0,f.default)(n.appendTo)?n.appendTo(t):null}function u(e,t){var n=p.default.get(e);return n&&(0,f.default)(n.bindForm)?n.bindForm(t):null}function i(e){var t=p.default.get(e);return t&&(0,f.default)(t.getValidate)?t.getValidate():null}function a(e){var t=p.default.get(e);return t&&(0,f.default)(t.reset)?t.reset():null}function c(e){var t=p.default.get(e);return t&&(0,f.default)(t.verify)?t.verify():null}var l,f,s,p,d,y;Object.defineProperty(t,"__esModule",{value:!0}),t.storage=t.RGCaptcha=void 0,t.appendTo=r,t.bindForm=u,t.getValidate=i,t.reset=a,t.verify=c,l=n(0),f=o(l),s=n(4),p=o(s),d=n(17),y=o(d),t.RGCaptcha=y.default,t.storage=p.default,t.default={storage:p.default,RGCaptcha:y.default,appendTo:r,bindForm:u,getValidate:i,reset:a,verify:c}},function(e,t,n){var o=n(11),r="object"==typeof self&&self&&self.Object===Object&&self,u=o||r||Function("return this")();e.exports=u},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(t,n(12))},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){function o(e){var t,n,o=i.call(e,c),r=e[c];try{e[c]=void 0,t=!0}catch(e){}return n=a.call(e),t&&(o?e[c]=r:delete e[c]),n}var r=n(2),u=Object.prototype,i=u.hasOwnProperty,a=u.toString,c=r?r.toStringTag:void 0;e.exports=o},function(e,t){function n(e){return r.call(e)}var o=Object.prototype,r=o.toString;e.exports=n},function(e,t,n){function o(e){return"string"==typeof e||!u(e)&&i(e)&&r(e)==a}var r=n(1),u=n(16),i=n(5),a="[object String]";e.exports=o},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(){var e,t,n=document.querySelectorAll("head script, head link");if(n&&n.length)for(e=0;e<n.length;e+=1)t=n[e],/geetest\.com/i.test("link"===t.nodeName.toLowerCase()?t.href:t.src)&&t.parentNode.removeChild(t)}function c(e){e.hasBuildEventFunc||((0,b.default)(e.onReady)&&e.onReady(function(){"function"==typeof e.readyFunc&&e.readyFunc()}),(0,b.default)(e.onSuccess)&&e.onSuccess(function(){"function"==typeof e.successFunc&&e.successFunc()}),(0,b.default)(e.onClose)&&e.onClose(function(){"function"==typeof e.closeFunc&&e.closeFunc()}),(0,b.default)(e.onError)&&e.onError(function(){"function"==typeof e.errorFunc&&e.errorFunc()}),e.handleReady=function(t){e.readyFunc=t},e.handleSuccess=function(t){e.successFunc=t},e.handleClose=function(t){e.closeFunc=t},e.handleError=function(t){e.errorFunc=t},e.hasBuildEventFunc=!0)}function l(e,t){var n=e.name,o=e.data,r=e.width,u=e.product,i=e.lang,a=e.protocol,c=e.area,l=e.nextWidth,f=e.bgColor,s=e.timeout,p=e.shouldReinitialize;return(0,b.default)(p)?p(e,t):!(n===t.name&&r===t.width&&u===t.product&&i===t.lang&&a===t.protocol&&c===t.area&&l===t.nextWidth&&f===t.bgColor&&s===t.timeout&&(!(0,v.default)(t.data)||(0,j.default)(o,t)))}var f,s,p,d,y,h,b,g,v,m,_,w,j,O,x,k,E,R,S,P;Object.defineProperty(t,"__esModule",{value:!0}),f=function(){function e(e,t){var n,o;for(n=0;n<t.length;n++)o=t[n],o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),s=n(6),p=o(s),d=n(8),y=o(d),h=n(0),b=o(h),g=n(3),v=o(g),m=n(24),_=o(m),w=n(25),j=o(w),O=n(4),x=o(O),k=n(26),E=o(k),R=n(27),S=o(R),P=function(e){function t(e){r(this,t);var n=u(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.ins=null,n.state={loading:!1},n}return i(t,e),f(t,[{key:"componentDidMount",value:function(){this.load()}},{key:"componentWillReceiveProps",value:function(e){var t=this.props.name;l(this.props,e)?(x.default.remove(t),this.load()):this.bindEventFunc(e)}},{key:"shouldComponentUpdate",value:function(e,t){return this.state.loading!==t.loading}},{key:"componentWillUnmount",value:function(){var e=this.props.name;a(),x.default.remove(e)}},{key:"load",value:function(){var e,t=this;window&&window.document&&(e=this.props.data,this.setState({loading:!0}),(0,b.default)(e)?e().then(function(e){t.tryInit(e)}):this.tryInit(e))}},{key:"tryInit",value:function(e){var t=this,n=this.props,o=n.name,r=n.width,u=n.product,i=n.lang,a=n.protocol,l=n.area,f=n.nextWidth,s=n.bgColor,p=n.timeout,d={gt:e.gt,challenge:e.challenge,offline:!e.success,new_captcha:!!e.new_captcha,width:(0,_.default)(r)?r+"px":r,product:u,lang:i,protocol:a,area:l,next_width:f,bg_color:s,timeout:p};try{(0,E.default)(d,function(e){c(e),x.default.add(o,e),t.loadIns(e),t.setState({loading:!1})})}catch(e){console.error(e)}}},{key:"loadIns",value:function(e){this.ins=e,this.bindEventFunc(this.props),this.show()}},{key:"bindEventFunc",value:function(e){var t=this.ins,n=e.onReady,o=e.onSuccess,r=e.onClose,u=e.onError;t&&(t.handleReady(n),t.handleSuccess(function(){return o(t.getValidate())}),t.handleClose(r),t.handleError(u))}},{key:"show",value:function(){var e=this.props.product,t=this.ins,n=this.box;t&&"bind"!==e&&t.appendTo(n)}},{key:"render",value:function(){var e=this,t=this.props,n=t.product,o=t.loadingComponent,r=t.loadingText,u=this.state.loading,i=void 0;return i=o?p.default.createElement(o,{loading:u}):p.default.createElement(S.default,{loading:u,text:r}),p.default.createElement("div",{style:{display:"bind"===n?"none":"block",height:44}},i,p.default.createElement("div",{style:{display:u?"none":"block"},ref:function(t){e.box=t}}))}}]),t}(p.default.Component),P.propTypes={name:y.default.string.isRequired,data:y.default.oneOfType([y.default.func,y.default.shape({gt:y.default.string.isRequired,challenge:y.default.string.isRequired,success:y.default.number.isRequired,new_captcha:y.default.bool})]).isRequired,width:y.default.oneOfType([y.default.string,y.default.number]),product:y.default.oneOf(["popup","float","custom","bind"]),lang:y.default.oneOf(["zh-cn","en"]),protocol:y.default.oneOf(["http://","https://"]),area:y.default.string,nextWidth:y.default.string,bgColor:y.default.string,timeout:y.default.number,onReady:y.default.func,onSuccess:y.default.func,onClose:y.default.func,onError:y.default.func,shouldReinitialize:y.default.func,loadingComponent:y.default.func,loadingText:y.default.string},P.defaultProps={width:"300px",product:"popup",lang:"zh-cn",protocol:null,area:null,nextWidth:null,bgColor:null,timeout:null,onReady:null,onSuccess:null,onClose:null,onError:null,shouldReinitialize:null,loadingComponent:null,loadingText:"loading..."},t.default=P},function(e,t,n){"use strict";function o(e){for(var t=arguments.length-1,n="Minified React error #"+e+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+e,o=0;o<t;o++)n+="&args[]="+encodeURIComponent(arguments[o+1]);throw t=Error(n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."),t.name="Invariant Violation",t.framesToPop=1,t}function r(e,t,n){this.props=e,this.context=t,this.refs=P,this.updater=n||M}function u(e,t,n){this.props=e,this.context=t,this.refs=P,this.updater=n||M}function i(){}function a(e,t,n){this.props=e,this.context=t,this.refs=P,this.updater=n||M}function c(e,t,n){var o,r,u,i,a={},c=null,l=null;if(null!=t)for(o in void 0!==t.ref&&(l=t.ref),void 0!==t.key&&(c=""+t.key),t)w.call(t,o)&&!j.hasOwnProperty(o)&&(a[o]=t[o]);if(1===(r=arguments.length-2))a.children=n;else if(1<r){for(u=Array(r),i=0;i<r;i++)u[i]=arguments[i+2];a.children=u}if(e&&e.defaultProps)for(o in r=e.defaultProps)void 0===a[o]&&(a[o]=r[o]);return{$$typeof:F,type:e,key:c,ref:l,props:a,_owner:_.current}}function l(e){return"object"==typeof e&&null!==e&&e.$$typeof===F}function f(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,function(e){return t[e]})}function s(e,t,n,o){if(x.length){var r=x.pop();return r.result=e,r.keyPrefix=t,r.func=n,r.context=o,r.count=0,r}return{result:e,keyPrefix:t,func:n,context:o,count:0}}function p(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>x.length&&x.push(e)}function d(e,t,n,r){var u,i,a,c=typeof e;if("undefined"!==c&&"boolean"!==c||(e=null),u=!1,null===e)u=!0;else switch(c){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case F:case q:case A:case I:u=!0}}if(u)return n(r,e,""===t?"."+y(e,0):t),1;if(u=0,t=""===t?".":t+":",Array.isArray(e))for(i=0;i<e.length;i++)c=e[i],a=t+y(c,i),u+=d(c,a,n,r);else if(null===e||void 0===e?a=null:(a=$&&e[$]||e["@@iterator"],a="function"==typeof a?a:null),"function"==typeof a)for(e=a.call(e),i=0;!(c=e.next()).done;)c=c.value,a=t+y(c,i++),u+=d(c,a,n,r);else"object"===c&&(n=""+e,o("31","[object Object]"===n?"object with keys {"+Object.keys(e).join(", ")+"}":n,""));return u}function y(e,t){return"object"==typeof e&&null!==e&&null!=e.key?f(e.key):t.toString(36)}function h(e,t){e.func.call(e.context,t,e.count++)}function b(e,t,n){var o=e.result,r=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?g(e,o,n,C.thatReturnsArgument):null!=e&&(l(e)&&(t=r+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(O,"$&/")+"/")+n,e={$$typeof:F,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}),o.push(e))}function g(e,t,n,o,r){var u="";null!=n&&(u=(""+n).replace(O,"$&/")+"/"),t=s(t,u,o,r),null==e||d(e,"",b,t),p(t)}var v,m,_,w,j,O,x,k,E,R,S=n(19),P=n(20),C=n(7),T="function"==typeof Symbol&&Symbol.for,F=T?Symbol.for("react.element"):60103,q=T?Symbol.for("react.call"):60104,A=T?Symbol.for("react.return"):60105,I=T?Symbol.for("react.portal"):60106,U=T?Symbol.for("react.fragment"):60107,$="function"==typeof Symbol&&Symbol.iterator,M={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}};r.prototype.isReactComponent={},r.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&o("85"),this.updater.enqueueSetState(this,e,t,"setState")},r.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},i.prototype=r.prototype,v=u.prototype=new i,v.constructor=u,S(v,r.prototype),v.isPureReactComponent=!0,m=a.prototype=new i,m.constructor=a,S(m,r.prototype),m.unstable_isAsyncReactComponent=!0,m.render=function(){return this.props.children},_={current:null},w=Object.prototype.hasOwnProperty,j={key:!0,ref:!0,__self:!0,__source:!0},O=/\/+/g,x=[],k={Children:{map:function(e,t,n){if(null==e)return e;var o=[];return g(e,o,null,t,n),o},forEach:function(e,t,n){if(null==e)return e;t=s(null,null,t,n),null==e||d(e,"",h,t),p(t)},count:function(e){return null==e?0:d(e,"",C.thatReturnsNull,null)},toArray:function(e){var t=[];return g(e,t,null,C.thatReturnsArgument),t},only:function(e){return l(e)||o("143"),e}},Component:r,PureComponent:u,unstable_AsyncComponent:a,Fragment:U,createElement:c,cloneElement:function(e,t,n){var o,r,u,i=S({},e.props),a=e.key,c=e.ref,l=e._owner;if(null!=t){void 0!==t.ref&&(c=t.ref,l=_.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps&&(o=e.type.defaultProps);for(r in t)w.call(t,r)&&!j.hasOwnProperty(r)&&(i[r]=void 0===t[r]&&void 0!==o?o[r]:t[r])}if(1===(r=arguments.length-2))i.children=n;else if(1<r){for(o=Array(r),u=0;u<r;u++)o[u]=arguments[u+2];i.children=o}return{$$typeof:F,type:e.type,key:a,ref:c,props:i,_owner:l}},createFactory:function(e){var t=c.bind(null,e);return t.type=e,t},isValidElement:l,version:"16.2.0",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:_,assign:S}},E=Object.freeze({default:k}),R=E&&k||E,e.exports=R.default?R.default:R},function(e,t,n){"use strict";function o(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var r=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=function(){var e,t,n,o,r;try{if(!Object.assign)return!1;if(e=new String("abc"),e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;return o=Object.getOwnPropertyNames(t).map(function(e){return t[e]}),"0123456789"!==o.join("")?!1:(r={},"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join(""))}catch(e){return!1}}()?Object.assign:function(e,t){var n,a,c,l,f,s=o(e);for(c=1;c<arguments.length;c++){n=Object(arguments[c]);for(l in n)u.call(n,l)&&(s[l]=n[l]);if(r)for(a=r(n),f=0;f<a.length;f++)i.call(n,a[f])&&(s[a[f]]=n[a[f]])}return s}},function(e,t,n){"use strict";var o={};e.exports=o},function(e,t,n){"use strict";var o=n(7),r=n(22),u=n(23);e.exports=function(){function e(e,t,n,o,i,a){a!==u&&r(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=o,n.PropTypes=n,n}},function(e,t,n){"use strict";function o(e,t,n,o,u,i,a,c){var l,f,s;if(r(t),!e)throw void 0===t?l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."):(f=[n,o,u,i,a,c],s=0,l=new Error(t.replace(/%s/g,function(){return f[s++]})),l.name="Invariant Violation"),l.framesToPop=1,l}var r=function(e){};e.exports=o},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){function o(e){return"number"==typeof e||u(e)&&r(e)==i}var r=n(1),u=n(5),i="[object Number]";e.exports=o},function(e,t){e.exports=function(e,t){var n,o,r,u,i;if(e===t)return!0;if(n=Object.keys(e),o=Object.keys(t),r=n.length,o.length!==r)return!1;for(u=0;u<r;u++)if(i=n[u],e[i]!==t[i])return!1;return!0}},function(e,t){!function(t,n){"use strict";"object"==typeof e&&"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("Geetest requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,function(e,t){"use strict";function n(e){this._obj=e}function o(e){var t=this;new n(e)._each(function(e,n){t[e]=n})}var r,u,i,a,c,l,f,s,p,d,y,h,b,g,v,m,_,w,j,O,x;if(void 0===e)throw new Error("Geetest requires browser environment");return r=e.document,u=e.Math,i=r.getElementsByTagName("head")[0],n.prototype={_each:function(e){var t,n=this._obj;for(t in n)n.hasOwnProperty(t)&&e(t,n[t]);return this}},o.prototype={api_server:"api.geetest.com",protocol:"http://",type_path:"/gettype.php",fallback_config:{slide:{static_servers:["static.geetest.com","dn-staticdown.qbox.me"],type:"slide",slide:"/static/js/geetest.0.0.0.js"},fullpage:{static_servers:["static.geetest.com","dn-staticdown.qbox.me"],type:"fullpage",fullpage:"/static/js/fullpage.0.0.0.js"}},_get_fallback_config:function(){var e=this;return c(e.type)?e.fallback_config[e.type]:e.new_captcha?e.fallback_config.fullpage:e.fallback_config.slide},_extend:function(e){var t=this;new n(e)._each(function(e,n){t[e]=n})}},a=function(e){return"number"==typeof e},c=function(e){return"string"==typeof e},l=function(e){return"boolean"==typeof e},f=function(e){return"object"==typeof e&&null!==e},s=function(e){return"function"==typeof e},p={},d={},y=function(){return parseInt(1e4*u.random())+(new Date).valueOf()},h=function(e,t){var n,o=r.createElement("script");o.charset="UTF-8",o.async=!0,o.onerror=function(){t(!0)},n=!1,o.onload=o.onreadystatechange=function(){n||o.readyState&&"loaded"!==o.readyState&&"complete"!==o.readyState||(n=!0,setTimeout(function(){t(!1)},0))},o.src=e,i.appendChild(o)},b=function(e){return e.replace(/^https?:\/\/|\/$/g,"")},g=function(e){return e=e.replace(/\/+/g,"/"),0!==e.indexOf("/")&&(e="/"+e),e},v=function(e){if(!e)return"";var t="?";return new n(e)._each(function(e,n){(c(n)||a(n)||l(n))&&(t=t+encodeURIComponent(e)+"="+encodeURIComponent(n)+"&")}),"?"===t&&(t=""),t.replace(/&$/,"")},m=function(e,t,n,o){t=b(t);var r=g(n)+v(o);return t&&(r=e+t+r),r},_=function(e,t,n,o,r){var u=function(i){var a=m(e,t[i],n,o);h(a,function(e){e?i>=t.length-1?r(!0):u(i+1):r(!1)})};u(0)},w=function(t,n,o,r){if(f(o.getLib))return o._extend(o.getLib),void r(o);if(o.offline)return void r(o._get_fallback_config());var u="geetest_"+y();e[u]=function(t){r("success"===t.status?t.data:t.status?o._get_fallback_config():t),e[u]=void 0;try{delete e[u]}catch(e){}},_(o.protocol,t,n,{gt:o.gt,callback:u},function(e){e&&r(o._get_fallback_config())})},j=function(e,t){var n={networkError:"网络错误"};if("function"!=typeof t.onError)throw new Error(n[e]);t.onError(n[e])},O=function(){return!!e.Geetest},O()&&(d.slide="loaded"),x=function(t,n){var r=new o(t);t.https?r.protocol="https://":t.protocol||(r.protocol=e.location.protocol+"//"),w([r.api_server||r.apiserver],r.type_path,r,function(t){var o,u=t.type,i=function(){r._extend(t),n(new e.Geetest(r))};p[u]=p[u]||[],o=d[u]||"init","init"===o?(d[u]="loading",p[u].push(i),_(r.protocol,t.static_servers||t.domains,t[u]||t.path,null,function(e){var t,n,o,i;if(e)d[u]="fail",j("networkError",r);else{for(d[u]="loaded",t=p[u],n=0,o=t.length;n<o;n+=1)i=t[n],s(i)&&i();p[u]=[]}})):"loaded"===o?i():"fail"===o?j("networkError",r):"loading"===o&&p[u].push(i)})},e.initGeetest=x,x})},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a,c,l,f,s,p;Object.defineProperty(t,"__esModule",{value:!0}),a=function(){function e(e,t){var n,o;for(n=0;n<t.length;n++)o=t[n],o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),c=n(6),l=o(c),f=n(8),s=o(f),p=function(e){function t(){return r(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),a(t,[{key:"render",value:function(){var e=this.props,t=e.loading,n=e.text;return l.default.createElement("div",{style:{display:t?"block":"none",lineHeight:"44px",textAlign:"center"}},n)}}]),t}(l.default.Component),p.propTypes={loading:s.default.bool.isRequired,text:s.default.node},p.defaultProps={text:"loading..."},t.default=p}])});

@@ -21,9 +21,9 @@ 'use strict';

var _component = require('./component');
var _RGCaptcha = require('./RGCaptcha');
var _component2 = _interopRequireDefault(_component);
var _RGCaptcha2 = _interopRequireDefault(_RGCaptcha);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.RGCaptcha = _component2.default;
exports.RGCaptcha = _RGCaptcha2.default;
exports.storage = _storage2.default;

@@ -62,3 +62,3 @@ function appendTo(name, position) {

storage: _storage2.default,
RGCaptcha: _component2.default,
RGCaptcha: _RGCaptcha2.default,
appendTo: appendTo,

@@ -65,0 +65,0 @@ bindForm: bindForm,

{
"name": "react-geetest-captcha",
"version": "0.0.4",
"version": "0.0.5",
"description": "A react.js CAPTCHA for GEETEST.com",

@@ -5,0 +5,0 @@ "browserslist": [

@@ -19,18 +19,20 @@

- [The "dataObject":](#the-dataobject)
- [`width: string | number`](#width-string--number)
- [`product: 'popup' | 'float' | 'custom' | 'bind'`](#product-popup--float--custom--bind)
- [`lang: 'zh-cn' | 'en'`](#lang-zh-cn--en)
- [`protocol: 'http://' | 'https://'`](#protocol-http--https)
- [`area: string`](#area-string)
- [`nextWidth: string`](#nextwidth-string)
- [`bgColor: string`](#bgcolor-string)
- [`timeout: number`](#timeout-number)
- [`onReady: () => any`](#onready---any)
- [`onSuccess: (result: resultObject) => any`](#onsuccess-result-resultobject--any)
- [`width?: string | number`](#width-string--number)
- [`product?: 'popup' | 'float' | 'custom' | 'bind'`](#product-popup--float--custom--bind)
- [`lang?: 'zh-cn' | 'en'`](#lang-zh-cn--en)
- [`protocol?: 'http://' | 'https://'`](#protocol-http--https)
- [`area?: string`](#area-string)
- [`nextWidth?: string`](#nextwidth-string)
- [`bgColor?: string`](#bgcolor-string)
- [`timeout?: number`](#timeout-number)
- [`onReady?: () => any`](#onready---any)
- [`onSuccess?: (result: resultObject) => any`](#onsuccess-result-resultobject--any)
- [The "resultObject":](#the-resultobject)
- [`onClose: () => any`](#onclose---any)
- [`onError: () => any`](#onerror---any)
- [`shouldReinitialize: (props: Props, nextProps: Props) => boolean`](#shouldreinitialize-props-props-nextprops-props--boolean)
- [`appendTo: (name: stirng) => any`](#appendto-name-stirng--any)
- [`bindForm: (name: stirng, position: string) => any`](#bindform-name-stirng-position-string--any)
- [`onClose?: () => any`](#onclose---any)
- [`onError?: () => any`](#onerror---any)
- [`shouldReinitialize?: (props: Props, nextProps: Props) => boolean`](#shouldreinitialize-props-props-nextprops-props--boolean)
- [`loadingComponent?: React.Component<{loading: boolean}>`](#loadingcomponent-reactcomponentloading-boolean)
- [`loadingText?: string`](#loadingtext-string)
- [`appendTo: (name: string) => any`](#appendto-name-string--any)
- [`bindForm: (name: string, position: string) => any`](#bindform-name-string-position-string--any)
- [`getValidate: (name: string) => any`](#getvalidate-name-string--any)

@@ -219,7 +221,11 @@ - [`reset: (name: string) => any`](#reset-name-string--any)

### `appendTo: (name: stirng) => any`
##### `loadingComponent?: React.Component<{loading: boolean}>`
##### `loadingText?: string`
### `appendTo: (name: string) => any`
a proxy method for GEETEST instance.appendTo method
### `bindForm: (name: stirng, position: string) => any`
### `bindForm: (name: string, position: string) => any`

@@ -226,0 +232,0 @@ a proxy method for GEETEST instance.bindForm method

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc