{"version":3,"sources":["../../node_modules/fp-ts/es6/index.js","../../node_modules/fp-ts/lib/Eq.js","../../node_modules/fp-ts/lib/Either.js","../../node_modules/fp-ts/es6/function.js","../../node_modules/fp-ts/es6/boolean.js","../../node_modules/fp-ts/es6/These.js","../../node_modules/fp-ts/es6/Tuple.js","../../node_modules/fp-ts/lib/Array.js","../../node_modules/fp-ts/lib/ChainRec.js","../../node_modules/fp-ts/es6/pipeable.js"],"names":["Object","defineProperty","exports","value","eq","Contravariant","getMonoid","eqDate","getTupleEq","getStructEq","eqBoolean","eqNumber","eqString","strictEqual","eqStrict","URI","contramap","fromEquals","function_1","require","equals","x","y","a","b","f","fa","eqs","k","_i","arguments","length","every","E","i","valueOf","empty","concat","pipe","getWitherable","getFilterable","getApplyMonoid","getApplySemigroup","getSemigroup","getEq","getShow","throwError","sequence","traverse","reduceRight","foldMap","reduce","duplicate","extend","alt","altW","flatten","chainFirst","chainFirstW","chain","chainW","of","apSecond","apFirst","ap","apW","mapLeft","bimap","map","filterOrElse","filterOrElseW","orElse","swap","chainNullableK","fromNullableK","getOrElse","getOrElseW","fold","fromPredicate","fromOption","stringifyJSON","parseJSON","tryCatch","fromNullable","right","left","isRight","isLeft","sequenceArray","traverseArray","traverseArrayWithIndex","apS","apSW","bind","bindW","bindTo","Do","exists","elem","toError","either","getValidationMonoid","MonadThrow","ChainRec","Extend","Alt","Bifunctor","Traversable","Foldable","Monad","Applicative","Functor","getValidationSemigroup","getValidation","getAltValidation","getApplicativeValidation","ChainRec_1","ma","_tag","e","onError","s","JSON","parse","u","stringify","onNone","predicate","onFalse","onLeft","onRight","from","apply","map_","ap_","fab","chain_","reduce_","foldMap_","M","foldMapM","reduceRight_","traverse_","F","traverseF","ta","bimap_","g","mapLeft_","alt_","that","extend_","wa","chainRec_","tailRec","fb","flow","identity","S","_E","undefined","compact","separate","filter","filterMap","ob","partition","p","partitionMap","SE","me","ea","SA","show","EL","EA","F_","wither","wilt","applicativeValidation","altValidation","chainRec","Error","String","name","bindTo_","bind_","arr","result","push","_","not","constant","constTrue","constFalse","constNull","constUndefined","constVoid","ab","bc","cd","de","ef","fg","gh","hi","ij","this","tuple","t","increment","n","decrement","jk","kl","lm","mn","no","op","pq","qr","rs","st","_a","assign","onTrue","both","onBoth","l","EE","isBoth","getApplicative","getMonad","applicative","toTuple","getLeft","some","none","getRight","leftOrBoth","isNone","rightOrBoth","getLeftOnly","getRightOnly","fromOptions","fe","these","fst","RT","snd","getApply","getChain","getChainRec","compose_","compose","extract","Semigroupoid","Comonad","__createBinding","create","o","m","k2","enumerable","get","__setModuleDefault","v","__importStar","mod","__esModule","prototype","hasOwnProperty","call","rotate","intersperse","prependToAll","unzip","zip","zipWith","sort","lefts","rights","reverse","modifyAt","deleteAt","updateAt","insertAt","copy","findLastIndex","findLastMap","findLast","findFirstMap","findFirst","findIndex","dropLeftWhile","dropRight","dropLeft","spanLeft","takeLeftWhile","takeRight","takeLeft","init","tail","last","head","snoc","cons","lookup","isOutOfBound","isNonEmpty","isEmpty","scanRight","scanLeft","foldRight","foldLeft","replicate","range","makeBy","getOrd","FunctorWithIndex","zero","unfold","traverseWithIndex","reduceRightWithIndex","reduceWithIndex","foldMapWithIndex","filterWithIndex","filterMapWithIndex","partitionMapWithIndex","partitionWithIndex","mapWithIndex","chainWithIndex","difference","intersection","union","comprehension","chunksOf","splitAt","chop","sortBy","uniq","unsafeDeleteAt","unsafeUpdateAt","unsafeInsertAt","array","Witherable","TraversableWithIndex","FoldableWithIndex","FilterableWithIndex","Filterable","Compactable","Alternative","Unfoldable","RA","toArray","input","mapWithIndex_","filter_","filterMap_","partition_","partitionMap_","filterWithIndex_","filterMapWithIndex_","partitionWithIndex_","partitionMapWithIndex_","reduceWithIndex_","foldMapWithIndex_","reduceRightWithIndex_","traverseWithIndex_","wither_","wilt_","pipeFromFunctionModule","pipeable","I","r","isFunctor","isContravariant","isFunctorWithIndex","isApply","isChain","mma","isBifunctor","isExtend","isFoldable","isFoldableWithIndex","isAlt","isC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jC,QAMhEkS,EAAExS,cAJkB,SAAUiD,EAAWC,GAAW,OAAO,SAAUzG,GAAK,OAAQwG,EAAUxG,GAAK8V,EAAExT,GAAGtC,GAAK8V,EAAEvU,WAAWkF,EAAQzG,MAKhI+V,EAAEjT,aAJiB,SAAU0D,EAAWC,GAAW,OAAO,SAAUX,GAAM,OAAOgQ,EAAE1T,MAAM0D,GAAI,SAAU9F,GAAK,OAAQwG,EAAUxG,GAAK8V,EAAExT,GAAGtC,GAAK8V,EAAEvU,WAAWkF,EAAQzG,SAMtK,OAAO+V","file":"static/js/index~26271223.f9a7519c.chunk.js","sourcesContent":["/**\n * @since 2.0.0\n */\nimport * as alt from './Alt';\nimport * as alternative from './Alternative';\nimport * as applicative from './Applicative';\nimport * as apply from './Apply';\nimport * as array from './Array';\nimport * as bifunctor from './Bifunctor';\nimport * as boolean from './boolean';\nimport * as booleanAlgebra from './BooleanAlgebra';\nimport * as bounded from './Bounded';\nimport * as boundedDistributiveLattice from './BoundedDistributiveLattice';\nimport * as boundedJoinSemilattice from './BoundedJoinSemilattice';\nimport * as boundedLattice from './BoundedLattice';\nimport * as boundedMeetSemilattice from './BoundedMeetSemilattice';\nimport * as category from './Category';\nimport * as chain from './Chain';\nimport * as chainRec from './ChainRec';\nimport * as choice from './Choice';\nimport * as comonad from './Comonad';\nimport * as compactable from './Compactable';\nimport * as console from './Console';\nimport * as const_ from './Const';\nimport * as contravariant from './Contravariant';\nimport * as date from './Date';\nimport * as distributiveLattice from './DistributiveLattice';\nimport * as either from './Either';\nimport * as eitherT from './EitherT';\nimport * as eq from './Eq';\nimport * as extend from './Extend';\nimport * as field from './Field';\nimport * as filterable from './Filterable';\nimport * as filterableWithIndex from './FilterableWithIndex';\nimport * as foldable from './Foldable';\nimport * as foldableWithIndex from './FoldableWithIndex';\nimport * as function_ from './function';\nimport * as functor from './Functor';\nimport * as functorWithIndex from './FunctorWithIndex';\nimport * as group from './Group';\nimport * as heytingAlgebra from './HeytingAlgebra';\nimport * as hkt from './HKT';\nimport * as identity from './Identity';\nimport * as invariant from './Invariant';\nimport * as io from './IO';\nimport * as ioEither from './IOEither';\nimport * as ioRef from './IORef';\nimport * as joinSemilattice from './JoinSemilattice';\nimport * as lattice from './Lattice';\nimport * as magma from './Magma';\nimport * as map from './Map';\nimport * as meetSemilattice from './MeetSemilattice';\nimport * as monad from './Monad';\nimport * as monadIO from './MonadIO';\nimport * as monadTask from './MonadTask';\nimport * as monadThrow from './MonadThrow';\nimport * as monoid from './Monoid';\nimport * as nonEmptyArray from './NonEmptyArray';\nimport * as option from './Option';\nimport * as optionT from './OptionT';\nimport * as ord from './Ord';\nimport * as ordering from './Ordering';\nimport * as pipeable from './pipeable';\nimport * as profunctor from './Profunctor';\nimport * as random from './Random';\nimport * as reader from './Reader';\nimport * as readerEither from './ReaderEither';\nimport * as readerT from './ReaderT';\nimport * as readerTask from './ReaderTask';\nimport * as readerTaskEither from './ReaderTaskEither';\nimport * as readonlyArray from './ReadonlyArray';\nimport * as readonlyMap from './ReadonlyMap';\nimport * as readonlyNonEmptyArray from './ReadonlyNonEmptyArray';\nimport * as readonlyRecord from './ReadonlyRecord';\nimport * as readonlySet from './ReadonlySet';\nimport * as readonlyTuple from './ReadonlyTuple';\nimport * as record from './Record';\nimport * as ring from './Ring';\nimport * as semigroup from './Semigroup';\nimport * as semigroupoid from './Semigroupoid';\nimport * as semiring from './Semiring';\nimport * as set from './Set';\nimport * as show from './Show';\nimport * as state from './State';\nimport * as stateReaderTaskEither from './StateReaderTaskEither';\nimport * as stateT from './StateT';\nimport * as store from './Store';\nimport * as strong from './Strong';\nimport * as task from './Task';\nimport * as taskEither from './TaskEither';\nimport * as taskThese from './TaskThese';\nimport * as these from './These';\nimport * as theseT from './TheseT';\nimport * as traced from './Traced';\nimport * as traversable from './Traversable';\nimport * as traversableWithIndex from './TraversableWithIndex';\nimport * as tree from './Tree';\nimport * as tuple from './Tuple';\nimport * as unfoldable from './Unfoldable';\nimport * as validationT from './ValidationT';\nimport * as witherable from './Witherable';\nimport * as writer from './Writer';\nimport * as writerT from './WriterT';\nexport { \n/**\n * @since 2.0.0\n */\nalt, \n/**\n * @since 2.0.0\n */\nalternative, \n/**\n * @since 2.0.0\n */\napplicative, \n/**\n * @since 2.0.0\n */\napply, \n/**\n * @since 2.0.0\n */\narray, \n/**\n * @since 2.0.0\n */\nbifunctor, \n/**\n * @since 2.2.0\n */\nboolean, \n/**\n * @since 2.0.0\n */\nbooleanAlgebra, \n/**\n * @since 2.0.0\n */\nbounded, \n/**\n * @since 2.0.0\n */\nboundedDistributiveLattice, \n/**\n * @since 2.0.0\n */\nboundedJoinSemilattice, \n/**\n * @since 2.0.0\n */\nboundedLattice, \n/**\n * @since 2.0.0\n */\nboundedMeetSemilattice, \n/**\n * @since 2.0.0\n */\ncategory, \n/**\n * @since 2.0.0\n */\nchain, \n/**\n * @since 2.0.0\n */\nchainRec, \n/**\n * @since 2.0.0\n */\nchoice, \n/**\n * @since 2.0.0\n */\ncomonad, \n/**\n * @since 2.0.0\n */\ncompactable, \n/**\n * @since 2.0.0\n */\nconsole, \n/**\n * @since 2.0.0\n */\nconst_ as const, \n/**\n * @since 2.0.0\n */\ncontravariant, \n/**\n * @since 2.0.0\n */\ndate, \n/**\n * @since 2.0.0\n */\ndistributiveLattice, \n/**\n * @since 2.0.0\n */\neither, \n/**\n * @since 2.0.0\n */\neitherT, \n/**\n * @since 2.0.0\n */\nextend, \n/**\n * @since 2.0.0\n */\nfield, \n/**\n * @since 2.0.0\n */\nfilterable, \n/**\n * @since 2.0.0\n */\nfilterableWithIndex, \n/**\n * @since 2.0.0\n */\nfoldable, \n/**\n * @since 2.0.0\n */\nfoldableWithIndex, \n/**\n * @since 2.0.0\n */\nfunction_ as function, \n/**\n * @since 2.0.0\n */\nfunctor, \n/**\n * @since 2.0.0\n */\nfunctorWithIndex, \n/**\n * @since 2.0.0\n */\ngroup, \n/**\n * @since 2.0.0\n */\nheytingAlgebra, \n/**\n * @since 2.0.0\n */\nhkt, \n/**\n * @since 2.0.0\n */\nidentity, \n/**\n * @since 2.0.0\n */\ninvariant, \n/**\n * @since 2.0.0\n */\nio, \n/**\n * @since 2.0.0\n */\nioEither, \n/**\n * @since 2.0.0\n */\nioRef, \n/**\n * @since 2.0.0\n */\njoinSemilattice, \n/**\n * @since 2.0.0\n */\nlattice, \n/**\n * @since 2.0.0\n */\nmagma, \n/**\n * @since 2.0.0\n */\nmap, \n/**\n * @since 2.0.0\n */\nmeetSemilattice, \n/**\n * @since 2.0.0\n */\nmonad, \n/**\n * @since 2.0.0\n */\nmonadIO, \n/**\n * @since 2.0.0\n */\nmonadTask, \n/**\n * @since 2.0.0\n */\nmonadThrow, \n/**\n * @since 2.0.0\n */\nmonoid, \n/**\n * @since 2.0.0\n */\nnonEmptyArray, \n/**\n * @since 2.0.0\n */\noption, \n/**\n * @since 2.0.0\n */\noptionT, \n/**\n * @since 2.0.0\n */\nord, \n/**\n * @since 2.0.0\n */\nordering, \n/**\n * @since 2.0.0\n */\npipeable, \n/**\n * @since 2.0.0\n */\nprofunctor, \n/**\n * @since 2.0.0\n */\nrandom, \n/**\n * @since 2.0.0\n */\nreader, \n/**\n * @since 2.0.0\n */\nreaderEither, \n/**\n * @since 2.0.0\n */\nreaderT, \n/**\n * @since 2.0.0\n */\nreaderTaskEither, \n/**\n * @since 2.5.0\n */\nreadonlyArray, \n/**\n * @since 2.5.0\n */\nreadonlyMap, \n/**\n * @since 2.5.0\n */\nreadonlyNonEmptyArray, \n/**\n * @since 2.5.0\n */\nreadonlyRecord, \n/**\n * @since 2.5.0\n */\nreadonlySet, \n/**\n * @since 2.5.0\n */\nreadonlyTuple, \n/**\n * @since 2.3.0\n */\nreaderTask, \n/**\n * @since 2.0.0\n */\nrecord, \n/**\n * @since 2.0.0\n */\nring, \n/**\n * @since 2.0.0\n */\nsemigroup, \n/**\n * @since 2.0.0\n */\nsemigroupoid, \n/**\n * @since 2.0.0\n */\nsemiring, \n/**\n * @since 2.0.0\n */\nset, \n/**\n * @since 2.0.0\n */\neq, \n/**\n * @since 2.0.0\n */\nshow, \n/**\n * @since 2.0.0\n */\nstate, \n/**\n * @since 2.0.0\n */\nstateReaderTaskEither, \n/**\n * @since 2.0.0\n */\nstateT, \n/**\n * @since 2.0.0\n */\nstore, \n/**\n * @since 2.0.0\n */\nstrong, \n/**\n * @since 2.0.0\n */\ntask, \n/**\n * @since 2.0.0\n */\ntaskEither, \n/**\n * @since 2.4.0\n */\ntaskThese, \n/**\n * @since 2.0.0\n */\nthese, \n/**\n * @since 2.4.0\n */\ntheseT, \n/**\n * @since 2.0.0\n */\ntraced, \n/**\n * @since 2.0.0\n */\ntraversable, \n/**\n * @since 2.0.0\n */\ntraversableWithIndex, \n/**\n * @since 2.0.0\n */\ntree, \n/**\n * @since 2.0.0\n */\ntuple, \n/**\n * @since 2.0.0\n */\nunfoldable, \n/**\n * @since 2.0.0\n */\nvalidationT, \n/**\n * @since 2.0.0\n */\nwitherable, \n/**\n * @since 2.0.0\n */\nwriter, \n/**\n * @since 2.4.0\n */\nwriterT };\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.eq = exports.Contravariant = exports.getMonoid = exports.eqDate = exports.getTupleEq = exports.getStructEq = exports.eqBoolean = exports.eqNumber = exports.eqString = exports.strictEqual = exports.eqStrict = exports.URI = exports.contramap = exports.fromEquals = void 0;\nvar function_1 = require(\"./function\");\n// -------------------------------------------------------------------------------------\n// constructors\n// -------------------------------------------------------------------------------------\n/**\n * @category constructors\n * @since 2.0.0\n */\nfunction fromEquals(equals) {\n return {\n equals: function (x, y) { return x === y || equals(x, y); }\n };\n}\nexports.fromEquals = fromEquals;\n// -------------------------------------------------------------------------------------\n// non-pipeables\n// -------------------------------------------------------------------------------------\n/* istanbul ignore next */\nvar contramap_ = function (fa, f) { return function_1.pipe(fa, exports.contramap(f)); };\n// -------------------------------------------------------------------------------------\n// pipeables\n// -------------------------------------------------------------------------------------\n/**\n * @category Contravariant\n * @since 2.0.0\n */\nvar contramap = function (f) { return function (fa) {\n return fromEquals(function (x, y) { return fa.equals(f(x), f(y)); });\n}; };\nexports.contramap = contramap;\n// -------------------------------------------------------------------------------------\n// instances\n// -------------------------------------------------------------------------------------\n/**\n * @category instances\n * @since 2.0.0\n */\nexports.URI = 'Eq';\n/**\n * @category instances\n * @since 2.5.0\n */\nexports.eqStrict = {\n // tslint:disable-next-line: deprecation\n equals: strictEqual\n};\n/**\n * Use `eqStrict` instead\n *\n * @since 2.0.0\n * @deprecated\n */\nfunction strictEqual(a, b) {\n return a === b;\n}\nexports.strictEqual = strictEqual;\n/**\n * @category instances\n * @since 2.0.0\n */\nexports.eqString = exports.eqStrict;\n/**\n * @category instances\n * @since 2.0.0\n */\nexports.eqNumber = exports.eqStrict;\n/**\n * @category instances\n * @since 2.0.0\n */\nexports.eqBoolean = exports.eqStrict;\n/**\n * @category instances\n * @since 2.0.0\n */\nfunction getStructEq(eqs) {\n return fromEquals(function (x, y) {\n for (var k in eqs) {\n if (!eqs[k].equals(x[k], y[k])) {\n return false;\n }\n }\n return true;\n });\n}\nexports.getStructEq = getStructEq;\n/**\n * Given a tuple of `Eq`s returns a `Eq` for the tuple\n *\n * @example\n * import { getTupleEq, eqString, eqNumber, eqBoolean } from 'fp-ts/Eq'\n *\n * const E = getTupleEq(eqString, eqNumber, eqBoolean)\n * assert.strictEqual(E.equals(['a', 1, true], ['a', 1, true]), true)\n * assert.strictEqual(E.equals(['a', 1, true], ['b', 1, true]), false)\n * assert.strictEqual(E.equals(['a', 1, true], ['a', 2, true]), false)\n * assert.strictEqual(E.equals(['a', 1, true], ['a', 1, false]), false)\n *\n * @category instances\n * @since 2.0.0\n */\nfunction getTupleEq() {\n var eqs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n eqs[_i] = arguments[_i];\n }\n return fromEquals(function (x, y) { return eqs.every(function (E, i) { return E.equals(x[i], y[i]); }); });\n}\nexports.getTupleEq = getTupleEq;\n/**\n * @category instances\n * @since 2.0.0\n */\nexports.eqDate = {\n equals: function (x, y) { return x.valueOf() === y.valueOf(); }\n};\nvar empty = {\n equals: function () { return true; }\n};\n/**\n * @category instances\n * @since 2.6.0\n */\nfunction getMonoid() {\n return {\n concat: function (x, y) { return fromEquals(function (a, b) { return x.equals(a, b) && y.equals(a, b); }); },\n empty: empty\n };\n}\nexports.getMonoid = getMonoid;\n/**\n * @category instances\n * @since 2.7.0\n */\nexports.Contravariant = {\n URI: exports.URI,\n contramap: contramap_\n};\n// TODO: remove in v3\n/**\n * @category instances\n * @since 2.0.0\n */\nexports.eq = exports.Contravariant;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getWitherable = exports.getFilterable = exports.getApplyMonoid = exports.getApplySemigroup = exports.getSemigroup = exports.getEq = exports.getShow = exports.URI = exports.throwError = exports.sequence = exports.traverse = exports.reduceRight = exports.foldMap = exports.reduce = exports.duplicate = exports.extend = exports.alt = exports.altW = exports.flatten = exports.chainFirst = exports.chainFirstW = exports.chain = exports.chainW = exports.of = exports.apSecond = exports.apFirst = exports.ap = exports.apW = exports.mapLeft = exports.bimap = exports.map = exports.filterOrElse = exports.filterOrElseW = exports.orElse = exports.swap = exports.chainNullableK = exports.fromNullableK = exports.getOrElse = exports.getOrElseW = exports.fold = exports.fromPredicate = exports.fromOption = exports.stringifyJSON = exports.parseJSON = exports.tryCatch = exports.fromNullable = exports.right = exports.left = exports.isRight = exports.isLeft = void 0;\nexports.sequenceArray = exports.traverseArray = exports.traverseArrayWithIndex = exports.apS = exports.apSW = exports.bind = exports.bindW = exports.bindTo = exports.Do = exports.exists = exports.elem = exports.toError = exports.either = exports.getValidationMonoid = exports.MonadThrow = exports.ChainRec = exports.Extend = exports.Alt = exports.Bifunctor = exports.Traversable = exports.Foldable = exports.Monad = exports.Applicative = exports.Functor = exports.getValidationSemigroup = exports.getValidation = exports.getAltValidation = exports.getApplicativeValidation = void 0;\nvar ChainRec_1 = require(\"./ChainRec\");\nvar function_1 = require(\"./function\");\n// -------------------------------------------------------------------------------------\n// guards\n// -------------------------------------------------------------------------------------\n/**\n * Returns `true` if the either is an instance of `Left`, `false` otherwise.\n *\n * @category guards\n * @since 2.0.0\n */\nvar isLeft = function (ma) { return ma._tag === 'Left'; };\nexports.isLeft = isLeft;\n/**\n * Returns `true` if the either is an instance of `Right`, `false` otherwise.\n *\n * @category guards\n * @since 2.0.0\n */\nvar isRight = function (ma) { return ma._tag === 'Right'; };\nexports.isRight = isRight;\n// -------------------------------------------------------------------------------------\n// constructors\n// -------------------------------------------------------------------------------------\n/**\n * Constructs a new `Either` holding a `Left` value. This usually represents a failure, due to the right-bias of this\n * structure.\n *\n * @category constructors\n * @since 2.0.0\n */\nvar left = function (e) { return ({ _tag: 'Left', left: e }); };\nexports.left = left;\n/**\n * Constructs a new `Either` holding a `Right` value. This usually represents a successful value due to the right bias\n * of this structure.\n *\n * @category constructors\n * @since 2.0.0\n */\nvar right = function (a) { return ({ _tag: 'Right', right: a }); };\nexports.right = right;\n// TODO: make lazy in v3\n/**\n * Takes a default and a nullable value, if the value is not nully, turn it into a `Right`, if the value is nully use\n * the provided default as a `Left`.\n *\n * @example\n * import { fromNullable, left, right } from 'fp-ts/Either'\n *\n * const parse = fromNullable('nully')\n *\n * assert.deepStrictEqual(parse(1), right(1))\n * assert.deepStrictEqual(parse(null), left('nully'))\n *\n * @category constructors\n * @since 2.0.0\n */\nfunction fromNullable(e) {\n return function (a) { return (a == null ? exports.left(e) : exports.right(a)); };\n}\nexports.fromNullable = fromNullable;\n// TODO: `onError => Lazy => Either` in v3\n/**\n * Constructs a new `Either` from a function that might throw.\n *\n * @example\n * import { Either, left, right, tryCatch } from 'fp-ts/Either'\n *\n * const unsafeHead = (as: Array): A => {\n * if (as.length > 0) {\n * return as[0]\n * } else {\n * throw new Error('empty array')\n * }\n * }\n *\n * const head = (as: Array): Either => {\n * return tryCatch(() => unsafeHead(as), e => (e instanceof Error ? e : new Error('unknown error')))\n * }\n *\n * assert.deepStrictEqual(head([]), left(new Error('empty array')))\n * assert.deepStrictEqual(head([1, 2, 3]), right(1))\n *\n * @category constructors\n * @since 2.0.0\n */\nfunction tryCatch(f, onError) {\n try {\n return exports.right(f());\n }\n catch (e) {\n return exports.left(onError(e));\n }\n}\nexports.tryCatch = tryCatch;\n// TODO curry in v3\n/**\n * Converts a JavaScript Object Notation (JSON) string into an object.\n *\n * @example\n * import { parseJSON, toError, right, left } from 'fp-ts/Either'\n *\n * assert.deepStrictEqual(parseJSON('{\"a\":1}', toError), right({ a: 1 }))\n * assert.deepStrictEqual(parseJSON('{\"a\":}', toError), left(new SyntaxError('Unexpected token } in JSON at position 5')))\n *\n * @category constructors\n * @since 2.0.0\n */\nfunction parseJSON(s, onError) {\n return tryCatch(function () { return JSON.parse(s); }, onError);\n}\nexports.parseJSON = parseJSON;\n// TODO curry in v3\n/**\n * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.\n *\n * @example\n * import * as E from 'fp-ts/Either'\n * import { pipe } from 'fp-ts/function'\n *\n * assert.deepStrictEqual(E.stringifyJSON({ a: 1 }, E.toError), E.right('{\"a\":1}'))\n * const circular: any = { ref: null }\n * circular.ref = circular\n * assert.deepStrictEqual(\n * pipe(\n * E.stringifyJSON(circular, E.toError),\n * E.mapLeft(e => e.message.includes('Converting circular structure to JSON'))\n * ),\n * E.left(true)\n * )\n *\n * @category constructors\n * @since 2.0.0\n */\nfunction stringifyJSON(u, onError) {\n return tryCatch(function () { return JSON.stringify(u); }, onError);\n}\nexports.stringifyJSON = stringifyJSON;\n/**\n * Derivable from `MonadThrow`.\n *\n * @example\n * import { fromOption, left, right } from 'fp-ts/Either'\n * import { pipe } from 'fp-ts/function'\n * import { none, some } from 'fp-ts/Option'\n *\n * assert.deepStrictEqual(\n * pipe(\n * some(1),\n * fromOption(() => 'error')\n * ),\n * right(1)\n * )\n * assert.deepStrictEqual(\n * pipe(\n * none,\n * fromOption(() => 'error')\n * ),\n * left('error')\n * )\n *\n * @category constructors\n * @since 2.0.0\n */\nvar fromOption = function (onNone) { return function (ma) {\n return ma._tag === 'None' ? exports.left(onNone()) : exports.right(ma.value);\n}; };\nexports.fromOption = fromOption;\n/**\n * Derivable from `MonadThrow`.\n *\n * @example\n * import { fromPredicate, left, right } from 'fp-ts/Either'\n * import { pipe } from 'fp-ts/function'\n *\n * assert.deepStrictEqual(\n * pipe(\n * 1,\n * fromPredicate(\n * (n) => n > 0,\n * () => 'error'\n * )\n * ),\n * right(1)\n * )\n * assert.deepStrictEqual(\n * pipe(\n * -1,\n * fromPredicate(\n * (n) => n > 0,\n * () => 'error'\n * )\n * ),\n * left('error')\n * )\n *\n * @category constructors\n * @since 2.0.0\n */\nvar fromPredicate = function (predicate, onFalse) { return function (a) { return (predicate(a) ? exports.right(a) : exports.left(onFalse(a))); }; };\nexports.fromPredicate = fromPredicate;\n// -------------------------------------------------------------------------------------\n// destructors\n// -------------------------------------------------------------------------------------\n/**\n * Takes two functions and an `Either` value, if the value is a `Left` the inner value is applied to the first function,\n * if the value is a `Right` the inner value is applied to the second function.\n *\n * @example\n * import { fold, left, right } from 'fp-ts/Either'\n * import { pipe } from 'fp-ts/function'\n *\n * function onLeft(errors: Array): string {\n * return `Errors: ${errors.join(', ')}`\n * }\n *\n * function onRight(value: number): string {\n * return `Ok: ${value}`\n * }\n *\n * assert.strictEqual(\n * pipe(\n * right(1),\n * fold(onLeft, onRight)\n * ),\n * 'Ok: 1'\n * )\n * assert.strictEqual(\n * pipe(\n * left(['error 1', 'error 2']),\n * fold(onLeft, onRight)\n * ),\n * 'Errors: error 1, error 2'\n * )\n *\n * @category destructors\n * @since 2.0.0\n */\nfunction fold(onLeft, onRight) {\n return function (ma) { return (exports.isLeft(ma) ? onLeft(ma.left) : onRight(ma.right)); };\n}\nexports.fold = fold;\n/**\n * Less strict version of [`getOrElse`](#getOrElse).\n *\n * @category destructors\n * @since 2.6.0\n */\nvar getOrElseW = function (onLeft) { return function (ma) {\n return exports.isLeft(ma) ? onLeft(ma.left) : ma.right;\n}; };\nexports.getOrElseW = getOrElseW;\n/**\n * Returns the wrapped value if it's a `Right` or a default value if is a `Left`.\n *\n * @example\n * import { getOrElse, left, right } from 'fp-ts/Either'\n * import { pipe } from 'fp-ts/function'\n *\n * assert.deepStrictEqual(\n * pipe(\n * right(1),\n * getOrElse(() => 0)\n * ),\n * 1\n * )\n * assert.deepStrictEqual(\n * pipe(\n * left('error'),\n * getOrElse(() => 0)\n * ),\n * 0\n * )\n *\n * @category destructors\n * @since 2.0.0\n */\nexports.getOrElse = exports.getOrElseW;\n// -------------------------------------------------------------------------------------\n// combinators\n// -------------------------------------------------------------------------------------\n/**\n * @category combinators\n * @since 2.9.0\n */\nfunction fromNullableK(e) {\n var from = fromNullable(e);\n return function (f) { return function () {\n var a = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n a[_i] = arguments[_i];\n }\n return from(f.apply(void 0, a));\n }; };\n}\nexports.fromNullableK = fromNullableK;\n/**\n * @category combinators\n * @since 2.9.0\n */\nfunction chainNullableK(e) {\n var from = fromNullableK(e);\n return function (f) { return exports.chain(from(f)); };\n}\nexports.chainNullableK = chainNullableK;\n/**\n * Returns a `Right` if is a `Left` (and vice versa).\n *\n * @category combinators\n * @since 2.0.0\n */\nfunction swap(ma) {\n return exports.isLeft(ma) ? exports.right(ma.left) : exports.left(ma.right);\n}\nexports.swap = swap;\n/**\n * Useful for recovering from errors.\n *\n * @category combinators\n * @since 2.0.0\n */\nfunction orElse(onLeft) {\n return function (ma) { return (exports.isLeft(ma) ? onLeft(ma.left) : ma); };\n}\nexports.orElse = orElse;\n/**\n * Less strict version of [`filterOrElse`](#filterOrElse).\n *\n * @since 2.9.0\n */\nvar filterOrElseW = function (predicate, onFalse) {\n return exports.chainW(function (a) { return (predicate(a) ? exports.right(a) : exports.left(onFalse(a))); });\n};\nexports.filterOrElseW = filterOrElseW;\n/**\n * Derivable from `MonadThrow`.\n *\n * @example\n * import { filterOrElse, left, right } from 'fp-ts/Either'\n * import { pipe } from 'fp-ts/function'\n *\n * assert.deepStrictEqual(\n * pipe(\n * right(1),\n * filterOrElse(\n * (n) => n > 0,\n * () => 'error'\n * )\n * ),\n * right(1)\n * )\n * assert.deepStrictEqual(\n * pipe(\n * right(-1),\n * filterOrElse(\n * (n) => n > 0,\n * () => 'error'\n * )\n * ),\n * left('error')\n * )\n * assert.deepStrictEqual(\n * pipe(\n * left('a'),\n * filterOrElse(\n * (n) => n > 0,\n * () => 'error'\n * )\n * ),\n * left('a')\n * )\n *\n * @category combinators\n * @since 2.0.0\n */\nexports.filterOrElse = exports.filterOrElseW;\n// -------------------------------------------------------------------------------------\n// non-pipeables\n// -------------------------------------------------------------------------------------\nvar map_ = function (fa, f) { return function_1.pipe(fa, exports.map(f)); };\nvar ap_ = function (fab, fa) { return function_1.pipe(fab, exports.ap(fa)); };\n/* istanbul ignore next */\nvar chain_ = function (ma, f) { return function_1.pipe(ma, exports.chain(f)); };\n/* istanbul ignore next */\nvar reduce_ = function (fa, b, f) { return function_1.pipe(fa, exports.reduce(b, f)); };\n/* istanbul ignore next */\nvar foldMap_ = function (M) { return function (fa, f) {\n var foldMapM = exports.foldMap(M);\n return function_1.pipe(fa, foldMapM(f));\n}; };\n/* istanbul ignore next */\nvar reduceRight_ = function (fa, b, f) { return function_1.pipe(fa, exports.reduceRight(b, f)); };\nvar traverse_ = function (F) {\n var traverseF = exports.traverse(F);\n return function (ta, f) { return function_1.pipe(ta, traverseF(f)); };\n};\nvar bimap_ = function (fa, f, g) { return function_1.pipe(fa, exports.bimap(f, g)); };\nvar mapLeft_ = function (fa, f) { return function_1.pipe(fa, exports.mapLeft(f)); };\n/* istanbul ignore next */\nvar alt_ = function (fa, that) { return function_1.pipe(fa, exports.alt(that)); };\n/* istanbul ignore next */\nvar extend_ = function (wa, f) { return function_1.pipe(wa, exports.extend(f)); };\nvar chainRec_ = function (a, f) {\n return ChainRec_1.tailRec(f(a), function (e) {\n return exports.isLeft(e) ? exports.right(exports.left(e.left)) : exports.isLeft(e.right) ? exports.left(f(e.right.left)) : exports.right(exports.right(e.right.right));\n });\n};\n// -------------------------------------------------------------------------------------\n// pipeables\n// -------------------------------------------------------------------------------------\n/**\n * `map` can be used to turn functions `(a: A) => B` into functions `(fa: F) => F` whose argument and return types\n * use the type constructor `F` to represent some computational context.\n *\n * @category Functor\n * @since 2.0.0\n */\nvar map = function (f) { return function (fa) {\n return exports.isLeft(fa) ? fa : exports.right(f(fa.right));\n}; };\nexports.map = map;\n/**\n * Map a pair of functions over the two type arguments of the bifunctor.\n *\n * @category Bifunctor\n * @since 2.0.0\n */\nvar bimap = function (f, g) { return function (fa) { return (exports.isLeft(fa) ? exports.left(f(fa.left)) : exports.right(g(fa.right))); }; };\nexports.bimap = bimap;\n/**\n * Map a function over the first type argument of a bifunctor.\n *\n * @category Bifunctor\n * @since 2.0.0\n */\nvar mapLeft = function (f) { return function (fa) {\n return exports.isLeft(fa) ? exports.left(f(fa.left)) : fa;\n}; };\nexports.mapLeft = mapLeft;\n/**\n * Less strict version of [`ap`](#ap).\n *\n * @category Apply\n * @since 2.8.0\n */\nvar apW = function (fa) { return function (fab) {\n return exports.isLeft(fab) ? fab : exports.isLeft(fa) ? fa : exports.right(fab.right(fa.right));\n}; };\nexports.apW = apW;\n/**\n * Apply a function to an argument under a type constructor.\n *\n * @category Apply\n * @since 2.0.0\n */\nexports.ap = exports.apW;\n/**\n * Combine two effectful actions, keeping only the result of the first.\n *\n * Derivable from `Apply`.\n *\n * @category combinators\n * @since 2.0.0\n */\nvar apFirst = function (fb) {\n return function_1.flow(exports.map(function (a) { return function () { return a; }; }), exports.ap(fb));\n};\nexports.apFirst = apFirst;\n/**\n * Combine two effectful actions, keeping only the result of the second.\n *\n * Derivable from `Apply`.\n *\n * @category combinators\n * @since 2.0.0\n */\nvar apSecond = function (fb) {\n return function_1.flow(exports.map(function () { return function (b) { return b; }; }), exports.ap(fb));\n};\nexports.apSecond = apSecond;\n/**\n * Wrap a value into the type constructor.\n *\n * Equivalent to [`right`](#right).\n *\n * @example\n * import * as E from 'fp-ts/Either'\n *\n * assert.deepStrictEqual(E.of('a'), E.right('a'))\n *\n * @category Applicative\n * @since 2.7.0\n */\nexports.of = exports.right;\n/**\n * Less strict version of [`chain`](#chain).\n *\n * @category Monad\n * @since 2.6.0\n */\nvar chainW = function (f) { return function (ma) {\n return exports.isLeft(ma) ? ma : f(ma.right);\n}; };\nexports.chainW = chainW;\n/**\n * Composes computations in sequence, using the return value of one computation to determine the next computation.\n *\n * @category Monad\n * @since 2.0.0\n */\nexports.chain = exports.chainW;\n/**\n * Less strict version of [`chainFirst`](#chainFirst)\n *\n * Derivable from `Monad`.\n *\n * @category combinators\n * @since 2.8.0\n */\nvar chainFirstW = function (f) { return function (ma) {\n return function_1.pipe(ma, exports.chainW(function (a) {\n return function_1.pipe(f(a), exports.map(function () { return a; }));\n }));\n}; };\nexports.chainFirstW = chainFirstW;\n/**\n * Composes computations in sequence, using the return value of one computation to determine the next computation and\n * keeping only the result of the first.\n *\n * Derivable from `Monad`.\n *\n * @category combinators\n * @since 2.0.0\n */\nexports.chainFirst = exports.chainFirstW;\n/**\n * The `flatten` function is the conventional monad join operator. It is used to remove one level of monadic structure, projecting its bound argument into the outer level.\n *\n * Derivable from `Monad`.\n *\n * @example\n * import * as E from 'fp-ts/Either'\n *\n * assert.deepStrictEqual(E.flatten(E.right(E.right('a'))), E.right('a'))\n * assert.deepStrictEqual(E.flatten(E.right(E.left('e'))), E.left('e'))\n * assert.deepStrictEqual(E.flatten(E.left('e')), E.left('e'))\n *\n * @category combinators\n * @since 2.0.0\n */\nexports.flatten = \n/*#__PURE__*/\nexports.chain(function_1.identity);\n/**\n * Less strict version of [`alt`](#alt).\n *\n * @category Alt\n * @since 2.9.0\n */\nvar altW = function (that) { return function (fa) { return (exports.isLeft(fa) ? that() : fa); }; };\nexports.altW = altW;\n/**\n * Identifies an associative operation on a type constructor. It is similar to `Semigroup`, except that it applies to\n * types of kind `* -> *`.\n *\n * @category Alt\n * @since 2.0.0\n */\nexports.alt = exports.altW;\n/**\n * @category Extend\n * @since 2.0.0\n */\nvar extend = function (f) { return function (wa) {\n return exports.isLeft(wa) ? wa : exports.right(f(wa));\n}; };\nexports.extend = extend;\n/**\n * Derivable from `Extend`.\n *\n * @category combinators\n * @since 2.0.0\n */\nexports.duplicate = \n/*#__PURE__*/\nexports.extend(function_1.identity);\n/**\n * Left-associative fold of a structure.\n *\n * @example\n * import { pipe } from 'fp-ts/function'\n * import * as E from 'fp-ts/Either'\n *\n * const startWith = 'prefix'\n * const concat = (a: string, b: string) => `${a}:${b}`\n *\n * assert.deepStrictEqual(\n * pipe(E.right('a'), E.reduce(startWith, concat)),\n * 'prefix:a',\n * )\n *\n * assert.deepStrictEqual(\n * pipe(E.left('e'), E.reduce(startWith, concat)),\n * 'prefix',\n * )\n *\n * @category Foldable\n * @since 2.0.0\n */\nvar reduce = function (b, f) { return function (fa) {\n return exports.isLeft(fa) ? b : f(b, fa.right);\n}; };\nexports.reduce = reduce;\n/**\n * Map each element of the structure to a monoid, and combine the results.\n *\n * @example\n * import { pipe } from 'fp-ts/function';\n * import * as E from 'fp-ts/Either'\n * import { monoidString } from 'fp-ts/Monoid'\n *\n * const yell = (a: string) => `${a}!`\n *\n * assert.deepStrictEqual(\n * pipe(E.right('a'), E.foldMap(monoidString)(yell)),\n * 'a!',\n * )\n *\n * assert.deepStrictEqual(\n * pipe(E.left('e'), E.foldMap(monoidString)(yell)),\n * monoidString.empty,\n * )\n *\n * @category Foldable\n * @since 2.0.0\n */\nvar foldMap = function (M) { return function (f) { return function (fa) {\n return exports.isLeft(fa) ? M.empty : f(fa.right);\n}; }; };\nexports.foldMap = foldMap;\n/**\n * Right-associative fold of a structure.\n *\n * @example\n * import { pipe } from 'fp-ts/function'\n * import * as E from 'fp-ts/Either'\n *\n * const startWith = 'postfix'\n * const concat = (a: string, b: string) => `${a}:${b}`\n *\n * assert.deepStrictEqual(\n * pipe(E.right('a'), E.reduceRight(startWith, concat)),\n * 'a:postfix',\n * )\n *\n * assert.deepStrictEqual(\n * pipe(E.left('e'), E.reduceRight(startWith, concat)),\n * 'postfix',\n * )\n *\n * @category Foldable\n * @since 2.0.0\n */\nvar reduceRight = function (b, f) { return function (fa) {\n return exports.isLeft(fa) ? b : f(fa.right, b);\n}; };\nexports.reduceRight = reduceRight;\n/**\n * Map each element of a structure to an action, evaluate these actions from left to right, and collect the results.\n *\n * @example\n * import { pipe } from 'fp-ts/function'\n * import * as A from 'fp-ts/Array'\n * import * as E from 'fp-ts/Either'\n * import * as O from 'fp-ts/Option'\n *\n * assert.deepStrictEqual(\n * pipe(E.right(['a']), E.traverse(O.option)(A.head)),\n * O.some(E.right('a')),\n * )\n *\n * assert.deepStrictEqual(\n * pipe(E.right([]), E.traverse(O.option)(A.head)),\n * O.none,\n * )\n *\n * @category Traversable\n * @since 2.6.3\n */\nvar traverse = function (F) { return function (f) { return function (ta) { return (exports.isLeft(ta) ? F.of(exports.left(ta.left)) : F.map(f(ta.right), exports.right)); }; }; };\nexports.traverse = traverse;\n/**\n * Evaluate each monadic action in the structure from left to right, and collect the results.\n *\n * @example\n * import { pipe } from 'fp-ts/function'\n * import * as E from 'fp-ts/Either'\n * import * as O from 'fp-ts/Option'\n *\n * assert.deepStrictEqual(\n * pipe(E.right(O.some('a')), E.sequence(O.option)),\n * O.some(E.right('a')),\n * )\n *\n * assert.deepStrictEqual(\n * pipe(E.right(O.none), E.sequence(O.option)),\n * O.none\n * )\n *\n * @category Traversable\n * @since 2.6.3\n */\nvar sequence = function (F) { return function (ma) {\n return exports.isLeft(ma) ? F.of(exports.left(ma.left)) : F.map(ma.right, exports.right);\n}; };\nexports.sequence = sequence;\n/**\n * @category MonadThrow\n * @since 2.6.3\n */\nexports.throwError = exports.left;\n// -------------------------------------------------------------------------------------\n// instances\n// -------------------------------------------------------------------------------------\n/**\n * @category instances\n * @since 2.0.0\n */\nexports.URI = 'Either';\n/**\n * @category instances\n * @since 2.0.0\n */\nfunction getShow(SE, SA) {\n return {\n show: function (ma) { return (exports.isLeft(ma) ? \"left(\" + SE.show(ma.left) + \")\" : \"right(\" + SA.show(ma.right) + \")\"); }\n };\n}\nexports.getShow = getShow;\n/**\n * @category instances\n * @since 2.0.0\n */\nfunction getEq(EL, EA) {\n return {\n equals: function (x, y) {\n return x === y || (exports.isLeft(x) ? exports.isLeft(y) && EL.equals(x.left, y.left) : exports.isRight(y) && EA.equals(x.right, y.right));\n }\n };\n}\nexports.getEq = getEq;\n/**\n * Semigroup returning the left-most non-`Left` value. If both operands are `Right`s then the inner values are\n * concatenated using the provided `Semigroup`\n *\n * @example\n * import { getSemigroup, left, right } from 'fp-ts/Either'\n * import { semigroupSum } from 'fp-ts/Semigroup'\n *\n * const S = getSemigroup(semigroupSum)\n * assert.deepStrictEqual(S.concat(left('a'), left('b')), left('a'))\n * assert.deepStrictEqual(S.concat(left('a'), right(2)), right(2))\n * assert.deepStrictEqual(S.concat(right(1), left('b')), right(1))\n * assert.deepStrictEqual(S.concat(right(1), right(2)), right(3))\n *\n * @category instances\n * @since 2.0.0\n */\nfunction getSemigroup(S) {\n return {\n concat: function (x, y) { return (exports.isLeft(y) ? x : exports.isLeft(x) ? y : exports.right(S.concat(x.right, y.right))); }\n };\n}\nexports.getSemigroup = getSemigroup;\n/**\n * Semigroup returning the left-most `Left` value. If both operands are `Right`s then the inner values\n * are concatenated using the provided `Semigroup`\n *\n * @example\n * import { getApplySemigroup, left, right } from 'fp-ts/Either'\n * import { semigroupSum } from 'fp-ts/Semigroup'\n *\n * const S = getApplySemigroup(semigroupSum)\n * assert.deepStrictEqual(S.concat(left('a'), left('b')), left('a'))\n * assert.deepStrictEqual(S.concat(left('a'), right(2)), left('a'))\n * assert.deepStrictEqual(S.concat(right(1), left('b')), left('b'))\n * assert.deepStrictEqual(S.concat(right(1), right(2)), right(3))\n *\n * @category instances\n * @since 2.0.0\n */\nfunction getApplySemigroup(S) {\n return {\n concat: function (x, y) { return (exports.isLeft(x) ? x : exports.isLeft(y) ? y : exports.right(S.concat(x.right, y.right))); }\n };\n}\nexports.getApplySemigroup = getApplySemigroup;\n/**\n * @category instances\n * @since 2.0.0\n */\nfunction getApplyMonoid(M) {\n return {\n concat: getApplySemigroup(M).concat,\n empty: exports.right(M.empty)\n };\n}\nexports.getApplyMonoid = getApplyMonoid;\n/**\n * Builds a `Filterable` instance for `Either` given `Monoid` for the left side\n *\n * @category instances\n * @since 3.0.0\n */\nfunction getFilterable(M) {\n var empty = exports.left(M.empty);\n var compact = function (ma) {\n return exports.isLeft(ma) ? ma : ma.right._tag === 'None' ? empty : exports.right(ma.right.value);\n };\n var separate = function (ma) {\n return exports.isLeft(ma)\n ? { left: ma, right: ma }\n : exports.isLeft(ma.right)\n ? { left: exports.right(ma.right.left), right: empty }\n : { left: empty, right: exports.right(ma.right.right) };\n };\n var partitionMap = function (ma, f) {\n if (exports.isLeft(ma)) {\n return { left: ma, right: ma };\n }\n var e = f(ma.right);\n return exports.isLeft(e) ? { left: exports.right(e.left), right: empty } : { left: empty, right: exports.right(e.right) };\n };\n var partition = function (ma, p) {\n return exports.isLeft(ma)\n ? { left: ma, right: ma }\n : p(ma.right)\n ? { left: empty, right: exports.right(ma.right) }\n : { left: exports.right(ma.right), right: empty };\n };\n var filterMap = function (ma, f) {\n if (exports.isLeft(ma)) {\n return ma;\n }\n var ob = f(ma.right);\n return ob._tag === 'None' ? empty : exports.right(ob.value);\n };\n var filter = function (ma, predicate) {\n return exports.isLeft(ma) ? ma : predicate(ma.right) ? ma : empty;\n };\n return {\n URI: exports.URI,\n _E: undefined,\n map: map_,\n compact: compact,\n separate: separate,\n filter: filter,\n filterMap: filterMap,\n partition: partition,\n partitionMap: partitionMap\n };\n}\nexports.getFilterable = getFilterable;\n/**\n * Builds `Witherable` instance for `Either` given `Monoid` for the left side\n *\n * @category instances\n * @since 2.0.0\n */\nfunction getWitherable(M) {\n var F_ = getFilterable(M);\n var wither = function (F) {\n var traverseF = traverse_(F);\n return function (ma, f) { return F.map(traverseF(ma, f), F_.compact); };\n };\n var wilt = function (F) {\n var traverseF = traverse_(F);\n return function (ma, f) { return F.map(traverseF(ma, f), F_.separate); };\n };\n return {\n URI: exports.URI,\n _E: undefined,\n map: map_,\n compact: F_.compact,\n separate: F_.separate,\n filter: F_.filter,\n filterMap: F_.filterMap,\n partition: F_.partition,\n partitionMap: F_.partitionMap,\n traverse: traverse_,\n sequence: exports.sequence,\n reduce: reduce_,\n foldMap: foldMap_,\n reduceRight: reduceRight_,\n wither: wither,\n wilt: wilt\n };\n}\nexports.getWitherable = getWitherable;\n/**\n * @category instances\n * @since 2.7.0\n */\nfunction getApplicativeValidation(SE) {\n return {\n URI: exports.URI,\n _E: undefined,\n map: map_,\n ap: function (fab, fa) {\n return exports.isLeft(fab)\n ? exports.isLeft(fa)\n ? exports.left(SE.concat(fab.left, fa.left))\n : fab\n : exports.isLeft(fa)\n ? fa\n : exports.right(fab.right(fa.right));\n },\n of: exports.of\n };\n}\nexports.getApplicativeValidation = getApplicativeValidation;\n/**\n * @category instances\n * @since 2.7.0\n */\nfunction getAltValidation(SE) {\n return {\n URI: exports.URI,\n _E: undefined,\n map: map_,\n alt: function (me, that) {\n if (exports.isRight(me)) {\n return me;\n }\n var ea = that();\n return exports.isLeft(ea) ? exports.left(SE.concat(me.left, ea.left)) : ea;\n }\n };\n}\nexports.getAltValidation = getAltValidation;\n// TODO: remove in v3\n/**\n * @category instances\n * @since 2.0.0\n */\nfunction getValidation(SE) {\n var applicativeValidation = getApplicativeValidation(SE);\n var altValidation = getAltValidation(SE);\n return {\n URI: exports.URI,\n _E: undefined,\n map: map_,\n of: exports.of,\n chain: chain_,\n bimap: bimap_,\n mapLeft: mapLeft_,\n reduce: reduce_,\n foldMap: foldMap_,\n reduceRight: reduceRight_,\n extend: extend_,\n traverse: traverse_,\n sequence: exports.sequence,\n chainRec: chainRec_,\n throwError: exports.throwError,\n ap: applicativeValidation.ap,\n alt: altValidation.alt\n };\n}\nexports.getValidation = getValidation;\n/**\n * @category instances\n * @since 2.0.0\n */\nfunction getValidationSemigroup(SE, SA) {\n return {\n concat: function (x, y) {\n return exports.isLeft(x) ? (exports.isLeft(y) ? exports.left(SE.concat(x.left, y.left)) : x) : exports.isLeft(y) ? y : exports.right(SA.concat(x.right, y.right));\n }\n };\n}\nexports.getValidationSemigroup = getValidationSemigroup;\n/**\n * @category instances\n * @since 2.7.0\n */\nexports.Functor = {\n URI: exports.URI,\n map: map_\n};\n/**\n * @category instances\n * @since 2.7.0\n */\nexports.Applicative = {\n URI: exports.URI,\n map: map_,\n ap: ap_,\n of: exports.of\n};\n/**\n * @category instances\n * @since 2.7.0\n */\nexports.Monad = {\n URI: exports.URI,\n map: map_,\n ap: ap_,\n of: exports.of,\n chain: chain_\n};\n/**\n * @category instances\n * @since 2.7.0\n */\nexports.Foldable = {\n URI: exports.URI,\n reduce: reduce_,\n foldMap: foldMap_,\n reduceRight: reduceRight_\n};\n/**\n * @category instances\n * @since 2.7.0\n */\nexports.Traversable = {\n URI: exports.URI,\n map: map_,\n reduce: reduce_,\n foldMap: foldMap_,\n reduceRight: reduceRight_,\n traverse: traverse_,\n sequence: exports.sequence\n};\n/**\n * @category instances\n * @since 2.7.0\n */\nexports.Bifunctor = {\n URI: exports.URI,\n bimap: bimap_,\n mapLeft: mapLeft_\n};\n/**\n * @category instances\n * @since 2.7.0\n */\nexports.Alt = {\n URI: exports.URI,\n map: map_,\n alt: alt_\n};\n/**\n * @category instances\n * @since 2.7.0\n */\nexports.Extend = {\n URI: exports.URI,\n map: map_,\n extend: extend_\n};\n/**\n * @category instances\n * @since 2.7.0\n */\nexports.ChainRec = {\n URI: exports.URI,\n map: map_,\n ap: ap_,\n chain: chain_,\n chainRec: chainRec_\n};\n/**\n * @category instances\n * @since 2.7.0\n */\nexports.MonadThrow = {\n URI: exports.URI,\n map: map_,\n ap: ap_,\n of: exports.of,\n chain: chain_,\n throwError: exports.throwError\n};\n/**\n * @category instances\n * @since 2.0.0\n */\nfunction getValidationMonoid(SE, SA) {\n return {\n concat: getValidationSemigroup(SE, SA).concat,\n empty: exports.right(SA.empty)\n };\n}\nexports.getValidationMonoid = getValidationMonoid;\n/**\n * @category instances\n * @since 2.0.0\n */\nexports.either = {\n URI: exports.URI,\n map: map_,\n of: exports.of,\n ap: ap_,\n chain: chain_,\n reduce: reduce_,\n foldMap: foldMap_,\n reduceRight: reduceRight_,\n traverse: traverse_,\n sequence: exports.sequence,\n bimap: bimap_,\n mapLeft: mapLeft_,\n alt: alt_,\n extend: extend_,\n chainRec: chainRec_,\n throwError: exports.throwError\n};\n// -------------------------------------------------------------------------------------\n// utils\n// -------------------------------------------------------------------------------------\n/**\n * Default value for the `onError` argument of `tryCatch`\n *\n * @since 2.0.0\n */\nfunction toError(e) {\n return e instanceof Error ? e : new Error(String(e));\n}\nexports.toError = toError;\n/**\n * @since 2.0.0\n */\nfunction elem(E) {\n return function (a, ma) { return (exports.isLeft(ma) ? false : E.equals(a, ma.right)); };\n}\nexports.elem = elem;\n/**\n * Returns `false` if `Left` or returns the result of the application of the given predicate to the `Right` value.\n *\n * @example\n * import { exists, left, right } from 'fp-ts/Either'\n *\n * const gt2 = exists((n: number) => n > 2)\n *\n * assert.strictEqual(gt2(left('a')), false)\n * assert.strictEqual(gt2(right(1)), false)\n * assert.strictEqual(gt2(right(3)), true)\n *\n * @since 2.0.0\n */\nfunction exists(predicate) {\n return function (ma) { return (exports.isLeft(ma) ? false : predicate(ma.right)); };\n}\nexports.exists = exists;\n// -------------------------------------------------------------------------------------\n// do notation\n// -------------------------------------------------------------------------------------\n/**\n * @since 2.9.0\n */\nexports.Do = \n/*#__PURE__*/\nexports.of({});\n/**\n * @since 2.8.0\n */\nvar bindTo = function (name) {\n return exports.map(function_1.bindTo_(name));\n};\nexports.bindTo = bindTo;\n/**\n * @since 2.8.0\n */\nvar bindW = function (name, f) {\n return exports.chainW(function (a) {\n return function_1.pipe(f(a), exports.map(function (b) { return function_1.bind_(a, name, b); }));\n });\n};\nexports.bindW = bindW;\n/**\n * @since 2.8.0\n */\nexports.bind = exports.bindW;\n// -------------------------------------------------------------------------------------\n// pipeable sequence S\n// -------------------------------------------------------------------------------------\n/**\n * @since 2.8.0\n */\nvar apSW = function (name, fb) {\n return function_1.flow(exports.map(function (a) { return function (b) { return function_1.bind_(a, name, b); }; }), exports.apW(fb));\n};\nexports.apSW = apSW;\n/**\n * @since 2.8.0\n */\nexports.apS = exports.apSW;\n// -------------------------------------------------------------------------------------\n// array utils\n// -------------------------------------------------------------------------------------\n/**\n *\n * @since 2.9.0\n */\nvar traverseArrayWithIndex = function (f) { return function (arr) {\n // tslint:disable-next-line: readonly-array\n var result = [];\n for (var i = 0; i < arr.length; i++) {\n var e = f(i, arr[i]);\n if (e._tag === 'Left') {\n return e;\n }\n result.push(e.right);\n }\n return exports.right(result);\n}; };\nexports.traverseArrayWithIndex = traverseArrayWithIndex;\n/**\n * map an array using provided function to Either then transform to Either of the array\n * this function have the same behavior of `A.traverse(E.either)` but it's optimized and perform better\n *\n * @example\n *\n *\n * import { traverseArray, left, right, fromPredicate } from 'fp-ts/Either'\n * import { pipe } from 'fp-ts/function'\n * import * as A from 'fp-ts/Array'\n *\n * const arr = A.range(0, 10)\n * assert.deepStrictEqual(\n * pipe(\n * arr,\n * traverseArray((x) => right(x))\n * ),\n * right(arr)\n * )\n * assert.deepStrictEqual(\n * pipe(\n * arr,\n * traverseArray(\n * fromPredicate(\n * (x) => x > 5,\n * () => 'a'\n * )\n * )\n * ),\n * left('a')\n * )\n * @since 2.9.0\n */\nvar traverseArray = function (f) { return exports.traverseArrayWithIndex(function (_, a) { return f(a); }); };\nexports.traverseArray = traverseArray;\n/**\n * convert an array of either to an either of array\n * this function have the same behavior of `A.sequence(E.either)` but it's optimized and perform better\n *\n * @example\n *\n * import { sequenceArray, left, right } from 'fp-ts/Either'\n * import { pipe } from 'fp-ts/function'\n * import * as A from 'fp-ts/Array'\n *\n * const arr = A.range(0, 10)\n * assert.deepStrictEqual(pipe(arr, A.map(right), sequenceArray), right(arr))\n * assert.deepStrictEqual(pipe(arr, A.map(right), A.cons(left('Error')), sequenceArray), left('Error'))\n *\n * @since 2.9.0\n */\nexports.sequenceArray = \n/*#__PURE__*/\nexports.traverseArray(function_1.identity);\n","/**\n * @since 2.0.0\n */\n/**\n * @since 2.0.0\n */\nexport function identity(a) {\n return a;\n}\n/**\n * @since 2.0.0\n */\nexport var unsafeCoerce = identity;\n/**\n * @since 2.0.0\n */\nexport function not(predicate) {\n return function (a) { return !predicate(a); };\n}\n/**\n * @since 2.0.0\n */\nexport function constant(a) {\n return function () { return a; };\n}\n/**\n * A thunk that returns always `true`.\n *\n * @since 2.0.0\n */\nexport var constTrue = \n/*#__PURE__*/\nconstant(true);\n/**\n * A thunk that returns always `false`.\n *\n * @since 2.0.0\n */\nexport var constFalse = \n/*#__PURE__*/\nconstant(false);\n/**\n * A thunk that returns always `null`.\n *\n * @since 2.0.0\n */\nexport var constNull = \n/*#__PURE__*/\nconstant(null);\n/**\n * A thunk that returns always `undefined`.\n *\n * @since 2.0.0\n */\nexport var constUndefined = \n/*#__PURE__*/\nconstant(undefined);\n/**\n * A thunk that returns always `void`.\n *\n * @since 2.0.0\n */\nexport var constVoid = constUndefined;\n// TODO: remove in v3\n/**\n * Flips the order of the arguments of a function of two arguments.\n *\n * @since 2.0.0\n */\nexport function flip(f) {\n return function (b, a) { return f(a, b); };\n}\nexport function flow(ab, bc, cd, de, ef, fg, gh, hi, ij) {\n switch (arguments.length) {\n case 1:\n return ab;\n case 2:\n return function () {\n return bc(ab.apply(this, arguments));\n };\n case 3:\n return function () {\n return cd(bc(ab.apply(this, arguments)));\n };\n case 4:\n return function () {\n return de(cd(bc(ab.apply(this, arguments))));\n };\n case 5:\n return function () {\n return ef(de(cd(bc(ab.apply(this, arguments)))));\n };\n case 6:\n return function () {\n return fg(ef(de(cd(bc(ab.apply(this, arguments))))));\n };\n case 7:\n return function () {\n return gh(fg(ef(de(cd(bc(ab.apply(this, arguments)))))));\n };\n case 8:\n return function () {\n return hi(gh(fg(ef(de(cd(bc(ab.apply(this, arguments))))))));\n };\n case 9:\n return function () {\n return ij(hi(gh(fg(ef(de(cd(bc(ab.apply(this, arguments)))))))));\n };\n }\n return;\n}\n/**\n * @since 2.0.0\n */\nexport function tuple() {\n var t = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n t[_i] = arguments[_i];\n }\n return t;\n}\n/**\n * @since 2.0.0\n */\nexport function increment(n) {\n return n + 1;\n}\n/**\n * @since 2.0.0\n */\nexport function decrement(n) {\n return n - 1;\n}\n/**\n * @since 2.0.0\n */\nexport function absurd(_) {\n throw new Error('Called `absurd` function which should be uncallable');\n}\n/**\n * Creates a tupled version of this function: instead of `n` arguments, it accepts a single tuple argument.\n *\n * @example\n * import { tupled } from 'fp-ts/function'\n *\n * const add = tupled((x: number, y: number): number => x + y)\n *\n * assert.strictEqual(add([1, 2]), 3)\n *\n * @since 2.4.0\n */\nexport function tupled(f) {\n return function (a) { return f.apply(void 0, a); };\n}\n/**\n * Inverse function of `tupled`\n *\n * @since 2.4.0\n */\nexport function untupled(f) {\n return function () {\n var a = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n a[_i] = arguments[_i];\n }\n return f(a);\n };\n}\nexport function pipe(a, ab, bc, cd, de, ef, fg, gh, hi, ij, jk, kl, lm, mn, no, op, pq, qr, rs, st) {\n switch (arguments.length) {\n case 1:\n return a;\n case 2:\n return ab(a);\n case 3:\n return bc(ab(a));\n case 4:\n return cd(bc(ab(a)));\n case 5:\n return de(cd(bc(ab(a))));\n case 6:\n return ef(de(cd(bc(ab(a)))));\n case 7:\n return fg(ef(de(cd(bc(ab(a))))));\n case 8:\n return gh(fg(ef(de(cd(bc(ab(a)))))));\n case 9:\n return hi(gh(fg(ef(de(cd(bc(ab(a))))))));\n case 10:\n return ij(hi(gh(fg(ef(de(cd(bc(ab(a)))))))));\n case 11:\n return jk(ij(hi(gh(fg(ef(de(cd(bc(ab(a))))))))));\n case 12:\n return kl(jk(ij(hi(gh(fg(ef(de(cd(bc(ab(a)))))))))));\n case 13:\n return lm(kl(jk(ij(hi(gh(fg(ef(de(cd(bc(ab(a))))))))))));\n case 14:\n return mn(lm(kl(jk(ij(hi(gh(fg(ef(de(cd(bc(ab(a)))))))))))));\n case 15:\n return no(mn(lm(kl(jk(ij(hi(gh(fg(ef(de(cd(bc(ab(a))))))))))))));\n case 16:\n return op(no(mn(lm(kl(jk(ij(hi(gh(fg(ef(de(cd(bc(ab(a)))))))))))))));\n case 17:\n return pq(op(no(mn(lm(kl(jk(ij(hi(gh(fg(ef(de(cd(bc(ab(a))))))))))))))));\n case 18:\n return qr(pq(op(no(mn(lm(kl(jk(ij(hi(gh(fg(ef(de(cd(bc(ab(a)))))))))))))))));\n case 19:\n return rs(qr(pq(op(no(mn(lm(kl(jk(ij(hi(gh(fg(ef(de(cd(bc(ab(a))))))))))))))))));\n case 20:\n return st(rs(qr(pq(op(no(mn(lm(kl(jk(ij(hi(gh(fg(ef(de(cd(bc(ab(a)))))))))))))))))));\n }\n return;\n}\n/**\n * Type hole simulation\n *\n * @since 2.7.0\n */\nexport var hole = absurd;\n/**\n * @internal\n */\nexport var bind_ = function (a, name, b) {\n var _a;\n return Object.assign({}, a, (_a = {}, _a[name] = b, _a));\n};\n/**\n * @internal\n */\nexport var bindTo_ = function (name) { return function (b) {\n var _a;\n return (_a = {}, _a[name] = b, _a);\n}; };\n","/**\n * @since 2.2.0\n */\n/**\n * Defines the fold over a boolean value.\n * Takes two thunks `onTrue`, `onFalse` and a `boolean` value.\n * If `value` is false, `onFalse()` is returned, otherwise `onTrue()`.\n *\n * @example\n * import { some, map } from 'fp-ts/Option'\n * import { pipe } from 'fp-ts/function'\n * import { fold } from 'fp-ts/boolean'\n *\n * assert.deepStrictEqual(\n * pipe(\n * some(true),\n * map(fold(() => 'false', () => 'true'))\n * ),\n * some('true')\n * )\n *\n * @category destructors\n * @since 2.2.0\n */\nexport function fold(onFalse, onTrue) {\n return function (value) { return (value ? onTrue() : onFalse()); };\n}\n","import { fromEquals } from './Eq';\nimport { isNone, none, some } from './Option';\nimport { pipe } from './function';\n/**\n * @category constructors\n * @since 2.0.0\n */\nexport function left(left) {\n return { _tag: 'Left', left: left };\n}\n/**\n * @category constructors\n * @since 2.0.0\n */\nexport function right(right) {\n return { _tag: 'Right', right: right };\n}\n/**\n * @category constructors\n * @since 2.0.0\n */\nexport function both(left, right) {\n return { _tag: 'Both', left: left, right: right };\n}\n/**\n * @category destructors\n * @since 2.0.0\n */\nexport function fold(onLeft, onRight, onBoth) {\n return function (fa) {\n switch (fa._tag) {\n case 'Left':\n return onLeft(fa.left);\n case 'Right':\n return onRight(fa.right);\n case 'Both':\n return onBoth(fa.left, fa.right);\n }\n };\n}\n/**\n * @category combinators\n * @since 2.4.0\n */\nexport var swap = fold(right, left, function (e, a) { return both(a, e); });\n/**\n * @category instances\n * @since 2.0.0\n */\nexport function getShow(SE, SA) {\n return {\n show: fold(function (l) { return \"left(\" + SE.show(l) + \")\"; }, function (a) { return \"right(\" + SA.show(a) + \")\"; }, function (l, a) { return \"both(\" + SE.show(l) + \", \" + SA.show(a) + \")\"; })\n };\n}\n/**\n * @category instances\n * @since 2.0.0\n */\nexport function getEq(EE, EA) {\n return fromEquals(function (x, y) {\n return isLeft(x)\n ? isLeft(y) && EE.equals(x.left, y.left)\n : isRight(x)\n ? isRight(y) && EA.equals(x.right, y.right)\n : isBoth(y) && EE.equals(x.left, y.left) && EA.equals(x.right, y.right);\n });\n}\n/**\n * @category instances\n * @since 2.0.0\n */\nexport function getSemigroup(SE, SA) {\n return {\n concat: function (x, y) {\n return isLeft(x)\n ? isLeft(y)\n ? left(SE.concat(x.left, y.left))\n : isRight(y)\n ? both(x.left, y.right)\n : both(SE.concat(x.left, y.left), y.right)\n : isRight(x)\n ? isLeft(y)\n ? both(y.left, x.right)\n : isRight(y)\n ? right(SA.concat(x.right, y.right))\n : both(y.left, SA.concat(x.right, y.right))\n : isLeft(y)\n ? both(SE.concat(x.left, y.left), x.right)\n : isRight(y)\n ? both(x.left, SA.concat(x.right, y.right))\n : both(SE.concat(x.left, y.left), SA.concat(x.right, y.right));\n }\n };\n}\n/**\n * @category instances\n * @since 2.7.0\n */\nexport function getApplicative(SE) {\n return {\n URI: URI,\n _E: undefined,\n map: map_,\n of: right,\n ap: function (fab, fa) {\n return isLeft(fab)\n ? isLeft(fa)\n ? left(SE.concat(fab.left, fa.left))\n : isRight(fa)\n ? left(fab.left)\n : left(SE.concat(fab.left, fa.left))\n : isRight(fab)\n ? isLeft(fa)\n ? left(fa.left)\n : isRight(fa)\n ? right(fab.right(fa.right))\n : both(fa.left, fab.right(fa.right))\n : isLeft(fa)\n ? left(SE.concat(fab.left, fa.left))\n : isRight(fa)\n ? both(fab.left, fab.right(fa.right))\n : both(SE.concat(fab.left, fa.left), fab.right(fa.right));\n }\n };\n}\n/**\n * @category instances\n * @since 2.0.0\n */\nexport function getMonad(SE) {\n var chain = function (ma, f) {\n if (isLeft(ma)) {\n return ma;\n }\n if (isRight(ma)) {\n return f(ma.right);\n }\n var fb = f(ma.right);\n return isLeft(fb)\n ? left(SE.concat(ma.left, fb.left))\n : isRight(fb)\n ? both(ma.left, fb.right)\n : both(SE.concat(ma.left, fb.left), fb.right);\n };\n var applicative = getApplicative(SE);\n return {\n URI: URI,\n _E: undefined,\n map: map_,\n of: right,\n ap: applicative.ap,\n chain: chain,\n throwError: left\n };\n}\n// TODO: make lazy in v3\n/* tslint:disable:readonly-array */\n/**\n * @example\n * import { toTuple, left, right, both } from 'fp-ts/These'\n *\n * assert.deepStrictEqual(toTuple('a', 1)(left('b')), ['b', 1])\n * assert.deepStrictEqual(toTuple('a', 1)(right(2)), ['a', 2])\n * assert.deepStrictEqual(toTuple('a', 1)(both('b', 2)), ['b', 2])\n *\n * @category destructors\n * @since 2.0.0\n */\nexport function toTuple(e, a) {\n return function (fa) { return (isLeft(fa) ? [fa.left, a] : isRight(fa) ? [e, fa.right] : [fa.left, fa.right]); };\n}\n/* tslint:enable:readonly-array */\n/**\n * Returns an `E` value if possible\n *\n * @example\n * import { getLeft, left, right, both } from 'fp-ts/These'\n * import { none, some } from 'fp-ts/Option'\n *\n * assert.deepStrictEqual(getLeft(left('a')), some('a'))\n * assert.deepStrictEqual(getLeft(right(1)), none)\n * assert.deepStrictEqual(getLeft(both('a', 1)), some('a'))\n *\n * @category destructors\n * @since 2.0.0\n */\nexport function getLeft(fa) {\n return isLeft(fa) ? some(fa.left) : isRight(fa) ? none : some(fa.left);\n}\n/**\n * Returns an `A` value if possible\n *\n * @example\n * import { getRight, left, right, both } from 'fp-ts/These'\n * import { none, some } from 'fp-ts/Option'\n *\n * assert.deepStrictEqual(getRight(left('a')), none)\n * assert.deepStrictEqual(getRight(right(1)), some(1))\n * assert.deepStrictEqual(getRight(both('a', 1)), some(1))\n *\n * @category destructors\n * @since 2.0.0\n */\nexport function getRight(fa) {\n return isLeft(fa) ? none : isRight(fa) ? some(fa.right) : some(fa.right);\n}\n/**\n * Returns `true` if the these is an instance of `Left`, `false` otherwise\n *\n * @category guards\n * @since 2.0.0\n */\nexport function isLeft(fa) {\n return fa._tag === 'Left';\n}\n/**\n * Returns `true` if the these is an instance of `Right`, `false` otherwise\n *\n * @category guards\n * @since 2.0.0\n */\nexport function isRight(fa) {\n return fa._tag === 'Right';\n}\n/**\n * Returns `true` if the these is an instance of `Both`, `false` otherwise\n *\n * @category guards\n * @since 2.0.0\n */\nexport function isBoth(fa) {\n return fa._tag === 'Both';\n}\n// TODO: make lazy in v3\n/**\n * @example\n * import { leftOrBoth, left, both } from 'fp-ts/These'\n * import { none, some } from 'fp-ts/Option'\n *\n * assert.deepStrictEqual(leftOrBoth('a')(none), left('a'))\n * assert.deepStrictEqual(leftOrBoth('a')(some(1)), both('a', 1))\n *\n * @category constructors\n * @since 2.0.0\n */\nexport function leftOrBoth(e) {\n return function (ma) { return (isNone(ma) ? left(e) : both(e, ma.value)); };\n}\n// TODO: make lazy in v3\n/**\n * @example\n * import { rightOrBoth, right, both } from 'fp-ts/These'\n * import { none, some } from 'fp-ts/Option'\n *\n * assert.deepStrictEqual(rightOrBoth(1)(none), right(1))\n * assert.deepStrictEqual(rightOrBoth(1)(some('a')), both('a', 1))\n *\n * @category constructors\n * @since 2.0.0\n */\nexport function rightOrBoth(a) {\n return function (me) { return (isNone(me) ? right(a) : both(me.value, a)); };\n}\n/**\n * Returns the `E` value if and only if the value is constructed with `Left`\n *\n * @example\n * import { getLeftOnly, left, right, both } from 'fp-ts/These'\n * import { none, some } from 'fp-ts/Option'\n *\n * assert.deepStrictEqual(getLeftOnly(left('a')), some('a'))\n * assert.deepStrictEqual(getLeftOnly(right(1)), none)\n * assert.deepStrictEqual(getLeftOnly(both('a', 1)), none)\n *\n * @category destructors\n * @since 2.0.0\n */\nexport function getLeftOnly(fa) {\n return isLeft(fa) ? some(fa.left) : none;\n}\n/**\n * Returns the `A` value if and only if the value is constructed with `Right`\n *\n * @example\n * import { getRightOnly, left, right, both } from 'fp-ts/These'\n * import { none, some } from 'fp-ts/Option'\n *\n * assert.deepStrictEqual(getRightOnly(left('a')), none)\n * assert.deepStrictEqual(getRightOnly(right(1)), some(1))\n * assert.deepStrictEqual(getRightOnly(both('a', 1)), none)\n *\n * @category destructors\n * @since 2.0.0\n */\nexport function getRightOnly(fa) {\n return isRight(fa) ? some(fa.right) : none;\n}\n/**\n * Takes a pair of `Option`s and attempts to create a `These` from them\n *\n * @example\n * import { fromOptions, left, right, both } from 'fp-ts/These'\n * import { none, some } from 'fp-ts/Option'\n *\n * assert.deepStrictEqual(fromOptions(none, none), none)\n * assert.deepStrictEqual(fromOptions(some('a'), none), some(left('a')))\n * assert.deepStrictEqual(fromOptions(none, some(1)), some(right(1)))\n * assert.deepStrictEqual(fromOptions(some('a'), some(1)), some(both('a', 1)))\n *\n * @category constructors\n * @since 2.0.0\n */\nexport function fromOptions(fe, fa) {\n return isNone(fe)\n ? isNone(fa)\n ? none\n : some(right(fa.value))\n : isNone(fa)\n ? some(left(fe.value))\n : some(both(fe.value, fa.value));\n}\n// -------------------------------------------------------------------------------------\n// non-pipeables\n// -------------------------------------------------------------------------------------\nvar map_ = function (fa, f) { return pipe(fa, map(f)); };\n/* istanbul ignore next */\nvar bimap_ = function (fa, f, g) { return pipe(fa, bimap(f, g)); };\n/* istanbul ignore next */\nvar mapLeft_ = function (fa, f) { return pipe(fa, mapLeft(f)); };\n/* istanbul ignore next */\nvar reduce_ = function (fa, b, f) { return pipe(fa, reduce(b, f)); };\n/* istanbul ignore next */\nvar foldMap_ = function (M) {\n var foldMapM = foldMap(M);\n return function (fa, f) { return pipe(fa, foldMapM(f)); };\n};\n/* istanbul ignore next */\nvar reduceRight_ = function (fa, b, f) { return pipe(fa, reduceRight(b, f)); };\n/* istanbul ignore next */\nvar traverse_ = function (F) {\n var traverseF = traverse(F);\n return function (ta, f) { return pipe(ta, traverseF(f)); };\n};\n// -------------------------------------------------------------------------------------\n// pipeables\n// -------------------------------------------------------------------------------------\n/**\n * Map a pair of functions over the two type arguments of the bifunctor.\n *\n * @category Bifunctor\n * @since 2.0.0\n */\nexport var bimap = function (f, g) { return function (fa) {\n return isLeft(fa) ? left(f(fa.left)) : isRight(fa) ? right(g(fa.right)) : both(f(fa.left), g(fa.right));\n}; };\n/**\n * Map a function over the first type argument of a bifunctor.\n *\n * @category Bifunctor\n * @since 2.0.0\n */\nexport var mapLeft = function (f) { return function (fa) {\n return isLeft(fa) ? left(f(fa.left)) : isBoth(fa) ? both(f(fa.left), fa.right) : fa;\n}; };\n/**\n * `map` can be used to turn functions `(a: A) => B` into functions `(fa: F) => F` whose argument and return types\n * use the type constructor `F` to represent some computational context.\n *\n * @category Functor\n * @since 2.0.0\n */\nexport var map = function (f) { return function (fa) {\n return isLeft(fa) ? fa : isRight(fa) ? right(f(fa.right)) : both(fa.left, f(fa.right));\n}; };\n/**\n * @category Foldable\n * @since 2.0.0\n */\nexport var reduce = function (b, f) { return function (fa) {\n return isLeft(fa) ? b : isRight(fa) ? f(b, fa.right) : f(b, fa.right);\n}; };\n/**\n * @category Foldable\n * @since 2.0.0\n */\nexport var foldMap = function (M) { return function (f) { return function (fa) {\n return isLeft(fa) ? M.empty : isRight(fa) ? f(fa.right) : f(fa.right);\n}; }; };\n/**\n * @category Foldable\n * @since 2.0.0\n */\nexport var reduceRight = function (b, f) { return function (fa) {\n return isLeft(fa) ? b : isRight(fa) ? f(fa.right, b) : f(fa.right, b);\n}; };\n/**\n * @since 2.6.3\n */\nexport var traverse = function (F) { return function (f) { return function (ta) {\n return isLeft(ta) ? F.of(ta) : isRight(ta) ? F.map(f(ta.right), right) : F.map(f(ta.right), function (b) { return both(ta.left, b); });\n}; }; };\n/**\n * @since 2.6.3\n */\nexport var sequence = function (F) { return function (ta) {\n return isLeft(ta) ? F.of(ta) : isRight(ta) ? F.map(ta.right, right) : F.map(ta.right, function (b) { return both(ta.left, b); });\n}; };\n// -------------------------------------------------------------------------------------\n// instances\n// -------------------------------------------------------------------------------------\n/**\n * @category instances\n * @since 2.0.0\n */\nexport var URI = 'These';\n/**\n * @category instances\n * @since 2.7.0\n */\nexport var Functor = {\n URI: URI,\n map: map_\n};\n/**\n * @category instances\n * @since 2.7.0\n */\nexport var Bifunctor = {\n URI: URI,\n bimap: bimap_,\n mapLeft: mapLeft_\n};\n/**\n * @category instances\n * @since 2.7.0\n */\nexport var Foldable = {\n URI: URI,\n reduce: reduce_,\n foldMap: foldMap_,\n reduceRight: reduceRight_\n};\n/**\n * @category instances\n * @since 2.7.0\n */\nexport var Traversable = {\n URI: URI,\n map: map_,\n reduce: reduce_,\n foldMap: foldMap_,\n reduceRight: reduceRight_,\n traverse: traverse_,\n sequence: sequence\n};\n// TODO: remove in v3\n/**\n * @category instances\n * @since 2.0.0\n */\nexport var these = {\n URI: URI,\n map: map_,\n bimap: bimap_,\n mapLeft: mapLeft_,\n reduce: reduce_,\n foldMap: foldMap_,\n reduceRight: reduceRight_,\n traverse: traverse_,\n sequence: sequence\n};\n","import * as RT from './ReadonlyTuple';\n// tslint:disable:readonly-array\n// -------------------------------------------------------------------------------------\n// model\n// -------------------------------------------------------------------------------------\n/**\n * @category destructors\n * @since 2.0.0\n */\nexport var fst = RT.fst;\n/**\n * @category destructors\n * @since 2.0.0\n */\nexport var snd = RT.snd;\n/**\n * @category combinators\n * @since 2.0.0\n */\nexport var swap = RT.swap;\n/**\n * @category instances\n * @since 2.0.0\n */\nexport var getApply = RT.getApply;\n/**\n * @category instances\n * @since 2.0.0\n */\nexport var getApplicative = RT.getApplicative;\n/**\n * @category instances\n * @since 2.0.0\n */\nexport var getChain = RT.getChain;\n/**\n * @category instances\n * @since 2.0.0\n */\nexport var getMonad = RT.getMonad;\n// TODO: remove in v3\n/**\n * @category instances\n * @since 2.0.0\n */\nexport var getChainRec = RT.getChainRec;\n// -------------------------------------------------------------------------------------\n// non-pipeables\n// -------------------------------------------------------------------------------------\nvar map_ = RT.Functor.map;\nvar bimap_ = RT.Bifunctor.bimap;\nvar mapLeft_ = RT.Bifunctor.mapLeft;\nvar compose_ = RT.Semigroupoid.compose;\nvar extend_ = RT.Comonad.extend;\nvar reduce_ = RT.Foldable.reduce;\nvar foldMap_ = RT.Foldable.foldMap;\nvar reduceRight_ = RT.Foldable.reduceRight;\nvar traverse_ = RT.Traversable.traverse;\n// -------------------------------------------------------------------------------------\n// pipeables\n// -------------------------------------------------------------------------------------\n/**\n * Map a pair of functions over the two type arguments of the bifunctor.\n *\n * @category Bifunctor\n * @since 2.0.0\n */\nexport var bimap = RT.bimap;\n/**\n * Map a function over the first type argument of a bifunctor.\n *\n * @category Bifunctor\n * @since 2.0.0\n */\nexport var mapLeft = RT.mapLeft;\n/**\n * @category Semigroupoid\n * @since 2.0.0\n */\nexport var compose = RT.compose;\n/**\n * Derivable from `Extend`.\n *\n * @category combinators\n * @since 2.0.0\n */\nexport var duplicate = RT.duplicate;\n/**\n * @category Extend\n * @since 2.0.0\n */\nexport var extend = RT.extend;\n/**\n * @category Extract\n * @since 2.6.2\n */\nexport var extract = RT.extract;\n/**\n * @category Foldable\n * @since 2.0.0\n */\nexport var foldMap = RT.foldMap;\n/**\n * `map` can be used to turn functions `(a: A) => B` into functions `(fa: F) => F` whose argument and return types\n * use the type constructor `F` to represent some computational context.\n *\n * @category Functor\n * @since 2.0.0\n */\nexport var map = RT.map;\n/**\n * @category Foldable\n * @since 2.0.0\n */\nexport var reduce = RT.reduce;\n/**\n * @category Foldable\n * @since 2.0.0\n */\nexport var reduceRight = RT.reduceRight;\n/**\n * @since 2.6.3\n */\nexport var traverse = RT.traverse;\n/**\n * @since 2.6.3\n */\nexport var sequence = RT.sequence;\n// -------------------------------------------------------------------------------------\n// instances\n// -------------------------------------------------------------------------------------\n/**\n * @category instances\n * @since 2.0.0\n */\nexport var URI = 'Tuple';\n/**\n * @category instances\n * @since 2.7.0\n */\nexport var Functor = {\n URI: URI,\n map: map_\n};\n/**\n * @category instances\n * @since 2.7.0\n */\nexport var Bifunctor = {\n URI: URI,\n bimap: bimap_,\n mapLeft: mapLeft_\n};\n/**\n * @category instances\n * @since 2.7.0\n */\nexport var Semigroupoid = {\n URI: URI,\n compose: compose_\n};\n/**\n * @category instances\n * @since 2.7.0\n */\nexport var Comonad = {\n URI: URI,\n map: map_,\n extend: extend_,\n extract: extract\n};\n/**\n * @category instances\n * @since 2.7.0\n */\nexport var Foldable = {\n URI: URI,\n reduce: reduce_,\n foldMap: foldMap_,\n reduceRight: reduceRight_\n};\n/**\n * @category instances\n * @since 2.7.0\n */\nexport var Traversable = {\n URI: URI,\n map: map_,\n reduce: reduce_,\n foldMap: foldMap_,\n reduceRight: reduceRight_,\n traverse: traverse_,\n sequence: sequence\n};\n// TODO: remove in v3\n/**\n * @category instances\n * @since 2.0.0\n */\nexport var tuple = {\n URI: URI,\n compose: compose_,\n map: map_,\n bimap: bimap_,\n mapLeft: mapLeft_,\n extract: extract,\n extend: extend_,\n reduce: reduce_,\n foldMap: foldMap_,\n reduceRight: reduceRight_,\n traverse: traverse_,\n sequence: sequence\n};\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.rotate = exports.intersperse = exports.prependToAll = exports.unzip = exports.zip = exports.zipWith = exports.sort = exports.lefts = exports.rights = exports.reverse = exports.modifyAt = exports.deleteAt = exports.updateAt = exports.insertAt = exports.copy = exports.findLastIndex = exports.findLastMap = exports.findLast = exports.findFirstMap = exports.findFirst = exports.findIndex = exports.dropLeftWhile = exports.dropRight = exports.dropLeft = exports.spanLeft = exports.takeLeftWhile = exports.takeRight = exports.takeLeft = exports.init = exports.tail = exports.last = exports.head = exports.snoc = exports.cons = exports.lookup = exports.isOutOfBound = exports.isNonEmpty = exports.isEmpty = exports.scanRight = exports.scanLeft = exports.foldRight = exports.foldLeft = exports.flatten = exports.replicate = exports.range = exports.makeBy = exports.getOrd = exports.getEq = exports.getMonoid = exports.getShow = void 0;\nexports.Applicative = exports.FunctorWithIndex = exports.Functor = exports.URI = exports.zero = exports.unfold = exports.wilt = exports.wither = exports.traverseWithIndex = exports.sequence = exports.traverse = exports.reduceRightWithIndex = exports.reduceRight = exports.reduceWithIndex = exports.reduce = exports.foldMapWithIndex = exports.foldMap = exports.duplicate = exports.extend = exports.filterWithIndex = exports.filterMapWithIndex = exports.alt = exports.altW = exports.partitionMapWithIndex = exports.partitionMap = exports.partitionWithIndex = exports.partition = exports.filterMap = exports.filter = exports.separate = exports.compact = exports.mapWithIndex = exports.chainFirst = exports.chainWithIndex = exports.chain = exports.apSecond = exports.apFirst = exports.ap = exports.map = exports.of = exports.difference = exports.intersection = exports.union = exports.comprehension = exports.chunksOf = exports.splitAt = exports.chop = exports.sortBy = exports.uniq = exports.elem = void 0;\nexports.apS = exports.bind = exports.bindTo = exports.Do = exports.some = exports.every = exports.empty = exports.unsafeDeleteAt = exports.unsafeUpdateAt = exports.unsafeInsertAt = exports.array = exports.Witherable = exports.TraversableWithIndex = exports.Traversable = exports.FoldableWithIndex = exports.Foldable = exports.FilterableWithIndex = exports.Filterable = exports.Compactable = exports.Extend = exports.Alternative = exports.Alt = exports.Unfoldable = exports.Monad = void 0;\nvar RA = __importStar(require(\"./ReadonlyArray\"));\n// -------------------------------------------------------------------------------------\n// model\n// -------------------------------------------------------------------------------------\n/* tslint:disable:readonly-array */\n/**\n * @category instances\n * @since 2.0.0\n */\nexports.getShow = RA.getShow;\n/**\n * Returns a `Monoid` for `Array`\n *\n * @example\n * import { getMonoid } from 'fp-ts/Array'\n *\n * const M = getMonoid()\n * assert.deepStrictEqual(M.concat([1, 2], [3, 4]), [1, 2, 3, 4])\n *\n * @category instances\n * @since 2.0.0\n */\nexports.getMonoid = RA.getMonoid;\n/**\n * Derives an `Eq` over the `Array` of a given element type from the `Eq` of that type. The derived `Eq` defines two\n * arrays as equal if all elements of both arrays are compared equal pairwise with the given `E`. In case of arrays of\n * different lengths, the result is non equality.\n *\n * @example\n * import { eqString } from 'fp-ts/Eq'\n * import { getEq } from 'fp-ts/Array'\n *\n * const E = getEq(eqString)\n * assert.strictEqual(E.equals(['a', 'b'], ['a', 'b']), true)\n * assert.strictEqual(E.equals(['a'], []), false)\n *\n * @category instances\n * @since 2.0.0\n */\nexports.getEq = RA.getEq;\n/**\n * Derives an `Ord` over the `Array` of a given element type from the `Ord` of that type. The ordering between two such\n * arrays is equal to: the first non equal comparison of each arrays elements taken pairwise in increasing order, in\n * case of equality over all the pairwise elements; the longest array is considered the greatest, if both arrays have\n * the same length, the result is equality.\n *\n * @example\n * import { getOrd } from 'fp-ts/Array'\n * import { ordString } from 'fp-ts/Ord'\n *\n * const O = getOrd(ordString)\n * assert.strictEqual(O.compare(['b'], ['a']), 1)\n * assert.strictEqual(O.compare(['a'], ['a']), 0)\n * assert.strictEqual(O.compare(['a'], ['b']), -1)\n *\n * @category instances\n * @since 2.0.0\n */\nexports.getOrd = RA.getOrd;\n// -------------------------------------------------------------------------------------\n// constructors\n// -------------------------------------------------------------------------------------\n/**\n * Return a list of length `n` with element `i` initialized with `f(i)`\n *\n * @example\n * import { makeBy } from 'fp-ts/Array'\n *\n * const double = (n: number): number => n * 2\n * assert.deepStrictEqual(makeBy(5, double), [0, 2, 4, 6, 8])\n *\n * @category constructors\n * @since 2.0.0\n */\nexports.makeBy = RA.makeBy;\n/**\n * Create an array containing a range of integers, including both endpoints\n *\n * @example\n * import { range } from 'fp-ts/Array'\n *\n * assert.deepStrictEqual(range(1, 5), [1, 2, 3, 4, 5])\n *\n * @category constructors\n * @since 2.0.0\n */\nexports.range = RA.range;\n/**\n * Create an array containing a value repeated the specified number of times\n *\n * @example\n * import { replicate } from 'fp-ts/Array'\n *\n * assert.deepStrictEqual(replicate(3, 'a'), ['a', 'a', 'a'])\n *\n * @category constructors\n * @since 2.0.0\n */\nexports.replicate = RA.replicate;\n/**\n * Removes one level of nesting.\n *\n * Derivable from `Monad`.\n *\n * @example\n * import { flatten } from 'fp-ts/Array'\n *\n * assert.deepStrictEqual(flatten([[1], [2], [3]]), [1, 2, 3])\n *\n * @category combinators\n * @since 2.0.0\n */\nexports.flatten = RA.flatten;\n/**\n * Break an array into its first element and remaining elements\n *\n * @example\n * import { foldLeft } from 'fp-ts/Array'\n *\n * const len: (as: Array) => number = foldLeft(() => 0, (_, tail) => 1 + len(tail))\n * assert.strictEqual(len([1, 2, 3]), 3)\n *\n * @category destructors\n * @since 2.0.0\n */\nexports.foldLeft = RA.foldLeft;\n/**\n * Break an array into its initial elements and the last element\n *\n * @category destructors\n * @since 2.0.0\n */\nexports.foldRight = RA.foldRight;\n/**\n * Same as `reduce` but it carries over the intermediate steps\n *\n * @example\n * import { scanLeft } from 'fp-ts/Array'\n *\n * assert.deepStrictEqual(scanLeft(10, (b, a: number) => b - a)([1, 2, 3]), [10, 9, 7, 4])\n *\n * @category combinators\n * @since 2.0.0\n */\nexports.scanLeft = RA.scanLeft;\n/**\n * Fold an array from the right, keeping all intermediate results instead of only the final result\n *\n * @example\n * import { scanRight } from 'fp-ts/Array'\n *\n * assert.deepStrictEqual(scanRight(10, (a: number, b) => b - a)([1, 2, 3]), [4, 5, 7, 10])\n *\n * @category combinators\n * @since 2.0.0\n */\nexports.scanRight = RA.scanRight;\n/**\n * Test whether an array is empty\n *\n * @example\n * import { isEmpty } from 'fp-ts/Array'\n *\n * assert.strictEqual(isEmpty([]), true)\n *\n * @since 2.0.0\n */\nexports.isEmpty = RA.isEmpty;\n/**\n * Test whether an array is non empty narrowing down the type to `NonEmptyArray`\n *\n * @category guards\n * @since 2.0.0\n */\nexports.isNonEmpty = RA.isNonEmpty;\n/**\n * Test whether an array contains a particular index\n *\n * @since 2.0.0\n */\nexports.isOutOfBound = RA.isOutOfBound;\n// TODO: remove non-curried overloading in v3\n/**\n * This function provides a safe way to read a value at a particular index from an array\n *\n * @example\n * import { lookup } from 'fp-ts/Array'\n * import { some, none } from 'fp-ts/Option'\n * import { pipe } from 'fp-ts/function'\n *\n * assert.deepStrictEqual(pipe([1, 2, 3], lookup(1)), some(2))\n * assert.deepStrictEqual(pipe([1, 2, 3], lookup(3)), none)\n *\n * @since 2.0.0\n */\nexports.lookup = RA.lookup;\n// TODO: remove non-curried overloading in v3\n/**\n * Attaches an element to the front of an array, creating a new non empty array\n *\n * @example\n * import { cons } from 'fp-ts/Array'\n * import { pipe } from 'fp-ts/function'\n *\n * assert.deepStrictEqual(pipe([1, 2, 3], cons(0)), [0, 1, 2, 3])\n *\n * @category constructors\n * @since 2.0.0\n */\nexports.cons = RA.cons;\n// TODO: curry in v3\n/**\n * Append an element to the end of an array, creating a new non empty array\n *\n * @example\n * import { snoc } from 'fp-ts/Array'\n *\n * assert.deepStrictEqual(snoc([1, 2, 3], 4), [1, 2, 3, 4])\n *\n * @category constructors\n * @since 2.0.0\n */\nexports.snoc = RA.snoc;\n/**\n * Get the first element in an array, or `None` if the array is empty\n *\n * @example\n * import { head } from 'fp-ts/Array'\n * import { some, none } from 'fp-ts/Option'\n *\n * assert.deepStrictEqual(head([1, 2, 3]), some(1))\n * assert.deepStrictEqual(head([]), none)\n *\n * @category destructors\n * @since 2.0.0\n */\nexports.head = RA.head;\n/**\n * Get the last element in an array, or `None` if the array is empty\n *\n * @example\n * import { last } from 'fp-ts/Array'\n * import { some, none } from 'fp-ts/Option'\n *\n * assert.deepStrictEqual(last([1, 2, 3]), some(3))\n * assert.deepStrictEqual(last([]), none)\n *\n * @category destructors\n * @since 2.0.0\n */\nexports.last = RA.last;\n/**\n * Get all but the first element of an array, creating a new array, or `None` if the array is empty\n *\n * @example\n * import { tail } from 'fp-ts/Array'\n * import { some, none } from 'fp-ts/Option'\n *\n * assert.deepStrictEqual(tail([1, 2, 3]), some([2, 3]))\n * assert.deepStrictEqual(tail([]), none)\n *\n * @category destructors\n * @since 2.0.0\n */\nexports.tail = RA.tail;\n/**\n * Get all but the last element of an array, creating a new array, or `None` if the array is empty\n *\n * @example\n * import { init } from 'fp-ts/Array'\n * import { some, none } from 'fp-ts/Option'\n *\n * assert.deepStrictEqual(init([1, 2, 3]), some([1, 2]))\n * assert.deepStrictEqual(init([]), none)\n *\n * @category destructors\n * @since 2.0.0\n */\nexports.init = RA.init;\n/**\n * Keep only a number of elements from the start of an array, creating a new array.\n * `n` must be a natural number\n *\n * @example\n * import { takeLeft } from 'fp-ts/Array'\n *\n * assert.deepStrictEqual(takeLeft(2)([1, 2, 3]), [1, 2])\n *\n * @category combinators\n * @since 2.0.0\n */\nexports.takeLeft = RA.takeLeft;\n/**\n * Keep only a number of elements from the end of an array, creating a new array.\n * `n` must be a natural number\n *\n * @example\n * import { takeRight } from 'fp-ts/Array'\n *\n * assert.deepStrictEqual(takeRight(2)([1, 2, 3, 4, 5]), [4, 5])\n *\n * @category combinators\n * @since 2.0.0\n */\nexports.takeRight = RA.takeRight;\nfunction takeLeftWhile(predicate) {\n return RA.takeLeftWhile(predicate);\n}\nexports.takeLeftWhile = takeLeftWhile;\nfunction spanLeft(predicate) {\n return RA.spanLeft(predicate);\n}\nexports.spanLeft = spanLeft;\n/* tslint:enable:readonly-keyword */\n/**\n * Drop a number of elements from the start of an array, creating a new array\n *\n * @example\n * import { dropLeft } from 'fp-ts/Array'\n *\n * assert.deepStrictEqual(dropLeft(2)([1, 2, 3]), [3])\n *\n * @category combinators\n * @since 2.0.0\n */\nexports.dropLeft = RA.dropLeft;\n/**\n * Drop a number of elements from the end of an array, creating a new array\n *\n * @example\n * import { dropRight } from 'fp-ts/Array'\n *\n * assert.deepStrictEqual(dropRight(2)([1, 2, 3, 4, 5]), [1, 2, 3])\n *\n * @category combinators\n * @since 2.0.0\n */\nexports.dropRight = RA.dropRight;\n/**\n * Remove the longest initial subarray for which all element satisfy the specified predicate, creating a new array\n *\n * @example\n * import { dropLeftWhile } from 'fp-ts/Array'\n *\n * assert.deepStrictEqual(dropLeftWhile((n: number) => n % 2 === 1)([1, 3, 2, 4, 5]), [2, 4, 5])\n *\n * @category combinators\n * @since 2.0.0\n */\nexports.dropLeftWhile = RA.dropLeftWhile;\n/**\n * Find the first index for which a predicate holds\n *\n * @example\n * import { findIndex } from 'fp-ts/Array'\n * import { some, none } from 'fp-ts/Option'\n *\n * assert.deepStrictEqual(findIndex((n: number) => n === 2)([1, 2, 3]), some(1))\n * assert.deepStrictEqual(findIndex((n: number) => n === 2)([]), none)\n *\n * @since 2.0.0\n */\nexports.findIndex = RA.findIndex;\nfunction findFirst(predicate) {\n return RA.findFirst(predicate);\n}\nexports.findFirst = findFirst;\n/**\n * Find the first element returned by an option based selector function\n *\n * @example\n * import { findFirstMap } from 'fp-ts/Array'\n * import { some, none } from 'fp-ts/Option'\n *\n * interface Person {\n * name: string\n * age?: number\n * }\n *\n * const persons: Array = [{ name: 'John' }, { name: 'Mary', age: 45 }, { name: 'Joey', age: 28 }]\n *\n * // returns the name of the first person that has an age\n * assert.deepStrictEqual(findFirstMap((p: Person) => (p.age === undefined ? none : some(p.name)))(persons), some('Mary'))\n *\n * @category destructors\n * @since 2.0.0\n */\nexports.findFirstMap = RA.findFirstMap;\nfunction findLast(predicate) {\n return RA.findLast(predicate);\n}\nexports.findLast = findLast;\n/**\n * Find the last element returned by an option based selector function\n *\n * @example\n * import { findLastMap } from 'fp-ts/Array'\n * import { some, none } from 'fp-ts/Option'\n *\n * interface Person {\n * name: string\n * age?: number\n * }\n *\n * const persons: Array = [{ name: 'John' }, { name: 'Mary', age: 45 }, { name: 'Joey', age: 28 }]\n *\n * // returns the name of the last person that has an age\n * assert.deepStrictEqual(findLastMap((p: Person) => (p.age === undefined ? none : some(p.name)))(persons), some('Joey'))\n *\n * @category destructors\n * @since 2.0.0\n */\nexports.findLastMap = RA.findLastMap;\n/**\n * Returns the index of the last element of the list which matches the predicate\n *\n * @example\n * import { findLastIndex } from 'fp-ts/Array'\n * import { some, none } from 'fp-ts/Option'\n *\n * interface X {\n * a: number\n * b: number\n * }\n * const xs: Array = [{ a: 1, b: 0 }, { a: 1, b: 1 }]\n * assert.deepStrictEqual(findLastIndex((x: { a: number }) => x.a === 1)(xs), some(1))\n * assert.deepStrictEqual(findLastIndex((x: { a: number }) => x.a === 4)(xs), none)\n *\n *\n * @since 2.0.0\n */\nexports.findLastIndex = RA.findLastIndex;\n/**\n * @category combinators\n * @since 2.0.0\n */\nexports.copy = RA.toArray;\n/**\n * Insert an element at the specified index, creating a new array, or returning `None` if the index is out of bounds\n *\n * @example\n * import { insertAt } from 'fp-ts/Array'\n * import { some } from 'fp-ts/Option'\n *\n * assert.deepStrictEqual(insertAt(2, 5)([1, 2, 3, 4]), some([1, 2, 5, 3, 4]))\n *\n * @since 2.0.0\n */\nexports.insertAt = RA.insertAt;\n/**\n * Change the element at the specified index, creating a new array, or returning `None` if the index is out of bounds\n *\n * @example\n * import { updateAt } from 'fp-ts/Array'\n * import { some, none } from 'fp-ts/Option'\n *\n * assert.deepStrictEqual(updateAt(1, 1)([1, 2, 3]), some([1, 1, 3]))\n * assert.deepStrictEqual(updateAt(1, 1)([]), none)\n *\n * @since 2.0.0\n */\nexports.updateAt = RA.updateAt;\n/**\n * Delete the element at the specified index, creating a new array, or returning `None` if the index is out of bounds\n *\n * @example\n * import { deleteAt } from 'fp-ts/Array'\n * import { some, none } from 'fp-ts/Option'\n *\n * assert.deepStrictEqual(deleteAt(0)([1, 2, 3]), some([2, 3]))\n * assert.deepStrictEqual(deleteAt(1)([]), none)\n *\n * @since 2.0.0\n */\nexports.deleteAt = RA.deleteAt;\n/**\n * Apply a function to the element at the specified index, creating a new array, or returning `None` if the index is out\n * of bounds\n *\n * @example\n * import { modifyAt } from 'fp-ts/Array'\n * import { some, none } from 'fp-ts/Option'\n *\n * const double = (x: number): number => x * 2\n * assert.deepStrictEqual(modifyAt(1, double)([1, 2, 3]), some([1, 4, 3]))\n * assert.deepStrictEqual(modifyAt(1, double)([]), none)\n *\n * @since 2.0.0\n */\nexports.modifyAt = RA.modifyAt;\n/**\n * Reverse an array, creating a new array\n *\n * @example\n * import { reverse } from 'fp-ts/Array'\n *\n * assert.deepStrictEqual(reverse([1, 2, 3]), [3, 2, 1])\n *\n * @category combinators\n * @since 2.0.0\n */\nexports.reverse = RA.reverse;\n/**\n * Extracts from an array of `Either` all the `Right` elements. All the `Right` elements are extracted in order\n *\n * @example\n * import { rights } from 'fp-ts/Array'\n * import { right, left } from 'fp-ts/Either'\n *\n * assert.deepStrictEqual(rights([right(1), left('foo'), right(2)]), [1, 2])\n *\n * @category combinators\n * @since 2.0.0\n */\nexports.rights = RA.rights;\n/**\n * Extracts from an array of `Either` all the `Left` elements. All the `Left` elements are extracted in order\n *\n * @example\n * import { lefts } from 'fp-ts/Array'\n * import { left, right } from 'fp-ts/Either'\n *\n * assert.deepStrictEqual(lefts([right(1), left('foo'), right(2)]), ['foo'])\n *\n * @category combinators\n * @since 2.0.0\n */\nexports.lefts = RA.lefts;\n/**\n * Sort the elements of an array in increasing order, creating a new array\n *\n * @example\n * import { sort } from 'fp-ts/Array'\n * import { ordNumber } from 'fp-ts/Ord'\n *\n * assert.deepStrictEqual(sort(ordNumber)([3, 2, 1]), [1, 2, 3])\n *\n * @category combinators\n * @since 2.0.0\n */\nexports.sort = RA.sort;\n/**\n * Apply a function to pairs of elements at the same index in two arrays, collecting the results in a new array. If one\n * input array is short, excess elements of the longer array are discarded.\n *\n * @example\n * import { zipWith } from 'fp-ts/Array'\n *\n * assert.deepStrictEqual(zipWith([1, 2, 3], ['a', 'b', 'c', 'd'], (n, s) => s + n), ['a1', 'b2', 'c3'])\n *\n * @category combinators\n * @since 2.0.0\n */\nexports.zipWith = RA.zipWith;\n// TODO: remove non-curried overloading in v3\n/**\n * Takes two arrays and returns an array of corresponding pairs. If one input array is short, excess elements of the\n * longer array are discarded\n *\n * @example\n * import { zip } from 'fp-ts/Array'\n * import { pipe } from 'fp-ts/function'\n *\n * assert.deepStrictEqual(pipe([1, 2, 3], zip(['a', 'b', 'c', 'd'])), [[1, 'a'], [2, 'b'], [3, 'c']])\n *\n * @category combinators\n * @since 2.0.0\n */\nexports.zip = RA.zip;\n/**\n * The function is reverse of `zip`. Takes an array of pairs and return two corresponding arrays\n *\n * @example\n * import { unzip } from 'fp-ts/Array'\n *\n * assert.deepStrictEqual(unzip([[1, 'a'], [2, 'b'], [3, 'c']]), [[1, 2, 3], ['a', 'b', 'c']])\n *\n * @since 2.0.0\n */\nexports.unzip = RA.unzip;\n/**\n * Prepend an element to every member of an array\n *\n * @example\n * import { prependToAll } from 'fp-ts/Array'\n *\n * assert.deepStrictEqual(prependToAll(9)([1, 2, 3, 4]), [9, 1, 9, 2, 9, 3, 9, 4])\n *\n * @category combinators\n * @since 2.9.0\n */\nexports.prependToAll = RA.prependToAll;\n/**\n * Places an element in between members of an array\n *\n * @example\n * import { intersperse } from 'fp-ts/Array'\n *\n * assert.deepStrictEqual(intersperse(9)([1, 2, 3, 4]), [1, 9, 2, 9, 3, 9, 4])\n *\n * @category combinators\n * @since 2.9.0\n */\nexports.intersperse = RA.intersperse;\n/**\n * Rotate an array to the right by `n` steps\n *\n * @example\n * import { rotate } from 'fp-ts/Array'\n *\n * assert.deepStrictEqual(rotate(2)([1, 2, 3, 4, 5]), [4, 5, 1, 2, 3])\n *\n * @category combinators\n * @since 2.0.0\n */\nexports.rotate = RA.rotate;\n// TODO: remove non-curried overloading in v3\n/**\n * Test if a value is a member of an array. Takes a `Eq` as a single\n * argument which returns the function to use to search for a value of type `A` in\n * an array of type `Array`.\n *\n * @example\n * import { elem } from 'fp-ts/Array'\n * import { eqNumber } from 'fp-ts/Eq'\n * import { pipe } from 'fp-ts/function'\n *\n * assert.strictEqual(pipe([1, 2, 3], elem(eqNumber)(2)), true)\n * assert.strictEqual(pipe([1, 2, 3], elem(eqNumber)(0)), false)\n *\n * @since 2.0.0\n */\nexports.elem = RA.elem;\n/**\n * Remove duplicates from an array, keeping the first occurrence of an element.\n *\n * @example\n * import { uniq } from 'fp-ts/Array'\n * import { eqNumber } from 'fp-ts/Eq'\n *\n * assert.deepStrictEqual(uniq(eqNumber)([1, 2, 1]), [1, 2])\n *\n * @category combinators\n * @since 2.0.0\n */\nexports.uniq = RA.uniq;\n/**\n * Sort the elements of an array in increasing order, where elements are compared using first `ords[0]`, then `ords[1]`,\n * etc...\n *\n * @example\n * import { sortBy } from 'fp-ts/Array'\n * import { ord, ordString, ordNumber } from 'fp-ts/Ord'\n *\n * interface Person {\n * name: string\n * age: number\n * }\n * const byName = ord.contramap(ordString, (p: Person) => p.name)\n * const byAge = ord.contramap(ordNumber, (p: Person) => p.age)\n *\n * const sortByNameByAge = sortBy([byName, byAge])\n *\n * const persons = [{ name: 'a', age: 1 }, { name: 'b', age: 3 }, { name: 'c', age: 2 }, { name: 'b', age: 2 }]\n * assert.deepStrictEqual(sortByNameByAge(persons), [\n * { name: 'a', age: 1 },\n * { name: 'b', age: 2 },\n * { name: 'b', age: 3 },\n * { name: 'c', age: 2 }\n * ])\n *\n * @category combinators\n * @since 2.0.0\n */\nexports.sortBy = RA.sortBy;\n/**\n * A useful recursion pattern for processing an array to produce a new array, often used for \"chopping\" up the input\n * array. Typically chop is called with some function that will consume an initial prefix of the array and produce a\n * value and the rest of the array.\n *\n * @example\n * import { Eq, eqNumber } from 'fp-ts/Eq'\n * import { chop, spanLeft } from 'fp-ts/Array'\n *\n * const group = (S: Eq): ((as: Array) => Array>) => {\n * return chop(as => {\n * const { init, rest } = spanLeft((a: A) => S.equals(a, as[0]))(as)\n * return [init, rest]\n * })\n * }\n * assert.deepStrictEqual(group(eqNumber)([1, 1, 2, 3, 3, 4]), [[1, 1], [2], [3, 3], [4]])\n *\n * @category combinators\n * @since 2.0.0\n */\nexports.chop = RA.chop;\n/**\n * Splits an array into two pieces, the first piece has `n` elements.\n *\n * @example\n * import { splitAt } from 'fp-ts/Array'\n *\n * assert.deepStrictEqual(splitAt(2)([1, 2, 3, 4, 5]), [[1, 2], [3, 4, 5]])\n *\n * @since 2.0.0\n */\nexports.splitAt = RA.splitAt;\n/**\n * Splits an array into length-`n` pieces. The last piece will be shorter if `n` does not evenly divide the length of\n * the array. Note that `chunksOf(n)([])` is `[]`, not `[[]]`. This is intentional, and is consistent with a recursive\n * definition of `chunksOf`; it satisfies the property that\n *\n * ```ts\n * chunksOf(n)(xs).concat(chunksOf(n)(ys)) == chunksOf(n)(xs.concat(ys)))\n * ```\n *\n * whenever `n` evenly divides the length of `xs`.\n *\n * @example\n * import { chunksOf } from 'fp-ts/Array'\n *\n * assert.deepStrictEqual(chunksOf(2)([1, 2, 3, 4, 5]), [[1, 2], [3, 4], [5]])\n *\n * @since 2.0.0\n */\nexports.chunksOf = RA.chunksOf;\nfunction comprehension(input, f, g) {\n if (g === void 0) { g = function () { return true; }; }\n return RA.comprehension(input, f, g);\n}\nexports.comprehension = comprehension;\n// TODO: remove non-curried overloading in v3\n/**\n * Creates an array of unique values, in order, from all given arrays using a `Eq` for equality comparisons\n *\n * @example\n * import { union } from 'fp-ts/Array'\n * import { eqNumber } from 'fp-ts/Eq'\n * import { pipe } from 'fp-ts/function'\n *\n * assert.deepStrictEqual(pipe([1, 2], union(eqNumber)([2, 3])), [1, 2, 3])\n *\n * @category combinators\n * @since 2.0.0\n */\nexports.union = RA.union;\n// TODO: remove non-curried overloading in v3\n/**\n * Creates an array of unique values that are included in all given arrays using a `Eq` for equality\n * comparisons. The order and references of result values are determined by the first array.\n *\n * @example\n * import { intersection } from 'fp-ts/Array'\n * import { eqNumber } from 'fp-ts/Eq'\n * import { pipe } from 'fp-ts/function'\n *\n * assert.deepStrictEqual(pipe([1, 2], intersection(eqNumber)([2, 3])), [2])\n *\n * @category combinators\n * @since 2.0.0\n */\nexports.intersection = RA.intersection;\n// TODO: remove non-curried overloading in v3\n/**\n * Creates an array of array values not included in the other given array using a `Eq` for equality\n * comparisons. The order and references of result values are determined by the first array.\n *\n * @example\n * import { difference } from 'fp-ts/Array'\n * import { eqNumber } from 'fp-ts/Eq'\n * import { pipe } from 'fp-ts/function'\n *\n * assert.deepStrictEqual(pipe([1, 2], difference(eqNumber)([2, 3])), [1])\n *\n * @category combinators\n * @since 2.0.0\n */\nexports.difference = RA.difference;\n/**\n * Wrap a value into the type constructor.\n *\n * @category Applicative\n * @since 2.0.0\n */\nexports.of = RA.of;\n// -------------------------------------------------------------------------------------\n// non-pipeables\n// -------------------------------------------------------------------------------------\nvar map_ = RA.Monad.map;\nvar ap_ = RA.Monad.ap;\nvar chain_ = RA.Monad.chain;\nvar mapWithIndex_ = RA.FunctorWithIndex.mapWithIndex;\nvar filter_ = RA.Filterable.filter;\nvar filterMap_ = RA.Filterable.filterMap;\nvar partition_ = RA.Filterable.partition;\nvar partitionMap_ = RA.Filterable.partitionMap;\nvar filterWithIndex_ = RA.FilterableWithIndex\n .filterWithIndex;\nvar filterMapWithIndex_ = RA.FilterableWithIndex\n .filterMapWithIndex;\nvar partitionWithIndex_ = RA.FilterableWithIndex\n .partitionWithIndex;\nvar partitionMapWithIndex_ = RA.FilterableWithIndex\n .partitionMapWithIndex;\nvar reduce_ = RA.Foldable.reduce;\nvar foldMap_ = RA.Foldable.foldMap;\nvar reduceRight_ = RA.Foldable.reduceRight;\nvar traverse_ = RA.Traversable.traverse;\nvar alt_ = RA.Alternative.alt;\nvar reduceWithIndex_ = RA.FoldableWithIndex.reduceWithIndex;\nvar foldMapWithIndex_ = RA.FoldableWithIndex.foldMapWithIndex;\nvar reduceRightWithIndex_ = RA.FoldableWithIndex.reduceRightWithIndex;\nvar traverseWithIndex_ = RA.TraversableWithIndex\n .traverseWithIndex;\nvar extend_ = RA.Extend.extend;\nvar wither_ = RA.Witherable.wither;\nvar wilt_ = RA.Witherable.wilt;\n// -------------------------------------------------------------------------------------\n// pipeables\n// -------------------------------------------------------------------------------------\n/**\n * `map` can be used to turn functions `(a: A) => B` into functions `(fa: F) => F` whose argument and return types\n * use the type constructor `F` to represent some computational context.\n *\n * @category Functor\n * @since 2.0.0\n */\nexports.map = RA.map;\n/**\n * Apply a function to an argument under a type constructor.\n *\n * @category Apply\n * @since 2.0.0\n */\nexports.ap = RA.ap;\n/**\n * Combine two effectful actions, keeping only the result of the first.\n *\n * Derivable from `Apply`.\n *\n * @category combinators\n * @since 2.0.0\n */\nexports.apFirst = RA.apFirst;\n/**\n * Combine two effectful actions, keeping only the result of the second.\n *\n * Derivable from `Apply`.\n *\n * @category combinators\n * @since 2.0.0\n */\nexports.apSecond = RA.apSecond;\n/**\n * Composes computations in sequence, using the return value of one computation to determine the next computation.\n *\n * @category Monad\n * @since 2.0.0\n */\nexports.chain = RA.chain;\n/**\n * @since 2.7.0\n */\nexports.chainWithIndex = RA.chainWithIndex;\n/**\n * Composes computations in sequence, using the return value of one computation to determine the next computation and\n * keeping only the result of the first.\n *\n * Derivable from `Monad`.\n *\n * @category combinators\n * @since 2.0.0\n */\nexports.chainFirst = RA.chainFirst;\n/**\n * @category FunctorWithIndex\n * @since 2.0.0\n */\nexports.mapWithIndex = RA.mapWithIndex;\n/**\n * @category Compactable\n * @since 2.0.0\n */\nexports.compact = RA.compact;\n/**\n * @category Compactable\n * @since 2.0.0\n */\nexports.separate = RA.separate;\n/**\n * @category Filterable\n * @since 2.0.0\n */\nexports.filter = RA.filter;\n/**\n * @category Filterable\n * @since 2.0.0\n */\nexports.filterMap = RA.filterMap;\n/**\n * @category Filterable\n * @since 2.0.0\n */\nexports.partition = RA.partition;\n/**\n * @category FilterableWithIndex\n * @since 2.0.0\n */\nexports.partitionWithIndex = RA.partitionWithIndex;\n/**\n * @category Filterable\n * @since 2.0.0\n */\nexports.partitionMap = RA.partitionMap;\n/**\n * @category FilterableWithIndex\n * @since 2.0.0\n */\nexports.partitionMapWithIndex = RA.partitionMapWithIndex;\n/**\n * Less strict version of [`alt`](#alt).\n *\n * @category Alt\n * @since 2.9.0\n */\nexports.altW = RA.altW;\n/**\n * Identifies an associative operation on a type constructor. It is similar to `Semigroup`, except that it applies to\n * types of kind `* -> *`.\n *\n * @category Alt\n * @since 2.0.0\n */\nexports.alt = RA.alt;\n/**\n * @category FilterableWithIndex\n * @since 2.0.0\n */\nexports.filterMapWithIndex = RA.filterMapWithIndex;\n/**\n * @category FilterableWithIndex\n * @since 2.0.0\n */\nexports.filterWithIndex = RA.filterWithIndex;\n/**\n * @category Extend\n * @since 2.0.0\n */\nexports.extend = RA.extend;\n/**\n * Derivable from `Extend`.\n *\n * @category combinators\n * @since 2.0.0\n */\nexports.duplicate = RA.duplicate;\n/**\n * @category Foldable\n * @since 2.0.0\n */\nexports.foldMap = RA.foldMap;\n/**\n * @category FoldableWithIndex\n * @since 2.0.0\n */\nexports.foldMapWithIndex = RA.foldMapWithIndex;\n/**\n * @category Foldable\n * @since 2.0.0\n */\nexports.reduce = RA.reduce;\n/**\n * @category FoldableWithIndex\n * @since 2.0.0\n */\nexports.reduceWithIndex = RA.reduceWithIndex;\n/**\n * @category Foldable\n * @since 2.0.0\n */\nexports.reduceRight = RA.reduceRight;\n/**\n * @category FoldableWithIndex\n * @since 2.0.0\n */\nexports.reduceRightWithIndex = RA.reduceRightWithIndex;\n/**\n * **for optimized and stack safe version check the data types `traverseArray` function**\n * @category Traversable\n * @since 2.6.3\n */\nexports.traverse = RA.traverse;\n/**\n * **for optimized and stack safe version check the data types `sequenceArray` function**\n * @category Traversable\n * @since 2.6.3\n */\nexports.sequence = RA.sequence;\n/**\n * **for optimized and stack safe version check the data types `traverseArrayWithIndex` function**\n * @category TraversableWithIndex\n * @since 2.6.3\n */\nexports.traverseWithIndex = RA.traverseWithIndex;\n/**\n * @category Witherable\n * @since 2.6.5\n */\nexports.wither = RA.wither;\n/**\n * @category Witherable\n * @since 2.6.5\n */\nexports.wilt = RA.wilt;\n/**\n * @category Unfoldable\n * @since 2.6.6\n */\nexports.unfold = RA.unfold;\n/**\n * @category Alternative\n * @since 2.7.0\n */\nexports.zero = RA.Alternative.zero;\n// -------------------------------------------------------------------------------------\n// instances\n// -------------------------------------------------------------------------------------\n/**\n * @category instances\n * @since 2.0.0\n */\nexports.URI = 'Array';\n/**\n * @category instances\n * @since 2.7.0\n */\nexports.Functor = {\n URI: exports.URI,\n map: map_\n};\n/**\n * @category instances\n * @since 2.7.0\n */\nexports.FunctorWithIndex = {\n URI: exports.URI,\n map: map_,\n mapWithIndex: mapWithIndex_\n};\n/**\n * @category instances\n * @since 2.7.0\n */\nexports.Applicative = {\n URI: exports.URI,\n map: map_,\n ap: ap_,\n of: exports.of\n};\n/**\n * @category instances\n * @since 2.7.0\n */\nexports.Monad = {\n URI: exports.URI,\n map: map_,\n ap: ap_,\n of: exports.of,\n chain: chain_\n};\n/**\n * @category instances\n * @since 2.7.0\n */\nexports.Unfoldable = {\n URI: exports.URI,\n unfold: exports.unfold\n};\n/**\n * @category instances\n * @since 2.7.0\n */\nexports.Alt = {\n URI: exports.URI,\n map: map_,\n alt: alt_\n};\n/**\n * @category instances\n * @since 2.7.0\n */\nexports.Alternative = {\n URI: exports.URI,\n map: map_,\n ap: ap_,\n of: exports.of,\n alt: alt_,\n zero: exports.zero\n};\n/**\n * @category instances\n * @since 2.7.0\n */\nexports.Extend = {\n URI: exports.URI,\n map: map_,\n extend: extend_\n};\n/**\n * @category instances\n * @since 2.7.0\n */\nexports.Compactable = {\n URI: exports.URI,\n compact: exports.compact,\n separate: exports.separate\n};\n/**\n * @category instances\n * @since 2.7.0\n */\nexports.Filterable = {\n URI: exports.URI,\n map: map_,\n compact: exports.compact,\n separate: exports.separate,\n filter: filter_,\n filterMap: filterMap_,\n partition: partition_,\n partitionMap: partitionMap_\n};\n/**\n * @category instances\n * @since 2.7.0\n */\nexports.FilterableWithIndex = {\n URI: exports.URI,\n map: map_,\n mapWithIndex: mapWithIndex_,\n compact: exports.compact,\n separate: exports.separate,\n filter: filter_,\n filterMap: filterMap_,\n partition: partition_,\n partitionMap: partitionMap_,\n partitionMapWithIndex: partitionMapWithIndex_,\n partitionWithIndex: partitionWithIndex_,\n filterMapWithIndex: filterMapWithIndex_,\n filterWithIndex: filterWithIndex_\n};\n/**\n * @category instances\n * @since 2.7.0\n */\nexports.Foldable = {\n URI: exports.URI,\n reduce: reduce_,\n foldMap: foldMap_,\n reduceRight: reduceRight_\n};\n/**\n * @category instances\n * @since 2.7.0\n */\nexports.FoldableWithIndex = {\n URI: exports.URI,\n reduce: reduce_,\n foldMap: foldMap_,\n reduceRight: reduceRight_,\n reduceWithIndex: reduceWithIndex_,\n foldMapWithIndex: foldMapWithIndex_,\n reduceRightWithIndex: reduceRightWithIndex_\n};\n/**\n * @category instances\n * @since 2.7.0\n */\nexports.Traversable = {\n URI: exports.URI,\n map: map_,\n reduce: reduce_,\n foldMap: foldMap_,\n reduceRight: reduceRight_,\n traverse: traverse_,\n sequence: exports.sequence\n};\n/**\n * @category instances\n * @since 2.7.0\n */\nexports.TraversableWithIndex = {\n URI: exports.URI,\n map: map_,\n mapWithIndex: mapWithIndex_,\n reduce: reduce_,\n foldMap: foldMap_,\n reduceRight: reduceRight_,\n reduceWithIndex: reduceWithIndex_,\n foldMapWithIndex: foldMapWithIndex_,\n reduceRightWithIndex: reduceRightWithIndex_,\n traverse: traverse_,\n sequence: exports.sequence,\n traverseWithIndex: traverseWithIndex_\n};\n/**\n * @category instances\n * @since 2.7.0\n */\nexports.Witherable = {\n URI: exports.URI,\n map: map_,\n compact: exports.compact,\n separate: exports.separate,\n filter: filter_,\n filterMap: filterMap_,\n partition: partition_,\n partitionMap: partitionMap_,\n reduce: reduce_,\n foldMap: foldMap_,\n reduceRight: reduceRight_,\n traverse: traverse_,\n sequence: exports.sequence,\n wither: wither_,\n wilt: wilt_\n};\n// TODO: remove in v3\n/**\n * @category instances\n * @since 2.0.0\n */\nexports.array = {\n URI: exports.URI,\n compact: exports.compact,\n separate: exports.separate,\n map: map_,\n ap: ap_,\n of: exports.of,\n chain: chain_,\n filter: filter_,\n filterMap: filterMap_,\n partition: partition_,\n partitionMap: partitionMap_,\n mapWithIndex: mapWithIndex_,\n partitionMapWithIndex: partitionMapWithIndex_,\n partitionWithIndex: partitionWithIndex_,\n filterMapWithIndex: filterMapWithIndex_,\n filterWithIndex: filterWithIndex_,\n alt: alt_,\n zero: exports.zero,\n unfold: exports.unfold,\n reduce: reduce_,\n foldMap: foldMap_,\n reduceRight: reduceRight_,\n traverse: traverse_,\n sequence: exports.sequence,\n reduceWithIndex: reduceWithIndex_,\n foldMapWithIndex: foldMapWithIndex_,\n reduceRightWithIndex: reduceRightWithIndex_,\n traverseWithIndex: traverseWithIndex_,\n extend: extend_,\n wither: wither_,\n wilt: wilt_\n};\n// -------------------------------------------------------------------------------------\n// unsafe\n// -------------------------------------------------------------------------------------\n/**\n * @category unsafe\n * @since 2.0.0\n */\nexports.unsafeInsertAt = RA.unsafeInsertAt;\n/**\n * @category unsafe\n * @since 2.0.0\n */\nexports.unsafeUpdateAt = RA.unsafeUpdateAt;\n/**\n * @category unsafe\n * @since 2.0.0\n */\nexports.unsafeDeleteAt = RA.unsafeDeleteAt;\n// -------------------------------------------------------------------------------------\n// utils\n// -------------------------------------------------------------------------------------\n/**\n * An empty array\n *\n * @since 2.0.0\n */\nexports.empty = [];\n/**\n * @since 2.9.0\n */\nexports.every = RA.every;\n/**\n * @since 2.9.0\n */\nexports.some = RA.some;\n// -------------------------------------------------------------------------------------\n// do notation\n// -------------------------------------------------------------------------------------\n/**\n * @since 2.9.0\n */\nexports.Do = \n/*#__PURE__*/\nexports.of({});\n/**\n * @since 2.8.0\n */\nexports.bindTo = RA.bindTo;\n/**\n * @since 2.8.0\n */\nexports.bind = RA.bind;\n// -------------------------------------------------------------------------------------\n// pipeable sequence S\n// -------------------------------------------------------------------------------------\n/**\n * @since 2.8.0\n */\nexports.apS = RA.apS;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.tailRec = void 0;\n/**\n * @since 2.0.0\n */\nfunction tailRec(a, f) {\n var v = f(a);\n while (v._tag === 'Left') {\n v = f(v.left);\n }\n return v.right;\n}\nexports.tailRec = tailRec;\n","import { identity, pipe as pipeFromFunctionModule } from './function';\n// TODO: remove module in v3\n/**\n * Use [`pipe`](https://gcanti.github.io/fp-ts/modules/function.ts.html#flow) from `function` module instead.\n *\n * @since 2.0.0\n */\nexport var pipe = pipeFromFunctionModule;\nvar isFunctor = function (I) { return typeof I.map === 'function'; };\nvar isContravariant = function (I) { return typeof I.contramap === 'function'; };\nvar isFunctorWithIndex = function (I) { return typeof I.mapWithIndex === 'function'; };\nvar isApply = function (I) { return typeof I.ap === 'function'; };\nvar isChain = function (I) { return typeof I.chain === 'function'; };\nvar isBifunctor = function (I) { return typeof I.bimap === 'function'; };\nvar isExtend = function (I) { return typeof I.extend === 'function'; };\nvar isFoldable = function (I) { return typeof I.reduce === 'function'; };\nvar isFoldableWithIndex = function (I) { return typeof I.reduceWithIndex === 'function'; };\nvar isAlt = function (I) { return typeof I.alt === 'function'; };\nvar isCompactable = function (I) { return typeof I.compact === 'function'; };\nvar isFilterable = function (I) { return typeof I.filter === 'function'; };\nvar isFilterableWithIndex = function (I) {\n return typeof I.filterWithIndex === 'function';\n};\nvar isProfunctor = function (I) { return typeof I.promap === 'function'; };\nvar isSemigroupoid = function (I) { return typeof I.compose === 'function'; };\nvar isMonadThrow = function (I) { return typeof I.throwError === 'function'; };\nexport function pipeable(I) {\n var r = {};\n if (isFunctor(I)) {\n var map = function (f) { return function (fa) { return I.map(fa, f); }; };\n r.map = map;\n }\n if (isContravariant(I)) {\n var contramap = function (f) { return function (fa) { return I.contramap(fa, f); }; };\n r.contramap = contramap;\n }\n if (isFunctorWithIndex(I)) {\n var mapWithIndex = function (f) { return function (fa) { return I.mapWithIndex(fa, f); }; };\n r.mapWithIndex = mapWithIndex;\n }\n if (isApply(I)) {\n var ap = function (fa) { return function (fab) { return I.ap(fab, fa); }; };\n var apFirst = function (fb) { return function (fa) {\n return I.ap(I.map(fa, function (a) { return function () { return a; }; }), fb);\n }; };\n r.ap = ap;\n r.apFirst = apFirst;\n r.apSecond = function (fb) { return function (fa) {\n return I.ap(I.map(fa, function () { return function (b) { return b; }; }), fb);\n }; };\n }\n if (isChain(I)) {\n var chain = function (f) { return function (ma) { return I.chain(ma, f); }; };\n var chainFirst = function (f) { return function (ma) { return I.chain(ma, function (a) { return I.map(f(a), function () { return a; }); }); }; };\n var flatten = function (mma) { return I.chain(mma, identity); };\n r.chain = chain;\n r.chainFirst = chainFirst;\n r.flatten = flatten;\n }\n if (isBifunctor(I)) {\n var bimap = function (f, g) { return function (fa) { return I.bimap(fa, f, g); }; };\n var mapLeft = function (f) { return function (fa) { return I.mapLeft(fa, f); }; };\n r.bimap = bimap;\n r.mapLeft = mapLeft;\n }\n if (isExtend(I)) {\n var extend = function (f) { return function (wa) { return I.extend(wa, f); }; };\n var duplicate = function (wa) { return I.extend(wa, identity); };\n r.extend = extend;\n r.duplicate = duplicate;\n }\n if (isFoldable(I)) {\n var reduce = function (b, f) { return function (fa) { return I.reduce(fa, b, f); }; };\n var foldMap = function (M) {\n var foldMapM = I.foldMap(M);\n return function (f) { return function (fa) { return foldMapM(fa, f); }; };\n };\n var reduceRight = function (b, f) { return function (fa) { return I.reduceRight(fa, b, f); }; };\n r.reduce = reduce;\n r.foldMap = foldMap;\n r.reduceRight = reduceRight;\n }\n if (isFoldableWithIndex(I)) {\n var reduceWithIndex = function (b, f) { return function (fa) {\n return I.reduceWithIndex(fa, b, f);\n }; };\n var foldMapWithIndex = function (M) {\n var foldMapM = I.foldMapWithIndex(M);\n return function (f) { return function (fa) { return foldMapM(fa, f); }; };\n };\n var reduceRightWithIndex = function (b, f) { return function (fa) {\n return I.reduceRightWithIndex(fa, b, f);\n }; };\n r.reduceWithIndex = reduceWithIndex;\n r.foldMapWithIndex = foldMapWithIndex;\n r.reduceRightWithIndex = reduceRightWithIndex;\n }\n if (isAlt(I)) {\n var alt = function (that) { return function (fa) { return I.alt(fa, that); }; };\n r.alt = alt;\n }\n if (isCompactable(I)) {\n r.compact = I.compact;\n r.separate = I.separate;\n }\n if (isFilterable(I)) {\n var filter = function (predicate) { return function (fa) {\n return I.filter(fa, predicate);\n }; };\n var filterMap = function (f) { return function (fa) { return I.filterMap(fa, f); }; };\n var partition = function (predicate) { return function (fa) {\n return I.partition(fa, predicate);\n }; };\n var partitionMap = function (f) { return function (fa) { return I.partitionMap(fa, f); }; };\n r.filter = filter;\n r.filterMap = filterMap;\n r.partition = partition;\n r.partitionMap = partitionMap;\n }\n if (isFilterableWithIndex(I)) {\n var filterWithIndex = function (predicateWithIndex) { return function (fa) { return I.filterWithIndex(fa, predicateWithIndex); }; };\n var filterMapWithIndex = function (f) { return function (fa) {\n return I.filterMapWithIndex(fa, f);\n }; };\n var partitionWithIndex = function (predicateWithIndex) { return function (fa) { return I.partitionWithIndex(fa, predicateWithIndex); }; };\n var partitionMapWithIndex = function (f) { return function (fa) {\n return I.partitionMapWithIndex(fa, f);\n }; };\n r.filterWithIndex = filterWithIndex;\n r.filterMapWithIndex = filterMapWithIndex;\n r.partitionWithIndex = partitionWithIndex;\n r.partitionMapWithIndex = partitionMapWithIndex;\n }\n if (isProfunctor(I)) {\n var promap = function (f, g) { return function (fa) { return I.promap(fa, f, g); }; };\n r.promap = promap;\n }\n if (isSemigroupoid(I)) {\n var compose = function (that) { return function (fa) { return I.compose(fa, that); }; };\n r.compose = compose;\n }\n if (isMonadThrow(I)) {\n var fromOption = function (onNone) { return function (ma) {\n return ma._tag === 'None' ? I.throwError(onNone()) : I.of(ma.value);\n }; };\n var fromEither = function (ma) {\n return ma._tag === 'Left' ? I.throwError(ma.left) : I.of(ma.right);\n };\n var fromPredicate = function (predicate, onFalse) { return function (a) { return (predicate(a) ? I.of(a) : I.throwError(onFalse(a))); }; };\n var filterOrElse = function (predicate, onFalse) { return function (ma) { return I.chain(ma, function (a) { return (predicate(a) ? I.of(a) : I.throwError(onFalse(a))); }); }; };\n r.fromOption = fromOption;\n r.fromEither = fromEither;\n r.fromPredicate = fromPredicate;\n r.filterOrElse = filterOrElse;\n }\n return r;\n}\n"],"sourceRoot":""}