"use strict";Object.defineProperty(exports, "__esModule", {value: true});


























var _chunkGTSB5NLOjs = require('./chunk-GTSB5NLO.js');


























var _chunkMMK37YTCjs = require('./chunk-MMK37YTC.js');


var _chunkT4ZJ6CA2js = require('./chunk-T4ZJ6CA2.js');


var _chunkR2MJP25Ojs = require('./chunk-R2MJP25O.js');


var _chunkD6EN5A4Bjs = require('./chunk-D6EN5A4B.js');




var _chunkUNAIGMDHjs = require('./chunk-UNAIGMDH.js');




var _chunk7K74W2G3js = require('./chunk-7K74W2G3.js');




var _chunkQ2LZCTWPjs = require('./chunk-Q2LZCTWP.js');



var _chunkEBISTSVAjs = require('./chunk-EBISTSVA.js');







var _chunkOTKMOSH2js = require('./chunk-OTKMOSH2.js');




var _chunkSQA7G4TEjs = require('./chunk-SQA7G4TE.js');


var _chunk6C3VEZWHjs = require('./chunk-6C3VEZWH.js');

// src/Array.ts
var Array_exports = {};
_chunk6C3VEZWHjs.__export.call(void 0, Array_exports, {
  Alt: () => Alt,
  Alternative: () => Alternative,
  Applicative: () => Applicative,
  Apply: () => Apply,
  Chain: () => Chain,
  ChainRecBreadthFirst: () => ChainRecBreadthFirst,
  ChainRecDepthFirst: () => ChainRecDepthFirst,
  Compactable: () => Compactable,
  Do: () => Do,
  Extend: () => Extend,
  Filterable: () => Filterable,
  FilterableWithIndex: () => FilterableWithIndex,
  Foldable: () => Foldable,
  FoldableWithIndex: () => FoldableWithIndex,
  FromEither: () => FromEither,
  Functor: () => Functor,
  FunctorWithIndex: () => FunctorWithIndex,
  Monad: () => Monad,
  Pointed: () => Pointed,
  Traversable: () => Traversable,
  TraversableWithIndex: () => TraversableWithIndex,
  URI: () => URI,
  Unfoldable: () => Unfoldable,
  Witherable: () => Witherable,
  Zero: () => Zero,
  alt: () => alt,
  altW: () => altW,
  ap: () => ap,
  apFirst: () => apFirst2,
  apS: () => apS2,
  apSecond: () => apSecond2,
  append: () => append2,
  appendW: () => appendW2,
  array: () => array,
  bind: () => bind2,
  bindTo: () => bindTo2,
  chain: () => chain,
  chainFirst: () => chainFirst2,
  chainRecBreadthFirst: () => chainRecBreadthFirst2,
  chainRecDepthFirst: () => chainRecDepthFirst2,
  chainWithIndex: () => chainWithIndex,
  chop: () => chop2,
  chunksOf: () => chunksOf2,
  compact: () => compact,
  comprehension: () => comprehension,
  concat: () => concat,
  concatW: () => concatW,
  cons: () => cons2,
  copy: () => copy,
  deleteAt: () => deleteAt,
  difference: () => difference,
  dropLeft: () => dropLeft,
  dropLeftWhile: () => dropLeftWhile,
  dropRight: () => dropRight,
  duplicate: () => duplicate,
  elem: () => elem2,
  empty: () => empty,
  every: () => every2,
  exists: () => exists,
  extend: () => extend,
  filter: () => filter,
  filterE: () => filterE2,
  filterMap: () => filterMap,
  filterMapWithIndex: () => filterMapWithIndex,
  filterWithIndex: () => filterWithIndex,
  findFirst: () => findFirst2,
  findFirstMap: () => findFirstMap2,
  findIndex: () => findIndex2,
  findLast: () => findLast2,
  findLastIndex: () => findLastIndex2,
  findLastMap: () => findLastMap2,
  flap: () => flap2,
  flatMap: () => flatMap,
  flatten: () => flatten,
  foldLeft: () => foldLeft,
  foldMap: () => foldMap2,
  foldMapWithIndex: () => foldMapWithIndex2,
  foldRight: () => foldRight,
  fromEither: () => fromEither,
  fromEitherK: () => fromEitherK2,
  fromOption: () => fromOption,
  fromOptionK: () => fromOptionK,
  fromPredicate: () => fromPredicate,
  getDifferenceMagma: () => getDifferenceMagma,
  getEq: () => getEq2,
  getIntersectionSemigroup: () => getIntersectionSemigroup,
  getMonoid: () => getMonoid,
  getOrd: () => getOrd2,
  getSemigroup: () => getSemigroup,
  getShow: () => getShow2,
  getUnionMonoid: () => getUnionMonoid,
  getUnionSemigroup: () => getUnionSemigroup,
  guard: () => guard2,
  head: () => head3,
  init: () => init2,
  insertAt: () => insertAt,
  intercalate: () => intercalate2,
  intersection: () => intersection,
  intersperse: () => intersperse2,
  isEmpty: () => isEmpty,
  isNonEmpty: () => isNonEmpty2,
  isOutOfBound: () => isOutOfBound2,
  last: () => last3,
  lefts: () => lefts,
  let: () => let_2,
  lookup: () => lookup2,
  makeBy: () => makeBy2,
  map: () => map,
  mapWithIndex: () => mapWithIndex,
  match: () => match,
  matchLeft: () => matchLeft,
  matchLeftW: () => matchLeftW,
  matchRight: () => matchRight,
  matchRightW: () => matchRightW,
  matchW: () => matchW,
  modifyAt: () => modifyAt,
  of: () => of2,
  partition: () => partition,
  partitionMap: () => partitionMap,
  partitionMapWithIndex: () => partitionMapWithIndex,
  partitionWithIndex: () => partitionWithIndex,
  prepend: () => prepend2,
  prependAll: () => prependAll2,
  prependToAll: () => prependToAll,
  prependW: () => prependW2,
  range: () => range2,
  reduce: () => reduce2,
  reduceRight: () => reduceRight2,
  reduceRightWithIndex: () => reduceRightWithIndex2,
  reduceWithIndex: () => reduceWithIndex2,
  replicate: () => replicate,
  reverse: () => reverse,
  rights: () => rights,
  rotate: () => rotate2,
  scanLeft: () => scanLeft,
  scanRight: () => scanRight,
  separate: () => separate,
  sequence: () => sequence,
  size: () => size,
  snoc: () => snoc2,
  some: () => some2,
  sort: () => sort,
  sortBy: () => sortBy2,
  spanLeft: () => spanLeft,
  splitAt: () => splitAt2,
  tail: () => tail2,
  takeLeft: () => takeLeft,
  takeLeftWhile: () => takeLeftWhile,
  takeRight: () => takeRight,
  traverse: () => traverse,
  traverseWithIndex: () => traverseWithIndex,
  unfold: () => unfold,
  union: () => union2,
  uniq: () => uniq2,
  unsafeDeleteAt: () => unsafeDeleteAt,
  unsafeInsertAt: () => unsafeInsertAt2,
  unsafeUpdateAt: () => unsafeUpdateAt2,
  unzip: () => unzip,
  updateAt: () => updateAt,
  wilt: () => wilt,
  wither: () => wither,
  zero: () => zero,
  zip: () => zip,
  zipWith: () => zipWith
});
var isEmpty = (as) => as.length === 0;
var isNonEmpty2 = _chunkGTSB5NLOjs.isNonEmpty;
var prepend2 = _chunkGTSB5NLOjs.prepend;
var prependW2 = _chunkGTSB5NLOjs.prependW;
var append2 = _chunkGTSB5NLOjs.append;
var appendW2 = _chunkGTSB5NLOjs.appendW;
var makeBy2 = (n, f) => n <= 0 ? [] : _chunkGTSB5NLOjs.makeBy.call(void 0, f)(n);
var replicate = (n, a) => makeBy2(n, () => a);
function fromPredicate(predicate) {
  return (a) => predicate(a) ? [a] : [];
}
var fromOption = (ma) => _chunkOTKMOSH2js.isNone.call(void 0, ma) ? [] : [ma.value];
var fromEither = (e) => _chunkOTKMOSH2js.isLeft.call(void 0, e) ? [] : [e.right];
var matchW = (onEmpty, onNonEmpty) => (as) => isNonEmpty2(as) ? onNonEmpty(as) : onEmpty();
var match = matchW;
var matchLeftW = (onEmpty, onNonEmpty) => (as) => isNonEmpty2(as) ? onNonEmpty(_chunkGTSB5NLOjs.head.call(void 0, as), _chunkGTSB5NLOjs.tail.call(void 0, as)) : onEmpty();
var matchLeft = matchLeftW;
var foldLeft = matchLeft;
var matchRightW = (onEmpty, onNonEmpty) => (as) => isNonEmpty2(as) ? onNonEmpty(_chunkGTSB5NLOjs.init.call(void 0, as), _chunkGTSB5NLOjs.last.call(void 0, as)) : onEmpty();
var matchRight = matchRightW;
var foldRight = matchRight;
var chainWithIndex = (f) => (as) => {
  const out = [];
  for (let i = 0; i < as.length; i++) {
    out.push(...f(i, as[i]));
  }
  return out;
};
var scanLeft = (b, f) => (as) => {
  const len = as.length;
  const out = new Array(len + 1);
  out[0] = b;
  for (let i = 0; i < len; i++) {
    out[i + 1] = f(out[i], as[i]);
  }
  return out;
};
var scanRight = (b, f) => (as) => {
  const len = as.length;
  const out = new Array(len + 1);
  out[len] = b;
  for (let i = len - 1; i >= 0; i--) {
    out[i] = f(as[i], out[i + 1]);
  }
  return out;
};
var size = (as) => as.length;
var isOutOfBound2 = _chunkGTSB5NLOjs.isOutOfBound;
var lookup2 = _chunkMMK37YTCjs.lookup;
var head3 = _chunkMMK37YTCjs.head;
var last3 = _chunkMMK37YTCjs.last;
var tail2 = (as) => isNonEmpty2(as) ? _chunkOTKMOSH2js.some.call(void 0, _chunkGTSB5NLOjs.tail.call(void 0, as)) : _chunkOTKMOSH2js.none;
var init2 = (as) => isNonEmpty2(as) ? _chunkOTKMOSH2js.some.call(void 0, _chunkGTSB5NLOjs.init.call(void 0, as)) : _chunkOTKMOSH2js.none;
var takeLeft = (n) => (as) => isOutOfBound2(n, as) ? copy(as) : as.slice(0, n);
var takeRight = (n) => (as) => isOutOfBound2(n, as) ? copy(as) : n === 0 ? [] : as.slice(-n);
function takeLeftWhile(predicate) {
  return (as) => {
    const out = [];
    for (const a of as) {
      if (!predicate(a)) {
        break;
      }
      out.push(a);
    }
    return out;
  };
}
var spanLeftIndex = (as, predicate) => {
  const l = as.length;
  let i = 0;
  for (; i < l; i++) {
    if (!predicate(as[i])) {
      break;
    }
  }
  return i;
};
function spanLeft(predicate) {
  return (as) => {
    const [init3, rest] = splitAt2(spanLeftIndex(as, predicate))(as);
    return { init: init3, rest };
  };
}
var dropLeft = (n) => (as) => n <= 0 || isEmpty(as) ? copy(as) : n >= as.length ? [] : as.slice(n, as.length);
var dropRight = (n) => (as) => n <= 0 || isEmpty(as) ? copy(as) : n >= as.length ? [] : as.slice(0, as.length - n);
function dropLeftWhile(predicate) {
  return (as) => as.slice(spanLeftIndex(as, predicate));
}
var findIndex2 = _chunkMMK37YTCjs.findIndex;
function findFirst2(predicate) {
  return _chunkMMK37YTCjs.findFirst.call(void 0, predicate);
}
var findFirstMap2 = _chunkMMK37YTCjs.findFirstMap;
function findLast2(predicate) {
  return _chunkMMK37YTCjs.findLast.call(void 0, predicate);
}
var findLastMap2 = _chunkMMK37YTCjs.findLastMap;
var findLastIndex2 = _chunkMMK37YTCjs.findLastIndex;
var copy = (as) => as.slice();
var insertAt = (i, a) => (as) => i < 0 || i > as.length ? _chunkOTKMOSH2js.none : _chunkOTKMOSH2js.some.call(void 0, unsafeInsertAt2(i, a, as));
var updateAt = (i, a) => modifyAt(i, () => a);
var deleteAt = (i) => (as) => isOutOfBound2(i, as) ? _chunkOTKMOSH2js.none : _chunkOTKMOSH2js.some.call(void 0, unsafeDeleteAt(i, as));
var modifyAt = (i, f) => (as) => isOutOfBound2(i, as) ? _chunkOTKMOSH2js.none : _chunkOTKMOSH2js.some.call(void 0, unsafeUpdateAt2(i, f(as[i]), as));
var reverse = (as) => isEmpty(as) ? [] : as.slice().reverse();
var rights = (as) => {
  const r = [];
  for (let i = 0; i < as.length; i++) {
    const a = as[i];
    if (a._tag === "Right") {
      r.push(a.right);
    }
  }
  return r;
};
var lefts = (as) => {
  const r = [];
  for (let i = 0; i < as.length; i++) {
    const a = as[i];
    if (a._tag === "Left") {
      r.push(a.left);
    }
  }
  return r;
};
var sort = (O) => (as) => as.length <= 1 ? copy(as) : as.slice().sort(O.compare);
var zipWith = (fa, fb, f) => {
  const fc = [];
  const len = Math.min(fa.length, fb.length);
  for (let i = 0; i < len; i++) {
    fc[i] = f(fa[i], fb[i]);
  }
  return fc;
};
function zip(as, bs) {
  if (bs === void 0) {
    return (bs2) => zip(bs2, as);
  }
  return zipWith(as, bs, (a, b) => [a, b]);
}
var unzip = (as) => {
  const fa = [];
  const fb = [];
  for (let i = 0; i < as.length; i++) {
    fa[i] = as[i][0];
    fb[i] = as[i][1];
  }
  return [fa, fb];
};
var prependAll2 = (middle) => {
  const f = _chunkGTSB5NLOjs.prependAll.call(void 0, middle);
  return (as) => isNonEmpty2(as) ? f(as) : [];
};
var intersperse2 = (middle) => {
  const f = _chunkGTSB5NLOjs.intersperse.call(void 0, middle);
  return (as) => isNonEmpty2(as) ? f(as) : copy(as);
};
var rotate2 = (n) => {
  const f = _chunkGTSB5NLOjs.rotate.call(void 0, n);
  return (as) => isNonEmpty2(as) ? f(as) : copy(as);
};
var elem2 = _chunkMMK37YTCjs.elem;
var uniq2 = (E) => {
  const f = _chunkGTSB5NLOjs.uniq.call(void 0, E);
  return (as) => isNonEmpty2(as) ? f(as) : copy(as);
};
var sortBy2 = (ords) => {
  const f = _chunkGTSB5NLOjs.sortBy.call(void 0, ords);
  return (as) => isNonEmpty2(as) ? f(as) : copy(as);
};
var chop2 = (f) => {
  const g = _chunkGTSB5NLOjs.chop.call(void 0, f);
  return (as) => isNonEmpty2(as) ? g(as) : [];
};
var splitAt2 = (n) => (as) => n >= 1 && isNonEmpty2(as) ? _chunkGTSB5NLOjs.splitAt.call(void 0, n)(as) : isEmpty(as) ? [copy(as), []] : [[], copy(as)];
var chunksOf2 = (n) => {
  const f = _chunkGTSB5NLOjs.chunksOf.call(void 0, n);
  return (as) => isNonEmpty2(as) ? f(as) : [];
};
var fromOptionK = (f) => (...a) => fromOption(f(...a));
function comprehension(input, f, g = () => true) {
  const go = (scope, input2) => isNonEmpty2(input2) ? flatMap(_chunkGTSB5NLOjs.head.call(void 0, input2), (a) => go(_chunkSQA7G4TEjs.pipe.call(void 0, scope, append2(a)), _chunkGTSB5NLOjs.tail.call(void 0, input2))) : g(...scope) ? [f(...scope)] : [];
  return go([], input);
}
var concatW = (second) => (first) => isEmpty(first) ? copy(second) : isEmpty(second) ? copy(first) : first.concat(second);
var concat = concatW;
function union2(E) {
  const unionE = _chunkGTSB5NLOjs.union.call(void 0, E);
  return (first, second) => {
    if (second === void 0) {
      const unionE2 = union2(E);
      return (second2) => unionE2(second2, first);
    }
    return isNonEmpty2(first) && isNonEmpty2(second) ? unionE(second)(first) : isNonEmpty2(first) ? copy(first) : copy(second);
  };
}
function intersection(E) {
  const elemE = elem2(E);
  return (xs, ys) => {
    if (ys === void 0) {
      const intersectionE = intersection(E);
      return (ys2) => intersectionE(ys2, xs);
    }
    return xs.filter((a) => elemE(a, ys));
  };
}
function difference(E) {
  const elemE = elem2(E);
  return (xs, ys) => {
    if (ys === void 0) {
      const differenceE = difference(E);
      return (ys2) => differenceE(ys2, xs);
    }
    return xs.filter((a) => !elemE(a, ys));
  };
}
var _map = (fa, f) => _chunkSQA7G4TEjs.pipe.call(void 0, fa, map(f));
var _mapWithIndex = (fa, f) => _chunkSQA7G4TEjs.pipe.call(void 0, fa, mapWithIndex(f));
var _ap = (fab, fa) => _chunkSQA7G4TEjs.pipe.call(void 0, fab, ap(fa));
var _filter = (fa, predicate) => _chunkSQA7G4TEjs.pipe.call(void 0, fa, filter(predicate));
var _filterMap = (fa, f) => _chunkSQA7G4TEjs.pipe.call(void 0, fa, filterMap(f));
var _partition = (fa, predicate) => _chunkSQA7G4TEjs.pipe.call(void 0, fa, partition(predicate));
var _partitionMap = (fa, f) => _chunkSQA7G4TEjs.pipe.call(void 0, fa, partitionMap(f));
var _partitionWithIndex = (fa, predicateWithIndex) => _chunkSQA7G4TEjs.pipe.call(void 0, fa, partitionWithIndex(predicateWithIndex));
var _partitionMapWithIndex = (fa, f) => _chunkSQA7G4TEjs.pipe.call(void 0, fa, partitionMapWithIndex(f));
var _alt = (fa, that) => _chunkSQA7G4TEjs.pipe.call(void 0, fa, alt(that));
var _reduce = (fa, b, f) => _chunkSQA7G4TEjs.pipe.call(void 0, fa, reduce2(b, f));
var _foldMap = (M) => {
  const foldMapM = foldMap2(M);
  return (fa, f) => _chunkSQA7G4TEjs.pipe.call(void 0, fa, foldMapM(f));
};
var _reduceRight = (fa, b, f) => _chunkSQA7G4TEjs.pipe.call(void 0, fa, reduceRight2(b, f));
var _reduceWithIndex = (fa, b, f) => _chunkSQA7G4TEjs.pipe.call(void 0, fa, reduceWithIndex2(b, f));
var _foldMapWithIndex = (M) => {
  const foldMapWithIndexM = foldMapWithIndex2(M);
  return (fa, f) => _chunkSQA7G4TEjs.pipe.call(void 0, fa, foldMapWithIndexM(f));
};
var _reduceRightWithIndex = (fa, b, f) => _chunkSQA7G4TEjs.pipe.call(void 0, fa, reduceRightWithIndex2(b, f));
var _filterMapWithIndex = (fa, f) => _chunkSQA7G4TEjs.pipe.call(void 0, fa, filterMapWithIndex(f));
var _filterWithIndex = (fa, predicateWithIndex) => _chunkSQA7G4TEjs.pipe.call(void 0, fa, filterWithIndex(predicateWithIndex));
var _extend = (fa, f) => _chunkSQA7G4TEjs.pipe.call(void 0, fa, extend(f));
var _traverse = (F) => {
  const traverseF = traverse(F);
  return (ta, f) => _chunkSQA7G4TEjs.pipe.call(void 0, ta, traverseF(f));
};
var _traverseWithIndex = (F) => {
  const traverseWithIndexF = traverseWithIndex(F);
  return (ta, f) => _chunkSQA7G4TEjs.pipe.call(void 0, ta, traverseWithIndexF(f));
};
var _chainRecDepthFirst2 = _chunkMMK37YTCjs._chainRecDepthFirst;
var _chainRecBreadthFirst2 = _chunkMMK37YTCjs._chainRecBreadthFirst;
var of2 = _chunkGTSB5NLOjs.of;
var zero = () => [];
var map = (f) => (fa) => fa.map((a) => f(a));
var ap = (fa) => flatMap((f) => _chunkSQA7G4TEjs.pipe.call(void 0, fa, map(f)));
var flatMap = /* @__PURE__ */ _chunkSQA7G4TEjs.dual.call(void 0, 
  2,
  (ma, f) => _chunkSQA7G4TEjs.pipe.call(void 0, 
    ma,
    chainWithIndex((i, a) => f(a, i))
  )
);
var flatten = /* @__PURE__ */ flatMap(_chunkSQA7G4TEjs.identity);
var mapWithIndex = (f) => (fa) => fa.map((a, i) => f(i, a));
var filterMapWithIndex = (f) => (fa) => {
  const out = [];
  for (let i = 0; i < fa.length; i++) {
    const optionB = f(i, fa[i]);
    if (_chunkOTKMOSH2js.isSome.call(void 0, optionB)) {
      out.push(optionB.value);
    }
  }
  return out;
};
var filterMap = (f) => filterMapWithIndex((_, a) => f(a));
var compact = /* @__PURE__ */ filterMap(_chunkSQA7G4TEjs.identity);
var separate = (fa) => {
  const left = [];
  const right = [];
  for (const e of fa) {
    if (e._tag === "Left") {
      left.push(e.left);
    } else {
      right.push(e.right);
    }
  }
  return _chunkT4ZJ6CA2js.separated.call(void 0, left, right);
};
var filter = (predicate) => (as) => as.filter(predicate);
var partition = (predicate) => partitionWithIndex((_, a) => predicate(a));
var partitionWithIndex = (predicateWithIndex) => (as) => {
  const left = [];
  const right = [];
  for (let i = 0; i < as.length; i++) {
    const b = as[i];
    if (predicateWithIndex(i, b)) {
      right.push(b);
    } else {
      left.push(b);
    }
  }
  return _chunkT4ZJ6CA2js.separated.call(void 0, left, right);
};
var partitionMap = (f) => partitionMapWithIndex((_, a) => f(a));
var partitionMapWithIndex = (f) => (fa) => {
  const left = [];
  const right = [];
  for (let i = 0; i < fa.length; i++) {
    const e = f(i, fa[i]);
    if (e._tag === "Left") {
      left.push(e.left);
    } else {
      right.push(e.right);
    }
  }
  return _chunkT4ZJ6CA2js.separated.call(void 0, left, right);
};
var altW = (that) => (fa) => fa.concat(that());
var alt = altW;
var filterWithIndex = (predicateWithIndex) => (as) => as.filter((b, i) => predicateWithIndex(i, b));
var extend = (f) => (wa) => wa.map((_, i) => f(wa.slice(i)));
var duplicate = /* @__PURE__ */ extend(_chunkSQA7G4TEjs.identity);
var foldMap2 = _chunkMMK37YTCjs.foldMap;
var foldMapWithIndex2 = _chunkMMK37YTCjs.foldMapWithIndex;
var reduce2 = _chunkMMK37YTCjs.reduce;
var reduceWithIndex2 = _chunkMMK37YTCjs.reduceWithIndex;
var reduceRight2 = _chunkMMK37YTCjs.reduceRight;
var reduceRightWithIndex2 = _chunkMMK37YTCjs.reduceRightWithIndex;
var traverse = (F) => {
  const traverseWithIndexF = traverseWithIndex(F);
  return (f) => traverseWithIndexF((_, a) => f(a));
};
var sequence = (F) => (ta) => {
  return _reduce(
    ta,
    F.of(zero()),
    (fas, fa) => F.ap(
      F.map(fas, (as) => (a) => _chunkSQA7G4TEjs.pipe.call(void 0, as, append2(a))),
      fa
    )
  );
};
var traverseWithIndex = (F) => (f) => reduceWithIndex2(
  F.of(zero()),
  (i, fbs, a) => F.ap(
    F.map(fbs, (bs) => (b) => _chunkSQA7G4TEjs.pipe.call(void 0, bs, append2(b))),
    f(i, a)
  )
);
var wither = (F) => {
  const _witherF = _wither(F);
  return (f) => (fa) => _witherF(fa, f);
};
var wilt = (F) => {
  const _wiltF = _wilt(F);
  return (f) => (fa) => _wiltF(fa, f);
};
var unfold = (b, f) => {
  const out = [];
  let bb = b;
  while (true) {
    const mt = f(bb);
    if (_chunkOTKMOSH2js.isSome.call(void 0, mt)) {
      const [a, b2] = mt.value;
      out.push(a);
      bb = b2;
    } else {
      break;
    }
  }
  return out;
};
var URI = "Array";
var getShow2 = _chunkMMK37YTCjs.getShow;
var getSemigroup = () => ({
  concat: (first, second) => first.concat(second)
});
var getMonoid = () => ({
  concat: getSemigroup().concat,
  empty: []
});
var getEq2 = _chunkMMK37YTCjs.getEq;
var getOrd2 = _chunkMMK37YTCjs.getOrd;
var getUnionSemigroup = (E) => {
  const unionE = union2(E);
  return {
    concat: (first, second) => unionE(second)(first)
  };
};
var getUnionMonoid = (E) => ({
  concat: getUnionSemigroup(E).concat,
  empty: []
});
var getIntersectionSemigroup = (E) => {
  const intersectionE = intersection(E);
  return {
    concat: (first, second) => intersectionE(second)(first)
  };
};
var getDifferenceMagma = (E) => {
  const differenceE = difference(E);
  return {
    concat: (first, second) => differenceE(second)(first)
  };
};
var Functor = {
  URI,
  map: _map
};
var flap2 = /* @__PURE__ */ _chunk7K74W2G3js.flap.call(void 0, Functor);
var Pointed = {
  URI,
  of: of2
};
var FunctorWithIndex = {
  URI,
  map: _map,
  mapWithIndex: _mapWithIndex
};
var Apply = {
  URI,
  map: _map,
  ap: _ap
};
var apFirst2 = /* @__PURE__ */ _chunkQ2LZCTWPjs.apFirst.call(void 0, Apply);
var apSecond2 = /* @__PURE__ */ _chunkQ2LZCTWPjs.apSecond.call(void 0, Apply);
var Applicative = {
  URI,
  map: _map,
  ap: _ap,
  of: of2
};
var Chain = {
  URI,
  map: _map,
  ap: _ap,
  chain: flatMap
};
var chainFirst2 = /* @__PURE__ */ _chunkEBISTSVAjs.chainFirst.call(void 0, Chain);
var Monad = {
  URI,
  map: _map,
  ap: _ap,
  of: of2,
  chain: flatMap
};
var Unfoldable = {
  URI,
  unfold
};
var Alt = {
  URI,
  map: _map,
  alt: _alt
};
var Zero = {
  URI,
  zero
};
var guard2 = /* @__PURE__ */ _chunkD6EN5A4Bjs.guard.call(void 0, Zero, Pointed);
var Alternative = {
  URI,
  map: _map,
  ap: _ap,
  of: of2,
  alt: _alt,
  zero
};
var Extend = {
  URI,
  map: _map,
  extend: _extend
};
var Compactable = {
  URI,
  compact,
  separate
};
var Filterable = {
  URI,
  map: _map,
  compact,
  separate,
  filter: _filter,
  filterMap: _filterMap,
  partition: _partition,
  partitionMap: _partitionMap
};
var FilterableWithIndex = {
  URI,
  map: _map,
  mapWithIndex: _mapWithIndex,
  compact,
  separate,
  filter: _filter,
  filterMap: _filterMap,
  partition: _partition,
  partitionMap: _partitionMap,
  partitionMapWithIndex: _partitionMapWithIndex,
  partitionWithIndex: _partitionWithIndex,
  filterMapWithIndex: _filterMapWithIndex,
  filterWithIndex: _filterWithIndex
};
var Foldable = {
  URI,
  reduce: _reduce,
  foldMap: _foldMap,
  reduceRight: _reduceRight
};
var FoldableWithIndex = {
  URI,
  reduce: _reduce,
  foldMap: _foldMap,
  reduceRight: _reduceRight,
  reduceWithIndex: _reduceWithIndex,
  foldMapWithIndex: _foldMapWithIndex,
  reduceRightWithIndex: _reduceRightWithIndex
};
var Traversable = {
  URI,
  map: _map,
  reduce: _reduce,
  foldMap: _foldMap,
  reduceRight: _reduceRight,
  traverse: _traverse,
  sequence
};
var TraversableWithIndex = {
  URI,
  map: _map,
  mapWithIndex: _mapWithIndex,
  reduce: _reduce,
  foldMap: _foldMap,
  reduceRight: _reduceRight,
  reduceWithIndex: _reduceWithIndex,
  foldMapWithIndex: _foldMapWithIndex,
  reduceRightWithIndex: _reduceRightWithIndex,
  traverse: _traverse,
  sequence,
  traverseWithIndex: _traverseWithIndex
};
var _wither = /* @__PURE__ */ _chunkUNAIGMDHjs.witherDefault.call(void 0, Traversable, Compactable);
var _wilt = /* @__PURE__ */ _chunkUNAIGMDHjs.wiltDefault.call(void 0, Traversable, Compactable);
var Witherable = {
  URI,
  map: _map,
  compact,
  separate,
  filter: _filter,
  filterMap: _filterMap,
  partition: _partition,
  partitionMap: _partitionMap,
  reduce: _reduce,
  foldMap: _foldMap,
  reduceRight: _reduceRight,
  traverse: _traverse,
  sequence,
  wither: _wither,
  wilt: _wilt
};
var chainRecDepthFirst2 = _chunkMMK37YTCjs.chainRecDepthFirst;
var ChainRecDepthFirst = {
  URI,
  map: _map,
  ap: _ap,
  chain: flatMap,
  chainRec: _chainRecDepthFirst2
};
var chainRecBreadthFirst2 = _chunkMMK37YTCjs.chainRecBreadthFirst;
var ChainRecBreadthFirst = {
  URI,
  map: _map,
  ap: _ap,
  chain: flatMap,
  chainRec: _chainRecBreadthFirst2
};
var filterE2 = /* @__PURE__ */ _chunkUNAIGMDHjs.filterE.call(void 0, Witherable);
var FromEither = {
  URI,
  fromEither
};
var fromEitherK2 = /* @__PURE__ */ _chunkR2MJP25Ojs.fromEitherK.call(void 0, FromEither);
var unsafeInsertAt2 = _chunkGTSB5NLOjs.unsafeInsertAt;
var unsafeUpdateAt2 = (i, a, as) => isNonEmpty2(as) ? _chunkGTSB5NLOjs.unsafeUpdateAt.call(void 0, i, a, as) : [];
var unsafeDeleteAt = (i, as) => {
  const xs = as.slice();
  xs.splice(i, 1);
  return xs;
};
var every2 = _chunkMMK37YTCjs.every;
var some2 = (predicate) => (as) => as.some(predicate);
var exists = some2;
var intercalate2 = _chunkMMK37YTCjs.intercalate;
var Do = /* @__PURE__ */ of2(_chunkOTKMOSH2js.emptyRecord);
var bindTo2 = /* @__PURE__ */ _chunk7K74W2G3js.bindTo.call(void 0, Functor);
var let_2 = /* @__PURE__ */ _chunk7K74W2G3js.let_.call(void 0, Functor);
var bind2 = /* @__PURE__ */ _chunkEBISTSVAjs.bind.call(void 0, Chain);
var apS2 = /* @__PURE__ */ _chunkQ2LZCTWPjs.apS.call(void 0, Apply);
var chain = flatMap;
var range2 = _chunkGTSB5NLOjs.range;
var empty = [];
var cons2 = _chunkGTSB5NLOjs.cons;
var snoc2 = _chunkGTSB5NLOjs.snoc;
var prependToAll = prependAll2;
var array = {
  URI,
  compact,
  separate,
  map: _map,
  ap: _ap,
  of: of2,
  chain: flatMap,
  filter: _filter,
  filterMap: _filterMap,
  partition: _partition,
  partitionMap: _partitionMap,
  mapWithIndex: _mapWithIndex,
  partitionMapWithIndex: _partitionMapWithIndex,
  partitionWithIndex: _partitionWithIndex,
  filterMapWithIndex: _filterMapWithIndex,
  filterWithIndex: _filterWithIndex,
  alt: _alt,
  zero,
  unfold,
  reduce: _reduce,
  foldMap: _foldMap,
  reduceRight: _reduceRight,
  traverse: _traverse,
  sequence,
  reduceWithIndex: _reduceWithIndex,
  foldMapWithIndex: _foldMapWithIndex,
  reduceRightWithIndex: _reduceRightWithIndex,
  traverseWithIndex: _traverseWithIndex,
  extend: _extend,
  wither: _wither,
  wilt: _wilt
};







































































































































































