git-digger
Version:
 
256 lines (254 loc) • 13.2 kB
JavaScript
(function (_, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json, kotlin_kotlin, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core, kotlin_org_jetbrains_kotlinx_kotlinx_datetime) {
'use strict';
//region block: imports
var imul = Math.imul;
var Default_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.a;
var collectionSizeOrDefault = kotlin_kotlin.$_$.g4;
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.k;
var Unit_instance = kotlin_kotlin.$_$.j3;
var KtList = kotlin_kotlin.$_$.q3;
var getKClass = kotlin_kotlin.$_$.f;
var arrayOf = kotlin_kotlin.$_$.lc;
var createKType = kotlin_kotlin.$_$.c;
var createInvariantKTypeProjection = kotlin_kotlin.$_$.b;
var serializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.n1;
var THROW_CCE = kotlin_kotlin.$_$.zb;
var KSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.h1;
var isInterface = kotlin_kotlin.$_$.g8;
var StringSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.j;
var ArrayListSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.a1;
var protoOf = kotlin_kotlin.$_$.r8;
var initMetadataForCompanion = kotlin_kotlin.$_$.t7;
var PluginGeneratedSerialDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.e1;
var InstantIso8601Serializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.a;
var IntSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.i;
var get_nullable = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.k;
var typeParametersSerializers = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.b1;
var GeneratedSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.c1;
var initMetadataForObject = kotlin_kotlin.$_$.x7;
var VOID = kotlin_kotlin.$_$.g;
var toString = kotlin_kotlin.$_$.u8;
var toString_0 = kotlin_kotlin.$_$.wc;
var getStringHashCode = kotlin_kotlin.$_$.q7;
var hashCode = kotlin_kotlin.$_$.r7;
var equals = kotlin_kotlin.$_$.m7;
var initMetadataForClass = kotlin_kotlin.$_$.s7;
//endregion
//region block: pre-declaration
initMetadataForCompanion(Companion);
initMetadataForObject($serializer, '$serializer', VOID, VOID, [GeneratedSerializer]);
initMetadataForClass(ContributionJson, 'ContributionJson', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance});
//endregion
function toJsonString(_this__u8e3s4) {
var tmp2 = Default_getInstance();
// Inline function 'kotlin.collections.map' call
// Inline function 'kotlin.collections.mapTo' call
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(_this__u8e3s4, 10));
var _iterator__ex2g4s = _this__u8e3s4.p();
while (_iterator__ex2g4s.q()) {
var item = _iterator__ex2g4s.r();
var tmp$ret$0 = toJsonModel(item);
destination.e(tmp$ret$0);
}
// Inline function 'kotlinx.serialization.encodeToString' call
// Inline function 'kotlinx.serialization.serializer' call
var this_0 = tmp2.bn();
// Inline function 'kotlinx.serialization.internal.cast' call
var this_1 = serializer(this_0, createKType(getKClass(KtList), arrayOf([createInvariantKTypeProjection(createKType(getKClass(ContributionJson), arrayOf([]), false))]), false));
var tmp$ret$4 = isInterface(this_1, KSerializer) ? this_1 : THROW_CCE();
return tmp2.j1d(tmp$ret$4, destination);
}
function toJsonString_0(_this__u8e3s4) {
var tmp0 = Default_getInstance();
// Inline function 'kotlinx.serialization.encodeToString' call
var value = toJsonModel(_this__u8e3s4);
// Inline function 'kotlinx.serialization.serializer' call
var this_0 = tmp0.bn();
// Inline function 'kotlinx.serialization.internal.cast' call
var this_1 = serializer(this_0, createKType(getKClass(ContributionJson), arrayOf([]), false));
var tmp$ret$1 = isInterface(this_1, KSerializer) ? this_1 : THROW_CCE();
return tmp0.j1d(tmp$ret$1, value);
}
function Companion() {
Companion_instance = this;
var tmp = this;
// Inline function 'kotlin.arrayOf' call
// Inline function 'kotlin.js.unsafeCast' call
// Inline function 'kotlin.js.asDynamic' call
tmp.c1g_1 = [null, null, new ArrayListSerializer(StringSerializer_getInstance()), null, null, null, null, null, null, null, null, null];
}
var Companion_instance;
function Companion_getInstance() {
if (Companion_instance == null)
new Companion();
return Companion_instance;
}
function $serializer() {
$serializer_instance = this;
var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.zegreatrob.tools.digger.json.ContributionJson', this, 12);
tmp0_serialDesc.kq('lastCommit', false);
tmp0_serialDesc.kq('firstCommit', false);
tmp0_serialDesc.kq('authors', false);
tmp0_serialDesc.kq('dateTime', true);
tmp0_serialDesc.kq('firstCommitDateTime', true);
tmp0_serialDesc.kq('commitCount', false);
tmp0_serialDesc.kq('ease', true);
tmp0_serialDesc.kq('storyId', true);
tmp0_serialDesc.kq('semver', true);
tmp0_serialDesc.kq('label', true);
tmp0_serialDesc.kq('tagName', true);
tmp0_serialDesc.kq('tagDateTime', true);
this.d1g_1 = tmp0_serialDesc;
}
protoOf($serializer).e1g = function (encoder, value) {
var tmp0_desc = this.d1g_1;
var tmp1_output = encoder.yl(tmp0_desc);
var tmp2_cached = Companion_getInstance().c1g_1;
tmp1_output.vm(tmp0_desc, 0, value.f1g_1);
tmp1_output.vm(tmp0_desc, 1, value.g1g_1);
tmp1_output.xm(tmp0_desc, 2, tmp2_cached[2], value.h1g_1);
if (tmp1_output.en(tmp0_desc, 3) ? true : !(value.i1g_1 == null)) {
tmp1_output.zm(tmp0_desc, 3, InstantIso8601Serializer_getInstance(), value.i1g_1);
}
if (tmp1_output.en(tmp0_desc, 4) ? true : !(value.j1g_1 == null)) {
tmp1_output.zm(tmp0_desc, 4, InstantIso8601Serializer_getInstance(), value.j1g_1);
}
tmp1_output.qm(tmp0_desc, 5, value.k1g_1);
if (tmp1_output.en(tmp0_desc, 6) ? true : !(value.l1g_1 == null)) {
tmp1_output.zm(tmp0_desc, 6, IntSerializer_getInstance(), value.l1g_1);
}
if (tmp1_output.en(tmp0_desc, 7) ? true : !(value.m1g_1 == null)) {
tmp1_output.zm(tmp0_desc, 7, StringSerializer_getInstance(), value.m1g_1);
}
if (tmp1_output.en(tmp0_desc, 8) ? true : !(value.n1g_1 == null)) {
tmp1_output.zm(tmp0_desc, 8, StringSerializer_getInstance(), value.n1g_1);
}
if (tmp1_output.en(tmp0_desc, 9) ? true : !(value.o1g_1 == null)) {
tmp1_output.zm(tmp0_desc, 9, StringSerializer_getInstance(), value.o1g_1);
}
if (tmp1_output.en(tmp0_desc, 10) ? true : !(value.p1g_1 == null)) {
tmp1_output.zm(tmp0_desc, 10, StringSerializer_getInstance(), value.p1g_1);
}
if (tmp1_output.en(tmp0_desc, 11) ? true : !(value.q1g_1 == null)) {
tmp1_output.zm(tmp0_desc, 11, InstantIso8601Serializer_getInstance(), value.q1g_1);
}
tmp1_output.zl(tmp0_desc);
};
protoOf($serializer).pj = function (encoder, value) {
return this.e1g(encoder, value instanceof ContributionJson ? value : THROW_CCE());
};
protoOf($serializer).oj = function () {
return this.d1g_1;
};
protoOf($serializer).mq = function () {
var tmp0_cached = Companion_getInstance().c1g_1;
// Inline function 'kotlin.arrayOf' call
// Inline function 'kotlin.js.unsafeCast' call
// Inline function 'kotlin.js.asDynamic' call
return [StringSerializer_getInstance(), StringSerializer_getInstance(), tmp0_cached[2], get_nullable(InstantIso8601Serializer_getInstance()), get_nullable(InstantIso8601Serializer_getInstance()), IntSerializer_getInstance(), get_nullable(IntSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(InstantIso8601Serializer_getInstance())];
};
var $serializer_instance;
function $serializer_getInstance() {
if ($serializer_instance == null)
new $serializer();
return $serializer_instance;
}
function ContributionJson(lastCommit, firstCommit, authors, dateTime, firstCommitDateTime, commitCount, ease, storyId, semver, label, tagName, tagDateTime) {
Companion_getInstance();
dateTime = dateTime === VOID ? null : dateTime;
firstCommitDateTime = firstCommitDateTime === VOID ? null : firstCommitDateTime;
ease = ease === VOID ? null : ease;
storyId = storyId === VOID ? null : storyId;
semver = semver === VOID ? null : semver;
label = label === VOID ? null : label;
tagName = tagName === VOID ? null : tagName;
tagDateTime = tagDateTime === VOID ? null : tagDateTime;
this.f1g_1 = lastCommit;
this.g1g_1 = firstCommit;
this.h1g_1 = authors;
this.i1g_1 = dateTime;
this.j1g_1 = firstCommitDateTime;
this.k1g_1 = commitCount;
this.l1g_1 = ease;
this.m1g_1 = storyId;
this.n1g_1 = semver;
this.o1g_1 = label;
this.p1g_1 = tagName;
this.q1g_1 = tagDateTime;
}
protoOf(ContributionJson).toString = function () {
return 'ContributionJson(lastCommit=' + this.f1g_1 + ', firstCommit=' + this.g1g_1 + ', authors=' + toString(this.h1g_1) + ', dateTime=' + toString_0(this.i1g_1) + ', firstCommitDateTime=' + toString_0(this.j1g_1) + ', commitCount=' + this.k1g_1 + ', ease=' + this.l1g_1 + ', storyId=' + this.m1g_1 + ', semver=' + this.n1g_1 + ', label=' + this.o1g_1 + ', tagName=' + this.p1g_1 + ', tagDateTime=' + toString_0(this.q1g_1) + ')';
};
protoOf(ContributionJson).hashCode = function () {
var result = getStringHashCode(this.f1g_1);
result = imul(result, 31) + getStringHashCode(this.g1g_1) | 0;
result = imul(result, 31) + hashCode(this.h1g_1) | 0;
result = imul(result, 31) + (this.i1g_1 == null ? 0 : this.i1g_1.hashCode()) | 0;
result = imul(result, 31) + (this.j1g_1 == null ? 0 : this.j1g_1.hashCode()) | 0;
result = imul(result, 31) + this.k1g_1 | 0;
result = imul(result, 31) + (this.l1g_1 == null ? 0 : this.l1g_1) | 0;
result = imul(result, 31) + (this.m1g_1 == null ? 0 : getStringHashCode(this.m1g_1)) | 0;
result = imul(result, 31) + (this.n1g_1 == null ? 0 : getStringHashCode(this.n1g_1)) | 0;
result = imul(result, 31) + (this.o1g_1 == null ? 0 : getStringHashCode(this.o1g_1)) | 0;
result = imul(result, 31) + (this.p1g_1 == null ? 0 : getStringHashCode(this.p1g_1)) | 0;
result = imul(result, 31) + (this.q1g_1 == null ? 0 : this.q1g_1.hashCode()) | 0;
return result;
};
protoOf(ContributionJson).equals = function (other) {
if (this === other)
return true;
if (!(other instanceof ContributionJson))
return false;
var tmp0_other_with_cast = other instanceof ContributionJson ? other : THROW_CCE();
if (!(this.f1g_1 === tmp0_other_with_cast.f1g_1))
return false;
if (!(this.g1g_1 === tmp0_other_with_cast.g1g_1))
return false;
if (!equals(this.h1g_1, tmp0_other_with_cast.h1g_1))
return false;
if (!equals(this.i1g_1, tmp0_other_with_cast.i1g_1))
return false;
if (!equals(this.j1g_1, tmp0_other_with_cast.j1g_1))
return false;
if (!(this.k1g_1 === tmp0_other_with_cast.k1g_1))
return false;
if (!(this.l1g_1 == tmp0_other_with_cast.l1g_1))
return false;
if (!(this.m1g_1 == tmp0_other_with_cast.m1g_1))
return false;
if (!(this.n1g_1 == tmp0_other_with_cast.n1g_1))
return false;
if (!(this.o1g_1 == tmp0_other_with_cast.o1g_1))
return false;
if (!(this.p1g_1 == tmp0_other_with_cast.p1g_1))
return false;
if (!equals(this.q1g_1, tmp0_other_with_cast.q1g_1))
return false;
return true;
};
function toJsonModel(_this__u8e3s4) {
var tmp0_lastCommit = _this__u8e3s4.y1a_1;
var tmp1_firstCommit = _this__u8e3s4.z1a_1;
var tmp2_authors = _this__u8e3s4.a1b_1;
var tmp3_dateTime = _this__u8e3s4.c1b_1;
var tmp4_firstCommitDateTime = _this__u8e3s4.d1b_1;
var tmp5_ease = _this__u8e3s4.e1b_1;
var tmp6_storyId = _this__u8e3s4.f1b_1;
var tmp7_semver = _this__u8e3s4.g1b_1;
var tmp8_label = _this__u8e3s4.h1b_1;
var tmp9_tagName = _this__u8e3s4.i1b_1;
var tmp10_tagDateTime = _this__u8e3s4.j1b_1;
var tmp11_commitCount = _this__u8e3s4.b1b_1;
return new ContributionJson(tmp0_lastCommit, tmp1_firstCommit, tmp2_authors, tmp3_dateTime, tmp4_firstCommitDateTime, tmp11_commitCount, tmp5_ease, tmp6_storyId, tmp7_semver, tmp8_label, tmp9_tagName, tmp10_tagDateTime);
}
//region block: post-declaration
protoOf($serializer).nq = typeParametersSerializers;
//endregion
//region block: exports
_.$_$ = _.$_$ || {};
_.$_$.a = toJsonString_0;
_.$_$.b = toJsonString;
//endregion
return _;
}(module.exports, require('./kotlinx-serialization-kotlinx-serialization-json.js'), require('./kotlin-kotlin-stdlib.js'), require('./kotlinx-serialization-kotlinx-serialization-core.js'), require('./Kotlin-DateTime-library-kotlinx-datetime.js')));
//# sourceMappingURL=tools-digger-json.js.map