net.akehurst.language-agl-processor
Version:
923 lines (921 loc) • 25.7 kB
JavaScript
import {
LinkedHashMap1zhqxkxv3xnkl as LinkedHashMap,
Unit_instance104q5opgivhr8 as Unit_instance,
asJsReadonlyMapView265fi57brx2p5 as asJsReadonlyMapView,
protoOf180f3jzyo7rfj as protoOf,
KtMap140uvy3s5zad8 as KtMap,
initMetadataForClassbxx6q50dy2s7 as initMetadataForClass,
VOID7hggqo3abtya as VOID,
HashMap1a0ld5kgwhmhv as HashMap,
Exceptiondt2hlxn7j7vw as Exception,
asJsMapView1l954zxx5dm35 as asJsMapView,
KtMutableMap1kqeifoi36kpz as KtMutableMap,
KtList3hktaavzmj137 as KtList,
initMetadataForInterface1egvbzx539z91 as initMetadataForInterface,
AbstractList3ck35puwbp1e9 as AbstractList,
ArrayList3it5z8td81qkl as ArrayList,
checkIndexOverflow3frtmheghr0th as checkIndexOverflow,
THROW_CCE2g6jy02ryeudk as THROW_CCE,
isInterface3d6p8outrmvmk as isInterface,
toString30pk9tzaqopn as toString,
joinToString1cxrrlmo0chqs as joinToString,
last1vo29oleiqj36 as last,
lastOrNull1aq5oz189qoe1 as lastOrNull,
get_lastIndex1yw0x4k50k51w as get_lastIndex,
KtSetjrjc7fhfd6b9 as KtSet,
toMutableSetjdpdbr9jsqq8 as toMutableSet,
Collection1k04j3hzsbod0 as Collection,
toList383f556t1dixk as toList,
toMutableList20rdgwi7d3cwi as toMutableList,
addAll1k27qatfgp3k5 as addAll,
createThis2j2avj17cvnv2 as createThis,
LinkedHashSet2tkztfx86kyx2 as LinkedHashSet,
IndexOutOfBoundsException1qfr429iumro0 as IndexOutOfBoundsException,
equals2au1ep9vhcato as equals,
asJsReadonlySetView1283018se66no as asJsReadonlySetView,
asJsSetView3u4hrma1rrcjl as asJsSetView,
KtMutableSetwuwn7k5m570a as KtMutableSet,
hashCodeq5arwsb9dgti as hashCode,
FunctionAdapter3lcrrz3moet5b as FunctionAdapter,
Comparator2b3maoeh98xtg as Comparator,
sortedWith2csnbbb21k0lg as sortedWith,
toString1pkumu07cwy4m as toString_0,
removeLastOrNull3odnlbetbttd4 as removeLastOrNull,
Iterable1y3qizuf89iou as Iterable,
IllegalStateExceptionkoljg5n0nrlr as IllegalStateException,
HashSet2dzve9y63nf0v as HashSet,
toSet2orjxp16sotqu as toSet,
charSequenceLength3278n89t01tmv as charSequenceLength,
charSequenceGet1vxk1y5n17t1z as charSequenceGet,
toString35i91qxh73cps as toString_1,
titlecase36e9fbud5gg4t as titlecase,
isLowerCase16nv9n55l9laa as isLowerCase,
emptyMapr06gerzljqtm as emptyMap,
} from './kotlin-kotlin-stdlib.mjs';
//region block: imports
var imul = Math.imul;
//endregion
//region block: pre-declaration
class LazyMap {
constructor(accessor) {
this.yj_1 = accessor;
var tmp = this;
// Inline function 'kotlin.collections.mutableMapOf' call
tmp.zj_1 = LinkedHashMap.l4();
}
z2(key) {
var tmp;
if (this.zj_1.x2(key)) {
tmp = this.zj_1.z2(key);
} else {
var v = this.yj_1(key);
// Inline function 'kotlin.collections.set' call
this.zj_1.r2(key, v);
tmp = v;
}
return tmp;
}
w2() {
return this.zj_1.w2();
}
u2() {
return this.zj_1.u2();
}
v() {
return this.zj_1.v();
}
v2() {
return this.zj_1.v2();
}
x2(key) {
return this.zj_1.x2(key);
}
y2(value) {
return this.zj_1.y2(value);
}
a1() {
return this.zj_1.a1();
}
}
class LazyMutableMapNonNull {
constructor(accessor) {
this.ak_1 = accessor;
var tmp = this;
// Inline function 'kotlin.collections.hashMapOf' call
tmp.bk_1 = HashMap.r7();
}
z2(key) {
var tmp;
if (this.bk_1.x2(key)) {
var tmp0_elvis_lhs = this.bk_1.z2(key);
var tmp_0;
if (tmp0_elvis_lhs == null) {
throw Exception.n5('This map should never contain nulls');
} else {
tmp_0 = tmp0_elvis_lhs;
}
tmp = tmp_0;
} else {
var v = this.ak_1(key);
// Inline function 'kotlin.collections.set' call
this.bk_1.r2(key, v);
tmp = v;
}
return tmp;
}
w2() {
return this.bk_1.w2();
}
u2() {
return this.bk_1.u2();
}
v() {
return this.bk_1.v();
}
v2() {
return this.bk_1.v2();
}
x2(key) {
return this.bk_1.x2(key);
}
y2(value) {
return this.bk_1.y2(value);
}
a1() {
return this.bk_1.a1();
}
n2() {
this.bk_1.n2();
}
r2(key, value) {
return this.bk_1.r2(key, value);
}
t2(from) {
this.bk_1.t2(from);
}
s2(key) {
return this.bk_1.s2(key);
}
}
class ListSeparated {}
class ListSeparatedArrayList extends AbstractList {
static gk(elements) {
var $this = this.ag();
$this.fk_1 = elements;
return $this;
}
ek() {
return this.fk_1;
}
v() {
return this.fk_1.v();
}
z(index) {
return this.fk_1.z(index);
}
ck() {
// Inline function 'kotlin.collections.filterIndexed' call
var tmp0 = this.fk_1;
// Inline function 'kotlin.collections.filterIndexedTo' call
var destination = ArrayList.y();
// Inline function 'kotlin.collections.forEachIndexed' call
var index = 0;
var _iterator__ex2g4s = tmp0.s();
while (_iterator__ex2g4s.t()) {
var item = _iterator__ex2g4s.u();
var _unary__edvuaz = index;
index = _unary__edvuaz + 1 | 0;
if ((checkIndexOverflow(_unary__edvuaz) % 2 | 0) === 0) {
destination.r(item);
}
}
var tmp = destination;
return isInterface(tmp, KtList) ? tmp : THROW_CCE();
}
dk() {
// Inline function 'kotlin.collections.filterIndexed' call
var tmp0 = this.fk_1;
// Inline function 'kotlin.collections.filterIndexedTo' call
var destination = ArrayList.y();
// Inline function 'kotlin.collections.forEachIndexed' call
var index = 0;
var _iterator__ex2g4s = tmp0.s();
while (_iterator__ex2g4s.t()) {
var item = _iterator__ex2g4s.u();
var _unary__edvuaz = index;
index = _unary__edvuaz + 1 | 0;
if ((checkIndexOverflow(_unary__edvuaz) % 2 | 0) === 1) {
destination.r(item);
}
}
var tmp = destination;
return isInterface(tmp, KtList) ? tmp : THROW_CCE();
}
}
class MutableQueue {
constructor() {
var tmp = this;
// Inline function 'kotlin.collections.mutableListOf' call
tmp.hk_1 = ArrayList.y();
}
ik() {
return !(this.hk_1.v() === 0);
}
jk(item) {
this.hk_1.r(item);
}
kk() {
return this.hk_1.q2(0);
}
toString() {
return joinToString(this.hk_1, ',', VOID, VOID, VOID, VOID, MutableQueue$toString$lambda);
}
}
class MutableStack {
constructor() {
var tmp = this;
// Inline function 'kotlin.collections.mutableListOf' call
tmp.lk_1 = ArrayList.y();
}
v() {
return this.lk_1.v();
}
mk() {
return this.lk_1.v() === 0;
}
ik() {
return !(this.lk_1.v() === 0);
}
ek() {
return this.lk_1;
}
nk(item) {
this.lk_1.r(item);
}
ok() {
return last(this.lk_1);
}
pk() {
return lastOrNull(this.lk_1);
}
qk(n) {
return this.lk_1.j2(this.lk_1.v() - n | 0, this.lk_1.v());
}
rk() {
return this.lk_1.q2(get_lastIndex(this.lk_1));
}
sk(n) {
// Inline function 'kotlin.collections.mutableListOf' call
var removed = ArrayList.y();
var inductionVariable = 0;
if (inductionVariable < n)
do {
var i = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
removed.r(this.lk_1.q2(get_lastIndex(this.lk_1)));
}
while (inductionVariable < n);
return removed;
}
}
class OrderedSet {}
class MutableOrderedSetImpl {
static xk() {
var $this = createThis(this);
init_net_akehurst_language_collections_MutableOrderedSetImpl($this);
$this.tk_1 = LinkedHashSet.b1();
return $this;
}
static uk(collection) {
var $this = createThis(this);
init_net_akehurst_language_collections_MutableOrderedSetImpl($this);
$this.tk_1 = LinkedHashSet.c1(collection);
return $this;
}
z(index) {
// Inline function 'kotlin.collections.forEachIndexed' call
var index_0 = 0;
var _iterator__ex2g4s = this.tk_1.s();
while (_iterator__ex2g4s.t()) {
var item = _iterator__ex2g4s.u();
var _unary__edvuaz = index_0;
index_0 = _unary__edvuaz + 1 | 0;
if (index === checkIndexOverflow(_unary__edvuaz))
return item;
}
throw IndexOutOfBoundsException.kc('' + index);
}
v() {
return this.tk_1.v();
}
s() {
return this.tk_1.s();
}
a1() {
return this.tk_1.a1();
}
e1(element) {
return this.tk_1.e1(element);
}
f2(elements) {
return this.tk_1.f2(elements);
}
r(element) {
return this.tk_1.r(element);
}
x(elements) {
return this.tk_1.x(elements);
}
k2(element) {
return this.tk_1.k2(element);
}
q1(elements) {
return this.tk_1.q1(elements);
}
m2(elements) {
return this.tk_1.m2(elements);
}
n2() {
this.tk_1.n2();
}
equals(other) {
var tmp;
if (!(!(other == null) ? isInterface(other, OrderedSet) : false)) {
tmp = false;
} else {
if (!(other.v() === this.v())) {
tmp = false;
} else {
var inductionVariable = 0;
var last = this.v();
if (inductionVariable < last)
do {
var i = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
if (!equals(this.z(i), other.z(i)))
return false;
}
while (inductionVariable < last);
tmp = true;
}
}
return tmp;
}
hashCode() {
return this.tk_1.hashCode();
}
toString() {
return this.tk_1.toString();
}
}
class OrderedSetImpl {
static yk() {
var $this = createThis(this);
init_net_akehurst_language_collections_OrderedSetImpl($this);
$this.vk_1 = LinkedHashSet.b1();
return $this;
}
static wk(collection) {
var $this = createThis(this);
init_net_akehurst_language_collections_OrderedSetImpl($this);
$this.vk_1 = LinkedHashSet.c1(collection);
return $this;
}
z(index) {
// Inline function 'kotlin.collections.forEachIndexed' call
var index_0 = 0;
var _iterator__ex2g4s = this.vk_1.s();
while (_iterator__ex2g4s.t()) {
var item = _iterator__ex2g4s.u();
var _unary__edvuaz = index_0;
index_0 = _unary__edvuaz + 1 | 0;
if (index === checkIndexOverflow(_unary__edvuaz))
return item;
}
throw IndexOutOfBoundsException.kc('' + index);
}
v() {
return this.vk_1.v();
}
s() {
return this.vk_1.s();
}
a1() {
return this.vk_1.a1();
}
e1(element) {
return this.vk_1.e1(element);
}
f2(elements) {
return this.vk_1.f2(elements);
}
equals(other) {
var tmp;
if (!(!(other == null) ? isInterface(other, OrderedSet) : false)) {
tmp = false;
} else {
if (!(other.v() === this.v())) {
tmp = false;
} else {
var inductionVariable = 0;
var last = this.v();
if (inductionVariable <= last)
do {
var i = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
if (!equals(this.z(i), other.z(i)))
return false;
}
while (!(i === last));
tmp = true;
}
}
return tmp;
}
hashCode() {
return this.vk_1.hashCode();
}
toString() {
return this.vk_1.toString();
}
}
class Entry {}
class Entry_0 {
constructor(key, value) {
this.bl_1 = key;
this.cl_1 = value;
}
a3() {
return this.bl_1;
}
b3() {
return this.cl_1;
}
hashCode() {
// Inline function 'kotlin.hashCode' call
var tmp0_safe_receiver = this.bl_1;
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : hashCode(tmp0_safe_receiver);
var tmp$ret$0 = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
var tmp = imul(tmp$ret$0, 31);
// Inline function 'kotlin.hashCode' call
var tmp0_safe_receiver_0 = this.cl_1;
var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : hashCode(tmp0_safe_receiver_0);
return tmp + (tmp1_elvis_lhs_0 == null ? 0 : tmp1_elvis_lhs_0) | 0;
}
equals(other) {
var tmp;
if (!(!(other == null) ? isInterface(other, Entry) : false)) {
tmp = false;
} else {
tmp = (equals(this.bl_1, other.a3()) && equals(this.cl_1, other.b3()));
}
return tmp;
}
toString() {
return toString(this.bl_1) + ' -> ' + toString(this.cl_1);
}
}
class sam$kotlin_Comparator$0 {
constructor(function_0) {
this.el_1 = function_0;
}
wh(a, b) {
return this.el_1(a, b);
}
compare(a, b) {
return this.wh(a, b);
}
w3() {
return this.el_1;
}
equals(other) {
var tmp;
if (!(other == null) ? isInterface(other, Comparator) : false) {
var tmp_0;
if (!(other == null) ? isInterface(other, FunctionAdapter) : false) {
tmp_0 = equals(this.w3(), other.w3());
} else {
tmp_0 = false;
}
tmp = tmp_0;
} else {
tmp = false;
}
return tmp;
}
hashCode() {
return hashCode(this.w3());
}
}
class BinaryHeapComparable$iterator$1 {
constructor(this$0) {
var tmp = this;
var tmp_0 = BinaryHeapComparable$iterator$o$_sorted$lambda(this$0);
tmp.fl_1 = sortedWith(this$0.al_1, new sam$kotlin_Comparator$0(tmp_0));
this.gl_1 = 0;
}
t() {
return this.gl_1 < this.fl_1.v();
}
u() {
// Inline function 'kotlin.also' call
var this_0 = this.fl_1.z(this.gl_1).b3();
this.gl_1 = this.gl_1 + 1 | 0;
return this_0;
}
}
class BinaryHeapComparable {
constructor(comparator) {
this.zk_1 = comparator;
var tmp = this;
// Inline function 'kotlin.collections.mutableListOf' call
tmp.al_1 = ArrayList.y();
}
v() {
return this.al_1.v();
}
hl() {
return this.al_1.v() === 0 ? null : this.al_1.z(0).b3();
}
il(key, value) {
return this.jl(key, value);
}
a1() {
return 0 === this.v();
}
kl() {
return !(0 === this.v());
}
jl(key, value) {
var e = new Entry_0(key, value);
this.al_1.r(e);
upHeap(this, this.al_1.v() - 1 | 0, key);
}
ll() {
var tmp;
if (0 === this.v()) {
tmp = null;
} else {
this.dl(0, this.al_1.v() - 1 | 0);
var oldRoot = removeLastOrNull(this.al_1);
downHeap(this, 0);
tmp = oldRoot == null ? null : oldRoot.b3();
}
return tmp;
}
s2(key) {
var tmp;
if (0 === this.v()) {
tmp = null;
} else if (equals(key, this.al_1.z(0).a3())) {
tmp = this.ll();
} else if (equals(key, last(this.al_1).a3())) {
tmp = this.al_1.q2(this.al_1.v() - 1 | 0).b3();
} else {
var tmp0 = this.al_1;
var tmp$ret$1;
$l$block: {
// Inline function 'kotlin.collections.indexOfFirst' call
var index = 0;
var _iterator__ex2g4s = tmp0.s();
while (_iterator__ex2g4s.t()) {
var item = _iterator__ex2g4s.u();
if (equals(item.a3(), key)) {
tmp$ret$1 = index;
break $l$block;
}
index = index + 1 | 0;
}
tmp$ret$1 = -1;
}
var index_0 = tmp$ret$1;
var tmp_0;
if (index_0 >= 0) {
this.dl(index_0, this.al_1.v() - 1 | 0);
var old = this.al_1.q2(this.al_1.v() - 1 | 0);
downHeap(this, index_0);
tmp_0 = old.b3();
} else {
tmp_0 = null;
}
tmp = tmp_0;
}
return tmp;
}
n2() {
this.al_1.n2();
}
dl(i1, i2) {
var t = this.al_1.z(i1);
this.al_1.o2(i1, this.al_1.z(i2));
this.al_1.o2(i2, t);
}
s() {
return new BinaryHeapComparable$iterator$1(this);
}
toString() {
var tmp;
if (this.v() === 0) {
tmp = '{}';
} else {
tmp = joinToString(this.al_1, '\n', VOID, VOID, VOID, VOID, BinaryHeapComparable$toString$lambda);
}
return tmp;
}
}
//endregion
function lazyMap(accessor) {
return new LazyMap(accessor);
}
function lazyMutableMapNonNull(accessor) {
return new LazyMutableMapNonNull(accessor);
}
function MutableQueue$toString$lambda(it) {
return toString(it);
}
function mutableQueueOf(elements) {
var stack = new MutableQueue();
// Inline function 'kotlin.collections.forEach' call
var inductionVariable = 0;
var last = elements.length;
while (inductionVariable < last) {
var element = elements[inductionVariable];
inductionVariable = inductionVariable + 1 | 0;
stack.jk(element);
}
return stack;
}
function mutableStackOf(elements) {
var stack = new MutableStack();
// Inline function 'kotlin.collections.forEach' call
var inductionVariable = 0;
var last = elements.length;
while (inductionVariable < last) {
var element = elements[inductionVariable];
inductionVariable = inductionVariable + 1 | 0;
stack.nk(element);
}
return stack;
}
function toOrderedSet(_this__u8e3s4) {
var tmp;
if (isInterface(_this__u8e3s4, Collection)) {
tmp = MutableOrderedSetImpl.uk(_this__u8e3s4);
} else {
tmp = MutableOrderedSetImpl.uk(toMutableSet(_this__u8e3s4));
}
return tmp;
}
function orderedSetOf(elements) {
return OrderedSetImpl.wk(toList(elements));
}
function plus(_this__u8e3s4, elements) {
var result = toMutableList(_this__u8e3s4);
addAll(result, elements);
return OrderedSetImpl.wk(result);
}
function toMutableOrderedSet(_this__u8e3s4) {
var tmp;
if (isInterface(_this__u8e3s4, Collection)) {
tmp = MutableOrderedSetImpl.uk(_this__u8e3s4);
} else {
tmp = MutableOrderedSetImpl.uk(toMutableSet(_this__u8e3s4));
}
return tmp;
}
function init_net_akehurst_language_collections_MutableOrderedSetImpl(_this__u8e3s4) {
}
function init_net_akehurst_language_collections_OrderedSetImpl(_this__u8e3s4) {
}
function binaryHeap(comparator) {
return new BinaryHeapComparable(comparator);
}
function BinaryHeapComparable$iterator$o$_sorted$lambda(this$0) {
return (a, b) => this$0.zk_1.compare(b.a3(), a.a3());
}
function parentIndexOf($this, childIndex) {
return (childIndex - 1 | 0) / 2 | 0;
}
function leftChildIndexOf($this, parentIndex) {
return imul(2, parentIndex) + 1 | 0;
}
function rightChildIndexOf($this, parentIndex) {
return imul(2, parentIndex) + 2 | 0;
}
function upHeap($this, index, elementKey) {
var tmp;
if (1 === $this.v()) {
tmp = index;
} else {
var elementIndex = index;
var parentIndex = parentIndexOf($this, elementIndex);
var parentKey = $this.al_1.z(parentIndex).a3();
while (!equals(parentKey, elementKey) && 0 > $this.zk_1.compare(parentKey, elementKey)) {
$this.dl(parentIndex, elementIndex);
elementIndex = parentIndex;
parentIndex = parentIndexOf($this, elementIndex);
parentKey = $this.al_1.z(parentIndex).a3();
}
tmp = elementIndex;
}
return tmp;
}
function downHeap($this, index) {
var leftChildIndex = leftChildIndexOf($this, index);
var rightChildIndex = rightChildIndexOf($this, index);
var smallest = index;
if (leftChildIndex < $this.al_1.v() && 0 < $this.zk_1.compare($this.al_1.z(leftChildIndex).a3(), $this.al_1.z(smallest).a3())) {
smallest = leftChildIndex;
}
if (rightChildIndex < $this.al_1.v() && 0 < $this.zk_1.compare($this.al_1.z(rightChildIndex).a3(), $this.al_1.z(smallest).a3())) {
smallest = rightChildIndex;
}
var tmp;
if (!(smallest === index)) {
$this.dl(index, smallest);
tmp = downHeap($this, smallest);
} else {
tmp = index;
}
return tmp;
}
function BinaryHeapComparable$toString$lambda(it) {
return toString_0(it);
}
function deepClone(_this__u8e3s4) {
var result = HashMap.r7();
var _iterator__ex2g4s = _this__u8e3s4.w2().s();
while (_iterator__ex2g4s.t()) {
var me = _iterator__ex2g4s.u();
var ok = me.a3();
var ov = me.b3();
var tmp;
if (!(ok == null) ? isInterface(ok, KtMap) : false) {
var tmp_0 = deepClone(ok);
tmp = !(tmp_0 == null) ? tmp_0 : THROW_CCE();
} else {
if (!(ok == null) ? isInterface(ok, Collection) : false) {
var tmp_1 = deepClone_0(ok);
tmp = !(tmp_1 == null) ? tmp_1 : THROW_CCE();
} else {
tmp = ok;
}
}
var k = tmp;
var tmp_2;
if (!(ov == null) ? isInterface(ov, KtMap) : false) {
var tmp_3 = deepClone(ov);
tmp_2 = !(tmp_3 == null) ? tmp_3 : THROW_CCE();
} else {
if (!(ov == null) ? isInterface(ov, Collection) : false) {
var tmp_4 = deepClone_0(ov);
tmp_2 = !(tmp_4 == null) ? tmp_4 : THROW_CCE();
} else {
tmp_2 = ov;
}
}
var v = tmp_2;
// Inline function 'kotlin.collections.set' call
result.r2(k, v);
}
return result;
}
function deepClone_0(_this__u8e3s4) {
var tmp;
if (isInterface(_this__u8e3s4, KtSet)) {
tmp = HashSet.m9();
} else {
if (isInterface(_this__u8e3s4, KtList)) {
tmp = ArrayList.y();
} else {
var message = 'Cannot clone unknown type in deepClone';
throw IllegalStateException.v4(toString_0(message));
}
}
var result = tmp;
var _iterator__ex2g4s = _this__u8e3s4.s();
while (_iterator__ex2g4s.t()) {
var oe = _iterator__ex2g4s.u();
var tmp_0;
if (!(oe == null) ? isInterface(oe, Collection) : false) {
var tmp_1 = deepClone_0(oe);
tmp_0 = !(tmp_1 == null) ? tmp_1 : THROW_CCE();
} else {
if (!(oe == null) ? isInterface(oe, KtMap) : false) {
var tmp_2 = deepClone(oe);
tmp_0 = !(tmp_2 == null) ? tmp_2 : THROW_CCE();
} else {
tmp_0 = oe;
}
}
var e = tmp_0;
result.r(e);
}
return result;
}
function transitiveClosure(_this__u8e3s4, accumulate, function_0) {
accumulate = accumulate === VOID ? true : accumulate;
var result = toMutableSet(_this__u8e3s4);
var newThings = toMutableSet(_this__u8e3s4);
var newStuff = true;
while (newStuff) {
var temp = toSet(newThings);
newThings.n2();
var _iterator__ex2g4s = temp.s();
while (_iterator__ex2g4s.t()) {
var nt = _iterator__ex2g4s.u();
var s = function_0(nt);
newThings.x(s);
}
if (accumulate) {
newThings.q1(result);
newStuff = result.x(newThings);
} else {
newStuff = !equals(result, newThings);
result = toMutableSet(newThings);
}
}
return result;
}
function implies(_this__u8e3s4, other) {
return !_this__u8e3s4 || other;
}
function get_capitalise(_this__u8e3s4) {
// Inline function 'kotlin.text.replaceFirstChar' call
var tmp;
// Inline function 'kotlin.text.isNotEmpty' call
if (charSequenceLength(_this__u8e3s4) > 0) {
var it = charSequenceGet(_this__u8e3s4, 0);
var tmp$ret$1 = isLowerCase(it) ? titlecase(it) : toString_1(it);
var tmp_0 = toString_0(tmp$ret$1);
// Inline function 'kotlin.text.substring' call
// Inline function 'kotlin.js.asDynamic' call
tmp = tmp_0 + _this__u8e3s4.substring(1);
} else {
tmp = _this__u8e3s4;
}
return tmp;
}
function clone(_this__u8e3s4) {
var tmp;
if (_this__u8e3s4.a1()) {
tmp = emptyMap();
} else {
if (_this__u8e3s4 instanceof LinkedHashMap) {
var tmp_0 = LinkedHashMap.lb(_this__u8e3s4);
tmp = isInterface(tmp_0, KtMap) ? tmp_0 : THROW_CCE();
} else {
if (_this__u8e3s4 instanceof HashMap) {
var tmp_1 = HashMap.g8(_this__u8e3s4);
tmp = isInterface(tmp_1, KtMap) ? tmp_1 : THROW_CCE();
} else {
var message = 'Trying to clone unknown type';
throw IllegalStateException.v4(toString_0(message));
}
}
}
return tmp;
}
//region block: post-declaration
protoOf(LazyMap).asJsReadonlyMapView = asJsReadonlyMapView;
initMetadataForClass(LazyMap, 'LazyMap', VOID, VOID, [KtMap]);
protoOf(LazyMutableMapNonNull).asJsReadonlyMapView = asJsReadonlyMapView;
protoOf(LazyMutableMapNonNull).asJsMapView = asJsMapView;
initMetadataForClass(LazyMutableMapNonNull, 'LazyMutableMapNonNull', VOID, VOID, [KtMap, KtMutableMap]);
initMetadataForInterface(ListSeparated, 'ListSeparated', VOID, VOID, [KtList]);
initMetadataForClass(ListSeparatedArrayList, 'ListSeparatedArrayList', VOID, VOID, [AbstractList, ListSeparated]);
initMetadataForClass(MutableQueue, 'MutableQueue', MutableQueue);
initMetadataForClass(MutableStack, 'MutableStack', MutableStack);
initMetadataForInterface(OrderedSet, 'OrderedSet', VOID, VOID, [KtSet]);
protoOf(MutableOrderedSetImpl).asJsReadonlySetView = asJsReadonlySetView;
protoOf(MutableOrderedSetImpl).asJsSetView = asJsSetView;
initMetadataForClass(MutableOrderedSetImpl, 'MutableOrderedSetImpl', MutableOrderedSetImpl.xk, VOID, [OrderedSet, KtMutableSet]);
protoOf(OrderedSetImpl).asJsReadonlySetView = asJsReadonlySetView;
initMetadataForClass(OrderedSetImpl, 'OrderedSetImpl', OrderedSetImpl.yk, VOID, [OrderedSet]);
initMetadataForInterface(Entry, 'Entry');
initMetadataForClass(Entry_0, 'Entry', VOID, VOID, [Entry]);
initMetadataForClass(sam$kotlin_Comparator$0, 'sam$kotlin_Comparator$0', VOID, VOID, [Comparator, FunctionAdapter]);
initMetadataForClass(BinaryHeapComparable$iterator$1);
initMetadataForClass(BinaryHeapComparable, 'BinaryHeapComparable', VOID, VOID, [Iterable]);
//endregion
//region block: exports
export {
ListSeparatedArrayList as ListSeparatedArrayListek9n2zsx3dqy,
ListSeparated as ListSeparated97fiswuae3y9,
MutableStack as MutableStack2yps18c21tyxt,
binaryHeap as binaryHeaph0xdqa11rx2r,
clone as clone3r99vnzybx8ak,
deepClone as deepClone18s2gowzs8h7,
lazyMap as lazyMap2hjp9tqb7iyt1,
lazyMutableMapNonNull as lazyMutableMapNonNull2nd8810w2sjod,
mutableQueueOf as mutableQueueOf1rumet9be0696,
mutableStackOf as mutableStackOf3qxc0gq2zdq09,
orderedSetOf as orderedSetOfzbshky8898rn,
plus as plus1ibpxh05maamr,
toMutableOrderedSet as toMutableOrderedSet3pwu9brs2kfi0,
toOrderedSet as toOrderedSetm9zaa385h1v7,
transitiveClosure as transitiveClosure19nldfhu84wkp,
get_capitalise as get_capitalise1fytkcnart99b,
};
//endregion
//# sourceMappingURL=net.akehurst.language-collections.mjs.map