@kofile/react-form
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -13,2 +13,3 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
import mapField from './mapField.js'; | ||
import { runAllValidations } from './utils.js'; | ||
@@ -60,12 +61,14 @@ var noop = function noop() {}; | ||
var id = field.id, | ||
validateWith = field.validateWith, | ||
validateOn = field.validateOn, | ||
_field$validateWith = field.validateWith, | ||
validateWith = _field$validateWith === undefined ? [] : _field$validateWith, | ||
_field$validateOn = field.validateOn, | ||
validateOn = _field$validateOn === undefined ? [] : _field$validateOn, | ||
value = field.value; | ||
if (validateOn && validateOn !== 'submit') { | ||
if (!R.contains('submit', validateOn)) { | ||
return; | ||
} | ||
var validationResponse = validateWith(value); | ||
var validationResponse = runAllValidations(value, validateWith); | ||
@@ -89,10 +92,8 @@ return validationResponse ? (_ref = {}, _ref[id] = validationResponse, _ref) : {}; | ||
var id = field.id, | ||
_field$validateWith = field.validateWith, | ||
validateWith = _field$validateWith === undefined ? function () { | ||
return ''; | ||
} : _field$validateWith; | ||
_field$validateWith2 = field.validateWith, | ||
validateWith = _field$validateWith2 === undefined ? [] : _field$validateWith2; | ||
var value = formValues[id]; | ||
return !formErrors[id] && !validateWith(value); | ||
return !formErrors[id] && !runAllValidations(value, validateWith); | ||
}); | ||
@@ -116,4 +117,9 @@ | ||
var config = props.config; | ||
var defaultValues = R.compose(R.pickBy(R.complement(R.isNil)), R.pickBy(R.complement(R.isEmpty)), R.mapObjIndexed(R.prop('value')))(config); | ||
_this.state = { | ||
formValues: {}, | ||
formValues: defaultValues, | ||
formErrors: {} | ||
@@ -120,0 +126,0 @@ }; |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
import R from 'ramda'; | ||
import { getValueFromEvent, runAllValidations, resolveValidateEvent } from './utils.js'; | ||
var isEvent = R.has('nativeEvent'); | ||
var getEventValue = R.path(['target', 'value']); | ||
var getValueFromEvent = R.ifElse(isEvent, getEventValue, R.identity); | ||
var noop = function noop() {}; | ||
var resolveValidateEvent = function resolveValidateEvent(validateOn) { | ||
return validateOn ? { | ||
focus: 'onFocus', | ||
blur: 'onBlur' | ||
}[validateOn] : {}; | ||
}; | ||
var mapField = function mapField(formConfig, formProps) { | ||
@@ -26,5 +15,5 @@ var updateFormValue = formProps.updateFormValue, | ||
var _inputConfig$validate = inputConfig.validateOn, | ||
validateOn = _inputConfig$validate === undefined ? '' : _inputConfig$validate, | ||
validateOn = _inputConfig$validate === undefined ? [] : _inputConfig$validate, | ||
_inputConfig$validate2 = inputConfig.validateWith, | ||
validateWith = _inputConfig$validate2 === undefined ? noop : _inputConfig$validate2; | ||
validateWith = _inputConfig$validate2 === undefined ? [] : _inputConfig$validate2; | ||
@@ -36,3 +25,3 @@ var updateFormValueForKey = updateFormValue(key); | ||
var value = getValueFromEvent(e); | ||
var error = validateWith(value); | ||
var error = runAllValidations(value, validateWith); | ||
@@ -43,3 +32,3 @@ updateFormErrorForKey(error); | ||
var onChange = function onChange(e) { | ||
if (validateOn === 'change') { | ||
if (R.contains('change', validateOn)) { | ||
updateError(e); | ||
@@ -58,3 +47,3 @@ } | ||
value: formValues[key] || '' | ||
}, resolveValidateEvent()), | ||
}, resolveValidateEvent(validateOn, validateWith)), | ||
error: formErrors[key] | ||
@@ -61,0 +50,0 @@ }); |
27
Form.js
@@ -23,2 +23,4 @@ 'use strict'; | ||
var _utils = require('./utils.js'); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -77,12 +79,14 @@ | ||
var id = field.id, | ||
validateWith = field.validateWith, | ||
validateOn = field.validateOn, | ||
_field$validateWith = field.validateWith, | ||
validateWith = _field$validateWith === undefined ? [] : _field$validateWith, | ||
_field$validateOn = field.validateOn, | ||
validateOn = _field$validateOn === undefined ? [] : _field$validateOn, | ||
value = field.value; | ||
if (validateOn && validateOn !== 'submit') { | ||
if (!_ramda2.default.contains('submit', validateOn)) { | ||
return; | ||
} | ||
var validationResponse = validateWith(value); | ||
var validationResponse = (0, _utils.runAllValidations)(value, validateWith); | ||
@@ -106,10 +110,8 @@ return validationResponse ? (_ref = {}, _ref[id] = validationResponse, _ref) : {}; | ||
var id = field.id, | ||
_field$validateWith = field.validateWith, | ||
validateWith = _field$validateWith === undefined ? function () { | ||
return ''; | ||
} : _field$validateWith; | ||
_field$validateWith2 = field.validateWith, | ||
validateWith = _field$validateWith2 === undefined ? [] : _field$validateWith2; | ||
var value = formValues[id]; | ||
return !formErrors[id] && !validateWith(value); | ||
return !formErrors[id] && !(0, _utils.runAllValidations)(value, validateWith); | ||
}); | ||
@@ -133,4 +135,9 @@ | ||
var config = props.config; | ||
var defaultValues = _ramda2.default.compose(_ramda2.default.pickBy(_ramda2.default.complement(_ramda2.default.isNil)), _ramda2.default.pickBy(_ramda2.default.complement(_ramda2.default.isEmpty)), _ramda2.default.mapObjIndexed(_ramda2.default.prop('value')))(config); | ||
_this.state = { | ||
formValues: {}, | ||
formValues: defaultValues, | ||
formErrors: {} | ||
@@ -137,0 +144,0 @@ }; |
@@ -11,16 +11,6 @@ 'use strict'; | ||
var _utils = require('./utils.js'); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var isEvent = _ramda2.default.has('nativeEvent'); | ||
var getEventValue = _ramda2.default.path(['target', 'value']); | ||
var getValueFromEvent = _ramda2.default.ifElse(isEvent, getEventValue, _ramda2.default.identity); | ||
var noop = function noop() {}; | ||
var resolveValidateEvent = function resolveValidateEvent(validateOn) { | ||
return validateOn ? { | ||
focus: 'onFocus', | ||
blur: 'onBlur' | ||
}[validateOn] : {}; | ||
}; | ||
var mapField = function mapField(formConfig, formProps) { | ||
@@ -35,5 +25,5 @@ var updateFormValue = formProps.updateFormValue, | ||
var _inputConfig$validate = inputConfig.validateOn, | ||
validateOn = _inputConfig$validate === undefined ? '' : _inputConfig$validate, | ||
validateOn = _inputConfig$validate === undefined ? [] : _inputConfig$validate, | ||
_inputConfig$validate2 = inputConfig.validateWith, | ||
validateWith = _inputConfig$validate2 === undefined ? noop : _inputConfig$validate2; | ||
validateWith = _inputConfig$validate2 === undefined ? [] : _inputConfig$validate2; | ||
@@ -44,4 +34,4 @@ var updateFormValueForKey = updateFormValue(key); | ||
var updateError = function updateError(e) { | ||
var value = getValueFromEvent(e); | ||
var error = validateWith(value); | ||
var value = (0, _utils.getValueFromEvent)(e); | ||
var error = (0, _utils.runAllValidations)(value, validateWith); | ||
@@ -52,7 +42,7 @@ updateFormErrorForKey(error); | ||
var onChange = function onChange(e) { | ||
if (validateOn === 'change') { | ||
if (_ramda2.default.contains('change', validateOn)) { | ||
updateError(e); | ||
} | ||
var value = getValueFromEvent(e); | ||
var value = (0, _utils.getValueFromEvent)(e); | ||
@@ -67,3 +57,3 @@ return updateFormValueForKey(value); | ||
value: formValues[key] || '' | ||
}, resolveValidateEvent()), | ||
}, (0, _utils.resolveValidateEvent)(validateOn, validateWith)), | ||
error: formErrors[key] | ||
@@ -70,0 +60,0 @@ }); |
{ | ||
"name": "@kofile/react-form", | ||
"version": "0.1.0", | ||
"description": "A basic template for ES6 modules", | ||
"version": "0.1.1", | ||
"description": "A form abstraction for react", | ||
"contributors": [ | ||
@@ -21,2 +21,3 @@ { | ||
"mapField.js", | ||
"utils.js", | ||
"es", | ||
@@ -23,0 +24,0 @@ "index.js", |
@@ -1,1 +0,1 @@ | ||
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react"),require("prop-types")):"function"==typeof define&&define.amd?define(["exports","react","prop-types"],n):n(t.ReactForm={},t.React,t.PropTypes)}(this,function(t,n,r){"use strict";var e="default"in n?n.default:n;r=r&&r.hasOwnProperty("default")?r.default:r;var u=function(t){return null!=t&&"object"==typeof t&&!0===t["@@functional/placeholder"]},i=function(t){return function n(r){return 0===arguments.length||u(r)?n:t.apply(this,arguments)}},o=i(function(t){return function(){return t}}),c=o(!1),a=o(!0),f={"@@functional/placeholder":!0},s=function(t){return function n(r,e){switch(arguments.length){case 0:return n;case 1:return u(r)?n:i(function(n){return t(r,n)});default:return u(r)&&u(e)?n:u(r)?i(function(n){return t(n,e)}):u(e)?i(function(n){return t(r,n)}):t(r,e)}}},l=s(function(t,n){return+t+ +n}),p=function(t,n){t=t||[],n=n||[];var r,e=t.length,u=n.length,i=[];for(r=0;e>r;)i[i.length]=t[r],r+=1;for(r=0;u>r;)i[i.length]=n[r],r+=1;return i},h=function(t,n){switch(t){case 0:return function(){return n.apply(this,arguments)};case 1:return function(t){return n.apply(this,arguments)};case 2:return function(t,r){return n.apply(this,arguments)};case 3:return function(t,r,e){return n.apply(this,arguments)};case 4:return function(t,r,e,u){return n.apply(this,arguments)};case 5:return function(t,r,e,u,i){return n.apply(this,arguments)};case 6:return function(t,r,e,u,i,o){return n.apply(this,arguments)};case 7:return function(t,r,e,u,i,o,c){return n.apply(this,arguments)};case 8:return function(t,r,e,u,i,o,c,a){return n.apply(this,arguments)};case 9:return function(t,r,e,u,i,o,c,a,f){return n.apply(this,arguments)};case 10:return function(t,r,e,u,i,o,c,a,f,s){return n.apply(this,arguments)};default:throw Error("First argument to _arity must be a non-negative integer no greater than ten")}},y=function t(n,r,e){return function(){for(var i=[],o=0,c=n,a=0;r.length>a||arguments.length>o;){var f;a>=r.length||u(r[a])&&arguments.length>o?(f=arguments[o],o+=1):f=r[a],i[a]=f,u(f)||(c-=1),a+=1}return c>0?h(c,t(n,i,e)):e.apply(this,i)}},d=s(function(t,n){return 1===t?i(n):h(t,y(t,[],n))}),g=i(function(t){return d(t.length,function(){var n=0,r=arguments[0],e=arguments[arguments.length-1],u=Array.prototype.slice.call(arguments,0);return u[0]=function(){var t=r.apply(this,p(arguments,[n,e]));return n+=1,t},t.apply(this,u)})}),v=function(t){return function n(r,e,o){switch(arguments.length){case 0:return n;case 1:return u(r)?n:s(function(n,e){return t(r,n,e)});case 2:return u(r)&&u(e)?n:u(r)?s(function(n,r){return t(n,e,r)}):u(e)?s(function(n,e){return t(r,n,e)}):i(function(n){return t(r,e,n)});default:return u(r)&&u(e)&&u(o)?n:u(r)&&u(e)?s(function(n,r){return t(n,r,o)}):u(r)&&u(o)?s(function(n,r){return t(n,e,r)}):u(e)&&u(o)?s(function(n,e){return t(r,n,e)}):u(r)?i(function(n){return t(n,e,o)}):u(e)?i(function(n){return t(r,n,o)}):u(o)?i(function(n){return t(r,e,n)}):t(r,e,o)}}},m=v(function(t,n,r){if(n>=r.length||-r.length>n)return r;var e=(0>n?r.length:0)+n,u=p(r);return u[e]=t(r[e]),u}),b=Array.isArray||function(t){return null!=t&&t.length>=0&&"[object Array]"===Object.prototype.toString.call(t)},x=function(t){return"function"==typeof t["@@transducer/step"]},w=function(t,n,r){return function(){if(0===arguments.length)return r();var e=Array.prototype.slice.call(arguments,0),u=e.pop();if(!b(u)){for(var i=0;t.length>i;){if("function"==typeof u[t[i]])return u[t[i]].apply(u,e);i+=1}if(x(u))return n.apply(null,e)(u)}return r.apply(this,arguments)}},j=function(t){return t&&t["@@transducer/reduced"]?t:{"@@transducer/value":t,"@@transducer/reduced":!0}},O={init:function(){return this.xf["@@transducer/init"]()},result:function(t){return this.xf["@@transducer/result"](t)}},A=function(){function t(t,n){this.xf=n,this.f=t,this.all=!0}return t.prototype["@@transducer/init"]=O.init,t.prototype["@@transducer/result"]=function(t){return this.all&&(t=this.xf["@@transducer/step"](t,!0)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)||(this.all=!1,t=j(this.xf["@@transducer/step"](t,!1))),t},s(function(n,r){return new t(n,r)})}(),S=s(w(["all"],A,function(t,n){for(var r=0;n.length>r;){if(!t(n[r]))return!1;r+=1}return!0})),E=s(function(t,n){return n>t?n:t}),_=function(t,n){for(var r=0,e=n.length,u=Array(e);e>r;)u[r]=t(n[r]),r+=1;return u},q=function(t){return"[object String]"===Object.prototype.toString.call(t)},F=i(function(t){return!!b(t)||!!t&&("object"==typeof t&&(!q(t)&&(1===t.nodeType?!!t.length:0===t.length||t.length>0&&(t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1)))))}),k=function(){function t(t){this.f=t}return t.prototype["@@transducer/init"]=function(){throw Error("init not implemented on XWrap")},t.prototype["@@transducer/result"]=function(t){return t},t.prototype["@@transducer/step"]=function(t,n){return this.f(t,n)},function(n){return new t(n)}}(),W=s(function(t,n){return h(t.length,function(){return t.apply(n,arguments)})}),C=function(){function t(t,n,r){for(var e=0,u=r.length;u>e;){if((n=t["@@transducer/step"](n,r[e]))&&n["@@transducer/reduced"]){n=n["@@transducer/value"];break}e+=1}return t["@@transducer/result"](n)}function n(t,n,r){for(var e=r.next();!e.done;){if((n=t["@@transducer/step"](n,e.value))&&n["@@transducer/reduced"]){n=n["@@transducer/value"];break}e=r.next()}return t["@@transducer/result"](n)}function r(t,n,r,e){return t["@@transducer/result"](r[e](W(t["@@transducer/step"],t),n))}var e="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";return function(u,i,o){if("function"==typeof u&&(u=k(u)),F(o))return t(u,i,o);if("function"==typeof o["fantasy-land/reduce"])return r(u,i,o,"fantasy-land/reduce");if(null!=o[e])return n(u,i,o[e]());if("function"==typeof o.next)return n(u,i,o);if("function"==typeof o.reduce)return r(u,i,o,"reduce");throw new TypeError("reduce: list must be array or iterable")}}(),P=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=O.init,t.prototype["@@transducer/result"]=O.result,t.prototype["@@transducer/step"]=function(t,n){return this.xf["@@transducer/step"](t,this.f(n))},s(function(n,r){return new t(n,r)})}(),I=function(t,n){return Object.prototype.hasOwnProperty.call(n,t)},N=function(){var t=Object.prototype.toString;return"[object Arguments]"===t.call(arguments)?function(n){return"[object Arguments]"===t.call(n)}:function(t){return I("callee",t)}}(),T=function(){var t=!{toString:null}.propertyIsEnumerable("toString"),n=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],r=function(){return arguments.propertyIsEnumerable("length")}(),e=function(t,n){for(var r=0;t.length>r;){if(t[r]===n)return!0;r+=1}return!1};return i("function"!=typeof Object.keys||r?function(u){if(Object(u)!==u)return[];var i,o,c=[],a=r&&N(u);for(i in u)!I(i,u)||a&&"length"===i||(c[c.length]=i);if(t)for(o=6;o>=0;)I(i=n[o],u)&&!e(c,i)&&(c[c.length]=i),o-=1;return c}:function(t){return Object(t)!==t?[]:Object.keys(t)})}(),V=s(w(["fantasy-land/map","map"],P,function(t,n){switch(Object.prototype.toString.call(n)){case"[object Function]":return d(n.length,function(){return t.call(this,n.apply(this,arguments))});case"[object Object]":return C(function(r,e){return r[e]=t(n[e]),r},{},T(n));default:return _(t,n)}})),R=s(function(t,n){return n[t]}),B=s(function(t,n){return V(R(t),n)}),D=v(C),U=i(function(t){return d(D(E,0,B("length",t)),function(){for(var n=0,r=t.length;r>n;){if(!t[n].apply(this,arguments))return!1;n+=1}return!0})}),M=s(function(t,n){return t&&n}),L=function(){function t(t,n){this.xf=n,this.f=t,this.any=!1}return t.prototype["@@transducer/init"]=O.init,t.prototype["@@transducer/result"]=function(t){return this.any||(t=this.xf["@@transducer/step"](t,!1)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)&&(this.any=!0,t=j(this.xf["@@transducer/step"](t,!0))),t},s(function(n,r){return new t(n,r)})}(),z=s(w(["any"],L,function(t,n){for(var r=0;n.length>r;){if(t(n[r]))return!0;r+=1}return!1})),K=i(function(t){return d(D(E,0,B("length",t)),function(){for(var n=0,r=t.length;r>n;){if(t[n].apply(this,arguments))return!0;n+=1}return!1})}),$=s(function(t,n){return"function"==typeof n["fantasy-land/ap"]?n["fantasy-land/ap"](t):"function"==typeof t.ap?t.ap(n):"function"==typeof t?function(r){return t(r)(n(r))}:C(function(t,r){return p(t,V(r,n))},[],t)}),H=function(){function t(t,n){this.xf=n,this.pos=0,this.full=!1,this.acc=Array(t)}return t.prototype["@@transducer/init"]=O.init,t.prototype["@@transducer/result"]=function(t){return this.acc=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.store(n),this.full?this.xf["@@transducer/step"](t,this.getCopy()):t},t.prototype.store=function(t){this.acc[this.pos]=t,(this.pos+=1)===this.acc.length&&(this.pos=0,this.full=!0)},t.prototype.getCopy=function(){return p(Array.prototype.slice.call(this.acc,this.pos),Array.prototype.slice.call(this.acc,0,this.pos))},s(function(n,r){return new t(n,r)})}(),J=s(w([],H,function(t,n){for(var r=0,e=n.length-(t-1),u=Array(0>e?0:e);e>r;)u[r]=Array.prototype.slice.call(n,r,r+t),r+=1;return u})),X=s(function(t,n){return p(n,[t])}),Y=s(function(t,n){return t.apply(this,n)}),Z=i(function(t){for(var n=T(t),r=n.length,e=[],u=0;r>u;)e[u]=t[n[u]],u+=1;return e}),G=i(function t(n){return n=V(function(n){return"function"==typeof n?n:t(n)},n),d(D(E,0,B("length",Z(n))),function(){var t=arguments;return V(function(n){return Y(n,t)},n)})}),Q=v(function(t,n,r){var e=t(n),u=t(r);return u>e?-1:e>u?1:0}),tt=v(function(t,n,r){var e={};for(var u in r)e[u]=r[u];return e[t]=n,e}),nt=Number.isInteger||function(t){return t<<0===t},rt=i(function(t){return null==t}),et=v(function t(n,r,e){if(0===n.length)return r;var u=n[0];if(n.length>1){var i=!rt(e)&&I(u,e)?e[u]:nt(n[1])?[]:{};r=t(Array.prototype.slice.call(n,1),r,i)}if(nt(u)&&b(e)){var o=[].concat(e);return o[u]=r,o}return tt(u,r,e)}),ut=s(function(t,n){switch(t){case 0:return function(){return n.call(this)};case 1:return function(t){return n.call(this,t)};case 2:return function(t,r){return n.call(this,t,r)};case 3:return function(t,r,e){return n.call(this,t,r,e)};case 4:return function(t,r,e,u){return n.call(this,t,r,e,u)};case 5:return function(t,r,e,u,i){return n.call(this,t,r,e,u,i)};case 6:return function(t,r,e,u,i,o){return n.call(this,t,r,e,u,i,o)};case 7:return function(t,r,e,u,i,o,c){return n.call(this,t,r,e,u,i,o,c)};case 8:return function(t,r,e,u,i,o,c,a){return n.call(this,t,r,e,u,i,o,c,a)};case 9:return function(t,r,e,u,i,o,c,a,f){return n.call(this,t,r,e,u,i,o,c,a,f)};case 10:return function(t,r,e,u,i,o,c,a,f,s){return n.call(this,t,r,e,u,i,o,c,a,f,s)};default:throw Error("First argument to nAry must be a non-negative integer no greater than ten")}}),it=i(function(t){return ut(2,t)}),ot=function(t){return"[object Function]"===Object.prototype.toString.call(t)},ct=s(function(t,n){var r=d(t,n);return d(t,function(){return C($,V(r,arguments[0]),Array.prototype.slice.call(arguments,1))})}),at=i(function(t){return ct(t.length,t)}),ft=s(function(t,n){return ot(t)?function(){return t.apply(this,arguments)&&n.apply(this,arguments)}:at(M)(t,n)}),st=i(function(t){return d(t.length,t)}),lt=st(function(t){return t.apply(this,Array.prototype.slice.call(arguments,1))}),pt=function(t){return function n(r){for(var e,u,i,o=[],c=0,a=r.length;a>c;){if(F(r[c]))for(i=0,u=(e=t?n(r[c]):r[c]).length;u>i;)o[o.length]=e[i],i+=1;else o[o.length]=r[c];c+=1}return o}},ht=function(t){return{"@@transducer/value":t,"@@transducer/reduced":!0}},yt=function(){var t=function(t){return{"@@transducer/init":O.init,"@@transducer/result":function(n){return t["@@transducer/result"](n)},"@@transducer/step":function(n,r){var e=t["@@transducer/step"](n,r);return e["@@transducer/reduced"]?ht(e):e}}};return function(n){var r=t(n);return{"@@transducer/init":O.init,"@@transducer/result":function(t){return r["@@transducer/result"](t)},"@@transducer/step":function(t,n){return F(n)?C(r,t,n):C(r,t,[n])}}}}(),dt=s(function(t,n){return V(t,yt(n))}),gt=s(w(["fantasy-land/chain","chain"],dt,function(t,n){return"function"==typeof n?function(r){return t(n(r))(r)}:pt(!1)(V(t,n))})),vt=v(function(t,n,r){if(t>n)throw Error("min must not be greater than max in clamp(min, max, value)");return t>r?t:r>n?n:r}),mt=function(t){return RegExp(t.source,(t.global?"g":"")+(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.sticky?"y":"")+(t.unicode?"u":""))},bt=i(function(t){return null===t?"Null":void 0===t?"Undefined":Object.prototype.toString.call(t).slice(8,-1)}),xt=function t(n,r,e,u){var i=function(i){for(var o=r.length,c=0;o>c;){if(n===r[c])return e[c];c+=1}r[c+1]=n,e[c+1]=i;for(var a in n)i[a]=u?t(n[a],r,e,!0):n[a];return i};switch(bt(n)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(n.valueOf());case"RegExp":return mt(n);default:return n}},wt=i(function(t){return null!=t&&"function"==typeof t.clone?t.clone():xt(t,[],[],!0)}),jt=i(function(t){return function(n,r){return t(n,r)?-1:t(r,n)?1:0}}),Ot=i(function(t){return!t}),At=at(Ot),St=function(t,n){return function(){return n.call(this,t.apply(this,arguments))}},Et=function(t,n){return function(){var r=arguments.length;if(0===r)return n();var e=arguments[r-1];return b(e)||"function"!=typeof e[t]?n.apply(this,arguments):e[t].apply(e,Array.prototype.slice.call(arguments,0,r-1))}},_t=v(Et("slice",function(t,n,r){return Array.prototype.slice.call(r,t,n)})),qt=i(Et("tail",_t(1,1/0))),Ft=function(){if(0===arguments.length)throw Error("pipe requires at least one argument");return h(arguments[0].length,D(St,arguments[0],qt(arguments)))},kt=i(function(t){return q(t)?t.split("").reverse().join(""):Array.prototype.slice.call(t,0).reverse()}),Wt=function(){if(0===arguments.length)throw Error("compose requires at least one argument");return Ft.apply(this,kt(arguments))},Ct=function(){if(0===arguments.length)throw Error("composeK requires at least one argument");var t=Array.prototype.slice.call(arguments),n=t.pop();return Wt(Wt.apply(this,V(gt,t)),n)},Pt=function(t,n){return function(){var r=this;return t.apply(r,arguments).then(function(t){return n.call(r,t)})}},It=function(){if(0===arguments.length)throw Error("pipeP requires at least one argument");return h(arguments[0].length,D(Pt,arguments[0],qt(arguments)))},Nt=function(t){for(var n,r=[];!(n=t.next()).done;)r.push(n.value);return r},Tt=function(t){var n=(t+"").match(/^function (\w*)/);return null==n?"":n[1]},Vt=s(function(t,n){return t===n?0!==t||1/t==1/n:t!==t&&n!==n}),Rt=function t(n,r,e,u){if(Vt(n,r))return!0;if(bt(n)!==bt(r))return!1;if(null==n||null==r)return!1;if("function"==typeof n["fantasy-land/equals"]||"function"==typeof r["fantasy-land/equals"])return"function"==typeof n["fantasy-land/equals"]&&n["fantasy-land/equals"](r)&&"function"==typeof r["fantasy-land/equals"]&&r["fantasy-land/equals"](n);if("function"==typeof n.equals||"function"==typeof r.equals)return"function"==typeof n.equals&&n.equals(r)&&"function"==typeof r.equals&&r.equals(n);switch(bt(n)){case"Arguments":case"Array":case"Object":if("function"==typeof n.constructor&&"Promise"===Tt(n.constructor))return n===r;break;case"Boolean":case"Number":case"String":if(typeof n!=typeof r||!Vt(n.valueOf(),r.valueOf()))return!1;break;case"Date":if(!Vt(n.valueOf(),r.valueOf()))return!1;break;case"Error":return n.name===r.name&&n.message===r.message;case"RegExp":if(n.source!==r.source||n.global!==r.global||n.ignoreCase!==r.ignoreCase||n.multiline!==r.multiline||n.sticky!==r.sticky||n.unicode!==r.unicode)return!1;break;case"Map":case"Set":if(!t(Nt(n.entries()),Nt(r.entries()),e,u))return!1;break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var i=T(n);if(i.length!==T(r).length)return!1;for(var o=e.length-1;o>=0;){if(e[o]===n)return u[o]===r;o-=1}for(e.push(n),u.push(r),o=i.length-1;o>=0;){var c=i[o];if(!I(c,r)||!t(r[c],n[c],e,u))return!1;o-=1}return e.pop(),u.pop(),!0},Bt=s(function(t,n){return Rt(t,n,[],[])}),Dt=function(t,n,r){var e,u;if("function"==typeof t.indexOf)switch(typeof n){case"number":if(0===n){for(e=1/n;t.length>r;){if(0===(u=t[r])&&1/u===e)return r;r+=1}return-1}if(n!==n){for(;t.length>r;){if("number"==typeof(u=t[r])&&u!==u)return r;r+=1}return-1}return t.indexOf(n,r);case"string":case"boolean":case"function":case"undefined":return t.indexOf(n,r);case"object":if(null===n)return t.indexOf(n,r)}for(;t.length>r;){if(Bt(t[r],n))return r;r+=1}return-1},Ut=function(t,n){return Dt(n,t,0)>=0},Mt=function(t){return'"'+t.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0").replace(/"/g,'\\"')+'"'},Lt=function(){var t=function(t){return(10>t?"0":"")+t};return"function"==typeof Date.prototype.toISOString?function(t){return t.toISOString()}:function(n){return n.getUTCFullYear()+"-"+t(n.getUTCMonth()+1)+"-"+t(n.getUTCDate())+"T"+t(n.getUTCHours())+":"+t(n.getUTCMinutes())+":"+t(n.getUTCSeconds())+"."+(n.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"}}(),zt=function(t){return function(){return!t.apply(this,arguments)}},Kt=function(t,n){for(var r=0,e=n.length,u=[];e>r;)t(n[r])&&(u[u.length]=n[r]),r+=1;return u},$t=function(t){return"[object Object]"===Object.prototype.toString.call(t)},Ht=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=O.init,t.prototype["@@transducer/result"]=O.result,t.prototype["@@transducer/step"]=function(t,n){return this.f(n)?this.xf["@@transducer/step"](t,n):t},s(function(n,r){return new t(n,r)})}(),Jt=s(w(["filter"],Ht,function(t,n){return $t(n)?C(function(r,e){return t(n[e])&&(r[e]=n[e]),r},{},T(n)):Kt(t,n)})),Xt=s(function(t,n){return Jt(zt(t),n)}),Yt=function t(n,r){var e=function(e){var u=r.concat([n]);return Ut(e,u)?"<Circular>":t(e,u)},u=function(t,n){return _(function(n){return Mt(n)+": "+e(t[n])},n.slice().sort())};switch(Object.prototype.toString.call(n)){case"[object Arguments]":return"(function() { return arguments; }("+_(e,n).join(", ")+"))";case"[object Array]":return"["+_(e,n).concat(u(n,Xt(function(t){return/^\d+$/.test(t)},T(n)))).join(", ")+"]";case"[object Boolean]":return"object"==typeof n?"new Boolean("+e(n.valueOf())+")":""+n;case"[object Date]":return"new Date("+(isNaN(n.valueOf())?e(NaN):Mt(Lt(n)))+")";case"[object Null]":return"null";case"[object Number]":return"object"==typeof n?"new Number("+e(n.valueOf())+")":1/n==-1/0?"-0":n.toString(10);case"[object String]":return"object"==typeof n?"new String("+e(n.valueOf())+")":Mt(n);case"[object Undefined]":return"undefined";default:if("function"==typeof n.toString){var i=""+n;if("[object Object]"!==i)return i}return"{"+u(n,T(n)).join(", ")+"}"}},Zt=i(function(t){return Yt(t,[])}),Gt=s(function(t,n){if(b(t)){if(b(n))return t.concat(n);throw new TypeError(Zt(n)+" is not an array")}if(q(t)){if(q(n))return t+n;throw new TypeError(Zt(n)+" is not a string")}if(null!=t&&ot(t["fantasy-land/concat"]))return t["fantasy-land/concat"](n);if(null!=t&&ot(t.concat))return t.concat(n);throw new TypeError(Zt(t)+' does not have a method named "concat" or "fantasy-land/concat"')}),Qt=i(function(t){var n=D(E,0,V(function(t){return t[0].length},t));return h(n,function(){for(var n=0;t.length>n;){if(t[n][0].apply(this,arguments))return t[n][1].apply(this,arguments);n+=1}})}),tn=s(function(t,n){if(t>10)throw Error("Constructor with greater than ten arguments");return 0===t?function(){return new n}:st(ut(t,function(t,r,e,u,i,o,c,a,f,s){switch(arguments.length){case 1:return new n(t);case 2:return new n(t,r);case 3:return new n(t,r,e);case 4:return new n(t,r,e,u);case 5:return new n(t,r,e,u,i);case 6:return new n(t,r,e,u,i,o);case 7:return new n(t,r,e,u,i,o,c);case 8:return new n(t,r,e,u,i,o,c,a);case 9:return new n(t,r,e,u,i,o,c,a,f);case 10:return new n(t,r,e,u,i,o,c,a,f,s)}}))}),nn=i(function(t){return tn(t.length,t)}),rn=s(Ut),en=s(function(t,n){return d(D(E,0,B("length",n)),function(){var r=arguments,e=this;return t.apply(e,_(function(t){return t.apply(e,r)},n))})}),un=function(){function t(t,n,r,e){this.valueFn=t,this.valueAcc=n,this.keyFn=r,this.xf=e,this.inputs={}}return t.prototype["@@transducer/init"]=O.init,t.prototype["@@transducer/result"]=function(t){var n;for(n in this.inputs)if(I(n,this.inputs)&&(t=this.xf["@@transducer/step"](t,this.inputs[n]))["@@transducer/reduced"]){t=t["@@transducer/value"];break}return this.inputs=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){var r=this.keyFn(n);return this.inputs[r]=this.inputs[r]||[r,this.valueAcc],this.inputs[r][1]=this.valueFn(this.inputs[r][1],n),t},y(4,[],function(n,r,e,u){return new t(n,r,e,u)})}(),on=y(4,[],w([],un,function(t,n,r,e){return C(function(e,u){var i=r(u);return e[i]=t(I(i,e)?e[i]:n,u),e},{},e)})),cn=on(function(t,n){return t+1},0),an=l(-1),fn=s(function(t,n){return null==n||n!==n?t:n}),sn=v(function(t,n,r){var e=t(n),u=t(r);return e>u?-1:u>e?1:0}),ln=s(function(t,n){for(var r=[],e=0,u=t.length;u>e;)Ut(t[e],n)||Ut(t[e],r)||(r[r.length]=t[e]),e+=1;return r}),pn=function(t,n,r){for(var e=0,u=r.length;u>e;){if(t(n,r[e]))return!0;e+=1}return!1},hn=v(function(t,n,r){for(var e=[],u=0,i=n.length;i>u;)pn(t,n[u],r)||pn(t,n[u],e)||e.push(n[u]),u+=1;return e}),yn=s(function(t,n){var r={};for(var e in n)r[e]=n[e];return delete r[t],r}),dn=v(function(t,n,r){var e=Array.prototype.slice.call(r,0);return e.splice(t,n),e}),gn=v(function(t,n,r){return m(o(n),t,r)}),vn=s(function t(n,r){switch(n.length){case 0:return r;case 1:return nt(n[0])?dn(n[0],1,r):yn(n[0],r);default:var e=n[0],u=Array.prototype.slice.call(n,1);return null==r[e]?r:nt(n[0])?gn(e,t(u,r[e]),r):tt(e,t(u,r[e]),r)}}),mn=s(function(t,n){return t/n}),bn=function(){function t(t,n){this.xf=n,this.n=t}return t.prototype["@@transducer/init"]=O.init,t.prototype["@@transducer/result"]=O.result,t.prototype["@@transducer/step"]=function(t,n){return this.n>0?(this.n-=1,t):this.xf["@@transducer/step"](t,n)},s(function(n,r){return new t(n,r)})}(),xn=s(w(["drop"],bn,function(t,n){return _t(Math.max(0,t),1/0,n)})),wn=function(){function t(t,n){this.xf=n,this.n=t,this.i=0}return t.prototype["@@transducer/init"]=O.init,t.prototype["@@transducer/result"]=O.result,t.prototype["@@transducer/step"]=function(t,n){this.i+=1;var r=0===this.n?t:this.xf["@@transducer/step"](t,n);return 0>this.n||this.n>this.i?r:j(r)},s(function(n,r){return new t(n,r)})}(),jn=s(w(["take"],wn,function(t,n){return _t(0,0>t?1/0:t,n)})),On=function(){function t(t,n){this.xf=n,this.pos=0,this.full=!1,this.acc=Array(t)}return t.prototype["@@transducer/init"]=O.init,t.prototype["@@transducer/result"]=function(t){return this.acc=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.full&&(t=this.xf["@@transducer/step"](t,this.acc[this.pos])),this.store(n),t},t.prototype.store=function(t){this.acc[this.pos]=t,(this.pos+=1)===this.acc.length&&(this.pos=0,this.full=!0)},s(function(n,r){return new t(n,r)})}(),An=s(w([],On,function(t,n){return jn(n.length>t?n.length-t:0,n)})),Sn=function(){function t(t,n){this.f=t,this.retained=[],this.xf=n}return t.prototype["@@transducer/init"]=O.init,t.prototype["@@transducer/result"]=function(t){return this.retained=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)?this.retain(t,n):this.flush(t,n)},t.prototype.flush=function(t,n){return t=C(this.xf["@@transducer/step"],t,this.retained),this.retained=[],this.xf["@@transducer/step"](t,n)},t.prototype.retain=function(t,n){return this.retained.push(n),t},s(function(n,r){return new t(n,r)})}(),En=s(w([],Sn,function(t,n){for(var r=n.length-1;r>=0&&t(n[r]);)r-=1;return Array.prototype.slice.call(n,0,r+1)})),_n=function(){function t(t,n){this.xf=n,this.pred=t,this.lastValue=void 0,this.seenFirstValue=!1}return t.prototype["@@transducer/init"]=O.init,t.prototype["@@transducer/result"]=O.result,t.prototype["@@transducer/step"]=function(t,n){var r=!1;return this.seenFirstValue?this.pred(this.lastValue,n)&&(r=!0):this.seenFirstValue=!0,this.lastValue=n,r?t:this.xf["@@transducer/step"](t,n)},s(function(n,r){return new t(n,r)})}(),qn=s(function(t,n){var r=0>t?n.length+t:t;return q(n)?n.charAt(r):n[r]}),Fn=qn(-1),kn=s(w([],_n,function(t,n){var r=[],e=1,u=n.length;if(0!==u)for(r[0]=n[0];u>e;)t(Fn(r),n[e])||(r[r.length]=n[e]),e+=1;return r})),Wn=i(w([],_n(Bt),kn(Bt))),Cn=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=O.init,t.prototype["@@transducer/result"]=O.result,t.prototype["@@transducer/step"]=function(t,n){if(this.f){if(this.f(n))return t;this.f=null}return this.xf["@@transducer/step"](t,n)},s(function(n,r){return new t(n,r)})}(),Pn=s(w(["dropWhile"],Cn,function(t,n){for(var r=0,e=n.length;e>r&&t(n[r]);)r+=1;return Array.prototype.slice.call(n,r)})),In=s(function(t,n){return t||n}),Nn=s(function(t,n){return ot(t)?function(){return t.apply(this,arguments)||n.apply(this,arguments)}:at(In)(t,n)}),Tn=i(function(t){return null!=t&&"function"==typeof t["fantasy-land/empty"]?t["fantasy-land/empty"]():null!=t&&null!=t.constructor&&"function"==typeof t.constructor["fantasy-land/empty"]?t.constructor["fantasy-land/empty"]():null!=t&&"function"==typeof t.empty?t.empty():null!=t&&null!=t.constructor&&"function"==typeof t.constructor.empty?t.constructor.empty():b(t)?[]:q(t)?"":$t(t)?{}:N(t)?function(){return arguments}():void 0}),Vn=s(function(t,n){return xn(0>t?0:n.length-t,n)}),Rn=s(function(t,n){return Bt(Vn(t.length,n),t)}),Bn=v(function(t,n,r){return Bt(t(n),t(r))}),Dn=v(function(t,n,r){return Bt(n[t],r[t])}),Un=s(function t(n,r){var e,u,i,o={};for(u in r)i=typeof(e=n[u]),o[u]="function"===i?e(r[u]):e&&"object"===i?t(e,r[u]):r[u];return o}),Mn=function(){function t(t,n){this.xf=n,this.f=t,this.found=!1}return t.prototype["@@transducer/init"]=O.init,t.prototype["@@transducer/result"]=function(t){return this.found||(t=this.xf["@@transducer/step"](t,void 0)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)&&(this.found=!0,t=j(this.xf["@@transducer/step"](t,n))),t},s(function(n,r){return new t(n,r)})}(),Ln=s(w(["find"],Mn,function(t,n){for(var r=0,e=n.length;e>r;){if(t(n[r]))return n[r];r+=1}})),zn=function(){function t(t,n){this.xf=n,this.f=t,this.idx=-1,this.found=!1}return t.prototype["@@transducer/init"]=O.init,t.prototype["@@transducer/result"]=function(t){return this.found||(t=this.xf["@@transducer/step"](t,-1)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.idx+=1,this.f(n)&&(this.found=!0,t=j(this.xf["@@transducer/step"](t,this.idx))),t},s(function(n,r){return new t(n,r)})}(),Kn=s(w([],zn,function(t,n){for(var r=0,e=n.length;e>r;){if(t(n[r]))return r;r+=1}return-1})),$n=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=O.init,t.prototype["@@transducer/result"]=function(t){return this.xf["@@transducer/result"](this.xf["@@transducer/step"](t,this.last))},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)&&(this.last=n),t},s(function(n,r){return new t(n,r)})}(),Hn=s(w([],$n,function(t,n){for(var r=n.length-1;r>=0;){if(t(n[r]))return n[r];r-=1}})),Jn=function(){function t(t,n){this.xf=n,this.f=t,this.idx=-1,this.lastIdx=-1}return t.prototype["@@transducer/init"]=O.init,t.prototype["@@transducer/result"]=function(t){return this.xf["@@transducer/result"](this.xf["@@transducer/step"](t,this.lastIdx))},t.prototype["@@transducer/step"]=function(t,n){return this.idx+=1,this.f(n)&&(this.lastIdx=this.idx),t},s(function(n,r){return new t(n,r)})}(),Xn=s(w([],Jn,function(t,n){for(var r=n.length-1;r>=0;){if(t(n[r]))return r;r-=1}return-1})),Yn=i(pt(!0)),Zn=i(function(t){return st(function(n,r){var e=Array.prototype.slice.call(arguments,0);return e[0]=r,e[1]=n,t.apply(this,e)})}),Gn=s(Et("forEach",function(t,n){for(var r=n.length,e=0;r>e;)t(n[e]),e+=1;return n})),Qn=s(function(t,n){for(var r=T(n),e=0;r.length>e;){var u=r[e];t(n[u],u,n),e+=1}return n}),tr=i(function(t){for(var n={},r=0;t.length>r;)n[t[r][0]]=t[r][1],r+=1;return n}),nr=s(Et("groupBy",on(function(t,n){return null==t&&(t=[]),t.push(n),t},null))),rr=s(function(t,n){for(var r=[],e=0,u=n.length;u>e;){for(var i=e+1;u>i&&t(n[i-1],n[i]);)i+=1;r.push(n.slice(e,i)),e=i}return r}),er=s(function(t,n){return t>n}),ur=s(function(t,n){return t>=n}),ir=s(I),or=s(function(t,n){return t in n}),cr=qn(0),ar=function(t){return t},fr=i(ar),sr=v(function(t,n,r){return d(Math.max(t.length,n.length,r.length),function(){return t.apply(this,arguments)?n.apply(this,arguments):r.apply(this,arguments)})}),lr=l(1),pr=on(function(t,n){return n},null),hr=s(function(t,n){return"function"!=typeof n.indexOf||b(n)?Dt(n,t,0):n.indexOf(t)}),yr=_t(0,-1),dr=v(function(t,n,r){return Kt(function(n){return pn(t,n,r)},n)}),gr=v(function(t,n,r){t=r.length>t&&t>=0?t:r.length;var e=Array.prototype.slice.call(r,0);return e.splice(t,0,n),e}),vr=v(function(t,n,r){return t=r.length>t&&t>=0?t:r.length,[].concat(Array.prototype.slice.call(r,0,t),n,Array.prototype.slice.call(r,t))}),mr=function(){function t(){this._nativeSet="function"==typeof Set?new Set:null,this._items={}}function n(t,n,r){var e,u=typeof t;switch(u){case"string":case"number":return 0===t&&1/t==-1/0?!!r._items["-0"]||(n&&(r._items["-0"]=!0),!1):null!==r._nativeSet?n?(e=r._nativeSet.size,r._nativeSet.add(t),r._nativeSet.size===e):r._nativeSet.has(t):u in r._items?t in r._items[u]||(n&&(r._items[u][t]=!0),!1):(n&&(r._items[u]={},r._items[u][t]=!0),!1);case"boolean":if(u in r._items){var i=t?1:0;return!!r._items[u][i]||(n&&(r._items[u][i]=!0),!1)}return n&&(r._items[u]=t?[!1,!0]:[!0,!1]),!1;case"function":return null!==r._nativeSet?n?(e=r._nativeSet.size,r._nativeSet.add(t),r._nativeSet.size===e):r._nativeSet.has(t):u in r._items?!!Ut(t,r._items[u])||(n&&r._items[u].push(t),!1):(n&&(r._items[u]=[t]),!1);case"undefined":return!!r._items[u]||(n&&(r._items[u]=!0),!1);case"object":if(null===t)return!!r._items.null||(n&&(r._items.null=!0),!1);default:return(u=Object.prototype.toString.call(t))in r._items?!!Ut(t,r._items[u])||(n&&r._items[u].push(t),!1):(n&&(r._items[u]=[t]),!1)}}return t.prototype.add=function(t){return!n(t,!0,this)},t.prototype.has=function(t){return n(t,!1,this)},t}(),br=s(function(t,n){for(var r,e,u=new mr,i=[],o=0;n.length>o;)r=t(e=n[o]),u.add(r)&&i.push(e),o+=1;return i}),xr=br(fr),wr=s(function(t,n){var r,e;return t.length>n.length?(r=t,e=n):(r=n,e=t),xr(Kt(Zn(Ut)(r),e))}),jr=s(function(t,n){for(var r,e=0,u=n.length,i=[];u>e;)pn(t,r=n[e],i)||(i[i.length]=r),e+=1;return i}),Or=v(function(t,n,r){var e,u;n.length>r.length?(e=n,u=r):(e=r,u=n);for(var i=[],o=0;u.length>o;)pn(t,u[o],e)&&(i[i.length]=u[o]),o+=1;return jr(t,i)}),Ar=s(Et("intersperse",function(t,n){for(var r=[],e=0,u=n.length;u>e;)e===u-1?r.push(n[e]):r.push(n[e],t),e+=1;return r})),Sr="function"==typeof Object.assign?Object.assign:function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(t),r=1,e=arguments.length;e>r;){var u=arguments[r];if(null!=u)for(var i in u)I(i,u)&&(n[i]=u[i]);r+=1}return n},Er=s(function(t,n){var r={};return r[t]=n,r}),_r=function(){var t={"@@transducer/init":Array,"@@transducer/step":function(t,n){return t.push(n),t},"@@transducer/result":ar},n={"@@transducer/init":String,"@@transducer/step":function(t,n){return t+n},"@@transducer/result":ar},r={"@@transducer/init":Object,"@@transducer/step":function(t,n){return Sr(t,F(n)?Er(n[0],n[1]):n)},"@@transducer/result":ar};return function(e){if(x(e))return e;if(F(e))return t;if("string"==typeof e)return n;if("object"==typeof e)return r;throw Error("Cannot create transformer for "+e)}}(),qr=v(function(t,n,r){return x(t)?C(n(t),t["@@transducer/init"](),r):C(n(_r(t)),xt(t,[],[],!1),r)}),Fr=i(function(t){for(var n=T(t),r=n.length,e=0,u={};r>e;){var i=n[e],o=t[i],c=I(o,u)?u[o]:u[o]=[];c[c.length]=i,e+=1}return u}),kr=i(function(t){for(var n=T(t),r=n.length,e=0,u={};r>e;){var i=n[e];u[t[i]]=i,e+=1}return u}),Wr=s(function(t,n){return d(t+1,function(){var r=arguments[t];if(null!=r&&ot(r[n]))return r[n].apply(r,Array.prototype.slice.call(arguments,0,t));throw new TypeError(Zt(r)+' does not have a method named "'+n+'"')})}),Cr=s(function(t,n){return null!=n&&n.constructor===t||n instanceof t}),Pr=i(function(t){return null!=t&&Bt(t,Tn(t))}),Ir=Wr(1,"join"),Nr=i(function(t){return en(function(){return Array.prototype.slice.call(arguments,0)},t)}),Tr=i(function(t){var n,r=[];for(n in t)r[r.length]=n;return r}),Vr=s(function(t,n){if("function"!=typeof n.lastIndexOf||b(n)){for(var r=n.length-1;r>=0;){if(Bt(n[r],t))return r;r-=1}return-1}return n.lastIndexOf(t)}),Rr=function(t){return"[object Number]"===Object.prototype.toString.call(t)},Br=i(function(t){return null!=t&&Rr(t.length)?t.length:NaN}),Dr=s(function(t,n){return function(r){return function(e){return V(function(t){return n(t,e)},r(t(e)))}}}),Ur=i(function(t){return Dr(qn(t),gn(t))}),Mr=s(function(t,n){for(var r=n,e=0;t.length>e;){if(null==r)return;r=r[t[e]],e+=1}return r}),Lr=i(function(t){return Dr(Mr(t),et(t))}),zr=i(function(t){return Dr(R(t),tt(t))}),Kr=s(function(t,n){return n>t}),$r=s(function(t,n){return n>=t}),Hr=v(function(t,n,r){for(var e=0,u=r.length,i=[],o=[n];u>e;)o=t(o[0],r[e]),i[e]=o[1],e+=1;return[o[0],i]}),Jr=v(function(t,n,r){for(var e=r.length-1,u=[],i=[n];e>=0;)i=t(r[e],i[0]),u[e]=i[1],e-=1;return[u,i[0]]}),Xr=s(function(t,n){return C(function(r,e){return r[e]=t(n[e],e,n),r},{},T(n))}),Yr=s(function(t,n){return n.match(t)||[]}),Zr=s(function(t,n){return nt(t)?!nt(n)||1>n?NaN:(t%n+n)%n:NaN}),Gr=v(function(t,n,r){return t(r)>t(n)?r:n}),Qr=D(l,0),te=i(function(t){return Qr(t)/t.length}),ne=i(function(t){var n=t.length;if(0===n)return NaN;var r=2-n%2,e=(n-r)/2;return te(Array.prototype.slice.call(t,0).sort(function(t,n){return n>t?-1:t>n?1:0}).slice(e,e+r))}),re=s(function(t,n){var r={};return h(n.length,function(){var e=t.apply(this,arguments);return I(e,r)||(r[e]=n.apply(this,arguments)),r[e]})}),ee=re(function(){return Zt(arguments)}),ue=s(function(t,n){return Sr({},t,n)}),ie=i(function(t){return Sr.apply(null,[{}].concat(t))}),oe=v(function(t,n,r){var e,u={};for(e in n)I(e,n)&&(u[e]=I(e,r)?t(e,n[e],r[e]):n[e]);for(e in r)I(e,r)&&!I(e,u)&&(u[e]=r[e]);return u}),ce=v(function t(n,r,e){return oe(function(r,e,u){return $t(e)&&$t(u)?t(n,e,u):n(r,e,u)},r,e)}),ae=s(function(t,n){return ce(function(t,n,r){return n},t,n)}),fe=s(function(t,n){return ce(function(t,n,r){return r},t,n)}),se=v(function(t,n,r){return ce(function(n,r,e){return t(r,e)},n,r)}),le=v(function(t,n,r){return oe(function(n,r,e){return t(r,e)},n,r)}),pe=s(function(t,n){return t>n?n:t}),he=v(function(t,n,r){return t(r)<t(n)?r:n}),ye=s(function(t,n){return t%n}),de=s(function(t,n){return t*n}),ge=i(function(t){return-t}),ve=s(zt(w(["any"],L,z))),me=i(function(t){return d(0>t?1:t+1,function(){return qn(t,arguments)})}),be=v(function(t,n,r){return t(n(r))}),xe=i(function(t){return[t]}),we=s(function(t,n){var r={};for(var e in n)Ut(e,t)||(r[e]=n[e]);return r}),je=i(function(t){var n,r=!1;return h(t.length,function(){return r?n:(r=!0,n=t.apply(this,arguments))})}),Oe=function(){var t=function(n){return{value:n,map:function(r){return t(r(n))}}};return v(function(n,r,e){return n(function(n){return t(r(n))})(e).value})}(),Ae=s(function(t,n){return[t,n]}),Se=function(t){return s(function(n,r){return h(Math.max(0,n.length-r.length),function(){return n.apply(this,t(r,arguments))})})},Ee=Se(p),_e=Se(Zn(p)),qe=Nr([Jt,Xt]),Fe=v(function(t,n,r){return Bt(Mr(t,r),n)}),ke=v(function(t,n,r){return fn(t,Mr(n,r))}),We=v(function(t,n,r){return n.length>0&&t(Mr(n,r))}),Ce=s(function(t,n){for(var r={},e=0;t.length>e;)t[e]in n&&(r[t[e]]=n[t[e]]),e+=1;return r}),Pe=s(function(t,n){for(var r={},e=0,u=t.length;u>e;){var i=t[e];r[i]=n[i],e+=1}return r}),Ie=s(function(t,n){var r={};for(var e in n)t(n[e],e,n)&&(r[e]=n[e]);return r}),Ne=s(function(t,n){return p([t],n)}),Te=D(de,1),Ve=s(function(t,n){return d(n.length,function(){for(var r=[],e=0;n.length>e;)r.push(n[e].call(this,arguments[e])),e+=1;return t.apply(this,r.concat(Array.prototype.slice.call(arguments,n.length)))})}),Re=Ve(_,[Pe,fr]),Be=v(function(t,n,r){return Bt(n,r[t])}),De=v(function(t,n,r){return Cr(t,r[n])}),Ue=v(function(t,n,r){return null!=r&&I(n,r)?r[n]:t}),Me=v(function(t,n,r){return t(r[n])}),Le=s(function(t,n){for(var r=t.length,e=[],u=0;r>u;)e[u]=n[t[u]],u+=1;return e}),ze=s(function(t,n){if(!Rr(t)||!Rr(n))throw new TypeError("Both arguments to range must be numbers");for(var r=[],e=t;n>e;)r.push(e),e+=1;return r}),Ke=v(function(t,n,r){for(var e=r.length-1;e>=0;)n=t(r[e],n),e-=1;return n}),$e=y(4,[],function(t,n,r,e){return C(function(r,e){return t(r,e)?n(r,e):j(r)},r,e)}),He=i(j),Je=s(function(t,n){var r,e=+n,u=0;if(0>e||isNaN(e))throw new RangeError("n must be a non-negative number");for(r=Array(e);e>u;)r[u]=t(u),u+=1;return r}),Xe=s(function(t,n){return Je(o(t),n)}),Ye=v(function(t,n,r){return r.replace(t,n)}),Ze=v(function(t,n,r){for(var e=0,u=r.length,i=[n];u>e;)n=t(n,r[e]),i[e+1]=n,e+=1;return i}),Ge=s(function(t,n){return"function"==typeof n.sequence?n.sequence(t):Ke(function(t,n){return $(V(Ne,t),n)},t([]),n)}),Qe=v(function(t,n,r){return Oe(t,o(n),r)}),tu=s(function(t,n){return Array.prototype.slice.call(n,0).sort(t)}),nu=s(function(t,n){return Array.prototype.slice.call(n,0).sort(function(n,r){var e=t(n),u=t(r);return u>e?-1:e>u?1:0})}),ru=s(function(t,n){return Array.prototype.slice.call(n,0).sort(function(n,r){for(var e=0,u=0;0===e&&t.length>u;)e=t[u](n,r),u+=1;return e})}),eu=Wr(1,"split"),uu=s(function(t,n){return[_t(0,t,n),_t(t,Br(n),n)]}),iu=s(function(t,n){if(0>=t)throw Error("First argument to splitEvery must be a positive integer");for(var r=[],e=0;n.length>e;)r.push(_t(e,e+=t,n));return r}),ou=s(function(t,n){for(var r=0,e=n.length,u=[];e>r&&!t(n[r]);)u.push(n[r]),r+=1;return[u,Array.prototype.slice.call(n,r)]}),cu=s(function(t,n){return Bt(jn(t.length,n),t)}),au=s(function(t,n){return+t-+n}),fu=s(function(t,n){return Gt(ln(t,n),ln(n,t))}),su=v(function(t,n,r){return Gt(hn(t,n,r),hn(t,r,n))}),lu=s(function(t,n){for(var r=n.length-1;r>=0&&t(n[r]);)r-=1;return Array.prototype.slice.call(n,r+1)}),pu=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=O.init,t.prototype["@@transducer/result"]=O.result,t.prototype["@@transducer/step"]=function(t,n){return this.f(n)?this.xf["@@transducer/step"](t,n):j(t)},s(function(n,r){return new t(n,r)})}(),hu=s(w(["takeWhile"],pu,function(t,n){for(var r=0,e=n.length;e>r&&t(n[r]);)r+=1;return Array.prototype.slice.call(n,0,r)})),yu=s(function(t,n){return t(n),n}),du=function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},gu=s(function(t,n){if(!du(t))throw new TypeError("‘test’ requires a value of type RegExp as its first argument; received "+Zt(t));return mt(t).test(n)}),vu=Wr(0,"toLowerCase"),mu=i(function(t){var n=[];for(var r in t)I(r,t)&&(n[n.length]=[r,t[r]]);return n}),bu=i(function(t){var n=[];for(var r in t)n[n.length]=[r,t[r]];return n}),xu=Wr(0,"toUpperCase"),wu=d(4,function(t,n,r,e){return C(t("function"==typeof n?k(n):n),r,e)}),ju=i(function(t){for(var n=0,r=[];t.length>n;){for(var e=t[n],u=0;e.length>u;)void 0===r[u]&&(r[u]=[]),r[u].push(e[u]),u+=1;n+=1}return r}),Ou=v(function(t,n,r){return"function"==typeof r["fantasy-land/traverse"]?r["fantasy-land/traverse"](n,t):Ge(t,V(n,r))}),Au=function(){var t="\t\n\v\f\r \u2028\u2029\ufeff";return i(!("function"==typeof String.prototype.trim)||t.trim()?function(n){var r=RegExp("^["+t+"]["+t+"]*"),e=RegExp("["+t+"]["+t+"]*$");return n.replace(r,"").replace(e,"")}:function(t){return t.trim()})}(),Su=s(function(t,n){return h(t.length,function(){try{return t.apply(this,arguments)}catch(t){return n.apply(this,p([t],arguments))}})}),Eu=i(function(t){return function(){return t(Array.prototype.slice.call(arguments,0))}}),_u=i(function(t){return ut(1,t)}),qu=s(function(t,n){return d(t,function(){for(var r,e=1,u=n,i=0;t>=e&&"function"==typeof u;)r=e===t?arguments.length:i+u.length,u=u.apply(this,Array.prototype.slice.call(arguments,i,r)),e+=1,i=r;return u})}),Fu=s(function(t,n){for(var r=t(n),e=[];r&&r.length;)e[e.length]=r[0],r=t(r[1]);return e}),ku=s(Wt(xr,p)),Wu=v(function(t,n,r){return jr(t,p(n,r))}),Cu=v(function(t,n,r){return t(r)?r:n(r)}),Pu=gt(ar),Iu=v(function(t,n,r){for(var e=r;!t(e);)e=n(e);return e}),Nu=i(function(t){var n,r=[];for(n in t)r[r.length]=t[n];return r}),Tu=function(){var t=function(t){return{value:t,"fantasy-land/map":function(){return this}}};return s(function(n,r){return n(t)(r).value})}(),Vu=v(function(t,n,r){return t(r)?n(r):r}),Ru=s(function(t,n){for(var r in t)if(I(r,t)&&!t[r](n[r]))return!1;return!0}),Bu=s(function(t,n){return Ru(V(Bt,t),n)}),Du=s(function(t,n){return Xt(Zn(Ut)(t),n)}),Uu=s(function(t,n){for(var r,e=0,u=t.length,i=n.length,o=[];u>e;){for(r=0;i>r;)o[o.length]=[t[e],n[r]],r+=1;e+=1}return o}),Mu=s(function(t,n){for(var r=[],e=0,u=Math.min(t.length,n.length);u>e;)r[e]=[t[e],n[e]],e+=1;return r}),Lu=s(function(t,n){for(var r=0,e=Math.min(t.length,n.length),u={};e>r;)u[t[r]]=n[r],r+=1;return u}),zu=v(function(t,n,r){for(var e=[],u=0,i=Math.min(n.length,r.length);i>u;)e[u]=t(n[u],r[u]),u+=1;return e}),Ku={F:c,T:a,__:f,add:l,addIndex:g,adjust:m,all:S,allPass:U,always:o,and:M,any:z,anyPass:K,ap:$,aperture:J,append:X,apply:Y,applySpec:G,ascend:Q,assoc:tt,assocPath:et,binary:it,bind:W,both:ft,call:lt,chain:gt,clamp:vt,clone:wt,comparator:jt,complement:At,compose:Wt,composeK:Ct,composeP:function(){if(0===arguments.length)throw Error("composeP requires at least one argument");return It.apply(this,kt(arguments))},concat:Gt,cond:Qt,construct:nn,constructN:tn,contains:rn,converge:en,countBy:cn,curry:st,curryN:d,dec:an,defaultTo:fn,descend:sn,difference:ln,differenceWith:hn,dissoc:yn,dissocPath:vn,divide:mn,drop:xn,dropLast:An,dropLastWhile:En,dropRepeats:Wn,dropRepeatsWith:kn,dropWhile:Pn,either:Nn,empty:Tn,endsWith:Rn,eqBy:Bn,eqProps:Dn,equals:Bt,evolve:Un,filter:Jt,find:Ln,findIndex:Kn,findLast:Hn,findLastIndex:Xn,flatten:Yn,flip:Zn,forEach:Gn,forEachObjIndexed:Qn,fromPairs:tr,groupBy:nr,groupWith:rr,gt:er,gte:ur,has:ir,hasIn:or,head:cr,identical:Vt,identity:fr,ifElse:sr,inc:lr,indexBy:pr,indexOf:hr,init:yr,innerJoin:dr,insert:gr,insertAll:vr,intersection:wr,intersectionWith:Or,intersperse:Ar,into:qr,invert:Fr,invertObj:kr,invoker:Wr,is:Cr,isEmpty:Pr,isNil:rt,join:Ir,juxt:Nr,keys:T,keysIn:Tr,last:Fn,lastIndexOf:Vr,length:Br,lens:Dr,lensIndex:Ur,lensPath:Lr,lensProp:zr,lift:at,liftN:ct,lt:Kr,lte:$r,map:V,mapAccum:Hr,mapAccumRight:Jr,mapObjIndexed:Xr,match:Yr,mathMod:Zr,max:E,maxBy:Gr,mean:te,median:ne,memoize:ee,memoizeWith:re,merge:ue,mergeAll:ie,mergeDeepLeft:ae,mergeDeepRight:fe,mergeDeepWith:se,mergeDeepWithKey:ce,mergeWith:le,mergeWithKey:oe,min:pe,minBy:he,modulo:ye,multiply:de,nAry:ut,negate:ge,none:ve,not:Ot,nth:qn,nthArg:me,o:be,objOf:Er,of:xe,omit:we,once:je,or:In,over:Oe,pair:Ae,partial:Ee,partialRight:_e,partition:qe,path:Mr,pathEq:Fe,pathOr:ke,pathSatisfies:We,pick:Ce,pickAll:Pe,pickBy:Ie,pipe:Ft,pipeK:function(){if(0===arguments.length)throw Error("pipeK requires at least one argument");return Ct.apply(this,kt(arguments))},pipeP:It,pluck:B,prepend:Ne,product:Te,project:Re,prop:R,propEq:Be,propIs:De,propOr:Ue,propSatisfies:Me,props:Le,range:ze,reduce:D,reduceBy:on,reduceRight:Ke,reduceWhile:$e,reduced:He,reject:Xt,remove:dn,repeat:Xe,replace:Ye,reverse:kt,scan:Ze,sequence:Ge,set:Qe,slice:_t,sort:tu,sortBy:nu,sortWith:ru,split:eu,splitAt:uu,splitEvery:iu,splitWhen:ou,startsWith:cu,subtract:au,sum:Qr,symmetricDifference:fu,symmetricDifferenceWith:su,tail:qt,take:jn,takeLast:Vn,takeLastWhile:lu,takeWhile:hu,tap:yu,test:gu,times:Je,toLower:vu,toPairs:mu,toPairsIn:bu,toString:Zt,toUpper:xu,transduce:wu,transpose:ju,traverse:Ou,trim:Au,tryCatch:Su,type:bt,unapply:Eu,unary:_u,uncurryN:qu,unfold:Fu,union:ku,unionWith:Wu,uniq:xr,uniqBy:br,uniqWith:jr,unless:Cu,unnest:Pu,until:Iu,update:gn,useWith:Ve,values:Z,valuesIn:Nu,view:Tu,when:Vu,where:Ru,whereEq:Bu,without:Du,xprod:Uu,zip:Mu,zipObj:Lu,zipWith:zu},$u=function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")},Hu=Object.assign||function(t){for(var n=1;arguments.length>n;n++){var r=arguments[n];for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}return t},Ju=function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(t,n):t.__proto__=n)},Xu=function(t,n){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?t:n},Yu=Ku.has("nativeEvent"),Zu=Ku.path(["target","value"]),Gu=Ku.ifElse(Yu,Zu,Ku.identity),Qu=function(){},ti=function(t){return t?{focus:"onFocus",blur:"onBlur"}[t]:{}},ni=function(t,n){var r=n.updateFormValue,e=n.updateFormError,u=n.formValues,i=n.formErrors;return Ku.mapObjIndexed(function(t,n){var o=t.validateOn,c=void 0===o?"":o,a=t.validateWith,f=void 0===a?Qu:a,s=r(n),l=e(n),p=function(t){var n=Gu(t),r=f(n);l(r)};return Object.assign(n,{inputProps:Hu({id:n,onChange:function(t){"change"===c&&p(t);var n=Gu(t);return s(n)},value:u[n]||""},ti()),error:i[n]})},t)},ri=function(){},ei=function(t){function n(r){$u(this,n);var e=Xu(this,t.call(this,r));return e.updateFormState=function(t){e.props.onChange(t),e.setState(t)},e.updateFormValue=function(t){return function(n){var r,u=Ku.mergeDeepRight(e.state,{formValues:(r={},r[t]=n,r)});e.updateFormState(u)}},e.updateFormError=function(t){return function(n){var r,u=n?Ku.mergeDeepRight(e.state,{formErrors:(r={},r[t]=n,r)}):e.state;e.updateFormState(u)}},e.updateChildErrorsOnSubmit=function(t){var n=Ku.values(t).map(function(t){var n,r=t.id,e=t.validateWith,u=t.validateOn,i=t.value;if(!u||"submit"===u){var o=e(i);return o?(n={},n[r]=o,n):{}}});return e.setState({formErrors:Ku.mergeAll(n)})},e.handleSubmit=function(t){return function(n){n.preventDefault();var r=e.state,u=r.formErrors,i=r.formValues;Ku.values(t).every(function(t){var n=t.id,r=t.validateWith,e=void 0===r?function(){return""}:r,o=i[n];return!u[n]&&!e(o)})?e.props.onSubmit({formValues:e.state.formValues,isValid:!0}):(e.props.onSubmit({formValues:e.state.formValues,isValid:!1}),e.updateChildErrorsOnSubmit(t))}},e.state={formValues:{},formErrors:{}},e}return Ju(n,t),n.prototype.render=function(){var t=this.props,n=t.render,r=t.config,u=Hu({},this.state,{updateFormError:this.updateFormError,updateFormValue:this.updateFormValue}),i=ni(r,u);return e.createElement("form",{onSubmit:this.handleSubmit(i)},n(i))},n}(n.Component);ei.displayName="Form",ei.propTypes={config:r.object,render:r.func,onChange:r.func,onSubmit:r.func},ei.defaultProps={onChange:ri,onSubmit:ri,render:function(){return null},config:{}},t.Form=ei,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react"),require("prop-types")):"function"==typeof define&&define.amd?define(["exports","react","prop-types"],n):n(t.ReactForm={},t.React,t.PropTypes)}(this,function(t,n,r){"use strict";var e="default"in n?n.default:n;r=r&&r.hasOwnProperty("default")?r.default:r;var u=function(t){return null!=t&&"object"==typeof t&&!0===t["@@functional/placeholder"]},i=function(t){return function n(r){return 0===arguments.length||u(r)?n:t.apply(this,arguments)}},o=i(function(t){return function(){return t}}),c=o(!1),a=o(!0),f={"@@functional/placeholder":!0},s=function(t){return function n(r,e){switch(arguments.length){case 0:return n;case 1:return u(r)?n:i(function(n){return t(r,n)});default:return u(r)&&u(e)?n:u(r)?i(function(n){return t(n,e)}):u(e)?i(function(n){return t(r,n)}):t(r,e)}}},l=s(function(t,n){return+t+ +n}),p=function(t,n){t=t||[],n=n||[];var r,e=t.length,u=n.length,i=[];for(r=0;e>r;)i[i.length]=t[r],r+=1;for(r=0;u>r;)i[i.length]=n[r],r+=1;return i},h=function(t,n){switch(t){case 0:return function(){return n.apply(this,arguments)};case 1:return function(t){return n.apply(this,arguments)};case 2:return function(t,r){return n.apply(this,arguments)};case 3:return function(t,r,e){return n.apply(this,arguments)};case 4:return function(t,r,e,u){return n.apply(this,arguments)};case 5:return function(t,r,e,u,i){return n.apply(this,arguments)};case 6:return function(t,r,e,u,i,o){return n.apply(this,arguments)};case 7:return function(t,r,e,u,i,o,c){return n.apply(this,arguments)};case 8:return function(t,r,e,u,i,o,c,a){return n.apply(this,arguments)};case 9:return function(t,r,e,u,i,o,c,a,f){return n.apply(this,arguments)};case 10:return function(t,r,e,u,i,o,c,a,f,s){return n.apply(this,arguments)};default:throw Error("First argument to _arity must be a non-negative integer no greater than ten")}},y=function t(n,r,e){return function(){for(var i=[],o=0,c=n,a=0;r.length>a||arguments.length>o;){var f;a>=r.length||u(r[a])&&arguments.length>o?(f=arguments[o],o+=1):f=r[a],i[a]=f,u(f)||(c-=1),a+=1}return c>0?h(c,t(n,i,e)):e.apply(this,i)}},d=s(function(t,n){return 1===t?i(n):h(t,y(t,[],n))}),g=i(function(t){return d(t.length,function(){var n=0,r=arguments[0],e=arguments[arguments.length-1],u=Array.prototype.slice.call(arguments,0);return u[0]=function(){var t=r.apply(this,p(arguments,[n,e]));return n+=1,t},t.apply(this,u)})}),v=function(t){return function n(r,e,o){switch(arguments.length){case 0:return n;case 1:return u(r)?n:s(function(n,e){return t(r,n,e)});case 2:return u(r)&&u(e)?n:u(r)?s(function(n,r){return t(n,e,r)}):u(e)?s(function(n,e){return t(r,n,e)}):i(function(n){return t(r,e,n)});default:return u(r)&&u(e)&&u(o)?n:u(r)&&u(e)?s(function(n,r){return t(n,r,o)}):u(r)&&u(o)?s(function(n,r){return t(n,e,r)}):u(e)&&u(o)?s(function(n,e){return t(r,n,e)}):u(r)?i(function(n){return t(n,e,o)}):u(e)?i(function(n){return t(r,n,o)}):u(o)?i(function(n){return t(r,e,n)}):t(r,e,o)}}},m=v(function(t,n,r){if(n>=r.length||-r.length>n)return r;var e=(0>n?r.length:0)+n,u=p(r);return u[e]=t(r[e]),u}),b=Array.isArray||function(t){return null!=t&&t.length>=0&&"[object Array]"===Object.prototype.toString.call(t)},x=function(t){return"function"==typeof t["@@transducer/step"]},w=function(t,n,r){return function(){if(0===arguments.length)return r();var e=Array.prototype.slice.call(arguments,0),u=e.pop();if(!b(u)){for(var i=0;t.length>i;){if("function"==typeof u[t[i]])return u[t[i]].apply(u,e);i+=1}if(x(u))return n.apply(null,e)(u)}return r.apply(this,arguments)}},j=function(t){return t&&t["@@transducer/reduced"]?t:{"@@transducer/value":t,"@@transducer/reduced":!0}},O={init:function(){return this.xf["@@transducer/init"]()},result:function(t){return this.xf["@@transducer/result"](t)}},A=function(){function t(t,n){this.xf=n,this.f=t,this.all=!0}return t.prototype["@@transducer/init"]=O.init,t.prototype["@@transducer/result"]=function(t){return this.all&&(t=this.xf["@@transducer/step"](t,!0)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)||(this.all=!1,t=j(this.xf["@@transducer/step"](t,!1))),t},s(function(n,r){return new t(n,r)})}(),E=s(w(["all"],A,function(t,n){for(var r=0;n.length>r;){if(!t(n[r]))return!1;r+=1}return!0})),S=s(function(t,n){return n>t?n:t}),_=function(t,n){for(var r=0,e=n.length,u=Array(e);e>r;)u[r]=t(n[r]),r+=1;return u},k=function(t){return"[object String]"===Object.prototype.toString.call(t)},q=i(function(t){return!!b(t)||!!t&&("object"==typeof t&&(!k(t)&&(1===t.nodeType?!!t.length:0===t.length||t.length>0&&(t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1)))))}),F=function(){function t(t){this.f=t}return t.prototype["@@transducer/init"]=function(){throw Error("init not implemented on XWrap")},t.prototype["@@transducer/result"]=function(t){return t},t.prototype["@@transducer/step"]=function(t,n){return this.f(t,n)},function(n){return new t(n)}}(),W=s(function(t,n){return h(t.length,function(){return t.apply(n,arguments)})}),C=function(){function t(t,n,r){for(var e=0,u=r.length;u>e;){if((n=t["@@transducer/step"](n,r[e]))&&n["@@transducer/reduced"]){n=n["@@transducer/value"];break}e+=1}return t["@@transducer/result"](n)}function n(t,n,r){for(var e=r.next();!e.done;){if((n=t["@@transducer/step"](n,e.value))&&n["@@transducer/reduced"]){n=n["@@transducer/value"];break}e=r.next()}return t["@@transducer/result"](n)}function r(t,n,r,e){return t["@@transducer/result"](r[e](W(t["@@transducer/step"],t),n))}var e="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";return function(u,i,o){if("function"==typeof u&&(u=F(u)),q(o))return t(u,i,o);if("function"==typeof o["fantasy-land/reduce"])return r(u,i,o,"fantasy-land/reduce");if(null!=o[e])return n(u,i,o[e]());if("function"==typeof o.next)return n(u,i,o);if("function"==typeof o.reduce)return r(u,i,o,"reduce");throw new TypeError("reduce: list must be array or iterable")}}(),P=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=O.init,t.prototype["@@transducer/result"]=O.result,t.prototype["@@transducer/step"]=function(t,n){return this.xf["@@transducer/step"](t,this.f(n))},s(function(n,r){return new t(n,r)})}(),I=function(t,n){return Object.prototype.hasOwnProperty.call(n,t)},N=function(){var t=Object.prototype.toString;return"[object Arguments]"===t.call(arguments)?function(n){return"[object Arguments]"===t.call(n)}:function(t){return I("callee",t)}}(),T=function(){var t=!{toString:null}.propertyIsEnumerable("toString"),n=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],r=function(){return arguments.propertyIsEnumerable("length")}(),e=function(t,n){for(var r=0;t.length>r;){if(t[r]===n)return!0;r+=1}return!1};return i("function"!=typeof Object.keys||r?function(u){if(Object(u)!==u)return[];var i,o,c=[],a=r&&N(u);for(i in u)!I(i,u)||a&&"length"===i||(c[c.length]=i);if(t)for(o=6;o>=0;)I(i=n[o],u)&&!e(c,i)&&(c[c.length]=i),o-=1;return c}:function(t){return Object(t)!==t?[]:Object.keys(t)})}(),V=s(w(["fantasy-land/map","map"],P,function(t,n){switch(Object.prototype.toString.call(n)){case"[object Function]":return d(n.length,function(){return t.call(this,n.apply(this,arguments))});case"[object Object]":return C(function(r,e){return r[e]=t(n[e]),r},{},T(n));default:return _(t,n)}})),R=s(function(t,n){return n[t]}),U=s(function(t,n){return V(R(t),n)}),B=v(C),D=i(function(t){return d(B(S,0,U("length",t)),function(){for(var n=0,r=t.length;r>n;){if(!t[n].apply(this,arguments))return!1;n+=1}return!0})}),M=s(function(t,n){return t&&n}),L=function(){function t(t,n){this.xf=n,this.f=t,this.any=!1}return t.prototype["@@transducer/init"]=O.init,t.prototype["@@transducer/result"]=function(t){return this.any||(t=this.xf["@@transducer/step"](t,!1)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)&&(this.any=!0,t=j(this.xf["@@transducer/step"](t,!0))),t},s(function(n,r){return new t(n,r)})}(),z=s(w(["any"],L,function(t,n){for(var r=0;n.length>r;){if(t(n[r]))return!0;r+=1}return!1})),K=i(function(t){return d(B(S,0,U("length",t)),function(){for(var n=0,r=t.length;r>n;){if(t[n].apply(this,arguments))return!0;n+=1}return!1})}),$=s(function(t,n){return"function"==typeof n["fantasy-land/ap"]?n["fantasy-land/ap"](t):"function"==typeof t.ap?t.ap(n):"function"==typeof t?function(r){return t(r)(n(r))}:C(function(t,r){return p(t,V(r,n))},[],t)}),H=function(){function t(t,n){this.xf=n,this.pos=0,this.full=!1,this.acc=Array(t)}return t.prototype["@@transducer/init"]=O.init,t.prototype["@@transducer/result"]=function(t){return this.acc=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.store(n),this.full?this.xf["@@transducer/step"](t,this.getCopy()):t},t.prototype.store=function(t){this.acc[this.pos]=t,(this.pos+=1)===this.acc.length&&(this.pos=0,this.full=!0)},t.prototype.getCopy=function(){return p(Array.prototype.slice.call(this.acc,this.pos),Array.prototype.slice.call(this.acc,0,this.pos))},s(function(n,r){return new t(n,r)})}(),J=s(w([],H,function(t,n){for(var r=0,e=n.length-(t-1),u=Array(0>e?0:e);e>r;)u[r]=Array.prototype.slice.call(n,r,r+t),r+=1;return u})),X=s(function(t,n){return p(n,[t])}),Y=s(function(t,n){return t.apply(this,n)}),Z=i(function(t){for(var n=T(t),r=n.length,e=[],u=0;r>u;)e[u]=t[n[u]],u+=1;return e}),G=i(function t(n){return n=V(function(n){return"function"==typeof n?n:t(n)},n),d(B(S,0,U("length",Z(n))),function(){var t=arguments;return V(function(n){return Y(n,t)},n)})}),Q=v(function(t,n,r){var e=t(n),u=t(r);return u>e?-1:e>u?1:0}),tt=v(function(t,n,r){var e={};for(var u in r)e[u]=r[u];return e[t]=n,e}),nt=Number.isInteger||function(t){return t<<0===t},rt=i(function(t){return null==t}),et=v(function t(n,r,e){if(0===n.length)return r;var u=n[0];if(n.length>1){var i=!rt(e)&&I(u,e)?e[u]:nt(n[1])?[]:{};r=t(Array.prototype.slice.call(n,1),r,i)}if(nt(u)&&b(e)){var o=[].concat(e);return o[u]=r,o}return tt(u,r,e)}),ut=s(function(t,n){switch(t){case 0:return function(){return n.call(this)};case 1:return function(t){return n.call(this,t)};case 2:return function(t,r){return n.call(this,t,r)};case 3:return function(t,r,e){return n.call(this,t,r,e)};case 4:return function(t,r,e,u){return n.call(this,t,r,e,u)};case 5:return function(t,r,e,u,i){return n.call(this,t,r,e,u,i)};case 6:return function(t,r,e,u,i,o){return n.call(this,t,r,e,u,i,o)};case 7:return function(t,r,e,u,i,o,c){return n.call(this,t,r,e,u,i,o,c)};case 8:return function(t,r,e,u,i,o,c,a){return n.call(this,t,r,e,u,i,o,c,a)};case 9:return function(t,r,e,u,i,o,c,a,f){return n.call(this,t,r,e,u,i,o,c,a,f)};case 10:return function(t,r,e,u,i,o,c,a,f,s){return n.call(this,t,r,e,u,i,o,c,a,f,s)};default:throw Error("First argument to nAry must be a non-negative integer no greater than ten")}}),it=i(function(t){return ut(2,t)}),ot=function(t){return"[object Function]"===Object.prototype.toString.call(t)},ct=s(function(t,n){var r=d(t,n);return d(t,function(){return C($,V(r,arguments[0]),Array.prototype.slice.call(arguments,1))})}),at=i(function(t){return ct(t.length,t)}),ft=s(function(t,n){return ot(t)?function(){return t.apply(this,arguments)&&n.apply(this,arguments)}:at(M)(t,n)}),st=i(function(t){return d(t.length,t)}),lt=st(function(t){return t.apply(this,Array.prototype.slice.call(arguments,1))}),pt=function(t){return function n(r){for(var e,u,i,o=[],c=0,a=r.length;a>c;){if(q(r[c]))for(i=0,u=(e=t?n(r[c]):r[c]).length;u>i;)o[o.length]=e[i],i+=1;else o[o.length]=r[c];c+=1}return o}},ht=function(t){return{"@@transducer/value":t,"@@transducer/reduced":!0}},yt=function(){var t=function(t){return{"@@transducer/init":O.init,"@@transducer/result":function(n){return t["@@transducer/result"](n)},"@@transducer/step":function(n,r){var e=t["@@transducer/step"](n,r);return e["@@transducer/reduced"]?ht(e):e}}};return function(n){var r=t(n);return{"@@transducer/init":O.init,"@@transducer/result":function(t){return r["@@transducer/result"](t)},"@@transducer/step":function(t,n){return q(n)?C(r,t,n):C(r,t,[n])}}}}(),dt=s(function(t,n){return V(t,yt(n))}),gt=s(w(["fantasy-land/chain","chain"],dt,function(t,n){return"function"==typeof n?function(r){return t(n(r))(r)}:pt(!1)(V(t,n))})),vt=v(function(t,n,r){if(t>n)throw Error("min must not be greater than max in clamp(min, max, value)");return t>r?t:r>n?n:r}),mt=function(t){return RegExp(t.source,(t.global?"g":"")+(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.sticky?"y":"")+(t.unicode?"u":""))},bt=i(function(t){return null===t?"Null":void 0===t?"Undefined":Object.prototype.toString.call(t).slice(8,-1)}),xt=function t(n,r,e,u){var i=function(i){for(var o=r.length,c=0;o>c;){if(n===r[c])return e[c];c+=1}r[c+1]=n,e[c+1]=i;for(var a in n)i[a]=u?t(n[a],r,e,!0):n[a];return i};switch(bt(n)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(n.valueOf());case"RegExp":return mt(n);default:return n}},wt=i(function(t){return null!=t&&"function"==typeof t.clone?t.clone():xt(t,[],[],!0)}),jt=i(function(t){return function(n,r){return t(n,r)?-1:t(r,n)?1:0}}),Ot=i(function(t){return!t}),At=at(Ot),Et=function(t,n){return function(){return n.call(this,t.apply(this,arguments))}},St=function(t,n){return function(){var r=arguments.length;if(0===r)return n();var e=arguments[r-1];return b(e)||"function"!=typeof e[t]?n.apply(this,arguments):e[t].apply(e,Array.prototype.slice.call(arguments,0,r-1))}},_t=v(St("slice",function(t,n,r){return Array.prototype.slice.call(r,t,n)})),kt=i(St("tail",_t(1,1/0))),qt=function(){if(0===arguments.length)throw Error("pipe requires at least one argument");return h(arguments[0].length,B(Et,arguments[0],kt(arguments)))},Ft=i(function(t){return k(t)?t.split("").reverse().join(""):Array.prototype.slice.call(t,0).reverse()}),Wt=function(){if(0===arguments.length)throw Error("compose requires at least one argument");return qt.apply(this,Ft(arguments))},Ct=function(){if(0===arguments.length)throw Error("composeK requires at least one argument");var t=Array.prototype.slice.call(arguments),n=t.pop();return Wt(Wt.apply(this,V(gt,t)),n)},Pt=function(t,n){return function(){var r=this;return t.apply(r,arguments).then(function(t){return n.call(r,t)})}},It=function(){if(0===arguments.length)throw Error("pipeP requires at least one argument");return h(arguments[0].length,B(Pt,arguments[0],kt(arguments)))},Nt=function(t){for(var n,r=[];!(n=t.next()).done;)r.push(n.value);return r},Tt=function(t){var n=(t+"").match(/^function (\w*)/);return null==n?"":n[1]},Vt=s(function(t,n){return t===n?0!==t||1/t==1/n:t!==t&&n!==n}),Rt=function t(n,r,e,u){if(Vt(n,r))return!0;if(bt(n)!==bt(r))return!1;if(null==n||null==r)return!1;if("function"==typeof n["fantasy-land/equals"]||"function"==typeof r["fantasy-land/equals"])return"function"==typeof n["fantasy-land/equals"]&&n["fantasy-land/equals"](r)&&"function"==typeof r["fantasy-land/equals"]&&r["fantasy-land/equals"](n);if("function"==typeof n.equals||"function"==typeof r.equals)return"function"==typeof n.equals&&n.equals(r)&&"function"==typeof r.equals&&r.equals(n);switch(bt(n)){case"Arguments":case"Array":case"Object":if("function"==typeof n.constructor&&"Promise"===Tt(n.constructor))return n===r;break;case"Boolean":case"Number":case"String":if(typeof n!=typeof r||!Vt(n.valueOf(),r.valueOf()))return!1;break;case"Date":if(!Vt(n.valueOf(),r.valueOf()))return!1;break;case"Error":return n.name===r.name&&n.message===r.message;case"RegExp":if(n.source!==r.source||n.global!==r.global||n.ignoreCase!==r.ignoreCase||n.multiline!==r.multiline||n.sticky!==r.sticky||n.unicode!==r.unicode)return!1;break;case"Map":case"Set":if(!t(Nt(n.entries()),Nt(r.entries()),e,u))return!1;break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var i=T(n);if(i.length!==T(r).length)return!1;for(var o=e.length-1;o>=0;){if(e[o]===n)return u[o]===r;o-=1}for(e.push(n),u.push(r),o=i.length-1;o>=0;){var c=i[o];if(!I(c,r)||!t(r[c],n[c],e,u))return!1;o-=1}return e.pop(),u.pop(),!0},Ut=s(function(t,n){return Rt(t,n,[],[])}),Bt=function(t,n,r){var e,u;if("function"==typeof t.indexOf)switch(typeof n){case"number":if(0===n){for(e=1/n;t.length>r;){if(0===(u=t[r])&&1/u===e)return r;r+=1}return-1}if(n!==n){for(;t.length>r;){if("number"==typeof(u=t[r])&&u!==u)return r;r+=1}return-1}return t.indexOf(n,r);case"string":case"boolean":case"function":case"undefined":return t.indexOf(n,r);case"object":if(null===n)return t.indexOf(n,r)}for(;t.length>r;){if(Ut(t[r],n))return r;r+=1}return-1},Dt=function(t,n){return Bt(n,t,0)>=0},Mt=function(t){return'"'+t.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0").replace(/"/g,'\\"')+'"'},Lt=function(){var t=function(t){return(10>t?"0":"")+t};return"function"==typeof Date.prototype.toISOString?function(t){return t.toISOString()}:function(n){return n.getUTCFullYear()+"-"+t(n.getUTCMonth()+1)+"-"+t(n.getUTCDate())+"T"+t(n.getUTCHours())+":"+t(n.getUTCMinutes())+":"+t(n.getUTCSeconds())+"."+(n.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"}}(),zt=function(t){return function(){return!t.apply(this,arguments)}},Kt=function(t,n){for(var r=0,e=n.length,u=[];e>r;)t(n[r])&&(u[u.length]=n[r]),r+=1;return u},$t=function(t){return"[object Object]"===Object.prototype.toString.call(t)},Ht=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=O.init,t.prototype["@@transducer/result"]=O.result,t.prototype["@@transducer/step"]=function(t,n){return this.f(n)?this.xf["@@transducer/step"](t,n):t},s(function(n,r){return new t(n,r)})}(),Jt=s(w(["filter"],Ht,function(t,n){return $t(n)?C(function(r,e){return t(n[e])&&(r[e]=n[e]),r},{},T(n)):Kt(t,n)})),Xt=s(function(t,n){return Jt(zt(t),n)}),Yt=function t(n,r){var e=function(e){var u=r.concat([n]);return Dt(e,u)?"<Circular>":t(e,u)},u=function(t,n){return _(function(n){return Mt(n)+": "+e(t[n])},n.slice().sort())};switch(Object.prototype.toString.call(n)){case"[object Arguments]":return"(function() { return arguments; }("+_(e,n).join(", ")+"))";case"[object Array]":return"["+_(e,n).concat(u(n,Xt(function(t){return/^\d+$/.test(t)},T(n)))).join(", ")+"]";case"[object Boolean]":return"object"==typeof n?"new Boolean("+e(n.valueOf())+")":""+n;case"[object Date]":return"new Date("+(isNaN(n.valueOf())?e(NaN):Mt(Lt(n)))+")";case"[object Null]":return"null";case"[object Number]":return"object"==typeof n?"new Number("+e(n.valueOf())+")":1/n==-1/0?"-0":n.toString(10);case"[object String]":return"object"==typeof n?"new String("+e(n.valueOf())+")":Mt(n);case"[object Undefined]":return"undefined";default:if("function"==typeof n.toString){var i=""+n;if("[object Object]"!==i)return i}return"{"+u(n,T(n)).join(", ")+"}"}},Zt=i(function(t){return Yt(t,[])}),Gt=s(function(t,n){if(b(t)){if(b(n))return t.concat(n);throw new TypeError(Zt(n)+" is not an array")}if(k(t)){if(k(n))return t+n;throw new TypeError(Zt(n)+" is not a string")}if(null!=t&&ot(t["fantasy-land/concat"]))return t["fantasy-land/concat"](n);if(null!=t&&ot(t.concat))return t.concat(n);throw new TypeError(Zt(t)+' does not have a method named "concat" or "fantasy-land/concat"')}),Qt=i(function(t){var n=B(S,0,V(function(t){return t[0].length},t));return h(n,function(){for(var n=0;t.length>n;){if(t[n][0].apply(this,arguments))return t[n][1].apply(this,arguments);n+=1}})}),tn=s(function(t,n){if(t>10)throw Error("Constructor with greater than ten arguments");return 0===t?function(){return new n}:st(ut(t,function(t,r,e,u,i,o,c,a,f,s){switch(arguments.length){case 1:return new n(t);case 2:return new n(t,r);case 3:return new n(t,r,e);case 4:return new n(t,r,e,u);case 5:return new n(t,r,e,u,i);case 6:return new n(t,r,e,u,i,o);case 7:return new n(t,r,e,u,i,o,c);case 8:return new n(t,r,e,u,i,o,c,a);case 9:return new n(t,r,e,u,i,o,c,a,f);case 10:return new n(t,r,e,u,i,o,c,a,f,s)}}))}),nn=i(function(t){return tn(t.length,t)}),rn=s(Dt),en=s(function(t,n){return d(B(S,0,U("length",n)),function(){var r=arguments,e=this;return t.apply(e,_(function(t){return t.apply(e,r)},n))})}),un=function(){function t(t,n,r,e){this.valueFn=t,this.valueAcc=n,this.keyFn=r,this.xf=e,this.inputs={}}return t.prototype["@@transducer/init"]=O.init,t.prototype["@@transducer/result"]=function(t){var n;for(n in this.inputs)if(I(n,this.inputs)&&(t=this.xf["@@transducer/step"](t,this.inputs[n]))["@@transducer/reduced"]){t=t["@@transducer/value"];break}return this.inputs=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){var r=this.keyFn(n);return this.inputs[r]=this.inputs[r]||[r,this.valueAcc],this.inputs[r][1]=this.valueFn(this.inputs[r][1],n),t},y(4,[],function(n,r,e,u){return new t(n,r,e,u)})}(),on=y(4,[],w([],un,function(t,n,r,e){return C(function(e,u){var i=r(u);return e[i]=t(I(i,e)?e[i]:n,u),e},{},e)})),cn=on(function(t,n){return t+1},0),an=l(-1),fn=s(function(t,n){return null==n||n!==n?t:n}),sn=v(function(t,n,r){var e=t(n),u=t(r);return e>u?-1:u>e?1:0}),ln=s(function(t,n){for(var r=[],e=0,u=t.length;u>e;)Dt(t[e],n)||Dt(t[e],r)||(r[r.length]=t[e]),e+=1;return r}),pn=function(t,n,r){for(var e=0,u=r.length;u>e;){if(t(n,r[e]))return!0;e+=1}return!1},hn=v(function(t,n,r){for(var e=[],u=0,i=n.length;i>u;)pn(t,n[u],r)||pn(t,n[u],e)||e.push(n[u]),u+=1;return e}),yn=s(function(t,n){var r={};for(var e in n)r[e]=n[e];return delete r[t],r}),dn=v(function(t,n,r){var e=Array.prototype.slice.call(r,0);return e.splice(t,n),e}),gn=v(function(t,n,r){return m(o(n),t,r)}),vn=s(function t(n,r){switch(n.length){case 0:return r;case 1:return nt(n[0])?dn(n[0],1,r):yn(n[0],r);default:var e=n[0],u=Array.prototype.slice.call(n,1);return null==r[e]?r:nt(n[0])?gn(e,t(u,r[e]),r):tt(e,t(u,r[e]),r)}}),mn=s(function(t,n){return t/n}),bn=function(){function t(t,n){this.xf=n,this.n=t}return t.prototype["@@transducer/init"]=O.init,t.prototype["@@transducer/result"]=O.result,t.prototype["@@transducer/step"]=function(t,n){return this.n>0?(this.n-=1,t):this.xf["@@transducer/step"](t,n)},s(function(n,r){return new t(n,r)})}(),xn=s(w(["drop"],bn,function(t,n){return _t(Math.max(0,t),1/0,n)})),wn=function(){function t(t,n){this.xf=n,this.n=t,this.i=0}return t.prototype["@@transducer/init"]=O.init,t.prototype["@@transducer/result"]=O.result,t.prototype["@@transducer/step"]=function(t,n){this.i+=1;var r=0===this.n?t:this.xf["@@transducer/step"](t,n);return 0>this.n||this.n>this.i?r:j(r)},s(function(n,r){return new t(n,r)})}(),jn=s(w(["take"],wn,function(t,n){return _t(0,0>t?1/0:t,n)})),On=function(){function t(t,n){this.xf=n,this.pos=0,this.full=!1,this.acc=Array(t)}return t.prototype["@@transducer/init"]=O.init,t.prototype["@@transducer/result"]=function(t){return this.acc=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.full&&(t=this.xf["@@transducer/step"](t,this.acc[this.pos])),this.store(n),t},t.prototype.store=function(t){this.acc[this.pos]=t,(this.pos+=1)===this.acc.length&&(this.pos=0,this.full=!0)},s(function(n,r){return new t(n,r)})}(),An=s(w([],On,function(t,n){return jn(n.length>t?n.length-t:0,n)})),En=function(){function t(t,n){this.f=t,this.retained=[],this.xf=n}return t.prototype["@@transducer/init"]=O.init,t.prototype["@@transducer/result"]=function(t){return this.retained=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)?this.retain(t,n):this.flush(t,n)},t.prototype.flush=function(t,n){return t=C(this.xf["@@transducer/step"],t,this.retained),this.retained=[],this.xf["@@transducer/step"](t,n)},t.prototype.retain=function(t,n){return this.retained.push(n),t},s(function(n,r){return new t(n,r)})}(),Sn=s(w([],En,function(t,n){for(var r=n.length-1;r>=0&&t(n[r]);)r-=1;return Array.prototype.slice.call(n,0,r+1)})),_n=function(){function t(t,n){this.xf=n,this.pred=t,this.lastValue=void 0,this.seenFirstValue=!1}return t.prototype["@@transducer/init"]=O.init,t.prototype["@@transducer/result"]=O.result,t.prototype["@@transducer/step"]=function(t,n){var r=!1;return this.seenFirstValue?this.pred(this.lastValue,n)&&(r=!0):this.seenFirstValue=!0,this.lastValue=n,r?t:this.xf["@@transducer/step"](t,n)},s(function(n,r){return new t(n,r)})}(),kn=s(function(t,n){var r=0>t?n.length+t:t;return k(n)?n.charAt(r):n[r]}),qn=kn(-1),Fn=s(w([],_n,function(t,n){var r=[],e=1,u=n.length;if(0!==u)for(r[0]=n[0];u>e;)t(qn(r),n[e])||(r[r.length]=n[e]),e+=1;return r})),Wn=i(w([],_n(Ut),Fn(Ut))),Cn=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=O.init,t.prototype["@@transducer/result"]=O.result,t.prototype["@@transducer/step"]=function(t,n){if(this.f){if(this.f(n))return t;this.f=null}return this.xf["@@transducer/step"](t,n)},s(function(n,r){return new t(n,r)})}(),Pn=s(w(["dropWhile"],Cn,function(t,n){for(var r=0,e=n.length;e>r&&t(n[r]);)r+=1;return Array.prototype.slice.call(n,r)})),In=s(function(t,n){return t||n}),Nn=s(function(t,n){return ot(t)?function(){return t.apply(this,arguments)||n.apply(this,arguments)}:at(In)(t,n)}),Tn=i(function(t){return null!=t&&"function"==typeof t["fantasy-land/empty"]?t["fantasy-land/empty"]():null!=t&&null!=t.constructor&&"function"==typeof t.constructor["fantasy-land/empty"]?t.constructor["fantasy-land/empty"]():null!=t&&"function"==typeof t.empty?t.empty():null!=t&&null!=t.constructor&&"function"==typeof t.constructor.empty?t.constructor.empty():b(t)?[]:k(t)?"":$t(t)?{}:N(t)?function(){return arguments}():void 0}),Vn=s(function(t,n){return xn(0>t?0:n.length-t,n)}),Rn=s(function(t,n){return Ut(Vn(t.length,n),t)}),Un=v(function(t,n,r){return Ut(t(n),t(r))}),Bn=v(function(t,n,r){return Ut(n[t],r[t])}),Dn=s(function t(n,r){var e,u,i,o={};for(u in r)i=typeof(e=n[u]),o[u]="function"===i?e(r[u]):e&&"object"===i?t(e,r[u]):r[u];return o}),Mn=function(){function t(t,n){this.xf=n,this.f=t,this.found=!1}return t.prototype["@@transducer/init"]=O.init,t.prototype["@@transducer/result"]=function(t){return this.found||(t=this.xf["@@transducer/step"](t,void 0)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)&&(this.found=!0,t=j(this.xf["@@transducer/step"](t,n))),t},s(function(n,r){return new t(n,r)})}(),Ln=s(w(["find"],Mn,function(t,n){for(var r=0,e=n.length;e>r;){if(t(n[r]))return n[r];r+=1}})),zn=function(){function t(t,n){this.xf=n,this.f=t,this.idx=-1,this.found=!1}return t.prototype["@@transducer/init"]=O.init,t.prototype["@@transducer/result"]=function(t){return this.found||(t=this.xf["@@transducer/step"](t,-1)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.idx+=1,this.f(n)&&(this.found=!0,t=j(this.xf["@@transducer/step"](t,this.idx))),t},s(function(n,r){return new t(n,r)})}(),Kn=s(w([],zn,function(t,n){for(var r=0,e=n.length;e>r;){if(t(n[r]))return r;r+=1}return-1})),$n=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=O.init,t.prototype["@@transducer/result"]=function(t){return this.xf["@@transducer/result"](this.xf["@@transducer/step"](t,this.last))},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)&&(this.last=n),t},s(function(n,r){return new t(n,r)})}(),Hn=s(w([],$n,function(t,n){for(var r=n.length-1;r>=0;){if(t(n[r]))return n[r];r-=1}})),Jn=function(){function t(t,n){this.xf=n,this.f=t,this.idx=-1,this.lastIdx=-1}return t.prototype["@@transducer/init"]=O.init,t.prototype["@@transducer/result"]=function(t){return this.xf["@@transducer/result"](this.xf["@@transducer/step"](t,this.lastIdx))},t.prototype["@@transducer/step"]=function(t,n){return this.idx+=1,this.f(n)&&(this.lastIdx=this.idx),t},s(function(n,r){return new t(n,r)})}(),Xn=s(w([],Jn,function(t,n){for(var r=n.length-1;r>=0;){if(t(n[r]))return r;r-=1}return-1})),Yn=i(pt(!0)),Zn=i(function(t){return st(function(n,r){var e=Array.prototype.slice.call(arguments,0);return e[0]=r,e[1]=n,t.apply(this,e)})}),Gn=s(St("forEach",function(t,n){for(var r=n.length,e=0;r>e;)t(n[e]),e+=1;return n})),Qn=s(function(t,n){for(var r=T(n),e=0;r.length>e;){var u=r[e];t(n[u],u,n),e+=1}return n}),tr=i(function(t){for(var n={},r=0;t.length>r;)n[t[r][0]]=t[r][1],r+=1;return n}),nr=s(St("groupBy",on(function(t,n){return null==t&&(t=[]),t.push(n),t},null))),rr=s(function(t,n){for(var r=[],e=0,u=n.length;u>e;){for(var i=e+1;u>i&&t(n[i-1],n[i]);)i+=1;r.push(n.slice(e,i)),e=i}return r}),er=s(function(t,n){return t>n}),ur=s(function(t,n){return t>=n}),ir=s(I),or=s(function(t,n){return t in n}),cr=kn(0),ar=function(t){return t},fr=i(ar),sr=v(function(t,n,r){return d(Math.max(t.length,n.length,r.length),function(){return t.apply(this,arguments)?n.apply(this,arguments):r.apply(this,arguments)})}),lr=l(1),pr=on(function(t,n){return n},null),hr=s(function(t,n){return"function"!=typeof n.indexOf||b(n)?Bt(n,t,0):n.indexOf(t)}),yr=_t(0,-1),dr=v(function(t,n,r){return Kt(function(n){return pn(t,n,r)},n)}),gr=v(function(t,n,r){t=r.length>t&&t>=0?t:r.length;var e=Array.prototype.slice.call(r,0);return e.splice(t,0,n),e}),vr=v(function(t,n,r){return t=r.length>t&&t>=0?t:r.length,[].concat(Array.prototype.slice.call(r,0,t),n,Array.prototype.slice.call(r,t))}),mr=function(){function t(){this._nativeSet="function"==typeof Set?new Set:null,this._items={}}function n(t,n,r){var e,u=typeof t;switch(u){case"string":case"number":return 0===t&&1/t==-1/0?!!r._items["-0"]||(n&&(r._items["-0"]=!0),!1):null!==r._nativeSet?n?(e=r._nativeSet.size,r._nativeSet.add(t),r._nativeSet.size===e):r._nativeSet.has(t):u in r._items?t in r._items[u]||(n&&(r._items[u][t]=!0),!1):(n&&(r._items[u]={},r._items[u][t]=!0),!1);case"boolean":if(u in r._items){var i=t?1:0;return!!r._items[u][i]||(n&&(r._items[u][i]=!0),!1)}return n&&(r._items[u]=t?[!1,!0]:[!0,!1]),!1;case"function":return null!==r._nativeSet?n?(e=r._nativeSet.size,r._nativeSet.add(t),r._nativeSet.size===e):r._nativeSet.has(t):u in r._items?!!Dt(t,r._items[u])||(n&&r._items[u].push(t),!1):(n&&(r._items[u]=[t]),!1);case"undefined":return!!r._items[u]||(n&&(r._items[u]=!0),!1);case"object":if(null===t)return!!r._items.null||(n&&(r._items.null=!0),!1);default:return(u=Object.prototype.toString.call(t))in r._items?!!Dt(t,r._items[u])||(n&&r._items[u].push(t),!1):(n&&(r._items[u]=[t]),!1)}}return t.prototype.add=function(t){return!n(t,!0,this)},t.prototype.has=function(t){return n(t,!1,this)},t}(),br=s(function(t,n){for(var r,e,u=new mr,i=[],o=0;n.length>o;)r=t(e=n[o]),u.add(r)&&i.push(e),o+=1;return i}),xr=br(fr),wr=s(function(t,n){var r,e;return t.length>n.length?(r=t,e=n):(r=n,e=t),xr(Kt(Zn(Dt)(r),e))}),jr=s(function(t,n){for(var r,e=0,u=n.length,i=[];u>e;)pn(t,r=n[e],i)||(i[i.length]=r),e+=1;return i}),Or=v(function(t,n,r){var e,u;n.length>r.length?(e=n,u=r):(e=r,u=n);for(var i=[],o=0;u.length>o;)pn(t,u[o],e)&&(i[i.length]=u[o]),o+=1;return jr(t,i)}),Ar=s(St("intersperse",function(t,n){for(var r=[],e=0,u=n.length;u>e;)e===u-1?r.push(n[e]):r.push(n[e],t),e+=1;return r})),Er="function"==typeof Object.assign?Object.assign:function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(t),r=1,e=arguments.length;e>r;){var u=arguments[r];if(null!=u)for(var i in u)I(i,u)&&(n[i]=u[i]);r+=1}return n},Sr=s(function(t,n){var r={};return r[t]=n,r}),_r=function(){var t={"@@transducer/init":Array,"@@transducer/step":function(t,n){return t.push(n),t},"@@transducer/result":ar},n={"@@transducer/init":String,"@@transducer/step":function(t,n){return t+n},"@@transducer/result":ar},r={"@@transducer/init":Object,"@@transducer/step":function(t,n){return Er(t,q(n)?Sr(n[0],n[1]):n)},"@@transducer/result":ar};return function(e){if(x(e))return e;if(q(e))return t;if("string"==typeof e)return n;if("object"==typeof e)return r;throw Error("Cannot create transformer for "+e)}}(),kr=v(function(t,n,r){return x(t)?C(n(t),t["@@transducer/init"](),r):C(n(_r(t)),xt(t,[],[],!1),r)}),qr=i(function(t){for(var n=T(t),r=n.length,e=0,u={};r>e;){var i=n[e],o=t[i],c=I(o,u)?u[o]:u[o]=[];c[c.length]=i,e+=1}return u}),Fr=i(function(t){for(var n=T(t),r=n.length,e=0,u={};r>e;){var i=n[e];u[t[i]]=i,e+=1}return u}),Wr=s(function(t,n){return d(t+1,function(){var r=arguments[t];if(null!=r&&ot(r[n]))return r[n].apply(r,Array.prototype.slice.call(arguments,0,t));throw new TypeError(Zt(r)+' does not have a method named "'+n+'"')})}),Cr=s(function(t,n){return null!=n&&n.constructor===t||n instanceof t}),Pr=i(function(t){return null!=t&&Ut(t,Tn(t))}),Ir=Wr(1,"join"),Nr=i(function(t){return en(function(){return Array.prototype.slice.call(arguments,0)},t)}),Tr=i(function(t){var n,r=[];for(n in t)r[r.length]=n;return r}),Vr=s(function(t,n){if("function"!=typeof n.lastIndexOf||b(n)){for(var r=n.length-1;r>=0;){if(Ut(n[r],t))return r;r-=1}return-1}return n.lastIndexOf(t)}),Rr=function(t){return"[object Number]"===Object.prototype.toString.call(t)},Ur=i(function(t){return null!=t&&Rr(t.length)?t.length:NaN}),Br=s(function(t,n){return function(r){return function(e){return V(function(t){return n(t,e)},r(t(e)))}}}),Dr=i(function(t){return Br(kn(t),gn(t))}),Mr=s(function(t,n){for(var r=n,e=0;t.length>e;){if(null==r)return;r=r[t[e]],e+=1}return r}),Lr=i(function(t){return Br(Mr(t),et(t))}),zr=i(function(t){return Br(R(t),tt(t))}),Kr=s(function(t,n){return n>t}),$r=s(function(t,n){return n>=t}),Hr=v(function(t,n,r){for(var e=0,u=r.length,i=[],o=[n];u>e;)o=t(o[0],r[e]),i[e]=o[1],e+=1;return[o[0],i]}),Jr=v(function(t,n,r){for(var e=r.length-1,u=[],i=[n];e>=0;)i=t(r[e],i[0]),u[e]=i[1],e-=1;return[u,i[0]]}),Xr=s(function(t,n){return C(function(r,e){return r[e]=t(n[e],e,n),r},{},T(n))}),Yr=s(function(t,n){return n.match(t)||[]}),Zr=s(function(t,n){return nt(t)?!nt(n)||1>n?NaN:(t%n+n)%n:NaN}),Gr=v(function(t,n,r){return t(r)>t(n)?r:n}),Qr=B(l,0),te=i(function(t){return Qr(t)/t.length}),ne=i(function(t){var n=t.length;if(0===n)return NaN;var r=2-n%2,e=(n-r)/2;return te(Array.prototype.slice.call(t,0).sort(function(t,n){return n>t?-1:t>n?1:0}).slice(e,e+r))}),re=s(function(t,n){var r={};return h(n.length,function(){var e=t.apply(this,arguments);return I(e,r)||(r[e]=n.apply(this,arguments)),r[e]})}),ee=re(function(){return Zt(arguments)}),ue=s(function(t,n){return Er({},t,n)}),ie=i(function(t){return Er.apply(null,[{}].concat(t))}),oe=v(function(t,n,r){var e,u={};for(e in n)I(e,n)&&(u[e]=I(e,r)?t(e,n[e],r[e]):n[e]);for(e in r)I(e,r)&&!I(e,u)&&(u[e]=r[e]);return u}),ce=v(function t(n,r,e){return oe(function(r,e,u){return $t(e)&&$t(u)?t(n,e,u):n(r,e,u)},r,e)}),ae=s(function(t,n){return ce(function(t,n,r){return n},t,n)}),fe=s(function(t,n){return ce(function(t,n,r){return r},t,n)}),se=v(function(t,n,r){return ce(function(n,r,e){return t(r,e)},n,r)}),le=v(function(t,n,r){return oe(function(n,r,e){return t(r,e)},n,r)}),pe=s(function(t,n){return t>n?n:t}),he=v(function(t,n,r){return t(r)<t(n)?r:n}),ye=s(function(t,n){return t%n}),de=s(function(t,n){return t*n}),ge=i(function(t){return-t}),ve=s(zt(w(["any"],L,z))),me=i(function(t){return d(0>t?1:t+1,function(){return kn(t,arguments)})}),be=v(function(t,n,r){return t(n(r))}),xe=i(function(t){return[t]}),we=s(function(t,n){var r={};for(var e in n)Dt(e,t)||(r[e]=n[e]);return r}),je=i(function(t){var n,r=!1;return h(t.length,function(){return r?n:(r=!0,n=t.apply(this,arguments))})}),Oe=function(){var t=function(n){return{value:n,map:function(r){return t(r(n))}}};return v(function(n,r,e){return n(function(n){return t(r(n))})(e).value})}(),Ae=s(function(t,n){return[t,n]}),Ee=function(t){return s(function(n,r){return h(Math.max(0,n.length-r.length),function(){return n.apply(this,t(r,arguments))})})},Se=Ee(p),_e=Ee(Zn(p)),ke=Nr([Jt,Xt]),qe=v(function(t,n,r){return Ut(Mr(t,r),n)}),Fe=v(function(t,n,r){return fn(t,Mr(n,r))}),We=v(function(t,n,r){return n.length>0&&t(Mr(n,r))}),Ce=s(function(t,n){for(var r={},e=0;t.length>e;)t[e]in n&&(r[t[e]]=n[t[e]]),e+=1;return r}),Pe=s(function(t,n){for(var r={},e=0,u=t.length;u>e;){var i=t[e];r[i]=n[i],e+=1}return r}),Ie=s(function(t,n){var r={};for(var e in n)t(n[e],e,n)&&(r[e]=n[e]);return r}),Ne=s(function(t,n){return p([t],n)}),Te=B(de,1),Ve=s(function(t,n){return d(n.length,function(){for(var r=[],e=0;n.length>e;)r.push(n[e].call(this,arguments[e])),e+=1;return t.apply(this,r.concat(Array.prototype.slice.call(arguments,n.length)))})}),Re=Ve(_,[Pe,fr]),Ue=v(function(t,n,r){return Ut(n,r[t])}),Be=v(function(t,n,r){return Cr(t,r[n])}),De=v(function(t,n,r){return null!=r&&I(n,r)?r[n]:t}),Me=v(function(t,n,r){return t(r[n])}),Le=s(function(t,n){for(var r=t.length,e=[],u=0;r>u;)e[u]=n[t[u]],u+=1;return e}),ze=s(function(t,n){if(!Rr(t)||!Rr(n))throw new TypeError("Both arguments to range must be numbers");for(var r=[],e=t;n>e;)r.push(e),e+=1;return r}),Ke=v(function(t,n,r){for(var e=r.length-1;e>=0;)n=t(r[e],n),e-=1;return n}),$e=y(4,[],function(t,n,r,e){return C(function(r,e){return t(r,e)?n(r,e):j(r)},r,e)}),He=i(j),Je=s(function(t,n){var r,e=+n,u=0;if(0>e||isNaN(e))throw new RangeError("n must be a non-negative number");for(r=Array(e);e>u;)r[u]=t(u),u+=1;return r}),Xe=s(function(t,n){return Je(o(t),n)}),Ye=v(function(t,n,r){return r.replace(t,n)}),Ze=v(function(t,n,r){for(var e=0,u=r.length,i=[n];u>e;)n=t(n,r[e]),i[e+1]=n,e+=1;return i}),Ge=s(function(t,n){return"function"==typeof n.sequence?n.sequence(t):Ke(function(t,n){return $(V(Ne,t),n)},t([]),n)}),Qe=v(function(t,n,r){return Oe(t,o(n),r)}),tu=s(function(t,n){return Array.prototype.slice.call(n,0).sort(t)}),nu=s(function(t,n){return Array.prototype.slice.call(n,0).sort(function(n,r){var e=t(n),u=t(r);return u>e?-1:e>u?1:0})}),ru=s(function(t,n){return Array.prototype.slice.call(n,0).sort(function(n,r){for(var e=0,u=0;0===e&&t.length>u;)e=t[u](n,r),u+=1;return e})}),eu=Wr(1,"split"),uu=s(function(t,n){return[_t(0,t,n),_t(t,Ur(n),n)]}),iu=s(function(t,n){if(0>=t)throw Error("First argument to splitEvery must be a positive integer");for(var r=[],e=0;n.length>e;)r.push(_t(e,e+=t,n));return r}),ou=s(function(t,n){for(var r=0,e=n.length,u=[];e>r&&!t(n[r]);)u.push(n[r]),r+=1;return[u,Array.prototype.slice.call(n,r)]}),cu=s(function(t,n){return Ut(jn(t.length,n),t)}),au=s(function(t,n){return+t-+n}),fu=s(function(t,n){return Gt(ln(t,n),ln(n,t))}),su=v(function(t,n,r){return Gt(hn(t,n,r),hn(t,r,n))}),lu=s(function(t,n){for(var r=n.length-1;r>=0&&t(n[r]);)r-=1;return Array.prototype.slice.call(n,r+1)}),pu=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=O.init,t.prototype["@@transducer/result"]=O.result,t.prototype["@@transducer/step"]=function(t,n){return this.f(n)?this.xf["@@transducer/step"](t,n):j(t)},s(function(n,r){return new t(n,r)})}(),hu=s(w(["takeWhile"],pu,function(t,n){for(var r=0,e=n.length;e>r&&t(n[r]);)r+=1;return Array.prototype.slice.call(n,0,r)})),yu=s(function(t,n){return t(n),n}),du=function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},gu=s(function(t,n){if(!du(t))throw new TypeError("‘test’ requires a value of type RegExp as its first argument; received "+Zt(t));return mt(t).test(n)}),vu=Wr(0,"toLowerCase"),mu=i(function(t){var n=[];for(var r in t)I(r,t)&&(n[n.length]=[r,t[r]]);return n}),bu=i(function(t){var n=[];for(var r in t)n[n.length]=[r,t[r]];return n}),xu=Wr(0,"toUpperCase"),wu=d(4,function(t,n,r,e){return C(t("function"==typeof n?F(n):n),r,e)}),ju=i(function(t){for(var n=0,r=[];t.length>n;){for(var e=t[n],u=0;e.length>u;)void 0===r[u]&&(r[u]=[]),r[u].push(e[u]),u+=1;n+=1}return r}),Ou=v(function(t,n,r){return"function"==typeof r["fantasy-land/traverse"]?r["fantasy-land/traverse"](n,t):Ge(t,V(n,r))}),Au=function(){var t="\t\n\v\f\r \u2028\u2029\ufeff";return i(!("function"==typeof String.prototype.trim)||t.trim()?function(n){var r=RegExp("^["+t+"]["+t+"]*"),e=RegExp("["+t+"]["+t+"]*$");return n.replace(r,"").replace(e,"")}:function(t){return t.trim()})}(),Eu=s(function(t,n){return h(t.length,function(){try{return t.apply(this,arguments)}catch(t){return n.apply(this,p([t],arguments))}})}),Su=i(function(t){return function(){return t(Array.prototype.slice.call(arguments,0))}}),_u=i(function(t){return ut(1,t)}),ku=s(function(t,n){return d(t,function(){for(var r,e=1,u=n,i=0;t>=e&&"function"==typeof u;)r=e===t?arguments.length:i+u.length,u=u.apply(this,Array.prototype.slice.call(arguments,i,r)),e+=1,i=r;return u})}),qu=s(function(t,n){for(var r=t(n),e=[];r&&r.length;)e[e.length]=r[0],r=t(r[1]);return e}),Fu=s(Wt(xr,p)),Wu=v(function(t,n,r){return jr(t,p(n,r))}),Cu=v(function(t,n,r){return t(r)?r:n(r)}),Pu=gt(ar),Iu=v(function(t,n,r){for(var e=r;!t(e);)e=n(e);return e}),Nu=i(function(t){var n,r=[];for(n in t)r[r.length]=t[n];return r}),Tu=function(){var t=function(t){return{value:t,"fantasy-land/map":function(){return this}}};return s(function(n,r){return n(t)(r).value})}(),Vu=v(function(t,n,r){return t(r)?n(r):r}),Ru=s(function(t,n){for(var r in t)if(I(r,t)&&!t[r](n[r]))return!1;return!0}),Uu=s(function(t,n){return Ru(V(Ut,t),n)}),Bu=s(function(t,n){return Xt(Zn(Dt)(t),n)}),Du=s(function(t,n){for(var r,e=0,u=t.length,i=n.length,o=[];u>e;){for(r=0;i>r;)o[o.length]=[t[e],n[r]],r+=1;e+=1}return o}),Mu=s(function(t,n){for(var r=[],e=0,u=Math.min(t.length,n.length);u>e;)r[e]=[t[e],n[e]],e+=1;return r}),Lu=s(function(t,n){for(var r=0,e=Math.min(t.length,n.length),u={};e>r;)u[t[r]]=n[r],r+=1;return u}),zu=v(function(t,n,r){for(var e=[],u=0,i=Math.min(n.length,r.length);i>u;)e[u]=t(n[u],r[u]),u+=1;return e}),Ku={F:c,T:a,__:f,add:l,addIndex:g,adjust:m,all:E,allPass:D,always:o,and:M,any:z,anyPass:K,ap:$,aperture:J,append:X,apply:Y,applySpec:G,ascend:Q,assoc:tt,assocPath:et,binary:it,bind:W,both:ft,call:lt,chain:gt,clamp:vt,clone:wt,comparator:jt,complement:At,compose:Wt,composeK:Ct,composeP:function(){if(0===arguments.length)throw Error("composeP requires at least one argument");return It.apply(this,Ft(arguments))},concat:Gt,cond:Qt,construct:nn,constructN:tn,contains:rn,converge:en,countBy:cn,curry:st,curryN:d,dec:an,defaultTo:fn,descend:sn,difference:ln,differenceWith:hn,dissoc:yn,dissocPath:vn,divide:mn,drop:xn,dropLast:An,dropLastWhile:Sn,dropRepeats:Wn,dropRepeatsWith:Fn,dropWhile:Pn,either:Nn,empty:Tn,endsWith:Rn,eqBy:Un,eqProps:Bn,equals:Ut,evolve:Dn,filter:Jt,find:Ln,findIndex:Kn,findLast:Hn,findLastIndex:Xn,flatten:Yn,flip:Zn,forEach:Gn,forEachObjIndexed:Qn,fromPairs:tr,groupBy:nr,groupWith:rr,gt:er,gte:ur,has:ir,hasIn:or,head:cr,identical:Vt,identity:fr,ifElse:sr,inc:lr,indexBy:pr,indexOf:hr,init:yr,innerJoin:dr,insert:gr,insertAll:vr,intersection:wr,intersectionWith:Or,intersperse:Ar,into:kr,invert:qr,invertObj:Fr,invoker:Wr,is:Cr,isEmpty:Pr,isNil:rt,join:Ir,juxt:Nr,keys:T,keysIn:Tr,last:qn,lastIndexOf:Vr,length:Ur,lens:Br,lensIndex:Dr,lensPath:Lr,lensProp:zr,lift:at,liftN:ct,lt:Kr,lte:$r,map:V,mapAccum:Hr,mapAccumRight:Jr,mapObjIndexed:Xr,match:Yr,mathMod:Zr,max:S,maxBy:Gr,mean:te,median:ne,memoize:ee,memoizeWith:re,merge:ue,mergeAll:ie,mergeDeepLeft:ae,mergeDeepRight:fe,mergeDeepWith:se,mergeDeepWithKey:ce,mergeWith:le,mergeWithKey:oe,min:pe,minBy:he,modulo:ye,multiply:de,nAry:ut,negate:ge,none:ve,not:Ot,nth:kn,nthArg:me,o:be,objOf:Sr,of:xe,omit:we,once:je,or:In,over:Oe,pair:Ae,partial:Se,partialRight:_e,partition:ke,path:Mr,pathEq:qe,pathOr:Fe,pathSatisfies:We,pick:Ce,pickAll:Pe,pickBy:Ie,pipe:qt,pipeK:function(){if(0===arguments.length)throw Error("pipeK requires at least one argument");return Ct.apply(this,Ft(arguments))},pipeP:It,pluck:U,prepend:Ne,product:Te,project:Re,prop:R,propEq:Ue,propIs:Be,propOr:De,propSatisfies:Me,props:Le,range:ze,reduce:B,reduceBy:on,reduceRight:Ke,reduceWhile:$e,reduced:He,reject:Xt,remove:dn,repeat:Xe,replace:Ye,reverse:Ft,scan:Ze,sequence:Ge,set:Qe,slice:_t,sort:tu,sortBy:nu,sortWith:ru,split:eu,splitAt:uu,splitEvery:iu,splitWhen:ou,startsWith:cu,subtract:au,sum:Qr,symmetricDifference:fu,symmetricDifferenceWith:su,tail:kt,take:jn,takeLast:Vn,takeLastWhile:lu,takeWhile:hu,tap:yu,test:gu,times:Je,toLower:vu,toPairs:mu,toPairsIn:bu,toString:Zt,toUpper:xu,transduce:wu,transpose:ju,traverse:Ou,trim:Au,tryCatch:Eu,type:bt,unapply:Su,unary:_u,uncurryN:ku,unfold:qu,union:Fu,unionWith:Wu,uniq:xr,uniqBy:br,uniqWith:jr,unless:Cu,unnest:Pu,until:Iu,update:gn,useWith:Ve,values:Z,valuesIn:Nu,view:Tu,when:Vu,where:Ru,whereEq:Uu,without:Bu,xprod:Du,zip:Mu,zipObj:Lu,zipWith:zu},$u=Ku.has("nativeEvent"),Hu=Ku.path(["target","value"]),Ju=Ku.ifElse($u,Hu,Ku.identity),Xu=["blur","focus","keyUp","keyPress","keyUp","click","doubleClick","drag","dragEnd","dragEnter","dragExit","dragLeave","dragOver","dragStart","drop","mouseDown","mouseEnter","mouseLeave","mouseMove","mouseOut","mouseOver","mouseUp"],Yu=function(t){return Ku.contains(t,Xu)},Zu=function(t){return""+Ku.toUpper(Ku.head(t))+Ku.tail(t)},Gu=function(t){return"on"+Zu(t)},Qu=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Ku.reduceWhile(Ku.isEmpty,function(n,r){return r(t)},"",n)},ti=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=function(t){return Qu(Ju(t),n)};return Ku.reduce(function(t,n){var e;return Yu(n)?Ku.merge(t,(e={},e[Gu(n)]=r,e)):t},{},t)},ni=function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")},ri=Object.assign||function(t){for(var n=1;arguments.length>n;n++){var r=arguments[n];for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}return t},ei=function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(t,n):t.__proto__=n)},ui=function(t,n){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?t:n},ii=function(t,n){var r=n.updateFormValue,e=n.updateFormError,u=n.formValues,i=n.formErrors;return Ku.mapObjIndexed(function(t,n){var o=t.validateOn,c=void 0===o?[]:o,a=t.validateWith,f=void 0===a?[]:a,s=r(n),l=e(n),p=function(t){var n=Ju(t),r=Qu(n,f);l(r)};return Object.assign(n,{inputProps:ri({id:n,onChange:function(t){Ku.contains("change",c)&&p(t);var n=Ju(t);return s(n)},value:u[n]||""},ti(c,f)),error:i[n]})},t)},oi=function(){},ci=function(t){function n(r){ni(this,n);var e=ui(this,t.call(this,r));e.updateFormState=function(t){e.props.onChange(t),e.setState(t)},e.updateFormValue=function(t){return function(n){var r,u=Ku.mergeDeepRight(e.state,{formValues:(r={},r[t]=n,r)});e.updateFormState(u)}},e.updateFormError=function(t){return function(n){var r,u=n?Ku.mergeDeepRight(e.state,{formErrors:(r={},r[t]=n,r)}):e.state;e.updateFormState(u)}},e.updateChildErrorsOnSubmit=function(t){var n=Ku.values(t).map(function(t){var n,r=t.id,e=t.validateWith,u=void 0===e?[]:e,i=t.validateOn,o=void 0===i?[]:i,c=t.value;if(Ku.contains("submit",o)){var a=Qu(c,u);return a?(n={},n[r]=a,n):{}}});return e.setState({formErrors:Ku.mergeAll(n)})},e.handleSubmit=function(t){return function(n){n.preventDefault();var r=e.state,u=r.formErrors,i=r.formValues;Ku.values(t).every(function(t){var n=t.id,r=t.validateWith,e=void 0===r?[]:r,o=i[n];return!u[n]&&!Qu(o,e)})?e.props.onSubmit({formValues:e.state.formValues,isValid:!0}):(e.props.onSubmit({formValues:e.state.formValues,isValid:!1}),e.updateChildErrorsOnSubmit(t))}};var u=r.config,i=Ku.compose(Ku.pickBy(Ku.complement(Ku.isNil)),Ku.pickBy(Ku.complement(Ku.isEmpty)),Ku.mapObjIndexed(Ku.prop("value")))(u);return e.state={formValues:i,formErrors:{}},e}return ei(n,t),n.prototype.render=function(){var t=this.props,n=t.render,r=t.config,u=ri({},this.state,{updateFormError:this.updateFormError,updateFormValue:this.updateFormValue}),i=ii(r,u);return e.createElement("form",{onSubmit:this.handleSubmit(i)},n(i))},n}(n.Component);ci.displayName="Form",ci.propTypes={config:r.object,render:r.func,onChange:r.func,onSubmit:r.func},ci.defaultProps={onChange:oi,onSubmit:oi,render:function(){return null},config:{}},t.Form=ci,Object.defineProperty(t,"__esModule",{value:!0})}); |
Sorry, the diff of this file is too big to display
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
354276
12
9656