From ca594f2ff8ed248d552d63a265ffb0d42b0e6004 Mon Sep 17 00:00:00 2001 From: Taranto Date: Fri, 18 Feb 2022 20:17:09 +0000 Subject: [PATCH] chore: react build --- public/asset-manifest.json | 14 +++++++------- public/index.html | 2 +- public/static/js/2.bfa9c0ad.chunk.js | 3 --- public/static/js/2.c8f44ac8.chunk.js | 3 +++ ...ICENSE.txt => 2.c8f44ac8.chunk.js.LICENSE.txt} | 15 +++++++++++++++ ...9c0ad.chunk.js.map => 2.c8f44ac8.chunk.js.map} | 2 +- public/static/js/main.473b3df4.chunk.js | 2 -- public/static/js/main.473b3df4.chunk.js.map | 1 - public/static/js/main.e72ecd89.chunk.js | 2 ++ public/static/js/main.e72ecd89.chunk.js.map | 1 + 10 files changed, 30 insertions(+), 15 deletions(-) delete mode 100644 public/static/js/2.bfa9c0ad.chunk.js create mode 100644 public/static/js/2.c8f44ac8.chunk.js rename public/static/js/{2.bfa9c0ad.chunk.js.LICENSE.txt => 2.c8f44ac8.chunk.js.LICENSE.txt} (94%) rename public/static/js/{2.bfa9c0ad.chunk.js.map => 2.c8f44ac8.chunk.js.map} (52%) delete mode 100644 public/static/js/main.473b3df4.chunk.js delete mode 100644 public/static/js/main.473b3df4.chunk.js.map create mode 100644 public/static/js/main.e72ecd89.chunk.js create mode 100644 public/static/js/main.e72ecd89.chunk.js.map diff --git a/public/asset-manifest.json b/public/asset-manifest.json index 1c9acd16..6c91fab7 100644 --- a/public/asset-manifest.json +++ b/public/asset-manifest.json @@ -1,13 +1,13 @@ { "files": { - "main.js": "/static/js/main.473b3df4.chunk.js", - "main.js.map": "/static/js/main.473b3df4.chunk.js.map", + "main.js": "/static/js/main.e72ecd89.chunk.js", + "main.js.map": "/static/js/main.e72ecd89.chunk.js.map", "runtime-main.js": "/static/js/runtime-main.5b925903.js", "runtime-main.js.map": "/static/js/runtime-main.5b925903.js.map", - "static/js/2.bfa9c0ad.chunk.js": "/static/js/2.bfa9c0ad.chunk.js", - "static/js/2.bfa9c0ad.chunk.js.map": "/static/js/2.bfa9c0ad.chunk.js.map", + "static/js/2.c8f44ac8.chunk.js": "/static/js/2.c8f44ac8.chunk.js", + "static/js/2.c8f44ac8.chunk.js.map": "/static/js/2.c8f44ac8.chunk.js.map", "index.html": "/index.html", - "static/js/2.bfa9c0ad.chunk.js.LICENSE.txt": "/static/js/2.bfa9c0ad.chunk.js.LICENSE.txt", + "static/js/2.c8f44ac8.chunk.js.LICENSE.txt": "/static/js/2.c8f44ac8.chunk.js.LICENSE.txt", "static/media/3-cassettes-open-1-left.d6d9aa73.svg": "/static/media/3-cassettes-open-1-left.d6d9aa73.svg", "static/media/3-cassettes-open-2-left.a9ee8d4c.svg": "/static/media/3-cassettes-open-2-left.a9ee8d4c.svg", "static/media/3-cassettes-open-3-left.08fed660.svg": "/static/media/3-cassettes-open-3-left.08fed660.svg", @@ -153,7 +153,7 @@ }, "entrypoints": [ "static/js/runtime-main.5b925903.js", - "static/js/2.bfa9c0ad.chunk.js", - "static/js/main.473b3df4.chunk.js" + "static/js/2.c8f44ac8.chunk.js", + "static/js/main.e72ecd89.chunk.js" ] } \ No newline at end of file diff --git a/public/index.html b/public/index.html index 92367e25..c5577683 100644 --- a/public/index.html +++ b/public/index.html @@ -1 +1 @@ -Lamassu Admin
\ No newline at end of file +Lamassu Admin
\ No newline at end of file diff --git a/public/static/js/2.bfa9c0ad.chunk.js b/public/static/js/2.bfa9c0ad.chunk.js deleted file mode 100644 index 9e25d73a..00000000 --- a/public/static/js/2.bfa9c0ad.chunk.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! For license information please see 2.bfa9c0ad.chunk.js.LICENSE.txt */ -(this["webpackJsonplamassu-admin"]=this["webpackJsonplamassu-admin"]||[]).push([[2],[function(e,t,n){"use strict";e.exports=n(500)},function(e,t,n){"use strict";e.exports=n(496)},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(177);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(s){i=!0,o=s}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}return n}}(e,t)||Object(r.a)(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t,n){"use strict";n.d(t,"d",(function(){return le})),n.d(t,"b",(function(){return fe})),n.d(t,"h",(function(){return we})),n.d(t,"e",(function(){return Oe})),n.d(t,"f",(function(){return We})),n.d(t,"a",(function(){return qe})),n.d(t,"g",(function(){return H})),n.d(t,"c",(function(){return Ke}));var r,i,o=n(46),a=n(42),u=n(43);try{r=Map}catch(Ze){}try{i=Set}catch(Ze){}function s(e,t,n){if(!e||"object"!==typeof e||"function"===typeof e)return e;if(e.nodeType&&"cloneNode"in e)return e.cloneNode(!0);if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e);if(Array.isArray(e))return e.map(c);if(r&&e instanceof r)return new Map(Array.from(e.entries()));if(i&&e instanceof i)return new Set(Array.from(e.values()));if(e instanceof Object){t.push(e);var o=Object.create(e);for(var a in n.push(o),e){var u=t.findIndex((function(t){return t===e[a]}));o[a]=u>-1?n[u]:s(e[a],t,n)}return o}return e}function c(e){return s(e,[],[])}var l=Object.prototype.toString,d=Error.prototype.toString,f=RegExp.prototype.toString,h="undefined"!==typeof Symbol?Symbol.prototype.toString:function(){return""},p=/^Symbol\((.*)\)(.*)$/;function g(e){return e!=+e?"NaN":0===e&&1/e<0?"-0":""+e}function m(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null==e||!0===e||!1===e)return""+e;var n=typeof e;if("number"===n)return g(e);if("string"===n)return t?'"'.concat(e,'"'):e;if("function"===n)return"[Function "+(e.name||"anonymous")+"]";if("symbol"===n)return h.call(e).replace(p,"Symbol($1)");var r=l.call(e).slice(8,-1);return"Date"===r?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===r||e instanceof Error?"["+d.call(e)+"]":"RegExp"===r?f.call(e):null}function v(e,t){var n=m(e,t);return null!==n?n:JSON.stringify(e,(function(e,n){var r=m(this[e],t);return null!==r?r:n}),2)}var b={default:"${path} is invalid",required:"${path} is a required field",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:function(e){var t=e.path,n=e.type,r=e.value,i=e.originalValue,o=null!=i&&i!==r,a="".concat(t," must be a `").concat(n,"` type, ")+"but the final value was: `".concat(v(r,!0),"`")+(o?" (cast from the value `".concat(v(i,!0),"`)."):".");return null===r&&(a+='\n If "null" is intended as an empty value be sure to mark the schema as `.nullable()`'),a},defined:"${path} must be defined"},y={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},_={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},w={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},S={isValue:"${path} field must be ${value}"},O={noUnknown:"${path} field has unspecified keys: ${unknown}"},$={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must be have ${length} items"},x=(Object.assign(Object.create(null),{mixed:b,string:y,number:_,date:w,object:O,array:$,boolean:S}),n(160)),E=n.n(x),T=function(e){return e&&e.__isYupSchema__},C=function(){function e(t,n){if(Object(a.a)(this,e),this.refs=t,this.refs=t,"function"!==typeof n){if(!E()(n,"is"))throw new TypeError("`is:` is required for `when()` conditions");if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");var r=n.is,i=n.then,o=n.otherwise,u="function"===typeof r?r:function(){for(var e=arguments.length,t=new Array(e),n=0;n1?"".concat(s.errors.length," errors occurred"):s.errors[0],Error.captureStackTrace&&Error.captureStackTrace(Object(N.a)(s),n),s}return Object(u.a)(n,null,[{key:"formatError",value:function(e,t){var n=t.label||t.path||"this";return n!==t.path&&(t=I({},t,{path:n})),"string"===typeof e?e.replace(R,(function(e,n){return v(t[n])})):"function"===typeof e?e(t):e}},{key:"isError",value:function(e){return e&&"ValidationError"===e.name}}]),n}(Object(k.a)(Error));function D(e,t){var n=e.endEarly,r=e.tests,i=e.args,a=e.value,u=e.errors,s=e.sort,c=e.path,l=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(t),d=r.length,f=[];if(u=u||[],!d)return u.length?l(new j(u,a,c)):l(null,a);for(var h=0;h1&&void 0!==arguments[1]?arguments[1]:{};if(Object(a.a)(this,e),"string"!==typeof t)throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),""===t)throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===B,this.isValue=this.key[0]===z,this.isSibling=!this.isContext&&!this.isValue;var r=this.isContext?B:this.isValue?z:"";this.path=this.key.slice(r.length),this.getter=this.path&&Object(U.getter)(this.path,!0),this.map=n.map}return Object(u.a)(e,[{key:"getValue",value:function(e,t,n){var r=this.isContext?n:this.isValue?e:t;return this.getter&&(r=this.getter(r||{})),this.map&&(r=this.map(r)),r}},{key:"cast",value:function(e,t){return this.getValue(e,null==t?void 0:t.parent,null==t?void 0:t.context)}},{key:"resolve",value:function(){return this}},{key:"describe",value:function(){return{type:"ref",key:this.key}}},{key:"toString",value:function(){return"Ref(".concat(this.key,")")}}],[{key:"isRef",value:function(e){return e&&e.__isYupRef}}]),e}();function W(){return(W=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(t,["value","path","label","options","originalValue","sync"]),d=e.name,f=e.test,h=e.params,p=e.message,g=u.parent,m=u.context;function v(e){return V.isRef(e)?e.getValue(r,g,m):e}function b(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=F()(W({value:r,originalValue:s,label:a,path:e.path||o},h,e.params),v),n=new j(j.formatError(e.message||p,t),r,t.path,e.type||d);return n.params=t,n}var y=W({path:o,parent:g,type:d,createError:b,resolve:v,options:u,originalValue:s},l);if(c){var _;try{var w;if("function"===typeof(null==(w=_=f.call(y,r,y))?void 0:w.then))throw new Error('Validation test of type: "'.concat(y.type,'" returned a Promise during a synchronous validate. ')+"This test will finish after the validate call has returned")}catch(S){return void n(S)}j.isError(_)?n(_):_?n(null,_):n(b())}else try{Promise.resolve(f.call(y,r,y)).then((function(e){j.isError(e)?n(e):e?n(null,e):n(b())}))}catch(S){n(S)}}return t.OPTIONS=e,t}V.prototype.__isYupRef=!0;var q=function(e){return e.substr(0,e.length-1).substr(1)};function Y(e,t,n){var r,i,o,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;return t?(Object(U.forEach)(t,(function(u,s,c){var l=s?q(u):u;if((e=e.resolve({context:a,parent:r,value:n})).innerType){var d=c?parseInt(l,10):0;if(n&&d>=n.length)throw new Error("Yup.reach cannot resolve an array item at index: ".concat(u,", in the path: ").concat(t,". ")+"because there is no value at that index. ");r=n,n=n&&n[d],e=e.innerType}if(!c){if(!e.fields||!e.fields[l])throw new Error("The schema does not contain the path: ".concat(t,". ")+"(failed at: ".concat(o,' which is a type: "').concat(e._type,'")'));r=n,n=n&&n[l],e=e.fields[l]}i=l,o=s?"["+u+"]":"."+u})),{schema:e,parent:r,parentPath:i}):{parent:r,parentPath:t,schema:e}}var K=n(2),Q=n(23),Z=function(){function e(){Object(a.a)(this,e),this.list=new Set,this.refs=new Map}return Object(u.a)(e,[{key:"size",get:function(){return this.list.size+this.refs.size}},{key:"describe",value:function(){var e,t=[],n=Object(Q.a)(this.list);try{for(n.s();!(e=n.n()).done;){var r=e.value;t.push(r)}}catch(u){n.e(u)}finally{n.f()}var i,o=Object(Q.a)(this.refs);try{for(o.s();!(i=o.n()).done;){var a=Object(K.a)(i.value,2)[1];t.push(a.describe())}}catch(u){o.e(u)}finally{o.f()}return t}},{key:"toArray",value:function(){return Array.from(this.list).concat(Array.from(this.refs.values()))}},{key:"add",value:function(e){V.isRef(e)?this.refs.set(e.key,e):this.list.add(e)}},{key:"delete",value:function(e){V.isRef(e)?this.refs.delete(e.key):this.list.delete(e)}},{key:"has",value:function(e,t){if(this.list.has(e))return!0;for(var n,r=this.refs.values();!(n=r.next()).done;)if(t(n.value)===e)return!0;return!1}},{key:"clone",value:function(){var t=new e;return t.list=new Set(this.list),t.refs=new Map(this.refs),t}},{key:"merge",value:function(e,t){var n=this.clone();return e.list.forEach((function(e){return n.add(e)})),e.refs.forEach((function(e){return n.add(e)})),t.list.forEach((function(e){return n.delete(e)})),t.refs.forEach((function(e){return n.delete(e)})),n}}]),e}();function X(){return(X=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},n=this.resolve(X({value:e},t)),r=n._cast(e,t);if(void 0!==e&&!1!==t.assert&&!0!==n.isType(r)){var i=v(e),o=v(r);throw new TypeError("The value of ".concat(t.path||"field"," could not be cast to a value ")+'that satisfies the schema type: "'.concat(n._type,'". \n\n')+"attempted value: ".concat(i," \n")+(o!==i?"result of cast: ".concat(o):""))}return r}},{key:"_cast",value:function(e,t){var n=this,r=void 0===e?e:this.transforms.reduce((function(t,r){return r.call(n,t,e,n)}),e);return void 0===r&&(r=this.getDefault()),r}},{key:"_validate",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,i=n.sync,o=n.path,a=n.from,u=void 0===a?[]:a,s=n.originalValue,c=void 0===s?e:s,l=n.strict,d=void 0===l?this.spec.strict:l,f=n.abortEarly,h=void 0===f?this.spec.abortEarly:f,p=e;d||(p=this._cast(p,X({assert:!1},n)));var g={value:p,path:o,options:n,originalValue:c,schema:this,label:this.spec.label,sync:i,from:u},m=[];this._typeError&&m.push(this._typeError),this._whitelistError&&m.push(this._whitelistError),this._blacklistError&&m.push(this._blacklistError),D({args:g,value:p,path:o,sync:i,tests:m,endEarly:h},(function(e){e?r(e,p):D({tests:t.tests,args:g,path:o,sync:i,value:p,endEarly:h},r)}))}},{key:"validate",value:function(e,t,n){var r=this.resolve(X({},t,{value:e}));return"function"===typeof n?r._validate(e,t,n):new Promise((function(n,i){return r._validate(e,t,(function(e,t){e?i(e):n(t)}))}))}},{key:"validateSync",value:function(e,t){var n;return this.resolve(X({},t,{value:e}))._validate(e,X({},t,{sync:!0}),(function(e,t){if(e)throw e;n=t})),n}},{key:"isValid",value:function(e,t){return this.validate(e,t).then((function(){return!0}),(function(e){if(j.isError(e))return!1;throw e}))}},{key:"isValidSync",value:function(e,t){try{return this.validateSync(e,t),!0}catch(n){if(j.isError(n))return!1;throw n}}},{key:"_getDefault",value:function(){var e=this.spec.default;return null==e?e:"function"===typeof e?e.call(this):c(e)}},{key:"getDefault",value:function(e){return this.resolve(e||{})._getDefault()}},{key:"default",value:function(e){if(0===arguments.length)return this._getDefault();var t=this.clone({default:e});return t}},{key:"strict",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.clone();return t.spec.strict=e,t}},{key:"_isPresent",value:function(e){return null!=e}},{key:"defined",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:b.defined;return this.test({message:e,name:"defined",exclusive:!0,test:function(e){return void 0!==e}})}},{key:"required",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:b.required;return this.clone({presence:"required"}).withMutation((function(t){return t.test({message:e,name:"required",exclusive:!0,test:function(e){return this.schema._isPresent(e)}})}))}},{key:"notRequired",value:function(){var e=this.clone({presence:"optional"});return e.tests=e.tests.filter((function(e){return"required"!==e.OPTIONS.name})),e}},{key:"nullable",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.clone({nullable:!1!==e});return t}},{key:"transform",value:function(e){var t=this.clone();return t.transforms.push(e),t}},{key:"test",value:function(){var e;if(void 0===(e=1===arguments.length?"function"===typeof(arguments.length<=0?void 0:arguments[0])?{test:arguments.length<=0?void 0:arguments[0]}:arguments.length<=0?void 0:arguments[0]:2===arguments.length?{name:arguments.length<=0?void 0:arguments[0],test:arguments.length<=1?void 0:arguments[1]}:{name:arguments.length<=0?void 0:arguments[0],message:arguments.length<=1?void 0:arguments[1],test:arguments.length<=2?void 0:arguments[2]}).message&&(e.message=b.default),"function"!==typeof e.test)throw new TypeError("`test` is a required parameters");var t=this.clone(),n=G(e),r=e.exclusive||e.name&&!0===t.exclusiveTests[e.name];if(e.exclusive&&!e.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return e.name&&(t.exclusiveTests[e.name]=!!e.exclusive),t.tests=t.tests.filter((function(t){if(t.OPTIONS.name===e.name){if(r)return!1;if(t.OPTIONS.test===n.OPTIONS.test)return!1}return!0})),t.tests.push(n),t}},{key:"when",value:function(e,t){Array.isArray(e)||"string"===typeof e||(t=e,e=".");var n=this.clone(),r=P(e).map((function(e){return new V(e)}));return r.forEach((function(e){e.isSibling&&n.deps.push(e.key)})),n.conditions.push(new C(r,t)),n}},{key:"typeError",value:function(e){var t=this.clone();return t._typeError=G({message:e,name:"typeError",test:function(e){return!(void 0!==e&&!this.schema.isType(e))||this.createError({params:{type:this.schema._type}})}}),t}},{key:"oneOf",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b.oneOf,n=this.clone();return e.forEach((function(e){n._whitelist.add(e),n._blacklist.delete(e)})),n._whitelistError=G({message:t,name:"oneOf",test:function(e){if(void 0===e)return!0;var t=this.schema._whitelist;return!!t.has(e,this.resolve)||this.createError({params:{values:t.toArray().join(", ")}})}}),n}},{key:"notOneOf",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b.notOneOf,n=this.clone();return e.forEach((function(e){n._blacklist.add(e),n._whitelist.delete(e)})),n._blacklistError=G({message:t,name:"notOneOf",test:function(e){var t=this.schema._blacklist;return!t.has(e,this.resolve)||this.createError({params:{values:t.toArray().join(", ")}})}}),n}},{key:"strip",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.clone();return t.spec.strip=e,t}},{key:"describe",value:function(){var e=this.clone(),t=e.spec,n=t.label;return{meta:t.meta,label:n,type:e.type,oneOf:e._whitelist.describe(),notOneOf:e._blacklist.describe(),tests:e.tests.map((function(e){return{name:e.OPTIONS.name,params:e.OPTIONS.params}})).filter((function(e,t,n){return n.findIndex((function(t){return t.name===e.name}))===t}))}}}]),e}();J.prototype.__isYupSchema__=!0;for(var ee=function(){var e=ne[te];J.prototype["".concat(e,"At")]=function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=Y(this,t,n,r.context),o=i.parent,a=i.parentPath,u=i.schema;return u[e](o&&o[a],X({},r,{parent:o,path:t}))}},te=0,ne=["validate","validateSync"];te0&&void 0!==arguments[0]?arguments[0]:S.isValue;return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"true"},test:function(e){return de(e)||!0===e}})}},{key:"isFalse",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:S.isValue;return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"false"},test:function(e){return de(e)||!1===e}})}}]),n}(J);fe.prototype=he.prototype;var pe=n(58),ge=n(47),me=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,ve=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,be=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,ye=function(e){return de(e)||e===e.trim()},_e={}.toString();function we(){return new Se}var Se=function(e){Object(A.a)(n,e);var t=Object(M.a)(n);function n(){var e;return Object(a.a)(this,n),(e=t.call(this,{type:"string"})).withMutation((function(){e.transform((function(e){if(this.isType(e))return e;if(Array.isArray(e))return e;var t=null!=e&&e.toString?e.toString():e;return t===_e?e:t}))})),e}return Object(u.a)(n,[{key:"_typeCheck",value:function(e){return e instanceof String&&(e=e.valueOf()),"string"===typeof e}},{key:"_isPresent",value:function(e){return Object(pe.a)(Object(ge.a)(n.prototype),"_isPresent",this).call(this,e)&&!!e.length}},{key:"length",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:y.length;return this.test({message:t,name:"length",exclusive:!0,params:{length:e},test:function(t){return de(t)||t.length===this.resolve(e)}})}},{key:"min",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:y.min;return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test:function(t){return de(t)||t.length>=this.resolve(e)}})}},{key:"max",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:y.max;return this.test({name:"max",exclusive:!0,message:t,params:{max:e},test:function(t){return de(t)||t.length<=this.resolve(e)}})}},{key:"matches",value:function(e,t){var n,r,i=!1;if(t)if("object"===typeof t){var o=t.excludeEmptyString;i=void 0!==o&&o,n=t.message,r=t.name}else n=t;return this.test({name:r||"matches",message:n||y.matches,params:{regex:e},test:function(t){return de(t)||""===t&&i||-1!==t.search(e)}})}},{key:"email",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y.email;return this.matches(me,{name:"email",message:e,excludeEmptyString:!0})}},{key:"url",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y.url;return this.matches(ve,{name:"url",message:e,excludeEmptyString:!0})}},{key:"uuid",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y.uuid;return this.matches(be,{name:"uuid",message:e,excludeEmptyString:!1})}},{key:"ensure",value:function(){return this.default("").transform((function(e){return null===e?"":e}))}},{key:"trim",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y.trim;return this.transform((function(e){return null!=e?e.trim():e})).test({message:e,name:"trim",test:ye})}},{key:"lowercase",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y.lowercase;return this.transform((function(e){return de(e)?e:e.toLowerCase()})).test({message:e,name:"string_case",exclusive:!0,test:function(e){return de(e)||e===e.toLowerCase()}})}},{key:"uppercase",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y.uppercase;return this.transform((function(e){return de(e)?e:e.toUpperCase()})).test({message:e,name:"string_case",exclusive:!0,test:function(e){return de(e)||e===e.toUpperCase()}})}}]),n}(J);we.prototype=Se.prototype;function Oe(){return new $e}var $e=function(e){Object(A.a)(n,e);var t=Object(M.a)(n);function n(){var e;return Object(a.a)(this,n),(e=t.call(this,{type:"number"})).withMutation((function(){e.transform((function(e){var t=e;if("string"===typeof t){if(""===(t=t.replace(/\s/g,"")))return NaN;t=+t}return this.isType(t)?t:parseFloat(t)}))})),e}return Object(u.a)(n,[{key:"_typeCheck",value:function(e){return e instanceof Number&&(e=e.valueOf()),"number"===typeof e&&!function(e){return e!=+e}(e)}},{key:"min",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_.min;return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test:function(t){return de(t)||t>=this.resolve(e)}})}},{key:"max",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_.max;return this.test({message:t,name:"max",exclusive:!0,params:{max:e},test:function(t){return de(t)||t<=this.resolve(e)}})}},{key:"lessThan",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_.lessThan;return this.test({message:t,name:"max",exclusive:!0,params:{less:e},test:function(t){return de(t)||t1&&void 0!==arguments[1]?arguments[1]:_.moreThan;return this.test({message:t,name:"min",exclusive:!0,params:{more:e},test:function(t){return de(t)||t>this.resolve(e)}})}},{key:"positive",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_.positive;return this.moreThan(0,e)}},{key:"negative",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_.negative;return this.lessThan(0,e)}},{key:"integer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_.integer;return this.test({name:"integer",message:e,test:function(e){return de(e)||Number.isInteger(e)}})}},{key:"truncate",value:function(){return this.transform((function(e){return de(e)?e:0|e}))}},{key:"round",value:function(e){var t,n=["ceil","floor","round","trunc"];if("trunc"===(e=(null==(t=e)?void 0:t.toLowerCase())||"round"))return this.truncate();if(-1===n.indexOf(e.toLowerCase()))throw new TypeError("Only valid options for round() are: "+n.join(", "));return this.transform((function(t){return de(t)?t:Math[e](t)}))}}]),n}(J);Oe.prototype=$e.prototype;var xe=/^(\d{4}|[+\-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;var Ee=new Date("");function Te(){return new Ce}var Ce=function(e){Object(A.a)(n,e);var t=Object(M.a)(n);function n(){var e;return Object(a.a)(this,n),(e=t.call(this,{type:"date"})).withMutation((function(){e.transform((function(e){return this.isType(e)?e:(e=function(e){var t,n,r=[1,4,5,6,7,10,11],i=0;if(n=xe.exec(e)){for(var o,a=0;o=r[a];++a)n[o]=+n[o]||0;n[2]=(+n[2]||1)-1,n[3]=+n[3]||1,n[7]=n[7]?String(n[7]).substr(0,3):0,void 0!==n[8]&&""!==n[8]||void 0!==n[9]&&""!==n[9]?("Z"!==n[8]&&void 0!==n[9]&&(i=60*n[10]+n[11],"+"===n[9]&&(i=0-i)),t=Date.UTC(n[1],n[2],n[3],n[4],n[5]+i,n[6],n[7])):t=+new Date(n[1],n[2],n[3],n[4],n[5],n[6],n[7])}else t=Date.parse?Date.parse(e):NaN;return t}(e),isNaN(e)?Ee:new Date(e))}))})),e}return Object(u.a)(n,[{key:"_typeCheck",value:function(e){return t=e,"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(e.getTime());var t}},{key:"prepareParam",value:function(e,t){var n;if(V.isRef(e))n=e;else{var r=this.cast(e);if(!this._typeCheck(r))throw new TypeError("`".concat(t,"` must be a Date or a value that can be `cast()` to a Date"));n=r}return n}},{key:"min",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:w.min,n=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test:function(e){return de(e)||e>=this.resolve(n)}})}},{key:"max",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:w.max,n=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},test:function(e){return de(e)||e<=this.resolve(n)}})}}]),n}(J);Ce.INVALID_DATE=Ee,Te.prototype=Ce.prototype,Te.INVALID_DATE=Ee;var Ne=n(325),Ae=n.n(Ne),Me=n(432),ke=n.n(Me),Pe=n(433),Ie=n.n(Pe),Re=n(434),je=n.n(Re);function De(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[],r=[];function i(e,i){var o=Object(U.split)(e)[0];~r.indexOf(o)||r.push(o),~t.indexOf("".concat(i,"-").concat(o))||n.push([i,o])}var o=function(t){if(E()(e,t)){var n=e[t];~r.indexOf(t)||r.push(t),V.isRef(n)&&n.isSibling?i(n.path,t):T(n)&&"deps"in n&&n.deps.forEach((function(e){return i(e,t)}))}};for(var a in e)o(a);return je.a.array(r,n).reverse()}function Le(e,t){var n=1/0;return e.some((function(e,r){var i;if(-1!==(null==(i=t.path)?void 0:i.indexOf(e)))return n=r,!0})),n}function Fe(e){return function(t,n){return Le(e,t)-Le(e,n)}}function Ue(){return(Ue=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},o=Object(pe.a)(Object(ge.a)(n.prototype),"_cast",this).call(this,e,i);if(void 0===o)return this.getDefault();if(!this._typeCheck(o))return o;var a,u=this.fields,s=null!=(t=i.stripUnknown)?t:this.spec.noUnknown,c=this._nodes.concat(Object.keys(o).filter((function(e){return-1===r._nodes.indexOf(e)}))),l={},d=Ue({},i,{parent:l,__validating:i.__validating||!1}),f=!1,h=Object(Q.a)(c);try{for(h.s();!(a=h.n()).done;){var p=a.value,g=u[p],m=E()(o,p);if(g){var v=void 0,b=o[p];d.path=(i.path?"".concat(i.path,"."):"")+p;var y="spec"in(g=g.resolve({value:b,context:i.context,parent:l}))?g.spec:void 0,_=null==y?void 0:y.strict;if(null==y?void 0:y.strip){f=f||p in o;continue}void 0!==(v=i.__validating&&_?o[p]:g.cast(o[p],d))&&(l[p]=v)}else m&&!s&&(l[p]=o[p]);l[p]!==o[p]&&(f=!0)}}catch(w){h.e(w)}finally{h.f()}return f?l:o}},{key:"_validate",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0,a=[],u=r.sync,s=r.from,c=void 0===s?[]:s,l=r.originalValue,d=void 0===l?e:l,f=r.abortEarly,h=void 0===f?this.spec.abortEarly:f,p=r.recursive,g=void 0===p?this.spec.recursive:p;c=[{schema:this,value:d}].concat(Object(o.a)(c)),r.__validating=!0,r.originalValue=d,r.from=c,Object(pe.a)(Object(ge.a)(n.prototype),"_validate",this).call(this,e,r,(function(e,n){if(e){if(!j.isError(e)||h)return void i(e,n);a.push(e)}if(g&&Be(n)){d=d||n;var o=t._nodes.map((function(e){return function(i,o){var a=-1===e.indexOf(".")?(r.path?"".concat(r.path,"."):"")+e:"".concat(r.path||"",'["').concat(e,'"]'),u=t.fields[e];u&&"validate"in u?u.validate(n[e],Ue({},r,{path:a,from:c,strict:!0,parent:n,originalValue:d[e]}),o):o(null)}}));D({sync:u,tests:o,value:n,errors:a,endEarly:h,sort:t._sortErrors,path:r.path},i)}else i(a[0]||null,n)}))}},{key:"clone",value:function(e){var t=Object(pe.a)(Object(ge.a)(n.prototype),"clone",this).call(this,e);return t.fields=Ue({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}},{key:"concat",value:function(e){for(var t=Object(pe.a)(Object(ge.a)(n.prototype),"concat",this).call(this,e),r=t.fields,i=0,o=Object.entries(this.fields);i1&&void 0!==arguments[1]?arguments[1]:[],n=this.clone(),r=Object.assign(n.fields,e);if(n.fields=r,n._sortErrors=Fe(Object.keys(r)),t.length){Array.isArray(t[0])||(t=[t]);var i=t.map((function(e){var t=Object(K.a)(e,2),n=t[0],r=t[1];return"".concat(n,"-").concat(r)}));n._excludedEdges=n._excludedEdges.concat(i)}return n._nodes=De(r,n._excludedEdges),n}},{key:"pick",value:function(e){var t,n={},r=Object(Q.a)(e);try{for(r.s();!(t=r.n()).done;){var i=t.value;this.fields[i]&&(n[i]=this.fields[i])}}catch(o){r.e(o)}finally{r.f()}return this.clone().withMutation((function(e){return e.fields={},e.shape(n)}))}},{key:"omit",value:function(e){var t=this.clone(),n=t.fields;t.fields={};var r,i=Object(Q.a)(e);try{for(i.s();!(r=i.n()).done;){var o=r.value;delete n[o]}}catch(a){i.e(a)}finally{i.f()}return t.withMutation((function(){return t.shape(n)}))}},{key:"from",value:function(e,t,n){var r=Object(U.getter)(e,!0);return this.transform((function(i){if(null==i)return i;var o=i;return E()(i,e)&&(o=Ue({},i),n||delete o[e],o[t]=r(i)),o}))}},{key:"noUnknown",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:O.noUnknown;"string"===typeof e&&(t=e,e=!0);var n=this.test({name:"noUnknown",exclusive:!0,message:t,test:function(t){if(null==t)return!0;var n=ze(this.schema,t);return!e||0===n.length||this.createError({params:{unknown:n.join(", ")}})}});return n.spec.noUnknown=e,n}},{key:"unknown",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:O.noUnknown;return this.noUnknown(!e,t)}},{key:"transformKeys",value:function(e){return this.transform((function(t){return t&&Ie()(t,(function(t,n){return e(n)}))}))}},{key:"camelCase",value:function(){return this.transformKeys(ke.a)}},{key:"snakeCase",value:function(){return this.transformKeys(Ae.a)}},{key:"constantCase",value:function(){return this.transformKeys((function(e){return Ae()(e).toUpperCase()}))}},{key:"describe",value:function(){var e=Object(pe.a)(Object(ge.a)(n.prototype),"describe",this).call(this);return e.fields=F()(this.fields,(function(e){return e.describe()})),e}}]),n}(J);function We(e){return new Ve(e)}function Ge(){return(Ge=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2?arguments[2]:void 0,u=[],s=o.sync,c=o.path,l=this.innerType,d=null!=(t=o.abortEarly)?t:this.spec.abortEarly,f=null!=(r=o.recursive)?r:this.spec.recursive,h=null!=o.originalValue?o.originalValue:e;Object(pe.a)(Object(ge.a)(n.prototype),"_validate",this).call(this,e,o,(function(e,t){if(e){if(!j.isError(e)||d)return void a(e,t);u.push(e)}if(f&&l&&i._typeCheck(t)){h=h||t;for(var n=new Array(t.length),r=function(e){var r=t[e],i="".concat(o.path||"","[").concat(e,"]"),a=Ge({},o,{path:i,strict:!0,parent:t,index:e,originalValue:h[e]});n[e]=function(e,t){return l.validate(r,a,t)}},p=0;p1&&void 0!==arguments[1]?arguments[1]:$.length;return this.test({message:t,name:"length",exclusive:!0,params:{length:e},test:function(t){return de(t)||t.length===this.resolve(e)}})}},{key:"min",value:function(e,t){return t=t||$.min,this.test({message:t,name:"min",exclusive:!0,params:{min:e},test:function(t){return de(t)||t.length>=this.resolve(e)}})}},{key:"max",value:function(e,t){return t=t||$.max,this.test({message:t,name:"max",exclusive:!0,params:{max:e},test:function(t){return de(t)||t.length<=this.resolve(e)}})}},{key:"ensure",value:function(){var e=this;return this.default((function(){return[]})).transform((function(t,n){return e._typeCheck(t)?t:null==n?[]:[].concat(n)}))}},{key:"compact",value:function(e){var t=e?function(t,n,r){return!e(t,n,r)}:function(e){return!!e};return this.transform((function(e){return null!=e?e.filter(t):e}))}},{key:"describe",value:function(){var e=Object(pe.a)(Object(ge.a)(n.prototype),"describe",this).call(this);return this.innerType&&(e.innerType=this.innerType.describe()),e}},{key:"nullable",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return Object(pe.a)(Object(ge.a)(n.prototype),"nullable",this).call(this,e)}},{key:"defined",value:function(){return Object(pe.a)(Object(ge.a)(n.prototype),"defined",this).call(this)}},{key:"required",value:function(e){return Object(pe.a)(Object(ge.a)(n.prototype),"required",this).call(this,e)}}]),n}(J);function Ke(e){return new Qe(e)}qe.prototype=Ye.prototype;var Qe=function(){function e(t){var n=this;Object(a.a)(this,e),this.type="lazy",this.__isYupSchema__=!0,this._resolve=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.builder(e,t);if(!T(r))throw new TypeError("lazy() functions must return a valid schema");return r.resolve(t)},this.builder=t}return Object(u.a)(e,[{key:"resolve",value:function(e){return this._resolve(e.value,e)}},{key:"cast",value:function(e,t){return this._resolve(e,t).cast(e,t)}},{key:"validate",value:function(e,t,n){return this._resolve(e,t).validate(e,t,n)}},{key:"validateSync",value:function(e,t){return this._resolve(e,t).validateSync(e,t)}},{key:"validateAt",value:function(e,t,n){return this._resolve(t,n).validateAt(e,t,n)}},{key:"validateSyncAt",value:function(e,t,n){return this._resolve(t,n).validateSyncAt(e,t,n)}},{key:"describe",value:function(){return null}},{key:"isValid",value:function(e,t){return this._resolve(e,t).isValid(e,t)}},{key:"isValidSync",value:function(e,t){return this._resolve(e,t).isValidSync(e,t)}}]),e}()},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t0&&(c=new a.b({graphQLErrors:s})),e=Object(i.a)(Object(i.a)({},e),{loading:r,networkStatus:u,error:c,called:!0}),r){var d=this.previousData.result&&this.previousData.result.data;e.data=d&&l?Object(i.a)(Object(i.a)({},d),l):d||l}else if(c)Object.assign(e,{data:(this.currentObservable.query.getLastResult()||{}).data});else{var f=this.currentObservable.query.options.fetchPolicy;if(t.partialRefetch&&!l&&o&&"cache-only"!==f)return Object.assign(e,{loading:!0,networkStatus:a.c.loading}),e.refetch(),e;e.data=l}}return e.client=this.client,this.previousData.loading=this.previousData.result&&this.previousData.result.loading||!1,this.previousData.result=e,this.currentObservable.query&&this.currentObservable.query.resetQueryStoreErrors(),e},t.prototype.handleErrorOrCompleted=function(){if(this.currentObservable.query&&this.previousData.result){var e=this.previousData.result,t=e.data,n=e.loading,r=e.error;if(!n){var i=this.getOptions(),o=i.query,a=i.variables,s=i.onCompleted,c=i.onError;if(this.previousOptions&&!this.previousData.loading&&Object(u.a)(this.previousOptions.query,o)&&Object(u.a)(this.previousOptions.variables,a))return;s&&!r?s(t):c&&r&&c(r)}}},t.prototype.removeQuerySubscription=function(){this.currentObservable.subscription&&(this.currentObservable.subscription.unsubscribe(),delete this.currentObservable.subscription)},t.prototype.observableQueryFields=function(){return{variables:this.currentObservable.query.variables,refetch:this.obsRefetch,fetchMore:this.obsFetchMore,updateQuery:this.obsUpdateQuery,startPolling:this.obsStartPolling,stopPolling:this.obsStopPolling,subscribeToMore:this.obsSubscribeToMore}},t}(c);function d(e,t,n){void 0===n&&(n=!1);var a=Object(o.useContext)(Object(r.c)()),s=Object(o.useReducer)((function(e){return e+1}),0),c=s[0],d=s[1],f=t?Object(i.a)(Object(i.a)({},t),{query:e}):{query:e},h=Object(o.useRef)(),p=h.current||new l({options:f,context:a,onNewData:function(){p.ssrInitiated()?d():Promise.resolve().then(d)}});p.setOptions(f),p.context=a,p.ssrInitiated()&&!h.current&&(h.current=p);var g=function(e,t){var n=Object(o.useRef)();return n.current&&Object(u.a)(t,n.current.key)||(n.current={key:t,value:e()}),n.current.value}((function(){return n?p.executeLazy():p.execute()}),{options:Object(i.a)(Object(i.a)({},f),{onError:void 0,onCompleted:void 0}),context:a,tick:c}),m=n?g[1]:g;return Object(o.useEffect)((function(){return h.current||(h.current=p),function(){return p.cleanup()}}),[]),Object(o.useEffect)((function(){return p.afterExecute({lazy:n})}),[m.loading,m.networkStatus,m.error,m.data]),g}function f(e,t){return d(e,t,!1)}function h(e,t){return d(e,t,!0)}var p=function(e){function t(t){var n=t.options,i=t.context,o=t.result,a=t.setResult,u=e.call(this,n,i)||this;return u.runMutation=function(e){void 0===e&&(e={}),u.onMutationStart();var t=u.generateNewMutationId();return u.mutate(e).then((function(e){return u.onMutationCompleted(e,t),e})).catch((function(e){if(u.onMutationError(e,t),!u.getOptions().onError)throw e}))},u.verifyDocumentType(n.mutation,r.b.Mutation),u.result=o,u.setResult=a,u.mostRecentMutationId=0,u}return Object(i.c)(t,e),t.prototype.execute=function(e){return this.isMounted=!0,this.verifyDocumentType(this.getOptions().mutation,r.b.Mutation),e.client=this.refreshClient().client,[this.runMutation,e]},t.prototype.afterExecute=function(){return this.isMounted=!0,this.unmount.bind(this)},t.prototype.cleanup=function(){},t.prototype.mutate=function(e){var t=this.getOptions(),n=t.mutation,r=t.variables,o=t.optimisticResponse,a=t.update,u=t.context,s=void 0===u?{}:u,c=t.awaitRefetchQueries,l=void 0!==c&&c,d=t.fetchPolicy,f=Object(i.a)({},e),h=Object.assign({},r,f.variables);return delete f.variables,this.refreshClient().client.mutate(Object(i.a)({mutation:n,optimisticResponse:o,refetchQueries:f.refetchQueries||this.getOptions().refetchQueries,awaitRefetchQueries:l,update:a,context:s,fetchPolicy:d,variables:h},f))},t.prototype.onMutationStart=function(){this.result.loading||this.getOptions().ignoreResults||this.updateResult({loading:!0,error:void 0,data:void 0,called:!0})},t.prototype.onMutationCompleted=function(e,t){var n=this.getOptions(),r=n.onCompleted,i=n.ignoreResults,o=e.data,u=e.errors,s=u&&u.length>0?new a.b({graphQLErrors:u}):void 0;this.isMostRecentMutation(t)&&!i&&this.updateResult({called:!0,loading:!1,data:o,error:s}),r&&r(o)},t.prototype.onMutationError=function(e,t){var n=this.getOptions().onError;this.isMostRecentMutation(t)&&this.updateResult({loading:!1,error:e,data:void 0,called:!0}),n&&n(e)},t.prototype.generateNewMutationId=function(){return++this.mostRecentMutationId},t.prototype.isMostRecentMutation=function(e){return this.mostRecentMutationId===e},t.prototype.updateResult=function(e){!this.isMounted||this.previousResult&&Object(u.a)(this.previousResult,e)||(this.setResult(e),this.previousResult=e)},t}(c);function g(e,t){var n=Object(o.useContext)(Object(r.c)()),a=Object(o.useState)({called:!1,loading:!1}),u=a[0],s=a[1],c=t?Object(i.a)(Object(i.a)({},t),{mutation:e}):{mutation:e},l=Object(o.useRef)();var d=(l.current||(l.current=new p({options:c,context:n,result:u,setResult:s})),l.current);return d.setOptions(c),d.context=n,Object(o.useEffect)((function(){return d.afterExecute()})),d.execute(u)}!function(e){function t(t){var n=t.options,r=t.context,i=t.setResult,o=e.call(this,n,r)||this;return o.currentObservable={},o.setResult=i,o.initialize(n),o}Object(i.c)(t,e),t.prototype.execute=function(e){if(!0===this.getOptions().skip)return this.cleanup(),{loading:!1,error:void 0,data:void 0,variables:this.getOptions().variables};var t=e;this.refreshClient().isNew&&(t=this.getLoadingResult());var n=this.getOptions().shouldResubscribe;return"function"===typeof n&&(n=!!n(this.getOptions())),!1!==n&&this.previousOptions&&Object.keys(this.previousOptions).length>0&&(this.previousOptions.subscription!==this.getOptions().subscription||!Object(u.a)(this.previousOptions.variables,this.getOptions().variables)||this.previousOptions.skip!==this.getOptions().skip)&&(this.cleanup(),t=this.getLoadingResult()),this.initialize(this.getOptions()),this.startSubscription(),this.previousOptions=this.getOptions(),Object(i.a)(Object(i.a)({},t),{variables:this.getOptions().variables})},t.prototype.afterExecute=function(){this.isMounted=!0},t.prototype.cleanup=function(){this.endSubscription(),delete this.currentObservable.query},t.prototype.initialize=function(e){this.currentObservable.query||!0===this.getOptions().skip||(this.currentObservable.query=this.refreshClient().client.subscribe({query:e.subscription,variables:e.variables,fetchPolicy:e.fetchPolicy}))},t.prototype.startSubscription=function(){this.currentObservable.subscription||(this.currentObservable.subscription=this.currentObservable.query.subscribe({next:this.updateCurrentData.bind(this),error:this.updateError.bind(this),complete:this.completeSubscription.bind(this)}))},t.prototype.getLoadingResult=function(){return{loading:!0,error:void 0,data:void 0}},t.prototype.updateResult=function(e){this.isMounted&&this.setResult(e)},t.prototype.updateCurrentData=function(e){var t=this.getOptions().onSubscriptionData;this.updateResult({data:e.data,loading:!1,error:void 0}),t&&t({client:this.refreshClient().client,subscriptionData:e})},t.prototype.updateError=function(e){this.updateResult({error:e,loading:!1})},t.prototype.completeSubscription=function(){var e=this.getOptions().onSubscriptionComplete;e&&e(),this.endSubscription()},t.prototype.endSubscription=function(){this.currentObservable.subscription&&(this.currentObservable.subscription.unsubscribe(),delete this.currentObservable.subscription)}}(c);!function(){function e(){this.queryPromises=new Map,this.queryInfoTrie=new Map}e.prototype.registerSSRObservable=function(e,t){this.lookupQueryInfo(t).observable=e},e.prototype.getSSRObservable=function(e){return this.lookupQueryInfo(e).observable},e.prototype.addQueryPromise=function(e,t){return this.lookupQueryInfo(e.getOptions()).seen?t():(this.queryPromises.set(e.getOptions(),new Promise((function(t){t(e.fetchData())}))),null)},e.prototype.hasPromises=function(){return this.queryPromises.size>0},e.prototype.consumeAndAwaitPromises=function(){var e=this,t=[];return this.queryPromises.forEach((function(n,r){e.lookupQueryInfo(r).seen=!0,t.push(n)})),this.queryPromises.clear(),Promise.all(t)},e.prototype.lookupQueryInfo=function(e){var t=this.queryInfoTrie,n=e.query,r=e.variables,i=t.get(n)||new Map;t.has(n)||t.set(n,i);var o=JSON.stringify(r),a=i.get(o)||{seen:!1,observable:null};return i.has(o)||i.set(o,a),a}}()},function(e,t,n){"use strict";function r(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}n.d(t,"a",(function(){return r}))},function(e,t,n){var r=n(789).parse;function i(e){return e.replace(/[\s,]+/g," ").trim()}var o={},a={};var u=!0;function s(e,t){var n=Object.prototype.toString.call(e);if("[object Array]"===n)return e.map((function(e){return s(e,t)}));if("[object Object]"!==n)throw new Error("Unexpected input.");t&&e.loc&&delete e.loc,e.loc&&(delete e.loc.startToken,delete e.loc.endToken);var r,i,o,a=Object.keys(e);for(r in a)a.hasOwnProperty(r)&&(i=e[a[r]],"[object Object]"!==(o=Object.prototype.toString.call(i))&&"[object Array]"!==o||(e[a[r]]=s(i,!0)));return e}var c=!1;function l(e){var t=i(e);if(o[t])return o[t];var n=r(e,{experimentalFragmentVariables:c});if(!n||"Document"!==n.kind)throw new Error("Not a valid GraphQL document.");return n=s(n=function(e){for(var t,n={},r=[],o=0;o-1};var F=function(e,t){var n=this.__data__,r=I(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function U(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991},Ye={};Ye["[object Float32Array]"]=Ye["[object Float64Array]"]=Ye["[object Int8Array]"]=Ye["[object Int16Array]"]=Ye["[object Int32Array]"]=Ye["[object Uint8Array]"]=Ye["[object Uint8ClampedArray]"]=Ye["[object Uint16Array]"]=Ye["[object Uint32Array]"]=!0,Ye["[object Arguments]"]=Ye["[object Array]"]=Ye["[object ArrayBuffer]"]=Ye["[object Boolean]"]=Ye["[object DataView]"]=Ye["[object Date]"]=Ye["[object Error]"]=Ye["[object Function]"]=Ye["[object Map]"]=Ye["[object Number]"]=Ye["[object Object]"]=Ye["[object RegExp]"]=Ye["[object Set]"]=Ye["[object String]"]=Ye["[object WeakMap]"]=!1;var Ke=function(e){return x(e)&&qe(e.length)&&!!Ye[S(e)]};var Qe=function(e){return function(t){return e(t)}},Ze=n(133),Xe=Ze.a&&Ze.a.isTypedArray,Je=Xe?Qe(Xe):Ke,et=Object.prototype.hasOwnProperty;var tt=function(e,t){var n=He(e),r=!n&&ze(e),i=!n&&!r&&Object(Ve.a)(e),o=!n&&!r&&!i&&Je(e),a=n||r||i||o,u=a?De(e.length,String):[],s=u.length;for(var c in e)!t&&!et.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Ge(c,s))||u.push(c);return u},nt=Object.prototype;var rt=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||nt)},it=O(Object.keys,Object),ot=Object.prototype.hasOwnProperty;var at=function(e){if(!rt(e))return it(e);var t=[];for(var n in Object(e))ot.call(e,n)&&"constructor"!=n&&t.push(n);return t};var ut=function(e){return null!=e&&qe(e.length)&&!q(e)};var st=function(e){return ut(e)?tt(e):at(e)};var ct=function(e,t){return e&&je(t,st(t),e)};var lt=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t},dt=Object.prototype.hasOwnProperty;var ft=function(e){if(!G(e))return lt(e);var t=rt(e),n=[];for(var r in e)("constructor"!=r||!t&&dt.call(e,r))&&n.push(r);return n};var ht=function(e){return ut(e)?tt(e,!0):ft(e)};var pt=function(e,t){return e&&je(t,ht(t),e)},gt=n(431);var mt=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n=0||(i[n]=e[n]);return i}function Un(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Bn=function(e){return Array.isArray(e)&&0===e.length},zn=function(e){return"function"===typeof e},Hn=function(e){return null!==e&&"object"===typeof e},Vn=function(e){return String(Math.floor(Number(e)))===e},Wn=function(e){return"[object String]"===Object.prototype.toString.call(e)},Gn=function(e){return 0===r.Children.count(e)},qn=function(e){return Hn(e)&&zn(e.then)};function Yn(e,t,n,r){void 0===r&&(r=0);for(var i=Mn(t);e&&r=0?[]:{}}}return(0===o?e:i)[a[o]]===n?e:(void 0===n?delete i[a[o]]:i[a[o]]=n,0===o&&void 0===n&&delete r[a[o]],r)}function Qn(e,t,n,r){void 0===n&&(n=new WeakMap),void 0===r&&(r={});for(var i=0,o=Object.keys(e);i=n.length)break;o=n[i++]}else{if((i=n.next()).done)break;o=i.value}var a=o;Yn(t,a.path)||(t=Kn(t,a.path,a.message))}}return t}(n)):t(n)}))}))}),[g.validationSchema]),T=Object(r.useCallback)((function(e,t){return new Promise((function(n){return n(w.current[e].validate(t))}))}),[]),C=Object(r.useCallback)((function(e){var t=Object.keys(w.current).filter((function(e){return zn(w.current[e].validate)})),n=t.length>0?t.map((function(t){return T(t,Yn(e,t))})):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(n).then((function(e){return e.reduce((function(e,n,r){return"DO_NOT_DELETE_YOU_WILL_BE_FIRED"===n||n&&(e=Kn(e,t[r],n)),e}),{})}))}),[T]),N=Object(r.useCallback)((function(e){return Promise.all([C(e),g.validationSchema?E(e):{},g.validate?x(e):{}]).then((function(e){var t=e[0],n=e[1],r=e[2];return d.all([t,n,r],{arrayMerge:ur})}))}),[g.validate,g.validationSchema,C,x,E]),A=cr((function(e){return void 0===e&&(e=O.values),Object(Pn.unstable_runWithPriority)(Pn.unstable_LowPriority,(function(){return N(e).then((function(e){return _.current&&$({type:"SET_ERRORS",payload:e}),e})).catch((function(e){0}))}))})),M=cr((function(e){return void 0===e&&(e=O.values),$({type:"SET_ISVALIDATING",payload:!0}),N(e).then((function(e){return _.current&&($({type:"SET_ISVALIDATING",payload:!1}),o()(O.errors,e)||$({type:"SET_ERRORS",payload:e})),e}))}));Object(r.useEffect)((function(){s&&!0===_.current&&o()(m.current,g.initialValues)&&A(m.current)}),[s,A]);var k=Object(r.useCallback)((function(e){var t=e&&e.values?e.values:m.current,n=e&&e.errors?e.errors:v.current?v.current:g.initialErrors||{},r=e&&e.touched?e.touched:b.current?b.current:g.initialTouched||{},i=e&&e.status?e.status:y.current?y.current:g.initialStatus;m.current=t,v.current=n,b.current=r,y.current=i;var o=function(){$({type:"RESET_FORM",payload:{isSubmitting:!!e&&!!e.isSubmitting,errors:n,touched:r,status:i,values:t,isValidating:!!e&&!!e.isValidating,submitCount:e&&e.submitCount&&"number"===typeof e.submitCount?e.submitCount:0}})};if(g.onReset){var a=g.onReset(O.values,Z);qn(a)?a.then(o):o()}else o()}),[g.initialErrors,g.initialStatus,g.initialTouched]);Object(r.useEffect)((function(){!0!==_.current||o()(m.current,g.initialValues)||(f&&(m.current=g.initialValues,k()),s&&A(m.current))}),[f,g.initialValues,k,s,A]),Object(r.useEffect)((function(){f&&!0===_.current&&!o()(v.current,g.initialErrors)&&(v.current=g.initialErrors||nr,$({type:"SET_ERRORS",payload:g.initialErrors||nr}))}),[f,g.initialErrors]),Object(r.useEffect)((function(){f&&!0===_.current&&!o()(b.current,g.initialTouched)&&(b.current=g.initialTouched||rr,$({type:"SET_TOUCHED",payload:g.initialTouched||rr}))}),[f,g.initialTouched]),Object(r.useEffect)((function(){f&&!0===_.current&&!o()(y.current,g.initialStatus)&&(y.current=g.initialStatus,$({type:"SET_STATUS",payload:g.initialStatus}))}),[f,g.initialStatus,g.initialTouched]);var P=cr((function(e){if(w.current[e]&&zn(w.current[e].validate)){var t=Yn(O.values,e),n=w.current[e].validate(t);return qn(n)?($({type:"SET_ISVALIDATING",payload:!0}),n.then((function(e){return e})).then((function(t){$({type:"SET_FIELD_ERROR",payload:{field:e,value:t}}),$({type:"SET_ISVALIDATING",payload:!1})}))):($({type:"SET_FIELD_ERROR",payload:{field:e,value:n}}),Promise.resolve(n))}return g.validationSchema?($({type:"SET_ISVALIDATING",payload:!0}),E(O.values,e).then((function(e){return e})).then((function(t){$({type:"SET_FIELD_ERROR",payload:{field:e,value:t[e]}}),$({type:"SET_ISVALIDATING",payload:!1})}))):Promise.resolve()})),I=Object(r.useCallback)((function(e,t){var n=t.validate;w.current[e]={validate:n}}),[]),R=Object(r.useCallback)((function(e){delete w.current[e]}),[]),j=cr((function(e,t){return $({type:"SET_TOUCHED",payload:e}),(void 0===t?a:t)?A(O.values):Promise.resolve()})),D=Object(r.useCallback)((function(e){$({type:"SET_ERRORS",payload:e})}),[]),L=cr((function(e,t){var r=zn(e)?e(O.values):e;return $({type:"SET_VALUES",payload:r}),(void 0===t?n:t)?A(r):Promise.resolve()})),F=Object(r.useCallback)((function(e,t){$({type:"SET_FIELD_ERROR",payload:{field:e,value:t}})}),[]),U=cr((function(e,t,r){return $({type:"SET_FIELD_VALUE",payload:{field:e,value:t}}),(void 0===r?n:r)?A(Kn(O.values,e,t)):Promise.resolve()})),B=Object(r.useCallback)((function(e,t){var n,r=t,i=e;if(!Wn(e)){e.persist&&e.persist();var o=e.target?e.target:e.currentTarget,a=o.type,u=o.name,s=o.id,c=o.value,l=o.checked,d=(o.outerHTML,o.options),f=o.multiple;r=t||(u||s),i=/number|range/.test(a)?(n=parseFloat(c),isNaN(n)?"":n):/checkbox/.test(a)?function(e,t,n){if("boolean"===typeof e)return Boolean(t);var r=[],i=!1,o=-1;if(Array.isArray(e))r=e,i=(o=e.indexOf(n))>=0;else if(!n||"true"==n||"false"==n)return Boolean(t);if(t&&n&&!i)return r.concat(n);if(!i)return r;return r.slice(0,o).concat(r.slice(o+1))}(Yn(O.values,r),l,c):f?function(e){return Array.from(e).filter((function(e){return e.selected})).map((function(e){return e.value}))}(d):c}r&&U(r,i)}),[U,O.values]),z=cr((function(e){if(Wn(e))return function(t){return B(t,e)};B(e)})),H=cr((function(e,t,n){return void 0===t&&(t=!0),$({type:"SET_FIELD_TOUCHED",payload:{field:e,value:t}}),(void 0===n?a:n)?A(O.values):Promise.resolve()})),V=Object(r.useCallback)((function(e,t){e.persist&&e.persist();var n=e.target,r=n.name,i=n.id,o=(n.outerHTML,t||(r||i));H(o,!0)}),[H]),W=cr((function(e){if(Wn(e))return function(t){return V(t,e)};V(e)})),G=Object(r.useCallback)((function(e){zn(e)?$({type:"SET_FORMIK_STATE",payload:e}):$({type:"SET_FORMIK_STATE",payload:function(){return e}})}),[]),q=Object(r.useCallback)((function(e){$({type:"SET_STATUS",payload:e})}),[]),Y=Object(r.useCallback)((function(e){$({type:"SET_ISSUBMITTING",payload:e})}),[]),K=cr((function(){return $({type:"SUBMIT_ATTEMPT"}),M().then((function(e){var t=e instanceof Error;if(!t&&0===Object.keys(e).length){var n;try{if(void 0===(n=X()))return}catch(r){throw r}return Promise.resolve(n).then((function(e){return _.current&&$({type:"SUBMIT_SUCCESS"}),e})).catch((function(e){if(_.current)throw $({type:"SUBMIT_FAILURE"}),e}))}if(_.current&&($({type:"SUBMIT_FAILURE"}),t))throw e}))})),Q=cr((function(e){e&&e.preventDefault&&zn(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&zn(e.stopPropagation)&&e.stopPropagation(),K().catch((function(e){console.warn("Warning: An unhandled error was caught from submitForm()",e)}))})),Z={resetForm:k,validateForm:M,validateField:P,setErrors:D,setFieldError:F,setFieldTouched:H,setFieldValue:U,setStatus:q,setSubmitting:Y,setTouched:j,setValues:L,setFormikState:G,submitForm:K},X=cr((function(){return h(O.values,Z)})),J=cr((function(e){e&&e.preventDefault&&zn(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&zn(e.stopPropagation)&&e.stopPropagation(),k()})),ee=Object(r.useCallback)((function(e){return{value:Yn(O.values,e),error:Yn(O.errors,e),touched:!!Yn(O.touched,e),initialValue:Yn(m.current,e),initialTouched:!!Yn(b.current,e),initialError:Yn(v.current,e)}}),[O.errors,O.touched,O.values]),te=Object(r.useCallback)((function(e){return{setValue:function(t,n){return U(e,t,n)},setTouched:function(t,n){return H(e,t,n)},setError:function(t){return F(e,t)}}}),[U,H,F]),ne=Object(r.useCallback)((function(e){var t=Hn(e),n=t?e.name:e,r=Yn(O.values,n),i={name:n,value:r,onChange:z,onBlur:W};if(t){var o=e.type,a=e.value,u=e.as,s=e.multiple;"checkbox"===o?void 0===a?i.checked=!!r:(i.checked=!(!Array.isArray(r)||!~r.indexOf(a)),i.value=a):"radio"===o?(i.checked=r===a,i.value=a):"select"===u&&s&&(i.value=i.value||[],i.multiple=!0)}return i}),[W,z,O.values]),re=Object(r.useMemo)((function(){return!o()(m.current,O.values)}),[m.current,O.values]),ie=Object(r.useMemo)((function(){return"undefined"!==typeof c?re?O.errors&&0===Object.keys(O.errors).length:!1!==c&&zn(c)?c(g):c:O.errors&&0===Object.keys(O.errors).length}),[c,re,O.errors,g]);return Dn({},O,{initialValues:m.current,initialErrors:v.current,initialTouched:b.current,initialStatus:y.current,handleBlur:W,handleChange:z,handleReset:J,handleSubmit:Q,resetForm:k,setErrors:D,setFormikState:G,setFieldTouched:H,setFieldValue:U,setFieldError:F,setStatus:q,setSubmitting:Y,setTouched:j,setValues:L,submitForm:K,validateForm:M,validateField:P,isValid:ie,dirty:re,unregisterField:R,registerField:I,getFieldProps:ne,getFieldMeta:ee,getFieldHelpers:te,validateOnBlur:a,validateOnChange:n,validateOnMount:s})}function or(e){var t=ir(e),n=e.component,i=e.children,o=e.render,a=e.innerRef;return Object(r.useImperativeHandle)(a,(function(){return t})),Object(r.createElement)(Xn,{value:t},n?Object(r.createElement)(n,t):o?o(t):i?zn(i)?i(t):Gn(i)?null:r.Children.only(i):null)}function ar(e){var t=Array.isArray(e)?[]:{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=String(n);!0===Array.isArray(e[r])?t[r]=e[r].map((function(e){return!0===Array.isArray(e)||M(e)?ar(e):""!==e?e:void 0})):M(e[r])?t[r]=ar(e[r]):t[r]=""!==e[r]?e[r]:void 0}return t}function ur(e,t,n){var r=e.slice();return t.forEach((function(t,i){if("undefined"===typeof r[i]){var o=!1!==n.clone&&n.isMergeableObject(t);r[i]=o?d(Array.isArray(t)?[]:{},t,n):t}else n.isMergeableObject(t)?r[i]=d(e[i],t,n):-1===e.indexOf(t)&&r.push(t)})),r}var sr="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?r.useLayoutEffect:r.useEffect;function cr(e){var t=Object(r.useRef)(e);return sr((function(){t.current=e})),Object(r.useCallback)((function(){for(var e=arguments.length,n=new Array(e),r=0;re?t:e}),0);return Array.from(Dn({},e,{length:t+1}))}return[]},gr=function(e){function t(t){var n;return(n=e.call(this,t)||this).updateArrayField=function(e,t,r){var i=n.props,o=i.name;(0,i.formik.setFormikState)((function(n){var i="function"===typeof r?r:e,a="function"===typeof t?t:e,u=Kn(n.values,o,e(Yn(n.values,o))),s=r?i(Yn(n.errors,o)):void 0,c=t?a(Yn(n.touched,o)):void 0;return Bn(s)&&(s=void 0),Bn(c)&&(c=void 0),Dn({},n,{values:u,errors:r?Kn(n.errors,o,s):n.errors,touched:t?Kn(n.touched,o,c):n.touched})}))},n.push=function(e){return n.updateArrayField((function(t){return[].concat(pr(t),[jn(e)])}),!1,!1)},n.handlePush=function(e){return function(){return n.push(e)}},n.swap=function(e,t){return n.updateArrayField((function(n){return function(e,t,n){var r=pr(e),i=r[t];return r[t]=r[n],r[n]=i,r}(n,e,t)}),!0,!0)},n.handleSwap=function(e,t){return function(){return n.swap(e,t)}},n.move=function(e,t){return n.updateArrayField((function(n){return function(e,t,n){var r=pr(e),i=r[t];return r.splice(t,1),r.splice(n,0,i),r}(n,e,t)}),!0,!0)},n.handleMove=function(e,t){return function(){return n.move(e,t)}},n.insert=function(e,t){return n.updateArrayField((function(n){return hr(n,e,t)}),(function(t){return hr(t,e,null)}),(function(t){return hr(t,e,null)}))},n.handleInsert=function(e,t){return function(){return n.insert(e,t)}},n.replace=function(e,t){return n.updateArrayField((function(n){return function(e,t,n){var r=pr(e);return r[t]=n,r}(n,e,t)}),!1,!1)},n.handleReplace=function(e,t){return function(){return n.replace(e,t)}},n.unshift=function(e){var t=-1;return n.updateArrayField((function(n){var r=n?[e].concat(n):[e];return t<0&&(t=r.length),r}),(function(e){var n=e?[null].concat(e):[null];return t<0&&(t=n.length),n}),(function(e){var n=e?[null].concat(e):[null];return t<0&&(t=n.length),n})),t},n.handleUnshift=function(e){return function(){return n.unshift(e)}},n.handleRemove=function(e){return function(){return n.remove(e)}},n.handlePop=function(){return function(){return n.pop()}},n.remove=n.remove.bind(Un(n)),n.pop=n.pop.bind(Un(n)),n}Ln(t,e);var n=t.prototype;return n.componentDidUpdate=function(e){this.props.validateOnChange&&this.props.formik.validateOnChange&&!o()(Yn(e.formik.values,e.name),Yn(this.props.formik.values,this.props.name))&&this.props.formik.validateForm(this.props.formik.values)},n.remove=function(e){var t;return this.updateArrayField((function(n){var r=n?pr(n):[];return t||(t=r[e]),zn(r.splice)&&r.splice(e,1),r}),!0,!0),t},n.pop=function(){var e;return this.updateArrayField((function(t){var n=t;return e||(e=n&&n.pop&&n.pop()),n}),!0,!0),e},n.render=function(){var e={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},t=this.props,n=t.component,i=t.render,o=t.children,a=t.name,u=Dn({},e,{form:Fn(t.formik,["validate","validationSchema"]),name:a});return n?Object(r.createElement)(n,u):i?i(u):o?"function"===typeof o?o(u):Gn(o)?null:r.Children.only(o):null},t}(r.Component);gr.defaultProps={validateOnChange:!0};var mr=fr(gr),vr=(r.Component,fr(function(e){function t(t){var n;n=e.call(this,t)||this;var r=t.render,i=t.children,o=t.component,a=t.as;t.name;return r&&Object(kn.a)(!1),o&&r&&Object(kn.a)(!1),a&&i&&zn(i)&&Object(kn.a)(!1),o&&i&&zn(i)&&Object(kn.a)(!1),r&&i&&!Gn(i)&&Object(kn.a)(!1),n}Ln(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(e){return this.props.shouldUpdate?this.props.shouldUpdate(e,this.props):e.name!==this.props.name||Yn(e.formik.values,this.props.name)!==Yn(this.props.formik.values,this.props.name)||Yn(e.formik.errors,this.props.name)!==Yn(this.props.formik.errors,this.props.name)||Yn(e.formik.touched,this.props.name)!==Yn(this.props.formik.touched,this.props.name)||Object.keys(this.props).length!==Object.keys(e).length||e.formik.isSubmitting!==this.props.formik.isSubmitting},n.componentDidMount=function(){this.props.formik.registerField(this.props.name,{validate:this.props.validate})},n.componentDidUpdate=function(e){this.props.name!==e.name&&(this.props.formik.unregisterField(e.name),this.props.formik.registerField(this.props.name,{validate:this.props.validate})),this.props.validate!==e.validate&&this.props.formik.registerField(this.props.name,{validate:this.props.validate})},n.componentWillUnmount=function(){this.props.formik.unregisterField(this.props.name)},n.render=function(){var e=this.props,t=e.name,n=e.render,i=e.as,o=e.children,a=e.component,u=e.formik,s=Fn(e,["validate","name","render","as","children","component","shouldUpdate","formik"]),c=Fn(u,["validate","validationSchema"]),l={value:"radio"===s.type||"checkbox"===s.type?s.value:Yn(u.values,t),name:t,onChange:u.handleChange,onBlur:u.handleBlur},d={field:l,meta:{value:Yn(u.values,t),error:Yn(u.errors,t),touched:!!Yn(u.touched,t),initialValue:Yn(u.initialValues,t),initialTouched:!!Yn(u.initialTouched,t),initialError:Yn(u.initialErrors,t)},form:c};if(n)return n(d);if(zn(o))return o(d);if(a){if("string"===typeof a){var f=s.innerRef,h=Fn(s,["innerRef"]);return Object(r.createElement)(a,Dn({ref:f},l,h),o)}return Object(r.createElement)(a,Dn({field:l,form:u},s),o)}var p=i||"input";if("string"===typeof p){var g=s.innerRef,m=Fn(s,["innerRef"]);return Object(r.createElement)(p,Dn({ref:g},l,m),o)}return Object(r.createElement)(p,Dn({},l,s),o)},t}(r.Component)))},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){e.exports=n(501)()},function(e,t,n){"use strict";n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a})),n.d(t,"d",(function(){return u})),n.d(t,"e",(function(){return s}));var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function i(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(31),i=n(52);function o(e){return function t(n,o){switch(arguments.length){case 0:return t;case 1:return Object(i.a)(n)?t:Object(r.a)((function(t){return e(n,t)}));default:return Object(i.a)(n)&&Object(i.a)(o)?t:Object(i.a)(n)?Object(r.a)((function(t){return e(t,o)})):Object(i.a)(o)?Object(r.a)((function(t){return e(n,t)})):e(n,o)}}}},,function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},,function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(177);function i(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=Object(r.a)(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return u=e.done,e},e:function(e){s=!0,a=e},f:function(){try{u||null==n.return||n.return()}finally{if(s)throw a}}}}},function(e,t,n){"use strict";var r=n(4),i=n(16),o=n(1),a=n.n(o),u=(n(13),n(110)),s=n.n(u),c=n(795),l=n(833),d=n(329),f=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var o=t.defaultTheme,u=t.withTheme,f=void 0!==u&&u,h=t.name,p=Object(i.a)(t,["defaultTheme","withTheme","name"]);var g=h,m=Object(c.a)(e,Object(r.a)({defaultTheme:o,Component:n,name:h||n.displayName,classNamePrefix:g},p)),v=a.a.forwardRef((function(e,t){e.classes;var u,s=e.innerRef,c=Object(i.a)(e,["classes","innerRef"]),p=m(Object(r.a)({},n.defaultProps,e)),g=c;return("string"===typeof h||f)&&(u=Object(d.a)()||o,h&&(g=Object(l.a)({theme:u,name:h,props:c})),f&&!g.theme&&(g.theme=u)),a.a.createElement(n,Object(r.a)({ref:s||t,classes:p},g))}));return s()(v,n),v}},h=n(120);t.a=function(e,t){return f(e,Object(r.a)({defaultTheme:h.a},t))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(22);function i(e){Object(r.a)(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===typeof e&&"[object Date]"===t?new Date(e.getTime()):"number"===typeof e||"[object Number]"===t?new Date(e):("string"!==typeof e&&"[object String]"!==t||"undefined"===typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn((new Error).stack)),new Date(NaN))}},function(e,t,n){"use strict";n.r(t),n.d(t,"hexToRgb",(function(){return r.g})),n.d(t,"rgbToHex",(function(){return r.k})),n.d(t,"hslToRgb",(function(){return r.h})),n.d(t,"decomposeColor",(function(){return r.b})),n.d(t,"recomposeColor",(function(){return r.j})),n.d(t,"getContrastRatio",(function(){return r.e})),n.d(t,"getLuminance",(function(){return r.f})),n.d(t,"emphasize",(function(){return r.c})),n.d(t,"fade",(function(){return r.d})),n.d(t,"darken",(function(){return r.a})),n.d(t,"lighten",(function(){return r.i})),n.d(t,"createMuiTheme",(function(){return i.a})),n.d(t,"unstable_createMuiStrictModeTheme",(function(){return a})),n.d(t,"createStyles",(function(){return u})),n.d(t,"makeStyles",(function(){return s.a})),n.d(t,"responsiveFontSizes",(function(){return b})),n.d(t,"styled",(function(){return y.a})),n.d(t,"easing",(function(){return _.c})),n.d(t,"duration",(function(){return _.b})),n.d(t,"useTheme",(function(){return w.a})),n.d(t,"withStyles",(function(){return S.a})),n.d(t,"withTheme",(function(){return A})),n.d(t,"createGenerateClassName",(function(){return M.a})),n.d(t,"jssPreset",(function(){return k.a})),n.d(t,"ServerStyleSheets",(function(){return D})),n.d(t,"StylesProvider",(function(){return j.b})),n.d(t,"MuiThemeProvider",(function(){return L.a})),n.d(t,"ThemeProvider",(function(){return L.a}));var r=n(34),i=n(176),o=n(321);function a(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:{},n=t.breakpoints,r=void 0===n?["sm","md","lg"]:n,i=t.disableAlign,o=void 0!==i&&i,a=t.factor,u=void 0===a?2:a,s=t.variants,d=void 0===s?["h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","caption","button","overline"]:s,h=Object(c.a)({},e);h.typography=Object(c.a)({},h.typography);var b=h.typography,y=p(b.htmlFontSize),_=r.map((function(e){return h.breakpoints.values[e]}));return d.forEach((function(e){var t=b[e],n=parseFloat(y(t.fontSize,"rem"));if(!(n<=1)){var r=n,i=1+(r-1)/u,a=t.lineHeight;if(!f(a)&&!o)throw new Error(Object(l.a)(6));f(a)||(a=parseFloat(y(a,"rem"))/parseFloat(n));var s=null;o||(s=function(e){return g({size:e,grid:m({pixels:4,lineHeight:a,htmlFontSize:b.htmlFontSize})})}),b[e]=Object(c.a)({},t,v({cssProperty:"fontSize",min:i,max:r,unit:"rem",breakpoints:_,transform:s}))}})),h}var y=n(231),_=n(83),w=n(87),S=n(24),O=n(16),$=n(1),x=n.n($),E=(n(13),n(110)),T=n.n(E),C=n(329);function N(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.defaultTheme,n=function(e){var n=x.a.forwardRef((function(n,r){var i=n.innerRef,o=Object(O.a)(n,["innerRef"]),a=Object(C.a)()||t;return x.a.createElement(e,Object(c.a)({theme:a,ref:i||r},o))}));return T()(n,e),n};return n}N();var A=N({defaultTheme:n(120).a}),M=n(791),k=n(468),P=n(249),I=n(146),R=n(69),j=n(828),D=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(P.a)(this,e),this.options=t}return Object(I.a)(e,[{key:"collect",value:function(e){var t=new Map;this.sheetsRegistry=new R.b;var n=Object(M.a)();return x.a.createElement(j.b,Object(c.a)({sheetsManager:t,serverGenerateClassName:n,sheetsRegistry:this.sheetsRegistry},this.options),e)}},{key:"toString",value:function(){return this.sheetsRegistry?this.sheetsRegistry.toString():""}},{key:"getStyleElement",value:function(e){return x.a.createElement("style",Object(c.a)({id:"jss-server-side",key:"jss-server-side",dangerouslySetInnerHTML:{__html:this.toString()}},e))}}]),e}(),L=n(915)},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return U})),n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return x})),n.d(t,"d",(function(){return V})),n.d(t,"e",(function(){return G})),n.d(t,"f",(function(){return Y})),n.d(t,"g",(function(){return k})),n.d(t,"h",(function(){return P})),n.d(t,"i",(function(){return y})),n.d(t,"j",(function(){return N})),n.d(t,"k",(function(){return $})),n.d(t,"l",(function(){return M})),n.d(t,"m",(function(){return T})),n.d(t,"n",(function(){return C})),n.d(t,"o",(function(){return A})),n.d(t,"p",(function(){return d})),n.d(t,"q",(function(){return ee})),n.d(t,"r",(function(){return S})),n.d(t,"s",(function(){return w})),n.d(t,"t",(function(){return p})),n.d(t,"u",(function(){return m})),n.d(t,"v",(function(){return g})),n.d(t,"w",(function(){return b})),n.d(t,"x",(function(){return Z})),n.d(t,"y",(function(){return X})),n.d(t,"z",(function(){return ne})),n.d(t,"A",(function(){return ie})),n.d(t,"B",(function(){return oe})),n.d(t,"C",(function(){return W})),n.d(t,"D",(function(){return z})),n.d(t,"E",(function(){return h})),n.d(t,"F",(function(){return _})),n.d(t,"G",(function(){return c})),n.d(t,"H",(function(){return v})),n.d(t,"I",(function(){return J}));var r=n(90),i=n(30),o=n(14),a=n(425),u=n.n(a);n(73);function s(e,t,n,r){if(function(e){return"IntValue"===e.kind}(n)||function(e){return"FloatValue"===e.kind}(n))e[t.value]=Number(n.value);else if(function(e){return"BooleanValue"===e.kind}(n)||function(e){return"StringValue"===e.kind}(n))e[t.value]=n.value;else if(function(e){return"ObjectValue"===e.kind}(n)){var o={};n.fields.map((function(e){return s(o,e.name,e.value,r)})),e[t.value]=o}else if(function(e){return"Variable"===e.kind}(n)){var a=(r||{})[n.name.value];e[t.value]=a}else if(function(e){return"ListValue"===e.kind}(n))e[t.value]=n.values.map((function(e){var n={};return s(n,t,e,r),n[t.value]}));else if(function(e){return"EnumValue"===e.kind}(n))e[t.value]=n.value;else{if(!function(e){return"NullValue"===e.kind}(n))throw new i.a(17);e[t.value]=null}}function c(e,t){var n=null;e.directives&&(n={},e.directives.forEach((function(e){n[e.name.value]={},e.arguments&&e.arguments.forEach((function(r){var i=r.name,o=r.value;return s(n[e.name.value],i,o,t)}))})));var r=null;return e.arguments&&e.arguments.length&&(r={},e.arguments.forEach((function(e){var n=e.name,i=e.value;return s(r,n,i,t)}))),d(e.name.value,r,n)}var l=["connection","include","skip","client","rest","export"];function d(e,t,n){if(n&&n.connection&&n.connection.key){if(n.connection.filter&&n.connection.filter.length>0){var r=n.connection.filter?n.connection.filter:[];r.sort();var i=t,o={};return r.forEach((function(e){o[e]=i[e]})),n.connection.key+"("+JSON.stringify(o)+")"}return n.connection.key}var a=e;if(t){var s=u()(t);a+="("+s+")"}return n&&Object.keys(n).forEach((function(e){-1===l.indexOf(e)&&(n[e]&&Object.keys(n[e]).length?a+="@"+e+"("+JSON.stringify(n[e])+")":a+="@"+e)})),a}function f(e,t){if(e.arguments&&e.arguments.length){var n={};return e.arguments.forEach((function(e){var r=e.name,i=e.value;return s(n,r,i,t)})),n}return null}function h(e){return e.alias?e.alias.value:e.name.value}function p(e){return"Field"===e.kind}function g(e){return"InlineFragment"===e.kind}function m(e){return e&&"id"===e.type&&"boolean"===typeof e.generated}function v(e,t){return void 0===t&&(t=!1),Object(o.a)({type:"id",generated:t},"string"===typeof e?{id:e,typename:void 0}:e)}function b(e){return null!=e&&"object"===typeof e&&"json"===e.type}function y(e,t){if(e.directives&&e.directives.length){var n={};return e.directives.forEach((function(e){n[e.name.value]=f(e,t)})),n}return null}function _(e,t){return void 0===t&&(t={}),(n=e.directives,n?n.filter(O).map((function(e){var t=e.arguments;e.name.value,Object(i.b)(t&&1===t.length,14);var n=t[0];Object(i.b)(n.name&&"if"===n.name.value,15);var r=n.value;return Object(i.b)(r&&("Variable"===r.kind||"BooleanValue"===r.kind),16),{directive:e,ifArgument:n}})):[]).every((function(e){var n=e.directive,r=e.ifArgument,o=!1;return"Variable"===r.value.kind?(o=t[r.value.name.value],Object(i.b)(void 0!==o,13)):o=r.value.value,"skip"===n.name.value?!o:o}));var n}function w(e,t){return function(e){var t=[];return Object(r.b)(e,{Directive:function(e){t.push(e.name.value)}}),t}(t).some((function(t){return e.indexOf(t)>-1}))}function S(e){return e&&w(["client"],e)&&w(["export"],e)}function O(e){var t=e.name.value;return"skip"===t||"include"===t}function $(e,t){var n=t,r=[];return e.definitions.forEach((function(e){if("OperationDefinition"===e.kind)throw new i.a(11);"FragmentDefinition"===e.kind&&r.push(e)})),"undefined"===typeof n&&(Object(i.b)(1===r.length,12),n=r[0].name.value),Object(o.a)(Object(o.a)({},e),{definitions:Object(o.e)([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:n}}]}}],e.definitions)})}function x(e){for(var t=[],n=1;n1){var r=[];t=se(t,r);for(var i=1;it?1:e>=t?0:NaN},o=function(e){var t=e,n=e;function r(e,t,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r>>1;n(e[o],t)<0?r=o+1:i=o}return r}return 1===e.length&&(t=function(t,n){return e(t)-n},n=function(e){return function(t,n){return i(e(t),n)}}(e)),{left:r,center:function(e,n,i,o){null==i&&(i=0),null==o&&(o=e.length);var a=r(e,n,i,o-1);return a>i&&t(e[a-1],n)>-t(e[a],n)?a-1:a},right:function(e,t,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r>>1;n(e[o],t)>0?i=o:r=o+1}return r}}};var a=n(33),u=n.n(a),s=n(23),c=u.a.mark(d),l=function(e){return null===e?NaN:+e};function d(e,t){var n,r,i,o,a,l,d;return u.a.wrap((function(u){for(;;)switch(u.prev=u.next){case 0:if(void 0!==t){u.next=21;break}n=Object(s.a)(e),u.prev=2,n.s();case 4:if((r=n.n()).done){u.next=11;break}if(!(null!=(i=r.value)&&(i=+i)>=i)){u.next=9;break}return u.next=9,i;case 9:u.next=4;break;case 11:u.next=16;break;case 13:u.prev=13,u.t0=u.catch(2),n.e(u.t0);case 16:return u.prev=16,n.f(),u.finish(16);case 19:u.next=40;break;case 21:o=-1,a=Object(s.a)(e),u.prev=23,a.s();case 25:if((l=a.n()).done){u.next=32;break}if(d=l.value,!(null!=(d=t(d,++o,e))&&(d=+d)>=d)){u.next=30;break}return u.next=30,d;case 30:u.next=25;break;case 32:u.next=37;break;case 34:u.prev=34,u.t1=u.catch(23),a.e(u.t1);case 37:return u.prev=37,a.f(),u.finish(37);case 40:case"end":return u.stop()}}),c,null,[[2,13,16,19],[23,34,37,40]])}var f=o(i),h=f.right,p=f.left,g=o(l).center,m=h;function v(e,t){var n=0;if(void 0===t){var r,i=Object(s.a)(e);try{for(i.s();!(r=i.n()).done;){var o=r.value;null!=o&&(o=+o)>=o&&++n}}catch(d){i.e(d)}finally{i.f()}}else{var a,u=-1,c=Object(s.a)(e);try{for(c.s();!(a=c.n()).done;){var l=a.value;null!=(l=t(l,++u,e))&&(l=+l)>=l&&++n}}catch(d){c.e(d)}finally{c.f()}}return n}var b=n(46);function y(e){return 0|e.length}function _(e){return!(e>0)}function w(e){return"object"!==typeof e||"length"in e?e:Array.from(e)}function S(e){return function(t){return e.apply(void 0,Object(b.a)(t))}}function O(){for(var e=arguments.length,t=new Array(e),n=0;ne?1:t>=e?0:NaN};function E(e,t){var n,r=0,i=0,o=0;if(void 0===t){var a,u=Object(s.a)(e);try{for(u.s();!(a=u.n()).done;){var c=a.value;null!=c&&(c=+c)>=c&&(o+=(n=c-i)*(c-(i+=n/++r)))}}catch(p){u.e(p)}finally{u.f()}}else{var l,d=-1,f=Object(s.a)(e);try{for(f.s();!(l=f.n()).done;){var h=l.value;null!=(h=t(h,++d,e))&&(h=+h)>=h&&(o+=(n=h-i)*(h-(i+=n/++r)))}}catch(p){f.e(p)}finally{f.f()}}if(r>1)return o/(r-1)}function T(e,t){var n=E(e,t);return n?Math.sqrt(n):n}var C=function(e,t){var n,r;if(void 0===t){var i,o=Object(s.a)(e);try{for(o.s();!(i=o.n()).done;){var a=i.value;null!=a&&(void 0===n?a>=a&&(n=r=a):(n>a&&(n=a),r=d&&(n=r=d):(n>d&&(n=d),r0){for(o=r[--i];i>0&&(e=o,!(n=(t=r[--i])-((o=e+t)-e))););i>0&&(n<0&&r[i-1]<0||n>0&&r[i-1]>0)&&(t=2*n)==(e=o+t)-o&&(o=e)}return o}}]),e}(),k=function(e,t){var n=new M;if(void 0===t){var r,i=Object(s.a)(e);try{for(i.s();!(r=i.n()).done;){var o=r.value;(o=+o)&&n.add(o)}}catch(d){i.e(d)}finally{i.f()}}else{var a,u=-1,c=Object(s.a)(e);try{for(c.s();!(a=c.n()).done;){var l=a.value;(l=+t(l,++u,e))&&n.add(l)}}catch(d){c.e(d)}finally{c.f()}}return+n},P=n(2),I=n(161),R=n(58),j=n(47),D=n(79),L=n(80),F=n(214),U=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:W;Object(N.a)(this,n),e=t.call(this),Object.defineProperties(Object(I.a)(e),{_intern:{value:new Map},_key:{value:i}});var o,a=Object(s.a)(r);try{for(a.s();!(o=a.n()).done;){var u=Object(P.a)(o.value,2),c=u[0],l=u[1];e.set(c,l)}}catch(d){a.e(d)}finally{a.f()}return e}return Object(A.a)(n,[{key:"get",value:function(e){return Object(R.a)(Object(j.a)(n.prototype),"get",this).call(this,z(this,e))}},{key:"has",value:function(e){return Object(R.a)(Object(j.a)(n.prototype),"has",this).call(this,z(this,e))}},{key:"set",value:function(e,t){return Object(R.a)(Object(j.a)(n.prototype),"set",this).call(this,H(this,e),t)}},{key:"delete",value:function(e){return Object(R.a)(Object(j.a)(n.prototype),"delete",this).call(this,V(this,e))}}]),n}(Object(F.a)(Map)),B=function(e){Object(D.a)(n,e);var t=Object(L.a)(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:W;Object(N.a)(this,n),e=t.call(this),Object.defineProperties(Object(I.a)(e),{_intern:{value:new Map},_key:{value:i}});var o,a=Object(s.a)(r);try{for(a.s();!(o=a.n()).done;){var u=o.value;e.add(u)}}catch(c){a.e(c)}finally{a.f()}return e}return Object(A.a)(n,[{key:"has",value:function(e){return Object(R.a)(Object(j.a)(n.prototype),"has",this).call(this,z(this,e))}},{key:"add",value:function(e){return Object(R.a)(Object(j.a)(n.prototype),"add",this).call(this,H(this,e))}},{key:"delete",value:function(e){return Object(R.a)(Object(j.a)(n.prototype),"delete",this).call(this,V(this,e))}}]),n}(Object(F.a)(Set));function z(e,t){var n=e._intern,r=(0,e._key)(t);return n.has(r)?n.get(r):t}function H(e,t){var n=e._intern,r=(0,e._key)(t);return n.has(r)?n.get(r):(n.set(r,t),t)}function V(e,t){var n=e._intern,r=(0,e._key)(t);return n.has(r)&&(t=n.get(t),n.delete(r)),t}function W(e){return null!==e&&"object"===typeof e?e.valueOf():e}var G=function(e){return e};function q(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1?t-1:0),r=1;r2?n-2:0),i=2;i2?n-2:0),i=2;i1?t-1:0),r=1;r1?t-1:0),r=1;r=r.length)return n(i);var a,u=new U,c=r[o++],l=-1,d=Object(s.a)(i);try{for(d.s();!(a=d.n()).done;){var f=a.value,h=c(f,++l,i),p=u.get(h);p?p.push(f):u.set(h,[f])}}catch(_){d.e(_)}finally{d.f()}var g,m=Object(s.a)(u);try{for(m.s();!(g=m.n()).done;){var v=Object(P.a)(g.value,2),b=v[0],y=v[1];u.set(b,e(y,o))}}catch(_){m.e(_)}finally{m.f()}return t(u)}(e,0)}var te=function(e,t){return Array.from(t,(function(t){return e[t]}))};function ne(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1){var l=Uint32Array.from(e,(function(e,t){return t}));return n.length>1?(n=n.map((function(t){return e.map(t)})),l.sort((function(e,t){var r,o=Object(s.a)(n);try{for(o.s();!(r=o.n()).done;){var a=r.value,u=i(a[e],a[t]);if(u)return u}}catch(c){o.e(c)}finally{o.f()}}))):(c=e.map(c),l.sort((function(e,t){return i(c[e],c[t])}))),te(e,l)}return e.sort(c)}function re(e,t,n){return(1===t.length?ne(K(e,t,n),(function(e,t){var n=Object(P.a)(e,2),r=n[0],o=n[1],a=Object(P.a)(t,2),u=a[0],s=a[1];return i(o,s)||i(r,u)})):ne(q(e,n),(function(e,n){var r=Object(P.a)(e,2),o=r[0],a=r[1],u=Object(P.a)(n,2),s=u[0],c=u[1];return t(a,c)||i(o,s)}))).map((function(e){return Object(P.a)(e,1)[0]}))}var ie=Array.prototype,oe=ie.slice,ae=(ie.map,function(e){return function(){return e}}),ue=Math.sqrt(50),se=Math.sqrt(10),ce=Math.sqrt(2),le=function(e,t,n){var r,i,o,a,u=-1;if(n=+n,(e=+e)===(t=+t)&&n>0)return[e];if((r=t0)for(e=Math.ceil(e/a),t=Math.floor(t/a),o=new Array(i=Math.ceil(t-e+1));++u=0?(o>=ue?10:o>=se?5:o>=ce?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=ue?10:o>=se?5:o>=ce?2:1)}function fe(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=ue?i*=10:o>=se?i*=5:o>=ce&&(i*=2),t0?(e=Math.floor(e/i)*i,t=Math.ceil(t/i)*i):i<0&&(e=Math.ceil(e*i)/i,t=Math.floor(t*i)/i),r=i}}var pe=function(e){return Math.ceil(Math.log(v(e))/Math.LN2)+1},ge=function(){var e=G,t=C,n=pe;function r(r){Array.isArray(r)||(r=Array.from(r));var i,o,a=r.length,u=new Array(a);for(i=0;i=l)if(f>=l&&t===C){var v=de(c,l,h);isFinite(v)&&(v>0?l=(Math.floor(l/v)+1)*v:v<0&&(l=(Math.ceil(l*-v)+1)/-v))}else d.pop()}for(var b=d.length;d[0]<=c;)d.shift(),--b;for(;d[b-1]>l;)d.pop(),--b;var y,_=new Array(b+1);for(i=0;i<=b;++i)(y=_[i]=[]).x0=i>0?d[i-1]:c,y.x1=i=o)&&(n=o)}}catch(d){i.e(d)}finally{i.f()}}else{var a,u=-1,c=Object(s.a)(e);try{for(c.s();!(a=c.n()).done;){var l=a.value;null!=(l=t(l,++u,e))&&(n=l)&&(n=l)}}catch(d){c.e(d)}finally{c.f()}}return n}function ve(e,t){var n;if(void 0===t){var r,i=Object(s.a)(e);try{for(i.s();!(r=i.n()).done;){var o=r.value;null!=o&&(n>o||void 0===n&&o>=o)&&(n=o)}}catch(d){i.e(d)}finally{i.f()}}else{var a,u=-1,c=Object(s.a)(e);try{for(c.s();!(a=c.n()).done;){var l=a.value;null!=(l=t(l,++u,e))&&(n>l||void 0===n&&l>=l)&&(n=l)}}catch(d){c.e(d)}finally{c.f()}}return n}function be(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.length-1,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:i;r>n;){if(r-n>600){var a=r-n+1,u=t-n+1,s=Math.log(a),c=.5*Math.exp(2*s/3),l=.5*Math.sqrt(s*c*(a-c)/a)*(u-a/2<0?-1:1),d=Math.max(n,Math.floor(t-u*c/a+l)),f=Math.min(r,Math.floor(t+(a-u)*c/a+l));be(e,t,d,f,o)}var h=e[t],p=n,g=r;for(ye(e,n,t),o(e[r],h)>0&&ye(e,n,r);p0;)--g}0===o(e[n],h)?ye(e,n,g):ye(e,++g,r),g<=t&&(n=g+1),t<=g&&(r=g-1)}return e}function ye(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function _e(e,t,n){if(r=(e=Float64Array.from(d(e,n))).length){if((t=+t)<=0||r<2)return ve(e);if(t>=1)return me(e);var r,i=(r-1)*t,o=Math.floor(i),a=me(be(e,o).subarray(0,o+1));return a+(ve(e.subarray(o+1))-a)*(i-o)}}function we(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l;if(r=e.length){if((t=+t)<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),a=+n(e[o],o,e),u=+n(e[o+1],o+1,e);return a+(u-a)*(i-o)}}var Se=function(e,t,n){return Math.ceil((n-t)/(2*(_e(e,.75)-_e(e,.25))*Math.pow(v(e),-1/3)))},Oe=function(e,t,n){return Math.ceil((n-t)/(3.5*T(e)*Math.pow(v(e),-1/3)))};function $e(e,t){var n,r=-1,i=-1;if(void 0===t){var o,a=Object(s.a)(e);try{for(a.s();!(o=a.n()).done;){var u=o.value;++i,null!=u&&(n=u)&&(n=u,r=i)}}catch(f){a.e(f)}finally{a.f()}}else{var c,l=Object(s.a)(e);try{for(l.s();!(c=l.n()).done;){var d=c.value;null!=(d=t(d,++i,e))&&(n=d)&&(n=d,r=i)}}catch(f){l.e(f)}finally{l.f()}}return r}function xe(e,t){var n=0,r=0;if(void 0===t){var i,o=Object(s.a)(e);try{for(o.s();!(i=o.n()).done;){var a=i.value;null!=a&&(a=+a)>=a&&(++n,r+=a)}}catch(f){o.e(f)}finally{o.f()}}else{var u,c=-1,l=Object(s.a)(e);try{for(l.s();!(u=l.n()).done;){var d=u.value;null!=(d=t(d,++c,e))&&(d=+d)>=d&&(++n,r+=d)}}catch(f){l.e(f)}finally{l.f()}}if(n)return r/n}var Ee=function(e,t){return _e(e,.5,t)},Te=u.a.mark(Ce);function Ce(e){var t,n,r;return u.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:t=Object(s.a)(e),i.prev=1,t.s();case 3:if((n=t.n()).done){i.next=8;break}return r=n.value,i.delegateYield(r,"t0",6);case 6:i.next=3;break;case 8:i.next=13;break;case 10:i.prev=10,i.t1=i.catch(1),t.e(i.t1);case 13:return i.prev=13,t.f(),i.finish(13);case 16:case"end":return i.stop()}}),Te,null,[[1,10,13,16]])}function Ne(e){return Array.from(Ce(e))}function Ae(e,t){var n,r=-1,i=-1;if(void 0===t){var o,a=Object(s.a)(e);try{for(a.s();!(o=a.n()).done;){var u=o.value;++i,null!=u&&(n>u||void 0===n&&u>=u)&&(n=u,r=i)}}catch(f){a.e(f)}finally{a.f()}}else{var c,l=Object(s.a)(e);try{for(l.s();!(c=l.n()).done;){var d=c.value;null!=(d=t(d,++i,e))&&(n>d||void 0===n&&d>=d)&&(n=d,r=i)}}catch(f){l.e(f)}finally{l.f()}}return r}function Me(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ke,i=[],o=!1,a=Object(s.a)(e);try{for(a.s();!(n=a.n()).done;){var u=n.value;o&&i.push(r(t,u)),t=u,o=!0}}catch(c){a.e(c)}finally{a.f()}return i}function ke(e,t){return[e,t]}var Pe=function(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),o=new Array(i);++r1&&void 0!==arguments[1]?arguments[1]:i,r=!1;if(1===n.length){var o,a,u=Object(s.a)(e);try{for(u.s();!(a=u.n()).done;){var c=a.value,l=n(c);(r?i(l,o)<0:0===i(l,l))&&(t=c,o=l,r=!0)}}catch(p){u.e(p)}finally{u.f()}}else{var d,f=Object(s.a)(e);try{for(f.s();!(d=f.n()).done;){var h=d.value;(r?n(h,t)<0:0===n(h,h))&&(t=h,r=!0)}}catch(p){f.e(p)}finally{f.f()}}return t}function Re(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;if(1===n.length)return Ae(e,n);var r,o=-1,a=-1,u=Object(s.a)(e);try{for(u.s();!(r=u.n()).done;){var c=r.value;++a,(o<0?0===n(c,c):n(c,t)<0)&&(t=c,o=a)}}catch(l){u.e(l)}finally{u.f()}return o}function je(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i,r=!1;if(1===n.length){var o,a,u=Object(s.a)(e);try{for(u.s();!(a=u.n()).done;){var c=a.value,l=n(c);(r?i(l,o)>0:0===i(l,l))&&(t=c,o=l,r=!0)}}catch(p){u.e(p)}finally{u.f()}}else{var d,f=Object(s.a)(e);try{for(f.s();!(d=f.n()).done;){var h=d.value;(r?n(h,t)>0:0===n(h,h))&&(t=h,r=!0)}}catch(p){f.e(p)}finally{f.f()}}return t}function De(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;if(1===n.length)return $e(e,n);var r,o=-1,a=-1,u=Object(s.a)(e);try{for(u.s();!(r=u.n()).done;){var c=r.value;++a,(o<0?0===n(c,c):n(c,t)>0)&&(t=c,o=a)}}catch(l){u.e(l)}finally{u.f()}return o}function Le(e,t){var n=Re(e,t);return n<0?void 0:n}var Fe=Ue(Math.random);function Ue(e){return function(t){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length,i=r-(n=+n);i;){var o=e()*i--|0,a=t[i+n];t[i+n]=t[o+n],t[o+n]=a}return t}}function Be(e,t){var n=0;if(void 0===t){var r,i=Object(s.a)(e);try{for(i.s();!(r=i.n()).done;){var o=r.value;(o=+o)&&(n+=o)}}catch(d){i.e(d)}finally{i.f()}}else{var a,u=-1,c=Object(s.a)(e);try{for(c.s();!(a=c.n()).done;){var l=a.value;(l=+t(l,++u,e))&&(n+=l)}}catch(d){c.e(d)}finally{c.f()}}return n}var ze=function(e){if(!(i=e.length))return[];for(var t=-1,n=ve(e,He),r=new Array(n);++t1?t-1:0),r=1;r1?t-1:0),r=1;r=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:n}}))}function wt(e,t){for(var n,r=0,i=e.length;r0)for(var n,r,i=new Array(n),o=0;ot?1:e>=t?0:NaN}var Ht="http://www.w3.org/1999/xhtml",Vt={svg:"http://www.w3.org/2000/svg",xhtml:Ht,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Wt=function(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),Vt.hasOwnProperty(t)?{space:Vt[t],local:e}:e};function Gt(e){return function(){this.removeAttribute(e)}}function qt(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Yt(e,t){return function(){this.setAttribute(e,t)}}function Kt(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Qt(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function Zt(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}var Xt=function(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView};function Jt(e){return function(){this.style.removeProperty(e)}}function en(e,t,n){return function(){this.style.setProperty(e,t,n)}}function tn(e,t,n){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function nn(e,t){return e.style.getPropertyValue(t)||Xt(e).getComputedStyle(e,null).getPropertyValue(t)}function rn(e){return function(){delete this[e]}}function on(e,t){return function(){this[e]=t}}function an(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function un(e){return e.trim().split(/^|\s+/)}function sn(e){return e.classList||new cn(e)}function cn(e){this._node=e,this._names=un(e.getAttribute("class")||"")}function ln(e,t){for(var n=sn(e),r=-1,i=t.length;++r=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function gn(){this.textContent=""}function mn(e){return function(){this.textContent=e}}function vn(e){return function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}}function bn(){this.innerHTML=""}function yn(e){return function(){this.innerHTML=e}}function _n(e){return function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}}function wn(){this.nextSibling&&this.parentNode.appendChild(this)}function Sn(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function On(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Ht&&t.documentElement.namespaceURI===Ht?t.createElement(e):t.createElementNS(n,e)}}function $n(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}var xn=function(e){var t=Wt(e);return(t.local?$n:On)(t)};function En(){return null}function Tn(){var e=this.parentNode;e&&e.removeChild(this)}function Cn(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Nn(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function An(e){return e.trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".");return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}}))}function Mn(e){return function(){var t=this.__on;if(t){for(var n,r=0,i=-1,o=t.length;r=w&&(w=_+1);!(y=m[w])&&++w=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=zt);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o1?this.each((null==t?Jt:"function"===typeof t?tn:en)(e,t,null==n?"":n)):nn(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?rn:"function"===typeof t?an:on)(e,t)):this.node()[e]},classed:function(e,t){var n=un(e+"");if(arguments.length<2){for(var r=sn(this.node()),i=-1,o=n.length;++i>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?hr(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?hr(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=nr.exec(e))?new mr(t[1],t[2],t[3],1):(t=rr.exec(e))?new mr(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=ir.exec(e))?hr(t[1],t[2],t[3],t[4]):(t=or.exec(e))?hr(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=ar.exec(e))?_r(t[1],t[2]/100,t[3]/100,1):(t=ur.exec(e))?_r(t[1],t[2]/100,t[3]/100,t[4]):sr.hasOwnProperty(e)?fr(sr[e]):"transparent"===e?new mr(NaN,NaN,NaN,0):null}function fr(e){return new mr(e>>16&255,e>>8&255,255&e,1)}function hr(e,t,n,r){return r<=0&&(e=t=n=NaN),new mr(e,t,n,r)}function pr(e){return e instanceof Kn||(e=dr(e)),e?new mr((e=e.rgb()).r,e.g,e.b,e.opacity):new mr}function gr(e,t,n,r){return 1===arguments.length?pr(e):new mr(e,t,n,null==r?1:r)}function mr(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function vr(){return"#"+yr(this.r)+yr(this.g)+yr(this.b)}function br(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function yr(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function _r(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Or(e,t,n,r)}function wr(e){if(e instanceof Or)return new Or(e.h,e.s,e.l,e.opacity);if(e instanceof Kn||(e=dr(e)),!e)return new Or;if(e instanceof Or)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,u=o-i,s=(o+i)/2;return u?(a=t===o?(n-r)/u+6*(n0&&s<1?0:a,new Or(a,u,s,e.opacity)}function Sr(e,t,n,r){return 1===arguments.length?wr(e):new Or(e,t,n,null==r?1:r)}function Or(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function $r(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function xr(e,t,n,r,i){var o=e*e,a=o*e;return((1-3*e+3*o-a)*t+(4-6*o+3*a)*n+(1+3*e+3*o-3*a)*r+a*i)/6}qn(Kn,dr,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:cr,formatHex:cr,formatHsl:function(){return wr(this).formatHsl()},formatRgb:lr,toString:lr}),qn(mr,gr,Yn(Kn,{brighter:function(e){return e=null==e?Zn:Math.pow(Zn,e),new mr(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?Qn:Math.pow(Qn,e),new mr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:vr,formatHex:vr,formatRgb:br,toString:br})),qn(Or,Sr,Yn(Kn,{brighter:function(e){return e=null==e?Zn:Math.pow(Zn,e),new Or(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?Qn:Math.pow(Qn,e),new Or(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new mr($r(e>=240?e-240:e+120,i,r),$r(e,i,r),$r(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var Er=function(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],o=e[r+1],a=r>0?e[r-1]:2*i-o,u=r180||n<-180?n-360*Math.round(n/360):n):Cr(isNaN(e)?t:e)}function Mr(e){return 1===(e=+e)?kr:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):Cr(isNaN(t)?n:t)}}function kr(e,t){var n=t-e;return n?Nr(e,n):Cr(isNaN(e)?t:e)}var Pr=function e(t){var n=Mr(t);function r(e,t){var r=n((e=gr(e)).r,(t=gr(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=kr(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function Ir(e){return function(t){var n,r,i=t.length,o=new Array(i),a=new Array(i),u=new Array(i);for(n=0;no&&(i=t.slice(o,i),u[a]?u[a]+=i:u[++a]=i),(n=n[0])===(r=r[0])?u[a]?u[a]+=r:u[++a]=r:(u[++a]=null,s.push({i:a,x:zr(n,r)})),o=Wr.lastIndex;return o=0&&t._call.call(null,e),t=t._next;--Xr}function di(){ni=(ti=ii.now())+ri,Xr=Jr=0;try{li()}finally{Xr=0,function(){var e,t,n=Gr,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:Gr=t);qr=e,hi(r)}(),ni=0}}function fi(){var e=ii.now(),t=e-ti;t>1e3&&(ri-=t,ti=e)}function hi(e){Xr||(Jr&&(Jr=clearTimeout(Jr)),e-ni>24?(e<1/0&&(Jr=setTimeout(di,e-ii.now()-ri)),ei&&(ei=clearInterval(ei))):(ei||(ti=ii.now(),ei=setInterval(fi,1e3)),Xr=1,oi(di)))}si.prototype=ci.prototype={constructor:si,restart:function(e,t,n){if("function"!==typeof e)throw new TypeError("callback is not a function");n=(null==n?ai():+n)+(null==t?0:+t),this._next||qr===this||(qr?qr._next=this:Gr=this,qr=this),this._call=e,this._time=n,hi()},stop:function(){this._call&&(this._call=null,this._time=1/0,hi())}};var pi=function(e,t,n){var r=new si;return t=null==t?0:+t,r.restart((function(n){r.stop(),e(n+t)}),t,n),r},gi=Ot("start","end","cancel","interrupt"),mi=[],vi=function(e,t,n,r,i,o){var a=e.__transition;if(a){if(n in a)return}else e.__transition={};!function(e,t,n){var r,i=e.__transition;function o(e){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=e&&a(e-n.delay)}function a(o){var c,l,d,f;if(1!==n.state)return s();for(c in i)if((f=i[c]).name===n.name){if(3===f.state)return pi(a);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete i[c]):+c0)throw new Error("too late; already scheduled");return n}function yi(e,t){var n=_i(e,t);if(n.state>3)throw new Error("too late; already running");return n}function _i(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}var wi,Si=function(e,t){var n,r,i,o=e.__transition,a=!0;if(o){for(i in t=null==t?null:t+"",o)(n=o[i]).name===t?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete o[i]):a=!1;a&&delete e.__transition}},Oi=180/Math.PI,$i={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},xi=function(e,t,n,r,i,o){var a,u,s;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(s=e*n+t*r)&&(n-=e*s,r-=t*s),(u=Math.sqrt(n*n+r*r))&&(n/=u,r/=u,s/=u),e*r180?t+=360:t-e>180&&(e+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:zr(e,t)})):t&&n.push(i(n)+"rotate("+t+r)}(o.rotate,a.rotate,u,s),function(e,t,n,o){e!==t?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:zr(e,t)}):t&&n.push(i(n)+"skewX("+t+r)}(o.skewX,a.skewX,u,s),function(e,t,n,r,o,a){if(e!==n||t!==r){var u=o.push(i(o)+"scale(",null,",",null,")");a.push({i:u-4,x:zr(e,n)},{i:u-2,x:zr(t,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,u,s),o=a=null,function(e){for(var t,n=-1,r=s.length;++n=0&&(e=e.slice(0,t)),!e||"start"===e}))}(t)?bi:yi;return function(){var a=o(this,e),u=a.on;u!==r&&(i=(r=u).copy()).on(t,n),a.on=i}}var Ki=Bn.prototype.constructor;function Qi(e){return function(){this.style.removeProperty(e)}}function Zi(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function Xi(e,t,n){var r,i;function o(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&Zi(e,o,n)),r}return o._value=t,o}function Ji(e){return function(t){this.textContent=e.call(this,t)}}function eo(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&Ji(r)),t}return r._value=e,r}var to=0;function no(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function ro(e){return Bn().transition(e)}function io(){return++to}var oo=Bn.prototype;function ao(e){return e*e*e}function uo(e){return--e*e*e+1}function so(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}no.prototype=ro.prototype=Object($t.a)({constructor:no,select:function(e){var t=this._name,n=this._id;"function"!==typeof e&&(e=Et(e));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a1&&n.name===t)return new no([[e]],fo,t,+r);return null},po=function(e){return function(){return e}};function go(e,t){var n=t.sourceEvent,r=t.target,i=t.selection,o=t.mode,a=t.dispatch;Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},selection:{value:i,enumerable:!0,configurable:!0},mode:{value:o,enumerable:!0,configurable:!0},_:{value:a}})}function mo(e){e.stopImmediatePropagation()}var vo=function(e){e.preventDefault(),e.stopImmediatePropagation()},bo={name:"drag"},yo={name:"space"},_o={name:"handle"},wo={name:"center"},So=Math.abs,Oo=Math.max,$o=Math.min;function xo(e){return[+e[0],+e[1]]}function Eo(e){return[xo(e[0]),xo(e[1])]}var To={name:"x",handles:["w","e"].map(Ro),input:function(e,t){return null==e?null:[[+e[0],t[0][1]],[+e[1],t[1][1]]]},output:function(e){return e&&[e[0][0],e[1][0]]}},Co={name:"y",handles:["n","s"].map(Ro),input:function(e,t){return null==e?null:[[t[0][0],+e[0]],[t[1][0],+e[1]]]},output:function(e){return e&&[e[0][1],e[1][1]]}},No={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Ro),input:function(e){return null==e?null:Eo(e)},output:function(e){return e}},Ao={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Mo={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},ko={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},Po={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},Io={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Ro(e){return{type:e}}function jo(e){return!e.ctrlKey&&!e.button}function Do(){var e=this.ownerSVGElement||this;return e.hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).x,e.y],[e.x+e.width,e.y+e.height]]:[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]}function Lo(){return navigator.maxTouchPoints||"ontouchstart"in this}function Fo(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function Uo(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}function Bo(e){var t=e.__brush;return t?t.dim.output(t.selection):null}function zo(){return Wo(To)}function Ho(){return Wo(Co)}var Vo=function(){return Wo(No)};function Wo(e){var t,n=Do,r=jo,i=Lo,o=!0,a=Ot("start","brush","end"),u=6;function c(t){var n=t.property("__brush",m).selectAll(".overlay").data([Ro("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Ao.overlay).merge(n).each((function(){var e=Fo(this).extent;zn(this).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1])})),t.selectAll(".selection").data([Ro("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Ao.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=t.selectAll(".handle").data(e.handles,(function(e){return e.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(e){return"handle handle--"+e.type})).attr("cursor",(function(e){return Ao[e.type]})),t.each(l).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",h).filter(i).on("touchstart.brush",h).on("touchmove.brush",p).on("touchend.brush touchcancel.brush",g).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function l(){var e=zn(this),t=Fo(this).selection;t?(e.selectAll(".selection").style("display",null).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1]),e.selectAll(".handle").style("display",null).attr("x",(function(e){return"e"===e.type[e.type.length-1]?t[1][0]-u/2:t[0][0]-u/2})).attr("y",(function(e){return"s"===e.type[0]?t[1][1]-u/2:t[0][1]-u/2})).attr("width",(function(e){return"n"===e.type||"s"===e.type?t[1][0]-t[0][0]+u:u})).attr("height",(function(e){return"e"===e.type||"w"===e.type?t[1][1]-t[0][1]+u:u}))):e.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function d(e,t,n){var r=e.__brush.emitter;return!r||n&&r.clean?new f(e,t,n):r}function f(e,t,n){this.that=e,this.args=t,this.state=e.__brush,this.active=0,this.clean=n}function h(n){if((!t||n.touches)&&r.apply(this,arguments)){var i,a,u,c,f,h,p,g,m,v,b,y=this,_=n.target.__data__.type,w="selection"===(o&&n.metaKey?_="overlay":_)?bo:o&&n.altKey?wo:_o,S=e===Co?null:Po[_],O=e===To?null:Io[_],$=Fo(y),x=$.extent,E=$.selection,T=x[0][0],C=x[0][1],N=x[1][0],A=x[1][1],M=0,k=0,P=S&&O&&o&&n.shiftKey,I=Array.from(n.touches||[n],(function(e){var t=e.identifier;return(e=Zr(e,y)).point0=e.slice(),e.identifier=t,e}));if("overlay"===_){E&&(m=!0);var R=[I[0],I[1]||I[0]];$.selection=E=[[i=e===Co?T:$o(R[0][0],R[1][0]),u=e===To?C:$o(R[0][1],R[1][1])],[f=e===Co?N:Oo(R[0][0],R[1][0]),p=e===To?A:Oo(R[0][1],R[1][1])]],I.length>1&&B()}else i=E[0][0],u=E[0][1],f=E[1][0],p=E[1][1];a=i,c=u,h=f,g=p;var j=zn(y).attr("pointer-events","none"),D=j.selectAll(".overlay").attr("cursor",Ao[_]);Si(y);var L=d(y,arguments,!0).beforestart();if(n.touches)L.moved=U,L.ended=z;else{var F=zn(n.view).on("mousemove.brush",U,!0).on("mouseup.brush",z,!0);o&&F.on("keydown.brush",H,!0).on("keyup.brush",V,!0),Wn(n.view)}l.call(y),L.start(n,w.name)}function U(e){var t,n=Object(s.a)(e.changedTouches||[e]);try{for(n.s();!(t=n.n()).done;){var r,i=t.value,o=Object(s.a)(I);try{for(o.s();!(r=o.n()).done;){var a=r.value;a.identifier===i.identifier&&(a.cur=Zr(i,y))}}catch(f){o.e(f)}finally{o.f()}}}catch(f){n.e(f)}finally{n.f()}if(P&&!v&&!b&&1===I.length){var u=I[0];So(u.cur[0]-u[0])>So(u.cur[1]-u[1])?b=!0:v=!0}var c,l=Object(s.a)(I);try{for(l.s();!(c=l.n()).done;){var d=c.value;d.cur&&(d[0]=d.cur[0],d[1]=d.cur[1])}}catch(f){l.e(f)}finally{l.f()}m=!0,vo(e),B(e)}function B(e){var t,n=I[0],r=n.point0;switch(M=n[0]-r[0],k=n[1]-r[1],w){case yo:case bo:S&&(M=Oo(T-i,$o(N-f,M)),a=i+M,h=f+M),O&&(k=Oo(C-u,$o(A-p,k)),c=u+k,g=p+k);break;case _o:I[1]?(S&&(a=Oo(T,$o(N,I[0][0])),h=Oo(T,$o(N,I[1][0])),S=1),O&&(c=Oo(C,$o(A,I[0][1])),g=Oo(C,$o(A,I[1][1])),O=1)):(S<0?(M=Oo(T-i,$o(N-i,M)),a=i+M,h=f):S>0&&(M=Oo(T-f,$o(N-f,M)),a=i,h=f+M),O<0?(k=Oo(C-u,$o(A-u,k)),c=u+k,g=p):O>0&&(k=Oo(C-p,$o(A-p,k)),c=u,g=p+k));break;case wo:S&&(a=Oo(T,$o(N,i-M*S)),h=Oo(T,$o(N,f+M*S))),O&&(c=Oo(C,$o(A,u-k*O)),g=Oo(C,$o(A,p+k*O)))}h0&&(i=a-M),O<0?p=g-k:O>0&&(u=c-k),w=yo,D.attr("cursor",Ao.selection),B());break;default:return}vo(e)}function V(e){switch(e.keyCode){case 16:P&&(v=b=P=!1,B());break;case 18:w===wo&&(S<0?f=h:S>0&&(i=a),O<0?p=g:O>0&&(u=c),w=_o,B());break;case 32:w===yo&&(e.altKey?(S&&(f=h-M*S,i=a+M*S),O&&(p=g-k*O,u=c+k*O),w=wo):(S<0?f=h:S>0&&(i=a),O<0?p=g:O>0&&(u=c),w=_o),D.attr("cursor",Ao[_]),B());break;default:return}vo(e)}}function p(e){d(this,arguments).moved(e)}function g(e){d(this,arguments).ended(e)}function m(){var t=this.__brush||{selection:null};return t.extent=Eo(n.apply(this,arguments)),t.dim=e,t}return c.move=function(t,n){t.tween?t.on("start.brush",(function(e){d(this,arguments).beforestart().start(e)})).on("interrupt.brush end.brush",(function(e){d(this,arguments).end(e)})).tween("brush",(function(){var t=this,r=t.__brush,i=d(t,arguments),o=r.selection,a=e.input("function"===typeof n?n.apply(this,arguments):n,r.extent),u=Kr(o,a);function s(e){r.selection=1===e&&null===a?null:u(e),l.call(t),i.brush()}return null!==o&&null!==a?s:s(1)})):t.each((function(){var t=this,r=arguments,i=t.__brush,o=e.input("function"===typeof n?n.apply(t,r):n,i.extent),a=d(t,r).beforestart();Si(t),i.selection=null===o?null:o,l.call(t),a.start().brush().end()}))},c.clear=function(e){c.move(e,null)},f.prototype={beforestart:function(){return 1===++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(e,t){return this.starting?(this.starting=!1,this.emit("start",e,t)):this.emit("brush",e),this},brush:function(e,t){return this.emit("brush",e,t),this},end:function(e,t){return 0===--this.active&&(delete this.state.emitter,this.emit("end",e,t)),this},emit:function(t,n,r){var i=zn(this.that).datum();a.call(t,this.that,new go(t,{sourceEvent:n,target:c,selection:e.output(this.state.selection),mode:r,dispatch:a}),i)}},c.extent=function(e){return arguments.length?(n="function"===typeof e?e:po(Eo(e)),c):n},c.filter=function(e){return arguments.length?(r="function"===typeof e?e:po(!!e),c):r},c.touchable=function(e){return arguments.length?(i="function"===typeof e?e:po(!!e),c):i},c.handleSize=function(e){return arguments.length?(u=+e,c):u},c.keyModifiers=function(e){return arguments.length?(o=!!e,c):o},c.on=function(){var e=a.on.apply(a,arguments);return e===a?c:e},c}var Go=Math.abs,qo=Math.cos,Yo=Math.sin,Ko=Math.PI,Qo=Ko/2,Zo=2*Ko,Xo=Math.max,Jo=1e-12;function ea(e,t){return Array.from({length:t-e},(function(t,n){return e+n}))}function ta(e){return function(t,n){return e(t.source.value+t.target.value,n.source.value+n.target.value)}}var na=function(){return oa(!1,!1)};function ra(){return oa(!1,!0)}function ia(){return oa(!0,!1)}function oa(e,t){var n=0,r=null,i=null,o=null;function a(a){var u,c=a.length,l=new Array(c),d=ea(0,c),f=new Array(c*c),h=new Array(c),p=0;a=Float64Array.from({length:c*c},t?function(e,t){return a[t%c][t/c|0]}:function(e,t){return a[t/c|0][t%c]});for(var g=0;gsa)if(Math.abs(l*u-s*c)>sa&&i){var f=n-o,h=r-a,p=u*u+s*s,g=f*f+h*h,m=Math.sqrt(p),v=Math.sqrt(d),b=i*Math.tan((aa-Math.acos((p+d-g)/(2*m*v)))/2),y=b/v,_=b/m;Math.abs(y-1)>sa&&(this._+="L"+(e+y*c)+","+(t+y*l)),this._+="A"+i+","+i+",0,0,"+ +(l*f>c*h)+","+(this._x1=e+_*u)+","+(this._y1=t+_*s)}else this._+="L"+(this._x1=e)+","+(this._y1=t);else;},arc:function(e,t,n,r,i,o){e=+e,t=+t,o=!!o;var a=(n=+n)*Math.cos(r),u=n*Math.sin(r),s=e+a,c=t+u,l=1^o,d=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+s+","+c:(Math.abs(this._x1-s)>sa||Math.abs(this._y1-c)>sa)&&(this._+="L"+s+","+c),n&&(d<0&&(d=d%ua+ua),d>ca?this._+="A"+n+","+n+",0,1,"+l+","+(e-a)+","+(t-u)+"A"+n+","+n+",0,1,"+l+","+(this._x1=s)+","+(this._y1=c):d>sa&&(this._+="A"+n+","+n+",0,"+ +(d>=aa)+","+l+","+(this._x1=e+n*Math.cos(i))+","+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var fa=da,ha=Array.prototype.slice,pa=function(e){return function(){return e}};function ga(e){return e.source}function ma(e){return e.target}function va(e){return e.radius}function ba(e){return e.startAngle}function ya(e){return e.endAngle}function _a(){return 0}function wa(){return 10}function Sa(e){var t=ga,n=ma,r=va,i=va,o=ba,a=ya,u=_a,s=null;function c(){var c,l=t.apply(this,arguments),d=n.apply(this,arguments),f=u.apply(this,arguments)/2,h=ha.call(arguments),p=+r.apply(this,(h[0]=l,h)),g=o.apply(this,h)-Qo,m=a.apply(this,h)-Qo,v=+i.apply(this,(h[0]=d,h)),b=o.apply(this,h)-Qo,y=a.apply(this,h)-Qo;if(s||(s=c=fa()),f>Jo&&(Go(m-g)>2*f+Jo?m>g?(g+=f,m-=f):(g-=f,m+=f):g=m=(g+m)/2,Go(y-b)>2*f+Jo?y>b?(b+=f,y-=f):(b-=f,y+=f):b=y=(b+y)/2),s.moveTo(p*qo(g),p*Yo(g)),s.arc(0,0,p,g,m),g!==b||m!==y)if(e){var _=+e.apply(this,arguments),w=v-_,S=(b+y)/2;s.quadraticCurveTo(0,0,w*qo(b),w*Yo(b)),s.lineTo(v*qo(S),v*Yo(S)),s.lineTo(w*qo(y),w*Yo(y))}else s.quadraticCurveTo(0,0,v*qo(b),v*Yo(b)),s.arc(0,0,v,b,y);if(s.quadraticCurveTo(0,0,p*qo(g),p*Yo(g)),s.closePath(),c)return s=null,c+""||null}return e&&(c.headRadius=function(t){return arguments.length?(e="function"===typeof t?t:pa(+t),c):e}),c.radius=function(e){return arguments.length?(r=i="function"===typeof e?e:pa(+e),c):r},c.sourceRadius=function(e){return arguments.length?(r="function"===typeof e?e:pa(+e),c):r},c.targetRadius=function(e){return arguments.length?(i="function"===typeof e?e:pa(+e),c):i},c.startAngle=function(e){return arguments.length?(o="function"===typeof e?e:pa(+e),c):o},c.endAngle=function(e){return arguments.length?(a="function"===typeof e?e:pa(+e),c):a},c.padAngle=function(e){return arguments.length?(u="function"===typeof e?e:pa(+e),c):u},c.source=function(e){return arguments.length?(t=e,c):t},c.target=function(e){return arguments.length?(n=e,c):n},c.context=function(e){return arguments.length?(s=null==e?null:e,c):s},c}var Oa=function(){return Sa()};function $a(){return Sa(wa)}var xa=Math.PI/180,Ea=180/Math.PI,Ta=.96422,Ca=.82521,Na=4/29,Aa=6/29,Ma=3*Aa*Aa;function ka(e){if(e instanceof Ra)return new Ra(e.l,e.a,e.b,e.opacity);if(e instanceof Ha)return Va(e);e instanceof mr||(e=pr(e));var t,n,r=Fa(e.r),i=Fa(e.g),o=Fa(e.b),a=ja((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?t=n=a:(t=ja((.4360747*r+.3850649*i+.1430804*o)/Ta),n=ja((.0139322*r+.0971045*i+.7141733*o)/Ca)),new Ra(116*a-16,500*(t-a),200*(a-n),e.opacity)}function Pa(e,t){return new Ra(e,0,0,null==t?1:t)}function Ia(e,t,n,r){return 1===arguments.length?ka(e):new Ra(e,t,n,null==r?1:r)}function Ra(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function ja(e){return e>.008856451679035631?Math.pow(e,1/3):e/Ma+Na}function Da(e){return e>Aa?e*e*e:Ma*(e-Na)}function La(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Fa(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Ua(e){if(e instanceof Ha)return new Ha(e.h,e.c,e.l,e.opacity);if(e instanceof Ra||(e=ka(e)),0===e.a&&0===e.b)return new Ha(NaN,0r!==h>r&&n<(f-c)*(r-l)/(h-l)+c&&(i=-i)}return i}function uu(e,t,n){var r,i,o,a;return function(e,t,n){return(t[0]-e[0])*(n[1]-e[1])===(n[0]-e[0])*(t[1]-e[1])}(e,t,n)&&(i=e[r=+(e[0]===t[0])],o=n[r],a=t[r],i<=o&&o<=a||a<=o&&o<=i)}var su=function(){},cu=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]],lu=function(){var e=1,t=1,n=pe,r=u;function i(e){var t=n(e);if(Array.isArray(t))t=t.slice().sort(ru);else{var r=C(e),i=r[0],a=r[1];t=fe(i,a,t),t=Pe(Math.floor(i/t)*t,Math.floor(a/t)*t,t)}return t.map((function(t){return o(e,t)}))}function o(n,i){var o=[],u=[];return function(n,r,i){var o,u,s,c,l,d,f=new Array,h=new Array;o=u=-1,c=n[0]>=r,cu[c<<1].forEach(p);for(;++o=r,cu[s|c<<1].forEach(p);cu[c<<0].forEach(p);for(;++u=r,l=n[u*e]>=r,cu[c<<1|l<<2].forEach(p);++o=r,d=l,l=n[u*e+o+1]>=r,cu[s|c<<1|l<<2|d<<3].forEach(p);cu[c|l<<3].forEach(p)}o=-1,l=n[u*e]>=r,cu[l<<2].forEach(p);for(;++o=r,cu[l<<2|d<<3].forEach(p);function p(e){var t,n,r=[e[0][0]+o,e[0][1]+u],s=[e[1][0]+o,e[1][1]+u],c=a(r),l=a(s);(t=h[c])?(n=f[l])?(delete h[t.end],delete f[n.start],t===n?(t.ring.push(s),i(t.ring)):f[t.start]=h[n.end]={start:t.start,end:n.end,ring:t.ring.concat(n.ring)}):(delete h[t.end],t.ring.push(s),h[t.end=l]=t):(t=f[l])?(n=h[c])?(delete f[t.start],delete h[n.end],t===n?(t.ring.push(s),i(t.ring)):f[n.start]=h[t.end]={start:n.start,end:t.end,ring:n.ring.concat(t.ring)}):(delete f[t.start],t.ring.unshift(r),f[t.start=c]=t):f[c]=h[l]={start:c,end:l,ring:[r,s]}}cu[l<<3].forEach(p)}(n,i,(function(e){r(e,n,i),function(e){for(var t=0,n=e.length,r=e[n-1][1]*e[0][0]-e[n-1][0]*e[0][1];++t0?o.push([e]):u.push(e)})),u.forEach((function(e){for(var t,n=0,r=o.length;n0&&a0&&u=0&&o>=0))throw new Error("invalid size");return e=r,t=o,i},i.thresholds=function(e){return arguments.length?(n="function"===typeof e?e:Array.isArray(e)?iu(nu.call(e)):iu(e),i):n},i.smooth=function(e){return arguments.length?(r=e?u:su,i):r===u},i};function du(e,t,n){for(var r=e.width,i=e.height,o=1+(n<<1),a=0;a=n&&(u>=o&&(s-=e.data[u-o+a*r]),t.data[u-n+a*r]=s/Math.min(u+1,r-1+o-u,o))}function fu(e,t,n){for(var r=e.width,i=e.height,o=1+(n<<1),a=0;a=n&&(u>=o&&(s-=e.data[a+(u-o)*r]),t.data[a+(u-n)*r]=s/Math.min(u+1,i-1+o-u,o))}function hu(e){return e[0]}function pu(e){return e[1]}function gu(){return 1}var mu=function(){var e=hu,t=pu,n=gu,r=960,i=500,o=20,a=2,u=3*o,s=r+2*u>>a,c=i+2*u>>a,l=iu(20);function d(r){var i=new Float32Array(s*c),d=new Float32Array(s*c);r.forEach((function(r,o,l){var d=+e(r,o,l)+u>>a,f=+t(r,o,l)+u>>a,h=+n(r,o,l);d>=0&&d=0&&f>a),fu({width:s,height:c,data:d},{width:s,height:c,data:i},o>>a),du({width:s,height:c,data:i},{width:s,height:c,data:d},o>>a),fu({width:s,height:c,data:d},{width:s,height:c,data:i},o>>a),du({width:s,height:c,data:i},{width:s,height:c,data:d},o>>a),fu({width:s,height:c,data:d},{width:s,height:c,data:i},o>>a);var h=l(i);if(!Array.isArray(h)){var p=me(i);h=fe(0,p,h),(h=Pe(0,Math.floor(p/h)*h,h)).shift()}return lu().thresholds(h).size([s,c])(i).map(f)}function f(e){return e.value*=Math.pow(2,-2*a),e.coordinates.forEach(h),e}function h(e){e.forEach(p)}function p(e){e.forEach(g)}function g(e){e[0]=e[0]*Math.pow(2,a)-u,e[1]=e[1]*Math.pow(2,a)-u}function m(){return s=r+2*(u=3*o)>>a,c=i+2*u>>a,d}return d.x=function(t){return arguments.length?(e="function"===typeof t?t:iu(+t),d):e},d.y=function(e){return arguments.length?(t="function"===typeof e?e:iu(+e),d):t},d.weight=function(e){return arguments.length?(n="function"===typeof e?e:iu(+e),d):n},d.size=function(e){if(!arguments.length)return[r,i];var t=+e[0],n=+e[1];if(!(t>=0&&n>=0))throw new Error("invalid size");return r=t,i=n,m()},d.cellSize=function(e){if(!arguments.length)return 1<=1))throw new Error("invalid cell size");return a=Math.floor(Math.log(e)/Math.LN2),m()},d.thresholds=function(e){return arguments.length?(l="function"===typeof e?e:Array.isArray(e)?iu(nu.call(e)):iu(e),d):l},d.bandwidth=function(e){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((e=+e)>=0))throw new Error("invalid bandwidth");return o=Math.round((Math.sqrt(4*e*e+1)-1)/2),m()},d},vu=Math.pow(2,-52),bu=new Uint32Array(512),yu=function(){function e(t){Object(N.a)(this,e);var n=t.length>>1;if(n>0&&"number"!==typeof t[0])throw new Error("Expected coords to contain numbers.");this.coords=t;var r=Math.max(2*n-5,0);this._triangles=new Uint32Array(3*r),this._halfedges=new Int32Array(3*r),this._hashSize=Math.ceil(Math.sqrt(n)),this._hullPrev=new Uint32Array(n),this._hullNext=new Uint32Array(n),this._hullTri=new Uint32Array(n),this._hullHash=new Int32Array(this._hashSize).fill(-1),this._ids=new Uint32Array(n),this._dists=new Float64Array(n),this.update()}return Object(A.a)(e,[{key:"update",value:function(){for(var e=this.coords,t=this._hullPrev,n=this._hullNext,r=this._hullTri,i=this._hullHash,o=e.length>>1,a=1/0,u=1/0,s=-1/0,c=-1/0,l=0;ls&&(s=d),f>c&&(c=f),this._ids[l]=l}for(var h,p,g,m=(a+s)/2,v=(u+c)/2,b=1/0,y=0;y0&&(p=O,b=$)}for(var x=e[2*p],E=e[2*p+1],T=1/0,C=0;Cj&&(P[I++]=D,j=this._dists[D])}return this.hull=P.subarray(0,I),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if(Su(w,S,x,E,A,M)){var L=p,F=x,U=E;p=g,x=A,E=M,g=L,A=F,M=U}var B=function(e,t,n,r,i,o){var a=n-e,u=r-t,s=i-e,c=o-t,l=a*a+u*u,d=s*s+c*c,f=.5/(a*c-u*s);return{x:e+(c*l-u*d)*f,y:t+(a*d-s*l)*f}}(w,S,x,E,A,M);this._cx=B.x,this._cy=B.y;for(var z=0;z0&&Math.abs(Y-V)<=vu&&Math.abs(K-W)<=vu)&&(V=Y,W=K,q!==h&&q!==p&&q!==g)){for(var Q=0,Z=0,X=this._hashKey(Y,K);Z0?3-n:1+n)/4}(e-this._cx,t-this._cy)*this._hashSize)%this._hashSize}},{key:"_legalize",value:function(e){for(var t=this._triangles,n=this._halfedges,r=this.coords,i=0,o=0;;){var a=n[e],u=e-e%3;if(o=u+(e+2)%3,-1!==a){var s=a-a%3,c=u+(e+1)%3,l=s+(a+2)%3,d=t[o],f=t[e],h=t[c],p=t[l];if(Ou(r[2*d],r[2*d+1],r[2*f],r[2*f+1],r[2*h],r[2*h+1],r[2*p],r[2*p+1])){t[e]=p,t[a]=d;var g=n[l];if(-1===g){var m=this._hullStart;do{if(this._hullTri[m]===l){this._hullTri[m]=e;break}m=this._hullPrev[m]}while(m!==this._hullStart)}this._link(e,g),this._link(a,n[o]),this._link(o,l);var v=s+(a+1)%3;i1&&void 0!==arguments[1]?arguments[1]:Tu,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Cu,i=t.length,o=new Float64Array(2*i),a=0;a=33306690738754716e-32*Math.abs(a+u)?a-u:0}function Su(e,t,n,r,i,o){return(wu(i,o,e,t,n,r)||wu(e,t,n,r,i,o)||wu(n,r,i,o,e,t))<0}function Ou(e,t,n,r,i,o,a,u){var s=e-a,c=t-u,l=n-a,d=r-u,f=i-a,h=o-u,p=l*l+d*d,g=f*f+h*h;return s*(d*g-p*h)-c*(l*g-p*f)+(s*s+c*c)*(l*h-d*f)<0}function $u(e,t,n,r,i,o){var a=n-e,u=r-t,s=i-e,c=o-t,l=a*a+u*u,d=s*s+c*c,f=.5/(a*c-u*s),h=(c*l-u*d)*f,p=(a*d-s*l)*f;return h*h+p*p}function xu(e,t,n,r){if(r-n<=20)for(var i=n+1;i<=r;i++){for(var o=e[i],a=t[o],u=i-1;u>=n&&t[e[u]]>a;)e[u+1]=e[u--];e[u+1]=o}else{var s=n+1,c=r;Eu(e,n+r>>1,s),t[e[n]]>t[e[r]]&&Eu(e,n,r),t[e[s]]>t[e[r]]&&Eu(e,s,r),t[e[n]]>t[e[s]]&&Eu(e,n,s);for(var l=e[s],d=t[l];;){do{s++}while(t[e[s]]d);if(c=c-n?(xu(e,t,s,r),xu(e,t,n,c-1)):(xu(e,t,n,c-1),xu(e,t,s,r))}}function Eu(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function Tu(e){return e[0]}function Cu(e){return e[1]}var Nu=1e-6,Au=function(){function e(){Object(N.a)(this,e),this._x0=this._y0=this._x1=this._y1=null,this._=""}return Object(A.a)(e,[{key:"moveTo",value:function(e,t){this._+="M".concat(this._x0=this._x1=+e,",").concat(this._y0=this._y1=+t)}},{key:"closePath",value:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}},{key:"lineTo",value:function(e,t){this._+="L".concat(this._x1=+e,",").concat(this._y1=+t)}},{key:"arc",value:function(e,t,n){var r=(e=+e)+(n=+n),i=t=+t;if(n<0)throw new Error("negative radius");null===this._x1?this._+="M".concat(r,",").concat(i):(Math.abs(this._x1-r)>Nu||Math.abs(this._y1-i)>Nu)&&(this._+="L"+r+","+i),n&&(this._+="A".concat(n,",").concat(n,",0,1,1,").concat(e-n,",").concat(t,"A").concat(n,",").concat(n,",0,1,1,").concat(this._x1=r,",").concat(this._y1=i))}},{key:"rect",value:function(e,t,n,r){this._+="M".concat(this._x0=this._x1=+e,",").concat(this._y0=this._y1=+t,"h").concat(+n,"v").concat(+r,"h").concat(-n,"Z")}},{key:"value",value:function(){return this._||null}}]),e}(),Mu=function(){function e(){Object(N.a)(this,e),this._=[]}return Object(A.a)(e,[{key:"moveTo",value:function(e,t){this._.push([e,t])}},{key:"closePath",value:function(){this._.push(this._[0].slice())}},{key:"lineTo",value:function(e,t){this._.push([e,t])}},{key:"value",value:function(){return this._.length?this._:null}}]),e}(),ku=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,960,500],r=Object(P.a)(n,4),i=r[0],o=r[1],a=r[2],u=r[3];if(Object(N.a)(this,e),!((a=+a)>=(i=+i))||!((u=+u)>=(o=+o)))throw new Error("invalid bounds");this.delaunay=t,this._circumcenters=new Float64Array(2*t.points.length),this.vectors=new Float64Array(2*t.points.length),this.xmax=a,this.xmin=i,this.ymax=u,this.ymin=o,this._init()}return Object(A.a)(e,[{key:"update",value:function(){return this.delaunay.update(),this._init(),this}},{key:"_init",value:function(){for(var e,t,n=this.delaunay,r=n.points,i=n.hull,o=n.triangles,a=this.vectors,u=this.circumcenters=this._circumcenters.subarray(0,o.length/3*2),s=0,c=0,l=o.length;s1;)i-=2;for(var o=2;o4)for(var u=0;u0){if(t>=this.ymax)return null;(i=(this.ymax-t)/r)0){if(e>=this.xmax)return null;(i=(this.xmax-e)/n)this.xmax?2:0)|(tthis.ymax?8:0)}}]),e}(),Pu=u.a.mark(Bu),Iu=2*Math.PI,Ru=Math.pow;function ju(e){return e[0]}function Du(e){return e[1]}function Lu(e,t,n){return[e+Math.sin(e+t)*n,t+Math.cos(e-t)*n]}var Fu=function(){function e(t){Object(N.a)(this,e),this._delaunator=new yu(t),this.inedges=new Int32Array(t.length/2),this._hullIndex=new Int32Array(t.length/2),this.points=this._delaunator.coords,this._init()}return Object(A.a)(e,[{key:"update",value:function(){return this._delaunator.update(),this._init(),this}},{key:"_init",value:function(){var e=this._delaunator,t=this.points;if(e.hull&&e.hull.length>2&&function(e){for(var t=e.triangles,n=e.coords,r=0;r1e-10)return!1}return!0}(e)){this.collinear=Int32Array.from({length:t.length/2},(function(e,t){return t})).sort((function(e,n){return t[2*e]-t[2*n]||t[2*e+1]-t[2*n+1]}));for(var n=this.collinear[0],r=this.collinear[this.collinear.length-1],i=[t[2*n],t[2*n+1],t[2*r],t[2*r+1]],o=1e-8*Math.hypot(i[3]-i[1],i[2]-i[0]),a=0,u=t.length/2;a0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=l[0],this.triangles[1]=l[1],this.triangles[2]=l[1],f[l[0]]=1,2===l.length&&(f[l[1]]=0))}},{key:"voronoi",value:function(e){return new ku(this,e)}},{key:"neighbors",value:u.a.mark((function e(t){var n,r,i,o,a,s,c,l,d,f,h;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.inedges,r=this.hull,i=this._hullIndex,o=this.halfedges,a=this.triangles,!(s=this.collinear)){e.next=10;break}if(!((c=s.indexOf(t))>0)){e.next=6;break}return e.next=6,s[c-1];case 6:if(!(c2&&void 0!==arguments[2]?arguments[2]:0;if((e=+e)!==e||(t=+t)!==t)return-1;for(var r,i=n;(r=this._step(n,e,t))>=0&&r!==n&&r!==i;)n=r;return r}},{key:"_step",value:function(e,t,n){var r=this.inedges,i=this.hull,o=this._hullIndex,a=this.halfedges,u=this.triangles,s=this.points;if(-1===r[e]||!s.length)return(e+1)%(s.length>>1);var c=e,l=Ru(t-s[2*e],2)+Ru(n-s[2*e+1],2),d=r[e],f=d;do{var h=u[f],p=Ru(t-s[2*h],2)+Ru(n-s[2*h+1],2);if(p1&&void 0!==arguments[1]?arguments[1]:2,n=null==e?e=new Au:void 0,r=this.points,i=0,o=r.length;i1&&void 0!==arguments[1]?arguments[1]:ju,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Du,i=arguments.length>3?arguments[3]:void 0;return new e("length"in t?Uu(t,n,r,i):Float64Array.from(Bu(t,n,r,i)))}}]),e}();function Uu(e,t,n,r){for(var i=e.length,o=new Float64Array(2*i),a=0;ad}s.mouse("drag",r)}function g(e){zn(e.view).on("mousemove.drag mouseup.drag",null),Gn(e.view,n),Vn(e),s.mouse("end",e)}function m(e,t){if(i.call(this,e,t)){var n,r,a=e.changedTouches,u=o.call(this,e,t),s=a.length;for(n=0;n9999?"+"+Ju(t,6):Ju(t,4))+"-"+Ju(e.getUTCMonth()+1,2)+"-"+Ju(e.getUTCDate(),2)+(o?"T"+Ju(n,2)+":"+Ju(r,2)+":"+Ju(i,2)+"."+Ju(o,3)+"Z":i?"T"+Ju(n,2)+":"+Ju(r,2)+":"+Ju(i,2)+"Z":r||n?"T"+Ju(n,2)+":"+Ju(r,2)+"Z":"")}var ts=function(e){var t=new RegExp('["'+e+"\n\r]"),n=e.charCodeAt(0);function r(e,t){var r,i=[],o=e.length,a=0,u=0,s=o<=0,c=!1;function l(){if(s)return Qu;if(c)return c=!1,Ku;var t,r,i=a;if(34===e.charCodeAt(i)){for(;a++=o?s=!0:10===(r=e.charCodeAt(a++))?c=!0:13===r&&(c=!0,10===e.charCodeAt(a)&&++a),e.slice(i+1,t-1).replace(/""/g,'"')}for(;a=(o=(g+v)/2))?g=o:v=o,(l=n>=(a=(m+b)/2))?m=a:b=a,i=h,!(h=h[d=l<<1|c]))return i[d]=p,e;if(u=+e._x.call(null,h.data),s=+e._y.call(null,h.data),t===u&&n===s)return p.next=h,i?i[d]=p:e._root=p,e;do{i=i?i[d]=new Array(4):e._root=new Array(4),(c=t>=(o=(g+v)/2))?g=o:v=o,(l=n>=(a=(m+b)/2))?m=a:b=a}while((d=l<<1|c)===(f=(s>=a)<<1|u>=o));return i[f]=h,i[d]=p,e}var vc=function(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i};function bc(e){return e[0]}function yc(e){return e[1]}function _c(e,t,n){var r=new wc(null==t?bc:t,null==n?yc:n,NaN,NaN,NaN,NaN);return null==e?r:r.addAll(e)}function wc(e,t,n,r,i,o){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function Sc(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var Oc=_c.prototype=wc.prototype;Oc.copy=function(){var e,t,n=new wc(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=Sc(r),n;for(e=[{source:r,target:n._root=new Array(4)}];r=e.pop();)for(var i=0;i<4;++i)(t=r.source[i])&&(t.length?e.push({source:t,target:r.target[i]=new Array(4)}):r.target[i]=Sc(t));return n},Oc.add=function(e){var t=+this._x.call(null,e),n=+this._y.call(null,e);return mc(this.cover(t,n),t,n,e)},Oc.addAll=function(e){var t,n,r,i,o=e.length,a=new Array(o),u=new Array(o),s=1/0,c=1/0,l=-1/0,d=-1/0;for(n=0;nl&&(l=r),id&&(d=i));if(s>l||c>d)return this;for(this.cover(s,c).cover(l,d),n=0;ne||e>=i||r>t||t>=o;)switch(u=(tf||(o=s.y0)>h||(a=s.x1)=v)<<1|e>=m)&&(s=p[p.length-1],p[p.length-1]=p[p.length-1-c],p[p.length-1-c]=s)}else{var b=e-+this._x.call(null,g.data),y=t-+this._y.call(null,g.data),_=b*b+y*y;if(_=(u=(p+m)/2))?p=u:m=u,(l=a>=(s=(g+v)/2))?g=s:v=s,t=h,!(h=h[d=l<<1|c]))return this;if(!h.length)break;(t[d+1&3]||t[d+2&3]||t[d+3&3])&&(n=t,f=d)}for(;h.data!==e;)if(r=h,!(h=h.next))return this;return(i=h.next)&&delete h.next,r?(i?r.next=i:delete r.next,this):t?(i?t[d]=i:delete t[d],(h=t[0]||t[1]||t[2]||t[3])&&h===(t[3]||t[2]||t[1]||t[0])&&!h.length&&(n?n[f]=h:this._root=h),this):(this._root=i,this)},Oc.removeAll=function(e){for(var t=0,n=e.length;tc+p||ol+p||as.index){var g=c-u.x-u.vx,m=l-u.y-u.vy,v=g*g+m*m;ve.r&&(e.r=e[t].r)}function s(){if(t){var r,i,o=t.length;for(n=new Array(o),r=0;r1?(null==n?u.delete(e):u.set(e,p(n)),t):u.get(e)},find:function(t,n,r){var i,o,a,u,s,c=0,l=e.length;for(null==r?r=1/0:r*=r,c=0;c1?(c.on(e,n),t):c.on(e)}}},Dc=function(){var e,t,n,r,i,o=$c(-30),a=1,u=1/0,s=.81;function c(n){var i,o=e.length,a=_c(e,Pc,Ic).visitAfter(d);for(r=n,i=0;i=u)){(e.data!==t||e.next)&&(0===d&&(p+=(d=xc(n))*d),0===f&&(p+=(f=xc(n))*f),p1?r[0]+r.slice(2):r,+e.slice(n+1)]}var zc=function(e){return(e=Bc(Math.abs(e)))?e[1]:NaN},Hc=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Vc(e){if(!(t=Hc.exec(e)))throw new Error("invalid format: "+e);var t;return new Wc({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Wc(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}Vc.prototype=Wc.prototype,Wc.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Gc,qc,Yc,Kc,Qc=function(e,t){var n=Bc(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")},Zc={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return Qc(100*e,t)},r:Qc,s:function(e,t){var n=Bc(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(Gc=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Bc(e,Math.max(0,t+o-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}},Xc=function(e){return e},Jc=Array.prototype.map,el=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"],tl=function(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?Xc:(t=Jc.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var i=e.length,o=[],a=0,u=t[0],s=0;i>0&&u>0&&(s+u+1>r&&(u=Math.max(1,r-s)),o.push(e.substring(i-=u,i+u)),!((s+=u+1)>r));)u=t[a=(a+1)%t.length];return o.reverse().join(n)}),i=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",a=void 0===e.decimal?".":e.decimal+"",u=void 0===e.numerals?Xc:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(Jc.call(e.numerals,String)),s=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"\u2212":e.minus+"",l=void 0===e.nan?"NaN":e.nan+"";function d(e){var t=(e=Vc(e)).fill,n=e.align,d=e.sign,f=e.symbol,h=e.zero,p=e.width,g=e.comma,m=e.precision,v=e.trim,b=e.type;"n"===b?(g=!0,b="g"):Zc[b]||(void 0===m&&(m=12),v=!0,b="g"),(h||"0"===t&&"="===n)&&(h=!0,t="0",n="=");var y="$"===f?i:"#"===f&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",_="$"===f?o:/[%p]/.test(b)?s:"",w=Zc[b],S=/[defgprs%]/.test(b);function O(e){var i,o,s,f=y,O=_;if("c"===b)O=w(e)+O,e="";else{var $=(e=+e)<0||1/e<0;if(e=isNaN(e)?l:w(Math.abs(e),m),v&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),$&&0===+e&&"+"!==d&&($=!1),f=($?"("===d?d:c:"-"===d||"("===d?"":d)+f,O=("s"===b?el[8+Gc/3]:"")+O+($&&"("===d?")":""),S)for(i=-1,o=e.length;++i(s=e.charCodeAt(i))||s>57){O=(46===s?a+e.slice(i+1):e.slice(i))+O,e=e.slice(0,i);break}}g&&!h&&(e=r(e,1/0));var x=f.length+e.length+O.length,E=x>1)+f+e+O+E.slice(x);break;default:e=E+f+e+O}return u(e)}return m=void 0===m?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),O.toString=function(){return e+""},O}return{format:d,formatPrefix:function(e,t){var n=d(((e=Vc(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(zc(t)/3))),i=Math.pow(10,-r),o=el[8+r/3];return function(e){return n(i*e)+o}}}};function nl(e){return qc=tl(e),Yc=qc.format,Kc=qc.formatPrefix,qc}nl({thousands:",",grouping:[3],currency:["$",""]});var rl=function(e){return Math.max(0,-zc(Math.abs(e)))},il=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(zc(t)/3)))-zc(Math.abs(e)))},ol=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,zc(t)-zc(e))+1},al=1e-6,ul=1e-12,sl=Math.PI,cl=sl/2,ll=sl/4,dl=2*sl,fl=180/sl,hl=sl/180,pl=Math.abs,gl=Math.atan,ml=Math.atan2,vl=Math.cos,bl=Math.ceil,yl=Math.exp,_l=(Math.floor,Math.hypot),wl=Math.log,Sl=Math.pow,Ol=Math.sin,$l=Math.sign||function(e){return e>0?1:e<0?-1:0},xl=Math.sqrt,El=Math.tan;function Tl(e){return e>1?0:e<-1?sl:Math.acos(e)}function Cl(e){return e>1?cl:e<-1?-cl:Math.asin(e)}function Nl(e){return(e=Ol(e/2))*e}function Al(){}function Ml(e,t){e&&Pl.hasOwnProperty(e.type)&&Pl[e.type](e,t)}var kl={Feature:function(e,t){Ml(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r=0?1:-1,i=r*n,o=vl(t=(t*=hl)/2+ll),a=Ol(t),u=Ul*a,s=Fl*o+u*vl(i),c=u*r*Ol(i);zl.add(ml(c,s)),Ll=e,Fl=o,Ul=a}var Kl,Ql,Zl,Xl,Jl,ed,td,nd,rd,id,od,ad=function(e){return Hl=new M,Bl(e,Vl),2*Hl};function ud(e){return[ml(e[1],e[0]),Cl(e[2])]}function sd(e){var t=e[0],n=e[1],r=vl(n);return[r*vl(t),r*Ol(t),Ol(n)]}function cd(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function ld(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function dd(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function fd(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function hd(e){var t=xl(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}var pd={point:gd,lineStart:vd,lineEnd:bd,polygonStart:function(){pd.point=yd,pd.lineStart=_d,pd.lineEnd=wd,rd=new M,Vl.polygonStart()},polygonEnd:function(){Vl.polygonEnd(),pd.point=gd,pd.lineStart=vd,pd.lineEnd=bd,zl<0?(Kl=-(Zl=180),Ql=-(Xl=90)):rd>al?Xl=90:rd<-1e-6&&(Ql=-90),od[0]=Kl,od[1]=Zl},sphere:function(){Kl=-(Zl=180),Ql=-(Xl=90)}};function gd(e,t){id.push(od=[Kl=e,Zl=e]),tXl&&(Xl=t)}function md(e,t){var n=sd([e*hl,t*hl]);if(nd){var r=ld(nd,n),i=ld([r[1],-r[0],0],r);hd(i),i=ud(i);var o,a=e-Jl,u=a>0?1:-1,s=i[0]*fl*u,c=pl(a)>180;c^(u*JlXl&&(Xl=o):c^(u*Jl<(s=(s+360)%360-180)&&sXl&&(Xl=t)),c?eSd(Kl,Zl)&&(Zl=e):Sd(e,Zl)>Sd(Kl,Zl)&&(Kl=e):Zl>=Kl?(eZl&&(Zl=e)):e>Jl?Sd(Kl,e)>Sd(Kl,Zl)&&(Zl=e):Sd(e,Zl)>Sd(Kl,Zl)&&(Kl=e)}else id.push(od=[Kl=e,Zl=e]);tXl&&(Xl=t),nd=n,Jl=e}function vd(){pd.point=md}function bd(){od[0]=Kl,od[1]=Zl,pd.point=gd,nd=null}function yd(e,t){if(nd){var n=e-Jl;rd.add(pl(n)>180?n+(n>0?360:-360):n)}else ed=e,td=t;Vl.point(e,t),md(e,t)}function _d(){Vl.lineStart()}function wd(){yd(ed,td),Vl.lineEnd(),pl(rd)>al&&(Kl=-(Zl=180)),od[0]=Kl,od[1]=Zl,nd=null}function Sd(e,t){return(t-=e)<0?t+360:t}function Od(e,t){return e[0]-t[0]}function $d(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:tSd(r[0],r[1])&&(r[1]=i[1]),Sd(i[0],r[1])>Sd(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,t=0,r=o[n=o.length-1];t<=n;r=i,++t)i=o[t],(u=Sd(r[1],i[0]))>a&&(a=u,Kl=i[0],Zl=r[1])}return id=od=null,Kl===1/0||Ql===1/0?[[NaN,NaN],[NaN,NaN]]:[[Kl,Ql],[Zl,Xl]]},zd={sphere:Al,point:Hd,lineStart:Wd,lineEnd:Yd,polygonStart:function(){zd.lineStart=Kd,zd.lineEnd=Qd},polygonEnd:function(){zd.lineStart=Wd,zd.lineEnd=Yd}};function Hd(e,t){e*=hl;var n=vl(t*=hl);Vd(n*vl(e),n*Ol(e),Ol(t))}function Vd(e,t,n){++xd,Td+=(e-Td)/xd,Cd+=(t-Cd)/xd,Nd+=(n-Nd)/xd}function Wd(){zd.point=Gd}function Gd(e,t){e*=hl;var n=vl(t*=hl);Ld=n*vl(e),Fd=n*Ol(e),Ud=Ol(t),zd.point=qd,Vd(Ld,Fd,Ud)}function qd(e,t){e*=hl;var n=vl(t*=hl),r=n*vl(e),i=n*Ol(e),o=Ol(t),a=ml(xl((a=Fd*o-Ud*i)*a+(a=Ud*r-Ld*o)*a+(a=Ld*i-Fd*r)*a),Ld*r+Fd*i+Ud*o);Ed+=a,Ad+=a*(Ld+(Ld=r)),Md+=a*(Fd+(Fd=i)),kd+=a*(Ud+(Ud=o)),Vd(Ld,Fd,Ud)}function Yd(){zd.point=Hd}function Kd(){zd.point=Zd}function Qd(){Xd(jd,Dd),zd.point=Hd}function Zd(e,t){jd=e,Dd=t,e*=hl,t*=hl,zd.point=Xd;var n=vl(t);Ld=n*vl(e),Fd=n*Ol(e),Ud=Ol(t),Vd(Ld,Fd,Ud)}function Xd(e,t){e*=hl;var n=vl(t*=hl),r=n*vl(e),i=n*Ol(e),o=Ol(t),a=Fd*o-Ud*i,u=Ud*r-Ld*o,s=Ld*i-Fd*r,c=_l(a,u,s),l=Cl(c),d=c&&-l/c;Pd.add(d*a),Id.add(d*u),Rd.add(d*s),Ed+=l,Ad+=l*(Ld+(Ld=r)),Md+=l*(Fd+(Fd=i)),kd+=l*(Ud+(Ud=o)),Vd(Ld,Fd,Ud)}var Jd=function(e){xd=Ed=Td=Cd=Nd=Ad=Md=kd=0,Pd=new M,Id=new M,Rd=new M,Bl(e,zd);var t=+Pd,n=+Id,r=+Rd,i=_l(t,n,r);return isl?e+Math.round(-e/dl)*dl:e,t]}function rf(e,t,n){return(e%=dl)?t||n?tf(af(e),uf(t,n)):af(e):t||n?uf(t,n):nf}function of(e){return function(t,n){return[(t+=e)>sl?t-dl:t<-sl?t+dl:t,n]}}function af(e){var t=of(e);return t.invert=of(-e),t}function uf(e,t){var n=vl(e),r=Ol(e),i=vl(t),o=Ol(t);function a(e,t){var a=vl(t),u=vl(e)*a,s=Ol(e)*a,c=Ol(t),l=c*n+u*r;return[ml(s*i-l*o,u*n-c*r),Cl(l*i+s*o)]}return a.invert=function(e,t){var a=vl(t),u=vl(e)*a,s=Ol(e)*a,c=Ol(t),l=c*i-s*o;return[ml(s*i+c*o,u*n+l*r),Cl(l*n-u*r)]},a}nf.invert=nf;var sf=function(e){function t(t){return(t=e(t[0]*hl,t[1]*hl))[0]*=fl,t[1]*=fl,t}return e=rf(e[0]*hl,e[1]*hl,e.length>2?e[2]*hl:0),t.invert=function(t){return(t=e.invert(t[0]*hl,t[1]*hl))[0]*=fl,t[1]*=fl,t},t};function cf(e,t,n,r,i,o){if(n){var a=vl(t),u=Ol(t),s=r*n;null==i?(i=t+r*dl,o=t-s/2):(i=lf(a,i),o=lf(a,o),(r>0?io)&&(i+=r*dl));for(var c,l=i;r>0?l>o:l1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}},hf=function(e,t){return pl(e[0]-t[0])=0;--o)i.point((l=c[o])[0],l[1]);else r(f.x,f.p.x,-1,i);f=f.p}c=(f=f.o).z,h=!h}while(!f.v);i.lineEnd()}}};function mf(e){if(t=e.length){for(var t,n,r=0,i=e[0];++r=0?1:-1,E=x*$,T=E>sl,C=m*S;if(s.add(ml(C*x*Ol(E),v*O+C*vl(E))),a+=T?$+x*dl:$,T^p>=n^_>=n){var N=ld(sd(h),sd(y));hd(N);var A=ld(o,N);hd(A);var k=(T^$>=0?-1:1)*Cl(A[2]);(r>k||r===k&&(N[0]||N[1]))&&(u+=T^$>=0?1:-1)}}return(a<-1e-6||a0){for(d||(i.polygonStart(),d=!0),i.lineStart(),e=0;e1&&2&s&&f.push(f.pop().concat(f.shift())),a.push(f.filter(_f))}return f}};function _f(e){return e.length>1}function wf(e,t){return((e=e.x)[0]<0?e[1]-cl-al:cl-e[1])-((t=t.x)[0]<0?t[1]-cl-al:cl-t[1])}var Sf=yf((function(){return!0}),(function(e){var t,n=NaN,r=NaN,i=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(o,a){var u=o>0?sl:-sl,s=pl(o-n);pl(s-sl)0?cl:-cl),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(u,r),e.point(o,r),t=0):i!==u&&s>=sl&&(pl(n-i)al?gl((Ol(t)*(o=vl(r))*Ol(n)-Ol(r)*(i=vl(t))*Ol(e))/(i*o*a)):(t+r)/2}(n,r,o,a),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(u,r),t=0),e.point(n=o,r=a),i=u},lineEnd:function(){e.lineEnd(),n=r=NaN},clean:function(){return 2-t}}}),(function(e,t,n,r){var i;if(null==e)i=n*cl,r.point(-sl,i),r.point(0,i),r.point(sl,i),r.point(sl,0),r.point(sl,-i),r.point(0,-i),r.point(-sl,-i),r.point(-sl,0),r.point(-sl,i);else if(pl(e[0]-t[0])>al){var o=e[0]0,i=pl(t)>al;function o(e,n){return vl(e)*vl(n)>t}function a(e,n,r){var i=[1,0,0],o=ld(sd(e),sd(n)),a=cd(o,o),u=o[0],s=a-u*u;if(!s)return!r&&e;var c=t*a/s,l=-t*u/s,d=ld(i,o),f=fd(i,c);dd(f,fd(o,l));var h=d,p=cd(f,h),g=cd(h,h),m=p*p-g*(cd(f,f)-1);if(!(m<0)){var v=xl(m),b=fd(h,(-p-v)/g);if(dd(b,f),b=ud(b),!r)return b;var y,_=e[0],w=n[0],S=e[1],O=n[1];w<_&&(y=_,_=w,w=y);var $=w-_,x=pl($-sl)0^b[1]<(pl(b[0]-_)sl^(_<=b[0]&&b[0]<=w)){var E=fd(h,(-p+v)/g);return dd(E,f),[b,ud(E)]}}}function u(t,n){var i=r?e:sl-e,o=0;return t<-i?o|=1:t>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return yf(o,(function(e){var t,n,s,c,l;return{lineStart:function(){c=s=!1,l=1},point:function(d,f){var h,p=[d,f],g=o(d,f),m=r?g?0:u(d,f):g?u(d+(d<0?sl:-sl),f):0;if(!t&&(c=s=g)&&e.lineStart(),g!==s&&(!(h=a(t,p))||hf(t,h)||hf(p,h))&&(p[2]=1),g!==s)l=0,g?(e.lineStart(),h=a(p,t),e.point(h[0],h[1])):(h=a(t,p),e.point(h[0],h[1],2),e.lineEnd()),t=h;else if(i&&t&&r^g){var v;m&n||!(v=a(p,t,!0))||(l=0,r?(e.lineStart(),e.point(v[0][0],v[0][1]),e.point(v[1][0],v[1][1]),e.lineEnd()):(e.point(v[1][0],v[1][1]),e.lineEnd(),e.lineStart(),e.point(v[0][0],v[0][1],3)))}!g||t&&hf(t,p)||e.point(p[0],p[1]),t=p,s=g,n=m},lineEnd:function(){s&&e.lineEnd(),t=null},clean:function(){return l|(c&&s)<<1}}}),(function(t,r,i,o){cf(o,e,n,i,t,r)}),r?[0,-e]:[-sl,e-sl])},$f=1e9,xf=-$f;function Ef(e,t,n,r){function i(i,o){return e<=i&&i<=n&&t<=o&&o<=r}function o(i,o,u,c){var l=0,d=0;if(null==i||(l=a(i,u))!==(d=a(o,u))||s(i,o)<0^u>0)do{c.point(0===l||3===l?e:n,l>1?r:t)}while((l=(l+u+4)%4)!==d);else c.point(o[0],o[1])}function a(r,i){return pl(r[0]-e)0?0:3:pl(r[0]-n)0?2:1:pl(r[1]-t)0?1:0:i>0?3:2}function u(e,t){return s(e.x,t.x)}function s(e,t){var n=a(e,1),r=a(t,1);return n!==r?n-r:0===n?t[1]-e[1]:1===n?e[0]-t[0]:2===n?e[1]-t[1]:t[0]-e[0]}return function(a){var s,c,l,d,f,h,p,g,m,v,b,y=a,_=ff(),w={point:S,lineStart:function(){w.point=O,c&&c.push(l=[]);v=!0,m=!1,p=g=NaN},lineEnd:function(){s&&(O(d,f),h&&m&&_.rejoin(),s.push(_.result()));w.point=S,m&&y.lineEnd()},polygonStart:function(){y=_,s=[],c=[],b=!0},polygonEnd:function(){var t=function(){for(var t=0,n=0,i=c.length;nr&&(f-o)*(r-a)>(h-a)*(e-o)&&++t:h<=r&&(f-o)*(r-a)<(h-a)*(e-o)&&--t;return t}(),n=b&&t,i=(s=Ne(s)).length;(n||i)&&(a.polygonStart(),n&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),i&&gf(s,u,t,o,a),a.polygonEnd());y=a,s=c=l=null}};function S(e,t){i(e,t)&&y.point(e,t)}function O(o,a){var u=i(o,a);if(c&&l.push([o,a]),v)d=o,f=a,h=u,v=!1,u&&(y.lineStart(),y.point(o,a));else if(u&&m)y.point(o,a);else{var s=[p=Math.max(xf,Math.min($f,p)),g=Math.max(xf,Math.min($f,g))],_=[o=Math.max(xf,Math.min($f,o)),a=Math.max(xf,Math.min($f,a))];!function(e,t,n,r,i,o){var a,u=e[0],s=e[1],c=0,l=1,d=t[0]-u,f=t[1]-s;if(a=n-u,d||!(a>0)){if(a/=d,d<0){if(a0){if(a>l)return;a>c&&(c=a)}if(a=i-u,d||!(a<0)){if(a/=d,d<0){if(a>l)return;a>c&&(c=a)}else if(d>0){if(a0)){if(a/=f,f<0){if(a0){if(a>l)return;a>c&&(c=a)}if(a=o-s,f||!(a<0)){if(a/=f,f<0){if(a>l)return;a>c&&(c=a)}else if(f>0){if(a0&&(e[0]=u+c*d,e[1]=s+c*f),l<1&&(t[0]=u+l*d,t[1]=s+l*f),!0}}}}}(s,_,e,t,n,r)?u&&(y.lineStart(),y.point(o,a),b=!1):(m||(y.lineStart(),y.point(s[0],s[1])),y.point(_[0],_[1]),u||y.lineEnd(),b=!1)}p=o,g=a,m=u}return w}}var Tf,Cf,Nf,Af,Mf=function(){var e,t,n,r=0,i=0,o=960,a=500;return n={stream:function(n){return e&&t===n?e:e=Ef(r,i,o,a)(t=n)},extent:function(u){return arguments.length?(r=+u[0][0],i=+u[0][1],o=+u[1][0],a=+u[1][1],e=t=null,n):[[r,i],[o,a]]}}},kf={sphere:Al,point:Al,lineStart:function(){kf.point=If,kf.lineEnd=Pf},lineEnd:Al,polygonStart:Al,polygonEnd:Al};function Pf(){kf.point=kf.lineEnd=Al}function If(e,t){Cf=e*=hl,Nf=Ol(t*=hl),Af=vl(t),kf.point=Rf}function Rf(e,t){e*=hl;var n=Ol(t*=hl),r=vl(t),i=pl(e-Cf),o=vl(i),a=r*Ol(i),u=Af*n-Nf*r*o,s=Nf*n+Af*r*o;Tf.add(ml(xl(a*a+u*u),s)),Cf=e,Nf=n,Af=r}var jf=function(e){return Tf=new M,Bl(e,kf),+Tf},Df=[null,null],Lf={type:"LineString",coordinates:Df},Ff=function(e,t){return Df[0]=e,Df[1]=t,jf(Lf)},Uf={Feature:function(e,t){return zf(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r0&&(i=Ff(e[o],e[o-1]))>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))al})).map(s)).concat(Pe(bl(o/h)*h,i,h).filter((function(e){return pl(e%g)>al})).map(c))}return v.lines=function(){return b().map((function(e){return{type:"LineString",coordinates:e}}))},v.outline=function(){return{type:"Polygon",coordinates:[l(r).concat(d(a).slice(1),l(n).reverse().slice(1),d(u).reverse().slice(1))]}},v.extent=function(e){return arguments.length?v.extentMajor(e).extentMinor(e):v.extentMinor()},v.extentMajor=function(e){return arguments.length?(r=+e[0][0],n=+e[1][0],u=+e[0][1],a=+e[1][1],r>n&&(e=r,r=n,n=e),u>a&&(e=u,u=a,a=e),v.precision(m)):[[r,u],[n,a]]},v.extentMinor=function(n){return arguments.length?(t=+n[0][0],e=+n[1][0],o=+n[0][1],i=+n[1][1],t>e&&(n=t,t=e,e=n),o>i&&(n=o,o=i,i=n),v.precision(m)):[[t,o],[e,i]]},v.step=function(e){return arguments.length?v.stepMajor(e).stepMinor(e):v.stepMinor()},v.stepMajor=function(e){return arguments.length?(p=+e[0],g=+e[1],v):[p,g]},v.stepMinor=function(e){return arguments.length?(f=+e[0],h=+e[1],v):[f,h]},v.precision=function(f){return arguments.length?(m=+f,s=Kf(o,i,90),c=Qf(t,e,m),l=Kf(u,a,90),d=Qf(r,n,m),v):m},v.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}function Xf(){return Zf()()}var Jf,eh,th,nh,rh=function(e,t){var n=e[0]*hl,r=e[1]*hl,i=t[0]*hl,o=t[1]*hl,a=vl(r),u=Ol(r),s=vl(o),c=Ol(o),l=a*vl(n),d=a*Ol(n),f=s*vl(i),h=s*Ol(i),p=2*Cl(xl(Nl(o-r)+a*s*Nl(i-n))),g=Ol(p),m=p?function(e){var t=Ol(e*=p)/g,n=Ol(p-e)/g,r=n*l+t*f,i=n*d+t*h,o=n*u+t*c;return[ml(i,r)*fl,ml(o,xl(r*r+i*i))*fl]}:function(){return[n*fl,r*fl]};return m.distance=p,m},ih=function(e){return e},oh=new M,ah=new M,uh={point:Al,lineStart:Al,lineEnd:Al,polygonStart:function(){uh.lineStart=sh,uh.lineEnd=dh},polygonEnd:function(){uh.lineStart=uh.lineEnd=uh.point=Al,oh.add(pl(ah)),ah=new M},result:function(){var e=oh/2;return oh=new M,e}};function sh(){uh.point=ch}function ch(e,t){uh.point=lh,Jf=th=e,eh=nh=t}function lh(e,t){ah.add(nh*e-th*t),th=e,nh=t}function dh(){lh(Jf,eh)}var fh=uh,hh=1/0,ph=hh,gh=-hh,mh=gh;var vh,bh,yh,_h,wh={point:function(e,t){egh&&(gh=e);tmh&&(mh=t)},lineStart:Al,lineEnd:Al,polygonStart:Al,polygonEnd:Al,result:function(){var e=[[hh,ph],[gh,mh]];return gh=mh=-(ph=hh=1/0),e}},Sh=0,Oh=0,$h=0,xh=0,Eh=0,Th=0,Ch=0,Nh=0,Ah=0,Mh={point:kh,lineStart:Ph,lineEnd:jh,polygonStart:function(){Mh.lineStart=Dh,Mh.lineEnd=Lh},polygonEnd:function(){Mh.point=kh,Mh.lineStart=Ph,Mh.lineEnd=jh},result:function(){var e=Ah?[Ch/Ah,Nh/Ah]:Th?[xh/Th,Eh/Th]:$h?[Sh/$h,Oh/$h]:[NaN,NaN];return Sh=Oh=$h=xh=Eh=Th=Ch=Nh=Ah=0,e}};function kh(e,t){Sh+=e,Oh+=t,++$h}function Ph(){Mh.point=Ih}function Ih(e,t){Mh.point=Rh,kh(yh=e,_h=t)}function Rh(e,t){var n=e-yh,r=t-_h,i=xl(n*n+r*r);xh+=i*(yh+e)/2,Eh+=i*(_h+t)/2,Th+=i,kh(yh=e,_h=t)}function jh(){Mh.point=kh}function Dh(){Mh.point=Fh}function Lh(){Uh(vh,bh)}function Fh(e,t){Mh.point=Uh,kh(vh=yh=e,bh=_h=t)}function Uh(e,t){var n=e-yh,r=t-_h,i=xl(n*n+r*r);xh+=i*(yh+e)/2,Eh+=i*(_h+t)/2,Th+=i,Ch+=(i=_h*e-yh*t)*(yh+e),Nh+=i*(_h+t),Ah+=3*i,kh(yh=e,_h=t)}var Bh=Mh;function zh(e){this._context=e}zh.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._context.moveTo(e,t),this._point=1;break;case 1:this._context.lineTo(e,t);break;default:this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,dl)}},result:Al};var Hh,Vh,Wh,Gh,qh,Yh=new M,Kh={point:Al,lineStart:function(){Kh.point=Qh},lineEnd:function(){Hh&&Zh(Vh,Wh),Kh.point=Al},polygonStart:function(){Hh=!0},polygonEnd:function(){Hh=null},result:function(){var e=+Yh;return Yh=new M,e}};function Qh(e,t){Kh.point=Zh,Vh=Gh=e,Wh=qh=t}function Zh(e,t){Gh-=e,qh-=t,Yh.add(xl(Gh*Gh+qh*qh)),Gh=e,qh=t}var Xh=Kh;function Jh(){this._string=[]}function ep(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}Jh.prototype={_radius:4.5,_circle:ep(4.5),pointRadius:function(e){return(e=+e)!==this._radius&&(this._radius=e,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._string.push("M",e,",",t),this._point=1;break;case 1:this._string.push("L",e,",",t);break;default:null==this._circle&&(this._circle=ep(this._radius)),this._string.push("M",e,",",t,this._circle)}},result:function(){if(this._string.length){var e=this._string.join("");return this._string=[],e}return null}};var tp=function(e,t){var n,r,i=4.5;function o(e){return e&&("function"===typeof i&&r.pointRadius(+i.apply(this,arguments)),Bl(e,n(r))),r.result()}return o.area=function(e){return Bl(e,n(fh)),fh.result()},o.measure=function(e){return Bl(e,n(Xh)),Xh.result()},o.bounds=function(e){return Bl(e,n(wh)),wh.result()},o.centroid=function(e){return Bl(e,n(Bh)),Bh.result()},o.projection=function(t){return arguments.length?(n=null==t?(e=null,ih):(e=t).stream,o):e},o.context=function(e){return arguments.length?(r=null==e?(t=null,new Jh):new zh(t=e),"function"!==typeof i&&r.pointRadius(i),o):t},o.pointRadius=function(e){return arguments.length?(i="function"===typeof e?e:(r.pointRadius(+e),+e),o):i},o.projection(e).context(t)},np=function(e){return{stream:rp(e)}};function rp(e){return function(t){var n=new ip;for(var r in e)n[r]=e[r];return n.stream=t,n}}function ip(){}function op(e,t,n){var r=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),null!=r&&e.clipExtent(null),Bl(n,e.stream(wh)),t(wh.result()),null!=r&&e.clipExtent(r),e}function ap(e,t,n){return op(e,(function(n){var r=t[1][0]-t[0][0],i=t[1][1]-t[0][1],o=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),a=+t[0][0]+(r-o*(n[1][0]+n[0][0]))/2,u=+t[0][1]+(i-o*(n[1][1]+n[0][1]))/2;e.scale(150*o).translate([a,u])}),n)}function up(e,t,n){return ap(e,[[0,0],t],n)}function sp(e,t,n){return op(e,(function(n){var r=+t,i=r/(n[1][0]-n[0][0]),o=(r-i*(n[1][0]+n[0][0]))/2,a=-i*n[0][1];e.scale(150*i).translate([o,a])}),n)}function cp(e,t,n){return op(e,(function(n){var r=+t,i=r/(n[1][1]-n[0][1]),o=-i*n[0][0],a=(r-i*(n[1][1]+n[0][1]))/2;e.scale(150*i).translate([o,a])}),n)}ip.prototype={constructor:ip,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var lp=vl(30*hl),dp=function(e,t){return+t?function(e,t){function n(r,i,o,a,u,s,c,l,d,f,h,p,g,m){var v=c-r,b=l-i,y=v*v+b*b;if(y>4*t&&g--){var _=a+f,w=u+h,S=s+p,O=xl(_*_+w*w+S*S),$=Cl(S/=O),x=pl(pl(S)-1)t||pl((v*N+b*A)/y-.5)>.3||a*f+u*h+s*p2?e[2]%360*hl:0,N()):[m*fl,v*fl,b*fl]},T.angle=function(e){return arguments.length?(y=e%360*hl,N()):y*fl},T.reflectX=function(e){return arguments.length?(_=e?-1:1,N()):_<0},T.reflectY=function(e){return arguments.length?(w=e?-1:1,N()):w<0},T.precision=function(e){return arguments.length?(a=dp(u,E=e*e),A()):xl(E)},T.fitExtent=function(e,t){return ap(T,e,t)},T.fitSize=function(e,t){return up(T,e,t)},T.fitWidth=function(e,t){return sp(T,e,t)},T.fitHeight=function(e,t){return cp(T,e,t)},function(){return t=e.apply(this,arguments),T.invert=t.invert&&C,N()}}function mp(e){var t=0,n=sl/3,r=gp(e),i=r(t,n);return i.parallels=function(e){return arguments.length?r(t=e[0]*hl,n=e[1]*hl):[t*fl,n*fl]},i}function vp(e,t){var n=Ol(e),r=(n+Ol(t))/2;if(pl(r)=.12&&i<.234&&r>=-.425&&r<-.214?u:i>=.166&&i<.234&&r>=-.214&&r<-.115?s:a).invert(e)},l.stream=function(n){return e&&t===n?e:e=function(e){var t=e.length;return{point:function(n,r){for(var i=-1;++i0?t<-cl+al&&(t=-cl+al):t>cl-al&&(t=cl-al);var n=i/Sl(Ap(t),r);return[n*Ol(r*e),i-n*vl(r*e)]}return o.invert=function(e,t){var n=i-t,o=$l(r)*xl(e*e+n*n),a=ml(e,pl(n))*$l(n);return n*r<0&&(a-=sl*$l(e)*$l(n)),[a/r,2*gl(Sl(i/o,1/r))-cl]},o}var kp=function(){return mp(Mp).scale(109.5).parallels([30,30])};function Pp(e,t){return[e,t]}Pp.invert=Pp;var Ip=function(){return pp(Pp).scale(152.63)};function Rp(e,t){var n=vl(e),r=e===t?Ol(e):(n-vl(t))/(t-e),i=n/r+e;if(pl(r)al&&--i>0);return[e/(.8707+(o=r*r)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),r]};var Yp=function(){return pp(qp).scale(175.295)};function Kp(e,t){return[vl(t)*Ol(e),Ol(t)]}Kp.invert=Sp(Cl);var Qp=function(){return pp(Kp).scale(249.5).clipAngle(90.000001)};function Zp(e,t){var n=vl(t),r=1+vl(e)*n;return[n*Ol(e)/r,Ol(t)/r]}Zp.invert=Sp((function(e){return 2*gl(e)}));var Xp=function(){return pp(Zp).scale(250).clipAngle(142)};function Jp(e,t){return[wl(El((cl+t)/2)),-e]}Jp.invert=function(e,t){return[-t,2*gl(yl(e))-cl]};var eg=function(){var e=Np(Jp),t=e.center,n=e.rotate;return e.center=function(e){return arguments.length?t([-e[1],e[0]]):[(e=t())[1],-e[0]]},e.rotate=function(e){return arguments.length?n([e[0],e[1],e.length>2?e[2]+90:90]):[(e=n())[0],e[1],e[2]-90]},n([0,0,90]).scale(159.155)};function tg(e,t){return e.parent===t.parent?1:2}function ng(e,t){return e+t.x}function rg(e,t){return Math.max(e,t.y)}var ig=function(){var e=tg,t=1,n=1,r=!1;function i(i){var o,a=0;i.eachAfter((function(t){var n=t.children;n?(t.x=function(e){return e.reduce(ng,0)/e.length}(n),t.y=function(e){return 1+e.reduce(rg,0)}(n)):(t.x=o?a+=e(t,o):0,t.y=0,o=t)}));var u=function(e){for(var t;t=e.children;)e=t[0];return e}(i),s=function(e){for(var t;t=e.children;)e=t[t.length-1];return e}(i),c=u.x-e(u,s)/2,l=s.x+e(s,u)/2;return i.eachAfter(r?function(e){e.x=(e.x-i.x)*t,e.y=(i.y-e.y)*n}:function(e){e.x=(e.x-c)/(l-c)*t,e.y=(1-(i.y?e.y/i.y:1))*n})}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(e){return arguments.length?(r=!1,t=+e[0],n=+e[1],i):r?null:[t,n]},i.nodeSize=function(e){return arguments.length?(r=!0,t=+e[0],n=+e[1],i):r?[t,n]:null},i};function og(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}var ag=u.a.mark(ug);function ug(){var e,t,n,r,i,o;return u.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:n=[e=this];case 1:t=n.reverse(),n=[];case 2:if(!(e=t.pop())){a.next=8;break}return a.next=5,e;case 5:if(r=e.children)for(i=0,o=r.length;i=0;--o)s.push(r=i[o]=new hg(i[o])),r.parent=n,r.depth=n.depth+1;return u.eachBefore(fg)}function cg(e){return e.children}function lg(e){return Array.isArray(e)?e[1]:null}function dg(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function fg(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function hg(e){this.data=e,this.depth=this.height=0,this.parent=null}hg.prototype=sg.prototype=Object($t.a)({constructor:hg,count:function(){return this.eachAfter(og)},each:function(e,t){var n,r=-1,i=Object(s.a)(this);try{for(i.s();!(n=i.n()).done;){var o=n.value;e.call(t,o,++r,this)}}catch(a){i.e(a)}finally{i.f()}return this},eachAfter:function(e,t){for(var n,r,i,o=this,a=[o],u=[],s=-1;o=a.pop();)if(u.push(o),n=o.children)for(r=0,i=n.length;r=0;--r)o.push(n[r]);return this},find:function(e,t){var n,r=-1,i=Object(s.a)(this);try{for(i.s();!(n=i.n()).done;){var o=n.value;if(e.call(t,o,++r,this))return o}}catch(a){i.e(a)}finally{i.f()}},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;e=n.pop(),t=r.pop();for(;e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return sg(this).eachBefore(dg)}},Symbol.iterator,ug);var pg=function(e){for(var t,n,r=0,i=(e=function(e){for(var t,n,r=e.length;r;)n=Math.random()*r--|0,t=e[r],e[r]=e[n],e[n]=t;return e}(Array.from(e))).length,o=[];r0&&n*n>r*r+i*i}function bg(e,t){for(var n=0;n(a*=a)?(r=(c+a-i)/(2*c),o=Math.sqrt(Math.max(0,a/c-r*r)),n.x=e.x-r*u-o*s,n.y=e.y-r*s+o*u):(r=(c+i-a)/(2*c),o=Math.sqrt(Math.max(0,i/c-r*r)),n.x=t.x+r*u-o*s,n.y=t.y+r*s+o*u)):(n.x=t.x+n.r,n.y=t.y)}function Og(e,t){var n=e.r+t.r-1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function $g(e){var t=e._,n=e.next._,r=t.r+n.r,i=(t.x*n.r+n.x*t.r)/r,o=(t.y*n.r+n.y*t.r)/r;return i*i+o*o}function xg(e){this._=e,this.next=null,this.previous=null}function Eg(e){if(!(o=(t=e,e="object"===typeof t&&"length"in t?t:Array.from(t)).length))return 0;var t,n,r,i,o,a,u,s,c,l,d,f;if((n=e[0]).x=0,n.y=0,!(o>1))return n.r;if(r=e[1],n.x=-r.r,r.x=n.r,r.y=0,!(o>2))return n.r+r.r;Sg(r,n,i=e[2]),n=new xg(n),r=new xg(r),i=new xg(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;e:for(s=3;s0)throw new Error("cycle");return o}return n.id=function(t){return arguments.length?(e=Ng(t),n):e},n.parentId=function(e){return arguments.length?(t=Ng(e),n):t},n};function Wg(e,t){return e.parent===t.parent?1:2}function Gg(e){var t=e.children;return t?t[0]:e.t}function qg(e){var t=e.children;return t?t[t.length-1]:e.t}function Yg(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function Kg(e,t,n){return e.a.parent===t.parent?e.a:n}function Qg(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}Qg.prototype=Object.create(hg.prototype);var Zg=function(){var e=Wg,t=1,n=1,r=null;function i(i){var s=function(e){for(var t,n,r,i,o,a=new Qg(e,0),u=[a];t=u.pop();)if(r=t._.children)for(t.children=new Array(o=r.length),i=o-1;i>=0;--i)u.push(n=t.children[i]=new Qg(r[i],i)),n.parent=t;return(a.parent=new Qg(null,0)).children=[a],a}(i);if(s.eachAfter(o),s.parent.m=-s.z,s.eachBefore(a),r)i.eachBefore(u);else{var c=i,l=i,d=i;i.eachBefore((function(e){e.xl.x&&(l=e),e.depth>d.depth&&(d=e)}));var f=c===l?1:e(c,l)/2,h=f-c.x,p=t/(l.x+f+h),g=n/(d.depth||1);i.eachBefore((function(e){e.x=(e.x+h)*p,e.y=e.depth*g}))}return i}function o(t){var n=t.children,r=t.parent.children,i=t.i?r[t.i-1]:null;if(n){!function(e){for(var t,n=0,r=0,i=e.children,o=i.length;--o>=0;)(t=i[o]).z+=n,t.m+=n,n+=t.s+(r+=t.c)}(t);var o=(n[0].z+n[n.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-o):t.z=o}else i&&(t.z=i.z+e(t._,i._));t.parent.A=function(t,n,r){if(n){for(var i,o=t,a=t,u=n,s=o.parent.children[0],c=o.m,l=a.m,d=u.m,f=s.m;u=qg(u),o=Gg(o),u&&o;)s=Gg(s),(a=qg(a)).a=t,(i=u.z+d-o.z-c+e(u._,o._))>0&&(Yg(Kg(u,t,r),t,i),c+=i,l+=i),d+=u.m,c+=o.m,f+=s.m,l+=a.m;u&&!qg(a)&&(a.t=u,a.m+=d-l),o&&!Gg(s)&&(s.t=o,s.m+=c-f,r=t)}return r}(t,i,t.parent.A||r[0])}function a(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function u(e){e.x*=t,e.y=e.depth*n}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(e){return arguments.length?(r=!1,t=+e[0],n=+e[1],i):r?null:[t,n]},i.nodeSize=function(e){return arguments.length?(r=!0,t=+e[0],n=+e[1],i):r?[t,n]:null},i},Xg=function(e,t,n,r,i){for(var o,a=e.children,u=-1,s=a.length,c=e.value&&(i-n)/e.value;++uf&&(f=u),m=l*l*g,(h=Math.max(f/m,m/d))>p){l-=u;break}p=h}v.push(a={value:l,dice:s1?t:1)},n}(Jg),nm=function(){var e=tm,t=!1,n=1,r=1,i=[0],o=Ag,a=Ag,u=Ag,s=Ag,c=Ag;function l(e){return e.x0=e.y0=0,e.x1=n,e.y1=r,e.eachBefore(d),i=[0],t&&e.eachBefore(Dg),e}function d(t){var n=i[t.depth],r=t.x0+n,l=t.y0+n,d=t.x1-n,f=t.y1-n;d=n-1){var l=u[t];return l.x0=i,l.y0=o,l.x1=a,void(l.y1=s)}var d=c[t],f=r/2+d,h=t+1,p=n-1;for(;h>>1;c[g]s-o){var b=r?(i*v+a*m)/r:a;e(t,h,m,i,o,b,s),e(h,n,v,b,o,a,s)}else{var y=r?(o*v+s*m)/r:s;e(t,h,m,i,o,a,y),e(h,n,v,i,y,a,s)}}(0,s,e.value,t,n,r,i)},im=function(e,t,n,r,i){(1&e.depth?Xg:Lg)(e,t,n,r,i)},om=function e(t){function n(e,n,r,i,o){if((a=e._squarify)&&a.ratio===t)for(var a,u,s,c,l,d=-1,f=a.length,h=e.value;++d1?t:1)},n}(Jg),am=function(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}},um=function(e,t){var n=Ar(+e,+t);return function(e){var t=n(e);return t-360*Math.floor(t/360)}},sm=function(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}};function cm(e){return((e=Math.exp(e))+1/e)/2}var lm=function e(t,n,r){function i(e,i){var o,a,u=e[0],s=e[1],c=e[2],l=i[0],d=i[1],f=i[2],h=l-u,p=d-s,g=h*h+p*p;if(g<1e-12)a=Math.log(f/c)/t,o=function(e){return[u+e*h,s+e*p,c*Math.exp(t*e*a)]};else{var m=Math.sqrt(g),v=(f*f-c*c+r*g)/(2*c*n*m),b=(f*f-c*c-r*g)/(2*f*n*m),y=Math.log(Math.sqrt(v*v+1)-v),_=Math.log(Math.sqrt(b*b+1)-b);a=(_-y)/t,o=function(e){var r,i=e*a,o=cm(y),l=c/(n*m)*(o*(r=t*i+y,((r=Math.exp(2*r))-1)/(r+1))-function(e){return((e=Math.exp(e))-1/e)/2}(y));return[u+l*h,s+l*p,c*o/cm(t*i+y)]}}return o.duration=1e3*a*t/Math.SQRT2,o}return i.rho=function(t){var n=Math.max(.001,+t),r=n*n;return e(n,r,r*r)},i}(Math.SQRT2,2,4);function dm(e){return function(t,n){var r=e((t=Sr(t)).h,(n=Sr(n)).h),i=kr(t.s,n.s),o=kr(t.l,n.l),a=kr(t.opacity,n.opacity);return function(e){return t.h=r(e),t.s=i(e),t.l=o(e),t.opacity=a(e),t+""}}}var fm=dm(Ar),hm=dm(kr);function pm(e,t){var n=kr((e=Ia(e)).l,(t=Ia(t)).l),r=kr(e.a,t.a),i=kr(e.b,t.b),o=kr(e.opacity,t.opacity);return function(t){return e.l=n(t),e.a=r(t),e.b=i(t),e.opacity=o(t),e+""}}function gm(e){return function(t,n){var r=e((t=za(t)).h,(n=za(n)).h),i=kr(t.c,n.c),o=kr(t.l,n.l),a=kr(t.opacity,n.opacity);return function(e){return t.h=r(e),t.c=i(e),t.l=o(e),t.opacity=a(e),t+""}}}var mm=gm(Ar),vm=gm(kr);function bm(e){return function t(n){function r(t,r){var i=e((t=eu(t)).h,(r=eu(r)).h),o=kr(t.s,r.s),a=kr(t.l,r.l),u=kr(t.opacity,r.opacity);return function(e){return t.h=i(e),t.s=o(e),t.l=a(Math.pow(e,n)),t.opacity=u(e),t+""}}return n=+n,r.gamma=t,r}(1)}var ym=bm(Ar),_m=bm(kr);function wm(e,t){void 0===t&&(t=e,e=Kr);for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n1&&(n=e[a[u-2]],r=e[a[u-1]],i=e[t],(r[0]-n[0])*(i[1]-n[1])-(r[1]-n[1])*(i[0]-n[0])<=0);)--u;a[u++]=t}return a.slice(0,u)}var Tm=function(e){if((n=e.length)<3)return null;var t,n,r=new Array(n),i=new Array(n);for(t=0;t=0;--t)c.push(e[r[o[t]][2]]);for(t=+u;tu!==c>u&&a<(s-n)*(u-r)/(c-r)+n&&(l=!l),s=n,c=r;return l},Nm=function(e){for(var t,n,r=-1,i=e.length,o=e[i-1],a=o[0],u=o[1],s=0;++r1);return e+n*o*Math.sqrt(-2*Math.log(i)/i)}}return n.source=e,n}(Am),Im=function e(t){var n=Pm.source(t);function r(){var e=n.apply(this,arguments);return function(){return Math.exp(e())}}return r.source=e,r}(Am),Rm=function e(t){function n(e){return(e=+e)<=0?function(){return 0}:function(){for(var n=0,r=e;r>1;--r)n+=t();return n+r*t()}}return n.source=e,n}(Am),jm=function e(t){var n=Rm.source(t);function r(e){if(0===(e=+e))return t;var r=n(e);return function(){return r()/e}}return r.source=e,r}(Am),Dm=function e(t){function n(e){return function(){return-Math.log1p(-t())/e}}return n.source=e,n}(Am),Lm=function e(t){function n(e){if((e=+e)<0)throw new RangeError("invalid alpha");return e=1/-e,function(){return Math.pow(1-t(),e)}}return n.source=e,n}(Am),Fm=function e(t){function n(e){if((e=+e)<0||e>1)throw new RangeError("invalid p");return function(){return Math.floor(t()+e)}}return n.source=e,n}(Am),Um=function e(t){function n(e){if((e=+e)<0||e>1)throw new RangeError("invalid p");return 0===e?function(){return 1/0}:1===e?function(){return 1}:(e=Math.log1p(-e),function(){return 1+Math.floor(Math.log1p(-t())/e)})}return n.source=e,n}(Am),Bm=function e(t){var n=Pm.source(t)();function r(e,r){if((e=+e)<0)throw new RangeError("invalid k");if(0===e)return function(){return 0};if(r=null==r?1:+r,1===e)return function(){return-Math.log1p(-t())*r};var i=(e<1?e+1:e)-1/3,o=1/(3*Math.sqrt(i)),a=e<1?function(){return Math.pow(t(),1/e)}:function(){return 1};return function(){do{do{var e=n(),u=1+o*e}while(u<=0);u*=u*u;var s=1-t()}while(s>=1-.0331*e*e*e*e&&Math.log(s)>=.5*e*e+i*(1-u+Math.log(u)));return i*u*a()*r}}return r.source=e,r}(Am),zm=function e(t){var n=Bm.source(t);function r(e,t){var r=n(e),i=n(t);return function(){var e=r();return 0===e?0:e/(e+i())}}return r.source=e,r}(Am),Hm=function e(t){var n=Um.source(t),r=zm.source(t);function i(e,t){return e=+e,(t=+t)>=1?function(){return e}:t<=0?function(){return 0}:function(){for(var i=0,o=e,a=t;o*a>16&&o*(1-a)>16;){var u=Math.floor((o+1)*a),s=r(u,o-u+1)();s<=a?(i+=u,o-=u,a=(a-s)/(1-s)):(o=u-1,a/=s)}for(var c=a<.5,l=n(c?a:1-a),d=l(),f=0;d<=o;++f)d+=l();return i+(c?f:o-f)}}return i.source=e,i}(Am),Vm=function e(t){function n(e,n,r){var i;return 0===(e=+e)?i=function(e){return-Math.log(e)}:(e=1/e,i=function(t){return Math.pow(t,e)}),n=null==n?0:+n,r=null==r?1:+r,function(){return n+r*i(-Math.log1p(-t()))}}return n.source=e,n}(Am),Wm=function e(t){function n(e,n){return e=null==e?0:+e,n=null==n?1:+n,function(){return e+n*Math.tan(Math.PI*t())}}return n.source=e,n}(Am),Gm=function e(t){function n(e,n){return e=null==e?0:+e,n=null==n?1:+n,function(){var r=t();return e+n*Math.log(r/(1-r))}}return n.source=e,n}(Am),qm=function e(t){var n=Bm.source(t),r=Hm.source(t);function i(e){return function(){for(var i=0,o=e;o>16;){var a=Math.floor(.875*o),u=n(a)();if(u>o)return i+r(a-1,o/u)();i+=a,o-=u}for(var s=-Math.log1p(-t()),c=0;s<=o;++c)s-=Math.log1p(-t());return i+c}}return i.source=e,i}(Am),Ym=1664525,Km=1013904223,Qm=1/4294967296;function Zm(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Math.random(),t=0|(0<=e&&e<1?e/Qm:Math.abs(e));return function(){return Qm*((t=Ym*t+Km|0)>>>0)}}function Xm(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function Jm(e,t){switch(arguments.length){case 0:break;case 1:"function"===typeof e?this.interpolator(e):this.range(e);break;default:this.domain(e),"function"===typeof t?this.interpolator(t):this.range(t)}return this}var ev=Symbol("implicit");function tv(){var e=new Map,t=[],n=[],r=ev;function i(i){var o=i+"",a=e.get(o);if(!a){if(r!==ev)return r;e.set(o,a=t.push(i))}return n[(a-1)%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new Map;var r,o=Object(s.a)(n);try{for(o.s();!(r=o.n()).done;){var a=r.value,u=a+"";e.has(u)||e.set(u,t.push(a))}}catch(c){o.e(c)}finally{o.f()}return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return tv(t,n).unknown(r)},Xm.apply(i,arguments),i}function nv(){var e,t,n=tv().unknown(void 0),r=n.domain,i=n.range,o=0,a=1,u=!1,s=0,c=0,l=.5;function d(){var n=r().length,d=at&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(a[0],a[e-1])),r=e>2?lv:cv,i=o=null,d}function d(t){return isNaN(t=+t)?n:(i||(i=r(a.map(e),u,s)))(e(c(t)))}return d.invert=function(n){return c(t((o||(o=r(u,a.map(e),zr)))(n)))},d.domain=function(e){return arguments.length?(a=Array.from(e,ov),l()):a.slice()},d.range=function(e){return arguments.length?(u=Array.from(e),l()):u.slice()},d.rangeRound=function(e){return u=Array.from(e),s=sm,l()},d.clamp=function(e){return arguments.length?(c=!!e||uv,l()):c!==uv},d.interpolate=function(e){return arguments.length?(s=e,l()):s},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,l()}}function hv(){return fv()(uv,uv)}function pv(e,t,n,r){var i,o=fe(e,t,n);switch((r=Vc(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(i=il(o,a))||(r.precision=i),Kc(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=ol(o,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=rl(o))||(r.precision=i-2*("%"===r.type))}return Yc(r)}function gv(e){var t=e.domain;return e.ticks=function(e){var n=t();return le(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return pv(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,i,o=t(),a=0,u=o.length-1,s=o[a],c=o[u],l=10;for(c0;){if((i=de(s,c,n))===r)return o[a]=s,o[u]=c,t(o);if(i>0)s=Math.floor(s/i)*i,c=Math.ceil(c/i)*i;else{if(!(i<0))break;s=Math.ceil(s*i)/i,c=Math.floor(c*i)/i}r=i}return e},e}function mv(){var e=hv();return e.copy=function(){return dv(e,mv())},Xm.apply(e,arguments),gv(e)}function vv(e){var t;function n(e){return isNaN(e=+e)?t:e}return n.invert=n,n.domain=n.range=function(t){return arguments.length?(e=Array.from(t,ov),n):e.slice()},n.unknown=function(e){return arguments.length?(t=e,n):t},n.copy=function(){return vv(e).unknown(t)},e=arguments.length?Array.from(e,ov):[0,1],gv(n)}function bv(e,t){var n,r=0,i=(e=e.slice()).length-1,o=e[r],a=e[i];return a0){for(;f<=h;++f)for(l=1,c=n(f);ls)break;g.push(d)}}else for(;f<=h;++f)for(l=o-1,c=n(f);l>=1;--l)if(!((d=c*l)s)break;g.push(d)}2*g.length0?r[i-1]:t[0],i=r?[i[r-1],n]:[i[a-1],i[a]]},a.unknown=function(t){return arguments.length?(e=t,a):a},a.thresholds=function(){return i.slice()},a.copy=function(){return Bv().domain([t,n]).range(o).unknown(e)},Xm.apply(gv(a),arguments)}function zv(){var e,t=[.5],n=[0,1],r=1;function i(i){return i<=i?n[m(t,i,0,r)]:e}return i.domain=function(e){return arguments.length?(t=Array.from(e),r=Math.min(t.length,n.length-1),i):t.slice()},i.range=function(e){return arguments.length?(n=Array.from(e),r=Math.min(t.length,n.length-1),i):n.slice()},i.invertExtent=function(e){var r=n.indexOf(e);return[t[r-1],t[r]]},i.unknown=function(t){return arguments.length?(e=t,i):e},i.copy=function(){return zv().domain(t).range(n).unknown(e)},Xm.apply(i,arguments)}var Hv=new Date,Vv=new Date;function Wv(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=function(t){return e(t=new Date(+t)),t},i.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},i.round=function(e){var t=i(e),n=i.ceil(e);return e-t0))return u;do{u.push(a=new Date(+n)),t(n,o),e(n)}while(a=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}))},n&&(i.count=function(t,r){return Hv.setTime(+t),Vv.setTime(+r),e(Hv),e(Vv),Math.floor(n(Hv,Vv))},i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?function(t){return r(t)%e===0}:function(t){return i.count(0,t)%e===0}):i:null}),i}var Gv=Wv((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));Gv.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Wv((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n*e)})):null};var qv=Gv,Yv=Gv.range,Kv=Wv((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()})),Qv=Kv,Zv=Kv.range,Xv=1e3,Jv=6e4,eb=36e5,tb=864e5,nb=6048e5;function rb(e){return Wv((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Jv)/nb}))}var ib=rb(0),ob=rb(1),ab=rb(2),ub=rb(3),sb=rb(4),cb=rb(5),lb=rb(6),db=ib.range,fb=ob.range,hb=ab.range,pb=ub.range,gb=sb.range,mb=cb.range,vb=lb.range,bb=Wv((function(e){return e.setHours(0,0,0,0)}),(function(e,t){return e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Jv)/tb}),(function(e){return e.getDate()-1})),yb=bb,_b=bb.range,wb=Wv((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*Xv-e.getMinutes()*Jv)}),(function(e,t){e.setTime(+e+t*eb)}),(function(e,t){return(t-e)/eb}),(function(e){return e.getHours()})),Sb=wb,Ob=wb.range,$b=Wv((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*Xv)}),(function(e,t){e.setTime(+e+t*Jv)}),(function(e,t){return(t-e)/Jv}),(function(e){return e.getMinutes()})),xb=$b,Eb=$b.range,Tb=Wv((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+t*Xv)}),(function(e,t){return(t-e)/Xv}),(function(e){return e.getUTCSeconds()})),Cb=Tb,Nb=Tb.range,Ab=Wv((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));Ab.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?Wv((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):Ab:null};var Mb=Ab,kb=Ab.range;function Pb(e){return Wv((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/nb}))}var Ib=Pb(0),Rb=Pb(1),jb=Pb(2),Db=Pb(3),Lb=Pb(4),Fb=Pb(5),Ub=Pb(6),Bb=Ib.range,zb=Rb.range,Hb=jb.range,Vb=Db.range,Wb=Lb.range,Gb=Fb.range,qb=Ub.range,Yb=Wv((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/tb}),(function(e){return e.getUTCDate()-1})),Kb=Yb,Qb=Yb.range,Zb=Wv((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));Zb.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Wv((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null};var Xb=Zb,Jb=Zb.range;function ey(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function ty(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function ny(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function ry(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,u=e.months,s=e.shortMonths,c=gy(i),l=my(i),d=gy(o),f=my(o),h=gy(a),p=my(a),g=gy(u),m=my(u),v=gy(s),b=my(s),y={a:function(e){return a[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return s[e.getMonth()]},B:function(e){return u[e.getMonth()]},c:null,d:Dy,e:Dy,f:zy,g:Jy,G:t_,H:Ly,I:Fy,j:Uy,L:By,m:Hy,M:Vy,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:$_,s:x_,S:Wy,u:Gy,U:qy,V:Ky,w:Qy,W:Zy,x:null,X:null,y:Xy,Y:e_,Z:n_,"%":O_},_={a:function(e){return a[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return s[e.getUTCMonth()]},B:function(e){return u[e.getUTCMonth()]},c:null,d:r_,e:r_,f:s_,g:y_,G:w_,H:i_,I:o_,j:a_,L:u_,m:c_,M:l_,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:$_,s:x_,S:d_,u:f_,U:h_,V:g_,w:m_,W:v_,x:null,X:null,y:b_,Y:__,Z:S_,"%":O_},w={a:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=v.exec(t.slice(n));return r?(e.m=b.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=g.exec(t.slice(n));return r?(e.m=m.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return $(e,t,n,r)},d:Ty,e:Ty,f:Py,g:Oy,G:Sy,H:Ny,I:Ny,j:Cy,L:ky,m:Ey,M:Ay,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=l.get(r[0].toLowerCase()),n+r[0].length):-1},q:xy,Q:Ry,s:jy,S:My,u:by,U:yy,V:_y,w:vy,W:wy,x:function(e,t,r){return $(e,n,t,r)},X:function(e,t,n){return $(e,r,t,n)},y:Oy,Y:Sy,Z:$y,"%":Iy};function S(e,t){return function(n){var r,i,o,a=[],u=-1,s=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++u53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=ty(ny(o.y,0,1))).getUTCDay(),r=i>4||0===i?Rb.ceil(r):Rb(r),r=Kb.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=ey(ny(o.y,0,1))).getDay(),r=i>4||0===i?ob.ceil(r):ob(r),r=yb.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?ty(ny(o.y,0,1)).getUTCDay():ey(ny(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,ty(o)):ey(o)}}function $(e,t,n,r){for(var i,o,a=0,u=t.length,s=n.length;a=s)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=w[i in cy?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return y.x=S(n,y),y.X=S(r,y),y.c=S(t,y),_.x=S(n,_),_.X=S(r,_),_.c=S(t,_),{format:function(e){var t=S(e+="",y);return t.toString=function(){return e},t},parse:function(e){var t=O(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+="",_);return t.toString=function(){return e},t},utcParse:function(e){var t=O(e+="",!0);return t.toString=function(){return e},t}}}var iy,oy,ay,uy,sy,cy={"-":"",_:" ",0:"0"},ly=/^\s*\d+/,dy=/^%/,fy=/[\\^$*+?|[\]().{}]/g;function hy(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o68?1900:2e3),n+r[0].length):-1}function $y(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function xy(e,t,n){var r=ly.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function Ey(e,t,n){var r=ly.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Ty(e,t,n){var r=ly.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Cy(e,t,n){var r=ly.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Ny(e,t,n){var r=ly.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Ay(e,t,n){var r=ly.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function My(e,t,n){var r=ly.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function ky(e,t,n){var r=ly.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Py(e,t,n){var r=ly.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Iy(e,t,n){var r=dy.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Ry(e,t,n){var r=ly.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function jy(e,t,n){var r=ly.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Dy(e,t){return hy(e.getDate(),t,2)}function Ly(e,t){return hy(e.getHours(),t,2)}function Fy(e,t){return hy(e.getHours()%12||12,t,2)}function Uy(e,t){return hy(1+yb.count(qv(e),e),t,3)}function By(e,t){return hy(e.getMilliseconds(),t,3)}function zy(e,t){return By(e,t)+"000"}function Hy(e,t){return hy(e.getMonth()+1,t,2)}function Vy(e,t){return hy(e.getMinutes(),t,2)}function Wy(e,t){return hy(e.getSeconds(),t,2)}function Gy(e){var t=e.getDay();return 0===t?7:t}function qy(e,t){return hy(ib.count(qv(e)-1,e),t,2)}function Yy(e){var t=e.getDay();return t>=4||0===t?sb(e):sb.ceil(e)}function Ky(e,t){return e=Yy(e),hy(sb.count(qv(e),e)+(4===qv(e).getDay()),t,2)}function Qy(e){return e.getDay()}function Zy(e,t){return hy(ob.count(qv(e)-1,e),t,2)}function Xy(e,t){return hy(e.getFullYear()%100,t,2)}function Jy(e,t){return hy((e=Yy(e)).getFullYear()%100,t,2)}function e_(e,t){return hy(e.getFullYear()%1e4,t,4)}function t_(e,t){var n=e.getDay();return hy((e=n>=4||0===n?sb(e):sb.ceil(e)).getFullYear()%1e4,t,4)}function n_(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+hy(t/60|0,"0",2)+hy(t%60,"0",2)}function r_(e,t){return hy(e.getUTCDate(),t,2)}function i_(e,t){return hy(e.getUTCHours(),t,2)}function o_(e,t){return hy(e.getUTCHours()%12||12,t,2)}function a_(e,t){return hy(1+Kb.count(Xb(e),e),t,3)}function u_(e,t){return hy(e.getUTCMilliseconds(),t,3)}function s_(e,t){return u_(e,t)+"000"}function c_(e,t){return hy(e.getUTCMonth()+1,t,2)}function l_(e,t){return hy(e.getUTCMinutes(),t,2)}function d_(e,t){return hy(e.getUTCSeconds(),t,2)}function f_(e){var t=e.getUTCDay();return 0===t?7:t}function h_(e,t){return hy(Ib.count(Xb(e)-1,e),t,2)}function p_(e){var t=e.getUTCDay();return t>=4||0===t?Lb(e):Lb.ceil(e)}function g_(e,t){return e=p_(e),hy(Lb.count(Xb(e),e)+(4===Xb(e).getUTCDay()),t,2)}function m_(e){return e.getUTCDay()}function v_(e,t){return hy(Rb.count(Xb(e)-1,e),t,2)}function b_(e,t){return hy(e.getUTCFullYear()%100,t,2)}function y_(e,t){return hy((e=p_(e)).getUTCFullYear()%100,t,2)}function __(e,t){return hy(e.getUTCFullYear()%1e4,t,4)}function w_(e,t){var n=e.getUTCDay();return hy((e=n>=4||0===n?Lb(e):Lb.ceil(e)).getUTCFullYear()%1e4,t,4)}function S_(){return"+0000"}function O_(){return"%"}function $_(e){return+e}function x_(e){return Math.floor(+e/1e3)}function E_(e){return iy=ry(e),oy=iy.format,ay=iy.parse,uy=iy.utcFormat,sy=iy.utcParse,iy}E_({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var T_=1e3,C_=6e4,N_=36e5,A_=864e5,M_=2592e6,k_=31536e6;function P_(e){return new Date(e)}function I_(e){return e instanceof Date?+e:+new Date(+e)}function R_(e,t,n,r,i,a,u,s,c){var l=hv(),d=l.invert,f=l.domain,h=c(".%L"),p=c(":%S"),g=c("%I:%M"),m=c("%I %p"),v=c("%a %d"),b=c("%b %d"),y=c("%B"),_=c("%Y"),w=[[u,1,T_],[u,5,5e3],[u,15,15e3],[u,30,3e4],[a,1,C_],[a,5,3e5],[a,15,9e5],[a,30,18e5],[i,1,N_],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,A_],[r,2,1728e5],[n,1,6048e5],[t,1,M_],[t,3,7776e6],[e,1,k_]];function S(o){return(u(o)1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return OS.h=360*e-100,OS.s=1.5-1.5*t,OS.l=.8-.9*t,OS+""},xS=gr(),ES=Math.PI/3,TS=2*Math.PI/3,CS=function(e){var t;return e=(.5-e)*Math.PI,xS.r=255*(t=Math.sin(e))*t,xS.g=255*(t=Math.sin(e+ES))*t,xS.b=255*(t=Math.sin(e+TS))*t,xS+""},NS=function(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+e*(1172.33-e*(10793.56-e*(33300.12-e*(38394.49-14825.05*e)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+e*(557.33+e*(1225.33-e*(3574.96-e*(1073.77+707.56*e)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+e*(3211.1-e*(15327.97-e*(27814-e*(22569.18-6838.66*e)))))))+")"};function AS(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}var MS=AS(uw("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),kS=AS(uw("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),PS=AS(uw("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),IS=AS(uw("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),RS=function(e){return zn(xn(e).call(document.documentElement))},jS=0;function DS(){return new LS}function LS(){this._="@"+(++jS).toString(36)}LS.prototype=DS.prototype={constructor:LS,get:function(e){for(var t=this._;!(t in e);)if(!(e=e.parentNode))return;return e[t]},set:function(e,t){return e[this._]=t},remove:function(e){return this._ in e&&delete e[this._]},toString:function(){return this._}};var FS=function(e,t){return e.target&&(e=Qr(e),void 0===t&&(t=e.currentTarget),e=e.touches||[e]),Array.from(e,(function(e){return Zr(e,t)}))},US=function(e){return"string"===typeof e?new Fn([document.querySelectorAll(e)],[document.documentElement]):new Fn([null==e?[]:Tt(e)],Ln)},BS=function(e){return function(){return e}},zS=Math.abs,HS=Math.atan2,VS=Math.cos,WS=Math.max,GS=Math.min,qS=Math.sin,YS=Math.sqrt,KS=1e-12,QS=Math.PI,ZS=QS/2,XS=2*QS;function JS(e){return e>1?0:e<-1?QS:Math.acos(e)}function eO(e){return e>=1?ZS:e<=-1?-ZS:Math.asin(e)}function tO(e){return e.innerRadius}function nO(e){return e.outerRadius}function rO(e){return e.startAngle}function iO(e){return e.endAngle}function oO(e){return e&&e.padAngle}function aO(e,t,n,r,i,o,a,u){var s=n-e,c=r-t,l=a-i,d=u-o,f=d*s-l*c;if(!(f*fA*A+M*M&&($=E,x=T),{cx:$,cy:x,x01:-l,y01:-d,x11:$*(i/w-1),y11:x*(i/w-1)}}var sO=function(){var e=tO,t=nO,n=BS(0),r=null,i=rO,o=iO,a=oO,u=null;function s(){var s,c,l=+e.apply(this,arguments),d=+t.apply(this,arguments),f=i.apply(this,arguments)-ZS,h=o.apply(this,arguments)-ZS,p=zS(h-f),g=h>f;if(u||(u=s=fa()),dKS)if(p>XS-KS)u.moveTo(d*VS(f),d*qS(f)),u.arc(0,0,d,f,h,!g),l>KS&&(u.moveTo(l*VS(h),l*qS(h)),u.arc(0,0,l,h,f,g));else{var m,v,b=f,y=h,_=f,w=h,S=p,O=p,$=a.apply(this,arguments)/2,x=$>KS&&(r?+r.apply(this,arguments):YS(l*l+d*d)),E=GS(zS(d-l)/2,+n.apply(this,arguments)),T=E,C=E;if(x>KS){var N=eO(x/l*qS($)),A=eO(x/d*qS($));(S-=2*N)>KS?(_+=N*=g?1:-1,w-=N):(S=0,_=w=(f+h)/2),(O-=2*A)>KS?(b+=A*=g?1:-1,y-=A):(O=0,b=y=(f+h)/2)}var M=d*VS(b),k=d*qS(b),P=l*VS(w),I=l*qS(w);if(E>KS){var R,j=d*VS(y),D=d*qS(y),L=l*VS(_),F=l*qS(_);if(pKS?C>KS?(m=uO(L,F,M,k,d,C,g),v=uO(j,D,P,I,d,C,g),u.moveTo(m.cx+m.x01,m.cy+m.y01),CKS&&S>KS?T>KS?(m=uO(P,I,j,D,l,-T,g),v=uO(M,k,L,F,l,-T,g),u.lineTo(m.cx+m.x01,m.cy+m.y01),T=l;--d)u.point(m[d],v[d]);u.lineEnd(),u.areaEnd()}g&&(m[c]=+e(f,c,s),v[c]=+t(f,c,s),u.point(r?+r(f,c,s):m[c],n?+n(f,c,s):v[c]))}if(h)return u=null,h+""||null}function c(){return gO().defined(i).curve(a).context(o)}return e="function"===typeof e?e:void 0===e?hO:BS(+e),t="function"===typeof t?t:BS(void 0===t?0:+t),n="function"===typeof n?n:void 0===n?pO:BS(+n),s.x=function(t){return arguments.length?(e="function"===typeof t?t:BS(+t),r=null,s):e},s.x0=function(t){return arguments.length?(e="function"===typeof t?t:BS(+t),s):e},s.x1=function(e){return arguments.length?(r=null==e?null:"function"===typeof e?e:BS(+e),s):r},s.y=function(e){return arguments.length?(t="function"===typeof e?e:BS(+e),n=null,s):t},s.y0=function(e){return arguments.length?(t="function"===typeof e?e:BS(+e),s):t},s.y1=function(e){return arguments.length?(n=null==e?null:"function"===typeof e?e:BS(+e),s):n},s.lineX0=s.lineY0=function(){return c().x(e).y(t)},s.lineY1=function(){return c().x(e).y(n)},s.lineX1=function(){return c().x(r).y(t)},s.defined=function(e){return arguments.length?(i="function"===typeof e?e:BS(!!e),s):i},s.curve=function(e){return arguments.length?(a=e,null!=o&&(u=a(o)),s):a},s.context=function(e){return arguments.length?(null==e?o=u=null:u=a(o=e),s):o},s},vO=function(e,t){return te?1:t>=e?0:NaN},bO=function(e){return e},yO=function(){var e=bO,t=vO,n=null,r=BS(0),i=BS(XS),o=BS(0);function a(a){var u,s,c,l,d,f=(a=lO(a)).length,h=0,p=new Array(f),g=new Array(f),m=+r.apply(this,arguments),v=Math.min(XS,Math.max(-XS,i.apply(this,arguments)-m)),b=Math.min(Math.abs(v)/f,o.apply(this,arguments)),y=b*(v<0?-1:1);for(u=0;u0&&(h+=d);for(null!=t?p.sort((function(e,n){return t(g[e],g[n])})):null!=n&&p.sort((function(e,t){return n(a[e],a[t])})),u=0,c=h?(v-f*y)/h:0;u0?d*c:0)+y,g[s]={data:a[s],index:u,value:d,startAngle:m,endAngle:l,padAngle:b};return g}return a.value=function(t){return arguments.length?(e="function"===typeof t?t:BS(+t),a):e},a.sortValues=function(e){return arguments.length?(t=e,n=null,a):t},a.sort=function(e){return arguments.length?(n=e,t=null,a):n},a.startAngle=function(e){return arguments.length?(r="function"===typeof e?e:BS(+e),a):r},a.endAngle=function(e){return arguments.length?(i="function"===typeof e?e:BS(+e),a):i},a.padAngle=function(e){return arguments.length?(o="function"===typeof e?e:BS(+e),a):o},a},_O=SO(fO);function wO(e){this._curve=e}function SO(e){function t(t){return new wO(e(t))}return t._curve=e,t}function OO(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(e){return arguments.length?t(SO(e)):t()._curve},e}wO.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};var $O=function(){return OO(gO().curve(_O))},xO=function(){var e=mO().curve(_O),t=e.curve,n=e.lineX0,r=e.lineX1,i=e.lineY0,o=e.lineY1;return e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return OO(n())},delete e.lineX0,e.lineEndAngle=function(){return OO(r())},delete e.lineX1,e.lineInnerRadius=function(){return OO(i())},delete e.lineY0,e.lineOuterRadius=function(){return OO(o())},delete e.lineY1,e.curve=function(e){return arguments.length?t(SO(e)):t()._curve},e},EO=function(e,t){return[(t=+t)*Math.cos(e-=Math.PI/2),t*Math.sin(e)]};function TO(e){return e.source}function CO(e){return e.target}function NO(e){var t=TO,n=CO,r=hO,i=pO,o=null;function a(){var a,u=cO.call(arguments),s=t.apply(this,u),c=n.apply(this,u);if(o||(o=a=fa()),e(o,+r.apply(this,(u[0]=s,u)),+i.apply(this,u),+r.apply(this,(u[0]=c,u)),+i.apply(this,u)),a)return o=null,a+""||null}return a.source=function(e){return arguments.length?(t=e,a):t},a.target=function(e){return arguments.length?(n=e,a):n},a.x=function(e){return arguments.length?(r="function"===typeof e?e:BS(+e),a):r},a.y=function(e){return arguments.length?(i="function"===typeof e?e:BS(+e),a):i},a.context=function(e){return arguments.length?(o=null==e?null:e,a):o},a}function AO(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,i,r,i)}function MO(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t,n=(n+i)/2,r,n,r,i)}function kO(e,t,n,r,i){var o=EO(t,n),a=EO(t,n=(n+i)/2),u=EO(r,n),s=EO(r,i);e.moveTo(o[0],o[1]),e.bezierCurveTo(a[0],a[1],u[0],u[1],s[0],s[1])}function PO(){return NO(AO)}function IO(){return NO(MO)}function RO(){var e=NO(kO);return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e}var jO={draw:function(e,t){var n=Math.sqrt(t/QS);e.moveTo(n,0),e.arc(0,0,n,0,XS)}},DO={draw:function(e,t){var n=Math.sqrt(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},LO=Math.sqrt(1/3),FO=2*LO,UO={draw:function(e,t){var n=Math.sqrt(t/FO),r=n*LO;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},BO=Math.sin(QS/10)/Math.sin(7*QS/10),zO=Math.sin(XS/10)*BO,HO=-Math.cos(XS/10)*BO,VO={draw:function(e,t){var n=Math.sqrt(.8908130915292852*t),r=zO*n,i=HO*n;e.moveTo(0,-n),e.lineTo(r,i);for(var o=1;o<5;++o){var a=XS*o/5,u=Math.cos(a),s=Math.sin(a);e.lineTo(s*n,-u*n),e.lineTo(u*r-s*i,s*r+u*i)}e.closePath()}},WO={draw:function(e,t){var n=Math.sqrt(t),r=-n/2;e.rect(r,r,n,n)}},GO=Math.sqrt(3),qO={draw:function(e,t){var n=-Math.sqrt(t/(3*GO));e.moveTo(0,2*n),e.lineTo(-GO*n,-n),e.lineTo(GO*n,-n),e.closePath()}},YO=-.5,KO=Math.sqrt(3)/2,QO=1/Math.sqrt(12),ZO=3*(QO/2+1),XO={draw:function(e,t){var n=Math.sqrt(t/ZO),r=n/2,i=n*QO,o=r,a=n*QO+n,u=-o,s=a;e.moveTo(r,i),e.lineTo(o,a),e.lineTo(u,s),e.lineTo(YO*r-KO*i,KO*r+YO*i),e.lineTo(YO*o-KO*a,KO*o+YO*a),e.lineTo(YO*u-KO*s,KO*u+YO*s),e.lineTo(YO*r+KO*i,YO*i-KO*r),e.lineTo(YO*o+KO*a,YO*a-KO*o),e.lineTo(YO*u+KO*s,YO*s-KO*u),e.closePath()}},JO=[jO,DO,UO,WO,VO,qO,XO],e$=function(e,t){var n=null;function r(){var r;if(n||(n=r=fa()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),r)return n=null,r+""||null}return e="function"===typeof e?e:BS(e||jO),t="function"===typeof t?t:BS(void 0===t?64:+t),r.type=function(t){return arguments.length?(e="function"===typeof t?t:BS(t),r):e},r.size=function(e){return arguments.length?(t="function"===typeof e?e:BS(+e),r):t},r.context=function(e){return arguments.length?(n=null==e?null:e,r):n},r},t$=function(){};function n$(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function r$(e){this._context=e}r$.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:n$(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:n$(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};var i$=function(e){return new r$(e)};function o$(e){this._context=e}o$.prototype={areaStart:t$,areaEnd:t$,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:n$(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};var a$=function(e){return new o$(e)};function u$(e){this._context=e}u$.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:n$(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};var s$=function(e){return new u$(e)};function c$(e,t){this._basis=new r$(e),this._beta=t}c$.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r,i=e[0],o=t[0],a=e[n]-i,u=t[n]-o,s=-1;++s<=n;)r=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(i+r*a),this._beta*t[s]+(1-this._beta)*(o+r*u));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var l$=function e(t){function n(e){return 1===t?new r$(e):new c$(e,t)}return n.beta=function(t){return e(+t)},n}(.85);function d$(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function f$(e,t){this._context=e,this._k=(1-t)/6}f$.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:d$(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:d$(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var h$=function e(t){function n(e){return new f$(e,t)}return n.tension=function(t){return e(+t)},n}(0);function p$(e,t){this._context=e,this._k=(1-t)/6}p$.prototype={areaStart:t$,areaEnd:t$,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:d$(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var g$=function e(t){function n(e){return new p$(e,t)}return n.tension=function(t){return e(+t)},n}(0);function m$(e,t){this._context=e,this._k=(1-t)/6}m$.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:d$(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var v$=function e(t){function n(e){return new m$(e,t)}return n.tension=function(t){return e(+t)},n}(0);function b$(e,t,n){var r=e._x1,i=e._y1,o=e._x2,a=e._y2;if(e._l01_a>KS){var u=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,s=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*u-e._x0*e._l12_2a+e._x2*e._l01_2a)/s,i=(i*u-e._y0*e._l12_2a+e._y2*e._l01_2a)/s}if(e._l23_a>KS){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,l=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*c+e._x1*e._l23_2a-t*e._l12_2a)/l,a=(a*c+e._y1*e._l23_2a-n*e._l12_2a)/l}e._context.bezierCurveTo(r,i,o,a,e._x2,e._y2)}function y$(e,t){this._context=e,this._alpha=t}y$.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:b$(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var _$=function e(t){function n(e){return t?new y$(e,t):new f$(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function w$(e,t){this._context=e,this._alpha=t}w$.prototype={areaStart:t$,areaEnd:t$,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:b$(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var S$=function e(t){function n(e){return t?new w$(e,t):new p$(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function O$(e,t){this._context=e,this._alpha=t}O$.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:b$(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var $$=function e(t){function n(e){return t?new O$(e,t):new m$(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function x$(e){this._context=e}x$.prototype={areaStart:t$,areaEnd:t$,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};var E$=function(e){return new x$(e)};function T$(e){return e<0?-1:1}function C$(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),u=(o*i+a*r)/(r+i);return(T$(o)+T$(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(u))||0}function N$(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function A$(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,u=(o-r)/3;e._context.bezierCurveTo(r+u,i+u*t,o-u,a-u*n,o,a)}function M$(e){this._context=e}function k$(e){this._context=new P$(e)}function P$(e){this._context=e}function I$(e){return new M$(e)}function R$(e){return new k$(e)}function j$(e){this._context=e}function D$(e){var t,n,r=e.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};var U$=function(e){return new F$(e,.5)};function B$(e){return new F$(e,0)}function z$(e){return new F$(e,1)}var H$=function(e,t){if((i=e.length)>1)for(var n,r,i,o=1,a=e[t[0]],u=a.length;o=0;)n[t]=t;return n};function W$(e,t){return e[t]}function G$(e){var t=[];return t.key=e,t}var q$=function(){var e=BS([]),t=V$,n=H$,r=W$;function i(i){var o,a,u,c=Array.from(e.apply(this,arguments),G$),l=c.length,d=-1,f=Object(s.a)(i);try{for(f.s();!(u=f.n()).done;){var h=u.value;for(o=0,++d;o0){for(var n,r,i,o=0,a=e[0].length;o0)for(var n,r,i,o,a,u,s=0,c=e[t[0]].length;s0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=a,r[0]=a+=i):(r[0]=0,r[1]=i)},Q$=function(e,t){if((n=e.length)>0){for(var n,r=0,i=e[t[0]],o=i.length;r0&&(r=(n=e[t[0]]).length)>0){for(var n,r,i,o=0,a=1;ao&&(o=t,r=n);return r}var ex=function(e){var t=e.map(tx);return V$(e).sort((function(e,n){return t[e]-t[n]}))};function tx(e){for(var t,n=0,r=-1,i=e.length;++rr?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}var Sx=function(){var e,t,n,r=mx,i=vx,o=wx,a=yx,u=_x,s=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],l=250,d=lm,f=Ot("start","zoom","end"),h=500,p=0,g=10;function m(e){e.property("__zoom",bx).on("wheel.zoom",O).on("mousedown.zoom",$).on("dblclick.zoom",x).filter(u).on("touchstart.zoom",E).on("touchmove.zoom",T).on("touchend.zoom touchcancel.zoom",C).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(e,t){return(t=Math.max(s[0],Math.min(s[1],t)))===e.k?e:new dx(t,e.x,e.y)}function b(e,t,n){var r=t[0]-n[0]*e.k,i=t[1]-n[1]*e.k;return r===e.x&&i===e.y?e:new dx(e.k,r,i)}function y(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function _(e,t,n,r){e.on("start.zoom",(function(){w(this,arguments).event(r).start()})).on("interrupt.zoom end.zoom",(function(){w(this,arguments).event(r).end()})).tween("zoom",(function(){var e=this,o=arguments,a=w(e,o).event(r),u=i.apply(e,o),s=null==n?y(u):"function"===typeof n?n.apply(e,o):n,c=Math.max(u[1][0]-u[0][0],u[1][1]-u[0][1]),l=e.__zoom,f="function"===typeof t?t.apply(e,o):t,h=d(l.invert(s).concat(c/l.k),f.invert(s).concat(c/f.k));return function(e){if(1===e)e=f;else{var t=h(e),n=c/t[2];e=new dx(n,s[0]-t[0]*n,s[1]-t[1]*n)}a.zoom(null,e)}}))}function w(e,t,n){return!n&&e.__zooming||new S(e,t)}function S(e,t){this.that=e,this.args=t,this.active=0,this.sourceEvent=null,this.extent=i.apply(e,t),this.taps=0}function O(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i1?t-1:0),a=1;ap}u.event(e).zoom("mouse",o(b(u.that.__zoom,u.mouse[0]=Zr(e,d),u.mouse[1]),u.extent,c))}function m(e){s.on("mousemove.zoom mouseup.zoom",null),Gn(e.view,u.moved),gx(e),u.event(e).end()}}function x(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a0?zn(this).transition().duration(l).call(_,h,s,e):zn(this).call(m.transform,h,s,e)}}function E(n){for(var i=arguments.length,o=new Array(i>1?i-1:0),a=1;a1?t-1:0),r=1;r1?r-1:0),o=1;o1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),n)}function o(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}function a(e){if(0===e.indexOf("#"))return e;var t=s(e).values;return"#".concat(t.map((function(e){return function(e){var t=e.toString(16);return 1===t.length?"0".concat(t):t}(e)})).join(""))}function u(e){var t=(e=s(e)).values,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return i-o*Math.max(Math.min(t-3,9-t,1),-1)},u="rgb",l=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(u+="a",l.push(t[3])),c({type:u,values:l})}function s(e){if(e.type)return e;if("#"===e.charAt(0))return s(o(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(Object(r.a)(3,e));var i=e.substring(t+1,e.length-1).split(",");return{type:n,values:i=i.map((function(e){return parseFloat(e)}))}}function c(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function l(e,t){var n=d(e),r=d(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function d(e){var t="hsl"===(e=s(e)).type?s(u(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return d(e)>.5?p(e,t):g(e,t)}function h(e,t){return e=s(e),t=i(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,c(e)}function p(e,t){if(e=s(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return c(e)}function g(e,t){if(e=s(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return c(e)}},function(e,t,n){var r;!function(i){"use strict";var o,a=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,u=Math.ceil,s=Math.floor,c="[BigNumber Error] ",l=c+"Number primitive has more than 15 significant digits: ",d=1e14,f=14,h=9007199254740991,p=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],g=1e7,m=1e9;function v(e){var t=0|e;return e>0||e===t?t:t-1}function b(e){for(var t,n,r=1,i=e.length,o=e[0]+"";rc^n?1:-1;for(u=(s=i.length)<(c=o.length)?s:c,a=0;ao[a]^n?1:-1;return s==c?0:s>c^n?1:-1}function _(e,t,n,r){if(en||e!==s(e))throw Error(c+(r||"Argument")+("number"==typeof e?en?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function w(e){var t=e.c.length-1;return v(e.e/f)==t&&e.c[t]%2!=0}function S(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function O(e,t,n){var r,i;if(t<0){for(i=n+".";++t;i+=n);e=i+e}else if(++t>(r=e.length)){for(i=n,t-=r;--t;i+=n);e+=i}else tA?v.c=v.e=null:e.e=10;d/=10,c++);return void(c>A?v.c=v.e=null:(v.e=c,v.c=[e]))}m=String(e)}else{if(!a.test(m=String(e)))return i(v,m,p);v.s=45==m.charCodeAt(0)?(m=m.slice(1),-1):1}(c=m.indexOf("."))>-1&&(m=m.replace(".","")),(d=m.search(/e/i))>0?(c<0&&(c=d),c+=+m.slice(d+1),m=m.substring(0,d)):c<0&&(c=m.length)}else{if(_(t,2,R.length,"Base"),10==t)return U(v=new j(e),x+v.e+1,E);if(m=String(e),p="number"==typeof e){if(0*e!=0)return i(v,m,p,t);if(v.s=1/e<0?(m=m.slice(1),-1):1,j.DEBUG&&m.replace(/^0\.0*|\./,"").length>15)throw Error(l+e)}else v.s=45===m.charCodeAt(0)?(m=m.slice(1),-1):1;for(n=R.slice(0,t),c=d=0,g=m.length;dc){c=g;continue}}else if(!u&&(m==m.toUpperCase()&&(m=m.toLowerCase())||m==m.toLowerCase()&&(m=m.toUpperCase()))){u=!0,d=-1,c=0;continue}return i(v,String(e),p,t)}p=!1,(c=(m=r(m,t,10,v.s)).indexOf("."))>-1?m=m.replace(".",""):c=m.length}for(d=0;48===m.charCodeAt(d);d++);for(g=m.length;48===m.charCodeAt(--g););if(m=m.slice(d,++g)){if(g-=d,p&&j.DEBUG&&g>15&&(e>h||e!==s(e)))throw Error(l+v.s*e);if((c=c-d-1)>A)v.c=v.e=null;else if(c=C)?S(s,a):O(s,a,"0");else if(o=(e=U(new j(e),t,n)).e,u=(s=b(e.c)).length,1==r||2==r&&(t<=o||o<=T)){for(;uu){if(--t>0)for(s+=".";t--;s+="0");}else if((t+=o-u)>0)for(o+1==u&&(s+=".");t--;s+="0");return e.s<0&&i?"-"+s:s}function L(e,t){for(var n,r=1,i=new j(e[0]);r=10;i/=10,r++);return(n=r+n*f-1)>A?e.c=e.e=null:n=10;c/=10,i++);if((o=t-i)<0)o+=f,a=t,g=(l=m[h=0])/v[i-a-1]%10|0;else if((h=u((o+1)/f))>=m.length){if(!r)break e;for(;m.length<=h;m.push(0));l=g=0,i=1,a=(o%=f)-f+1}else{for(l=c=m[h],i=1;c>=10;c/=10,i++);g=(a=(o%=f)-f+i)<0?0:l/v[i-a-1]%10|0}if(r=r||t<0||null!=m[h+1]||(a<0?l:l%v[i-a-1]),r=n<4?(g||r)&&(0==n||n==(e.s<0?3:2)):g>5||5==g&&(4==n||r||6==n&&(o>0?a>0?l/v[i-a]:0:m[h-1])%10&1||n==(e.s<0?8:7)),t<1||!m[0])return m.length=0,r?(t-=e.e+1,m[0]=v[(f-t%f)%f],e.e=-t||0):m[0]=e.e=0,e;if(0==o?(m.length=h,c=1,h--):(m.length=h+1,c=v[f-o],m[h]=a>0?s(l/v[i-a]%v[a])*c:0),r)for(;;){if(0==h){for(o=1,a=m[0];a>=10;a/=10,o++);for(a=m[0]+=c,c=1;a>=10;a/=10,c++);o!=c&&(e.e++,m[0]==d&&(m[0]=1));break}if(m[h]+=c,m[h]!=d)break;m[h--]=0,c=1}for(o=m.length;0===m[--o];m.pop());}e.e>A?e.c=e.e=null:e.e=C?S(t,n):O(t,n,"0"),e.s<0?"-"+t:t)}return j.clone=e,j.ROUND_UP=0,j.ROUND_DOWN=1,j.ROUND_CEIL=2,j.ROUND_FLOOR=3,j.ROUND_HALF_UP=4,j.ROUND_HALF_DOWN=5,j.ROUND_HALF_EVEN=6,j.ROUND_HALF_CEIL=7,j.ROUND_HALF_FLOOR=8,j.EUCLID=9,j.config=j.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(c+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(_(n=e[t],0,m,t),x=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(_(n=e[t],0,8,t),E=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(_(n[0],-m,0,t),_(n[1],0,m,t),T=n[0],C=n[1]):(_(n,-m,m,t),T=-(C=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)_(n[0],-m,-1,t),_(n[1],1,m,t),N=n[0],A=n[1];else{if(_(n,-m,m,t),!n)throw Error(c+t+" cannot be zero: "+n);N=-(A=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(c+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw M=!n,Error(c+"crypto unavailable");M=n}else M=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(_(n=e[t],0,9,t),k=n),e.hasOwnProperty(t="POW_PRECISION")&&(_(n=e[t],0,m,t),P=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(c+t+" not an object: "+n);I=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.$|[+-.\s]|(.).*\1/.test(n))throw Error(c+t+" invalid: "+n);R=n}}return{DECIMAL_PLACES:x,ROUNDING_MODE:E,EXPONENTIAL_AT:[T,C],RANGE:[N,A],CRYPTO:M,MODULO_MODE:k,POW_PRECISION:P,FORMAT:I,ALPHABET:R}},j.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!j.DEBUG)return!0;var t,n,r=e.c,i=e.e,o=e.s;e:if("[object Array]"=={}.toString.call(r)){if((1===o||-1===o)&&i>=-m&&i<=m&&i===s(i)){if(0===r[0]){if(0===i&&1===r.length)return!0;break e}if((t=(i+1)%f)<1&&(t+=f),String(r[0]).length==t){for(t=0;t=d||n!==s(n))break e;if(0!==n)return!0}}}else if(null===r&&null===i&&(null===o||1===o||-1===o))return!0;throw Error(c+"Invalid BigNumber: "+e)},j.maximum=j.max=function(){return L(arguments,o.lt)},j.minimum=j.min=function(){return L(arguments,o.gt)},j.random=function(){var e=9007199254740992,t=Math.random()*e&2097151?function(){return s(Math.random()*e)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(e){var n,r,i,o,a,l=0,d=[],h=new j($);if(null==e?e=x:_(e,0,m),o=u(e/f),M)if(crypto.getRandomValues){for(n=crypto.getRandomValues(new Uint32Array(o*=2));l>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),n[l]=r[0],n[l+1]=r[1]):(d.push(a%1e14),l+=2);l=o/2}else{if(!crypto.randomBytes)throw M=!1,Error(c+"crypto unavailable");for(n=crypto.randomBytes(o*=7);l=9e15?crypto.randomBytes(7).copy(n,l):(d.push(a%1e14),l+=7);l=o/7}if(!M)for(;l=10;a/=10,l++);ln-1&&(null==a[i+1]&&(a[i+1]=0),a[i+1]+=a[i]/n|0,a[i]%=n)}return a.reverse()}return function(r,i,o,a,u){var s,c,l,d,f,h,p,g,m=r.indexOf("."),v=x,y=E;for(m>=0&&(d=P,P=0,r=r.replace(".",""),h=(g=new j(i)).pow(r.length-m),P=d,g.c=t(O(b(h.c),h.e,"0"),10,o,e),g.e=g.c.length),l=d=(p=t(r,i,o,u?(s=R,e):(s=e,R))).length;0==p[--d];p.pop());if(!p[0])return s.charAt(0);if(m<0?--l:(h.c=p,h.e=l,h.s=a,p=(h=n(h,g,v,y,o)).c,f=h.r,l=h.e),m=p[c=l+v+1],d=o/2,f=f||c<0||null!=p[c+1],f=y<4?(null!=m||f)&&(0==y||y==(h.s<0?3:2)):m>d||m==d&&(4==y||f||6==y&&1&p[c-1]||y==(h.s<0?8:7)),c<1||!p[0])r=f?O(s.charAt(1),-v,s.charAt(0)):s.charAt(0);else{if(p.length=c,f)for(--o;++p[--c]>o;)p[c]=0,c||(++l,p=[1].concat(p));for(d=p.length;!p[--d];);for(m=0,r="";m<=d;r+=s.charAt(p[m++]));r=O(r,l,s.charAt(0))}return r}}(),n=function(){function e(e,t,n){var r,i,o,a,u=0,s=e.length,c=t%g,l=t/g|0;for(e=e.slice();s--;)u=((i=c*(o=e[s]%g)+(r=l*o+(a=e[s]/g|0)*c)%g*g+u)/n|0)+(r/g|0)+l*a,e[s]=i%n;return u&&(e=[u].concat(e)),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;it[i]?1:-1;break}return o}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]1;e.splice(0,1));}return function(r,i,o,a,u){var c,l,h,p,g,m,b,y,_,w,S,O,$,x,E,T,C,N=r.s==i.s?1:-1,A=r.c,M=i.c;if(!A||!A[0]||!M||!M[0])return new j(r.s&&i.s&&(A?!M||A[0]!=M[0]:M)?A&&0==A[0]||!M?0*N:N/0:NaN);for(_=(y=new j(N)).c=[],N=o+(l=r.e-i.e)+1,u||(u=d,l=v(r.e/f)-v(i.e/f),N=N/f|0),h=0;M[h]==(A[h]||0);h++);if(M[h]>(A[h]||0)&&l--,N<0)_.push(1),p=!0;else{for(x=A.length,T=M.length,h=0,N+=2,(g=s(u/(M[0]+1)))>1&&(M=e(M,g,u),A=e(A,g,u),T=M.length,x=A.length),$=T,S=(w=A.slice(0,T)).length;S=u/2&&E++;do{if(g=0,(c=t(M,w,T,S))<0){if(O=w[0],T!=S&&(O=O*u+(w[1]||0)),(g=s(O/E))>1)for(g>=u&&(g=u-1),b=(m=e(M,g,u)).length,S=w.length;1==t(m,w,b,S);)g--,n(m,T=10;N/=10,h++);U(y,o+(y.e=h+l*f-1)+1,a,p)}else y.e=l,y.r=+p;return y}}(),i=function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,t=/^([^.]+)\.$/,n=/^\.([^.]+)$/,r=/^-?(Infinity|NaN)$/,i=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(o,a,u,s){var l,d=u?a:a.replace(i,"");if(r.test(d))o.s=isNaN(d)?null:d<0?-1:1;else{if(!u&&(d=d.replace(e,(function(e,t,n){return l="x"==(n=n.toLowerCase())?16:"b"==n?2:8,s&&s!=l?e:t})),s&&(l=s,d=d.replace(t,"$1").replace(n,"0.$1")),a!=d))return new j(d,l);if(j.DEBUG)throw Error(c+"Not a"+(s?" base "+s:"")+" number: "+a);o.s=null}o.c=o.e=null}}(),o.absoluteValue=o.abs=function(){var e=new j(this);return e.s<0&&(e.s=1),e},o.comparedTo=function(e,t){return y(this,new j(e,t))},o.decimalPlaces=o.dp=function(e,t){var n,r,i,o=this;if(null!=e)return _(e,0,m),null==t?t=E:_(t,0,8),U(new j(o),e+o.e+1,t);if(!(n=o.c))return null;if(r=((i=n.length-1)-v(this.e/f))*f,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},o.dividedBy=o.div=function(e,t){return n(this,new j(e,t),x,E)},o.dividedToIntegerBy=o.idiv=function(e,t){return n(this,new j(e,t),0,1)},o.exponentiatedBy=o.pow=function(e,t){var n,r,i,o,a,l,d,h,p=this;if((e=new j(e)).c&&!e.isInteger())throw Error(c+"Exponent not an integer: "+B(e));if(null!=t&&(t=new j(t)),a=e.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!e.c||!e.c[0])return h=new j(Math.pow(+B(p),a?2-w(e):+B(e))),t?h.mod(t):h;if(l=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new j(NaN);(r=!l&&p.isInteger()&&t.isInteger())&&(p=p.mod(t))}else{if(e.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||a&&p.c[1]>=24e7:p.c[0]<8e13||a&&p.c[0]<=9999975e7)))return o=p.s<0&&w(e)?-0:0,p.e>-1&&(o=1/o),new j(l?1/o:o);P&&(o=u(P/f+2))}for(a?(n=new j(.5),l&&(e.s=1),d=w(e)):d=(i=Math.abs(+B(e)))%2,h=new j($);;){if(d){if(!(h=h.times(p)).c)break;o?h.c.length>o&&(h.c.length=o):r&&(h=h.mod(t))}if(i){if(0===(i=s(i/2)))break;d=i%2}else if(U(e=e.times(n),e.e+1,1),e.e>14)d=w(e);else{if(0===(i=+B(e)))break;d=i%2}p=p.times(p),o?p.c&&p.c.length>o&&(p.c.length=o):r&&(p=p.mod(t))}return r?h:(l&&(h=$.div(h)),t?h.mod(t):o?U(h,P,E,undefined):h)},o.integerValue=function(e){var t=new j(this);return null==e?e=E:_(e,0,8),U(t,t.e+1,e)},o.isEqualTo=o.eq=function(e,t){return 0===y(this,new j(e,t))},o.isFinite=function(){return!!this.c},o.isGreaterThan=o.gt=function(e,t){return y(this,new j(e,t))>0},o.isGreaterThanOrEqualTo=o.gte=function(e,t){return 1===(t=y(this,new j(e,t)))||0===t},o.isInteger=function(){return!!this.c&&v(this.e/f)>this.c.length-2},o.isLessThan=o.lt=function(e,t){return y(this,new j(e,t))<0},o.isLessThanOrEqualTo=o.lte=function(e,t){return-1===(t=y(this,new j(e,t)))||0===t},o.isNaN=function(){return!this.s},o.isNegative=function(){return this.s<0},o.isPositive=function(){return this.s>0},o.isZero=function(){return!!this.c&&0==this.c[0]},o.minus=function(e,t){var n,r,i,o,a=this,u=a.s;if(t=(e=new j(e,t)).s,!u||!t)return new j(NaN);if(u!=t)return e.s=-t,a.plus(e);var s=a.e/f,c=e.e/f,l=a.c,h=e.c;if(!s||!c){if(!l||!h)return l?(e.s=-t,e):new j(h?a:NaN);if(!l[0]||!h[0])return h[0]?(e.s=-t,e):new j(l[0]?a:3==E?-0:0)}if(s=v(s),c=v(c),l=l.slice(),u=s-c){for((o=u<0)?(u=-u,i=l):(c=s,i=h),i.reverse(),t=u;t--;i.push(0));i.reverse()}else for(r=(o=(u=l.length)<(t=h.length))?u:t,u=t=0;t0)for(;t--;l[n++]=0);for(t=d-1;r>u;){if(l[--r]=0;){for(n=0,p=O[i]%_,m=O[i]/_|0,o=i+(a=s);o>i;)n=((c=p*(c=S[--a]%_)+(u=m*c+(l=S[a]/_|0)*p)%_*_+b[o]+n)/y|0)+(u/_|0)+m*l,b[o--]=c%y;b[o]=n}return n?++r:b.splice(0,1),F(e,b,r)},o.negated=function(){var e=new j(this);return e.s=-e.s||null,e},o.plus=function(e,t){var n,r=this,i=r.s;if(t=(e=new j(e,t)).s,!i||!t)return new j(NaN);if(i!=t)return e.s=-t,r.minus(e);var o=r.e/f,a=e.e/f,u=r.c,s=e.c;if(!o||!a){if(!u||!s)return new j(i/0);if(!u[0]||!s[0])return s[0]?e:new j(u[0]?r:0*i)}if(o=v(o),a=v(a),u=u.slice(),i=o-a){for(i>0?(a=o,n=s):(i=-i,n=u),n.reverse();i--;n.push(0));n.reverse()}for((i=u.length)-(t=s.length)<0&&(n=s,s=u,u=n,t=i),i=0;t;)i=(u[--t]=u[t]+s[t]+i)/d|0,u[t]=d===u[t]?0:u[t]%d;return i&&(u=[i].concat(u),++a),F(e,u,a)},o.precision=o.sd=function(e,t){var n,r,i,o=this;if(null!=e&&e!==!!e)return _(e,1,m),null==t?t=E:_(t,0,8),U(new j(o),e,t);if(!(n=o.c))return null;if(r=(i=n.length-1)*f+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];i>=10;i/=10,r++);}return e&&o.e+1>r&&(r=o.e+1),r},o.shiftedBy=function(e){return _(e,-9007199254740991,h),this.times("1e"+e)},o.squareRoot=o.sqrt=function(){var e,t,r,i,o,a=this,u=a.c,s=a.s,c=a.e,l=x+4,d=new j("0.5");if(1!==s||!u||!u[0])return new j(!s||s<0&&(!u||u[0])?NaN:u?a:1/0);if(0==(s=Math.sqrt(+B(a)))||s==1/0?(((t=b(u)).length+c)%2==0&&(t+="0"),s=Math.sqrt(+t),c=v((c+1)/2)-(c<0||c%2),r=new j(t=s==1/0?"1e"+c:(t=s.toExponential()).slice(0,t.indexOf("e")+1)+c)):r=new j(s+""),r.c[0])for((s=(c=r.e)+l)<3&&(s=0);;)if(o=r,r=d.times(o.plus(n(a,o,l,1))),b(o.c).slice(0,s)===(t=b(r.c)).slice(0,s)){if(r.e0&&g>0){for(o=g%u||u,d=p.substr(0,o);o0&&(d+=l+p.slice(o)),h&&(d="-"+d)}r=f?d+(n.decimalSeparator||"")+((s=+n.fractionGroupSize)?f.replace(new RegExp("\\d{"+s+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):f):d}return(n.prefix||"")+r+(n.suffix||"")},o.toFraction=function(e){var t,r,i,o,a,u,s,l,d,h,g,m,v=this,y=v.c;if(null!=e&&(!(s=new j(e)).isInteger()&&(s.c||1!==s.s)||s.lt($)))throw Error(c+"Argument "+(s.isInteger()?"out of range: ":"not an integer: ")+B(s));if(!y)return new j(v);for(t=new j($),d=r=new j($),i=l=new j($),m=b(y),a=t.e=m.length-v.e-1,t.c[0]=p[(u=a%f)<0?f+u:u],e=!e||s.comparedTo(t)>0?a>0?t:d:s,u=A,A=1/0,s=new j(m),l.c[0]=0;h=n(s,t,0,1),1!=(o=r.plus(h.times(i))).comparedTo(e);)r=i,i=o,d=l.plus(h.times(o=d)),l=o,t=s.minus(h.times(o=t)),s=o;return o=n(e.minus(r),i,0,1),l=l.plus(o.times(d)),r=r.plus(o.times(i)),l.s=d.s=v.s,g=n(d,i,a*=2,E).minus(v).abs().comparedTo(n(l,r,a,E).minus(v).abs())<1?[d,i]:[l,r],A=u,g},o.toNumber=function(){return+B(this)},o.toPrecision=function(e,t){return null!=e&&_(e,1,m),D(this,e,t,2)},o.toString=function(e){var t,n=this,i=n.s,o=n.e;return null===o?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=o<=T||o>=C?S(b(n.c),o):O(b(n.c),o,"0"):10===e?t=O(b((n=U(new j(n),x+o+1,E)).c),n.e,"0"):(_(e,2,R.length,"Base"),t=r(O(b(n.c),o,"0"),10,e,i,!0)),i<0&&n.c[0]&&(t="-"+t)),t},o.valueOf=o.toJSON=function(){return B(this)},o._isBigNumber=!0,null!=t&&j.set(t),j}()).default=o.BigNumber=o,void 0===(r=function(){return o}.call(t,n,t,e))||(e.exports=r)}()},function(e,t,n){"use strict";function r(e,t,n){return(n=n||[]).length>=t?e.apply(null,n.slice(0,t).reverse()):function(){var i=Array.prototype.slice.call(arguments);return r(e,t,n.concat(i))}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){return function(){return null}}n.r(t),n.d(t,"chainPropTypes",(function(){return r})),n.d(t,"deepmerge",(function(){return i.a})),n.d(t,"elementAcceptingRef",(function(){return s})),n.d(t,"elementTypeAcceptingRef",(function(){return c})),n.d(t,"exactProp",(function(){return l})),n.d(t,"formatMuiErrorMessage",(function(){return d.a})),n.d(t,"getDisplayName",(function(){return b})),n.d(t,"HTMLElementType",(function(){return y})),n.d(t,"ponyfillGlobal",(function(){return _})),n.d(t,"refType",(function(){return w}));var i=n(321),o=n(13),a=n.n(o);var u=(a.a.element,function(){return null});u.isRequired=(a.a.element.isRequired,function(){return null});var s=u;var c=(o.elementType,function(){return null});n(55),n(4);function l(e){return e}var d=n(235),f=n(119),h=n(92),p=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function g(e){var t="".concat(e).match(p);return t&&t[1]||""}function m(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.displayName||e.name||g(e)||t}function v(e,t,n){var r=m(t);return e.displayName||(""!==r?"".concat(n,"(").concat(r,")"):n)}function b(e){if(null!=e){if("string"===typeof e)return e;if("function"===typeof e)return m(e,"Component");if("object"===Object(f.a)(e))switch(e.$$typeof){case h.ForwardRef:return v(e,e.render,"ForwardRef");case h.Memo:return v(e,e.type,"memo");default:return}}}function y(e,t,n,r,i){return null}var _="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),w=a.a.oneOfType([a.a.func,a.a.object])},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(31),i=n(17),o=n(52);function a(e){return function t(n,a,u){switch(arguments.length){case 0:return t;case 1:return Object(o.a)(n)?t:Object(i.a)((function(t,r){return e(n,t,r)}));case 2:return Object(o.a)(n)&&Object(o.a)(a)?t:Object(o.a)(n)?Object(i.a)((function(t,n){return e(t,a,n)})):Object(o.a)(a)?Object(i.a)((function(t,r){return e(n,t,r)})):Object(r.a)((function(t){return e(n,a,t)}));default:return Object(o.a)(n)&&Object(o.a)(a)&&Object(o.a)(u)?t:Object(o.a)(n)&&Object(o.a)(a)?Object(i.a)((function(t,n){return e(t,n,u)})):Object(o.a)(n)&&Object(o.a)(u)?Object(i.a)((function(t,n){return e(t,a,n)})):Object(o.a)(a)&&Object(o.a)(u)?Object(i.a)((function(t,r){return e(n,t,r)})):Object(o.a)(n)?Object(r.a)((function(t){return e(t,a,u)})):Object(o.a)(a)?Object(r.a)((function(t){return e(n,t,u)})):Object(o.a)(u)?Object(r.a)((function(t){return e(n,a,t)})):e(n,a,u)}}}},function(e,t){function n(e,t){for(var n=0;n>>2]>>>24-o%4*8&255;t[r+o>>>2]|=a<<24-(r+o)%4*8}else for(o=0;o>>2]=n[o>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=o.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n,r=[],i=function(t){t=t;var n=987654321,r=4294967295;return function(){var i=((n=36969*(65535&n)+(n>>16)&r)<<16)+(t=18e3*(65535&t)+(t>>16)&r)&r;return i/=4294967296,(i+=.5)*(e.random()>.5?1:-1)}},o=0;o>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new a.init(n,t/2)}},c=u.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new a.init(n,t)}},l=u.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},d=i.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=l.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,i=n.sigBytes,o=this.blockSize,u=i/(4*o),s=(u=t?e.ceil(u):e.max((0|u)-this._minBufferSize,0))*o,c=e.min(4*s,i);if(s){for(var l=0;l=l.OP_1&&e<=l.OP_16||e===l.OP_1NEGATE)}(e)}function p(e){return s.Array(e)&&e.every(h)}function g(e){return 0===e.length?l.OP_0:1===e.length?e[0]>=1&&e[0]<=16?f+e[0]:129===e[0]?l.OP_1NEGATE:void 0:void 0}function m(e){if(r.isBuffer(e))return e;u(s.Array,e);var t=e.reduce((function(e,t){return r.isBuffer(t)?1===t.length&&void 0!==g(t)?e+1:e+a.encodingLength(t.length)+t.length:e+1}),0),n=r.allocUnsafe(t),i=0;if(e.forEach((function(e){if(r.isBuffer(e)){var t=g(e);if(void 0!==t)return n.writeUInt8(t,i),void(i+=1);i+=a.encode(n,e.length,i),e.copy(n,i),i+=e.length}else n.writeUInt8(e,i),i+=1})),i!==n.length)throw new Error("Could not decode chunks");return n}function v(e){if(s.Array(e))return e;u(s.Buffer,e);for(var t=[],n=0;nl.OP_0&&r<=l.OP_PUSHDATA4){var i=a.decode(e,n);if(null===i)return null;if((n+=i.size)+i.number>e.length)return null;var o=e.slice(n,n+i.number);n+=i.number;var c=g(o);void 0!==c?t.push(c):t.push(o)}else t.push(r),n+=1}return t}function b(e){var t=-129&e;return t>0&&t<4}e.exports={compile:m,decompile:v,fromASM:function(e){return u(s.String,e),m(e.split(" ").map((function(e){return void 0!==l[e]?l[e]:(u(s.Hex,e),r.from(e,"hex"))})))},toASM:function(e){return r.isBuffer(e)&&(e=v(e)),e.map((function(e){if(r.isBuffer(e)){var t=g(e);if(void 0===t)return e.toString("hex");e=t}return d[e]})).join(" ")},toStack:function(e){return e=v(e),u(p,e),e.map((function(e){return r.isBuffer(e)?e:e===l.OP_0?r.allocUnsafe(0):c.encode(e-f)}))},number:n(395),signature:n(680),isCanonicalPubKey:function(e){return o.isPoint(e)},isCanonicalScriptSignature:function(e){return!!r.isBuffer(e)&&(!!b(e[e.length-1])&&i.check(e.slice(0,-1)))},isPushOnly:p,isDefinedHashType:b}},function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(t,e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(47);function i(e,t,n){return(i="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Object(r.a)(e)););return e}(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}},function(e,t,n){"use strict";(function(e){var r=n(627),i=n(628),o=n(629);function a(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(e,t){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function p(e,t){if(s.isBuffer(e))return e.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!==typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return B(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(r)return B(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return A(this,t,n);case"utf8":case"utf-8":return E(this,t,n);case"ascii":return C(this,t,n);case"latin1":case"binary":return N(this,t,n);case"base64":return x(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function m(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,r,i){if(0===e.length)return-1;if("string"===typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"===typeof t&&(t=s.from(t,r)),s.isBuffer(t))return 0===t.length?-1:b(e,t,n,r,i);if("number"===typeof t)return t&=255,s.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,r,i){var o,a=1,u=e.length,s=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,u/=2,s/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var l=-1;for(o=n;ou&&(n=u-s),o=n;o>=0;o--){for(var d=!0,f=0;fi&&(r=i):r=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function x(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function E(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i239?4:c>223?3:c>191?2:1;if(i+d<=n)switch(d){case 1:c<128&&(l=c);break;case 2:128===(192&(o=e[i+1]))&&(s=(31&c)<<6|63&o)>127&&(l=s);break;case 3:o=e[i+1],a=e[i+2],128===(192&o)&&128===(192&a)&&(s=(15&c)<<12|(63&o)<<6|63&a)>2047&&(s<55296||s>57343)&&(l=s);break;case 4:o=e[i+1],a=e[i+2],u=e[i+3],128===(192&o)&&128===(192&a)&&128===(192&u)&&(s=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&u)>65535&&s<1114112&&(l=s)}null===l?(l=65533,d=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),i+=d}return function(e){var t=e.length;if(t<=T)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},s.prototype.compare=function(e,t,n,r,i){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),u=Math.min(o,a),c=this.slice(r,i),l=e.slice(t,n),d=0;di)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return y(this,e,t,n);case"utf8":case"utf-8":return _(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return S(this,e,t,n);case"base64":return O(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var T=4096;function C(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;ir)&&(n=r);for(var i="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function P(e,t,n,r,i,o){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function I(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function R(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function j(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function D(e,t,n,r,o){return o||j(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function L(e,t,n,r,o){return o||j(e,0,n,8),i.write(e,t,n,r,52,8),n+8}s.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(i*=256);)r+=this[e+--t]*i;return r},s.prototype.readUInt8=function(e,t){return t||k(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return t||k(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return t||k(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return t||k(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return t||k(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||k(e,t,this.length);for(var r=this[e],i=1,o=0;++o=(i*=128)&&(r-=Math.pow(2,8*t)),r},s.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||k(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},s.prototype.readInt8=function(e,t){return t||k(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){t||k(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(e,t){t||k(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(e,t){return t||k(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return t||k(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return t||k(e,4,this.length),i.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return t||k(e,4,this.length),i.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return t||k(e,8,this.length),i.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return t||k(e,8,this.length),i.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||P(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+n},s.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,1,255,0),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):I(this,e,t,!0),t+2},s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):I(this,e,t,!1),t+2},s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):R(this,e,t,!0),t+4},s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):R(this,e,t,!1),t+4},s.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);P(this,e,t,n,i-1,-i)}var o=0,a=1,u=0;for(this[t]=255&e;++o>0)-u&255;return t+n},s.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);P(this,e,t,n,i-1,-i)}var o=n-1,a=1,u=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===u&&0!==this[t+o+1]&&(u=1),this[t+o]=(e/a>>0)-u&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,1,127,-128),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):I(this,e,t,!0),t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):I(this,e,t,!1),t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):R(this,e,t,!0),t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||P(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):R(this,e,t,!1),t+4},s.prototype.writeFloatLE=function(e,t,n){return D(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return D(this,e,t,!1,n)},s.prototype.writeDoubleLE=function(e,t,n){return L(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return L(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(o<1e3||!s.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"===typeof e)for(o=t;o55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function z(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(F,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function H(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(66))},function(e,t,n){"use strict";t.a={init:function(){return this.xf["@@transducer/init"]()},result:function(e){return this.xf["@@transducer/result"](e)}}},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t,n,r,i,o,a){try{var u=e[o](a),s=u.value}catch(c){return void n(c)}u.done?t(s):Promise.resolve(s).then(r,i)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(i,o){var a=e.apply(t,n);function u(e){r(a,i,o,u,s,"next",e)}function s(e){r(a,i,o,u,s,"throw",e)}u(void 0)}))}}n.d(t,"a",(function(){return i}))},function(e){e.exports=JSON.parse('{"OP_FALSE":0,"OP_0":0,"OP_PUSHDATA1":76,"OP_PUSHDATA2":77,"OP_PUSHDATA4":78,"OP_1NEGATE":79,"OP_RESERVED":80,"OP_TRUE":81,"OP_1":81,"OP_2":82,"OP_3":83,"OP_4":84,"OP_5":85,"OP_6":86,"OP_7":87,"OP_8":88,"OP_9":89,"OP_10":90,"OP_11":91,"OP_12":92,"OP_13":93,"OP_14":94,"OP_15":95,"OP_16":96,"OP_NOP":97,"OP_VER":98,"OP_IF":99,"OP_NOTIF":100,"OP_VERIF":101,"OP_VERNOTIF":102,"OP_ELSE":103,"OP_ENDIF":104,"OP_VERIFY":105,"OP_RETURN":106,"OP_TOALTSTACK":107,"OP_FROMALTSTACK":108,"OP_2DROP":109,"OP_2DUP":110,"OP_3DUP":111,"OP_2OVER":112,"OP_2ROT":113,"OP_2SWAP":114,"OP_IFDUP":115,"OP_DEPTH":116,"OP_DROP":117,"OP_DUP":118,"OP_NIP":119,"OP_OVER":120,"OP_PICK":121,"OP_ROLL":122,"OP_ROT":123,"OP_SWAP":124,"OP_TUCK":125,"OP_CAT":126,"OP_SUBSTR":127,"OP_LEFT":128,"OP_RIGHT":129,"OP_SIZE":130,"OP_INVERT":131,"OP_AND":132,"OP_OR":133,"OP_XOR":134,"OP_EQUAL":135,"OP_EQUALVERIFY":136,"OP_RESERVED1":137,"OP_RESERVED2":138,"OP_1ADD":139,"OP_1SUB":140,"OP_2MUL":141,"OP_2DIV":142,"OP_NEGATE":143,"OP_ABS":144,"OP_NOT":145,"OP_0NOTEQUAL":146,"OP_ADD":147,"OP_SUB":148,"OP_MUL":149,"OP_DIV":150,"OP_MOD":151,"OP_LSHIFT":152,"OP_RSHIFT":153,"OP_BOOLAND":154,"OP_BOOLOR":155,"OP_NUMEQUAL":156,"OP_NUMEQUALVERIFY":157,"OP_NUMNOTEQUAL":158,"OP_LESSTHAN":159,"OP_GREATERTHAN":160,"OP_LESSTHANOREQUAL":161,"OP_GREATERTHANOREQUAL":162,"OP_MIN":163,"OP_MAX":164,"OP_WITHIN":165,"OP_RIPEMD160":166,"OP_SHA1":167,"OP_SHA256":168,"OP_HASH160":169,"OP_HASH256":170,"OP_CODESEPARATOR":171,"OP_CHECKSIG":172,"OP_CHECKSIGVERIFY":173,"OP_CHECKMULTISIG":174,"OP_CHECKMULTISIGVERIFY":175,"OP_NOP1":176,"OP_NOP2":177,"OP_CHECKLOCKTIMEVERIFY":177,"OP_NOP3":178,"OP_CHECKSEQUENCEVERIFY":178,"OP_NOP4":179,"OP_NOP5":180,"OP_NOP6":181,"OP_NOP7":182,"OP_NOP8":183,"OP_NOP9":184,"OP_NOP10":185,"OP_PUBKEYHASH":253,"OP_PUBKEY":254,"OP_INVALIDOPCODE":255}')},function(e,t,n){var r=n(366),i=n(623),o=r.COINS,a=r.ALL_CRYPTOS,u=r.CRYPTO_CURRENCIES,s=i;e.exports={COINS:o,ALL_CRYPTOS:a,CRYPTO_CURRENCIES:u,utils:s}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(416);function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Object(r.a)(e,t)}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var r=n(243),i="object"==typeof self&&self&&self.Object===Object&&self,o=r.a||i||Function("return this")();t.a=o},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(86);function i(e){return null!=e&&"function"===typeof e["@@transducer/step"]}function o(e,t,n){return function(){if(0===arguments.length)return n();var o=Array.prototype.slice.call(arguments,0),a=o.pop();if(!Object(r.a)(a)){for(var u=0;u<+~=|^:(),"'`\s])/g,v="undefined"!==typeof CSS&&CSS.escape,b=function(e){return v?v(e):e.replace(m,"\\$1")},y=function(){function e(e,t,n){this.type="style",this.key=void 0,this.isProcessed=!1,this.style=void 0,this.renderer=void 0,this.renderable=void 0,this.options=void 0;var r=n.sheet,i=n.Renderer;this.key=e,this.options=n,this.style=t,r?this.renderer=r.renderer:i&&(this.renderer=new i)}return e.prototype.prop=function(e,t,n){if(void 0===t)return this.style[e];var r=!!n&&n.force;if(!r&&this.style[e]===t)return this;var i=t;n&&!1===n.process||(i=this.options.jss.plugins.onChangeValue(t,e,this));var o=null==i||!1===i,a=e in this.style;if(o&&!a&&!r)return this;var u=o&&a;if(u?delete this.style[e]:this.style[e]=i,this.renderable&&this.renderer)return u?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,i),this;var s=this.options.sheet;return s&&s.attached,this},e}(),_=function(e){function t(t,n,r){var i;(i=e.call(this,t,n,r)||this).selectorText=void 0,i.id=void 0,i.renderable=void 0;var o=r.selector,a=r.scoped,s=r.sheet,c=r.generateId;return o?i.selectorText=o:!1!==a&&(i.id=c(Object(u.a)(Object(u.a)(i)),s),i.selectorText="."+b(i.id)),i}Object(a.a)(t,e);var n=t.prototype;return n.applyTo=function(e){var t=this.renderer;if(t){var n=this.toJSON();for(var r in n)t.setProperty(e,r,n[r])}return this},n.toJSON=function(){var e={};for(var t in this.style){var n=this.style[t];"object"!==typeof n?e[t]=n:Array.isArray(n)&&(e[t]=h(n))}return e},n.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?Object(r.a)({},e,{allowEmpty:!0}):e;return g(this.selectorText,this.style,n)},Object(o.a)(t,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,n=this.renderable;if(n&&t)t.setSelector(n,e)||t.replaceRule(n,this)}},get:function(){return this.selectorText}}]),t}(y),w={onCreateRule:function(e,t,n){return"@"===e[0]||n.parent&&"keyframes"===n.parent.type?null:new _(e,t,n)}},S={indent:1,children:!0},O=/@([\w-]+)/,$=function(){function e(e,t,n){this.type="conditional",this.at=void 0,this.key=void 0,this.query=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e;var i=e.match(O);for(var o in this.at=i?i[1]:"unknown",this.query=n.name||"@"+this.at,this.options=n,this.rules=new q(Object(r.a)({},n,{parent:this})),t)this.rules.add(o,t[o]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r?(this.options.jss.plugins.onProcessRule(r),r):null},t.toString=function(e){if(void 0===e&&(e=S),null==e.indent&&(e.indent=S.indent),null==e.children&&(e.children=S.children),!1===e.children)return this.query+" {}";var t=this.rules.toString(e);return t?this.query+" {\n"+t+"\n}":""},e}(),x=/@media|@supports\s+/,E={onCreateRule:function(e,t,n){return x.test(e)?new $(e,t,n):null}},T={indent:1,children:!0},C=/@keyframes\s+([\w-]+)/,N=function(){function e(e,t,n){this.type="keyframes",this.at="@keyframes",this.key=void 0,this.name=void 0,this.id=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0;var i=e.match(C);i&&i[1]?this.name=i[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=n;var o=n.scoped,a=n.sheet,u=n.generateId;for(var s in this.id=!1===o?this.name:b(u(this,a)),this.rules=new q(Object(r.a)({},n,{parent:this})),t)this.rules.add(s,t[s],Object(r.a)({},n,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){if(void 0===e&&(e=T),null==e.indent&&(e.indent=T.indent),null==e.children&&(e.children=T.children),!1===e.children)return this.at+" "+this.id+" {}";var t=this.rules.toString(e);return t&&(t="\n"+t+"\n"),this.at+" "+this.id+" {"+t+"}"},e}(),A=/@keyframes\s+/,M=/\$([\w-]+)/g,k=function(e,t){return"string"===typeof e?e.replace(M,(function(e,n){return n in t?t[n]:e})):e},P=function(e,t,n){var r=e[t],i=k(r,n);i!==r&&(e[t]=i)},I={onCreateRule:function(e,t,n){return"string"===typeof e&&A.test(e)?new N(e,t,n):null},onProcessStyle:function(e,t,n){return"style"===t.type&&n?("animation-name"in e&&P(e,"animation-name",n.keyframes),"animation"in e&&P(e,"animation",n.keyframes),e):e},onChangeValue:function(e,t,n){var r=n.options.sheet;if(!r)return e;switch(t){case"animation":case"animation-name":return k(e,r.keyframes);default:return e}}},R=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i=this.index)t.push(e);else for(var r=0;rn)return void t.splice(r,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,n=t.attached,r=Object(s.a)(t,["attached"]),i="",o=0;o0){var n=function(e,t){for(var n=0;nt.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if((n=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e))&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&"string"===typeof r){var i=function(e){for(var t=ue(),n=0;nn?n:t},fe=function(){function e(e){this.getPropertyValue=re,this.setProperty=ie,this.removeProperty=oe,this.setSelector=ae,this.element=void 0,this.sheet=void 0,this.hasInsertedRules=!1,this.cssRules=[],e&&Z.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,r=t.meta,i=t.element;this.element=i||function(){var e=document.createElement("style");return e.textContent="\n",e}(),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),r&&this.element.setAttribute("data-meta",r);var o=ce();o&&this.element.setAttribute("nonce",o)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var n=t.insertionPoint,r=se(t);if(!1!==r&&r.parent)r.parent.insertBefore(e,r.node);else if(n&&"number"===typeof n.nodeType){var i=n,o=i.parentNode;o&&o.insertBefore(e,i.nextSibling)}else ue().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var e=this.element.parentNode;e&&e.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent="\n")}},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var n=0;nt.maxLength)&&((void 0===t.length||n.length===t.length)&&n.every((function(t,n){try{return f(e,t,r)}catch(i){throw s(i,n)}}))))))}return e=d(e),t=t||{},n.toJSON=function(){var n="["+o(e)+"]";return void 0!==t.length?n+="{"+t.length+"}":void 0===t.minLength&&void 0===t.maxLength||(n+="{"+(void 0===t.minLength?0:t.minLength)+","+(void 0===t.maxLength?1/0:t.maxLength)+"}"),n},n},maybe:function e(t){function n(n,r){return i.Nil(n)||t(n,r,e)}return t=d(t),n.toJSON=function(){return"?"+o(t)},n},map:function(e,t){function n(n,r){if(!i.Object(n))return!1;if(i.Nil(n))return!1;for(var o in n){try{t&&f(t,o,r)}catch(u){throw s(u,o,"key")}try{var a=n[o];f(e,a,r)}catch(u){throw s(u,o)}}return!0}return e=d(e),t&&(t=d(t)),n.toJSON=t?function(){return"{"+o(t)+": "+o(e)+"}"}:function(){return"{"+o(e)+"}"},n},object:function(e){var t={};for(var n in e)t[n]=d(e[n]);function r(e,n){if(!i.Object(e))return!1;if(i.Nil(e))return!1;var r;try{for(r in t){f(t[r],e[r],n)}}catch(o){throw s(o,r)}if(n)for(r in e)if(!t[r])throw new u(void 0,r);return!0}return r.toJSON=function(){return o(t)},r},anyOf:function(){var e=[].slice.call(arguments).map(d);function t(t,n){return e.some((function(e){try{return f(e,t,n)}catch(r){return!1}}))}return t.toJSON=function(){return e.map(o).join("|")},t},allOf:function(){var e=[].slice.call(arguments).map(d);function t(t,n){return e.every((function(e){try{return f(e,t,n)}catch(r){return!1}}))}return t.toJSON=function(){return e.map(o).join(" & ")},t},quacksLike:function(e){function t(t){return e===c(t)}return t.toJSON=function(){return e},t},tuple:function(){var e=[].slice.call(arguments).map(d);function t(t,n){return!i.Nil(t)&&(!i.Nil(t.length)&&((!n||t.length===e.length)&&e.every((function(e,r){try{return f(e,t[r],n)}catch(i){throw s(i,r)}}))))}return t.toJSON=function(){return"("+e.map(o).join(", ")+")"},t},value:function(e){function t(t){return t===e}return t.toJSON=function(){return e},t}};function d(e){if(i.String(e))return"?"===e[0]?l.maybe(e.slice(1)):i[e]||l.quacksLike(e);if(e&&i.Object(e)){if(i.Array(e)){if(1!==e.length)throw new TypeError("Expected compile() parameter of type Array of length 1");return l.arrayOf(e[0])}return l.object(e)}return i.Function(e)?e:l.value(e)}function f(e,t,n,r){if(i.Function(e)){if(e(t,n))return!0;throw new a(r||e,t)}return f(d(e),t,n)}for(var h in l.oneOf=l.anyOf,i)f[h]=i[h];for(h in l)f[h]=l[h];var p=n(678);for(h in p)f[h]=p[h];f.compile=d,f.TfTypeError=a,f.TfPropertyTypeError=u,e.exports=f},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t>>2];e.sigBytes-=t}},g=(n.BlockCipher=l.extend({cfg:l.cfg.extend({mode:h,padding:p}),reset:function(){l.reset.call(this);var e=this.cfg,t=e.iv,n=e.mode;if(this._xformMode==this._ENC_XFORM_MODE)var r=n.createEncryptor;else r=n.createDecryptor,this._minBufferSize=1;this._mode&&this._mode.__creator==r?this._mode.init(this,t&&t.words):(this._mode=r.call(n,this,t&&t.words),this._mode.__creator=r)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){e.pad(this._data,this.blockSize);var t=this._process(!0)}else t=this._process(!0),e.unpad(t);return t},blockSize:4}),n.CipherParams=r.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}})),m=(t.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,n=e.salt;if(n)var r=i.create([1398893684,1701076831]).concat(n).concat(t);else r=t;return r.toString(s)},parse:function(e){var t=s.parse(e),n=t.words;if(1398893684==n[0]&&1701076831==n[1]){var r=i.create(n.slice(2,4));n.splice(0,4),t.sigBytes-=16}return g.create({ciphertext:t,salt:r})}},v=n.SerializableCipher=r.extend({cfg:r.extend({format:m}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var i=e.createEncryptor(n,r),o=i.finalize(t),a=i.cfg;return g.create({ciphertext:o,key:n,iv:a.iv,algorithm:e,mode:a.mode,padding:a.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(n,r).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),b=(t.kdf={}).OpenSSL={execute:function(e,t,n,r){r||(r=i.random(8));var o=c.create({keySize:t+n}).compute(e,r),a=i.create(o.words.slice(t),4*n);return o.sigBytes=4*t,g.create({key:o,iv:a,salt:r})}},y=n.PasswordBasedCipher=v.extend({cfg:v.cfg.extend({kdf:b}),encrypt:function(e,t,n,r){var i=(r=this.cfg.extend(r)).kdf.execute(n,e.keySize,e.ivSize);r.iv=i.iv;var o=v.encrypt.call(this,e,t,i.key,r);return o.mixIn(i),o},decrypt:function(e,t,n,r){r=this.cfg.extend(r),t=this._parse(t,r.format);var i=r.kdf.execute(n,e.keySize,e.ivSize,t.salt);return r.iv=i.iv,v.decrypt.call(this,e,t,i.key,r)}})}()))}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(182);function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Object(r.a)(e,t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(47),i=n(245);function o(e){return(o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var a=n(161);function u(e,t){return!t||"object"!==o(t)&&"function"!==typeof t?Object(a.a)(e):t}function s(e){var t=Object(i.a)();return function(){var n,i=Object(r.a)(e);if(t){var o=Object(r.a)(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return u(this,n)}}},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"===typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"===typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var s,c=[],l=!1,d=-1;function f(){l&&s&&(l=!1,s.length?c=s.concat(c):d=-1,c.length&&h())}function h(){if(!l){var e=u(f);l=!0;for(var t=c.length;t;){for(s=c,c=[];++d1)for(var n=1;n0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.duration,u=void 0===n?o.standard:n,s=t.easing,c=void 0===s?i.easeInOut:s,l=t.delay,d=void 0===l?0:l;Object(r.a)(t,["duration","easing","delay"]);return(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"===typeof u?u:a(u)," ").concat(c," ").concat("string"===typeof d?d:a(d))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(419);var i=n(233),o=n(420);function a(e,t){return Object(r.a)(e)||function(e,t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(s){i=!0,o=s}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}return n}}(e,t)||Object(i.a)(e,t)||Object(o.a)()}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return u})),n.d(t,"d",(function(){return d})),n.d(t,"e",(function(){return f}));var r,i=n(1),o=n.n(i),a=n(30);function u(){return r||(r=o.a.createContext({})),r}var s,c=function(e){var t=e.client,n=e.children,r=u();return o.a.createElement(r.Consumer,null,(function(e){return void 0===e&&(e={}),t&&e.client!==t&&(e=Object.assign({},e,{client:t})),Object(a.b)(e.client,5),o.a.createElement(r.Provider,{value:e},n)}))};!function(e){e[e.Query=0]="Query",e[e.Mutation=1]="Mutation",e[e.Subscription=2]="Subscription"}(s||(s={}));var l=new Map;function d(e){var t;switch(e){case s.Query:t="Query";break;case s.Mutation:t="Mutation";break;case s.Subscription:t="Subscription"}return t}function f(e){var t,n,r=l.get(e);if(r)return r;Object(a.b)(!!e&&!!e.kind,1);var i=e.definitions.filter((function(e){return"FragmentDefinition"===e.kind})),o=e.definitions.filter((function(e){return"OperationDefinition"===e.kind&&"query"===e.operation})),u=e.definitions.filter((function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation})),c=e.definitions.filter((function(e){return"OperationDefinition"===e.kind&&"subscription"===e.operation}));Object(a.b)(!i.length||o.length||u.length||c.length,2),Object(a.b)(o.length+u.length+c.length<=1,3),n=o.length?s.Query:s.Mutation,o.length||u.length||(n=s.Subscription);var d=o.length?o:u.length?u:c;Object(a.b)(1===d.length,4);var f=d[0];t=f.variableDefinitions||[];var h={name:f.name&&"Name"===f.name.kind?f.name.value:"data",type:n,variables:t};return l.set(e,h),h}},function(e,t,n){"use strict";t.a=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(329),i=(n(1),n(120));function o(){return Object(r.a)()||i.a}},function(e,t,n){"use strict";var r=n(17),i=n(68),o=n(148),a=n(72),u=n(60),s=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=u.a.init,e.prototype["@@transducer/result"]=u.a.result,e.prototype["@@transducer/step"]=function(e,t){return this.xf["@@transducer/step"](e,this.f(t))},e}(),c=Object(r.a)((function(e,t){return new s(e,t)})),l=n(94),d=n(89),f=Object(r.a)(Object(i.a)(["fantasy-land/map","map"],c,(function(e,t){switch(Object.prototype.toString.call(t)){case"[object Function]":return Object(l.a)(t.length,(function(){return e.call(this,t.apply(this,arguments))}));case"[object Object]":return Object(a.a)((function(n,r){return n[r]=e(t[r]),n}),{},Object(d.a)(t));default:return Object(o.a)(e,t)}})));t.a=f},function(e,t,n){"use strict";var r=n(31),i=n(57),o=n(240),a=!{toString:null}.propertyIsEnumerable("toString"),u=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],s=function(){return arguments.propertyIsEnumerable("length")}(),c=function(e,t){for(var n=0;n=0;)t=u[n],Object(i.a)(t,e)&&!c(r,t)&&(r[r.length]=t),n-=1;return r})):Object(r.a)((function(e){return Object(e)!==e?[]:Object.keys(e)}));t.a=l},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a}));var r=n(238),i={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},o=Object.freeze({});function a(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i,a=void 0,c=Array.isArray(e),l=[e],d=-1,f=[],h=void 0,p=void 0,g=void 0,m=[],v=[],b=e;do{var y=++d===l.length,_=y&&0!==f.length;if(y){if(p=0===v.length?void 0:m[m.length-1],h=g,g=v.pop(),_){if(c)h=h.slice();else{for(var w={},S=0,O=Object.keys(h);S=0}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(209);var i=n(418),o=n(233);function a(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||Object(i.a)(e)||Object(o.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t,n){"use strict";function r(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.r(t),n.d(t,"ApolloLink",(function(){return y})),n.d(t,"concat",(function(){return b})),n.d(t,"createOperation",(function(){return f})),n.d(t,"empty",(function(){return g})),n.d(t,"execute",(function(){return _})),n.d(t,"from",(function(){return m})),n.d(t,"fromError",(function(){return d})),n.d(t,"fromPromise",(function(){return l})),n.d(t,"makePromise",(function(){return c})),n.d(t,"split",(function(){return v})),n.d(t,"toPromise",(function(){return s}));var r=n(77);n.d(t,"Observable",(function(){return r.a}));var i=n(30),o=n(14),a=n(27);n.d(t,"getOperationName",(function(){return a.n}));!function(e){function t(t,n){var r=e.call(this,t)||this;return r.link=n,r}Object(o.c)(t,e)}(Error);function u(e){return e.request.length<=1}function s(e){var t=!1;return new Promise((function(n,r){e.subscribe({next:function(e){t||(t=!0,n(e))},error:r})}))}var c=s;function l(e){return new r.a((function(t){e.then((function(e){t.next(e),t.complete()})).catch(t.error.bind(t))}))}function d(e){return new r.a((function(t){t.error(e)}))}function f(e,t){var n=Object(o.a)({},e);return Object.defineProperty(t,"setContext",{enumerable:!1,value:function(e){n="function"===typeof e?Object(o.a)({},n,e(n)):Object(o.a)({},n,e)}}),Object.defineProperty(t,"getContext",{enumerable:!1,value:function(){return Object(o.a)({},n)}}),Object.defineProperty(t,"toKey",{enumerable:!1,value:function(){return function(e){var t=e.query,n=e.variables,r=e.operationName;return JSON.stringify([r,t,n])}(t)}}),t}function h(e,t){return t?t(e):r.a.of()}function p(e){return"function"===typeof e?new y(e):e}function g(){return new y((function(){return r.a.of()}))}function m(e){return 0===e.length?g():e.map(p).reduce((function(e,t){return e.concat(t)}))}function v(e,t,n){var i=p(t),o=p(n||new y(h));return u(i)&&u(o)?new y((function(t){return e(t)?i.request(t)||r.a.of():o.request(t)||r.a.of()})):new y((function(t,n){return e(t)?i.request(t,n)||r.a.of():o.request(t,n)||r.a.of()}))}var b=function(e,t){var n=p(e);if(u(n))return n;var i=p(t);return u(i)?new y((function(e){return n.request(e,(function(e){return i.request(e)||r.a.of()}))||r.a.of()})):new y((function(e,t){return n.request(e,(function(e){return i.request(e,t)||r.a.of()}))||r.a.of()}))},y=function(){function e(e){e&&(this.request=e)}return e.prototype.split=function(t,n,r){return this.concat(v(t,n,r||new e(h)))},e.prototype.concat=function(e){return b(this,e)},e.prototype.request=function(e,t){throw new i.a(1)},e.empty=g,e.from=m,e.split=v,e.execute=_,e}();function _(e,t){return e.request(f(t.context,function(e){var t={variables:e.variables||{},extensions:e.extensions||{},operationName:e.operationName,query:e.query};return t.operationName||(t.operationName="string"!==typeof t.query?Object(a.n)(t.query):""),t}(function(e){for(var t=["query","operationName","variables","extensions","context"],n=0,r=Object.keys(e);n(i>>1)-1?(i>>1)-s:s,o.isubn(u)):u=0,r[a]=u,o.iushrn(1)}return r},r.getJSF=function(e,t){var n=[[],[]];e=e.clone(),t=t.clone();for(var r,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var a,u,s=e.andln(3)+i&3,c=t.andln(3)+o&3;3===s&&(s=-1),3===c&&(c=-1),a=0===(1&s)?0:3!==(r=e.andln(7)+i&7)&&5!==r||2!==c?s:-s,n[0].push(a),u=0===(1&c)?0:3!==(r=t.andln(7)+o&7)&&5!==r||2!==s?c:-c,n[1].push(u),2*i===a+1&&(i=1-i),2*o===u+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return n},r.cachedProperty=function(e,t,n){var r="_"+t;e.prototype[t]=function(){return void 0!==this[r]?this[r]:this[r]=n.call(this)}},r.parseBytes=function(e){return"string"===typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new i(e,"hex","le")}},function(e,t,n){"use strict";function r(e){var t=e.props,n=e.states,r=e.muiFormControl;return n.reduce((function(e,n){return e[n]=t[n],r&&"undefined"===typeof t[n]&&(e[n]=r[n]),e}),{})}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(17);function i(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}var o=n(194);var a=n(57);var u="function"===typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t},s=n(89),c=n(211);function l(e,t,n,r){var a=i(e),u=i(t);function s(e,t){return d(e,t,n.slice(),r.slice())}return!Object(o.a)((function(e,t){return!Object(o.a)(s,t,e)}),u,a)}function d(e,t,n,r){if(u(e,t))return!0;var i=Object(c.a)(e);if(i!==Object(c.a)(t))return!1;if(null==e||null==t)return!1;if("function"===typeof e["fantasy-land/equals"]||"function"===typeof t["fantasy-land/equals"])return"function"===typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t)&&"function"===typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e);if("function"===typeof e.equals||"function"===typeof t.equals)return"function"===typeof e.equals&&e.equals(t)&&"function"===typeof t.equals&&t.equals(e);switch(i){case"Arguments":case"Array":case"Object":if("function"===typeof e.constructor&&"Promise"===function(e){var t=String(e).match(/^function (\w*)/);return null==t?"":t[1]}(e.constructor))return e===t;break;case"Boolean":case"Number":case"String":if(typeof e!==typeof t||!u(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!u(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(e.source!==t.source||e.global!==t.global||e.ignoreCase!==t.ignoreCase||e.multiline!==t.multiline||e.sticky!==t.sticky||e.unicode!==t.unicode)return!1}for(var o=n.length-1;o>=0;){if(n[o]===e)return r[o]===t;o-=1}switch(i){case"Map":return e.size===t.size&&l(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size===t.size&&l(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":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 f=Object(s.a)(e);if(f.length!==Object(s.a)(t).length)return!1;var h=n.concat([e]),p=r.concat([t]);for(o=f.length-1;o>=0;){var g=f[o];if(!Object(a.a)(g,t)||!d(t[g],e[g],h,p))return!1;o-=1}return!0}var f=Object(r.a)((function(e,t){return d(e,t,[],[])}));t.a=f},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(1),i="undefined"!==typeof window?r.useLayoutEffect:r.useEffect;function o(e){var t=r.useRef(e);return i((function(){t.current=e})),r.useCallback((function(){return t.current.apply(void 0,arguments)}),[])}},function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return i}));var r=function(e){return e.scrollTop};function i(e,t){var n=e.timeout,r=e.style,i=void 0===r?{}:r;return{duration:i.transitionDuration||"number"===typeof n?n:n[t.mode]||0,delay:i.transitionDelay}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return O})),n.d(t,"b",(function(){return N})),n.d(t,"d",(function(){return M})),n.d(t,"c",(function(){return g})),n.d(t,"f",(function(){return m})),n.d(t,"e",(function(){return p}));var r=n(4);function i(e){return"/"===e.charAt(0)}function o(e,t){for(var n=t,r=n+1,i=e.length;r=0;f--){var h=a[f];"."===h?o(a,f):".."===h?(o(a,f),d++):d&&(o(a,f),d--)}if(!c)for(;d--;d)a.unshift("..");!c||""===a[0]||a[0]&&i(a[0])||a.unshift("");var p=a.join("/");return n&&"/"!==p.substr(-1)&&(p+="/"),p};function u(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}var s=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}));if("object"===typeof t||"object"===typeof n){var r=u(t),i=u(n);return r!==t||i!==n?e(r,i):Object.keys(Object.assign({},t,n)).every((function(r){return e(t[r],n[r])}))}return!1},c=n(100);function l(e){return"/"===e.charAt(0)?e:"/"+e}function d(e){return"/"===e.charAt(0)?e.substr(1):e}function f(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function h(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function p(e){var t=e.pathname,n=e.search,r=e.hash,i=t||"/";return n&&"?"!==n&&(i+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(i+="#"===r.charAt(0)?r:"#"+r),i}function g(e,t,n,i){var o;"string"===typeof e?(o=function(e){var t=e||"/",n="",r="",i=t.indexOf("#");-1!==i&&(r=t.substr(i),t=t.substr(0,i));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e)).state=t:(void 0===(o=Object(r.a)({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(u){throw u instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):u}return n&&(o.key=n),i?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=a(o.pathname,i.pathname)):o.pathname=i.pathname:o.pathname||(o.pathname="/"),o}function m(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&s(e.state,t.state)}function v(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,i){if(null!=e){var o="function"===typeof e?e(t,n):e;"string"===typeof o?"function"===typeof r?r(o,i):i(!0):i(!1!==o)}else i(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,i):n.push(i),d({action:r,location:i,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",i=g(e,t,f(),_.location);l.confirmTransitionTo(i,r,n,(function(e){e&&(_.entries[_.index]=i,d({action:r,location:i}))}))},go:y,goBack:function(){y(-1)},goForward:function(){y(1)},canGo:function(e){var t=_.index+e;return t>=0&&t<_.entries.length},block:function(e){return void 0===e&&(e=!1),l.setPrompt(e)},listen:function(e){return l.appendListener(e)}};return _}},function(e,t){e.exports={bitcoin:{messagePrefix:"\x18Bitcoin Signed Message:\n",bech32:"bc",bip32:{public:76067358,private:76066276},pubKeyHash:0,scriptHash:5,wif:128},regtest:{messagePrefix:"\x18Bitcoin Signed Message:\n",bech32:"bcrt",bip32:{public:70617039,private:70615956},pubKeyHash:111,scriptHash:196,wif:239},testnet:{messagePrefix:"\x18Bitcoin Signed Message:\n",bech32:"tb",bip32:{public:70617039,private:70615956},pubKeyHash:111,scriptHash:196,wif:239}}},function(e,t,n){"use strict";function r(e){return"[object String]"===Object.prototype.toString.call(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(92),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},u={};function s(e){return r.isMemo(e)?a:u[e.$$typeof]||i}u[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},u[r.Memo]=a;var c=Object.defineProperty,l=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(p){var i=h(n);i&&i!==p&&e(t,i,r)}var a=l(n);d&&(a=a.concat(d(n)));for(var u=s(t),g=s(n),m=0;m0?1:a}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(29),i=n(25),o=n(22);function a(e,t){Object(o.a)(1,arguments);var n=t||{},a=n.locale,u=a&&a.options&&a.options.weekStartsOn,s=null==u?0:Object(r.a)(u),c=null==n.weekStartsOn?s:Object(r.a)(n.weekStartsOn);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var l=Object(i.a)(e),d=l.getUTCDay(),f=(d=0)return"";switch(Object.prototype.toString.call(i)){case"[object Boolean]":return"object"===typeof i?"new Boolean ("+r(i.valueOf())+")":i.toString();case"[object Number]":return"object"===typeof i?"new Number ("+r(i.valueOf())+")":1/i===-1/0?"-0":i.toString(10);case"[object String]":return"object"===typeof i?"new String ("+r(i.valueOf())+")":JSON.stringify(i);case"[object Date]":return"new Date ("+r(isNaN(i.valueOf())?NaN:i.toISOString())+")";case"[object Error]":return"new "+i.name+" ("+r(i.message)+")";case"[object Arguments]":return"function () { return arguments; } ("+Array.prototype.map.call(i,r).join(", ")+")";case"[object Array]":t.push(i);try{return"["+i.map(r).concat(Object.keys(i).sort().filter((function(e){return!/^\d+$/.test(e)})).map(n(i))).join(", ")+"]"}finally{t.pop()}case"[object Object]":t.push(i);try{return!(e in i)||null!=i.constructor&&i.constructor.prototype===i?"{"+Object.keys(i).sort().map(n(i)).join(", ")+"}":i[e]()}finally{t.pop()}default:return String(i)}}return r}))},function(e,t,n){var r,i,o;!function(a){"use strict";"object"===typeof e.exports?e.exports=a(n(169)):null!=n(131)?(i=[n(169)],void 0===(o="function"===typeof(r=a)?r.apply(t,i):r)||(e.exports=o)):self.sanctuaryTypeClasses=a(self.sanctuaryTypeIdentifiers)}((function(e){"use strict";if("undefined"!==typeof __doctest){__doctest.require("sanctuary-identity");var t=__doctest.require("./test/List"),n=__doctest.require("sanctuary-maybe");__doctest.require("sanctuary-pair"),__doctest.require("./test/Sum"),t.Nil,t.Cons,n.Nothing,n.Just}function r(e){return function(t){return e.concat(t)}}function i(e){return function(t){return e}}function o(e,t){Object.keys(e).forEach(t,e)}function a(e,t){return Object.prototype.hasOwnProperty.call(t,e)}function u(e){return e}function s(e){return function(t){return[e,t]}}function c(t,n){return typeof t===typeof n&&e(t)===e(n)}function l(e){return Object.keys(e).sort()}function d(e){return function(t){return e(t)}}function f(e){return{value:e,done:!1}}function h(e){return{value:e,done:!0}}function p(e,t,n,r){if(!(this instanceof p))return new p(e,t,n,r);this.name=e,this.url=t,this.test=function(e){return n.every((function(t){return t.test(e)}))&&r(e)}}p["@@type"]="sanctuary-type-classes/TypeClass@1";var g="Constructor",m="Value";function v(e,t,n){for(var r=n,i=0;ii)return!1;if(!X(this[r],e[r]))return ee(this[r],e[r])}},"fantasy-land/concat":Q,"fantasy-land/filter":function(e){var t={};return o(this,(function(n){e(this[n])&&(t[n]=this[n])})),t},"fantasy-land/map":function(e){var t={};return o(this,(function(n){t[n]=e(this[n])})),t},"fantasy-land/ap":function(e){var t={};return o(this,(function(n){a(n,e)&&(t[n]=e[n](this[n]))})),t},"fantasy-land/alt":Q,"fantasy-land/reduce":function(e,t){var n=this;return l(this).reduce((function(t,r){return e(t,n[r])}),t)},"fantasy-land/traverse":function(e,t){var n=this;return Object.keys(this).reduce((function(e,r){return ce((function(e){return function(t){var n={};return n[r]=t,Q.call(e,n)}}),e,t(n[r]))}),le(e,{}))}}},Function:{"fantasy-land/id":function(){return u},"fantasy-land/of":function(e){return function(t){return e}},"fantasy-land/chainRec":function(e,t){return function(n){for(var r=f(t);!r.done;)r=e(f,h,r.value)(n);return r.value}},prototype:{"fantasy-land/equals":function(e){return e===this},"fantasy-land/compose":function(e){var t=this;return function(n){return e(t(n))}},"fantasy-land/map":function(e){var t=this;return function(n){return e(t(n))}},"fantasy-land/promap":function(e,t){var n=this;return function(r){return t(n(e(r)))}},"fantasy-land/ap":function(e){var t=this;return function(n){return e(n)(t(n))}},"fantasy-land/chain":function(e){var t=this;return function(n){return e(t(n))(n)}},"fantasy-land/extend":function(e){var t=this;return function(n){return e((function(e){return t(re(n,e))}))}},"fantasy-land/contramap":function(e){var t=this;return function(n){return t(e(n))}}}}},X=function(){var e=[];return function(t,n){if(!c(t,n))return!1;if(e.some((function(e){return e[0]===t&&e[1]===n})))return!0;e.push([t,n]);try{return S.test(t)&&S.test(n)&&S.methods.equals(t)(n)}finally{e.pop()}}}();function J(e,t){return c(e,t)&&!ee(t,e)}var ee=function(){var e=[];return function(t,n){if(!c(t,n))return!1;if(e.some((function(e){return e[0]===t&&e[1]===n})))return X(t,n);e.push([t,n]);try{return O.test(t)&&O.test(n)&&O.methods.lte(t)(n)}finally{e.pop()}}}();function te(e,t){return ee(e,t)?e:t}function ne(e,t){return ee(e,t)?t:e}function re(e,t){return E.methods.concat(e)(t)}function ie(e){return T.methods.empty(e)()}function oe(e,t){return N.methods.filter(t)(e)}function ae(e,t){return A.methods.map(t)(e)}function ue(e,t,n){return M.methods.bimap(n)(e,t)}function se(e,t){return P.methods.ap(t)(e)}function ce(e,t,n){return se(ae(e,t),n)}function le(e,t){return I.methods.of(e)(t)}function de(e,t){return R.methods.chain(t)(e)}function fe(e,t,n){return B.methods.reduce(n)(e,t)}function he(e,t){return Array.isArray(t)?t.some(d(e)):fe((function(t,n){return t||e(n)}),!1,t)}function pe(e,t){var n=fe((function(t,n){return t.push({idx:t.length,x:n,fx:e(n)}),t}),[],t),r=function(e){switch(typeof(e&&e.fx)){case"number":return function(e,t){return e<=t||e!==e};case"string":return function(e,t){return e<=t};default:return ee}}(n[0]);if(n.sort((function(e,t){return r(e.fx,t.fx)?r(t.fx,e.fx)?e.idx-t.idx:-1:1})),Array.isArray(t)){for(var i=0;i=e.length)&&56320===(64512&e.charCodeAt(t+1)))}function a(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function u(e){return 1===e.length?"0"+e:e}function s(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"===typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!==0&&(e="0"+e),i=0;i>6|192,n[r++]=63&a|128):o(e,i)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++i)),n[r++]=a>>18|240,n[r++]=a>>12&63|128,n[r++]=a>>6&63|128,n[r++]=63&a|128):(n[r++]=a>>12|224,n[r++]=a>>6&63|128,n[r++]=63&a|128)}else for(i=0;i>>0}return a},t.split32=function(e,t){for(var n=new Array(4*e.length),r=0,i=0;r>>24,n[i+1]=o>>>16&255,n[i+2]=o>>>8&255,n[i+3]=255&o):(n[i+3]=o>>>24,n[i+2]=o>>>16&255,n[i+1]=o>>>8&255,n[i]=255&o)}return n},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,n){return e+t+n>>>0},t.sum32_4=function(e,t,n,r){return e+t+n+r>>>0},t.sum32_5=function(e,t,n,r,i){return e+t+n+r+i>>>0},t.sum64=function(e,t,n,r){var i=e[t],o=r+e[t+1]>>>0,a=(o>>0,e[t+1]=o},t.sum64_hi=function(e,t,n,r){return(t+r>>>0>>0},t.sum64_lo=function(e,t,n,r){return t+r>>>0},t.sum64_4_hi=function(e,t,n,r,i,o,a,u){var s=0,c=t;return s+=(c=c+r>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,n,r,i,o,a,u){return t+r+o+u>>>0},t.sum64_5_hi=function(e,t,n,r,i,o,a,u,s,c){var l=0,d=t;return l+=(d=d+r>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,n,r,i,o,a,u,s,c){return t+r+o+u+c>>>0},t.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},t.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},t.shr64_hi=function(e,t,n){return e>>>n},t.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0}},function(e,t,n){var r=n(75),i=Math.pow(2,31)-1;function o(e){return r.String(e)&&e.match(/^(m\/)?(\d+'?\/)*\d+'?$/)}o.toJSON=function(){return"BIP32 derivation path"};var a=r.quacksLike("Point"),u=r.compile({messagePrefix:r.oneOf(r.Buffer,r.String),bip32:{public:r.UInt32,private:r.UInt32},pubKeyHash:r.UInt8,scriptHash:r.UInt8,wif:r.UInt8}),s={BIP32Path:o,Buffer256bit:r.BufferN(32),ECPoint:a,Hash160bit:r.BufferN(20),Hash256bit:r.BufferN(32),Network:u,Satoshi:function(e){return r.UInt53(e)&&e<=21e14},UInt31:function(e){return r.UInt32(e)&&e<=i}};for(var c in r)s[c]=r[c];e.exports=s},function(e,t,n){(function(t){var r=n(91),i=n(173),o=n(714),a=o.bech32,u=o.bech32m,s=n(715),c=n(728);function l(e,t){for(var n=0;n16)return console.log("Unsupported witness version for bech32m"),!1;var o=u.fromWords(r.words.slice(1));if(o.length<2||o.length>40)return console.log("Invalid bech32m address length: ".concat(o.length)),!1;return"main"===e&&r.prefix===n.mainNetPrefix||"test"===e&&r.prefix===n.testNetPrefix},bech32Validator:d,isBech32Address:function(e,t){return d("main",e,t)||d("test",e,t)},zecBech32Validator:function(e,t,n){var r;try{r=a.decode(t)}catch(o){return console.log("Failed to decode bech32 address"),!1}var i=a.fromWords(r.words);if(43!==i.length)return console.log("Invalid bech32 address length: ".concat(i.length)),!1;return"main"===e&&r.prefix===n.mainNetPrefix||"test"===e&&r.prefix===n.testNetPrefix},xmrValidator:function(e,n,i){try{var o=c.decode(n),a=o.slice(-8),u=(l=function(e){if(e.length%2!==0)return null;for(var t=new Uint8Array(e.length/2),n=0;n>18&63)+l.charAt(i>>12&63)+l.charAt(i>>6&63)+l.charAt(63&i);return 2==o?(t=e.charCodeAt(u)<<8,n=e.charCodeAt(++u),a+=l.charAt((i=t+n)>>10)+l.charAt(i>>4&63)+l.charAt(i<<2&63)+"="):1==o&&(i=e.charCodeAt(u),a+=l.charAt(i>>2)+l.charAt(i<<4&63)+"=="),a},decode:function(e){var t=(e=String(e).replace(d,"")).length;t%4==0&&(t=(e=e.replace(/==?$/,"")).length),(t%4==1||/[^+a-zA-Z0-9/]/.test(e))&&c("Invalid character: the string to be decoded is not correctly encoded.");for(var n,r,i=0,o="",a=-1;++a>(-2*i&6)));return o},version:"1.0.0"};void 0===(i=function(){return f}.call(t,n,t,e))||(e.exports=i)}()}).call(this,n(135)(e),n(66))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(25),i=n(22);function o(e){Object(i.a)(1,arguments);var t=1,n=Object(r.a)(e),o=n.getUTCDay(),a=(o=0&&s===u&&c())}var E=n(167),T=n.n(E),C=(n(13),function(){function e(t){var n=t.cellCount,r=t.cellSizeGetter,o=t.estimatedCellSize;i()(this,e),m()(this,"_cellSizeAndPositionData",{}),m()(this,"_lastMeasuredIndex",-1),m()(this,"_lastBatchedIndex",-1),m()(this,"_cellCount",void 0),m()(this,"_cellSizeGetter",void 0),m()(this,"_estimatedCellSize",void 0),this._cellSizeGetter=r,this._cellCount=n,this._estimatedCellSize=o}return a()(e,[{key:"areOffsetsAdjusted",value:function(){return!1}},{key:"configure",value:function(e){var t=e.cellCount,n=e.estimatedCellSize,r=e.cellSizeGetter;this._cellCount=t,this._estimatedCellSize=n,this._cellSizeGetter=r}},{key:"getCellCount",value:function(){return this._cellCount}},{key:"getEstimatedCellSize",value:function(){return this._estimatedCellSize}},{key:"getLastMeasuredIndex",value:function(){return this._lastMeasuredIndex}},{key:"getOffsetAdjustment",value:function(){return 0}},{key:"getSizeAndPositionOfCell",value:function(e){if(e<0||e>=this._cellCount)throw Error("Requested index ".concat(e," is outside of range 0..").concat(this._cellCount));if(e>this._lastMeasuredIndex)for(var t=this.getSizeAndPositionOfLastMeasuredCell(),n=t.offset+t.size,r=this._lastMeasuredIndex+1;r<=e;r++){var i=this._cellSizeGetter({index:r});if(void 0===i||isNaN(i))throw Error("Invalid size returned for cell ".concat(r," of value ").concat(i));null===i?(this._cellSizeAndPositionData[r]={offset:n,size:0},this._lastBatchedIndex=e):(this._cellSizeAndPositionData[r]={offset:n,size:i},n+=i,this._lastMeasuredIndex=e)}return this._cellSizeAndPositionData[e]}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}}},{key:"getTotalSize",value:function(){var e=this.getSizeAndPositionOfLastMeasuredCell();return e.offset+e.size+(this._cellCount-this._lastMeasuredIndex-1)*this._estimatedCellSize}},{key:"getUpdatedOffsetForIndex",value:function(e){var t=e.align,n=void 0===t?"auto":t,r=e.containerSize,i=e.currentOffset,o=e.targetIndex;if(r<=0)return 0;var a,u=this.getSizeAndPositionOfCell(o),s=u.offset,c=s-r+u.size;switch(n){case"start":a=s;break;case"end":a=c;break;case"center":a=s-(r-u.size)/2;break;default:a=Math.max(c,Math.min(s,i))}var l=this.getTotalSize();return Math.max(0,Math.min(l-r,a))}},{key:"getVisibleCellRange",value:function(e){var t=e.containerSize,n=e.offset;if(0===this.getTotalSize())return{};var r=n+t,i=this._findNearestCell(n),o=this.getSizeAndPositionOfCell(i);n=o.offset+o.size;for(var a=i;nn&&(e=r-1)}return t>0?t-1:0}},{key:"_exponentialSearch",value:function(e,t){for(var n=1;e=e?this._binarySearch(n,0,e):this._exponentialSearch(n,e)}}]),e}()),N=function(){return"undefined"!==typeof window&&window.chrome?16777100:15e5},A=function(){function e(t){var n=t.maxScrollSize,r=void 0===n?N():n,o=T()(t,["maxScrollSize"]);i()(this,e),m()(this,"_cellSizeAndPositionManager",void 0),m()(this,"_maxScrollSize",void 0),this._cellSizeAndPositionManager=new C(o),this._maxScrollSize=r}return a()(e,[{key:"areOffsetsAdjusted",value:function(){return this._cellSizeAndPositionManager.getTotalSize()>this._maxScrollSize}},{key:"configure",value:function(e){this._cellSizeAndPositionManager.configure(e)}},{key:"getCellCount",value:function(){return this._cellSizeAndPositionManager.getCellCount()}},{key:"getEstimatedCellSize",value:function(){return this._cellSizeAndPositionManager.getEstimatedCellSize()}},{key:"getLastMeasuredIndex",value:function(){return this._cellSizeAndPositionManager.getLastMeasuredIndex()}},{key:"getOffsetAdjustment",value:function(e){var t=e.containerSize,n=e.offset,r=this._cellSizeAndPositionManager.getTotalSize(),i=this.getTotalSize(),o=this._getOffsetPercentage({containerSize:t,offset:n,totalSize:i});return Math.round(o*(i-r))}},{key:"getSizeAndPositionOfCell",value:function(e){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(e)}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()}},{key:"getTotalSize",value:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())}},{key:"getUpdatedOffsetForIndex",value:function(e){var t=e.align,n=void 0===t?"auto":t,r=e.containerSize,i=e.currentOffset,o=e.targetIndex;i=this._safeOffsetToOffset({containerSize:r,offset:i});var a=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex({align:n,containerSize:r,currentOffset:i,targetIndex:o});return this._offsetToSafeOffset({containerSize:r,offset:a})}},{key:"getVisibleCellRange",value:function(e){var t=e.containerSize,n=e.offset;return n=this._safeOffsetToOffset({containerSize:t,offset:n}),this._cellSizeAndPositionManager.getVisibleCellRange({containerSize:t,offset:n})}},{key:"resetCell",value:function(e){this._cellSizeAndPositionManager.resetCell(e)}},{key:"_getOffsetPercentage",value:function(e){var t=e.containerSize,n=e.offset,r=e.totalSize;return r<=t?0:n/(r-t)}},{key:"_offsetToSafeOffset",value:function(e){var t=e.containerSize,n=e.offset,r=this._cellSizeAndPositionManager.getTotalSize(),i=this.getTotalSize();if(r===i)return n;var o=this._getOffsetPercentage({containerSize:t,offset:n,totalSize:r});return Math.round(o*(i-t))}},{key:"_safeOffsetToOffset",value:function(e){var t=e.containerSize,n=e.offset,r=this._cellSizeAndPositionManager.getTotalSize(),i=this.getTotalSize();if(r===i)return n;var o=this._getOffsetPercentage({containerSize:t,offset:n,totalSize:i});return Math.round(o*(r-t))}}]),e}();function M(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t={};return function(n){var r=n.callback,i=n.indices,o=Object.keys(i),a=!e||o.every((function(e){var t=i[e];return Array.isArray(t)?t.length>0:t>=0})),u=o.length!==Object.keys(t).length||o.some((function(e){var n=t[e],r=i[e];return Array.isArray(r)?n.join(",")!==r.join(","):n!==r}));t=i,a&&u&&r(i)}}function k(e){var t=e.cellSize,n=e.cellSizeAndPositionManager,r=e.previousCellsCount,i=e.previousCellSize,o=e.previousScrollToAlignment,a=e.previousScrollToIndex,u=e.previousSize,s=e.scrollOffset,c=e.scrollToAlignment,l=e.scrollToIndex,d=e.size,f=e.sizeJustIncreasedFromZero,h=e.updateScrollIndexCallback,p=n.getCellCount(),g=l>=0&&l0&&(dn.getTotalSize()-d&&h(p-1)}var P,I,R=!("undefined"===typeof window||!window.document||!window.document.createElement);function j(e){if((!P&&0!==P||e)&&R){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),P=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return P}var D,L,F=(I="undefined"!==typeof window?window:"undefined"!==typeof self?self:{}).requestAnimationFrame||I.webkitRequestAnimationFrame||I.mozRequestAnimationFrame||I.oRequestAnimationFrame||I.msRequestAnimationFrame||function(e){return I.setTimeout(e,1e3/60)},U=I.cancelAnimationFrame||I.webkitCancelAnimationFrame||I.mozCancelAnimationFrame||I.oCancelAnimationFrame||I.msCancelAnimationFrame||function(e){I.clearTimeout(e)},B=F,z=U,H=function(e){return z(e.id)},V=function(e,t){var n;Promise.resolve().then((function(){n=Date.now()}));var r={id:B((function i(){Date.now()-n>=t?e.call():r.id=B(i)}))};return r};function W(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function G(e){for(var t=1;t0&&(n._initialScrollTop=n._getCalculatedScrollTop(e,n.state)),e.scrollToColumn>0&&(n._initialScrollLeft=n._getCalculatedScrollLeft(e,n.state)),n}return p()(t,e),a()(t,[{key:"getOffsetForCell",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.alignment,n=void 0===t?this.props.scrollToAlignment:t,r=e.columnIndex,i=void 0===r?this.props.scrollToColumn:r,o=e.rowIndex,a=void 0===o?this.props.scrollToRow:o,u=G({},this.props,{scrollToAlignment:n,scrollToColumn:i,scrollToRow:a});return{scrollLeft:this._getCalculatedScrollLeft(u),scrollTop:this._getCalculatedScrollTop(u)}}},{key:"getTotalRowsHeight",value:function(){return this.state.instanceProps.rowSizeAndPositionManager.getTotalSize()}},{key:"getTotalColumnsWidth",value:function(){return this.state.instanceProps.columnSizeAndPositionManager.getTotalSize()}},{key:"handleScrollEvent",value:function(e){var t=e.scrollLeft,n=void 0===t?0:t,r=e.scrollTop,i=void 0===r?0:r;if(!(i<0)){this._debounceScrollEnded();var o=this.props,a=o.autoHeight,u=o.autoWidth,s=o.height,c=o.width,l=this.state.instanceProps,d=l.scrollbarSize,f=l.rowSizeAndPositionManager.getTotalSize(),h=l.columnSizeAndPositionManager.getTotalSize(),p=Math.min(Math.max(0,h-c+d),n),g=Math.min(Math.max(0,f-s+d),i);if(this.state.scrollLeft!==p||this.state.scrollTop!==g){var m={isScrolling:!0,scrollDirectionHorizontal:p!==this.state.scrollLeft?p>this.state.scrollLeft?1:-1:this.state.scrollDirectionHorizontal,scrollDirectionVertical:g!==this.state.scrollTop?g>this.state.scrollTop?1:-1:this.state.scrollDirectionVertical,scrollPositionChangeReason:q};a||(m.scrollTop=g),u||(m.scrollLeft=p),m.needToResetStyleCache=!1,this.setState(m)}this._invokeOnScrollMemoizer({scrollLeft:p,scrollTop:g,totalColumnsWidth:h,totalRowsHeight:f})}}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.columnIndex,n=e.rowIndex;this._deferredInvalidateColumnIndex="number"===typeof this._deferredInvalidateColumnIndex?Math.min(this._deferredInvalidateColumnIndex,t):t,this._deferredInvalidateRowIndex="number"===typeof this._deferredInvalidateRowIndex?Math.min(this._deferredInvalidateRowIndex,n):n}},{key:"measureAllCells",value:function(){var e=this.props,t=e.columnCount,n=e.rowCount,r=this.state.instanceProps;r.columnSizeAndPositionManager.getSizeAndPositionOfCell(t-1),r.rowSizeAndPositionManager.getSizeAndPositionOfCell(n-1)}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,n=void 0===t?0:t,r=e.rowIndex,i=void 0===r?0:r,o=this.props,a=o.scrollToColumn,u=o.scrollToRow,s=this.state.instanceProps;s.columnSizeAndPositionManager.resetCell(n),s.rowSizeAndPositionManager.resetCell(i),this._recomputeScrollLeftFlag=a>=0&&(1===this.state.scrollDirectionHorizontal?n<=a:n>=a),this._recomputeScrollTopFlag=u>=0&&(1===this.state.scrollDirectionVertical?i<=u:i>=u),this._styleCache={},this._cellCache={},this.forceUpdate()}},{key:"scrollToCell",value:function(e){var t=e.columnIndex,n=e.rowIndex,r=this.props.columnCount,i=this.props;r>1&&void 0!==t&&this._updateScrollLeftForScrollToColumn(G({},i,{scrollToColumn:t})),void 0!==n&&this._updateScrollTopForScrollToRow(G({},i,{scrollToRow:n}))}},{key:"componentDidMount",value:function(){var e=this.props,n=e.getScrollbarSize,r=e.height,i=e.scrollLeft,o=e.scrollToColumn,a=e.scrollTop,u=e.scrollToRow,s=e.width,c=this.state.instanceProps;if(this._initialScrollTop=0,this._initialScrollLeft=0,this._handleInvalidatedGridSize(),c.scrollbarSizeMeasured||this.setState((function(e){var t=G({},e,{needToResetStyleCache:!1});return t.instanceProps.scrollbarSize=n(),t.instanceProps.scrollbarSizeMeasured=!0,t})),"number"===typeof i&&i>=0||"number"===typeof a&&a>=0){var l=t._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:i,scrollTop:a});l&&(l.needToResetStyleCache=!1,this.setState(l))}this._scrollingContainer&&(this._scrollingContainer.scrollLeft!==this.state.scrollLeft&&(this._scrollingContainer.scrollLeft=this.state.scrollLeft),this._scrollingContainer.scrollTop!==this.state.scrollTop&&(this._scrollingContainer.scrollTop=this.state.scrollTop));var d=r>0&&s>0;o>=0&&d&&this._updateScrollLeftForScrollToColumn(),u>=0&&d&&this._updateScrollTopForScrollToRow(),this._invokeOnGridRenderedHelper(),this._invokeOnScrollMemoizer({scrollLeft:i||0,scrollTop:a||0,totalColumnsWidth:c.columnSizeAndPositionManager.getTotalSize(),totalRowsHeight:c.rowSizeAndPositionManager.getTotalSize()}),this._maybeCallOnScrollbarPresenceChange()}},{key:"componentDidUpdate",value:function(e,t){var n=this,r=this.props,i=r.autoHeight,o=r.autoWidth,a=r.columnCount,u=r.height,s=r.rowCount,c=r.scrollToAlignment,l=r.scrollToColumn,d=r.scrollToRow,f=r.width,h=this.state,p=h.scrollLeft,g=h.scrollPositionChangeReason,m=h.scrollTop,v=h.instanceProps;this._handleInvalidatedGridSize();var b=a>0&&0===e.columnCount||s>0&&0===e.rowCount;g===Y&&(!o&&p>=0&&(p!==this._scrollingContainer.scrollLeft||b)&&(this._scrollingContainer.scrollLeft=p),!i&&m>=0&&(m!==this._scrollingContainer.scrollTop||b)&&(this._scrollingContainer.scrollTop=m));var y=(0===e.width||0===e.height)&&u>0&&f>0;if(this._recomputeScrollLeftFlag?(this._recomputeScrollLeftFlag=!1,this._updateScrollLeftForScrollToColumn(this.props)):k({cellSizeAndPositionManager:v.columnSizeAndPositionManager,previousCellsCount:e.columnCount,previousCellSize:e.columnWidth,previousScrollToAlignment:e.scrollToAlignment,previousScrollToIndex:e.scrollToColumn,previousSize:e.width,scrollOffset:p,scrollToAlignment:c,scrollToIndex:l,size:f,sizeJustIncreasedFromZero:y,updateScrollIndexCallback:function(){return n._updateScrollLeftForScrollToColumn(n.props)}}),this._recomputeScrollTopFlag?(this._recomputeScrollTopFlag=!1,this._updateScrollTopForScrollToRow(this.props)):k({cellSizeAndPositionManager:v.rowSizeAndPositionManager,previousCellsCount:e.rowCount,previousCellSize:e.rowHeight,previousScrollToAlignment:e.scrollToAlignment,previousScrollToIndex:e.scrollToRow,previousSize:e.height,scrollOffset:m,scrollToAlignment:c,scrollToIndex:d,size:u,sizeJustIncreasedFromZero:y,updateScrollIndexCallback:function(){return n._updateScrollTopForScrollToRow(n.props)}}),this._invokeOnGridRenderedHelper(),p!==t.scrollLeft||m!==t.scrollTop){var _=v.rowSizeAndPositionManager.getTotalSize(),w=v.columnSizeAndPositionManager.getTotalSize();this._invokeOnScrollMemoizer({scrollLeft:p,scrollTop:m,totalColumnsWidth:w,totalRowsHeight:_})}this._maybeCallOnScrollbarPresenceChange()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&H(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var e=this.props,t=e.autoContainerWidth,n=e.autoHeight,r=e.autoWidth,i=e.className,o=e.containerProps,a=e.containerRole,u=e.containerStyle,s=e.height,c=e.id,l=e.noContentRenderer,d=e.role,f=e.style,h=e.tabIndex,p=e.width,g=this.state,m=g.instanceProps,b=g.needToResetStyleCache,y=this._isScrolling(),_={boxSizing:"border-box",direction:"ltr",height:n?"auto":s,position:"relative",width:r?"auto":p,WebkitOverflowScrolling:"touch",willChange:"transform"};b&&(this._styleCache={}),this.state.isScrolling||this._resetStyleCache(),this._calculateChildrenToRender(this.props,this.state);var w=m.columnSizeAndPositionManager.getTotalSize(),S=m.rowSizeAndPositionManager.getTotalSize(),x=S>s?m.scrollbarSize:0,E=w>p?m.scrollbarSize:0;E===this._horizontalScrollBarSize&&x===this._verticalScrollBarSize||(this._horizontalScrollBarSize=E,this._verticalScrollBarSize=x,this._scrollbarPresenceChanged=!0),_.overflowX=w+x<=p?"hidden":"auto",_.overflowY=S+E<=s?"hidden":"auto";var T=this._childrenToDisplay,C=0===T.length&&s>0&&p>0;return v.createElement("div",O()({ref:this._setScrollingContainerRef},o,{"aria-label":this.props["aria-label"],"aria-readonly":this.props["aria-readonly"],className:Object($.a)("ReactVirtualized__Grid",i),id:c,onScroll:this._onScroll,role:d,style:G({},_,{},f),tabIndex:h}),T.length>0&&v.createElement("div",{className:"ReactVirtualized__Grid__innerScrollContainer",role:a,style:G({width:t?"auto":w,height:S,maxWidth:w,maxHeight:S,overflow:"hidden",pointerEvents:y?"none":"",position:"relative"},u)},T),C&&l())}},{key:"_calculateChildrenToRender",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,n=e.cellRenderer,r=e.cellRangeRenderer,i=e.columnCount,o=e.deferredMeasurementCache,a=e.height,u=e.overscanColumnCount,s=e.overscanIndicesGetter,c=e.overscanRowCount,l=e.rowCount,d=e.width,f=e.isScrollingOptOut,h=t.scrollDirectionHorizontal,p=t.scrollDirectionVertical,g=t.instanceProps,m=this._initialScrollTop>0?this._initialScrollTop:t.scrollTop,v=this._initialScrollLeft>0?this._initialScrollLeft:t.scrollLeft,b=this._isScrolling(e,t);if(this._childrenToDisplay=[],a>0&&d>0){var y=g.columnSizeAndPositionManager.getVisibleCellRange({containerSize:d,offset:v}),_=g.rowSizeAndPositionManager.getVisibleCellRange({containerSize:a,offset:m}),w=g.columnSizeAndPositionManager.getOffsetAdjustment({containerSize:d,offset:v}),S=g.rowSizeAndPositionManager.getOffsetAdjustment({containerSize:a,offset:m});this._renderedColumnStartIndex=y.start,this._renderedColumnStopIndex=y.stop,this._renderedRowStartIndex=_.start,this._renderedRowStopIndex=_.stop;var O=s({direction:"horizontal",cellCount:i,overscanCellsCount:u,scrollDirection:h,startIndex:"number"===typeof y.start?y.start:0,stopIndex:"number"===typeof y.stop?y.stop:-1}),$=s({direction:"vertical",cellCount:l,overscanCellsCount:c,scrollDirection:p,startIndex:"number"===typeof _.start?_.start:0,stopIndex:"number"===typeof _.stop?_.stop:-1}),x=O.overscanStartIndex,E=O.overscanStopIndex,T=$.overscanStartIndex,C=$.overscanStopIndex;if(o){if(!o.hasFixedHeight())for(var N=T;N<=C;N++)if(!o.has(N,0)){x=0,E=i-1;break}if(!o.hasFixedWidth())for(var A=x;A<=E;A++)if(!o.has(0,A)){T=0,C=l-1;break}}this._childrenToDisplay=r({cellCache:this._cellCache,cellRenderer:n,columnSizeAndPositionManager:g.columnSizeAndPositionManager,columnStartIndex:x,columnStopIndex:E,deferredMeasurementCache:o,horizontalOffsetAdjustment:w,isScrolling:b,isScrollingOptOut:f,parent:this,rowSizeAndPositionManager:g.rowSizeAndPositionManager,rowStartIndex:T,rowStopIndex:C,scrollLeft:v,scrollTop:m,styleCache:this._styleCache,verticalOffsetAdjustment:S,visibleColumnIndices:y,visibleRowIndices:_}),this._columnStartIndex=x,this._columnStopIndex=E,this._rowStartIndex=T,this._rowStopIndex=C}}},{key:"_debounceScrollEnded",value:function(){var e=this.props.scrollingResetTimeInterval;this._disablePointerEventsTimeoutId&&H(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=V(this._debounceScrollEndedCallback,e)}},{key:"_handleInvalidatedGridSize",value:function(){if("number"===typeof this._deferredInvalidateColumnIndex&&"number"===typeof this._deferredInvalidateRowIndex){var e=this._deferredInvalidateColumnIndex,t=this._deferredInvalidateRowIndex;this._deferredInvalidateColumnIndex=null,this._deferredInvalidateRowIndex=null,this.recomputeGridSize({columnIndex:e,rowIndex:t})}}},{key:"_invokeOnScrollMemoizer",value:function(e){var t=this,n=e.scrollLeft,r=e.scrollTop,i=e.totalColumnsWidth,o=e.totalRowsHeight;this._onScrollMemoizer({callback:function(e){var n=e.scrollLeft,r=e.scrollTop,a=t.props,u=a.height;(0,a.onScroll)({clientHeight:u,clientWidth:a.width,scrollHeight:o,scrollLeft:n,scrollTop:r,scrollWidth:i})},indices:{scrollLeft:n,scrollTop:r}})}},{key:"_isScrolling",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return Object.hasOwnProperty.call(e,"isScrolling")?Boolean(e.isScrolling):Boolean(t.isScrolling)}},{key:"_maybeCallOnScrollbarPresenceChange",value:function(){if(this._scrollbarPresenceChanged){var e=this.props.onScrollbarPresenceChange;this._scrollbarPresenceChanged=!1,e({horizontal:this._horizontalScrollBarSize>0,size:this.state.instanceProps.scrollbarSize,vertical:this._verticalScrollBarSize>0})}}},{key:"scrollToPosition",value:function(e){var n=e.scrollLeft,r=e.scrollTop,i=t._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:n,scrollTop:r});i&&(i.needToResetStyleCache=!1,this.setState(i))}},{key:"_getCalculatedScrollLeft",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return t._getCalculatedScrollLeft(e,n)}},{key:"_updateScrollLeftForScrollToColumn",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,r=t._getScrollLeftForScrollToColumnStateUpdate(e,n);r&&(r.needToResetStyleCache=!1,this.setState(r))}},{key:"_getCalculatedScrollTop",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return t._getCalculatedScrollTop(e,n)}},{key:"_resetStyleCache",value:function(){var e=this._styleCache,t=this._cellCache,n=this.props.isScrollingOptOut;this._cellCache={},this._styleCache={};for(var r=this._rowStartIndex;r<=this._rowStopIndex;r++)for(var i=this._columnStartIndex;i<=this._columnStopIndex;i++){var o="".concat(r,"-").concat(i);this._styleCache[o]=e[o],n&&(this._cellCache[o]=t[o])}}},{key:"_updateScrollTopForScrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,r=t._getScrollTopForScrollToRowStateUpdate(e,n);r&&(r.needToResetStyleCache=!1,this.setState(r))}}],[{key:"getDerivedStateFromProps",value:function(e,n){var r={};0===e.columnCount&&0!==n.scrollLeft||0===e.rowCount&&0!==n.scrollTop?(r.scrollLeft=0,r.scrollTop=0):(e.scrollLeft!==n.scrollLeft&&e.scrollToColumn<0||e.scrollTop!==n.scrollTop&&e.scrollToRow<0)&&Object.assign(r,t._getScrollToPositionStateUpdate({prevState:n,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}));var i,o,a=n.instanceProps;return r.needToResetStyleCache=!1,e.columnWidth===a.prevColumnWidth&&e.rowHeight===a.prevRowHeight||(r.needToResetStyleCache=!0),a.columnSizeAndPositionManager.configure({cellCount:e.columnCount,estimatedCellSize:t._getEstimatedColumnSize(e),cellSizeGetter:t._wrapSizeGetter(e.columnWidth)}),a.rowSizeAndPositionManager.configure({cellCount:e.rowCount,estimatedCellSize:t._getEstimatedRowSize(e),cellSizeGetter:t._wrapSizeGetter(e.rowHeight)}),0!==a.prevColumnCount&&0!==a.prevRowCount||(a.prevColumnCount=0,a.prevRowCount=0),e.autoHeight&&!1===e.isScrolling&&!0===a.prevIsScrolling&&Object.assign(r,{isScrolling:!1}),x({cellCount:a.prevColumnCount,cellSize:"number"===typeof a.prevColumnWidth?a.prevColumnWidth:null,computeMetadataCallback:function(){return a.columnSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:e,nextCellsCount:e.columnCount,nextCellSize:"number"===typeof e.columnWidth?e.columnWidth:null,nextScrollToIndex:e.scrollToColumn,scrollToIndex:a.prevScrollToColumn,updateScrollOffsetForScrollToIndex:function(){i=t._getScrollLeftForScrollToColumnStateUpdate(e,n)}}),x({cellCount:a.prevRowCount,cellSize:"number"===typeof a.prevRowHeight?a.prevRowHeight:null,computeMetadataCallback:function(){return a.rowSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:e,nextCellsCount:e.rowCount,nextCellSize:"number"===typeof e.rowHeight?e.rowHeight:null,nextScrollToIndex:e.scrollToRow,scrollToIndex:a.prevScrollToRow,updateScrollOffsetForScrollToIndex:function(){o=t._getScrollTopForScrollToRowStateUpdate(e,n)}}),a.prevColumnCount=e.columnCount,a.prevColumnWidth=e.columnWidth,a.prevIsScrolling=!0===e.isScrolling,a.prevRowCount=e.rowCount,a.prevRowHeight=e.rowHeight,a.prevScrollToColumn=e.scrollToColumn,a.prevScrollToRow=e.scrollToRow,a.scrollbarSize=e.getScrollbarSize(),void 0===a.scrollbarSize?(a.scrollbarSizeMeasured=!1,a.scrollbarSize=0):a.scrollbarSizeMeasured=!0,r.instanceProps=a,G({},r,{},i,{},o)}},{key:"_getEstimatedColumnSize",value:function(e){return"number"===typeof e.columnWidth?e.columnWidth:e.estimatedColumnSize}},{key:"_getEstimatedRowSize",value:function(e){return"number"===typeof e.rowHeight?e.rowHeight:e.estimatedRowSize}},{key:"_getScrollToPositionStateUpdate",value:function(e){var t=e.prevState,n=e.scrollLeft,r=e.scrollTop,i={scrollPositionChangeReason:Y};return"number"===typeof n&&n>=0&&(i.scrollDirectionHorizontal=n>t.scrollLeft?1:-1,i.scrollLeft=n),"number"===typeof r&&r>=0&&(i.scrollDirectionVertical=r>t.scrollTop?1:-1,i.scrollTop=r),"number"===typeof n&&n>=0&&n!==t.scrollLeft||"number"===typeof r&&r>=0&&r!==t.scrollTop?i:{}}},{key:"_wrapSizeGetter",value:function(e){return"function"===typeof e?e:function(){return e}}},{key:"_getCalculatedScrollLeft",value:function(e,t){var n=e.columnCount,r=e.height,i=e.scrollToAlignment,o=e.scrollToColumn,a=e.width,u=t.scrollLeft,s=t.instanceProps;if(n>0){var c=n-1,l=o<0?c:Math.min(c,o),d=s.rowSizeAndPositionManager.getTotalSize(),f=s.scrollbarSizeMeasured&&d>r?s.scrollbarSize:0;return s.columnSizeAndPositionManager.getUpdatedOffsetForIndex({align:i,containerSize:a-f,currentOffset:u,targetIndex:l})}return 0}},{key:"_getScrollLeftForScrollToColumnStateUpdate",value:function(e,n){var r=n.scrollLeft,i=t._getCalculatedScrollLeft(e,n);return"number"===typeof i&&i>=0&&r!==i?t._getScrollToPositionStateUpdate({prevState:n,scrollLeft:i,scrollTop:-1}):{}}},{key:"_getCalculatedScrollTop",value:function(e,t){var n=e.height,r=e.rowCount,i=e.scrollToAlignment,o=e.scrollToRow,a=e.width,u=t.scrollTop,s=t.instanceProps;if(r>0){var c=r-1,l=o<0?c:Math.min(c,o),d=s.columnSizeAndPositionManager.getTotalSize(),f=s.scrollbarSizeMeasured&&d>a?s.scrollbarSize:0;return s.rowSizeAndPositionManager.getUpdatedOffsetForIndex({align:i,containerSize:n-f,currentOffset:u,targetIndex:l})}return 0}},{key:"_getScrollTopForScrollToRowStateUpdate",value:function(e,n){var r=n.scrollTop,i=t._getCalculatedScrollTop(e,n);return"number"===typeof i&&i>=0&&r!==i?t._getScrollToPositionStateUpdate({prevState:n,scrollLeft:-1,scrollTop:i}):{}}}]),t}(v.PureComponent),m()(D,"propTypes",null),L);m()(K,"defaultProps",{"aria-label":"grid","aria-readonly":!0,autoContainerWidth:!1,autoHeight:!1,autoWidth:!1,cellRangeRenderer:function(e){for(var t=e.cellCache,n=e.cellRenderer,r=e.columnSizeAndPositionManager,i=e.columnStartIndex,o=e.columnStopIndex,a=e.deferredMeasurementCache,u=e.horizontalOffsetAdjustment,s=e.isScrolling,c=e.isScrollingOptOut,l=e.parent,d=e.rowSizeAndPositionManager,f=e.rowStartIndex,h=e.rowStopIndex,p=e.styleCache,g=e.verticalOffsetAdjustment,m=e.visibleColumnIndices,v=e.visibleRowIndices,b=[],y=r.areOffsetsAdjusted()||d.areOffsetsAdjusted(),_=!s&&!y,w=f;w<=h;w++)for(var S=d.getSizeAndPositionOfCell(w),O=i;O<=o;O++){var $=r.getSizeAndPositionOfCell(O),x=O>=m.start&&O<=m.stop&&w>=v.start&&w<=v.stop,E="".concat(w,"-").concat(O),T=void 0;_&&p[E]?T=p[E]:a&&!a.has(w,O)?T={height:"auto",left:0,position:"absolute",top:0,width:"auto"}:(T={height:S.size,left:$.offset+u,position:"absolute",top:S.offset+g,width:$.size},p[E]=T);var C={columnIndex:O,isScrolling:s,isVisible:x,key:E,parent:l,rowIndex:w,style:T},N=void 0;!c&&!s||u||g?N=n(C):(t[E]||(t[E]=n(C)),N=t[E]),null!=N&&!1!==N&&b.push(N)}return b},containerRole:"rowgroup",containerStyle:{},estimatedColumnSize:100,estimatedRowSize:30,getScrollbarSize:j,noContentRenderer:function(){return null},onScroll:function(){},onScrollbarPresenceChange:function(){},onSectionRendered:function(){},overscanColumnCount:0,overscanIndicesGetter:function(e){var t=e.cellCount,n=e.overscanCellsCount,r=e.scrollDirection,i=e.startIndex,o=e.stopIndex;return 1===r?{overscanStartIndex:Math.max(0,i),overscanStopIndex:Math.min(t-1,o+n)}:{overscanStartIndex:Math.max(0,i-n),overscanStopIndex:Math.min(t-1,o)}},overscanRowCount:10,role:"grid",scrollingResetTimeInterval:150,scrollToAlignment:"auto",scrollToColumn:-1,scrollToRow:-1,style:{},tabIndex:0,isScrollingOptOut:!1}),w(K);var Q=K;function Z(e){var t=e.cellCount,n=e.overscanCellsCount,r=e.scrollDirection,i=e.startIndex,o=e.stopIndex;return n=Math.max(1,n),1===r?{overscanStartIndex:Math.max(0,i-1),overscanStopIndex:Math.min(t-1,o+n)}:{overscanStartIndex:Math.max(0,i-n),overscanStopIndex:Math.min(t-1,o+1)}}var X,J;function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var te=(J=X=function(e){function t(){var e,n;i()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a0&&void 0!==arguments[0]?arguments[0]:{};i()(this,e),m()(this,"_cellHeightCache",{}),m()(this,"_cellWidthCache",{}),m()(this,"_columnWidthCache",{}),m()(this,"_rowHeightCache",{}),m()(this,"_defaultHeight",void 0),m()(this,"_defaultWidth",void 0),m()(this,"_minHeight",void 0),m()(this,"_minWidth",void 0),m()(this,"_keyMapper",void 0),m()(this,"_hasFixedHeight",void 0),m()(this,"_hasFixedWidth",void 0),m()(this,"_columnCount",0),m()(this,"_rowCount",0),m()(this,"columnWidth",(function(e){var n=e.index,r=t._keyMapper(0,n);return void 0!==t._columnWidthCache[r]?t._columnWidthCache[r]:t._defaultWidth})),m()(this,"rowHeight",(function(e){var n=e.index,r=t._keyMapper(n,0);return void 0!==t._rowHeightCache[r]?t._rowHeightCache[r]:t._defaultHeight}));var r=n.defaultHeight,o=n.defaultWidth,a=n.fixedHeight,u=n.fixedWidth,s=n.keyMapper,c=n.minHeight,l=n.minWidth;this._hasFixedHeight=!0===a,this._hasFixedWidth=!0===u,this._minHeight=c||0,this._minWidth=l||0,this._keyMapper=s||he,this._defaultHeight=Math.max(this._minHeight,"number"===typeof r?r:30),this._defaultWidth=Math.max(this._minWidth,"number"===typeof o?o:100)}return a()(e,[{key:"clear",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this._keyMapper(e,t);delete this._cellHeightCache[n],delete this._cellWidthCache[n],this._updateCachedColumnAndRowSizes(e,t)}},{key:"clearAll",value:function(){this._cellHeightCache={},this._cellWidthCache={},this._columnWidthCache={},this._rowHeightCache={},this._rowCount=0,this._columnCount=0}},{key:"hasFixedHeight",value:function(){return this._hasFixedHeight}},{key:"hasFixedWidth",value:function(){return this._hasFixedWidth}},{key:"getHeight",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(this._hasFixedHeight)return this._defaultHeight;var n=this._keyMapper(e,t);return void 0!==this._cellHeightCache[n]?Math.max(this._minHeight,this._cellHeightCache[n]):this._defaultHeight}},{key:"getWidth",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(this._hasFixedWidth)return this._defaultWidth;var n=this._keyMapper(e,t);return void 0!==this._cellWidthCache[n]?Math.max(this._minWidth,this._cellWidthCache[n]):this._defaultWidth}},{key:"has",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this._keyMapper(e,t);return void 0!==this._cellHeightCache[n]}},{key:"set",value:function(e,t,n,r){var i=this._keyMapper(e,t);t>=this._columnCount&&(this._columnCount=t+1),e>=this._rowCount&&(this._rowCount=e+1),this._cellHeightCache[i]=r,this._cellWidthCache[i]=n,this._updateCachedColumnAndRowSizes(e,t)}},{key:"_updateCachedColumnAndRowSizes",value:function(e,t){if(!this._hasFixedWidth){for(var n=0,r=0;r=0){var l=t.getScrollPositionForCell({align:i,cellIndex:o,height:r,scrollLeft:s,scrollTop:c,width:a});l.scrollLeft===s&&l.scrollTop===c||n._setScrollPosition(l)}})),m()(f()(n),"_onScroll",(function(e){if(e.target===n._scrollingContainer){n._enablePointerEventsAfterDelay();var t=n.props,r=t.cellLayoutManager,i=t.height,o=t.isScrollingChange,a=t.width,u=n._scrollbarSize,s=r.getTotalSize(),c=s.height,l=s.width,d=Math.max(0,Math.min(l-a+u,e.target.scrollLeft)),f=Math.max(0,Math.min(c-i+u,e.target.scrollTop));if(n.state.scrollLeft!==d||n.state.scrollTop!==f){var h=e.cancelable?me:ve;n.state.isScrolling||o(!0),n.setState({isScrolling:!0,scrollLeft:d,scrollPositionChangeReason:h,scrollTop:f})}n._invokeOnScrollMemoizer({scrollLeft:d,scrollTop:f,totalWidth:l,totalHeight:c})}})),n._scrollbarSize=j(),void 0===n._scrollbarSize?(n._scrollbarSizeMeasured=!1,n._scrollbarSize=0):n._scrollbarSizeMeasured=!0,n}return p()(t,e),a()(t,[{key:"recomputeCellSizesAndPositions",value:function(){this._calculateSizeAndPositionDataOnNextUpdate=!0,this.forceUpdate()}},{key:"componentDidMount",value:function(){var e=this.props,t=e.cellLayoutManager,n=e.scrollLeft,r=e.scrollToCell,i=e.scrollTop;this._scrollbarSizeMeasured||(this._scrollbarSize=j(),this._scrollbarSizeMeasured=!0,this.setState({})),r>=0?this._updateScrollPositionForScrollToCell():(n>=0||i>=0)&&this._setScrollPosition({scrollLeft:n,scrollTop:i}),this._invokeOnSectionRenderedHelper();var o=t.getTotalSize(),a=o.height,u=o.width;this._invokeOnScrollMemoizer({scrollLeft:n||0,scrollTop:i||0,totalHeight:a,totalWidth:u})}},{key:"componentDidUpdate",value:function(e,t){var n=this.props,r=n.height,i=n.scrollToAlignment,o=n.scrollToCell,a=n.width,u=this.state,s=u.scrollLeft,c=u.scrollPositionChangeReason,l=u.scrollTop;c===ve&&(s>=0&&s!==t.scrollLeft&&s!==this._scrollingContainer.scrollLeft&&(this._scrollingContainer.scrollLeft=s),l>=0&&l!==t.scrollTop&&l!==this._scrollingContainer.scrollTop&&(this._scrollingContainer.scrollTop=l)),r===e.height&&i===e.scrollToAlignment&&o===e.scrollToCell&&a===e.width||this._updateScrollPositionForScrollToCell(),this._invokeOnSectionRenderedHelper()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&clearTimeout(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var e=this.props,t=e.autoHeight,n=e.cellCount,r=e.cellLayoutManager,i=e.className,o=e.height,a=e.horizontalOverscanSize,u=e.id,s=e.noContentRenderer,c=e.style,l=e.verticalOverscanSize,d=e.width,f=this.state,h=f.isScrolling,p=f.scrollLeft,g=f.scrollTop;(this._lastRenderedCellCount!==n||this._lastRenderedCellLayoutManager!==r||this._calculateSizeAndPositionDataOnNextUpdate)&&(this._lastRenderedCellCount=n,this._lastRenderedCellLayoutManager=r,this._calculateSizeAndPositionDataOnNextUpdate=!1,r.calculateSizeAndPositionData());var m=r.getTotalSize(),b=m.height,y=m.width,_=Math.max(0,p-a),w=Math.max(0,g-l),S=Math.min(y,p+d+a),O=Math.min(b,g+o+l),x=o>0&&d>0?r.cellRenderers({height:O-w,isScrolling:h,width:S-_,x:_,y:w}):[],E={boxSizing:"border-box",direction:"ltr",height:t?"auto":o,position:"relative",WebkitOverflowScrolling:"touch",width:d,willChange:"transform"},T=b>o?this._scrollbarSize:0,C=y>d?this._scrollbarSize:0;return E.overflowX=y+T<=d?"hidden":"auto",E.overflowY=b+C<=o?"hidden":"auto",v.createElement("div",{ref:this._setScrollingContainerRef,"aria-label":this.props["aria-label"],className:Object($.a)("ReactVirtualized__Collection",i),id:u,onScroll:this._onScroll,role:"grid",style:ge({},E,{},c),tabIndex:0},n>0&&v.createElement("div",{className:"ReactVirtualized__Collection__innerScrollContainer",style:{height:b,maxHeight:b,maxWidth:y,overflow:"hidden",pointerEvents:h?"none":"",width:y}},x),0===n&&s())}},{key:"_enablePointerEventsAfterDelay",value:function(){var e=this;this._disablePointerEventsTimeoutId&&clearTimeout(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=setTimeout((function(){(0,e.props.isScrollingChange)(!1),e._disablePointerEventsTimeoutId=null,e.setState({isScrolling:!1})}),150)}},{key:"_invokeOnScrollMemoizer",value:function(e){var t=this,n=e.scrollLeft,r=e.scrollTop,i=e.totalHeight,o=e.totalWidth;this._onScrollMemoizer({callback:function(e){var n=e.scrollLeft,r=e.scrollTop,a=t.props,u=a.height;(0,a.onScroll)({clientHeight:u,clientWidth:a.width,scrollHeight:i,scrollLeft:n,scrollTop:r,scrollWidth:o})},indices:{scrollLeft:n,scrollTop:r}})}},{key:"_setScrollPosition",value:function(e){var t=e.scrollLeft,n=e.scrollTop,r={scrollPositionChangeReason:ve};t>=0&&(r.scrollLeft=t),n>=0&&(r.scrollTop=n),(t>=0&&t!==this.state.scrollLeft||n>=0&&n!==this.state.scrollTop)&&this.setState(r)}}],[{key:"getDerivedStateFromProps",value:function(e,t){return 0!==e.cellCount||0===t.scrollLeft&&0===t.scrollTop?e.scrollLeft!==t.scrollLeft||e.scrollTop!==t.scrollTop?{scrollLeft:null!=e.scrollLeft?e.scrollLeft:t.scrollLeft,scrollTop:null!=e.scrollTop?e.scrollTop:t.scrollTop,scrollPositionChangeReason:ve}:null:{scrollLeft:0,scrollTop:0,scrollPositionChangeReason:ve}}}]),t}(v.PureComponent);m()(be,"defaultProps",{"aria-label":"grid",horizontalOverscanSize:0,noContentRenderer:function(){return null},onScroll:function(){return null},onSectionRendered:function(){return null},scrollToAlignment:"auto",scrollToCell:-1,style:{},verticalOverscanSize:0}),be.propTypes={},w(be);var ye=be,_e=function(){function e(t){var n=t.height,r=t.width,o=t.x,a=t.y;i()(this,e),this.height=n,this.width=r,this.x=o,this.y=a,this._indexMap={},this._indices=[]}return a()(e,[{key:"addCellIndex",value:function(e){var t=e.index;this._indexMap[t]||(this._indexMap[t]=!0,this._indices.push(t))}},{key:"getCellIndices",value:function(){return this._indices}},{key:"toString",value:function(){return"".concat(this.x,",").concat(this.y," ").concat(this.width,"x").concat(this.height)}}]),e}(),we=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;i()(this,e),this._sectionSize=t,this._cellMetadata=[],this._sections={}}return a()(e,[{key:"getCellIndices",value:function(e){var t=e.height,n=e.width,r=e.x,i=e.y,o={};return this.getSections({height:t,width:n,x:r,y:i}).forEach((function(e){return e.getCellIndices().forEach((function(e){o[e]=e}))})),Object.keys(o).map((function(e){return o[e]}))}},{key:"getCellMetadata",value:function(e){var t=e.index;return this._cellMetadata[t]}},{key:"getSections",value:function(e){for(var t=e.height,n=e.width,r=e.x,i=e.y,o=Math.floor(r/this._sectionSize),a=Math.floor((r+n-1)/this._sectionSize),u=Math.floor(i/this._sectionSize),s=Math.floor((i+t-1)/this._sectionSize),c=[],l=o;l<=a;l++)for(var d=u;d<=s;d++){var f="".concat(l,".").concat(d);this._sections[f]||(this._sections[f]=new _e({height:this._sectionSize,width:this._sectionSize,x:l*this._sectionSize,y:d*this._sectionSize})),c.push(this._sections[f])}return c}},{key:"getTotalSectionCount",value:function(){return Object.keys(this._sections).length}},{key:"toString",value:function(){var e=this;return Object.keys(this._sections).map((function(t){return e._sections[t].toString()}))}},{key:"registerCell",value:function(e){var t=e.cellMetadatum,n=e.index;this._cellMetadata[n]=t,this.getSections(t).forEach((function(e){return e.addCellIndex({index:n})}))}}]),e}();function Se(e){var t=e.align,n=void 0===t?"auto":t,r=e.cellOffset,i=e.cellSize,o=e.containerSize,a=e.currentOffset,u=r,s=u-o+i;switch(n){case"start":return u;case"end":return s;case"center":return u-(o-i)/2;default:return Math.max(s,Math.min(u,a))}}var Oe=function(e){function t(e,n){var r;return i()(this,t),(r=s()(this,l()(t).call(this,e,n)))._cellMetadata=[],r._lastRenderedCellIndices=[],r._cellCache=[],r._isScrollingChange=r._isScrollingChange.bind(f()(r)),r._setCollectionViewRef=r._setCollectionViewRef.bind(f()(r)),r}return p()(t,e),a()(t,[{key:"forceUpdate",value:function(){void 0!==this._collectionView&&this._collectionView.forceUpdate()}},{key:"recomputeCellSizesAndPositions",value:function(){this._cellCache=[],this._collectionView.recomputeCellSizesAndPositions()}},{key:"render",value:function(){var e=O()({},this.props);return v.createElement(ye,O()({cellLayoutManager:this,isScrollingChange:this._isScrollingChange,ref:this._setCollectionViewRef},e))}},{key:"calculateSizeAndPositionData",value:function(){var e=this.props,t=function(e){for(var t=e.cellCount,n=e.cellSizeAndPositionGetter,r=e.sectionSize,i=[],o=new we(r),a=0,u=0,s=0;s=0&&nn||i1&&void 0!==arguments[1]?arguments[1]:0,n="function"===typeof e.recomputeGridSize?e.recomputeGridSize:e.recomputeRowHeights;n?n.call(e,t):e.forceUpdate()}(t._registeredChild,t._lastRenderedStartIndex)}))}))}},{key:"_onRowsRendered",value:function(e){var t=e.startIndex,n=e.stopIndex;this._lastRenderedStartIndex=t,this._lastRenderedStopIndex=n,this._doStuff(t,n)}},{key:"_doStuff",value:function(e,t){var n,r=this,i=this.props,o=i.isRowLoaded,a=i.minimumBatchSize,u=i.rowCount,s=i.threshold,c=function(e){for(var t=e.isRowLoaded,n=e.minimumBatchSize,r=e.rowCount,i=e.startIndex,o=e.stopIndex,a=[],u=null,s=null,c=i;c<=o;c++){t({index:c})?null!==s&&(a.push({startIndex:u,stopIndex:s}),u=s=null):(s=c,null===u&&(u=c))}if(null!==s){for(var l=Math.min(Math.max(s,u+n-1),r-1),d=s+1;d<=l&&!t({index:d});d++)s=d;a.push({startIndex:u,stopIndex:s})}if(a.length)for(var f=a[0];f.stopIndex-f.startIndex+10;){var h=f.startIndex-1;if(t({index:h}))break;f.startIndex=h}return a}({isRowLoaded:o,minimumBatchSize:a,rowCount:u,startIndex:Math.max(0,e-s),stopIndex:Math.min(u-1,t+s)}),l=(n=[]).concat.apply(n,Ee()(c.map((function(e){return[e.startIndex,e.stopIndex]}))));this._loadMoreRowsMemoizer({callback:function(){r._loadUnloadedRanges(c)},indices:{squashedUnloadedRanges:l}})}},{key:"_registerChild",value:function(e){this._registeredChild=e}}]),t}(v.PureComponent);m()(Te,"defaultProps",{minimumBatchSize:10,rowCount:0,threshold:15}),Te.propTypes={};var Ce,Ne,Ae=(Ne=Ce=function(e){function t(){var e,n;i()(this,t);for(var r=arguments.length,o=new Array(r),a=0;a0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,n=void 0===t?0:t,r=e.rowIndex,i=void 0===r?0:r;this.Grid&&this.Grid.recomputeGridSize({rowIndex:i,columnIndex:n})}},{key:"recomputeRowHeights",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:e,columnIndex:0})}},{key:"scrollToPosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:e})}},{key:"scrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:e})}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.noRowsRenderer,r=e.scrollToIndex,i=e.width,o=Object($.a)("ReactVirtualized__List",t);return v.createElement(Q,O()({},this.props,{autoContainerWidth:!0,cellRenderer:this._cellRenderer,className:o,columnWidth:i,columnCount:1,noContentRenderer:n,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,scrollToRow:r}))}}]),t}(v.PureComponent),m()(Ce,"propTypes",null),Ne);m()(Ae,"defaultProps",{autoHeight:!1,estimatedRowSize:30,onScroll:function(){},noRowsRenderer:function(){return null},onRowsRendered:function(){},overscanIndicesGetter:Z,overscanRowCount:10,scrollToAlignment:"auto",scrollToIndex:-1,style:{}});var Me=n(455),ke=n.n(Me);var Pe={ge:function(e,t,n,r,i){return"function"===typeof n?function(e,t,n,r,i){for(var o=n+1;t<=n;){var a=t+n>>>1;i(e[a],r)>=0?(o=a,n=a-1):t=a+1}return o}(e,void 0===r?0:0|r,void 0===i?e.length-1:0|i,t,n):function(e,t,n,r){for(var i=n+1;t<=n;){var o=t+n>>>1;e[o]>=r?(i=o,n=o-1):t=o+1}return i}(e,void 0===n?0:0|n,void 0===r?e.length-1:0|r,t)},gt:function(e,t,n,r,i){return"function"===typeof n?function(e,t,n,r,i){for(var o=n+1;t<=n;){var a=t+n>>>1;i(e[a],r)>0?(o=a,n=a-1):t=a+1}return o}(e,void 0===r?0:0|r,void 0===i?e.length-1:0|i,t,n):function(e,t,n,r){for(var i=n+1;t<=n;){var o=t+n>>>1;e[o]>r?(i=o,n=o-1):t=o+1}return i}(e,void 0===n?0:0|n,void 0===r?e.length-1:0|r,t)},lt:function(e,t,n,r,i){return"function"===typeof n?function(e,t,n,r,i){for(var o=t-1;t<=n;){var a=t+n>>>1;i(e[a],r)<0?(o=a,t=a+1):n=a-1}return o}(e,void 0===r?0:0|r,void 0===i?e.length-1:0|i,t,n):function(e,t,n,r){for(var i=t-1;t<=n;){var o=t+n>>>1;e[o]>>1;i(e[a],r)<=0?(o=a,t=a+1):n=a-1}return o}(e,void 0===r?0:0|r,void 0===i?e.length-1:0|i,t,n):function(e,t,n,r){for(var i=t-1;t<=n;){var o=t+n>>>1;e[o]<=r?(i=o,t=o+1):n=o-1}return i}(e,void 0===n?0:0|n,void 0===r?e.length-1:0|r,t)},eq:function(e,t,n,r,i){return"function"===typeof n?function(e,t,n,r,i){for(;t<=n;){var o=t+n>>>1,a=i(e[o],r);if(0===a)return o;a<=0?t=o+1:n=o-1}return-1}(e,void 0===r?0:0|r,void 0===i?e.length-1:0|i,t,n):function(e,t,n,r){for(;t<=n;){var i=t+n>>>1,o=e[i];if(o===r)return i;o<=r?t=i+1:n=i-1}return-1}(e,void 0===n?0:0|n,void 0===r?e.length-1:0|r,t)}};function Ie(e,t,n,r,i){this.mid=e,this.left=t,this.right=n,this.leftPoints=r,this.rightPoints=i,this.count=(t?t.count:0)+(n?n.count:0)+r.length}var Re=Ie.prototype;function je(e,t){e.mid=t.mid,e.left=t.left,e.right=t.right,e.leftPoints=t.leftPoints,e.rightPoints=t.rightPoints,e.count=t.count}function De(e,t){var n=Ge(t);e.mid=n.mid,e.left=n.left,e.right=n.right,e.leftPoints=n.leftPoints,e.rightPoints=n.rightPoints,e.count=n.count}function Le(e,t){var n=e.intervals([]);n.push(t),De(e,n)}function Fe(e,t){var n=e.intervals([]),r=n.indexOf(t);return r<0?0:(n.splice(r,1),De(e,n),1)}function Ue(e,t,n){for(var r=0;r=0&&e[r][1]>=t;--r){var i=n(e[r]);if(i)return i}}function ze(e,t){for(var n=0;n>1],i=[],o=[],a=[];for(n=0;n3*(t+1)?Le(this,e):this.left.insert(e):this.left=Ge([e]);else if(e[0]>this.mid)this.right?4*(this.right.count+1)>3*(t+1)?Le(this,e):this.right.insert(e):this.right=Ge([e]);else{var n=Pe.ge(this.leftPoints,e,Ve),r=Pe.ge(this.rightPoints,e,We);this.leftPoints.splice(n,0,e),this.rightPoints.splice(r,0,e)}},Re.remove=function(e){var t=this.count-this.leftPoints;if(e[1]3*(t-1)?Fe(this,e):2===(o=this.left.remove(e))?(this.left=null,this.count-=1,1):(1===o&&(this.count-=1),o):0;if(e[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(t-1)?Fe(this,e):2===(o=this.right.remove(e))?(this.right=null,this.count-=1,1):(1===o&&(this.count-=1),o):0;if(1===this.count)return this.leftPoints[0]===e?2:0;if(1===this.leftPoints.length&&this.leftPoints[0]===e){if(this.left&&this.right){for(var n=this,r=this.left;r.right;)n=r,r=r.right;if(n===this)r.right=this.right;else{var i=this.left,o=this.right;n.count-=r.count,n.right=r.left,r.left=i,r.right=o}je(this,r),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?je(this,this.left):je(this,this.right);return 1}for(i=Pe.ge(this.leftPoints,e,Ve);ithis.mid){var n;if(this.right)if(n=this.right.queryPoint(e,t))return n;return Be(this.rightPoints,e,t)}return ze(this.leftPoints,t)},Re.queryInterval=function(e,t,n){var r;if(ethis.mid&&this.right&&(r=this.right.queryInterval(e,t,n)))return r;return tthis.mid?Be(this.rightPoints,e,n):ze(this.leftPoints,n)};var Ye=qe.prototype;Ye.insert=function(e){this.root?this.root.insert(e):this.root=new Ie(e[0],null,null,[e],[e])},Ye.remove=function(e){if(this.root){var t=this.root.remove(e);return 2===t&&(this.root=null),0!==t}return!1},Ye.queryPoint=function(e,t){if(this.root)return this.root.queryPoint(e,t)},Ye.queryInterval=function(e,t,n){if(e<=t&&this.root)return this.root.queryInterval(e,t,n)},Object.defineProperty(Ye,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(Ye,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}});var Ke,Qe,Ze=function(){function e(){var t;i()(this,e),m()(this,"_columnSizeMap",{}),m()(this,"_intervalTree",t&&0!==t.length?new qe(Ge(t)):new qe(null)),m()(this,"_leftMap",{})}return a()(e,[{key:"estimateTotalHeight",value:function(e,t,n){var r=e-this.count;return this.tallestColumnSize+Math.ceil(r/t)*n}},{key:"range",value:function(e,t,n){var r=this;this._intervalTree.queryInterval(e,e+t,(function(e){var t=ke()(e,3),i=t[0],o=(t[1],t[2]);return n(o,r._leftMap[o],i)}))}},{key:"setPosition",value:function(e,t,n,r){this._intervalTree.insert([n,n+r,e]),this._leftMap[e]=t;var i=this._columnSizeMap,o=i[t];i[t]=void 0===o?n+r:Math.max(o,n+r)}},{key:"count",get:function(){return this._intervalTree.count}},{key:"shortestColumnSize",get:function(){var e=this._columnSizeMap,t=0;for(var n in e){var r=e[n];t=0===t?r:Math.min(t,r)}return t}},{key:"tallestColumnSize",get:function(){var e=this._columnSizeMap,t=0;for(var n in e){var r=e[n];t=Math.max(t,r)}return t}}]),e}();function Xe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Je(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};i()(this,e),m()(this,"_cellMeasurerCache",void 0),m()(this,"_columnIndexOffset",void 0),m()(this,"_rowIndexOffset",void 0),m()(this,"columnWidth",(function(e){var n=e.index;t._cellMeasurerCache.columnWidth({index:n+t._columnIndexOffset})})),m()(this,"rowHeight",(function(e){var n=e.index;t._cellMeasurerCache.rowHeight({index:n+t._rowIndexOffset})}));var r=n.cellMeasurerCache,o=n.columnIndexOffset,a=void 0===o?0:o,u=n.rowIndexOffset,s=void 0===u?0:u;this._cellMeasurerCache=r,this._columnIndexOffset=a,this._rowIndexOffset=s}return a()(e,[{key:"clear",value:function(e,t){this._cellMeasurerCache.clear(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"clearAll",value:function(){this._cellMeasurerCache.clearAll()}},{key:"hasFixedHeight",value:function(){return this._cellMeasurerCache.hasFixedHeight()}},{key:"hasFixedWidth",value:function(){return this._cellMeasurerCache.hasFixedWidth()}},{key:"getHeight",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.getHeight(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"getWidth",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.getWidth(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"has",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.has(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"set",value:function(e,t,n,r){this._cellMeasurerCache.set(e+this._rowIndexOffset,t+this._columnIndexOffset,n,r)}},{key:"defaultHeight",get:function(){return this._cellMeasurerCache.defaultHeight}},{key:"defaultWidth",get:function(){return this._cellMeasurerCache.defaultWidth}}]),e}();function rt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function it(e){for(var t=1;t0?new nt({cellMeasurerCache:o,columnIndexOffset:0,rowIndexOffset:u}):o,r._deferredMeasurementCacheBottomRightGrid=a>0||u>0?new nt({cellMeasurerCache:o,columnIndexOffset:a,rowIndexOffset:u}):o,r._deferredMeasurementCacheTopRightGrid=a>0?new nt({cellMeasurerCache:o,columnIndexOffset:a,rowIndexOffset:0}):o),r}return p()(t,e),a()(t,[{key:"forceUpdateGrids",value:function(){this._bottomLeftGrid&&this._bottomLeftGrid.forceUpdate(),this._bottomRightGrid&&this._bottomRightGrid.forceUpdate(),this._topLeftGrid&&this._topLeftGrid.forceUpdate(),this._topRightGrid&&this._topRightGrid.forceUpdate()}},{key:"invalidateCellSizeAfterRender",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,n=void 0===t?0:t,r=e.rowIndex,i=void 0===r?0:r;this._deferredInvalidateColumnIndex="number"===typeof this._deferredInvalidateColumnIndex?Math.min(this._deferredInvalidateColumnIndex,n):n,this._deferredInvalidateRowIndex="number"===typeof this._deferredInvalidateRowIndex?Math.min(this._deferredInvalidateRowIndex,i):i}},{key:"measureAllCells",value:function(){this._bottomLeftGrid&&this._bottomLeftGrid.measureAllCells(),this._bottomRightGrid&&this._bottomRightGrid.measureAllCells(),this._topLeftGrid&&this._topLeftGrid.measureAllCells(),this._topRightGrid&&this._topRightGrid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,n=void 0===t?0:t,r=e.rowIndex,i=void 0===r?0:r,o=this.props,a=o.fixedColumnCount,u=o.fixedRowCount,s=Math.max(0,n-a),c=Math.max(0,i-u);this._bottomLeftGrid&&this._bottomLeftGrid.recomputeGridSize({columnIndex:n,rowIndex:c}),this._bottomRightGrid&&this._bottomRightGrid.recomputeGridSize({columnIndex:s,rowIndex:c}),this._topLeftGrid&&this._topLeftGrid.recomputeGridSize({columnIndex:n,rowIndex:i}),this._topRightGrid&&this._topRightGrid.recomputeGridSize({columnIndex:s,rowIndex:i}),this._leftGridWidth=null,this._topGridHeight=null,this._maybeCalculateCachedStyles(!0)}},{key:"componentDidMount",value:function(){var e=this.props,t=e.scrollLeft,n=e.scrollTop;if(t>0||n>0){var r={};t>0&&(r.scrollLeft=t),n>0&&(r.scrollTop=n),this.setState(r)}this._handleInvalidatedGridSize()}},{key:"componentDidUpdate",value:function(){this._handleInvalidatedGridSize()}},{key:"render",value:function(){var e=this.props,t=e.onScroll,n=e.onSectionRendered,r=(e.onScrollbarPresenceChange,e.scrollLeft,e.scrollToColumn),i=(e.scrollTop,e.scrollToRow),o=T()(e,["onScroll","onSectionRendered","onScrollbarPresenceChange","scrollLeft","scrollToColumn","scrollTop","scrollToRow"]);if(this._prepareForRender(),0===this.props.width||0===this.props.height)return null;var a=this.state,u=a.scrollLeft,s=a.scrollTop;return v.createElement("div",{style:this._containerOuterStyle},v.createElement("div",{style:this._containerTopStyle},this._renderTopLeftGrid(o),this._renderTopRightGrid(it({},o,{onScroll:t,scrollLeft:u}))),v.createElement("div",{style:this._containerBottomStyle},this._renderBottomLeftGrid(it({},o,{onScroll:t,scrollTop:s})),this._renderBottomRightGrid(it({},o,{onScroll:t,onSectionRendered:n,scrollLeft:u,scrollToColumn:r,scrollToRow:i,scrollTop:s}))))}},{key:"_getBottomGridHeight",value:function(e){return e.height-this._getTopGridHeight(e)}},{key:"_getLeftGridWidth",value:function(e){var t=e.fixedColumnCount,n=e.columnWidth;if(null==this._leftGridWidth)if("function"===typeof n){for(var r=0,i=0;i=0?e.scrollLeft:t.scrollLeft,scrollTop:null!=e.scrollTop&&e.scrollTop>=0?e.scrollTop:t.scrollTop}:null}}]),t}(v.PureComponent);m()(ot,"defaultProps",{classNameBottomLeftGrid:"",classNameBottomRightGrid:"",classNameTopLeftGrid:"",classNameTopRightGrid:"",enableFixedColumnScroll:!1,enableFixedRowScroll:!1,fixedColumnCount:0,fixedRowCount:0,scrollToColumn:-1,scrollToRow:-1,style:{},styleBottomLeftGrid:{},styleBottomRightGrid:{},styleTopLeftGrid:{},styleTopRightGrid:{},hideTopRightGridScrollbar:!1,hideBottomLeftGridScrollbar:!1}),ot.propTypes={},w(ot);var at=function(e){function t(e,n){var r;return i()(this,t),(r=s()(this,l()(t).call(this,e,n))).state={clientHeight:0,clientWidth:0,scrollHeight:0,scrollLeft:0,scrollTop:0,scrollWidth:0},r._onScroll=r._onScroll.bind(f()(r)),r}return p()(t,e),a()(t,[{key:"render",value:function(){var e=this.props.children,t=this.state,n=t.clientHeight,r=t.clientWidth,i=t.scrollHeight,o=t.scrollLeft,a=t.scrollTop,u=t.scrollWidth;return e({clientHeight:n,clientWidth:r,onScroll:this._onScroll,scrollHeight:i,scrollLeft:o,scrollTop:a,scrollWidth:u})}},{key:"_onScroll",value:function(e){var t=e.clientHeight,n=e.clientWidth,r=e.scrollHeight,i=e.scrollLeft,o=e.scrollTop,a=e.scrollWidth;this.setState({clientHeight:t,clientWidth:n,scrollHeight:r,scrollLeft:i,scrollTop:o,scrollWidth:a})}}]),t}(v.PureComponent);at.propTypes={};function ut(e){var t=e.className,n=e.columns,r=e.style;return v.createElement("div",{className:t,role:"row",style:r},n)}ut.propTypes=null;var st={ASC:"ASC",DESC:"DESC"};function ct(e){var t=e.sortDirection,n=Object($.a)("ReactVirtualized__Table__sortableHeaderIcon",{"ReactVirtualized__Table__sortableHeaderIcon--ASC":t===st.ASC,"ReactVirtualized__Table__sortableHeaderIcon--DESC":t===st.DESC});return v.createElement("svg",{className:n,width:18,height:18,viewBox:"0 0 24 24"},t===st.ASC?v.createElement("path",{d:"M7 14l5-5 5 5z"}):v.createElement("path",{d:"M7 10l5 5 5-5z"}),v.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))}function lt(e){var t=e.dataKey,n=e.label,r=e.sortBy,i=e.sortDirection,o=r===t,a=[v.createElement("span",{className:"ReactVirtualized__Table__headerTruncatedText",key:"label",title:"string"===typeof n?n:null},n)];return o&&a.push(v.createElement(ct,{key:"SortIndicator",sortDirection:i})),a}function dt(e){var t=e.className,n=e.columns,r=e.index,i=e.key,o=e.onRowClick,a=e.onRowDoubleClick,u=e.onRowMouseOut,s=e.onRowMouseOver,c=e.onRowRightClick,l=e.rowData,d=e.style,f={"aria-rowindex":r+1};return(o||a||u||s||c)&&(f["aria-label"]="row",f.tabIndex=0,o&&(f.onClick=function(e){return o({event:e,index:r,rowData:l})}),a&&(f.onDoubleClick=function(e){return a({event:e,index:r,rowData:l})}),u&&(f.onMouseOut=function(e){return u({event:e,index:r,rowData:l})}),s&&(f.onMouseOver=function(e){return s({event:e,index:r,rowData:l})}),c&&(f.onContextMenu=function(e){return c({event:e,index:r,rowData:l})})),v.createElement("div",O()({},f,{className:t,key:i,role:"row",style:d}),n)}ct.propTypes={},lt.propTypes=null,dt.propTypes=null;var ft=function(e){function t(){return i()(this,t),s()(this,l()(t).apply(this,arguments))}return p()(t,e),t}(v.Component);function ht(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pt(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,n=void 0===t?0:t,r=e.rowIndex,i=void 0===r?0:r;this.Grid&&this.Grid.recomputeGridSize({rowIndex:i,columnIndex:n})}},{key:"recomputeRowHeights",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:e})}},{key:"scrollToPosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:e})}},{key:"scrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:e})}},{key:"getScrollbarWidth",value:function(){if(this.Grid){var e=Object(le.findDOMNode)(this.Grid),t=e.clientWidth||0;return(e.offsetWidth||0)-t}return 0}},{key:"componentDidMount",value:function(){this._setScrollbarWidth()}},{key:"componentDidUpdate",value:function(){this._setScrollbarWidth()}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.className,i=t.disableHeader,o=t.gridClassName,a=t.gridStyle,u=t.headerHeight,s=t.headerRowRenderer,c=t.height,l=t.id,d=t.noRowsRenderer,f=t.rowClassName,h=t.rowStyle,p=t.scrollToIndex,g=t.style,m=t.width,b=this.state.scrollbarWidth,y=i?c:c-u,_="function"===typeof f?f({index:-1}):f,w="function"===typeof h?h({index:-1}):h;return this._cachedColumnStyles=[],v.Children.toArray(n).forEach((function(t,n){var r=e._getFlexStyleForColumn(t,t.props.style);e._cachedColumnStyles[n]=pt({overflow:"hidden"},r)})),v.createElement("div",{"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-colcount":v.Children.toArray(n).length,"aria-rowcount":this.props.rowCount,className:Object($.a)("ReactVirtualized__Table",r),id:l,role:"grid",style:g},!i&&s({className:Object($.a)("ReactVirtualized__Table__headerRow",_),columns:this._getHeaderColumns(),style:pt({height:u,overflow:"hidden",paddingRight:b,width:m},w)}),v.createElement(Q,O()({},this.props,{"aria-readonly":null,autoContainerWidth:!0,className:Object($.a)("ReactVirtualized__Table__Grid",o),cellRenderer:this._createRow,columnWidth:m,columnCount:1,height:y,id:void 0,noContentRenderer:d,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,role:"rowgroup",scrollbarWidth:b,scrollToRow:p,style:pt({},a,{overflowX:"hidden"})})))}},{key:"_createColumn",value:function(e){var t=e.column,n=e.columnIndex,r=e.isScrolling,i=e.parent,o=e.rowData,a=e.rowIndex,u=this.props.onColumnClick,s=t.props,c=s.cellDataGetter,l=s.cellRenderer,d=s.className,f=s.columnData,h=s.dataKey,p=s.id,g=l({cellData:c({columnData:f,dataKey:h,rowData:o}),columnData:f,columnIndex:n,dataKey:h,isScrolling:r,parent:i,rowData:o,rowIndex:a}),m=this._cachedColumnStyles[n],b="string"===typeof g?g:null;return v.createElement("div",{"aria-colindex":n+1,"aria-describedby":p,className:Object($.a)("ReactVirtualized__Table__rowColumn",d),key:"Row"+a+"-Col"+n,onClick:function(e){u&&u({columnData:f,dataKey:h,event:e})},role:"gridcell",style:m,title:b},g)}},{key:"_createHeader",value:function(e){var t,n,r,i,o,a=e.column,u=e.index,s=this.props,c=s.headerClassName,l=s.headerStyle,d=s.onHeaderClick,f=s.sort,h=s.sortBy,p=s.sortDirection,g=a.props,m=g.columnData,b=g.dataKey,y=g.defaultSortDirection,_=g.disableSort,w=g.headerRenderer,S=g.id,O=g.label,x=!_&&f,E=Object($.a)("ReactVirtualized__Table__headerColumn",c,a.props.headerClassName,{ReactVirtualized__Table__sortableHeaderColumn:x}),T=this._getFlexStyleForColumn(a,pt({},l,{},a.props.headerStyle)),C=w({columnData:m,dataKey:b,disableSort:_,label:O,sortBy:h,sortDirection:p});if(x||d){var N=h!==b?y:p===st.DESC?st.ASC:st.DESC,A=function(e){x&&f({defaultSortDirection:y,event:e,sortBy:b,sortDirection:N}),d&&d({columnData:m,dataKey:b,event:e})};o=a.props["aria-label"]||O||b,i="none",r=0,t=A,n=function(e){"Enter"!==e.key&&" "!==e.key||A(e)}}return h===b&&(i=p===st.ASC?"ascending":"descending"),v.createElement("div",{"aria-label":o,"aria-sort":i,className:E,id:S,key:"Header-Col"+u,onClick:t,onKeyDown:n,role:"columnheader",style:T,tabIndex:r},C)}},{key:"_createRow",value:function(e){var t=this,n=e.rowIndex,r=e.isScrolling,i=e.key,o=e.parent,a=e.style,u=this.props,s=u.children,c=u.onRowClick,l=u.onRowDoubleClick,d=u.onRowRightClick,f=u.onRowMouseOver,h=u.onRowMouseOut,p=u.rowClassName,g=u.rowGetter,m=u.rowRenderer,b=u.rowStyle,y=this.state.scrollbarWidth,_="function"===typeof p?p({index:n}):p,w="function"===typeof b?b({index:n}):b,S=g({index:n}),O=v.Children.toArray(s).map((function(e,i){return t._createColumn({column:e,columnIndex:i,isScrolling:r,parent:o,rowData:S,rowIndex:n,scrollbarWidth:y})})),x=Object($.a)("ReactVirtualized__Table__row",_),E=pt({},a,{height:this._getRowHeight(n),overflow:"hidden",paddingRight:y},w);return m({className:x,columns:O,index:n,isScrolling:r,key:i,onRowClick:c,onRowDoubleClick:l,onRowRightClick:d,onRowMouseOver:f,onRowMouseOut:h,rowData:S,style:E})}},{key:"_getFlexStyleForColumn",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="".concat(e.props.flexGrow," ").concat(e.props.flexShrink," ").concat(e.props.width,"px"),r=pt({},t,{flex:n,msFlex:n,WebkitFlex:n});return e.props.maxWidth&&(r.maxWidth=e.props.maxWidth),e.props.minWidth&&(r.minWidth=e.props.minWidth),r}},{key:"_getHeaderColumns",value:function(){var e=this,t=this.props,n=t.children;return(t.disableHeader?[]:v.Children.toArray(n)).map((function(t,n){return e._createHeader({column:t,index:n})}))}},{key:"_getRowHeight",value:function(e){var t=this.props.rowHeight;return"function"===typeof t?t({index:e}):t}},{key:"_onScroll",value:function(e){var t=e.clientHeight,n=e.scrollHeight,r=e.scrollTop;(0,this.props.onScroll)({clientHeight:t,scrollHeight:n,scrollTop:r})}},{key:"_onSectionRendered",value:function(e){var t=e.rowOverscanStartIndex,n=e.rowOverscanStopIndex,r=e.rowStartIndex,i=e.rowStopIndex;(0,this.props.onRowsRendered)({overscanStartIndex:t,overscanStopIndex:n,startIndex:r,stopIndex:i})}},{key:"_setRef",value:function(e){this.Grid=e}},{key:"_setScrollbarWidth",value:function(){var e=this.getScrollbarWidth();this.setState({scrollbarWidth:e})}}]),t}(v.PureComponent);m()(gt,"defaultProps",{disableHeader:!1,estimatedRowSize:30,headerHeight:0,headerStyle:{},noRowsRenderer:function(){return null},onRowsRendered:function(){return null},onScroll:function(){return null},overscanIndicesGetter:Z,overscanRowCount:10,rowRenderer:dt,headerRowRenderer:ut,rowStyle:{},scrollToAlignment:"auto",scrollToIndex:-1,style:{}}),gt.propTypes={};var mt=[],vt=null,bt=null;function yt(){bt&&(bt=null,document.body&&null!=vt&&(document.body.style.pointerEvents=vt),vt=null)}function _t(){yt(),mt.forEach((function(e){return e.__resetIsScrolling()}))}function wt(e){e.currentTarget===window&&null==vt&&document.body&&(vt=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),function(){bt&&H(bt);var e=0;mt.forEach((function(t){e=Math.max(e,t.props.scrollingResetTimeInterval)})),bt=V(_t,e)}(),mt.forEach((function(t){t.props.scrollElement===e.currentTarget&&t.__handleWindowScrollEvent()}))}function St(e,t){mt.some((function(e){return e.props.scrollElement===t}))||t.addEventListener("scroll",wt),mt.push(e)}function Ot(e,t){(mt=mt.filter((function(t){return t!==e}))).length||(t.removeEventListener("scroll",wt),bt&&(H(bt),yt()))}var $t,xt,Et=function(e){return e===window},Tt=function(e){return e.getBoundingClientRect()};function Ct(e,t){if(e){if(Et(e)){var n=window,r=n.innerHeight,i=n.innerWidth;return{height:"number"===typeof r?r:0,width:"number"===typeof i?i:0}}return Tt(e)}return{height:t.serverHeight,width:t.serverWidth}}function Nt(e,t){if(Et(t)&&document.documentElement){var n=document.documentElement,r=Tt(e),i=Tt(n);return{top:r.top-i.top,left:r.left-i.left}}var o=At(t),a=Tt(e),u=Tt(t);return{top:a.top+o.top-u.top,left:a.left+o.left-u.left}}function At(e){return Et(e)&&document.documentElement?{top:"scrollY"in window?window.scrollY:document.documentElement.scrollTop,left:"scrollX"in window?window.scrollX:document.documentElement.scrollLeft}:{top:e.scrollTop,left:e.scrollLeft}}function Mt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function kt(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:this.props.scrollElement,t=this.props.onResize,n=this.state,r=n.height,i=n.width,o=this._child||le.findDOMNode(this);if(o instanceof Element&&e){var a=Nt(o,e);this._positionFromTop=a.top,this._positionFromLeft=a.left}var u=Ct(e,this.props);r===u.height&&i===u.width||(this.setState({height:u.height,width:u.width}),t({height:u.height,width:u.width}))}},{key:"componentDidMount",value:function(){var e=this.props.scrollElement;this._detectElementResize=Object(ie.a)(),this.updatePosition(e),e&&(St(this,e),this._registerResizeListener(e)),this._isMounted=!0}},{key:"componentDidUpdate",value:function(e,t){var n=this.props.scrollElement,r=e.scrollElement;r!==n&&null!=r&&null!=n&&(this.updatePosition(n),Ot(this,r),St(this,n),this._unregisterResizeListener(r),this._registerResizeListener(n))}},{key:"componentWillUnmount",value:function(){var e=this.props.scrollElement;e&&(Ot(this,e),this._unregisterResizeListener(e)),this._isMounted=!1}},{key:"render",value:function(){var e=this.props.children,t=this.state,n=t.isScrolling,r=t.scrollTop,i=t.scrollLeft,o=t.height,a=t.width;return e({onChildScroll:this._onChildScroll,registerChild:this._registerChild,height:o,isScrolling:n,scrollLeft:i,scrollTop:r,width:a})}}]),t}(v.PureComponent),m()($t,"propTypes",null),xt);m()(It,"defaultProps",{onResize:function(){},onScroll:function(){},scrollingResetTimeInterval:150,scrollElement:Pt(),serverHeight:0,serverWidth:0})},function(e,t,n){"use strict";var r=Array.isArray,i=Object.keys,o=Object.prototype.hasOwnProperty,a="undefined"!==typeof Element;function u(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){var n,s,c,l=r(e),d=r(t);if(l&&d){if((s=e.length)!=t.length)return!1;for(n=s;0!==n--;)if(!u(e[n],t[n]))return!1;return!0}if(l!=d)return!1;var f=e instanceof Date,h=t instanceof Date;if(f!=h)return!1;if(f&&h)return e.getTime()==t.getTime();var p=e instanceof RegExp,g=t instanceof RegExp;if(p!=g)return!1;if(p&&g)return e.toString()==t.toString();var m=i(e);if((s=m.length)!==i(t).length)return!1;for(n=s;0!==n--;)if(!o.call(t,m[n]))return!1;if(a&&e instanceof Element&&t instanceof Element)return e===t;for(n=s;0!==n--;)if(("_owner"!==(c=m[n])||!e.$$typeof)&&!u(e[c],t[c]))return!1;return!0}return e!==e&&t!==t}e.exports=function(e,t){try{return u(e,t)}catch(n){if(n.message&&n.message.match(/stack|recursion/i)||-2146828260===n.number)return console.warn("Warning: react-fast-compare does not handle circular references.",n.name,n.message),!1;throw n}}},,function(e,t,n){var r=n(343),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,n){(function(e){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function o(e,t,n){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var a;"object"===typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:n(633).Buffer}catch(x){}function u(e,t){var n=e.charCodeAt(t);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function s(e,t,n){var r=u(e,n);return n-1>=t&&(r|=u(e,n-1)<<4),r}function c(e,t,n,r){for(var i=0,o=Math.min(e.length,n),a=t;a=49?u-49+10:u>=17?u-17+10:u}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"===typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,n){if("number"===typeof e)return this._initNumber(e,t,n);if("object"===typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<>>26-u&67108863,(u+=24)>=26&&(u-=26,o++);else if("le"===n)for(i=0,o=0;i>>26-u&67108863,(u+=24)>=26&&(u-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=2)i=s(e,t,r)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(r=(e.length-t)%2===0?t+1:t;r=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var o=e.length-n,a=o%r,u=Math.min(o,o-a)+n,s=0,l=n;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,u=67108863&a,s=a/67108864|0;n.words[0]=u;for(var c=1;c>>26,d=67108863&s,f=Math.min(c,t.length-1),h=Math.max(0,c-e.length+1);h<=f;h++){var p=c-h|0;l+=(a=(i=0|e.words[p])*(o=0|t.words[h])+d)/67108864|0,d=67108863&a}n.words[c]=0|d,s=0|l}return 0!==s?n.words[c]=0|s:n.length--,n.strip()}o.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?l[6-s.length]+s+n:s+n,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(n=o.toString(16)+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var c=d[e],h=f[e];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var g=p.modn(h).toString(e);n=(p=p.idivn(h)).isZero()?g+n:l[c-g.length]+g+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return r("undefined"!==typeof a),this.toArrayLike(a,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,n){var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var a,u,s="le"===t,c=new e(o),l=this.clone();if(s){for(u=0;!l.isZero();u++)a=l.andln(255),l.iushrn(8),c[u]=a;for(;u=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0===(8191&t)&&(n+=13,t>>>=13),0===(127&t)&&(n+=7,t>>>=7),0===(15&t)&&(n+=4,t>>>=4),0===(3&t)&&(n+=2,t>>>=2),0===(1&t)&&n++,n},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;re.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){r("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){r("number"===typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<e.length?(n=this,r=e):(n=e,r=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var o=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,h=0|a[1],p=8191&h,g=h>>>13,m=0|a[2],v=8191&m,b=m>>>13,y=0|a[3],_=8191&y,w=y>>>13,S=0|a[4],O=8191&S,$=S>>>13,x=0|a[5],E=8191&x,T=x>>>13,C=0|a[6],N=8191&C,A=C>>>13,M=0|a[7],k=8191&M,P=M>>>13,I=0|a[8],R=8191&I,j=I>>>13,D=0|a[9],L=8191&D,F=D>>>13,U=0|u[0],B=8191&U,z=U>>>13,H=0|u[1],V=8191&H,W=H>>>13,G=0|u[2],q=8191&G,Y=G>>>13,K=0|u[3],Q=8191&K,Z=K>>>13,X=0|u[4],J=8191&X,ee=X>>>13,te=0|u[5],ne=8191&te,re=te>>>13,ie=0|u[6],oe=8191&ie,ae=ie>>>13,ue=0|u[7],se=8191&ue,ce=ue>>>13,le=0|u[8],de=8191&le,fe=le>>>13,he=0|u[9],pe=8191&he,ge=he>>>13;n.negative=e.negative^t.negative,n.length=19;var me=(c+(r=Math.imul(d,B))|0)+((8191&(i=(i=Math.imul(d,z))+Math.imul(f,B)|0))<<13)|0;c=((o=Math.imul(f,z))+(i>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(p,B),i=(i=Math.imul(p,z))+Math.imul(g,B)|0,o=Math.imul(g,z);var ve=(c+(r=r+Math.imul(d,V)|0)|0)+((8191&(i=(i=i+Math.imul(d,W)|0)+Math.imul(f,V)|0))<<13)|0;c=((o=o+Math.imul(f,W)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(v,B),i=(i=Math.imul(v,z))+Math.imul(b,B)|0,o=Math.imul(b,z),r=r+Math.imul(p,V)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,W)|0;var be=(c+(r=r+Math.imul(d,q)|0)|0)+((8191&(i=(i=i+Math.imul(d,Y)|0)+Math.imul(f,q)|0))<<13)|0;c=((o=o+Math.imul(f,Y)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(_,B),i=(i=Math.imul(_,z))+Math.imul(w,B)|0,o=Math.imul(w,z),r=r+Math.imul(v,V)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,W)|0,r=r+Math.imul(p,q)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(g,q)|0,o=o+Math.imul(g,Y)|0;var ye=(c+(r=r+Math.imul(d,Q)|0)|0)+((8191&(i=(i=i+Math.imul(d,Z)|0)+Math.imul(f,Q)|0))<<13)|0;c=((o=o+Math.imul(f,Z)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(O,B),i=(i=Math.imul(O,z))+Math.imul($,B)|0,o=Math.imul($,z),r=r+Math.imul(_,V)|0,i=(i=i+Math.imul(_,W)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,W)|0,r=r+Math.imul(v,q)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(b,q)|0,o=o+Math.imul(b,Y)|0,r=r+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,Z)|0;var _e=(c+(r=r+Math.imul(d,J)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(f,J)|0))<<13)|0;c=((o=o+Math.imul(f,ee)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(E,B),i=(i=Math.imul(E,z))+Math.imul(T,B)|0,o=Math.imul(T,z),r=r+Math.imul(O,V)|0,i=(i=i+Math.imul(O,W)|0)+Math.imul($,V)|0,o=o+Math.imul($,W)|0,r=r+Math.imul(_,q)|0,i=(i=i+Math.imul(_,Y)|0)+Math.imul(w,q)|0,o=o+Math.imul(w,Y)|0,r=r+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,Z)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,Z)|0,r=r+Math.imul(p,J)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(g,J)|0,o=o+Math.imul(g,ee)|0;var we=(c+(r=r+Math.imul(d,ne)|0)|0)+((8191&(i=(i=i+Math.imul(d,re)|0)+Math.imul(f,ne)|0))<<13)|0;c=((o=o+Math.imul(f,re)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(N,B),i=(i=Math.imul(N,z))+Math.imul(A,B)|0,o=Math.imul(A,z),r=r+Math.imul(E,V)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,W)|0,r=r+Math.imul(O,q)|0,i=(i=i+Math.imul(O,Y)|0)+Math.imul($,q)|0,o=o+Math.imul($,Y)|0,r=r+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,Z)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,Z)|0,r=r+Math.imul(v,J)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(b,J)|0,o=o+Math.imul(b,ee)|0,r=r+Math.imul(p,ne)|0,i=(i=i+Math.imul(p,re)|0)+Math.imul(g,ne)|0,o=o+Math.imul(g,re)|0;var Se=(c+(r=r+Math.imul(d,oe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ae)|0)+Math.imul(f,oe)|0))<<13)|0;c=((o=o+Math.imul(f,ae)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(k,B),i=(i=Math.imul(k,z))+Math.imul(P,B)|0,o=Math.imul(P,z),r=r+Math.imul(N,V)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,W)|0,r=r+Math.imul(E,q)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(T,q)|0,o=o+Math.imul(T,Y)|0,r=r+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,Z)|0)+Math.imul($,Q)|0,o=o+Math.imul($,Z)|0,r=r+Math.imul(_,J)|0,i=(i=i+Math.imul(_,ee)|0)+Math.imul(w,J)|0,o=o+Math.imul(w,ee)|0,r=r+Math.imul(v,ne)|0,i=(i=i+Math.imul(v,re)|0)+Math.imul(b,ne)|0,o=o+Math.imul(b,re)|0,r=r+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,ae)|0;var Oe=(c+(r=r+Math.imul(d,se)|0)|0)+((8191&(i=(i=i+Math.imul(d,ce)|0)+Math.imul(f,se)|0))<<13)|0;c=((o=o+Math.imul(f,ce)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(R,B),i=(i=Math.imul(R,z))+Math.imul(j,B)|0,o=Math.imul(j,z),r=r+Math.imul(k,V)|0,i=(i=i+Math.imul(k,W)|0)+Math.imul(P,V)|0,o=o+Math.imul(P,W)|0,r=r+Math.imul(N,q)|0,i=(i=i+Math.imul(N,Y)|0)+Math.imul(A,q)|0,o=o+Math.imul(A,Y)|0,r=r+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,Z)|0,r=r+Math.imul(O,J)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul($,J)|0,o=o+Math.imul($,ee)|0,r=r+Math.imul(_,ne)|0,i=(i=i+Math.imul(_,re)|0)+Math.imul(w,ne)|0,o=o+Math.imul(w,re)|0,r=r+Math.imul(v,oe)|0,i=(i=i+Math.imul(v,ae)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,ae)|0,r=r+Math.imul(p,se)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(g,se)|0,o=o+Math.imul(g,ce)|0;var $e=(c+(r=r+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,fe)|0)+Math.imul(f,de)|0))<<13)|0;c=((o=o+Math.imul(f,fe)|0)+(i>>>13)|0)+($e>>>26)|0,$e&=67108863,r=Math.imul(L,B),i=(i=Math.imul(L,z))+Math.imul(F,B)|0,o=Math.imul(F,z),r=r+Math.imul(R,V)|0,i=(i=i+Math.imul(R,W)|0)+Math.imul(j,V)|0,o=o+Math.imul(j,W)|0,r=r+Math.imul(k,q)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(P,q)|0,o=o+Math.imul(P,Y)|0,r=r+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,Z)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,Z)|0,r=r+Math.imul(E,J)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(T,J)|0,o=o+Math.imul(T,ee)|0,r=r+Math.imul(O,ne)|0,i=(i=i+Math.imul(O,re)|0)+Math.imul($,ne)|0,o=o+Math.imul($,re)|0,r=r+Math.imul(_,oe)|0,i=(i=i+Math.imul(_,ae)|0)+Math.imul(w,oe)|0,o=o+Math.imul(w,ae)|0,r=r+Math.imul(v,se)|0,i=(i=i+Math.imul(v,ce)|0)+Math.imul(b,se)|0,o=o+Math.imul(b,ce)|0,r=r+Math.imul(p,de)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(g,de)|0,o=o+Math.imul(g,fe)|0;var xe=(c+(r=r+Math.imul(d,pe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ge)|0)+Math.imul(f,pe)|0))<<13)|0;c=((o=o+Math.imul(f,ge)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(L,V),i=(i=Math.imul(L,W))+Math.imul(F,V)|0,o=Math.imul(F,W),r=r+Math.imul(R,q)|0,i=(i=i+Math.imul(R,Y)|0)+Math.imul(j,q)|0,o=o+Math.imul(j,Y)|0,r=r+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,Z)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,Z)|0,r=r+Math.imul(N,J)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(A,J)|0,o=o+Math.imul(A,ee)|0,r=r+Math.imul(E,ne)|0,i=(i=i+Math.imul(E,re)|0)+Math.imul(T,ne)|0,o=o+Math.imul(T,re)|0,r=r+Math.imul(O,oe)|0,i=(i=i+Math.imul(O,ae)|0)+Math.imul($,oe)|0,o=o+Math.imul($,ae)|0,r=r+Math.imul(_,se)|0,i=(i=i+Math.imul(_,ce)|0)+Math.imul(w,se)|0,o=o+Math.imul(w,ce)|0,r=r+Math.imul(v,de)|0,i=(i=i+Math.imul(v,fe)|0)+Math.imul(b,de)|0,o=o+Math.imul(b,fe)|0;var Ee=(c+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ge)|0)+Math.imul(g,pe)|0))<<13)|0;c=((o=o+Math.imul(g,ge)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(L,q),i=(i=Math.imul(L,Y))+Math.imul(F,q)|0,o=Math.imul(F,Y),r=r+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,Z)|0)+Math.imul(j,Q)|0,o=o+Math.imul(j,Z)|0,r=r+Math.imul(k,J)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(P,J)|0,o=o+Math.imul(P,ee)|0,r=r+Math.imul(N,ne)|0,i=(i=i+Math.imul(N,re)|0)+Math.imul(A,ne)|0,o=o+Math.imul(A,re)|0,r=r+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(T,oe)|0,o=o+Math.imul(T,ae)|0,r=r+Math.imul(O,se)|0,i=(i=i+Math.imul(O,ce)|0)+Math.imul($,se)|0,o=o+Math.imul($,ce)|0,r=r+Math.imul(_,de)|0,i=(i=i+Math.imul(_,fe)|0)+Math.imul(w,de)|0,o=o+Math.imul(w,fe)|0;var Te=(c+(r=r+Math.imul(v,pe)|0)|0)+((8191&(i=(i=i+Math.imul(v,ge)|0)+Math.imul(b,pe)|0))<<13)|0;c=((o=o+Math.imul(b,ge)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(L,Q),i=(i=Math.imul(L,Z))+Math.imul(F,Q)|0,o=Math.imul(F,Z),r=r+Math.imul(R,J)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(j,J)|0,o=o+Math.imul(j,ee)|0,r=r+Math.imul(k,ne)|0,i=(i=i+Math.imul(k,re)|0)+Math.imul(P,ne)|0,o=o+Math.imul(P,re)|0,r=r+Math.imul(N,oe)|0,i=(i=i+Math.imul(N,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,r=r+Math.imul(E,se)|0,i=(i=i+Math.imul(E,ce)|0)+Math.imul(T,se)|0,o=o+Math.imul(T,ce)|0,r=r+Math.imul(O,de)|0,i=(i=i+Math.imul(O,fe)|0)+Math.imul($,de)|0,o=o+Math.imul($,fe)|0;var Ce=(c+(r=r+Math.imul(_,pe)|0)|0)+((8191&(i=(i=i+Math.imul(_,ge)|0)+Math.imul(w,pe)|0))<<13)|0;c=((o=o+Math.imul(w,ge)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(L,J),i=(i=Math.imul(L,ee))+Math.imul(F,J)|0,o=Math.imul(F,ee),r=r+Math.imul(R,ne)|0,i=(i=i+Math.imul(R,re)|0)+Math.imul(j,ne)|0,o=o+Math.imul(j,re)|0,r=r+Math.imul(k,oe)|0,i=(i=i+Math.imul(k,ae)|0)+Math.imul(P,oe)|0,o=o+Math.imul(P,ae)|0,r=r+Math.imul(N,se)|0,i=(i=i+Math.imul(N,ce)|0)+Math.imul(A,se)|0,o=o+Math.imul(A,ce)|0,r=r+Math.imul(E,de)|0,i=(i=i+Math.imul(E,fe)|0)+Math.imul(T,de)|0,o=o+Math.imul(T,fe)|0;var Ne=(c+(r=r+Math.imul(O,pe)|0)|0)+((8191&(i=(i=i+Math.imul(O,ge)|0)+Math.imul($,pe)|0))<<13)|0;c=((o=o+Math.imul($,ge)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(L,ne),i=(i=Math.imul(L,re))+Math.imul(F,ne)|0,o=Math.imul(F,re),r=r+Math.imul(R,oe)|0,i=(i=i+Math.imul(R,ae)|0)+Math.imul(j,oe)|0,o=o+Math.imul(j,ae)|0,r=r+Math.imul(k,se)|0,i=(i=i+Math.imul(k,ce)|0)+Math.imul(P,se)|0,o=o+Math.imul(P,ce)|0,r=r+Math.imul(N,de)|0,i=(i=i+Math.imul(N,fe)|0)+Math.imul(A,de)|0,o=o+Math.imul(A,fe)|0;var Ae=(c+(r=r+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,ge)|0)+Math.imul(T,pe)|0))<<13)|0;c=((o=o+Math.imul(T,ge)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(L,oe),i=(i=Math.imul(L,ae))+Math.imul(F,oe)|0,o=Math.imul(F,ae),r=r+Math.imul(R,se)|0,i=(i=i+Math.imul(R,ce)|0)+Math.imul(j,se)|0,o=o+Math.imul(j,ce)|0,r=r+Math.imul(k,de)|0,i=(i=i+Math.imul(k,fe)|0)+Math.imul(P,de)|0,o=o+Math.imul(P,fe)|0;var Me=(c+(r=r+Math.imul(N,pe)|0)|0)+((8191&(i=(i=i+Math.imul(N,ge)|0)+Math.imul(A,pe)|0))<<13)|0;c=((o=o+Math.imul(A,ge)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(L,se),i=(i=Math.imul(L,ce))+Math.imul(F,se)|0,o=Math.imul(F,ce),r=r+Math.imul(R,de)|0,i=(i=i+Math.imul(R,fe)|0)+Math.imul(j,de)|0,o=o+Math.imul(j,fe)|0;var ke=(c+(r=r+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,ge)|0)+Math.imul(P,pe)|0))<<13)|0;c=((o=o+Math.imul(P,ge)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(L,de),i=(i=Math.imul(L,fe))+Math.imul(F,de)|0,o=Math.imul(F,fe);var Pe=(c+(r=r+Math.imul(R,pe)|0)|0)+((8191&(i=(i=i+Math.imul(R,ge)|0)+Math.imul(j,pe)|0))<<13)|0;c=((o=o+Math.imul(j,ge)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Ie=(c+(r=Math.imul(L,pe))|0)+((8191&(i=(i=Math.imul(L,ge))+Math.imul(F,pe)|0))<<13)|0;return c=((o=Math.imul(F,ge))+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,s[0]=me,s[1]=ve,s[2]=be,s[3]=ye,s[4]=_e,s[5]=we,s[6]=Se,s[7]=Oe,s[8]=$e,s[9]=xe,s[10]=Ee,s[11]=Te,s[12]=Ce,s[13]=Ne,s[14]=Ae,s[15]=Me,s[16]=ke,s[17]=Pe,s[18]=Ie,0!==c&&(s[19]=c,n.length++),n};function g(e,t,n){return(new m).mulp(e,t,n)}function m(e,t){this.x=e,this.y=t}Math.imul||(p=h),o.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?p(this,e,t):n<63?h(this,e,t):n<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}n.words[o]=u,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,e,t):g(this,e,t)},m.prototype.makeRBT=function(e){for(var t=new Array(e),n=o.prototype._countBits(e)-1,r=0;r>=1;return r},m.prototype.permute=function(e,t,n,r,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*t;a>=26,t+=i/67108864|0,t+=o>>>26,this.words[n]=67108863&o}return 0!==t&&(this.words[n]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n>>i}return t}(e);if(0===t.length)return new o(1);for(var n=this,r=0;r=0);var t,n=e%26,i=(e-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(t=0;t>>26-n}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),u=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==l||c>=i);c--){var d=0|this.words[c];this.words[c]=l<<26-o|d>>>o,l=d&u}return s&&0!==l&&(s.words[s.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){r("number"===typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(r("number"===typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(s/67108864|0),this.words[i+n]=67108863&o}for(;i>26,this.words[i+n]=67108863&o;if(0===u)return this.strip();for(r(-1===u),u=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),i=e,a=0|i.words[i.length-1];0!==(n=26-this._countBits(a))&&(i=i.ushln(n),r.iushln(n),a=0|i.words[i.length-1]);var u,s=r.length-i.length;if("mod"!==t){(u=new o(null)).length=s+1,u.words=new Array(u.length);for(var c=0;c=0;d--){var f=67108864*(0|r.words[i.length+d])+(0|r.words[i.length+d-1]);for(f=Math.min(f/a|0,67108863),r._ishlnsubmul(i,f,d);0!==r.negative;)f--,r.negative=0,r._ishlnsubmul(i,1,d),r.isZero()||(r.negative^=1);u&&(u.words[d]=f)}return u&&u.strip(),r.strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:u||null,mod:r}},o.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(u=this.neg().divmod(e,t),"mod"!==t&&(i=u.div.neg()),"div"!==t&&(a=u.mod.neg(),n&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(u=this.divmod(e.neg(),t),"mod"!==t&&(i=u.div.neg()),{div:i,mod:u.mod}):0!==(this.negative&e.negative)?(u=this.neg().divmod(e.neg(),t),"div"!==t&&(a=u.mod.neg(),n&&0!==a.negative&&a.isub(e)),{div:u.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,a,u},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){r(e<=67108863);for(var t=(1<<26)%e,n=0,i=this.length-1;i>=0;i--)n=(t*n+(0|this.words[i]))%e;return n},o.prototype.idivn=function(e){r(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*t;this.words[n]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),u=new o(0),s=new o(1),c=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++c;for(var l=n.clone(),d=t.clone();!t.isZero();){for(var f=0,h=1;0===(t.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(l),a.isub(d)),i.iushrn(1),a.iushrn(1);for(var p=0,g=1;0===(n.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(u.isOdd()||s.isOdd())&&(u.iadd(l),s.isub(d)),u.iushrn(1),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(u),a.isub(s)):(n.isub(t),u.isub(i),s.isub(a))}return{a:u,b:s,gcd:n.iushln(c)}},o.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),u=new o(0),s=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,l=1;0===(t.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(s),a.iushrn(1);for(var d=0,f=1;0===(n.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(n.iushrn(d);d-- >0;)u.isOdd()&&u.iadd(s),u.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(u)):(n.isub(t),u.isub(a))}return(i=0===t.cmpn(1)?a:u).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var o=t;t=n,n=o}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){r("number"===typeof e);var t=e%26,n=(e-t)/26,i=1<>>26,u&=67108863,this.words[a]=u}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){ri&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new O(e)},o.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function b(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function O(e){if("string"===typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function $(e){O.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},b.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},b.prototype.split=function(e,t){e.iushrn(this.n,0,t)},b.prototype.imulK=function(e){return e.imul(this.k)},i(y,b),y.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},y.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new y;else if("p224"===e)t=new _;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new S}return v[e]=t,t},O.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},O.prototype._verify2=function(e,t){r(0===(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},O.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},O.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},O.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},O.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},O.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},O.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},O.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},O.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},O.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},O.prototype.isqr=function(e){return this.imul(e,e.clone())},O.prototype.sqr=function(e){return this.mul(e,e)},O.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2===1),3===t){var n=this.m.add(new o(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);r(!i.isZero());var u=new o(1).toRed(this),s=u.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(s);)l.redIAdd(s);for(var d=this.pow(l,i),f=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=a;0!==h.cmp(u);){for(var g=h,m=0;0!==g.cmp(u);m++)g=g.redSqr();r(m=0;r--){for(var c=t.words[r],l=s-1;l>=0;l--){var d=c>>l&1;i!==n[0]&&(i=this.sqr(i)),0!==d||0!==a?(a<<=1,a|=d,(4===++u||0===r&&0===l)&&(i=this.mul(i,n[a]),u=0,a=0)):u=0}s=26}return i},O.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},O.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new $(e)},i($,O),$.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},$.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},$.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},$.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},$.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,n(135)(e))},function(e,t,n){"use strict";(function(e){var r=n(243),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=i&&"object"==typeof e&&e&&!e.nodeType&&e,a=o&&o.exports===i&&r.a.process,u=function(){try{var e=o&&o.require&&o.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(t){}}();t.a=u}).call(this,n(217)(e))},function(e,t){var n=Array.isArray;e.exports=n},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){var r=n(308);function i(e){return r("rmd160").update(e).digest()}function o(e){return r("sha256").update(e).digest()}e.exports={hash160:function(e){return i(o(e))},hash256:function(e){return o(o(e))},ripemd160:i,sha1:function(e){return r("sha1").update(e).digest()},sha256:o}},function(e,t,n){"use strict";var r=n(321);t.a=function(e,t){return t?Object(r.a)(e,t,{clone:!1}):e}},function(e,t,n){"use strict";function r(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,i){return t.apply(this,arguments)};case 5:return function(e,n,r,i,o){return t.apply(this,arguments)};case 6:return function(e,n,r,i,o,a){return t.apply(this,arguments)};case 7:return function(e,n,r,i,o,a,u){return t.apply(this,arguments)};case 8:return function(e,n,r,i,o,a,u,s){return t.apply(this,arguments)};case 9:return function(e,n,r,i,o,a,u,s,c){return t.apply(this,arguments)};case 10:return function(e,n,r,i,o,a,u,s,c,l){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(86);function i(e,t){return function(){var n=arguments.length;if(0===n)return t();var i=arguments[n-1];return Object(r.a)(i)||"function"!==typeof i[e]?t.apply(this,arguments):i[e].apply(i,Array.prototype.slice.call(arguments,0,n-1))}}},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(){return(i=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n>6),t+=String.fromCharCode(128|63&r)):r<55296||r>=57344?(t+=String.fromCharCode(224|r>>12),t+=String.fromCharCode(128|r>>6&63),t+=String.fromCharCode(128|63&r)):(n++,r=65536+((1023&r)<<10|1023&e.charCodeAt(n)),t+=String.fromCharCode(240|r>>18),t+=String.fromCharCode(128|r>>12&63),t+=String.fromCharCode(128|r>>6&63),t+=String.fromCharCode(128|63&r))}return t}var w={size:128,level:"L",bgColor:"#FFFFFF",fgColor:"#000000",includeMargin:!1},S={value:v.string.isRequired,size:v.number,level:v.oneOf(["L","M","Q","H"]),bgColor:v.string,fgColor:v.string,includeMargin:v.bool};function O(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[];return e.forEach((function(e,r){var i=null;e.forEach((function(o,a){if(!o&&null!==i)return n.push("M".concat(i+t," ").concat(r+t,"h").concat(a-i,"v1H").concat(i+t,"z")),void(i=null);if(a!==e.length-1)o&&null===i&&(i=a);else{if(!o)return;null===i?n.push("M".concat(a+t,",").concat(r+t," h1v1H").concat(a+t,"z")):n.push("M".concat(i+t,",").concat(r+t," h").concat(a+1-i,"v1H").concat(i+t,"z"))}}))})),n.join("")}var $=function(){try{(new Path2D).addPath(new Path2D)}catch(e){return!1}return!0}(),x=function(e){function t(){var e,n;u(this,t);for(var r=arguments.length,i=new Array(r),o=0;o=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var i=/[^.^\]^[]+|(?=\[\]|\.\.)/g,o=/^\d+$/,a=/^\d/,u=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,s=/^\s*(['"]?)(.*?)(\1)\s*$/,c=new r(512),l=new r(512),d=new r(512);function f(e){return c.get(e)||c.set(e,h(e).map((function(e){return e.replace(s,"$2")})))}function h(e){return e.match(i)}function p(e){return"string"===typeof e&&e&&-1!==["'",'"'].indexOf(e.charAt(0))}function g(e){return!p(e)&&(function(e){return e.match(a)&&!e.match(o)}(e)||function(e){return u.test(e)}(e))}e.exports={Cache:r,split:h,normalizePath:f,setter:function(e){var t=f(e);return l.get(e)||l.set(e,(function(e,n){for(var r=0,i=t.length,o=e;r0?"in "+i:i+" ago":i};function o(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,r=e.formats[n]||e.formats[e.defaultWidth];return r}}var a={date:o({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:o({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:o({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},u={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function s(e){return function(t,n){var r,i=n||{};if("formatting"===(i.context?String(i.context):"standalone")&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,a=i.width?String(i.width):o;r=e.formattingValues[a]||e.formattingValues[o]}else{var u=e.defaultWidth,s=i.width?String(i.width):e.defaultWidth;r=e.values[s]||e.values[u]}return r[e.argumentCallback?e.argumentCallback(t):t]}}function c(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;var a,u=o[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?d(s,(function(e){return e.test(u)})):l(s,(function(e){return e.test(u)}));a=e.valueCallback?e.valueCallback(c):c,a=n.valueCallback?n.valueCallback(a):a;var f=t.slice(u.length);return{value:a,rest:f}}}function l(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function d(e,t){for(var n=0;n20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:s({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:s({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:s({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:s({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:s({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(f={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.match(f.matchPattern);if(!n)return null;var r=n[0],i=e.match(f.parsePattern);if(!i)return null;var o=f.valueCallback?f.valueCallback(i[0]):i[0];o=t.valueCallback?t.valueCallback(o):o;var a=e.slice(r.length);return{value:o,rest:a}}),era:c({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:c({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:c({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:c({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:c({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};t.a=h},function(e,t,n){"use strict";function r(e,t){for(var n=0;n0}var g,m=function(e){function t(n){var r=n.graphQLErrors,i=n.networkError,o=n.errorMessage,a=n.extraInfo,u=e.call(this,o)||this;return u.graphQLErrors=r||[],u.networkError=i||null,u.message=o||function(e){var t="";return p(e.graphQLErrors)&&e.graphQLErrors.forEach((function(e){var n=e?e.message:"Error message not found.";t+="GraphQL error: "+n+"\n"})),e.networkError&&(t+="Network error: "+e.networkError.message+"\n"),t=t.replace(/\n$/,"")}(u),u.extraInfo=a,u.__proto__=t.prototype,u}return Object(i.c)(t,e),t}(Error);!function(e){e[e.normal=1]="normal",e[e.refetch=2]="refetch",e[e.poll=3]="poll"}(g||(g={}));var v=function(e){function t(t){var n=t.queryManager,r=t.options,i=t.shouldSubscribe,a=void 0===i||i,u=e.call(this,(function(e){return u.onSubscribe(e)}))||this;u.observers=new Set,u.subscriptions=new Set,u.isTornDown=!1,u.options=r,u.variables=r.variables||{},u.queryId=n.generateQueryId(),u.shouldSubscribe=a;var s=Object(o.m)(r.query);return u.queryName=s&&s.name&&s.name.value,u.queryManager=n,u}return Object(i.c)(t,e),t.prototype.result=function(){var e=this;return new Promise((function(t,n){var r={next:function(n){t(n),e.observers.delete(r),e.observers.size||e.queryManager.removeQuery(e.queryId),setTimeout((function(){i.unsubscribe()}),0)},error:n},i=e.subscribe(r)}))},t.prototype.currentResult=function(){var e=this.getCurrentResult();return void 0===e.data&&(e.data={}),e},t.prototype.getCurrentResult=function(){if(this.isTornDown){var e=this.lastResult;return{data:!this.lastError&&e&&e.data||void 0,error:this.lastError,loading:!1,networkStatus:r.error}}var t,n,o,a=this.queryManager.getCurrentQueryResult(this),u=a.data,s=a.partial,c=this.queryManager.queryStore.get(this.queryId),l=this.options.fetchPolicy,d="network-only"===l||"no-cache"===l;if(c){var h=c.networkStatus;if(n=c,void 0===(o=this.options.errorPolicy)&&(o="none"),n&&(n.networkError||"none"===o&&p(n.graphQLErrors)))return{data:void 0,loading:!1,networkStatus:h,error:new m({graphQLErrors:c.graphQLErrors,networkError:c.networkError})};c.variables&&(this.options.variables=Object(i.a)(Object(i.a)({},this.options.variables),c.variables),this.variables=this.options.variables),t={data:u,loading:f(h),networkStatus:h},c.graphQLErrors&&"all"===this.options.errorPolicy&&(t.errors=c.graphQLErrors)}else{var g=d||s&&"cache-only"!==l;t={data:u,loading:g,networkStatus:g?r.loading:r.ready}}return s||this.updateLastResult(Object(i.a)(Object(i.a)({},t),{stale:!1})),Object(i.a)(Object(i.a)({},t),{partial:s})},t.prototype.isDifferentFromLastResult=function(e){var t=this.lastResultSnapshot;return!(t&&e&&t.networkStatus===e.networkStatus&&t.stale===e.stale&&Object(a.a)(t.data,e.data))},t.prototype.getLastResult=function(){return this.lastResult},t.prototype.getLastError=function(){return this.lastError},t.prototype.resetLastResults=function(){delete this.lastResult,delete this.lastResultSnapshot,delete this.lastError,this.isTornDown=!1},t.prototype.resetQueryStoreErrors=function(){var e=this.queryManager.queryStore.get(this.queryId);e&&(e.networkError=null,e.graphQLErrors=[])},t.prototype.refetch=function(e){var t=this.options.fetchPolicy;return"cache-only"===t?Promise.reject(new l.a(1)):("no-cache"!==t&&"cache-and-network"!==t&&(t="network-only"),Object(a.a)(this.variables,e)||(this.variables=Object(i.a)(Object(i.a)({},this.variables),e)),Object(a.a)(this.options.variables,this.variables)||(this.options.variables=Object(i.a)(Object(i.a)({},this.options.variables),this.variables)),this.queryManager.fetchQuery(this.queryId,Object(i.a)(Object(i.a)({},this.options),{fetchPolicy:t}),g.refetch))},t.prototype.fetchMore=function(e){var t=this;Object(l.b)(e.updateQuery,2);var n=Object(i.a)(Object(i.a)({},e.query?e:Object(i.a)(Object(i.a)(Object(i.a)({},this.options),e),{variables:Object(i.a)(Object(i.a)({},this.variables),e.variables)})),{fetchPolicy:"network-only"}),r=this.queryManager.generateQueryId();return this.queryManager.fetchQuery(r,n,g.normal,this.queryId).then((function(i){return t.updateQuery((function(t){return e.updateQuery(t,{fetchMoreResult:i.data,variables:n.variables})})),t.queryManager.stopQuery(r),i}),(function(e){throw t.queryManager.stopQuery(r),e}))},t.prototype.subscribeToMore=function(e){var t=this,n=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables}).subscribe({next:function(n){var r=e.updateQuery;r&&t.updateQuery((function(e,t){var i=t.variables;return r(e,{subscriptionData:n,variables:i})}))},error:function(t){e.onError&&e.onError(t)}});return this.subscriptions.add(n),function(){t.subscriptions.delete(n)&&n.unsubscribe()}},t.prototype.setOptions=function(e){var t=this.options.fetchPolicy;this.options=Object(i.a)(Object(i.a)({},this.options),e),e.pollInterval?this.startPolling(e.pollInterval):0===e.pollInterval&&this.stopPolling();var n=e.fetchPolicy;return this.setVariables(this.options.variables,t!==n&&("cache-only"===t||"standby"===t||"network-only"===n),e.fetchResults)},t.prototype.setVariables=function(e,t,n){return void 0===t&&(t=!1),void 0===n&&(n=!0),this.isTornDown=!1,e=e||this.variables,!t&&Object(a.a)(e,this.variables)?this.observers.size&&n?this.result():Promise.resolve():(this.variables=this.options.variables=e,this.observers.size?this.queryManager.fetchQuery(this.queryId,this.options):Promise.resolve())},t.prototype.updateQuery=function(e){var t=this.queryManager,n=t.getQueryWithPreviousResult(this.queryId),r=n.previousResult,i=n.variables,a=n.document,u=Object(o.I)((function(){return e(r,{variables:i})}));u&&(t.dataStore.markUpdateQueryResult(a,i,u),t.broadcastQueries())},t.prototype.stopPolling=function(){this.queryManager.stopPollingQuery(this.queryId),this.options.pollInterval=void 0},t.prototype.startPolling=function(e){_(this),this.options.pollInterval=e,this.queryManager.startPollingQuery(this.options,this.queryId)},t.prototype.updateLastResult=function(e){var t=this.lastResult;return this.lastResult=e,this.lastResultSnapshot=this.queryManager.assumeImmutableResults?e:Object(o.f)(e),t},t.prototype.onSubscribe=function(e){var t=this;try{var n=e._subscription._observer;n&&!n.error&&(n.error=b)}catch(i){}var r=!this.observers.size;return this.observers.add(e),e.next&&this.lastResult&&e.next(this.lastResult),e.error&&this.lastError&&e.error(this.lastError),r&&this.setUpQuery(),function(){t.observers.delete(e)&&!t.observers.size&&t.tearDownQuery()}},t.prototype.setUpQuery=function(){var e=this,t=this.queryManager,n=this.queryId;this.shouldSubscribe&&t.addObservableQuery(n,this),this.options.pollInterval&&(_(this),t.startPollingQuery(this.options,n));var o=function(t){e.updateLastResult(Object(i.a)(Object(i.a)({},e.lastResult),{errors:t.graphQLErrors,networkStatus:r.error,loading:!1})),y(e.observers,"error",e.lastError=t)};t.observeQuery(n,this.options,{next:function(n){if(e.lastError||e.isDifferentFromLastResult(n)){var r=e.updateLastResult(n),i=e.options,o=i.query,u=i.variables,s=i.fetchPolicy;t.transform(o).hasClientExports?t.getLocalState().addExportedVariables(o,u).then((function(i){var u=e.variables;e.variables=e.options.variables=i,!n.loading&&r&&"cache-only"!==s&&t.transform(o).serverQuery&&!Object(a.a)(u,i)?e.refetch():y(e.observers,"next",n)})):y(e.observers,"next",n)}},error:o}).catch(o)},t.prototype.tearDownQuery=function(){var e=this.queryManager;this.isTornDown=!0,e.stopPollingQuery(this.queryId),this.subscriptions.forEach((function(e){return e.unsubscribe()})),this.subscriptions.clear(),e.removeObservableQuery(this.queryId),e.stopQuery(this.queryId),this.observers.clear()},t}(h);function b(e){}function y(e,t,n){var r=[];e.forEach((function(e){return e[t]&&r.push(e)})),r.forEach((function(e){return e[t](n)}))}function _(e){var t=e.options.fetchPolicy;Object(l.b)("cache-first"!==t&&"cache-only"!==t,3)}var w=function(){function e(){this.store={}}return e.prototype.getStore=function(){return this.store},e.prototype.get=function(e){return this.store[e]},e.prototype.initMutation=function(e,t,n){this.store[e]={mutation:t,variables:n||{},loading:!0,error:null}},e.prototype.markMutationError=function(e,t){var n=this.store[e];n&&(n.loading=!1,n.error=t)},e.prototype.markMutationResult=function(e){var t=this.store[e];t&&(t.loading=!1,t.error=null)},e.prototype.reset=function(){this.store={}},e}(),S=function(){function e(){this.store={}}return e.prototype.getStore=function(){return this.store},e.prototype.get=function(e){return this.store[e]},e.prototype.initQuery=function(e){var t=this.store[e.queryId];Object(l.b)(!t||t.document===e.document||Object(a.a)(t.document,e.document),19);var n,i=!1,o=null;e.storePreviousVariables&&t&&t.networkStatus!==r.loading&&(Object(a.a)(t.variables,e.variables)||(i=!0,o=t.variables)),n=i?r.setVariables:e.isPoll?r.poll:e.isRefetch?r.refetch:r.loading;var u=[];t&&t.graphQLErrors&&(u=t.graphQLErrors),this.store[e.queryId]={document:e.document,variables:e.variables,previousVariables:o,networkError:null,graphQLErrors:u,networkStatus:n,metadata:e.metadata},"string"===typeof e.fetchMoreForQueryId&&this.store[e.fetchMoreForQueryId]&&(this.store[e.fetchMoreForQueryId].networkStatus=r.fetchMore)},e.prototype.markQueryResult=function(e,t,n){this.store&&this.store[e]&&(this.store[e].networkError=null,this.store[e].graphQLErrors=p(t.errors)?t.errors:[],this.store[e].previousVariables=null,this.store[e].networkStatus=r.ready,"string"===typeof n&&this.store[n]&&(this.store[n].networkStatus=r.ready))},e.prototype.markQueryError=function(e,t,n){this.store&&this.store[e]&&(this.store[e].networkError=t,this.store[e].networkStatus=r.error,"string"===typeof n&&this.markQueryResultClient(n,!0))},e.prototype.markQueryResultClient=function(e,t){var n=this.store&&this.store[e];n&&(n.networkError=null,n.previousVariables=null,t&&(n.networkStatus=r.ready))},e.prototype.stopQuery=function(e){delete this.store[e]},e.prototype.reset=function(e){var t=this;Object.keys(this.store).forEach((function(n){e.indexOf(n)<0?t.stopQuery(n):t.store[n].networkStatus=r.loading}))},e}();var O=function(){function e(e){var t=e.cache,n=e.client,r=e.resolvers,i=e.fragmentMatcher;this.cache=t,n&&(this.client=n),r&&this.addResolvers(r),i&&this.setFragmentMatcher(i)}return e.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach((function(e){t.resolvers=Object(o.A)(t.resolvers,e)})):this.resolvers=Object(o.A)(this.resolvers,e)},e.prototype.setResolvers=function(e){this.resolvers={},this.addResolvers(e)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(e){var t=e.document,n=e.remoteResult,r=e.context,o=e.variables,a=e.onlyRunForcedResolvers,u=void 0!==a&&a;return Object(i.b)(this,void 0,void 0,(function(){return Object(i.d)(this,(function(e){return t?[2,this.resolveDocument(t,n.data,r,o,this.fragmentMatcher,u).then((function(e){return Object(i.a)(Object(i.a)({},n),{data:e.result})}))]:[2,n]}))}))},e.prototype.setFragmentMatcher=function(e){this.fragmentMatcher=e},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(e){return Object(o.s)(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){return this.resolvers?Object(o.C)(e):e},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.cache;return Object(i.a)(Object(i.a)({},e),{cache:t,getCacheKey:function(e){if(t.config)return t.config.dataIdFromObject(e);Object(l.b)(!1,6)}})},e.prototype.addExportedVariables=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),Object(i.b)(this,void 0,void 0,(function(){return Object(i.d)(this,(function(r){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(n),t).then((function(e){return Object(i.a)(Object(i.a)({},t),e.exportedVariables)}))]:[2,Object(i.a)({},t)]}))}))},e.prototype.shouldForceResolvers=function(e){var t=!1;return Object(d.b)(e,{Directive:{enter:function(e){if("client"===e.name.value&&e.arguments&&(t=e.arguments.some((function(e){return"always"===e.name.value&&"BooleanValue"===e.value.kind&&!0===e.value.value}))))return d.a}}}),t},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:Object(o.d)(e),variables:t,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(e,t,n,r,a,u){return void 0===n&&(n={}),void 0===r&&(r={}),void 0===a&&(a=function(){return!0}),void 0===u&&(u=!1),Object(i.b)(this,void 0,void 0,(function(){var s,c,l,d,f,h,p,g,m;return Object(i.d)(this,(function(v){var b;return s=Object(o.l)(e),c=Object(o.j)(e),l=Object(o.g)(c),d=s.operation,f=d?(b=d).charAt(0).toUpperCase()+b.slice(1):"Query",p=(h=this).cache,g=h.client,m={fragmentMap:l,context:Object(i.a)(Object(i.a)({},n),{cache:p,client:g}),variables:r,fragmentMatcher:a,defaultOperationType:f,exportedVariables:{},onlyRunForcedResolvers:u},[2,this.resolveSelectionSet(s.selectionSet,t,m).then((function(e){return{result:e,exportedVariables:m.exportedVariables}}))]}))}))},e.prototype.resolveSelectionSet=function(e,t,n){return Object(i.b)(this,void 0,void 0,(function(){var r,a,u,s,c,d=this;return Object(i.d)(this,(function(f){return r=n.fragmentMap,a=n.context,u=n.variables,s=[t],c=function(e){return Object(i.b)(d,void 0,void 0,(function(){var c,d;return Object(i.d)(this,(function(i){return Object(o.F)(e,u)?Object(o.t)(e)?[2,this.resolveField(e,t,n).then((function(t){var n;"undefined"!==typeof t&&s.push(((n={})[Object(o.E)(e)]=t,n))}))]:(Object(o.v)(e)?c=e:(c=r[e.name.value],Object(l.b)(c,7)),c&&c.typeCondition&&(d=c.typeCondition.name.value,n.fragmentMatcher(t,d,a))?[2,this.resolveSelectionSet(c.selectionSet,t,n).then((function(e){s.push(e)}))]:[2]):[2]}))}))},[2,Promise.all(e.selections.map(c)).then((function(){return Object(o.B)(s)}))]}))}))},e.prototype.resolveField=function(e,t,n){return Object(i.b)(this,void 0,void 0,(function(){var r,a,u,s,c,l,d,f,h,p=this;return Object(i.d)(this,(function(i){return r=n.variables,a=e.name.value,u=Object(o.E)(e),s=a!==u,c=t[u]||t[a],l=Promise.resolve(c),n.onlyRunForcedResolvers&&!this.shouldForceResolvers(e)||(d=t.__typename||n.defaultOperationType,(f=this.resolvers&&this.resolvers[d])&&(h=f[s?a:u])&&(l=Promise.resolve(h(t,Object(o.b)(e,r),n.context,{field:e,fragmentMap:n.fragmentMap})))),[2,l.then((function(t){return void 0===t&&(t=c),e.directives&&e.directives.forEach((function(e){"export"===e.name.value&&e.arguments&&e.arguments.forEach((function(e){"as"===e.name.value&&"StringValue"===e.value.kind&&(n.exportedVariables[e.value.value]=t)}))})),e.selectionSet?null==t?t:Array.isArray(t)?p.resolveSubSelectedArray(e,t,n):e.selectionSet?p.resolveSelectionSet(e.selectionSet,t,n):void 0:t}))]}))}))},e.prototype.resolveSubSelectedArray=function(e,t,n){var r=this;return Promise.all(t.map((function(t){return null===t?null:Array.isArray(t)?r.resolveSubSelectedArray(e,t,n):e.selectionSet?r.resolveSelectionSet(e.selectionSet,t,n):void 0})))},e}();function $(e){var t=new Set,n=null;return new h((function(r){return t.add(r),n=n||e.subscribe({next:function(e){t.forEach((function(t){return t.next&&t.next(e)}))},error:function(e){t.forEach((function(t){return t.error&&t.error(e)}))},complete:function(){t.forEach((function(e){return e.complete&&e.complete()}))}}),function(){t.delete(r)&&!t.size&&n&&(n.unsubscribe(),n=null)}}))}var x=Object.prototype.hasOwnProperty,E=function(){function e(e){var t=e.link,n=e.queryDeduplication,r=void 0!==n&&n,i=e.store,a=e.onBroadcast,u=void 0===a?function(){}:a,s=e.ssrMode,c=void 0!==s&&s,l=e.clientAwareness,d=void 0===l?{}:l,f=e.localState,h=e.assumeImmutableResults;this.mutationStore=new w,this.queryStore=new S,this.clientAwareness={},this.idCounter=1,this.queries=new Map,this.fetchQueryRejectFns=new Map,this.transformCache=new(o.e?WeakMap:Map),this.inFlightLinkObservables=new Map,this.pollingInfoByQueryId=new Map,this.link=t,this.queryDeduplication=r,this.dataStore=i,this.onBroadcast=u,this.clientAwareness=d,this.localState=f||new O({cache:i.getCache()}),this.ssrMode=c,this.assumeImmutableResults=!!h}return e.prototype.stop=function(){var e=this;this.queries.forEach((function(t,n){e.stopQueryNoBroadcast(n)})),this.fetchQueryRejectFns.forEach((function(e){e(new l.a(8))}))},e.prototype.mutate=function(e){var t=e.mutation,n=e.variables,r=e.optimisticResponse,a=e.updateQueries,u=e.refetchQueries,s=void 0===u?[]:u,c=e.awaitRefetchQueries,d=void 0!==c&&c,f=e.update,h=e.errorPolicy,g=void 0===h?"none":h,v=e.fetchPolicy,b=e.context,y=void 0===b?{}:b;return Object(i.b)(this,void 0,void 0,(function(){var e,u,c,h=this;return Object(i.d)(this,(function(b){switch(b.label){case 0:return Object(l.b)(t,9),Object(l.b)(!v||"no-cache"===v,10),e=this.generateQueryId(),t=this.transform(t).document,this.setQuery(e,(function(){return{document:t}})),n=this.getVariables(t,n),this.transform(t).hasClientExports?[4,this.localState.addExportedVariables(t,n,y)]:[3,2];case 1:n=b.sent(),b.label=2;case 2:return u=function(){var e={};return a&&h.queries.forEach((function(t,n){var r=t.observableQuery;if(r){var i=r.queryName;i&&x.call(a,i)&&(e[n]={updater:a[i],query:h.queryStore.get(n)})}})),e},this.mutationStore.initMutation(e,t,n),this.dataStore.markMutationInit({mutationId:e,document:t,variables:n,updateQueries:u(),update:f,optimisticResponse:r}),this.broadcastQueries(),c=this,[2,new Promise((function(a,l){var h,b;c.getObservableFromLink(t,Object(i.a)(Object(i.a)({},y),{optimisticResponse:r}),n,!1).subscribe({next:function(r){Object(o.q)(r)&&"none"===g?b=new m({graphQLErrors:r.errors}):(c.mutationStore.markMutationResult(e),"no-cache"!==v&&c.dataStore.markMutationResult({mutationId:e,result:r,document:t,variables:n,updateQueries:u(),update:f}),h=r)},error:function(t){c.mutationStore.markMutationError(e,t),c.dataStore.markMutationComplete({mutationId:e,optimisticResponse:r}),c.broadcastQueries(),c.setQuery(e,(function(){return{document:null}})),l(new m({networkError:t}))},complete:function(){if(b&&c.mutationStore.markMutationError(e,b),c.dataStore.markMutationComplete({mutationId:e,optimisticResponse:r}),c.broadcastQueries(),b)l(b);else{"function"===typeof s&&(s=s(h));var t=[];p(s)&&s.forEach((function(e){if("string"===typeof e)c.queries.forEach((function(n){var r=n.observableQuery;r&&r.queryName===e&&t.push(r.refetch())}));else{var n={query:e.query,variables:e.variables,fetchPolicy:"network-only"};e.context&&(n.context=e.context),t.push(c.query(n))}})),Promise.all(d?t:[]).then((function(){c.setQuery(e,(function(){return{document:null}})),"ignore"===g&&h&&Object(o.q)(h)&&delete h.errors,a(h)}))}}})}))]}}))}))},e.prototype.fetchQuery=function(e,t,n,r){return Object(i.b)(this,void 0,void 0,(function(){var a,u,s,c,l,d,f,h,p,v,b,y,_,w,S,O,$,x,E=this;return Object(i.d)(this,(function(T){switch(T.label){case 0:return a=t.metadata,u=void 0===a?null:a,s=t.fetchPolicy,c=void 0===s?"cache-first":s,l=t.context,d=void 0===l?{}:l,f=this.transform(t.query).document,h=this.getVariables(f,t.variables),this.transform(f).hasClientExports?[4,this.localState.addExportedVariables(f,h,d)]:[3,2];case 1:h=T.sent(),T.label=2;case 2:if(t=Object(i.a)(Object(i.a)({},t),{variables:h}),b=v="network-only"===c||"no-cache"===c,v||(y=this.dataStore.getCache().diff({query:f,variables:h,returnPartialData:!0,optimistic:!1}),_=y.complete,w=y.result,b=!_||"cache-and-network"===c,p=w),S=b&&"cache-only"!==c&&"standby"!==c,Object(o.s)(["live"],f)&&(S=!0),O=this.idCounter++,$="no-cache"!==c?this.updateQueryWatch(e,f,t):void 0,this.setQuery(e,(function(){return{document:f,lastRequestId:O,invalidated:!0,cancel:$}})),this.invalidate(r),this.queryStore.initQuery({queryId:e,document:f,storePreviousVariables:S,variables:h,isPoll:n===g.poll,isRefetch:n===g.refetch,metadata:u,fetchMoreForQueryId:r}),this.broadcastQueries(),S){if(x=this.fetchRequest({requestId:O,queryId:e,document:f,options:t,fetchMoreForQueryId:r}).catch((function(t){throw t.hasOwnProperty("graphQLErrors")?t:(O>=E.getQuery(e).lastRequestId&&(E.queryStore.markQueryError(e,t,r),E.invalidate(e),E.invalidate(r),E.broadcastQueries()),new m({networkError:t}))})),"cache-and-network"!==c)return[2,x];x.catch((function(){}))}return this.queryStore.markQueryResultClient(e,!S),this.invalidate(e),this.invalidate(r),this.transform(f).hasForcedResolvers?[2,this.localState.runResolvers({document:f,remoteResult:{data:p},context:d,variables:h,onlyRunForcedResolvers:!0}).then((function(n){return E.markQueryResult(e,n,t,r),E.broadcastQueries(),n}))]:(this.broadcastQueries(),[2,{data:p}])}}))}))},e.prototype.markQueryResult=function(e,t,n,r){var i=n.fetchPolicy,o=n.variables,a=n.errorPolicy;"no-cache"===i?this.setQuery(e,(function(){return{newData:{result:t.data,complete:!0}}})):this.dataStore.markQueryResult(t,this.getQuery(e).document,o,r,"ignore"===a||"all"===a)},e.prototype.queryListenerForObserver=function(e,t,n){var r=this;function i(e,t){if(n[e])try{n[e](t)}catch(r){}}return function(n,o){if(r.invalidate(e,!1),n){var a=r.getQuery(e),u=a.observableQuery,s=a.document,c=u?u.options.fetchPolicy:t.fetchPolicy;if("standby"!==c){var l=f(n.networkStatus),d=u&&u.getLastResult(),h=!(!d||d.networkStatus===n.networkStatus),g=t.returnPartialData||!o&&n.previousVariables||h&&t.notifyOnNetworkStatusChange||"cache-only"===c||"cache-and-network"===c;if(!l||g){var v=p(n.graphQLErrors),b=u&&u.options.errorPolicy||t.errorPolicy||"none";if("none"===b&&v||n.networkError)return i("error",new m({graphQLErrors:n.graphQLErrors,networkError:n.networkError}));try{var y=void 0,_=void 0;if(o)"no-cache"!==c&&"network-only"!==c&&r.setQuery(e,(function(){return{newData:null}})),y=o.result,_=!o.complete;else{var w=u&&u.getLastError(),S="none"!==b&&(w&&w.graphQLErrors)!==n.graphQLErrors;if(d&&d.data&&!S)y=d.data,_=!1;else{var O=r.dataStore.getCache().diff({query:s,variables:n.previousVariables||n.variables,returnPartialData:!0,optimistic:!0});y=O.result,_=!O.complete}}var $=_&&!(t.returnPartialData||"cache-only"===c),x={data:$?d&&d.data:y,loading:l,networkStatus:n.networkStatus,stale:$};"all"===b&&v&&(x.errors=n.graphQLErrors),i("next",x)}catch(E){i("error",new m({networkError:E}))}}}}}},e.prototype.transform=function(e){var t=this.transformCache;if(!t.has(e)){var n=this.dataStore.getCache(),r=n.transformDocument(e),i=Object(o.D)(n.transformForLink(r)),a=this.localState.clientQuery(r),u=this.localState.serverQuery(i),s={document:r,hasClientExports:Object(o.r)(r),hasForcedResolvers:this.localState.shouldForceResolvers(r),clientQuery:a,serverQuery:u,defaultVars:Object(o.h)(Object(o.m)(r))},c=function(e){e&&!t.has(e)&&t.set(e,s)};c(e),c(r),c(a),c(u)}return t.get(e)},e.prototype.getVariables=function(e,t){return Object(i.a)(Object(i.a)({},this.transform(e).defaultVars),t)},e.prototype.watchQuery=function(e,t){void 0===t&&(t=!0),Object(l.b)("standby"!==e.fetchPolicy,11),e.variables=this.getVariables(e.query,e.variables),"undefined"===typeof e.notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var n=Object(i.a)({},e);return new v({queryManager:this,options:n,shouldSubscribe:t})},e.prototype.query=function(e){var t=this;return Object(l.b)(e.query,12),Object(l.b)("Document"===e.query.kind,13),Object(l.b)(!e.returnPartialData,14),Object(l.b)(!e.pollInterval,15),new Promise((function(n,r){var i=t.watchQuery(e,!1);t.fetchQueryRejectFns.set("query:"+i.queryId,r),i.result().then(n,r).then((function(){return t.fetchQueryRejectFns.delete("query:"+i.queryId)}))}))},e.prototype.generateQueryId=function(){return String(this.idCounter++)},e.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(e){this.stopPollingQuery(e),this.queryStore.stopQuery(e),this.invalidate(e)},e.prototype.addQueryListener=function(e,t){this.setQuery(e,(function(e){return e.listeners.add(t),{invalidated:!1}}))},e.prototype.updateQueryWatch=function(e,t,n){var r=this,i=this.getQuery(e).cancel;i&&i();return this.dataStore.getCache().watch({query:t,variables:n.variables,optimistic:!0,previousResult:function(){var t=null,n=r.getQuery(e).observableQuery;if(n){var i=n.getLastResult();i&&(t=i.data)}return t},callback:function(t){r.setQuery(e,(function(){return{invalidated:!0,newData:t}}))}})},e.prototype.addObservableQuery=function(e,t){this.setQuery(e,(function(){return{observableQuery:t}}))},e.prototype.removeObservableQuery=function(e){var t=this.getQuery(e).cancel;this.setQuery(e,(function(){return{observableQuery:null}})),t&&t()},e.prototype.clearStore=function(){this.fetchQueryRejectFns.forEach((function(e){e(new l.a(16))}));var e=[];return this.queries.forEach((function(t,n){t.observableQuery&&e.push(n)})),this.queryStore.reset(e),this.mutationStore.reset(),this.dataStore.reset()},e.prototype.resetStore=function(){var e=this;return this.clearStore().then((function(){return e.reFetchObservableQueries()}))},e.prototype.reFetchObservableQueries=function(e){var t=this;void 0===e&&(e=!1);var n=[];return this.queries.forEach((function(r,i){var o=r.observableQuery;if(o){var a=o.options.fetchPolicy;o.resetLastResults(),"cache-only"===a||!e&&"standby"===a||n.push(o.refetch()),t.setQuery(i,(function(){return{newData:null}})),t.invalidate(i)}})),this.broadcastQueries(),Promise.all(n)},e.prototype.observeQuery=function(e,t,n){return this.addQueryListener(e,this.queryListenerForObserver(e,t,n)),this.fetchQuery(e,t)},e.prototype.startQuery=function(e,t,n){return this.addQueryListener(e,n),this.fetchQuery(e,t).catch((function(){})),e},e.prototype.startGraphQLSubscription=function(e){var t=this,n=e.query,r=e.fetchPolicy,i=e.variables;n=this.transform(n).document,i=this.getVariables(n,i);var a=function(e){return t.getObservableFromLink(n,{},e,!1).map((function(i){if(r&&"no-cache"===r||(t.dataStore.markSubscriptionResult(i,n,e),t.broadcastQueries()),Object(o.q)(i))throw new m({graphQLErrors:i.errors});return i}))};if(this.transform(n).hasClientExports){var u=this.localState.addExportedVariables(n,i).then(a);return new h((function(e){var t=null;return u.then((function(n){return t=n.subscribe(e)}),e.error),function(){return t&&t.unsubscribe()}}))}return a(i)},e.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},e.prototype.removeQuery=function(e){this.fetchQueryRejectFns.delete("query:"+e),this.fetchQueryRejectFns.delete("fetchRequest:"+e),this.getQuery(e).subscriptions.forEach((function(e){return e.unsubscribe()})),this.queries.delete(e)},e.prototype.getCurrentQueryResult=function(e,t){void 0===t&&(t=!0);var n=e.options,r=n.variables,i=n.query,o=n.fetchPolicy,a=n.returnPartialData,u=e.getLastResult(),s=this.getQuery(e.queryId).newData;if(s&&s.complete)return{data:s.result,partial:!1};if("no-cache"===o||"network-only"===o)return{data:void 0,partial:!1};var c=this.dataStore.getCache().diff({query:i,variables:r,previousResult:u?u.data:void 0,returnPartialData:!0,optimistic:t}),l=c.result,d=c.complete;return{data:d||a?l:void 0,partial:!d}},e.prototype.getQueryWithPreviousResult=function(e){var t;if("string"===typeof e){var n=this.getQuery(e).observableQuery;Object(l.b)(n,17),t=n}else t=e;var r=t.options,i=r.variables,o=r.query;return{previousResult:this.getCurrentQueryResult(t,!1).data,variables:i,document:o}},e.prototype.broadcastQueries=function(){var e=this;this.onBroadcast(),this.queries.forEach((function(t,n){t.invalidated&&t.listeners.forEach((function(r){r&&r(e.queryStore.get(n),t.newData)}))}))},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(e,t,n,r){var a,u=this;void 0===r&&(r=this.queryDeduplication);var c=this.transform(e).serverQuery;if(c){var l=this.inFlightLinkObservables,d=this.link,f={query:c,variables:n,operationName:Object(o.n)(c)||void 0,context:this.prepareContext(Object(i.a)(Object(i.a)({},t),{forceFetch:!r}))};if(t=f.context,r){var p=l.get(c)||new Map;l.set(c,p);var g=JSON.stringify(n);if(!(a=p.get(g))){p.set(g,a=$(Object(s.execute)(d,f)));var m=function(){p.delete(g),p.size||l.delete(c),v.unsubscribe()},v=a.subscribe({next:m,error:m,complete:m})}}else a=$(Object(s.execute)(d,f))}else a=h.of({data:{}}),t=this.prepareContext(t);var b=this.transform(e).clientQuery;return b&&(a=function(e,t){return new h((function(n){var r=n.next,i=n.error,o=n.complete,a=0,u=!1,s={next:function(e){++a,new Promise((function(n){n(t(e))})).then((function(e){--a,r&&r.call(n,e),u&&s.complete()}),(function(e){--a,i&&i.call(n,e)}))},error:function(e){i&&i.call(n,e)},complete:function(){u=!0,a||o&&o.call(n)}},c=e.subscribe(s);return function(){return c.unsubscribe()}}))}(a,(function(e){return u.localState.runResolvers({document:b,remoteResult:e,context:t,variables:n})}))),a},e.prototype.fetchRequest=function(e){var t,n,i=this,o=e.requestId,a=e.queryId,u=e.document,s=e.options,c=e.fetchMoreForQueryId,l=s.variables,d=s.errorPolicy,f=void 0===d?"none":d,h=s.fetchPolicy;return new Promise((function(e,d){var g=i.getObservableFromLink(u,s.context,l),v="fetchRequest:"+a;i.fetchQueryRejectFns.set(v,d);var b=function(){i.fetchQueryRejectFns.delete(v),i.setQuery(a,(function(e){e.subscriptions.delete(y)}))},y=g.map((function(e){if(o>=i.getQuery(a).lastRequestId&&(i.markQueryResult(a,e,s,c),i.queryStore.markQueryResult(a,e,c),i.invalidate(a),i.invalidate(c),i.broadcastQueries()),"none"===f&&p(e.errors))return d(new m({graphQLErrors:e.errors}));if("all"===f&&(n=e.errors),c||"no-cache"===h)t=e.data;else{var r=i.dataStore.getCache().diff({variables:l,query:u,optimistic:!1,returnPartialData:!0}),g=r.result;(r.complete||s.returnPartialData)&&(t=g)}})).subscribe({error:function(e){b(),d(e)},complete:function(){b(),e({data:t,errors:n,loading:!1,networkStatus:r.ready,stale:!1})}});i.setQuery(a,(function(e){e.subscriptions.add(y)}))}))},e.prototype.getQuery=function(e){return this.queries.get(e)||{listeners:new Set,invalidated:!1,document:null,newData:null,lastRequestId:1,observableQuery:null,subscriptions:new Set}},e.prototype.setQuery=function(e,t){var n=this.getQuery(e),r=Object(i.a)(Object(i.a)({},n),t(n));this.queries.set(e,r)},e.prototype.invalidate=function(e,t){void 0===t&&(t=!0),e&&this.setQuery(e,(function(){return{invalidated:t}}))},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return Object(i.a)(Object(i.a)({},t),{clientAwareness:this.clientAwareness})},e.prototype.checkInFlight=function(e){var t=this.queryStore.get(e);return t&&t.networkStatus!==r.ready&&t.networkStatus!==r.error},e.prototype.startPollingQuery=function(e,t,n){var r=this,o=e.pollInterval;if(Object(l.b)(o,18),!this.ssrMode){var a=this.pollingInfoByQueryId.get(t);a||this.pollingInfoByQueryId.set(t,a={}),a.interval=o,a.options=Object(i.a)(Object(i.a)({},e),{fetchPolicy:"network-only"});var u=function(){var e=r.pollingInfoByQueryId.get(t);e&&(r.checkInFlight(t)?s():r.fetchQuery(t,e.options,g.poll).then(s,s))},s=function(){var e=r.pollingInfoByQueryId.get(t);e&&(clearTimeout(e.timeout),e.timeout=setTimeout(u,e.interval))};n&&this.addQueryListener(t,n),s()}return t},e.prototype.stopPollingQuery=function(e){this.pollingInfoByQueryId.delete(e)},e}(),T=function(){function e(e){this.cache=e}return e.prototype.getCache=function(){return this.cache},e.prototype.markQueryResult=function(e,t,n,r,i){void 0===i&&(i=!1);var a=!Object(o.q)(e);i&&Object(o.q)(e)&&e.data&&(a=!0),!r&&a&&this.cache.write({result:e.data,dataId:"ROOT_QUERY",query:t,variables:n})},e.prototype.markSubscriptionResult=function(e,t,n){Object(o.q)(e)||this.cache.write({result:e.data,dataId:"ROOT_SUBSCRIPTION",query:t,variables:n})},e.prototype.markMutationInit=function(e){var t,n=this;e.optimisticResponse&&(t="function"===typeof e.optimisticResponse?e.optimisticResponse(e.variables):e.optimisticResponse,this.cache.recordOptimisticTransaction((function(r){var i=n.cache;n.cache=r;try{n.markMutationResult({mutationId:e.mutationId,result:{data:t},document:e.document,variables:e.variables,updateQueries:e.updateQueries,update:e.update})}finally{n.cache=i}}),e.mutationId))},e.prototype.markMutationResult=function(e){var t=this;if(!Object(o.q)(e.result)){var n=[{result:e.result.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}],r=e.updateQueries;r&&Object.keys(r).forEach((function(i){var a=r[i],u=a.query,s=a.updater,c=t.cache.diff({query:u.document,variables:u.variables,returnPartialData:!0,optimistic:!1}),l=c.result;if(c.complete){var d=Object(o.I)((function(){return s(l,{mutationResult:e.result,queryName:Object(o.n)(u.document)||void 0,queryVariables:u.variables})}));d&&n.push({result:d,dataId:"ROOT_QUERY",query:u.document,variables:u.variables})}})),this.cache.performTransaction((function(t){n.forEach((function(e){return t.write(e)}));var r=e.update;r&&Object(o.I)((function(){return r(t,e.result)}))}))}},e.prototype.markMutationComplete=function(e){var t=e.mutationId;e.optimisticResponse&&this.cache.removeOptimistic(t)},e.prototype.markUpdateQueryResult=function(e,t,n){this.cache.write({result:n,dataId:"ROOT_QUERY",variables:t,query:e})},e.prototype.reset=function(){return this.cache.reset()},e}(),C=function(){function e(e){var t=this;this.defaultOptions={},this.resetStoreCallbacks=[],this.clearStoreCallbacks=[];var n=e.cache,r=e.ssrMode,i=void 0!==r&&r,o=e.ssrForceFetchDelay,a=void 0===o?0:o,u=e.connectToDevTools,c=e.queryDeduplication,d=void 0===c||c,f=e.defaultOptions,h=e.assumeImmutableResults,p=void 0!==h&&h,g=e.resolvers,m=e.typeDefs,v=e.fragmentMatcher,b=e.name,y=e.version,_=e.link;if(!_&&g&&(_=s.ApolloLink.empty()),!_||!n)throw new l.a(4);this.link=_,this.cache=n,this.store=new T(n),this.disableNetworkFetches=i||a>0,this.queryDeduplication=d,this.defaultOptions=f||{},this.typeDefs=m,a&&setTimeout((function(){return t.disableNetworkFetches=!1}),a),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this);"undefined"!==typeof u&&(u&&"undefined"!==typeof window)&&(window.__APOLLO_CLIENT__=this),this.version="2.6.10",this.localState=new O({cache:n,client:this,resolvers:g,fragmentMatcher:v}),this.queryManager=new E({link:this.link,store:this.store,queryDeduplication:d,ssrMode:i,clientAwareness:{name:b,version:y},localState:this.localState,assumeImmutableResults:p,onBroadcast:function(){t.devToolsHookCb&&t.devToolsHookCb({action:{},state:{queries:t.queryManager.queryStore.getStore(),mutations:t.queryManager.mutationStore.getStore()},dataWithOptimisticResults:t.cache.extract(!0)})}})}return e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=Object(i.a)(Object(i.a)({},this.defaultOptions.watchQuery),e)),!this.disableNetworkFetches||"network-only"!==e.fetchPolicy&&"cache-and-network"!==e.fetchPolicy||(e=Object(i.a)(Object(i.a)({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=Object(i.a)(Object(i.a)({},this.defaultOptions.query),e)),Object(l.b)("cache-and-network"!==e.fetchPolicy,5),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=Object(i.a)(Object(i.a)({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=Object(i.a)(Object(i.a)({},this.defaultOptions.mutate),e)),this.queryManager.mutate(e)},e.prototype.subscribe=function(e){return this.queryManager.startGraphQLSubscription(e)},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.cache.readQuery(e,t)},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.cache.readFragment(e,t)},e.prototype.writeQuery=function(e){var t=this.cache.writeQuery(e);return this.queryManager.broadcastQueries(),t},e.prototype.writeFragment=function(e){var t=this.cache.writeFragment(e);return this.queryManager.broadcastQueries(),t},e.prototype.writeData=function(e){var t=this.cache.writeData(e);return this.queryManager.broadcastQueries(),t},e.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},e.prototype.__requestRaw=function(e){return Object(s.execute)(this.link,e)},e.prototype.initQueryManager=function(){return this.queryManager},e.prototype.resetStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore()})).then((function(){return Promise.all(e.resetStoreCallbacks.map((function(e){return e()})))})).then((function(){return e.reFetchObservableQueries()}))},e.prototype.clearStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore()})).then((function(){return Promise.all(e.clearStoreCallbacks.map((function(e){return e()})))}))},e.prototype.onResetStore=function(e){var t=this;return this.resetStoreCallbacks.push(e),function(){t.resetStoreCallbacks=t.resetStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.onClearStore=function(e){var t=this;return this.clearStoreCallbacks.push(e),function(){t.clearStoreCallbacks=t.clearStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},e.prototype.extract=function(e){return this.cache.extract(e)},e.prototype.restore=function(e){return this.cache.restore(e)},e.prototype.addResolvers=function(e){this.localState.addResolvers(e)},e.prototype.setResolvers=function(e){this.localState.setResolvers(e)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(257),i=n(29),o=n(256),a=n(22);function u(e,t){Object(a.a)(2,arguments);var n=Object(i.a)(t);return Object(o.a)(e,-n)}function s(e,t){if(Object(a.a)(2,arguments),!t||"object"!==typeof t)return new Date(NaN);var n=t.years?Object(i.a)(t.years):0,o=t.months?Object(i.a)(t.months):0,s=t.weeks?Object(i.a)(t.weeks):0,c=t.days?Object(i.a)(t.days):0,l=t.hours?Object(i.a)(t.hours):0,d=t.minutes?Object(i.a)(t.minutes):0,f=t.seconds?Object(i.a)(t.seconds):0,h=u(e,o+12*n),p=Object(r.a)(h,c+7*s),g=d+60*l,m=f+60*g,v=1e3*m,b=new Date(p.getTime()-v);return b}},function(e,t,n){var r=n(523),i=n(526);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){(function(t){var r=n(368),i=new(0,n(631).ec)("secp256k1"),o=n(652),a=t.alloc(32,0),u=t.from("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141","hex"),s=t.from("fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f","hex"),c=i.curve.n,l=c.shrn(1),d=i.curve.g,f="Expected Private",h="Expected Point",p="Expected Tweak",g="Expected Hash";function m(e){return t.isBuffer(e)&&32===e.length}function v(e){return!!m(e)&&e.compare(u)<0}function b(e){if(!t.isBuffer(e))return!1;if(e.length<33)return!1;var n=e[0],r=e.slice(1,33);if(0===r.compare(a))return!1;if(r.compare(s)>=0)return!1;if((2===n||3===n)&&33===e.length){try{$(e)}catch(o){return!1}return!0}var i=e.slice(33);return 0!==i.compare(a)&&(!(i.compare(s)>=0)&&(4===n&&65===e.length))}function y(e){return 4!==e[0]}function _(e){return!!m(e)&&(e.compare(a)>0&&e.compare(u)<0)}function w(e,t){return void 0===e&&void 0!==t?y(t):void 0===e||e}function S(e){return new r(e)}function O(e){return e.toArrayLike(t,"be",32)}function $(e){return i.curve.decodePoint(e)}function x(e,n){return t.from(e._encode(n))}function E(e,n,r){if(!m(e))throw new TypeError(g);if(!_(n))throw new TypeError(f);if(void 0!==r&&!m(r))throw new TypeError("Expected Extra Data (32 bytes)");var i,a,u=S(n),s=S(e);o(e,n,(function(e){var t=S(e),n=d.mul(t);return!n.isInfinity()&&(0!==(i=n.x.umod(c)).isZero()&&0!==(a=t.invm(c).mul(s.add(u.mul(i))).umod(c)).isZero())}),_,r),a.cmp(l)>0&&(a=c.sub(a));var h=t.allocUnsafe(64);return O(i).copy(h,0),O(a).copy(h,32),h}e.exports={isPoint:b,isPointCompressed:function(e){return!!b(e)&&y(e)},isPrivate:_,pointAdd:function(e,t,n){if(!b(e))throw new TypeError(h);if(!b(t))throw new TypeError(h);var r=$(e),i=$(t),o=r.add(i);return o.isInfinity()?null:x(o,w(n,e))},pointAddScalar:function(e,t,n){if(!b(e))throw new TypeError(h);if(!v(t))throw new TypeError(p);var r=w(n,e),i=$(e);if(0===t.compare(a))return x(i,r);var o=S(t),u=d.mul(o),s=i.add(u);return s.isInfinity()?null:x(s,r)},pointCompress:function(e,t){if(!b(e))throw new TypeError(h);var n=$(e);if(n.isInfinity())throw new TypeError(h);return x(n,w(t,e))},pointFromScalar:function(e,t){if(!_(e))throw new TypeError(f);var n=S(e),r=d.mul(n);return r.isInfinity()?null:x(r,w(t))},pointMultiply:function(e,t,n){if(!b(e))throw new TypeError(h);if(!v(t))throw new TypeError(p);var r=w(n,e),i=$(e),o=S(t),a=i.mul(o);return a.isInfinity()?null:x(a,r)},privateAdd:function(e,t){if(!_(e))throw new TypeError(f);if(!v(t))throw new TypeError(p);var n=S(e),r=S(t),i=O(n.add(r).umod(c));return _(i)?i:null},privateSub:function(e,t){if(!_(e))throw new TypeError(f);if(!v(t))throw new TypeError(p);var n=S(e),r=S(t),i=O(n.sub(r).umod(c));return _(i)?i:null},sign:function(e,t){return E(e,t)},signWithEntropy:function(e,t,n){return E(e,t,n)},verify:function(e,n,r,i){if(!m(e))throw new TypeError(g);if(!b(n))throw new TypeError(h);if(!function(e){var n=e.slice(0,32),r=e.slice(32,64);return t.isBuffer(e)&&64===e.length&&n.compare(u)<0&&r.compare(u)<0}(r))throw new TypeError("Expected Signature");var o=$(n),a=S(r.slice(0,32)),s=S(r.slice(32,64));if(i&&s.cmp(l)>0)return!1;if(a.gtn(0)<=0)return!1;if(s.gtn(0)<=0)return!1;var f=S(e),p=s.invm(c),v=f.mul(p).umod(c),y=a.mul(p).umod(c),_=d.mulAdd(v,o,y);return!_.isInfinity()&&_.x.umod(c).eq(a)}}}).call(this,n(59).Buffer)},function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=n,n.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}},function(e,t,n){"use strict";var r=n(227),i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=d;var o=Object.create(n(205));o.inherits=n(54);var a=n(376),u=n(304);o.inherits(d,a);for(var s=i(u.prototype),c=0;c1&&void 0!==arguments[1]&&arguments[1];return e&&(r(e.value)&&""!==e.value||t&&r(e.defaultValue)&&""!==e.defaultValue)}function o(e){return e.startAdornment}n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";function r(e){return"[object Function]"===Object.prototype.toString.call(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(22);function i(e){return Object(r.a)(1,arguments),e instanceof Date||"object"===typeof e&&"[object Date]"===Object.prototype.toString.call(e)}var o=n(25);function a(e){if(Object(r.a)(1,arguments),!i(e)&&"number"!==typeof e)return!1;var t=Object(o.a)(e);return!isNaN(Number(t))}},function(e,t,n){"use strict";var r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i="object"===("undefined"===typeof window?"undefined":r(window))&&"object"===("undefined"===typeof document?"undefined":r(document))&&9===document.nodeType;t.a=i},function(e,t,n){var r=n(775);e.exports=function(e,t){if(null==e)return{};var n,i,o=r(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}},,function(e,t,n){var r,i,o;!function(a){"use strict";"object"===typeof e.exports?e.exports=a():null!=n(131)?(i=[],void 0===(o="function"===typeof(r=a)?r.apply(t,i):r)||(e.exports=o)):self.sanctuaryTypeIdentifiers=a()}((function(){"use strict";var e="@@type",t=new RegExp("^([\\s\\S]+)/([\\s\\S]+?)(?:@([0-9]+))?$");function n(t){return null!=t&&null!=t.constructor&&t.constructor.prototype!==t&&"string"===typeof t.constructor[e]?t.constructor[e]:Object.prototype.toString.call(t).slice("[object ".length,-"]".length)}return n.parse=function(e){var n=t.exec(e);return{namespace:null==n||null==n[1]?null:n[1],name:null==n?e:n[2],version:null==n||null==n[3]?0:Number(n[3])}},n}))},function(e,t,n){"use strict";var r={};function i(e,t,n){n||(n=Error);var i=function(e){var n,r;function i(n,r,i){return e.call(this,function(e,n,r){return"string"===typeof t?t:t(e,n,r)}(n,r,i))||this}return r=e,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,i}(n);i.prototype.name=n.name,i.prototype.code=e,r[e]=i}function o(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}i("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(e,t,n){var r,i,a,u;if("string"===typeof t&&(i="not ",t.substr(!a||a<0?0:+a,i.length)===i)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))u="The ".concat(e," ").concat(r," ").concat(o(t,"type"));else{var s=function(e,t,n){return"number"!==typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument";u='The "'.concat(e,'" ').concat(s," ").concat(r," ").concat(o(t,"type"))}return u+=". Received type ".concat(typeof n)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=r},function(e,t,n){"use strict";(function(t){var r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=c;var i=n(384),o=n(388);n(54)(c,i);for(var a=r(o.prototype),u=0;u=this._finalSize&&(this._update(this._block),this._block.fill(0));var n=8*this._len;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var r=(4294967295&n)>>>0,i=(n-r)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},function(e,t,n){"use strict";var r=n(308),i=n(685);e.exports=i((function(e){var t=r("sha256").update(e).digest();return r("sha256").update(t).digest()}))},function(e,t,n){!function(t,r){var i;e.exports=(i=n(45),function(){var e=i,t=e.lib.WordArray;function n(e,n,r){for(var i=[],o=0,a=0;a>>6-a%4*2;i[o>>>2]|=(u|s)<<24-o%4*8,o++}return t.create(i,o)}e.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp();for(var i=[],o=0;o>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,u=0;u<4&&o+.75*u>>6*(3-u)&63));var s=r.charAt(64);if(s)for(;i.length%4;)i.push(s);return i.join("")},parse:function(e){var t=e.length,r=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var o=0;o>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,a=e[t+0],s=e[t+1],h=e[t+2],p=e[t+3],g=e[t+4],m=e[t+5],v=e[t+6],b=e[t+7],y=e[t+8],_=e[t+9],w=e[t+10],S=e[t+11],O=e[t+12],$=e[t+13],x=e[t+14],E=e[t+15],T=o[0],C=o[1],N=o[2],A=o[3];T=c(T,C,N,A,a,7,u[0]),A=c(A,T,C,N,s,12,u[1]),N=c(N,A,T,C,h,17,u[2]),C=c(C,N,A,T,p,22,u[3]),T=c(T,C,N,A,g,7,u[4]),A=c(A,T,C,N,m,12,u[5]),N=c(N,A,T,C,v,17,u[6]),C=c(C,N,A,T,b,22,u[7]),T=c(T,C,N,A,y,7,u[8]),A=c(A,T,C,N,_,12,u[9]),N=c(N,A,T,C,w,17,u[10]),C=c(C,N,A,T,S,22,u[11]),T=c(T,C,N,A,O,7,u[12]),A=c(A,T,C,N,$,12,u[13]),N=c(N,A,T,C,x,17,u[14]),T=l(T,C=c(C,N,A,T,E,22,u[15]),N,A,s,5,u[16]),A=l(A,T,C,N,v,9,u[17]),N=l(N,A,T,C,S,14,u[18]),C=l(C,N,A,T,a,20,u[19]),T=l(T,C,N,A,m,5,u[20]),A=l(A,T,C,N,w,9,u[21]),N=l(N,A,T,C,E,14,u[22]),C=l(C,N,A,T,g,20,u[23]),T=l(T,C,N,A,_,5,u[24]),A=l(A,T,C,N,x,9,u[25]),N=l(N,A,T,C,p,14,u[26]),C=l(C,N,A,T,y,20,u[27]),T=l(T,C,N,A,$,5,u[28]),A=l(A,T,C,N,h,9,u[29]),N=l(N,A,T,C,b,14,u[30]),T=d(T,C=l(C,N,A,T,O,20,u[31]),N,A,m,4,u[32]),A=d(A,T,C,N,y,11,u[33]),N=d(N,A,T,C,S,16,u[34]),C=d(C,N,A,T,x,23,u[35]),T=d(T,C,N,A,s,4,u[36]),A=d(A,T,C,N,g,11,u[37]),N=d(N,A,T,C,b,16,u[38]),C=d(C,N,A,T,w,23,u[39]),T=d(T,C,N,A,$,4,u[40]),A=d(A,T,C,N,a,11,u[41]),N=d(N,A,T,C,p,16,u[42]),C=d(C,N,A,T,v,23,u[43]),T=d(T,C,N,A,_,4,u[44]),A=d(A,T,C,N,O,11,u[45]),N=d(N,A,T,C,E,16,u[46]),T=f(T,C=d(C,N,A,T,h,23,u[47]),N,A,a,6,u[48]),A=f(A,T,C,N,b,10,u[49]),N=f(N,A,T,C,x,15,u[50]),C=f(C,N,A,T,m,21,u[51]),T=f(T,C,N,A,O,6,u[52]),A=f(A,T,C,N,p,10,u[53]),N=f(N,A,T,C,w,15,u[54]),C=f(C,N,A,T,s,21,u[55]),T=f(T,C,N,A,y,6,u[56]),A=f(A,T,C,N,E,10,u[57]),N=f(N,A,T,C,v,15,u[58]),C=f(C,N,A,T,$,21,u[59]),T=f(T,C,N,A,g,6,u[60]),A=f(A,T,C,N,S,10,u[61]),N=f(N,A,T,C,h,15,u[62]),C=f(C,N,A,T,_,21,u[63]),o[0]=o[0]+T|0,o[1]=o[1]+C|0,o[2]=o[2]+N|0,o[3]=o[3]+A|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;n[i>>>5]|=128<<24-i%32;var o=e.floor(r/4294967296),a=r;n[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),t.sigBytes=4*(n.length+1),this._process();for(var u=this._hash,s=u.words,c=0;c<4;c++){var l=s[c];s[c]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return u},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,n,r,i,o,a){var u=e+(t&n|~t&r)+i+a;return(u<>>32-o)+t}function l(e,t,n,r,i,o,a){var u=e+(t&r|n&~r)+i+a;return(u<>>32-o)+t}function d(e,t,n,r,i,o,a){var u=e+(t^n^r)+i+a;return(u<>>32-o)+t}function f(e,t,n,r,i,o,a){var u=e+(n^(t|~r))+i+a;return(u<>>32-o)+t}t.MD5=o._createHelper(s),t.HmacMD5=o._createHmacHelper(s)}(Math),i.MD5)}()},function(e,t,n){"use strict";var r=n(55),i=n(16),o=n(321),a=n(4),u=["xs","sm","md","lg","xl"];function s(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,r=e.unit,o=void 0===r?"px":r,s=e.step,c=void 0===s?5:s,l=Object(i.a)(e,["values","unit","step"]);function d(e){var t="number"===typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(o,")")}function f(e,t){var r=u.indexOf(t);return r===u.length-1?d(e):"@media (min-width:".concat("number"===typeof n[e]?n[e]:e).concat(o,") and ")+"(max-width:".concat((-1!==r&&"number"===typeof n[u[r+1]]?n[u[r+1]]:t)-c/100).concat(o,")")}return Object(a.a)({keys:u,values:n,up:d,down:function(e){var t=u.indexOf(e)+1,r=n[u[t]];return t===u.length?d("xs"):"@media (max-width:".concat(("number"===typeof r&&t>0?r:e)-c/100).concat(o,")")},between:f,only:function(e){return f(e,e)},width:function(e){return n[e]}},l)}function c(e,t,n){var i;return Object(a.a)({gutters:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(a.a)({paddingLeft:t(2),paddingRight:t(2)},n,Object(r.a)({},e.up("sm"),Object(a.a)({paddingLeft:t(3),paddingRight:t(3)},n[e.up("sm")])))},toolbar:(i={minHeight:56},Object(r.a)(i,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),Object(r.a)(i,e.up("sm"),{minHeight:64}),i)},n)}var l=n(235),d={black:"#000",white:"#fff"},f={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"},h={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"},p={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"},g={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},m={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},v={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},b={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},y=n(34),_={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:d.white,default:f[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},w={text:{primary:d.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:f[800],default:"#303030"},action:{active:d.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function S(e,t,n,r){var i=r.light||r,o=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=Object(y.i)(e.main,i):"dark"===t&&(e.dark=Object(y.a)(e.main,o)))}function O(e){var t=e.primary,n=void 0===t?{light:h[300],main:h[500],dark:h[700]}:t,r=e.secondary,u=void 0===r?{light:p.A200,main:p.A400,dark:p.A700}:r,s=e.error,c=void 0===s?{light:g[300],main:g[500],dark:g[700]}:s,O=e.warning,$=void 0===O?{light:m[300],main:m[500],dark:m[700]}:O,x=e.info,E=void 0===x?{light:v[300],main:v[500],dark:v[700]}:x,T=e.success,C=void 0===T?{light:b[300],main:b[500],dark:b[700]}:T,N=e.type,A=void 0===N?"light":N,M=e.contrastThreshold,k=void 0===M?3:M,P=e.tonalOffset,I=void 0===P?.2:P,R=Object(i.a)(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function j(e){return Object(y.e)(e,w.text.primary)>=k?w.text.primary:_.text.primary}var D=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;if(!(e=Object(a.a)({},e)).main&&e[t]&&(e.main=e[t]),!e.main)throw new Error(Object(l.a)(4,t));if("string"!==typeof e.main)throw new Error(Object(l.a)(5,JSON.stringify(e.main)));return S(e,"light",n,I),S(e,"dark",r,I),e.contrastText||(e.contrastText=j(e.main)),e},L={dark:w,light:_};return Object(o.a)(Object(a.a)({common:d,type:A,primary:D(n),secondary:D(u,"A400","A200","A700"),error:D(c),warning:D($),info:D(E),success:D(C),grey:f,contrastThreshold:k,getContrastText:j,augmentColor:D,tonalOffset:I},L[A]),R)}function $(e){return Math.round(1e5*e)/1e5}var x={textTransform:"uppercase"},E='"Roboto", "Helvetica", "Arial", sans-serif';function T(e,t){var n="function"===typeof t?t(e):t,r=n.fontFamily,u=void 0===r?E:r,s=n.fontSize,c=void 0===s?14:s,l=n.fontWeightLight,d=void 0===l?300:l,f=n.fontWeightRegular,h=void 0===f?400:f,p=n.fontWeightMedium,g=void 0===p?500:p,m=n.fontWeightBold,v=void 0===m?700:m,b=n.htmlFontSize,y=void 0===b?16:b,_=n.allVariants,w=n.pxToRem,S=Object(i.a)(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]);var O=c/14,T=w||function(e){return"".concat(e/y*O,"rem")},C=function(e,t,n,r,i){return Object(a.a)({fontFamily:u,fontWeight:e,fontSize:T(t),lineHeight:n},u===E?{letterSpacing:"".concat($(r/t),"em")}:{},i,_)},N={h1:C(d,96,1.167,-1.5),h2:C(d,60,1.2,-.5),h3:C(h,48,1.167,0),h4:C(h,34,1.235,.25),h5:C(h,24,1.334,0),h6:C(g,20,1.6,.15),subtitle1:C(h,16,1.75,.15),subtitle2:C(g,14,1.57,.1),body1:C(h,16,1.5,.15),body2:C(h,14,1.43,.15),button:C(g,14,1.75,.4,x),caption:C(h,12,1.66,.4),overline:C(h,12,2.66,1,x)};return Object(o.a)(Object(a.a)({htmlFontSize:y,pxToRem:T,round:$,fontFamily:u,fontSize:c,fontWeightLight:d,fontWeightRegular:h,fontWeightMedium:g,fontWeightBold:v},N),S,{clone:!1})}function C(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}var N=["none",C(0,2,1,-1,0,1,1,0,0,1,3,0),C(0,3,1,-2,0,2,2,0,0,1,5,0),C(0,3,3,-2,0,3,4,0,0,1,8,0),C(0,2,4,-1,0,4,5,0,0,1,10,0),C(0,3,5,-1,0,5,8,0,0,1,14,0),C(0,3,5,-1,0,6,10,0,0,1,18,0),C(0,4,5,-2,0,7,10,1,0,2,16,1),C(0,5,5,-3,0,8,10,1,0,3,14,2),C(0,5,6,-3,0,9,12,1,0,3,16,2),C(0,6,6,-3,0,10,14,1,0,4,18,3),C(0,6,7,-4,0,11,15,1,0,4,20,3),C(0,7,8,-4,0,12,17,2,0,5,22,4),C(0,7,8,-4,0,13,19,2,0,5,24,4),C(0,7,9,-4,0,14,21,2,0,5,26,4),C(0,8,9,-5,0,15,22,2,0,6,28,5),C(0,8,10,-5,0,16,24,2,0,6,30,5),C(0,8,11,-5,0,17,26,2,0,6,32,5),C(0,9,11,-5,0,18,28,2,0,7,34,6),C(0,9,12,-6,0,19,29,2,0,7,36,6),C(0,10,13,-6,0,20,31,3,0,8,38,7),C(0,10,13,-6,0,21,33,3,0,8,40,7),C(0,10,14,-6,0,22,35,3,0,8,42,7),C(0,11,14,-7,0,23,36,3,0,9,44,8),C(0,11,15,-7,0,24,38,3,0,9,46,8)],A={borderRadius:4},M=n(961);function k(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;var t=Object(M.a)({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,r=e.mixins,a=void 0===r?{}:r,u=e.palette,l=void 0===u?{}:u,d=e.spacing,f=e.typography,h=void 0===f?{}:f,p=Object(i.a)(e,["breakpoints","mixins","palette","spacing","typography"]),g=O(l),m=s(n),v=k(d),b=Object(o.a)({breakpoints:m,direction:"ltr",mixins:c(m,v,a),overrides:{},palette:g,props:{},shadows:N,typography:T(g,h),spacing:v,shape:A,transitions:P.a,zIndex:I.a},p),y=arguments.length,_=new Array(y>1?y-1:0),w=1;w0&&(e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1)))))}));t.a=a},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(138),i=n(52);function o(e,t,n){return function(){for(var a=[],u=0,s=e,c=0;c=arguments.length)?l=t[c]:(l=arguments[u],u+=1),a[c]=l,Object(i.a)(l)||(s-=1),c+=1}return s<=0?n.apply(this,a):Object(r.a)(s,o(e,a,n))}}},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(57);t.a="function"===typeof Object.assign?Object.assign:function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1,i=arguments.length;n1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,i=new Array(r),o=0;o=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var h=new Date(0);h.setUTCFullYear(u+1,0,f),h.setUTCHours(0,0,0,0);var p=Object(o.a)(h,t),g=new Date(0);g.setUTCFullYear(u,0,f),g.setUTCHours(0,0,0,0);var m=Object(o.a)(g,t);return n.getTime()>=p.getTime()?u+1:n.getTime()>=m.getTime()?u:u-1}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(25),i=n(22);function o(e,t){Object(i.a)(2,arguments);var n=Object(r.a)(e),o=Object(r.a)(t),a=n.getFullYear()-o.getFullYear(),u=n.getMonth()-o.getMonth();return 12*a+u}var a=n(111),u=n(259);function s(e){Object(i.a)(1,arguments);var t=Object(r.a)(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function c(e){Object(i.a)(1,arguments);var t=Object(r.a)(e);return Object(u.a)(t).getTime()===s(t).getTime()}function l(e,t){Object(i.a)(2,arguments);var n,u=Object(r.a)(e),s=Object(r.a)(t),l=Object(a.a)(u,s),d=Math.abs(o(u,s));if(d<1)n=0;else{1===u.getMonth()&&u.getDate()>27&&u.setDate(30),u.setMonth(u.getMonth()-l*d);var f=Object(a.a)(u,s)===-l;c(Object(r.a)(e))&&1===d&&1===Object(a.a)(e,s)&&(f=!1),n=l*(d-Number(f))}return 0===n?0:n}},function(e,t,n){"use strict";var r=n(17),i=n(277),o=Object(r.a)((function(e,t){return Object(i.a)((n=e,function(){return!n.apply(this,arguments)}),t);var n}));t.a=o},function(e,t,n){"use strict";function r(e,t){var n=function(e){if(!o[e]){var t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),n="06/25/2014, 00:00:00"===t||"\u200e06\u200e/\u200e25\u200e/\u200e2014\u200e \u200e00\u200e:\u200e00\u200e:\u200e00"===t;o[e]=n?new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}return o[e]}(t);return n.formatToParts?function(e,t){for(var n=e.formatToParts(t),r=[],o=0;o=0&&(r[a]=parseInt(n[o].value,10))}return r}(n,e):function(e,t){var n=e.format(t).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[r[3],r[1],r[2],r[4],r[5],r[6]]}(n,e)}n.d(t,"a",(function(){return s}));var i={year:0,month:1,day:2,hour:3,minute:4,second:5};var o={};var a=36e5,u={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-])(\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function s(e,t,n){var r,i,o;if(r=u.timezoneZ.exec(e))return 0;if(r=u.timezoneHH.exec(e))return l(o=parseInt(r[2],10))?(i=o*a,"+"===r[1]?-i:i):NaN;if(r=u.timezoneHHMM.exec(e)){o=parseInt(r[2],10);var s=parseInt(r[3],10);return l(o,s)?(i=o*a+6e4*s,"+"===r[1]?-i:i):NaN}if(function(e){try{return Intl.DateTimeFormat(void 0,{timeZone:e}),!0}catch(t){return!1}}(e)){t=new Date(t||Date.now());var d=c(n?t:function(e){return new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()))}(t),e);return-(n?d:function(e,t,n){var r=e.getTime()-t,i=c(new Date(r),n);if(t===i)return t;r-=i-t;var o=c(new Date(r),n);if(i===o)return i;return Math.max(i,o)}(t,d,e))}return 0}function c(e,t){var n=r(e,t),i=Date.UTC(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5]),o=e.getTime(),a=o%1e3;return i-(o-=a>=0?a:1e3+a)}function l(e,t){return null==t||!(t<0||t>59)}},function(e,t,n){"use strict";function r(e,t,n){for(var r=0,i=n.length;r":d(n,r)},r=function(e,t){return Object(o.a)((function(t){return a(t)+": "+n(e[t])}),t.slice().sort())};switch(Object.prototype.toString.call(e)){case"[object Arguments]":return"(function() { return arguments; }("+Object(o.a)(n,e).join(", ")+"))";case"[object Array]":return"["+Object(o.a)(n,e).concat(r(e,Object(l.a)((function(e){return/^\d+$/.test(e)}),Object(c.a)(e)))).join(", ")+"]";case"[object Boolean]":return"object"===typeof e?"new Boolean("+n(e.valueOf())+")":e.toString();case"[object Date]":return"new Date("+(isNaN(e.valueOf())?n(NaN):a(s(e)))+")";case"[object Null]":return"null";case"[object Number]":return"object"===typeof e?"new Number("+n(e.valueOf())+")":1/e===-1/0?"-0":e.toString(10);case"[object String]":return"object"===typeof e?"new String("+n(e.valueOf())+")":a(e);case"[object Undefined]":return"undefined";default:if("function"===typeof e.toString){var u=e.toString();if("[object Object]"!==u)return u}return"{"+r(e,Object(c.a)(e)).join(", ")+"}"}}var f=Object(r.a)((function(e){return d(e,[])}));t.a=f},function(e,t,n){var r=n(218),i=n(515),o=n(516),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):o(e)}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){var r=n(541);e.exports=function(e){return null==e?"":r(e)}},function(e,t,n){"use strict";var r=n(154);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=o.default.memo(o.default.forwardRef((function(t,n){return o.default.createElement(a.default,(0,i.default)({ref:n},t),e)})));0;return n.muiName=a.default.muiName,n};var i=r(n(76)),o=r(n(1)),a=r(n(362))},function(e,t,n){"use strict";var r=n(116),i=n(156);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=o,o.prototype.update=function(e,t){if(e=r.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-n,this.endian);for(var i=0;i>>24&255,r[i++]=e>>>16&255,r[i++]=e>>>8&255,r[i++]=255&e}else for(r[i++]=255&e,r[i++]=e>>>8&255,r[i++]=e>>>16&255,r[i++]=e>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,o=8;o0&&a.length>i&&!a.warned){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=a.length,u=s,console&&console.warn&&console.warn(u)}return e}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=f.bind(r);return i.listener=n,r.wrapFn=i,i}function p(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"===typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(a=t[0]),a instanceof Error)throw a;var u=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw u.context=a,u}var s=i[e];if(void 0===s)return!1;if("function"===typeof s)o(s,this,t);else{var c=s.length,l=m(s,c);for(n=0;n=0;o--)if(n[o]===t||n[o].listener===t){a=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},u.prototype.listeners=function(e){return p(this,e,!0)},u.prototype.rawListeners=function(e){return p(this,e,!1)},u.listenerCount=function(e,t){return"function"===typeof e.listenerCount?e.listenerCount(t):g.call(e,t)},u.prototype.listenerCount=g,u.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){(function(e){function n(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===n(e)},t.isBoolean=function(e){return"boolean"===typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"===typeof e},t.isString=function(e){return"string"===typeof e},t.isSymbol=function(e){return"symbol"===typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===n(e)},t.isObject=function(e){return"object"===typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===n(e)},t.isError=function(e){return"[object Error]"===n(e)||e instanceof Error},t.isFunction=function(e){return"function"===typeof e},t.isPrimitive=function(e){return null===e||"boolean"===typeof e||"number"===typeof e||"string"===typeof e||"symbol"===typeof e||"undefined"===typeof e},t.isBuffer=e.isBuffer}).call(this,n(59).Buffer)},function(e,t,n){"use strict";var r=n(53).Buffer,i=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!==typeof t&&(r.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=s,this.end=c,t=4;break;case"utf8":this.fillLast=u,t=4;break;case"base64":this.text=l,this.end=d,t=3;break;default:return this.write=f,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function a(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function u(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!==(192&t[0]))return e.lastNeed=0,"\ufffd";if(e.lastNeed>1&&t.length>1){if(128!==(192&t[1]))return e.lastNeed=1,"\ufffd";if(e.lastNeed>2&&t.length>2&&128!==(192&t[2]))return e.lastNeed=2,"\ufffd"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function s(e,t){if((e.length-t)%2===0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function l(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function f(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}t.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0)return i>0&&(e.lastNeed=i-1),i;if(--r=0)return i>0&&(e.lastNeed=i-2),i;if(--r=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,n){"use strict";var r=n(154);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(1)),o=(0,r(n(202)).default)(i.default.createElement("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext");t.default=o},function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:.15;return c(e)>.5?l(e,t):d(e,t)},t.fade=function(e,t){e=u(e),t=i(t),("rgb"===e.type||"hsl"===e.type)&&(e.type+="a");return e.values[3]=t,s(e)},t.darken=l,t.lighten=d;var r=n(37);function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),n)}function o(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}function a(e){var t=(e=u(e)).values,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return i-o*Math.max(Math.min(t-3,9-t,1),-1)},c="rgb",l=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(c+="a",l.push(t[3])),s({type:c,values:l})}function u(e){if(e.type)return e;if("#"===e.charAt(0))return u(o(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error((0,r.formatMuiErrorMessage)(3,e));var i=e.substring(t+1,e.length-1).split(",");return{type:n,values:i=i.map((function(e){return parseFloat(e)}))}}function s(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function c(e){var t="hsl"===(e=u(e)).type?u(a(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function l(e,t){if(e=u(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return s(e)}function d(e,t){if(e=u(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return s(e)}},function(e,t,n){"use strict";function r(e){return"[object Number]"===Object.prototype.toString.call(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(47),i=n(182);var o=n(245);function a(e,t,n){return(a=Object(o.a)()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&Object(i.a)(o,n.prototype),o}).apply(null,arguments)}function u(e){var t="function"===typeof Map?new Map:void 0;return(u=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,o)}function o(){return a(e,arguments,Object(r.a)(this).constructor)}return o.prototype=Object.create(e.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),Object(i.a)(o,e)})(e)}},,,function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,n){var r=n(130).Symbol;e.exports=r},function(e,t,n){var r=n(153)(Object,"create");e.exports=r},function(e,t,n){var r=n(531),i=n(532),o=n(533),a=n(534),u=n(535);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return e}})),s=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),p(n)?r.showHidden=n:n&&t._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=s),l(r,e,r.depth)}function s(e,t){var n=u.styles[t];return n?"\x1b["+u.colors[n][0]+"m"+e+"\x1b["+u.colors[n][1]+"m":e}function c(e,t){return e}function l(e,n,r){if(e.customInspect&&n&&O(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,e);return v(i)||(i=l(e,i,r)),i}var o=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(v(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(m(t))return e.stylize(""+t,"number");if(p(t))return e.stylize(""+t,"boolean");if(g(t))return e.stylize("null","null")}(e,n);if(o)return o;var a=Object.keys(n),u=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(n)),S(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return d(n);if(0===a.length){if(O(n)){var s=n.name?": "+n.name:"";return e.stylize("[Function"+s+"]","special")}if(y(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(w(n))return e.stylize(Date.prototype.toString.call(n),"date");if(S(n))return d(n)}var c,_="",$=!1,x=["{","}"];(h(n)&&($=!0,x=["[","]"]),O(n))&&(_=" [Function"+(n.name?": "+n.name:"")+"]");return y(n)&&(_=" "+RegExp.prototype.toString.call(n)),w(n)&&(_=" "+Date.prototype.toUTCString.call(n)),S(n)&&(_=" "+d(n)),0!==a.length||$&&0!=n.length?r<0?y(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),c=$?function(e,t,n,r,i){for(var o=[],a=0,u=t.length;a=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1];return n[0]+t+" "+e.join(", ")+" "+n[1]}(c,_,x)):x[0]+_+x[1]}function d(e){return"["+Error.prototype.toString.call(e)+"]"}function f(e,t,n,r,i,o){var a,u,s;if((s=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?u=s.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):s.set&&(u=e.stylize("[Setter]","special")),C(r,i)||(a="["+i+"]"),u||(e.seen.indexOf(s.value)<0?(u=g(n)?l(e,s.value,null):l(e,s.value,n-1)).indexOf("\n")>-1&&(u=o?u.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+u.split("\n").map((function(e){return" "+e})).join("\n")):u=e.stylize("[Circular]","special")),b(a)){if(o&&i.match(/^\d+$/))return u;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+u}function h(e){return Array.isArray(e)}function p(e){return"boolean"===typeof e}function g(e){return null===e}function m(e){return"number"===typeof e}function v(e){return"string"===typeof e}function b(e){return void 0===e}function y(e){return _(e)&&"[object RegExp]"===$(e)}function _(e){return"object"===typeof e&&null!==e}function w(e){return _(e)&&"[object Date]"===$(e)}function S(e){return _(e)&&("[object Error]"===$(e)||e instanceof Error)}function O(e){return"function"===typeof e}function $(e){return Object.prototype.toString.call(e)}function x(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(n){if(b(o)&&(o=Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_TYPE_CHECK_SANCTUARY:"false",REACT_APP_BUILD_TARGET:"LAMASSU"}).NODE_DEBUG||""),n=n.toUpperCase(),!a[n])if(new RegExp("\\b"+n+"\\b","i").test(o)){var r=e.pid;a[n]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",n,r,e)}}else a[n]=function(){};return a[n]},t.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=h,t.isBoolean=p,t.isNull=g,t.isNullOrUndefined=function(e){return null==e},t.isNumber=m,t.isString=v,t.isSymbol=function(e){return"symbol"===typeof e},t.isUndefined=b,t.isRegExp=y,t.isObject=_,t.isDate=w,t.isError=S,t.isFunction=O,t.isPrimitive=function(e){return null===e||"boolean"===typeof e||"number"===typeof e||"string"===typeof e||"symbol"===typeof e||"undefined"===typeof e},t.isBuffer=n(614);var E=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function T(){var e=new Date,t=[x(e.getHours()),x(e.getMinutes()),x(e.getSeconds())].join(":");return[e.getDate(),E[e.getMonth()],t].join(" ")}function C(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",T(),t.format.apply(t,arguments))},t.inherits=n(615),t._extend=function(e,t){if(!t||!_(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e};var N="undefined"!==typeof Symbol?Symbol("util.promisify.custom"):void 0;function A(e,t){if(!e){var n=new Error("Promise was rejected with a falsy value");n.reason=e,e=n}return t(e)}t.promisify=function(e){if("function"!==typeof e)throw new TypeError('The "original" argument must be of type Function');if(N&&e[N]){var t;if("function"!==typeof(t=e[N]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,N,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,n,r=new Promise((function(e,r){t=e,n=r})),i=[],o=0;o0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function c(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=s,s.prototype.point=function(){throw new Error("Not implemented")},s.prototype.validate=function(){throw new Error("Not implemented")},s.prototype._fixedNafMul=function(e,t){u(e.precomputed);var n=e._getDoubles(),r=o(t,1,this._bitLength),i=(1<=a;l--)s=(s<<1)+r[l];c.push(s)}for(var d=this.jpoint(null,null,null),f=this.jpoint(null,null,null),h=i;h>0;h--){for(a=0;a=0;c--){for(var l=0;c>=0&&0===a[c];c--)l++;if(c>=0&&l++,s=s.dblp(l),c<0)break;var d=a[c];u(0!==d),s="affine"===e.type?d>0?s.mixedAdd(i[d-1>>1]):s.mixedAdd(i[-d-1>>1].neg()):d>0?s.add(i[d-1>>1]):s.add(i[-d-1>>1].neg())}return"affine"===e.type?s.toP():s},s.prototype._wnafMulAdd=function(e,t,n,r,i){var u,s,c,l=this._wnafT1,d=this._wnafT2,f=this._wnafT3,h=0;for(u=0;u=1;u-=2){var g=u-1,m=u;if(1===l[g]&&1===l[m]){var v=[t[g],null,null,t[m]];0===t[g].y.cmp(t[m].y)?(v[1]=t[g].add(t[m]),v[2]=t[g].toJ().mixedAdd(t[m].neg())):0===t[g].y.cmp(t[m].y.redNeg())?(v[1]=t[g].toJ().mixedAdd(t[m]),v[2]=t[g].add(t[m].neg())):(v[1]=t[g].toJ().mixedAdd(t[m]),v[2]=t[g].toJ().mixedAdd(t[m].neg()));var b=[-3,-1,-5,-7,0,7,5,1,3],y=a(n[g],n[m]);for(h=Math.max(y[0].length,h),f[g]=new Array(h),f[m]=new Array(h),s=0;s=0;u--){for(var $=0;u>=0;){var x=!0;for(s=0;s=0&&$++,S=S.dblp($),u<0)break;for(s=0;s0?c=d[s][E-1>>1]:E<0&&(c=d[s][-E-1>>1].neg()),S="affine"===c.type?S.mixedAdd(c):S.add(c))}}for(u=0;u=Math.ceil((e.bitLength()+1)/t.step)},c.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,i=0;i1&&void 0!==arguments[1]?arguments[1]:{},s=o.name,f=Object(i.a)(o,["name"]),h=s,p="function"===typeof t?function(e){return{root:function(n){return t(Object(r.a)({theme:e},n))}}}:{root:t},g=Object(l.a)(p,Object(r.a)({Component:e,name:s||e.displayName,classNamePrefix:h},f));t.filterProps&&(n=t.filterProps,delete t.filterProps),t.propTypes&&(t.propTypes,delete t.propTypes);var m=a.a.forwardRef((function(t,o){var s=t.children,c=t.className,l=t.clone,f=t.component,h=Object(i.a)(t,["children","className","clone","component"]),p=g(t),m=Object(u.a)(p.root,c),v=h;if(n&&(v=d(v,n)),l)return a.a.cloneElement(s,Object(r.a)({className:Object(u.a)(s.props.className,m)},v));if("function"===typeof s)return s(Object(r.a)({className:m},v));var b=f||e;return a.a.createElement(b,Object(r.a)({ref:o,className:m},v),s)}));return c()(m,e),m}}(e);return function(e,n){return t(e,Object(r.a)({defaultTheme:f.a},n))}}},function(e,t,n){"use strict";var r=n(1),i=n.n(r).a.createContext(null);t.a=i},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(209);function i(e,t){if(e){if("string"===typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){"use strict";var r="function"===typeof Symbol&&Symbol.for;t.a=r?Symbol.for("mui.nested"):"__THEME_NESTED__"},function(e,t,n){"use strict";function r(e){for(var t="https://material-ui.com/production-error/?code="+e,n=1;n2)return"[Array]";for(var n=Math.min(10,e.length),r=e.length-n,i=[],o=0;o1&&i.push("... ".concat(r," more items"));return"["+i.join(", ")+"]"}(e,n);return function(e,t){var n=Object.keys(e);if(0===n.length)return"{}";if(t.length>2)return"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"===typeof e.constructor){var n=e.constructor.name;if("string"===typeof n&&""!==n)return n}return t}(e)+"]";return"{ "+n.map((function(n){return n+": "+a(e[n],t)})).join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}},function(e,t,n){"use strict";function r(e){var t=e.split(/\r\n|[\n\r]/g),n=function(e){for(var t=null,n=1;n0&&o(t[0]);)t.shift();for(;t.length>0&&o(t[t.length-1]);)t.pop();return t.join("\n")}function i(e){for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=-1===e.indexOf("\n"),i=" "===e[0]||"\t"===e[0],o='"'===e[e.length-1],a=!r||o||n,u="";return!a||r&&i||(u+="\n"+t),u+=t?e.replace(/\n/g,"\n"+t):e,a&&(u+="\n"),'"""'+u.replace(/"""/g,'\\"""')+'"""'}n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return a}))},function(e,t,n){"use strict";var r=n(57),i=Object.prototype.toString,o=function(){return"[object Arguments]"===i.call(arguments)?function(e){return"[object Arguments]"===i.call(e)}:function(e){return Object(r.a)("callee",e)}}();t.a=o},function(e,t,n){"use strict";function r(e){return"[object Object]"===Object.prototype.toString.call(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){for(var n=0,r=t.length,i=[];n=c?s:(n.setFullYear(s.getFullYear(),s.getMonth(),u),n)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(29),i=n(258),o=n(22);function a(e,t){Object(o.a)(2,arguments);var n=Object(r.a)(t);return Object(i.a)(e,-n)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(29),i=n(25),o=n(22);function a(e,t){Object(o.a)(2,arguments);var n=Object(i.a)(e),a=Object(r.a)(t);return isNaN(a)?new Date(NaN):a?(n.setDate(n.getDate()+a),n):n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(25),i=n(22);function o(e){Object(i.a)(1,arguments);var t=Object(r.a)(e);return t.setHours(23,59,59,999),t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(188),i=n(22),o=n(189);function a(e,t,n){Object(i.a)(2,arguments);var a=Object(r.a)(e,t)/1e3;return Object(o.a)(null===n||void 0===n?void 0:n.roundingMethod)(a)}},function(e,t,n){"use strict";function r(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}}function i(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}}var o={p:i,P:function(e,t){var n,o=e.match(/(P+)(p+)?/),a=o[1],u=o[2];if(!u)return r(e,t);switch(a){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;case"PPPP":default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",r(a,t)).replace("{{time}}",i(u,t))}};t.a=o},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(25),i=n(125),o=n(22);function a(e){Object(o.a)(1,arguments);var t=Object(r.a)(e),n=t.getUTCFullYear(),a=new Date(0);a.setUTCFullYear(n+1,0,4),a.setUTCHours(0,0,0,0);var u=Object(i.a)(a),s=new Date(0);s.setUTCFullYear(n,0,4),s.setUTCHours(0,0,0,0);var c=Object(i.a)(s);return t.getTime()>=u.getTime()?n+1:t.getTime()>=c.getTime()?n:n-1}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(264);function i(e){return Object(r.a)({},e)}},function(e,t,n){"use strict";function r(e,t){if(null==e)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t=t||{})Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(29),i=n(98),o=n(193),a=36e5,u={dateTimeDelimeter:/[T ]/,plainTime:/:/,timeZoneDelimeter:/[Z ]/i,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timezone:/([Z+-].*| UTC|(?:[a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?))$/};function s(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(null===e)return new Date(NaN);var n=t||{},a=null==n.additionalDigits?2:Object(r.a)(n.additionalDigits);if(2!==a&&1!==a&&0!==a)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||"object"===typeof e&&"[object Date]"===Object.prototype.toString.call(e))return new Date(e.getTime());if("number"===typeof e||"[object Number]"===Object.prototype.toString.call(e))return new Date(e);if("string"!==typeof e&&"[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);var u=c(e),s=l(u.date,a),h=s.year,p=s.restDateString,g=d(p,h);if(isNaN(g))return new Date(NaN);if(g){var m,v=g.getTime(),b=0;if(u.time&&(b=f(u.time),isNaN(b)))return new Date(NaN);if(u.timezone||n.timeZone){if(m=Object(o.a)(u.timezone||n.timeZone,new Date(v+b)),isNaN(m))return new Date(NaN)}else m=Object(i.a)(new Date(v+b)),m=Object(i.a)(new Date(v+b+m));return new Date(v+b+m)}return new Date(NaN)}function c(e){var t,n={},r=e.split(u.dateTimeDelimeter);if(u.plainTime.test(r[0])?(n.date=null,t=r[0]):(n.date=r[0],t=r[1],n.timezone=r[2],u.timeZoneDelimeter.test(n.date)&&(n.date=e.split(u.timeZoneDelimeter)[0],t=e.substr(n.date.length,e.length))),t){var i=u.timezone.exec(t);i?(n.time=t.replace(i[1],""),n.timezone=i[1]):n.time=t}return n}function l(e,t){var n,r=u.YYY[t],i=u.YYYYY[t];if(n=u.YYYY.exec(e)||i.exec(e)){var o=n[1];return{year:parseInt(o,10),restDateString:e.slice(o.length)}}if(n=u.YY.exec(e)||r.exec(e)){var a=n[1];return{year:100*parseInt(a,10),restDateString:e.slice(a.length)}}return{year:null}}function d(e,t){if(null===t)return null;var n,r,i,o;if(0===e.length)return(r=new Date(0)).setUTCFullYear(t),r;if(n=u.MM.exec(e))return r=new Date(0),v(t,i=parseInt(n[1],10)-1)?(r.setUTCFullYear(t,i),r):new Date(NaN);if(n=u.DDD.exec(e)){r=new Date(0);var a=parseInt(n[1],10);return function(e,t){if(t<1)return!1;var n=m(e);if(n&&t>366)return!1;if(!n&&t>365)return!1;return!0}(t,a)?(r.setUTCFullYear(t,0,a),r):new Date(NaN)}if(n=u.MMDD.exec(e)){r=new Date(0),i=parseInt(n[1],10)-1;var s=parseInt(n[2],10);return v(t,i,s)?(r.setUTCFullYear(t,i,s),r):new Date(NaN)}if(n=u.Www.exec(e))return b(t,o=parseInt(n[1],10)-1)?h(t,o):new Date(NaN);if(n=u.WwwD.exec(e)){o=parseInt(n[1],10)-1;var c=parseInt(n[2],10)-1;return b(t,o,c)?h(t,o,c):new Date(NaN)}return null}function f(e){var t,n,r;if(t=u.HH.exec(e))return y(n=parseFloat(t[1].replace(",",".")))?n%24*a:NaN;if(t=u.HHMM.exec(e))return y(n=parseInt(t[1],10),r=parseFloat(t[2].replace(",",".")))?n%24*a+6e4*r:NaN;if(t=u.HHMMSS.exec(e)){n=parseInt(t[1],10),r=parseInt(t[2],10);var i=parseFloat(t[3].replace(",","."));return y(n,r,i)?n%24*a+6e4*r+1e3*i:NaN}return null}function h(e,t,n){t=t||0,n=n||0;var r=new Date(0);r.setUTCFullYear(e,0,4);var i=7*t+n+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+i),r}var p=[31,28,31,30,31,30,31,31,30,31,30,31],g=[31,29,31,30,31,30,31,31,30,31,30,31];function m(e){return e%400===0||e%4===0&&e%100!==0}function v(e,t,n){if(t<0||t>11)return!1;if(null!=n){if(n<1)return!1;var r=m(e);if(r&&n>g[t])return!1;if(!r&&n>p[t])return!1}return!0}function b(e,t,n){return!(t<0||t>52)&&(null==n||!(n<0||n>6))}function y(e,t,n){return(null==e||!(e<0||e>=25))&&((null==t||!(t<0||t>=60))&&(null==n||!(n<0||n>=60)))}},function(e,t,n){"use strict";var r=n(1),i=r.createContext();t.a=i},function(e,t,n){(function(r){var i,o,a;!function(r){"use strict";"object"===typeof e.exports?e.exports=r(n(363),n(225),n(364),n(365),n(114),n(115),n(169)):null!=n(131)?(o=[n(363),n(225),n(364),n(365),n(114),n(115),n(169)],void 0===(a="function"===typeof(i=r)?i.apply(t,o):i)||(e.exports=a)):self.sanctuary=r(self.sanctuaryDef,self.sanctuaryEither,self.sanctuaryMaybe,self.sanctuaryPair,self.sanctuaryShow,self.sanctuaryTypeClasses,self.sanctuaryTypeIdentifiers)}((function(e,t,i,o,a,u,s){"use strict";if("undefined"!==typeof __doctest){__doctest.require("sanctuary-descending"),__doctest.require("./test/internal/List").Nil,__doctest.require("./test/internal/List").Cons;var c=__doctest.require("./test/internal/Sum");(function(t){var n=t.create({checkTypes:!0,env:t.env.concat([__doctest.require("./test/internal/List").Type(e.Unknown),c.Type])});n.env=t.env})(n(267))}var l=t.Left,d=t.Right,f=i.Nothing,h=i.Just;function p(e){return function(t){return function(n){return e(t(n))}}}function g(e){return function(t){return function(n){return e(n)(t)}}}function m(e){return p((function(t){return e in t?h(t[e]):f}))(y)}function v(e){return function(t){return t[e]()}}function b(e){return function(t){return function(n){return n[e](t)}}}function y(e){return null==e?Object.create(null):Object(e)}var _=e.TypeVariable("a"),w=e.TypeVariable("b"),S=e.TypeVariable("c"),O=e.TypeVariable("d"),$=e.TypeVariable("e"),x=e.TypeVariable("g"),E=e.TypeVariable("r"),T=e.UnaryTypeVariable("f"),C=e.UnaryTypeVariable("m"),N=e.UnaryTypeVariable("t"),A=e.UnaryTypeVariable("w"),M=e.BinaryTypeVariable("p"),k=e.BinaryTypeVariable("s"),P=e.UnaryType("TypeRep")("https://github.com/fantasyland/fantasy-land#type-representatives")([])((function(t){return e.test([])(e.AnyFunction)(t)||null!=t&&e.test([])(e.String)(t["@@type"])}))(V([])),I=e.RecordType({checkTypes:e.Boolean,env:e.Array(e.Any)}),R={};function j(n){var r=e.create(n),o={env:n.env,is:r("is")({})([e.Type,e.Any,e.Boolean])(e.test(n.env)),Maybe:i,Nothing:f,Either:t};return Object.keys(R).forEach((function(e){o[e]=r(e)(R[e].consts)(R[e].types)(R[e].impl)})),o.unchecked=n.checkTypes?j({checkTypes:!1,env:n.env}):o,o}function D(e){return function(t){return u.equals(e,t)}}function L(e){return function(t){return u.gt(t,e)}}function F(e){return function(t){return u.filter(e,t)}}function U(e){return function(t){return u.reject(e,t)}}function B(e){return function(t){return u.map(e,t)}}function z(e){return function(t){return function(n){return u.reduce((function(t,n){return e(t)(n)}),t,n)}}}function H(e){return e}function V(e){return function(t){return e}}function W(e){return function(t){return t(e)}}function G(e){return function(t){return function(n){return e(t,n)}}}function q(e){return function(t){return function(n){return function(r){return e(t,n,r)}}}}function Y(e){return function(t){return function(n){return function(r){return function(i){return e(t,n,r,i)}}}}}function K(e){return function(t){return e(t.fst)(t.snd)}}function Q(e){return e.isJust}function Z(e){return function(t){return function(n){return n.isJust?t(n.value):e}}}function X(e){return function(t){return function(n){return n.isJust?t(n.value):e()}}}function J(e){return B(he("value"))(F(Q)(e))}function ee(e){return e.isLeft}function te(e){return e.isRight}function ne(e){return function(t){return function(n){return(n.isLeft?e:t)(n.value)}}}function re(e){return function(t){try{return d(e(t))}catch(n){return l(n)}}}function ie(e){return e.isLeft?f:h(e.value)}function oe(e){return!e}function ae(e){return function(t){return function(n){return function(r){return(e(r)?t:n)(r)}}}}function ue(e,t){return function(n){return function(r){if(n<0)return f;if(Array.isArray(r))return n<=r.length?h(e(n,r)):f;var i=u.reduce((function(e,n){return u.map((function(e){var r=e.fst,i=e.snd;return o(r-1)(t(r,i,n))}),e)}),h(o(n)(u.empty(r.constructor))),r);return u.map(o.snd,u.reject(p(L(0))(o.fst),i))}}}R.create={consts:{},types:[I,e.Object],impl:j},R.type={consts:{},types:[e.Any,e.RecordType({namespace:e.Maybe(e.String),name:e.String,version:e.NonNegativeInteger})],impl:function(e){var t=s.parse(s(e));return t.namespace=u.reject(D(null),h(t.namespace)),t}},R.show={consts:{},types:[e.Any,e.String],impl:a},R.equals={consts:{a:[u.Setoid]},types:[_,_,e.Boolean],impl:D},R.lt={consts:{a:[u.Ord]},types:[_,_,e.Boolean],impl:function(e){return function(t){return u.lt(t,e)}}},R.lte={consts:{a:[u.Ord]},types:[_,_,e.Boolean],impl:function(e){return function(t){return u.lte(t,e)}}},R.gt={consts:{a:[u.Ord]},types:[_,_,e.Boolean],impl:L},R.gte={consts:{a:[u.Ord]},types:[_,_,e.Boolean],impl:function(e){return function(t){return u.gte(t,e)}}},R.min={consts:{a:[u.Ord]},types:[_,_,_],impl:G(u.min)},R.max={consts:{a:[u.Ord]},types:[_,_,_],impl:G(u.max)},R.clamp={consts:{a:[u.Ord]},types:[_,_,_,_],impl:q(u.clamp)},R.id={consts:{c:[u.Category]},types:[P(S),S],impl:u.id},R.concat={consts:{a:[u.Semigroup]},types:[_,_,_],impl:G(u.concat)},R.empty={consts:{a:[u.Monoid]},types:[P(_),_],impl:u.empty},R.invert={consts:{g:[u.Group]},types:[x,x],impl:u.invert},R.filter={consts:{f:[u.Filterable]},types:[e.Predicate(_),T(_),T(_)],impl:F},R.reject={consts:{f:[u.Filterable]},types:[e.Predicate(_),T(_),T(_)],impl:U},R.map={consts:{f:[u.Functor]},types:[e.Fn(_)(w),T(_),T(w)],impl:B},R.flip={consts:{f:[u.Functor]},types:[T(e.Fn(_)(w)),_,T(w)],impl:G(u.flip)},R.bimap={consts:{p:[u.Bifunctor]},types:[e.Fn(_)(w),e.Fn(S)(O),M(_)(S),M(w)(O)],impl:q(u.bimap)},R.mapLeft={consts:{p:[u.Bifunctor]},types:[e.Fn(_)(w),M(_)(S),M(w)(S)],impl:G(u.mapLeft)},R.promap={consts:{p:[u.Profunctor]},types:[e.Fn(_)(w),e.Fn(S)(O),M(w)(S),M(_)(O)],impl:q(u.promap)},R.alt={consts:{f:[u.Alt]},types:[T(_),T(_),T(_)],impl:function(e){return function(t){return u.alt(t,e)}}},R.zero={consts:{f:[u.Plus]},types:[P(T(_)),T(_)],impl:u.zero},R.reduce={consts:{f:[u.Foldable]},types:[e.Fn(_)(e.Fn(w)(_)),_,T(w),_],impl:z},R.traverse={consts:{f:[u.Applicative],t:[u.Traversable]},types:[P(T(w)),e.Fn(_)(T(w)),N(_),T(N(w))],impl:q(u.traverse)},R.sequence={consts:{f:[u.Applicative],t:[u.Traversable]},types:[P(T(_)),N(T(_)),T(N(_))],impl:G(u.sequence)},R.ap={consts:{f:[u.Apply]},types:[T(e.Fn(_)(w)),T(_),T(w)],impl:G(u.ap)},R.lift2={consts:{f:[u.Apply]},types:[e.Fn(_)(e.Fn(w)(S)),T(_),T(w),T(S)],impl:q(u.lift2)},R.lift3={consts:{f:[u.Apply]},types:[e.Fn(_)(e.Fn(w)(e.Fn(S)(O))),T(_),T(w),T(S),T(O)],impl:Y(u.lift3)},R.apFirst={consts:{f:[u.Apply]},types:[T(_),T(w),T(_)],impl:G(u.apFirst)},R.apSecond={consts:{f:[u.Apply]},types:[T(_),T(w),T(w)],impl:G(u.apSecond)},R.of={consts:{f:[u.Applicative]},types:[P(T(_)),_,T(_)],impl:function(e){return function(t){return u.of(e,t)}}},R.chain={consts:{m:[u.Chain]},types:[e.Fn(_)(C(w)),C(_),C(w)],impl:G(u.chain)},R.join={consts:{m:[u.Chain]},types:[C(C(_)),C(_)],impl:u.join},R.chainRec={consts:{m:[u.ChainRec]},types:[P(C(w)),e.Fn(_)(C(e.Either(_)(w))),_,C(w)],impl:function(e){return function(t){return function(t){return u.chainRec(e,n,t)};function n(e,n,r){return u.map(ne(e)(n),t(r))}}}},R.extend={consts:{w:[u.Extend]},types:[e.Fn(A(_))(w),A(_),A(w)],impl:G(u.extend)},R.duplicate={consts:{w:[u.Extend]},types:[A(_),A(A(_))],impl:u.duplicate},R.extract={consts:{w:[u.Comonad]},types:[A(_),_],impl:u.extract},R.contramap={consts:{f:[u.Contravariant]},types:[e.Fn(w)(_),T(_),T(w)],impl:G(u.contramap)},R.I={consts:{},types:[_,_],impl:H},R.K={consts:{},types:[_,w,_],impl:V},R.T={consts:{},types:[_,e.Fn(_)(w),w],impl:W},R.curry2={consts:{},types:[e.Function([_,w,S]),_,w,S],impl:G},R.curry3={consts:{},types:[e.Function([_,w,S,O]),_,w,S,O],impl:q},R.curry4={consts:{},types:[e.Function([_,w,S,O,$]),_,w,S,O,$],impl:Y},R.curry5={consts:{},types:[e.Function([_,w,S,O,$,E]),_,w,S,O,$,E],impl:function(e){return function(t){return function(n){return function(r){return function(i){return function(o){return e(t,n,r,i,o)}}}}}}},R.compose={consts:{s:[u.Semigroupoid]},types:[k(w)(S),k(_)(w),k(_)(S)],impl:G(u.compose)},R.pipe={consts:{f:[u.Foldable]},types:[T(e.Fn(e.Any)(e.Any)),_,w],impl:function(e){return function(t){return z(W)(t)(e)}}},R.pipeK={consts:{f:[u.Foldable],m:[u.Chain]},types:[T(e.Fn(e.Any)(C(e.Any))),C(_),C(w)],impl:function(e){return function(t){return u.reduce((function(e,t){return u.chain(t,e)}),t,e)}}},R.on={consts:{},types:[e.Fn(w)(e.Fn(w)(S)),e.Fn(_)(w),_,_,S],impl:function(e){return function(t){return function(n){return function(r){return e(t(n))(t(r))}}}}},R.Pair={consts:{},types:[_,w,e.Pair(_)(w)],impl:o},R.pair={consts:{},types:[e.Fn(_)(e.Fn(w)(S)),e.Pair(_)(w),S],impl:K},R.fst={consts:{},types:[e.Pair(_)(w),_],impl:K(V)},R.snd={consts:{},types:[e.Pair(_)(w),w],impl:K(g(V))},R.swap={consts:{},types:[e.Pair(_)(w),e.Pair(w)(_)],impl:K(g(o))},R.Just={consts:{},types:[_,e.Maybe(_)],impl:h},R.isNothing={consts:{},types:[e.Maybe(_),e.Boolean],impl:function(e){return e.isNothing}},R.isJust={consts:{},types:[e.Maybe(_),e.Boolean],impl:Q},R.fromMaybe={consts:{},types:[_,e.Maybe(_),_],impl:g(Z)(H)},R.fromMaybe_={consts:{},types:[e.Thunk(_),e.Maybe(_),_],impl:g(X)(H)},R.maybeToNullable={consts:{},types:[e.Maybe(_),e.Nullable(_)],impl:function(e){return e.isJust?e.value:null}},R.maybe={consts:{},types:[w,e.Fn(_)(w),e.Maybe(_),w],impl:Z},R.maybe_={consts:{},types:[e.Thunk(w),e.Fn(_)(w),e.Maybe(_),w],impl:X},R.justs={consts:{f:[u.Filterable,u.Functor]},types:[T(e.Maybe(_)),T(_)],impl:J},R.mapMaybe={consts:{f:[u.Filterable,u.Functor]},types:[e.Fn(_)(e.Maybe(w)),T(_),T(w)],impl:p(p(J))(B)},R.maybeToEither={consts:{},types:[_,e.Maybe(w),e.Either(_)(w)],impl:function(e){return Z(l(e))(d)}},R.Left={consts:{},types:[_,e.Either(_)(w)],impl:l},R.Right={consts:{},types:[w,e.Either(_)(w)],impl:d},R.isLeft={consts:{},types:[e.Either(_)(w),e.Boolean],impl:ee},R.isRight={consts:{},types:[e.Either(_)(w),e.Boolean],impl:te},R.fromEither={consts:{},types:[w,e.Either(_)(w),w],impl:function(e){return ne(V(e))(H)}},R.either={consts:{},types:[e.Fn(_)(S),e.Fn(w)(S),e.Either(_)(w),S],impl:ne},R.lefts={consts:{f:[u.Filterable,u.Functor]},types:[T(e.Either(_)(w)),T(_)],impl:p(B(he("value")))(F(ee))},R.rights={consts:{f:[u.Filterable,u.Functor]},types:[T(e.Either(_)(w)),T(w)],impl:p(B(he("value")))(F(te))},R.tagBy={consts:{},types:[e.Predicate(_),_,e.Either(_)(_)],impl:function(e){return ae(e)(d)(l)}},R.encase={consts:{},types:[e.Fn(_)(w),_,e.Either(e.Error)(w)],impl:re},R.eitherToMaybe={consts:{},types:[e.Either(_)(w),e.Maybe(w)],impl:ie},R.and={consts:{},types:[e.Boolean,e.Boolean,e.Boolean],impl:function(e){return function(t){return e&&t}}},R.or={consts:{},types:[e.Boolean,e.Boolean,e.Boolean],impl:function(e){return function(t){return e||t}}},R.not={consts:{},types:[e.Boolean,e.Boolean],impl:oe},R.complement={consts:{},types:[e.Predicate(_),_,e.Boolean],impl:p(oe)},R.boolean={consts:{},types:[_,_,e.Boolean,_],impl:function(e){return function(t){return function(n){return n?t:e}}}},R.ifElse={consts:{},types:[e.Predicate(_),e.Fn(_)(w),e.Fn(_)(w),_,w],impl:ae},R.when={consts:{},types:[e.Predicate(_),e.Fn(_)(_),_,_],impl:function(e){return g(ae(e))(H)}},R.unless={consts:{},types:[e.Predicate(_),e.Fn(_)(_),_,_],impl:function(e){return ae(e)(H)}},R.array={consts:{},types:[w,e.Fn(_)(e.Fn(e.Array(_))(w)),e.Array(_),w],impl:function(e){return function(t){return function(n){return 0===n.length?e:t(n[0])(n.slice(1))}}}},R.head={consts:{f:[u.Foldable]},types:[T(_),e.Maybe(_)],impl:function(e){return Array.isArray(e)?e.length>0?h(e[0]):f:u.reduce((function(e,t){return e.isJust?e:h(t)}),f,e)}},R.last={consts:{f:[u.Foldable]},types:[T(_),e.Maybe(_)],impl:function(e){return Array.isArray(e)?e.length>0?h(e[e.length-1]):f:u.reduce((function(e,t){return h(t)}),f,e)}},R.tail={consts:{f:[u.Applicative,u.Foldable,u.Monoid]},types:[T(_),e.Maybe(T(_))],impl:function(e){if(Array.isArray(e))return e.length>0?h(e.slice(1)):f;var t=u.empty(e.constructor);return u.reduce((function(e,n){return h(Z(t)(le(n))(e))}),f,e)}},R.init={consts:{f:[u.Applicative,u.Foldable,u.Monoid]},types:[T(_),e.Maybe(T(_))],impl:function(e){if(Array.isArray(e))return e.length>0?h(e.slice(0,-1)):f;var t=u.empty(e.constructor);return u.map(o.snd,u.reduce((function(e,n){return h(o(n)(Z(t)(K(le))(e)))}),f,e))}};var se=ue((function(e,t){return t.slice(0,e)}),(function(e,t,n){return e>0?u.append(n,t):t}));R.take={consts:{f:[u.Applicative,u.Foldable,u.Monoid]},types:[e.Integer,T(_),e.Maybe(T(_))],impl:se};var ce=ue((function(e,t){return t.slice(e)}),(function(e,t,n){return e>0?t:u.append(n,t)}));function le(e){return function(t){return u.append(e,t)}}function de(e){return function(t){for(var n=[],r=e(t);r.isJust;r=e(r.value.snd))n.push(r.value.fst);return n}}function fe(e){return function(t){return function(n){for(var r=[],i=Math.min(t.length,n.length),o=0;o0?h(t.total/t.count):f}},R.even={consts:{},types:[e.Integer,e.Boolean],impl:function(e){return e%2===0}},R.odd={consts:{},types:[e.Integer,e.Boolean],impl:function(e){return e%2!==0}},R.parseDate={consts:{},types:[e.String,e.Maybe(e.ValidDate)],impl:function(e){var t=new Date(e);return isNaN(t.valueOf())?f:h(t)}};var be,ye=new RegExp("^\\s*[+-]?"+ve(["Infinity","NaN",ve(["[0-9]+","[0-9]+[.][0-9]+","[0-9]+[.]","[.][0-9]+"])+(be=["[Ee][+-]?[0-9]+"],ve(be)+"?")])+"\\s*$");R.parseFloat={consts:{},types:[e.String,e.Maybe(e.Number)],impl:function(e){return ye.test(e)?h(parseFloat(e)):f}};var _e=e.NullaryType("Radix")("")([e.Integer])((function(e){return e>=2&&e<=36}));R.parseInt={consts:{},types:[_e,e.String,e.Maybe(e.Integer)],impl:function(t){return function(n){var r="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".slice(0,t),i=new RegExp("^["+r+"]+$","i"),o=n.replace(/^[+-]/,"");if(i.test(16===t?o.replace(/^0x/i,""):o)){var a=parseInt(n,t);if(e.test([])(e.Integer)(a))return h(a)}return f}}},R.parseJson={consts:{},types:[e.Predicate(e.Any),e.String,e.Maybe(_)],impl:function(e){return p(F(e))(p(ie)(re(JSON.parse)))}};var we=e.RecordType({match:e.String,groups:e.Array(e.Maybe(e.String))});function Se(e){return{match:e[0],groups:u.map(p(U(D(void 0)))(h),e.slice(1))}}function Oe(e,t){var n=e.lastIndex,r=t();return e.lastIndex=n,r}return R.regex={consts:{},types:[e.RegexFlags,e.String,e.RegExp],impl:function(e){return function(t){return new RegExp(t,e)}}},R.regexEscape={consts:{},types:[e.String,e.String],impl:function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}},R.test={consts:{},types:[e.RegExp,e.String,e.Boolean],impl:function(e){return function(t){return Oe(e,(function(){return e.test(t)}))}}},R.match={consts:{},types:[e.NonGlobalRegExp,e.String,e.Maybe(we)],impl:function(e){return function(t){return u.map(Se,u.reject(D(null),h(t.match(e))))}}},R.matchAll={consts:{},types:[e.GlobalRegExp,e.String,e.Array(we)],impl:function(e){return function(t){return Oe(e,(function(){return de((function(n){return u.map((function(e){return o(Se(e))(null)}),u.reject(D(null),h(e.exec(t))))}))([])}))}}},R.toUpper={consts:{},types:[e.String,e.String],impl:v("toUpperCase")},R.toLower={consts:{},types:[e.String,e.String],impl:v("toLowerCase")},R.trim={consts:{},types:[e.String,e.String],impl:v("trim")},R.stripPrefix={consts:{},types:[e.String,e.String,e.Maybe(e.String)],impl:function(e){return function(t){var n=e.length;return t.slice(0,n)===e?h(t.slice(n)):f}}},R.stripSuffix={consts:{},types:[e.String,e.String,e.Maybe(e.String)],impl:function(e){return function(t){var n=t.length-e.length;return t.slice(n)===e?h(t.slice(0,n)):f}}},R.words={consts:{},types:[e.String,e.Array(e.String)],impl:function(e){var t=e.split(/\s+/),n=t.length;return t.slice(""===t[0]?1:0,""===t[n-1]?n-1:n)}},R.unwords={consts:{},types:[e.Array(e.String),e.String],impl:b("join")(" ")},R.lines={consts:{},types:[e.String,e.Array(e.String)],impl:function(e){return""===e?[]:e.replace(/\r\n?/g,"\n").match(/^(?=[\s\S]).*/gm)}},R.unlines={consts:{},types:[e.Array(e.String),e.String],impl:function(e){return e.reduce((function(e,t){return e+t+"\n"}),"")}},R.splitOn={consts:{},types:[e.String,e.String,e.Array(e.String)],impl:b("split")},R.splitOnRegex={consts:{},types:[e.GlobalRegExp,e.String,e.Array(e.String)],impl:function(e){return function(t){return Oe(e,(function(){for(var n,r=[],i=0;null!=(n=e.exec(t));)if(e.lastIndex===i&&""===n[0]){if(e.lastIndex===t.length)return r;e.lastIndex+=1}else r.push(t.slice(i,n.index)),i=n.index+n[0].length;return r.push(t.slice(i)),r}))}}},j({checkTypes:"undefined"===typeof r||null==r||null==Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_TYPE_CHECK_SANCTUARY:"false",REACT_APP_BUILD_TARGET:"LAMASSU"})||!1,env:e.env})}))}).call(this,n(81))},function(e,t,n){(function(n){var r,i,o;i=[],void 0===(o="function"===typeof(r=function(){"use strict";function t(e,t){return"undefined"==typeof t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}function r(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){u(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function i(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function o(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(r){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var a="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n&&n.global===n?n:void 0,u=a.saveAs||("object"!=typeof window||window!==a?function(){}:"download"in HTMLAnchorElement.prototype?function(e,t,n){var u=a.URL||a.webkitURL,s=document.createElement("a");t=t||e.name||"download",s.download=t,s.rel="noopener","string"==typeof e?(s.href=e,s.origin===location.origin?o(s):i(s.href)?r(e,t,n):o(s,s.target="_blank")):(s.href=u.createObjectURL(e),setTimeout((function(){u.revokeObjectURL(s.href)}),4e4),setTimeout((function(){o(s)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,n,a){if(n=n||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(t(e,a),n);else if(i(e))r(e,n,a);else{var u=document.createElement("a");u.href=e,u.target="_blank",setTimeout((function(){o(u)}))}}:function(e,t,n,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof e)return r(e,t,n);var o="application/octet-stream"===e.type,u=/constructor/i.test(a.HTMLElement)||a.safari,s=/CriOS\/[\d]+/.test(navigator.userAgent);if((s||o&&u)&&"object"==typeof FileReader){var c=new FileReader;c.onloadend=function(){var e=c.result;e=s?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=e:location=e,i=null},c.readAsDataURL(e)}else{var l=a.URL||a.webkitURL,d=l.createObjectURL(e);i?i.location=d:location.href=d,i=null,setTimeout((function(){l.revokeObjectURL(d)}),4e4)}});a.saveAs=u.saveAs=u,e.exports=u})?r.apply(t,i):r)||(e.exports=o)}).call(this,n(66))},function(e,t,n){"use strict";(function(e){function r(t,n){var r,i="undefined"!==typeof(r="undefined"!==typeof n?n:"undefined"!==typeof window?window:"undefined"!==typeof self?self:e).document&&r.document.attachEvent;if(!i){var o=function(){var e=r.requestAnimationFrame||r.mozRequestAnimationFrame||r.webkitRequestAnimationFrame||function(e){return r.setTimeout(e,20)};return function(t){return e(t)}}(),a=function(){var e=r.cancelAnimationFrame||r.mozCancelAnimationFrame||r.webkitCancelAnimationFrame||r.clearTimeout;return function(t){return e(t)}}(),u=function(e){var t=e.__resizeTriggers__,n=t.firstElementChild,r=t.lastElementChild,i=n.firstElementChild;r.scrollLeft=r.scrollWidth,r.scrollTop=r.scrollHeight,i.style.width=n.offsetWidth+1+"px",i.style.height=n.offsetHeight+1+"px",n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight},s=function(e){if(!(e.target.className&&"function"===typeof e.target.className.indexOf&&e.target.className.indexOf("contract-trigger")<0&&e.target.className.indexOf("expand-trigger")<0)){var t=this;u(this),this.__resizeRAF__&&a(this.__resizeRAF__),this.__resizeRAF__=o((function(){(function(e){return e.offsetWidth!=e.__resizeLast__.width||e.offsetHeight!=e.__resizeLast__.height})(t)&&(t.__resizeLast__.width=t.offsetWidth,t.__resizeLast__.height=t.offsetHeight,t.__resizeListeners__.forEach((function(n){n.call(t,e)})))}))}},c=!1,l="",d="animationstart",f="Webkit Moz O ms".split(" "),h="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),p=r.document.createElement("fakeelement");if(void 0!==p.style.animationName&&(c=!0),!1===c)for(var g=0;g div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',r=e.head||e.getElementsByTagName("head")[0],i=e.createElement("style");i.id="detectElementResize",i.type="text/css",null!=t&&i.setAttribute("nonce",t),i.styleSheet?i.styleSheet.cssText=n:i.appendChild(e.createTextNode(n)),r.appendChild(i)}}(o),e.__resizeLast__={},e.__resizeListeners__=[],(e.__resizeTriggers__=o.createElement("div")).className="resize-triggers";var c='
';if(window.trustedTypes){var l=trustedTypes.createPolicy("react-virtualized-auto-sizer",{createHTML:function(){return c}});e.__resizeTriggers__.innerHTML=l.createHTML("")}else e.__resizeTriggers__.innerHTML=c;e.appendChild(e.__resizeTriggers__),u(e),e.addEventListener("scroll",s,!0),d&&(e.__resizeTriggers__.__animationListener__=function(t){t.animationName==m&&u(e)},e.__resizeTriggers__.addEventListener(d,e.__resizeTriggers__.__animationListener__))}e.__resizeListeners__.push(n)}},removeResizeListener:function(e,t){if(i)e.detachEvent("onresize",t);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",s,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(d,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(n){}}}}}n.d(t,"a",(function(){return r}))}).call(this,n(66))},function(e,t,n){"use strict";var r=n(17),i=n(109),o=Object(r.a)((function(e,t){var n=e<0?t.length+e:e;return Object(i.a)(t)?t.charAt(n):t[n]}));t.a=o},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(180);function i(e){return function t(n){for(var i,o,a,u=[],s=0,c=n.length;s0?n:1-n;return u("yy"===t?r%100:r,t.length)},M:function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):u(n+1,2)},d:function(e,t){return u(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return"am"===n?"a.m.":"p.m."}},h:function(e,t){return u(e.getUTCHours()%12||12,t.length)},H:function(e,t){return u(e.getUTCHours(),t.length)},m:function(e,t){return u(e.getUTCMinutes(),t.length)},s:function(e,t){return u(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,r=e.getUTCMilliseconds();return u(Math.floor(r*Math.pow(10,n-3)),t.length)}},c=n(22),l=864e5;var d=n(284),f=n(262),h=n(283),p=n(190),g="midnight",m="noon",v="morning",b="afternoon",y="evening",_="night";function w(e,t){var n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),o=r%60;if(0===o)return n+String(i);var a=t||"";return n+String(i)+a+u(o,2)}function S(e,t){return e%60===0?(e>0?"-":"+")+u(Math.abs(e)/60,2):O(e,t)}function O(e,t){var n=t||"",r=e>0?"-":"+",i=Math.abs(e);return r+u(Math.floor(i/60),2)+n+u(i%60,2)}var $={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var r=e.getUTCFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return s.y(e,t)},Y:function(e,t,n,r){var i=Object(p.a)(e,r),o=i>0?i:1-i;return"YY"===t?u(o%100,2):"Yo"===t?n.ordinalNumber(o,{unit:"year"}):u(o,t.length)},R:function(e,t){return u(Object(f.a)(e),t.length)},u:function(e,t){return u(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return u(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return u(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return s.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return u(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){var i=Object(h.a)(e,r);return"wo"===t?n.ordinalNumber(i,{unit:"week"}):u(i,t.length)},I:function(e,t,n){var r=Object(d.a)(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):u(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):s.d(e,t)},D:function(e,t,n){var r=function(e){Object(c.a)(1,arguments);var t=Object(a.a)(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=t.getTime(),i=n-r;return Math.floor(i/l)+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):u(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var i=e.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return u(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var i=e.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return u(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),i=0===r?7:r;switch(t){case"i":return String(i);case"ii":return u(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r,i=e.getUTCHours();switch(r=12===i?m:0===i?g:i/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,i=e.getUTCHours();switch(r=i>=17?y:i>=12?b:i>=4?v:_,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return s.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):s.H(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):u(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):u(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):s.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):s.s(e,t)},S:function(e,t){return s.S(e,t)},X:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();if(0===i)return"Z";switch(t){case"X":return S(i);case"XXXX":case"XX":return O(i);case"XXXXX":case"XXX":default:return O(i,":")}},x:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return S(i);case"xxxx":case"xx":return O(i);case"xxxxx":case"xxx":default:return O(i,":")}},O:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+w(i,":");case"OOOO":default:return"GMT"+O(i,":")}},z:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+w(i,":");case"zzzz":default:return"GMT"+O(i,":")}},t:function(e,t,n,r){var i=r._originalDate||e;return u(Math.floor(i.getTime()/1e3),t.length)},T:function(e,t,n,r){return u((r._originalDate||e).getTime(),t.length)}},x=n(261),E=n(98),T=n(126),C=n(29),N=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,A=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,M=/^'([^]*?)'?$/,k=/''/g,P=/[a-zA-Z]/;function I(e,t,n){Object(c.a)(2,arguments);var u=String(t),s=n||{},l=s.locale||i.a,d=l.options&&l.options.firstWeekContainsDate,f=null==d?1:Object(C.a)(d),h=null==s.firstWeekContainsDate?f:Object(C.a)(s.firstWeekContainsDate);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=l.options&&l.options.weekStartsOn,g=null==p?0:Object(C.a)(p),m=null==s.weekStartsOn?g:Object(C.a)(s.weekStartsOn);if(!(m>=0&&m<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!l.localize)throw new RangeError("locale must contain localize property");if(!l.formatLong)throw new RangeError("locale must contain formatLong property");var v=Object(a.a)(e);if(!Object(r.a)(v))throw new RangeError("Invalid time value");var b=Object(E.a)(v),y=Object(o.a)(v,b),_={firstWeekContainsDate:h,weekStartsOn:m,locale:l,_originalDate:v},w=u.match(A).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,x.a[t])(e,l.formatLong,_):e})).join("").match(N).map((function(n){if("''"===n)return"'";var r=n[0];if("'"===r)return R(n);var i=$[r];if(i)return!s.useAdditionalWeekYearTokens&&Object(T.b)(n)&&Object(T.c)(n,t,e),!s.useAdditionalDayOfYearTokens&&Object(T.a)(n)&&Object(T.c)(n,t,e),i(y,n,l.localize,_);if(r.match(P))throw new RangeError("Format string contains an unescaped latin alphabet character `"+r+"`");return n})).join("");return w}function R(e){return e.match(M)[1].replace(k,"'")}},function(e,t,n){"use strict";var r=n(31),i=n(17),o=n(72),a=n(121),u=n(88),s=Object(i.a)((function(e,t){return"function"===typeof t["fantasy-land/ap"]?t["fantasy-land/ap"](e):"function"===typeof e.ap?e.ap(t):"function"===typeof e?function(n){return e(n)(t(n))}:Object(o.a)((function(e,n){return Object(a.a)(e,Object(u.a)(n,t))}),[],e)})),c=n(94),l=Object(i.a)((function(e,t){var n=Object(c.a)(e,t);return Object(c.a)(e,(function(){return Object(o.a)(s,Object(u.a)(n,arguments[0]),Array.prototype.slice.call(arguments,1))}))})),d=Object(r.a)((function(e){return l(e.length,e)}));t.a=d},function(e,t,n){"use strict";var r=n(181),i=n(68),o=n(57),a=n(72),u=n(60),s=function(){function e(e,t,n,r){this.valueFn=e,this.valueAcc=t,this.keyFn=n,this.xf=r,this.inputs={}}return e.prototype["@@transducer/init"]=u.a.init,e.prototype["@@transducer/result"]=function(e){var t;for(t in this.inputs)if(Object(o.a)(t,this.inputs)&&(e=this.xf["@@transducer/step"](e,this.inputs[t]))["@@transducer/reduced"]){e=e["@@transducer/value"];break}return this.inputs=null,this.xf["@@transducer/result"](e)},e.prototype["@@transducer/step"]=function(e,t){var n=this.keyFn(t);return this.inputs[n]=this.inputs[n]||[n,this.valueAcc],this.inputs[n][1]=this.valueFn(this.inputs[n][1],t),e},e}(),c=Object(r.a)(4,[],(function(e,t,n,r){return new s(e,t,n,r)})),l=Object(r.a)(4,[],Object(i.a)([],c,(function(e,t,n,r){return Object(a.a)((function(r,i){var a=n(i);return r[a]=e(Object(o.a)(a,r)?r[a]:t,i),r}),{},r)})));t.a=l},function(e,t,n){"use strict";var r=n(17),i=n(68),o=n(242),a=n(241),u=n(72),s=n(60),c=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=s.a.init,e.prototype["@@transducer/result"]=s.a.result,e.prototype["@@transducer/step"]=function(e,t){return this.f(t)?this.xf["@@transducer/step"](e,t):e},e}(),l=Object(r.a)((function(e,t){return new c(e,t)})),d=n(89),f=Object(r.a)(Object(i.a)(["filter"],l,(function(e,t){return Object(a.a)(t)?Object(u.a)((function(n,r){return e(t[r])&&(n[r]=t[r]),n}),{},Object(d.a)(t)):Object(o.a)(e,t)})));t.a=f},function(e,t,n){"use strict";var r=n(439),i=n(251),o=n(17),a=Object(o.a)((function(e,t){for(var n,r,o=new i.a,a=[],u=0;u=0&&this.i>=this.n?Object(o.a)(n):n},e}(),s=Object(r.a)((function(e,t){return new u(e,t)})),c=n(93),l=Object(r.a)(Object(i.a)(["take"],s,(function(e,t){return Object(c.a)(0,e<0?1/0:e,t)})));t.a=l},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(25),i=n(22);function o(e,t){Object(i.a)(2,arguments);var n=Object(r.a)(e),o=Object(r.a)(t);return n.getFullYear()-o.getFullYear()}var a=n(111);function u(e,t){Object(i.a)(2,arguments);var n=Object(r.a)(e),u=Object(r.a)(t),s=Object(a.a)(n,u),c=Math.abs(o(n,u));n.setFullYear(1584),u.setFullYear(1584);var l=Object(a.a)(n,u)===-s,d=s*(c-Number(l));return 0===d?0:d}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(25),i=n(98),o=n(150),a=n(22),u=864e5;function s(e,t){Object(a.a)(2,arguments);var n=Object(o.a)(e),r=Object(o.a)(t),s=n.getTime()-Object(i.a)(n),c=r.getTime()-Object(i.a)(r);return Math.round((s-c)/u)}function c(e,t){var n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function l(e,t){Object(a.a)(2,arguments);var n=Object(r.a)(e),i=Object(r.a)(t),o=c(n,i),u=Math.abs(s(n,i));n.setDate(n.getDate()-o*u);var l=Number(c(n,i)===-o),d=o*(u-l);return 0===d?0:d}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(29),i=n(25),o=n(22);function a(e,t){Object(o.a)(2,arguments);var n=Object(i.a)(e).getTime(),a=Object(r.a)(t);return new Date(n+a)}function u(e,t){Object(o.a)(2,arguments);var n=Object(r.a)(t);return a(e,-n)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(25),i=n(112),o=n(29),a=n(190),u=n(22);function s(e,t){Object(u.a)(1,arguments);var n=t||{},r=n.locale,s=r&&r.options&&r.options.firstWeekContainsDate,c=null==s?1:Object(o.a)(s),l=null==n.firstWeekContainsDate?c:Object(o.a)(n.firstWeekContainsDate),d=Object(a.a)(e,t),f=new Date(0);f.setUTCFullYear(d,0,l),f.setUTCHours(0,0,0,0);var h=Object(i.a)(f,t);return h}var c=6048e5;function l(e,t){Object(u.a)(1,arguments);var n=Object(r.a)(e),o=Object(i.a)(n,t).getTime()-s(n,t).getTime();return Math.round(o/c)+1}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(25),i=n(125),o=n(262),a=n(22);function u(e){Object(a.a)(1,arguments);var t=Object(o.a)(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var r=Object(i.a)(n);return r}var s=6048e5;function c(e){Object(a.a)(1,arguments);var t=Object(r.a)(e),n=Object(i.a)(t).getTime()-u(t).getTime();return Math.round(n/s)+1}},function(e,t,n){"use strict";var r=n(4),i=n(16),o=n(1),a=n.n(o),u=(n(13),n(44)),s=n(15),c=n(41),l=n(105),d=n(24),f=!0,h=!1,p=null,g={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function m(e){e.metaKey||e.altKey||e.ctrlKey||(f=!0)}function v(){f=!1}function b(){"hidden"===this.visibilityState&&h&&(f=!0)}function y(e){var t=e.target;try{return t.matches(":focus-visible")}catch(n){}return f||function(e){var t=e.type,n=e.tagName;return!("INPUT"!==n||!g[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}function _(){h=!0,window.clearTimeout(p),p=window.setTimeout((function(){h=!1}),100)}function w(){return{isFocusVisible:y,onBlurVisible:_,ref:o.useCallback((function(e){var t,n=u.findDOMNode(e);null!=n&&((t=n.ownerDocument).addEventListener("keydown",m,!0),t.addEventListener("mousedown",v,!0),t.addEventListener("pointerdown",v,!0),t.addEventListener("touchstart",v,!0),t.addEventListener("visibilitychange",b,!0))}),[])}}var S=n(97),O=n(61),$=n(147),x=n(65),E=n(195);function T(e,t){var n=Object.create(null);return e&&o.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&Object(o.isValidElement)(e)?t(e):e}(e)})),n}function C(e,t,n){return null!=n[t]?n[t]:e.props[t]}function N(e,t,n){var r=T(e.children),i=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),o=[];for(var a in e)a in t?o.length&&(i[a]=o,o=[]):o.push(a);var u={};for(var s in t){if(i[s])for(r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=t.pulsate,i=void 0!==r&&r,o=t.center,u=void 0===o?a||t.pulsate:o,s=t.fakeElement,c=void 0!==s&&s;if("mousedown"===e.type&&m.current)m.current=!1;else{"touchstart"===e.type&&(m.current=!0);var l,d,f,h=c?null:y.current,p=h?h.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(u||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)l=Math.round(p.width/2),d=Math.round(p.height/2);else{var g=e.touches?e.touches[0]:e,w=g.clientX,S=g.clientY;l=Math.round(w-p.left),d=Math.round(S-p.top)}if(u)(f=Math.sqrt((2*Math.pow(p.width,2)+Math.pow(p.height,2))/3))%2===0&&(f+=1);else{var O=2*Math.max(Math.abs((h?h.clientWidth:0)-l),l)+2,$=2*Math.max(Math.abs((h?h.clientHeight:0)-d),d)+2;f=Math.sqrt(Math.pow(O,2)+Math.pow($,2))}e.touches?null===b.current&&(b.current=function(){_({pulsate:i,rippleX:l,rippleY:d,rippleSize:f,cb:n})},v.current=setTimeout((function(){b.current&&(b.current(),b.current=null)}),80)):_({pulsate:i,rippleX:l,rippleY:d,rippleSize:f,cb:n})}}),[a,_]),O=o.useCallback((function(){w({},{pulsate:!0})}),[w]),$=o.useCallback((function(e,t){if(clearTimeout(v.current),"touchend"===e.type&&b.current)return e.persist(),b.current(),b.current=null,void(v.current=setTimeout((function(){$(e,t)})));b.current=null,h((function(e){return e.length>0?e.slice(1):e})),g.current=t}),[]);return o.useImperativeHandle(t,(function(){return{pulsate:O,start:w,stop:$}}),[O,w,$]),o.createElement("span",Object(r.a)({className:Object(s.a)(u.root,c),ref:y},l),o.createElement(k,{component:null,exit:!0},f))})),j=Object(d.a)((function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}}),{flip:!1,name:"MuiTouchRipple"})(o.memo(R)),D=o.forwardRef((function(e,t){var n=e.action,a=e.buttonRef,d=e.centerRipple,f=void 0!==d&&d,h=e.children,p=e.classes,g=e.className,m=e.component,v=void 0===m?"button":m,b=e.disabled,y=void 0!==b&&b,_=e.disableRipple,S=void 0!==_&&_,O=e.disableTouchRipple,$=void 0!==O&&O,x=e.focusRipple,E=void 0!==x&&x,T=e.focusVisibleClassName,C=e.onBlur,N=e.onClick,A=e.onFocus,M=e.onFocusVisible,k=e.onKeyDown,P=e.onKeyUp,I=e.onMouseDown,R=e.onMouseLeave,D=e.onMouseUp,L=e.onTouchEnd,F=e.onTouchMove,U=e.onTouchStart,B=e.onDragLeave,z=e.tabIndex,H=void 0===z?0:z,V=e.TouchRippleProps,W=e.type,G=void 0===W?"button":W,q=Object(i.a)(e,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),Y=o.useRef(null);var K=o.useRef(null),Q=o.useState(!1),Z=Q[0],X=Q[1];y&&Z&&X(!1);var J=w(),ee=J.isFocusVisible,te=J.onBlurVisible,ne=J.ref;function re(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:$;return Object(l.a)((function(r){return t&&t(r),!n&&K.current&&K.current[e](r),!0}))}o.useImperativeHandle(n,(function(){return{focusVisible:function(){X(!0),Y.current.focus()}}}),[]),o.useEffect((function(){Z&&E&&!S&&K.current.pulsate()}),[S,E,Z]);var ie=re("start",I),oe=re("stop",B),ae=re("stop",D),ue=re("stop",(function(e){Z&&e.preventDefault(),R&&R(e)})),se=re("start",U),ce=re("stop",L),le=re("stop",F),de=re("stop",(function(e){Z&&(te(e),X(!1)),C&&C(e)}),!1),fe=Object(l.a)((function(e){Y.current||(Y.current=e.currentTarget),ee(e)&&(X(!0),M&&M(e)),A&&A(e)})),he=function(){var e=u.findDOMNode(Y.current);return v&&"button"!==v&&!("A"===e.tagName&&e.href)},pe=o.useRef(!1),ge=Object(l.a)((function(e){E&&!pe.current&&Z&&K.current&&" "===e.key&&(pe.current=!0,e.persist(),K.current.stop(e,(function(){K.current.start(e)}))),e.target===e.currentTarget&&he()&&" "===e.key&&e.preventDefault(),k&&k(e),e.target===e.currentTarget&&he()&&"Enter"===e.key&&!y&&(e.preventDefault(),N&&N(e))})),me=Object(l.a)((function(e){E&&" "===e.key&&K.current&&Z&&!e.defaultPrevented&&(pe.current=!1,e.persist(),K.current.stop(e,(function(){K.current.pulsate(e)}))),P&&P(e),N&&e.target===e.currentTarget&&he()&&" "===e.key&&!e.defaultPrevented&&N(e)})),ve=v;"button"===ve&&q.href&&(ve="a");var be={};"button"===ve?(be.type=G,be.disabled=y):("a"===ve&&q.href||(be.role="button"),be["aria-disabled"]=y);var ye=Object(c.a)(a,t),_e=Object(c.a)(ne,Y),we=Object(c.a)(ye,_e),Se=o.useState(!1),Oe=Se[0],$e=Se[1];o.useEffect((function(){$e(!0)}),[]);var xe=Oe&&!S&&!y;return o.createElement(ve,Object(r.a)({className:Object(s.a)(p.root,g,Z&&[p.focusVisible,T],y&&p.disabled),onBlur:de,onClick:N,onFocus:fe,onKeyDown:ge,onKeyUp:me,onMouseDown:ie,onMouseLeave:ue,onMouseUp:ae,onDragLeave:oe,onTouchEnd:ce,onTouchMove:le,onTouchStart:se,ref:we,tabIndex:y?-1:H},be,q),h,xe?o.createElement(j,Object(r.a)({ref:K,center:f},V)):null)}));t.a=Object(d.a)({root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}},disabled:{},focusVisible:{}},{name:"MuiButtonBase"})(D)},,,,,,,function(e,t,n){var r=n(134),i=n(293),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!i(e))||(a.test(e)||!o.test(e)||null!=t&&e in Object(t))}},function(e,t,n){var r=n(199),i=n(200);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},function(e,t,n){var r=n(520),i=n(536),o=n(538),a=n(539),u=n(540);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=9007199254740991}},function(e,t,n){var r=n(547),i=n(553),o=n(557);e.exports=function(e){return o(e)?r(e):i(e)}},function(e,t,n){"use strict";var r,i=t,o=n(300),a=n(371),u=n(102).assert;function s(e){"short"===e.type?this.curve=new a.short(e):"edwards"===e.type?this.curve=new a.edwards(e):this.curve=new a.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,u(this.g.validate(),"Invalid curve"),u(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function c(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var n=new s(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:n}),n}})}i.PresetCurve=s,c("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),c("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),c("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),c("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),c("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),c("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),c("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=n(644)}catch(l){r=void 0}c("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})},function(e,t,n){var r=t;r.utils=n(116),r.common=n(203),r.sha=n(638),r.ripemd=n(642),r.hmac=n(643),r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160},function(e,t,n){var r=n(53).Buffer,i=n(654).Transform,o=n(206).StringDecoder;function a(e){i.call(this),this.hashMode="string"===typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}n(54)(a,i),a.prototype.update=function(e,t,n){"string"===typeof e&&(e=r.from(e,t));var i=this._update(e);return this.hashMode?this:(n&&(i=this._toString(i,n)),i)},a.prototype.setAutoPadding=function(){},a.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},a.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},a.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},a.prototype._transform=function(e,t,n){var r;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(i){r=i}finally{n(r)}},a.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(n){t=n}e(t)},a.prototype._finalOrDigest=function(e){var t=this.__final()||r.alloc(0);return e&&(t=this._toString(t,e,!0)),t},a.prototype._toString=function(e,t,n){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var r=this._decoder.write(e);return n&&(r+=this._decoder.end()),r},e.exports=a},function(e,t,n){(t=e.exports=n(376)).Stream=t,t.Readable=t,t.Writable=n(304),t.Duplex=n(157),t.Transform=n(381),t.PassThrough=n(660)},function(e,t,n){var r=n(59),i=r.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=a),o(i,a),a.from=function(e,t,n){if("number"===typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},a.alloc=function(e,t,n){if("number"!==typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"===typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){"use strict";(function(t,r,i){var o=n(227);function a(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;e.entry=null;for(;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=b;var u,s=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?r:o.nextTick;b.WritableState=v;var c=Object.create(n(205));c.inherits=n(54);var l={deprecate:n(380)},d=n(377),f=n(303).Buffer,h=i.Uint8Array||function(){};var p,g=n(378);function m(){}function v(e,t){u=u||n(157),e=e||{};var r=t instanceof u;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,c=e.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(c||0===c)?c:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var d=!1===e.decodeStrings;this.decodeStrings=!d,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,i){--t.pendingcb,n?(o.nextTick(i,r),o.nextTick($,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(i(r),e._writableState.errorEmitted=!0,e.emit("error",r),$(e,t))}(e,n,r,t,i);else{var a=S(n);a||n.corked||n.bufferProcessing||!n.bufferedRequest||w(e,n),r?s(_,e,n,a,i):_(e,n,a,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function b(e){if(u=u||n(157),!p.call(b,this)&&!(this instanceof u))return new b(e);this._writableState=new v(e,this),this.writable=!0,e&&("function"===typeof e.write&&(this._write=e.write),"function"===typeof e.writev&&(this._writev=e.writev),"function"===typeof e.destroy&&(this._destroy=e.destroy),"function"===typeof e.final&&(this._final=e.final)),d.call(this)}function y(e,t,n,r,i,o,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function _(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),$(e,t)}function w(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),o=t.corkedRequestsFree;o.entry=n;for(var u=0,s=!0;n;)i[u]=n,n.isBuf||(s=!1),n=n.next,u+=1;i.allBuffers=s,y(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new a(t),t.bufferedRequestCount=0}else{for(;n;){var c=n.chunk,l=n.encoding,d=n.callback;if(y(e,t,!1,t.objectMode?1:c.length,c,l,d),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function S(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function O(e,t){e._final((function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),$(e,t)}))}function $(e,t){var n=S(t);return n&&(!function(e,t){t.prefinished||t.finalCalled||("function"===typeof e._final?(t.pendingcb++,t.finalCalled=!0,o.nextTick(O,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}c.inherits(b,d),v.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(v.prototype,"buffer",{get:l.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"===typeof Symbol&&Symbol.hasInstance&&"function"===typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(e){return!!p.call(this,e)||this===b&&(e&&e._writableState instanceof v)}})):p=function(e){return e instanceof this},b.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},b.prototype.write=function(e,t,n){var r,i=this._writableState,a=!1,u=!i.objectMode&&(r=e,f.isBuffer(r)||r instanceof h);return u&&!f.isBuffer(e)&&(e=function(e){return f.from(e)}(e)),"function"===typeof t&&(n=t,t=null),u?t="buffer":t||(t=i.defaultEncoding),"function"!==typeof n&&(n=m),i.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),o.nextTick(t,n)}(this,n):(u||function(e,t,n,r){var i=!0,a=!1;return null===n?a=new TypeError("May not write null values to stream"):"string"===typeof n||void 0===n||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),o.nextTick(r,a),i=!1),i}(this,i,e,n))&&(i.pendingcb++,a=function(e,t,n,r,i,o){if(!n){var a=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!==typeof t||(t=f.from(t,n));return t}(t,r,i);r!==a&&(n=!0,i="buffer",r=a)}var u=t.objectMode?1:r.length;t.length+=u;var s=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(e,t,n){var r=this._writableState;"function"===typeof e?(n=e,e=null,t=null):"function"===typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,n){t.ending=!0,$(e,t),n&&(t.finished?o.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n)},Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),b.prototype.destroy=g.destroy,b.prototype._undestroy=g.undestroy,b.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,n(81),n(379).setImmediate,n(66))},function(e,t,n){(t=e.exports=n(384)).Stream=t,t.Readable=t,t.Writable=n(388),t.Duplex=n(171),t.Transform=n(389),t.PassThrough=n(671),t.finished=n(306),t.pipeline=n(672)},function(e,t,n){"use strict";var r=n(170).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,n,o){if("function"===typeof n)return e(t,null,n);n||(n={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),i=0;i=this.ins.length)return m;var a=o.compile(o.decompile(t).filter((function(e){return e!==u.OP_CODESEPARATOR}))),l=this.clone();if((31&n)===f.SIGHASH_NONE)l.outs=[],l.ins.forEach((function(t,n){n!==e&&(t.sequence=0)}));else if((31&n)===f.SIGHASH_SINGLE){if(e>=this.outs.length)return m;l.outs.length=e+1;for(var d=0;d>25;return(33554431&e)<<5^996825010&-(t>>0&1)^642813549&-(t>>1&1)^513874426&-(t>>2&1)^1027748829&-(t>>3&1)^705979059&-(t>>4&1)}function s(e){for(var t=1,n=0;n126)return"Invalid prefix ("+e+")";t=u(t)^r>>5}for(t=u(t),n=0;nt)return"Exceeds length limit";var n=e.toLowerCase(),r=e.toUpperCase();if(e!==n&&e!==r)return"Mixed-case string "+e;var o=(e=n).lastIndexOf("1");if(-1===o)return"No separator character for "+e;if(0===o)return"Missing prefix for "+e;var a=e.slice(0,o),c=e.slice(o+1);if(c.length<6)return"Data too short";var l=s(a);if("string"===typeof l)return l;for(var d=[],f=0;f=c.length||d.push(p)}return 1!==l?"Invalid checksum for "+e:{prefix:a,words:d}}function l(e,t,n,r){for(var i=0,o=0,a=(1<=n;)o-=n,u.push(i>>o&a);if(r)o>0&&u.push(i<=t)return"Excess padding";if(i<n)throw new TypeError("Exceeds length limit");var i=s(e=e.toLowerCase());if("string"===typeof i)throw new Error(i);for(var o=e+"1",a=0;a>5!==0)throw new Error("Non 5-bit word");i=u(i)^c,o+=r.charAt(c)}for(a=0;a<6;++a)i=u(i);for(i^=1,a=0;a<6;++a){o+=r.charAt(i>>5*(5-a)&31)}return o},toWordsUnsafe:function(e){var t=l(e,8,5,!0);if(Array.isArray(t))return t},toWords:function(e){var t=l(e,8,5,!0);if(Array.isArray(t))return t;throw new Error(t)},fromWordsUnsafe:function(e){var t=l(e,5,8,!1);if(Array.isArray(t))return t},fromWords:function(e){var t=l(e,5,8,!1);if(Array.isArray(t))return t;throw new Error(t)}}},function(e,t,n){var r=n(688),i=n(689),o=n(690),a=n(691),u=n(692),s=n(693),c=n(694);e.exports={embed:r,p2ms:i,p2pk:o,p2pkh:a,p2sh:u,p2wpkh:s,p2wsh:c}},function(e,t,n){e.exports={input:n(696),output:n(697)}},function(e,t,n){e.exports={input:n(699),output:n(700)}},function(e,t,n){e.exports={input:n(701),output:n(702)}},function(e,t,n){!function(t,r){var i;e.exports=(i=n(45),function(){var e=i,t=e.lib,n=t.WordArray,r=t.Hasher,o=e.algo,a=[],u=o.SHA1=r.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],u=n[3],s=n[4],c=0;c<80;c++){if(c<16)a[c]=0|e[t+c];else{var l=a[c-3]^a[c-8]^a[c-14]^a[c-16];a[c]=l<<1|l>>>31}var d=(r<<5|r>>>27)+s+a[c];d+=c<20?1518500249+(i&o|~i&u):c<40?1859775393+(i^o^u):c<60?(i&o|i&u|o&u)-1894007588:(i^o^u)-899497514,s=u,u=o,o=i<<30|i>>>2,i=r,r=d}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+u|0,n[4]=n[4]+s|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e}});e.SHA1=r._createHelper(u),e.HmacSHA1=r._createHmacHelper(u)}(),i.SHA1)}()},function(e,t,n){!function(t,r){var i;e.exports=(i=n(45),void function(){var e=i,t=e.lib.Base,n=e.enc.Utf8;e.algo.HMAC=t.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=n.parse(t));var r=e.blockSize,i=4*r;t.sigBytes>i&&(t=e.finalize(t)),t.clamp();for(var o=this._oKey=t.clone(),a=this._iKey=t.clone(),u=o.words,s=a.words,c=0;c2&&void 0!==arguments[2]?arguments[2]:{clone:!0},i=n.clone?Object(r.a)({},e):e;return o(e)&&o(t)&&Object.keys(t).forEach((function(r){"__proto__"!==r&&(o(t[r])&&r in e?i[r]=a(e[r],t[r],n):i[r]=t[r])})),i}},function(e,t,n){"use strict";var r=n(4),i=n(16),o=n(1),a=(n(13),n(15)),u=n(24),s=n(34),c=n(285),l=n(32),d=o.forwardRef((function(e,t){var n=e.edge,u=void 0!==n&&n,s=e.children,d=e.classes,f=e.className,h=e.color,p=void 0===h?"default":h,g=e.disabled,m=void 0!==g&&g,v=e.disableFocusRipple,b=void 0!==v&&v,y=e.size,_=void 0===y?"medium":y,w=Object(i.a)(e,["edge","children","classes","className","color","disabled","disableFocusRipple","size"]);return o.createElement(c.a,Object(r.a)({className:Object(a.a)(d.root,f,"default"!==p&&d["color".concat(Object(l.a)(p))],m&&d.disabled,"small"===_&&d["size".concat(Object(l.a)(_))],{start:d.edgeStart,end:d.edgeEnd}[u]),centerRipple:!0,focusRipple:!b,disabled:m,ref:t},w),o.createElement("span",{className:d.label},s))}));t.a=Object(u.a)((function(e){return{root:{textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:12,borderRadius:"50%",overflow:"visible",color:e.palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{backgroundColor:Object(s.d)(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{backgroundColor:"transparent",color:e.palette.action.disabled}},edgeStart:{marginLeft:-12,"$sizeSmall&":{marginLeft:-3}},edgeEnd:{marginRight:-12,"$sizeSmall&":{marginRight:-3}},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:Object(s.d)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},colorSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:Object(s.d)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},disabled:{},sizeSmall:{padding:3,fontSize:e.typography.pxToRem(18)},label:{width:"100%",display:"flex",alignItems:"inherit",justifyContent:"inherit"}}}),{name:"MuiIconButton"})(d)},function(e,t,n){"use strict";var r=n(4),i=n(16),o=n(1),a=(n(13),n(44)),u=n(184),s=n(471),c=n(41),l=n(87),d=n(83),f=n(106);function h(e,t){var n=function(e,t){var n,r=t.getBoundingClientRect();if(t.fakeTransform)n=t.fakeTransform;else{var i=window.getComputedStyle(t);n=i.getPropertyValue("-webkit-transform")||i.getPropertyValue("transform")}var o=0,a=0;if(n&&"none"!==n&&"string"===typeof n){var u=n.split("(")[1].split(")")[0].split(",");o=parseInt(u[4],10),a=parseInt(u[5],10)}return"left"===e?"translateX(".concat(window.innerWidth,"px) translateX(").concat(o-r.left,"px)"):"right"===e?"translateX(-".concat(r.left+r.width-o,"px)"):"up"===e?"translateY(".concat(window.innerHeight,"px) translateY(").concat(a-r.top,"px)"):"translateY(-".concat(r.top+r.height-a,"px)")}(e,t);n&&(t.style.webkitTransform=n,t.style.transform=n)}var p={enter:d.b.enteringScreen,exit:d.b.leavingScreen},g=o.forwardRef((function(e,t){var n=e.children,d=e.direction,g=void 0===d?"down":d,m=e.in,v=e.onEnter,b=e.onEntered,y=e.onEntering,_=e.onExit,w=e.onExited,S=e.onExiting,O=e.style,$=e.timeout,x=void 0===$?p:$,E=e.TransitionComponent,T=void 0===E?s.a:E,C=Object(i.a)(e,["children","direction","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),N=Object(l.a)(),A=o.useRef(null),M=o.useCallback((function(e){A.current=a.findDOMNode(e)}),[]),k=Object(c.a)(n.ref,M),P=Object(c.a)(k,t),I=function(e){return function(t){e&&(void 0===t?e(A.current):e(A.current,t))}},R=I((function(e,t){h(g,e),Object(f.b)(e),v&&v(e,t)})),j=I((function(e,t){var n=Object(f.a)({timeout:x,style:O},{mode:"enter"});e.style.webkitTransition=N.transitions.create("-webkit-transform",Object(r.a)({},n,{easing:N.transitions.easing.easeOut})),e.style.transition=N.transitions.create("transform",Object(r.a)({},n,{easing:N.transitions.easing.easeOut})),e.style.webkitTransform="none",e.style.transform="none",y&&y(e,t)})),D=I(b),L=I(S),F=I((function(e){var t=Object(f.a)({timeout:x,style:O},{mode:"exit"});e.style.webkitTransition=N.transitions.create("-webkit-transform",Object(r.a)({},t,{easing:N.transitions.easing.sharp})),e.style.transition=N.transitions.create("transform",Object(r.a)({},t,{easing:N.transitions.easing.sharp})),h(g,e),_&&_(e)})),U=I((function(e){e.style.webkitTransition="",e.style.transition="",w&&w(e)})),B=o.useCallback((function(){A.current&&h(g,A.current)}),[g]);return o.useEffect((function(){if(!m&&"down"!==g&&"right"!==g){var e=Object(u.a)((function(){A.current&&h(g,A.current)}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}}),[g,m]),o.useEffect((function(){m||B()}),[m,B]),o.createElement(T,Object(r.a)({nodeRef:A,onEnter:R,onEntered:D,onEntering:j,onExit:F,onExited:U,onExiting:L,appear:!0,in:m,timeout:x},C),(function(e,t){return o.cloneElement(n,Object(r.a)({ref:P,style:Object(r.a)({visibility:"exited"!==e||m?void 0:"hidden"},O,n.props.style)},t))}))}));t.a=g},function(e,t,n){"use strict";e.exports=n(507)},function(e,t,n){var r=n(360)((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));e.exports=r},function(e,t,n){var r=n(612);e.exports=h,e.exports.parse=o,e.exports.compile=function(e,t){return u(o(e,t),t)},e.exports.tokensToFunction=u,e.exports.tokensToRegExp=f;var i=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function o(e,t){for(var n,r=[],o=0,a=0,u="",l=t&&t.delimiter||"/";null!=(n=i.exec(e));){var d=n[0],f=n[1],h=n.index;if(u+=e.slice(a,h),a=h+d.length,f)u+=f[1];else{var p=e[a],g=n[2],m=n[3],v=n[4],b=n[5],y=n[6],_=n[7];u&&(r.push(u),u="");var w=null!=g&&null!=p&&p!==g,S="+"===y||"*"===y,O="?"===y||"*"===y,$=n[2]||l,x=v||b;r.push({name:m||o++,prefix:g||"",delimiter:$,optional:O,repeat:S,partial:w,asterisk:!!_,pattern:x?c(x):_?".*":"[^"+s($)+"]+?"})}}return a=r}}),"es6","es3"),$jscomp.findInternal=function(e,t,n){e instanceof String&&(e=String(e));for(var r=e.length,i=0;i=i}}),"es6","es3"),$jscomp.polyfill("String.prototype.repeat",(function(e){return e||function(e){var t=$jscomp.checkStringArgs(this,null,"repeat");if(0>e||1342177279>>=1)&&(t+=t);return n}}),"es6","es3"),$jscomp.arrayIteratorImpl=function(e){var t=0;return function(){return t>>0),goog.uidCounter_=0,goog.cloneObject=function(e){var t=goog.typeOf(e);if("object"==t||"array"==t){if("function"===typeof e.clone)return e.clone();for(var n in t="array"==t?[]:{},e)t[n]=goog.cloneObject(e[n]);return t}return e},goog.bindNative_=function(e,t,n){return e.call.apply(e.bind,arguments)},goog.bindJs_=function(e,t,n){if(!e)throw Error();if(2").replace(/'/g,"'").replace(/"/g,'"').replace(/&/g,"&")),t&&(e=e.replace(/\{\$([^}]+)}/g,(function(e,n){return null!=t&&n in t?t[n]:e}))),e},goog.getMsgWithFallback=function(e,t){return e},goog.exportSymbol=function(e,t,n){goog.exportPath_(e,t,!0,n)},goog.exportProperty=function(e,t,n){e[t]=n},goog.inherits=function(e,t){function n(){}n.prototype=t.prototype,e.superClass_=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.base=function(e,n,r){for(var i=Array(arguments.length-2),o=2;o{"use strict";class X{constructor(){if(new.target!=String)throw 1;this.x=42}}let q=Reflect.construct(X,[],String);if(q.x!=42||!(q instanceof String))throw 1;for(const a of[2,3]){if(a==2)continue;function f(z={a}){let a=0;return z.a}{function f(){return 0;}}return f()==3}})()')})),a("es7",(function(){return b("2 ** 2 == 4")})),a("es8",(function(){return b("async () => 1, true")})),a("es9",(function(){return b("({...rest} = {}), true")})),a("es_next",(function(){return!1})),{target:c,map:d}},goog.Transpiler.prototype.needsTranspile=function(e,t){if("always"==goog.TRANSPILE)return!0;if("never"==goog.TRANSPILE)return!1;if(!this.requiresTranspilation_){var n=this.createRequiresTranspilation_();this.requiresTranspilation_=n.map,this.transpilationTarget_=this.transpilationTarget_||n.target}if(e in this.requiresTranspilation_)return!!this.requiresTranspilation_[e]||!(!goog.inHtmlDocument_()||"es6"!=t||"noModule"in goog.global.document.createElement("script"));throw Error("Unknown language mode: "+e)},goog.Transpiler.prototype.transpile=function(e,t){return goog.transpile_(e,t,this.transpilationTarget_)},goog.transpiler_=new goog.Transpiler,goog.protectScriptTag_=function(e){return e.replace(/<\/(SCRIPT)/gi,"\\x3c/$1")},goog.DebugLoader_=function(){this.dependencies_={},this.idToPath_={},this.written_={},this.loadingDeps_=[],this.depsToLoad_=[],this.paused_=!1,this.factory_=new goog.DependencyFactory(goog.transpiler_),this.deferredCallbacks_={},this.deferredQueue_=[]},goog.DebugLoader_.prototype.bootstrap=function(e,t){function n(){r&&(goog.global.setTimeout(r,0),r=null)}var r=t;if(e.length){t=[];for(var i=0;i<\/script>';i+="",i=goog.Dependency.defer_?i+"document.getElementById('script-"+r+"').onload = function() {\n goog.Dependency.callback_('"+r+"', this);\n};\n":i+"goog.Dependency.callback_('"+r+"', document.getElementById('script-"+r+"'));",i+="<\/script>",t.write(goog.TRUSTED_TYPES_POLICY_?goog.TRUSTED_TYPES_POLICY_.createHTML(i):i)}else{var o=t.createElement("script");o.defer=goog.Dependency.defer_,o.async=!1,n&&(o.nonce=n),goog.DebugLoader_.IS_OLD_IE_?(e.pause(),o.onreadystatechange=function(){"loaded"!=o.readyState&&"complete"!=o.readyState||(e.loaded(),e.resume())}):o.onload=function(){o.onload=null,e.loaded()},o.src=goog.TRUSTED_TYPES_POLICY_?goog.TRUSTED_TYPES_POLICY_.createScriptURL(this.path):this.path,t.head.appendChild(o)}}else goog.logToConsole_("Cannot use default debug loader outside of HTML documents."),"deps.js"==this.relativePath?(goog.logToConsole_("Consider setting CLOSURE_IMPORT_SCRIPT before loading base.js, or setting CLOSURE_NO_DEPS to true."),e.loaded()):e.pause()},goog.Es6ModuleDependency=function(e,t,n,r,i){goog.Dependency.call(this,e,t,n,r,i)},goog.inherits(goog.Es6ModuleDependency,goog.Dependency),goog.Es6ModuleDependency.prototype.load=function(e){if(goog.global.CLOSURE_IMPORT_SCRIPT)goog.global.CLOSURE_IMPORT_SCRIPT(this.path)?e.loaded():e.pause();else if(goog.inHtmlDocument_()){var t=goog.global.document,n=this;if(goog.isDocumentLoading_()){var r=function(e,n){var r="",i=goog.getScriptNonce();i&&(r=' nonce="'+i+'"'),e=n?'\n//. \n//. \n//. \n//. \n//. \n//. \n//. \n//. ```\n//.\n//. To ensure compatibility one should use the dependency versions specified\n//. in __package.json__.\n//.\n//. For convenience one could define aliases for various modules:\n//.\n//. ```javascript\n//. const S = window.sanctuary;\n//. const $ = window.sanctuaryDef;\n//. // ...\n//. ```\n//.\n//. ## API\n\n(function(f) {\n\n 'use strict';\n\n /* istanbul ignore else */\n if (typeof module === 'object' && typeof module.exports === 'object') {\n module.exports = f (require ('sanctuary-def'),\n require ('sanctuary-either'),\n require ('sanctuary-maybe'),\n require ('sanctuary-pair'),\n require ('sanctuary-show'),\n require ('sanctuary-type-classes'),\n require ('sanctuary-type-identifiers'));\n } else if (typeof define === 'function' && define.amd != null) {\n define (['sanctuary-def',\n 'sanctuary-either',\n 'sanctuary-maybe',\n 'sanctuary-pair',\n 'sanctuary-show',\n 'sanctuary-type-classes',\n 'sanctuary-type-identifiers'],\n f);\n } else {\n self.sanctuary = f (self.sanctuaryDef,\n self.sanctuaryEither,\n self.sanctuaryMaybe,\n self.sanctuaryPair,\n self.sanctuaryShow,\n self.sanctuaryTypeClasses,\n self.sanctuaryTypeIdentifiers);\n }\n\n} (function($, Either, Maybe, Pair, show, Z, type) {\n\n 'use strict';\n\n /* istanbul ignore if */\n if (typeof __doctest !== 'undefined') {\n /* eslint-disable no-unused-vars */\n var Descending = __doctest.require ('sanctuary-descending');\n var Nil = (__doctest.require ('./test/internal/List')).Nil;\n var Cons = (__doctest.require ('./test/internal/List')).Cons;\n var Sum = __doctest.require ('./test/internal/Sum');\n var S = (function(S) {\n var S_ = S.create ({\n checkTypes: true,\n env: S.env.concat ([\n (__doctest.require ('./test/internal/List')).Type ($.Unknown),\n Sum.Type\n ])\n });\n S_.env = S.env; // see S.env doctest\n return S_;\n } (require ('.')));\n /* eslint-enable no-unused-vars */\n }\n\n // Left :: a -> Either a b\n var Left = Either.Left;\n\n // Right :: b -> Either a b\n var Right = Either.Right;\n\n // Nothing :: Maybe a\n var Nothing = Maybe.Nothing;\n\n // Just :: a -> Maybe a\n var Just = Maybe.Just;\n\n // B :: (b -> c) -> (a -> b) -> a -> c\n function B(f) {\n return function(g) {\n return function(x) {\n return f (g (x));\n };\n };\n }\n\n // C :: (a -> b -> c) -> b -> a -> c\n function C(f) {\n return function(y) {\n return function(x) {\n return f (x) (y);\n };\n };\n }\n\n // get_ :: String -> a -> Maybe b\n function get_(key) {\n return B (function(obj) { return key in obj ? Just (obj[key]) : Nothing; })\n (toObject);\n }\n\n // invoke0 :: String -> a -> b\n function invoke0(name) {\n return function(target) {\n return target[name] ();\n };\n }\n\n // invoke1 :: String -> a -> b -> c\n function invoke1(name) {\n return function(x) {\n return function(target) {\n return target[name] (x);\n };\n };\n }\n\n // toObject :: a -> Object\n function toObject(x) {\n return x == null ? Object.create (null) : Object (x);\n }\n\n // :: Type\n var a = $.TypeVariable ('a');\n var b = $.TypeVariable ('b');\n var c = $.TypeVariable ('c');\n var d = $.TypeVariable ('d');\n var e = $.TypeVariable ('e');\n var g = $.TypeVariable ('g');\n var r = $.TypeVariable ('r');\n\n // :: Type -> Type\n var f = $.UnaryTypeVariable ('f');\n var m = $.UnaryTypeVariable ('m');\n var t = $.UnaryTypeVariable ('t');\n var w = $.UnaryTypeVariable ('w');\n\n // :: Type -> Type -> Type\n var p = $.BinaryTypeVariable ('p');\n var s = $.BinaryTypeVariable ('s');\n\n // TypeRep :: Type -> Type\n var TypeRep = $.UnaryType\n ('TypeRep')\n ('https://github.com/fantasyland/fantasy-land#type-representatives')\n ([])\n (function(x) {\n return $.test ([]) ($.AnyFunction) (x) ||\n x != null && $.test ([]) ($.String) (x['@@type']);\n })\n (K ([]));\n\n // Options :: Type\n var Options = $.RecordType ({checkTypes: $.Boolean, env: $.Array ($.Any)});\n\n var _ = {};\n\n //. ### Configure\n\n //# create :: { checkTypes :: Boolean, env :: Array Type } -> Module\n //.\n //. Takes an options record and returns a Sanctuary module. `checkTypes`\n //. specifies whether to enable type checking. The module's polymorphic\n //. functions (such as [`I`](#I)) require each value associated with a\n //. type variable to be a member of at least one type in the environment.\n //.\n //. A well-typed application of a Sanctuary function will produce the same\n //. result regardless of whether type checking is enabled. If type checking\n //. is enabled, a badly typed application will produce an exception with a\n //. descriptive error message.\n //.\n //. The following snippet demonstrates defining a custom type and using\n //. `create` to produce a Sanctuary module that is aware of that type:\n //.\n //. ```javascript\n //. const {create, env} = require ('sanctuary');\n //. const $ = require ('sanctuary-def');\n //. const type = require ('sanctuary-type-identifiers');\n //.\n //. // Identity :: a -> Identity a\n //. const Identity = x => {\n //. const identity = Object.create (Identity$prototype);\n //. identity.value = x;\n //. return identity;\n //. };\n //.\n //. Identity['@@type'] = 'my-package/Identity@1';\n //.\n //. const Identity$prototype = {\n //. 'constructor': Identity,\n //. '@@show': function() { return `Identity (${S.show (this.value)})`; },\n //. 'fantasy-land/map': function(f) { return Identity (f (this.value)); },\n //. };\n //.\n //. // IdentityType :: Type -> Type\n //. const IdentityType = $.UnaryType\n //. ('Identity')\n //. ('http://example.com/my-package#Identity')\n //. ([])\n //. (x => type (x) === Identity['@@type'])\n //. (identity => [identity.value]);\n //.\n //. const S = create ({\n //. checkTypes: process.env.NODE_ENV !== 'production',\n //. env: env.concat ([IdentityType ($.Unknown)]),\n //. });\n //.\n //. S.map (S.sub (1)) (Identity (43));\n //. // => Identity (42)\n //. ```\n //.\n //. See also [`env`](#env).\n function create(opts) {\n var def = $.create (opts);\n var S = {\n env: opts.env,\n is: def ('is') ({}) ([$.Type, $.Any, $.Boolean]) ($.test (opts.env)),\n Maybe: Maybe,\n Nothing: Nothing,\n Either: Either\n };\n (Object.keys (_)).forEach (function(name) {\n S[name] = def (name) (_[name].consts) (_[name].types) (_[name].impl);\n });\n S.unchecked = opts.checkTypes ? create ({checkTypes: false, env: opts.env})\n : S;\n return S;\n }\n _.create = {\n consts: {},\n types: [Options, $.Object],\n impl: create\n };\n\n //# env :: Array Type\n //.\n //. The Sanctuary module's environment (`(S.create ({checkTypes, env})).env`\n //. is a reference to `env`). Useful in conjunction with [`create`](#create).\n //.\n //. ```javascript\n //. > S.env\n //. [ $.AnyFunction,\n //. . $.Arguments,\n //. . $.Array ($.Unknown),\n //. . $.Array2 ($.Unknown) ($.Unknown),\n //. . $.Boolean,\n //. . $.Date,\n //. . $.Descending ($.Unknown),\n //. . $.Either ($.Unknown) ($.Unknown),\n //. . $.Error,\n //. . $.Fn ($.Unknown) ($.Unknown),\n //. . $.HtmlElement,\n //. . $.Identity ($.Unknown),\n //. . $.Maybe ($.Unknown),\n //. . $.Null,\n //. . $.Number,\n //. . $.Object,\n //. . $.Pair ($.Unknown) ($.Unknown),\n //. . $.RegExp,\n //. . $.StrMap ($.Unknown),\n //. . $.String,\n //. . $.Symbol,\n //. . $.Type,\n //. . $.TypeClass,\n //. . $.Undefined ]\n //. ```\n\n //# unchecked :: Module\n //.\n //. A complete Sanctuary module that performs no type checking. This is\n //. useful as it permits operations that Sanctuary's type checking would\n //. disallow, such as mapping over an object with heterogeneous values.\n //.\n //. See also [`create`](#create).\n //.\n //. ```javascript\n //. > S.unchecked.map (S.show) ({x: 'foo', y: true, z: 42})\n //. {x: '\"foo\"', y: 'true', z: '42'}\n //. ```\n //.\n //. Opting out of type checking may cause type errors to go unnoticed.\n //.\n //. ```javascript\n //. > S.unchecked.add (2) ('2')\n //. '22'\n //. ```\n\n //. ### Classify\n\n //# type :: Any -> { namespace :: Maybe String, name :: String, version :: NonNegativeInteger }\n //.\n //. Returns the result of parsing the [type identifier][] of the given value.\n //.\n //. ```javascript\n //. > S.type (S.Just (42))\n //. {namespace: Just ('sanctuary-maybe'), name: 'Maybe', version: 1}\n //.\n //. > S.type ([1, 2, 3])\n //. {namespace: Nothing, name: 'Array', version: 0}\n //. ```\n function type_(x) {\n var r = type.parse (type (x));\n r.namespace = Z.reject (equals (null), Just (r.namespace));\n return r;\n }\n _.type = {\n consts: {},\n types: [$.Any,\n $.RecordType ({namespace: $.Maybe ($.String),\n name: $.String,\n version: $.NonNegativeInteger})],\n impl: type_\n };\n\n //# is :: Type -> Any -> Boolean\n //.\n //. Returns `true` [iff][] the given value is a member of the specified type.\n //. See [`$.test`][] for details.\n //.\n //. ```javascript\n //. > S.is ($.Array ($.Integer)) ([1, 2, 3])\n //. true\n //.\n //. > S.is ($.Array ($.Integer)) ([1, 2, 3.14])\n //. false\n //. ```\n\n //. ### Showable\n\n //# show :: Any -> String\n //.\n //. Alias of [`show`][].\n //.\n //. ```javascript\n //. > S.show (-0)\n //. '-0'\n //.\n //. > S.show (['foo', 'bar', 'baz'])\n //. '[\"foo\", \"bar\", \"baz\"]'\n //.\n //. > S.show ({x: 1, y: 2, z: 3})\n //. '{\"x\": 1, \"y\": 2, \"z\": 3}'\n //.\n //. > S.show (S.Left (S.Right (S.Just (S.Nothing))))\n //. 'Left (Right (Just (Nothing)))'\n //. ```\n _.show = {\n consts: {},\n types: [$.Any, $.String],\n impl: show\n };\n\n //. ### Fantasy Land\n //.\n //. Sanctuary is compatible with the [Fantasy Land][] specification.\n\n //# equals :: Setoid a => a -> a -> Boolean\n //.\n //. Curried version of [`Z.equals`][] that requires two arguments of the\n //. same type.\n //.\n //. To compare values of different types first use [`create`](#create) to\n //. create a Sanctuary module with type checking disabled, then use that\n //. module's `equals` function.\n //.\n //. ```javascript\n //. > S.equals (0) (-0)\n //. true\n //.\n //. > S.equals (NaN) (NaN)\n //. true\n //.\n //. > S.equals (S.Just ([1, 2, 3])) (S.Just ([1, 2, 3]))\n //. true\n //.\n //. > S.equals (S.Just ([1, 2, 3])) (S.Just ([1, 2, 4]))\n //. false\n //. ```\n function equals(x) {\n return function(y) {\n return Z.equals (x, y);\n };\n }\n _.equals = {\n consts: {a: [Z.Setoid]},\n types: [a, a, $.Boolean],\n impl: equals\n };\n\n //# lt :: Ord a => a -> a -> Boolean\n //.\n //. Returns `true` [iff][] the *second* argument is less than the first\n //. according to [`Z.lt`][].\n //.\n //. ```javascript\n //. > S.filter (S.lt (3)) ([1, 2, 3, 4, 5])\n //. [1, 2]\n //. ```\n function lt(y) {\n return function(x) {\n return Z.lt (x, y);\n };\n }\n _.lt = {\n consts: {a: [Z.Ord]},\n types: [a, a, $.Boolean],\n impl: lt\n };\n\n //# lte :: Ord a => a -> a -> Boolean\n //.\n //. Returns `true` [iff][] the *second* argument is less than or equal to\n //. the first according to [`Z.lte`][].\n //.\n //. ```javascript\n //. > S.filter (S.lte (3)) ([1, 2, 3, 4, 5])\n //. [1, 2, 3]\n //. ```\n function lte(y) {\n return function(x) {\n return Z.lte (x, y);\n };\n }\n _.lte = {\n consts: {a: [Z.Ord]},\n types: [a, a, $.Boolean],\n impl: lte\n };\n\n //# gt :: Ord a => a -> a -> Boolean\n //.\n //. Returns `true` [iff][] the *second* argument is greater than the first\n //. according to [`Z.gt`][].\n //.\n //. ```javascript\n //. > S.filter (S.gt (3)) ([1, 2, 3, 4, 5])\n //. [4, 5]\n //. ```\n function gt(y) {\n return function(x) {\n return Z.gt (x, y);\n };\n }\n _.gt = {\n consts: {a: [Z.Ord]},\n types: [a, a, $.Boolean],\n impl: gt\n };\n\n //# gte :: Ord a => a -> a -> Boolean\n //.\n //. Returns `true` [iff][] the *second* argument is greater than or equal\n //. to the first according to [`Z.gte`][].\n //.\n //. ```javascript\n //. > S.filter (S.gte (3)) ([1, 2, 3, 4, 5])\n //. [3, 4, 5]\n //. ```\n function gte(y) {\n return function(x) {\n return Z.gte (x, y);\n };\n }\n _.gte = {\n consts: {a: [Z.Ord]},\n types: [a, a, $.Boolean],\n impl: gte\n };\n\n //# min :: Ord a => a -> a -> a\n //.\n //. Returns the smaller of its two arguments (according to [`Z.lte`][]).\n //.\n //. See also [`max`](#max).\n //.\n //. ```javascript\n //. > S.min (10) (2)\n //. 2\n //.\n //. > S.min (new Date ('1999-12-31')) (new Date ('2000-01-01'))\n //. new Date ('1999-12-31')\n //.\n //. > S.min ('10') ('2')\n //. '10'\n //. ```\n _.min = {\n consts: {a: [Z.Ord]},\n types: [a, a, a],\n impl: curry2 (Z.min)\n };\n\n //# max :: Ord a => a -> a -> a\n //.\n //. Returns the larger of its two arguments (according to [`Z.lte`][]).\n //.\n //. See also [`min`](#min).\n //.\n //. ```javascript\n //. > S.max (10) (2)\n //. 10\n //.\n //. > S.max (new Date ('1999-12-31')) (new Date ('2000-01-01'))\n //. new Date ('2000-01-01')\n //.\n //. > S.max ('10') ('2')\n //. '2'\n //. ```\n _.max = {\n consts: {a: [Z.Ord]},\n types: [a, a, a],\n impl: curry2 (Z.max)\n };\n\n //# clamp :: Ord a => a -> a -> a -> a\n //.\n //. Takes a lower bound, an upper bound, and a value of the same type.\n //. Returns the value if it is within the bounds; the nearer bound otherwise.\n //.\n //. See also [`min`](#min) and [`max`](#max).\n //.\n //. ```javascript\n //. > S.clamp (0) (100) (42)\n //. 42\n //.\n //. > S.clamp (0) (100) (-1)\n //. 0\n //.\n //. > S.clamp ('A') ('Z') ('~')\n //. 'Z'\n //. ```\n _.clamp = {\n consts: {a: [Z.Ord]},\n types: [a, a, a, a],\n impl: curry3 (Z.clamp)\n };\n\n //# id :: Category c => TypeRep c -> c\n //.\n //. [Type-safe][sanctuary-def] version of [`Z.id`][].\n //.\n //. ```javascript\n //. > S.id (Function) (42)\n //. 42\n //. ```\n _.id = {\n consts: {c: [Z.Category]},\n types: [TypeRep (c), c],\n impl: Z.id\n };\n\n //# concat :: Semigroup a => a -> a -> a\n //.\n //. Curried version of [`Z.concat`][].\n //.\n //. ```javascript\n //. > S.concat ('abc') ('def')\n //. 'abcdef'\n //.\n //. > S.concat ([1, 2, 3]) ([4, 5, 6])\n //. [1, 2, 3, 4, 5, 6]\n //.\n //. > S.concat ({x: 1, y: 2}) ({y: 3, z: 4})\n //. {x: 1, y: 3, z: 4}\n //.\n //. > S.concat (S.Just ([1, 2, 3])) (S.Just ([4, 5, 6]))\n //. Just ([1, 2, 3, 4, 5, 6])\n //.\n //. > S.concat (Sum (18)) (Sum (24))\n //. Sum (42)\n //. ```\n _.concat = {\n consts: {a: [Z.Semigroup]},\n types: [a, a, a],\n impl: curry2 (Z.concat)\n };\n\n //# empty :: Monoid a => TypeRep a -> a\n //.\n //. [Type-safe][sanctuary-def] version of [`Z.empty`][].\n //.\n //. ```javascript\n //. > S.empty (String)\n //. ''\n //.\n //. > S.empty (Array)\n //. []\n //.\n //. > S.empty (Object)\n //. {}\n //.\n //. > S.empty (Sum)\n //. Sum (0)\n //. ```\n _.empty = {\n consts: {a: [Z.Monoid]},\n types: [TypeRep (a), a],\n impl: Z.empty\n };\n\n //# invert :: Group g => g -> g\n //.\n //. [Type-safe][sanctuary-def] version of [`Z.invert`][].\n //.\n //. ```javascript\n //. > S.invert (Sum (5))\n //. Sum (-5)\n //. ```\n _.invert = {\n consts: {g: [Z.Group]},\n types: [g, g],\n impl: Z.invert\n };\n\n //# filter :: Filterable f => (a -> Boolean) -> f a -> f a\n //.\n //. Curried version of [`Z.filter`][]. Discards every element that does not\n //. satisfy the predicate.\n //.\n //. See also [`reject`](#reject).\n //.\n //. ```javascript\n //. > S.filter (S.odd) ([1, 2, 3])\n //. [1, 3]\n //.\n //. > S.filter (S.odd) ({x: 1, y: 2, z: 3})\n //. {x: 1, z: 3}\n //.\n //. > S.filter (S.odd) (S.Nothing)\n //. Nothing\n //.\n //. > S.filter (S.odd) (S.Just (0))\n //. Nothing\n //.\n //. > S.filter (S.odd) (S.Just (1))\n //. Just (1)\n //. ```\n function filter(pred) {\n return function(filterable) {\n return Z.filter (pred, filterable);\n };\n }\n _.filter = {\n consts: {f: [Z.Filterable]},\n types: [$.Predicate (a), f (a), f (a)],\n impl: filter\n };\n\n //# reject :: Filterable f => (a -> Boolean) -> f a -> f a\n //.\n //. Curried version of [`Z.reject`][]. Discards every element that satisfies\n //. the predicate.\n //.\n //. See also [`filter`](#filter).\n //.\n //. ```javascript\n //. > S.reject (S.odd) ([1, 2, 3])\n //. [2]\n //.\n //. > S.reject (S.odd) ({x: 1, y: 2, z: 3})\n //. {y: 2}\n //.\n //. > S.reject (S.odd) (S.Nothing)\n //. Nothing\n //.\n //. > S.reject (S.odd) (S.Just (0))\n //. Just (0)\n //.\n //. > S.reject (S.odd) (S.Just (1))\n //. Nothing\n //. ```\n function reject(pred) {\n return function(filterable) {\n return Z.reject (pred, filterable);\n };\n }\n _.reject = {\n consts: {f: [Z.Filterable]},\n types: [$.Predicate (a), f (a), f (a)],\n impl: reject\n };\n\n //# map :: Functor f => (a -> b) -> f a -> f b\n //.\n //. Curried version of [`Z.map`][].\n //.\n //. ```javascript\n //. > S.map (Math.sqrt) ([1, 4, 9])\n //. [1, 2, 3]\n //.\n //. > S.map (Math.sqrt) ({x: 1, y: 4, z: 9})\n //. {x: 1, y: 2, z: 3}\n //.\n //. > S.map (Math.sqrt) (S.Just (9))\n //. Just (3)\n //.\n //. > S.map (Math.sqrt) (S.Right (9))\n //. Right (3)\n //.\n //. > S.map (Math.sqrt) (S.Pair (99980001) (99980001))\n //. Pair (99980001) (9999)\n //. ```\n //.\n //. Replacing `Functor f => f` with `Function x` produces the B combinator\n //. from combinatory logic (i.e. [`compose`](#compose)):\n //.\n //. Functor f => (a -> b) -> f a -> f b\n //. (a -> b) -> Function x a -> Function x b\n //. (a -> c) -> Function x a -> Function x c\n //. (b -> c) -> Function x b -> Function x c\n //. (b -> c) -> Function a b -> Function a c\n //. (b -> c) -> (a -> b) -> (a -> c)\n //.\n //. ```javascript\n //. > S.map (Math.sqrt) (S.add (1)) (99)\n //. 10\n //. ```\n function map(f) {\n return function(functor) {\n return Z.map (f, functor);\n };\n }\n _.map = {\n consts: {f: [Z.Functor]},\n types: [$.Fn (a) (b), f (a), f (b)],\n impl: map\n };\n\n //# flip :: Functor f => f (a -> b) -> a -> f b\n //.\n //. Curried version of [`Z.flip`][]. Maps over the given functions, applying\n //. each to the given value.\n //.\n //. Replacing `Functor f => f` with `Function x` produces the C combinator\n //. from combinatory logic:\n //.\n //. Functor f => f (a -> b) -> a -> f b\n //. Function x (a -> b) -> a -> Function x b\n //. Function x (a -> c) -> a -> Function x c\n //. Function x (b -> c) -> b -> Function x c\n //. Function a (b -> c) -> b -> Function a c\n //. (a -> b -> c) -> b -> a -> c\n //.\n //. ```javascript\n //. > S.flip (S.concat) ('!') ('foo')\n //. 'foo!'\n //.\n //. > S.flip ([Math.floor, Math.ceil]) (1.5)\n //. [1, 2]\n //.\n //. > S.flip ({floor: Math.floor, ceil: Math.ceil}) (1.5)\n //. {floor: 1, ceil: 2}\n //.\n //. > S.flip (Cons (Math.floor) (Cons (Math.ceil) (Nil))) (1.5)\n //. Cons (1) (Cons (2) (Nil))\n //. ```\n _.flip = {\n consts: {f: [Z.Functor]},\n types: [f ($.Fn (a) (b)), a, f (b)],\n impl: curry2 (Z.flip)\n };\n\n //# bimap :: Bifunctor f => (a -> b) -> (c -> d) -> f a c -> f b d\n //.\n //. Curried version of [`Z.bimap`][].\n //.\n //. ```javascript\n //. > S.bimap (S.toUpper) (Math.sqrt) (S.Pair ('foo') (64))\n //. Pair ('FOO') (8)\n //.\n //. > S.bimap (S.toUpper) (Math.sqrt) (S.Left ('foo'))\n //. Left ('FOO')\n //.\n //. > S.bimap (S.toUpper) (Math.sqrt) (S.Right (64))\n //. Right (8)\n //. ```\n _.bimap = {\n consts: {p: [Z.Bifunctor]},\n types: [$.Fn (a) (b), $.Fn (c) (d), p (a) (c), p (b) (d)],\n impl: curry3 (Z.bimap)\n };\n\n //# mapLeft :: Bifunctor f => (a -> b) -> f a c -> f b c\n //.\n //. Curried version of [`Z.mapLeft`][]. Maps the given function over the left\n //. side of a Bifunctor.\n //.\n //. ```javascript\n //. > S.mapLeft (S.toUpper) (S.Pair ('foo') (64))\n //. Pair ('FOO') (64)\n //.\n //. > S.mapLeft (S.toUpper) (S.Left ('foo'))\n //. Left ('FOO')\n //.\n //. > S.mapLeft (S.toUpper) (S.Right (64))\n //. Right (64)\n //. ```\n _.mapLeft = {\n consts: {p: [Z.Bifunctor]},\n types: [$.Fn (a) (b), p (a) (c), p (b) (c)],\n impl: curry2 (Z.mapLeft)\n };\n\n //# promap :: Profunctor p => (a -> b) -> (c -> d) -> p b c -> p a d\n //.\n //. Curried version of [`Z.promap`][].\n //.\n //. ```javascript\n //. > S.promap (Math.abs) (S.add (1)) (Math.sqrt) (-100)\n //. 11\n //. ```\n _.promap = {\n consts: {p: [Z.Profunctor]},\n types: [$.Fn (a) (b), $.Fn (c) (d), p (b) (c), p (a) (d)],\n impl: curry3 (Z.promap)\n };\n\n //# alt :: Alt f => f a -> f a -> f a\n //.\n //. Curried version of [`Z.alt`][] with arguments flipped to facilitate\n //. partial application.\n //.\n //. ```javascript\n //. > S.alt (S.Just ('default')) (S.Nothing)\n //. Just ('default')\n //.\n //. > S.alt (S.Just ('default')) (S.Just ('hello'))\n //. Just ('hello')\n //.\n //. > S.alt (S.Right (0)) (S.Left ('X'))\n //. Right (0)\n //.\n //. > S.alt (S.Right (0)) (S.Right (1))\n //. Right (1)\n //. ```\n function alt(y) {\n return function(x) {\n return Z.alt (x, y);\n };\n }\n _.alt = {\n consts: {f: [Z.Alt]},\n types: [f (a), f (a), f (a)],\n impl: alt\n };\n\n //# zero :: Plus f => TypeRep f -> f a\n //.\n //. [Type-safe][sanctuary-def] version of [`Z.zero`][].\n //.\n //. ```javascript\n //. > S.zero (Array)\n //. []\n //.\n //. > S.zero (Object)\n //. {}\n //.\n //. > S.zero (S.Maybe)\n //. Nothing\n //. ```\n _.zero = {\n consts: {f: [Z.Plus]},\n types: [TypeRep (f (a)), f (a)],\n impl: Z.zero\n };\n\n //# reduce :: Foldable f => (b -> a -> b) -> b -> f a -> b\n //.\n //. Takes a curried binary function, an initial value, and a [Foldable][],\n //. and applies the function to the initial value and the Foldable's first\n //. value, then applies the function to the result of the previous\n //. application and the Foldable's second value. Repeats this process\n //. until each of the Foldable's values has been used. Returns the initial\n //. value if the Foldable is empty; the result of the final application\n //. otherwise.\n //.\n //. ```javascript\n //. > S.reduce (S.add) (0) ([1, 2, 3, 4, 5])\n //. 15\n //.\n //. > S.reduce (xs => x => S.prepend (x) (xs)) ([]) ([1, 2, 3, 4, 5])\n //. [5, 4, 3, 2, 1]\n //. ```\n function reduce(f) {\n return function(initial) {\n return function(foldable) {\n return Z.reduce (function(y, x) { return f (y) (x); },\n initial,\n foldable);\n };\n };\n }\n _.reduce = {\n consts: {f: [Z.Foldable]},\n types: [$.Fn (a) ($.Fn (b) (a)), a, f (b), a],\n impl: reduce\n };\n\n //# traverse :: (Applicative f, Traversable t) => TypeRep f -> (a -> f b) -> t a -> f (t b)\n //.\n //. Curried version of [`Z.traverse`][].\n //.\n //. ```javascript\n //. > S.traverse (Array) (S.words) (S.Just ('foo bar baz'))\n //. [Just ('foo'), Just ('bar'), Just ('baz')]\n //.\n //. > S.traverse (Array) (S.words) (S.Nothing)\n //. [Nothing]\n //.\n //. > S.traverse (S.Maybe) (S.parseInt (16)) (['A', 'B', 'C'])\n //. Just ([10, 11, 12])\n //.\n //. > S.traverse (S.Maybe) (S.parseInt (16)) (['A', 'B', 'C', 'X'])\n //. Nothing\n //.\n //. > S.traverse (S.Maybe) (S.parseInt (16)) ({a: 'A', b: 'B', c: 'C'})\n //. Just ({a: 10, b: 11, c: 12})\n //.\n //. > S.traverse (S.Maybe) (S.parseInt (16)) ({a: 'A', b: 'B', c: 'C', x: 'X'})\n //. Nothing\n //. ```\n _.traverse = {\n consts: {f: [Z.Applicative], t: [Z.Traversable]},\n types: [TypeRep (f (b)), $.Fn (a) (f (b)), t (a), f (t (b))],\n impl: curry3 (Z.traverse)\n };\n\n //# sequence :: (Applicative f, Traversable t) => TypeRep f -> t (f a) -> f (t a)\n //.\n //. Curried version of [`Z.sequence`][]. Inverts the given `t (f a)`\n //. to produce an `f (t a)`.\n //.\n //. ```javascript\n //. > S.sequence (Array) (S.Just ([1, 2, 3]))\n //. [Just (1), Just (2), Just (3)]\n //.\n //. > S.sequence (S.Maybe) ([S.Just (1), S.Just (2), S.Just (3)])\n //. Just ([1, 2, 3])\n //.\n //. > S.sequence (S.Maybe) ([S.Just (1), S.Just (2), S.Nothing])\n //. Nothing\n //.\n //. > S.sequence (S.Maybe) ({a: S.Just (1), b: S.Just (2), c: S.Just (3)})\n //. Just ({a: 1, b: 2, c: 3})\n //.\n //. > S.sequence (S.Maybe) ({a: S.Just (1), b: S.Just (2), c: S.Nothing})\n //. Nothing\n //. ```\n _.sequence = {\n consts: {f: [Z.Applicative], t: [Z.Traversable]},\n types: [TypeRep (f (a)), t (f (a)), f (t (a))],\n impl: curry2 (Z.sequence)\n };\n\n //# ap :: Apply f => f (a -> b) -> f a -> f b\n //.\n //. Curried version of [`Z.ap`][].\n //.\n //. ```javascript\n //. > S.ap ([Math.sqrt, x => x * x]) ([1, 4, 9, 16, 25])\n //. [1, 2, 3, 4, 5, 1, 16, 81, 256, 625]\n //.\n //. > S.ap ({x: Math.sqrt, y: S.add (1), z: S.sub (1)}) ({w: 4, x: 4, y: 4})\n //. {x: 2, y: 5}\n //.\n //. > S.ap (S.Just (Math.sqrt)) (S.Just (64))\n //. Just (8)\n //. ```\n //.\n //. Replacing `Apply f => f` with `Function x` produces the S combinator\n //. from combinatory logic:\n //.\n //. Apply f => f (a -> b) -> f a -> f b\n //. Function x (a -> b) -> Function x a -> Function x b\n //. Function x (a -> c) -> Function x a -> Function x c\n //. Function x (b -> c) -> Function x b -> Function x c\n //. Function a (b -> c) -> Function a b -> Function a c\n //. (a -> b -> c) -> (a -> b) -> (a -> c)\n //.\n //. ```javascript\n //. > S.ap (s => n => s.slice (0, n)) (s => Math.ceil (s.length / 2)) ('Haskell')\n //. 'Hask'\n //. ```\n _.ap = {\n consts: {f: [Z.Apply]},\n types: [f ($.Fn (a) (b)), f (a), f (b)],\n impl: curry2 (Z.ap)\n };\n\n //# lift2 :: Apply f => (a -> b -> c) -> f a -> f b -> f c\n //.\n //. Promotes a curried binary function to a function that operates on two\n //. [Apply][]s.\n //.\n //. ```javascript\n //. > S.lift2 (S.add) (S.Just (2)) (S.Just (3))\n //. Just (5)\n //.\n //. > S.lift2 (S.add) (S.Just (2)) (S.Nothing)\n //. Nothing\n //.\n //. > S.lift2 (S.and) (S.Just (true)) (S.Just (true))\n //. Just (true)\n //.\n //. > S.lift2 (S.and) (S.Just (true)) (S.Just (false))\n //. Just (false)\n //. ```\n _.lift2 = {\n consts: {f: [Z.Apply]},\n types: [$.Fn (a) ($.Fn (b) (c)), f (a), f (b), f (c)],\n impl: curry3 (Z.lift2)\n };\n\n //# lift3 :: Apply f => (a -> b -> c -> d) -> f a -> f b -> f c -> f d\n //.\n //. Promotes a curried ternary function to a function that operates on three\n //. [Apply][]s.\n //.\n //. ```javascript\n //. > S.lift3 (S.reduce) (S.Just (S.add)) (S.Just (0)) (S.Just ([1, 2, 3]))\n //. Just (6)\n //.\n //. > S.lift3 (S.reduce) (S.Just (S.add)) (S.Just (0)) (S.Nothing)\n //. Nothing\n //. ```\n _.lift3 = {\n consts: {f: [Z.Apply]},\n types: [$.Fn (a) ($.Fn (b) ($.Fn (c) (d))), f (a), f (b), f (c), f (d)],\n impl: curry4 (Z.lift3)\n };\n\n //# apFirst :: Apply f => f a -> f b -> f a\n //.\n //. Curried version of [`Z.apFirst`][]. Combines two effectful actions,\n //. keeping only the result of the first. Equivalent to Haskell's `(<*)`\n //. function.\n //.\n //. See also [`apSecond`](#apSecond).\n //.\n //. ```javascript\n //. > S.apFirst ([1, 2]) ([3, 4])\n //. [1, 1, 2, 2]\n //.\n //. > S.apFirst (S.Just (1)) (S.Just (2))\n //. Just (1)\n //. ```\n _.apFirst = {\n consts: {f: [Z.Apply]},\n types: [f (a), f (b), f (a)],\n impl: curry2 (Z.apFirst)\n };\n\n //# apSecond :: Apply f => f a -> f b -> f b\n //.\n //. Curried version of [`Z.apSecond`][]. Combines two effectful actions,\n //. keeping only the result of the second. Equivalent to Haskell's `(*>)`\n //. function.\n //.\n //. See also [`apFirst`](#apFirst).\n //.\n //. ```javascript\n //. > S.apSecond ([1, 2]) ([3, 4])\n //. [3, 4, 3, 4]\n //.\n //. > S.apSecond (S.Just (1)) (S.Just (2))\n //. Just (2)\n //. ```\n _.apSecond = {\n consts: {f: [Z.Apply]},\n types: [f (a), f (b), f (b)],\n impl: curry2 (Z.apSecond)\n };\n\n //# of :: Applicative f => TypeRep f -> a -> f a\n //.\n //. Curried version of [`Z.of`][].\n //.\n //. ```javascript\n //. > S.of (Array) (42)\n //. [42]\n //.\n //. > S.of (Function) (42) (null)\n //. 42\n //.\n //. > S.of (S.Maybe) (42)\n //. Just (42)\n //.\n //. > S.of (S.Either) (42)\n //. Right (42)\n //. ```\n function of(typeRep) {\n return function(x) {\n return Z.of (typeRep, x);\n };\n }\n _.of = {\n consts: {f: [Z.Applicative]},\n types: [TypeRep (f (a)), a, f (a)],\n impl: of\n };\n\n //# chain :: Chain m => (a -> m b) -> m a -> m b\n //.\n //. Curried version of [`Z.chain`][].\n //.\n //. ```javascript\n //. > S.chain (x => [x, x]) ([1, 2, 3])\n //. [1, 1, 2, 2, 3, 3]\n //.\n //. > S.chain (n => s => s.slice (0, n)) (s => Math.ceil (s.length / 2)) ('slice')\n //. 'sli'\n //.\n //. > S.chain (S.parseInt (10)) (S.Just ('123'))\n //. Just (123)\n //.\n //. > S.chain (S.parseInt (10)) (S.Just ('XXX'))\n //. Nothing\n //. ```\n _.chain = {\n consts: {m: [Z.Chain]},\n types: [$.Fn (a) (m (b)), m (a), m (b)],\n impl: curry2 (Z.chain)\n };\n\n //# join :: Chain m => m (m a) -> m a\n //.\n //. [Type-safe][sanctuary-def] version of [`Z.join`][].\n //. Removes one level of nesting from a nested monadic structure.\n //.\n //. ```javascript\n //. > S.join ([[1], [2], [3]])\n //. [1, 2, 3]\n //.\n //. > S.join ([[[1, 2, 3]]])\n //. [[1, 2, 3]]\n //.\n //. > S.join (S.Just (S.Just (1)))\n //. Just (1)\n //.\n //. > S.join (S.Pair ('foo') (S.Pair ('bar') ('baz')))\n //. Pair ('foobar') ('baz')\n //. ```\n //.\n //. Replacing `Chain m => m` with `Function x` produces the W combinator\n //. from combinatory logic:\n //.\n //. Chain m => m (m a) -> m a\n //. Function x (Function x a) -> Function x a\n //. (x -> x -> a) -> (x -> a)\n //.\n //. ```javascript\n //. > S.join (S.concat) ('abc')\n //. 'abcabc'\n //. ```\n _.join = {\n consts: {m: [Z.Chain]},\n types: [m (m (a)), m (a)],\n impl: Z.join\n };\n\n //# chainRec :: ChainRec m => TypeRep m -> (a -> m (Either a b)) -> a -> m b\n //.\n //. Performs a [`chain`](#chain)-like computation with constant stack usage.\n //. Similar to [`Z.chainRec`][], but curried and more convenient due to the\n //. use of the Either type to indicate completion (via a Right).\n //.\n //. ```javascript\n //. > S.chainRec (Array)\n //. . (s => s.length === 2 ? S.map (S.Right) ([s + '!', s + '?'])\n //. . : S.map (S.Left) ([s + 'o', s + 'n']))\n //. . ('')\n //. ['oo!', 'oo?', 'on!', 'on?', 'no!', 'no?', 'nn!', 'nn?']\n //. ```\n function chainRec(typeRep) {\n return function(f) {\n return function(x) {\n return Z.chainRec (typeRep, step, x);\n };\n function step(next, done, x) {\n return Z.map (either (next) (done), f (x));\n }\n };\n }\n _.chainRec = {\n consts: {m: [Z.ChainRec]},\n types: [TypeRep (m (b)), $.Fn (a) (m ($.Either (a) (b))), a, m (b)],\n impl: chainRec\n };\n\n //# extend :: Extend w => (w a -> b) -> w a -> w b\n //.\n //. Curried version of [`Z.extend`][].\n //.\n //. ```javascript\n //. > S.extend (S.joinWith ('')) (['x', 'y', 'z'])\n //. ['xyz', 'yz', 'z']\n //.\n //. > S.extend (f => f ([3, 4])) (S.reverse) ([1, 2])\n //. [4, 3, 2, 1]\n //. ```\n _.extend = {\n consts: {w: [Z.Extend]},\n types: [$.Fn (w (a)) (b), w (a), w (b)],\n impl: curry2 (Z.extend)\n };\n\n //# duplicate :: Extend w => w a -> w (w a)\n //.\n //. [Type-safe][sanctuary-def] version of [`Z.duplicate`][].\n //. Adds one level of nesting to a comonadic structure.\n //.\n //. ```javascript\n //. > S.duplicate (S.Just (1))\n //. Just (Just (1))\n //.\n //. > S.duplicate ([1])\n //. [[1]]\n //.\n //. > S.duplicate ([1, 2, 3])\n //. [[1, 2, 3], [2, 3], [3]]\n //.\n //. > S.duplicate (S.reverse) ([1, 2]) ([3, 4])\n //. [4, 3, 2, 1]\n //. ```\n _.duplicate = {\n consts: {w: [Z.Extend]},\n types: [w (a), w (w (a))],\n impl: Z.duplicate\n };\n\n //# extract :: Comonad w => w a -> a\n //.\n //. [Type-safe][sanctuary-def] version of [`Z.extract`][].\n //.\n //. ```javascript\n //. > S.extract (S.Pair ('foo') ('bar'))\n //. 'bar'\n //. ```\n _.extract = {\n consts: {w: [Z.Comonad]},\n types: [w (a), a],\n impl: Z.extract\n };\n\n //# contramap :: Contravariant f => (b -> a) -> f a -> f b\n //.\n //. [Type-safe][sanctuary-def] version of [`Z.contramap`][].\n //.\n //. ```javascript\n //. > S.contramap (s => s.length) (Math.sqrt) ('Sanctuary')\n //. 3\n //. ```\n _.contramap = {\n consts: {f: [Z.Contravariant]},\n types: [$.Fn (b) (a), f (a), f (b)],\n impl: curry2 (Z.contramap)\n };\n\n //. ### Combinator\n\n //# I :: a -> a\n //.\n //. The I combinator. Returns its argument. Equivalent to Haskell's `id`\n //. function.\n //.\n //. ```javascript\n //. > S.I ('foo')\n //. 'foo'\n //. ```\n function I(x) {\n return x;\n }\n _.I = {\n consts: {},\n types: [a, a],\n impl: I\n };\n\n //# K :: a -> b -> a\n //.\n //. The K combinator. Takes two values and returns the first. Equivalent to\n //. Haskell's `const` function.\n //.\n //. ```javascript\n //. > S.K ('foo') ('bar')\n //. 'foo'\n //.\n //. > S.map (S.K (42)) (S.range (0) (5))\n //. [42, 42, 42, 42, 42]\n //. ```\n function K(x) {\n return function(y) {\n return x;\n };\n }\n _.K = {\n consts: {},\n types: [a, b, a],\n impl: K\n };\n\n //# T :: a -> (a -> b) -> b\n //.\n //. The T ([thrush][]) combinator. Takes a value and a function, and returns\n //. the result of applying the function to the value. Equivalent to Haskell's\n //. `(&)` function.\n //.\n //. ```javascript\n //. > S.T (42) (S.add (1))\n //. 43\n //.\n //. > S.map (S.T (100)) ([S.add (1), Math.sqrt])\n //. [101, 10]\n //. ```\n function T(x) {\n return function(f) {\n return f (x);\n };\n }\n _.T = {\n consts: {},\n types: [a, $.Fn (a) (b), b],\n impl: T\n };\n\n //. ### Function\n\n //# curry2 :: ((a, b) -> c) -> a -> b -> c\n //.\n //. Curries the given binary function.\n //.\n //. ```javascript\n //. > S.map (S.curry2 (Math.pow) (10)) ([1, 2, 3])\n //. [10, 100, 1000]\n //. ```\n function curry2(f) {\n return function(x) {\n return function(y) {\n return f (x, y);\n };\n };\n }\n _.curry2 = {\n consts: {},\n types: [$.Function ([a, b, c]), a, b, c],\n impl: curry2\n };\n\n //# curry3 :: ((a, b, c) -> d) -> a -> b -> c -> d\n //.\n //. Curries the given ternary function.\n //.\n //. ```javascript\n //. > const replaceString = S.curry3 ((what, replacement, string) =>\n //. . string.replace (what, replacement)\n //. . )\n //.\n //. > replaceString ('banana') ('orange') ('banana icecream')\n //. 'orange icecream'\n //. ```\n function curry3(f) {\n return function(x) {\n return function(y) {\n return function(z) {\n return f (x, y, z);\n };\n };\n };\n }\n _.curry3 = {\n consts: {},\n types: [$.Function ([a, b, c, d]), a, b, c, d],\n impl: curry3\n };\n\n //# curry4 :: ((a, b, c, d) -> e) -> a -> b -> c -> d -> e\n //.\n //. Curries the given quaternary function.\n //.\n //. ```javascript\n //. > const createRect = S.curry4 ((x, y, width, height) =>\n //. . ({x, y, width, height})\n //. . )\n //.\n //. > createRect (0) (0) (10) (10)\n //. {x: 0, y: 0, width: 10, height: 10}\n //. ```\n function curry4(f) {\n return function(w) {\n return function(x) {\n return function(y) {\n return function(z) {\n return f (w, x, y, z);\n };\n };\n };\n };\n }\n _.curry4 = {\n consts: {},\n types: [$.Function ([a, b, c, d, e]), a, b, c, d, e],\n impl: curry4\n };\n\n //# curry5 :: ((a, b, c, d, e) -> f) -> a -> b -> c -> d -> e -> f\n //.\n //. Curries the given quinary function.\n //.\n //. ```javascript\n //. > const toUrl = S.curry5 ((protocol, creds, hostname, port, pathname) =>\n //. . protocol + '//' +\n //. . S.maybe ('') (S.flip (S.concat) ('@')) (creds) +\n //. . hostname +\n //. . S.maybe ('') (S.concat (':')) (port) +\n //. . pathname\n //. . )\n //.\n //. > toUrl ('https:') (S.Nothing) ('example.com') (S.Just ('443')) ('/foo/bar')\n //. 'https://example.com:443/foo/bar'\n //. ```\n function curry5(f) {\n return function(v) {\n return function(w) {\n return function(x) {\n return function(y) {\n return function(z) {\n return f (v, w, x, y, z);\n };\n };\n };\n };\n };\n }\n _.curry5 = {\n consts: {},\n types: [$.Function ([a, b, c, d, e, r]), a, b, c, d, e, r],\n impl: curry5\n };\n\n //. ### Composition\n\n //# compose :: Semigroupoid s => s b c -> s a b -> s a c\n //.\n //. Curried version of [`Z.compose`][].\n //.\n //. When specialized to Function, `compose` composes two unary functions,\n //. from right to left (this is the B combinator from combinatory logic).\n //.\n //. The generalized type signature indicates that `compose` is compatible\n //. with any [Semigroupoid][].\n //.\n //. See also [`pipe`](#pipe).\n //.\n //. ```javascript\n //. > S.compose (Math.sqrt) (S.add (1)) (99)\n //. 10\n //. ```\n _.compose = {\n consts: {s: [Z.Semigroupoid]},\n types: [s (b) (c), s (a) (b), s (a) (c)],\n impl: curry2 (Z.compose)\n };\n\n //# pipe :: Foldable f => f (Any -> Any) -> a -> b\n //.\n //. Takes a sequence of functions assumed to be unary and a value of any\n //. type, and returns the result of applying the sequence of transformations\n //. to the initial value.\n //.\n //. In general terms, `pipe` performs left-to-right composition of a sequence\n //. of functions. `pipe ([f, g, h]) (x)` is equivalent to `h (g (f (x)))`.\n //.\n //. ```javascript\n //. > S.pipe ([S.add (1), Math.sqrt, S.sub (1)]) (99)\n //. 9\n //. ```\n function pipe(fs) {\n return function(x) {\n return reduce (T) (x) (fs);\n };\n }\n _.pipe = {\n consts: {f: [Z.Foldable]},\n types: [f ($.Fn ($.Any) ($.Any)), a, b],\n impl: pipe\n };\n\n //# pipeK :: (Foldable f, Chain m) => f (Any -> m Any) -> m a -> m b\n //.\n //. Takes a sequence of functions assumed to be unary that return values\n //. with a [Chain][], and a value of that Chain, and returns the result\n //. of applying the sequence of transformations to the initial value.\n //.\n //. In general terms, `pipeK` performs left-to-right [Kleisli][] composition\n //. of an sequence of functions. `pipeK ([f, g, h]) (x)` is equivalent to\n //. `chain (h) (chain (g) (chain (f) (x)))`.\n //.\n //. ```javascript\n //. > S.pipeK ([S.tail, S.tail, S.head]) (S.Just ([1, 2, 3, 4]))\n //. Just (3)\n //. ```\n function pipeK(fs) {\n return function(x) {\n return Z.reduce (function(x, f) { return Z.chain (f, x); }, x, fs);\n };\n }\n _.pipeK = {\n consts: {f: [Z.Foldable], m: [Z.Chain]},\n types: [f ($.Fn ($.Any) (m ($.Any))), m (a), m (b)],\n impl: pipeK\n };\n\n //# on :: (b -> b -> c) -> (a -> b) -> a -> a -> c\n //.\n //. Takes a binary function `f`, a unary function `g`, and two\n //. values `x` and `y`. Returns `f (g (x)) (g (y))`.\n //.\n //. This is the P combinator from combinatory logic.\n //.\n //. ```javascript\n //. > S.on (S.concat) (S.reverse) ([1, 2, 3]) ([4, 5, 6])\n //. [3, 2, 1, 6, 5, 4]\n //. ```\n function on(f) {\n return function(g) {\n return function(x) {\n return function(y) {\n return f (g (x)) (g (y));\n };\n };\n };\n }\n _.on = {\n consts: {},\n types: [$.Fn (b) ($.Fn (b) (c)), $.Fn (a) (b), a, a, c],\n impl: on\n };\n\n //. ### Pair\n //.\n //. Pair is the canonical product type: a value of type `Pair a b` always\n //. contains exactly two values: one of type `a`; one of type `b`.\n //.\n //. The implementation is provided by [sanctuary-pair][].\n\n //# Pair :: a -> b -> Pair a b\n //.\n //. Pair's sole data constructor. Additionally, it serves as the\n //. Pair [type representative][].\n //.\n //. ```javascript\n //. > S.Pair ('foo') (42)\n //. Pair ('foo') (42)\n //. ```\n _.Pair = {\n consts: {},\n types: [a, b, $.Pair (a) (b)],\n impl: Pair\n };\n\n //# pair :: (a -> b -> c) -> Pair a b -> c\n //.\n //. Case analysis for the `Pair a b` type.\n //.\n //. ```javascript\n //. > S.pair (S.concat) (S.Pair ('foo') ('bar'))\n //. 'foobar'\n //. ```\n function pair(f) {\n return function(pair) {\n return f (pair.fst) (pair.snd);\n };\n }\n _.pair = {\n consts: {},\n types: [$.Fn (a) ($.Fn (b) (c)), $.Pair (a) (b), c],\n impl: pair\n };\n\n //# fst :: Pair a b -> a\n //.\n //. `fst (Pair (x) (y))` is equivalent to `x`.\n //.\n //. ```javascript\n //. > S.fst (S.Pair ('foo') (42))\n //. 'foo'\n //. ```\n _.fst = {\n consts: {},\n types: [$.Pair (a) (b), a],\n impl: pair (K)\n };\n\n //# snd :: Pair a b -> b\n //.\n //. `snd (Pair (x) (y))` is equivalent to `y`.\n //.\n //. ```javascript\n //. > S.snd (S.Pair ('foo') (42))\n //. 42\n //. ```\n _.snd = {\n consts: {},\n types: [$.Pair (a) (b), b],\n impl: pair (C (K))\n };\n\n //# swap :: Pair a b -> Pair b a\n //.\n //. `swap (Pair (x) (y))` is equivalent to `Pair (y) (x)`.\n //.\n //. ```javascript\n //. > S.swap (S.Pair ('foo') (42))\n //. Pair (42) ('foo')\n //. ```\n _.swap = {\n consts: {},\n types: [$.Pair (a) (b), $.Pair (b) (a)],\n impl: pair (C (Pair))\n };\n\n //. ### Maybe\n //.\n //. The Maybe type represents optional values: a value of type `Maybe a` is\n //. either Nothing (the empty value) or a Just whose value is of type `a`.\n //.\n //. The implementation is provided by [sanctuary-maybe][].\n\n //# Maybe :: TypeRep Maybe\n //.\n //. Maybe [type representative][].\n\n //# Nothing :: Maybe a\n //.\n //. The empty value of type `Maybe a`.\n //.\n //. ```javascript\n //. > S.Nothing\n //. Nothing\n //. ```\n\n //# Just :: a -> Maybe a\n //.\n //. Constructs a value of type `Maybe a` from a value of type `a`.\n //.\n //. ```javascript\n //. > S.Just (42)\n //. Just (42)\n //. ```\n _.Just = {\n consts: {},\n types: [a, $.Maybe (a)],\n impl: Just\n };\n\n //# isNothing :: Maybe a -> Boolean\n //.\n //. Returns `true` if the given Maybe is Nothing; `false` if it is a Just.\n //.\n //. ```javascript\n //. > S.isNothing (S.Nothing)\n //. true\n //.\n //. > S.isNothing (S.Just (42))\n //. false\n //. ```\n function isNothing(maybe) {\n return maybe.isNothing;\n }\n _.isNothing = {\n consts: {},\n types: [$.Maybe (a), $.Boolean],\n impl: isNothing\n };\n\n //# isJust :: Maybe a -> Boolean\n //.\n //. Returns `true` if the given Maybe is a Just; `false` if it is Nothing.\n //.\n //. ```javascript\n //. > S.isJust (S.Just (42))\n //. true\n //.\n //. > S.isJust (S.Nothing)\n //. false\n //. ```\n function isJust(maybe) {\n return maybe.isJust;\n }\n _.isJust = {\n consts: {},\n types: [$.Maybe (a), $.Boolean],\n impl: isJust\n };\n\n //# fromMaybe :: a -> Maybe a -> a\n //.\n //. Takes a default value and a Maybe, and returns the Maybe's value\n //. if the Maybe is a Just; the default value otherwise.\n //.\n //. See also [`fromMaybe_`](#fromMaybe_) and\n //. [`maybeToNullable`](#maybeToNullable).\n //.\n //. ```javascript\n //. > S.fromMaybe (0) (S.Just (42))\n //. 42\n //.\n //. > S.fromMaybe (0) (S.Nothing)\n //. 0\n //. ```\n _.fromMaybe = {\n consts: {},\n types: [a, $.Maybe (a), a],\n impl: C (maybe) (I)\n };\n\n //# fromMaybe_ :: (() -> a) -> Maybe a -> a\n //.\n //. Variant of [`fromMaybe`](#fromMaybe) that takes a thunk so the default\n //. value is only computed if required.\n //.\n //. ```javascript\n //. > function fib(n) { return n <= 1 ? n : fib (n - 2) + fib (n - 1); }\n //.\n //. > S.fromMaybe_ (() => fib (30)) (S.Just (1000000))\n //. 1000000\n //.\n //. > S.fromMaybe_ (() => fib (30)) (S.Nothing)\n //. 832040\n //. ```\n _.fromMaybe_ = {\n consts: {},\n types: [$.Thunk (a), $.Maybe (a), a],\n impl: C (maybe_) (I)\n };\n\n //# maybeToNullable :: Maybe a -> Nullable a\n //.\n //. Returns the given Maybe's value if the Maybe is a Just; `null` otherwise.\n //. [Nullable][] is defined in [sanctuary-def][].\n //.\n //. See also [`fromMaybe`](#fromMaybe).\n //.\n //. ```javascript\n //. > S.maybeToNullable (S.Just (42))\n //. 42\n //.\n //. > S.maybeToNullable (S.Nothing)\n //. null\n //. ```\n function maybeToNullable(maybe) {\n return maybe.isJust ? maybe.value : null;\n }\n _.maybeToNullable = {\n consts: {},\n types: [$.Maybe (a), $.Nullable (a)],\n impl: maybeToNullable\n };\n\n //# maybe :: b -> (a -> b) -> Maybe a -> b\n //.\n //. Takes a value of any type, a function, and a Maybe. If the Maybe is\n //. a Just, the return value is the result of applying the function to\n //. the Just's value. Otherwise, the first argument is returned.\n //.\n //. See also [`maybe_`](#maybe_).\n //.\n //. ```javascript\n //. > S.maybe (0) (S.prop ('length')) (S.Just ('refuge'))\n //. 6\n //.\n //. > S.maybe (0) (S.prop ('length')) (S.Nothing)\n //. 0\n //. ```\n function maybe(x) {\n return function(f) {\n return function(maybe) {\n return maybe.isJust ? f (maybe.value) : x;\n };\n };\n }\n _.maybe = {\n consts: {},\n types: [b, $.Fn (a) (b), $.Maybe (a), b],\n impl: maybe\n };\n\n //# maybe_ :: (() -> b) -> (a -> b) -> Maybe a -> b\n //.\n //. Variant of [`maybe`](#maybe) that takes a thunk so the default value\n //. is only computed if required.\n //.\n //. ```javascript\n //. > function fib(n) { return n <= 1 ? n : fib (n - 2) + fib (n - 1); }\n //.\n //. > S.maybe_ (() => fib (30)) (Math.sqrt) (S.Just (1000000))\n //. 1000\n //.\n //. > S.maybe_ (() => fib (30)) (Math.sqrt) (S.Nothing)\n //. 832040\n //. ```\n function maybe_(thunk) {\n return function(f) {\n return function(maybe) {\n return maybe.isJust ? f (maybe.value) : thunk ();\n };\n };\n }\n _.maybe_ = {\n consts: {},\n types: [$.Thunk (b), $.Fn (a) (b), $.Maybe (a), b],\n impl: maybe_\n };\n\n //# justs :: (Filterable f, Functor f) => f (Maybe a) -> f a\n //.\n //. Discards each element that is Nothing, and unwraps each element that is\n //. a Just. Related to Haskell's `catMaybes` function.\n //.\n //. See also [`lefts`](#lefts) and [`rights`](#rights).\n //.\n //. ```javascript\n //. > S.justs ([S.Just ('foo'), S.Nothing, S.Just ('baz')])\n //. ['foo', 'baz']\n //. ```\n function justs(maybes) {\n return map (prop ('value')) (filter (isJust) (maybes));\n }\n _.justs = {\n consts: {f: [Z.Filterable, Z.Functor]},\n types: [f ($.Maybe (a)), f (a)],\n impl: justs\n };\n\n //# mapMaybe :: (Filterable f, Functor f) => (a -> Maybe b) -> f a -> f b\n //.\n //. Takes a function and a structure, applies the function to each element\n //. of the structure, and returns the \"successful\" results. If the result of\n //. applying the function to an element is Nothing, the result is discarded;\n //. if the result is a Just, the Just's value is included.\n //.\n //. ```javascript\n //. > S.mapMaybe (S.head) ([[], [1, 2, 3], [], [4, 5, 6], []])\n //. [1, 4]\n //.\n //. > S.mapMaybe (S.head) ({x: [1, 2, 3], y: [], z: [4, 5, 6]})\n //. {x: 1, z: 4}\n //. ```\n _.mapMaybe = {\n consts: {f: [Z.Filterable, Z.Functor]},\n types: [$.Fn (a) ($.Maybe (b)), f (a), f (b)],\n impl: B (B (justs)) (map)\n };\n\n //# maybeToEither :: a -> Maybe b -> Either a b\n //.\n //. Converts a Maybe to an Either. Nothing becomes a Left (containing the\n //. first argument); a Just becomes a Right.\n //.\n //. See also [`eitherToMaybe`](#eitherToMaybe).\n //.\n //. ```javascript\n //. > S.maybeToEither ('Expecting an integer') (S.parseInt (10) ('xyz'))\n //. Left ('Expecting an integer')\n //.\n //. > S.maybeToEither ('Expecting an integer') (S.parseInt (10) ('42'))\n //. Right (42)\n //. ```\n function maybeToEither(x) {\n return maybe (Left (x)) (Right);\n }\n _.maybeToEither = {\n consts: {},\n types: [a, $.Maybe (b), $.Either (a) (b)],\n impl: maybeToEither\n };\n\n //. ### Either\n //.\n //. The Either type represents values with two possibilities: a value of type\n //. `Either a b` is either a Left whose value is of type `a` or a Right whose\n //. value is of type `b`.\n //.\n //. The implementation is provided by [sanctuary-either][].\n\n //# Either :: TypeRep Either\n //.\n //. Either [type representative][].\n\n //# Left :: a -> Either a b\n //.\n //. Constructs a value of type `Either a b` from a value of type `a`.\n //.\n //. ```javascript\n //. > S.Left ('Cannot divide by zero')\n //. Left ('Cannot divide by zero')\n //. ```\n _.Left = {\n consts: {},\n types: [a, $.Either (a) (b)],\n impl: Left\n };\n\n //# Right :: b -> Either a b\n //.\n //. Constructs a value of type `Either a b` from a value of type `b`.\n //.\n //. ```javascript\n //. > S.Right (42)\n //. Right (42)\n //. ```\n _.Right = {\n consts: {},\n types: [b, $.Either (a) (b)],\n impl: Right\n };\n\n //# isLeft :: Either a b -> Boolean\n //.\n //. Returns `true` if the given Either is a Left; `false` if it is a Right.\n //.\n //. ```javascript\n //. > S.isLeft (S.Left ('Cannot divide by zero'))\n //. true\n //.\n //. > S.isLeft (S.Right (42))\n //. false\n //. ```\n function isLeft(either) {\n return either.isLeft;\n }\n _.isLeft = {\n consts: {},\n types: [$.Either (a) (b), $.Boolean],\n impl: isLeft\n };\n\n //# isRight :: Either a b -> Boolean\n //.\n //. Returns `true` if the given Either is a Right; `false` if it is a Left.\n //.\n //. ```javascript\n //. > S.isRight (S.Right (42))\n //. true\n //.\n //. > S.isRight (S.Left ('Cannot divide by zero'))\n //. false\n //. ```\n function isRight(either) {\n return either.isRight;\n }\n _.isRight = {\n consts: {},\n types: [$.Either (a) (b), $.Boolean],\n impl: isRight\n };\n\n //# fromEither :: b -> Either a b -> b\n //.\n //. Takes a default value and an Either, and returns the Right value\n //. if the Either is a Right; the default value otherwise.\n //.\n //. ```javascript\n //. > S.fromEither (0) (S.Right (42))\n //. 42\n //.\n //. > S.fromEither (0) (S.Left (42))\n //. 0\n //. ```\n function fromEither(x) {\n return either (K (x)) (I);\n }\n _.fromEither = {\n consts: {},\n types: [b, $.Either (a) (b), b],\n impl: fromEither\n };\n\n //# either :: (a -> c) -> (b -> c) -> Either a b -> c\n //.\n //. Takes two functions and an Either, and returns the result of\n //. applying the first function to the Left's value, if the Either\n //. is a Left, or the result of applying the second function to the\n //. Right's value, if the Either is a Right.\n //.\n //. ```javascript\n //. > S.either (S.toUpper) (S.show) (S.Left ('Cannot divide by zero'))\n //. 'CANNOT DIVIDE BY ZERO'\n //.\n //. > S.either (S.toUpper) (S.show) (S.Right (42))\n //. '42'\n //. ```\n function either(l) {\n return function(r) {\n return function(either) {\n return (either.isLeft ? l : r) (either.value);\n };\n };\n }\n _.either = {\n consts: {},\n types: [$.Fn (a) (c), $.Fn (b) (c), $.Either (a) (b), c],\n impl: either\n };\n\n //# lefts :: (Filterable f, Functor f) => f (Either a b) -> f a\n //.\n //. Discards each element that is a Right, and unwraps each element that is\n //. a Left.\n //.\n //. See also [`rights`](#rights).\n //.\n //. ```javascript\n //. > S.lefts ([S.Right (20), S.Left ('foo'), S.Right (10), S.Left ('bar')])\n //. ['foo', 'bar']\n //. ```\n _.lefts = {\n consts: {f: [Z.Filterable, Z.Functor]},\n types: [f ($.Either (a) (b)), f (a)],\n impl: B (map (prop ('value'))) (filter (isLeft))\n };\n\n //# rights :: (Filterable f, Functor f) => f (Either a b) -> f b\n //.\n //. Discards each element that is a Left, and unwraps each element that is\n //. a Right.\n //.\n //. See also [`lefts`](#lefts).\n //.\n //. ```javascript\n //. > S.rights ([S.Right (20), S.Left ('foo'), S.Right (10), S.Left ('bar')])\n //. [20, 10]\n //. ```\n _.rights = {\n consts: {f: [Z.Filterable, Z.Functor]},\n types: [f ($.Either (a) (b)), f (b)],\n impl: B (map (prop ('value'))) (filter (isRight))\n };\n\n //# tagBy :: (a -> Boolean) -> a -> Either a a\n //.\n //. Takes a predicate and a value, and returns a Right of the value if it\n //. satisfies the predicate; a Left of the value otherwise.\n //.\n //. ```javascript\n //. > S.tagBy (S.odd) (0)\n //. Left (0)\n //\n //. > S.tagBy (S.odd) (1)\n //. Right (1)\n //. ```\n function tagBy(pred) {\n return ifElse (pred) (Right) (Left);\n }\n _.tagBy = {\n consts: {},\n types: [$.Predicate (a), a, $.Either (a) (a)],\n impl: tagBy\n };\n\n //# encase :: (a -> b) -> a -> Either Error b\n //.\n //. Takes a function that may throw and returns a pure function.\n //.\n //. ```javascript\n //. > S.encase (JSON.parse) ('[\"foo\",\"bar\",\"baz\"]')\n //. Right (['foo', 'bar', 'baz'])\n //.\n //. > S.encase (JSON.parse) ('[')\n //. Left (new SyntaxError ('Unexpected end of JSON input'))\n //. ```\n function encase(f) {\n return function(x) {\n try {\n return Right (f (x));\n } catch (err) {\n return Left (err);\n }\n };\n }\n _.encase = {\n consts: {},\n types: [$.Fn (a) (b), a, $.Either ($.Error) (b)],\n impl: encase\n };\n\n //# eitherToMaybe :: Either a b -> Maybe b\n //.\n //. Converts an Either to a Maybe. A Left becomes Nothing; a Right becomes\n //. a Just.\n //.\n //. See also [`maybeToEither`](#maybeToEither).\n //.\n //. ```javascript\n //. > S.eitherToMaybe (S.Left ('Cannot divide by zero'))\n //. Nothing\n //.\n //. > S.eitherToMaybe (S.Right (42))\n //. Just (42)\n //. ```\n function eitherToMaybe(either) {\n return either.isLeft ? Nothing : Just (either.value);\n }\n _.eitherToMaybe = {\n consts: {},\n types: [$.Either (a) (b), $.Maybe (b)],\n impl: eitherToMaybe\n };\n\n //. ### Logic\n\n //# and :: Boolean -> Boolean -> Boolean\n //.\n //. Boolean \"and\".\n //.\n //. ```javascript\n //. > S.and (false) (false)\n //. false\n //.\n //. > S.and (false) (true)\n //. false\n //.\n //. > S.and (true) (false)\n //. false\n //.\n //. > S.and (true) (true)\n //. true\n //. ```\n function and(x) {\n return function(y) {\n return x && y;\n };\n }\n _.and = {\n consts: {},\n types: [$.Boolean, $.Boolean, $.Boolean],\n impl: and\n };\n\n //# or :: Boolean -> Boolean -> Boolean\n //.\n //. Boolean \"or\".\n //.\n //. ```javascript\n //. > S.or (false) (false)\n //. false\n //.\n //. > S.or (false) (true)\n //. true\n //.\n //. > S.or (true) (false)\n //. true\n //.\n //. > S.or (true) (true)\n //. true\n //. ```\n function or(x) {\n return function(y) {\n return x || y;\n };\n }\n _.or = {\n consts: {},\n types: [$.Boolean, $.Boolean, $.Boolean],\n impl: or\n };\n\n //# not :: Boolean -> Boolean\n //.\n //. Boolean \"not\".\n //.\n //. See also [`complement`](#complement).\n //.\n //. ```javascript\n //. > S.not (false)\n //. true\n //.\n //. > S.not (true)\n //. false\n //. ```\n function not(x) {\n return !x;\n }\n _.not = {\n consts: {},\n types: [$.Boolean, $.Boolean],\n impl: not\n };\n\n //# complement :: (a -> Boolean) -> a -> Boolean\n //.\n //. Takes a unary predicate and a value of any type, and returns the logical\n //. negation of applying the predicate to the value.\n //.\n //. See also [`not`](#not).\n //.\n //. ```javascript\n //. > Number.isInteger (42)\n //. true\n //.\n //. > S.complement (Number.isInteger) (42)\n //. false\n //. ```\n _.complement = {\n consts: {},\n types: [$.Predicate (a), a, $.Boolean],\n impl: B (not)\n };\n\n //# boolean :: a -> a -> Boolean -> a\n //.\n //. Case analysis for the `Boolean` type. `boolean (x) (y) (b)` evaluates\n //. to `x` if `b` is `false`; to `y` if `b` is `true`.\n //.\n //. ```javascript\n //. > S.boolean ('no') ('yes') (false)\n //. 'no'\n //.\n //. > S.boolean ('no') ('yes') (true)\n //. 'yes'\n //. ```\n function boolean(x) {\n return function(y) {\n return function(b) {\n return b ? y : x;\n };\n };\n }\n _.boolean = {\n consts: {},\n types: [a, a, $.Boolean, a],\n impl: boolean\n };\n\n //# ifElse :: (a -> Boolean) -> (a -> b) -> (a -> b) -> a -> b\n //.\n //. Takes a unary predicate, a unary \"if\" function, a unary \"else\"\n //. function, and a value of any type, and returns the result of\n //. applying the \"if\" function to the value if the value satisfies\n //. the predicate; the result of applying the \"else\" function to the\n //. value otherwise.\n //.\n //. See also [`when`](#when) and [`unless`](#unless).\n //.\n //. ```javascript\n //. > S.ifElse (x => x < 0) (Math.abs) (Math.sqrt) (-1)\n //. 1\n //.\n //. > S.ifElse (x => x < 0) (Math.abs) (Math.sqrt) (16)\n //. 4\n //. ```\n function ifElse(pred) {\n return function(f) {\n return function(g) {\n return function(x) {\n return (pred (x) ? f : g) (x);\n };\n };\n };\n }\n _.ifElse = {\n consts: {},\n types: [$.Predicate (a), $.Fn (a) (b), $.Fn (a) (b), a, b],\n impl: ifElse\n };\n\n //# when :: (a -> Boolean) -> (a -> a) -> a -> a\n //.\n //. Takes a unary predicate, a unary function, and a value of any type, and\n //. returns the result of applying the function to the value if the value\n //. satisfies the predicate; the value otherwise.\n //.\n //. See also [`unless`](#unless) and [`ifElse`](#ifElse).\n //.\n //. ```javascript\n //. > S.when (x => x >= 0) (Math.sqrt) (16)\n //. 4\n //.\n //. > S.when (x => x >= 0) (Math.sqrt) (-1)\n //. -1\n //. ```\n function when(pred) {\n return C (ifElse (pred)) (I);\n }\n _.when = {\n consts: {},\n types: [$.Predicate (a), $.Fn (a) (a), a, a],\n impl: when\n };\n\n //# unless :: (a -> Boolean) -> (a -> a) -> a -> a\n //.\n //. Takes a unary predicate, a unary function, and a value of any type, and\n //. returns the result of applying the function to the value if the value\n //. does not satisfy the predicate; the value otherwise.\n //.\n //. See also [`when`](#when) and [`ifElse`](#ifElse).\n //.\n //. ```javascript\n //. > S.unless (x => x < 0) (Math.sqrt) (16)\n //. 4\n //.\n //. > S.unless (x => x < 0) (Math.sqrt) (-1)\n //. -1\n //. ```\n function unless(pred) {\n return ifElse (pred) (I);\n }\n _.unless = {\n consts: {},\n types: [$.Predicate (a), $.Fn (a) (a), a, a],\n impl: unless\n };\n\n //. ### Array\n\n //# array :: b -> (a -> Array a -> b) -> Array a -> b\n //.\n //. Case analysis for the `Array a` type.\n //.\n //. ```javascript\n //. > S.array (S.Nothing) (head => tail => S.Just (head)) ([])\n //. Nothing\n //.\n //. > S.array (S.Nothing) (head => tail => S.Just (head)) ([1, 2, 3])\n //. Just (1)\n //.\n //. > S.array (S.Nothing) (head => tail => S.Just (tail)) ([])\n //. Nothing\n //.\n //. > S.array (S.Nothing) (head => tail => S.Just (tail)) ([1, 2, 3])\n //. Just ([2, 3])\n //. ```\n function array(y) {\n return function(f) {\n return function(xs) {\n return xs.length === 0 ? y : f (xs[0]) (xs.slice (1));\n };\n };\n }\n _.array = {\n consts: {},\n types: [b, $.Fn (a) ($.Fn ($.Array (a)) (b)), $.Array (a), b],\n impl: array\n };\n\n //# head :: Foldable f => f a -> Maybe a\n //.\n //. Returns Just the first element of the given structure if the structure\n //. contains at least one element; Nothing otherwise.\n //.\n //. ```javascript\n //. > S.head ([1, 2, 3])\n //. Just (1)\n //.\n //. > S.head ([])\n //. Nothing\n //.\n //. > S.head (Cons (1) (Cons (2) (Cons (3) (Nil))))\n //. Just (1)\n //.\n //. > S.head (Nil)\n //. Nothing\n //. ```\n function head(foldable) {\n // Fast path for arrays.\n if (Array.isArray (foldable)) {\n return foldable.length > 0 ? Just (foldable[0]) : Nothing;\n }\n return Z.reduce (function(m, x) { return m.isJust ? m : Just (x); },\n Nothing,\n foldable);\n }\n _.head = {\n consts: {f: [Z.Foldable]},\n types: [f (a), $.Maybe (a)],\n impl: head\n };\n\n //# last :: Foldable f => f a -> Maybe a\n //.\n //. Returns Just the last element of the given structure if the structure\n //. contains at least one element; Nothing otherwise.\n //.\n //. ```javascript\n //. > S.last ([1, 2, 3])\n //. Just (3)\n //.\n //. > S.last ([])\n //. Nothing\n //.\n //. > S.last (Cons (1) (Cons (2) (Cons (3) (Nil))))\n //. Just (3)\n //.\n //. > S.last (Nil)\n //. Nothing\n //. ```\n function last(foldable) {\n // Fast path for arrays.\n if (Array.isArray (foldable)) {\n return foldable.length > 0 ? Just (foldable[foldable.length - 1])\n : Nothing;\n }\n return Z.reduce (function(_, x) { return Just (x); }, Nothing, foldable);\n }\n _.last = {\n consts: {f: [Z.Foldable]},\n types: [f (a), $.Maybe (a)],\n impl: last\n };\n\n //# tail :: (Applicative f, Foldable f, Monoid (f a)) => f a -> Maybe (f a)\n //.\n //. Returns Just all but the first of the given structure's elements if the\n //. structure contains at least one element; Nothing otherwise.\n //.\n //. ```javascript\n //. > S.tail ([1, 2, 3])\n //. Just ([2, 3])\n //.\n //. > S.tail ([])\n //. Nothing\n //.\n //. > S.tail (Cons (1) (Cons (2) (Cons (3) (Nil))))\n //. Just (Cons (2) (Cons (3) (Nil)))\n //\n //. > S.tail (Nil)\n //. Nothing\n //. ```\n function tail(foldable) {\n // Fast path for arrays.\n if (Array.isArray (foldable)) {\n return foldable.length > 0 ? Just (foldable.slice (1)) : Nothing;\n }\n var empty = Z.empty (foldable.constructor);\n return Z.reduce (function(m, x) {\n return Just (maybe (empty) (append (x)) (m));\n }, Nothing, foldable);\n }\n _.tail = {\n consts: {f: [Z.Applicative, Z.Foldable, Z.Monoid]},\n types: [f (a), $.Maybe (f (a))],\n impl: tail\n };\n\n //# init :: (Applicative f, Foldable f, Monoid (f a)) => f a -> Maybe (f a)\n //.\n //. Returns Just all but the last of the given structure's elements if the\n //. structure contains at least one element; Nothing otherwise.\n //.\n //. ```javascript\n //. > S.init ([1, 2, 3])\n //. Just ([1, 2])\n //.\n //. > S.init ([])\n //. Nothing\n //.\n //. > S.init (Cons (1) (Cons (2) (Cons (3) (Nil))))\n //. Just (Cons (1) (Cons (2) (Nil)))\n //.\n //. > S.init (Nil)\n //. Nothing\n //. ```\n function init(foldable) {\n // Fast path for arrays.\n if (Array.isArray (foldable)) {\n return foldable.length > 0 ? Just (foldable.slice (0, -1)) : Nothing;\n }\n var empty = Z.empty (foldable.constructor);\n return Z.map (Pair.snd, Z.reduce (function(m, x) {\n return Just (Pair (x) (maybe (empty) (pair (append)) (m)));\n }, Nothing, foldable));\n }\n _.init = {\n consts: {f: [Z.Applicative, Z.Foldable, Z.Monoid]},\n types: [f (a), $.Maybe (f (a))],\n impl: init\n };\n\n //# take :: (Applicative f, Foldable f, Monoid (f a)) => Integer -> f a -> Maybe (f a)\n //.\n //. Returns Just the first N elements of the given structure if N is\n //. non-negative and less than or equal to the size of the structure;\n //. Nothing otherwise.\n //.\n //. ```javascript\n //. > S.take (0) (['foo', 'bar'])\n //. Just ([])\n //.\n //. > S.take (1) (['foo', 'bar'])\n //. Just (['foo'])\n //.\n //. > S.take (2) (['foo', 'bar'])\n //. Just (['foo', 'bar'])\n //.\n //. > S.take (3) (['foo', 'bar'])\n //. Nothing\n //.\n //. > S.take (3) (Cons (1) (Cons (2) (Cons (3) (Cons (4) (Cons (5) (Nil))))))\n //. Just (Cons (1) (Cons (2) (Cons (3) (Nil))))\n //. ```\n function _takeDrop(arrayCase, generalCase) {\n return function(n) {\n return function(xs) {\n if (n < 0) return Nothing;\n\n // Fast path for arrays.\n if (Array.isArray (xs)) {\n return n <= xs.length ? Just (arrayCase (n, xs)) : Nothing;\n }\n\n // m :: Maybe (Pair Integer (f a))\n var m = Z.reduce (function(m, x) {\n return Z.map (function(pair) {\n var n = pair.fst;\n var xs = pair.snd;\n return Pair (n - 1) (generalCase (n, xs, x));\n }, m);\n }, Just (Pair (n) (Z.empty (xs.constructor))), xs);\n\n return Z.map (Pair.snd, Z.reject (B (gt (0)) (Pair.fst), m));\n };\n };\n }\n var take = _takeDrop (\n function(n, xs) { return xs.slice (0, n); },\n function(n, xs, x) { return n > 0 ? Z.append (x, xs) : xs; }\n );\n _.take = {\n consts: {f: [Z.Applicative, Z.Foldable, Z.Monoid]},\n types: [$.Integer, f (a), $.Maybe (f (a))],\n impl: take\n };\n\n //# drop :: (Applicative f, Foldable f, Monoid (f a)) => Integer -> f a -> Maybe (f a)\n //.\n //. Returns Just all but the first N elements of the given structure if\n //. N is non-negative and less than or equal to the size of the structure;\n //. Nothing otherwise.\n //.\n //. ```javascript\n //. > S.drop (0) (['foo', 'bar'])\n //. Just (['foo', 'bar'])\n //.\n //. > S.drop (1) (['foo', 'bar'])\n //. Just (['bar'])\n //.\n //. > S.drop (2) (['foo', 'bar'])\n //. Just ([])\n //.\n //. > S.drop (3) (['foo', 'bar'])\n //. Nothing\n //.\n //. > S.drop (3) (Cons (1) (Cons (2) (Cons (3) (Cons (4) (Cons (5) (Nil))))))\n //. Just (Cons (4) (Cons (5) (Nil)))\n //. ```\n var drop = _takeDrop (\n function(n, xs) { return xs.slice (n); },\n function(n, xs, x) { return n > 0 ? xs : Z.append (x, xs); }\n );\n _.drop = {\n consts: {f: [Z.Applicative, Z.Foldable, Z.Monoid]},\n types: [$.Integer, f (a), $.Maybe (f (a))],\n impl: drop\n };\n\n //# takeLast :: (Applicative f, Foldable f, Monoid (f a)) => Integer -> f a -> Maybe (f a)\n //.\n //. Returns Just the last N elements of the given structure if N is\n //. non-negative and less than or equal to the size of the structure;\n //. Nothing otherwise.\n //.\n //. ```javascript\n //. > S.takeLast (0) (['foo', 'bar'])\n //. Just ([])\n //.\n //. > S.takeLast (1) (['foo', 'bar'])\n //. Just (['bar'])\n //.\n //. > S.takeLast (2) (['foo', 'bar'])\n //. Just (['foo', 'bar'])\n //.\n //. > S.takeLast (3) (['foo', 'bar'])\n //. Nothing\n //.\n //. > S.takeLast (3) (Cons (1) (Cons (2) (Cons (3) (Cons (4) (Nil)))))\n //. Just (Cons (2) (Cons (3) (Cons (4) (Nil))))\n //. ```\n function takeLast(n) {\n return function(xs) {\n return Z.map (Z.reverse, take (n) (Z.reverse (xs)));\n };\n }\n _.takeLast = {\n consts: {f: [Z.Applicative, Z.Foldable, Z.Monoid]},\n types: [$.Integer, f (a), $.Maybe (f (a))],\n impl: takeLast\n };\n\n //# dropLast :: (Applicative f, Foldable f, Monoid (f a)) => Integer -> f a -> Maybe (f a)\n //.\n //. Returns Just all but the last N elements of the given structure if\n //. N is non-negative and less than or equal to the size of the structure;\n //. Nothing otherwise.\n //.\n //. ```javascript\n //. > S.dropLast (0) (['foo', 'bar'])\n //. Just (['foo', 'bar'])\n //.\n //. > S.dropLast (1) (['foo', 'bar'])\n //. Just (['foo'])\n //.\n //. > S.dropLast (2) (['foo', 'bar'])\n //. Just ([])\n //.\n //. > S.dropLast (3) (['foo', 'bar'])\n //. Nothing\n //.\n //. > S.dropLast (3) (Cons (1) (Cons (2) (Cons (3) (Cons (4) (Nil)))))\n //. Just (Cons (1) (Nil))\n //. ```\n function dropLast(n) {\n return function(xs) {\n return Z.map (Z.reverse, drop (n) (Z.reverse (xs)));\n };\n }\n _.dropLast = {\n consts: {f: [Z.Applicative, Z.Foldable, Z.Monoid]},\n types: [$.Integer, f (a), $.Maybe (f (a))],\n impl: dropLast\n };\n\n //# takeWhile :: (a -> Boolean) -> Array a -> Array a\n //.\n //. Discards the first element that does not satisfy the predicate,\n //. and all subsequent elements.\n //.\n //. See also [`dropWhile`](#dropWhile).\n //.\n //. ```javascript\n //. > S.takeWhile (S.odd) ([3, 3, 3, 7, 6, 3, 5, 4])\n //. [3, 3, 3, 7]\n //.\n //. > S.takeWhile (S.even) ([3, 3, 3, 7, 6, 3, 5, 4])\n //. []\n //. ```\n function takeWhile(pred) {\n return function(xs) {\n var idx = 0;\n while (idx < xs.length && pred (xs[idx])) idx += 1;\n return xs.slice (0, idx);\n };\n }\n _.takeWhile = {\n consts: {},\n types: [$.Predicate (a), $.Array (a), $.Array (a)],\n impl: takeWhile\n };\n\n //# dropWhile :: (a -> Boolean) -> Array a -> Array a\n //.\n //. Retains the first element that does not satisfy the predicate,\n //. and all subsequent elements.\n //.\n //. See also [`takeWhile`](#takeWhile).\n //.\n //. ```javascript\n //. > S.dropWhile (S.odd) ([3, 3, 3, 7, 6, 3, 5, 4])\n //. [6, 3, 5, 4]\n //.\n //. > S.dropWhile (S.even) ([3, 3, 3, 7, 6, 3, 5, 4])\n //. [3, 3, 3, 7, 6, 3, 5, 4]\n //. ```\n function dropWhile(pred) {\n return function(xs) {\n var idx = 0;\n while (idx < xs.length && pred (xs[idx])) idx += 1;\n return xs.slice (idx);\n };\n }\n _.dropWhile = {\n consts: {},\n types: [$.Predicate (a), $.Array (a), $.Array (a)],\n impl: dropWhile\n };\n\n //# size :: Foldable f => f a -> NonNegativeInteger\n //.\n //. Returns the number of elements of the given structure.\n //.\n //. ```javascript\n //. > S.size ([])\n //. 0\n //.\n //. > S.size (['foo', 'bar', 'baz'])\n //. 3\n //.\n //. > S.size (Nil)\n //. 0\n //.\n //. > S.size (Cons ('foo') (Cons ('bar') (Cons ('baz') (Nil))))\n //. 3\n //.\n //. > S.size (S.Nothing)\n //. 0\n //.\n //. > S.size (S.Just ('quux'))\n //. 1\n //.\n //. > S.size (S.Pair ('ignored!') ('counted!'))\n //. 1\n //. ```\n _.size = {\n consts: {f: [Z.Foldable]},\n types: [f (a), $.NonNegativeInteger],\n impl: Z.size\n };\n\n //# all :: Foldable f => (a -> Boolean) -> f a -> Boolean\n //.\n //. Returns `true` [iff][] all the elements of the structure satisfy the\n //. predicate.\n //.\n //. See also [`any`](#any) and [`none`](#none).\n //.\n //. ```javascript\n //. > S.all (S.odd) ([])\n //. true\n //.\n //. > S.all (S.odd) ([1, 3, 5])\n //. true\n //.\n //. > S.all (S.odd) ([1, 2, 3])\n //. false\n //. ```\n _.all = {\n consts: {f: [Z.Foldable]},\n types: [$.Predicate (a), f (a), $.Boolean],\n impl: curry2 (Z.all)\n };\n\n //# any :: Foldable f => (a -> Boolean) -> f a -> Boolean\n //.\n //. Returns `true` [iff][] any element of the structure satisfies the\n //. predicate.\n //.\n //. See also [`all`](#all) and [`none`](#none).\n //.\n //. ```javascript\n //. > S.any (S.odd) ([])\n //. false\n //.\n //. > S.any (S.odd) ([2, 4, 6])\n //. false\n //.\n //. > S.any (S.odd) ([1, 2, 3])\n //. true\n //. ```\n _.any = {\n consts: {f: [Z.Foldable]},\n types: [$.Predicate (a), f (a), $.Boolean],\n impl: curry2 (Z.any)\n };\n\n //# none :: Foldable f => (a -> Boolean) -> f a -> Boolean\n //.\n //. Returns `true` [iff][] none of the elements of the structure satisfies\n //. the predicate.\n //.\n //. Properties:\n //.\n //. - `forall p :: a -> Boolean, xs :: Foldable f => f a.\n //. S.none (p) (xs) = S.not (S.any (p) (xs))`\n //.\n //. - `forall p :: a -> Boolean, xs :: Foldable f => f a.\n //. S.none (p) (xs) = S.all (S.complement (p)) (xs)`\n //.\n //. See also [`all`](#all) and [`any`](#any).\n //.\n //. ```javascript\n //. > S.none (S.odd) ([])\n //. true\n //.\n //. > S.none (S.odd) ([2, 4, 6])\n //. true\n //.\n //. > S.none (S.odd) ([1, 2, 3])\n //. false\n //. ```\n _.none = {\n consts: {f: [Z.Foldable]},\n types: [$.Predicate (a), f (a), $.Boolean],\n impl: curry2 (Z.none)\n };\n\n //# append :: (Applicative f, Semigroup (f a)) => a -> f a -> f a\n //.\n //. Returns the result of appending the first argument to the second.\n //.\n //. See also [`prepend`](#prepend).\n //.\n //. ```javascript\n //. > S.append (3) ([1, 2])\n //. [1, 2, 3]\n //.\n //. > S.append (3) (Cons (1) (Cons (2) (Nil)))\n //. Cons (1) (Cons (2) (Cons (3) (Nil)))\n //.\n //. > S.append ([1]) (S.Nothing)\n //. Just ([1])\n //.\n //. > S.append ([3]) (S.Just ([1, 2]))\n //. Just ([1, 2, 3])\n //. ```\n function append(x) {\n return function(xs) {\n return Z.append (x, xs);\n };\n }\n _.append = {\n consts: {f: [Z.Applicative, Z.Semigroup]},\n types: [a, f (a), f (a)],\n impl: append\n };\n\n //# prepend :: (Applicative f, Semigroup (f a)) => a -> f a -> f a\n //.\n //. Returns the result of prepending the first argument to the second.\n //.\n //. See also [`append`](#append).\n //.\n //. ```javascript\n //. > S.prepend (1) ([2, 3])\n //. [1, 2, 3]\n //.\n //. > S.prepend (1) (Cons (2) (Cons (3) (Nil)))\n //. Cons (1) (Cons (2) (Cons (3) (Nil)))\n //.\n //. > S.prepend ([1]) (S.Nothing)\n //. Just ([1])\n //.\n //. > S.prepend ([1]) (S.Just ([2, 3]))\n //. Just ([1, 2, 3])\n //. ```\n _.prepend = {\n consts: {f: [Z.Applicative, Z.Semigroup]},\n types: [a, f (a), f (a)],\n impl: curry2 (Z.prepend)\n };\n\n //# joinWith :: String -> Array String -> String\n //.\n //. Joins the strings of the second argument separated by the first argument.\n //.\n //. Properties:\n //.\n //. - `forall s :: String, t :: String.\n //. S.joinWith (s) (S.splitOn (s) (t)) = t`\n //.\n //. See also [`splitOn`](#splitOn).\n //.\n //. ```javascript\n //. > S.joinWith (':') (['foo', 'bar', 'baz'])\n //. 'foo:bar:baz'\n //. ```\n _.joinWith = {\n consts: {},\n types: [$.String, $.Array ($.String), $.String],\n impl: invoke1 ('join')\n };\n\n //# elem :: (Setoid a, Foldable f) => a -> f a -> Boolean\n //.\n //. Takes a value and a structure and returns `true` [iff][] the value is an\n //. element of the structure.\n //.\n //. See also [`find`](#find).\n //.\n //. ```javascript\n //. > S.elem ('c') (['a', 'b', 'c'])\n //. true\n //.\n //. > S.elem ('x') (['a', 'b', 'c'])\n //. false\n //.\n //. > S.elem (3) ({x: 1, y: 2, z: 3})\n //. true\n //.\n //. > S.elem (8) ({x: 1, y: 2, z: 3})\n //. false\n //.\n //. > S.elem (0) (S.Just (0))\n //. true\n //.\n //. > S.elem (0) (S.Just (1))\n //. false\n //.\n //. > S.elem (0) (S.Nothing)\n //. false\n //. ```\n _.elem = {\n consts: {a: [Z.Setoid], f: [Z.Foldable]},\n types: [a, f (a), $.Boolean],\n impl: curry2 (Z.elem)\n };\n\n //# find :: Foldable f => (a -> Boolean) -> f a -> Maybe a\n //.\n //. Takes a predicate and a structure and returns Just the leftmost element\n //. of the structure that satisfies the predicate; Nothing if there is no\n //. such element.\n //.\n //. See also [`elem`](#elem).\n //.\n //. ```javascript\n //. > S.find (S.lt (0)) ([1, -2, 3, -4, 5])\n //. Just (-2)\n //.\n //. > S.find (S.lt (0)) ([1, 2, 3, 4, 5])\n //. Nothing\n //. ```\n function find(pred) {\n return function(xs) {\n return Z.reduce (\n function(m, x) {\n return m.isJust ? m : pred (x) ? Just (x) : Nothing;\n },\n Nothing,\n xs\n );\n };\n }\n _.find = {\n consts: {f: [Z.Foldable]},\n types: [$.Predicate (a), f (a), $.Maybe (a)],\n impl: find\n };\n\n //# foldMap :: (Monoid m, Foldable f) => TypeRep m -> (a -> m) -> f a -> m\n //.\n //. Curried version of [`Z.foldMap`][]. Deconstructs a foldable by mapping\n //. every element to a monoid and concatenating the results.\n //.\n //. ```javascript\n //. > S.foldMap (String) (f => f.name) ([Math.sin, Math.cos, Math.tan])\n //. 'sincostan'\n //.\n //. > S.foldMap (Array) (x => [x + 1, x + 2]) ([10, 20, 30])\n //. [11, 12, 21, 22, 31, 32]\n //. ```\n _.foldMap = {\n consts: {b: [Z.Monoid], f: [Z.Foldable]},\n types: [TypeRep (b), $.Fn (a) (b), f (a), b],\n impl: curry3 (Z.foldMap)\n };\n\n //# unfoldr :: (b -> Maybe (Pair a b)) -> b -> Array a\n //.\n //. Takes a function and a seed value, and returns an array generated by\n //. applying the function repeatedly. The array is initially empty. The\n //. function is initially applied to the seed value. Each application\n //. of the function should result in either:\n //.\n //. - Nothing, in which case the array is returned; or\n //.\n //. - Just a pair, in which case the first element is appended to\n //. the array and the function is applied to the second element.\n //.\n //. ```javascript\n //. > S.unfoldr (n => n < 1000 ? S.Just (S.Pair (n) (2 * n)) : S.Nothing) (1)\n //. [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]\n //. ```\n function unfoldr(f) {\n return function(x) {\n var result = [];\n for (var m = f (x); m.isJust; m = f (m.value.snd)) {\n result.push (m.value.fst);\n }\n return result;\n };\n }\n _.unfoldr = {\n consts: {},\n types: [$.Fn (b) ($.Maybe ($.Pair (a) (b))), b, $.Array (a)],\n impl: unfoldr\n };\n\n //# range :: Integer -> Integer -> Array Integer\n //.\n //. Returns an array of consecutive integers starting with the first argument\n //. and ending with the second argument minus one. Returns `[]` if the second\n //. argument is less than or equal to the first argument.\n //.\n //. ```javascript\n //. > S.range (0) (10)\n //. [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n //.\n //. > S.range (-5) (0)\n //. [-5, -4, -3, -2, -1]\n //.\n //. > S.range (0) (-5)\n //. []\n //. ```\n function range(from) {\n return function(to) {\n var result = [];\n for (var n = from; n < to; n += 1) result.push (n);\n return result;\n };\n }\n _.range = {\n consts: {},\n types: [$.Integer, $.Integer, $.Array ($.Integer)],\n impl: range\n };\n\n //# groupBy :: (a -> a -> Boolean) -> Array a -> Array (Array a)\n //.\n //. Splits its array argument into an array of arrays of equal,\n //. adjacent elements. Equality is determined by the function\n //. provided as the first argument. Its behaviour can be surprising\n //. for functions that aren't reflexive, transitive, and symmetric\n //. (see [equivalence][] relation).\n //.\n //. Properties:\n //.\n //. - `forall f :: a -> a -> Boolean, xs :: Array a.\n //. S.join (S.groupBy (f) (xs)) = xs`\n //.\n //. ```javascript\n //. > S.groupBy (S.equals) ([1, 1, 2, 1, 1])\n //. [[1, 1], [2], [1, 1]]\n //.\n //. > S.groupBy (x => y => x + y === 0) ([2, -3, 3, 3, 3, 4, -4, 4])\n //. [[2], [-3, 3, 3, 3], [4, -4], [4]]\n //. ```\n function groupBy(f) {\n return function(xs) {\n if (xs.length === 0) return [];\n var x0 = xs[0]; // :: a\n var active = [x0]; // :: Array a\n var result = [active]; // :: Array (Array a)\n for (var idx = 1; idx < xs.length; idx += 1) {\n var x = xs[idx];\n if (f (x0) (x)) active.push (x); else result.push (active = [x0 = x]);\n }\n return result;\n };\n }\n _.groupBy = {\n consts: {},\n types: [$.Fn (a) ($.Predicate (a)), $.Array (a), $.Array ($.Array (a))],\n impl: groupBy\n };\n\n //# reverse :: (Applicative f, Foldable f, Monoid (f a)) => f a -> f a\n //.\n //. Reverses the elements of the given structure.\n //.\n //. ```javascript\n //. > S.reverse ([1, 2, 3])\n //. [3, 2, 1]\n //.\n //. > S.reverse (Cons (1) (Cons (2) (Cons (3) (Nil))))\n //. Cons (3) (Cons (2) (Cons (1) (Nil)))\n //.\n //. > S.pipe ([S.splitOn (''), S.reverse, S.joinWith ('')]) ('abc')\n //. 'cba'\n //. ```\n _.reverse = {\n consts: {f: [Z.Applicative, Z.Foldable, Z.Monoid]},\n types: [f (a), f (a)],\n impl: Z.reverse\n };\n\n //# sort :: (Ord a, Applicative m, Foldable m, Monoid (m a)) => m a -> m a\n //.\n //. Performs a [stable sort][] of the elements of the given structure, using\n //. [`Z.lte`][] for comparisons.\n //.\n //. Properties:\n //.\n //. - `S.sort (S.sort (m)) = S.sort (m)` (idempotence)\n //.\n //. See also [`sortBy`](#sortBy).\n //.\n //. ```javascript\n //. > S.sort (['foo', 'bar', 'baz'])\n //. ['bar', 'baz', 'foo']\n //.\n //. > S.sort ([S.Left (4), S.Right (3), S.Left (2), S.Right (1)])\n //. [Left (2), Left (4), Right (1), Right (3)]\n //. ```\n _.sort = {\n consts: {a: [Z.Ord], m: [Z.Applicative, Z.Foldable, Z.Monoid]},\n types: [m (a), m (a)],\n impl: Z.sort\n };\n\n //# sortBy :: (Ord b, Applicative m, Foldable m, Monoid (m a)) => (a -> b) -> m a -> m a\n //.\n //. Performs a [stable sort][] of the elements of the given structure, using\n //. [`Z.lte`][] to compare the values produced by applying the given function\n //. to each element of the structure.\n //.\n //. Properties:\n //.\n //. - `S.sortBy (f) (S.sortBy (f) (m)) = S.sortBy (f) (m)` (idempotence)\n //.\n //. See also [`sort`](#sort).\n //.\n //. ```javascript\n //. > S.sortBy (S.prop ('rank')) ([\n //. . {rank: 7, suit: 'spades'},\n //. . {rank: 5, suit: 'hearts'},\n //. . {rank: 2, suit: 'hearts'},\n //. . {rank: 5, suit: 'spades'},\n //. . ])\n //. [ {rank: 2, suit: 'hearts'},\n //. . {rank: 5, suit: 'hearts'},\n //. . {rank: 5, suit: 'spades'},\n //. . {rank: 7, suit: 'spades'} ]\n //.\n //. > S.sortBy (S.prop ('suit')) ([\n //. . {rank: 7, suit: 'spades'},\n //. . {rank: 5, suit: 'hearts'},\n //. . {rank: 2, suit: 'hearts'},\n //. . {rank: 5, suit: 'spades'},\n //. . ])\n //. [ {rank: 5, suit: 'hearts'},\n //. . {rank: 2, suit: 'hearts'},\n //. . {rank: 7, suit: 'spades'},\n //. . {rank: 5, suit: 'spades'} ]\n //. ```\n //.\n //. If descending order is desired, one may use [`Descending`][]:\n //.\n //. ```javascript\n //. > S.sortBy (Descending) ([83, 97, 110, 99, 116, 117, 97, 114, 121])\n //. [121, 117, 116, 114, 110, 99, 97, 97, 83]\n //. ```\n _.sortBy = {\n consts: {b: [Z.Ord], m: [Z.Applicative, Z.Foldable, Z.Monoid]},\n types: [$.Fn (a) (b), m (a), m (a)],\n impl: curry2 (Z.sortBy)\n };\n\n //# zip :: Array a -> Array b -> Array (Pair a b)\n //.\n //. Returns an array of pairs of corresponding elements from the given\n //. arrays. The length of the resulting array is equal to the length of\n //. the shorter input array.\n //.\n //. See also [`zipWith`](#zipWith).\n //.\n //. ```javascript\n //. > S.zip (['a', 'b']) (['x', 'y', 'z'])\n //. [Pair ('a') ('x'), Pair ('b') ('y')]\n //.\n //. > S.zip ([1, 3, 5]) ([2, 4])\n //. [Pair (1) (2), Pair (3) (4)]\n //. ```\n _.zip = {\n consts: {},\n types: [$.Array (a), $.Array (b), $.Array ($.Pair (a) (b))],\n impl: zipWith (Pair)\n };\n\n //# zipWith :: (a -> b -> c) -> Array a -> Array b -> Array c\n //.\n //. Returns the result of combining, pairwise, the given arrays using the\n //. given binary function. The length of the resulting array is equal to the\n //. length of the shorter input array.\n //.\n //. See also [`zip`](#zip).\n //.\n //. ```javascript\n //. > S.zipWith (a => b => a + b) (['a', 'b']) (['x', 'y', 'z'])\n //. ['ax', 'by']\n //.\n //. > S.zipWith (a => b => [a, b]) ([1, 3, 5]) ([2, 4])\n //. [[1, 2], [3, 4]]\n //. ```\n function zipWith(f) {\n return function(xs) {\n return function(ys) {\n var result = [];\n var len = Math.min (xs.length, ys.length);\n for (var idx = 0; idx < len; idx += 1) {\n result.push (f (xs[idx]) (ys[idx]));\n }\n return result;\n };\n };\n }\n _.zipWith = {\n consts: {},\n types: [$.Fn (a) ($.Fn (b) (c)), $.Array (a), $.Array (b), $.Array (c)],\n impl: zipWith\n };\n\n //. ### Object\n\n //# prop :: String -> a -> b\n //.\n //. Takes a property name and an object with known properties and returns\n //. the value of the specified property. If for some reason the object\n //. lacks the specified property, a type error is thrown.\n //.\n //. For accessing properties of uncertain objects, use [`get`](#get) instead.\n //. For accessing string map values by key, use [`value`](#value) instead.\n //.\n //. ```javascript\n //. > S.prop ('a') ({a: 1, b: 2})\n //. 1\n //. ```\n function prop(key) {\n return function(x) {\n var obj = toObject (x);\n if (key in obj) return obj[key];\n throw new TypeError ('‘prop’ expected object to have a property named ' +\n '‘' + key + '’; ' + show (x) + ' does not');\n };\n }\n _.prop = {\n consts: {},\n types: [$.String, a, b],\n impl: prop\n };\n\n //# props :: Array String -> a -> b\n //.\n //. Takes a property path (an array of property names) and an object with\n //. known structure and returns the value at the given path. If for some\n //. reason the path does not exist, a type error is thrown.\n //.\n //. For accessing property paths of uncertain objects, use [`gets`](#gets)\n //. instead.\n //.\n //. ```javascript\n //. > S.props (['a', 'b', 'c']) ({a: {b: {c: 1}}})\n //. 1\n //. ```\n function props(path) {\n return function(x) {\n return path.reduce (function(x, key) {\n var obj = toObject (x);\n if (key in obj) return obj[key];\n throw new TypeError ('‘props’ expected object to have a property at ' +\n show (path) + '; ' + show (x) + ' does not');\n }, x);\n };\n }\n _.props = {\n consts: {},\n types: [$.Array ($.String), a, b],\n impl: props\n };\n\n //# get :: (Any -> Boolean) -> String -> a -> Maybe b\n //.\n //. Takes a predicate, a property name, and an object and returns Just the\n //. value of the specified object property if it exists and the value\n //. satisfies the given predicate; Nothing otherwise.\n //.\n //. See also [`gets`](#gets), [`prop`](#prop), and [`value`](#value).\n //.\n //. ```javascript\n //. > S.get (S.is ($.Number)) ('x') ({x: 1, y: 2})\n //. Just (1)\n //.\n //. > S.get (S.is ($.Number)) ('x') ({x: '1', y: '2'})\n //. Nothing\n //.\n //. > S.get (S.is ($.Number)) ('x') ({})\n //. Nothing\n //.\n //. > S.get (S.is ($.Array ($.Number))) ('x') ({x: [1, 2, 3]})\n //. Just ([1, 2, 3])\n //.\n //. > S.get (S.is ($.Array ($.Number))) ('x') ({x: [1, 2, 3, null]})\n //. Nothing\n //. ```\n function get(pred) {\n return B (B (filter (pred))) (get_);\n }\n _.get = {\n consts: {},\n types: [$.Predicate ($.Any), $.String, a, $.Maybe (b)],\n impl: get\n };\n\n //# gets :: (Any -> Boolean) -> Array String -> a -> Maybe b\n //.\n //. Takes a predicate, a property path (an array of property names), and\n //. an object and returns Just the value at the given path if such a path\n //. exists and the value satisfies the given predicate; Nothing otherwise.\n //.\n //. See also [`get`](#get).\n //.\n //. ```javascript\n //. > S.gets (S.is ($.Number)) (['a', 'b', 'c']) ({a: {b: {c: 42}}})\n //. Just (42)\n //.\n //. > S.gets (S.is ($.Number)) (['a', 'b', 'c']) ({a: {b: {c: '42'}}})\n //. Nothing\n //.\n //. > S.gets (S.is ($.Number)) (['a', 'b', 'c']) ({})\n //. Nothing\n //. ```\n function gets(pred) {\n return function(keys) {\n return function(x) {\n return Z.filter (pred, keys.reduce (function(maybe, key) {\n return Z.chain (get_ (key), maybe);\n }, Just (x)));\n };\n };\n }\n _.gets = {\n consts: {},\n types: [$.Predicate ($.Any), $.Array ($.String), a, $.Maybe (b)],\n impl: gets\n };\n\n //. ### StrMap\n //.\n //. StrMap is an abbreviation of _string map_. A string map is an object,\n //. such as `{foo: 1, bar: 2, baz: 3}`, whose values are all members of\n //. the same type. Formally, a value is a member of type `StrMap a` if its\n //. [type identifier][] is `'Object'` and the values of its enumerable own\n //. properties are all members of type `a`.\n\n //# value :: String -> StrMap a -> Maybe a\n //.\n //. Retrieve the value associated with the given key in the given string map.\n //.\n //. Formally, `value (k) (m)` evaluates to `Just (m[k])` if `k` is an\n //. enumerable own property of `m`; `Nothing` otherwise.\n //.\n //. See also [`prop`](#prop) and [`get`](#get).\n //.\n //. ```javascript\n //. > S.value ('foo') ({foo: 1, bar: 2})\n //. Just (1)\n //.\n //. > S.value ('bar') ({foo: 1, bar: 2})\n //. Just (2)\n //.\n //. > S.value ('baz') ({foo: 1, bar: 2})\n //. Nothing\n //. ```\n function value(key) {\n return function(strMap) {\n return Object.prototype.propertyIsEnumerable.call (strMap, key) ?\n Just (strMap[key]) :\n Nothing;\n };\n }\n _.value = {\n consts: {},\n types: [$.String, $.StrMap (a), $.Maybe (a)],\n impl: value\n };\n\n //# singleton :: String -> a -> StrMap a\n //.\n //. Takes a string and a value of any type, and returns a string map with\n //. a single entry (mapping the key to the value).\n //.\n //. ```javascript\n //. > S.singleton ('foo') (42)\n //. {foo: 42}\n //. ```\n function singleton(key) {\n return function(val) {\n var strMap = {};\n strMap[key] = val;\n return strMap;\n };\n }\n _.singleton = {\n consts: {},\n types: [$.String, a, $.StrMap (a)],\n impl: singleton\n };\n\n //# insert :: String -> a -> StrMap a -> StrMap a\n //.\n //. Takes a string, a value of any type, and a string map, and returns a\n //. string map comprising all the entries of the given string map plus the\n //. entry specified by the first two arguments (which takes precedence).\n //.\n //. Equivalent to Haskell's `insert` function. Similar to Clojure's `assoc`\n //. function.\n //.\n //. ```javascript\n //. > S.insert ('c') (3) ({a: 1, b: 2})\n //. {a: 1, b: 2, c: 3}\n //.\n //. > S.insert ('a') (4) ({a: 1, b: 2})\n //. {a: 4, b: 2}\n //. ```\n function insert(key) {\n return function(val) {\n return function(strMap) {\n return Z.concat (strMap, singleton (key) (val));\n };\n };\n }\n _.insert = {\n consts: {},\n types: [$.String, a, $.StrMap (a), $.StrMap (a)],\n impl: insert\n };\n\n //# remove :: String -> StrMap a -> StrMap a\n //.\n //. Takes a string and a string map, and returns a string map comprising all\n //. the entries of the given string map except the one whose key matches the\n //. given string (if such a key exists).\n //.\n //. Equivalent to Haskell's `delete` function. Similar to Clojure's `dissoc`\n //. function.\n //.\n //. ```javascript\n //. > S.remove ('c') ({a: 1, b: 2, c: 3})\n //. {a: 1, b: 2}\n //.\n //. > S.remove ('c') ({})\n //. {}\n //. ```\n function remove(key) {\n return function(strMap) {\n var result = Z.concat (strMap, {});\n delete result[key];\n return result;\n };\n }\n _.remove = {\n consts: {},\n types: [$.String, $.StrMap (a), $.StrMap (a)],\n impl: remove\n };\n\n //# keys :: StrMap a -> Array String\n //.\n //. Returns the keys of the given string map, in arbitrary order.\n //.\n //. ```javascript\n //. > S.sort (S.keys ({b: 2, c: 3, a: 1}))\n //. ['a', 'b', 'c']\n //. ```\n _.keys = {\n consts: {},\n types: [$.StrMap (a), $.Array ($.String)],\n impl: Object.keys\n };\n\n //# values :: StrMap a -> Array a\n //.\n //. Returns the values of the given string map, in arbitrary order.\n //.\n //. ```javascript\n //. > S.sort (S.values ({a: 1, c: 3, b: 2}))\n //. [1, 2, 3]\n //. ```\n function values(strMap) {\n return Z.map (function(k) { return strMap[k]; }, Object.keys (strMap));\n }\n _.values = {\n consts: {},\n types: [$.StrMap (a), $.Array (a)],\n impl: values\n };\n\n //# pairs :: StrMap a -> Array (Pair String a)\n //.\n //. Returns the key–value pairs of the given string map, in arbitrary order.\n //.\n //. ```javascript\n //. > S.sort (S.pairs ({b: 2, a: 1, c: 3}))\n //. [Pair ('a') (1), Pair ('b') (2), Pair ('c') (3)]\n //. ```\n function pairs(strMap) {\n return Z.map (function(k) { return Pair (k) (strMap[k]); },\n Object.keys (strMap));\n }\n _.pairs = {\n consts: {},\n types: [$.StrMap (a), $.Array ($.Pair ($.String) (a))],\n impl: pairs\n };\n\n //# fromPairs :: Foldable f => f (Pair String a) -> StrMap a\n //.\n //. Returns a string map containing the key–value pairs specified by the\n //. given [Foldable][]. If a key appears in multiple pairs, the rightmost\n //. pair takes precedence.\n //.\n //. ```javascript\n //. > S.fromPairs ([S.Pair ('a') (1), S.Pair ('b') (2), S.Pair ('c') (3)])\n //. {a: 1, b: 2, c: 3}\n //.\n //. > S.fromPairs ([S.Pair ('x') (1), S.Pair ('x') (2)])\n //. {x: 2}\n //. ```\n function fromPairs(pairs) {\n return Z.reduce (function(strMap, pair) {\n strMap[pair.fst] = pair.snd;\n return strMap;\n }, {}, pairs);\n }\n _.fromPairs = {\n consts: {f: [Z.Foldable]},\n types: [f ($.Pair ($.String) (a)), $.StrMap (a)],\n impl: fromPairs\n };\n\n //. ### Number\n\n //# negate :: ValidNumber -> ValidNumber\n //.\n //. Negates its argument.\n //.\n //. ```javascript\n //. > S.negate (12.5)\n //. -12.5\n //.\n //. > S.negate (-42)\n //. 42\n //. ```\n function negate(n) {\n return -n;\n }\n _.negate = {\n consts: {},\n types: [$.ValidNumber, $.ValidNumber],\n impl: negate\n };\n\n //# add :: FiniteNumber -> FiniteNumber -> FiniteNumber\n //.\n //. Returns the sum of two (finite) numbers.\n //.\n //. ```javascript\n //. > S.add (1) (1)\n //. 2\n //. ```\n function add(x) {\n return function(y) {\n return x + y;\n };\n }\n _.add = {\n consts: {},\n types: [$.FiniteNumber, $.FiniteNumber, $.FiniteNumber],\n impl: add\n };\n\n //# sum :: Foldable f => f FiniteNumber -> FiniteNumber\n //.\n //. Returns the sum of the given array of (finite) numbers.\n //.\n //. ```javascript\n //. > S.sum ([1, 2, 3, 4, 5])\n //. 15\n //.\n //. > S.sum ([])\n //. 0\n //.\n //. > S.sum (S.Just (42))\n //. 42\n //.\n //. > S.sum (S.Nothing)\n //. 0\n //. ```\n _.sum = {\n consts: {f: [Z.Foldable]},\n types: [f ($.FiniteNumber), $.FiniteNumber],\n impl: reduce (add) (0)\n };\n\n //# sub :: FiniteNumber -> FiniteNumber -> FiniteNumber\n //.\n //. Takes a finite number `n` and returns the _subtract `n`_ function.\n //.\n //. ```javascript\n //. > S.map (S.sub (1)) ([1, 2, 3])\n //. [0, 1, 2]\n //. ```\n function sub(y) {\n return function(x) {\n return x - y;\n };\n }\n _.sub = {\n consts: {},\n types: [$.FiniteNumber, $.FiniteNumber, $.FiniteNumber],\n impl: sub\n };\n\n //# mult :: FiniteNumber -> FiniteNumber -> FiniteNumber\n //.\n //. Returns the product of two (finite) numbers.\n //.\n //. ```javascript\n //. > S.mult (4) (2)\n //. 8\n //. ```\n function mult(x) {\n return function(y) {\n return x * y;\n };\n }\n _.mult = {\n consts: {},\n types: [$.FiniteNumber, $.FiniteNumber, $.FiniteNumber],\n impl: mult\n };\n\n //# product :: Foldable f => f FiniteNumber -> FiniteNumber\n //.\n //. Returns the product of the given array of (finite) numbers.\n //.\n //. ```javascript\n //. > S.product ([1, 2, 3, 4, 5])\n //. 120\n //.\n //. > S.product ([])\n //. 1\n //.\n //. > S.product (S.Just (42))\n //. 42\n //.\n //. > S.product (S.Nothing)\n //. 1\n //. ```\n _.product = {\n consts: {f: [Z.Foldable]},\n types: [f ($.FiniteNumber), $.FiniteNumber],\n impl: reduce (mult) (1)\n };\n\n //# div :: NonZeroFiniteNumber -> FiniteNumber -> FiniteNumber\n //.\n //. Takes a non-zero finite number `n` and returns the _divide by `n`_\n //. function.\n //.\n //. ```javascript\n //. > S.map (S.div (2)) ([0, 1, 2, 3])\n //. [0, 0.5, 1, 1.5]\n //. ```\n function div(y) {\n return function(x) {\n return x / y;\n };\n }\n _.div = {\n consts: {},\n types: [$.NonZeroFiniteNumber, $.FiniteNumber, $.FiniteNumber],\n impl: div\n };\n\n //# pow :: FiniteNumber -> FiniteNumber -> FiniteNumber\n //.\n //. Takes a finite number `n` and returns the _power of `n`_ function.\n //.\n //. ```javascript\n //. > S.map (S.pow (2)) ([-3, -2, -1, 0, 1, 2, 3])\n //. [9, 4, 1, 0, 1, 4, 9]\n //.\n //. > S.map (S.pow (0.5)) ([1, 4, 9, 16, 25])\n //. [1, 2, 3, 4, 5]\n //. ```\n function pow(exp) {\n return function(base) {\n return Math.pow (base, exp);\n };\n }\n _.pow = {\n consts: {},\n types: [$.FiniteNumber, $.FiniteNumber, $.FiniteNumber],\n impl: pow\n };\n\n //# mean :: Foldable f => f FiniteNumber -> Maybe FiniteNumber\n //.\n //. Returns the mean of the given array of (finite) numbers.\n //.\n //. ```javascript\n //. > S.mean ([1, 2, 3, 4, 5])\n //. Just (3)\n //.\n //. > S.mean ([])\n //. Nothing\n //.\n //. > S.mean (S.Just (42))\n //. Just (42)\n //.\n //. > S.mean (S.Nothing)\n //. Nothing\n //. ```\n function mean(foldable) {\n var result = Z.reduce (\n function(acc, n) {\n acc.total += n;\n acc.count += 1;\n return acc;\n },\n {total: 0, count: 0},\n foldable\n );\n return result.count > 0 ? Just (result.total / result.count) : Nothing;\n }\n _.mean = {\n consts: {f: [Z.Foldable]},\n types: [f ($.FiniteNumber), $.Maybe ($.FiniteNumber)],\n impl: mean\n };\n\n //. ### Integer\n\n //# even :: Integer -> Boolean\n //.\n //. Returns `true` if the given integer is even; `false` if it is odd.\n //.\n //. ```javascript\n //. > S.even (42)\n //. true\n //.\n //. > S.even (99)\n //. false\n //. ```\n function even(n) {\n return n % 2 === 0;\n }\n _.even = {\n consts: {},\n types: [$.Integer, $.Boolean],\n impl: even\n };\n\n //# odd :: Integer -> Boolean\n //.\n //. Returns `true` if the given integer is odd; `false` if it is even.\n //.\n //. ```javascript\n //. > S.odd (99)\n //. true\n //.\n //. > S.odd (42)\n //. false\n //. ```\n function odd(n) {\n return n % 2 !== 0;\n }\n _.odd = {\n consts: {},\n types: [$.Integer, $.Boolean],\n impl: odd\n };\n\n //. ### Parse\n\n //# parseDate :: String -> Maybe ValidDate\n //.\n //. Takes a string `s` and returns `Just (new Date (s))` if `new Date (s)`\n //. evaluates to a [`ValidDate`][ValidDate] value; Nothing otherwise.\n //.\n //. As noted in [#488][], this function's behaviour is unspecified for some\n //. inputs! [MDN][date parsing] warns against using the `Date` constructor\n //. to parse date strings:\n //.\n //. > __Note:__ parsing of date strings with the `Date` constructor […] is\n //. > strongly discouraged due to browser differences and inconsistencies.\n //. > Support for RFC 2822 format strings is by convention only. Support for\n //. > ISO 8601 formats differs in that date-only strings (e.g. \"1970-01-01\")\n //. > are treated as UTC, not local.\n //.\n //. ```javascript\n //. > S.parseDate ('2011-01-19T17:40:00Z')\n //. Just (new Date ('2011-01-19T17:40:00.000Z'))\n //.\n //. > S.parseDate ('today')\n //. Nothing\n //. ```\n function parseDate(s) {\n var date = new Date (s);\n return isNaN (date.valueOf ()) ? Nothing : Just (date);\n }\n _.parseDate = {\n consts: {},\n types: [$.String, $.Maybe ($.ValidDate)],\n impl: parseDate\n };\n\n // requiredNonCapturingGroup :: Array String -> String\n function requiredNonCapturingGroup(xs) {\n return '(?:' + xs.join ('|') + ')';\n }\n\n // optionalNonCapturingGroup :: Array String -> String\n function optionalNonCapturingGroup(xs) {\n return requiredNonCapturingGroup (xs) + '?';\n }\n\n // validFloatRepr :: RegExp\n var validFloatRepr = new RegExp (\n '^' + // start-of-string anchor\n '\\\\s*' + // any number of leading whitespace characters\n '[+-]?' + // optional sign\n requiredNonCapturingGroup ([\n 'Infinity', // \"Infinity\"\n 'NaN', // \"NaN\"\n requiredNonCapturingGroup ([\n '[0-9]+', // number\n '[0-9]+[.][0-9]+', // number with interior decimal point\n '[0-9]+[.]', // number with trailing decimal point\n '[.][0-9]+' // number with leading decimal point\n ]) +\n optionalNonCapturingGroup ([\n '[Ee]' + // \"E\" or \"e\"\n '[+-]?' + // optional sign\n '[0-9]+' // exponent\n ])\n ]) +\n '\\\\s*' + // any number of trailing whitespace characters\n '$' // end-of-string anchor\n );\n\n //# parseFloat :: String -> Maybe Number\n //.\n //. Takes a string and returns Just the number represented by the string\n //. if it does in fact represent a number; Nothing otherwise.\n //.\n //. ```javascript\n //. > S.parseFloat ('-123.45')\n //. Just (-123.45)\n //.\n //. > S.parseFloat ('foo.bar')\n //. Nothing\n //. ```\n function parseFloat_(s) {\n return validFloatRepr.test (s) ? Just (parseFloat (s)) : Nothing;\n }\n _.parseFloat = {\n consts: {},\n types: [$.String, $.Maybe ($.Number)],\n impl: parseFloat_\n };\n\n // Radix :: Type\n var Radix = $.NullaryType\n ('Radix')\n ('')\n ([$.Integer])\n (function(x) { return x >= 2 && x <= 36; });\n\n //# parseInt :: Radix -> String -> Maybe Integer\n //.\n //. Takes a radix (an integer between 2 and 36 inclusive) and a string,\n //. and returns Just the number represented by the string if it does in\n //. fact represent a number in the base specified by the radix; Nothing\n //. otherwise.\n //.\n //. This function is stricter than [`parseInt`][parseInt]: a string\n //. is considered to represent an integer only if all its non-prefix\n //. characters are members of the character set specified by the radix.\n //.\n //. ```javascript\n //. > S.parseInt (10) ('-42')\n //. Just (-42)\n //.\n //. > S.parseInt (16) ('0xFF')\n //. Just (255)\n //.\n //. > S.parseInt (16) ('0xGG')\n //. Nothing\n //. ```\n function parseInt_(radix) {\n return function(s) {\n var charset = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'.slice (0, radix);\n var pattern = new RegExp ('^[' + charset + ']+$', 'i');\n\n var t = s.replace (/^[+-]/, '');\n if (pattern.test (radix === 16 ? t.replace (/^0x/i, '') : t)) {\n var n = parseInt (s, radix);\n if ($.test ([]) ($.Integer) (n)) return Just (n);\n }\n return Nothing;\n };\n }\n _.parseInt = {\n consts: {},\n types: [Radix, $.String, $.Maybe ($.Integer)],\n impl: parseInt_\n };\n\n //# parseJson :: (Any -> Boolean) -> String -> Maybe a\n //.\n //. Takes a predicate and a string that may or may not be valid JSON, and\n //. returns Just the result of applying `JSON.parse` to the string *if* the\n //. result satisfies the predicate; Nothing otherwise.\n //.\n //. ```javascript\n //. > S.parseJson (S.is ($.Array ($.Integer))) ('[')\n //. Nothing\n //.\n //. > S.parseJson (S.is ($.Array ($.Integer))) ('[\"1\",\"2\",\"3\"]')\n //. Nothing\n //.\n //. > S.parseJson (S.is ($.Array ($.Integer))) ('[0,1.5,3,4.5]')\n //. Nothing\n //.\n //. > S.parseJson (S.is ($.Array ($.Integer))) ('[1,2,3]')\n //. Just ([1, 2, 3])\n //. ```\n function parseJson(pred) {\n return B (filter (pred)) (B (eitherToMaybe) (encase (JSON.parse)));\n }\n _.parseJson = {\n consts: {},\n types: [$.Predicate ($.Any), $.String, $.Maybe (a)],\n impl: parseJson\n };\n\n //. ### RegExp\n\n // Match :: Type\n var Match = $.RecordType ({\n match: $.String,\n groups: $.Array ($.Maybe ($.String))\n });\n\n // toMatch :: Array String? -> Match\n function toMatch(ss) {\n return {\n match: ss[0],\n groups: Z.map (B (reject (equals (undefined))) (Just), ss.slice (1))\n };\n }\n\n // withRegex :: (RegExp, () -> a) -> a\n function withRegex(pattern, thunk) {\n var lastIndex = pattern.lastIndex;\n var result = thunk ();\n pattern.lastIndex = lastIndex;\n return result;\n }\n\n //# regex :: RegexFlags -> String -> RegExp\n //.\n //. Takes a [RegexFlags][] and a pattern, and returns a RegExp.\n //.\n //. ```javascript\n //. > S.regex ('g') (':\\\\d+:')\n //. /:\\d+:/g\n //. ```\n function regex(flags) {\n return function(source) {\n return new RegExp (source, flags);\n };\n }\n _.regex = {\n consts: {},\n types: [$.RegexFlags, $.String, $.RegExp],\n impl: regex\n };\n\n //# regexEscape :: String -> String\n //.\n //. Takes a string that may contain regular expression metacharacters,\n //. and returns a string with those metacharacters escaped.\n //.\n //. Properties:\n //.\n //. - `forall s :: String.\n //. S.test (S.regex ('') (S.regexEscape (s))) (s) = true`\n //.\n //. ```javascript\n //. > S.regexEscape ('-=*{XYZ}*=-')\n //. '\\\\-=\\\\*\\\\{XYZ\\\\}\\\\*=\\\\-'\n //. ```\n function regexEscape(s) {\n return s.replace (/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&');\n }\n _.regexEscape = {\n consts: {},\n types: [$.String, $.String],\n impl: regexEscape\n };\n\n //# test :: RegExp -> String -> Boolean\n //.\n //. Takes a pattern and a string, and returns `true` [iff][] the pattern\n //. matches the string.\n //.\n //. ```javascript\n //. > S.test (/^a/) ('abacus')\n //. true\n //.\n //. > S.test (/^a/) ('banana')\n //. false\n //. ```\n function test(pattern) {\n return function(s) {\n return withRegex (pattern, function() { return pattern.test (s); });\n };\n }\n _.test = {\n consts: {},\n types: [$.RegExp, $.String, $.Boolean],\n impl: test\n };\n\n //# match :: NonGlobalRegExp -> String -> Maybe { match :: String, groups :: Array (Maybe String) }\n //.\n //. Takes a pattern and a string, and returns Just a match record if the\n //. pattern matches the string; Nothing otherwise.\n //.\n //. `groups :: Array (Maybe String)` acknowledges the existence of optional\n //. capturing groups.\n //.\n //. Properties:\n //.\n //. - `forall p :: Pattern, s :: String.\n //. S.head (S.matchAll (S.regex ('g') (p)) (s))\n //. = S.match (S.regex ('') (p)) (s)`\n //.\n //. See also [`matchAll`](#matchAll).\n //.\n //. ```javascript\n //. > S.match (/(good)?bye/) ('goodbye')\n //. Just ({match: 'goodbye', groups: [Just ('good')]})\n //.\n //. > S.match (/(good)?bye/) ('bye')\n //. Just ({match: 'bye', groups: [Nothing]})\n //. ```\n function match(pattern) {\n return function(s) {\n return Z.map (toMatch,\n Z.reject (equals (null), Just (s.match (pattern))));\n };\n }\n _.match = {\n consts: {},\n types: [$.NonGlobalRegExp, $.String, $.Maybe (Match)],\n impl: match\n };\n\n //# matchAll :: GlobalRegExp -> String -> Array { match :: String, groups :: Array (Maybe String) }\n //.\n //. Takes a pattern and a string, and returns an array of match records.\n //.\n //. `groups :: Array (Maybe String)` acknowledges the existence of optional\n //. capturing groups.\n //.\n //. See also [`match`](#match).\n //.\n //. ```javascript\n //. > S.matchAll (/@([a-z]+)/g) ('Hello, world!')\n //. []\n //.\n //. > S.matchAll (/@([a-z]+)/g) ('Hello, @foo! Hello, @bar! Hello, @baz!')\n //. [ {match: '@foo', groups: [Just ('foo')]},\n //. . {match: '@bar', groups: [Just ('bar')]},\n //. . {match: '@baz', groups: [Just ('baz')]} ]\n //. ```\n function matchAll(pattern) {\n return function(s) {\n return withRegex (pattern, function() {\n return unfoldr (function(_) {\n return Z.map (function(ss) {\n return Pair (toMatch (ss)) (null);\n }, Z.reject (equals (null), Just (pattern.exec (s))));\n }) ([]);\n });\n };\n }\n _.matchAll = {\n consts: {},\n types: [$.GlobalRegExp, $.String, $.Array (Match)],\n impl: matchAll\n };\n\n //. ### String\n\n //# toUpper :: String -> String\n //.\n //. Returns the upper-case equivalent of its argument.\n //.\n //. See also [`toLower`](#toLower).\n //.\n //. ```javascript\n //. > S.toUpper ('ABC def 123')\n //. 'ABC DEF 123'\n //. ```\n _.toUpper = {\n consts: {},\n types: [$.String, $.String],\n impl: invoke0 ('toUpperCase')\n };\n\n //# toLower :: String -> String\n //.\n //. Returns the lower-case equivalent of its argument.\n //.\n //. See also [`toUpper`](#toUpper).\n //.\n //. ```javascript\n //. > S.toLower ('ABC def 123')\n //. 'abc def 123'\n //. ```\n _.toLower = {\n consts: {},\n types: [$.String, $.String],\n impl: invoke0 ('toLowerCase')\n };\n\n //# trim :: String -> String\n //.\n //. Strips leading and trailing whitespace characters.\n //.\n //. ```javascript\n //. > S.trim ('\\t\\t foo bar \\n')\n //. 'foo bar'\n //. ```\n _.trim = {\n consts: {},\n types: [$.String, $.String],\n impl: invoke0 ('trim')\n };\n\n //# stripPrefix :: String -> String -> Maybe String\n //.\n //. Returns Just the portion of the given string (the second argument) left\n //. after removing the given prefix (the first argument) if the string starts\n //. with the prefix; Nothing otherwise.\n //.\n //. See also [`stripSuffix`](#stripSuffix).\n //.\n //. ```javascript\n //. > S.stripPrefix ('https://') ('https://sanctuary.js.org')\n //. Just ('sanctuary.js.org')\n //.\n //. > S.stripPrefix ('https://') ('http://sanctuary.js.org')\n //. Nothing\n //. ```\n function stripPrefix(prefix) {\n return function(s) {\n var idx = prefix.length;\n return s.slice (0, idx) === prefix ? Just (s.slice (idx)) : Nothing;\n };\n }\n _.stripPrefix = {\n consts: {},\n types: [$.String, $.String, $.Maybe ($.String)],\n impl: stripPrefix\n };\n\n //# stripSuffix :: String -> String -> Maybe String\n //.\n //. Returns Just the portion of the given string (the second argument) left\n //. after removing the given suffix (the first argument) if the string ends\n //. with the suffix; Nothing otherwise.\n //.\n //. See also [`stripPrefix`](#stripPrefix).\n //.\n //. ```javascript\n //. > S.stripSuffix ('.md') ('README.md')\n //. Just ('README')\n //.\n //. > S.stripSuffix ('.md') ('README')\n //. Nothing\n //. ```\n function stripSuffix(suffix) {\n return function(s) {\n var idx = s.length - suffix.length; // value may be negative\n return s.slice (idx) === suffix ? Just (s.slice (0, idx)) : Nothing;\n };\n }\n _.stripSuffix = {\n consts: {},\n types: [$.String, $.String, $.Maybe ($.String)],\n impl: stripSuffix\n };\n\n //# words :: String -> Array String\n //.\n //. Takes a string and returns the array of words the string contains\n //. (words are delimited by whitespace characters).\n //.\n //. See also [`unwords`](#unwords).\n //.\n //. ```javascript\n //. > S.words (' foo bar baz ')\n //. ['foo', 'bar', 'baz']\n //. ```\n function words(s) {\n var words = s.split (/\\s+/);\n var len = words.length;\n return words.slice (words[0] === '' ? 1 : 0,\n words[len - 1] === '' ? len - 1 : len);\n }\n _.words = {\n consts: {},\n types: [$.String, $.Array ($.String)],\n impl: words\n };\n\n //# unwords :: Array String -> String\n //.\n //. Takes an array of words and returns the result of joining the words\n //. with separating spaces.\n //.\n //. See also [`words`](#words).\n //.\n //. ```javascript\n //. > S.unwords (['foo', 'bar', 'baz'])\n //. 'foo bar baz'\n //. ```\n _.unwords = {\n consts: {},\n types: [$.Array ($.String), $.String],\n impl: invoke1 ('join') (' ')\n };\n\n //# lines :: String -> Array String\n //.\n //. Takes a string and returns the array of lines the string contains\n //. (lines are delimited by newlines: `'\\n'` or `'\\r\\n'` or `'\\r'`).\n //. The resulting strings do not contain newlines.\n //.\n //. See also [`unlines`](#unlines).\n //.\n //. ```javascript\n //. > S.lines ('foo\\nbar\\nbaz\\n')\n //. ['foo', 'bar', 'baz']\n //. ```\n function lines(s) {\n return s === '' ? []\n : (s.replace (/\\r\\n?/g, '\\n')).match (/^(?=[\\s\\S]).*/gm);\n }\n _.lines = {\n consts: {},\n types: [$.String, $.Array ($.String)],\n impl: lines\n };\n\n //# unlines :: Array String -> String\n //.\n //. Takes an array of lines and returns the result of joining the lines\n //. after appending a terminating line feed (`'\\n'`) to each.\n //.\n //. See also [`lines`](#lines).\n //.\n //. ```javascript\n //. > S.unlines (['foo', 'bar', 'baz'])\n //. 'foo\\nbar\\nbaz\\n'\n //. ```\n function unlines(xs) {\n return xs.reduce (function(s, x) { return s + x + '\\n'; }, '');\n }\n _.unlines = {\n consts: {},\n types: [$.Array ($.String), $.String],\n impl: unlines\n };\n\n //# splitOn :: String -> String -> Array String\n //.\n //. Returns the substrings of its second argument separated by occurrences\n //. of its first argument.\n //.\n //. See also [`joinWith`](#joinWith) and [`splitOnRegex`](#splitOnRegex).\n //.\n //. ```javascript\n //. > S.splitOn ('::') ('foo::bar::baz')\n //. ['foo', 'bar', 'baz']\n //. ```\n _.splitOn = {\n consts: {},\n types: [$.String, $.String, $.Array ($.String)],\n impl: invoke1 ('split')\n };\n\n //# splitOnRegex :: GlobalRegExp -> String -> Array String\n //.\n //. Takes a pattern and a string, and returns the result of splitting the\n //. string at every non-overlapping occurrence of the pattern.\n //.\n //. Properties:\n //.\n //. - `forall s :: String, t :: String.\n //. S.joinWith (s)\n //. (S.splitOnRegex (S.regex ('g') (S.regexEscape (s))) (t))\n //. = t`\n //.\n //. See also [`splitOn`](#splitOn).\n //.\n //. ```javascript\n //. > S.splitOnRegex (/[,;][ ]*/g) ('foo, bar, baz')\n //. ['foo', 'bar', 'baz']\n //.\n //. > S.splitOnRegex (/[,;][ ]*/g) ('foo;bar;baz')\n //. ['foo', 'bar', 'baz']\n //. ```\n function splitOnRegex(pattern) {\n return function(s) {\n return withRegex (pattern, function() {\n var result = [];\n var lastIndex = 0;\n var match;\n while ((match = pattern.exec (s)) != null) {\n if (pattern.lastIndex === lastIndex && match[0] === '') {\n if (pattern.lastIndex === s.length) return result;\n pattern.lastIndex += 1;\n } else {\n result.push (s.slice (lastIndex, match.index));\n lastIndex = match.index + match[0].length;\n }\n }\n result.push (s.slice (lastIndex));\n return result;\n });\n };\n }\n _.splitOnRegex = {\n consts: {},\n types: [$.GlobalRegExp, $.String, $.Array ($.String)],\n impl: splitOnRegex\n };\n\n return create ({\n checkTypes: typeof process === 'undefined'\n || process == null\n || process.env == null\n || process.env.NODE_ENV !== 'production',\n env: $.env\n });\n\n}));\n\n//. [#438]: https://github.com/sanctuary-js/sanctuary/issues/438\n//. [#488]: https://github.com/sanctuary-js/sanctuary/issues/488\n//. [Apply]: v:fantasyland/fantasy-land#apply\n//. [Chain]: v:fantasyland/fantasy-land#chain\n//. [Either]: #section:either\n//. [Fantasy Land]: v:fantasyland/fantasy-land\n//. [Foldable]: v:fantasyland/fantasy-land#foldable\n//. [Folktale]: https://folktale.origamitower.com/\n//. [GIGO]: https://en.wikipedia.org/wiki/Garbage_in,_garbage_out\n//. [Haskell]: https://www.haskell.org/\n//. [Kleisli]: https://en.wikipedia.org/wiki/Kleisli_category\n//. [Maybe]: #section:maybe\n//. [Nullable]: v:sanctuary-js/sanctuary-def#Nullable\n//. [PureScript]: http://www.purescript.org/\n//. [Ramda]: https://ramdajs.com/\n//. [RegexFlags]: v:sanctuary-js/sanctuary-def#RegexFlags\n//. [Semigroupoid]: v:fantasyland/fantasy-land#semigroupoid\n//. [ValidDate]: v:sanctuary-js/sanctuary-def#ValidDate\n//. [`$.test`]: v:sanctuary-js/sanctuary-def#test\n//. [`Descending`]: v:sanctuary-js/sanctuary-descending#Descending\n//. [`R.__`]: https://ramdajs.com/docs/#__\n//. [`R.bind`]: https://ramdajs.com/docs/#bind\n//. [`R.invoker`]: https://ramdajs.com/docs/#invoker\n//. [`Z.alt`]: v:sanctuary-js/sanctuary-type-classes#alt\n//. [`Z.ap`]: v:sanctuary-js/sanctuary-type-classes#ap\n//. [`Z.apFirst`]: v:sanctuary-js/sanctuary-type-classes#apFirst\n//. [`Z.apSecond`]: v:sanctuary-js/sanctuary-type-classes#apSecond\n//. [`Z.bimap`]: v:sanctuary-js/sanctuary-type-classes#bimap\n//. [`Z.chain`]: v:sanctuary-js/sanctuary-type-classes#chain\n//. [`Z.chainRec`]: v:sanctuary-js/sanctuary-type-classes#chainRec\n//. [`Z.compose`]: v:sanctuary-js/sanctuary-type-classes#compose\n//. [`Z.concat`]: v:sanctuary-js/sanctuary-type-classes#concat\n//. [`Z.contramap`]: v:sanctuary-js/sanctuary-type-classes#contramap\n//. [`Z.duplicate`]: v:sanctuary-js/sanctuary-type-classes#duplicate\n//. [`Z.empty`]: v:sanctuary-js/sanctuary-type-classes#empty\n//. [`Z.equals`]: v:sanctuary-js/sanctuary-type-classes#equals\n//. [`Z.extend`]: v:sanctuary-js/sanctuary-type-classes#extend\n//. [`Z.extract`]: v:sanctuary-js/sanctuary-type-classes#extract\n//. [`Z.filter`]: v:sanctuary-js/sanctuary-type-classes#filter\n//. [`Z.flip`]: v:sanctuary-js/sanctuary-type-classes#flip\n//. [`Z.foldMap`]: v:sanctuary-js/sanctuary-type-classes#foldMap\n//. [`Z.gt`]: v:sanctuary-js/sanctuary-type-classes#gt\n//. [`Z.gte`]: v:sanctuary-js/sanctuary-type-classes#gte\n//. [`Z.id`]: v:sanctuary-js/sanctuary-type-classes#id\n//. [`Z.invert`]: v:sanctuary-js/sanctuary-type-classes#invert\n//. [`Z.join`]: v:sanctuary-js/sanctuary-type-classes#join\n//. [`Z.lt`]: v:sanctuary-js/sanctuary-type-classes#lt\n//. [`Z.lte`]: v:sanctuary-js/sanctuary-type-classes#lte\n//. [`Z.map`]: v:sanctuary-js/sanctuary-type-classes#map\n//. [`Z.mapLeft`]: v:sanctuary-js/sanctuary-type-classes#mapLeft\n//. [`Z.of`]: v:sanctuary-js/sanctuary-type-classes#of\n//. [`Z.promap`]: v:sanctuary-js/sanctuary-type-classes#promap\n//. [`Z.reject`]: v:sanctuary-js/sanctuary-type-classes#reject\n//. [`Z.sequence`]: v:sanctuary-js/sanctuary-type-classes#sequence\n//. [`Z.traverse`]: v:sanctuary-js/sanctuary-type-classes#traverse\n//. [`Z.zero`]: v:sanctuary-js/sanctuary-type-classes#zero\n//. [`show`]: v:sanctuary-js/sanctuary-show#show\n//. [date parsing]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date\n//. [equivalence]: https://en.wikipedia.org/wiki/Equivalence_relation\n//. [iff]: https://en.wikipedia.org/wiki/If_and_only_if\n//. [parseInt]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/parseInt\n//. [partial functions]: https://en.wikipedia.org/wiki/Partial_function\n//. [ramda/ramda#683]: https://github.com/ramda/ramda/issues/683\n//. [ramda/ramda#1413]: https://github.com/ramda/ramda/issues/1413\n//. [ramda/ramda#1419]: https://github.com/ramda/ramda/pull/1419\n//. [sanctuary-def]: v:sanctuary-js/sanctuary-def\n//. [sanctuary-either]: v:sanctuary-js/sanctuary-either\n//. [sanctuary-maybe]: v:sanctuary-js/sanctuary-maybe\n//. [sanctuary-pair]: v:sanctuary-js/sanctuary-pair\n//. [sanctuary-show]: v:sanctuary-js/sanctuary-show\n//. [sanctuary-type-classes]: v:sanctuary-js/sanctuary-type-classes\n//. [stable sort]: https://en.wikipedia.org/wiki/Sorting_algorithm#Stability\n//. [thrush]: https://github.com/raganwald-deprecated/homoiconic/blob/master/2008-10-30/thrush.markdown\n//. [total functions]: https://en.wikipedia.org/wiki/Partial_function#Total_function\n//. [type checking]: #section:type-checking\n//. [type identifier]: v:sanctuary-js/sanctuary-type-identifiers\n//. [type representative]: v:fantasyland/fantasy-land#type-representatives\n//. [variadic functions]: https://en.wikipedia.org/wiki/Variadic_function\n","/*\n* FileSaver.js\n* A saveAs() FileSaver implementation.\n*\n* By Eli Grey, http://eligrey.com\n*\n* License : https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md (MIT)\n* source : http://purl.eligrey.com/github/FileSaver.js\n*/\n\n// The one and only way of getting global scope in all environments\n// https://stackoverflow.com/q/3277182/1008999\nvar _global = typeof window === 'object' && window.window === window\n ? window : typeof self === 'object' && self.self === self\n ? self : typeof global === 'object' && global.global === global\n ? global\n : this\n\nfunction bom (blob, opts) {\n if (typeof opts === 'undefined') opts = { autoBom: false }\n else if (typeof opts !== 'object') {\n console.warn('Deprecated: Expected third argument to be a object')\n opts = { autoBom: !opts }\n }\n\n // prepend BOM for UTF-8 XML and text/* types (including HTML)\n // note: your browser will automatically convert UTF-16 U+FEFF to EF BB BF\n if (opts.autoBom && /^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(blob.type)) {\n return new Blob([String.fromCharCode(0xFEFF), blob], { type: blob.type })\n }\n return blob\n}\n\nfunction download (url, name, opts) {\n var xhr = new XMLHttpRequest()\n xhr.open('GET', url)\n xhr.responseType = 'blob'\n xhr.onload = function () {\n saveAs(xhr.response, name, opts)\n }\n xhr.onerror = function () {\n console.error('could not download file')\n }\n xhr.send()\n}\n\nfunction corsEnabled (url) {\n var xhr = new XMLHttpRequest()\n // use sync to avoid popup blocker\n xhr.open('HEAD', url, false)\n try {\n xhr.send()\n } catch (e) {}\n return xhr.status >= 200 && xhr.status <= 299\n}\n\n// `a.click()` doesn't work for all browsers (#465)\nfunction click (node) {\n try {\n node.dispatchEvent(new MouseEvent('click'))\n } catch (e) {\n var evt = document.createEvent('MouseEvents')\n evt.initMouseEvent('click', true, true, window, 0, 0, 0, 80,\n 20, false, false, false, false, 0, null)\n node.dispatchEvent(evt)\n }\n}\n\nvar saveAs = _global.saveAs || (\n // probably in some web worker\n (typeof window !== 'object' || window !== _global)\n ? function saveAs () { /* noop */ }\n\n // Use download attribute first if possible (#193 Lumia mobile)\n : 'download' in HTMLAnchorElement.prototype\n ? function saveAs (blob, name, opts) {\n var URL = _global.URL || _global.webkitURL\n var a = document.createElement('a')\n name = name || blob.name || 'download'\n\n a.download = name\n a.rel = 'noopener' // tabnabbing\n\n // TODO: detect chrome extensions & packaged apps\n // a.target = '_blank'\n\n if (typeof blob === 'string') {\n // Support regular links\n a.href = blob\n if (a.origin !== location.origin) {\n corsEnabled(a.href)\n ? download(blob, name, opts)\n : click(a, a.target = '_blank')\n } else {\n click(a)\n }\n } else {\n // Support blobs\n a.href = URL.createObjectURL(blob)\n setTimeout(function () { URL.revokeObjectURL(a.href) }, 4E4) // 40s\n setTimeout(function () { click(a) }, 0)\n }\n }\n\n // Use msSaveOrOpenBlob as a second approach\n : 'msSaveOrOpenBlob' in navigator\n ? function saveAs (blob, name, opts) {\n name = name || blob.name || 'download'\n\n if (typeof blob === 'string') {\n if (corsEnabled(blob)) {\n download(blob, name, opts)\n } else {\n var a = document.createElement('a')\n a.href = blob\n a.target = '_blank'\n setTimeout(function () { click(a) })\n }\n } else {\n navigator.msSaveOrOpenBlob(bom(blob, opts), name)\n }\n }\n\n // Fallback to using FileReader and a popup\n : function saveAs (blob, name, opts, popup) {\n // Open a popup immediately do go around popup blocker\n // Mostly only available on user interaction and the fileReader is async so...\n popup = popup || open('', '_blank')\n if (popup) {\n popup.document.title =\n popup.document.body.innerText = 'downloading...'\n }\n\n if (typeof blob === 'string') return download(blob, name, opts)\n\n var force = blob.type === 'application/octet-stream'\n var isSafari = /constructor/i.test(_global.HTMLElement) || _global.safari\n var isChromeIOS = /CriOS\\/[\\d]+/.test(navigator.userAgent)\n\n if ((isChromeIOS || (force && isSafari)) && typeof FileReader === 'object') {\n // Safari doesn't allow downloading of blob URLs\n var reader = new FileReader()\n reader.onloadend = function () {\n var url = reader.result\n url = isChromeIOS ? url : url.replace(/^data:[^;]*;/, 'data:attachment/file;')\n if (popup) popup.location.href = url\n else location = url\n popup = null // reverse-tabnabbing #460\n }\n reader.readAsDataURL(blob)\n } else {\n var URL = _global.URL || _global.webkitURL\n var url = URL.createObjectURL(blob)\n if (popup) popup.location = url\n else location.href = url\n popup = null // reverse-tabnabbing #460\n setTimeout(function () { URL.revokeObjectURL(url) }, 4E4) // 40s\n }\n }\n)\n\n_global.saveAs = saveAs.saveAs = saveAs\n\nif (typeof module !== 'undefined') {\n module.exports = saveAs;\n}\n","/**\n * Detect Element Resize.\n * https://github.com/sdecima/javascript-detect-element-resize\n * Sebastian Decima\n *\n * Forked from version 0.5.3; includes the following modifications:\n * 1) Guard against unsafe 'window' and 'document' references (to support SSR).\n * 2) Defer initialization code via a top-level function wrapper (to support SSR).\n * 3) Avoid unnecessary reflows by not measuring size for scroll events bubbling from children.\n * 4) Add nonce for style element.\n * 5) Added support for injecting custom window object\n **/\nexport default function createDetectElementResize(nonce, hostWindow) {\n // Check `document` and `window` in case of server-side rendering\n var _window;\n\n if (typeof hostWindow !== 'undefined') {\n _window = hostWindow;\n } else if (typeof window !== 'undefined') {\n _window = window;\n } else if (typeof self !== 'undefined') {\n _window = self;\n } else {\n _window = global;\n }\n\n var attachEvent = typeof _window.document !== 'undefined' && _window.document.attachEvent;\n\n if (!attachEvent) {\n var requestFrame = function () {\n var raf = _window.requestAnimationFrame || _window.mozRequestAnimationFrame || _window.webkitRequestAnimationFrame || function (fn) {\n return _window.setTimeout(fn, 20);\n };\n\n return function (fn) {\n return raf(fn);\n };\n }();\n\n var cancelFrame = function () {\n var cancel = _window.cancelAnimationFrame || _window.mozCancelAnimationFrame || _window.webkitCancelAnimationFrame || _window.clearTimeout;\n return function (id) {\n return cancel(id);\n };\n }();\n\n var resetTriggers = function resetTriggers(element) {\n var triggers = element.__resizeTriggers__,\n expand = triggers.firstElementChild,\n contract = triggers.lastElementChild,\n expandChild = expand.firstElementChild;\n contract.scrollLeft = contract.scrollWidth;\n contract.scrollTop = contract.scrollHeight;\n expandChild.style.width = expand.offsetWidth + 1 + 'px';\n expandChild.style.height = expand.offsetHeight + 1 + 'px';\n expand.scrollLeft = expand.scrollWidth;\n expand.scrollTop = expand.scrollHeight;\n };\n\n var checkTriggers = function checkTriggers(element) {\n return element.offsetWidth != element.__resizeLast__.width || element.offsetHeight != element.__resizeLast__.height;\n };\n\n var scrollListener = function scrollListener(e) {\n // Don't measure (which forces) reflow for scrolls that happen inside of children!\n if (e.target.className && typeof e.target.className.indexOf === 'function' && e.target.className.indexOf('contract-trigger') < 0 && e.target.className.indexOf('expand-trigger') < 0) {\n return;\n }\n\n var element = this;\n resetTriggers(this);\n\n if (this.__resizeRAF__) {\n cancelFrame(this.__resizeRAF__);\n }\n\n this.__resizeRAF__ = requestFrame(function () {\n if (checkTriggers(element)) {\n element.__resizeLast__.width = element.offsetWidth;\n element.__resizeLast__.height = element.offsetHeight;\n\n element.__resizeListeners__.forEach(function (fn) {\n fn.call(element, e);\n });\n }\n });\n };\n /* Detect CSS Animations support to detect element display/re-attach */\n\n\n var animation = false,\n keyframeprefix = '',\n animationstartevent = 'animationstart',\n domPrefixes = 'Webkit Moz O ms'.split(' '),\n startEvents = 'webkitAnimationStart animationstart oAnimationStart MSAnimationStart'.split(' '),\n pfx = '';\n {\n var elm = _window.document.createElement('fakeelement');\n\n if (elm.style.animationName !== undefined) {\n animation = true;\n }\n\n if (animation === false) {\n for (var i = 0; i < domPrefixes.length; i++) {\n if (elm.style[domPrefixes[i] + 'AnimationName'] !== undefined) {\n pfx = domPrefixes[i];\n keyframeprefix = '-' + pfx.toLowerCase() + '-';\n animationstartevent = startEvents[i];\n animation = true;\n break;\n }\n }\n }\n }\n var animationName = 'resizeanim';\n var animationKeyframes = '@' + keyframeprefix + 'keyframes ' + animationName + ' { from { opacity: 0; } to { opacity: 0; } } ';\n var animationStyle = keyframeprefix + 'animation: 1ms ' + animationName + '; ';\n }\n\n var createStyles = function createStyles(doc) {\n if (!doc.getElementById('detectElementResize')) {\n //opacity:0 works around a chrome bug https://code.google.com/p/chromium/issues/detail?id=286360\n var css = (animationKeyframes ? animationKeyframes : '') + '.resize-triggers { ' + (animationStyle ? animationStyle : '') + 'visibility: hidden; opacity: 0; } ' + '.resize-triggers, .resize-triggers > div, .contract-trigger:before { content: \" \"; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',\n head = doc.head || doc.getElementsByTagName('head')[0],\n style = doc.createElement('style');\n style.id = 'detectElementResize';\n style.type = 'text/css';\n\n if (nonce != null) {\n style.setAttribute('nonce', nonce);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(doc.createTextNode(css));\n }\n\n head.appendChild(style);\n }\n };\n\n var addResizeListener = function addResizeListener(element, fn) {\n if (attachEvent) {\n element.attachEvent('onresize', fn);\n } else {\n if (!element.__resizeTriggers__) {\n var doc = element.ownerDocument;\n\n var elementStyle = _window.getComputedStyle(element);\n\n if (elementStyle && elementStyle.position == 'static') {\n element.style.position = 'relative';\n }\n\n createStyles(doc);\n element.__resizeLast__ = {};\n element.__resizeListeners__ = [];\n (element.__resizeTriggers__ = doc.createElement('div')).className = 'resize-triggers';\n var resizeTriggersHtml = '
' + '
';\n\n if (window.trustedTypes) {\n var staticPolicy = trustedTypes.createPolicy('react-virtualized-auto-sizer', {\n createHTML: function createHTML() {\n return resizeTriggersHtml;\n }\n });\n element.__resizeTriggers__.innerHTML = staticPolicy.createHTML('');\n } else {\n element.__resizeTriggers__.innerHTML = resizeTriggersHtml;\n }\n\n element.appendChild(element.__resizeTriggers__);\n resetTriggers(element);\n element.addEventListener('scroll', scrollListener, true);\n /* Listen for a css animation to detect element display/re-attach */\n\n if (animationstartevent) {\n element.__resizeTriggers__.__animationListener__ = function animationListener(e) {\n if (e.animationName == animationName) {\n resetTriggers(element);\n }\n };\n\n element.__resizeTriggers__.addEventListener(animationstartevent, element.__resizeTriggers__.__animationListener__);\n }\n }\n\n element.__resizeListeners__.push(fn);\n }\n };\n\n var removeResizeListener = function removeResizeListener(element, fn) {\n if (attachEvent) {\n element.detachEvent('onresize', fn);\n } else {\n element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1);\n\n if (!element.__resizeListeners__.length) {\n element.removeEventListener('scroll', scrollListener, true);\n\n if (element.__resizeTriggers__.__animationListener__) {\n element.__resizeTriggers__.removeEventListener(animationstartevent, element.__resizeTriggers__.__animationListener__);\n\n element.__resizeTriggers__.__animationListener__ = null;\n }\n\n try {\n element.__resizeTriggers__ = !element.removeChild(element.__resizeTriggers__);\n } catch (e) {// Preact compat; see developit/preact-compat/issues/228\n }\n }\n }\n };\n\n return {\n addResizeListener: addResizeListener,\n removeResizeListener: removeResizeListener\n };\n}","import _curry2 from './internal/_curry2.js';\nimport _isString from './internal/_isString.js';\n\n/**\n * Returns the nth element of the given list or string. If n is negative the\n * element at index length + n is returned.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig Number -> [a] -> a | Undefined\n * @sig Number -> String -> String\n * @param {Number} offset\n * @param {*} list\n * @return {*}\n * @example\n *\n * const list = ['foo', 'bar', 'baz', 'quux'];\n * R.nth(1, list); //=> 'bar'\n * R.nth(-1, list); //=> 'quux'\n * R.nth(-99, list); //=> undefined\n *\n * R.nth(2, 'abc'); //=> 'c'\n * R.nth(3, 'abc'); //=> ''\n * @symb R.nth(-1, [a, b, c]) = c\n * @symb R.nth(0, [a, b, c]) = a\n * @symb R.nth(1, [a, b, c]) = b\n */\nvar nth = /*#__PURE__*/_curry2(function nth(offset, list) {\n var idx = offset < 0 ? list.length + offset : offset;\n return _isString(list) ? list.charAt(idx) : list[idx];\n});\nexport default nth;","import _isArrayLike from './_isArrayLike.js';\n\n/**\n * `_makeFlat` is a helper function that returns a one-level or fully recursive\n * function based on the flag passed in.\n *\n * @private\n */\nexport default function _makeFlat(recursive) {\n return function flatt(list) {\n var value, jlen, j;\n var result = [];\n var idx = 0;\n var ilen = list.length;\n\n while (idx < ilen) {\n if (_isArrayLike(list[idx])) {\n value = recursive ? flatt(list[idx]) : list[idx];\n j = 0;\n jlen = value.length;\n while (j < jlen) {\n result[result.length] = value[j];\n j += 1;\n }\n } else {\n result[result.length] = list[idx];\n }\n idx += 1;\n }\n return result;\n };\n}","import _curry1 from './internal/_curry1.js';\nimport curryN from './curryN.js';\n\n/**\n * Returns a new function much like the supplied one, except that the first two\n * arguments' order is reversed.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig ((a, b, c, ...) -> z) -> (b -> a -> c -> ... -> z)\n * @param {Function} fn The function to invoke with its first two parameters reversed.\n * @return {*} The result of invoking `fn` with its first two parameters' order reversed.\n * @example\n *\n * const mergeThree = (a, b, c) => [].concat(a, b, c);\n *\n * mergeThree(1, 2, 3); //=> [1, 2, 3]\n *\n * R.flip(mergeThree)(1, 2, 3); //=> [2, 1, 3]\n * @symb R.flip(f)(a, b, c) = f(b, a, c)\n */\nvar flip = /*#__PURE__*/_curry1(function flip(fn) {\n return curryN(fn.length, function (a, b) {\n var args = Array.prototype.slice.call(arguments, 0);\n args[0] = b;\n args[1] = a;\n return fn.apply(this, args);\n });\n});\nexport default flip;","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getDaysInMonth\n * @category Month Helpers\n * @summary Get the number of days in a month of the given date.\n *\n * @description\n * Get the number of days in a month of the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the number of days in a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // How many days are in February 2000?\n * const result = getDaysInMonth(new Date(2000, 1))\n * //=> 29\n */\n\nexport default function getDaysInMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var year = date.getFullYear();\n var monthIndex = date.getMonth();\n var lastDayOfMonth = new Date(0);\n lastDayOfMonth.setFullYear(year, monthIndex + 1, 0);\n lastDayOfMonth.setHours(0, 0, 0, 0);\n return lastDayOfMonth.getDate();\n}","export default function addLeadingZeros(number, targetLength) {\n var sign = number < 0 ? '-' : '';\n var output = Math.abs(number).toString();\n\n while (output.length < targetLength) {\n output = '0' + output;\n }\n\n return sign + output;\n}","import addLeadingZeros from \"../../addLeadingZeros/index.js\";\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | |\n * | d | Day of month | D | |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | m | Minute | M | Month |\n * | s | Second | S | Fraction of second |\n * | y | Year (abs) | Y | |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n */\n\nvar formatters = {\n // Year\n y: function (date, token) {\n // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens\n // | Year | y | yy | yyy | yyyy | yyyyy |\n // |----------|-------|----|-------|-------|-------|\n // | AD 1 | 1 | 01 | 001 | 0001 | 00001 |\n // | AD 12 | 12 | 12 | 012 | 0012 | 00012 |\n // | AD 123 | 123 | 23 | 123 | 0123 | 00123 |\n // | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |\n // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |\n var signedYear = date.getUTCFullYear(); // Returns 1 for 1 BC (which is year 0 in JavaScript)\n\n var year = signedYear > 0 ? signedYear : 1 - signedYear;\n return addLeadingZeros(token === 'yy' ? year % 100 : year, token.length);\n },\n // Month\n M: function (date, token) {\n var month = date.getUTCMonth();\n return token === 'M' ? String(month + 1) : addLeadingZeros(month + 1, 2);\n },\n // Day of the month\n d: function (date, token) {\n return addLeadingZeros(date.getUTCDate(), token.length);\n },\n // AM or PM\n a: function (date, token) {\n var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? 'pm' : 'am';\n\n switch (token) {\n case 'a':\n case 'aa':\n return dayPeriodEnumValue.toUpperCase();\n\n case 'aaa':\n return dayPeriodEnumValue;\n\n case 'aaaaa':\n return dayPeriodEnumValue[0];\n\n case 'aaaa':\n default:\n return dayPeriodEnumValue === 'am' ? 'a.m.' : 'p.m.';\n }\n },\n // Hour [1-12]\n h: function (date, token) {\n return addLeadingZeros(date.getUTCHours() % 12 || 12, token.length);\n },\n // Hour [0-23]\n H: function (date, token) {\n return addLeadingZeros(date.getUTCHours(), token.length);\n },\n // Minute\n m: function (date, token) {\n return addLeadingZeros(date.getUTCMinutes(), token.length);\n },\n // Second\n s: function (date, token) {\n return addLeadingZeros(date.getUTCSeconds(), token.length);\n },\n // Fraction of second\n S: function (date, token) {\n var numberOfDigits = token.length;\n var milliseconds = date.getUTCMilliseconds();\n var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3));\n return addLeadingZeros(fractionalSeconds, token.length);\n }\n};\nexport default formatters;","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nvar MILLISECONDS_IN_DAY = 86400000; // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nexport default function getUTCDayOfYear(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var timestamp = date.getTime();\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n var startOfYearTimestamp = date.getTime();\n var difference = timestamp - startOfYearTimestamp;\n return Math.floor(difference / MILLISECONDS_IN_DAY) + 1;\n}","import lightFormatters from \"../lightFormatters/index.js\";\nimport getUTCDayOfYear from \"../../../_lib/getUTCDayOfYear/index.js\";\nimport getUTCISOWeek from \"../../../_lib/getUTCISOWeek/index.js\";\nimport getUTCISOWeekYear from \"../../../_lib/getUTCISOWeekYear/index.js\";\nimport getUTCWeek from \"../../../_lib/getUTCWeek/index.js\";\nimport getUTCWeekYear from \"../../../_lib/getUTCWeekYear/index.js\";\nimport addLeadingZeros from \"../../addLeadingZeros/index.js\";\nvar dayPeriodEnum = {\n am: 'am',\n pm: 'pm',\n midnight: 'midnight',\n noon: 'noon',\n morning: 'morning',\n afternoon: 'afternoon',\n evening: 'evening',\n night: 'night'\n};\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | Milliseconds in day |\n * | b | AM, PM, noon, midnight | B | Flexible day period |\n * | c | Stand-alone local day of week | C* | Localized hour w/ day period |\n * | d | Day of month | D | Day of year |\n * | e | Local day of week | E | Day of week |\n * | f | | F* | Day of week in month |\n * | g* | Modified Julian day | G | Era |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | i! | ISO day of week | I! | ISO week of year |\n * | j* | Localized hour w/ day period | J* | Localized hour w/o day period |\n * | k | Hour [1-24] | K | Hour [0-11] |\n * | l* | (deprecated) | L | Stand-alone month |\n * | m | Minute | M | Month |\n * | n | | N | |\n * | o! | Ordinal number modifier | O | Timezone (GMT) |\n * | p! | Long localized time | P! | Long localized date |\n * | q | Stand-alone quarter | Q | Quarter |\n * | r* | Related Gregorian year | R! | ISO week-numbering year |\n * | s | Second | S | Fraction of second |\n * | t! | Seconds timestamp | T! | Milliseconds timestamp |\n * | u | Extended year | U* | Cyclic year |\n * | v* | Timezone (generic non-locat.) | V* | Timezone (location) |\n * | w | Local week of year | W* | Week of month |\n * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |\n * | y | Year (abs) | Y | Local week-numbering year |\n * | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n *\n * Letters marked by ! are non-standard, but implemented by date-fns:\n * - `o` modifies the previous token to turn it into an ordinal (see `format` docs)\n * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,\n * i.e. 7 for Sunday, 1 for Monday, etc.\n * - `I` is ISO week of year, as opposed to `w` which is local week of year.\n * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.\n * `R` is supposed to be used in conjunction with `I` and `i`\n * for universal ISO week-numbering date, whereas\n * `Y` is supposed to be used in conjunction with `w` and `e`\n * for week-numbering date specific to the locale.\n * - `P` is long localized date format\n * - `p` is long localized time format\n */\n\nvar formatters = {\n // Era\n G: function (date, token, localize) {\n var era = date.getUTCFullYear() > 0 ? 1 : 0;\n\n switch (token) {\n // AD, BC\n case 'G':\n case 'GG':\n case 'GGG':\n return localize.era(era, {\n width: 'abbreviated'\n });\n // A, B\n\n case 'GGGGG':\n return localize.era(era, {\n width: 'narrow'\n });\n // Anno Domini, Before Christ\n\n case 'GGGG':\n default:\n return localize.era(era, {\n width: 'wide'\n });\n }\n },\n // Year\n y: function (date, token, localize) {\n // Ordinal number\n if (token === 'yo') {\n var signedYear = date.getUTCFullYear(); // Returns 1 for 1 BC (which is year 0 in JavaScript)\n\n var year = signedYear > 0 ? signedYear : 1 - signedYear;\n return localize.ordinalNumber(year, {\n unit: 'year'\n });\n }\n\n return lightFormatters.y(date, token);\n },\n // Local week-numbering year\n Y: function (date, token, localize, options) {\n var signedWeekYear = getUTCWeekYear(date, options); // Returns 1 for 1 BC (which is year 0 in JavaScript)\n\n var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear; // Two digit year\n\n if (token === 'YY') {\n var twoDigitYear = weekYear % 100;\n return addLeadingZeros(twoDigitYear, 2);\n } // Ordinal number\n\n\n if (token === 'Yo') {\n return localize.ordinalNumber(weekYear, {\n unit: 'year'\n });\n } // Padding\n\n\n return addLeadingZeros(weekYear, token.length);\n },\n // ISO week-numbering year\n R: function (date, token) {\n var isoWeekYear = getUTCISOWeekYear(date); // Padding\n\n return addLeadingZeros(isoWeekYear, token.length);\n },\n // Extended year. This is a single number designating the year of this calendar system.\n // The main difference between `y` and `u` localizers are B.C. years:\n // | Year | `y` | `u` |\n // |------|-----|-----|\n // | AC 1 | 1 | 1 |\n // | BC 1 | 1 | 0 |\n // | BC 2 | 2 | -1 |\n // Also `yy` always returns the last two digits of a year,\n // while `uu` pads single digit years to 2 characters and returns other years unchanged.\n u: function (date, token) {\n var year = date.getUTCFullYear();\n return addLeadingZeros(year, token.length);\n },\n // Quarter\n Q: function (date, token, localize) {\n var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);\n\n switch (token) {\n // 1, 2, 3, 4\n case 'Q':\n return String(quarter);\n // 01, 02, 03, 04\n\n case 'QQ':\n return addLeadingZeros(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n\n case 'Qo':\n return localize.ordinalNumber(quarter, {\n unit: 'quarter'\n });\n // Q1, Q2, Q3, Q4\n\n case 'QQQ':\n return localize.quarter(quarter, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n\n case 'QQQQQ':\n return localize.quarter(quarter, {\n width: 'narrow',\n context: 'formatting'\n });\n // 1st quarter, 2nd quarter, ...\n\n case 'QQQQ':\n default:\n return localize.quarter(quarter, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Stand-alone quarter\n q: function (date, token, localize) {\n var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);\n\n switch (token) {\n // 1, 2, 3, 4\n case 'q':\n return String(quarter);\n // 01, 02, 03, 04\n\n case 'qq':\n return addLeadingZeros(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n\n case 'qo':\n return localize.ordinalNumber(quarter, {\n unit: 'quarter'\n });\n // Q1, Q2, Q3, Q4\n\n case 'qqq':\n return localize.quarter(quarter, {\n width: 'abbreviated',\n context: 'standalone'\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n\n case 'qqqqq':\n return localize.quarter(quarter, {\n width: 'narrow',\n context: 'standalone'\n });\n // 1st quarter, 2nd quarter, ...\n\n case 'qqqq':\n default:\n return localize.quarter(quarter, {\n width: 'wide',\n context: 'standalone'\n });\n }\n },\n // Month\n M: function (date, token, localize) {\n var month = date.getUTCMonth();\n\n switch (token) {\n case 'M':\n case 'MM':\n return lightFormatters.M(date, token);\n // 1st, 2nd, ..., 12th\n\n case 'Mo':\n return localize.ordinalNumber(month + 1, {\n unit: 'month'\n });\n // Jan, Feb, ..., Dec\n\n case 'MMM':\n return localize.month(month, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // J, F, ..., D\n\n case 'MMMMM':\n return localize.month(month, {\n width: 'narrow',\n context: 'formatting'\n });\n // January, February, ..., December\n\n case 'MMMM':\n default:\n return localize.month(month, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Stand-alone month\n L: function (date, token, localize) {\n var month = date.getUTCMonth();\n\n switch (token) {\n // 1, 2, ..., 12\n case 'L':\n return String(month + 1);\n // 01, 02, ..., 12\n\n case 'LL':\n return addLeadingZeros(month + 1, 2);\n // 1st, 2nd, ..., 12th\n\n case 'Lo':\n return localize.ordinalNumber(month + 1, {\n unit: 'month'\n });\n // Jan, Feb, ..., Dec\n\n case 'LLL':\n return localize.month(month, {\n width: 'abbreviated',\n context: 'standalone'\n });\n // J, F, ..., D\n\n case 'LLLLL':\n return localize.month(month, {\n width: 'narrow',\n context: 'standalone'\n });\n // January, February, ..., December\n\n case 'LLLL':\n default:\n return localize.month(month, {\n width: 'wide',\n context: 'standalone'\n });\n }\n },\n // Local week of year\n w: function (date, token, localize, options) {\n var week = getUTCWeek(date, options);\n\n if (token === 'wo') {\n return localize.ordinalNumber(week, {\n unit: 'week'\n });\n }\n\n return addLeadingZeros(week, token.length);\n },\n // ISO week of year\n I: function (date, token, localize) {\n var isoWeek = getUTCISOWeek(date);\n\n if (token === 'Io') {\n return localize.ordinalNumber(isoWeek, {\n unit: 'week'\n });\n }\n\n return addLeadingZeros(isoWeek, token.length);\n },\n // Day of the month\n d: function (date, token, localize) {\n if (token === 'do') {\n return localize.ordinalNumber(date.getUTCDate(), {\n unit: 'date'\n });\n }\n\n return lightFormatters.d(date, token);\n },\n // Day of year\n D: function (date, token, localize) {\n var dayOfYear = getUTCDayOfYear(date);\n\n if (token === 'Do') {\n return localize.ordinalNumber(dayOfYear, {\n unit: 'dayOfYear'\n });\n }\n\n return addLeadingZeros(dayOfYear, token.length);\n },\n // Day of week\n E: function (date, token, localize) {\n var dayOfWeek = date.getUTCDay();\n\n switch (token) {\n // Tue\n case 'E':\n case 'EE':\n case 'EEE':\n return localize.day(dayOfWeek, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // T\n\n case 'EEEEE':\n return localize.day(dayOfWeek, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tu\n\n case 'EEEEEE':\n return localize.day(dayOfWeek, {\n width: 'short',\n context: 'formatting'\n });\n // Tuesday\n\n case 'EEEE':\n default:\n return localize.day(dayOfWeek, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Local day of week\n e: function (date, token, localize, options) {\n var dayOfWeek = date.getUTCDay();\n var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n\n switch (token) {\n // Numerical value (Nth day of week with current locale or weekStartsOn)\n case 'e':\n return String(localDayOfWeek);\n // Padded numerical value\n\n case 'ee':\n return addLeadingZeros(localDayOfWeek, 2);\n // 1st, 2nd, ..., 7th\n\n case 'eo':\n return localize.ordinalNumber(localDayOfWeek, {\n unit: 'day'\n });\n\n case 'eee':\n return localize.day(dayOfWeek, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // T\n\n case 'eeeee':\n return localize.day(dayOfWeek, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tu\n\n case 'eeeeee':\n return localize.day(dayOfWeek, {\n width: 'short',\n context: 'formatting'\n });\n // Tuesday\n\n case 'eeee':\n default:\n return localize.day(dayOfWeek, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Stand-alone local day of week\n c: function (date, token, localize, options) {\n var dayOfWeek = date.getUTCDay();\n var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n\n switch (token) {\n // Numerical value (same as in `e`)\n case 'c':\n return String(localDayOfWeek);\n // Padded numerical value\n\n case 'cc':\n return addLeadingZeros(localDayOfWeek, token.length);\n // 1st, 2nd, ..., 7th\n\n case 'co':\n return localize.ordinalNumber(localDayOfWeek, {\n unit: 'day'\n });\n\n case 'ccc':\n return localize.day(dayOfWeek, {\n width: 'abbreviated',\n context: 'standalone'\n });\n // T\n\n case 'ccccc':\n return localize.day(dayOfWeek, {\n width: 'narrow',\n context: 'standalone'\n });\n // Tu\n\n case 'cccccc':\n return localize.day(dayOfWeek, {\n width: 'short',\n context: 'standalone'\n });\n // Tuesday\n\n case 'cccc':\n default:\n return localize.day(dayOfWeek, {\n width: 'wide',\n context: 'standalone'\n });\n }\n },\n // ISO day of week\n i: function (date, token, localize) {\n var dayOfWeek = date.getUTCDay();\n var isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;\n\n switch (token) {\n // 2\n case 'i':\n return String(isoDayOfWeek);\n // 02\n\n case 'ii':\n return addLeadingZeros(isoDayOfWeek, token.length);\n // 2nd\n\n case 'io':\n return localize.ordinalNumber(isoDayOfWeek, {\n unit: 'day'\n });\n // Tue\n\n case 'iii':\n return localize.day(dayOfWeek, {\n width: 'abbreviated',\n context: 'formatting'\n });\n // T\n\n case 'iiiii':\n return localize.day(dayOfWeek, {\n width: 'narrow',\n context: 'formatting'\n });\n // Tu\n\n case 'iiiiii':\n return localize.day(dayOfWeek, {\n width: 'short',\n context: 'formatting'\n });\n // Tuesday\n\n case 'iiii':\n default:\n return localize.day(dayOfWeek, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // AM or PM\n a: function (date, token, localize) {\n var hours = date.getUTCHours();\n var dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';\n\n switch (token) {\n case 'a':\n case 'aa':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n });\n\n case 'aaa':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n }).toLowerCase();\n\n case 'aaaaa':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'aaaa':\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // AM, PM, midnight, noon\n b: function (date, token, localize) {\n var hours = date.getUTCHours();\n var dayPeriodEnumValue;\n\n if (hours === 12) {\n dayPeriodEnumValue = dayPeriodEnum.noon;\n } else if (hours === 0) {\n dayPeriodEnumValue = dayPeriodEnum.midnight;\n } else {\n dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';\n }\n\n switch (token) {\n case 'b':\n case 'bb':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n });\n\n case 'bbb':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n }).toLowerCase();\n\n case 'bbbbb':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'bbbb':\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // in the morning, in the afternoon, in the evening, at night\n B: function (date, token, localize) {\n var hours = date.getUTCHours();\n var dayPeriodEnumValue;\n\n if (hours >= 17) {\n dayPeriodEnumValue = dayPeriodEnum.evening;\n } else if (hours >= 12) {\n dayPeriodEnumValue = dayPeriodEnum.afternoon;\n } else if (hours >= 4) {\n dayPeriodEnumValue = dayPeriodEnum.morning;\n } else {\n dayPeriodEnumValue = dayPeriodEnum.night;\n }\n\n switch (token) {\n case 'B':\n case 'BB':\n case 'BBB':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'abbreviated',\n context: 'formatting'\n });\n\n case 'BBBBB':\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'narrow',\n context: 'formatting'\n });\n\n case 'BBBB':\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: 'wide',\n context: 'formatting'\n });\n }\n },\n // Hour [1-12]\n h: function (date, token, localize) {\n if (token === 'ho') {\n var hours = date.getUTCHours() % 12;\n if (hours === 0) hours = 12;\n return localize.ordinalNumber(hours, {\n unit: 'hour'\n });\n }\n\n return lightFormatters.h(date, token);\n },\n // Hour [0-23]\n H: function (date, token, localize) {\n if (token === 'Ho') {\n return localize.ordinalNumber(date.getUTCHours(), {\n unit: 'hour'\n });\n }\n\n return lightFormatters.H(date, token);\n },\n // Hour [0-11]\n K: function (date, token, localize) {\n var hours = date.getUTCHours() % 12;\n\n if (token === 'Ko') {\n return localize.ordinalNumber(hours, {\n unit: 'hour'\n });\n }\n\n return addLeadingZeros(hours, token.length);\n },\n // Hour [1-24]\n k: function (date, token, localize) {\n var hours = date.getUTCHours();\n if (hours === 0) hours = 24;\n\n if (token === 'ko') {\n return localize.ordinalNumber(hours, {\n unit: 'hour'\n });\n }\n\n return addLeadingZeros(hours, token.length);\n },\n // Minute\n m: function (date, token, localize) {\n if (token === 'mo') {\n return localize.ordinalNumber(date.getUTCMinutes(), {\n unit: 'minute'\n });\n }\n\n return lightFormatters.m(date, token);\n },\n // Second\n s: function (date, token, localize) {\n if (token === 'so') {\n return localize.ordinalNumber(date.getUTCSeconds(), {\n unit: 'second'\n });\n }\n\n return lightFormatters.s(date, token);\n },\n // Fraction of second\n S: function (date, token) {\n return lightFormatters.S(date, token);\n },\n // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)\n X: function (date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n\n if (timezoneOffset === 0) {\n return 'Z';\n }\n\n switch (token) {\n // Hours and optional minutes\n case 'X':\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XX`\n\n case 'XXXX':\n case 'XX':\n // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XXX`\n\n case 'XXXXX':\n case 'XXX': // Hours and minutes with `:` delimiter\n\n default:\n return formatTimezone(timezoneOffset, ':');\n }\n },\n // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)\n x: function (date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n\n switch (token) {\n // Hours and optional minutes\n case 'x':\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xx`\n\n case 'xxxx':\n case 'xx':\n // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xxx`\n\n case 'xxxxx':\n case 'xxx': // Hours and minutes with `:` delimiter\n\n default:\n return formatTimezone(timezoneOffset, ':');\n }\n },\n // Timezone (GMT)\n O: function (date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n\n switch (token) {\n // Short\n case 'O':\n case 'OO':\n case 'OOO':\n return 'GMT' + formatTimezoneShort(timezoneOffset, ':');\n // Long\n\n case 'OOOO':\n default:\n return 'GMT' + formatTimezone(timezoneOffset, ':');\n }\n },\n // Timezone (specific non-location)\n z: function (date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timezoneOffset = originalDate.getTimezoneOffset();\n\n switch (token) {\n // Short\n case 'z':\n case 'zz':\n case 'zzz':\n return 'GMT' + formatTimezoneShort(timezoneOffset, ':');\n // Long\n\n case 'zzzz':\n default:\n return 'GMT' + formatTimezone(timezoneOffset, ':');\n }\n },\n // Seconds timestamp\n t: function (date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timestamp = Math.floor(originalDate.getTime() / 1000);\n return addLeadingZeros(timestamp, token.length);\n },\n // Milliseconds timestamp\n T: function (date, token, _localize, options) {\n var originalDate = options._originalDate || date;\n var timestamp = originalDate.getTime();\n return addLeadingZeros(timestamp, token.length);\n }\n};\n\nfunction formatTimezoneShort(offset, dirtyDelimiter) {\n var sign = offset > 0 ? '-' : '+';\n var absOffset = Math.abs(offset);\n var hours = Math.floor(absOffset / 60);\n var minutes = absOffset % 60;\n\n if (minutes === 0) {\n return sign + String(hours);\n }\n\n var delimiter = dirtyDelimiter || '';\n return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);\n}\n\nfunction formatTimezoneWithOptionalMinutes(offset, dirtyDelimiter) {\n if (offset % 60 === 0) {\n var sign = offset > 0 ? '-' : '+';\n return sign + addLeadingZeros(Math.abs(offset) / 60, 2);\n }\n\n return formatTimezone(offset, dirtyDelimiter);\n}\n\nfunction formatTimezone(offset, dirtyDelimiter) {\n var delimiter = dirtyDelimiter || '';\n var sign = offset > 0 ? '-' : '+';\n var absOffset = Math.abs(offset);\n var hours = addLeadingZeros(Math.floor(absOffset / 60), 2);\n var minutes = addLeadingZeros(absOffset % 60, 2);\n return sign + hours + delimiter + minutes;\n}\n\nexport default formatters;","import isValid from \"../isValid/index.js\";\nimport defaultLocale from \"../locale/en-US/index.js\";\nimport subMilliseconds from \"../subMilliseconds/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport formatters from \"../_lib/format/formatters/index.js\";\nimport longFormatters from \"../_lib/format/longFormatters/index.js\";\nimport getTimezoneOffsetInMilliseconds from \"../_lib/getTimezoneOffsetInMilliseconds/index.js\";\nimport { isProtectedDayOfYearToken, isProtectedWeekYearToken, throwProtectedError } from \"../_lib/protectedTokens/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\"; // This RegExp consists of three parts separated by `|`:\n// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token\n// (one of the certain letters followed by `o`)\n// - (\\w)\\1* matches any sequences of the same letter\n// - '' matches two quote characters in a row\n// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),\n// except a single quote symbol, which ends the sequence.\n// Two quote characters do not end the sequence.\n// If there is no matching single quote\n// then the sequence will continue until the end of the string.\n// - . matches any single character unmatched by previous parts of the RegExps\n\nvar formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g; // This RegExp catches symbols escaped by quotes, and also\n// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`\n\nvar longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;\nvar escapedStringRegExp = /^'([^]*?)'?$/;\nvar doubleQuoteRegExp = /''/g;\nvar unescapedLatinCharacterRegExp = /[a-zA-Z]/;\n/**\n * @name format\n * @category Common Helpers\n * @summary Format the date.\n *\n * @description\n * Return the formatted date string in the given format. The result may vary by locale.\n *\n * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.\n * > See: https://git.io/fxCyr\n *\n * The characters wrapped between two single quotes characters (') are escaped.\n * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n * (see the last example)\n *\n * Format of the string is based on Unicode Technical Standard #35:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * with a few additions (see note 7 below the table).\n *\n * Accepted patterns:\n * | Unit | Pattern | Result examples | Notes |\n * |---------------------------------|---------|-----------------------------------|-------|\n * | Era | G..GGG | AD, BC | |\n * | | GGGG | Anno Domini, Before Christ | 2 |\n * | | GGGGG | A, B | |\n * | Calendar year | y | 44, 1, 1900, 2017 | 5 |\n * | | yo | 44th, 1st, 0th, 17th | 5,7 |\n * | | yy | 44, 01, 00, 17 | 5 |\n * | | yyy | 044, 001, 1900, 2017 | 5 |\n * | | yyyy | 0044, 0001, 1900, 2017 | 5 |\n * | | yyyyy | ... | 3,5 |\n * | Local week-numbering year | Y | 44, 1, 1900, 2017 | 5 |\n * | | Yo | 44th, 1st, 1900th, 2017th | 5,7 |\n * | | YY | 44, 01, 00, 17 | 5,8 |\n * | | YYY | 044, 001, 1900, 2017 | 5 |\n * | | YYYY | 0044, 0001, 1900, 2017 | 5,8 |\n * | | YYYYY | ... | 3,5 |\n * | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | 5,7 |\n * | | RR | -43, 00, 01, 1900, 2017 | 5,7 |\n * | | RRR | -043, 000, 001, 1900, 2017 | 5,7 |\n * | | RRRR | -0043, 0000, 0001, 1900, 2017 | 5,7 |\n * | | RRRRR | ... | 3,5,7 |\n * | Extended year | u | -43, 0, 1, 1900, 2017 | 5 |\n * | | uu | -43, 01, 1900, 2017 | 5 |\n * | | uuu | -043, 001, 1900, 2017 | 5 |\n * | | uuuu | -0043, 0001, 1900, 2017 | 5 |\n * | | uuuuu | ... | 3,5 |\n * | Quarter (formatting) | Q | 1, 2, 3, 4 | |\n * | | Qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | QQ | 01, 02, 03, 04 | |\n * | | QQQ | Q1, Q2, Q3, Q4 | |\n * | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |\n * | | QQQQQ | 1, 2, 3, 4 | 4 |\n * | Quarter (stand-alone) | q | 1, 2, 3, 4 | |\n * | | qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | qq | 01, 02, 03, 04 | |\n * | | qqq | Q1, Q2, Q3, Q4 | |\n * | | qqqq | 1st quarter, 2nd quarter, ... | 2 |\n * | | qqqqq | 1, 2, 3, 4 | 4 |\n * | Month (formatting) | M | 1, 2, ..., 12 | |\n * | | Mo | 1st, 2nd, ..., 12th | 7 |\n * | | MM | 01, 02, ..., 12 | |\n * | | MMM | Jan, Feb, ..., Dec | |\n * | | MMMM | January, February, ..., December | 2 |\n * | | MMMMM | J, F, ..., D | |\n * | Month (stand-alone) | L | 1, 2, ..., 12 | |\n * | | Lo | 1st, 2nd, ..., 12th | 7 |\n * | | LL | 01, 02, ..., 12 | |\n * | | LLL | Jan, Feb, ..., Dec | |\n * | | LLLL | January, February, ..., December | 2 |\n * | | LLLLL | J, F, ..., D | |\n * | Local week of year | w | 1, 2, ..., 53 | |\n * | | wo | 1st, 2nd, ..., 53th | 7 |\n * | | ww | 01, 02, ..., 53 | |\n * | ISO week of year | I | 1, 2, ..., 53 | 7 |\n * | | Io | 1st, 2nd, ..., 53th | 7 |\n * | | II | 01, 02, ..., 53 | 7 |\n * | Day of month | d | 1, 2, ..., 31 | |\n * | | do | 1st, 2nd, ..., 31st | 7 |\n * | | dd | 01, 02, ..., 31 | |\n * | Day of year | D | 1, 2, ..., 365, 366 | 9 |\n * | | Do | 1st, 2nd, ..., 365th, 366th | 7 |\n * | | DD | 01, 02, ..., 365, 366 | 9 |\n * | | DDD | 001, 002, ..., 365, 366 | |\n * | | DDDD | ... | 3 |\n * | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Sun | |\n * | | EEEE | Monday, Tuesday, ..., Sunday | 2 |\n * | | EEEEE | M, T, W, T, F, S, S | |\n * | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 |\n * | | io | 1st, 2nd, ..., 7th | 7 |\n * | | ii | 01, 02, ..., 07 | 7 |\n * | | iii | Mon, Tue, Wed, ..., Sun | 7 |\n * | | iiii | Monday, Tuesday, ..., Sunday | 2,7 |\n * | | iiiii | M, T, W, T, F, S, S | 7 |\n * | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 7 |\n * | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | |\n * | | eo | 2nd, 3rd, ..., 1st | 7 |\n * | | ee | 02, 03, ..., 01 | |\n * | | eee | Mon, Tue, Wed, ..., Sun | |\n * | | eeee | Monday, Tuesday, ..., Sunday | 2 |\n * | | eeeee | M, T, W, T, F, S, S | |\n * | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | |\n * | | co | 2nd, 3rd, ..., 1st | 7 |\n * | | cc | 02, 03, ..., 01 | |\n * | | ccc | Mon, Tue, Wed, ..., Sun | |\n * | | cccc | Monday, Tuesday, ..., Sunday | 2 |\n * | | ccccc | M, T, W, T, F, S, S | |\n * | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | AM, PM | a..aa | AM, PM | |\n * | | aaa | am, pm | |\n * | | aaaa | a.m., p.m. | 2 |\n * | | aaaaa | a, p | |\n * | AM, PM, noon, midnight | b..bb | AM, PM, noon, midnight | |\n * | | bbb | am, pm, noon, midnight | |\n * | | bbbb | a.m., p.m., noon, midnight | 2 |\n * | | bbbbb | a, p, n, mi | |\n * | Flexible day period | B..BBB | at night, in the morning, ... | |\n * | | BBBB | at night, in the morning, ... | 2 |\n * | | BBBBB | at night, in the morning, ... | |\n * | Hour [1-12] | h | 1, 2, ..., 11, 12 | |\n * | | ho | 1st, 2nd, ..., 11th, 12th | 7 |\n * | | hh | 01, 02, ..., 11, 12 | |\n * | Hour [0-23] | H | 0, 1, 2, ..., 23 | |\n * | | Ho | 0th, 1st, 2nd, ..., 23rd | 7 |\n * | | HH | 00, 01, 02, ..., 23 | |\n * | Hour [0-11] | K | 1, 2, ..., 11, 0 | |\n * | | Ko | 1st, 2nd, ..., 11th, 0th | 7 |\n * | | KK | 01, 02, ..., 11, 00 | |\n * | Hour [1-24] | k | 24, 1, 2, ..., 23 | |\n * | | ko | 24th, 1st, 2nd, ..., 23rd | 7 |\n * | | kk | 24, 01, 02, ..., 23 | |\n * | Minute | m | 0, 1, ..., 59 | |\n * | | mo | 0th, 1st, ..., 59th | 7 |\n * | | mm | 00, 01, ..., 59 | |\n * | Second | s | 0, 1, ..., 59 | |\n * | | so | 0th, 1st, ..., 59th | 7 |\n * | | ss | 00, 01, ..., 59 | |\n * | Fraction of second | S | 0, 1, ..., 9 | |\n * | | SS | 00, 01, ..., 99 | |\n * | | SSS | 000, 001, ..., 999 | |\n * | | SSSS | ... | 3 |\n * | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | |\n * | | XX | -0800, +0530, Z | |\n * | | XXX | -08:00, +05:30, Z | |\n * | | XXXX | -0800, +0530, Z, +123456 | 2 |\n * | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |\n * | Timezone (ISO-8601 w/o Z) | x | -08, +0530, +00 | |\n * | | xx | -0800, +0530, +0000 | |\n * | | xxx | -08:00, +05:30, +00:00 | 2 |\n * | | xxxx | -0800, +0530, +0000, +123456 | |\n * | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |\n * | Timezone (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | |\n * | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | 2 |\n * | Timezone (specific non-locat.) | z...zzz | GMT-8, GMT+5:30, GMT+0 | 6 |\n * | | zzzz | GMT-08:00, GMT+05:30, GMT+00:00 | 2,6 |\n * | Seconds timestamp | t | 512969520 | 7 |\n * | | tt | ... | 3,7 |\n * | Milliseconds timestamp | T | 512969520900 | 7 |\n * | | TT | ... | 3,7 |\n * | Long localized date | P | 04/29/1453 | 7 |\n * | | PP | Apr 29, 1453 | 7 |\n * | | PPP | April 29th, 1453 | 7 |\n * | | PPPP | Friday, April 29th, 1453 | 2,7 |\n * | Long localized time | p | 12:00 AM | 7 |\n * | | pp | 12:00:00 AM | 7 |\n * | | ppp | 12:00:00 AM GMT+2 | 7 |\n * | | pppp | 12:00:00 AM GMT+02:00 | 2,7 |\n * | Combination of date and time | Pp | 04/29/1453, 12:00 AM | 7 |\n * | | PPpp | Apr 29, 1453, 12:00:00 AM | 7 |\n * | | PPPppp | April 29th, 1453 at ... | 7 |\n * | | PPPPpppp| Friday, April 29th, 1453 at ... | 2,7 |\n * Notes:\n * 1. \"Formatting\" units (e.g. formatting quarter) in the default en-US locale\n * are the same as \"stand-alone\" units, but are different in some languages.\n * \"Formatting\" units are declined according to the rules of the language\n * in the context of a date. \"Stand-alone\" units are always nominative singular:\n *\n * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`\n *\n * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`\n *\n * 2. Any sequence of the identical letters is a pattern, unless it is escaped by\n * the single quote characters (see below).\n * If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)\n * the output will be the same as default pattern for this unit, usually\n * the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units\n * are marked with \"2\" in the last column of the table.\n *\n * `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`\n *\n * `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`\n *\n * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).\n * The output will be padded with zeros to match the length of the pattern.\n *\n * `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`\n *\n * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.\n * These tokens represent the shortest form of the quarter.\n *\n * 5. The main difference between `y` and `u` patterns are B.C. years:\n *\n * | Year | `y` | `u` |\n * |------|-----|-----|\n * | AC 1 | 1 | 1 |\n * | BC 1 | 1 | 0 |\n * | BC 2 | 2 | -1 |\n *\n * Also `yy` always returns the last two digits of a year,\n * while `uu` pads single digit years to 2 characters and returns other years unchanged:\n *\n * | Year | `yy` | `uu` |\n * |------|------|------|\n * | 1 | 01 | 01 |\n * | 14 | 14 | 14 |\n * | 376 | 76 | 376 |\n * | 1453 | 53 | 1453 |\n *\n * The same difference is true for local and ISO week-numbering years (`Y` and `R`),\n * except local week-numbering years are dependent on `options.weekStartsOn`\n * and `options.firstWeekContainsDate` (compare [getISOWeekYear]{@link https://date-fns.org/docs/getISOWeekYear}\n * and [getWeekYear]{@link https://date-fns.org/docs/getWeekYear}).\n *\n * 6. Specific non-location timezones are currently unavailable in `date-fns`,\n * so right now these tokens fall back to GMT timezones.\n *\n * 7. These patterns are not in the Unicode Technical Standard #35:\n * - `i`: ISO day of week\n * - `I`: ISO week of year\n * - `R`: ISO week-numbering year\n * - `t`: seconds timestamp\n * - `T`: milliseconds timestamp\n * - `o`: ordinal number modifier\n * - `P`: long localized date\n * - `p`: long localized time\n *\n * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.\n * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://git.io/fxCyr\n *\n * 9. `D` and `DD` tokens represent days of the year but they are ofthen confused with days of the month.\n * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://git.io/fxCyr\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * - The second argument is now required for the sake of explicitness.\n *\n * ```javascript\n * // Before v2.0.0\n * format(new Date(2016, 0, 1))\n *\n * // v2.0.0 onward\n * format(new Date(2016, 0, 1), \"yyyy-MM-dd'T'HH:mm:ss.SSSxxx\")\n * ```\n *\n * - New format string API for `format` function\n * which is based on [Unicode Technical Standard #35](https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table).\n * See [this post](https://blog.date-fns.org/post/unicode-tokens-in-date-fns-v2-sreatyki91jg) for more details.\n *\n * - Characters are now escaped using single quote symbols (`'`) instead of square brackets.\n *\n * @param {Date|Number} date - the original date\n * @param {String} format - the string of tokens\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @param {Number} [options.firstWeekContainsDate=1] - the day of January, which is\n * @param {Boolean} [options.useAdditionalWeekYearTokens=false] - if true, allows usage of the week-numbering year tokens `YY` and `YYYY`;\n * see: https://git.io/fxCyr\n * @param {Boolean} [options.useAdditionalDayOfYearTokens=false] - if true, allows usage of the day of year tokens `D` and `DD`;\n * see: https://git.io/fxCyr\n * @returns {String} the formatted date string\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `date` must not be Invalid Date\n * @throws {RangeError} `options.locale` must contain `localize` property\n * @throws {RangeError} `options.locale` must contain `formatLong` property\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7\n * @throws {RangeError} use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://git.io/fxCyr\n * @throws {RangeError} use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://git.io/fxCyr\n * @throws {RangeError} use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://git.io/fxCyr\n * @throws {RangeError} use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://git.io/fxCyr\n * @throws {RangeError} format string contains an unescaped latin alphabet character\n *\n * @example\n * // Represent 11 February 2014 in middle-endian format:\n * var result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')\n * //=> '02/11/2014'\n *\n * @example\n * // Represent 2 July 2014 in Esperanto:\n * import { eoLocale } from 'date-fns/locale/eo'\n * var result = format(new Date(2014, 6, 2), \"do 'de' MMMM yyyy\", {\n * locale: eoLocale\n * })\n * //=> '2-a de julio 2014'\n *\n * @example\n * // Escape string by single quote characters:\n * var result = format(new Date(2014, 6, 2, 15), \"h 'o''clock'\")\n * //=> \"3 o'clock\"\n */\n\nexport default function format(dirtyDate, dirtyFormatStr, dirtyOptions) {\n requiredArgs(2, arguments);\n var formatStr = String(dirtyFormatStr);\n var options = dirtyOptions || {};\n var locale = options.locale || defaultLocale;\n var localeFirstWeekContainsDate = locale.options && locale.options.firstWeekContainsDate;\n var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : toInteger(localeFirstWeekContainsDate);\n var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : toInteger(options.firstWeekContainsDate); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN\n\n if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {\n throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');\n }\n\n var localeWeekStartsOn = locale.options && locale.options.weekStartsOn;\n var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : toInteger(localeWeekStartsOn);\n var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : toInteger(options.weekStartsOn); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n\n if (!locale.localize) {\n throw new RangeError('locale must contain localize property');\n }\n\n if (!locale.formatLong) {\n throw new RangeError('locale must contain formatLong property');\n }\n\n var originalDate = toDate(dirtyDate);\n\n if (!isValid(originalDate)) {\n throw new RangeError('Invalid time value');\n } // Convert the date in system timezone to the same date in UTC+00:00 timezone.\n // This ensures that when UTC functions will be implemented, locales will be compatible with them.\n // See an issue about UTC functions: https://github.com/date-fns/date-fns/issues/376\n\n\n var timezoneOffset = getTimezoneOffsetInMilliseconds(originalDate);\n var utcDate = subMilliseconds(originalDate, timezoneOffset);\n var formatterOptions = {\n firstWeekContainsDate: firstWeekContainsDate,\n weekStartsOn: weekStartsOn,\n locale: locale,\n _originalDate: originalDate\n };\n var result = formatStr.match(longFormattingTokensRegExp).map(function (substring) {\n var firstCharacter = substring[0];\n\n if (firstCharacter === 'p' || firstCharacter === 'P') {\n var longFormatter = longFormatters[firstCharacter];\n return longFormatter(substring, locale.formatLong, formatterOptions);\n }\n\n return substring;\n }).join('').match(formattingTokensRegExp).map(function (substring) {\n // Replace two single quote characters with one single quote character\n if (substring === \"''\") {\n return \"'\";\n }\n\n var firstCharacter = substring[0];\n\n if (firstCharacter === \"'\") {\n return cleanEscapedString(substring);\n }\n\n var formatter = formatters[firstCharacter];\n\n if (formatter) {\n if (!options.useAdditionalWeekYearTokens && isProtectedWeekYearToken(substring)) {\n throwProtectedError(substring, dirtyFormatStr, dirtyDate);\n }\n\n if (!options.useAdditionalDayOfYearTokens && isProtectedDayOfYearToken(substring)) {\n throwProtectedError(substring, dirtyFormatStr, dirtyDate);\n }\n\n return formatter(utcDate, substring, locale.localize, formatterOptions);\n }\n\n if (firstCharacter.match(unescapedLatinCharacterRegExp)) {\n throw new RangeError('Format string contains an unescaped latin alphabet character `' + firstCharacter + '`');\n }\n\n return substring;\n }).join('');\n return result;\n}\n\nfunction cleanEscapedString(input) {\n return input.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, \"'\");\n}","import _concat from './internal/_concat.js';\nimport _curry2 from './internal/_curry2.js';\nimport _reduce from './internal/_reduce.js';\nimport map from './map.js';\n\n/**\n * ap applies a list of functions to a list of values.\n *\n * Dispatches to the `ap` method of the second argument, if present. Also\n * treats curried functions as applicatives.\n *\n * @func\n * @memberOf R\n * @since v0.3.0\n * @category Function\n * @sig [a -> b] -> [a] -> [b]\n * @sig Apply f => f (a -> b) -> f a -> f b\n * @sig (r -> a -> b) -> (r -> a) -> (r -> b)\n * @param {*} applyF\n * @param {*} applyX\n * @return {*}\n * @example\n *\n * R.ap([R.multiply(2), R.add(3)], [1,2,3]); //=> [2, 4, 6, 4, 5, 6]\n * R.ap([R.concat('tasty '), R.toUpper], ['pizza', 'salad']); //=> [\"tasty pizza\", \"tasty salad\", \"PIZZA\", \"SALAD\"]\n *\n * // R.ap can also be used as S combinator\n * // when only two functions are passed\n * R.ap(R.concat, R.toUpper)('Ramda') //=> 'RamdaRAMDA'\n * @symb R.ap([f, g], [a, b]) = [f(a), f(b), g(a), g(b)]\n */\nvar ap = /*#__PURE__*/_curry2(function ap(applyF, applyX) {\n return typeof applyX['fantasy-land/ap'] === 'function' ? applyX['fantasy-land/ap'](applyF) : typeof applyF.ap === 'function' ? applyF.ap(applyX) : typeof applyF === 'function' ? function (x) {\n return applyF(x)(applyX(x));\n } : _reduce(function (acc, f) {\n return _concat(acc, map(f, applyX));\n }, [], applyF);\n});\nexport default ap;","import _curry2 from './internal/_curry2.js';\nimport _reduce from './internal/_reduce.js';\nimport ap from './ap.js';\nimport curryN from './curryN.js';\nimport map from './map.js';\n\n/**\n * \"lifts\" a function to be the specified arity, so that it may \"map over\" that\n * many lists, Functions or other objects that satisfy the [FantasyLand Apply spec](https://github.com/fantasyland/fantasy-land#apply).\n *\n * @func\n * @memberOf R\n * @since v0.7.0\n * @category Function\n * @sig Number -> (*... -> *) -> ([*]... -> [*])\n * @param {Function} fn The function to lift into higher context\n * @return {Function} The lifted function.\n * @see R.lift, R.ap\n * @example\n *\n * const madd3 = R.liftN(3, (...args) => R.sum(args));\n * madd3([1,2,3], [1,2,3], [1]); //=> [3, 4, 5, 4, 5, 6, 5, 6, 7]\n */\nvar liftN = /*#__PURE__*/_curry2(function liftN(arity, fn) {\n var lifted = curryN(arity, fn);\n return curryN(arity, function () {\n return _reduce(ap, map(lifted, arguments[0]), Array.prototype.slice.call(arguments, 1));\n });\n});\nexport default liftN;","import _curry1 from './internal/_curry1.js';\nimport liftN from './liftN.js';\n\n/**\n * \"lifts\" a function of arity > 1 so that it may \"map over\" a list, Function or other\n * object that satisfies the [FantasyLand Apply spec](https://github.com/fantasyland/fantasy-land#apply).\n *\n * @func\n * @memberOf R\n * @since v0.7.0\n * @category Function\n * @sig (*... -> *) -> ([*]... -> [*])\n * @param {Function} fn The function to lift into higher context\n * @return {Function} The lifted function.\n * @see R.liftN\n * @example\n *\n * const madd3 = R.lift((a, b, c) => a + b + c);\n *\n * madd3([1,2,3], [1,2,3], [1]); //=> [3, 4, 5, 4, 5, 6, 5, 6, 7]\n *\n * const madd5 = R.lift((a, b, c, d, e) => a + b + c + d + e);\n *\n * madd5([1,2], [3], [4, 5], [6], [7, 8]); //=> [21, 22, 22, 23, 22, 23, 23, 24]\n */\nvar lift = /*#__PURE__*/_curry1(function lift(fn) {\n return liftN(fn.length, fn);\n});\nexport default lift;","import _curryN from './_curryN.js';\nimport _has from './_has.js';\nimport _xfBase from './_xfBase.js';\n\nvar XReduceBy = /*#__PURE__*/function () {\n function XReduceBy(valueFn, valueAcc, keyFn, xf) {\n this.valueFn = valueFn;\n this.valueAcc = valueAcc;\n this.keyFn = keyFn;\n this.xf = xf;\n this.inputs = {};\n }\n XReduceBy.prototype['@@transducer/init'] = _xfBase.init;\n XReduceBy.prototype['@@transducer/result'] = function (result) {\n var key;\n for (key in this.inputs) {\n if (_has(key, this.inputs)) {\n result = this.xf['@@transducer/step'](result, this.inputs[key]);\n if (result['@@transducer/reduced']) {\n result = result['@@transducer/value'];\n break;\n }\n }\n }\n this.inputs = null;\n return this.xf['@@transducer/result'](result);\n };\n XReduceBy.prototype['@@transducer/step'] = function (result, input) {\n var key = this.keyFn(input);\n this.inputs[key] = this.inputs[key] || [key, this.valueAcc];\n this.inputs[key][1] = this.valueFn(this.inputs[key][1], input);\n return result;\n };\n\n return XReduceBy;\n}();\n\nvar _xreduceBy = /*#__PURE__*/_curryN(4, [], function _xreduceBy(valueFn, valueAcc, keyFn, xf) {\n return new XReduceBy(valueFn, valueAcc, keyFn, xf);\n});\nexport default _xreduceBy;","import _curryN from './internal/_curryN.js';\nimport _dispatchable from './internal/_dispatchable.js';\nimport _has from './internal/_has.js';\nimport _reduce from './internal/_reduce.js';\nimport _xreduceBy from './internal/_xreduceBy.js';\n\n/**\n * Groups the elements of the list according to the result of calling\n * the String-returning function `keyFn` on each element and reduces the elements\n * of each group to a single value via the reducer function `valueFn`.\n *\n * This function is basically a more general [`groupBy`](#groupBy) function.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.20.0\n * @category List\n * @sig ((a, b) -> a) -> a -> (b -> String) -> [b] -> {String: a}\n * @param {Function} valueFn The function that reduces the elements of each group to a single\n * value. Receives two values, accumulator for a particular group and the current element.\n * @param {*} acc The (initial) accumulator value for each group.\n * @param {Function} keyFn The function that maps the list's element into a key.\n * @param {Array} list The array to group.\n * @return {Object} An object with the output of `keyFn` for keys, mapped to the output of\n * `valueFn` for elements which produced that key when passed to `keyFn`.\n * @see R.groupBy, R.reduce\n * @example\n *\n * const groupNames = (acc, {name}) => acc.concat(name)\n * const toGrade = ({score}) =>\n * score < 65 ? 'F' :\n * score < 70 ? 'D' :\n * score < 80 ? 'C' :\n * score < 90 ? 'B' : 'A'\n *\n * var students = [\n * {name: 'Abby', score: 83},\n * {name: 'Bart', score: 62},\n * {name: 'Curt', score: 88},\n * {name: 'Dora', score: 92},\n * ]\n *\n * reduceBy(groupNames, [], toGrade, students)\n * //=> {\"A\": [\"Dora\"], \"B\": [\"Abby\", \"Curt\"], \"F\": [\"Bart\"]}\n */\nvar reduceBy = /*#__PURE__*/_curryN(4, [], /*#__PURE__*/_dispatchable([], _xreduceBy, function reduceBy(valueFn, valueAcc, keyFn, list) {\n return _reduce(function (acc, elt) {\n var key = keyFn(elt);\n acc[key] = valueFn(_has(key, acc) ? acc[key] : valueAcc, elt);\n return acc;\n }, {}, list);\n}));\nexport default reduceBy;","import _curry2 from './_curry2.js';\nimport _xfBase from './_xfBase.js';\n\nvar XFilter = /*#__PURE__*/function () {\n function XFilter(f, xf) {\n this.xf = xf;\n this.f = f;\n }\n XFilter.prototype['@@transducer/init'] = _xfBase.init;\n XFilter.prototype['@@transducer/result'] = _xfBase.result;\n XFilter.prototype['@@transducer/step'] = function (result, input) {\n return this.f(input) ? this.xf['@@transducer/step'](result, input) : result;\n };\n\n return XFilter;\n}();\n\nvar _xfilter = /*#__PURE__*/_curry2(function _xfilter(f, xf) {\n return new XFilter(f, xf);\n});\nexport default _xfilter;","import _curry2 from './internal/_curry2.js';\nimport _dispatchable from './internal/_dispatchable.js';\nimport _filter from './internal/_filter.js';\nimport _isObject from './internal/_isObject.js';\nimport _reduce from './internal/_reduce.js';\nimport _xfilter from './internal/_xfilter.js';\nimport keys from './keys.js';\n\n/**\n * Takes a predicate and a `Filterable`, and returns a new filterable of the\n * same type containing the members of the given filterable which satisfy the\n * given predicate. Filterable objects include plain objects or any object\n * that has a filter method such as `Array`.\n *\n * Dispatches to the `filter` method of the second argument, if present.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig Filterable f => (a -> Boolean) -> f a -> f a\n * @param {Function} pred\n * @param {Array} filterable\n * @return {Array} Filterable\n * @see R.reject, R.transduce, R.addIndex\n * @example\n *\n * const isEven = n => n % 2 === 0;\n *\n * R.filter(isEven, [1, 2, 3, 4]); //=> [2, 4]\n *\n * R.filter(isEven, {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, d: 4}\n */\nvar filter = /*#__PURE__*/_curry2( /*#__PURE__*/_dispatchable(['filter'], _xfilter, function (pred, filterable) {\n return _isObject(filterable) ? _reduce(function (acc, key) {\n if (pred(filterable[key])) {\n acc[key] = filterable[key];\n }\n return acc;\n }, {}, keys(filterable)) :\n // else\n _filter(pred, filterable);\n}));\nexport default filter;","import identity from './identity.js';\nimport uniqBy from './uniqBy.js';\n\n/**\n * Returns a new list containing only one copy of each element in the original\n * list. [`R.equals`](#equals) is used to determine equality.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig [a] -> [a]\n * @param {Array} list The array to consider.\n * @return {Array} The list of unique items.\n * @example\n *\n * R.uniq([1, 1, 2, 1]); //=> [1, 2]\n * R.uniq([1, '1']); //=> [1, '1']\n * R.uniq([[42], [42]]); //=> [[42]]\n */\nvar uniq = /*#__PURE__*/uniqBy(identity);\nexport default uniq;","import _Set from './internal/_Set.js';\nimport _curry2 from './internal/_curry2.js';\n\n/**\n * Returns a new list containing only one copy of each element in the original\n * list, based upon the value returned by applying the supplied function to\n * each list element. Prefers the first item if the supplied function produces\n * the same value on two items. [`R.equals`](#equals) is used for comparison.\n *\n * @func\n * @memberOf R\n * @since v0.16.0\n * @category List\n * @sig (a -> b) -> [a] -> [a]\n * @param {Function} fn A function used to produce a value to use during comparisons.\n * @param {Array} list The array to consider.\n * @return {Array} The list of unique items.\n * @example\n *\n * R.uniqBy(Math.abs, [-1, -5, 2, 10, 1, 2]); //=> [-1, -5, 2, 10]\n */\nvar uniqBy = /*#__PURE__*/_curry2(function uniqBy(fn, list) {\n var set = new _Set();\n var result = [];\n var idx = 0;\n var appliedItem, item;\n\n while (idx < list.length) {\n item = list[idx];\n appliedItem = fn(item);\n if (set.add(appliedItem)) {\n result.push(item);\n }\n idx += 1;\n }\n return result;\n});\nexport default uniqBy;","import _curry2 from './_curry2.js';\nimport _reduced from './_reduced.js';\nimport _xfBase from './_xfBase.js';\n\nvar XTake = /*#__PURE__*/function () {\n function XTake(n, xf) {\n this.xf = xf;\n this.n = n;\n this.i = 0;\n }\n XTake.prototype['@@transducer/init'] = _xfBase.init;\n XTake.prototype['@@transducer/result'] = _xfBase.result;\n XTake.prototype['@@transducer/step'] = function (result, input) {\n this.i += 1;\n var ret = this.n === 0 ? result : this.xf['@@transducer/step'](result, input);\n return this.n >= 0 && this.i >= this.n ? _reduced(ret) : ret;\n };\n\n return XTake;\n}();\n\nvar _xtake = /*#__PURE__*/_curry2(function _xtake(n, xf) {\n return new XTake(n, xf);\n});\nexport default _xtake;","import _curry2 from './internal/_curry2.js';\nimport _dispatchable from './internal/_dispatchable.js';\nimport _xtake from './internal/_xtake.js';\nimport slice from './slice.js';\n\n/**\n * Returns the first `n` elements of the given list, string, or\n * transducer/transformer (or object with a `take` method).\n *\n * Dispatches to the `take` method of the second argument, if present.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig Number -> [a] -> [a]\n * @sig Number -> String -> String\n * @param {Number} n\n * @param {*} list\n * @return {*}\n * @see R.drop\n * @example\n *\n * R.take(1, ['foo', 'bar', 'baz']); //=> ['foo']\n * R.take(2, ['foo', 'bar', 'baz']); //=> ['foo', 'bar']\n * R.take(3, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz']\n * R.take(4, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz']\n * R.take(3, 'ramda'); //=> 'ram'\n *\n * const personnel = [\n * 'Dave Brubeck',\n * 'Paul Desmond',\n * 'Eugene Wright',\n * 'Joe Morello',\n * 'Gerry Mulligan',\n * 'Bob Bates',\n * 'Joe Dodge',\n * 'Ron Crotty'\n * ];\n *\n * const takeFive = R.take(5);\n * takeFive(personnel);\n * //=> ['Dave Brubeck', 'Paul Desmond', 'Eugene Wright', 'Joe Morello', 'Gerry Mulligan']\n * @symb R.take(-1, [a, b]) = [a, b]\n * @symb R.take(0, [a, b]) = []\n * @symb R.take(1, [a, b]) = [a]\n * @symb R.take(2, [a, b]) = [a, b]\n */\nvar take = /*#__PURE__*/_curry2( /*#__PURE__*/_dispatchable(['take'], _xtake, function take(n, xs) {\n return slice(0, n < 0 ? Infinity : n, xs);\n}));\nexport default take;","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name differenceInCalendarYears\n * @category Year Helpers\n * @summary Get the number of calendar years between the given dates.\n *\n * @description\n * Get the number of calendar years between the given dates.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of calendar years\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many calendar years are between 31 December 2013 and 11 February 2015?\n * const result = differenceInCalendarYears(\n * new Date(2015, 1, 11),\n * new Date(2013, 11, 31)\n * )\n * //=> 2\n */\n\nexport default function differenceInCalendarYears(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n return dateLeft.getFullYear() - dateRight.getFullYear();\n}","import toDate from \"../toDate/index.js\";\nimport differenceInCalendarYears from \"../differenceInCalendarYears/index.js\";\nimport compareAsc from \"../compareAsc/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name differenceInYears\n * @category Year Helpers\n * @summary Get the number of full years between the given dates.\n *\n * @description\n * Get the number of full years between the given dates.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of full years\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many full years are between 31 December 2013 and 11 February 2015?\n * const result = differenceInYears(new Date(2015, 1, 11), new Date(2013, 11, 31))\n * //=> 1\n */\n\nexport default function differenceInYears(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n var sign = compareAsc(dateLeft, dateRight);\n var difference = Math.abs(differenceInCalendarYears(dateLeft, dateRight)); // Set both dates to a valid leap year for accurate comparison when dealing\n // with leap days\n\n dateLeft.setFullYear(1584);\n dateRight.setFullYear(1584); // Math.abs(diff in full years - diff in calendar years) === 1 if last calendar year is not full\n // If so, result must be decreased by 1 in absolute value\n\n var isLastYearNotFull = compareAsc(dateLeft, dateRight) === -sign;\n var result = sign * (difference - Number(isLastYearNotFull)); // Prevent negative zero\n\n return result === 0 ? 0 : result;\n}","import getTimezoneOffsetInMilliseconds from \"../_lib/getTimezoneOffsetInMilliseconds/index.js\";\nimport startOfDay from \"../startOfDay/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nvar MILLISECONDS_IN_DAY = 86400000;\n/**\n * @name differenceInCalendarDays\n * @category Day Helpers\n * @summary Get the number of calendar days between the given dates.\n *\n * @description\n * Get the number of calendar days between the given dates. This means that the times are removed\n * from the dates and then the difference in days is calculated.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of calendar days\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many calendar days are between\n * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?\n * const result = differenceInCalendarDays(\n * new Date(2012, 6, 2, 0, 0),\n * new Date(2011, 6, 2, 23, 0)\n * )\n * //=> 366\n * // How many calendar days are between\n * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?\n * const result = differenceInCalendarDays(\n * new Date(2011, 6, 3, 0, 1),\n * new Date(2011, 6, 2, 23, 59)\n * )\n * //=> 1\n */\n\nexport default function differenceInCalendarDays(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var startOfDayLeft = startOfDay(dirtyDateLeft);\n var startOfDayRight = startOfDay(dirtyDateRight);\n var timestampLeft = startOfDayLeft.getTime() - getTimezoneOffsetInMilliseconds(startOfDayLeft);\n var timestampRight = startOfDayRight.getTime() - getTimezoneOffsetInMilliseconds(startOfDayRight); // Round the number of days to the nearest integer\n // because the number of milliseconds in a day is not constant\n // (e.g. it's different in the day of the daylight saving time clock shift)\n\n return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_DAY);\n}","import toDate from \"../toDate/index.js\";\nimport differenceInCalendarDays from \"../differenceInCalendarDays/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\"; // Like `compareAsc` but uses local time not UTC, which is needed\n// for accurate equality comparisons of UTC timestamps that end up\n// having the same representation in local time, e.g. one hour before\n// DST ends vs. the instant that DST ends.\n\nfunction compareLocalAsc(dateLeft, dateRight) {\n var diff = dateLeft.getFullYear() - dateRight.getFullYear() || dateLeft.getMonth() - dateRight.getMonth() || dateLeft.getDate() - dateRight.getDate() || dateLeft.getHours() - dateRight.getHours() || dateLeft.getMinutes() - dateRight.getMinutes() || dateLeft.getSeconds() - dateRight.getSeconds() || dateLeft.getMilliseconds() - dateRight.getMilliseconds();\n\n if (diff < 0) {\n return -1;\n } else if (diff > 0) {\n return 1; // Return 0 if diff is 0; return NaN if diff is NaN\n } else {\n return diff;\n }\n}\n/**\n * @name differenceInDays\n * @category Day Helpers\n * @summary Get the number of full days between the given dates.\n *\n * @description\n * Get the number of full day periods between two dates. Fractional days are\n * truncated towards zero.\n *\n * One \"full day\" is the distance between a local time in one day to the same\n * local time on the next or previous day. A full day can sometimes be less than\n * or more than 24 hours if a daylight savings change happens between two dates.\n *\n * To ignore DST and only measure exact 24-hour periods, use this instead:\n * `Math.floor(differenceInHours(dateLeft, dateRight)/24)|0`.\n *\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of full days according to the local timezone\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many full days are between\n * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?\n * const result = differenceInDays(\n * new Date(2012, 6, 2, 0, 0),\n * new Date(2011, 6, 2, 23, 0)\n * )\n * //=> 365\n * // How many full days are between\n * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?\n * const result = differenceInDays(\n * new Date(2011, 6, 3, 0, 1),\n * new Date(2011, 6, 2, 23, 59)\n * )\n * //=> 0\n * // How many full days are between\n * // 1 March 2020 0:00 and 1 June 2020 0:00 ?\n * // Note: because local time is used, the\n * // result will always be 92 days, even in\n * // time zones where DST starts and the\n * // period has only 92*24-1 hours.\n * const result = differenceInDays(\n * new Date(2020, 5, 1),\n * new Date(2020, 2, 1)\n * )\n//=> 92\n */\n\n\nexport default function differenceInDays(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n var sign = compareLocalAsc(dateLeft, dateRight);\n var difference = Math.abs(differenceInCalendarDays(dateLeft, dateRight));\n dateLeft.setDate(dateLeft.getDate() - sign * difference); // Math.abs(diff in full days - diff in calendar days) === 1 if last calendar day is not full\n // If so, result must be decreased by 1 in absolute value\n\n var isLastDayNotFull = Number(compareLocalAsc(dateLeft, dateRight) === -sign);\n var result = sign * (difference - isLastDayNotFull); // Prevent negative zero\n\n return result === 0 ? 0 : result;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addMilliseconds\n * @category Millisecond Helpers\n * @summary Add the specified number of milliseconds to the given date.\n *\n * @description\n * Add the specified number of milliseconds to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of milliseconds to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the milliseconds added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 750 milliseconds to 10 July 2014 12:45:30.000:\n * const result = addMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)\n * //=> Thu Jul 10 2014 12:45:30.750\n */\n\nexport default function addMilliseconds(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var timestamp = toDate(dirtyDate).getTime();\n var amount = toInteger(dirtyAmount);\n return new Date(timestamp + amount);\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addMilliseconds from \"../addMilliseconds/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name subMilliseconds\n * @category Millisecond Helpers\n * @summary Subtract the specified number of milliseconds from the given date.\n *\n * @description\n * Subtract the specified number of milliseconds from the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of milliseconds to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the milliseconds subtracted\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Subtract 750 milliseconds from 10 July 2014 12:45:30.000:\n * const result = subMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)\n * //=> Thu Jul 10 2014 12:45:29.250\n */\n\nexport default function subMilliseconds(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addMilliseconds(dirtyDate, -amount);\n}","import toInteger from \"../toInteger/index.js\";\nimport getUTCWeekYear from \"../getUTCWeekYear/index.js\";\nimport startOfUTCWeek from \"../startOfUTCWeek/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\"; // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nexport default function startOfUTCWeekYear(dirtyDate, dirtyOptions) {\n requiredArgs(1, arguments);\n var options = dirtyOptions || {};\n var locale = options.locale;\n var localeFirstWeekContainsDate = locale && locale.options && locale.options.firstWeekContainsDate;\n var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : toInteger(localeFirstWeekContainsDate);\n var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : toInteger(options.firstWeekContainsDate);\n var year = getUTCWeekYear(dirtyDate, dirtyOptions);\n var firstWeek = new Date(0);\n firstWeek.setUTCFullYear(year, 0, firstWeekContainsDate);\n firstWeek.setUTCHours(0, 0, 0, 0);\n var date = startOfUTCWeek(firstWeek, dirtyOptions);\n return date;\n}","import toDate from \"../../toDate/index.js\";\nimport startOfUTCWeek from \"../startOfUTCWeek/index.js\";\nimport startOfUTCWeekYear from \"../startOfUTCWeekYear/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nvar MILLISECONDS_IN_WEEK = 604800000; // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nexport default function getUTCWeek(dirtyDate, options) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var diff = startOfUTCWeek(date, options).getTime() - startOfUTCWeekYear(date, options).getTime(); // Round the number of days to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n\n return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;\n}","import getUTCISOWeekYear from \"../getUTCISOWeekYear/index.js\";\nimport startOfUTCISOWeek from \"../startOfUTCISOWeek/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\"; // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nexport default function startOfUTCISOWeekYear(dirtyDate) {\n requiredArgs(1, arguments);\n var year = getUTCISOWeekYear(dirtyDate);\n var fourthOfJanuary = new Date(0);\n fourthOfJanuary.setUTCFullYear(year, 0, 4);\n fourthOfJanuary.setUTCHours(0, 0, 0, 0);\n var date = startOfUTCISOWeek(fourthOfJanuary);\n return date;\n}","import toDate from \"../../toDate/index.js\";\nimport startOfUTCISOWeek from \"../startOfUTCISOWeek/index.js\";\nimport startOfUTCISOWeekYear from \"../startOfUTCISOWeekYear/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nvar MILLISECONDS_IN_WEEK = 604800000; // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nexport default function getUTCISOWeek(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var diff = startOfUTCISOWeek(date).getTime() - startOfUTCISOWeekYear(date).getTime(); // Round the number of days to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n\n return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;\n}","// based on https://github.com/WICG/focus-visible/blob/v4.1.5/src/focus-visible.js\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nvar hadKeyboardEvent = true;\nvar hadFocusVisibleRecently = false;\nvar hadFocusVisibleRecentlyTimeout = null;\nvar inputTypesWhitelist = {\n text: true,\n search: true,\n url: true,\n tel: true,\n email: true,\n password: true,\n number: true,\n date: true,\n month: true,\n week: true,\n time: true,\n datetime: true,\n 'datetime-local': true\n};\n/**\n * Computes whether the given element should automatically trigger the\n * `focus-visible` class being added, i.e. whether it should always match\n * `:focus-visible` when focused.\n * @param {Element} node\n * @return {boolean}\n */\n\nfunction focusTriggersKeyboardModality(node) {\n var type = node.type,\n tagName = node.tagName;\n\n if (tagName === 'INPUT' && inputTypesWhitelist[type] && !node.readOnly) {\n return true;\n }\n\n if (tagName === 'TEXTAREA' && !node.readOnly) {\n return true;\n }\n\n if (node.isContentEditable) {\n return true;\n }\n\n return false;\n}\n/**\n * Keep track of our keyboard modality state with `hadKeyboardEvent`.\n * If the most recent user interaction was via the keyboard;\n * and the key press did not include a meta, alt/option, or control key;\n * then the modality is keyboard. Otherwise, the modality is not keyboard.\n * @param {KeyboardEvent} event\n */\n\n\nfunction handleKeyDown(event) {\n if (event.metaKey || event.altKey || event.ctrlKey) {\n return;\n }\n\n hadKeyboardEvent = true;\n}\n/**\n * If at any point a user clicks with a pointing device, ensure that we change\n * the modality away from keyboard.\n * This avoids the situation where a user presses a key on an already focused\n * element, and then clicks on a different element, focusing it with a\n * pointing device, while we still think we're in keyboard modality.\n */\n\n\nfunction handlePointerDown() {\n hadKeyboardEvent = false;\n}\n\nfunction handleVisibilityChange() {\n if (this.visibilityState === 'hidden') {\n // If the tab becomes active again, the browser will handle calling focus\n // on the element (Safari actually calls it twice).\n // If this tab change caused a blur on an element with focus-visible,\n // re-apply the class when the user switches back to the tab.\n if (hadFocusVisibleRecently) {\n hadKeyboardEvent = true;\n }\n }\n}\n\nfunction prepare(doc) {\n doc.addEventListener('keydown', handleKeyDown, true);\n doc.addEventListener('mousedown', handlePointerDown, true);\n doc.addEventListener('pointerdown', handlePointerDown, true);\n doc.addEventListener('touchstart', handlePointerDown, true);\n doc.addEventListener('visibilitychange', handleVisibilityChange, true);\n}\n\nexport function teardown(doc) {\n doc.removeEventListener('keydown', handleKeyDown, true);\n doc.removeEventListener('mousedown', handlePointerDown, true);\n doc.removeEventListener('pointerdown', handlePointerDown, true);\n doc.removeEventListener('touchstart', handlePointerDown, true);\n doc.removeEventListener('visibilitychange', handleVisibilityChange, true);\n}\n\nfunction isFocusVisible(event) {\n var target = event.target;\n\n try {\n return target.matches(':focus-visible');\n } catch (error) {// browsers not implementing :focus-visible will throw a SyntaxError\n // we use our own heuristic for those browsers\n // rethrow might be better if it's not the expected error but do we really\n // want to crash if focus-visible malfunctioned?\n } // no need for validFocusTarget check. the user does that by attaching it to\n // focusable events only\n\n\n return hadKeyboardEvent || focusTriggersKeyboardModality(target);\n}\n/**\n * Should be called if a blur event is fired on a focus-visible element\n */\n\n\nfunction handleBlurVisible() {\n // To detect a tab/window switch, we look for a blur event followed\n // rapidly by a visibility change.\n // If we don't see a visibility change within 100ms, it's probably a\n // regular focus change.\n hadFocusVisibleRecently = true;\n window.clearTimeout(hadFocusVisibleRecentlyTimeout);\n hadFocusVisibleRecentlyTimeout = window.setTimeout(function () {\n hadFocusVisibleRecently = false;\n }, 100);\n}\n\nexport default function useIsFocusVisible() {\n var ref = React.useCallback(function (instance) {\n var node = ReactDOM.findDOMNode(instance);\n\n if (node != null) {\n prepare(node.ownerDocument);\n }\n }, []);\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useDebugValue(isFocusVisible);\n }\n\n return {\n isFocusVisible: isFocusVisible,\n onBlurVisible: handleBlurVisible,\n ref: ref\n };\n}","import { Children, cloneElement, isValidElement } from 'react';\n/**\n * Given `this.props.children`, return an object mapping key to child.\n *\n * @param {*} children `this.props.children`\n * @return {object} Mapping of key to child\n */\n\nexport function getChildMapping(children, mapFn) {\n var mapper = function mapper(child) {\n return mapFn && isValidElement(child) ? mapFn(child) : child;\n };\n\n var result = Object.create(null);\n if (children) Children.map(children, function (c) {\n return c;\n }).forEach(function (child) {\n // run the map function here instead so that the key is the computed one\n result[child.key] = mapper(child);\n });\n return result;\n}\n/**\n * When you're adding or removing children some may be added or removed in the\n * same render pass. We want to show *both* since we want to simultaneously\n * animate elements in and out. This function takes a previous set of keys\n * and a new set of keys and merges them with its best guess of the correct\n * ordering. In the future we may expose some of the utilities in\n * ReactMultiChild to make this easy, but for now React itself does not\n * directly have this concept of the union of prevChildren and nextChildren\n * so we implement it here.\n *\n * @param {object} prev prev children as returned from\n * `ReactTransitionChildMapping.getChildMapping()`.\n * @param {object} next next children as returned from\n * `ReactTransitionChildMapping.getChildMapping()`.\n * @return {object} a key set that contains all keys in `prev` and all keys\n * in `next` in a reasonable order.\n */\n\nexport function mergeChildMappings(prev, next) {\n prev = prev || {};\n next = next || {};\n\n function getValueForKey(key) {\n return key in next ? next[key] : prev[key];\n } // For each key of `next`, the list of keys to insert before that key in\n // the combined list\n\n\n var nextKeysPending = Object.create(null);\n var pendingKeys = [];\n\n for (var prevKey in prev) {\n if (prevKey in next) {\n if (pendingKeys.length) {\n nextKeysPending[prevKey] = pendingKeys;\n pendingKeys = [];\n }\n } else {\n pendingKeys.push(prevKey);\n }\n }\n\n var i;\n var childMapping = {};\n\n for (var nextKey in next) {\n if (nextKeysPending[nextKey]) {\n for (i = 0; i < nextKeysPending[nextKey].length; i++) {\n var pendingNextKey = nextKeysPending[nextKey][i];\n childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey);\n }\n }\n\n childMapping[nextKey] = getValueForKey(nextKey);\n } // Finally, add the keys which didn't appear before any key in `next`\n\n\n for (i = 0; i < pendingKeys.length; i++) {\n childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]);\n }\n\n return childMapping;\n}\n\nfunction getProp(child, prop, props) {\n return props[prop] != null ? props[prop] : child.props[prop];\n}\n\nexport function getInitialChildMapping(props, onExited) {\n return getChildMapping(props.children, function (child) {\n return cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: true,\n appear: getProp(child, 'appear', props),\n enter: getProp(child, 'enter', props),\n exit: getProp(child, 'exit', props)\n });\n });\n}\nexport function getNextChildMapping(nextProps, prevChildMapping, onExited) {\n var nextChildMapping = getChildMapping(nextProps.children);\n var children = mergeChildMappings(prevChildMapping, nextChildMapping);\n Object.keys(children).forEach(function (key) {\n var child = children[key];\n if (!isValidElement(child)) return;\n var hasPrev = (key in prevChildMapping);\n var hasNext = (key in nextChildMapping);\n var prevChild = prevChildMapping[key];\n var isLeaving = isValidElement(prevChild) && !prevChild.props.in; // item is new (entering)\n\n if (hasNext && (!hasPrev || isLeaving)) {\n // console.log('entering', key)\n children[key] = cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: true,\n exit: getProp(child, 'exit', nextProps),\n enter: getProp(child, 'enter', nextProps)\n });\n } else if (!hasNext && hasPrev && !isLeaving) {\n // item is old (exiting)\n // console.log('leaving', key)\n children[key] = cloneElement(child, {\n in: false\n });\n } else if (hasNext && hasPrev && isValidElement(prevChild)) {\n // item hasn't changed transition states\n // copy over the last transition props;\n // console.log('unchanged', key)\n children[key] = cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: prevChild.props.in,\n exit: getProp(child, 'exit', nextProps),\n enter: getProp(child, 'enter', nextProps)\n });\n }\n });\n return children;\n}","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport TransitionGroupContext from './TransitionGroupContext';\nimport { getChildMapping, getInitialChildMapping, getNextChildMapping } from './utils/ChildMapping';\n\nvar values = Object.values || function (obj) {\n return Object.keys(obj).map(function (k) {\n return obj[k];\n });\n};\n\nvar defaultProps = {\n component: 'div',\n childFactory: function childFactory(child) {\n return child;\n }\n};\n/**\n * The `` component manages a set of transition components\n * (`` and ``) in a list. Like with the transition\n * components, `` is a state machine for managing the mounting\n * and unmounting of components over time.\n *\n * Consider the example below. As items are removed or added to the TodoList the\n * `in` prop is toggled automatically by the ``.\n *\n * Note that `` does not define any animation behavior!\n * Exactly _how_ a list item animates is up to the individual transition\n * component. This means you can mix and match animations across different list\n * items.\n */\n\nvar TransitionGroup = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(TransitionGroup, _React$Component);\n\n function TransitionGroup(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n\n var handleExited = _this.handleExited.bind(_assertThisInitialized(_this)); // Initial children should all be entering, dependent on appear\n\n\n _this.state = {\n contextValue: {\n isMounting: true\n },\n handleExited: handleExited,\n firstRender: true\n };\n return _this;\n }\n\n var _proto = TransitionGroup.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.mounted = true;\n this.setState({\n contextValue: {\n isMounting: false\n }\n });\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.mounted = false;\n };\n\n TransitionGroup.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) {\n var prevChildMapping = _ref.children,\n handleExited = _ref.handleExited,\n firstRender = _ref.firstRender;\n return {\n children: firstRender ? getInitialChildMapping(nextProps, handleExited) : getNextChildMapping(nextProps, prevChildMapping, handleExited),\n firstRender: false\n };\n } // node is `undefined` when user provided `nodeRef` prop\n ;\n\n _proto.handleExited = function handleExited(child, node) {\n var currentChildMapping = getChildMapping(this.props.children);\n if (child.key in currentChildMapping) return;\n\n if (child.props.onExited) {\n child.props.onExited(node);\n }\n\n if (this.mounted) {\n this.setState(function (state) {\n var children = _extends({}, state.children);\n\n delete children[child.key];\n return {\n children: children\n };\n });\n }\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n Component = _this$props.component,\n childFactory = _this$props.childFactory,\n props = _objectWithoutPropertiesLoose(_this$props, [\"component\", \"childFactory\"]);\n\n var contextValue = this.state.contextValue;\n var children = values(this.state.children).map(childFactory);\n delete props.appear;\n delete props.enter;\n delete props.exit;\n\n if (Component === null) {\n return /*#__PURE__*/React.createElement(TransitionGroupContext.Provider, {\n value: contextValue\n }, children);\n }\n\n return /*#__PURE__*/React.createElement(TransitionGroupContext.Provider, {\n value: contextValue\n }, /*#__PURE__*/React.createElement(Component, props, children));\n };\n\n return TransitionGroup;\n}(React.Component);\n\nTransitionGroup.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * `` renders a `
` by default. You can change this\n * behavior by providing a `component` prop.\n * If you use React v16+ and would like to avoid a wrapping `
` element\n * you can pass in `component={null}`. This is useful if the wrapping div\n * borks your css styles.\n */\n component: PropTypes.any,\n\n /**\n * A set of `` components, that are toggled `in` and out as they\n * leave. the `` will inject specific transition props, so\n * remember to spread them through if you are wrapping the `` as\n * with our `` example.\n *\n * While this component is meant for multiple `Transition` or `CSSTransition`\n * children, sometimes you may want to have a single transition child with\n * content that you want to be transitioned out and in when you change it\n * (e.g. routes, images etc.) In that case you can change the `key` prop of\n * the transition child as you change its content, this will cause\n * `TransitionGroup` to transition the child out and back in.\n */\n children: PropTypes.node,\n\n /**\n * A convenience prop that enables or disables appear animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n appear: PropTypes.bool,\n\n /**\n * A convenience prop that enables or disables enter animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * A convenience prop that enables or disables exit animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n exit: PropTypes.bool,\n\n /**\n * You may need to apply reactive updates to a child as it is exiting.\n * This is generally done by using `cloneElement` however in the case of an exiting\n * child the element has already been removed and not accessible to the consumer.\n *\n * If you do need to update a child as it leaves you can provide a `childFactory`\n * to wrap every child, even the ones that are leaving.\n *\n * @type Function(child: ReactElement) -> ReactElement\n */\n childFactory: PropTypes.func\n} : {};\nTransitionGroup.defaultProps = defaultProps;\nexport default TransitionGroup;","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport useEventCallback from '../utils/useEventCallback';\nvar useEnhancedEffect = typeof window === 'undefined' ? React.useEffect : React.useLayoutEffect;\n/**\n * @ignore - internal component.\n */\n\nfunction Ripple(props) {\n var classes = props.classes,\n _props$pulsate = props.pulsate,\n pulsate = _props$pulsate === void 0 ? false : _props$pulsate,\n rippleX = props.rippleX,\n rippleY = props.rippleY,\n rippleSize = props.rippleSize,\n inProp = props.in,\n _props$onExited = props.onExited,\n onExited = _props$onExited === void 0 ? function () {} : _props$onExited,\n timeout = props.timeout;\n\n var _React$useState = React.useState(false),\n leaving = _React$useState[0],\n setLeaving = _React$useState[1];\n\n var rippleClassName = clsx(classes.ripple, classes.rippleVisible, pulsate && classes.ripplePulsate);\n var rippleStyles = {\n width: rippleSize,\n height: rippleSize,\n top: -(rippleSize / 2) + rippleY,\n left: -(rippleSize / 2) + rippleX\n };\n var childClassName = clsx(classes.child, leaving && classes.childLeaving, pulsate && classes.childPulsate);\n var handleExited = useEventCallback(onExited); // Ripple is used for user feedback (e.g. click or press) so we want to apply styles with the highest priority\n\n useEnhancedEffect(function () {\n if (!inProp) {\n // react-transition-group#onExit\n setLeaving(true); // react-transition-group#onExited\n\n var timeoutId = setTimeout(handleExited, timeout);\n return function () {\n clearTimeout(timeoutId);\n };\n }\n\n return undefined;\n }, [handleExited, inProp, timeout]);\n return /*#__PURE__*/React.createElement(\"span\", {\n className: rippleClassName,\n style: rippleStyles\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: childClassName\n }));\n}\n\nprocess.env.NODE_ENV !== \"production\" ? Ripple.propTypes = {\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore - injected from TransitionGroup\n */\n in: PropTypes.bool,\n\n /**\n * @ignore - injected from TransitionGroup\n */\n onExited: PropTypes.func,\n\n /**\n * If `true`, the ripple pulsates, typically indicating the keyboard focus state of an element.\n */\n pulsate: PropTypes.bool,\n\n /**\n * Diameter of the ripple.\n */\n rippleSize: PropTypes.number,\n\n /**\n * Horizontal position of the ripple center.\n */\n rippleX: PropTypes.number,\n\n /**\n * Vertical position of the ripple center.\n */\n rippleY: PropTypes.number,\n\n /**\n * exit delay\n */\n timeout: PropTypes.number.isRequired\n} : void 0;\nexport default Ripple;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { TransitionGroup } from 'react-transition-group';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Ripple from './Ripple';\nvar DURATION = 550;\nexport var DELAY_RIPPLE = 80;\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n overflow: 'hidden',\n pointerEvents: 'none',\n position: 'absolute',\n zIndex: 0,\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n borderRadius: 'inherit'\n },\n\n /* Styles applied to the internal `Ripple` components `ripple` class. */\n ripple: {\n opacity: 0,\n position: 'absolute'\n },\n\n /* Styles applied to the internal `Ripple` components `rippleVisible` class. */\n rippleVisible: {\n opacity: 0.3,\n transform: 'scale(1)',\n animation: \"$enter \".concat(DURATION, \"ms \").concat(theme.transitions.easing.easeInOut)\n },\n\n /* Styles applied to the internal `Ripple` components `ripplePulsate` class. */\n ripplePulsate: {\n animationDuration: \"\".concat(theme.transitions.duration.shorter, \"ms\")\n },\n\n /* Styles applied to the internal `Ripple` components `child` class. */\n child: {\n opacity: 1,\n display: 'block',\n width: '100%',\n height: '100%',\n borderRadius: '50%',\n backgroundColor: 'currentColor'\n },\n\n /* Styles applied to the internal `Ripple` components `childLeaving` class. */\n childLeaving: {\n opacity: 0,\n animation: \"$exit \".concat(DURATION, \"ms \").concat(theme.transitions.easing.easeInOut)\n },\n\n /* Styles applied to the internal `Ripple` components `childPulsate` class. */\n childPulsate: {\n position: 'absolute',\n left: 0,\n top: 0,\n animation: \"$pulsate 2500ms \".concat(theme.transitions.easing.easeInOut, \" 200ms infinite\")\n },\n '@keyframes enter': {\n '0%': {\n transform: 'scale(0)',\n opacity: 0.1\n },\n '100%': {\n transform: 'scale(1)',\n opacity: 0.3\n }\n },\n '@keyframes exit': {\n '0%': {\n opacity: 1\n },\n '100%': {\n opacity: 0\n }\n },\n '@keyframes pulsate': {\n '0%': {\n transform: 'scale(1)'\n },\n '50%': {\n transform: 'scale(0.92)'\n },\n '100%': {\n transform: 'scale(1)'\n }\n }\n };\n};\n/**\n * @ignore - internal component.\n *\n * TODO v5: Make private\n */\n\nvar TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(props, ref) {\n var _props$center = props.center,\n centerProp = _props$center === void 0 ? false : _props$center,\n classes = props.classes,\n className = props.className,\n other = _objectWithoutProperties(props, [\"center\", \"classes\", \"className\"]);\n\n var _React$useState = React.useState([]),\n ripples = _React$useState[0],\n setRipples = _React$useState[1];\n\n var nextKey = React.useRef(0);\n var rippleCallback = React.useRef(null);\n React.useEffect(function () {\n if (rippleCallback.current) {\n rippleCallback.current();\n rippleCallback.current = null;\n }\n }, [ripples]); // Used to filter out mouse emulated events on mobile.\n\n var ignoringMouseDown = React.useRef(false); // We use a timer in order to only show the ripples for touch \"click\" like events.\n // We don't want to display the ripple for touch scroll events.\n\n var startTimer = React.useRef(null); // This is the hook called once the previous timeout is ready.\n\n var startTimerCommit = React.useRef(null);\n var container = React.useRef(null);\n React.useEffect(function () {\n return function () {\n clearTimeout(startTimer.current);\n };\n }, []);\n var startCommit = React.useCallback(function (params) {\n var pulsate = params.pulsate,\n rippleX = params.rippleX,\n rippleY = params.rippleY,\n rippleSize = params.rippleSize,\n cb = params.cb;\n setRipples(function (oldRipples) {\n return [].concat(_toConsumableArray(oldRipples), [/*#__PURE__*/React.createElement(Ripple, {\n key: nextKey.current,\n classes: classes,\n timeout: DURATION,\n pulsate: pulsate,\n rippleX: rippleX,\n rippleY: rippleY,\n rippleSize: rippleSize\n })]);\n });\n nextKey.current += 1;\n rippleCallback.current = cb;\n }, [classes]);\n var start = React.useCallback(function () {\n var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var cb = arguments.length > 2 ? arguments[2] : undefined;\n var _options$pulsate = options.pulsate,\n pulsate = _options$pulsate === void 0 ? false : _options$pulsate,\n _options$center = options.center,\n center = _options$center === void 0 ? centerProp || options.pulsate : _options$center,\n _options$fakeElement = options.fakeElement,\n fakeElement = _options$fakeElement === void 0 ? false : _options$fakeElement;\n\n if (event.type === 'mousedown' && ignoringMouseDown.current) {\n ignoringMouseDown.current = false;\n return;\n }\n\n if (event.type === 'touchstart') {\n ignoringMouseDown.current = true;\n }\n\n var element = fakeElement ? null : container.current;\n var rect = element ? element.getBoundingClientRect() : {\n width: 0,\n height: 0,\n left: 0,\n top: 0\n }; // Get the size of the ripple\n\n var rippleX;\n var rippleY;\n var rippleSize;\n\n if (center || event.clientX === 0 && event.clientY === 0 || !event.clientX && !event.touches) {\n rippleX = Math.round(rect.width / 2);\n rippleY = Math.round(rect.height / 2);\n } else {\n var _ref = event.touches ? event.touches[0] : event,\n clientX = _ref.clientX,\n clientY = _ref.clientY;\n\n rippleX = Math.round(clientX - rect.left);\n rippleY = Math.round(clientY - rect.top);\n }\n\n if (center) {\n rippleSize = Math.sqrt((2 * Math.pow(rect.width, 2) + Math.pow(rect.height, 2)) / 3); // For some reason the animation is broken on Mobile Chrome if the size if even.\n\n if (rippleSize % 2 === 0) {\n rippleSize += 1;\n }\n } else {\n var sizeX = Math.max(Math.abs((element ? element.clientWidth : 0) - rippleX), rippleX) * 2 + 2;\n var sizeY = Math.max(Math.abs((element ? element.clientHeight : 0) - rippleY), rippleY) * 2 + 2;\n rippleSize = Math.sqrt(Math.pow(sizeX, 2) + Math.pow(sizeY, 2));\n } // Touche devices\n\n\n if (event.touches) {\n // check that this isn't another touchstart due to multitouch\n // otherwise we will only clear a single timer when unmounting while two\n // are running\n if (startTimerCommit.current === null) {\n // Prepare the ripple effect.\n startTimerCommit.current = function () {\n startCommit({\n pulsate: pulsate,\n rippleX: rippleX,\n rippleY: rippleY,\n rippleSize: rippleSize,\n cb: cb\n });\n }; // Delay the execution of the ripple effect.\n\n\n startTimer.current = setTimeout(function () {\n if (startTimerCommit.current) {\n startTimerCommit.current();\n startTimerCommit.current = null;\n }\n }, DELAY_RIPPLE); // We have to make a tradeoff with this value.\n }\n } else {\n startCommit({\n pulsate: pulsate,\n rippleX: rippleX,\n rippleY: rippleY,\n rippleSize: rippleSize,\n cb: cb\n });\n }\n }, [centerProp, startCommit]);\n var pulsate = React.useCallback(function () {\n start({}, {\n pulsate: true\n });\n }, [start]);\n var stop = React.useCallback(function (event, cb) {\n clearTimeout(startTimer.current); // The touch interaction occurs too quickly.\n // We still want to show ripple effect.\n\n if (event.type === 'touchend' && startTimerCommit.current) {\n event.persist();\n startTimerCommit.current();\n startTimerCommit.current = null;\n startTimer.current = setTimeout(function () {\n stop(event, cb);\n });\n return;\n }\n\n startTimerCommit.current = null;\n setRipples(function (oldRipples) {\n if (oldRipples.length > 0) {\n return oldRipples.slice(1);\n }\n\n return oldRipples;\n });\n rippleCallback.current = cb;\n }, []);\n React.useImperativeHandle(ref, function () {\n return {\n pulsate: pulsate,\n start: start,\n stop: stop\n };\n }, [pulsate, start, stop]);\n return /*#__PURE__*/React.createElement(\"span\", _extends({\n className: clsx(classes.root, className),\n ref: container\n }, other), /*#__PURE__*/React.createElement(TransitionGroup, {\n component: null,\n exit: true\n }, ripples));\n});\nprocess.env.NODE_ENV !== \"production\" ? TouchRipple.propTypes = {\n /**\n * If `true`, the ripple starts at the center of the component\n * rather than at the point of interaction.\n */\n center: PropTypes.bool,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string\n} : void 0;\nexport default withStyles(styles, {\n flip: false,\n name: 'MuiTouchRipple'\n})( /*#__PURE__*/React.memo(TouchRipple));","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport * as ReactDOM from 'react-dom';\nimport clsx from 'clsx';\nimport { elementTypeAcceptingRef, refType } from '@material-ui/utils';\nimport useForkRef from '../utils/useForkRef';\nimport useEventCallback from '../utils/useEventCallback';\nimport withStyles from '../styles/withStyles';\nimport useIsFocusVisible from '../utils/useIsFocusVisible';\nimport TouchRipple from './TouchRipple';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n position: 'relative',\n WebkitTapHighlightColor: 'transparent',\n backgroundColor: 'transparent',\n // Reset default value\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0,\n border: 0,\n margin: 0,\n // Remove the margin in Safari\n borderRadius: 0,\n padding: 0,\n // Remove the padding in Firefox\n cursor: 'pointer',\n userSelect: 'none',\n verticalAlign: 'middle',\n '-moz-appearance': 'none',\n // Reset\n '-webkit-appearance': 'none',\n // Reset\n textDecoration: 'none',\n // So we take precedent over the style of a native element.\n color: 'inherit',\n '&::-moz-focus-inner': {\n borderStyle: 'none' // Remove Firefox dotted outline.\n\n },\n '&$disabled': {\n pointerEvents: 'none',\n // Disable link interactions\n cursor: 'default'\n },\n '@media print': {\n colorAdjust: 'exact'\n }\n },\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Pseudo-class applied to the root element if keyboard focused. */\n focusVisible: {}\n};\n/**\n * `ButtonBase` contains as few styles as possible.\n * It aims to be a simple building block for creating a button.\n * It contains a load of style reset and some focus/ripple logic.\n */\n\nvar ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref) {\n var action = props.action,\n buttonRefProp = props.buttonRef,\n _props$centerRipple = props.centerRipple,\n centerRipple = _props$centerRipple === void 0 ? false : _props$centerRipple,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n component = _props$component === void 0 ? 'button' : _props$component,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$disableRipple = props.disableRipple,\n disableRipple = _props$disableRipple === void 0 ? false : _props$disableRipple,\n _props$disableTouchRi = props.disableTouchRipple,\n disableTouchRipple = _props$disableTouchRi === void 0 ? false : _props$disableTouchRi,\n _props$focusRipple = props.focusRipple,\n focusRipple = _props$focusRipple === void 0 ? false : _props$focusRipple,\n focusVisibleClassName = props.focusVisibleClassName,\n onBlur = props.onBlur,\n onClick = props.onClick,\n onFocus = props.onFocus,\n onFocusVisible = props.onFocusVisible,\n onKeyDown = props.onKeyDown,\n onKeyUp = props.onKeyUp,\n onMouseDown = props.onMouseDown,\n onMouseLeave = props.onMouseLeave,\n onMouseUp = props.onMouseUp,\n onTouchEnd = props.onTouchEnd,\n onTouchMove = props.onTouchMove,\n onTouchStart = props.onTouchStart,\n onDragLeave = props.onDragLeave,\n _props$tabIndex = props.tabIndex,\n tabIndex = _props$tabIndex === void 0 ? 0 : _props$tabIndex,\n TouchRippleProps = props.TouchRippleProps,\n _props$type = props.type,\n type = _props$type === void 0 ? 'button' : _props$type,\n other = _objectWithoutProperties(props, [\"action\", \"buttonRef\", \"centerRipple\", \"children\", \"classes\", \"className\", \"component\", \"disabled\", \"disableRipple\", \"disableTouchRipple\", \"focusRipple\", \"focusVisibleClassName\", \"onBlur\", \"onClick\", \"onFocus\", \"onFocusVisible\", \"onKeyDown\", \"onKeyUp\", \"onMouseDown\", \"onMouseLeave\", \"onMouseUp\", \"onTouchEnd\", \"onTouchMove\", \"onTouchStart\", \"onDragLeave\", \"tabIndex\", \"TouchRippleProps\", \"type\"]);\n\n var buttonRef = React.useRef(null);\n\n function getButtonNode() {\n // #StrictMode ready\n return ReactDOM.findDOMNode(buttonRef.current);\n }\n\n var rippleRef = React.useRef(null);\n\n var _React$useState = React.useState(false),\n focusVisible = _React$useState[0],\n setFocusVisible = _React$useState[1];\n\n if (disabled && focusVisible) {\n setFocusVisible(false);\n }\n\n var _useIsFocusVisible = useIsFocusVisible(),\n isFocusVisible = _useIsFocusVisible.isFocusVisible,\n onBlurVisible = _useIsFocusVisible.onBlurVisible,\n focusVisibleRef = _useIsFocusVisible.ref;\n\n React.useImperativeHandle(action, function () {\n return {\n focusVisible: function focusVisible() {\n setFocusVisible(true);\n buttonRef.current.focus();\n }\n };\n }, []);\n React.useEffect(function () {\n if (focusVisible && focusRipple && !disableRipple) {\n rippleRef.current.pulsate();\n }\n }, [disableRipple, focusRipple, focusVisible]);\n\n function useRippleHandler(rippleAction, eventCallback) {\n var skipRippleAction = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : disableTouchRipple;\n return useEventCallback(function (event) {\n if (eventCallback) {\n eventCallback(event);\n }\n\n var ignore = skipRippleAction;\n\n if (!ignore && rippleRef.current) {\n rippleRef.current[rippleAction](event);\n }\n\n return true;\n });\n }\n\n var handleMouseDown = useRippleHandler('start', onMouseDown);\n var handleDragLeave = useRippleHandler('stop', onDragLeave);\n var handleMouseUp = useRippleHandler('stop', onMouseUp);\n var handleMouseLeave = useRippleHandler('stop', function (event) {\n if (focusVisible) {\n event.preventDefault();\n }\n\n if (onMouseLeave) {\n onMouseLeave(event);\n }\n });\n var handleTouchStart = useRippleHandler('start', onTouchStart);\n var handleTouchEnd = useRippleHandler('stop', onTouchEnd);\n var handleTouchMove = useRippleHandler('stop', onTouchMove);\n var handleBlur = useRippleHandler('stop', function (event) {\n if (focusVisible) {\n onBlurVisible(event);\n setFocusVisible(false);\n }\n\n if (onBlur) {\n onBlur(event);\n }\n }, false);\n var handleFocus = useEventCallback(function (event) {\n // Fix for https://github.com/facebook/react/issues/7769\n if (!buttonRef.current) {\n buttonRef.current = event.currentTarget;\n }\n\n if (isFocusVisible(event)) {\n setFocusVisible(true);\n\n if (onFocusVisible) {\n onFocusVisible(event);\n }\n }\n\n if (onFocus) {\n onFocus(event);\n }\n });\n\n var isNonNativeButton = function isNonNativeButton() {\n var button = getButtonNode();\n return component && component !== 'button' && !(button.tagName === 'A' && button.href);\n };\n /**\n * IE 11 shim for https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/repeat\n */\n\n\n var keydownRef = React.useRef(false);\n var handleKeyDown = useEventCallback(function (event) {\n // Check if key is already down to avoid repeats being counted as multiple activations\n if (focusRipple && !keydownRef.current && focusVisible && rippleRef.current && event.key === ' ') {\n keydownRef.current = true;\n event.persist();\n rippleRef.current.stop(event, function () {\n rippleRef.current.start(event);\n });\n }\n\n if (event.target === event.currentTarget && isNonNativeButton() && event.key === ' ') {\n event.preventDefault();\n }\n\n if (onKeyDown) {\n onKeyDown(event);\n } // Keyboard accessibility for non interactive elements\n\n\n if (event.target === event.currentTarget && isNonNativeButton() && event.key === 'Enter' && !disabled) {\n event.preventDefault();\n\n if (onClick) {\n onClick(event);\n }\n }\n });\n var handleKeyUp = useEventCallback(function (event) {\n // calling preventDefault in keyUp on a