react-jsonschema-form
Advanced tools
Comparing version 0.21.1 to 0.22.0
@@ -1,3 +0,3 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.JSONSchemaForm=t(require("react")):e.JSONSchemaForm=t(e.React)}(this,function(e){return function(e){function t(n){if(r[n])return r[n].exports;var a=r[n]={exports:{},id:n,loaded:!1};return e[n].call(a.exports,a,a.exports,t),a.loaded=!0,a.exports}var r={};return t.m=e,t.c=r,t.p="/dist/",t(0)}([function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var a=r(1),i=n(a);t["default"]=i["default"]},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 o(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)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=r(2),l=n(u),f=r(3),c=r(14),d=n(c),h=r(31),m=n(h),p=r(15),y=r(33),v=n(y),g=function(e){function t(e){a(this,t);var r=i(this,Object.getPrototypeOf(t).call(this,e));return r.onChange=function(e){var t=arguments.length<=1||void 0===arguments[1]?{validate:!1}:arguments[1],n=r.props.liveValidate||t.validate,a=n?r.validate(e):r.state.errors,i=(0,p.toErrorSchema)(a);r.setState({status:"editing",formData:e,errors:a,errorSchema:i},function(e){r.props.onChange&&r.props.onChange(r.state)})},r.onSubmit=function(e){e.preventDefault(),r.setState({status:"submitted"});var t=r.validate(r.state.formData);if(Object.keys(t).length>0){var n=(0,p.toErrorSchema)(t);return void r.setState({errors:t,errorSchema:n},function(e){r.props.onError?r.props.onError(t):console.error("Form validation failed",t)})}r.props.onSubmit&&r.props.onSubmit(r.state),r.setState({status:"initial"})},r.state=r.getStateFromProps(e),r}return o(t,e),s(t,[{key:"componentWillReceiveProps",value:function(e){this.setState(this.getStateFromProps(e))}},{key:"getStateFromProps",value:function(e){var t="schema"in e?e.schema:this.props.schema,r="uiSchema"in e?e.uiSchema:this.props.uiSchema,n=!!e.formData,a=t.definitions,i=(0,p.getDefaultFormState)(t,e.formData,a),o=n?this.validate(i,t):[],s=(0,p.toErrorSchema)(o),u=(0,p.toIdSchema)(t,r["ui:rootFieldId"],a);return{status:"initial",formData:i,edit:n,errors:o,errorSchema:s,idSchema:u}}},{key:"shouldComponentUpdate",value:function(e,t){return(0,p.shouldRender)(this,e,t)}},{key:"validate",value:function(e,t){var r=new f.Validator;return r.validate(e,t||this.props.schema).errors}},{key:"renderErrors",value:function(){var e=this.state,t=e.status,r=e.errors;return"editing"!==t&&r.length?l["default"].createElement(v["default"],{errors:r}):null}},{key:"getRegistry",value:function(){var e=this.props.SchemaField||d["default"],t=this.props.TitleField||m["default"],r=Object.assign({SchemaField:e,TitleField:t},this.props.fields);return{fields:r,widgets:this.props.widgets||{},definitions:this.props.schema.definitions||{}}}},{key:"render",value:function(){var e=this.props,t=e.children,r=e.schema,n=e.uiSchema,a=this.state,i=a.formData,o=a.errorSchema,s=a.idSchema,u=this.getRegistry(),f=u.fields.SchemaField;return l["default"].createElement("form",{className:"rjsf",onSubmit:this.onSubmit},this.renderErrors(),l["default"].createElement(f,{schema:r,uiSchema:n,errorSchema:o,idSchema:s,formData:i,onChange:this.onChange,registry:u}),t?t:l["default"].createElement("p",null,l["default"].createElement("button",{type:"submit",className:"btn btn-info"},"Submit")))}}]),t}(u.Component);g.defaultProps={uiSchema:{},liveValidate:!1},t["default"]=g,t["default"]=g},function(t,r){t.exports=e},function(e,t,r){"use strict";var n=e.exports.Validator=r(4);e.exports.ValidatorResult=r(13).ValidatorResult,e.exports.ValidationError=r(13).ValidationError,e.exports.SchemaError=r(13).SchemaError,e.exports.validate=function(e,t,r){var a=new n;return a.validate(e,t,r)}},function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},a=r(5),i=r(12),o=r(13),s=o.ValidatorResult,u=o.SchemaError,l=o.SchemaContext,f=function d(){this.customFormats=Object.create(d.prototype.customFormats),this.schemas={},this.unresolvedRefs=[],this.types=Object.create(c),this.attributes=Object.create(i.validators)};f.prototype.customFormats={},f.prototype.schemas=null,f.prototype.types=null,f.prototype.attributes=null,f.prototype.unresolvedRefs=null,f.prototype.addSchema=function(e,t){if(!e)return null;var r=t||e.id;return this.addSubSchema(r,e),r&&(this.schemas[r]=e),this.schemas[r]},f.prototype.addSubSchema=function(e,t){if(t&&"object"==("undefined"==typeof t?"undefined":n(t))){if(t.$ref){var r=a.resolve(e,t.$ref);return void(void 0===this.schemas[r]&&(this.schemas[r]=null,this.unresolvedRefs.push(r)))}var i=t.id&&a.resolve(e,t.id),s=i||e;if(i){if(this.schemas[i]){if(!o.deepCompareStrict(this.schemas[i],t))throw new Error("Schema <"+t+"> already exists with different definition");return this.schemas[i]}this.schemas[i]=t;var u=i.replace(/^([^#]*)#$/,"$1");this.schemas[u]=t}return this.addSubSchemaArray(s,t.items instanceof Array?t.items:[t.items]),this.addSubSchemaArray(s,t["extends"]instanceof Array?t["extends"]:[t["extends"]]),this.addSubSchema(s,t.additionalItems),this.addSubSchemaObject(s,t.properties),this.addSubSchema(s,t.additionalProperties),this.addSubSchemaObject(s,t.definitions),this.addSubSchemaObject(s,t.patternProperties),this.addSubSchemaObject(s,t.dependencies),this.addSubSchemaArray(s,t.disallow),this.addSubSchemaArray(s,t.allOf),this.addSubSchemaArray(s,t.anyOf),this.addSubSchemaArray(s,t.oneOf),this.addSubSchema(s,t.not),this.schemas[i]}},f.prototype.addSubSchemaArray=function(e,t){if(t instanceof Array)for(var r=0;r<t.length;r++)this.addSubSchema(e,t[r])},f.prototype.addSubSchemaObject=function(e,t){if(t&&"object"==("undefined"==typeof t?"undefined":n(t)))for(var r in t)this.addSubSchema(e,t[r])},f.prototype.setSchemas=function(e){this.schemas=e},f.prototype.getSchema=function(e){return this.schemas[e]},f.prototype.validate=function(e,t,r,n){r||(r={});var i=r.propertyName||"instance",o=a.resolve(r.base||"/",t.id||"");if(n||(n=new l(t,r,i,o,Object.create(this.schemas)),n.schemas[o]||(n.schemas[o]=t)),t){var s=this.validateSchema(e,t,r,n);if(!s)throw new Error("Result undefined");return s}throw new u("no schema specified",t)},f.prototype.validateSchema=function(e,t,r,n){function a(e){var t="string"==typeof e?e:e.$ref;return"string"==typeof t?t:!1}function f(e,t){var r;return(r=a(e))?c.resolve(e,r,t).subschema:e}var c=this,d=new s(e,t,r,n);if(!t)throw new Error("schema is undefined");t["extends"]&&(t["extends"]instanceof Array?t["extends"].forEach(function(e){t=o.deepMerge(t,f(e,n))}):t=o.deepMerge(t,f(t["extends"],n)));var h;if(h=a(t)){var m=this.resolve(t,h,n),p=new l(m.subschema,r,n.propertyPath,m.switchSchema,n.schemas);return this.validateSchema(e,m.subschema,r,p)}var y=r&&r.skipAttributes||[];for(var v in t)if(!i.ignoreProperties[v]&&y.indexOf(v)<0){var g=null,b=c.attributes[v];if(b)g=b.call(c,e,t,r,n);else if(r.allowUnknownAttributes===!1)throw new u("Unsupported attribute: "+v,t);g&&d.importErrors(g)}if("function"==typeof r.rewrite){var S=r.rewrite.call(this,e,t,r,n);d.instance=S}return d},f.prototype.resolve=function(e,t,r){if(t=r.resolve(t),r.schemas[t])return{subschema:r.schemas[t],switchSchema:t};var n=a.parse(t),i=n&&n.hash,s=i&&i.length&&t.substr(0,t.length-i.length);if(!s||!r.schemas[s])throw new u("no such schema <"+t+">",e);var l=o.objectGetPath(r.schemas[s],i.substr(1));if(void 0===l)throw new u("no such schema "+i+" located in <"+s+">",e);return{subschema:l,switchSchema:t}},f.prototype.testType=function(e,t,r,a,i){if("function"==typeof this.types[i])return this.types[i].call(this,e);if(i&&"object"==("undefined"==typeof i?"undefined":n(i))){var o=this.validateSchema(e,i,r,a);return void 0===o||!(o&&o.errors.length)}return!0};var c=f.prototype.types={};c.string=function(e){return"string"==typeof e},c.number=function(e){return"number"==typeof e&&isFinite(e)},c.integer=function(e){return"number"==typeof e&&e%1===0},c["boolean"]=function(e){return"boolean"==typeof e},c.array=function(e){return e instanceof Array},c["null"]=function(e){return null===e},c.date=function(e){return e instanceof Date},c.any=function(e){return!0},c.object=function(e){return e&&"object"===("undefined"==typeof e?"undefined":n(e))&&!(e instanceof Array)&&!(e instanceof Date)},e.exports=f},function(e,t,r){"use strict";function n(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function a(e,t,r){if(e&&l(e)&&e instanceof n)return e;var a=new n;return a.parse(e,t,r),a}function i(e){return u(e)&&(e=a(e)),e instanceof n?e.format():n.prototype.format.call(e)}function o(e,t){return a(e,!1,!0).resolve(t)}function s(e,t){return e?a(e,!1,!0).resolveObject(t):t}function u(e){return"string"==typeof e}function l(e){return"object"===("undefined"==typeof e?"undefined":d(e))&&null!==e}function f(e){return null===e}function c(e){return null==e}var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},h=r(6);t.parse=a,t.resolve=o,t.resolveObject=s,t.format=i,t.Url=n;var m=/^([a-z0-9.+-]+:)/i,p=/:[0-9]*$/,y=["<",">",'"',"`"," ","\r","\n"," "],v=["{","}","|","\\","^","`"].concat(y),g=["'"].concat(v),b=["%","/","?",";","#"].concat(g),S=["/","?","#"],w=255,E=/^[a-z0-9A-Z_-]{0,63}$/,O=/^([a-z0-9A-Z_-]{0,63})(.*)$/,j={javascript:!0,"javascript:":!0},x={javascript:!0,"javascript:":!0},A={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},P=r(9);n.prototype.parse=function(e,t,r){if(!u(e))throw new TypeError("Parameter 'url' must be a string, not "+("undefined"==typeof e?"undefined":d(e)));var n=e;n=n.trim();var a=m.exec(n);if(a){a=a[0];var i=a.toLowerCase();this.protocol=i,n=n.substr(a.length)}if(r||a||n.match(/^\/\/[^@\/]+@[^@\/]+/)){var o="//"===n.substr(0,2);!o||a&&x[a]||(n=n.substr(2),this.slashes=!0)}if(!x[a]&&(o||a&&!A[a])){for(var s=-1,l=0;l<S.length;l++){var f=n.indexOf(S[l]);-1!==f&&(-1===s||s>f)&&(s=f)}var c,p;p=-1===s?n.lastIndexOf("@"):n.lastIndexOf("@",s),-1!==p&&(c=n.slice(0,p),n=n.slice(p+1),this.auth=decodeURIComponent(c)),s=-1;for(var l=0;l<b.length;l++){var f=n.indexOf(b[l]);-1!==f&&(-1===s||s>f)&&(s=f)}-1===s&&(s=n.length),this.host=n.slice(0,s),n=n.slice(s),this.parseHost(),this.hostname=this.hostname||"";var y="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!y)for(var v=this.hostname.split(/\./),l=0,_=v.length;_>l;l++){var C=v[l];if(C&&!C.match(E)){for(var k="",F=0,q=C.length;q>F;F++)k+=C.charCodeAt(F)>127?"x":C[F];if(!k.match(E)){var N=v.slice(0,l),M=v.slice(l+1),I=C.match(O);I&&(N.push(I[1]),M.unshift(I[2])),M.length&&(n="/"+M.join(".")+n),this.hostname=N.join(".");break}}}if(this.hostname.length>w?this.hostname="":this.hostname=this.hostname.toLowerCase(),!y){for(var R=this.hostname.split("."),$=[],l=0;l<R.length;++l){var V=R[l];$.push(V.match(/[^A-Za-z0-9_-]/)?"xn--"+h.encode(V):V)}this.hostname=$.join(".")}var D=this.port?":"+this.port:"",z=this.hostname||"";this.host=z+D,this.href+=this.host,y&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==n[0]&&(n="/"+n))}if(!j[i])for(var l=0,_=g.length;_>l;l++){var T=g[l],Z=encodeURIComponent(T);Z===T&&(Z=escape(T)),n=n.split(T).join(Z)}var U=n.indexOf("#");-1!==U&&(this.hash=n.substr(U),n=n.slice(0,U));var L=n.indexOf("?");if(-1!==L?(this.search=n.substr(L),this.query=n.substr(L+1),t&&(this.query=P.parse(this.query)),n=n.slice(0,L)):t&&(this.search="",this.query={}),n&&(this.pathname=n),A[i]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var D=this.pathname||"",V=this.search||"";this.path=D+V}return this.href=this.format(),this},n.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",a=!1,i="";this.host?a=e+this.host:this.hostname&&(a=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(a+=":"+this.port)),this.query&&l(this.query)&&Object.keys(this.query).length&&(i=P.stringify(this.query));var o=this.search||i&&"?"+i||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||A[t])&&a!==!1?(a="//"+(a||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):a||(a=""),n&&"#"!==n.charAt(0)&&(n="#"+n),o&&"?"!==o.charAt(0)&&(o="?"+o),r=r.replace(/[?#]/g,function(e){return encodeURIComponent(e)}),o=o.replace("#","%23"),t+a+r+o+n},n.prototype.resolve=function(e){return this.resolveObject(a(e,!1,!0)).format()},n.prototype.resolveObject=function(e){if(u(e)){var t=new n;t.parse(e,!1,!0),e=t}var r=new n;if(Object.keys(this).forEach(function(e){r[e]=this[e]},this),r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol)return Object.keys(e).forEach(function(t){"protocol"!==t&&(r[t]=e[t])}),A[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r;if(e.protocol&&e.protocol!==r.protocol){if(!A[e.protocol])return Object.keys(e).forEach(function(t){r[t]=e[t]}),r.href=r.format(),r;if(r.protocol=e.protocol,e.host||x[e.protocol])r.pathname=e.pathname;else{for(var a=(e.pathname||"").split("/");a.length&&!(e.host=a.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==a[0]&&a.unshift(""),a.length<2&&a.unshift(""),r.pathname=a.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var i=r.pathname||"",o=r.search||"";r.path=i+o}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var s=r.pathname&&"/"===r.pathname.charAt(0),l=e.host||e.pathname&&"/"===e.pathname.charAt(0),d=l||s||r.host&&e.pathname,h=d,m=r.pathname&&r.pathname.split("/")||[],a=e.pathname&&e.pathname.split("/")||[],p=r.protocol&&!A[r.protocol];if(p&&(r.hostname="",r.port=null,r.host&&(""===m[0]?m[0]=r.host:m.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===a[0]?a[0]=e.host:a.unshift(e.host)),e.host=null),d=d&&(""===a[0]||""===m[0])),l)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,m=a;else if(a.length)m||(m=[]),m.pop(),m=m.concat(a),r.search=e.search,r.query=e.query;else if(!c(e.search)){if(p){r.hostname=r.host=m.shift();var y=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;y&&(r.auth=y.shift(),r.host=r.hostname=y.shift())}return r.search=e.search,r.query=e.query,f(r.pathname)&&f(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!m.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var v=m.slice(-1)[0],g=(r.host||e.host)&&("."===v||".."===v)||""===v,b=0,S=m.length;S>=0;S--)v=m[S],"."==v?m.splice(S,1):".."===v?(m.splice(S,1),b++):b&&(m.splice(S,1),b--);if(!d&&!h)for(;b--;b)m.unshift("..");!d||""===m[0]||m[0]&&"/"===m[0].charAt(0)||m.unshift(""),g&&"/"!==m.join("/").substr(-1)&&m.push("");var w=""===m[0]||m[0]&&"/"===m[0].charAt(0);if(p){r.hostname=r.host=w?"":m.length?m.shift():"";var y=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;y&&(r.auth=y.shift(),r.host=r.hostname=y.shift())}return d=d||r.host&&m.length,d&&!w&&m.unshift(""),m.length?r.pathname=m.join("/"):(r.pathname=null,r.path=null),f(r.pathname)&&f(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},n.prototype.parseHost=function(){var e=this.host,t=p.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,r){var n;(function(e,a){"use strict";var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};!function(o){function s(e){throw RangeError(R[e])}function u(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function l(e,t){var r=e.split("@"),n="";r.length>1&&(n=r[0]+"@",e=r[1]),e=e.replace(I,".");var a=e.split("."),i=u(a,t).join(".");return n+i}function f(e){for(var t,r,n=[],a=0,i=e.length;i>a;)t=e.charCodeAt(a++),t>=55296&&56319>=t&&i>a?(r=e.charCodeAt(a++),56320==(64512&r)?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),a--)):n.push(t);return n}function c(e){return u(e,function(e){var t="";return e>65535&&(e-=65536,t+=D(e>>>10&1023|55296),e=56320|1023&e),t+=D(e)}).join("")}function d(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:x}function h(e,t){return e+22+75*(26>e)-((0!=t)<<5)}function m(e,t,r){var n=0;for(e=r?V(e/C):e>>1,e+=V(e/t);e>$*P>>1;n+=x)e=V(e/$);return V(n+($+1)*e/(e+_))}function p(e){var t,r,n,a,i,o,u,l,f,h,p=[],y=e.length,v=0,g=F,b=k;for(r=e.lastIndexOf(q),0>r&&(r=0),n=0;r>n;++n)e.charCodeAt(n)>=128&&s("not-basic"),p.push(e.charCodeAt(n));for(a=r>0?r+1:0;y>a;){for(i=v,o=1,u=x;a>=y&&s("invalid-input"),l=d(e.charCodeAt(a++)),(l>=x||l>V((j-v)/o))&&s("overflow"),v+=l*o,f=b>=u?A:u>=b+P?P:u-b,!(f>l);u+=x)h=x-f,o>V(j/h)&&s("overflow"),o*=h;t=p.length+1,b=m(v-i,t,0==i),V(v/t)>j-g&&s("overflow"),g+=V(v/t),v%=t,p.splice(v++,0,g)}return c(p)}function y(e){var t,r,n,a,i,o,u,l,c,d,p,y,v,g,b,S=[];for(e=f(e),y=e.length,t=F,r=0,i=k,o=0;y>o;++o)p=e[o],128>p&&S.push(D(p));for(n=a=S.length,a&&S.push(q);y>n;){for(u=j,o=0;y>o;++o)p=e[o],p>=t&&u>p&&(u=p);for(v=n+1,u-t>V((j-r)/v)&&s("overflow"),r+=(u-t)*v,t=u,o=0;y>o;++o)if(p=e[o],t>p&&++r>j&&s("overflow"),p==t){for(l=r,c=x;d=i>=c?A:c>=i+P?P:c-i,!(d>l);c+=x)b=l-d,g=x-d,S.push(D(h(d+b%g,0))),l=V(b/g);S.push(D(h(l,0))),i=m(r,v,n==a),r=0,++n}++r,++t}return S.join("")}function v(e){return l(e,function(e){return N.test(e)?p(e.slice(4).toLowerCase()):e})}function g(e){return l(e,function(e){return M.test(e)?"xn--"+y(e):e})}var b="object"==i(t)&&t&&!t.nodeType&&t,S="object"==i(e)&&e&&!e.nodeType&&e,w="object"==("undefined"==typeof a?"undefined":i(a))&&a;w.global!==w&&w.window!==w&&w.self!==w||(o=w);var E,O,j=2147483647,x=36,A=1,P=26,_=38,C=700,k=72,F=128,q="-",N=/^xn--/,M=/[^\x20-\x7E]/,I=/[\x2E\u3002\uFF0E\uFF61]/g,R={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},$=x-A,V=Math.floor,D=String.fromCharCode;if(E={version:"1.3.2",ucs2:{decode:f,encode:c},decode:p,encode:y,toASCII:g,toUnicode:v},"object"==i(r(8))&&r(8))n=function(){return E}.call(t,r,t,e),!(void 0!==n&&(e.exports=n));else if(b&&S)if(e.exports==b)S.exports=E;else for(O in E)E.hasOwnProperty(O)&&(b[O]=E[O]);else o.punycode=E}(void 0)}).call(t,r(7)(e),function(){return this}())},function(e,t){"use strict";e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t){(function(t){e.exports=t}).call(t,{})},function(e,t,r){"use strict";t.decode=t.parse=r(10),t.encode=t.stringify=r(11)},function(e,t){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,a){t=t||"&",n=n||"=";var i={};if("string"!=typeof e||0===e.length)return i;var o=/\+/g;e=e.split(t);var s=1e3;a&&"number"==typeof a.maxKeys&&(s=a.maxKeys);var u=e.length;s>0&&u>s&&(u=s);for(var l=0;u>l;++l){var f,c,d,h,m=e[l].replace(o,"%20"),p=m.indexOf(n);p>=0?(f=m.substr(0,p),c=m.substr(p+1)):(f=m,c=""),d=decodeURIComponent(f),h=decodeURIComponent(c),r(i,d)?Array.isArray(i[d])?i[d].push(h):i[d]=[i[d],h]:i[d]=h}return i}},function(e,t){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},n=function(e){switch("undefined"==typeof e?"undefined":r(e)){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,a,i){return t=t||"&",a=a||"=",null===e&&(e=void 0),"object"===("undefined"==typeof e?"undefined":r(e))?Object.keys(e).map(function(r){var i=encodeURIComponent(n(r))+a;return Array.isArray(e[r])?e[r].map(function(e){return i+encodeURIComponent(n(e))}).join(t):i+encodeURIComponent(n(e[r]))}).join(t):i?encodeURIComponent(n(i))+a+encodeURIComponent(n(e)):""}},function(e,t,r){"use strict";function n(e,t,r,n){return this.validateSchema(e,n,t,r).valid}function a(e,t,r,n,a,i){if(!t.properties||void 0===t.properties[a])if(t.additionalProperties===!1)i.addError({name:"additionalProperties",argument:a,message:"additionalProperty "+JSON.stringify(a)+" exists in instance when not allowed"});else{var o=t.additionalProperties||{},s=this.validateSchema(e[a],o,r,n.makeChild(o,a));s.instance!==i.instance[a]&&(i.instance[a]=s.instance),i.importErrors(s)}}function i(e,t,r){var n,a=r.length;for(n=t+1,a;a>n;n++)if(s.deepCompareStrict(e,r[n]))return!1;return!0}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},s=r(13),u=s.ValidatorResult,l=s.SchemaError,f={};f.ignoreProperties={id:!0,"default":!0,description:!0,title:!0,exclusiveMinimum:!0,exclusiveMaximum:!0,additionalItems:!0,$schema:!0,$ref:!0,"extends":!0};var c=f.validators={};c.type=function(e,t,r,n){if(void 0===e)return null;var a=new u(e,t,r,n),i=t.type instanceof Array?t.type:[t.type];if(!i.some(this.testType.bind(this,e,t,r,n))){var o=i.map(function(e){return e.id&&"<"+e.id+">"||e+""});a.addError({name:"type",argument:o,message:"is not of a type(s) "+o})}return a},c.anyOf=function(e,t,r,a){if(void 0===e)return null;var i=new u(e,t,r,a);if(!(t.anyOf instanceof Array))throw new l("anyOf must be an array");if(!t.anyOf.some(n.bind(this,e,r,a))){var o=t.anyOf.map(function(e,t){return e.id&&"<"+e.id+">"||e.title&&JSON.stringify(e.title)||e.$ref&&"<"+e.$ref+">"||"[subschema "+t+"]"});i.addError({name:"anyOf",argument:o,message:"is not any of "+o.join(",")})}return i},c.allOf=function(e,t,r,n){if(void 0===e)return null;if(!(t.allOf instanceof Array))throw new l("allOf must be an array");var a=new u(e,t,r,n),i=this;return t.allOf.forEach(function(t,o){var s=i.validateSchema(e,t,r,n);if(!s.valid){var u=t.id&&"<"+t.id+">"||t.title&&JSON.stringify(t.title)||t.$ref&&"<"+t.$ref+">"||"[subschema "+o+"]";a.addError({name:"allOf",argument:{id:u,length:s.errors.length,valid:s},message:"does not match allOf schema "+u+" with "+s.errors.length+" error[s]:"}),a.importErrors(s)}}),a},c.oneOf=function(e,t,r,a){if(void 0===e)return null;if(!(t.oneOf instanceof Array))throw new l("oneOf must be an array");var i=new u(e,t,r,a),o=t.oneOf.filter(n.bind(this,e,r,a)).length,s=t.oneOf.map(function(e,t){return e.id&&"<"+e.id+">"||e.title&&JSON.stringify(e.title)||e.$ref&&"<"+e.$ref+">"||"[subschema "+t+"]"});return 1!==o&&i.addError({name:"oneOf",argument:s,message:"is not exactly one from "+s.join(",")}),i},c.properties=function(e,t,r,n){if(void 0!==e&&e instanceof Object){var a=new u(e,t,r,n),i=t.properties||{};for(var o in i){var s=(e||void 0)&&e[o],l=this.validateSchema(s,i[o],r,n.makeChild(i[o],o));l.instance!==a.instance[o]&&(a.instance[o]=l.instance),a.importErrors(l)}return a}},c.patternProperties=function(e,t,r,n){if(void 0!==e&&this.types.object(e)){var i=new u(e,t,r,n),o=t.patternProperties||{};for(var s in e){var l=!0;for(var f in o){var c=new RegExp(f);if(c.test(s)){l=!1;var d=this.validateSchema(e[s],o[f],r,n.makeChild(o[f],s));d.instance!==i.instance[s]&&(i.instance[s]=d.instance),i.importErrors(d)}}l&&a.call(this,e,t,r,n,s,i)}return i}},c.additionalProperties=function(e,t,r,n){if(void 0!==e&&this.types.object(e)){if(t.patternProperties)return null;var i=new u(e,t,r,n);for(var o in e)a.call(this,e,t,r,n,o,i);return i}},c.minProperties=function(e,t,r,n){if(!e||"object"!==("undefined"==typeof e?"undefined":o(e)))return null;var a=new u(e,t,r,n),i=Object.keys(e);return i.length>=t.minProperties||a.addError({name:"minProperties",argument:t.minProperties,message:"does not meet minimum property length of "+t.minProperties}),a},c.maxProperties=function(e,t,r,n){if(!e||"object"!==("undefined"==typeof e?"undefined":o(e)))return null;var a=new u(e,t,r,n),i=Object.keys(e);return i.length<=t.maxProperties||a.addError({name:"maxProperties",argument:t.maxProperties,message:"does not meet maximum property length of "+t.maxProperties}),a},c.items=function(e,t,r,n){if(!(e instanceof Array))return null;var a=this,i=new u(e,t,r,n);return void 0!==e&&t.items?(e.every(function(e,o){var s=t.items instanceof Array?t.items[o]||t.additionalItems:t.items;if(void 0===s)return!0;if(s===!1)return i.addError({name:"items",message:"additionalItems not permitted"}),!1;var u=a.validateSchema(e,s,r,n.makeChild(s,o));return u.instance!==i.instance[o]&&(i.instance[o]=u.instance),i.importErrors(u),!0}),i):i},c.minimum=function(e,t,r,n){if("number"!=typeof e)return null;var a=new u(e,t,r,n),i=!0;return i=t.exclusiveMinimum&&t.exclusiveMinimum===!0?e>t.minimum:e>=t.minimum,i||a.addError({name:"minimum",argument:t.minimum,message:"must have a minimum value of "+t.minimum}),a},c.maximum=function(e,t,r,n){if("number"!=typeof e)return null;var a,i=new u(e,t,r,n);return a=t.exclusiveMaximum&&t.exclusiveMaximum===!0?e<t.maximum:e<=t.maximum,a||i.addError({name:"maximum",argument:t.maximum,message:"must have a maximum value of "+t.maximum}),i},c.divisibleBy=function(e,t,r,n){if("number"!=typeof e)return null;if(0==t.divisibleBy)throw new l("divisibleBy cannot be zero");var a=new u(e,t,r,n);return e/t.divisibleBy%1&&a.addError({name:"divisibleBy",argument:t.divisibleBy,message:"is not divisible by (multiple of) "+JSON.stringify(t.divisibleBy)}),a},c.multipleOf=function(e,t,r,n){if("number"!=typeof e)return null;if(0==t.multipleOf)throw new l("multipleOf cannot be zero");var a=new u(e,t,r,n);return e/t.multipleOf%1&&a.addError({name:"multipleOf",argument:t.multipleOf,message:"is not a multiple of (divisible by) "+JSON.stringify(t.multipleOf)}),a},c.required=function(e,t,r,n){var a=new u(e,t,r,n);return void 0===e&&t.required===!0?a.addError({name:"required",message:"is required"}):e&&"object"===("undefined"==typeof e?"undefined":o(e))&&Array.isArray(t.required)&&t.required.forEach(function(t){void 0===e[t]&&a.addError({name:"required",argument:t,message:"requires property "+JSON.stringify(t)})}),a},c.pattern=function(e,t,r,n){if("string"!=typeof e)return null;var a=new u(e,t,r,n);return e.match(t.pattern)||a.addError({name:"pattern",argument:t.pattern,message:"does not match pattern "+JSON.stringify(t.pattern)}),a},c.format=function(e,t,r,n){var a=new u(e,t,r,n);return a.disableFormat||s.isFormat(e,t.format,this)||a.addError({name:"format",argument:t.format,message:"does not conform to the "+JSON.stringify(t.format)+" format"}),a},c.minLength=function(e,t,r,n){if("string"!=typeof e)return null;var a=new u(e,t,r,n);return e.length>=t.minLength||a.addError({name:"minLength",argument:t.minLength,message:"does not meet minimum length of "+t.minLength}),a},c.maxLength=function(e,t,r,n){if("string"!=typeof e)return null;var a=new u(e,t,r,n);return e.length<=t.maxLength||a.addError({name:"maxLength",argument:t.maxLength,message:"does not meet maximum length of "+t.maxLength}),a},c.minItems=function(e,t,r,n){if(!(e instanceof Array))return null;var a=new u(e,t,r,n);return e.length>=t.minItems||a.addError({name:"minItems",argument:t.minItems,message:"does not meet minimum length of "+t.minItems}),a},c.maxItems=function(e,t,r,n){if(!(e instanceof Array))return null;var a=new u(e,t,r,n);return e.length<=t.maxItems||a.addError({name:"maxItems",argument:t.maxItems,message:"does not meet maximum length of "+t.maxItems}),a},c.uniqueItems=function(e,t,r,n){function a(e,t,r){for(var n=t+1;n<r.length;n++)if(s.deepCompareStrict(e,r[n]))return!1;return!0}var i=new u(e,t,r,n);return e instanceof Array?(e.every(a)||i.addError({name:"uniqueItems",message:"contains duplicate item"}),i):i},c.uniqueItems=function(e,t,r,n){if(!(e instanceof Array))return null;var a=new u(e,t,r,n);return e.every(i)||a.addError({name:"uniqueItems",message:"contains duplicate item"}),a},c.dependencies=function(e,t,r,n){if(!e||"object"!=("undefined"==typeof e?"undefined":o(e)))return null;var a=new u(e,t,r,n);for(var i in t.dependencies)if(void 0!==e[i]){var s=t.dependencies[i],l=n.makeChild(s,i);if("string"==typeof s&&(s=[s]),s instanceof Array)s.forEach(function(t){void 0===e[t]&&a.addError({name:"dependencies",argument:l.propertyPath,message:"property "+t+" not found, required by "+l.propertyPath})});else{var f=this.validateSchema(e,s,r,l);a.instance!==f.instance&&(a.instance=f.instance),f&&f.errors.length&&(a.addError({name:"dependencies",argument:l.propertyPath,message:"does not meet dependency required by "+l.propertyPath}),a.importErrors(f))}}return a},c["enum"]=function(e,t,r,n){if(!(t["enum"]instanceof Array))throw new l("enum expects an array",t);if(void 0===e)return null;var a=new u(e,t,r,n);return t["enum"].some(s.deepCompareStrict.bind(null,e))||a.addError({name:"enum",argument:t["enum"],message:"is not one of enum values: "+t["enum"].join(",")}),a},c.not=c.disallow=function(e,t,r,n){var a=this;if(void 0===e)return null;var i=new u(e,t,r,n),o=t.not||t.disallow;return o?(o instanceof Array||(o=[o]),o.forEach(function(o){if(a.testType(e,t,r,n,o)){var s=o&&o.id&&"<"+o.id+">"||o;i.addError({name:"not",argument:s,message:"is of prohibited type "+s})}}),i):null},e.exports=f},function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},a=r(5),i=t.ValidationError=function(e,t,r,n,a,i){n&&(this.property=n),e&&(this.message=e),r&&(r.id?this.schema=r.id:this.schema=r),t&&(this.instance=t),this.name=a,this.argument=i,this.stack=this.toString()};i.prototype.toString=function(){return this.property+" "+this.message};var o=t.ValidatorResult=function(e,t,r,n){this.instance=e,this.schema=t,this.propertyPath=n.propertyPath,this.errors=[],this.throwError=r&&r.throwError,this.disableFormat=r&&r.disableFormat===!0};o.prototype.addError=function(e){var t;if("string"==typeof e)t=new i(e,this.instance,this.schema,this.propertyPath);else{if(!e)throw new Error("Missing error detail");if(!e.message)throw new Error("Missing error message");if(!e.name)throw new Error("Missing validator type");t=new i(e.message,this.instance,this.schema,this.propertyPath,e.name,e.argument)}if(this.throwError)throw t;return this.errors.push(t),t},o.prototype.importErrors=function(e){if("string"==typeof e||e&&e.validatorType)this.addError(e);else if(e&&e.errors){var t=this.errors;e.errors.forEach(function(e){t.push(e)})}},o.prototype.toString=function(e){return this.errors.map(function(e,t){return t+": "+e.toString()+"\n"}).join("")},Object.defineProperty(o.prototype,"valid",{get:function(){return!this.errors.length}});var s=t.SchemaError=function c(e,t){this.message=e,this.schema=t,Error.call(this,e),Error.captureStackTrace(this,c)};s.prototype=Object.create(Error.prototype,{ | ||
constructor:{value:s,enumerable:!1},name:{value:"SchemaError",enumerable:!1}});var u=t.SchemaContext=function(e,t,r,n,a){this.schema=e,this.options=t,this.propertyPath=r,this.base=n,this.schemas=a};u.prototype.resolve=function(e){return a.resolve(this.base,e)},u.prototype.makeChild=function(e,t){var r=void 0===t?this.propertyPath:this.propertyPath+f(t),n=a.resolve(this.base,e.id||""),i=new u(e,this.options,r,n,Object.create(this.schemas));return e.id&&!i.schemas[n]&&(i.schemas[n]=e),i};var l=t.FORMAT_REGEXPS={"date-time":/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])[tT ](2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])(\.\d+)?([zZ]|[+-]([0-5][0-9]):(60|[0-5][0-9]))$/,date:/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])$/,time:/^(2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])$/,email:/^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!\.)){0,61}[a-zA-Z0-9]?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!$)){0,61}[a-zA-Z0-9]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/,"ip-address":/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,ipv6:/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,uri:/^[a-zA-Z][a-zA-Z0-9+-.]*:[^\s]*$/,color:/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/,hostname:/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,"host-name":/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,alpha:/^[a-zA-Z]+$/,alphanumeric:/^[a-zA-Z0-9]+$/,"utc-millisec":function(e){return"string"==typeof e&&parseFloat(e)===parseInt(e,10)&&!isNaN(e)},regex:function(e){var t=!0;try{new RegExp(e)}catch(r){t=!1}return t},style:/\s*(.+?):\s*([^;]+);?/g,phone:/^\+(?:[0-9] ?){6,14}[0-9]$/};l.regexp=l.regex,l.pattern=l.regex,l.ipv4=l["ip-address"],t.isFormat=function(e,t,r){if("string"==typeof e&&void 0!==l[t]){if(l[t]instanceof RegExp)return l[t].test(e);if("function"==typeof l[t])return l[t](e)}else if(r&&r.customFormats&&"function"==typeof r.customFormats[t])return r.customFormats[t](e);return!0};var f=t.makeSuffix=function(e){return e=e.toString(),e.match(/[.\s\[\]]/)||e.match(/^[\d]/)?e.match(/^\d+$/)?"["+e+"]":"["+JSON.stringify(e)+"]":"."+e};t.deepCompareStrict=function d(e,t){if(("undefined"==typeof e?"undefined":n(e))!==("undefined"==typeof t?"undefined":n(t)))return!1;if(e instanceof Array)return t instanceof Array?e.length!==t.length?!1:e.every(function(r,n){return d(e[n],t[n])}):!1;if("object"===("undefined"==typeof e?"undefined":n(e))){if(!e||!t)return e===t;var r=Object.keys(e),a=Object.keys(t);return r.length!==a.length?!1:r.every(function(r){return d(e[r],t[r])})}return e===t},e.exports.deepMerge=function h(e,t){var r=Array.isArray(t),a=r&&[]||{};return r?(e=e||[],a=a.concat(e),t.forEach(function(t,r){"object"===("undefined"==typeof t?"undefined":n(t))?a[r]=h(e[r],t):-1===e.indexOf(t)&&a.push(t)})):(e&&"object"===("undefined"==typeof e?"undefined":n(e))&&Object.keys(e).forEach(function(t){a[t]=e[t]}),Object.keys(t).forEach(function(r){"object"===n(t[r])&&t[r]&&e[r]?a[r]=h(e[r],t[r]):a[r]=t[r]})),a},t.objectGetPath=function(e,t){for(var r,n=t.split("/").slice(1);"string"==typeof(r=n.shift());){var a=decodeURIComponent(r.replace(/~0/,"~").replace(/~1/g,"/"));if(!(a in e))return;e=e[a]}return e},t.encodePath=function(e){return e.map(function(e){return"/"+encodeURIComponent(e).replace(/~/g,"%7E")}).join("")}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function a(e,t,r){var n=t["ui:field"];return"function"==typeof n?n:"string"==typeof n&&n in r?r[n]:P[e.type]||x["default"]}function i(e,t,r){return e?f["default"].createElement("label",{className:"control-label",htmlFor:r},t?e+A:e):null}function o(e){var t=e.errors;return f["default"].createElement("div",null,f["default"].createElement("p",null),f["default"].createElement("ul",{className:"error-detail bs-callout bs-callout-info"},(t||[]).map(function(e,t){return f["default"].createElement("li",{className:"text-danger",key:t},e)})))}function s(e){var t=e.type,r=e.classNames,n=e.errorSchema,a=e.label,s=e.required,u=e.displayLabel,l=e.id,c=e.children,d=n.errors,h=d&&d.length>0,m=["form-group","field","field-"+t,h?"field-error has-error":"",r].join(" ").trim();return f["default"].createElement("div",{className:m},u&&a?i(a,s,l):null,c,h?f["default"].createElement(o,{errors:d}):f["default"].createElement("div",null))}function u(e){var t=e.uiSchema,r=e.errorSchema,n=e.idSchema,i=e.name,o=e.required,u=e.registry,l=u.definitions,d=u.fields,h=(0,c.retrieveSchema)(e.schema,l),m=a(h,t,d);if(0===Object.keys(h).length)return f["default"].createElement("div",null);var p=!0;return"array"===h.type&&(p=(0,c.isMultiSelect)(h)),"object"===h.type&&(p=!1),f["default"].createElement(s,{label:h.title||i,errorSchema:r,required:o,type:h.type,displayLabel:p,id:n.id,classNames:t.classNames},f["default"].createElement(m,e))}Object.defineProperty(t,"__esModule",{value:!0});var l=r(2),f=n(l),c=r(15),d=r(24),h=n(d),m=r(25),p=n(m),y=r(27),v=n(y),g=r(30),b=n(g),S=r(28),w=n(S),E=r(31),O=n(E),j=r(32),x=n(j),A="*",P={array:h["default"],"boolean":p["default"],"date-time":w["default"],integer:v["default"],number:v["default"],object:b["default"],string:w["default"]};s.defaultProps={classNames:"",errorSchema:{errors:[]},required:!1,displayLabel:!0},u.defaultProps={uiSchema:{},errorSchema:{},idSchema:{},registry:{fields:{SchemaField:u,TitleField:O["default"]},widgets:{},definitions:{}}},t["default"]=u},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function a(e){switch(e){case"array":return[];case"boolean":return!1;case"date-time":return"";case"number":return 0;case"object":return{};case"string":return"";default:return}}function i(e,t){return null===e?a(t.type):e}function o(e,t){var r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];if("function"==typeof t)return t;if("string"!=typeof t)throw new Error("Unsupported widget definition: "+("undefined"==typeof t?"undefined":w(t)));if(t in r)return r[t];if(!$.hasOwnProperty(e))throw new Error("No alternative widget for type "+e);if(!$[e].hasOwnProperty(t))throw new Error('No alternative widget "'+t+'" for type '+e);return $[e][t]}function s(e,t){var r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],n=t;if(l(n)&&l(e["default"]))n=f(n,e["default"]);else if("default"in e)n=e["default"];else if("enum"in e&&Array.isArray(e["enum"]))n=e["enum"][0];else if("$ref"in e){var i=p(e.$ref,r);n=s(i,n,r)}return"undefined"==typeof n&&(n=a(e.type)),"object"===e.type?Object.keys(e.properties).reduce(function(t,a){return t[a]=s(e.properties[a],n[a],r),t},{}):n}function u(e,t){var r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];if(!l(e))throw new Error("Invalid schema: "+e);var n=y(e,r),a=s(n,void 0,r);return"undefined"==typeof t?a:l(t)?f(a,t):t||a}function l(e){return"object"==("undefined"==typeof e?"undefined":w(e))&&null!==e&&!Array.isArray(e)}function f(e,t){var r=Object.assign({},e);return Object.keys(t).reduce(function(r,n){var a=t[n];return e.hasOwnProperty(n)&&l(a)?r[n]=f(e[n],a):r[n]=a,r},r)}function c(e){if(/\.$/.test(e))return e;var t=Number(e),r="number"==typeof t&&!Number.isNaN(t);return r?t:e}function d(e,t){if(!Array.isArray(t))return e;if(t.length!==e.length)throw new Error("uiSchema order list length should match object properties length");var r=function(e){return[].slice.call(e).sort().toString()};if(r(t)!==r(e))throw new Error("uiSchema order list does not match object properties list");return t}function h(e){return Array.isArray(e.items["enum"])&&e.uniqueItems}function m(e){return e["enum"].map(function(t,r){var n=e.enumNames&&e.enumNames[r]||String(t);return{label:n,value:t}})}function p(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=/#\/definitions\/(.*)$/.exec(e);if(r&&r[1]&&t.hasOwnProperty(r[1]))return t[r[1]];throw new Error("Could not find a definition for "+e+".")}function y(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return e.hasOwnProperty("$ref")?p(e.$ref,t):e}function v(e,t,r){return!(0,O["default"])(e.props,t)||!(0,O["default"])(e.state,r)}function g(e){return e.split(".").reduce(function(e,t){var r=R.exec(t);return r?e=e.concat([r[1],parseInt(r[2],10)]):e.push(t),e},[])}function b(e){return e.length?e.reduce(function(e,t){var r=t.property,n=t.message,a=g(r),i=e,o=!0,s=!1,u=void 0;try{for(var l,f=a.slice(1)[Symbol.iterator]();!(o=(l=f.next()).done);o=!0){var c=l.value;c in i||(i[c]={}),i=i[c]}}catch(d){s=!0,u=d}finally{try{!o&&f["return"]&&f["return"]()}finally{if(s)throw u}}return Array.isArray(i.errors)?i.errors=i.errors.concat(n):i.errors=[n],e},{}):{}}function S(e,t,r){var n={id:t||"root"};if("$ref"in e){var a=y(e,r);return S(a,t,r)}if("items"in e)return S(e.items,t,r);if("object"!==e.type)return n;for(var i in e.properties||{}){var o=e.properties[i],s=n.id+"_"+i;n[i]=S(o,s,r)}return n}Object.defineProperty(t,"__esModule",{value:!0});var w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};t.defaultTypeValue=a,t.defaultFieldValue=i,t.getAlternativeWidget=o,t.getDefaultFormState=u,t.mergeObjects=f,t.asNumber=c,t.orderProperties=d,t.isMultiSelect=h,t.optionsList=m,t.retrieveSchema=y,t.shouldRender=v,t.toErrorSchema=b,t.toIdSchema=S;var E=r(16),O=n(E),j=r(18),x=n(j),A=r(19),P=n(A),_=r(20),C=n(_),k=r(21),F=n(k),q=r(22),N=n(q),M=r(23),I=n(M),R=/(.*)\[(\d+)\]$/,$={"boolean":{radio:P["default"],select:N["default"]},string:{password:x["default"],radio:P["default"],select:N["default"],textarea:I["default"]},number:{updown:C["default"],range:F["default"]},integer:{updown:C["default"],range:F["default"]}}},function(e,t,r){(function(t){"use strict";function n(e){return"[object Arguments]"===Object.prototype.toString.call(e)}function a(e,t){return i(e,t,[],[])}function i(e,r,s,u){if(e===r)return!0;if("object"!==("undefined"==typeof e?"undefined":o(e))||"object"!==("undefined"==typeof r?"undefined":o(r)))return!1;if(null===e||null===r)return!1;if(t.isBuffer(e)&&t.isBuffer(r)){if(e.equals)return e.equals(r);if(a.fastEqual)return a.fastEqual.call(e,r);if(e.length!==r.length)return!1;for(var l=0;l<e.length;l++)if(e[l]!==r[l])return!1;return!0}if(e instanceof Date&&r instanceof Date)return e.getTime()===r.getTime();if(e instanceof RegExp&&r instanceof RegExp)return e.source===r.source&&e.global===r.global&&e.multiline===r.multiline&&e.lastIndex===r.lastIndex&&e.ignoreCase===r.ignoreCase;if(n(e)||n(r)){if(!n(e)||!n(r))return!1;var f=Array.prototype.slice;return i(f.call(e),f.call(r),s,u)}if(e.constructor!==r.constructor)return!1;var c=Object.keys(e),d=Object.keys(r);if(0===c.length&&0===d.length)return!0;if(c.length!==d.length)return!1;for(var h=s.length;h--;)if(s[h]===e)return u[h]===r;s.push(e),u.push(r),c.sort(),d.sort();for(var m=c.length-1;m>=0;m--)if(c[m]!==d[m])return!1;for(var p,y=c.length-1;y>=0;y--)if(p=c[y],!i(e[p],r[p],s,u))return!1;return s.pop(),u.pop(),!0}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};e.exports=a;try{a.fastEqual=r(!function(){var e=new Error('Cannot find module "buffertools"');throw e.code="MODULE_NOT_FOUND",e}()).equals}catch(s){}}).call(t,r(17).Buffer)},function(e,t){"use strict";function r(){throw new Error("Buffer is not included.")}r.isBuffer=function(){return!1},t.INSPECT_MAX_BYTES=50,t.SlowBuffer=r,t.Buffer=r},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function a(e){var t=(e.schema,e.id),r=e.placeholder,n=e.value,a=e.defaultValue,i=e.required,s=e.onChange;return o["default"].createElement("input",{type:"password",id:t,className:"form-control",value:n,defaultValue:a,placeholder:r,required:i,onChange:function(e){return s(e.target.value)}})}Object.defineProperty(t,"__esModule",{value:!0});var i=r(2),o=n(i);t["default"]=a},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function a(e){var t=(e.schema,e.options),r=e.placeholder,n=e.value,a=e.defaultValue,i=(e.required,e.onChange),s=Math.random().toString();return o["default"].createElement("div",{className:"field-radio-group"},t.map(function(e,t){var u=void 0!==n?e.value===n:e.value===a;return o["default"].createElement("div",{key:t,className:"radio"},o["default"].createElement("label",null,o["default"].createElement("input",{type:"radio",name:s,value:e.value,checked:u,placeholder:r,onChange:function(t){return i(e.value)}}),e.label))}))}Object.defineProperty(t,"__esModule",{value:!0});var i=r(2),o=n(i);t["default"]=a},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function a(e){var t={};return e.multipleOf&&(t.step=e.multipleOf),e.minimum&&(t.min=e.minimum),e.maximum&&(t.max=e.maximum),t}function i(e){var t=e.schema,r=e.id,n=e.placeholder,i=e.value,s=e.defaultValue,l=e.required,f=e.onChange;return u["default"].createElement("input",o({type:"number",id:r,className:"form-control",value:i,defaultValue:s,placeholder:n,required:l,onChange:function(e){return f(e.target.value)}},a(t)))}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(2),u=n(s);t["default"]=i},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function a(e){var t={};return e.multipleOf&&(t.step=e.multipleOf),e.minimum&&(t.min=e.minimum),e.maximum&&(t.max=e.maximum),t}function i(e){var t=e.schema,r=e.id,n=e.placeholder,i=e.value,s=e.defaultValue,l=e.required,f=e.onChange;return u["default"].createElement("div",{className:"field-range-wrapper"},u["default"].createElement("input",o({type:"range",id:r,value:i,defaultValue:s,placeholder:n,required:l,onChange:function(e){return f(e.target.value)}},a(t))),u["default"].createElement("span",{className:"range-view"},i))}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(2),u=n(s);t["default"]=i},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){return"boolean"===e?"true"===t:"number"===e?(0,u.asNumber)(t):t}function i(e){var t=e.schema,r=e.id,n=e.options,i=e.placeholder,o=e.value,u=e.defaultValue,l=(e.required,e.multiple),f=e.onChange;return s["default"].createElement("select",{id:r,multiple:l,className:"form-control",title:i,value:o,defaultValue:u,onChange:function(e){var r=void 0;r=l?[].filter.call(e.target.options,function(e){return e.selected}).map(function(e){return e.value}):e.target.value,f(a(t.type,r))}},n.map(function(e,t){var r=e.value,n=e.label;return s["default"].createElement("option",{key:t,value:r},n)}))}Object.defineProperty(t,"__esModule",{value:!0});var o=r(2),s=n(o),u=r(15);t["default"]=i},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function a(e){var t=(e.schema,e.id),r=e.placeholder,n=e.value,a=e.defaultValue,i=e.required,s=e.onChange;return o["default"].createElement("textarea",{id:t,className:"form-control",value:n,defaultValue:a,placeholder:r,required:i,onChange:function(e){return s(e.target.value)}})}Object.defineProperty(t,"__esModule",{value:!0});var i=r(2),o=n(i);t["default"]=a},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 o(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)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=r(2),l=n(u),f=r(15),c=r(22),d=n(c),h=function(e){function t(e){a(this,t);var r=i(this,Object.getPrototypeOf(t).call(this,e));return r.onAddClick=function(e){e.preventDefault();var t=r.state.items,n=r.props,a=n.schema,i=n.registry,o=i.definitions;r.asyncSetState({items:t.concat([(0,f.getDefaultFormState)(a.items,void 0,o)])},{validate:!1})},r.onDropIndexClick=function(e){return function(t){t.preventDefault(),r.asyncSetState({items:r.state.items.filter(function(t,r){return r!==e})},{validate:!1})}},r.onChangeForIndex=function(e){return function(t){r.asyncSetState({items:r.state.items.map(function(r,n){return e===n?t:r})},{validate:!1})}},r.onSelectChange=function(e){r.asyncSetState({items:e},{validate:!1})},r.state=r.getStateFromProps(e),r}return o(t,e),s(t,[{key:"componentWillReceiveProps",value:function(e){this.setState(this.getStateFromProps(e))}},{key:"getStateFromProps",value:function(e){var t=Array.isArray(e.formData)?e.formData:null,r=this.props.registry.definitions;return{items:(0,f.getDefaultFormState)(e.schema,t,r)||[]}}},{key:"shouldComponentUpdate",value:function(e,t){return(0,f.shouldRender)(this,e,t)}},{key:"isItemRequired",value:function(e){return"string"===e.type&&e.minLength>0}},{key:"asyncSetState",value:function(e,t){var r=this;this.setState(e,function(e){return r.props.onChange(r.state.items,t)})}},{key:"render",value:function(){var e=this,t=this.props,r=t.schema,n=t.uiSchema,a=t.errorSchema,i=t.idSchema,o=t.name,s=r.title||o,u=this.state.items,c=this.props.registry,h=c.fields,m=c.definitions,p=h.SchemaField,y=(0,f.retrieveSchema)(r.items,m);return(0,f.isMultiSelect)(r)?l["default"].createElement(d["default"],{id:i&&i.id,multiple:!0,onChange:this.onSelectChange,options:(0,f.optionsList)(y),schema:r,title:s,defaultValue:r["default"],value:u}):l["default"].createElement("fieldset",{className:"field field-array field-array-of-"+y.type},s?l["default"].createElement("legend",null,s):null,r.description?l["default"].createElement("div",{className:"field-description"},r.description):null,l["default"].createElement("div",{className:"row array-item-list"},u.map(function(t,r){var o=a?a[r]:void 0,s=i.id+"_"+r,c=(0,f.toIdSchema)(y,s,m);return l["default"].createElement("div",{key:r},l["default"].createElement("div",{className:"col-xs-10"},l["default"].createElement(p,{schema:y,uiSchema:n.items,formData:u[r],errorSchema:o,idSchema:c,required:e.isItemRequired(y),onChange:e.onChangeForIndex(r),registry:e.props.registry})),l["default"].createElement("div",{className:"col-xs-2 array-item-remove text-right"},l["default"].createElement("button",{type:"button",className:"btn btn-danger col-xs-12",onClick:e.onDropIndexClick(r)},"Delete")))})),l["default"].createElement("div",{className:"row"},l["default"].createElement("p",{className:"col-xs-2 col-xs-offset-10 array-item-add text-right"},l["default"].createElement("button",{type:"button",className:"btn btn-info col-xs-12",onClick:this.onAddClick},"Add"))))}},{key:"itemTitle",get:function(){var e=this.props.schema;return e.items.title||e.items.description||"Item"}}]),t}(u.Component);h.defaultProps={uiSchema:{},idSchema:{}},t["default"]=h},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function a(e){return(0,l.optionsList)(Object.assign({enumNames:["true","false"],"enum":[!0,!1]},{enumNames:e.enumNames}))}function i(e){var t=e.schema,r=e.name,n=e.uiSchema,i=e.idSchema,s=e.formData,f=e.widgets,d=e.required,h=e.onChange,m=t.title,p=t.description,y=n["ui:widget"],v={schema:t,id:i&&i.id,onChange:h,label:m||r,placeholder:p,defaultValue:t["default"],value:(0,l.defaultFieldValue)(s,t),required:d};if(y){var g=(0,l.getAlternativeWidget)(t.type,y,f);return u["default"].createElement(g,o({options:a(t)},v))}return u["default"].createElement(c["default"],v)}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(2),u=n(s),l=r(15),f=r(26),c=n(f);i.defaultProps={uiSchema:{}},t["default"]=i},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function a(e){var t=(e.schema,e.id),r=e.defaultValue,n=e.value,a=e.required,i=e.placeholder,s=e.onChange,u=e.label;return o["default"].createElement("div",{className:"checkbox"},o["default"].createElement("label",null,o["default"].createElement("input",{type:"checkbox",id:t,title:i,checked:n,defaultChecked:r,required:a,onChange:function(e){return s(e.target.checked)}}),u))}Object.defineProperty(t,"__esModule",{value:!0});var i=r(2),o=n(i);t["default"]=a},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function a(e){return s["default"].createElement(f["default"],i({},e,{onChange:function(t){return e.onChange((0,u.asNumber)(t))}}))}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o=r(2),s=n(o),u=r(15),l=r(28),f=n(l);a.defaultProps={uiSchema:{}},t["default"]=a},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function a(e){var t=e.schema,r=e.name,n=e.uiSchema,a=e.idSchema,o=e.formData,l=e.widgets,c=e.required,h=e.onChange,m=t.title,p=t.description,y=n["ui:widget"],v={schema:t,id:a&&a.id,label:m||r,placeholder:p,onChange:h,value:(0,u.defaultFieldValue)(o,t),required:c,defaultValue:t["default"]};if(Array.isArray(t["enum"])){if(y){var g=(0,u.getAlternativeWidget)(t.type,y,l);return s["default"].createElement(g,i({options:(0,u.optionsList)(t)},v))}return s["default"].createElement(d["default"],i({options:(0,u.optionsList)(t)},v))}if(y){var b=(0,u.getAlternativeWidget)(t.type,y,l);return s["default"].createElement(b,v)}return s["default"].createElement(f["default"],v)}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o=r(2),s=n(o),u=r(15),l=r(29),f=n(l),c=r(22),d=n(c);a.defaultProps={uiSchema:{}},t["default"]=a},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function a(e){var t=(e.schema,e.id),r=e.placeholder,n=e.value,a=e.defaultValue,i=e.required,s=e.onChange;return o["default"].createElement("input",{type:"text",id:t,className:"form-control",value:n,defaultValue:a,placeholder:r,required:i,onChange:function(e){return s(e.target.value)}})}Object.defineProperty(t,"__esModule",{value:!0});var i=r(2),o=n(i);t["default"]=a},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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 s(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)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),l=r(2),f=n(l),c=r(15),d=function(e){function t(e){i(this,t);var r=o(this,Object.getPrototypeOf(t).call(this,e));return r.onPropertyChange=function(e){return function(t){r.asyncSetState(a({},e,t))}},r.state=r.getStateFromProps(e),r}return s(t,e),u(t,[{key:"componentWillReceiveProps",value:function(e){this.setState(this.getStateFromProps(e))}},{key:"getStateFromProps",value:function(e){var t=e.schema,r=e.formData,n=e.registry;return(0,c.getDefaultFormState)(t,r,n.definitions)||{}}},{key:"shouldComponentUpdate",value:function(e,t){return(0,c.shouldRender)(this,e,t)}},{key:"isRequired",value:function(e){var t=this.props.schema;return Array.isArray(t.required)&&-1!==t.required.indexOf(e)}},{key:"asyncSetState",value:function(e){var t=this;this.setState(e,function(e){return t.props.onChange(t.state)})}},{key:"render",value:function(){var e=this,t=this.props,r=t.uiSchema,n=t.errorSchema,a=t.idSchema,i=t.name,o=this.props.registry,s=o.definitions,u=o.fields,l=u.SchemaField,d=u.TitleField,h=(0,c.retrieveSchema)(this.props.schema,s),m=h.title||i,p=void 0;try{var y=Object.keys(h.properties);p=(0,c.orderProperties)(y,r["ui:order"])}catch(v){return f["default"].createElement("div",null,f["default"].createElement("p",{className:"config-error",style:{color:"red"}},"Invalid ",i||"root"," object field configuration:",f["default"].createElement("em",null,v.message),"."),f["default"].createElement("pre",null,JSON.stringify(h)))}return f["default"].createElement("fieldset",null,m?f["default"].createElement(d,{title:m}):null,h.description?f["default"].createElement("div",{className:"field-description"},h.description):null,p.map(function(t,i){return f["default"].createElement(l,{key:i,name:t,required:e.isRequired(t),schema:h.properties[t],uiSchema:r[t],errorSchema:n[t],idSchema:a[t],formData:e.state[t],onChange:e.onPropertyChange(t),registry:e.props.registry})}))}}]),t}(l.Component);d.defaultProps={uiSchema:{},errorSchema:{},idSchema:{}},t["default"]=d},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function a(e){return o["default"].createElement("legend",null,e.title)}Object.defineProperty(t,"__esModule",{value:!0});var i=r(2),o=n(i);t["default"]=a},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function a(e){var t=e.schema;return o["default"].createElement("div",{className:"unsupported-field"},"Unsupported field schema ",JSON.stringify(t,null,2),".")}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=a;var i=r(2),o=n(i)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function a(e){var t=e.errors;return o["default"].createElement("div",{className:"panel panel-danger errors"},o["default"].createElement("div",{className:"panel-heading"},o["default"].createElement("h3",{className:"panel-title"},"Errors")),o["default"].createElement("ul",{className:"list-group"},t.map(function(e,t){return o["default"].createElement("li",{key:t,className:"list-group-item text-danger"},e.stack)})))}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=a;var i=r(2),o=n(i)}])}); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.JSONSchemaForm=t(require("react")):e.JSONSchemaForm=t(e.React)}(this,function(e){return function(e){function t(n){if(r[n])return r[n].exports;var a=r[n]={exports:{},id:n,loaded:!1};return e[n].call(a.exports,a,a.exports,t),a.loaded=!0,a.exports}var r={};return t.m=e,t.c=r,t.p="/dist/",t(0)}([function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var a=r(1),i=n(a);t["default"]=i["default"]},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 o(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)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),s=r(2),l=n(s),f=r(3),c=r(14),d=n(c),h=r(35),m=n(h),p=r(15),y=r(37),v=n(y),g=function(e){function t(e){a(this,t);var r=i(this,Object.getPrototypeOf(t).call(this,e));return r.onChange=function(e){var t=arguments.length<=1||void 0===arguments[1]?{validate:!1}:arguments[1],n=r.props.liveValidate||t.validate,a=n?r.validate(e):r.state.errors,i=(0,p.toErrorSchema)(a);r.setState({status:"editing",formData:e,errors:a,errorSchema:i},function(e){r.props.onChange&&r.props.onChange(r.state)})},r.onSubmit=function(e){e.preventDefault(),r.setState({status:"submitted"});var t=r.validate(r.state.formData);if(Object.keys(t).length>0){var n=(0,p.toErrorSchema)(t);return void r.setState({errors:t,errorSchema:n},function(e){r.props.onError?r.props.onError(t):console.error("Form validation failed",t)})}r.props.onSubmit&&r.props.onSubmit(r.state),r.setState({status:"initial"})},r.state=r.getStateFromProps(e),r}return o(t,e),u(t,[{key:"componentWillReceiveProps",value:function(e){this.setState(this.getStateFromProps(e))}},{key:"getStateFromProps",value:function(e){var t="schema"in e?e.schema:this.props.schema,r="uiSchema"in e?e.uiSchema:this.props.uiSchema,n=!!e.formData,a=t.definitions,i=(0,p.getDefaultFormState)(t,e.formData,a),o=n?this.validate(i,t):[],u=(0,p.toErrorSchema)(o),s=(0,p.toIdSchema)(t,r["ui:rootFieldId"],a);return{status:"initial",formData:i,edit:n,errors:o,errorSchema:u,idSchema:s}}},{key:"shouldComponentUpdate",value:function(e,t){return(0,p.shouldRender)(this,e,t)}},{key:"validate",value:function(e,t){var r=new f.Validator;return r.validate(e,t||this.props.schema).errors}},{key:"renderErrors",value:function(){var e=this.state,t=e.status,r=e.errors;return"editing"!==t&&r.length?l["default"].createElement(v["default"],{errors:r}):null}},{key:"getRegistry",value:function(){var e=this.props.SchemaField||d["default"],t=this.props.TitleField||m["default"],r=Object.assign({SchemaField:e,TitleField:t},this.props.fields);return{fields:r,widgets:this.props.widgets||{},definitions:this.props.schema.definitions||{}}}},{key:"render",value:function(){var e=this.props,t=e.children,r=e.schema,n=e.uiSchema,a=this.state,i=a.formData,o=a.errorSchema,u=a.idSchema,s=this.getRegistry(),f=s.fields.SchemaField;return l["default"].createElement("form",{className:"rjsf",onSubmit:this.onSubmit},this.renderErrors(),l["default"].createElement(f,{schema:r,uiSchema:n,errorSchema:o,idSchema:u,formData:i,onChange:this.onChange,registry:s}),t?t:l["default"].createElement("p",null,l["default"].createElement("button",{type:"submit",className:"btn btn-info"},"Submit")))}}]),t}(s.Component);g.defaultProps={uiSchema:{},liveValidate:!1},t["default"]=g,t["default"]=g},function(t,r){t.exports=e},function(e,t,r){"use strict";var n=e.exports.Validator=r(4);e.exports.ValidatorResult=r(13).ValidatorResult,e.exports.ValidationError=r(13).ValidationError,e.exports.SchemaError=r(13).SchemaError,e.exports.validate=function(e,t,r){var a=new n;return a.validate(e,t,r)}},function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},a=r(5),i=r(12),o=r(13),u=o.ValidatorResult,s=o.SchemaError,l=o.SchemaContext,f=function d(){this.customFormats=Object.create(d.prototype.customFormats),this.schemas={},this.unresolvedRefs=[],this.types=Object.create(c),this.attributes=Object.create(i.validators)};f.prototype.customFormats={},f.prototype.schemas=null,f.prototype.types=null,f.prototype.attributes=null,f.prototype.unresolvedRefs=null,f.prototype.addSchema=function(e,t){if(!e)return null;var r=t||e.id;return this.addSubSchema(r,e),r&&(this.schemas[r]=e),this.schemas[r]},f.prototype.addSubSchema=function(e,t){if(t&&"object"==("undefined"==typeof t?"undefined":n(t))){if(t.$ref){var r=a.resolve(e,t.$ref);return void(void 0===this.schemas[r]&&(this.schemas[r]=null,this.unresolvedRefs.push(r)))}var i=t.id&&a.resolve(e,t.id),u=i||e;if(i){if(this.schemas[i]){if(!o.deepCompareStrict(this.schemas[i],t))throw new Error("Schema <"+t+"> already exists with different definition");return this.schemas[i]}this.schemas[i]=t;var s=i.replace(/^([^#]*)#$/,"$1");this.schemas[s]=t}return this.addSubSchemaArray(u,t.items instanceof Array?t.items:[t.items]),this.addSubSchemaArray(u,t["extends"]instanceof Array?t["extends"]:[t["extends"]]),this.addSubSchema(u,t.additionalItems),this.addSubSchemaObject(u,t.properties),this.addSubSchema(u,t.additionalProperties),this.addSubSchemaObject(u,t.definitions),this.addSubSchemaObject(u,t.patternProperties),this.addSubSchemaObject(u,t.dependencies),this.addSubSchemaArray(u,t.disallow),this.addSubSchemaArray(u,t.allOf),this.addSubSchemaArray(u,t.anyOf),this.addSubSchemaArray(u,t.oneOf),this.addSubSchema(u,t.not),this.schemas[i]}},f.prototype.addSubSchemaArray=function(e,t){if(t instanceof Array)for(var r=0;r<t.length;r++)this.addSubSchema(e,t[r])},f.prototype.addSubSchemaObject=function(e,t){if(t&&"object"==("undefined"==typeof t?"undefined":n(t)))for(var r in t)this.addSubSchema(e,t[r])},f.prototype.setSchemas=function(e){this.schemas=e},f.prototype.getSchema=function(e){return this.schemas[e]},f.prototype.validate=function(e,t,r,n){r||(r={});var i=r.propertyName||"instance",o=a.resolve(r.base||"/",t.id||"");if(n||(n=new l(t,r,i,o,Object.create(this.schemas)),n.schemas[o]||(n.schemas[o]=t)),t){var u=this.validateSchema(e,t,r,n);if(!u)throw new Error("Result undefined");return u}throw new s("no schema specified",t)},f.prototype.validateSchema=function(e,t,r,n){function a(e){var t="string"==typeof e?e:e.$ref;return"string"==typeof t?t:!1}function f(e,t){var r;return(r=a(e))?c.resolve(e,r,t).subschema:e}var c=this,d=new u(e,t,r,n);if(!t)throw new Error("schema is undefined");t["extends"]&&(t["extends"]instanceof Array?t["extends"].forEach(function(e){t=o.deepMerge(t,f(e,n))}):t=o.deepMerge(t,f(t["extends"],n)));var h;if(h=a(t)){var m=this.resolve(t,h,n),p=new l(m.subschema,r,n.propertyPath,m.switchSchema,n.schemas);return this.validateSchema(e,m.subschema,r,p)}var y=r&&r.skipAttributes||[];for(var v in t)if(!i.ignoreProperties[v]&&y.indexOf(v)<0){var g=null,b=c.attributes[v];if(b)g=b.call(c,e,t,r,n);else if(r.allowUnknownAttributes===!1)throw new s("Unsupported attribute: "+v,t);g&&d.importErrors(g)}if("function"==typeof r.rewrite){var S=r.rewrite.call(this,e,t,r,n);d.instance=S}return d},f.prototype.resolve=function(e,t,r){if(t=r.resolve(t),r.schemas[t])return{subschema:r.schemas[t],switchSchema:t};var n=a.parse(t),i=n&&n.hash,u=i&&i.length&&t.substr(0,t.length-i.length);if(!u||!r.schemas[u])throw new s("no such schema <"+t+">",e);var l=o.objectGetPath(r.schemas[u],i.substr(1));if(void 0===l)throw new s("no such schema "+i+" located in <"+u+">",e);return{subschema:l,switchSchema:t}},f.prototype.testType=function(e,t,r,a,i){if("function"==typeof this.types[i])return this.types[i].call(this,e);if(i&&"object"==("undefined"==typeof i?"undefined":n(i))){var o=this.validateSchema(e,i,r,a);return void 0===o||!(o&&o.errors.length)}return!0};var c=f.prototype.types={};c.string=function(e){return"string"==typeof e},c.number=function(e){return"number"==typeof e&&isFinite(e)},c.integer=function(e){return"number"==typeof e&&e%1===0},c["boolean"]=function(e){return"boolean"==typeof e},c.array=function(e){return e instanceof Array},c["null"]=function(e){return null===e},c.date=function(e){return e instanceof Date},c.any=function(e){return!0},c.object=function(e){return e&&"object"===("undefined"==typeof e?"undefined":n(e))&&!(e instanceof Array)&&!(e instanceof Date)},e.exports=f},function(e,t,r){"use strict";function n(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function a(e,t,r){if(e&&l(e)&&e instanceof n)return e;var a=new n;return a.parse(e,t,r),a}function i(e){return s(e)&&(e=a(e)),e instanceof n?e.format():n.prototype.format.call(e)}function o(e,t){return a(e,!1,!0).resolve(t)}function u(e,t){return e?a(e,!1,!0).resolveObject(t):t}function s(e){return"string"==typeof e}function l(e){return"object"===("undefined"==typeof e?"undefined":d(e))&&null!==e}function f(e){return null===e}function c(e){return null==e}var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},h=r(6);t.parse=a,t.resolve=o,t.resolveObject=u,t.format=i,t.Url=n;var m=/^([a-z0-9.+-]+:)/i,p=/:[0-9]*$/,y=["<",">",'"',"`"," ","\r","\n"," "],v=["{","}","|","\\","^","`"].concat(y),g=["'"].concat(v),b=["%","/","?",";","#"].concat(g),S=["/","?","#"],w=255,E=/^[a-z0-9A-Z_-]{0,63}$/,O=/^([a-z0-9A-Z_-]{0,63})(.*)$/,j={javascript:!0,"javascript:":!0},x={javascript:!0,"javascript:":!0},A={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},_=r(9);n.prototype.parse=function(e,t,r){if(!s(e))throw new TypeError("Parameter 'url' must be a string, not "+("undefined"==typeof e?"undefined":d(e)));var n=e;n=n.trim();var a=m.exec(n);if(a){a=a[0];var i=a.toLowerCase();this.protocol=i,n=n.substr(a.length)}if(r||a||n.match(/^\/\/[^@\/]+@[^@\/]+/)){var o="//"===n.substr(0,2);!o||a&&x[a]||(n=n.substr(2),this.slashes=!0)}if(!x[a]&&(o||a&&!A[a])){for(var u=-1,l=0;l<S.length;l++){var f=n.indexOf(S[l]);-1!==f&&(-1===u||u>f)&&(u=f)}var c,p;p=-1===u?n.lastIndexOf("@"):n.lastIndexOf("@",u),-1!==p&&(c=n.slice(0,p),n=n.slice(p+1),this.auth=decodeURIComponent(c)),u=-1;for(var l=0;l<b.length;l++){var f=n.indexOf(b[l]);-1!==f&&(-1===u||u>f)&&(u=f)}-1===u&&(u=n.length),this.host=n.slice(0,u),n=n.slice(u),this.parseHost(),this.hostname=this.hostname||"";var y="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!y)for(var v=this.hostname.split(/\./),l=0,P=v.length;P>l;l++){var C=v[l];if(C&&!C.match(E)){for(var q="",k=0,F=C.length;F>k;k++)q+=C.charCodeAt(k)>127?"x":C[k];if(!q.match(E)){var N=v.slice(0,l),M=v.slice(l+1),I=C.match(O);I&&(N.push(I[1]),M.unshift(I[2])),M.length&&(n="/"+M.join(".")+n),this.hostname=N.join(".");break}}}if(this.hostname.length>w?this.hostname="":this.hostname=this.hostname.toLowerCase(),!y){for(var R=this.hostname.split("."),$=[],l=0;l<R.length;++l){var V=R[l];$.push(V.match(/[^A-Za-z0-9_-]/)?"xn--"+h.encode(V):V)}this.hostname=$.join(".")}var D=this.port?":"+this.port:"",z=this.hostname||"";this.host=z+D,this.href+=this.host,y&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==n[0]&&(n="/"+n))}if(!j[i])for(var l=0,P=g.length;P>l;l++){var T=g[l],Z=encodeURIComponent(T);Z===T&&(Z=escape(T)),n=n.split(T).join(Z)}var U=n.indexOf("#");-1!==U&&(this.hash=n.substr(U),n=n.slice(0,U));var L=n.indexOf("?");if(-1!==L?(this.search=n.substr(L),this.query=n.substr(L+1),t&&(this.query=_.parse(this.query)),n=n.slice(0,L)):t&&(this.search="",this.query={}),n&&(this.pathname=n),A[i]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var D=this.pathname||"",V=this.search||"";this.path=D+V}return this.href=this.format(),this},n.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",a=!1,i="";this.host?a=e+this.host:this.hostname&&(a=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(a+=":"+this.port)),this.query&&l(this.query)&&Object.keys(this.query).length&&(i=_.stringify(this.query));var o=this.search||i&&"?"+i||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||A[t])&&a!==!1?(a="//"+(a||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):a||(a=""),n&&"#"!==n.charAt(0)&&(n="#"+n),o&&"?"!==o.charAt(0)&&(o="?"+o),r=r.replace(/[?#]/g,function(e){return encodeURIComponent(e)}),o=o.replace("#","%23"),t+a+r+o+n},n.prototype.resolve=function(e){return this.resolveObject(a(e,!1,!0)).format()},n.prototype.resolveObject=function(e){if(s(e)){var t=new n;t.parse(e,!1,!0),e=t}var r=new n;if(Object.keys(this).forEach(function(e){r[e]=this[e]},this),r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol)return Object.keys(e).forEach(function(t){"protocol"!==t&&(r[t]=e[t])}),A[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r;if(e.protocol&&e.protocol!==r.protocol){if(!A[e.protocol])return Object.keys(e).forEach(function(t){r[t]=e[t]}),r.href=r.format(),r;if(r.protocol=e.protocol,e.host||x[e.protocol])r.pathname=e.pathname;else{for(var a=(e.pathname||"").split("/");a.length&&!(e.host=a.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==a[0]&&a.unshift(""),a.length<2&&a.unshift(""),r.pathname=a.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var i=r.pathname||"",o=r.search||"";r.path=i+o}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var u=r.pathname&&"/"===r.pathname.charAt(0),l=e.host||e.pathname&&"/"===e.pathname.charAt(0),d=l||u||r.host&&e.pathname,h=d,m=r.pathname&&r.pathname.split("/")||[],a=e.pathname&&e.pathname.split("/")||[],p=r.protocol&&!A[r.protocol];if(p&&(r.hostname="",r.port=null,r.host&&(""===m[0]?m[0]=r.host:m.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===a[0]?a[0]=e.host:a.unshift(e.host)),e.host=null),d=d&&(""===a[0]||""===m[0])),l)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,m=a;else if(a.length)m||(m=[]),m.pop(),m=m.concat(a),r.search=e.search,r.query=e.query;else if(!c(e.search)){if(p){r.hostname=r.host=m.shift();var y=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;y&&(r.auth=y.shift(),r.host=r.hostname=y.shift())}return r.search=e.search,r.query=e.query,f(r.pathname)&&f(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!m.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var v=m.slice(-1)[0],g=(r.host||e.host)&&("."===v||".."===v)||""===v,b=0,S=m.length;S>=0;S--)v=m[S],"."==v?m.splice(S,1):".."===v?(m.splice(S,1),b++):b&&(m.splice(S,1),b--);if(!d&&!h)for(;b--;b)m.unshift("..");!d||""===m[0]||m[0]&&"/"===m[0].charAt(0)||m.unshift(""),g&&"/"!==m.join("/").substr(-1)&&m.push("");var w=""===m[0]||m[0]&&"/"===m[0].charAt(0);if(p){r.hostname=r.host=w?"":m.length?m.shift():"";var y=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;y&&(r.auth=y.shift(),r.host=r.hostname=y.shift())}return d=d||r.host&&m.length,d&&!w&&m.unshift(""),m.length?r.pathname=m.join("/"):(r.pathname=null,r.path=null),f(r.pathname)&&f(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},n.prototype.parseHost=function(){var e=this.host,t=p.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,r){var n;(function(e,a){"use strict";var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};!function(o){function u(e){throw RangeError(R[e])}function s(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function l(e,t){var r=e.split("@"),n="";r.length>1&&(n=r[0]+"@",e=r[1]),e=e.replace(I,".");var a=e.split("."),i=s(a,t).join(".");return n+i}function f(e){for(var t,r,n=[],a=0,i=e.length;i>a;)t=e.charCodeAt(a++),t>=55296&&56319>=t&&i>a?(r=e.charCodeAt(a++),56320==(64512&r)?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),a--)):n.push(t);return n}function c(e){return s(e,function(e){var t="";return e>65535&&(e-=65536,t+=D(e>>>10&1023|55296),e=56320|1023&e),t+=D(e)}).join("")}function d(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:x}function h(e,t){return e+22+75*(26>e)-((0!=t)<<5)}function m(e,t,r){var n=0;for(e=r?V(e/C):e>>1,e+=V(e/t);e>$*_>>1;n+=x)e=V(e/$);return V(n+($+1)*e/(e+P))}function p(e){var t,r,n,a,i,o,s,l,f,h,p=[],y=e.length,v=0,g=k,b=q;for(r=e.lastIndexOf(F),0>r&&(r=0),n=0;r>n;++n)e.charCodeAt(n)>=128&&u("not-basic"),p.push(e.charCodeAt(n));for(a=r>0?r+1:0;y>a;){for(i=v,o=1,s=x;a>=y&&u("invalid-input"),l=d(e.charCodeAt(a++)),(l>=x||l>V((j-v)/o))&&u("overflow"),v+=l*o,f=b>=s?A:s>=b+_?_:s-b,!(f>l);s+=x)h=x-f,o>V(j/h)&&u("overflow"),o*=h;t=p.length+1,b=m(v-i,t,0==i),V(v/t)>j-g&&u("overflow"),g+=V(v/t),v%=t,p.splice(v++,0,g)}return c(p)}function y(e){var t,r,n,a,i,o,s,l,c,d,p,y,v,g,b,S=[];for(e=f(e),y=e.length,t=k,r=0,i=q,o=0;y>o;++o)p=e[o],128>p&&S.push(D(p));for(n=a=S.length,a&&S.push(F);y>n;){for(s=j,o=0;y>o;++o)p=e[o],p>=t&&s>p&&(s=p);for(v=n+1,s-t>V((j-r)/v)&&u("overflow"),r+=(s-t)*v,t=s,o=0;y>o;++o)if(p=e[o],t>p&&++r>j&&u("overflow"),p==t){for(l=r,c=x;d=i>=c?A:c>=i+_?_:c-i,!(d>l);c+=x)b=l-d,g=x-d,S.push(D(h(d+b%g,0))),l=V(b/g);S.push(D(h(l,0))),i=m(r,v,n==a),r=0,++n}++r,++t}return S.join("")}function v(e){return l(e,function(e){return N.test(e)?p(e.slice(4).toLowerCase()):e})}function g(e){return l(e,function(e){return M.test(e)?"xn--"+y(e):e})}var b="object"==i(t)&&t&&!t.nodeType&&t,S="object"==i(e)&&e&&!e.nodeType&&e,w="object"==("undefined"==typeof a?"undefined":i(a))&&a;w.global!==w&&w.window!==w&&w.self!==w||(o=w);var E,O,j=2147483647,x=36,A=1,_=26,P=38,C=700,q=72,k=128,F="-",N=/^xn--/,M=/[^\x20-\x7E]/,I=/[\x2E\u3002\uFF0E\uFF61]/g,R={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},$=x-A,V=Math.floor,D=String.fromCharCode;if(E={version:"1.3.2",ucs2:{decode:f,encode:c},decode:p,encode:y,toASCII:g,toUnicode:v},"object"==i(r(8))&&r(8))n=function(){return E}.call(t,r,t,e),!(void 0!==n&&(e.exports=n));else if(b&&S)if(e.exports==b)S.exports=E;else for(O in E)E.hasOwnProperty(O)&&(b[O]=E[O]);else o.punycode=E}(void 0)}).call(t,r(7)(e),function(){return this}())},function(e,t){"use strict";e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t){(function(t){e.exports=t}).call(t,{})},function(e,t,r){"use strict";t.decode=t.parse=r(10),t.encode=t.stringify=r(11)},function(e,t){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,a){t=t||"&",n=n||"=";var i={};if("string"!=typeof e||0===e.length)return i;var o=/\+/g;e=e.split(t);var u=1e3;a&&"number"==typeof a.maxKeys&&(u=a.maxKeys);var s=e.length;u>0&&s>u&&(s=u);for(var l=0;s>l;++l){var f,c,d,h,m=e[l].replace(o,"%20"),p=m.indexOf(n);p>=0?(f=m.substr(0,p),c=m.substr(p+1)):(f=m,c=""),d=decodeURIComponent(f),h=decodeURIComponent(c),r(i,d)?Array.isArray(i[d])?i[d].push(h):i[d]=[i[d],h]:i[d]=h}return i}},function(e,t){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},n=function(e){switch("undefined"==typeof e?"undefined":r(e)){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,a,i){return t=t||"&",a=a||"=",null===e&&(e=void 0),"object"===("undefined"==typeof e?"undefined":r(e))?Object.keys(e).map(function(r){var i=encodeURIComponent(n(r))+a;return Array.isArray(e[r])?e[r].map(function(e){return i+encodeURIComponent(n(e))}).join(t):i+encodeURIComponent(n(e[r]))}).join(t):i?encodeURIComponent(n(i))+a+encodeURIComponent(n(e)):""}},function(e,t,r){"use strict";function n(e,t,r,n){return this.validateSchema(e,n,t,r).valid}function a(e,t,r,n,a,i){if(!t.properties||void 0===t.properties[a])if(t.additionalProperties===!1)i.addError({name:"additionalProperties",argument:a,message:"additionalProperty "+JSON.stringify(a)+" exists in instance when not allowed"});else{var o=t.additionalProperties||{},u=this.validateSchema(e[a],o,r,n.makeChild(o,a));u.instance!==i.instance[a]&&(i.instance[a]=u.instance),i.importErrors(u)}}function i(e,t,r){var n,a=r.length;for(n=t+1,a;a>n;n++)if(u.deepCompareStrict(e,r[n]))return!1;return!0}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},u=r(13),s=u.ValidatorResult,l=u.SchemaError,f={};f.ignoreProperties={id:!0,"default":!0,description:!0,title:!0,exclusiveMinimum:!0,exclusiveMaximum:!0,additionalItems:!0,$schema:!0,$ref:!0,"extends":!0};var c=f.validators={};c.type=function(e,t,r,n){if(void 0===e)return null;var a=new s(e,t,r,n),i=t.type instanceof Array?t.type:[t.type];if(!i.some(this.testType.bind(this,e,t,r,n))){var o=i.map(function(e){return e.id&&"<"+e.id+">"||e+""});a.addError({name:"type",argument:o,message:"is not of a type(s) "+o})}return a},c.anyOf=function(e,t,r,a){if(void 0===e)return null;var i=new s(e,t,r,a);if(!(t.anyOf instanceof Array))throw new l("anyOf must be an array");if(!t.anyOf.some(n.bind(this,e,r,a))){var o=t.anyOf.map(function(e,t){return e.id&&"<"+e.id+">"||e.title&&JSON.stringify(e.title)||e.$ref&&"<"+e.$ref+">"||"[subschema "+t+"]"});i.addError({name:"anyOf",argument:o,message:"is not any of "+o.join(",")})}return i},c.allOf=function(e,t,r,n){if(void 0===e)return null;if(!(t.allOf instanceof Array))throw new l("allOf must be an array");var a=new s(e,t,r,n),i=this;return t.allOf.forEach(function(t,o){var u=i.validateSchema(e,t,r,n);if(!u.valid){var s=t.id&&"<"+t.id+">"||t.title&&JSON.stringify(t.title)||t.$ref&&"<"+t.$ref+">"||"[subschema "+o+"]";a.addError({name:"allOf",argument:{id:s,length:u.errors.length,valid:u},message:"does not match allOf schema "+s+" with "+u.errors.length+" error[s]:"}),a.importErrors(u)}}),a},c.oneOf=function(e,t,r,a){if(void 0===e)return null;if(!(t.oneOf instanceof Array))throw new l("oneOf must be an array");var i=new s(e,t,r,a),o=t.oneOf.filter(n.bind(this,e,r,a)).length,u=t.oneOf.map(function(e,t){return e.id&&"<"+e.id+">"||e.title&&JSON.stringify(e.title)||e.$ref&&"<"+e.$ref+">"||"[subschema "+t+"]"});return 1!==o&&i.addError({name:"oneOf",argument:u,message:"is not exactly one from "+u.join(",")}),i},c.properties=function(e,t,r,n){if(void 0!==e&&e instanceof Object){var a=new s(e,t,r,n),i=t.properties||{};for(var o in i){var u=(e||void 0)&&e[o],l=this.validateSchema(u,i[o],r,n.makeChild(i[o],o));l.instance!==a.instance[o]&&(a.instance[o]=l.instance),a.importErrors(l)}return a}},c.patternProperties=function(e,t,r,n){if(void 0!==e&&this.types.object(e)){var i=new s(e,t,r,n),o=t.patternProperties||{};for(var u in e){var l=!0;for(var f in o){var c=new RegExp(f);if(c.test(u)){l=!1;var d=this.validateSchema(e[u],o[f],r,n.makeChild(o[f],u));d.instance!==i.instance[u]&&(i.instance[u]=d.instance),i.importErrors(d)}}l&&a.call(this,e,t,r,n,u,i)}return i}},c.additionalProperties=function(e,t,r,n){if(void 0!==e&&this.types.object(e)){if(t.patternProperties)return null;var i=new s(e,t,r,n);for(var o in e)a.call(this,e,t,r,n,o,i);return i}},c.minProperties=function(e,t,r,n){if(!e||"object"!==("undefined"==typeof e?"undefined":o(e)))return null;var a=new s(e,t,r,n),i=Object.keys(e);return i.length>=t.minProperties||a.addError({name:"minProperties",argument:t.minProperties,message:"does not meet minimum property length of "+t.minProperties}),a},c.maxProperties=function(e,t,r,n){if(!e||"object"!==("undefined"==typeof e?"undefined":o(e)))return null;var a=new s(e,t,r,n),i=Object.keys(e);return i.length<=t.maxProperties||a.addError({name:"maxProperties",argument:t.maxProperties,message:"does not meet maximum property length of "+t.maxProperties}),a},c.items=function(e,t,r,n){if(!(e instanceof Array))return null;var a=this,i=new s(e,t,r,n);return void 0!==e&&t.items?(e.every(function(e,o){var u=t.items instanceof Array?t.items[o]||t.additionalItems:t.items;if(void 0===u)return!0;if(u===!1)return i.addError({name:"items",message:"additionalItems not permitted"}),!1;var s=a.validateSchema(e,u,r,n.makeChild(u,o));return s.instance!==i.instance[o]&&(i.instance[o]=s.instance),i.importErrors(s),!0}),i):i},c.minimum=function(e,t,r,n){if("number"!=typeof e)return null;var a=new s(e,t,r,n),i=!0;return i=t.exclusiveMinimum&&t.exclusiveMinimum===!0?e>t.minimum:e>=t.minimum,i||a.addError({name:"minimum",argument:t.minimum,message:"must have a minimum value of "+t.minimum}),a},c.maximum=function(e,t,r,n){if("number"!=typeof e)return null;var a,i=new s(e,t,r,n);return a=t.exclusiveMaximum&&t.exclusiveMaximum===!0?e<t.maximum:e<=t.maximum,a||i.addError({name:"maximum",argument:t.maximum,message:"must have a maximum value of "+t.maximum}),i},c.divisibleBy=function(e,t,r,n){if("number"!=typeof e)return null;if(0==t.divisibleBy)throw new l("divisibleBy cannot be zero");var a=new s(e,t,r,n);return e/t.divisibleBy%1&&a.addError({name:"divisibleBy",argument:t.divisibleBy,message:"is not divisible by (multiple of) "+JSON.stringify(t.divisibleBy)}),a},c.multipleOf=function(e,t,r,n){if("number"!=typeof e)return null;if(0==t.multipleOf)throw new l("multipleOf cannot be zero");var a=new s(e,t,r,n);return e/t.multipleOf%1&&a.addError({name:"multipleOf",argument:t.multipleOf,message:"is not a multiple of (divisible by) "+JSON.stringify(t.multipleOf)}),a},c.required=function(e,t,r,n){var a=new s(e,t,r,n);return void 0===e&&t.required===!0?a.addError({name:"required",message:"is required"}):e&&"object"===("undefined"==typeof e?"undefined":o(e))&&Array.isArray(t.required)&&t.required.forEach(function(t){void 0===e[t]&&a.addError({name:"required",argument:t,message:"requires property "+JSON.stringify(t)})}),a},c.pattern=function(e,t,r,n){if("string"!=typeof e)return null;var a=new s(e,t,r,n);return e.match(t.pattern)||a.addError({name:"pattern",argument:t.pattern,message:"does not match pattern "+JSON.stringify(t.pattern)}),a},c.format=function(e,t,r,n){var a=new s(e,t,r,n);return a.disableFormat||u.isFormat(e,t.format,this)||a.addError({name:"format",argument:t.format,message:"does not conform to the "+JSON.stringify(t.format)+" format"}),a},c.minLength=function(e,t,r,n){if("string"!=typeof e)return null;var a=new s(e,t,r,n);return e.length>=t.minLength||a.addError({name:"minLength",argument:t.minLength,message:"does not meet minimum length of "+t.minLength}),a},c.maxLength=function(e,t,r,n){if("string"!=typeof e)return null;var a=new s(e,t,r,n);return e.length<=t.maxLength||a.addError({name:"maxLength",argument:t.maxLength,message:"does not meet maximum length of "+t.maxLength}),a},c.minItems=function(e,t,r,n){if(!(e instanceof Array))return null;var a=new s(e,t,r,n);return e.length>=t.minItems||a.addError({name:"minItems",argument:t.minItems,message:"does not meet minimum length of "+t.minItems}),a},c.maxItems=function(e,t,r,n){if(!(e instanceof Array))return null;var a=new s(e,t,r,n);return e.length<=t.maxItems||a.addError({name:"maxItems",argument:t.maxItems,message:"does not meet maximum length of "+t.maxItems}),a},c.uniqueItems=function(e,t,r,n){function a(e,t,r){for(var n=t+1;n<r.length;n++)if(u.deepCompareStrict(e,r[n]))return!1;return!0}var i=new s(e,t,r,n);return e instanceof Array?(e.every(a)||i.addError({name:"uniqueItems",message:"contains duplicate item"}),i):i},c.uniqueItems=function(e,t,r,n){if(!(e instanceof Array))return null;var a=new s(e,t,r,n);return e.every(i)||a.addError({name:"uniqueItems",message:"contains duplicate item"}),a},c.dependencies=function(e,t,r,n){if(!e||"object"!=("undefined"==typeof e?"undefined":o(e)))return null;var a=new s(e,t,r,n);for(var i in t.dependencies)if(void 0!==e[i]){var u=t.dependencies[i],l=n.makeChild(u,i);if("string"==typeof u&&(u=[u]),u instanceof Array)u.forEach(function(t){void 0===e[t]&&a.addError({name:"dependencies",argument:l.propertyPath,message:"property "+t+" not found, required by "+l.propertyPath})});else{var f=this.validateSchema(e,u,r,l);a.instance!==f.instance&&(a.instance=f.instance),f&&f.errors.length&&(a.addError({name:"dependencies",argument:l.propertyPath,message:"does not meet dependency required by "+l.propertyPath}),a.importErrors(f))}}return a},c["enum"]=function(e,t,r,n){if(!(t["enum"]instanceof Array))throw new l("enum expects an array",t);if(void 0===e)return null;var a=new s(e,t,r,n);return t["enum"].some(u.deepCompareStrict.bind(null,e))||a.addError({name:"enum",argument:t["enum"],message:"is not one of enum values: "+t["enum"].join(",")}),a},c.not=c.disallow=function(e,t,r,n){var a=this;if(void 0===e)return null;var i=new s(e,t,r,n),o=t.not||t.disallow;return o?(o instanceof Array||(o=[o]),o.forEach(function(o){if(a.testType(e,t,r,n,o)){var u=o&&o.id&&"<"+o.id+">"||o;i.addError({name:"not",argument:u,message:"is of prohibited type "+u})}}),i):null},e.exports=f},function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},a=r(5),i=t.ValidationError=function(e,t,r,n,a,i){n&&(this.property=n),e&&(this.message=e),r&&(r.id?this.schema=r.id:this.schema=r),t&&(this.instance=t),this.name=a,this.argument=i,this.stack=this.toString()};i.prototype.toString=function(){return this.property+" "+this.message};var o=t.ValidatorResult=function(e,t,r,n){this.instance=e,this.schema=t,this.propertyPath=n.propertyPath,this.errors=[],this.throwError=r&&r.throwError,this.disableFormat=r&&r.disableFormat===!0};o.prototype.addError=function(e){var t;if("string"==typeof e)t=new i(e,this.instance,this.schema,this.propertyPath);else{if(!e)throw new Error("Missing error detail");if(!e.message)throw new Error("Missing error message");if(!e.name)throw new Error("Missing validator type");t=new i(e.message,this.instance,this.schema,this.propertyPath,e.name,e.argument)}if(this.throwError)throw t;return this.errors.push(t),t},o.prototype.importErrors=function(e){if("string"==typeof e||e&&e.validatorType)this.addError(e);else if(e&&e.errors){var t=this.errors;e.errors.forEach(function(e){t.push(e)})}},o.prototype.toString=function(e){return this.errors.map(function(e,t){return t+": "+e.toString()+"\n"}).join("")},Object.defineProperty(o.prototype,"valid",{get:function(){return!this.errors.length}});var u=t.SchemaError=function c(e,t){this.message=e,this.schema=t,Error.call(this,e),Error.captureStackTrace(this,c)};u.prototype=Object.create(Error.prototype,{ | ||
constructor:{value:u,enumerable:!1},name:{value:"SchemaError",enumerable:!1}});var s=t.SchemaContext=function(e,t,r,n,a){this.schema=e,this.options=t,this.propertyPath=r,this.base=n,this.schemas=a};s.prototype.resolve=function(e){return a.resolve(this.base,e)},s.prototype.makeChild=function(e,t){var r=void 0===t?this.propertyPath:this.propertyPath+f(t),n=a.resolve(this.base,e.id||""),i=new s(e,this.options,r,n,Object.create(this.schemas));return e.id&&!i.schemas[n]&&(i.schemas[n]=e),i};var l=t.FORMAT_REGEXPS={"date-time":/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])[tT ](2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])(\.\d+)?([zZ]|[+-]([0-5][0-9]):(60|[0-5][0-9]))$/,date:/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])$/,time:/^(2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])$/,email:/^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!\.)){0,61}[a-zA-Z0-9]?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!$)){0,61}[a-zA-Z0-9]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/,"ip-address":/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,ipv6:/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,uri:/^[a-zA-Z][a-zA-Z0-9+-.]*:[^\s]*$/,color:/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/,hostname:/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,"host-name":/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,alpha:/^[a-zA-Z]+$/,alphanumeric:/^[a-zA-Z0-9]+$/,"utc-millisec":function(e){return"string"==typeof e&&parseFloat(e)===parseInt(e,10)&&!isNaN(e)},regex:function(e){var t=!0;try{new RegExp(e)}catch(r){t=!1}return t},style:/\s*(.+?):\s*([^;]+);?/g,phone:/^\+(?:[0-9] ?){6,14}[0-9]$/};l.regexp=l.regex,l.pattern=l.regex,l.ipv4=l["ip-address"],t.isFormat=function(e,t,r){if("string"==typeof e&&void 0!==l[t]){if(l[t]instanceof RegExp)return l[t].test(e);if("function"==typeof l[t])return l[t](e)}else if(r&&r.customFormats&&"function"==typeof r.customFormats[t])return r.customFormats[t](e);return!0};var f=t.makeSuffix=function(e){return e=e.toString(),e.match(/[.\s\[\]]/)||e.match(/^[\d]/)?e.match(/^\d+$/)?"["+e+"]":"["+JSON.stringify(e)+"]":"."+e};t.deepCompareStrict=function d(e,t){if(("undefined"==typeof e?"undefined":n(e))!==("undefined"==typeof t?"undefined":n(t)))return!1;if(e instanceof Array)return t instanceof Array?e.length!==t.length?!1:e.every(function(r,n){return d(e[n],t[n])}):!1;if("object"===("undefined"==typeof e?"undefined":n(e))){if(!e||!t)return e===t;var r=Object.keys(e),a=Object.keys(t);return r.length!==a.length?!1:r.every(function(r){return d(e[r],t[r])})}return e===t},e.exports.deepMerge=function h(e,t){var r=Array.isArray(t),a=r&&[]||{};return r?(e=e||[],a=a.concat(e),t.forEach(function(t,r){"object"===("undefined"==typeof t?"undefined":n(t))?a[r]=h(e[r],t):-1===e.indexOf(t)&&a.push(t)})):(e&&"object"===("undefined"==typeof e?"undefined":n(e))&&Object.keys(e).forEach(function(t){a[t]=e[t]}),Object.keys(t).forEach(function(r){"object"===n(t[r])&&t[r]&&e[r]?a[r]=h(e[r],t[r]):a[r]=t[r]})),a},t.objectGetPath=function(e,t){for(var r,n=t.split("/").slice(1);"string"==typeof(r=n.shift());){var a=decodeURIComponent(r.replace(/~0/,"~").replace(/~1/g,"/"));if(!(a in e))return;e=e[a]}return e},t.encodePath=function(e){return e.map(function(e){return"/"+encodeURIComponent(e).replace(/~/g,"%7E")}).join("")}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function a(e,t,r){var n=t["ui:field"];return"function"==typeof n?n:"string"==typeof n&&n in r?r[n]:_[e.type]||x["default"]}function i(e,t,r){return e?f["default"].createElement("label",{className:"control-label",htmlFor:r},t?e+A:e):null}function o(e){var t=e.errors;return f["default"].createElement("div",null,f["default"].createElement("p",null),f["default"].createElement("ul",{className:"error-detail bs-callout bs-callout-info"},(t||[]).map(function(e,t){return f["default"].createElement("li",{className:"text-danger",key:t},e)})))}function u(e){var t=e.type,r=e.classNames,n=e.errorSchema,a=e.label,u=e.hidden,s=e.help,l=e.required,c=e.displayLabel,d=e.id,h=e.children;if(u)return h;var m=n.errors,p=m&&m.length>0,y=["form-group","field","field-"+t,p?"field-error has-error":"",r].join(" ").trim();return f["default"].createElement("div",{className:y},c&&a?i(a,l,d):null,h,p?f["default"].createElement(o,{errors:m}):f["default"].createElement("div",null),s?f["default"].createElement("p",{className:"help-block"},s):null)}function s(e){var t=e.uiSchema,r=e.errorSchema,n=e.idSchema,i=e.name,o=e.required,s=e.registry,l=s.definitions,d=s.fields,h=(0,c.retrieveSchema)(e.schema,l),m=a(h,t,d);if(0===Object.keys(h).length)return f["default"].createElement("div",null);var p=!0;return"array"===h.type&&(p=(0,c.isMultiSelect)(h)),"object"===h.type&&(p=!1),"boolean"!==h.type||t["ui:widget"]||(p=!1),f["default"].createElement(u,{label:h.title||i,errorSchema:r,hidden:"hidden"===t["ui:widget"],help:t["ui:help"],required:o,type:h.type,displayLabel:p,id:n.id,classNames:t.classNames},f["default"].createElement(m,e))}Object.defineProperty(t,"__esModule",{value:!0});var l=r(2),f=n(l),c=r(15),d=r(29),h=n(d),m=r(30),p=n(m),y=r(32),v=n(y),g=r(34),b=n(g),S=r(33),w=n(S),E=r(35),O=n(E),j=r(36),x=n(j),A="*",_={array:h["default"],"boolean":p["default"],integer:v["default"],number:v["default"],object:b["default"],string:w["default"]};u.defaultProps={classNames:"",errorSchema:{errors:[]},hidden:!1,required:!1,displayLabel:!0},s.defaultProps={uiSchema:{},errorSchema:{},idSchema:{},registry:{fields:{SchemaField:s,TitleField:O["default"]},widgets:{},definitions:{}}},t["default"]=s},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function a(e){switch(e){case"array":return[];case"boolean":return!1;case"number":return 0;case"object":return{};case"string":return"";default:return}}function i(e,t){return null===e?a(t.type):e}function o(e,t){var r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],n=e.type,a=e.format;if("function"==typeof t)return t;if("string"!=typeof t)throw new Error("Unsupported widget definition: "+("undefined"==typeof t?"undefined":w(t)));if(t in r)return r[t];if(!W.hasOwnProperty(n))throw new Error("No alternative widget for type "+n);if(W[n].hasOwnProperty(t))return W[n][t];if("string"===n&&G.hasOwnProperty(a))return G[a];var i="string"===n&&a?"/"+a:"";throw new Error('No alternative widget "'+t+'" for type '+n+i)}function u(e,t){var r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],n=t;if(l(n)&&l(e["default"]))n=f(n,e["default"]);else if("default"in e)n=e["default"];else if("enum"in e&&Array.isArray(e["enum"]))n=e["enum"][0];else if("$ref"in e){var i=p(e.$ref,r);n=u(i,n,r)}return"undefined"==typeof n&&(n=a(e.type)),"object"===e.type?Object.keys(e.properties).reduce(function(t,a){return t[a]=u(e.properties[a],n[a],r),t},{}):n}function s(e,t){var r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];if(!l(e))throw new Error("Invalid schema: "+e);var n=y(e,r),a=u(n,void 0,r);return"undefined"==typeof t?a:l(t)?f(a,t):t||a}function l(e){return"object"==("undefined"==typeof e?"undefined":w(e))&&null!==e&&!Array.isArray(e)}function f(e,t){var r=Object.assign({},e);return Object.keys(t).reduce(function(r,n){var a=t[n];return e.hasOwnProperty(n)&&l(a)?r[n]=f(e[n],a):r[n]=a,r},r)}function c(e){if(/\.$/.test(e))return e;var t=Number(e),r="number"==typeof t&&!Number.isNaN(t);return r?t:e}function d(e,t){if(!Array.isArray(t))return e;if(t.length!==e.length)throw new Error("uiSchema order list length should match object properties length");var r=function(e){return[].slice.call(e).sort().toString()};if(r(t)!==r(e))throw new Error("uiSchema order list does not match object properties list");return t}function h(e){return Array.isArray(e.items["enum"])&&e.uniqueItems}function m(e){return e["enum"].map(function(t,r){var n=e.enumNames&&e.enumNames[r]||String(t);return{label:n,value:t}})}function p(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=/#\/definitions\/(.*)$/.exec(e);if(r&&r[1]&&t.hasOwnProperty(r[1]))return t[r[1]];throw new Error("Could not find a definition for "+e+".")}function y(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return e.hasOwnProperty("$ref")?p(e.$ref,t):e}function v(e,t,r){return!(0,O["default"])(e.props,t)||!(0,O["default"])(e.state,r)}function g(e){return e.split(".").reduce(function(e,t){var r=J.exec(t);return r?e=e.concat([r[1],parseInt(r[2],10)]):e.push(t),e},[])}function b(e){return e.length?e.reduce(function(e,t){var r=t.property,n=t.message,a=g(r),i=e,o=!0,u=!1,s=void 0;try{for(var l,f=a.slice(1)[Symbol.iterator]();!(o=(l=f.next()).done);o=!0){var c=l.value;c in i||(i[c]={}),i=i[c]}}catch(d){u=!0,s=d}finally{try{!o&&f["return"]&&f["return"]()}finally{if(u)throw s}}return Array.isArray(i.errors)?i.errors=i.errors.concat(n):i.errors=[n],e},{}):{}}function S(e,t,r){var n={id:t||"root"};if("$ref"in e){var a=y(e,r);return S(a,t,r)}if("items"in e)return S(e.items,t,r);if("object"!==e.type)return n;for(var i in e.properties||{}){var o=e.properties[i],u=n.id+"_"+i;n[i]=S(o,u,r)}return n}Object.defineProperty(t,"__esModule",{value:!0});var w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};t.defaultTypeValue=a,t.defaultFieldValue=i,t.getAlternativeWidget=o,t.getDefaultFormState=s,t.mergeObjects=f,t.asNumber=c,t.orderProperties=d,t.isMultiSelect=h,t.optionsList=m,t.retrieveSchema=y,t.shouldRender=v,t.toErrorSchema=b,t.toIdSchema=S;var E=r(16),O=n(E),j=r(18),x=n(j),A=r(19),_=n(A),P=r(20),C=n(P),q=r(21),k=n(q),F=r(22),N=n(F),M=r(23),I=n(M),R=r(24),$=n(R),V=r(25),D=n(V),z=r(26),T=n(z),Z=r(27),U=n(Z),L=r(28),B=n(L),J=/(.*)\[(\d+)\]$/,W={"boolean":{radio:_["default"],select:N["default"],hidden:B["default"]},string:{password:x["default"],radio:_["default"],select:N["default"],textarea:U["default"],hidden:B["default"]},number:{updown:C["default"],range:k["default"],hidden:B["default"]},integer:{updown:C["default"],range:k["default"],hidden:B["default"]}},G={"date-time":$["default"],email:D["default"],hostname:I["default"],ipv4:I["default"],ipv6:I["default"],uri:T["default"]}},function(e,t,r){(function(t){"use strict";function n(e){return"[object Arguments]"===Object.prototype.toString.call(e)}function a(e,t){return i(e,t,[],[])}function i(e,r,u,s){if(e===r)return!0;if("object"!==("undefined"==typeof e?"undefined":o(e))||"object"!==("undefined"==typeof r?"undefined":o(r)))return!1;if(null===e||null===r)return!1;if(t.isBuffer(e)&&t.isBuffer(r)){if(e.equals)return e.equals(r);if(a.fastEqual)return a.fastEqual.call(e,r);if(e.length!==r.length)return!1;for(var l=0;l<e.length;l++)if(e[l]!==r[l])return!1;return!0}if(e instanceof Date&&r instanceof Date)return e.getTime()===r.getTime();if(e instanceof RegExp&&r instanceof RegExp)return e.source===r.source&&e.global===r.global&&e.multiline===r.multiline&&e.lastIndex===r.lastIndex&&e.ignoreCase===r.ignoreCase;if(n(e)||n(r)){if(!n(e)||!n(r))return!1;var f=Array.prototype.slice;return i(f.call(e),f.call(r),u,s)}if(e.constructor!==r.constructor)return!1;var c=Object.keys(e),d=Object.keys(r);if(0===c.length&&0===d.length)return!0;if(c.length!==d.length)return!1;for(var h=u.length;h--;)if(u[h]===e)return s[h]===r;u.push(e),s.push(r),c.sort(),d.sort();for(var m=c.length-1;m>=0;m--)if(c[m]!==d[m])return!1;for(var p,y=c.length-1;y>=0;y--)if(p=c[y],!i(e[p],r[p],u,s))return!1;return u.pop(),s.pop(),!0}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};e.exports=a;try{a.fastEqual=r(!function(){var e=new Error('Cannot find module "buffertools"');throw e.code="MODULE_NOT_FOUND",e}()).equals}catch(u){}}).call(t,r(17).Buffer)},function(e,t){"use strict";function r(){throw new Error("Buffer is not included.")}r.isBuffer=function(){return!1},t.INSPECT_MAX_BYTES=50,t.SlowBuffer=r,t.Buffer=r},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function a(e){var t=(e.schema,e.id),r=e.placeholder,n=e.value,a=e.defaultValue,i=e.required,u=e.onChange;return o["default"].createElement("input",{type:"password",id:t,className:"form-control",value:n,defaultValue:a,placeholder:r,required:i,onChange:function(e){return u(e.target.value)}})}Object.defineProperty(t,"__esModule",{value:!0});var i=r(2),o=n(i);t["default"]=a},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function a(e){var t=(e.schema,e.options),r=e.placeholder,n=e.value,a=e.defaultValue,i=(e.required,e.onChange),u=Math.random().toString();return o["default"].createElement("div",{className:"field-radio-group"},t.map(function(e,t){var s=void 0!==n?e.value===n:e.value===a;return o["default"].createElement("div",{key:t,className:"radio"},o["default"].createElement("label",null,o["default"].createElement("input",{type:"radio",name:u,value:e.value,checked:s,placeholder:r,onChange:function(t){return i(e.value)}}),e.label))}))}Object.defineProperty(t,"__esModule",{value:!0});var i=r(2),o=n(i);t["default"]=a},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function a(e){var t={};return e.multipleOf&&(t.step=e.multipleOf),e.minimum&&(t.min=e.minimum),e.maximum&&(t.max=e.maximum),t}function i(e){var t=e.schema,r=e.id,n=e.placeholder,i=e.value,u=e.defaultValue,l=e.required,f=e.onChange;return s["default"].createElement("input",o({type:"number",id:r,className:"form-control",value:i,defaultValue:u,placeholder:n,required:l,onChange:function(e){return f(e.target.value)}},a(t)))}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u=r(2),s=n(u);t["default"]=i},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function a(e){var t={};return e.multipleOf&&(t.step=e.multipleOf),e.minimum&&(t.min=e.minimum),e.maximum&&(t.max=e.maximum),t}function i(e){var t=e.schema,r=e.id,n=e.placeholder,i=e.value,u=e.defaultValue,l=e.required,f=e.onChange;return s["default"].createElement("div",{className:"field-range-wrapper"},s["default"].createElement("input",o({type:"range",id:r,value:i,defaultValue:u,placeholder:n,required:l,onChange:function(e){return f(e.target.value)}},a(t))),s["default"].createElement("span",{className:"range-view"},i))}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u=r(2),s=n(u);t["default"]=i},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){return"boolean"===e?"true"===t:"number"===e?(0,s.asNumber)(t):t}function i(e){var t=e.schema,r=e.id,n=e.options,i=e.placeholder,o=e.value,s=e.defaultValue,l=(e.required,e.multiple),f=e.onChange;return u["default"].createElement("select",{id:r,multiple:l,className:"form-control",title:i,value:o,defaultValue:s,onChange:function(e){var r=void 0;r=l?[].filter.call(e.target.options,function(e){return e.selected}).map(function(e){return e.value}):e.target.value,f(a(t.type,r))}},n.map(function(e,t){var r=e.value,n=e.label;return u["default"].createElement("option",{key:t,value:r},n)}))}Object.defineProperty(t,"__esModule",{value:!0});var o=r(2),u=n(o),s=r(15);t["default"]=i},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function a(e){var t=(e.schema,e.id),r=e.placeholder,n=e.value,a=e.defaultValue,i=e.required,u=e.onChange;return o["default"].createElement("input",{type:"text",id:t,className:"form-control",value:n,defaultValue:a,placeholder:r,required:i,onChange:function(e){return u(e.target.value)}})}Object.defineProperty(t,"__esModule",{value:!0});var i=r(2),o=n(i);t["default"]=a},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function a(e){var t=(e.schema,e.id),r=e.placeholder,n=e.value,a=e.defaultValue,i=e.required,u=e.onChange;return o["default"].createElement("input",{type:"datetime-local",id:t,className:"form-control",value:n,defaultValue:a,placeholder:r,required:i,onChange:function(e){return u(e.target.value)}})}Object.defineProperty(t,"__esModule",{value:!0});var i=r(2),o=n(i);t["default"]=a},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function a(e){var t=(e.schema,e.id),r=e.placeholder,n=e.value,a=e.defaultValue,i=e.required,u=e.onChange;return o["default"].createElement("input",{type:"email",id:t,className:"form-control",value:n,defaultValue:a,placeholder:r,required:i,onChange:function(e){return u(e.target.value)}})}Object.defineProperty(t,"__esModule",{value:!0});var i=r(2),o=n(i);t["default"]=a},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function a(e){var t=(e.schema,e.id),r=e.placeholder,n=e.value,a=e.defaultValue,i=e.required,u=e.onChange;return o["default"].createElement("input",{type:"url",id:t,className:"form-control",value:n,defaultValue:a,placeholder:r,required:i,onChange:function(e){return u(e.target.value)}})}Object.defineProperty(t,"__esModule",{value:!0});var i=r(2),o=n(i);t["default"]=a},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function a(e){var t=(e.schema,e.id),r=e.placeholder,n=e.value,a=e.defaultValue,i=e.required,u=e.onChange;return o["default"].createElement("textarea",{id:t,className:"form-control",value:n,defaultValue:a,placeholder:r,required:i,onChange:function(e){return u(e.target.value)}})}Object.defineProperty(t,"__esModule",{value:!0});var i=r(2),o=n(i);t["default"]=a},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function a(e){var t=e.id,r=e.value,n=e.defaultValue;return o["default"].createElement("input",{type:"hidden",id:t,value:r,defaultValue:n})}Object.defineProperty(t,"__esModule",{value:!0});var i=r(2),o=n(i);t["default"]=a},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 o(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)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),s=r(2),l=n(s),f=r(15),c=r(22),d=n(c),h=function(e){function t(e){a(this,t);var r=i(this,Object.getPrototypeOf(t).call(this,e));return r.onAddClick=function(e){e.preventDefault();var t=r.state.items,n=r.props,a=n.schema,i=n.registry,o=i.definitions;r.asyncSetState({items:t.concat([(0,f.getDefaultFormState)(a.items,void 0,o)])},{validate:!1})},r.onDropIndexClick=function(e){return function(t){t.preventDefault(),r.asyncSetState({items:r.state.items.filter(function(t,r){return r!==e})},{validate:!1})}},r.onChangeForIndex=function(e){return function(t){r.asyncSetState({items:r.state.items.map(function(r,n){return e===n?t:r})},{validate:!1})}},r.onSelectChange=function(e){r.asyncSetState({items:e},{validate:!1})},r.state=r.getStateFromProps(e),r}return o(t,e),u(t,[{key:"componentWillReceiveProps",value:function(e){this.setState(this.getStateFromProps(e))}},{key:"getStateFromProps",value:function(e){var t=Array.isArray(e.formData)?e.formData:null,r=this.props.registry.definitions;return{items:(0,f.getDefaultFormState)(e.schema,t,r)||[]}}},{key:"shouldComponentUpdate",value:function(e,t){return(0,f.shouldRender)(this,e,t)}},{key:"isItemRequired",value:function(e){return"string"===e.type&&e.minLength>0}},{key:"asyncSetState",value:function(e,t){var r=this;this.setState(e,function(e){return r.props.onChange(r.state.items,t)})}},{key:"render",value:function(){var e=this,t=this.props,r=t.schema,n=t.uiSchema,a=t.errorSchema,i=t.idSchema,o=t.name,u=r.title||o,s=this.state.items,c=this.props.registry,h=c.fields,m=c.definitions,p=h.SchemaField,y=(0,f.retrieveSchema)(r.items,m);return(0,f.isMultiSelect)(r)?l["default"].createElement(d["default"],{id:i&&i.id,multiple:!0,onChange:this.onSelectChange,options:(0,f.optionsList)(y),schema:r,title:u,defaultValue:r["default"],value:s}):l["default"].createElement("fieldset",{className:"field field-array field-array-of-"+y.type},u?l["default"].createElement("legend",null,u):null,r.description?l["default"].createElement("div",{className:"field-description"},r.description):null,l["default"].createElement("div",{className:"row array-item-list"},s.map(function(t,r){var o=a?a[r]:void 0,u=i.id+"_"+r,c=(0,f.toIdSchema)(y,u,m);return l["default"].createElement("div",{key:r},l["default"].createElement("div",{className:"col-xs-10"},l["default"].createElement(p,{schema:y,uiSchema:n.items,formData:s[r],errorSchema:o,idSchema:c,required:e.isItemRequired(y),onChange:e.onChangeForIndex(r),registry:e.props.registry})),l["default"].createElement("div",{className:"col-xs-2 array-item-remove text-right"},l["default"].createElement("button",{type:"button",className:"btn btn-danger col-xs-12",tabIndex:"-1",onClick:e.onDropIndexClick(r)},"Delete")))})),l["default"].createElement("div",{className:"row"},l["default"].createElement("p",{className:"col-xs-2 col-xs-offset-10 array-item-add text-right"},l["default"].createElement("button",{type:"button",className:"btn btn-info col-xs-12",tabIndex:"-1",onClick:this.onAddClick},"Add"))))}},{key:"itemTitle",get:function(){var e=this.props.schema;return e.items.title||e.items.description||"Item"}}]),t}(s.Component);h.defaultProps={uiSchema:{},idSchema:{}},t["default"]=h},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function a(e){return(0,l.optionsList)(Object.assign({enumNames:["true","false"],"enum":[!0,!1]},{enumNames:e.enumNames}))}function i(e){var t=e.schema,r=e.name,n=e.uiSchema,i=e.idSchema,u=e.formData,f=e.widgets,d=e.required,h=e.onChange,m=t.title,p=t.description,y=n["ui:widget"],v={schema:t,id:i&&i.id,onChange:h,label:m||r,placeholder:p,defaultValue:t["default"],value:(0,l.defaultFieldValue)(u,t),required:d};if(y){var g=(0,l.getAlternativeWidget)(t,y,f);return s["default"].createElement(g,o({options:a(t)},v))}return s["default"].createElement(c["default"],v)}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u=r(2),s=n(u),l=r(15),f=r(31),c=n(f);i.defaultProps={uiSchema:{}},t["default"]=i},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function a(e){var t=(e.schema,e.id),r=e.defaultValue,n=e.value,a=e.required,i=e.placeholder,u=e.onChange,s=e.label;return o["default"].createElement("div",{className:"checkbox"},o["default"].createElement("label",null,o["default"].createElement("input",{type:"checkbox",id:t,title:i,checked:n,defaultChecked:r,required:a,onChange:function(e){return u(e.target.checked)}}),o["default"].createElement("strong",null,s)))}Object.defineProperty(t,"__esModule",{value:!0});var i=r(2),o=n(i);t["default"]=a},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function a(e){return u["default"].createElement(f["default"],i({},e,{onChange:function(t){return e.onChange((0,s.asNumber)(t))}}))}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o=r(2),u=n(o),s=r(15),l=r(33),f=n(l);a.defaultProps={uiSchema:{}},t["default"]=a},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function a(e){var t=e.schema,r=e.name,n=e.uiSchema,a=e.idSchema,o=e.formData,l=e.widgets,c=e.required,h=e.onChange,m=t.title,p=t.description,y=n["ui:widget"]||t.format,v={schema:t,id:a&&a.id,label:m||r,placeholder:p,onChange:h,value:(0,s.defaultFieldValue)(o,t),required:c,defaultValue:t["default"]};if(Array.isArray(t["enum"])){if(y){var g=(0,s.getAlternativeWidget)(t,y,l);return u["default"].createElement(g,i({options:(0,s.optionsList)(t)},v))}return u["default"].createElement(d["default"],i({options:(0,s.optionsList)(t)},v))}if(y){var b=(0,s.getAlternativeWidget)(t,y,l);return u["default"].createElement(b,v)}return u["default"].createElement(f["default"],v)}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o=r(2),u=n(o),s=r(15),l=r(23),f=n(l),c=r(22),d=n(c);a.defaultProps={uiSchema:{}},t["default"]=a},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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 u(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)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),l=r(2),f=n(l),c=r(15),d=function(e){function t(e){i(this,t);var r=o(this,Object.getPrototypeOf(t).call(this,e));return r.onPropertyChange=function(e){return function(t){r.asyncSetState(a({},e,t))}},r.state=r.getStateFromProps(e),r}return u(t,e),s(t,[{key:"componentWillReceiveProps",value:function(e){this.setState(this.getStateFromProps(e))}},{key:"getStateFromProps",value:function(e){var t=e.schema,r=e.formData,n=e.registry;return(0,c.getDefaultFormState)(t,r,n.definitions)||{}}},{key:"shouldComponentUpdate",value:function(e,t){return(0,c.shouldRender)(this,e,t)}},{key:"isRequired",value:function(e){var t=this.props.schema;return Array.isArray(t.required)&&-1!==t.required.indexOf(e)}},{key:"asyncSetState",value:function(e){var t=this;this.setState(e,function(e){return t.props.onChange(t.state)})}},{key:"render",value:function(){var e=this,t=this.props,r=t.uiSchema,n=t.errorSchema,a=t.idSchema,i=t.name,o=this.props.registry,u=o.definitions,s=o.fields,l=s.SchemaField,d=s.TitleField,h=(0,c.retrieveSchema)(this.props.schema,u),m=h.title||i,p=void 0;try{var y=Object.keys(h.properties);p=(0,c.orderProperties)(y,r["ui:order"])}catch(v){return f["default"].createElement("div",null,f["default"].createElement("p",{className:"config-error",style:{color:"red"}},"Invalid ",i||"root"," object field configuration:",f["default"].createElement("em",null,v.message),"."),f["default"].createElement("pre",null,JSON.stringify(h)))}return f["default"].createElement("fieldset",null,m?f["default"].createElement(d,{title:m}):null,h.description?f["default"].createElement("div",{className:"field-description"},h.description):null,p.map(function(t,i){return f["default"].createElement(l,{key:i,name:t,required:e.isRequired(t),schema:h.properties[t],uiSchema:r[t],errorSchema:n[t],idSchema:a[t],formData:e.state[t],onChange:e.onPropertyChange(t),registry:e.props.registry})}))}}]),t}(l.Component);d.defaultProps={uiSchema:{},errorSchema:{},idSchema:{}},t["default"]=d},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function a(e){return o["default"].createElement("legend",null,e.title)}Object.defineProperty(t,"__esModule",{value:!0});var i=r(2),o=n(i);t["default"]=a},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function a(e){var t=e.schema;return o["default"].createElement("div",{className:"unsupported-field"},"Unsupported field schema ",JSON.stringify(t,null,2),".")}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=a;var i=r(2),o=n(i)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function a(e){var t=e.errors;return o["default"].createElement("div",{className:"panel panel-danger errors"},o["default"].createElement("div",{className:"panel-heading"},o["default"].createElement("h3",{className:"panel-title"},"Errors")),o["default"].createElement("ul",{className:"list-group"},t.map(function(e,t){return o["default"].createElement("li",{key:t,className:"list-group-item text-danger"},e.stack)})))}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=a;var i=r(2),o=n(i)}])}); | ||
//# sourceMappingURL=react-jsonschema-form.js.map |
@@ -188,2 +188,3 @@ "use strict"; | ||
{ type: "button", className: "btn btn-danger col-xs-12", | ||
tabIndex: "-1", | ||
onClick: _this3.onDropIndexClick(index) }, | ||
@@ -205,3 +206,3 @@ "Delete" | ||
{ type: "button", className: "btn btn-info col-xs-12", | ||
onClick: this.onAddClick }, | ||
tabIndex: "-1", onClick: this.onAddClick }, | ||
"Add" | ||
@@ -208,0 +209,0 @@ ) |
@@ -52,3 +52,3 @@ "use strict"; | ||
if (widget) { | ||
var Widget = (0, _utils.getAlternativeWidget)(schema.type, widget, widgets); | ||
var Widget = (0, _utils.getAlternativeWidget)(schema, widget, widgets); | ||
return _react2.default.createElement(Widget, _extends({ options: buildOptions(schema) }, commonProps)); | ||
@@ -55,0 +55,0 @@ } |
@@ -47,3 +47,2 @@ "use strict"; | ||
"boolean": _BooleanField2.default, | ||
"date-time": _StringField2.default, | ||
"integer": _NumberField2.default, | ||
@@ -103,2 +102,4 @@ "number": _NumberField2.default, | ||
var label = _ref2.label; | ||
var hidden = _ref2.hidden; | ||
var help = _ref2.help; | ||
var required = _ref2.required; | ||
@@ -108,2 +109,6 @@ var displayLabel = _ref2.displayLabel; | ||
var children = _ref2.children; | ||
if (hidden) { | ||
return children; | ||
} | ||
var errors = errorSchema.errors; | ||
@@ -118,3 +123,8 @@ | ||
children, | ||
isError ? _react2.default.createElement(ErrorList, { errors: errors }) : _react2.default.createElement("div", null) | ||
isError ? _react2.default.createElement(ErrorList, { errors: errors }) : _react2.default.createElement("div", null), | ||
help ? _react2.default.createElement( | ||
"p", | ||
{ className: "help-block" }, | ||
help | ||
) : null | ||
); | ||
@@ -129,2 +139,4 @@ } | ||
label: _react.PropTypes.string, | ||
hidden: _react.PropTypes.bool, | ||
help: _react.PropTypes.string, | ||
required: _react.PropTypes.bool, | ||
@@ -139,2 +151,3 @@ displayLabel: _react.PropTypes.bool, | ||
errorSchema: { errors: [] }, | ||
hidden: false, | ||
required: false, | ||
@@ -168,2 +181,5 @@ displayLabel: true | ||
} | ||
if (schema.type === "boolean" && !uiSchema["ui:widget"]) { | ||
displayLabel = false; | ||
} | ||
@@ -175,2 +191,4 @@ return _react2.default.createElement( | ||
errorSchema: errorSchema, | ||
hidden: uiSchema["ui:widget"] === "hidden", | ||
help: uiSchema["ui:help"], | ||
required: required, | ||
@@ -177,0 +195,0 @@ type: schema.type, |
@@ -37,3 +37,3 @@ "use strict"; | ||
var widget = uiSchema["ui:widget"]; | ||
var widget = uiSchema["ui:widget"] || schema.format; | ||
var commonProps = { | ||
@@ -51,3 +51,3 @@ schema: schema, | ||
if (widget) { | ||
var Widget = (0, _utils.getAlternativeWidget)(schema.type, widget, widgets); | ||
var Widget = (0, _utils.getAlternativeWidget)(schema, widget, widgets); | ||
return _react2.default.createElement(Widget, _extends({ options: (0, _utils.optionsList)(schema) }, commonProps)); | ||
@@ -58,3 +58,3 @@ } | ||
if (widget) { | ||
var _Widget = (0, _utils.getAlternativeWidget)(schema.type, widget, widgets); | ||
var _Widget = (0, _utils.getAlternativeWidget)(schema, widget, widgets); | ||
return _react2.default.createElement(_Widget, commonProps); | ||
@@ -61,0 +61,0 @@ } |
@@ -38,3 +38,7 @@ "use strict"; | ||
} }), | ||
label | ||
_react2.default.createElement( | ||
"strong", | ||
null, | ||
label | ||
) | ||
) | ||
@@ -41,0 +45,0 @@ ); |
@@ -47,2 +47,18 @@ "use strict"; | ||
var _TextWidget = require("./components/widgets/TextWidget"); | ||
var _TextWidget2 = _interopRequireDefault(_TextWidget); | ||
var _DateTimeWidget = require("./components/widgets/DateTimeWidget"); | ||
var _DateTimeWidget2 = _interopRequireDefault(_DateTimeWidget); | ||
var _EmailWidget = require("./components/widgets/EmailWidget"); | ||
var _EmailWidget2 = _interopRequireDefault(_EmailWidget); | ||
var _URLWidget = require("./components/widgets/URLWidget"); | ||
var _URLWidget2 = _interopRequireDefault(_URLWidget); | ||
var _TextareaWidget = require("./components/widgets/TextareaWidget"); | ||
@@ -52,2 +68,6 @@ | ||
var _HiddenWidget = require("./components/widgets/HiddenWidget"); | ||
var _HiddenWidget2 = _interopRequireDefault(_HiddenWidget); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -60,3 +80,4 @@ | ||
radio: _RadioWidget2.default, | ||
select: _SelectWidget2.default | ||
select: _SelectWidget2.default, | ||
hidden: _HiddenWidget2.default | ||
}, | ||
@@ -67,14 +88,26 @@ string: { | ||
select: _SelectWidget2.default, | ||
textarea: _TextareaWidget2.default | ||
textarea: _TextareaWidget2.default, | ||
hidden: _HiddenWidget2.default | ||
}, | ||
number: { | ||
updown: _UpDownWidget2.default, | ||
range: _RangeWidget2.default | ||
range: _RangeWidget2.default, | ||
hidden: _HiddenWidget2.default | ||
}, | ||
integer: { | ||
updown: _UpDownWidget2.default, | ||
range: _RangeWidget2.default | ||
range: _RangeWidget2.default, | ||
hidden: _HiddenWidget2.default | ||
} | ||
}; | ||
var stringFormatWidgets = { | ||
"date-time": _DateTimeWidget2.default, | ||
"email": _EmailWidget2.default, | ||
"hostname": _TextWidget2.default, | ||
"ipv4": _TextWidget2.default, | ||
"ipv6": _TextWidget2.default, | ||
"uri": _URLWidget2.default | ||
}; | ||
function defaultTypeValue(type) { | ||
@@ -86,4 +119,2 @@ switch (type) { | ||
return false; | ||
case "date-time": | ||
return ""; | ||
case "number": | ||
@@ -104,4 +135,6 @@ return 0; | ||
function getAlternativeWidget(type, widget) { | ||
function getAlternativeWidget(schema, widget) { | ||
var registeredWidgets = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2]; | ||
var type = schema.type; | ||
var format = schema.format; | ||
@@ -120,6 +153,10 @@ if (typeof widget === "function") { | ||
} | ||
if (!altWidgetMap[type].hasOwnProperty(widget)) { | ||
throw new Error("No alternative widget \"" + widget + "\" for type " + type); | ||
if (altWidgetMap[type].hasOwnProperty(widget)) { | ||
return altWidgetMap[type][widget]; | ||
} | ||
return altWidgetMap[type][widget]; | ||
if (type === "string" && stringFormatWidgets.hasOwnProperty(format)) { | ||
return stringFormatWidgets[format]; | ||
} | ||
var info = type === "string" && format ? "/" + format : ""; | ||
throw new Error("No alternative widget \"" + widget + "\" for type " + type + info); | ||
} | ||
@@ -126,0 +163,0 @@ |
{ | ||
"name": "react-jsonschema-form", | ||
"version": "0.21.1", | ||
"version": "0.22.0", | ||
"description": "A simple React component capable of building HTML forms out of a JSON schema.", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -18,2 +18,5 @@ react-jsonschema-form | ||
- [Usage](#usage) | ||
- [Form event handlers](#form-event-handlers) | ||
- [Form submission](#form-submission) | ||
- [Form data changes](#form-data-changes) | ||
- [Form customization](#form-customization) | ||
@@ -25,2 +28,3 @@ - [The uiSchema object](#the-uischema-object) | ||
- [For number and integer fields](#for-number-and-integer-fields) | ||
- [Hidden widgets](#hidden-widgets) | ||
- [Object fields ordering](#object-fields-ordering) | ||
@@ -32,2 +36,3 @@ - [Custom CSS class names](#custom-css-class-names) | ||
- [Form action buttons](#form-action-buttons) | ||
- [Help texts](#help-texts) | ||
- [Advanced customization](#advanced-customization) | ||
@@ -116,2 +121,26 @@ - [Custom widget components](#custom-widget-components) | ||
### Form event handlers | ||
#### Form submission | ||
You can pass a function as the `onSubmit` prop of your `Form` component to listen to when the form is submitted and its data are valid. It will be passed a result object having a `formData` attribute, which is the valid form data you're usually after: | ||
```js | ||
const onSubmit = ({formData}) => console.log("yay I'm valid!"); | ||
<Form schema={schema} onSubmit={onSubmit} />; | ||
``` | ||
To react to when submitted form data are invalid, pass an `onError` handler, which is passed the list of encoutered errors: | ||
```js | ||
const onError = (errors) => console.log("I have", errors.length, "errors to fix"); | ||
<Form schema={schema} onError={onError} />; | ||
``` | ||
#### Form data changes | ||
If you plan on being notified everytime the form data are updated, you can pass an `onChange` handler, which will receive the same args as `onSubmit` any time a value is updated in the form. | ||
## Form customization | ||
@@ -184,6 +213,13 @@ | ||
* `textarea`: a `textarea` element; | ||
* `password`: an `input[type=password]` element; | ||
* `textarea`: a `textarea` element is used; | ||
* `password`: an `input[type=password]` element is used; | ||
* by default, a regular `input[type=text]` element is used. | ||
The built-in string field also supports the JSONSchema `format` property, and will render an appropriate widget by default for the following formats: | ||
- `date-time`: An `input[type=datetime-local]` element is used; | ||
- `email`: An `input[type=email]` element is used; | ||
- `uri`: An `input[type=url]` element is used; | ||
- More formats could be supported in a near future, feel free to help us going faster! | ||
#### For `number` and `integer` fields | ||
@@ -197,2 +233,24 @@ | ||
#### Hidden widgets | ||
It's possible to use an hidden widget for a given field by setting the `ui:widget` uiSchema directive to `hidden` for this field: | ||
```js | ||
const schema = { | ||
type: "object", | ||
properties: { | ||
foo: {type: "boolean"} | ||
} | ||
}; | ||
const uiSchema = { | ||
foo: {"ui:widget": "hidden"} | ||
}; | ||
``` | ||
> Notes | ||
> | ||
> - Hiding widgets is only supported for `boolean`, `string`, `number` and `integer` schema types; | ||
> - An hidden widget takes its value from the `formData` prop. | ||
### Object fields ordering | ||
@@ -301,2 +359,18 @@ | ||
### Help texts | ||
Sometimes it's convenient to add some text next to a field to guide the end user filling it; this is the purpose of the `ui:help` uiSchema directive: | ||
```js | ||
const schema = {type: "string"}; | ||
const uiSchema = { | ||
"ui:widget": "password", | ||
"ui:help": "Hint: Make it strong!" | ||
}; | ||
``` | ||
![](http://i.imgur.com/scJUuZo.png) | ||
Help texts work for any kind of field at any level, and will always be rendered immediately below the field component widget(s), but after contextualized errors, if any. | ||
## Advanced customization | ||
@@ -317,3 +391,2 @@ | ||
- `boolean` | ||
- `date-time` | ||
@@ -320,0 +393,0 @@ ```jsx |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
568060
28
2060
638
21