UNPKG

git-rest-wrapper

Version:

A "universal" / normalized API wrapper for common git hosting services.

1,105 lines 301 kB
(function(root, factory) { if (typeof define === 'function' && define.amd) define(['exports', 'kotlin', 'ktor-ktor-io-jsLegacy', 'ktor-ktor-utils-jsLegacy', 'kotlinx-coroutines-core'], factory); else if (typeof exports === 'object') factory(module.exports, require('kotlin'), require('ktor-ktor-io-jsLegacy'), require('ktor-ktor-utils-jsLegacy'), require('kotlinx-coroutines-core')); else { if (typeof kotlin === 'undefined') { throw new Error("Error loading module 'ktor-ktor-http-jsLegacy'. Its dependency 'kotlin' was not found. Please, check whether 'kotlin' is loaded prior to 'ktor-ktor-http-jsLegacy'."); } if (typeof this['ktor-ktor-io-jsLegacy'] === 'undefined') { throw new Error("Error loading module 'ktor-ktor-http-jsLegacy'. Its dependency 'ktor-ktor-io-jsLegacy' was not found. Please, check whether 'ktor-ktor-io-jsLegacy' is loaded prior to 'ktor-ktor-http-jsLegacy'."); } if (typeof this['ktor-ktor-utils-jsLegacy'] === 'undefined') { throw new Error("Error loading module 'ktor-ktor-http-jsLegacy'. Its dependency 'ktor-ktor-utils-jsLegacy' was not found. Please, check whether 'ktor-ktor-utils-jsLegacy' is loaded prior to 'ktor-ktor-http-jsLegacy'."); } if (typeof this['kotlinx-coroutines-core'] === 'undefined') { throw new Error("Error loading module 'ktor-ktor-http-jsLegacy'. Its dependency 'kotlinx-coroutines-core' was not found. Please, check whether 'kotlinx-coroutines-core' is loaded prior to 'ktor-ktor-http-jsLegacy'."); } root['ktor-ktor-http-jsLegacy'] = factory(typeof this['ktor-ktor-http-jsLegacy'] === 'undefined' ? {} : this['ktor-ktor-http-jsLegacy'], kotlin, this['ktor-ktor-io-jsLegacy'], this['ktor-ktor-utils-jsLegacy'], this['kotlinx-coroutines-core']); } }(this, function(_, Kotlin, $module$ktor_ktor_io_jsLegacy, $module$ktor_ktor_utils_jsLegacy, $module$kotlinx_coroutines_core) { 'use strict'; var $$importsForInline$$ = _.$$importsForInline$$ || (_.$$importsForInline$$ = {}); var Enum = Kotlin.kotlin.Enum; var Kind_CLASS = Kotlin.Kind.CLASS; var throwISE = Kotlin.throwISE; var equals = Kotlin.equals; var ArrayList_init = Kotlin.kotlin.collections.ArrayList_init_ww73n8$; var toString = Kotlin.toString; var joinToString = Kotlin.kotlin.collections.joinToString_fmv235$; var hashCode = Kotlin.hashCode; var CharRange = Kotlin.kotlin.ranges.CharRange; var plus = Kotlin.kotlin.collections.plus_q4559j$; var plus_0 = Kotlin.kotlin.collections.plus_mydzjv$; var unboxChar = Kotlin.unboxChar; var toByte = Kotlin.toByte; var toBoxedChar = Kotlin.toBoxedChar; var listOf = Kotlin.kotlin.collections.listOf_i5x0yv$; var toSet = Kotlin.kotlin.collections.toSet_7wnvza$; var plus_1 = Kotlin.kotlin.collections.plus_khz7k3$; var setOf = Kotlin.kotlin.collections.setOf_i5x0yv$; var charsets = $module$ktor_ktor_io_jsLegacy.io.ktor.utils.io.charsets; var encode = $module$ktor_ktor_io_jsLegacy.io.ktor.utils.io.charsets.encode_fj4osb$; var toChar = Kotlin.toChar; var Unit = Kotlin.kotlin.Unit; var isSurrogate = Kotlin.kotlin.text.isSurrogate_myv2d0$; var StringBuilder_init = Kotlin.kotlin.text.StringBuilder_init_za3lpa$; var String_0 = $module$ktor_ktor_io_jsLegacy.io.ktor.utils.io.core.String_xge8xe$; var Exception_init = Kotlin.kotlin.Exception_init_pdl1vj$; var Exception = Kotlin.kotlin.Exception; var StringBuilder_init_0 = Kotlin.kotlin.text.StringBuilder_init; var prepareReadFirstHead = $module$ktor_ktor_io_jsLegacy.io.ktor.utils.io.core.internal.prepareReadFirstHead_j319xh$; var prepareReadNextHead = $module$ktor_ktor_io_jsLegacy.io.ktor.utils.io.core.internal.prepareReadNextHead_x2nit9$; var completeReadHead = $module$ktor_ktor_io_jsLegacy.io.ktor.utils.io.core.internal.completeReadHead_x2nit9$; var collectionSizeOrDefault = Kotlin.kotlin.collections.collectionSizeOrDefault_ba2ldo$; var plus_2 = Kotlin.kotlin.collections.plus_qloxvw$; var Kind_OBJECT = Kotlin.Kind.OBJECT; var emptyList = Kotlin.kotlin.collections.emptyList_287e2$; var single = Kotlin.kotlin.collections.single_2p1efm$; var Kind_INTERFACE = Kotlin.Kind.INTERFACE; var equals_0 = Kotlin.kotlin.text.equals_igcy3c$; var isBlank = Kotlin.kotlin.text.isBlank_gw00vp$; var indexOf = Kotlin.kotlin.text.indexOf_8eortd$; var contains = Kotlin.kotlin.text.contains_sgbm27$; var get_name = $module$ktor_ktor_io_jsLegacy.io.ktor.utils.io.charsets.get_name_2sg7fd$; var Charset = $module$ktor_ktor_io_jsLegacy.io.ktor.utils.io.charsets.Charset; var Collection = Kotlin.kotlin.collections.Collection; var throwCCE = Kotlin.throwCCE; var trim = Kotlin.kotlin.text.trim_gw00vp$; var emptyMap = Kotlin.kotlin.collections.emptyMap_q3lmfv$; var startsWith = Kotlin.kotlin.text.startsWith_7epoxm$; var toLowerCasePreservingASCIIRules = $module$ktor_ktor_utils_jsLegacy.io.ktor.util.toLowerCasePreservingASCIIRules_pdl1vz$; var toInt = Kotlin.kotlin.text.toInt_pdl1vz$; var to = Kotlin.kotlin.to_ujzrz7$; var map = Kotlin.kotlin.sequences.map_z5avom$; var filter = Kotlin.kotlin.sequences.filter_euau3h$; var endsWith = Kotlin.kotlin.text.endsWith_7epoxm$; var removeSurrounding = Kotlin.kotlin.text.removeSurrounding_gsj5wt$; var toMap = Kotlin.kotlin.collections.toMap_ah2ab9$; var IllegalArgumentException_init = Kotlin.kotlin.IllegalArgumentException_init_pdl1vj$; var encodeBase64 = $module$ktor_ktor_utils_jsLegacy.io.ktor.util.encodeBase64_pdl1vz$; var decodeBase64String = $module$ktor_ktor_utils_jsLegacy.io.ktor.util.decodeBase64String_pdl1vz$; var isWhitespace = Kotlin.kotlin.text.isWhitespace_myv2d0$; var NoSuchElementException_init = Kotlin.kotlin.NoSuchElementException; var mapCapacity = Kotlin.kotlin.collections.mapCapacity_za3lpa$; var LinkedHashMap_init = Kotlin.kotlin.collections.LinkedHashMap_init_bwtc7$; var Map = Kotlin.kotlin.collections.Map; var LinkedHashMap_init_0 = Kotlin.kotlin.collections.LinkedHashMap_init_q3lmfv$; var ArrayList_init_0 = Kotlin.kotlin.collections.ArrayList_init_287e2$; var iterator = Kotlin.kotlin.text.iterator_gw00vp$; var trimStart = Kotlin.kotlin.text.trimStart_gw00vp$; var trimEnd = Kotlin.kotlin.text.trimEnd_gw00vp$; var Regex_init = Kotlin.kotlin.text.Regex_init_61zpoe$; var defineInlineFunction = Kotlin.defineInlineFunction; var wrapFunction = Kotlin.wrapFunction; var Month$values = $module$ktor_ktor_utils_jsLegacy.io.ktor.util.date.Month.values; var ensureNotNull = Kotlin.ensureNotNull; var IntRange = Kotlin.kotlin.ranges.IntRange; var GMTDate = $module$ktor_ktor_utils_jsLegacy.io.ktor.util.date.GMTDate_qlqxlw$; var IllegalStateException_init = Kotlin.kotlin.IllegalStateException_init_pdl1vj$; var IllegalStateException = Kotlin.kotlin.IllegalStateException; var GMTDateParser = $module$ktor_ktor_utils_jsLegacy.io.ktor.util.date.GMTDateParser; var InvalidDateStringException = $module$ktor_ktor_utils_jsLegacy.io.ktor.util.date.InvalidDateStringException; var padStart = Kotlin.kotlin.text.padStart_vrc1nu$; var toCharArray = $module$ktor_ktor_utils_jsLegacy.io.ktor.util.toCharArray_pdl1vz$; var lastIndexOfAny = Kotlin.kotlin.text.lastIndexOfAny_junqau$; var removePrefix = Kotlin.kotlin.text.removePrefix_gsj5wt$; var substringAfter = Kotlin.kotlin.text.substringAfter_j4ogox$; var caseInsensitiveMap = $module$ktor_ktor_utils_jsLegacy.io.ktor.util.caseInsensitiveMap_287e2$; var asSequence = Kotlin.kotlin.collections.asSequence_7wnvza$; var lazy = Kotlin.kotlin.lazy_klfg04$; var firstOrNull = Kotlin.kotlin.collections.firstOrNull_2p1efm$; var IllegalArgumentException = Kotlin.kotlin.IllegalArgumentException; var Throwable = Error; var StringValues = $module$ktor_ktor_utils_jsLegacy.io.ktor.util.StringValues; var StringValuesBuilder = $module$ktor_ktor_utils_jsLegacy.io.ktor.util.StringValuesBuilder; var emptySet = Kotlin.kotlin.collections.emptySet_287e2$; var listOf_0 = Kotlin.kotlin.collections.listOf_mh5how$; var asList = Kotlin.kotlin.collections.asList_us0mfu$; var toMap_0 = Kotlin.kotlin.collections.toMap_6hr0sd$; var StringValuesImpl = $module$ktor_ktor_utils_jsLegacy.io.ktor.util.StringValuesImpl; var StringValuesSingleImpl = $module$ktor_ktor_utils_jsLegacy.io.ktor.util.StringValuesSingleImpl; var toDoubleOrNull = Kotlin.kotlin.text.toDoubleOrNull_pdl1vz$; var rangeTo = Kotlin.kotlin.ranges.rangeTo_38ydlf$; var sortedWith = Kotlin.kotlin.collections.sortedWith_eknfly$; var LazyThreadSafetyMode = Kotlin.kotlin.LazyThreadSafetyMode; var lazy_0 = Kotlin.kotlin.lazy_kls4a0$; var get_lastIndex = Kotlin.kotlin.text.get_lastIndex_gw00vp$; var Comparator = Kotlin.kotlin.Comparator; var split = Kotlin.kotlin.text.split_ip8yn$; var toLong = Kotlin.kotlin.text.toLong_pdl1vz$; var addAll = Kotlin.kotlin.collections.addAll_ipc267$; var Array_0 = Array; var substringBefore = Kotlin.kotlin.text.substringBefore_j4ogox$; var joinTo = Kotlin.kotlin.collections.joinTo_gcc71v$; var removeSuffix = Kotlin.kotlin.text.removeSuffix_gsj5wt$; var joinToString_0 = Kotlin.kotlin.collections.joinToString_cgipc5$; var lineSequence = Kotlin.kotlin.text.lineSequence_gw00vp$; var mapNotNull = Kotlin.kotlin.sequences.mapNotNull_qpz9h9$; var toList = Kotlin.kotlin.sequences.toList_veqyi0$; var split_0 = Kotlin.kotlin.text.split_o64adg$; var coerceAtMost = Kotlin.kotlin.ranges.coerceAtMost_2p08ub$; var until = Kotlin.kotlin.ranges.until_2p08ub$; var L0 = Kotlin.Long.ZERO; var coerceAtLeast = Kotlin.kotlin.ranges.coerceAtLeast_2p08ub$; var last = Kotlin.kotlin.collections.last_2p1efm$; var get_lastIndex_0 = Kotlin.kotlin.collections.get_lastIndex_55thoc$; var contains_0 = $module$ktor_ktor_utils_jsLegacy.io.ktor.util.contains_9p7nab$; var filterNotNull = Kotlin.kotlin.collections.filterNotNull_emfgvx$; var indexOf_0 = Kotlin.kotlin.text.indexOf_l5u8uk$; var indexOfAny = Kotlin.kotlin.text.indexOfAny_junqau$; var lastIndexOf = Kotlin.kotlin.text.lastIndexOf_8eortd$; var get_indices = Kotlin.kotlin.text.get_indices_gw00vp$; var reversed = Kotlin.kotlin.ranges.reversed_zf1xzc$; var isLowerCase = $module$ktor_ktor_utils_jsLegacy.io.ktor.util.isLowerCase_myv2d0$; var coerceAtLeast_0 = Kotlin.kotlin.ranges.coerceAtLeast_dqglrj$; var appendAll = $module$ktor_ktor_utils_jsLegacy.io.ktor.util.appendAll_k10e8h$; var util = $module$ktor_ktor_utils_jsLegacy.io.ktor.util; var generateNonce = $module$ktor_ktor_utils_jsLegacy.io.ktor.util.generateNonce; var drop = Kotlin.kotlin.text.drop_6ic1pp$; var takeLast = Kotlin.kotlin.text.takeLast_6ic1pp$; var startsWith_0 = Kotlin.kotlin.text.startsWith_sgbm27$; var endsWith_0 = Kotlin.kotlin.text.endsWith_sgbm27$; var AttributeKey = $module$ktor_ktor_utils_jsLegacy.io.ktor.util.AttributeKey; var COROUTINE_SUSPENDED = Kotlin.kotlin.coroutines.intrinsics.COROUTINE_SUSPENDED; var CoroutineImpl = Kotlin.kotlin.coroutines.CoroutineImpl; var Attributes = $module$ktor_ktor_utils_jsLegacy.io.ktor.util.AttributesJsFn; var ByteReadChannel = $module$ktor_ktor_io_jsLegacy.io.ktor.utils.io.ByteReadChannel; var coroutines = $module$kotlinx_coroutines_core.kotlinx.coroutines; var copyTo = $module$ktor_ktor_io_jsLegacy.io.ktor.utils.io.copyTo_47ygvz$; var writer = $module$ktor_ktor_io_jsLegacy.io.ktor.utils.io.writer_x9a1ni$; var take = Kotlin.kotlin.text.take_6ic1pp$; var encodeToByteArray = $module$ktor_ktor_io_jsLegacy.io.ktor.utils.io.charsets.encodeToByteArray_fj4osb$; var Regex = Kotlin.kotlin.text.Regex; var repeat = Kotlin.kotlin.text.repeat_94bcnn$; var println = Kotlin.kotlin.io.println_s8jyv4$; var first = Kotlin.kotlin.collections.first_2p1efm$; var checkIndexOverflow = Kotlin.kotlin.collections.checkIndexOverflow_za3lpa$; var sha1 = $module$ktor_ktor_utils_jsLegacy.io.ktor.util.sha1_fqrh44$; var encodeBase64_0 = $module$ktor_ktor_utils_jsLegacy.io.ktor.util.encodeBase64_964n91$; CacheControl$Visibility.prototype = Object.create(Enum.prototype); CacheControl$Visibility.prototype.constructor = CacheControl$Visibility; CacheControl$NoCache.prototype = Object.create(CacheControl.prototype); CacheControl$NoCache.prototype.constructor = CacheControl$NoCache; CacheControl$NoStore.prototype = Object.create(CacheControl.prototype); CacheControl$NoStore.prototype.constructor = CacheControl$NoStore; CacheControl$MaxAge.prototype = Object.create(CacheControl.prototype); CacheControl$MaxAge.prototype.constructor = CacheControl$MaxAge; URLDecodeException.prototype = Object.create(Exception.prototype); URLDecodeException.prototype.constructor = URLDecodeException; ContentDisposition.prototype = Object.create(HeaderValueWithParameters.prototype); ContentDisposition.prototype.constructor = ContentDisposition; ContentType.prototype = Object.create(HeaderValueWithParameters.prototype); ContentType.prototype.constructor = ContentType; BadContentTypeFormatException.prototype = Object.create(Exception.prototype); BadContentTypeFormatException.prototype.constructor = BadContentTypeFormatException; CookieEncoding.prototype = Object.create(Enum.prototype); CookieEncoding.prototype.constructor = CookieEncoding; InvalidCookieDateException.prototype = Object.create(IllegalStateException.prototype); InvalidCookieDateException.prototype.constructor = InvalidCookieDateException; HeadersBuilder.prototype = Object.create(StringValuesBuilder.prototype); HeadersBuilder.prototype.constructor = HeadersBuilder; HeadersImpl.prototype = Object.create(StringValuesImpl.prototype); HeadersImpl.prototype.constructor = HeadersImpl; HeadersSingleImpl.prototype = Object.create(StringValuesSingleImpl.prototype); HeadersSingleImpl.prototype.constructor = HeadersSingleImpl; UnsafeHeaderException.prototype = Object.create(IllegalArgumentException.prototype); UnsafeHeaderException.prototype.constructor = UnsafeHeaderException; IllegalHeaderNameException.prototype = Object.create(IllegalArgumentException.prototype); IllegalHeaderNameException.prototype.constructor = IllegalHeaderNameException; IllegalHeaderValueException.prototype = Object.create(IllegalArgumentException.prototype); IllegalHeaderValueException.prototype.constructor = IllegalHeaderValueException; LinkHeader.prototype = Object.create(HeaderValueWithParameters.prototype); LinkHeader.prototype.constructor = LinkHeader; ParametersBuilder.prototype = Object.create(StringValuesBuilder.prototype); ParametersBuilder.prototype.constructor = ParametersBuilder; ParametersImpl.prototype = Object.create(StringValuesImpl.prototype); ParametersImpl.prototype.constructor = ParametersImpl; ParametersSingleImpl.prototype = Object.create(StringValuesSingleImpl.prototype); ParametersSingleImpl.prototype.constructor = ParametersSingleImpl; RangeUnits.prototype = Object.create(Enum.prototype); RangeUnits.prototype.constructor = RangeUnits; ContentRange$Bounded.prototype = Object.create(ContentRange.prototype); ContentRange$Bounded.prototype.constructor = ContentRange$Bounded; ContentRange$TailFrom.prototype = Object.create(ContentRange.prototype); ContentRange$TailFrom.prototype.constructor = ContentRange$TailFrom; ContentRange$Suffix.prototype = Object.create(ContentRange.prototype); ContentRange$Suffix.prototype.constructor = ContentRange$Suffix; URLParserException.prototype = Object.create(IllegalStateException.prototype); URLParserException.prototype.constructor = URLParserException; HeaderValueEncoding.prototype = Object.create(Enum.prototype); HeaderValueEncoding.prototype.constructor = HeaderValueEncoding; HttpAuthHeader$Single.prototype = Object.create(HttpAuthHeader.prototype); HttpAuthHeader$Single.prototype.constructor = HttpAuthHeader$Single; HttpAuthHeader$Parameterized.prototype = Object.create(HttpAuthHeader.prototype); HttpAuthHeader$Parameterized.prototype.constructor = HttpAuthHeader$Parameterized; OutgoingContent$ByteArrayContent.prototype = Object.create(OutgoingContent.prototype); OutgoingContent$ByteArrayContent.prototype.constructor = OutgoingContent$ByteArrayContent; ByteArrayContent.prototype = Object.create(OutgoingContent$ByteArrayContent.prototype); ByteArrayContent.prototype.constructor = ByteArrayContent; PartData$FormItem.prototype = Object.create(PartData.prototype); PartData$FormItem.prototype.constructor = PartData$FormItem; PartData$FileItem.prototype = Object.create(PartData.prototype); PartData$FileItem.prototype.constructor = PartData$FileItem; PartData$BinaryItem.prototype = Object.create(PartData.prototype); PartData$BinaryItem.prototype.constructor = PartData$BinaryItem; OutgoingContent$NoContent.prototype = Object.create(OutgoingContent.prototype); OutgoingContent$NoContent.prototype.constructor = OutgoingContent$NoContent; OutgoingContent$ReadChannelContent.prototype = Object.create(OutgoingContent.prototype); OutgoingContent$ReadChannelContent.prototype.constructor = OutgoingContent$ReadChannelContent; OutgoingContent$WriteChannelContent.prototype = Object.create(OutgoingContent.prototype); OutgoingContent$WriteChannelContent.prototype.constructor = OutgoingContent$WriteChannelContent; OutgoingContent$ProtocolUpgrade.prototype = Object.create(OutgoingContent.prototype); OutgoingContent$ProtocolUpgrade.prototype.constructor = OutgoingContent$ProtocolUpgrade; TextContent.prototype = Object.create(OutgoingContent$ByteArrayContent.prototype); TextContent.prototype.constructor = TextContent; StringGrammar.prototype = Object.create(Grammar.prototype); StringGrammar.prototype.constructor = StringGrammar; AnyOfGrammar.prototype = Object.create(Grammar.prototype); AnyOfGrammar.prototype.constructor = AnyOfGrammar; RangeGrammar.prototype = Object.create(Grammar.prototype); RangeGrammar.prototype.constructor = RangeGrammar; RawGrammar.prototype = Object.create(Grammar.prototype); RawGrammar.prototype.constructor = RawGrammar; NamedGrammar.prototype = Object.create(Grammar.prototype); NamedGrammar.prototype.constructor = NamedGrammar; MaybeGrammar.prototype = Object.create(Grammar.prototype); MaybeGrammar.prototype.constructor = MaybeGrammar; ManyGrammar.prototype = Object.create(Grammar.prototype); ManyGrammar.prototype.constructor = ManyGrammar; AtLeastOne.prototype = Object.create(Grammar.prototype); AtLeastOne.prototype.constructor = AtLeastOne; SequenceGrammar.prototype = Object.create(Grammar.prototype); SequenceGrammar.prototype.constructor = SequenceGrammar; OrGrammar.prototype = Object.create(Grammar.prototype); OrGrammar.prototype.constructor = OrGrammar; function etag($receiver, entityTag) { $receiver.set_puj7f4$(HttpHeaders_getInstance().ETag, entityTag); } function CacheControl(visibility) { this.visibility = visibility; } function CacheControl$Visibility(name, ordinal, headerValue) { Enum.call(this); this.headerValue_8be2vx$ = headerValue; this.name$ = name; this.ordinal$ = ordinal; } function CacheControl$Visibility_initFields() { CacheControl$Visibility_initFields = function() { }; CacheControl$Visibility$Public_instance = new CacheControl$Visibility('Public', 0, 'public'); CacheControl$Visibility$Private_instance = new CacheControl$Visibility('Private', 1, 'private'); } var CacheControl$Visibility$Public_instance; function CacheControl$Visibility$Public_getInstance() { CacheControl$Visibility_initFields(); return CacheControl$Visibility$Public_instance; } var CacheControl$Visibility$Private_instance; function CacheControl$Visibility$Private_getInstance() { CacheControl$Visibility_initFields(); return CacheControl$Visibility$Private_instance; } CacheControl$Visibility.$metadata$ = { kind: Kind_CLASS, simpleName: 'Visibility', interfaces: [Enum]}; function CacheControl$Visibility$values() { return [CacheControl$Visibility$Public_getInstance(), CacheControl$Visibility$Private_getInstance()]; } CacheControl$Visibility.values = CacheControl$Visibility$values; function CacheControl$Visibility$valueOf(name) { switch (name) { case 'Public': return CacheControl$Visibility$Public_getInstance(); case 'Private': return CacheControl$Visibility$Private_getInstance(); default: throwISE('No enum constant io.ktor.http.CacheControl.Visibility.' + name); } } CacheControl$Visibility.valueOf_61zpoe$ = CacheControl$Visibility$valueOf; function CacheControl$NoCache(visibility) { CacheControl.call(this, visibility); } CacheControl$NoCache.prototype.toString = function() { if (this.visibility == null) { return 'no-cache'; } else { return 'no-cache, ' + this.visibility.headerValue_8be2vx$; } }; CacheControl$NoCache.prototype.equals = function(other) { return Kotlin.isType(other, CacheControl$NoCache) && equals(this.visibility, other.visibility); }; CacheControl$NoCache.prototype.hashCode = function() { var $receiver = this.visibility; var tmp$; return (tmp$ = $receiver != null ? hashCode($receiver) : null) != null ? tmp$ : 0; }; CacheControl$NoCache.$metadata$ = { kind: Kind_CLASS, simpleName: 'NoCache', interfaces: [CacheControl]}; function CacheControl$NoStore(visibility) { CacheControl.call(this, visibility); } CacheControl$NoStore.prototype.toString = function() { if (this.visibility == null) { return 'no-store'; } else { return 'no-store, ' + this.visibility.headerValue_8be2vx$; } }; CacheControl$NoStore.prototype.equals = function(other) { return Kotlin.isType(other, CacheControl$NoStore) && equals(other.visibility, this.visibility); }; CacheControl$NoStore.prototype.hashCode = function() { var $receiver = this.visibility; var tmp$; return (tmp$ = $receiver != null ? hashCode($receiver) : null) != null ? tmp$ : 0; }; CacheControl$NoStore.$metadata$ = { kind: Kind_CLASS, simpleName: 'NoStore', interfaces: [CacheControl]}; function CacheControl$MaxAge(maxAgeSeconds, proxyMaxAgeSeconds, mustRevalidate, proxyRevalidate, visibility) { if (proxyMaxAgeSeconds === void 0) proxyMaxAgeSeconds = null; if (mustRevalidate === void 0) mustRevalidate = false; if (proxyRevalidate === void 0) proxyRevalidate = false; if (visibility === void 0) visibility = null; CacheControl.call(this, visibility); this.maxAgeSeconds = maxAgeSeconds; this.proxyMaxAgeSeconds = proxyMaxAgeSeconds; this.mustRevalidate = mustRevalidate; this.proxyRevalidate = proxyRevalidate; } CacheControl$MaxAge.prototype.toString = function() { var parts = ArrayList_init(5); parts.add_11rb$('max-age=' + this.maxAgeSeconds); if (this.proxyMaxAgeSeconds != null) { parts.add_11rb$('s-maxage=' + toString(this.proxyMaxAgeSeconds)); } if (this.mustRevalidate) { parts.add_11rb$('must-revalidate'); } if (this.proxyRevalidate) { parts.add_11rb$('proxy-revalidate'); } if (this.visibility != null) { parts.add_11rb$(this.visibility.headerValue_8be2vx$); } return joinToString(parts, ', '); }; CacheControl$MaxAge.prototype.equals = function(other) { return other === this || (Kotlin.isType(other, CacheControl$MaxAge) && other.maxAgeSeconds === this.maxAgeSeconds && other.proxyMaxAgeSeconds == this.proxyMaxAgeSeconds && other.mustRevalidate === this.mustRevalidate && other.proxyRevalidate === this.proxyRevalidate && equals(other.visibility, this.visibility)); }; CacheControl$MaxAge.prototype.hashCode = function() { var tmp$; var result = this.maxAgeSeconds; result = (31 * result | 0) + ((tmp$ = this.proxyMaxAgeSeconds) != null ? tmp$ : 0) | 0; result = (31 * result | 0) + hashCode(this.mustRevalidate) | 0; result = (31 * result | 0) + hashCode(this.proxyRevalidate) | 0; var tmp$_0 = 31 * result | 0; var $receiver = this.visibility; var tmp$_1; result = tmp$_0 + ((tmp$_1 = $receiver != null ? hashCode($receiver) : null) != null ? tmp$_1 : 0) | 0; return result; }; CacheControl$MaxAge.$metadata$ = { kind: Kind_CLASS, simpleName: 'MaxAge', interfaces: [CacheControl]}; CacheControl.$metadata$ = { kind: Kind_CLASS, simpleName: 'CacheControl', interfaces: []}; var URL_ALPHABET; var URL_ALPHABET_CHARS; var HEX_ALPHABET; var URL_PROTOCOL_PART; var VALID_PATH_PART; var OAUTH_SYMBOLS; var LETTERS_AND_NUMBERS; var TOKENS; function encodeURLQueryComponent$lambda$lambda(closure$spaceToPlus, this$, closure$encodeFull) { return function(it) { if (it === toByte(32 | 0)) if (closure$spaceToPlus) this$.append_s8itvh$(43); else this$.append_pdl1vj$('%20'); else if (URL_ALPHABET.contains_11rb$(it) || (!closure$encodeFull && URL_PROTOCOL_PART.contains_11rb$(it))) this$.append_s8itvh$(toChar(it)); else this$.append_pdl1vj$(percentEncode(it)); return Unit; }; } function encodeURLQueryComponent($receiver, encodeFull, spaceToPlus, charset) { if (encodeFull === void 0) encodeFull = false; if (spaceToPlus === void 0) spaceToPlus = false; if (charset === void 0) charset = charsets.Charsets.UTF_8; var $receiver_0 = StringBuilder_init_0(); var content = encode(charset.newEncoder(), $receiver); forEach(content, encodeURLQueryComponent$lambda$lambda(spaceToPlus, $receiver_0, encodeFull)); return $receiver_0.toString(); } function encodeURLPath$lambda$lambda(this$) { return function(it) { this$.append_pdl1vj$(percentEncode(it)); return Unit; }; } function encodeURLPath($receiver) { var $receiver_0 = StringBuilder_init_0(); var charset = charsets.Charsets.UTF_8; var index = 0; while (index < $receiver.length) { var current = $receiver.charCodeAt(index); if (current === 47 || URL_ALPHABET_CHARS.contains_11rb$(toBoxedChar(current)) || VALID_PATH_PART.contains_11rb$(toBoxedChar(current))) { $receiver_0.append_s8itvh$(current); index = index + 1 | 0; continue; } if (current === 37 && (index + 2 | 0) < $receiver.length && HEX_ALPHABET.contains_11rb$(toBoxedChar($receiver.charCodeAt(index + 1 | 0))) && HEX_ALPHABET.contains_11rb$(toBoxedChar($receiver.charCodeAt(index + 2 | 0)))) { $receiver_0.append_s8itvh$(current); $receiver_0.append_s8itvh$($receiver.charCodeAt(index + 1 | 0)); $receiver_0.append_s8itvh$($receiver.charCodeAt(index + 2 | 0)); index = index + 3 | 0; continue; } var symbolSize = isSurrogate(current) ? 2 : 1; forEach(encode(charset.newEncoder(), $receiver, index, index + symbolSize | 0), encodeURLPath$lambda$lambda($receiver_0)); index = index + symbolSize | 0; } return $receiver_0.toString(); } function encodeOAuth($receiver) { return encodeURLParameter($receiver); } function encodeURLParameter$lambda$lambda(this$, closure$spaceToPlus) { return function(it) { if (URL_ALPHABET.contains_11rb$(it) || OAUTH_SYMBOLS.contains_11rb$(it)) this$.append_s8itvh$(toChar(it)); else if (closure$spaceToPlus && it === toByte(32 | 0)) this$.append_s8itvh$(43); else this$.append_pdl1vj$(percentEncode(it)); return Unit; }; } function encodeURLParameter($receiver, spaceToPlus) { if (spaceToPlus === void 0) spaceToPlus = false; var $receiver_0 = StringBuilder_init_0(); var content = encode(charsets.Charsets.UTF_8.newEncoder(), $receiver); forEach(content, encodeURLParameter$lambda$lambda($receiver_0, spaceToPlus)); return $receiver_0.toString(); } function encodeURLParameterValue$lambda$lambda(this$) { return function(it) { if (URL_ALPHABET.contains_11rb$(it) || OAUTH_SYMBOLS.contains_11rb$(it) || it === toByte(61 | 0)) this$.append_s8itvh$(toChar(it)); else if (it === toByte(32 | 0)) this$.append_s8itvh$(43); else this$.append_pdl1vj$(percentEncode(it)); return Unit; }; } function encodeURLParameterValue($receiver) { var $receiver_0 = StringBuilder_init_0(); var content = encode(charsets.Charsets.UTF_8.newEncoder(), $receiver); forEach(content, encodeURLParameterValue$lambda$lambda($receiver_0)); return $receiver_0.toString(); } function decodeURLQueryComponent($receiver, start, end, plusIsSpace, charset) { if (start === void 0) start = 0; if (end === void 0) end = $receiver.length; if (plusIsSpace === void 0) plusIsSpace = false; if (charset === void 0) charset = charsets.Charsets.UTF_8; return decodeScan($receiver, start, end, plusIsSpace, charset); } function decodeURLPart($receiver, start, end, charset) { if (start === void 0) start = 0; if (end === void 0) end = $receiver.length; if (charset === void 0) charset = charsets.Charsets.UTF_8; return decodeScan($receiver, start, end, false, charset); } function decodeScan($receiver, start, end, plusIsSpace, charset) { for (var index = start; index < end; index++) { var ch = $receiver.charCodeAt(index); if (ch === 37 || (plusIsSpace && ch === 43)) { return decodeImpl($receiver, start, end, index, plusIsSpace, charset); } } return start === 0 && end === $receiver.length ? $receiver.toString() : $receiver.substring(start, end); } function decodeImpl($receiver, start, end, prefixEnd, plusIsSpace, charset) { var tmp$; var length = end - start | 0; var sbSize = length > 255 ? length / 3 | 0 : length; var sb = StringBuilder_init(sbSize); if (prefixEnd > start) { sb.append_ezbsdh$($receiver, start, prefixEnd); } var index = prefixEnd; var bytes = null; while (index < end) { var c = $receiver.charCodeAt(index); if (plusIsSpace && c === 43) { sb.append_s8itvh$(32); index = index + 1 | 0; } else if (c === 37) { if (bytes == null) { bytes = new Int8Array((end - index | 0) / 3 | 0); } var count = 0; while (index < end && $receiver.charCodeAt(index) === 37) { if ((index + 2 | 0) >= end) { var startIndex = index; var endIndex; endIndex = $receiver.length; throw new URLDecodeException('Incomplete trailing HEX escape: ' + Kotlin.subSequence($receiver, startIndex, endIndex).toString() + ', in ' + $receiver + ' at ' + index); } var digit1 = charToHexDigit($receiver.charCodeAt(index + 1 | 0)); var digit2 = charToHexDigit($receiver.charCodeAt(index + 2 | 0)); if (digit1 === -1 || digit2 === -1) { throw new URLDecodeException('Wrong HEX escape: %' + String.fromCharCode($receiver.charCodeAt(index + 1 | 0)) + String.fromCharCode($receiver.charCodeAt(index + 2 | 0)) + ', in ' + $receiver + ', at ' + index); } bytes[tmp$ = count , count = tmp$ + 1 | 0 , tmp$] = toByte((digit1 * 16 | 0) + digit2 | 0); index = index + 3 | 0; } sb.append_pdl1vj$(String_0(bytes, 0, count, charset)); } else { sb.append_s8itvh$(c); index = index + 1 | 0; } } return sb.toString(); } function URLDecodeException(message) { Exception_init(message, this); this.name = 'URLDecodeException'; } URLDecodeException.$metadata$ = { kind: Kind_CLASS, simpleName: 'URLDecodeException', interfaces: [Exception]}; function percentEncode($receiver) { var $receiver_0 = StringBuilder_init(3); var code = $receiver & 255; $receiver_0.append_s8itvh$(37); $receiver_0.append_s8itvh$(hexDigitToChar(code >> 4)); $receiver_0.append_s8itvh$(hexDigitToChar(code & 15)); return $receiver_0.toString(); } function charToHexDigit(c2) { if ((new CharRange(48, 57)).contains_mef7kx$(c2)) return c2 - 48; else if ((new CharRange(65, 70)).contains_mef7kx$(c2)) return c2 - 65 + 10 | 0; else if ((new CharRange(97, 102)).contains_mef7kx$(c2)) return c2 - 97 + 10 | 0; else return -1; } function hexDigitToChar(digit) { if (digit >= 0 && digit <= 9) return toChar(48 + digit); else return toChar(toChar(65 + digit) - 10); } function forEach($receiver, block) { takeWhile$break: do { var tmp$, tmp$_0; var release = true; tmp$ = prepareReadFirstHead($receiver, 1); if (tmp$ == null) { break takeWhile$break; } var current = tmp$; try { do { var buffer = current; while (buffer.writePosition > buffer.readPosition) { block(buffer.readByte()); } if (!true) { break; } release = false; tmp$_0 = prepareReadNextHead($receiver, current); if (tmp$_0 == null) { break; } var next = tmp$_0; current = next; release = true; } while (true); } finally { if (release) { completeReadHead($receiver, current); } } } while (false); } function ContentDisposition(disposition, parameters) { ContentDisposition$Companion_getInstance(); if (parameters === void 0) parameters = emptyList(); HeaderValueWithParameters.call(this, disposition, parameters); } Object.defineProperty(ContentDisposition.prototype, 'disposition', { configurable: true, get: function() { return this.content; }}); Object.defineProperty(ContentDisposition.prototype, 'name', { configurable: true, get: function() { return this.parameter_61zpoe$(ContentDisposition$Parameters_getInstance().Name); }}); ContentDisposition.prototype.withParameter_puj7f4$ = function(key, value) { return new ContentDisposition(this.disposition, plus_2(this.parameters, new HeaderValueParam(key, value))); }; ContentDisposition.prototype.withParameters_1wyvw$ = function(newParameters) { return new ContentDisposition(this.disposition, plus_0(this.parameters, newParameters)); }; ContentDisposition.prototype.equals = function(other) { return Kotlin.isType(other, ContentDisposition) && equals(this.disposition, other.disposition) && equals(this.parameters, other.parameters); }; ContentDisposition.prototype.hashCode = function() { return (hashCode(this.disposition) * 31 | 0) + hashCode(this.parameters) | 0; }; function ContentDisposition$Companion() { ContentDisposition$Companion_instance = this; this.File = new ContentDisposition('file'); this.Mixed = new ContentDisposition('mixed'); this.Attachment = new ContentDisposition('attachment'); this.Inline = new ContentDisposition('inline'); } ContentDisposition$Companion.prototype.parse_61zpoe$ = function(value) { var headerValue = single(parseHeaderValue(value)); return new ContentDisposition(headerValue.value, headerValue.params); }; ContentDisposition$Companion.$metadata$ = { kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ContentDisposition$Companion_instance = null; function ContentDisposition$Companion_getInstance() { if (ContentDisposition$Companion_instance === null) { new ContentDisposition$Companion(); } return ContentDisposition$Companion_instance; } function ContentDisposition$Parameters() { ContentDisposition$Parameters_instance = this; this.FileName = 'filename'; this.FileNameAsterisk = 'filename*'; this.Name = 'name'; this.CreationDate = 'creation-date'; this.ModificationDate = 'modification-date'; this.ReadDate = 'read-date'; this.Size = 'size'; this.Handling = 'handling'; } ContentDisposition$Parameters.$metadata$ = { kind: Kind_OBJECT, simpleName: 'Parameters', interfaces: []}; var ContentDisposition$Parameters_instance = null; function ContentDisposition$Parameters_getInstance() { if (ContentDisposition$Parameters_instance === null) { new ContentDisposition$Parameters(); } return ContentDisposition$Parameters_instance; } ContentDisposition.$metadata$ = { kind: Kind_CLASS, simpleName: 'ContentDisposition', interfaces: [HeaderValueWithParameters]}; function contentRangeHeaderValue(range, fullLength, unit) { if (fullLength === void 0) fullLength = null; if (unit === void 0) unit = RangeUnits$Bytes_getInstance(); return contentRangeHeaderValue_0(range, fullLength, unit.unitToken); } function contentRangeHeaderValue_0(range, fullLength, unit) { if (fullLength === void 0) fullLength = null; if (unit === void 0) unit = RangeUnits$Bytes_getInstance().unitToken; var $receiver = StringBuilder_init_0(); $receiver.append_pdl1vj$(unit); $receiver.append_pdl1vj$(' '); if (range != null) { $receiver.append_s8jyv4$(range.start); $receiver.append_s8itvh$(45); $receiver.append_s8jyv4$(range.endInclusive); } else { $receiver.append_s8itvh$(42); } $receiver.append_s8itvh$(47); $receiver.append_s8jyv4$(fullLength != null ? fullLength : '*'); return $receiver.toString(); } function ContentTypeMatcher() { } ContentTypeMatcher.$metadata$ = { kind: Kind_INTERFACE, simpleName: 'ContentTypeMatcher', interfaces: []}; function ContentType(contentType, contentSubtype, existingContent, parameters) { ContentType$Companion_getInstance(); if (parameters === void 0) parameters = emptyList(); HeaderValueWithParameters.call(this, existingContent, parameters); this.contentType = contentType; this.contentSubtype = contentSubtype; } ContentType.prototype.withParameter_puj7f4$ = function(name, value) { if (this.hasParameter_0(name, value)) return this; return new ContentType(this.contentType, this.contentSubtype, this.content, plus_2(this.parameters, new HeaderValueParam(name, value))); }; ContentType.prototype.hasParameter_0 = function(name, value) { loop_label: switch (this.parameters.size) { case 0: return false; case 1: var it = this.parameters.get_za3lpa$(0); return equals_0(it.name, name, true) && equals_0(it.value, value, true); default: var $receiver = this.parameters; var any$result; any$break: do { var tmp$; if (Kotlin.isType($receiver, Collection) && $receiver.isEmpty()) { any$result = false; break any$break; } tmp$ = $receiver.iterator(); while (tmp$.hasNext()) { var element = tmp$.next(); if (equals_0(element.name, name, true) && equals_0(element.value, value, true)) { any$result = true; break any$break; } } any$result = false; } while (false); return any$result; } }; ContentType.prototype.withoutParameters = function() { return ContentType_init(this.contentType, this.contentSubtype); }; ContentType.prototype.match_9v5yzd$ = function(pattern) { var tmp$, tmp$_0; if (!equals(pattern.contentType, '*') && !equals_0(pattern.contentType, this.contentType, true)) { return false; } if (!equals(pattern.contentSubtype, '*') && !equals_0(pattern.contentSubtype, this.contentSubtype, true)) { return false; } tmp$ = pattern.parameters.iterator(); loop_label: while (tmp$.hasNext()) { var tmp$_1 = tmp$.next(); var patternName = tmp$_1.component1(), patternValue = tmp$_1.component2(); if (equals(patternName, '*')) { if (equals(patternValue, '*')) tmp$_0 = true; else { var $receiver = this.parameters; var any$result; any$break: do { var tmp$_2; if (Kotlin.isType($receiver, Collection) && $receiver.isEmpty()) { any$result = false; break any$break; } tmp$_2 = $receiver.iterator(); while (tmp$_2.hasNext()) { var element = tmp$_2.next(); if (equals_0(element.value, patternValue, true)) { any$result = true; break any$break; } } any$result = false; } while (false); tmp$_0 = any$result; } } else { var value = this.parameter_61zpoe$(patternName); if (equals(patternValue, '*')) tmp$_0 = value != null; else tmp$_0 = equals_0(value, patternValue, true); } var matches = tmp$_0; if (!matches) { return false; } } return true; }; ContentType.prototype.match_61zpoe$ = function(pattern) { return this.match_9v5yzd$(ContentType$Companion_getInstance().parse_61zpoe$(pattern)); }; ContentType.prototype.equals = function(other) { return Kotlin.isType(other, ContentType) && equals_0(this.contentType, other.contentType, true) && equals_0(this.contentSubtype, other.contentSubtype, true) && equals(this.parameters, other.parameters); }; ContentType.prototype.hashCode = function() { var result = hashCode(this.contentType.toLowerCase()); result = result + ((31 * result | 0) + hashCode(this.contentSubtype.toLowerCase())) | 0; result = result + (31 * hashCode(this.parameters) | 0) | 0; return result; }; function ContentType$Companion() { ContentType$Companion_instance = this; this.Any = ContentType_init('*', '*'); } ContentType$Companion.prototype.parse_61zpoe$ = function(value) { if (isBlank(value)) return this.Any; var headerValue = single(parseHeaderValue(value)); var parts = headerValue.value; var parameters = headerValue.params; var slash = indexOf(parts, 47); if (slash === -1) { var tmp$; if (equals(trim(Kotlin.isCharSequence(tmp$ = parts) ? tmp$ : throwCCE()).toString(), '*')) { return this.Any; } throw new BadContentTypeFormatException(value); } var $receiver = parts.substring(0, slash); var tmp$_0; var type = trim(Kotlin.isCharSequence(tmp$_0 = $receiver) ? tmp$_0 : throwCCE()).toString(); if (type.length === 0) { throw new BadContentTypeFormatException(value); } var startIndex = slash + 1 | 0; var $receiver_0 = parts.substring(startIndex); var tmp$_1; var subtype = trim(Kotlin.isCharSequence(tmp$_1 = $receiver_0) ? tmp$_1 : throwCCE()).toString(); if (subtype.length === 0 || contains(subtype, 47)) { throw new BadContentTypeFormatException(value); } return ContentType_init(type, subtype, parameters); }; ContentType$Companion.$metadata$ = { kind: Kind_OBJECT, simpleName: 'Companion', interfaces: []}; var ContentType$Companion_instance = null; function ContentType$Companion_getInstance() { if (ContentType$Companion_instance === null) { new ContentType$Companion(); } return ContentType$Companion_instance; } function ContentType$Application() { ContentType$Application_instance = this; this.Any = ContentType_init('application', '*'); this.Atom = ContentType_init('application', 'atom+xml'); this.Cbor = ContentType_init('application', 'cbor'); this.Json = ContentType_init('application', 'json'); this.HalJson = ContentType_init('application', 'hal+json'); this.JavaScript = ContentType_init('application', 'javascript'); this.OctetStream = ContentType_init('application', 'octet-stream'); this.FontWoff = ContentType_init('application', 'font-woff'); this.Rss = ContentType_init('application', 'rss+xml'); this.Xml = ContentType_init('application', 'xml'); this.Xml_Dtd = ContentType_init('application', 'xml-dtd'); this.Zip = ContentType_init('application', 'zip'); this.GZip = ContentType_init('application', 'gzip'); this.FormUrlEncoded = ContentType_init('application', 'x-www-form-urlencoded'); this.Pdf = ContentType_init('application', 'pdf'); this.ProtoBuf = ContentType_init('application', 'protobuf'); this.Wasm = ContentType_init('application', 'wasm'); this.ProblemJson = ContentType_init('application', 'problem+json'); this.ProblemXml = ContentType_init('application', 'problem+xml'); } ContentType$Application.$metadata$ = { kind: Kind_OBJECT, simpleName: 'Application', interfaces: []}; var ContentType$Application_instance = null; function ContentType$Application_getInstance() { if (ContentType$Application_instance === null) { new ContentType$Application(); } return ContentType$Application_instance; } function ContentType$Audio() { ContentType$Audio_instance = this; this.Any = ContentType_init('audio', '*'); this.MP4 = ContentType_init('audio', 'mp4'); this.MPEG = ContentType_init('audio', 'mpeg'); this.OGG = ContentType_init('audio', 'ogg'); } ContentType$Audio.$metadata$ = { kind: Kind_OBJECT, simpleName: 'Audio', interfaces: []}; var ContentType$Audio_instance = null; function ContentType$Audio_getInstance() { if (ContentType$Audio_instance === null) { new ContentType$Audio(); } return ContentType$Audio_instance; } function ContentType$Image() { ContentType$Image_instance = this; this.Any = ContentType_init('image', '*'); this.GIF = ContentType_init('image', 'gif'); this.JPEG = ContentType_init('image', 'jpeg'); this.PNG = ContentType_init('image', 'png'); this.SVG = ContentType_init('image', 'svg+xml'); this.XIcon = ContentType_init('image', 'x-icon'); } ContentType$Image.$metadata$ = { kind: Kind_OBJECT, simpleName: 'Image', interfaces: []}; var ContentType$Image_instance = null; function ContentType$Image_getInstance() { if (ContentType$Image_instance === null) { new ContentType$Image(); } return ContentType$Image_instance; } function ContentType$Message() { ContentType$Message_instance = this; this.Any = ContentType_init('message', '*'); this.Http = ContentType_init('message', 'http'); } ContentType$Message.$metadata$ = { kind: Kind_OBJECT, simpleName: 'Message', interfaces: []}; var ContentType$Message_instance = null; function ContentType$Message_getInstance() { if (ContentType$Message_instance === null) { new ContentType$Message(); } return ContentType$Message_instance; } function ContentType$MultiPart() { ContentType$MultiPart_instance = this; this.Any = ContentType_init('multipart', '*'); this.Mixed = ContentType_init('multipart', 'mixed'); this.Alternative = ContentType_init('multipart', 'alternative'); this.Related = ContentType_init('multipart', 'related'); this.FormData = ContentType_init('multipart', 'form-data'); this.Signed = ContentType_init('multipart', 'signed'); this.Encrypted = ContentType_init('multipart', 'encrypted'); this.ByteRanges = ContentType_init('multipart', 'byteranges'); } ContentType$MultiPart.$metadata$ = { kind: Kind_OBJECT, simpleName: 'MultiPart', interfaces: []}; var ContentType$MultiPart_instance = null; function ContentType$MultiPart_getInstance() { if (ContentType$MultiPart_instance === null) { new ContentType$MultiPart(); } return ContentType$MultiPart_instance; } function ContentType$Text() { ContentType$Text_instance = this; this.Any = ContentType_init('text', '*'); this.Plain = ContentType_init('text', 'plain'); this.CSS = ContentType_init('text', 'css'); this.CSV = ContentType_init('text', 'csv'); this.Html = ContentType_init('text', 'html'); this.JavaScript = ContentType_init('text', 'javascript'); this.VCard = ContentType_init('text', 'vcard'); this.Xml = ContentType_init('text', 'xml'); this.EventStream = ContentType_init('text', 'event-stream'); } ContentType$Text.$metadata$ = { kind: Kind_OBJECT, simpleName: 'Text', interfaces: []}; var ContentType$Text_instance = null; function ContentType$Text_getInstance() { if (ContentType$Text_instance === null) { new ContentType$Text(); } return ContentType$Text_instance; } function ContentType$Video() { ContentType$Video_instance = this; this.Any = ContentType_init('video', '*'); this.MPEG = ContentType_init('video', 'mpeg'); this.MP4 = ContentType_init('video', 'mp4'); this.OGG = ContentType_init('video', 'ogg'); this.QuickTime = ContentType_init('video', 'quicktime'); } ContentType$Video.$metadata$ = { kind: Kind_OBJECT, simpleName: 'Video', interfaces: []}; var ContentType$Video_instance = null; function ContentType$Video_getInstance() { if (ContentType$Video_instance === null) { new ContentType$Video(); } return ContentType$Video_instance; } ContentType.$metadata$ = { kind: Kind_CLASS, simpleName: 'ContentType', interfaces: [HeaderValueWithParameters]}; function ContentType_init(contentType, contentSubtype, parameters, $this) { if (parameters === void 0) parameters = emptyList(); $this = $this || Object.create(ContentType.prototype); ContentType.call($this, contentType, contentSubtype, contentType + '/' + contentSubtype, parameters); return $this; } function BadContentTypeFormatException(value) { Exception_init('Bad Content-Type format: ' + value, this); this.name = 'BadContentTypeFormatException'; } BadContentTypeFormatException.$metadata$ = { kind: Kind_CLASS, simpleName: 'BadContentTypeFormatException', interfaces: [Exception]}; function withCharset($receiver, charset) { return $receiver.withParameter_puj7f4$('charset', get_name(charset)); } function charset($receiver) { var tmp$; return (tmp$ = $receiver.parameter_61zpoe$('charset')) != null ? Charset.Companion.forName_61zpoe$(tmp$) : null; } function Cookie(name, value, encoding,