exports.isEmpty = isEmpty; exports.isNonEmpty = isNonEmpty2; exports.prepend = prepend2; exports.prependW = prependW2; exports.append = append2; exports.appendW = appendW2; exports.makeBy = makeBy2; exports.replicate = replicate; exports.fromPredicate = fromPredicate; exports.fromOption = fromOption; exports.fromEither = fromEither; exports.matchW = matchW; exports.match = match; exports.matchLeftW = matchLeftW; exports.matchLeft = matchLeft; exports.foldLeft = foldLeft; exports.matchRightW = matchRightW; exports.matchRight = matchRight; exports.foldRight = foldRight; exports.chainWithIndex = chainWithIndex; exports.scanLeft = scanLeft; exports.scanRight = scanRight; exports.size = size; exports.isOutOfBound = isOutOfBound2; exports.lookup = lookup2; exports.head = head3; exports.last = last3; exports.tail = tail2; exports.init = init2; exports.takeLeft = takeLeft; exports.takeRight = takeRight; exports.takeLeftWhile = takeLeftWhile; exports.spanLeft = spanLeft; exports.dropLeft = dropLeft; exports.dropRight = dropRight; exports.dropLeftWhile = dropLeftWhile; exports.findIndex = findIndex2; exports.findFirst = findFirst2; exports.findFirstMap = findFirstMap2; exports.findLast = findLast2; exports.findLastMap = findLastMap2; exports.findLastIndex = findLastIndex2; exports.copy = copy; exports.insertAt = insertAt; exports.updateAt = updateAt; exports.deleteAt = deleteAt; exports.modifyAt = modifyAt; exports.reverse = reverse; exports.rights = rights; exports.lefts = lefts; exports.sort = sort; exports.zipWith = zipWith; exports.zip = zip; exports.unzip = unzip; exports.prependAll = prependAll2; exports.intersperse = intersperse2; exports.rotate = rotate2; exports.elem = elem2; exports.uniq = uniq2; exports.sortBy = sortBy2; exports.chop = chop2; exports.splitAt = splitAt2; exports.chunksOf = chunksOf2; exports.fromOptionK = fromOptionK; exports.comprehension = comprehension; exports.concatW = concatW; exports.concat = concat; exports.union = union2; exports.intersection = intersection; exports.difference = difference; exports.of = of2; exports.zero = zero; exports.map = map; exports.ap = ap; exports.flatMap = flatMap; exports.flatten = flatten; exports.mapWithIndex = mapWithIndex; exports.filterMapWithIndex = filterMapWithIndex; exports.filterMap = filterMap; exports.compact = compact; exports.separate = separate; exports.filter = filter; exports.partition = partition; exports.partitionWithIndex = partitionWithIndex; exports.partitionMap = partitionMap; exports.partitionMapWithIndex = partitionMapWithIndex; exports.altW = altW; exports.alt = alt; exports.filterWithIndex = filterWithIndex; exports.extend = extend; exports.duplicate = duplicate; exports.foldMap = foldMap2; exports.foldMapWithIndex = foldMapWithIndex2; exports.reduce = reduce2; exports.reduceWithIndex = reduceWithIndex2; exports.reduceRight = reduceRight2; exports.reduceRightWithIndex = reduceRightWithIndex2; exports.traverse = traverse; exports.sequence = sequence; exports.traverseWithIndex = traverseWithIndex; exports.wither = wither; exports.wilt = wilt; exports.unfold = unfold; exports.URI = URI; exports.getShow = getShow2; exports.getSemigroup = getSemigroup; exports.getMonoid = getMonoid; exports.getEq = getEq2; exports.getOrd = getOrd2; exports.getUnionSemigroup = getUnionSemigroup; exports.getUnionMonoid = getUnionMonoid; exports.getIntersectionSemigroup = getIntersectionSemigroup; exports.getDifferenceMagma = getDifferenceMagma; exports.Functor = Functor; exports.flap = flap2; exports.Pointed = Pointed; exports.FunctorWithIndex = FunctorWithIndex; exports.Apply = Apply; exports.apFirst = apFirst2; exports.apSecond = apSecond2; exports.Applicative = Applicative; exports.Chain = Chain; exports.chainFirst = chainFirst2; exports.Monad = Monad; exports.Unfoldable = Unfoldable; exports.Alt = Alt; exports.Zero = Zero; exports.guard = guard2; exports.Alternative = Alternative; exports.Extend = Extend; exports.Compactable = Compactable; exports.Filterable = Filterable; exports.FilterableWithIndex = FilterableWithIndex; exports.Foldable = Foldable; exports.FoldableWithIndex = FoldableWithIndex; exports.Traversable = Traversable; exports.TraversableWithIndex = TraversableWithIndex; exports.Witherable = Witherable; exports.chainRecDepthFirst = chainRecDepthFirst2; exports.ChainRecDepthFirst = ChainRecDepthFirst; exports.chainRecBreadthFirst = chainRecBreadthFirst2; exports.ChainRecBreadthFirst = ChainRecBreadthFirst; exports.filterE = filterE2; exports.FromEither = FromEither; exports.fromEitherK = fromEitherK2; exports.unsafeInsertAt = unsafeInsertAt2; exports.unsafeUpdateAt = unsafeUpdateAt2; exports.unsafeDeleteAt = unsafeDeleteAt; exports.every = every2; exports.some = some2; exports.exists = exists; exports.intercalate = intercalate2; exports.Do = Do; exports.bindTo = bindTo2; exports.let_ = let_2; exports.bind = bind2; exports.apS = apS2; exports.chain = chain; exports.range = range2; exports.empty = empty; exports.cons = cons2; exports.snoc = snoc2; exports.prependToAll = prependToAll; exports.array = array; exports.Array_exports = Array_exports;
