(function (_, $module$react, $module$react_router_h6p15h, com_ustadmobile_core_wrappers_compressorjs_default_j4zdfk, $module$libphonenumber_js_s63wkw, XXH, $module$react_router_dom_s6xi74, $module$uuid, kotlin_kotlin, kotlin_dev_icerock_moko_resources, kotlin_com_ustadmobile_app_lib_database, kotlin_org_kodein_di_kodein_di, kotlin_org_kodein_type_kaverit, kotlin_com_github_UstadMobile_door_door_runtime, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core, kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core, kotlin_io_ktor_ktor_client_core, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json, kotlin_io_ktor_ktor_http, kotlin_org_jetbrains_kotlinx_atomicfu, kotlin_io_github_pdvrieze_xmlutil_serialization, kotlin_io_github_pdvrieze_xmlutil_core, kotlin_io_github_aakira_napier, kotlin_com_benasher44_uuid, kotlin_com_ustadmobile_app_lib_util, kotlin_org_jetbrains_kotlinx_kotlinx_datetime, kotlin_net_thauvin_erik_urlencoder_urlencoder_lib, kotlin_com_github_UstadMobile_xmlpullparserkmp, kotlin_io_ktor_ktor_utils, kotlin_app_cash_paging_paging_common, kotlin_moe_tlaster_precompose_viewmodel, kotlin_com_russhwolf_multiplatform_settings, kotlin_org_jetbrains_kotlin_wrappers_kotlin_react_core, kotlin_org_jetbrains_kotlin_wrappers_kotlin_react, kotlin_org_jetbrains_kotlin_wrappers_kotlin_web, kotlin_io_ktor_ktor_io, kotlin_org_jetbrains_kotlin_wrappers_kotlin_js) {
  'use strict';
  //region block: imports
  var imul = Math.imul;
  var createContext = $module$react.createContext;
  var useState = $module$react.useState;
  var useNavigate = $module$react_router_h6p15h.useNavigate;
  var useLocation = $module$react_router_h6p15h.useLocation;
  var useMemo = $module$react.useMemo;
  var useState_0 = $module$react.useState;
  var parsePhoneNumber = $module$libphonenumber_js_s63wkw.parsePhoneNumber;
  var useSearchParams = $module$react_router_dom_s6xi74.useSearchParams;
  var v4 = $module$uuid.v4;
  var THROW_CCE = kotlin_kotlin.$_$.ci;
  var SupportedLocale = kotlin_dev_icerock_moko_resources.$_$.b;
  var listOf = kotlin_kotlin.$_$.j8;
  var SupportedLocales = kotlin_dev_icerock_moko_resources.$_$.a;
  var Impl = kotlin_dev_icerock_moko_resources.$_$.d;
  var StringResource = kotlin_dev_icerock_moko_resources.$_$.f;
  var protoOf = kotlin_kotlin.$_$.uc;
  var objectMeta = kotlin_kotlin.$_$.tc;
  var setMetadataFor = kotlin_kotlin.$_$.vc;
  var PluralsResource = kotlin_dev_icerock_moko_resources.$_$.e;
  var VOID = kotlin_kotlin.$_$.f;
  var getBooleanHashCode = kotlin_kotlin.$_$.pb;
  var equals = kotlin_kotlin.$_$.mb;
  var classMeta = kotlin_kotlin.$_$.jb;
  var IllegalStateException = kotlin_kotlin.$_$.th;
  var IllegalStateException_init_$Init$ = kotlin_kotlin.$_$.b2;
  var captureStack = kotlin_kotlin.$_$.db;
  var CoroutineImpl = kotlin_kotlin.$_$.ta;
  var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.fa;
  var PersonAuth2 = kotlin_com_ustadmobile_app_lib_database.$_$.h4;
  var Companion_instance = kotlin_com_ustadmobile_app_lib_database.$_$.o7;
  var Unit_instance = kotlin_kotlin.$_$.m5;
  var Companion_instance_0 = kotlin_org_kodein_di_kodein_di.$_$.c;
  var getKClass = kotlin_kotlin.$_$.e;
  var arrayOf = kotlin_kotlin.$_$.ri;
  var createKType = kotlin_kotlin.$_$.b;
  var typeToken = kotlin_org_kodein_type_kaverit.$_$.d;
  var TypeToken = kotlin_org_kodein_type_kaverit.$_$.b;
  var isInterface = kotlin_kotlin.$_$.ec;
  var On = kotlin_org_kodein_di_kodein_di.$_$.n;
  var Companion_instance_1 = kotlin_com_github_UstadMobile_door_door_runtime.$_$.z2;
  var UmAppDatabase = kotlin_com_ustadmobile_app_lib_database.$_$.i;
  var Instance = kotlin_org_kodein_di_kodein_di.$_$.m;
  var InstanceOrNull = kotlin_org_kodein_di_kodein_di.$_$.l;
  var get_diContext = kotlin_org_kodein_di_kodein_di.$_$.i;
  var get_diTrigger = kotlin_org_kodein_di_kodein_di.$_$.j;
  var DIAware = kotlin_org_kodein_di_kodein_di.$_$.k;
  var KProperty1 = kotlin_kotlin.$_$.td;
  var getPropertyCallableRef = kotlin_kotlin.$_$.sb;
  var PluginGeneratedSerialDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.u2;
  var StringSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.w;
  var UnknownFieldException_init_$Create$ = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.f;
  var typeParametersSerializers = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.p2;
  var GeneratedSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.q2;
  var throwMissingFieldException = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.z2;
  var objectCreate = kotlin_kotlin.$_$.sc;
  var getStringHashCode = kotlin_kotlin.$_$.tb;
  var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.v;
  var StandardScopeRegistry = kotlin_org_kodein_di_kodein_di.$_$.g;
  var $serializer_getInstance = kotlin_com_ustadmobile_app_lib_database.$_$.m7;
  var $serializer_getInstance_0 = kotlin_com_ustadmobile_app_lib_database.$_$.q7;
  var get_nullable = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.a1;
  var $serializer_getInstance_1 = kotlin_com_ustadmobile_app_lib_database.$_$.c8;
  var $serializer_getInstance_2 = kotlin_com_ustadmobile_app_lib_database.$_$.t7;
  var removePrefix = kotlin_kotlin.$_$.of;
  var removeSuffix = kotlin_kotlin.$_$.pf;
  var hashCode = kotlin_kotlin.$_$.ub;
  var compareValues = kotlin_kotlin.$_$.da;
  var List = kotlin_kotlin.$_$.w5;
  var ArrayList_init_$Create$ = kotlin_kotlin.$_$.m;
  var collectionSizeOrDefault = kotlin_kotlin.$_$.n6;
  var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.l;
  var UserSession = kotlin_com_ustadmobile_app_lib_database.$_$.x4;
  var Person = kotlin_com_ustadmobile_app_lib_database.$_$.m4;
  var sortedWith = kotlin_kotlin.$_$.m9;
  var plus = kotlin_kotlin.$_$.x8;
  var CoroutineScope = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.x1;
  var get_direct = kotlin_org_kodein_di_kodein_di.$_$.o;
  var launch = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.k2;
  var collectLatest = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.c;
  var PersonAndPicture = kotlin_com_ustadmobile_app_lib_database.$_$.e1;
  var shallowCopy = kotlin_com_ustadmobile_app_lib_database.$_$.s1;
  var KProperty0 = kotlin_kotlin.$_$.sd;
  var THROW_ISE = kotlin_kotlin.$_$.ei;
  var getLocalDelegateReference = kotlin_kotlin.$_$.qb;
  var HttpResponse = kotlin_io_ktor_ktor_client_core.$_$.p;
  var Pair = kotlin_kotlin.$_$.zh;
  var bodyAsText = kotlin_io_ktor_ktor_client_core.$_$.a;
  var serializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.u3;
  var KSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.i3;
  var get_doorPrimaryKeyManager = kotlin_com_github_UstadMobile_door_door_runtime.$_$.k;
  var Companion_instance_2 = kotlin_com_ustadmobile_app_lib_database.$_$.d8;
  var get_doorWrapperNodeId = kotlin_com_github_UstadMobile_door_door_runtime.$_$.l;
  var systemTimeInMillis = kotlin_com_github_UstadMobile_door_door_runtime.$_$.b2;
  var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.a2;
  var listOf_0 = kotlin_kotlin.$_$.i8;
  var Default_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.a;
  var StringCompanionObject_instance = kotlin_kotlin.$_$.a5;
  var serializer_0 = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.b1;
  var ListSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.x;
  var toSet = kotlin_kotlin.$_$.y9;
  var toList = kotlin_kotlin.$_$.r9;
  var Long = kotlin_kotlin.$_$.vh;
  var Comparator = kotlin_kotlin.$_$.mh;
  var FlowCollector = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.b1;
  var HttpRequestBuilder = kotlin_io_ktor_ktor_client_core.$_$.j;
  var url = kotlin_io_ktor_ktor_client_core.$_$.n;
  var Application_getInstance = kotlin_io_ktor_ktor_http.$_$.b;
  var contentType = kotlin_io_ktor_ktor_http.$_$.b1;
  var setBodyJson = kotlin_com_github_UstadMobile_door_door_runtime.$_$.q;
  var Companion_getInstance = kotlin_io_ktor_ktor_http.$_$.g;
  var HttpStatement = kotlin_io_ktor_ktor_client_core.$_$.q;
  var Exception_init_$Create$ = kotlin_kotlin.$_$.n1;
  var withDoorTransactionAsync = kotlin_com_github_UstadMobile_door_door_runtime.$_$.u2;
  var NodeIdAndAuth = kotlin_com_github_UstadMobile_door_door_runtime.$_$.b;
  var toHexString = kotlin_kotlin.$_$.ng;
  var to = kotlin_kotlin.$_$.ij;
  var DoorDatabaseRepository = kotlin_com_github_UstadMobile_door_door_runtime.$_$.e2;
  var parameter = kotlin_io_ktor_ktor_client_core.$_$.m;
  var header = kotlin_io_ktor_ktor_client_core.$_$.l;
  var set_expectSuccess = kotlin_io_ktor_ktor_client_core.$_$.h;
  var Companion_getInstance_0 = kotlin_io_ktor_ktor_http.$_$.i;
  var UmAccount = kotlin_com_ustadmobile_app_lib_database.$_$.w4;
  var ensureNotNull = kotlin_kotlin.$_$.ui;
  var addAll = kotlin_kotlin.$_$.e6;
  var Companion_instance_3 = kotlin_com_ustadmobile_app_lib_database.$_$.n7;
  var Companion_instance_4 = kotlin_com_ustadmobile_app_lib_database.$_$.p7;
  var HttpClient = kotlin_io_ktor_ktor_client_core.$_$.t;
  var Json = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.o;
  var atomic$boolean$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.c;
  var Dispatchers_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.u;
  var Job = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.y1;
  var CoroutineScope_0 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.w1;
  var MutableStateFlow = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.d1;
  var asStateFlow = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.g1;
  var withContext = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.k;
  var isCharSequence = kotlin_kotlin.$_$.ac;
  var trim = kotlin_kotlin.$_$.eh;
  var toString = kotlin_kotlin.$_$.zc;
  var buildClassSerialDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.u1;
  var XmlInput = kotlin_io_github_pdvrieze_xmlutil_serialization.$_$.c;
  var EventType_END_ELEMENT_getInstance = kotlin_io_github_pdvrieze_xmlutil_core.$_$.d;
  var EventType_START_ELEMENT_getInstance = kotlin_io_github_pdvrieze_xmlutil_core.$_$.f;
  var XmlSerialName = kotlin_io_github_pdvrieze_xmlutil_serialization.$_$.e;
  var ArrayListSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.n2;
  var emptyList = kotlin_kotlin.$_$.i7;
  var XmlValue = kotlin_io_github_pdvrieze_xmlutil_serialization.$_$.f;
  var Regex_init_$Create$ = kotlin_kotlin.$_$.d1;
  var contains = kotlin_kotlin.$_$.oe;
  var firstOrNull = kotlin_kotlin.$_$.n7;
  var LinkedHashMapSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.s2;
  var IntSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.u;
  var LongSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.v;
  var BooleanSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.r;
  var IllegalArgumentException = kotlin_kotlin.$_$.sh;
  var IllegalArgumentException_init_$Init$ = kotlin_kotlin.$_$.v1;
  var $serializer_getInstance_3 = kotlin_com_ustadmobile_app_lib_database.$_$.v6;
  var $serializer_getInstance_4 = kotlin_com_ustadmobile_app_lib_database.$_$.s6;
  var mapOf = kotlin_kotlin.$_$.m8;
  var Companion_instance_5 = kotlin_com_ustadmobile_app_lib_database.$_$.h6;
  var Companion_getInstance_1 = kotlin_com_ustadmobile_app_lib_database.$_$.w6;
  var interfaceMeta = kotlin_kotlin.$_$.vb;
  var Exception = kotlin_kotlin.$_$.rh;
  var Exception_init_$Init$ = kotlin_kotlin.$_$.m1;
  var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.u1;
  var shallowCopy_0 = kotlin_com_ustadmobile_app_lib_database.$_$.p1;
  var Napier_getInstance = kotlin_io_github_aakira_napier.$_$.g;
  var uuid4 = kotlin_com_benasher44_uuid.$_$.a;
  var Companion_getInstance_2 = kotlin_kotlin.$_$.g5;
  var serializer_1 = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.i1;
  var MapSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.y;
  var plus_0 = kotlin_kotlin.$_$.r8;
  var XapiSessionEntity = kotlin_com_ustadmobile_app_lib_database.$_$.q2;
  var NoSuchElementException_init_$Create$ = kotlin_kotlin.$_$.f2;
  var compareTo = kotlin_kotlin.$_$.kb;
  var mapOf_0 = kotlin_kotlin.$_$.l8;
  var shallowCopy_1 = kotlin_com_ustadmobile_app_lib_database.$_$.v1;
  var PersonNames = kotlin_com_ustadmobile_app_lib_database.$_$.f1;
  var first = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.e;
  var toLong = kotlin_kotlin.$_$.xc;
  var toString_0 = kotlin_kotlin.$_$.hj;
  var CancellationException = kotlin_kotlin.$_$.ea;
  var Enum = kotlin_kotlin.$_$.ph;
  var Companion_instance_6 = kotlin_com_ustadmobile_app_lib_database.$_$.x6;
  var Companion_instance_7 = kotlin_com_ustadmobile_app_lib_database.$_$.u7;
  var Companion_instance_8 = kotlin_com_ustadmobile_app_lib_database.$_$.e7;
  var Companion_instance_9 = kotlin_com_ustadmobile_app_lib_database.$_$.z6;
  var Companion_instance_10 = kotlin_com_ustadmobile_app_lib_database.$_$.t6;
  var charSequenceLength = kotlin_kotlin.$_$.hb;
  var Companion_getInstance_3 = kotlin_com_github_UstadMobile_door_door_runtime.$_$.c3;
  var get_isActive = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.i2;
  var delay = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.j;
  var TransferJobItemStatus_COMPLETE_getInstance = kotlin_com_ustadmobile_app_lib_database.$_$.y4;
  var atomic$ref$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.e;
  var plus_1 = kotlin_kotlin.$_$.y8;
  var Companion_instance_11 = kotlin_com_ustadmobile_app_lib_database.$_$.u6;
  var Companion_getInstance_4 = kotlin_com_ustadmobile_app_lib_database.$_$.g6;
  var randomString = kotlin_com_ustadmobile_app_lib_util.$_$.c;
  var Companion_instance_12 = kotlin_com_ustadmobile_app_lib_database.$_$.i6;
  var Companion_getInstance_5 = kotlin_com_ustadmobile_app_lib_database.$_$.d7;
  var CoursePermission = kotlin_com_ustadmobile_app_lib_database.$_$.t3;
  var Exception_init_$Init$_0 = kotlin_kotlin.$_$.l1;
  var IllegalStateException_init_$Init$_0 = kotlin_kotlin.$_$.x1;
  var Companion_instance_13 = kotlin_com_ustadmobile_app_lib_database.$_$.j7;
  var ClazzEnrolment_init_$Create$ = kotlin_com_ustadmobile_app_lib_database.$_$.e5;
  var Companion_getInstance_6 = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.e;
  var IllegalArgumentException_init_$Create$_0 = kotlin_kotlin.$_$.s1;
  var EnrolmentRequest = kotlin_com_ustadmobile_app_lib_database.$_$.x3;
  var LazyThreadSafetyMode_PUBLICATION_getInstance = kotlin_kotlin.$_$.i;
  var lazy = kotlin_kotlin.$_$.zi;
  var NoSuchElementException_init_$Create$_0 = kotlin_kotlin.$_$.h2;
  var SerializerFactory = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.v2;
  var enumEntries = kotlin_kotlin.$_$.xa;
  var INT_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.i;
  var PrimitiveSerialDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.l1;
  var mapCapacity = kotlin_kotlin.$_$.k8;
  var coerceAtLeast = kotlin_kotlin.$_$.hd;
  var LinkedHashMap_init_$Create$_0 = kotlin_kotlin.$_$.u;
  var UrlEncoderUtil_getInstance = kotlin_net_thauvin_erik_urlencoder_urlencoder_lib.$_$.a;
  var doorNodeIdHeader = kotlin_com_github_UstadMobile_door_door_runtime.$_$.j;
  var $serializer_getInstance_5 = kotlin_com_ustadmobile_app_lib_database.$_$.p6;
  var setInputString = kotlin_com_github_UstadMobile_xmlpullparserkmp.$_$.c;
  var substringBeforeLast = kotlin_kotlin.$_$.bg;
  var Collection = kotlin_kotlin.$_$.p5;
  var ContentEntryParentChildJoin = kotlin_com_ustadmobile_app_lib_database.$_$.f3;
  var toMutableList = kotlin_kotlin.$_$.v9;
  var checkIndexOverflow = kotlin_kotlin.$_$.l6;
  var Companion_instance_14 = kotlin_com_ustadmobile_app_lib_database.$_$.y6;
  var getOrNull = kotlin_kotlin.$_$.s7;
  var Companion_instance_15 = kotlin_com_ustadmobile_app_lib_database.$_$.h7;
  var Companion_instance_16 = kotlin_com_ustadmobile_app_lib_database.$_$.r6;
  var plus_2 = kotlin_kotlin.$_$.v8;
  var startsWith = kotlin_kotlin.$_$.wf;
  var emptySet = kotlin_kotlin.$_$.k7;
  var first_0 = kotlin_kotlin.$_$.p7;
  var atomic$int$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.f;
  var emptyMap = kotlin_kotlin.$_$.j7;
  var until = kotlin_kotlin.$_$.pd;
  var PeerReviewerAllocation = kotlin_com_ustadmobile_app_lib_database.$_$.f4;
  var Companion_instance_17 = kotlin_com_ustadmobile_app_lib_database.$_$.l7;
  var toMap = kotlin_kotlin.$_$.u9;
  var checkCountOverflow = kotlin_kotlin.$_$.k6;
  var shuffled = kotlin_kotlin.$_$.j9;
  var shallowCopy_2 = kotlin_com_ustadmobile_app_lib_database.$_$.b2;
  var SystemPermission = kotlin_com_ustadmobile_app_lib_database.$_$.s4;
  var Companion_instance_18 = kotlin_com_ustadmobile_app_lib_database.$_$.r7;
  var PersonParentJoin = kotlin_com_ustadmobile_app_lib_database.$_$.k4;
  var Companion_getInstance_7 = kotlin_com_ustadmobile_app_lib_database.$_$.a8;
  var IllegalArgumentException_init_$Init$_0 = kotlin_kotlin.$_$.t1;
  var filterNotNull = kotlin_kotlin.$_$.m7;
  var Iterator = kotlin_kotlin.$_$.t5;
  var numberToLong = kotlin_kotlin.$_$.rc;
  var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.u2;
  var indexOf = kotlin_kotlin.$_$.af;
  var charSequenceGet = kotlin_kotlin.$_$.gb;
  var isWhitespace = kotlin_kotlin.$_$.if;
  var Companion_instance_19 = kotlin_com_ustadmobile_app_lib_database.$_$.w5;
  var distinct = kotlin_kotlin.$_$.f7;
  var Exception_init_$Init$_1 = kotlin_kotlin.$_$.o1;
  var Json_0 = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.n;
  var uuidFrom = kotlin_com_benasher44_uuid.$_$.b;
  var Companion_getInstance_8 = kotlin_kotlin.$_$.e5;
  var _Duration___get_inWholeMilliseconds__impl__msfiry = kotlin_kotlin.$_$.s2;
  var XapiEntityObjectTypeFlags_instance = kotlin_com_ustadmobile_app_lib_database.$_$.c6;
  var plus_3 = kotlin_kotlin.$_$.u8;
  var System_instance = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.c;
  var Uuid_init_$Create$ = kotlin_com_benasher44_uuid.$_$.c;
  var encodeBase64 = kotlin_io_ktor_ktor_utils.$_$.v;
  var get_jsonPrimitive = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.v;
  var get_intOrNull = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.t;
  var JsonElementSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.c;
  var Companion_instance_20 = kotlin_com_ustadmobile_app_lib_database.$_$.x5;
  var PrimitiveClasses_getInstance = kotlin_kotlin.$_$.c5;
  var createInvariantKTypeProjection = kotlin_kotlin.$_$.a;
  var ActivityEntity = kotlin_com_ustadmobile_app_lib_database.$_$.f2;
  var Companion_instance_21 = kotlin_com_ustadmobile_app_lib_database.$_$.y5;
  var Companion_instance_22 = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.b;
  var ActivityExtensionEntity = kotlin_com_ustadmobile_app_lib_database.$_$.g2;
  var ActivityLangMapEntry = kotlin_com_ustadmobile_app_lib_database.$_$.i2;
  var ActivityInteractionEntity = kotlin_com_ustadmobile_app_lib_database.$_$.h2;
  var JsonContentPolymorphicSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.g;
  var get_jsonObject = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.u;
  var noWhenBranchMatchedException = kotlin_kotlin.$_$.bj;
  var ActorEntity = kotlin_com_ustadmobile_app_lib_database.$_$.j2;
  var JsonDecoder = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.h;
  var IllegalStateException_init_$Create$_0 = kotlin_kotlin.$_$.y1;
  var JsonObject = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.j;
  var Companion_instance_23 = kotlin_com_ustadmobile_app_lib_database.$_$.a6;
  var StatementContextActivityJoin = kotlin_com_ustadmobile_app_lib_database.$_$.l2;
  var Companion_instance_24 = kotlin_com_ustadmobile_app_lib_database.$_$.z5;
  var GroupMemberActorJoin = kotlin_com_ustadmobile_app_lib_database.$_$.k2;
  var serializer_2 = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.s3;
  var THROW_IAE = kotlin_kotlin.$_$.di;
  var FloatSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.t;
  var getNumberHashCode = kotlin_kotlin.$_$.rb;
  var StatementEntity = kotlin_com_ustadmobile_app_lib_database.$_$.n2;
  var StatementEntityJson = kotlin_com_ustadmobile_app_lib_database.$_$.m2;
  var JsonNull = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.i;
  var VerbEntity = kotlin_com_ustadmobile_app_lib_database.$_$.o2;
  var VerbLangMapEntry = kotlin_com_ustadmobile_app_lib_database.$_$.p2;
  var DurationUnit_MILLISECONDS_getInstance = kotlin_kotlin.$_$.g;
  var toDuration = kotlin_kotlin.$_$.hh;
  var Duration__toIsoString_impl_9h6wsm = kotlin_kotlin.$_$.t2;
  var JsonPrimitive = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.l;
  var atomic$long$1 = kotlin_org_jetbrains_kotlinx_atomicfu.$_$.d;
  var $serializer_getInstance_6 = kotlin_com_ustadmobile_app_lib_database.$_$.d6;
  var values = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.j;
  var split = kotlin_kotlin.$_$.vf;
  var isBlank = kotlin_kotlin.$_$.bf;
  var toInt = kotlin_kotlin.$_$.pg;
  var sorted = kotlin_kotlin.$_$.n9;
  var Module_init_$Create$ = kotlin_org_kodein_di_kodein_di.$_$.a;
  var ImplWithScope = kotlin_org_kodein_di_kodein_di.$_$.h;
  var Provider = kotlin_org_kodein_di_kodein_di.$_$.d;
  var Singleton = kotlin_org_kodein_di_kodein_di.$_$.f;
  var Companion_instance_25 = kotlin_com_ustadmobile_app_lib_database.$_$.v7;
  var Companion_instance_26 = kotlin_com_ustadmobile_app_lib_database.$_$.b6;
  var Companion_instance_27 = kotlin_com_ustadmobile_app_lib_database.$_$.o6;
  var Companion_instance_28 = kotlin_com_ustadmobile_app_lib_database.$_$.x7;
  var BufferOverflow_DROP_OLDEST_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.a;
  var MutableSharedFlow = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.c1;
  var asSharedFlow = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.f1;
  var PagingSource = kotlin_app_cash_paging_paging_common.$_$.i;
  var Page_init_$Create$ = kotlin_app_cash_paging_paging_common.$_$.j;
  var LoadResult = kotlin_app_cash_paging_paging_common.$_$.h;
  var JsonPrimitive_0 = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.k;
  var XmlPullParserConstants_instance = kotlin_com_github_UstadMobile_xmlpullparserkmp.$_$.d;
  var Char__toInt_impl_vasixd = kotlin_kotlin.$_$.b3;
  var mutableLinkedListOf = kotlin_com_github_UstadMobile_door_door_runtime.$_$.m;
  var ChannelResult__getOrThrow_impl_od1axs = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.o;
  var _ChannelResult___get_isSuccess__impl__odq1z9 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.p;
  var Channel = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.y;
  var fillArrayVal = kotlin_kotlin.$_$.ob;
  var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.f1;
  var endsWith = kotlin_kotlin.$_$.ve;
  var indexOf_0 = kotlin_kotlin.$_$.ze;
  var Char__compareTo_impl_ypi4mb = kotlin_kotlin.$_$.w2;
  var lastIndexOf = kotlin_kotlin.$_$.kf;
  var HashMap_init_$Create$ = kotlin_kotlin.$_$.p;
  var round = kotlin_kotlin.$_$.dd;
  var LazyThreadSafetyMode_NONE_getInstance = kotlin_kotlin.$_$.h;
  var lazy_0 = kotlin_kotlin.$_$.aj;
  var roundToInt = kotlin_kotlin.$_$.cd;
  var substringBefore = kotlin_kotlin.$_$.eg;
  var Companion_instance_29 = kotlin_com_ustadmobile_app_lib_database.$_$.q6;
  var timeout = kotlin_io_ktor_ktor_client_core.$_$.i;
  var Companion_instance_30 = kotlin_com_ustadmobile_app_lib_database.$_$.y7;
  var Companion_getInstance_9 = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.i;
  var toLocalDateTime = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.q;
  var toInstant = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.o;
  var periodUntil = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.n;
  var JsonArray = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_json.$_$.f;
  var LocalTime_init_$Create$ = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.b;
  var LocalDateTime_init_$Create$ = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.a;
  var joinToString = kotlin_kotlin.$_$.z7;
  var distinctUntilChanged = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.j1;
  var GlobalScope_instance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.v;
  var Companion_getInstance_10 = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.d;
  var minus = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.l;
  var mutableMapOf = kotlin_kotlin.$_$.p8;
  var toMap_0 = kotlin_kotlin.$_$.t9;
  var substringBefore_0 = kotlin_kotlin.$_$.dg;
  var toMutableSet = kotlin_kotlin.$_$.x9;
  var toString_1 = kotlin_kotlin.$_$.c3;
  var titlecase = kotlin_kotlin.$_$.gg;
  var isLowerCase = kotlin_kotlin.$_$.ff;
  var Char = kotlin_kotlin.$_$.kh;
  var offsetAt = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.m;
  var PersonGroup = kotlin_com_ustadmobile_app_lib_database.$_$.i4;
  var PersonGroupMember_init_$Create$ = kotlin_com_ustadmobile_app_lib_database.$_$.f5;
  var ScopedGrant = kotlin_com_ustadmobile_app_lib_database.$_$.o4;
  var abs = kotlin_kotlin.$_$.ad;
  var padStart = kotlin_kotlin.$_$.nf;
  var equals_0 = kotlin_kotlin.$_$.we;
  var SerialDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.p1;
  var toLong_0 = kotlin_kotlin.$_$.sg;
  var LanguageDaoCommon_instance = kotlin_com_ustadmobile_app_lib_database.$_$.m5;
  var LeavingReason = kotlin_com_ustadmobile_app_lib_database.$_$.d4;
  var Companion_getInstance_11 = kotlin_com_ustadmobile_app_lib_database.$_$.k7;
  var lastOrNull = kotlin_kotlin.$_$.f8;
  var ViewModel = kotlin_moe_tlaster_precompose_viewmodel.$_$.b;
  var ViewModel_init_$Init$ = kotlin_moe_tlaster_precompose_viewmodel.$_$.a;
  var get_viewModelScope = kotlin_moe_tlaster_precompose_viewmodel.$_$.c;
  var toMutableMap = kotlin_kotlin.$_$.w9;
  var Companion_instance_31 = kotlin_com_ustadmobile_app_lib_database.$_$.e6;
  var toBoolean = kotlin_kotlin.$_$.ig;
  var PermissionFlags_getInstance = kotlin_com_ustadmobile_app_lib_database.$_$.o5;
  var ClazzAndDetailPermissions = kotlin_com_ustadmobile_app_lib_database.$_$.l;
  var mutableListOf = kotlin_kotlin.$_$.o8;
  var PermissionTriple = kotlin_com_ustadmobile_app_lib_database.$_$.b1;
  var ClazzAndDisplayDetails = kotlin_com_ustadmobile_app_lib_database.$_$.m;
  var combine = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.i1;
  var Companion_getInstance_12 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.r;
  var shareIn = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.n1;
  var CoursePicture = kotlin_com_ustadmobile_app_lib_database.$_$.u3;
  var shallowCopy_3 = kotlin_com_ustadmobile_app_lib_database.$_$.d2;
  var ClazzWithHolidayCalendarAndAndTerminology = kotlin_com_ustadmobile_app_lib_database.$_$.a3;
  var getDefaultTimeZoneId = kotlin_com_ustadmobile_app_lib_util.$_$.a;
  var CourseBlockPicture = kotlin_com_ustadmobile_app_lib_database.$_$.o3;
  var CourseBlockAndEditEntities = kotlin_com_ustadmobile_app_lib_database.$_$.u;
  var Schedule = kotlin_com_ustadmobile_app_lib_database.$_$.n4;
  var CourseTerminology = kotlin_com_ustadmobile_app_lib_database.$_$.v3;
  var Companion_instance_32 = kotlin_com_ustadmobile_app_lib_database.$_$.n6;
  var Companion_getInstance_13 = kotlin_com_ustadmobile_app_lib_database.$_$.t5;
  var shallowCopy_4 = kotlin_com_ustadmobile_app_lib_database.$_$.y1;
  var deactivateByUids = kotlin_com_ustadmobile_app_lib_database.$_$.b5;
  var deactivateByUids_0 = kotlin_com_ustadmobile_app_lib_database.$_$.c5;
  var deactivateByUids_1 = kotlin_com_ustadmobile_app_lib_database.$_$.d5;
  var async = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.d2;
  var awaitAll = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.f;
  var Companion_instance_33 = kotlin_com_ustadmobile_app_lib_database.$_$.g7;
  var $serializer_getInstance_7 = kotlin_com_ustadmobile_app_lib_database.$_$.w7;
  var $serializer_getInstance_8 = kotlin_com_ustadmobile_app_lib_database.$_$.s5;
  var $serializer_getInstance_9 = kotlin_com_ustadmobile_app_lib_database.$_$.m6;
  var BlockStatus = kotlin_com_ustadmobile_app_lib_database.$_$.k;
  var Page = kotlin_app_cash_paging_paging_common.$_$.g;
  var Invalid = kotlin_app_cash_paging_paging_common.$_$.f;
  var Error_0 = kotlin_app_cash_paging_paging_common.$_$.e;
  var StudentAndBlockStatuses = kotlin_com_ustadmobile_app_lib_database.$_$.h1;
  var PagingSourceWithHttpLoader = kotlin_com_github_UstadMobile_door_door_runtime.$_$.q1;
  var DelegatedInvalidationPagingSource = kotlin_com_github_UstadMobile_door_door_runtime.$_$.k1;
  var ClazzEnrolmentDaoCommon_instance = kotlin_com_ustadmobile_app_lib_database.$_$.i5;
  var ClazzDaoCommon_instance = kotlin_com_ustadmobile_app_lib_database.$_$.h5;
  var PermissionPair = kotlin_com_ustadmobile_app_lib_database.$_$.a1;
  var first_1 = kotlin_kotlin.$_$.q7;
  var eachCount = kotlin_kotlin.$_$.h7;
  var AverageCourseAssignmentMark = kotlin_com_ustadmobile_app_lib_database.$_$.u2;
  var CourseAssignmentMarkAndMarkerName = kotlin_com_ustadmobile_app_lib_database.$_$.s;
  var SubmissionAndFiles = kotlin_com_ustadmobile_app_lib_database.$_$.i1;
  var ClazzAssignment = kotlin_com_ustadmobile_app_lib_database.$_$.w2;
  var AssignmentProgressSummary = kotlin_com_ustadmobile_app_lib_database.$_$.r2;
  var ClazzAssignmentDaoCommon_instance = kotlin_com_ustadmobile_app_lib_database.$_$.g5;
  var ClazzAssignmentCourseBlockAndSubmitterUid = kotlin_com_ustadmobile_app_lib_database.$_$.v2;
  var throwKotlinNothingValueException = kotlin_kotlin.$_$.ej;
  var CourseAssignmentSubmission = kotlin_com_ustadmobile_app_lib_database.$_$.n3;
  var Comments = kotlin_com_ustadmobile_app_lib_database.$_$.c3;
  var CourseAssignmentSubmissionFile = kotlin_com_ustadmobile_app_lib_database.$_$.m3;
  var CourseAssignmentMarkDaoCommon_instance = kotlin_com_ustadmobile_app_lib_database.$_$.k5;
  var CourseGroupSet = kotlin_com_ustadmobile_app_lib_database.$_$.s3;
  var shallowCopy_5 = kotlin_com_ustadmobile_app_lib_database.$_$.z1;
  var CourseBlock = kotlin_com_ustadmobile_app_lib_database.$_$.p3;
  var $serializer_getInstance_10 = kotlin_com_ustadmobile_app_lib_database.$_$.f7;
  var AssignmentSubmitterSummary = kotlin_com_ustadmobile_app_lib_database.$_$.t2;
  var AssignmentSubmitterAndAllocations = kotlin_com_ustadmobile_app_lib_database.$_$.s2;
  var Companion_getInstance_14 = kotlin_com_ustadmobile_app_lib_database.$_$.f6;
  var CourseBlockAndAssignment = kotlin_com_ustadmobile_app_lib_database.$_$.t;
  var AssignmentPermissionAndActiveUserSubmitterUid = kotlin_com_ustadmobile_app_lib_database.$_$.j;
  var CourseAssignmentMark = kotlin_com_ustadmobile_app_lib_database.$_$.l3;
  var ClazzNameAndTerminology = kotlin_com_ustadmobile_app_lib_database.$_$.n;
  var ClazzEnrolmentWithLeavingReason = kotlin_com_ustadmobile_app_lib_database.$_$.x2;
  var Companion_instance_34 = kotlin_com_ustadmobile_app_lib_database.$_$.j6;
  var flowOf = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.l1;
  var Clazz = kotlin_com_ustadmobile_app_lib_database.$_$.b3;
  var Companion_instance_35 = kotlin_com_ustadmobile_app_lib_database.$_$.k6;
  var ClazzLog = kotlin_com_ustadmobile_app_lib_database.$_$.z2;
  var shallowCopy_6 = kotlin_com_ustadmobile_app_lib_database.$_$.x1;
  var Companion_instance_36 = kotlin_com_ustadmobile_app_lib_database.$_$.l6;
  var Companion_instance_37 = kotlin_com_ustadmobile_app_lib_database.$_$.u5;
  var ClazzLogAttendanceRecord = kotlin_com_ustadmobile_app_lib_database.$_$.y2;
  var PersonAndClazzLogAttendanceRecord = kotlin_com_ustadmobile_app_lib_database.$_$.c1;
  var Mutex = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.q1;
  var shallowCopy_7 = kotlin_com_ustadmobile_app_lib_database.$_$.n1;
  var ContentEntryAndDetail = kotlin_com_ustadmobile_app_lib_database.$_$.q;
  var ContentEntryVersion = kotlin_com_ustadmobile_app_lib_database.$_$.j3;
  var OfflineItemAndState = kotlin_com_ustadmobile_app_lib_database.$_$.z;
  var Companion_instance_38 = kotlin_com_ustadmobile_app_lib_database.$_$.b8;
  var Companion_instance_39 = kotlin_com_ustadmobile_app_lib_database.$_$.r5;
  var shallowCopy_8 = kotlin_com_ustadmobile_app_lib_database.$_$.w1;
  var ContentEntryPicture2 = kotlin_com_ustadmobile_app_lib_database.$_$.g3;
  var ContentEntryAndContentJob = kotlin_com_ustadmobile_app_lib_database.$_$.p;
  var ContentEntry = kotlin_com_ustadmobile_app_lib_database.$_$.k3;
  var ContentEntryImportJob = kotlin_com_ustadmobile_app_lib_database.$_$.e3;
  var Companion_instance_40 = kotlin_com_ustadmobile_app_lib_database.$_$.q5;
  var setOf = kotlin_kotlin.$_$.h9;
  var ContentEntryDaoCommon_instance = kotlin_com_ustadmobile_app_lib_database.$_$.j5;
  var createSimpleEnumSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.w2;
  var CourseBlockAndPicture = kotlin_com_ustadmobile_app_lib_database.$_$.v;
  var CourseGroupMemberAndName = kotlin_com_ustadmobile_app_lib_database.$_$.q3;
  var CourseGroupMember = kotlin_com_ustadmobile_app_lib_database.$_$.r3;
  var Companion_instance_41 = kotlin_com_ustadmobile_app_lib_database.$_$.a7;
  var Companion_instance_42 = kotlin_com_ustadmobile_app_lib_database.$_$.b7;
  var Companion_instance_43 = kotlin_com_ustadmobile_app_lib_database.$_$.c7;
  var shallowCopy_9 = kotlin_com_ustadmobile_app_lib_database.$_$.r1;
  var CourseGroupSetDaoConstants_instance = kotlin_com_ustadmobile_app_lib_database.$_$.l5;
  var shallowCopy_10 = kotlin_com_ustadmobile_app_lib_database.$_$.o1;
  var DiscussionPost = kotlin_com_ustadmobile_app_lib_database.$_$.w3;
  var Companion_instance_44 = kotlin_com_ustadmobile_app_lib_database.$_$.i7;
  var printStackTrace = kotlin_kotlin.$_$.dj;
  var XML = kotlin_io_github_pdvrieze_xmlutil_serialization.$_$.d;
  var Site = kotlin_com_ustadmobile_app_lib_database.$_$.r4;
  var daysUntil = kotlin_org_jetbrains_kotlinx_kotlinx_datetime.$_$.k;
  var Message = kotlin_com_ustadmobile_app_lib_database.$_$.e4;
  var NotImplementedError = kotlin_kotlin.$_$.xh;
  var shallowCopy_11 = kotlin_com_ustadmobile_app_lib_database.$_$.u1;
  var Companion_instance_45 = kotlin_com_ustadmobile_app_lib_database.$_$.s7;
  var PersonAndDisplayDetail = kotlin_com_ustadmobile_app_lib_database.$_$.g4;
  var EditAndViewPermission = kotlin_com_ustadmobile_app_lib_database.$_$.x;
  var toCharArray = kotlin_kotlin.$_$.kg;
  var isUpperCase = kotlin_kotlin.$_$.hf;
  var replace = kotlin_kotlin.$_$.rf;
  var PersonPicture = kotlin_com_ustadmobile_app_lib_database.$_$.l4;
  var getSystemTimeInMillis = kotlin_com_ustadmobile_app_lib_util.$_$.b;
  var PersonDaoCommon_instance = kotlin_com_ustadmobile_app_lib_database.$_$.n5;
  var Settings = kotlin_com_russhwolf_multiplatform_settings.$_$.a;
  var println = kotlin_kotlin.$_$.za;
  var SiteTermsAndLangName = kotlin_com_ustadmobile_app_lib_database.$_$.g1;
  var contains_0 = kotlin_kotlin.$_$.o6;
  var SiteTerms = kotlin_com_ustadmobile_app_lib_database.$_$.q4;
  var Companion_instance_46 = kotlin_com_ustadmobile_app_lib_database.$_$.z7;
  var shallowCopy_12 = kotlin_com_ustadmobile_app_lib_database.$_$.a2;
  var decodeBase64Bytes = kotlin_io_ktor_ktor_utils.$_$.u;
  var addChild = kotlin_org_jetbrains_kotlin_wrappers_kotlin_react_core.$_$.d;
  var addChildNode = kotlin_org_jetbrains_kotlin_wrappers_kotlin_react_core.$_$.a;
  var FC = kotlin_org_jetbrains_kotlin_wrappers_kotlin_react.$_$.a;
  var toUrlQueryString = kotlin_com_github_UstadMobile_door_door_runtime.$_$.s;
  var json = kotlin_kotlin.$_$.jc;
  var KMutableProperty0 = kotlin_kotlin.$_$.rd;
  var useEffect = kotlin_org_jetbrains_kotlin_wrappers_kotlin_react_core.$_$.i;
  var isSuccess = kotlin_io_ktor_ktor_http.$_$.g1;
  var TransferJobItemStatus_FAILED_getInstance = kotlin_com_ustadmobile_app_lib_database.$_$.z4;
  var TransferJob = kotlin_com_ustadmobile_app_lib_database.$_$.u4;
  var await_0 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.h;
  var TransferJobItem = kotlin_com_ustadmobile_app_lib_database.$_$.t4;
  var TransferJobItemStatus_IN_PROGRESS_getInstance = kotlin_com_ustadmobile_app_lib_database.$_$.a5;
  var NonCancellable_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.x;
  var coroutineScope = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.i;
  var CompletableDeferred = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.s1;
  var randomUuid = kotlin_com_github_UstadMobile_door_door_runtime.$_$.a2;
  var fetch_0 = kotlin_org_jetbrains_kotlin_wrappers_kotlin_web.$_$.a;
  var IllegalStateException_init_$Create$_1 = kotlin_kotlin.$_$.c2;
  var Companion_getInstance_15 = kotlin_io_ktor_ktor_http.$_$.c;
  var TextContent = kotlin_io_ktor_ktor_http.$_$.q;
  var JsType_instance = kotlin_io_ktor_ktor_utils.$_$.b;
  var typeInfoImpl = kotlin_io_ktor_ktor_utils.$_$.k;
  var OutgoingContent = kotlin_io_ktor_ktor_http.$_$.p;
  var NullBody_instance = kotlin_io_ktor_ktor_http.$_$.a;
  var Text_getInstance = kotlin_io_ktor_ktor_http.$_$.d;
  var doorNodeAndVersionHeaders = kotlin_com_github_UstadMobile_door_door_runtime.$_$.i;
  var IntCompanionObject_instance = kotlin_kotlin.$_$.y4;
  var toULong = kotlin_kotlin.$_$.zg;
  var _ULong___get_data__impl__fggpzb = kotlin_kotlin.$_$.b4;
  var Charsets_getInstance = kotlin_io_ktor_ktor_io.$_$.f;
  var encodeToByteArray = kotlin_kotlin.$_$.te;
  var encodeToByteArray_0 = kotlin_io_ktor_ktor_io.$_$.j;
  var cancel = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.e2;
  var useRequiredContext = kotlin_org_jetbrains_kotlin_wrappers_kotlin_react_core.$_$.j;
  var getKClassFromExpression = kotlin_kotlin.$_$.d;
  var format = kotlin_dev_icerock_moko_resources.$_$.g;
  var XmlPullParserFactory = kotlin_com_github_UstadMobile_xmlpullparserkmp.$_$.a;
  var Default_getInstance_0 = kotlin_kotlin.$_$.b5;
  var Antilog = kotlin_io_github_aakira_napier.$_$.h;
  var LogLevel_VERBOSE_getInstance = kotlin_io_github_aakira_napier.$_$.e;
  var LogLevel_DEBUG_getInstance = kotlin_io_github_aakira_napier.$_$.b;
  var toSet_0 = kotlin_org_jetbrains_kotlin_wrappers_kotlin_js.$_$.b;
  //endregion
  //region block: pre-declaration
  setMetadataFor(strings, 'strings', objectMeta);
  setMetadataFor(plurals, 'plurals', objectMeta);
  setMetadataFor(MR, 'MR', objectMeta);
  setMetadataFor(AccountRegisterOptions, 'AccountRegisterOptions', classMeta, VOID, VOID, AccountRegisterOptions);
  setMetadataFor(AdultAccountRequiredException, 'AdultAccountRequiredException', classMeta, IllegalStateException, VOID, AdultAccountRequiredException);
  setMetadataFor($setAuthCOROUTINE$1, '$setAuthCOROUTINE$1', classMeta, CoroutineImpl);
  setMetadataFor(AuthManager, 'AuthManager', classMeta, VOID, [DIAware], VOID, VOID, VOID, [2]);
  setMetadataFor(ConsentNotGrantedException, 'ConsentNotGrantedException', classMeta, IllegalStateException, VOID, ConsentNotGrantedException);
  setMetadataFor(Companion, 'Companion', objectMeta);
  setMetadataFor($serializer, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Endpoint, 'Endpoint', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_11});
  setMetadataFor(Companion_0, 'Companion', objectMeta);
  setMetadataFor(EndpointScope, 'EndpointScope', classMeta, VOID, VOID, EndpointScope);
  setMetadataFor(Pbkdf2Params, 'Pbkdf2Params', classMeta, VOID, VOID, Pbkdf2Params);
  setMetadataFor(Companion_1, 'Companion', objectMeta);
  setMetadataFor($serializer_0, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(RegisterRequest, 'RegisterRequest', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_12});
  setMetadataFor(UnauthorizedException, 'UnauthorizedException', classMeta, IllegalStateException, VOID, UnauthorizedException);
  setMetadataFor(Companion_2, 'Companion', objectMeta);
  setMetadataFor($serializer_1, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(UserSessionWithPersonAndEndpoint, 'UserSessionWithPersonAndEndpoint', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_13});
  setMetadataFor(UstadAccountManager$slambda$slambda$slambda$slambda$slambda, 'UstadAccountManager$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$slambda$slambda$slambda$slambda, 'UstadAccountManager$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$slambda$slambda$slambda, 'UstadAccountManager$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$slambda$slambda, 'UstadAccountManager$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(UstadAccountManager$slambda$slambda$slambda$slambda_1, 'UstadAccountManager$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$slambda$slambda$slambda_1, 'UstadAccountManager$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$slambda$slambda_1, 'UstadAccountManager$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(UstadAccountManager$register$slambda$slambda, 'UstadAccountManager$register$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$register$slambda$slambda_1, 'UstadAccountManager$register$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_3, 'Companion', objectMeta);
  setMetadataFor(sam$kotlin_Comparator$0, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0, 'sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0', classMeta);
  setMetadataFor(sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_0, 'sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0', classMeta);
  setMetadataFor(UstadAccountManager$slambda, 'UstadAccountManager$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$slambda_1, 'UstadAccountManager$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$makeNewTempGuestSession$slambda, 'UstadAccountManager$makeNewTempGuestSession$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$register$slambda, 'UstadAccountManager$register$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$addSession$slambda, 'UstadAccountManager$addSession$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadAccountManager$login$slambda, 'UstadAccountManager$login$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($activeSessionsListCOROUTINE$2, '$activeSessionsListCOROUTINE$2', classMeta, CoroutineImpl);
  setMetadataFor($activeSessionCountCOROUTINE$3, '$activeSessionCountCOROUTINE$3', classMeta, CoroutineImpl);
  setMetadataFor($addSessionCOROUTINE$4, '$addSessionCOROUTINE$4', classMeta, CoroutineImpl);
  setMetadataFor($endSessionCOROUTINE$6, '$endSessionCOROUTINE$6', classMeta, CoroutineImpl);
  setMetadataFor($getSiteFromDbOrLoadFromHttpCOROUTINE$7, '$getSiteFromDbOrLoadFromHttpCOROUTINE$7', classMeta, CoroutineImpl);
  setMetadataFor($startGuestSessionCOROUTINE$8, '$startGuestSessionCOROUTINE$8', classMeta, CoroutineImpl);
  setMetadataFor(UstadAccountManager, 'UstadAccountManager', classMeta, VOID, VOID, VOID, VOID, VOID, [1, 2, 4, 3, 5]);
  setMetadataFor(Companion_4, 'Companion', objectMeta);
  setMetadataFor(Companion_5, 'Companion', objectMeta);
  setMetadataFor(Anchor, 'Anchor', classMeta, VOID, VOID, Anchor, VOID, {0: AnchorSerializer_getInstance});
  setMetadataFor(AnchorSerializer, 'AnchorSerializer', objectMeta, VOID, [KSerializer]);
  setMetadataFor(Companion_6, 'Companion', objectMeta);
  setMetadataFor(Body, 'Body', classMeta, VOID, VOID, VOID, VOID, {0: BodySerializer_getInstance});
  setMetadataFor(BodySerializer, 'BodySerializer', objectMeta, VOID, [KSerializer]);
  setMetadataFor(Companion_7, 'Companion', objectMeta);
  setMetadataFor($serializer_2, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(ListItem, 'ListItem', classMeta, VOID, VOID, ListItem, VOID, {0: $serializer_getInstance_14});
  setMetadataFor(Companion_8, 'Companion', objectMeta);
  setMetadataFor($serializer_3, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(NavElement, 'NavElement', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_15});
  setMetadataFor(Companion_9, 'Companion', objectMeta);
  setMetadataFor($serializer_4, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(NavigationDocument, 'NavigationDocument', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_16});
  setMetadataFor(Companion_10, 'Companion', objectMeta);
  setMetadataFor($serializer_5, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(OrderedList, 'OrderedList', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_17});
  setMetadataFor(Companion_11, 'Companion', objectMeta);
  setMetadataFor(Span, 'Span', classMeta, VOID, VOID, Span, VOID, {0: SpanSerializer_getInstance});
  setMetadataFor(SpanSerializer, 'SpanSerializer', objectMeta, VOID, [KSerializer]);
  setMetadataFor($serializer_6, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Content, 'Content', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_18});
  setMetadataFor(Companion_12, 'Companion', objectMeta);
  setMetadataFor($serializer_7, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(DocTitle, 'DocTitle', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_19});
  setMetadataFor(Companion_13, 'Companion', objectMeta);
  setMetadataFor($serializer_8, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Head, 'Head', classMeta, VOID, VOID, Head, VOID, {0: $serializer_getInstance_20});
  setMetadataFor($serializer_9, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(NavLabel, 'NavLabel', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_21});
  setMetadataFor(Companion_14, 'Companion', objectMeta);
  setMetadataFor($serializer_10, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(NavMap, 'NavMap', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_22});
  setMetadataFor(Companion_15, 'Companion', objectMeta);
  setMetadataFor($serializer_11, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(NavPoint, 'NavPoint', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_23});
  setMetadataFor(Companion_16, 'Companion', objectMeta);
  setMetadataFor($serializer_12, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(NcxDocument, 'NcxDocument', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_24});
  setMetadataFor(Companion_17, 'Companion', objectMeta);
  setMetadataFor($serializer_13, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Text, 'Text', classMeta, VOID, VOID, Text, VOID, {0: $serializer_getInstance_25});
  setMetadataFor(Companion_18, 'Companion', objectMeta);
  setMetadataFor($serializer_14, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(DcCreator, 'DcCreator', classMeta, VOID, VOID, DcCreator, VOID, {0: $serializer_getInstance_26});
  setMetadataFor(Companion_19, 'Companion', objectMeta);
  setMetadataFor($serializer_15, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(DcDescription, 'DcDescription', classMeta, VOID, VOID, DcDescription, VOID, {0: $serializer_getInstance_27});
  setMetadataFor(Companion_20, 'Companion', objectMeta);
  setMetadataFor($serializer_16, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(DcIdentifier, 'DcIdentifier', classMeta, VOID, VOID, DcIdentifier, VOID, {0: $serializer_getInstance_28});
  setMetadataFor($serializer_17, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(DcLanguage, 'DcLanguage', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_29});
  setMetadataFor(Companion_21, 'Companion', objectMeta);
  setMetadataFor($serializer_18, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(DcTitle, 'DcTitle', classMeta, VOID, VOID, DcTitle, VOID, {0: $serializer_getInstance_30});
  setMetadataFor($serializer_19, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Item, 'Item', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_31});
  setMetadataFor(Companion_22, 'Companion', objectMeta);
  setMetadataFor($serializer_20, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(ItemRef, 'ItemRef', classMeta, VOID, VOID, ItemRef, VOID, {0: $serializer_getInstance_32});
  setMetadataFor(Companion_23, 'Companion', objectMeta);
  setMetadataFor($serializer_21, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Manifest, 'Manifest', classMeta, VOID, VOID, Manifest, VOID, {0: $serializer_getInstance_33});
  setMetadataFor(Companion_24, 'Companion', objectMeta);
  setMetadataFor($serializer_22, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Meta, 'Meta', classMeta, VOID, VOID, Meta, VOID, {0: $serializer_getInstance_34});
  setMetadataFor(Companion_25, 'Companion', objectMeta);
  setMetadataFor($serializer_23, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Metadata, 'Metadata', classMeta, VOID, VOID, Metadata, VOID, {0: $serializer_getInstance_35});
  setMetadataFor(Companion_26, 'Companion', objectMeta);
  setMetadataFor($serializer_24, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(PackageDocument, 'PackageDocument', classMeta, VOID, VOID, PackageDocument, VOID, {0: $serializer_getInstance_36});
  setMetadataFor(Companion_27, 'Companion', objectMeta);
  setMetadataFor($serializer_25, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Spine, 'Spine', classMeta, VOID, VOID, Spine, VOID, {0: $serializer_getInstance_37});
  setMetadataFor(Companion_28, 'Companion', objectMeta);
  setMetadataFor($serializer_26, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(ContentManifest, 'ContentManifest', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_38});
  setMetadataFor(Companion_29, 'Companion', objectMeta);
  setMetadataFor($serializer_27, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(ContentManifestEntry, 'ContentManifestEntry', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_39});
  setMetadataFor(Companion_30, 'Companion', objectMeta);
  setMetadataFor($serializer_28, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(MediaContentInfo, 'MediaContentInfo', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_40});
  setMetadataFor($serializer_29, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(MediaSource, 'MediaSource', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_41});
  setMetadataFor(Companion_31, 'Companion', objectMeta);
  setMetadataFor($serializer_30, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(SubtitleTrack, 'SubtitleTrack', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_42});
  setMetadataFor(InvalidContentException, 'InvalidContentException', classMeta, IllegalArgumentException);
  setMetadataFor(Companion_32, 'Companion', objectMeta);
  setMetadataFor($serializer_31, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(MetadataResult, 'MetadataResult', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_43});
  setMetadataFor(PersonConstants, 'PersonConstants', objectMeta);
  setMetadataFor(SubmissionConstants, 'SubmissionConstants', objectMeta);
  setMetadataFor(TerminologyKeys, 'TerminologyKeys', objectMeta);
  setMetadataFor(SetPasswordUseCase, 'SetPasswordUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [5]);
  setMetadataFor(AssignmentSubmissionException, 'AssignmentSubmissionException', classMeta, Exception);
  setMetadataFor(AccountIsNotSubmitterException, 'AccountIsNotSubmitterException', classMeta, AssignmentSubmissionException);
  setMetadataFor(AssignmentAlreadySubmittedException, 'AssignmentAlreadySubmittedException', classMeta, AssignmentSubmissionException);
  setMetadataFor(AssignmentDeadlinePassedException, 'AssignmentDeadlinePassedException', classMeta, AssignmentSubmissionException);
  setMetadataFor(AssignmentTextTooLongException, 'AssignmentTextTooLongException', classMeta, AssignmentSubmissionException);
  setMetadataFor(SubmitAssignmentResult, 'SubmitAssignmentResult', classMeta);
  setMetadataFor($invokeCOROUTINE$9, '$invokeCOROUTINE$9', classMeta, CoroutineImpl);
  setMetadataFor(SubmitAssignmentUseCase, 'SubmitAssignmentUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [5]);
  setMetadataFor(SubmitMarkUseCase$invoke$slambda, 'SubmitMarkUseCase$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$10, '$invokeCOROUTINE$10', classMeta, CoroutineImpl);
  setMetadataFor(SubmitMarkUseCase, 'SubmitMarkUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [7]);
  setMetadataFor(GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda, 'GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($collectCOROUTINE$12, '$collectCOROUTINE$12', classMeta, CoroutineImpl);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_0, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(_no_name_provided__qut3iv, VOID, classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$11, '$invokeCOROUTINE$11', classMeta, CoroutineImpl);
  setMetadataFor(GetAssignmentSubmitterNameUseCase, 'GetAssignmentSubmitterNameUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(BlobTransferJobItem, 'BlobTransferJobItem', classMeta);
  setMetadataFor(BlobTransferProgressUpdate, 'BlobTransferProgressUpdate', classMeta);
  setMetadataFor(BlobTransferStatusUpdate, 'BlobTransferStatusUpdate', classMeta);
  setMetadataFor(CancelDownloadUseCase, 'CancelDownloadUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(MakeContentEntryAvailableOfflineUseCase, 'MakeContentEntryAvailableOfflineUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(OpenBlobItem, 'OpenBlobItem', classMeta);
  setMetadataFor($invokeCOROUTINE$14, '$invokeCOROUTINE$14', classMeta, CoroutineImpl);
  setMetadataFor(OpenBlobUiUseCase, 'OpenBlobUiUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [3]);
  setMetadataFor(OpenBlobIntent, 'OpenBlobIntent', classMeta, Enum);
  setMetadataFor(OpenBlobUseCase, 'OpenBlobUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [3]);
  setMetadataFor(OpeningBlobState, 'OpeningBlobState', classMeta);
  setMetadataFor(SaveAndUploadLocalUrisUseCase$updateUris$slambda, 'SaveAndUploadLocalUrisUseCase$updateUris$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$15, '$invokeCOROUTINE$15', classMeta, CoroutineImpl);
  setMetadataFor(SaveAndUploadLocalUrisUseCase, 'SaveAndUploadLocalUrisUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_33, 'Companion', objectMeta);
  setMetadataFor($serializer_32, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(SaveLocalUriAsBlobItem, 'SaveLocalUriAsBlobItem', classMeta);
  setMetadataFor(SavedBlob, 'SavedBlob', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_44});
  function invoke$default(localUrisToSave, onTransferJobItemCreated, $completion, $super) {
    var tmp;
    if (onTransferJobItemCreated === VOID) {
      tmp = SaveLocalUrisAsBlobsUseCase$invoke$lambda;
    } else {
      tmp = onTransferJobItemCreated;
    }
    onTransferJobItemCreated = tmp;
    return $super === VOID ? this.one(localUrisToSave, onTransferJobItemCreated, $completion) : $super.one.call(this, localUrisToSave, onTransferJobItemCreated, $completion);
  }
  setMetadataFor(SaveLocalUrisAsBlobsUseCase, 'SaveLocalUrisAsBlobsUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(EnqueueSavePictureUseCase, 'EnqueueSavePictureUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [3]);
  setMetadataFor(Companion_34, 'Companion', objectMeta);
  setMetadataFor($invokeCOROUTINE$16, '$invokeCOROUTINE$16', classMeta, CoroutineImpl);
  setMetadataFor(SavePictureUseCase, 'SavePictureUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [3]);
  setMetadataFor(TransferJobItemStatusUpdater$updateJob$slambda, 'TransferJobItemStatusUpdater$updateJob$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(TransferJobItemStatusUpdater$commit$slambda, 'TransferJobItemStatusUpdater$commit$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($commitCOROUTINE$17, '$commitCOROUTINE$17', classMeta, CoroutineImpl);
  setMetadataFor($onFinishedCOROUTINE$18, '$onFinishedCOROUTINE$18', classMeta, CoroutineImpl);
  setMetadataFor(TransferJobItemStatusUpdater, 'TransferJobItemStatusUpdater', classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$19, '$invokeCOROUTINE$19', classMeta, CoroutineImpl);
  setMetadataFor(UpdateTransferJobItemEtagUseCase, 'UpdateTransferJobItemEtagUseCase', classMeta, VOID, VOID, UpdateTransferJobItemEtagUseCase, VOID, VOID, [4]);
  setMetadataFor(Companion_35, 'Companion', objectMeta);
  setMetadataFor(CancelBlobUploadClientUseCase, 'CancelBlobUploadClientUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(EnqueueBlobUploadItem, 'EnqueueBlobUploadItem', classMeta);
  function invoke$default_0(items, batchUuid, chunkSize, tableId, entityUid, $completion, $super) {
    var tmp;
    if (chunkSize === VOID) {
      tmp = 524288;
    } else {
      tmp = chunkSize;
    }
    chunkSize = tmp;
    tableId = tableId === VOID ? 0 : tableId;
    entityUid = entityUid === VOID ? new Long(0, 0) : entityUid;
    return $super === VOID ? this.hnk(items, batchUuid, chunkSize, tableId, entityUid, $completion) : $super.hnk.call(this, items, batchUuid, chunkSize, tableId, entityUid, $completion);
  }
  setMetadataFor(EnqueueBlobUploadClientUseCase, 'EnqueueBlobUploadClientUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [5]);
  setMetadataFor($getLocalUriIfRemoteCOROUTINE$20, '$getLocalUriIfRemoteCOROUTINE$20', classMeta, CoroutineImpl);
  function invoke$default_1(url, progressInterval, onStateChange, inflateToTmpFileIfCompressed, $completion, $super) {
    progressInterval = progressInterval === VOID ? 500 : progressInterval;
    var tmp;
    if (onStateChange === VOID) {
      tmp = GetStoragePathForUrlUseCase$invoke$lambda;
    } else {
      tmp = onStateChange;
    }
    onStateChange = tmp;
    inflateToTmpFileIfCompressed = inflateToTmpFileIfCompressed === VOID ? false : inflateToTmpFileIfCompressed;
    return $super === VOID ? this.xnk(url, progressInterval, onStateChange, inflateToTmpFileIfCompressed, $completion) : $super.xnk.call(this, url, progressInterval, onStateChange, inflateToTmpFileIfCompressed, $completion);
  }
  setMetadataFor(GetStoragePathForUrlUseCase, 'GetStoragePathForUrlUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [4]);
  setMetadataFor(CreateNewClazzUseCase$invoke$slambda, 'CreateNewClazzUseCase$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CreateNewClazzUseCase, 'CreateNewClazzUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AlreadyEnroledInClassException, 'AlreadyEnroledInClassException', classMeta, Exception, VOID, AlreadyEnroledInClassException);
  setMetadataFor(AlreadyHasPendingRequestException, 'AlreadyHasPendingRequestException', classMeta, IllegalStateException, VOID, AlreadyHasPendingRequestException);
  setMetadataFor(ApproveOrDeclinePendingEnrolmentUseCase$invoke$slambda, 'ApproveOrDeclinePendingEnrolmentUseCase$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$21, '$invokeCOROUTINE$21', classMeta, CoroutineImpl);
  setMetadataFor(IApproveOrDeclinePendingEnrolmentRequestUseCase, 'IApproveOrDeclinePendingEnrolmentRequestUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(ApproveOrDeclinePendingEnrolmentUseCase, 'ApproveOrDeclinePendingEnrolmentUseCase', classMeta, VOID, [IApproveOrDeclinePendingEnrolmentRequestUseCase], VOID, VOID, VOID, [2]);
  setMetadataFor(EnrolIntoCourseUseCase$invoke$slambda, 'EnrolIntoCourseUseCase$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(EnrolIntoCourseUseCase, 'EnrolIntoCourseUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor($invokeCOROUTINE$22, '$invokeCOROUTINE$22', classMeta, CoroutineImpl);
  setMetadataFor(RequestEnrolmentUseCase, 'RequestEnrolmentUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [3]);
  setMetadataFor(SetClipboardStringUseCase, 'SetClipboardStringUseCase', interfaceMeta);
  setMetadataFor(Companion_36, 'Companion', objectMeta);
  setMetadataFor($serializer_33, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(CompressParams, 'CompressParams', classMeta, VOID, VOID, CompressParams, VOID, {0: $serializer_getInstance_45});
  setMetadataFor(CompressResult, 'CompressResult', classMeta);
  function invoke$default_2(fromUri, toUri, params, onProgress, $completion, $super) {
    toUri = toUri === VOID ? null : toUri;
    params = params === VOID ? new CompressParams() : params;
    onProgress = onProgress === VOID ? null : onProgress;
    return $super === VOID ? this.dno(fromUri, toUri, params, onProgress, $completion) : $super.dno.call(this, fromUri, toUri, params, onProgress, $completion);
  }
  setMetadataFor(CompressUseCase, 'CompressUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [4]);
  setMetadataFor(Companion_37, 'Companion', objectMeta, VOID, [SerializerFactory]);
  setMetadataFor(CompressionLevel, 'CompressionLevel', classMeta, Enum, VOID, VOID, VOID, {0: Companion_getInstance_54});
  setMetadataFor(CompressionLevelSerializer, 'CompressionLevelSerializer', objectMeta, VOID, [KSerializer]);
  setMetadataFor(ContentManifestMap, 'ContentManifestMap', classMeta);
  setMetadataFor(DeleteContentEntryParentChildJoinUseCase$invoke$slambda, 'DeleteContentEntryParentChildJoinUseCase$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DeleteContentEntryParentChildJoinUseCase, 'DeleteContentEntryParentChildJoinUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(Companion_38, 'Companion', objectMeta);
  setMetadataFor(ContentEntryGetMetaDataFromUriUseCase, 'ContentEntryGetMetaDataFromUriUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [4]);
  setMetadataFor(ContentEntryGetMetadataStatus, 'ContentEntryGetMetadataStatus', classMeta, VOID, VOID, ContentEntryGetMetadataStatus);
  setMetadataFor(UnsupportedContentException, 'UnsupportedContentException', classMeta, Exception);
  setMetadataFor(Companion_39, 'Companion', objectMeta);
  function invoke$default_3(subtitleTrackUri, filename, locale, $completion, $super) {
    locale = locale === VOID ? null : locale;
    return $super === VOID ? this.ynp(subtitleTrackUri, filename, locale, $completion) : $super.ynp.call(this, subtitleTrackUri, filename, locale, $completion);
  }
  setMetadataFor(GetSubtitleTrackFromUriUseCase, 'GetSubtitleTrackFromUriUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [3]);
  setMetadataFor(CancelImportContentEntryUseCase, 'CancelImportContentEntryUseCase', interfaceMeta);
  setMetadataFor($invokeCOROUTINE$23, '$invokeCOROUTINE$23', classMeta, CoroutineImpl);
  setMetadataFor(CancelRemoteContentEntryImportUseCase, 'CancelRemoteContentEntryImportUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor($invokeCOROUTINE$24, '$invokeCOROUTINE$24', classMeta, CoroutineImpl);
  setMetadataFor(DismissRemoteContentEntryImportErrorUseCase, 'DismissRemoteContentEntryImportErrorUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(EnqueueContentEntryImportUseCase, 'EnqueueContentEntryImportUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$25, '$invokeCOROUTINE$25', classMeta, CoroutineImpl);
  setMetadataFor(EnqueueImportContentEntryUseCaseRemote, 'EnqueueImportContentEntryUseCaseRemote', classMeta, VOID, [EnqueueContentEntryImportUseCase], VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_40, 'Companion', objectMeta);
  setMetadataFor($serializer_34, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(ImportRequest, 'ImportRequest', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_46});
  setMetadataFor(LaunchContentEntryVersionUseCase, 'LaunchContentEntryVersionUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [5]);
  setMetadataFor(DefaultLaunchContentEntryVersionUseCase, 'DefaultLaunchContentEntryVersionUseCase', classMeta, VOID, [LaunchContentEntryVersionUseCase], DefaultLaunchContentEntryVersionUseCase, VOID, VOID, [5]);
  setMetadataFor(LaunchResult, 'LaunchResult', classMeta, VOID, VOID, LaunchResult);
  setMetadataFor(LaunchEpubUseCase, 'LaunchEpubUseCase', interfaceMeta, VOID, [LaunchContentEntryVersionUseCase], VOID, VOID, VOID, [5]);
  setMetadataFor(LaunchXapiUseCase, 'LaunchXapiUseCase', interfaceMeta, VOID, [LaunchContentEntryVersionUseCase], VOID, VOID, VOID, [5]);
  setMetadataFor(XapiLaunchHrefResult, 'XapiLaunchHrefResult', classMeta);
  setMetadataFor(ResolveXapiLaunchHrefUseCase$invoke$slambda, 'ResolveXapiLaunchHrefUseCase$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$26, '$invokeCOROUTINE$26', classMeta, CoroutineImpl);
  setMetadataFor(ResolveXapiLaunchHrefUseCase, 'ResolveXapiLaunchHrefUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [3]);
  setMetadataFor(MoveContentEntriesUseCase, 'MoveContentEntriesUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(SaveContentEntryUseCase$invoke$slambda, 'SaveContentEntryUseCase$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$27, '$invokeCOROUTINE$27', classMeta, CoroutineImpl);
  setMetadataFor(SaveContentEntryUseCase, 'SaveContentEntryUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [4]);
  setMetadataFor(AddOrUpdateCourseBlockUseCase, 'AddOrUpdateCourseBlockUseCase', classMeta, VOID, VOID, AddOrUpdateCourseBlockUseCase);
  setMetadataFor(UpdateCourseBlocksOnReorderOrCommitUseCase, 'UpdateCourseBlocksOnReorderOrCommitUseCase', classMeta, VOID, VOID, UpdateCourseBlocksOnReorderOrCommitUseCase);
  setMetadataFor(DeletePermanentlyUseCase, 'DeletePermanentlyUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(RestoreDeletedItemUseCase$invoke$slambda, 'RestoreDeletedItemUseCase$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(RestoreDeletedItemUseCase, 'RestoreDeletedItemUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$28, '$invokeCOROUTINE$28', classMeta, CoroutineImpl);
  setMetadataFor(GetEpubTableOfContentsUseCase, 'GetEpubTableOfContentsUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(GetApiUrlUseCase, 'GetApiUrlUseCase', interfaceMeta);
  setMetadataFor(GetApiUrlUseCaseDirect, 'GetApiUrlUseCaseDirect', classMeta, VOID, [GetApiUrlUseCase]);
  setMetadataFor(VersionInfo, 'VersionInfo', classMeta);
  setMetadataFor(GetVersionUseCase, 'GetVersionUseCase', interfaceMeta);
  setMetadataFor(GetHtmlContentDisplayEngineOptionsUseCase, 'GetHtmlContentDisplayEngineOptionsUseCase', classMeta);
  setMetadataFor(GetHtmlContentDisplayEngineUseCase, 'GetHtmlContentDisplayEngineUseCase', classMeta);
  setMetadataFor(Companion_41, 'Companion', objectMeta);
  setMetadataFor(SetHtmlContentDisplayEngineUseCase, 'SetHtmlContentDisplayEngineUseCase', classMeta);
  setMetadataFor(SetLangResult, 'SetLangResult', classMeta);
  function invoke$default_4(uiLang, currentDestination, navController, navArgs, $super) {
    navArgs = navArgs === VOID ? emptyMap() : navArgs;
    return $super === VOID ? this.vnz(uiLang, currentDestination, navController, navArgs) : $super.vnz.call(this, uiLang, currentDestination, navController, navArgs);
  }
  setMetadataFor(SetLanguageUseCase, 'SetLanguageUseCase', interfaceMeta);
  setMetadataFor(LaunchOpenLicensesUseCase, 'LaunchOpenLicensesUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(MakeLinkUseCase, 'MakeLinkUseCase', classMeta);
  setMetadataFor(OnClickLinkUseCase, 'OnClickLinkUseCase', classMeta);
  setMetadataFor(Companion_42, 'Companion', objectMeta);
  setMetadataFor(LinkTarget, 'LinkTarget', classMeta, Enum);
  setMetadataFor(OpenExternalLinkUseCase, 'OpenExternalLinkUseCase', interfaceMeta);
  setMetadataFor($invokeCOROUTINE$29, '$invokeCOROUTINE$29', classMeta, CoroutineImpl);
  setMetadataFor(UpdatePeerReviewAllocationUseCase, 'UpdatePeerReviewAllocationUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [7]);
  setMetadataFor(AddNewPersonUseCase$invoke$slambda, 'AddNewPersonUseCase$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AddNewPersonUseCase, 'AddNewPersonUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [4]);
  setMetadataFor(BulkAddPersonException, 'BulkAddPersonException', classMeta, IllegalArgumentException);
  setMetadataFor($serializer_35, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(BulkAddPersonsDataError, 'BulkAddPersonsDataError', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_47});
  setMetadataFor(BulkAddPersonsFromLocalUriUseCase, 'BulkAddPersonsFromLocalUriUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [3]);
  setMetadataFor(Companion_43, 'Companion', objectMeta);
  setMetadataFor($serializer_36, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(BulkAddUsersResult, 'BulkAddUsersResult', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_48});
  setMetadataFor(IPhoneNumberUtil, 'IPhoneNumberUtil', interfaceMeta);
  setMetadataFor(OnClickPhoneNumUseCase, 'OnClickPhoneNumUseCase', interfaceMeta);
  setMetadataFor(PhoneNumValidatorUseCase, 'PhoneNumValidatorUseCase', interfaceMeta);
  setMetadataFor(OnClickEmailUseCase, 'OnClickEmailUseCase', interfaceMeta);
  setMetadataFor(ShareAppUseCase, 'ShareAppUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ShareTextUseCase, 'ShareTextUseCase', interfaceMeta);
  setMetadataFor(GetShowPoweredByUseCase, 'GetShowPoweredByUseCase', classMeta);
  setMetadataFor(Companion_44, 'Companion', objectMeta);
  setMetadataFor($invokeCOROUTINE$30, '$invokeCOROUTINE$30', classMeta, CoroutineImpl);
  setMetadataFor(GetLocaleForSiteTermsUseCase, 'GetLocaleForSiteTermsUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(OnClickSendSmsUseCase, 'OnClickSendSmsUseCase', interfaceMeta);
  setMetadataFor(GetOfflineStorageAvailableSpace, 'GetOfflineStorageAvailableSpace', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_45, 'Companion', objectMeta);
  setMetadataFor(GetOfflineStorageOptionsUseCase, 'GetOfflineStorageOptionsUseCase', interfaceMeta);
  setMetadataFor(GetOfflineStorageSettingUseCase, 'GetOfflineStorageSettingUseCase', classMeta);
  setMetadataFor(OfflineStorageOption, 'OfflineStorageOption', classMeta);
  setMetadataFor(SetOfflineStorageSettingUseCase, 'SetOfflineStorageSettingUseCase', classMeta);
  setMetadataFor(DeleteUrisUseCase, 'DeleteUrisUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(IsTempFileCheckerUseCase, 'IsTempFileCheckerUseCase', interfaceMeta);
  setMetadataFor(ChunkIterator, 'ChunkIterator', classMeta, VOID, [Iterator]);
  setMetadataFor(Chunk, 'Chunk', classMeta);
  setMetadataFor(ChunkInfo, 'ChunkInfo', classMeta);
  setMetadataFor(UploadProgress, 'UploadProgress', classMeta);
  setMetadataFor(LastChunkResponse, 'LastChunkResponse', classMeta);
  function invoke$default_5(uploadUuid, localUri, remoteUrl, fromByte, chunkSize, onProgress, onStatusChange, lastChunkHeaders, $completion, $super) {
    fromByte = fromByte === VOID ? new Long(0, 0) : fromByte;
    chunkSize = chunkSize === VOID ? get_DEFAULT_CHUNK_SIZE() : chunkSize;
    var tmp;
    if (onProgress === VOID) {
      tmp = ChunkedUploadClientLocalUriUseCase$invoke$lambda;
    } else {
      tmp = onProgress;
    }
    onProgress = tmp;
    var tmp_0;
    if (onStatusChange === VOID) {
      tmp_0 = ChunkedUploadClientLocalUriUseCase$invoke$lambda_0;
    } else {
      tmp_0 = onStatusChange;
    }
    onStatusChange = tmp_0;
    lastChunkHeaders = lastChunkHeaders === VOID ? null : lastChunkHeaders;
    return $super === VOID ? this.to4(uploadUuid, localUri, remoteUrl, fromByte, chunkSize, onProgress, onStatusChange, lastChunkHeaders, $completion) : $super.to4.call(this, uploadUuid, localUri, remoteUrl, fromByte, chunkSize, onProgress, onStatusChange, lastChunkHeaders, $completion);
  }
  setMetadataFor(ChunkedUploadClientLocalUriUseCase, 'ChunkedUploadClientLocalUriUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [8]);
  setMetadataFor(Companion_46, 'Companion', objectMeta);
  setMetadataFor(StartUserSessionUseCase, 'StartUserSessionUseCase', classMeta);
  setMetadataFor(ValidateEmailUseCase, 'ValidateEmailUseCase', classMeta, VOID, VOID, ValidateEmailUseCase);
  setMetadataFor(StoreActivitiesUseCase$invoke$slambda, 'StoreActivitiesUseCase$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$34, '$invokeCOROUTINE$34', classMeta, CoroutineImpl);
  setMetadataFor(StoreActivitiesUseCase, 'StoreActivitiesUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(XapiException, 'XapiException', classMeta, Exception);
  setMetadataFor(XapiJson, 'XapiJson', classMeta, VOID, VOID, XapiJson);
  setMetadataFor(StatementStoreResult, 'StatementStoreResult', classMeta);
  setMetadataFor(XapiStatementResource$storeStatements$slambda, 'XapiStatementResource$storeStatements$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($storeStatementsCOROUTINE$35, '$storeStatementsCOROUTINE$35', classMeta, CoroutineImpl);
  setMetadataFor($postCOROUTINE$37, '$postCOROUTINE$37', classMeta, CoroutineImpl);
  setMetadataFor(XapiStatementResource, 'XapiStatementResource', classMeta, VOID, VOID, VOID, VOID, VOID, [2, 3]);
  setMetadataFor(XapiGroupAndPersonUidMap, 'XapiGroupAndPersonUidMap', classMeta);
  setMetadataFor($invokeCOROUTINE$39, '$invokeCOROUTINE$39', classMeta, CoroutineImpl);
  setMetadataFor(CreateXapiGroupForCourseGroupUseCase, 'CreateXapiGroupForCourseGroupUseCase', classMeta, VOID, VOID, VOID, VOID, VOID, [5]);
  setMetadataFor($insertOrUpdateActorsIfNameChangedCOROUTINE$40, '$insertOrUpdateActorsIfNameChangedCOROUTINE$40', classMeta, CoroutineImpl);
  setMetadataFor($insertOrUpdateIfLastModChangedCOROUTINE$41, '$insertOrUpdateIfLastModChangedCOROUTINE$41', classMeta, CoroutineImpl);
  setMetadataFor(Companion_47, 'Companion', objectMeta);
  setMetadataFor($serializer_37, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Attachment, 'Attachment', classMeta, VOID, VOID, Attachment, VOID, {0: $serializer_getInstance_49});
  setMetadataFor(Companion_48, 'Companion', objectMeta);
  setMetadataFor($serializer_38, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiAccount, 'XapiAccount', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_50});
  setMetadataFor(Companion_49, 'Companion', objectMeta);
  setMetadataFor($serializer_39, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Interaction, 'Interaction', classMeta, VOID, VOID, Interaction, VOID, {0: $serializer_getInstance_51});
  setMetadataFor(Companion_50, 'Companion', objectMeta);
  setMetadataFor($serializer_40, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiActivity, 'XapiActivity', classMeta, VOID, VOID, XapiActivity, VOID, {0: $serializer_getInstance_52});
  setMetadataFor(ActivityEntities, 'ActivityEntities', classMeta);
  setMetadataFor(Companion_51, 'Companion', objectMeta, VOID, [SerializerFactory]);
  setMetadataFor(XapiActor, 'XapiActor', interfaceMeta, VOID, VOID, VOID, VOID, {0: XapiActorSerializer_getInstance});
  setMetadataFor(XapiActorSerializer, 'XapiActorSerializer', objectMeta, JsonContentPolymorphicSerializer);
  setMetadataFor(ActorEntities, 'ActorEntities', classMeta);
  setMetadataFor(Companion_52, 'Companion', objectMeta);
  setMetadataFor($serializer_41, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiStatementObject, 'XapiStatementObject', interfaceMeta, VOID, VOID, VOID, VOID, {0: XapiStatementObjectSerializer_getInstance});
  setMetadataFor(XapiAgent, 'XapiAgent', classMeta, VOID, [XapiActor, XapiStatementObject], XapiAgent, VOID, {0: $serializer_getInstance_53});
  setMetadataFor(Companion_53, 'Companion', objectMeta);
  setMetadataFor($serializer_42, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiContext, 'XapiContext', classMeta, VOID, VOID, XapiContext, VOID, {0: $serializer_getInstance_54});
  setMetadataFor(Companion_54, 'Companion', objectMeta);
  setMetadataFor(XapiContextActivities, 'XapiContextActivities', classMeta, VOID, VOID, XapiContextActivities, VOID, {0: XapiContextActivitiesSerializer_getInstance});
  setMetadataFor(XapiContextActivitiesSerializer, 'XapiContextActivitiesSerializer', objectMeta, VOID, [KSerializer]);
  setMetadataFor(Companion_55, 'Companion', objectMeta);
  setMetadataFor($serializer_43, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiContextActivitiesSurrogate, 'XapiContextActivitiesSurrogate', classMeta, VOID, VOID, XapiContextActivitiesSurrogate, VOID, {0: $serializer_getInstance_55});
  setMetadataFor(Companion_56, 'Companion', objectMeta);
  setMetadataFor($serializer_44, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiGroup, 'XapiGroup', classMeta, VOID, [XapiActor, XapiStatementObject], XapiGroup, VOID, {0: $serializer_getInstance_56});
  setMetadataFor(sam$kotlin_Comparator$0_0, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);
  setMetadataFor(Companion_57, 'Companion', objectMeta, VOID, [SerializerFactory]);
  setMetadataFor(XapiInteractionType, 'XapiInteractionType', classMeta, Enum, VOID, VOID, VOID, {0: Companion_getInstance_74});
  setMetadataFor(XapiInteractionTypeSerializer, 'XapiInteractionTypeSerializer', objectMeta, VOID, [KSerializer]);
  setMetadataFor(Companion_58, 'Companion', objectMeta, VOID, [SerializerFactory]);
  setMetadataFor(XapiObjectType, 'XapiObjectType', classMeta, Enum, VOID, VOID, VOID, {0: Companion_getInstance_75});
  setMetadataFor(XapiObjectTypeSerializer, 'XapiObjectTypeSerializer', objectMeta, VOID, [KSerializer]);
  setMetadataFor(Companion_59, 'Companion', objectMeta);
  setMetadataFor($serializer_45, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(Score, 'Score', classMeta, VOID, VOID, Score, VOID, {0: $serializer_getInstance_57});
  setMetadataFor(Companion_60, 'Companion', objectMeta);
  setMetadataFor($serializer_46, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiResult, 'XapiResult', classMeta, VOID, VOID, XapiResult, VOID, {0: $serializer_getInstance_58});
  setMetadataFor(Companion_61, 'Companion', objectMeta);
  setMetadataFor($serializer_47, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiStatement, 'XapiStatement', classMeta, VOID, [XapiStatementObject], VOID, VOID, {0: $serializer_getInstance_59});
  setMetadataFor(StatementEntities, 'StatementEntities', classMeta, VOID, VOID, StatementEntities);
  setMetadataFor(XapiStatementObjectSerializer, 'XapiStatementObjectSerializer', objectMeta, JsonContentPolymorphicSerializer);
  setMetadataFor(Companion_62, 'Companion', objectMeta);
  setMetadataFor($serializer_48, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiActivityStatementObject, 'XapiActivityStatementObject', classMeta, VOID, [XapiStatementObject], VOID, VOID, {0: $serializer_getInstance_60});
  setMetadataFor(Companion_63, 'Companion', objectMeta);
  setMetadataFor($serializer_49, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiStatementRef, 'XapiStatementRef', classMeta, VOID, [XapiStatementObject], VOID, VOID, {0: $serializer_getInstance_61});
  setMetadataFor(Companion_64, 'Companion', objectMeta);
  setMetadataFor($serializer_50, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiVerb, 'XapiVerb', classMeta, VOID, VOID, XapiVerb, VOID, {0: $serializer_getInstance_62});
  setMetadataFor(VerbEntities, 'VerbEntities', classMeta);
  setMetadataFor(NonInteractiveContentXapiStatementRecorder$onComplete$slambda, 'NonInteractiveContentXapiStatementRecorder$onComplete$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(NonInteractiveContentXapiStatementRecorder, 'NonInteractiveContentXapiStatementRecorder', classMeta);
  setMetadataFor(NonInteractiveContentXapiStatementRecorderFactory, 'NonInteractiveContentXapiStatementRecorderFactory', classMeta);
  setMetadataFor(SaveStatementOnClearUseCase, 'SaveStatementOnClearUseCase', interfaceMeta);
  setMetadataFor(SaveStatementOnUnloadUseCase, 'SaveStatementOnUnloadUseCase', interfaceMeta, VOID, [SaveStatementOnClearUseCase]);
  setMetadataFor(Companion_65, 'Companion', objectMeta);
  setMetadataFor($serializer_51, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(XapiStatementsAndSession, 'XapiStatementsAndSession', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_63});
  setMetadataFor(ResumeOrStartXapiSessionUseCase, 'ResumeOrStartXapiSessionUseCase', interfaceMeta, VOID, VOID, VOID, VOID, VOID, [7]);
  setMetadataFor(XXHasher64Factory, 'XXHasher64Factory', interfaceMeta);
  setMetadataFor(XXStringHasher, 'XXStringHasher', interfaceMeta);
  setMetadataFor(UstadMobileConstants, 'UstadMobileConstants', objectMeta);
  setMetadataFor(Companion_66, 'Companion', objectMeta);
  setMetadataFor(UstadGoOptions, 'UstadGoOptions', classMeta, VOID, VOID, UstadGoOptions);
  setMetadataFor(UiLanguage, 'UiLanguage', classMeta);
  setMetadataFor(Companion_67, 'Companion', objectMeta);
  setMetadataFor(UstadMobileSystemCommon, 'UstadMobileSystemCommon', classMeta, VOID, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(ActionBarButtonUiState, 'ActionBarButtonUiState', classMeta, VOID, VOID, ActionBarButtonUiState);
  setMetadataFor(AppActionButton, 'AppActionButton', classMeta);
  setMetadataFor(AppBarColors, 'AppBarColors', classMeta, Enum);
  setMetadataFor(AppBarSearchUiState, 'AppBarSearchUiState', classMeta, VOID, VOID, AppBarSearchUiState);
  setMetadataFor(AppStateIcon, 'AppStateIcon', classMeta, Enum);
  setMetadataFor(AppUiState, 'AppUiState', classMeta, VOID, VOID, AppUiState);
  setMetadataFor(FabIcon, 'FabIcon', classMeta, Enum);
  setMetadataFor(FabUiState, 'FabUiState', classMeta, VOID, VOID, FabUiState);
  setMetadataFor(State, 'State', classMeta, Enum);
  setMetadataFor(Companion_68, 'Companion', objectMeta);
  setMetadataFor(LoadingUiState, 'LoadingUiState', classMeta, VOID, VOID, LoadingUiState);
  setMetadataFor(OverflowItem, 'OverflowItem', classMeta);
  setMetadataFor(Snack, 'Snack', classMeta);
  setMetadataFor(SnackBarDispatcher, 'SnackBarDispatcher', interfaceMeta);
  setMetadataFor(TabItem, 'TabItem', classMeta);
  setMetadataFor(UstadContextMenuItem, 'UstadContextMenuItem', classMeta);
  setMetadataFor(ApiUrlConfig, 'ApiUrlConfig', classMeta);
  setMetadataFor(AppConfig, 'AppConfig', interfaceMeta);
  setMetadataFor(AppConfigMap, 'AppConfigMap', classMeta, VOID, [AppConfig]);
  setMetadataFor(Companion_69, 'Companion', objectMeta);
  setMetadataFor(GenderConfig, 'GenderConfig', classMeta, VOID, VOID, GenderConfig);
  setMetadataFor(SettingsLocaleSettingDelegate, 'SettingsLocaleSettingDelegate', classMeta);
  setMetadataFor(Companion_70, 'Companion', objectMeta);
  setMetadataFor(SupportedLanguagesConfig, 'SupportedLanguagesConfig', classMeta);
  setMetadataFor(Companion_71, 'Companion', objectMeta);
  setMetadataFor(CourseTerminologyStrings, 'CourseTerminologyStrings', classMeta);
  setMetadataFor(TerminologyEntry, 'TerminologyEntry', classMeta);
  setMetadataFor(ClazzEnrolmentListConstants, 'ClazzEnrolmentListConstants', objectMeta);
  setMetadataFor(ConditionConstants, 'ConditionConstants', objectMeta);
  setMetadataFor(ContentCompletionStatusConstants, 'ContentCompletionStatusConstants', objectMeta);
  setMetadataFor(EnrolmentPolicyConstants, 'EnrolmentPolicyConstants', objectMeta);
  setMetadataFor(FieldConstants, 'FieldConstants', objectMeta);
  setMetadataFor(LicenceConstants, 'LicenceConstants', objectMeta);
  setMetadataFor(OutcomeConstants, 'OutcomeConstants', objectMeta);
  setMetadataFor(PersonConstants_0, 'PersonConstants', objectMeta);
  setMetadataFor(PersonParentJoinConstants, 'PersonParentJoinConstants', objectMeta);
  setMetadataFor(RoleConstants, 'RoleConstants', objectMeta);
  setMetadataFor(ScheduleConstants, 'ScheduleConstants', objectMeta);
  setMetadataFor(SubmissionPolicyConstants, 'SubmissionPolicyConstants', objectMeta);
  function navigate$default(viewName, args, goOptions, $super) {
    goOptions = goOptions === VOID ? Companion_getInstance_83().doj_1 : goOptions;
    var tmp;
    if ($super === VOID) {
      this.eoo(viewName, args, goOptions);
      tmp = Unit_instance;
    } else {
      tmp = $super.eoo.call(this, viewName, args, goOptions);
    }
    return tmp;
  }
  setMetadataFor(UstadNavController, 'UstadNavController', interfaceMeta);
  setMetadataFor(CommandFlowUstadNavController, 'CommandFlowUstadNavController', classMeta, VOID, [UstadNavController], CommandFlowUstadNavController);
  setMetadataFor(NavCommand, 'NavCommand', classMeta);
  setMetadataFor(NavigateNavCommand, 'NavigateNavCommand', classMeta, NavCommand);
  setMetadataFor(PopNavCommand, 'PopNavCommand', classMeta, NavCommand);
  setMetadataFor(NavResult, 'NavResult', classMeta);
  setMetadataFor(NavResultDest, 'NavResultDest', classMeta);
  setMetadataFor(NavResultReturner, 'NavResultReturner', interfaceMeta);
  setMetadataFor(NavResultReturnerImpl$resultFlowForKey$o$collect$slambda, 'NavResultReturnerImpl$resultFlowForKey$o$collect$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($collectCOROUTINE$42, '$collectCOROUTINE$42', classMeta, CoroutineImpl);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_1, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(_no_name_provided__qut3iv_0, VOID, classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(NavResultReturnerImpl, 'NavResultReturnerImpl', classMeta, VOID, [NavResultReturner], NavResultReturnerImpl);
  setMetadataFor(BitmaskFlag, 'BitmaskFlag', classMeta);
  setMetadataFor(ListPagingSource, 'ListPagingSource', classMeta, PagingSource, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(RefreshCommand, 'RefreshCommand', classMeta, VOID, VOID, RefreshCommand);
  setMetadataFor(ClazzLogCreatorManager, 'ClazzLogCreatorManager', interfaceMeta);
  setMetadataFor(Activity, 'Activity', classMeta);
  setMetadataFor(Companion_72, 'Companion', objectMeta);
  setMetadataFor(TinCanXML, 'TinCanXML', classMeta, VOID, VOID, TinCanXML);
  setMetadataFor(DiTag, 'DiTag', objectMeta);
  setMetadataFor(EventCollator2$receiveEvent$slambda, 'EventCollator2$receiveEvent$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(EventCollator2, 'EventCollator2', classMeta);
  setMetadataFor(Companion_73, 'Companion', objectMeta);
  setMetadataFor(MessageIdOption2, 'MessageIdOption2', classMeta);
  setMetadataFor(SortOrderOption, 'SortOrderOption', classMeta);
  setMetadataFor(UMFileUtil, 'UMFileUtil', objectMeta);
  setMetadataFor(Companion_74, 'Companion', objectMeta);
  setMetadataFor(UstadUrlComponents, 'UstadUrlComponents', classMeta);
  setMetadataFor($verifySiteCOROUTINE$43, '$verifySiteCOROUTINE$43', classMeta, CoroutineImpl);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_2, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(whenSubscribed$o$collect$slambda, 'whenSubscribed$o$collect$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($collectCOROUTINE$44, '$collectCOROUTINE$44', classMeta, CoroutineImpl);
  setMetadataFor(_no_name_provided__qut3iv_1, VOID, classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(whenSubscribed$slambda, 'whenSubscribed$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_1, 'sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0', classMeta);
  setMetadataFor(navigateToLink$slambda, 'navigateToLink$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ScopedGrantResult, 'ScopedGrantResult', classMeta);
  setMetadataFor($insertPersonAndGroupCOROUTINE$45, '$insertPersonAndGroupCOROUTINE$45', classMeta, CoroutineImpl);
  setMetadataFor($localFirstThenRepoIfFalseCOROUTINE$46, '$localFirstThenRepoIfFalseCOROUTINE$46', classMeta, CoroutineImpl);
  setMetadataFor($grantScopedPermissionCOROUTINE$47, '$grantScopedPermissionCOROUTINE$47', classMeta, CoroutineImpl);
  setMetadataFor($localFirstThenRepoIfNullCOROUTINE$48, '$localFirstThenRepoIfNullCOROUTINE$48', classMeta, CoroutineImpl);
  setMetadataFor(Companion_75, 'Companion', objectMeta, VOID, [SerializerFactory]);
  setMetadataFor(IStringValues, 'IStringValues', interfaceMeta, VOID, VOID, VOID, VOID, {0: Companion_getInstance_92});
  setMetadataFor(MapStringValues, 'MapStringValues', classMeta, VOID, [IStringValues]);
  setMetadataFor(StringValuesSerializer, 'StringValuesSerializer', classMeta, VOID, [KSerializer], StringValuesSerializer);
  setMetadataFor(Companion_76, 'Companion', objectMeta);
  setMetadataFor(Companion_77, 'Companion', objectMeta);
  setMetadataFor(Companion_78, 'Companion', objectMeta);
  setMetadataFor(Companion_79, 'Companion', objectMeta);
  setMetadataFor(Companion_80, 'Companion', objectMeta);
  setMetadataFor(Companion_81, 'Companion', objectMeta);
  setMetadataFor(Companion_82, 'Companion', objectMeta);
  setMetadataFor(Companion_83, 'Companion', objectMeta);
  setMetadataFor(Companion_84, 'Companion', objectMeta);
  setMetadataFor(ListViewMode, 'ListViewMode', classMeta, Enum);
  setMetadataFor(Companion_85, 'Companion', objectMeta);
  setMetadataFor(UstadViewModel, 'UstadViewModel', classMeta, ViewModel, [ViewModel, DIAware], VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(DetailViewModel, 'DetailViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ErrorReportUiState, 'ErrorReportUiState', classMeta, VOID, VOID, ErrorReportUiState);
  setMetadataFor(HolidayCalendarDetailUIState, 'HolidayCalendarDetailUIState', classMeta, VOID, VOID, HolidayCalendarDetailUIState);
  setMetadataFor(Companion_86, 'Companion', objectMeta);
  setMetadataFor(HolidayCalendarEditUiState, 'HolidayCalendarEditUiState', classMeta, VOID, VOID, HolidayCalendarEditUiState);
  setMetadataFor(Companion_87, 'Companion', objectMeta);
  setMetadataFor(HolidayCalendarListUiState, 'HolidayCalendarListUiState', classMeta, VOID, VOID, HolidayCalendarListUiState);
  setMetadataFor(LanguageDetailUiState, 'LanguageDetailUiState', classMeta, VOID, VOID, LanguageDetailUiState);
  setMetadataFor(LanguageEditUiState, 'LanguageEditUiState', classMeta, VOID, VOID, LanguageEditUiState);
  setMetadataFor(Companion_88, 'Companion', objectMeta);
  setMetadataFor(LanguageListUiState, 'LanguageListUiState', classMeta, VOID, VOID, LanguageListUiState);
  setMetadataFor(LeavingReasonEditViewModel$slambda$slambda, 'LeavingReasonEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(LeavingReasonEditViewModel$slambda$slambda_1, 'LeavingReasonEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_89, 'Companion', objectMeta);
  setMetadataFor(LeavingReasonEditViewModel$slambda, 'LeavingReasonEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(LeavingReasonEditViewModel$onEntityChanged$slambda, 'LeavingReasonEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadEditViewModel, 'UstadEditViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(LeavingReasonEditViewModel, 'LeavingReasonEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(LeavingReasonEditUiState, 'LeavingReasonEditUiState', classMeta, VOID, VOID, LeavingReasonEditUiState);
  setMetadataFor(Companion_90, 'Companion', objectMeta);
  setMetadataFor(Companion_91, 'Companion', objectMeta);
  setMetadataFor(ReportFilterEditUiState, 'ReportFilterEditUiState', classMeta, VOID, VOID, ReportFilterEditUiState);
  setMetadataFor(ScopedGrantDetailUiState, 'ScopedGrantDetailUiState', classMeta, VOID, VOID, ScopedGrantDetailUiState);
  setMetadataFor(Companion_92, 'Companion', objectMeta);
  setMetadataFor(ScopedGrantEditUiState, 'ScopedGrantEditUiState', classMeta, VOID, VOID, ScopedGrantEditUiState);
  setMetadataFor(Companion_93, 'Companion', objectMeta);
  setMetadataFor(UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda, 'UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_94, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_3, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(UstadListViewModel$searchEvtCollator$slambda, 'UstadListViewModel$searchEvtCollator$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda, 'UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(UstadListViewModel, 'UstadListViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(UstadViewModel$filteredResultFlowForKey$o$collect$slambda, 'UstadViewModel$filteredResultFlowForKey$o$collect$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($collectCOROUTINE$52, '$collectCOROUTINE$52', classMeta, CoroutineImpl);
  setMetadataFor(Companion_95, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_4, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0, 'sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0', classMeta, VOID, [OpenExternalLinkUseCase]);
  setMetadataFor(_no_name_provided__qut3iv_2, VOID, classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadViewModel$getJson$slambda, 'UstadViewModel$getJson$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadViewModel$setJson$slambda, 'UstadViewModel$setJson$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadViewModel$launchIfHasPermission$slambda, 'UstadViewModel$launchIfHasPermission$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UstadViewModel$launchWithLoadingIndicator$slambda, 'UstadViewModel$launchWithLoadingIndicator$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($getJsonCOROUTINE$49, '$getJsonCOROUTINE$49', classMeta, CoroutineImpl);
  setMetadataFor($setJsonCOROUTINE$50, '$setJsonCOROUTINE$50', classMeta, CoroutineImpl);
  setMetadataFor($loadEntityCOROUTINE$51, '$loadEntityCOROUTINE$51', classMeta, CoroutineImpl);
  setMetadataFor(Companion_96, 'Companion', objectMeta);
  setMetadataFor(OpenLicensesViewModel, 'OpenLicensesViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(AccountListViewModel$slambda$slambda, 'AccountListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AccountListViewModel$slambda$slambda$slambda, 'AccountListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AccountListViewModel$slambda$slambda_1, 'AccountListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_97, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_5, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0_0, 'sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0', classMeta, VOID, [OpenExternalLinkUseCase]);
  setMetadataFor(AccountListViewModel$slambda, 'AccountListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AccountListViewModel$slambda_1, 'AccountListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AccountListViewModel$onClickLogout$slambda, 'AccountListViewModel$onClickLogout$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AccountListViewModel$onClickDeleteAccount$slambda, 'AccountListViewModel$onClickDeleteAccount$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AccountListViewModel$onClickOpenLicenses$slambda, 'AccountListViewModel$onClickOpenLicenses$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AccountListViewModel, 'AccountListViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(AccountListUiState, 'AccountListUiState', classMeta, VOID, VOID, AccountListUiState);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_6, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(launchSetTitleFromClazzUid$slambda$slambda, 'launchSetTitleFromClazzUid$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(launchSetTitleFromClazzUid$slambda, 'launchSetTitleFromClazzUid$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_7, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(collectClazzNameAndUpdateTitle$slambda, 'collectClazzNameAndUpdateTitle$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CoursePermissionConstants, 'CoursePermissionConstants', objectMeta);
  setMetadataFor(getTitleForCoursePermission$slambda, 'getTitleForCoursePermission$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(getTitleForCoursePermission$slambda_1, 'getTitleForCoursePermission$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($getTitleForCoursePermissionCOROUTINE$53, '$getTitleForCoursePermissionCOROUTINE$53', classMeta, CoroutineImpl);
  setMetadataFor(ClazzDetailViewModel$slambda$slambda$slambda$slambda, 'ClazzDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailViewModel$slambda$slambda$slambda, 'ClazzDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailViewModel$slambda$slambda, 'ClazzDetailViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_98, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_8, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailViewModel$slambda, 'ClazzDetailViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailViewModel, 'ClazzDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ClazzDetailUiState, 'ClazzDetailUiState', classMeta, VOID, VOID, ClazzDetailUiState);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($collectCOROUTINE$54, '$collectCOROUTINE$54', classMeta, CoroutineImpl);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_1, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(_no_name_provided__qut3iv_3, VOID, classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_1, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_3, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_1, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($collectCOROUTINE$55, '$collectCOROUTINE$55', classMeta, CoroutineImpl);
  setMetadataFor(_no_name_provided__qut3iv_4, VOID, classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_5, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_3, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($collectCOROUTINE$56, '$collectCOROUTINE$56', classMeta, CoroutineImpl);
  setMetadataFor(_no_name_provided__qut3iv_5, VOID, classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_7, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda_1, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda_3, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda$slambda_5, 'ClazzDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda$slambda, 'ClazzDetailOverviewViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_99, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_9, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel$slambda, 'ClazzDetailOverviewViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzDetailOverviewViewModel, 'ClazzDetailOverviewViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ClazzDetailOverviewUiState, 'ClazzDetailOverviewUiState', classMeta, VOID, VOID, ClazzDetailOverviewUiState);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda, 'ClazzEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda_1, 'ClazzEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda_3, 'ClazzEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda_5, 'ClazzEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda_7, 'ClazzEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda_9, 'ClazzEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda$slambda, 'ClazzEditViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda_11, 'ClazzEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda_13, 'ClazzEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda_15, 'ClazzEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda_17, 'ClazzEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda$slambda_19, 'ClazzEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda, 'ClazzEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda_1, 'ClazzEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda_3, 'ClazzEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda_5, 'ClazzEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda_7, 'ClazzEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda_9, 'ClazzEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda_11, 'ClazzEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda_13, 'ClazzEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda$slambda_15, 'ClazzEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$onClickSave$slambda$slambda, 'ClazzEditViewModel$onClickSave$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_100, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_10, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda, 'ClazzEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$slambda_1, 'ClazzEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$updateCourseBlockList$slambda, 'ClazzEditViewModel$updateCourseBlockList$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$onEntityChanged$slambda, 'ClazzEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$onClickSave$slambda, 'ClazzEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzEditViewModel$onCourseBlockMoved$slambda, 'ClazzEditViewModel$onCourseBlockMoved$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$updateCourseBlock$slambda, 'ClazzEditViewModel$updateCourseBlock$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEditViewModel$onClickDeleteCourseBlock$slambda, 'ClazzEditViewModel$onClickDeleteCourseBlock$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($updateCourseBlockListCOROUTINE$57, '$updateCourseBlockListCOROUTINE$57', classMeta, CoroutineImpl);
  setMetadataFor(ClazzEditViewModel, 'ClazzEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [1, 2, 3, 6]);
  setMetadataFor(CourseBlockUiState, 'CourseBlockUiState', classMeta);
  setMetadataFor(Companion_101, 'Companion', objectMeta);
  setMetadataFor($serializer_52, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(ClazzEditUiState, 'ClazzEditUiState', classMeta, VOID, VOID, ClazzEditUiState, VOID, {0: $serializer_getInstance_64});
  setMetadataFor($loadCOROUTINE$58, '$loadCOROUTINE$58', classMeta, CoroutineImpl);
  setMetadataFor($loadHttpCOROUTINE$59, '$loadHttpCOROUTINE$59', classMeta, CoroutineImpl);
  setMetadataFor(ClazzGradebookPagingSource, 'ClazzGradebookPagingSource', classMeta, DelegatedInvalidationPagingSource, [DelegatedInvalidationPagingSource, PagingSourceWithHttpLoader], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzGradebookViewModel$slambda$slambda$slambda$slambda, 'ClazzGradebookViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzGradebookViewModel$slambda$slambda$slambda$slambda_1, 'ClazzGradebookViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzGradebookViewModel$slambda$slambda$slambda, 'ClazzGradebookViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzGradebookViewModel$slambda$slambda$slambda_1, 'ClazzGradebookViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzGradebookViewModel$slambda$slambda, 'ClazzGradebookViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_102, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_11, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzGradebookViewModel$slambda, 'ClazzGradebookViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzGradebookViewModel, 'ClazzGradebookViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(ClazzGradebookUiState, 'ClazzGradebookUiState', classMeta, VOID, VOID, ClazzGradebookUiState);
  setMetadataFor(Companion_103, 'Companion', objectMeta);
  setMetadataFor(InviteViaLinkViewModel, 'InviteViaLinkViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(InviteViaLinkUiState, 'InviteViaLinkUiState', classMeta, VOID, VOID, InviteViaLinkUiState);
  setMetadataFor(Companion_104, 'Companion', objectMeta);
  setMetadataFor(JoinWithCodeViewModel$onClickJoin$slambda, 'JoinWithCodeViewModel$onClickJoin$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(JoinWithCodeViewModel, 'JoinWithCodeViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(JoinWithCodeUiState, 'JoinWithCodeUiState', classMeta, VOID, VOID, JoinWithCodeUiState);
  setMetadataFor(ClazzListViewModel$slambda$slambda$slambda, 'ClazzListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzListViewModel$slambda$slambda, 'ClazzListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzListViewModel$slambda$slambda$slambda_1, 'ClazzListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzListViewModel$slambda$slambda_1, 'ClazzListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_105, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_12, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzListViewModel$slambda, 'ClazzListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzListViewModel$slambda_1, 'ClazzListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzListViewModel$onClickCancelEnrolmentRequest$slambda, 'ClazzListViewModel$onClickCancelEnrolmentRequest$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzListViewModel, 'ClazzListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(Companion_106, 'Companion', objectMeta);
  setMetadataFor(ClazzListUiState, 'ClazzListUiState', classMeta, VOID, VOID, ClazzListUiState);
  setMetadataFor(CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda, 'CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_1, 'CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CoursePermissionDetailViewModel$slambda$slambda$slambda, 'CoursePermissionDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CoursePermissionDetailViewModel$slambda$slambda, 'CoursePermissionDetailViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_107, 'Companion', objectMeta);
  setMetadataFor(CoursePermissionDetailViewModel$slambda, 'CoursePermissionDetailViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CoursePermissionDetailViewModel, 'CoursePermissionDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(CoursePermissionDetailUiState, 'CoursePermissionDetailUiState', classMeta, VOID, VOID, CoursePermissionDetailUiState);
  setMetadataFor(CoursePermissionEditViewModel$slambda$slambda, 'CoursePermissionEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CoursePermissionEditViewModel$slambda$slambda_1, 'CoursePermissionEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(CoursePermissionEditViewModel$onClickSave$slambda$slambda, 'CoursePermissionEditViewModel$onClickSave$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_108, 'Companion', objectMeta);
  setMetadataFor(CoursePermissionEditViewModel$slambda, 'CoursePermissionEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CoursePermissionEditViewModel$slambda_1, 'CoursePermissionEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CoursePermissionEditViewModel$onClickSave$slambda, 'CoursePermissionEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(CoursePermissionEditViewModel, 'CoursePermissionEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(CoursePermissionEditUiState, 'CoursePermissionEditUiState', classMeta, VOID, VOID, CoursePermissionEditUiState);
  setMetadataFor(CoursePermissionListViewModel$slambda$slambda$slambda, 'CoursePermissionListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CoursePermissionListViewModel$slambda$slambda, 'CoursePermissionListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_109, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_13, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(CoursePermissionListViewModel$slambda, 'CoursePermissionListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CoursePermissionListViewModel$onClickDeleteEntry$slambda, 'CoursePermissionListViewModel$onClickDeleteEntry$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CoursePermissionListViewModel, 'CoursePermissionListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(CoursePermissionListUiState, 'CoursePermissionListUiState', classMeta, VOID, VOID, CoursePermissionListUiState);
  setMetadataFor(Companion_110, 'Companion', objectMeta);
  setMetadataFor(TextLimitType, 'TextLimitType', classMeta, Enum);
  setMetadataFor(MarkingType, 'MarkingType', classMeta, Enum);
  setMetadataFor(ClazzAssignmentViewModelConstants, 'ClazzAssignmentViewModelConstants', objectMeta);
  setMetadataFor(_no_name_provided__qut3iv_6, VOID, classMeta);
  setMetadataFor(UstadAssignmentSubmissionHeaderUiState, 'UstadAssignmentSubmissionHeaderUiState', classMeta, VOID, VOID, UstadAssignmentSubmissionHeaderUiState);
  setMetadataFor(UstadCourseAssignmentMarkListItemUiState, 'UstadCourseAssignmentMarkListItemUiState', classMeta);
  setMetadataFor(Companion_111, 'Companion', objectMeta);
  setMetadataFor(ClazzAssignmentDetailViewModel$slambda, 'ClazzAssignmentDetailViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(ClazzAssignmentDetailViewModel, 'ClazzAssignmentDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ClazzAssignmentDetailUiState, 'ClazzAssignmentDetailUiState', classMeta, VOID, VOID, ClazzAssignmentDetailUiState);
  setMetadataFor(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda, 'ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda, 'ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda, 'ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_1, 'ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_112, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_14, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailSubmissionsTabViewModel$slambda, 'ClazzAssignmentDetailSubmissionsTabViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailSubmissionsTabViewModel, 'ClazzAssignmentDetailSubmissionsTabViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(Companion_113, 'Companion', objectMeta);
  setMetadataFor(ClazzAssignmentDetailSubmissionsTabUiState, 'ClazzAssignmentDetailSubmissionsTabUiState', classMeta, VOID, VOID, ClazzAssignmentDetailSubmissionsTabUiState);
  setMetadataFor(AssignmentSubmitterSummaryUiState, 'AssignmentSubmitterSummaryUiState', classMeta);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_1, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_3, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_5, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($collectCOROUTINE$60, '$collectCOROUTINE$60', classMeta, CoroutineImpl);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(_no_name_provided__qut3iv_7, VOID, classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_7, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_1, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_3, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_5, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_7, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda$slambda_1, 'ClazzAssignmentDetailOverviewViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda, 'ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_114, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_15, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$slambda, 'ClazzAssignmentDetailOverviewViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda, 'ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$onClickSubmitPrivateComment$slambda, 'ClazzAssignmentDetailOverviewViewModel$onClickSubmitPrivateComment$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$onClickSubmitCourseComment$slambda, 'ClazzAssignmentDetailOverviewViewModel$onClickSubmitCourseComment$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$onAddSubmissionFile$slambda, 'ClazzAssignmentDetailOverviewViewModel$onAddSubmissionFile$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$onClickSubmit$slambda, 'ClazzAssignmentDetailOverviewViewModel$onClickSubmit$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda, 'ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda, 'ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel$onDeleteComment$slambda, 'ClazzAssignmentDetailOverviewViewModel$onDeleteComment$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentDetailOverviewViewModel, 'ClazzAssignmentDetailOverviewViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ClazzAssignmentDetailOverviewUiState, 'ClazzAssignmentDetailOverviewUiState', classMeta, VOID, VOID, ClazzAssignmentDetailOverviewUiState);
  setMetadataFor(ClazzAssignmentDetailoverviewSubmissionUiState, 'ClazzAssignmentDetailoverviewSubmissionUiState', classMeta, VOID, VOID, ClazzAssignmentDetailoverviewSubmissionUiState);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda, 'ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda$slambda, 'ClazzAssignmentEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda$slambda_1, 'ClazzAssignmentEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_1, 'ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda$slambda_3, 'ClazzAssignmentEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_3, 'ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda$slambda_5, 'ClazzAssignmentEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda, 'ClazzAssignmentEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda_1, 'ClazzAssignmentEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda_3, 'ClazzAssignmentEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda_5, 'ClazzAssignmentEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda_7, 'ClazzAssignmentEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda_9, 'ClazzAssignmentEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda$slambda_11, 'ClazzAssignmentEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$onClickSave$slambda$slambda, 'ClazzAssignmentEditViewModel$onClickSave$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_115, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_16, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$slambda, 'ClazzAssignmentEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$onAssignmentChanged$slambda, 'ClazzAssignmentEditViewModel$onAssignmentChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$onCourseBlockChanged$slambda, 'ClazzAssignmentEditViewModel$onCourseBlockChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$onPictureChanged$slambda, 'ClazzAssignmentEditViewModel$onPictureChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentEditViewModel$onClickSave$slambda, 'ClazzAssignmentEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzAssignmentEditViewModel, 'ClazzAssignmentEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [0, 2, 3, 6]);
  setMetadataFor(Companion_116, 'Companion', objectMeta);
  setMetadataFor($serializer_53, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(ClazzAssignmentEditUiState, 'ClazzAssignmentEditUiState', classMeta, VOID, VOID, ClazzAssignmentEditUiState, VOID, {0: $serializer_getInstance_65});
  setMetadataFor(PeerReviewerAllocationEditViewModel$slambda$slambda, 'PeerReviewerAllocationEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PeerReviewerAllocationEditViewModel$slambda$slambda_1, 'PeerReviewerAllocationEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_117, 'Companion', objectMeta);
  setMetadataFor(PeerReviewerAllocationEditViewModel$slambda, 'PeerReviewerAllocationEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda, 'PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PeerReviewerAllocationEditViewModel, 'PeerReviewerAllocationEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(PeerReviewerAllocationEditUIState, 'PeerReviewerAllocationEditUIState', classMeta, VOID, VOID, PeerReviewerAllocationEditUIState);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_5, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_1, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_3, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_5, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda, 'ClazzAssignmentSubmitterDetailViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_118, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_17, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$slambda, 'ClazzAssignmentSubmitterDetailViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$onSubmitPrivateComment$slambda, 'ClazzAssignmentSubmitterDetailViewModel$onSubmitPrivateComment$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$onClickSubmitMark$slambda, 'ClazzAssignmentSubmitterDetailViewModel$onClickSubmitMark$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda, 'ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel$onDeleteComment$slambda, 'ClazzAssignmentSubmitterDetailViewModel$onDeleteComment$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzAssignmentSubmitterDetailViewModel, 'ClazzAssignmentSubmitterDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(sam$kotlin_Comparator$0_1, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);
  setMetadataFor(ClazzAssignmentSubmitterDetailUiState, 'ClazzAssignmentSubmitterDetailUiState', classMeta, VOID, VOID, ClazzAssignmentSubmitterDetailUiState);
  setMetadataFor(ClazzMemberListViewModel$slambda$slambda$slambda$slambda, 'ClazzMemberListViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzMemberListViewModel$slambda$slambda$slambda$slambda_1, 'ClazzMemberListViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzMemberListViewModel$slambda$slambda$slambda, 'ClazzMemberListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzMemberListViewModel$slambda$slambda$slambda_1, 'ClazzMemberListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzMemberListViewModel$slambda$slambda, 'ClazzMemberListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda, 'ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_119, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_18, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzMemberListViewModel$slambda, 'ClazzMemberListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzMemberListViewModel$onClickRespondToPendingEnrolment$slambda, 'ClazzMemberListViewModel$onClickRespondToPendingEnrolment$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzMemberListViewModel$onClickAddNewMember$slambda, 'ClazzMemberListViewModel$onClickAddNewMember$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzMemberListViewModel, 'ClazzMemberListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(ClazzMemberListUiState, 'ClazzMemberListUiState', classMeta, VOID, VOID, ClazzMemberListUiState);
  setMetadataFor(ClazzEnrolmentEditViewModel$slambda$slambda, 'ClazzEnrolmentEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentEditViewModel$slambda$slambda_1, 'ClazzEnrolmentEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzEnrolmentEditViewModel$slambda$slambda_3, 'ClazzEnrolmentEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_120, 'Companion', objectMeta);
  setMetadataFor(ClazzEnrolmentEditViewModel$slambda, 'ClazzEnrolmentEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentEditViewModel$slambda_1, 'ClazzEnrolmentEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentEditViewModel$onEntityChanged$slambda, 'ClazzEnrolmentEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentEditViewModel$onClickSave$slambda, 'ClazzEnrolmentEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentEditViewModel, 'ClazzEnrolmentEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ClazzEnrolmentEditUiState, 'ClazzEnrolmentEditUiState', classMeta, VOID, VOID, ClazzEnrolmentEditUiState);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda$o$collect$slambda, 'ClazzEnrolmentListViewModel$slambda$o$collect$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($collectCOROUTINE$61, '$collectCOROUTINE$61', classMeta, CoroutineImpl);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda, 'ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda, 'ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_1, 'ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda, 'ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($collectCOROUTINE$62, '$collectCOROUTINE$62', classMeta, CoroutineImpl);
  setMetadataFor(_no_name_provided__qut3iv_8, VOID, classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_3, 'ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda$slambda$slambda, 'ClazzEnrolmentListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda$slambda$slambda_1, 'ClazzEnrolmentListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda$slambda$slambda_3, 'ClazzEnrolmentListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda$slambda$slambda_5, 'ClazzEnrolmentListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(_no_name_provided__qut3iv_9, VOID, classMeta, VOID, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda$slambda, 'ClazzEnrolmentListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_121, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_19, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentListViewModel$slambda, 'ClazzEnrolmentListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzEnrolmentListViewModel, 'ClazzEnrolmentListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(ClazzEnrolmentListUiState, 'ClazzEnrolmentListUiState', classMeta, VOID, VOID, ClazzEnrolmentListUiState);
  setMetadataFor(ClazzEnrolmentListItemUiState, 'ClazzEnrolmentListItemUiState', classMeta);
  setMetadataFor(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda, 'ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_1, 'ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_3, 'ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogListAttendanceViewModel$slambda$slambda$slambda, 'ClazzLogListAttendanceViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogListAttendanceViewModel$slambda$slambda$slambda_1, 'ClazzLogListAttendanceViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogListAttendanceViewModel$slambda$slambda, 'ClazzLogListAttendanceViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(RecordAttendanceOption, 'RecordAttendanceOption', classMeta, Enum);
  setMetadataFor(PermissionAndExistingLogs, 'PermissionAndExistingLogs', classMeta);
  setMetadataFor(Companion_122, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_20, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogListAttendanceViewModel$slambda, 'ClazzLogListAttendanceViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogListAttendanceViewModel$onClickRecordAttendance$slambda, 'ClazzLogListAttendanceViewModel$onClickRecordAttendance$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogListAttendanceViewModel, 'ClazzLogListAttendanceViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(ClazzLogListAttendanceUiState, 'ClazzLogListAttendanceUiState', classMeta, VOID, VOID, ClazzLogListAttendanceUiState);
  setMetadataFor(ClazzLogEditViewModel$slambda$slambda, 'ClazzLogEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogEditViewModel$slambda$slambda_1, 'ClazzLogEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_123, 'Companion', objectMeta);
  setMetadataFor(ClazzLogEditViewModel$slambda, 'ClazzLogEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogEditViewModel$onEntityChanged$slambda, 'ClazzLogEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogEditViewModel, 'ClazzLogEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ClazzLogEditUiState, 'ClazzLogEditUiState', classMeta, VOID, VOID, ClazzLogEditUiState);
  setMetadataFor(ClazzLogEditAttendanceViewModel$slambda$slambda, 'ClazzLogEditAttendanceViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogEditAttendanceViewModel$slambda$slambda_1, 'ClazzLogEditAttendanceViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ClazzLogEditAttendanceViewModel$slambda$slambda_3, 'ClazzLogEditAttendanceViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda, 'ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_124, 'Companion', objectMeta);
  setMetadataFor(sam$kotlin_Comparator$0_2, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);
  setMetadataFor(ClazzLogEditAttendanceViewModel$slambda, 'ClazzLogEditAttendanceViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogEditAttendanceViewModel$slambda_1, 'ClazzLogEditAttendanceViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogEditAttendanceViewModel$onChangeClazzLog$slambda, 'ClazzLogEditAttendanceViewModel$onChangeClazzLog$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda, 'ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda, 'ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ClazzLogEditAttendanceViewModel$onClickSave$slambda, 'ClazzLogEditAttendanceViewModel$onClickSave$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($savePersonAndAttendanceRecordsCOROUTINE$63, '$savePersonAndAttendanceRecordsCOROUTINE$63', classMeta, CoroutineImpl);
  setMetadataFor($commitAttendanceRecordsToStateCOROUTINE$64, '$commitAttendanceRecordsToStateCOROUTINE$64', classMeta, CoroutineImpl);
  setMetadataFor(ClazzLogEditAttendanceViewModel, 'ClazzLogEditAttendanceViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 0, 3, 6]);
  setMetadataFor(ClazzLogEditAttendanceUiState, 'ClazzLogEditAttendanceUiState', classMeta, VOID, VOID, ClazzLogEditAttendanceUiState);
  setMetadataFor(Companion_125, 'Companion', objectMeta);
  setMetadataFor(ContentEntryDetailViewModel, 'ContentEntryDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ContentEntryDetailUiState, 'ContentEntryDetailUiState', classMeta, VOID, VOID, ContentEntryDetailUiState);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_1, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_3, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_5, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_7, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_9, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_1, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_3, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_5, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_7, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_9, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_11, 'ContentEntryDetailOverviewViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda$slambda, 'ContentEntryDetailOverviewViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda, 'ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_126, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_21, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$slambda, 'ContentEntryDetailOverviewViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$onClickOpen$slambda, 'ContentEntryDetailOverviewViewModel$onClickOpen$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$onCancelRemoteImport$slambda, 'ContentEntryDetailOverviewViewModel$onCancelRemoteImport$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda, 'ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryDetailOverviewViewModel, 'ContentEntryDetailOverviewViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ContentEntryDetailOverviewUiState, 'ContentEntryDetailOverviewUiState', classMeta, VOID, VOID, ContentEntryDetailOverviewUiState);
  setMetadataFor(ContentEntryEditViewModel$slambda$slambda$slambda, 'ContentEntryEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryEditViewModel$slambda$slambda$slambda_1, 'ContentEntryEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryEditViewModel$slambda$slambda, 'ContentEntryEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryEditViewModel$slambda$slambda_1, 'ContentEntryEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ContentEntryEditViewModel$slambda$slambda_3, 'ContentEntryEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryEditViewModel$slambda$slambda_5, 'ContentEntryEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_127, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_22, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryEditViewModel$slambda, 'ContentEntryEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryEditViewModel$slambda_1, 'ContentEntryEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryEditViewModel$scheduleEntityCommit$slambda, 'ContentEntryEditViewModel$scheduleEntityCommit$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryEditViewModel$onClickSave$slambda, 'ContentEntryEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryEditViewModel, 'ContentEntryEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ContentEntryEditUiState, 'ContentEntryEditUiState', classMeta, VOID, VOID, ContentEntryEditUiState);
  setMetadataFor(Companion_128, 'Companion', objectMeta);
  setMetadataFor(ContentEntryGetMetadataViewModel$slambda, 'ContentEntryGetMetadataViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryGetMetadataViewModel, 'ContentEntryGetMetadataViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ContentEntryGetMetadataUiState, 'ContentEntryGetMetadataUiState', classMeta, VOID, VOID, ContentEntryGetMetadataUiState);
  setMetadataFor(Companion_129, 'Companion', objectMeta);
  setMetadataFor(GetSubtitleViewModel$slambda, 'GetSubtitleViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(GetSubtitleViewModel, 'GetSubtitleViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(GetSubtitleUiState, 'GetSubtitleUiState', classMeta, VOID, VOID, GetSubtitleUiState);
  setMetadataFor(Companion_130, 'Companion', objectMeta);
  setMetadataFor(ContentEntryImportLinkViewModel$onChangeLink$slambda, 'ContentEntryImportLinkViewModel$onChangeLink$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryImportLinkViewModel$onClickNext$slambda, 'ContentEntryImportLinkViewModel$onClickNext$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryImportLinkViewModel, 'ContentEntryImportLinkViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ContentEntryImportLinkUiState, 'ContentEntryImportLinkUiState', classMeta, VOID, VOID, ContentEntryImportLinkUiState);
  setMetadataFor(ContentEntryListItemUiState, 'ContentEntryListItemUiState', classMeta);
  setMetadataFor(ContentEntryListViewModel$slambda$slambda$slambda, 'ContentEntryListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryListViewModel$slambda$slambda, 'ContentEntryListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ContentEntryListViewModel$slambda$slambda_1, 'ContentEntryListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryListViewModel$slambda$slambda_3, 'ContentEntryListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(ContentEntryListViewModel$slambda$slambda_5, 'ContentEntryListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_131, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_23, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryListViewModel$slambda, 'ContentEntryListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryListViewModel$slambda_1, 'ContentEntryListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryListViewModel$slambda_3, 'ContentEntryListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryListViewModel$slambda_5, 'ContentEntryListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryListViewModel$launchDeleteEntries$slambda, 'ContentEntryListViewModel$launchDeleteEntries$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ContentEntryListViewModel, 'ContentEntryListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(Companion_132, 'Companion', objectMeta);
  setMetadataFor(ContentEntryListUiState, 'ContentEntryListUiState', classMeta, VOID, VOID, ContentEntryListUiState);
  setMetadataFor(Companion_133, 'Companion', objectMeta);
  setMetadataFor($serializer_54, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(ContentEntryListSelectedItem, 'ContentEntryListSelectedItem', classMeta, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_66});
  setMetadataFor(SubtitleEditViewModel$slambda$slambda, 'SubtitleEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SubtitleEditViewModel$slambda$slambda_1, 'SubtitleEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_134, 'Companion', objectMeta);
  setMetadataFor(SubtitleEditViewModel$slambda, 'SubtitleEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SubtitleEditViewModel$onEntityChanged$slambda, 'SubtitleEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SubtitleEditViewModel, 'SubtitleEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(SubtitleEditUiState, 'SubtitleEditUiState', classMeta, VOID, VOID, SubtitleEditUiState);
  setMetadataFor(Companion_135, 'Companion', objectMeta, VOID, [SerializerFactory]);
  setMetadataFor(CompletionCriteria, 'CompletionCriteria', classMeta, Enum, VOID, VOID, VOID, {0: Companion_getInstance_152});
  setMetadataFor(CourseBlockEditViewModel$slambda$slambda$slambda, 'CourseBlockEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseBlockEditViewModel$slambda$slambda$slambda_1, 'CourseBlockEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseBlockEditViewModel$slambda$slambda, 'CourseBlockEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseBlockEditViewModel$slambda$slambda_1, 'CourseBlockEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(CourseBlockEditViewModel$slambda$slambda_3, 'CourseBlockEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseBlockEditViewModel$slambda$slambda_5, 'CourseBlockEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_136, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_24, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(CourseBlockEditViewModel$slambda, 'CourseBlockEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseBlockEditViewModel$onEntityChanged$slambda, 'CourseBlockEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseBlockEditViewModel$onPictureChanged$slambda, 'CourseBlockEditViewModel$onPictureChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseBlockEditViewModel, 'CourseBlockEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(Companion_137, 'Companion', objectMeta);
  setMetadataFor($serializer_55, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(CourseBlockEditUiState, 'CourseBlockEditUiState', classMeta, VOID, VOID, CourseBlockEditUiState, VOID, {0: $serializer_getInstance_67});
  setMetadataFor(TextBlockDetailViewModel$slambda$slambda$slambda$slambda, 'TextBlockDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(TextBlockDetailViewModel$slambda$slambda$slambda, 'TextBlockDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(TextBlockDetailViewModel$slambda$slambda, 'TextBlockDetailViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_138, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_25, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(TextBlockDetailViewModel$slambda, 'TextBlockDetailViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(TextBlockDetailViewModel, 'TextBlockDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(TextBlockDetailUiState, 'TextBlockDetailUiState', classMeta, VOID, VOID, TextBlockDetailUiState);
  setMetadataFor(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda, 'CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_1, 'CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_3, 'CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_5, 'CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetDetailViewModel$slambda$slambda$slambda, 'CourseGroupSetDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetDetailViewModel$slambda$slambda$slambda_1, 'CourseGroupSetDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetDetailViewModel$slambda$slambda, 'CourseGroupSetDetailViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_139, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_26, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetDetailViewModel$slambda, 'CourseGroupSetDetailViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetDetailViewModel, 'CourseGroupSetDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(CourseGroupSetDetailUiState, 'CourseGroupSetDetailUiState', classMeta, VOID, VOID, CourseGroupSetDetailUiState);
  setMetadataFor(CourseGroupSetEditViewModel$slambda$slambda$slambda, 'CourseGroupSetEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetEditViewModel$slambda$slambda$slambda_1, 'CourseGroupSetEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(CourseGroupSetEditViewModel$slambda$slambda$slambda_3, 'CourseGroupSetEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetEditViewModel$slambda$slambda$slambda_5, 'CourseGroupSetEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(CourseGroupSetEditViewModel$slambda$slambda, 'CourseGroupSetEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetEditViewModel$slambda$slambda_1, 'CourseGroupSetEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetEditViewModel$onClickSave$slambda$slambda, 'CourseGroupSetEditViewModel$onClickSave$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_140, 'Companion', objectMeta);
  setMetadataFor(CourseGroupSetEditViewModel$slambda, 'CourseGroupSetEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetEditViewModel$slambda_1, 'CourseGroupSetEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetEditViewModel$onEntityChanged$slambda, 'CourseGroupSetEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda, 'CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetEditViewModel$onClickAssignRandomly$slambda, 'CourseGroupSetEditViewModel$onClickAssignRandomly$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetEditViewModel$onClickSave$slambda, 'CourseGroupSetEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetEditViewModel, 'CourseGroupSetEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(CourseGroupSetEditUiState, 'CourseGroupSetEditUiState', classMeta, VOID, VOID, CourseGroupSetEditUiState);
  setMetadataFor(CourseGroupSetListViewModel$slambda$slambda$slambda, 'CourseGroupSetListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetListViewModel$slambda$slambda, 'CourseGroupSetListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_141, 'Companion', objectMeta);
  setMetadataFor(CourseGroupSetListViewModel$slambda, 'CourseGroupSetListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetListViewModel$slambda_1, 'CourseGroupSetListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseGroupSetListViewModel, 'CourseGroupSetListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(Companion_142, 'Companion', objectMeta);
  setMetadataFor(CourseGroupSetListUiState, 'CourseGroupSetListUiState', classMeta, VOID, VOID, CourseGroupSetListUiState);
  setMetadataFor(CourseTerminologyEditViewModel$slambda$slambda, 'CourseTerminologyEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseTerminologyEditViewModel$slambda$slambda_1, 'CourseTerminologyEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_143, 'Companion', objectMeta);
  setMetadataFor(CourseTerminologyEditViewModel$slambda, 'CourseTerminologyEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseTerminologyEditViewModel$onEntityChanged$slambda, 'CourseTerminologyEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseTerminologyEditViewModel$onClickSave$slambda, 'CourseTerminologyEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseTerminologyEditViewModel, 'CourseTerminologyEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(CourseTerminologyEditUiState, 'CourseTerminologyEditUiState', classMeta, VOID, VOID, CourseTerminologyEditUiState);
  setMetadataFor(Companion_144, 'Companion', objectMeta);
  setMetadataFor(CourseTerminologyListViewModel$slambda, 'CourseTerminologyListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseTerminologyListViewModel, 'CourseTerminologyListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(CourseTerminologyListUiState, 'CourseTerminologyListUiState', classMeta, VOID, VOID, CourseTerminologyListUiState);
  setMetadataFor(Companion_145, 'Companion', objectMeta);
  setMetadataFor(DeletedItemListViewModel$onConfirmDeletePermanently$slambda, 'DeletedItemListViewModel$onConfirmDeletePermanently$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DeletedItemListViewModel$restoreItems$slambda, 'DeletedItemListViewModel$restoreItems$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DeletedItemListViewModel, 'DeletedItemListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(DeletedItemListUiState, 'DeletedItemListUiState', classMeta, VOID, VOID, DeletedItemListUiState);
  setMetadataFor(CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda, 'CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseDiscussionDetailViewModel$slambda$slambda$slambda, 'CourseDiscussionDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseDiscussionDetailViewModel$slambda$slambda, 'CourseDiscussionDetailViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_146, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_27, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(CourseDiscussionDetailViewModel$slambda, 'CourseDiscussionDetailViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseDiscussionDetailViewModel$onDeletePost$slambda, 'CourseDiscussionDetailViewModel$onDeletePost$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(CourseDiscussionDetailViewModel, 'CourseDiscussionDetailViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(CourseDiscussionDetailUiState, 'CourseDiscussionDetailUiState', classMeta, VOID, VOID, CourseDiscussionDetailUiState);
  setMetadataFor(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda, 'DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_1, 'DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda, 'DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_1, 'DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostDetailViewModel$slambda$slambda$slambda, 'DiscussionPostDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostDetailViewModel$slambda$slambda, 'DiscussionPostDetailViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_147, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_28, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostDetailViewModel$slambda, 'DiscussionPostDetailViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostDetailViewModel$onChangeReplyText$slambda, 'DiscussionPostDetailViewModel$onChangeReplyText$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostDetailViewModel$onClickPostReply$slambda, 'DiscussionPostDetailViewModel$onClickPostReply$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostDetailViewModel$submitReply$slambda, 'DiscussionPostDetailViewModel$submitReply$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostDetailViewModel$onDeletePost$slambda, 'DiscussionPostDetailViewModel$onDeletePost$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($submitReplyCOROUTINE$65, '$submitReplyCOROUTINE$65', classMeta, CoroutineImpl);
  setMetadataFor(DiscussionPostDetailViewModel, 'DiscussionPostDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [1, 2, 3, 6]);
  setMetadataFor(DiscussionPostDetailUiState2, 'DiscussionPostDetailUiState2', classMeta, VOID, VOID, DiscussionPostDetailUiState2);
  setMetadataFor(DiscussionPostEditViewModel$slambda$slambda$slambda, 'DiscussionPostEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostEditViewModel$slambda$slambda$slambda_1, 'DiscussionPostEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(DiscussionPostEditViewModel$slambda$slambda, 'DiscussionPostEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostEditViewModel$onClickSave$slambda$slambda, 'DiscussionPostEditViewModel$onClickSave$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_148, 'Companion', objectMeta);
  setMetadataFor(DiscussionPostEditViewModel$slambda, 'DiscussionPostEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostEditViewModel$onEntityChanged$slambda, 'DiscussionPostEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostEditViewModel$onClickSave$slambda, 'DiscussionPostEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(DiscussionPostEditViewModel, 'DiscussionPostEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(DiscussionPostEditUiState, 'DiscussionPostEditUiState', classMeta, VOID, VOID, DiscussionPostEditUiState);
  setMetadataFor(EpubContentViewModel$slambda$slambda$slambda, 'EpubContentViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(EpubContentViewModel$slambda$slambda, 'EpubContentViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_149, 'Companion', objectMeta);
  setMetadataFor(EpubContentViewModel$slambda, 'EpubContentViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(AbstractNonInteractiveContentViewModel, 'AbstractNonInteractiveContentViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(EpubContentViewModel, 'EpubContentViewModel', classMeta, AbstractNonInteractiveContentViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(EpubContentUiState, 'EpubContentUiState', classMeta, VOID, VOID, EpubContentUiState);
  setMetadataFor(EpubScrollCommand, 'EpubScrollCommand', classMeta);
  setMetadataFor(EpubTocItem, 'EpubTocItem', classMeta);
  setMetadataFor(Companion_150, 'Companion', objectMeta);
  setMetadataFor(Companion_151, 'Companion', objectMeta);
  setMetadataFor(LoginViewModel$slambda, 'LoginViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(LoginViewModel$onClickLogin$slambda, 'LoginViewModel$onClickLogin$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(LoginViewModel$onClickConnectAsGuest$slambda, 'LoginViewModel$onClickConnectAsGuest$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(LoginViewModel, 'LoginViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(LoginUiState, 'LoginUiState', classMeta, VOID, VOID, LoginUiState);
  setMetadataFor(Companion_152, 'Companion', objectMeta);
  setMetadataFor(ConversationListViewModel, 'ConversationListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(ConversationListUiState, 'ConversationListUiState', classMeta, VOID, VOID, ConversationListUiState);
  setMetadataFor(MessageListViewModel$slambda$slambda$slambda, 'MessageListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(MessageListViewModel$slambda$slambda, 'MessageListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_153, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_29, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(MessageListViewModel$slambda, 'MessageListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(MessageListViewModel$onClickSend$slambda, 'MessageListViewModel$onClickSend$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(MessageListViewModel, 'MessageListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(MessageListUiState, 'MessageListUiState', classMeta, VOID, VOID, MessageListUiState);
  setMetadataFor(TitleAndLangCode, 'TitleAndLangCode', classMeta);
  setMetadataFor(ParentalConsentManagementViewModel$lambda$slambda$slambda, 'ParentalConsentManagementViewModel$lambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ParentalConsentManagementViewModel$lambda$slambda$slambda_1, 'ParentalConsentManagementViewModel$lambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_154, 'Companion', objectMeta);
  setMetadataFor(ParentalConsentManagementViewModel$lambda$slambda, 'ParentalConsentManagementViewModel$lambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ParentalConsentManagementViewModel$lambda$slambda_1, 'ParentalConsentManagementViewModel$lambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ParentalConsentManagementViewModel$updateStatus$slambda, 'ParentalConsentManagementViewModel$updateStatus$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ParentalConsentManagementViewModel, 'ParentalConsentManagementViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ParentalConsentManagementUiState, 'ParentalConsentManagementUiState', classMeta, VOID, VOID, ParentalConsentManagementUiState);
  setMetadataFor(Companion_155, 'Companion', objectMeta);
  setMetadataFor(PdfContentViewModel$slambda, 'PdfContentViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PdfContentViewModel, 'PdfContentViewModel', classMeta, AbstractNonInteractiveContentViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(PdfContentUiState, 'PdfContentUiState', classMeta, VOID, VOID, PdfContentUiState);
  setMetadataFor(PersonViewModelConstants, 'PersonViewModelConstants', objectMeta);
  setMetadataFor(PersonAccountEditViewModel$slambda$slambda, 'PersonAccountEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonAccountEditViewModel$slambda$slambda_1, 'PersonAccountEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(PersonAccountEditViewModel$onClickSave$slambda$slambda, 'PersonAccountEditViewModel$onClickSave$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_156, 'Companion', objectMeta);
  setMetadataFor(PersonAccountEditViewModel$slambda, 'PersonAccountEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonAccountEditViewModel$slambda_1, 'PersonAccountEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonAccountEditViewModel$onEntityChanged$slambda, 'PersonAccountEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonAccountEditViewModel$onClickSave$slambda, 'PersonAccountEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonAccountEditViewModel, 'PersonAccountEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(PersonAccountEditUiState, 'PersonAccountEditUiState', classMeta, VOID, VOID, PersonAccountEditUiState);
  setMetadataFor(Companion_157, 'Companion', objectMeta);
  setMetadataFor($serializer_56, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(PersonUsernameAndPasswordModel, 'PersonUsernameAndPasswordModel', classMeta, VOID, VOID, PersonUsernameAndPasswordModel, VOID, {0: $serializer_getInstance_68});
  setMetadataFor(Companion_158, 'Companion', objectMeta);
  setMetadataFor(sam$com_ustadmobile_core_domain_person_bulkadd_BulkAddPersonsUseCase_BulkAddOnProgress$0, 'sam$com_ustadmobile_core_domain_person_bulkadd_BulkAddPersonsUseCase_BulkAddOnProgress$0', classMeta);
  setMetadataFor(BulkAddPersonRunImportViewModel$slambda, 'BulkAddPersonRunImportViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(BulkAddPersonRunImportViewModel, 'BulkAddPersonRunImportViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(Companion_159, 'Companion', objectMeta);
  setMetadataFor($serializer_57, '$serializer', objectMeta, VOID, [GeneratedSerializer]);
  setMetadataFor(BulkAddPersonRunImportUiState, 'BulkAddPersonRunImportUiState', classMeta, VOID, VOID, BulkAddPersonRunImportUiState, VOID, {0: $serializer_getInstance_69});
  setMetadataFor(Companion_160, 'Companion', objectMeta);
  setMetadataFor(BulkAddPersonSelectFileViewModel$slambda, 'BulkAddPersonSelectFileViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(BulkAddPersonSelectFileViewModel$slambda_1, 'BulkAddPersonSelectFileViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda, 'BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(BulkAddPersonSelectFileViewModel, 'BulkAddPersonSelectFileViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(BulkAddPersonSelectFileUiState, 'BulkAddPersonSelectFileUiState', classMeta, VOID, VOID, BulkAddPersonSelectFileUiState);
  setMetadataFor(PersonDetailViewModel$slambda$slambda$slambda$slambda, 'PersonDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(PersonDetailViewModel$slambda$slambda$slambda$slambda_1, 'PersonDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonDetailViewModel$slambda$slambda$slambda$slambda_3, 'PersonDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonDetailViewModel$slambda$slambda$slambda$slambda_5, 'PersonDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonDetailViewModel$slambda$slambda$slambda$slambda_7, 'PersonDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonDetailViewModel$slambda$slambda$slambda, 'PersonDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonDetailViewModel$slambda$slambda$slambda_1, 'PersonDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonDetailViewModel$slambda$slambda$slambda_3, 'PersonDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonDetailViewModel$slambda$slambda$slambda_5, 'PersonDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonDetailViewModel$slambda$slambda, 'PersonDetailViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_161, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_30, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(PersonDetailViewModel$slambda, 'PersonDetailViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonDetailViewModel, 'PersonDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(PersonDetailUiState, 'PersonDetailUiState', classMeta, VOID, VOID, PersonDetailUiState);
  setMetadataFor(PersonEditViewModel$slambda$slambda$slambda, 'PersonEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonEditViewModel$slambda$slambda$slambda_1, 'PersonEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(PersonEditViewModel$slambda$slambda$slambda_3, 'PersonEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonEditViewModel$slambda$slambda$slambda_5, 'PersonEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(PersonEditViewModel$slambda$slambda, 'PersonEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonEditViewModel$slambda$slambda_1, 'PersonEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonEditViewModel$onClickSave$slambda$slambda, 'PersonEditViewModel$onClickSave$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_162, 'Companion', objectMeta);
  setMetadataFor(PersonEditViewModel$slambda, 'PersonEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonEditViewModel$slambda_1, 'PersonEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonEditViewModel$onEntityChanged$slambda, 'PersonEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonEditViewModel$onPersonPictureChanged$slambda, 'PersonEditViewModel$onPersonPictureChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonEditViewModel$onClickSave$slambda, 'PersonEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonEditViewModel, 'PersonEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(PersonEditUiState, 'PersonEditUiState', classMeta, VOID, VOID, PersonEditUiState);
  setMetadataFor(EmptyPagingSource, 'EmptyPagingSource', classMeta, PagingSource, VOID, EmptyPagingSource, VOID, VOID, [1]);
  setMetadataFor(PersonListViewModel$slambda$slambda$slambda, 'PersonListViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonListViewModel$slambda$slambda, 'PersonListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(PersonListViewModel$slambda$slambda_1, 'PersonListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_163, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_31, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(PersonListViewModel$slambda, 'PersonListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonListViewModel$slambda_1, 'PersonListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(PersonListViewModel, 'PersonListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(PersonListUiState, 'PersonListUiState', classMeta, VOID, VOID, PersonListUiState);
  setMetadataFor(Companion_164, 'Companion', objectMeta);
  setMetadataFor(RegisterAgeRedirectViewModel, 'RegisterAgeRedirectViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(RegisterAgeRedirectUiState, 'RegisterAgeRedirectUiState', classMeta, VOID, VOID, RegisterAgeRedirectUiState);
  setMetadataFor(Companion_165, 'Companion', objectMeta);
  setMetadataFor(RegisterMinorWaitForParentViewModel, 'RegisterMinorWaitForParentViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(RegisterMinorWaitForParentUiState, 'RegisterMinorWaitForParentUiState', classMeta, VOID, VOID, RegisterMinorWaitForParentUiState);
  setMetadataFor(Companion_166, 'Companion', objectMeta);
  setMetadataFor(sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0_1, 'sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0', classMeta, VOID, [OpenExternalLinkUseCase]);
  setMetadataFor(RedirectViewModel$slambda, 'RedirectViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(RedirectViewModel, 'RedirectViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ScheduleEditViewModel$slambda$slambda, 'ScheduleEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ScheduleEditViewModel$slambda$slambda_1, 'ScheduleEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_167, 'Companion', objectMeta);
  setMetadataFor(ScheduleEditViewModel$slambda, 'ScheduleEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ScheduleEditViewModel$onEntityChanged$slambda, 'ScheduleEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(ScheduleEditViewModel, 'ScheduleEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(ScheduleEditUiState, 'ScheduleEditUiState', classMeta, VOID, VOID, ScheduleEditUiState);
  setMetadataFor(Companion_168, 'Companion', objectMeta);
  setMetadataFor(SettingsViewModel$slambda$slambda, 'SettingsViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_169, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_32, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(SettingsViewModel$slambda, 'SettingsViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SettingsViewModel$slambda_1, 'SettingsViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SettingsViewModel, 'SettingsViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(SettingsUiState, 'SettingsUiState', classMeta, VOID, VOID, SettingsUiState);
  setMetadataFor(SettingsOfflineStorageOption, 'SettingsOfflineStorageOption', classMeta);
  setMetadataFor(SiteDetailViewModel$slambda$slambda$slambda$slambda, 'SiteDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(SiteDetailViewModel$slambda$slambda$slambda$slambda_1, 'SiteDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SiteDetailViewModel$slambda$slambda$slambda$slambda_3, 'SiteDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SiteDetailViewModel$slambda$slambda$slambda, 'SiteDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SiteDetailViewModel$slambda$slambda$slambda_1, 'SiteDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SiteDetailViewModel$slambda$slambda, 'SiteDetailViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_170, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_33, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(SiteDetailViewModel$slambda, 'SiteDetailViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SiteDetailViewModel, 'SiteDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(SiteDetailUiState, 'SiteDetailUiState', classMeta, VOID, VOID, SiteDetailUiState);
  setMetadataFor(SiteEditViewModel$slambda$slambda$slambda, 'SiteEditViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SiteEditViewModel$slambda$slambda, 'SiteEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SiteEditViewModel$slambda$slambda_1, 'SiteEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(SiteEditViewModel$slambda$slambda_3, 'SiteEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SiteEditViewModel$slambda$slambda_5, 'SiteEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(SiteEditViewModel$slambda$slambda_7, 'SiteEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_171, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_34, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(SiteEditViewModel$slambda, 'SiteEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SiteEditViewModel$slambda_1, 'SiteEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SiteEditViewModel$onChangeTermsHtml$slambda, 'SiteEditViewModel$onChangeTermsHtml$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SiteEditViewModel$onEntityChanged$slambda, 'SiteEditViewModel$onEntityChanged$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SiteEditViewModel$onClickSave$slambda, 'SiteEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SiteEditViewModel, 'SiteEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(SiteEditUiState, 'SiteEditUiState', classMeta, VOID, VOID, SiteEditUiState);
  setMetadataFor(Companion_172, 'Companion', objectMeta);
  setMetadataFor(SiteTermsDetailViewModel$slambda, 'SiteTermsDetailViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SiteTermsDetailViewModel, 'SiteTermsDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(SiteTermsDetailUiState, 'SiteTermsDetailUiState', classMeta, VOID, VOID, SiteTermsDetailUiState);
  setMetadataFor(Companion_173, 'Companion', objectMeta);
  setMetadataFor(SiteEnterLinkViewModel$onClickNext$slambda, 'SiteEnterLinkViewModel$onClickNext$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SiteEnterLinkViewModel, 'SiteEnterLinkViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(SiteEnterLinkUiState, 'SiteEnterLinkUiState', classMeta, VOID, VOID, SiteEnterLinkUiState);
  setMetadataFor(SystemPermissionConstants, 'SystemPermissionConstants', objectMeta);
  setMetadataFor(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda, 'SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_1, 'SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_3, 'SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SystemPermissionDetailViewModel$slambda$slambda$slambda, 'SystemPermissionDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SystemPermissionDetailViewModel$slambda$slambda$slambda_1, 'SystemPermissionDetailViewModel$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SystemPermissionDetailViewModel$slambda$slambda, 'SystemPermissionDetailViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(Companion_174, 'Companion', objectMeta);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_35, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(SystemPermissionDetailViewModel$slambda, 'SystemPermissionDetailViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SystemPermissionDetailViewModel, 'SystemPermissionDetailViewModel', classMeta, DetailViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(SystemPermissionDetailUiState, 'SystemPermissionDetailUiState', classMeta, VOID, VOID, SystemPermissionDetailUiState);
  setMetadataFor(SystemPermissionEditViewModel$slambda$slambda, 'SystemPermissionEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SystemPermissionEditViewModel$slambda$slambda_1, 'SystemPermissionEditViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(SystemPermissionEditViewModel$onClickSave$slambda$slambda, 'SystemPermissionEditViewModel$onClickSave$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_175, 'Companion', objectMeta);
  setMetadataFor(SystemPermissionEditViewModel$slambda, 'SystemPermissionEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SystemPermissionEditViewModel$slambda_1, 'SystemPermissionEditViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SystemPermissionEditViewModel$onClickSave$slambda, 'SystemPermissionEditViewModel$onClickSave$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(SystemPermissionEditViewModel, 'SystemPermissionEditViewModel', classMeta, UstadEditViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(SystemPermissionEditUiState, 'SystemPermissionEditUiState', classMeta, VOID, VOID, SystemPermissionEditUiState);
  setMetadataFor(TimeZoneListViewModel$slambda$slambda, 'TimeZoneListViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda, 'TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(Companion_176, 'Companion', objectMeta);
  setMetadataFor(sam$kotlin_Comparator$0_3, 'sam$kotlin_Comparator$0', classMeta, VOID, [Comparator]);
  setMetadataFor(TimeZoneListViewModel$slambda, 'TimeZoneListViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(TimeZoneListViewModel$onUpdateSearchResult$slambda, 'TimeZoneListViewModel$onUpdateSearchResult$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(TimeZoneListViewModel, 'TimeZoneListViewModel', classMeta, UstadListViewModel, VOID, VOID, VOID, VOID, [3, 2, 6]);
  setMetadataFor(TimezoneListUiState, 'TimezoneListUiState', classMeta, VOID, VOID, TimezoneListUiState);
  setMetadataFor(VideoContentViewModel$slambda$slambda, 'VideoContentViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(VideoContentViewModel$slambda$slambda_1, 'VideoContentViewModel$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(MediaPlayState, 'MediaPlayState', classMeta, VOID, VOID, MediaPlayState);
  setMetadataFor(Companion_177, 'Companion', objectMeta);
  setMetadataFor(VideoContentViewModel$slambda, 'VideoContentViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(VideoContentViewModel, 'VideoContentViewModel', classMeta, AbstractNonInteractiveContentViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(VideoContentUiState, 'VideoContentUiState', classMeta, VOID, VOID, VideoContentUiState);
  setMetadataFor(Companion_178, 'Companion', objectMeta);
  setMetadataFor(XapiContentViewModel$slambda, 'XapiContentViewModel$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(XapiContentViewModel, 'XapiContentViewModel', classMeta, UstadViewModel, VOID, VOID, VOID, VOID, [2, 3, 6]);
  setMetadataFor(XapiContentUiState, 'XapiContentUiState', classMeta, VOID, VOID, XapiContentUiState);
  setMetadataFor($encryptPbkdf2COROUTINE$66, '$encryptPbkdf2COROUTINE$66', classMeta, CoroutineImpl);
  setMetadataFor($doublePbkdf2HashAsBase64COROUTINE$68, '$doublePbkdf2HashAsBase64COROUTINE$68', classMeta, CoroutineImpl);
  setMetadataFor(NavHostFunction, 'NavHostFunction', classMeta);
  setMetadataFor(NavHost$lambda$lambda$launchClearStackTimeout$slambda, 'NavHost$lambda$lambda$launchClearStackTimeout$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$69, '$invokeCOROUTINE$69', classMeta, CoroutineImpl);
  setMetadataFor(SetPasswordUseCaseJs, 'SetPasswordUseCaseJs', classMeta, VOID, [SetPasswordUseCase], VOID, VOID, VOID, [5]);
  setMetadataFor(OpenBlobUseCaseJs, 'OpenBlobUseCaseJs', classMeta, VOID, [OpenBlobUseCase], OpenBlobUseCaseJs, VOID, VOID, [3]);
  setMetadataFor(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda$slambda, 'SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda, 'SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(UriToSaveQueueItem, 'UriToSaveQueueItem', classMeta);
  setMetadataFor(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda, 'SaveLocalUrisAsBlobUseCaseJs$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda_1, 'SaveLocalUrisAsBlobUseCaseJs$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$70, '$invokeCOROUTINE$70', classMeta, CoroutineImpl);
  setMetadataFor(SaveLocalUrisAsBlobUseCaseJs, 'SaveLocalUrisAsBlobUseCaseJs', classMeta, VOID, [SaveLocalUrisAsBlobsUseCase], VOID, VOID, VOID, [2]);
  setMetadataFor(EnqueueSavePictureUseCaseJs$invoke$slambda, 'EnqueueSavePictureUseCaseJs$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(EnqueueSavePictureUseCaseJs, 'EnqueueSavePictureUseCaseJs', classMeta, VOID, [EnqueueSavePictureUseCase], VOID, VOID, VOID, [3]);
  setMetadataFor(SetClipboardStringUseCaseJs, 'SetClipboardStringUseCaseJs', classMeta, VOID, [SetClipboardStringUseCase], SetClipboardStringUseCaseJs);
  setMetadataFor($invokeCOROUTINE$71, '$invokeCOROUTINE$71', classMeta, CoroutineImpl);
  setMetadataFor(CompressImageUseCaseJs, 'CompressImageUseCaseJs', classMeta, VOID, [CompressUseCase], CompressImageUseCaseJs, VOID, VOID, [4]);
  setMetadataFor(Companion_179, 'Companion', objectMeta);
  setMetadataFor($invokeCOROUTINE$72, '$invokeCOROUTINE$72', classMeta, CoroutineImpl);
  setMetadataFor(ContentEntryGetMetaDataFromUriUseCaseJs, 'ContentEntryGetMetaDataFromUriUseCaseJs', classMeta, VOID, [ContentEntryGetMetaDataFromUriUseCase], VOID, VOID, VOID, [4]);
  setMetadataFor($invokeCOROUTINE$73, '$invokeCOROUTINE$73', classMeta, CoroutineImpl);
  setMetadataFor(GetSubtitleTrackFromUriUseCaseJs, 'GetSubtitleTrackFromUriUseCaseJs', classMeta, VOID, [GetSubtitleTrackFromUriUseCase], VOID, VOID, VOID, [3]);
  setMetadataFor($invokeCOROUTINE$74, '$invokeCOROUTINE$74', classMeta, CoroutineImpl);
  setMetadataFor(LaunchXapiUseCaseJs, 'LaunchXapiUseCaseJs', classMeta, VOID, [LaunchXapiUseCase], VOID, VOID, VOID, [5]);
  setMetadataFor(SetLanguageUseCaseJs, 'SetLanguageUseCaseJs', classMeta, VOID, [SetLanguageUseCase]);
  setMetadataFor(OpenExternalLinkUseCaseJs, 'OpenExternalLinkUseCaseJs', classMeta, VOID, [OpenExternalLinkUseCase], OpenExternalLinkUseCaseJs);
  setMetadataFor(BulkAddPersonsFromLocalUriUseCaseJs$invoke$slambda, 'BulkAddPersonsFromLocalUriUseCaseJs$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor($invokeCOROUTINE$75, '$invokeCOROUTINE$75', classMeta, CoroutineImpl);
  setMetadataFor(BulkAddPersonsFromLocalUriUseCaseJs, 'BulkAddPersonsFromLocalUriUseCaseJs', classMeta, VOID, [BulkAddPersonsFromLocalUriUseCase], VOID, VOID, VOID, [3]);
  setMetadataFor(OnClickPhoneNumUseCaseJs, 'OnClickPhoneNumUseCaseJs', classMeta, VOID, [OnClickPhoneNumUseCase], OnClickPhoneNumUseCaseJs);
  setMetadataFor(PhoneNumValidatorUseCaseJs, 'PhoneNumValidatorUseCaseJs', classMeta, VOID, [PhoneNumValidatorUseCase], PhoneNumValidatorUseCaseJs);
  setMetadataFor(PhoneNumberJs, 'PhoneNumberJs', classMeta);
  setMetadataFor(PhoneNumberUtilJs, 'PhoneNumberUtilJs', classMeta, VOID, [IPhoneNumberUtil], PhoneNumberUtilJs);
  setMetadataFor(OnClickSendEmailUseCaseJs, 'OnClickSendEmailUseCaseJs', classMeta, VOID, [OnClickEmailUseCase], OnClickSendEmailUseCaseJs);
  setMetadataFor(DeleteUrisUseCaseJs, 'DeleteUrisUseCaseJs', classMeta, VOID, [DeleteUrisUseCase], VOID, VOID, VOID, [2]);
  setMetadataFor(IsTempFileCheckerUseCaseJs, 'IsTempFileCheckerUseCaseJs', classMeta, VOID, [IsTempFileCheckerUseCase], IsTempFileCheckerUseCaseJs);
  setMetadataFor($invokeCOROUTINE$76, '$invokeCOROUTINE$76', classMeta, CoroutineImpl);
  setMetadataFor(ChunkedUploadClientLocalUriUseCaseJs, 'ChunkedUploadClientLocalUriUseCaseJs', classMeta, VOID, [ChunkedUploadClientLocalUriUseCase], ChunkedUploadClientLocalUriUseCaseJs, VOID, VOID, [8]);
  setMetadataFor(SaveStatementOnClearUseCaseJs$invoke$slambda, 'SaveStatementOnClearUseCaseJs$invoke$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(SaveStatementOnClearUseCaseJs, 'SaveStatementOnClearUseCaseJs', classMeta, VOID, [SaveStatementOnClearUseCase]);
  setMetadataFor(SaveStatementOnUnloadUseCaseJs, 'SaveStatementOnUnloadUseCaseJs', classMeta, VOID, [SaveStatementOnUnloadUseCase]);
  setMetadataFor($invokeCOROUTINE$77, '$invokeCOROUTINE$77', classMeta, CoroutineImpl);
  setMetadataFor(ResumeOrStartXapiSessionUseCaseJs, 'ResumeOrStartXapiSessionUseCaseJs', classMeta, VOID, [ResumeOrStartXapiSessionUseCase], VOID, VOID, VOID, [7]);
  setMetadataFor(XXHasher64FactoryJs, 'XXHasher64FactoryJs', classMeta, VOID, [XXHasher64Factory], XXHasher64FactoryJs);
  setMetadataFor(XXHasher64Js, 'XXHasher64Js', classMeta);
  setMetadataFor(XXStringHasherJs, 'XXStringHasherJs', classMeta, VOID, [XXStringHasher], XXStringHasherJs);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_36, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(collectAsState$lambda$slambda$slambda, 'collectAsState$lambda$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(collectAsState$lambda$slambda, 'collectAsState$lambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(useLaunchedEffect$lambda$slambda, 'useLaunchedEffect$lambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(sam$kotlinx_coroutines_flow_FlowCollector$0_37, 'sam$kotlinx_coroutines_flow_FlowCollector$0', classMeta, VOID, [FlowCollector], VOID, VOID, VOID, [1]);
  setMetadataFor(useNavControllerEffect$slambda$slambda, 'useNavControllerEffect$slambda$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [1]);
  setMetadataFor(useNavControllerEffect$slambda, 'useNavControllerEffect$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [0]);
  setMetadataFor(ViewModelAndKey, 'ViewModelAndKey', classMeta);
  setMetadataFor(Companion_180, 'Companion', objectMeta);
  setMetadataFor(UstadMobileSystemImpl, 'UstadMobileSystemImpl', classMeta, UstadMobileSystemCommon, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(StringProviderJs, 'StringProviderJs', classMeta);
  setMetadataFor(Companion_181, 'Companion', objectMeta);
  setMetadataFor(SavedStateHandle2, 'SavedStateHandle2', classMeta);
  setMetadataFor(ClazzLogCreatorManagerJs, 'ClazzLogCreatorManagerJs', classMeta, VOID, [ClazzLogCreatorManager], ClazzLogCreatorManagerJs);
  setMetadataFor(UrlKmpJs, 'UrlKmpJs', classMeta);
  setMetadataFor(Companion_182, 'Companion', objectMeta);
  setMetadataFor(UstadAntilog, 'UstadAntilog', classMeta, Antilog, VOID, UstadAntilog);
  setMetadataFor(JsHeaderStringValuesAdapter, 'JsHeaderStringValuesAdapter', classMeta, VOID, [IStringValues]);
  //endregion
  function strings() {
    strings_instance = this;
    var tmp = this;
    var tmp_0 = require('localization/comustadmobilecore_stringsJson.json');
    tmp.xlb_1 = (!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) ? tmp_0 : THROW_CCE();
    var tmp_1 = this;
    var tmp_2 = require('localization/comustadmobilecore_stringsJson_rw.json');
    var tmp_3 = new SupportedLocale('rw', (!(tmp_2 == null) ? typeof tmp_2 === 'string' : false) ? tmp_2 : THROW_CCE());
    var tmp_4 = require('localization/comustadmobilecore_stringsJson_bn.json');
    var tmp_5 = new SupportedLocale('bn', (!(tmp_4 == null) ? typeof tmp_4 === 'string' : false) ? tmp_4 : THROW_CCE());
    var tmp_6 = require('localization/comustadmobilecore_stringsJson_ps.json');
    var tmp_7 = new SupportedLocale('ps', (!(tmp_6 == null) ? typeof tmp_6 === 'string' : false) ? tmp_6 : THROW_CCE());
    var tmp_8 = require('localization/comustadmobilecore_stringsJson_tg.json');
    var tmp_9 = new SupportedLocale('tg', (!(tmp_8 == null) ? typeof tmp_8 === 'string' : false) ? tmp_8 : THROW_CCE());
    var tmp_10 = require('localization/comustadmobilecore_stringsJson_km.json');
    var tmp_11 = new SupportedLocale('km', (!(tmp_10 == null) ? typeof tmp_10 === 'string' : false) ? tmp_10 : THROW_CCE());
    var tmp_12 = require('localization/comustadmobilecore_stringsJson_ne.json');
    var tmp_13 = new SupportedLocale('ne', (!(tmp_12 == null) ? typeof tmp_12 === 'string' : false) ? tmp_12 : THROW_CCE());
    var tmp_14 = require('localization/comustadmobilecore_stringsJson_it.json');
    var tmp_15 = new SupportedLocale('it', (!(tmp_14 == null) ? typeof tmp_14 === 'string' : false) ? tmp_14 : THROW_CCE());
    var tmp_16 = require('localization/comustadmobilecore_stringsJson_fr.json');
    var tmp_17 = new SupportedLocale('fr', (!(tmp_16 == null) ? typeof tmp_16 === 'string' : false) ? tmp_16 : THROW_CCE());
    var tmp_18 = require('localization/comustadmobilecore_stringsJson_fa.json');
    var tmp_19 = new SupportedLocale('fa', (!(tmp_18 == null) ? typeof tmp_18 === 'string' : false) ? tmp_18 : THROW_CCE());
    var tmp_20 = require('localization/comustadmobilecore_stringsJson_ru.json');
    var tmp_21 = new SupportedLocale('ru', (!(tmp_20 == null) ? typeof tmp_20 === 'string' : false) ? tmp_20 : THROW_CCE());
    var tmp_22 = require('localization/comustadmobilecore_stringsJson_ar.json');
    var tmp_23 = new SupportedLocale('ar', (!(tmp_22 == null) ? typeof tmp_22 === 'string' : false) ? tmp_22 : THROW_CCE());
    var tmp_24 = require('localization/comustadmobilecore_stringsJson_nb-NO.json');
    var tmp_25 = new SupportedLocale('nb-NO', (!(tmp_24 == null) ? typeof tmp_24 === 'string' : false) ? tmp_24 : THROW_CCE());
    var tmp_26 = require('localization/comustadmobilecore_stringsJson_my.json');
    tmp_1.ylb_1 = new SupportedLocales(listOf([tmp_3, tmp_5, tmp_7, tmp_9, tmp_11, tmp_13, tmp_15, tmp_17, tmp_19, tmp_21, tmp_23, tmp_25, new SupportedLocale('my', (!(tmp_26 == null) ? typeof tmp_26 === 'string' : false) ? tmp_26 : THROW_CCE())]));
    this.zlb_1 = new Impl(this.ylb_1, this.xlb_1);
    this.alc_1 = new StringResource('app_name', this.zlb_1);
    this.blc_1 = new StringResource('blank', this.zlb_1);
    this.clc_1 = new StringResource('login', this.zlb_1);
    this.dlc_1 = new StringResource('share_app', this.zlb_1);
    this.elc_1 = new StringResource('send_apk_file', this.zlb_1);
    this.flc_1 = new StringResource('send_app_link', this.zlb_1);
    this.glc_1 = new StringResource('error', this.zlb_1);
    this.hlc_1 = new StringResource('err_registering_new_user', this.zlb_1);
    this.ilc_1 = new StringResource('register_empty_fields', this.zlb_1);
    this.jlc_1 = new StringResource('register_incorrect_email', this.zlb_1);
    this.klc_1 = new StringResource('group_activity', this.zlb_1);
    this.llc_1 = new StringResource('select_group_members', this.zlb_1);
    this.mlc_1 = new StringResource('confirm_delete_message', this.zlb_1);
    this.nlc_1 = new StringResource('wrong_user_pass_combo', this.zlb_1);
    this.olc_1 = new StringResource('login_network_error', this.zlb_1);
    this.plc_1 = new StringResource('download', this.zlb_1);
    this.qlc_1 = new StringResource('downloaded', this.zlb_1);
    this.rlc_1 = new StringResource('recycled', this.zlb_1);
    this.slc_1 = new StringResource('libraries', this.zlb_1);
    this.tlc_1 = new StringResource('pause_download', this.zlb_1);
    this.ulc_1 = new StringResource('ok', this.zlb_1);
    this.vlc_1 = new StringResource('confirm', this.zlb_1);
    this.wlc_1 = new StringResource('cancel', this.zlb_1);
    this.xlc_1 = new StringResource('canceled', this.zlb_1);
    this.ylc_1 = new StringResource('delete', this.zlb_1);
    this.zlc_1 = new StringResource('deleted', this.zlb_1);
    this.ald_1 = new StringResource('new_tab', this.zlb_1);
    this.bld_1 = new StringResource('loading', this.zlb_1);
    this.cld_1 = new StringResource('deleting', this.zlb_1);
    this.dld_1 = new StringResource('processing', this.zlb_1);
    this.eld_1 = new StringResource('uploading', this.zlb_1);
    this.fld_1 = new StringResource('error_opening_file', this.zlb_1);
    this.gld_1 = new StringResource('logout', this.zlb_1);
    this.hld_1 = new StringResource('about', this.zlb_1);
    this.ild_1 = new StringResource('download_all', this.zlb_1);
    this.jld_1 = new StringResource('next', this.zlb_1);
    this.kld_1 = new StringResource('previous', this.zlb_1);
    this.lld_1 = new StringResource('back', this.zlb_1);
    this.mld_1 = new StringResource('username', this.zlb_1);
    this.nld_1 = new StringResource('password', this.zlb_1);
    this.old_1 = new StringResource('confirm_password', this.zlb_1);
    this.pld_1 = new StringResource('last_name', this.zlb_1);
    this.qld_1 = new StringResource('first_name', this.zlb_1);
    this.rld_1 = new StringResource('register_now', this.zlb_1);
    this.sld_1 = new StringResource('new_password', this.zlb_1);
    this.tld_1 = new StringResource('phone_memory', this.zlb_1);
    this.uld_1 = new StringResource('memory_card', this.zlb_1);
    this.vld_1 = new StringResource('device', this.zlb_1);
    this.wld_1 = new StringResource('register', this.zlb_1);
    this.xld_1 = new StringResource('phone_number', this.zlb_1);
    this.yld_1 = new StringResource('name_key', this.zlb_1);
    this.zld_1 = new StringResource('description', this.zlb_1);
    this.ale_1 = new StringResource('male', this.zlb_1);
    this.ble_1 = new StringResource('female', this.zlb_1);
    this.cle_1 = new StringResource('other', this.zlb_1);
    this.dle_1 = new StringResource('unset', this.zlb_1);
    this.ele_1 = new StringResource('settings', this.zlb_1);
    this.fle_1 = new StringResource('language', this.zlb_1);
    this.gle_1 = new StringResource('add_a_new_language', this.zlb_1);
    this.hle_1 = new StringResource('add_new_language', this.zlb_1);
    this.ile_1 = new StringResource('select_language', this.zlb_1);
    this.jle_1 = new StringResource('languages', this.zlb_1);
    this.kle_1 = new StringResource('edit_language', this.zlb_1);
    this.lle_1 = new StringResource('two_letter_code', this.zlb_1);
    this.mle_1 = new StringResource('three_letter_code', this.zlb_1);
    this.nle_1 = new StringResource('languages_description', this.zlb_1);
    this.ole_1 = new StringResource('advanced', this.zlb_1);
    this.ple_1 = new StringResource('optional', this.zlb_1);
    this.qle_1 = new StringResource('email', this.zlb_1);
    this.rle_1 = new StringResource('regcode', this.zlb_1);
    this.sle_1 = new StringResource('home', this.zlb_1);
    this.tle_1 = new StringResource('phone', this.zlb_1);
    this.ule_1 = new StringResource('attendance', this.zlb_1);
    this.vle_1 = new StringResource('classes', this.zlb_1);
    this.wle_1 = new StringResource('exams', this.zlb_1);
    this.xle_1 = new StringResource('reports', this.zlb_1);
    this.yle_1 = new StringResource('choose_template', this.zlb_1);
    this.zle_1 = new StringResource('save_as_template', this.zlb_1);
    this.alf_1 = new StringResource('contents', this.zlb_1);
    this.blf_1 = new StringResource('students', this.zlb_1);
    this.clf_1 = new StringResource('add_a_student', this.zlb_1);
    this.dlf_1 = new StringResource('forgot_password', this.zlb_1);
    this.elf_1 = new StringResource('notifications', this.zlb_1);
    this.flf_1 = new StringResource('account', this.zlb_1);
    this.glf_1 = new StringResource('accounts', this.zlb_1);
    this.hlf_1 = new StringResource('share', this.zlb_1);
    this.ilf_1 = new StringResource('send', this.zlb_1);
    this.jlf_1 = new StringResource('open', this.zlb_1);
    this.klf_1 = new StringResource('downloading', this.zlb_1);
    this.llf_1 = new StringResource('waiting', this.zlb_1);
    this.mlf_1 = new StringResource('waiting_for_connection', this.zlb_1);
    this.nlf_1 = new StringResource('queued', this.zlb_1);
    this.olf_1 = new StringResource('failed', this.zlb_1);
    this.plf_1 = new StringResource('passed', this.zlb_1);
    this.qlf_1 = new StringResource('success', this.zlb_1);
    this.rlf_1 = new StringResource('incomplete', this.zlb_1);
    this.slf_1 = new StringResource('completed', this.zlb_1);
    this.tlf_1 = new StringResource('select_subtitle_video', this.zlb_1);
    this.ulf_1 = new StringResource('no_subtitle', this.zlb_1);
    this.vlf_1 = new StringResource('no_video_file_found', this.zlb_1);
    this.wlf_1 = new StringResource('content_from_file', this.zlb_1);
    this.xlf_1 = new StringResource('content_from_link', this.zlb_1);
    this.ylf_1 = new StringResource('import_from_file', this.zlb_1);
    this.zlf_1 = new StringResource('import_from_link', this.zlb_1);
    this.alg_1 = new StringResource('import_content', this.zlb_1);
    this.blg_1 = new StringResource('update_content', this.zlb_1);
    this.clg_1 = new StringResource('publicly_accessible', this.zlb_1);
    this.dlg_1 = new StringResource('title', this.zlb_1);
    this.elg_1 = new StringResource('licence', this.zlb_1);
    this.flg_1 = new StringResource('ebook', this.zlb_1);
    this.glg_1 = new StringResource('interactive', this.zlb_1);
    this.hlg_1 = new StringResource('collection', this.zlb_1);
    this.ilg_1 = new StringResource('document', this.zlb_1);
    this.jlg_1 = new StringResource('article', this.zlb_1);
    this.klg_1 = new StringResource('audio', this.zlb_1);
    this.llg_1 = new StringResource('move', this.zlb_1);
    this.mlg_1 = new StringResource('hide', this.zlb_1);
    this.nlg_1 = new StringResource('unhide', this.zlb_1);
    this.olg_1 = new StringResource('compress', this.zlb_1);
    this.plg_1 = new StringResource('and_key', this.zlb_1);
    this.qlg_1 = new StringResource('added', this.zlb_1);
    this.rlg_1 = new StringResource('attempts', this.zlb_1);
    this.slg_1 = new StringResource('add_link_description', this.zlb_1);
    this.tlg_1 = new StringResource('add_gallery_description', this.zlb_1);
    this.ulg_1 = new StringResource('add_file_description', this.zlb_1);
    this.vlg_1 = new StringResource('error_this_device_doesnt_support_bluetooth_sharing', this.zlb_1);
    this.wlg_1 = new StringResource('share_offline_zip_checkbox_label', this.zlb_1);
    this.xlg_1 = new StringResource('share_offline_dialog_message', this.zlb_1);
    this.ylg_1 = new StringResource('preparing', this.zlb_1);
    this.zlg_1 = new StringResource('fixed_date', this.zlb_1);
    this.alh_1 = new StringResource('relative_date', this.zlb_1);
    this.blh_1 = new StringResource('field_required_prompt', this.zlb_1);
    this.clh_1 = new StringResource('field_password_error_min', this.zlb_1);
    this.dlh_1 = new StringResource('filed_password_no_match', this.zlb_1);
    this.elh_1 = new StringResource('update', this.zlb_1);
    this.flh_1 = new StringResource('profile', this.zlb_1);
    this.glh_1 = new StringResource('dialog_download_from_playstore_message', this.zlb_1);
    this.hlh_1 = new StringResource('dialog_download_from_playstore_ok', this.zlb_1);
    this.ilh_1 = new StringResource('dialog_download_from_playstore_cancel', this.zlb_1);
    this.jlh_1 = new StringResource('accept', this.zlb_1);
    this.klh_1 = new StringResource('also_available_in', this.zlb_1);
    this.llh_1 = new StringResource('created_partnership', this.zlb_1);
    this.mlh_1 = new StringResource('onboarding_get_started_label', this.zlb_1);
    this.nlh_1 = new StringResource('lets_get_started_label', this.zlb_1);
    this.olh_1 = new StringResource('onboarding_headline1', this.zlb_1);
    this.plh_1 = new StringResource('onboarding_subheadline1', this.zlb_1);
    this.qlh_1 = new StringResource('onboarding_headline2', this.zlb_1);
    this.rlh_1 = new StringResource('onboarding_subheadline2', this.zlb_1);
    this.slh_1 = new StringResource('onboarding_headline3', this.zlb_1);
    this.tlh_1 = new StringResource('onboarding_subheadline3', this.zlb_1);
    this.ulh_1 = new StringResource('download_continue_stacked_label', this.zlb_1);
    this.vlh_1 = new StringResource('download_continue_btn_label', this.zlb_1);
    this.wlh_1 = new StringResource('download_wifi_only', this.zlb_1);
    this.xlh_1 = new StringResource('download_calculating', this.zlb_1);
    this.ylh_1 = new StringResource('download_state_download', this.zlb_1);
    this.zlh_1 = new StringResource('download_state_downloading', this.zlb_1);
    this.ali_1 = new StringResource('download_state_downloaded', this.zlb_1);
    this.bli_1 = new StringResource('download_downloading_placeholder', this.zlb_1);
    this.cli_1 = new StringResource('download_summary_title', this.zlb_1);
    this.dli_1 = new StringResource('download_cancel_label', this.zlb_1);
    this.eli_1 = new StringResource('download_pause_download', this.zlb_1);
    this.fli_1 = new StringResource('download_storage_option_device', this.zlb_1);
    this.gli_1 = new StringResource('download_locally_availability', this.zlb_1);
    this.hli_1 = new StringResource('download_cloud_availability', this.zlb_1);
    this.ili_1 = new StringResource('insufficient_space', this.zlb_1);
    this.jli_1 = new StringResource('download_entry_state_paused', this.zlb_1);
    this.kli_1 = new StringResource('get_app', this.zlb_1);
    this.lli_1 = new StringResource('no_app_found', this.zlb_1);
    this.mli_1 = new StringResource('entry_details_author', this.zlb_1);
    this.nli_1 = new StringResource('entry_details_publisher', this.zlb_1);
    this.oli_1 = new StringResource('entry_details_license', this.zlb_1);
    this.pli_1 = new StringResource('file_not_found', this.zlb_1);
    this.qli_1 = new StringResource('multiple_choice', this.zlb_1);
    this.rli_1 = new StringResource('preview', this.zlb_1);
    this.sli_1 = new StringResource('content_creation_storage_option_title', this.zlb_1);
    this.tli_1 = new StringResource('file_required_prompt', this.zlb_1);
    this.uli_1 = new StringResource('content_creation_folder_new_message', this.zlb_1);
    this.vli_1 = new StringResource('content_creation_folder_update_message', this.zlb_1);
    this.wli_1 = new StringResource('error_message_load_page', this.zlb_1);
    this.xli_1 = new StringResource('error_message_update_document', this.zlb_1);
    this.yli_1 = new StringResource('supported_files', this.zlb_1);
    this.zli_1 = new StringResource('content_editor_save_error', this.zlb_1);
    this.alj_1 = new StringResource('content_entry_export_inprogress', this.zlb_1);
    this.blj_1 = new StringResource('content_entry_export_message', this.zlb_1);
    this.clj_1 = new StringResource('show_hidden_items', this.zlb_1);
    this.dlj_1 = new StringResource('open_folder', this.zlb_1);
    this.elj_1 = new StringResource('action_hidden', this.zlb_1);
    this.flj_1 = new StringResource('invalid', this.zlb_1);
    this.glj_1 = new StringResource('enter_register_code', this.zlb_1);
    this.hlj_1 = new StringResource('bar_chart', this.zlb_1);
    this.ilj_1 = new StringResource('line_chart', this.zlb_1);
    this.jlj_1 = new StringResource('score', this.zlb_1);
    this.klj_1 = new StringResource('content_total_duration', this.zlb_1);
    this.llj_1 = new StringResource('content_average_duration', this.zlb_1);
    this.mlj_1 = new StringResource('count_session', this.zlb_1);
    this.nlj_1 = new StringResource('interaction_recorded', this.zlb_1);
    this.olj_1 = new StringResource('number_active_users', this.zlb_1);
    this.plj_1 = new StringResource('average_usage_time_per_user', this.zlb_1);
    this.qlj_1 = new StringResource('number_students_completed', this.zlb_1);
    this.rlj_1 = new StringResource('percent_students_completed', this.zlb_1);
    this.slj_1 = new StringResource('total_attendances', this.zlb_1);
    this.tlj_1 = new StringResource('total_absences', this.zlb_1);
    this.ulj_1 = new StringResource('total_lates', this.zlb_1);
    this.vlj_1 = new StringResource('percent_students_attended', this.zlb_1);
    this.wlj_1 = new StringResource('percent_students_attended_or_late', this.zlb_1);
    this.xlj_1 = new StringResource('total_number_of_classes', this.zlb_1);
    this.ylj_1 = new StringResource('number_unique_students_attending', this.zlb_1);
    this.zlj_1 = new StringResource('xapi_day', this.zlb_1);
    this.alk_1 = new StringResource('xapi_week', this.zlb_1);
    this.blk_1 = new StringResource('xapi_month', this.zlb_1);
    this.clk_1 = new StringResource('xapi_custom_date', this.zlb_1);
    this.dlk_1 = new StringResource('xapi_content_entry', this.zlb_1);
    this.elk_1 = new StringResource('xapi_clear', this.zlb_1);
    this.flk_1 = new StringResource('last_week_date_range', this.zlb_1);
    this.glk_1 = new StringResource('last_two_week_date_range', this.zlb_1);
    this.hlk_1 = new StringResource('last_month_date_range', this.zlb_1);
    this.ilk_1 = new StringResource('last_three_months_date_range', this.zlb_1);
    this.jlk_1 = new StringResource('new_custom_date_range', this.zlb_1);
    this.klk_1 = new StringResource('selected_custom_range', this.zlb_1);
    this.llk_1 = new StringResource('time_range', this.zlb_1);
    this.mlk_1 = new StringResource('year', this.zlb_1);
    this.nlk_1 = new StringResource('from', this.zlb_1);
    this.olk_1 = new StringResource('done', this.zlb_1);
    this.plk_1 = new StringResource('xapi_options_general', this.zlb_1);
    this.qlk_1 = new StringResource('xapi_options_report_title', this.zlb_1);
    this.rlk_1 = new StringResource('xapi_options_visual_type', this.zlb_1);
    this.slk_1 = new StringResource('xapi_options_data_set', this.zlb_1);
    this.tlk_1 = new StringResource('xapi_options_series', this.zlb_1);
    this.ulk_1 = new StringResource('xapi_options_axes', this.zlb_1);
    this.vlk_1 = new StringResource('xapi_options_y_axes', this.zlb_1);
    this.wlk_1 = new StringResource('xapi_options_x_axes', this.zlb_1);
    this.xlk_1 = new StringResource('xapi_options_subgroup', this.zlb_1);
    this.ylk_1 = new StringResource('xapi_options_filters', this.zlb_1);
    this.zlk_1 = new StringResource('xapi_options_who', this.zlb_1);
    this.all_1 = new StringResource('xapi_options_did', this.zlb_1);
    this.bll_1 = new StringResource('xapi_options_what', this.zlb_1);
    this.cll_1 = new StringResource('xapi_options_when', this.zlb_1);
    this.dll_1 = new StringResource('xapi_options_where', this.zlb_1);
    this.ell_1 = new StringResource('time_range_all', this.zlb_1);
    this.fll_1 = new StringResource('report_filter_edit_field', this.zlb_1);
    this.gll_1 = new StringResource('report_filter_edit_condition', this.zlb_1);
    this.hll_1 = new StringResource('report_filter_edit_values', this.zlb_1);
    this.ill_1 = new StringResource('report', this.zlb_1);
    this.jll_1 = new StringResource('create_a_new_report', this.zlb_1);
    this.kll_1 = new StringResource('edit_report', this.zlb_1);
    this.lll_1 = new StringResource('verb', this.zlb_1);
    this.mll_1 = new StringResource('add_a_new_verb', this.zlb_1);
    this.nll_1 = new StringResource('id_verbentity_urlid', this.zlb_1);
    this.oll_1 = new StringResource('edit_filters', this.zlb_1);
    this.pll_1 = new StringResource('field_person_gender', this.zlb_1);
    this.qll_1 = new StringResource('field_person_age', this.zlb_1);
    this.rll_1 = new StringResource('field_content_completion', this.zlb_1);
    this.sll_1 = new StringResource('field_content_entry', this.zlb_1);
    this.tll_1 = new StringResource('field_content_progress', this.zlb_1);
    this.ull_1 = new StringResource('field_attendance_percentage', this.zlb_1);
    this.vll_1 = new StringResource('condition_is', this.zlb_1);
    this.wll_1 = new StringResource('condition_is_not', this.zlb_1);
    this.xll_1 = new StringResource('condition_greater_than', this.zlb_1);
    this.yll_1 = new StringResource('condition_less_than', this.zlb_1);
    this.zll_1 = new StringResource('condition_in_list', this.zlb_1);
    this.alm_1 = new StringResource('condition_not_in_list', this.zlb_1);
    this.blm_1 = new StringResource('condition_between', this.zlb_1);
    this.clm_1 = new StringResource('add_person_filter', this.zlb_1);
    this.dlm_1 = new StringResource('add_verb_filter', this.zlb_1);
    this.elm_1 = new StringResource('add_content_filter', this.zlb_1);
    this.flm_1 = new StringResource('dashboard', this.zlb_1);
    this.glm_1 = new StringResource('activity_import_link', this.zlb_1);
    this.hlm_1 = new StringResource('xapi_hours', this.zlb_1);
    this.ilm_1 = new StringResource('xapi_minutes', this.zlb_1);
    this.jlm_1 = new StringResource('xapi_seconds', this.zlb_1);
    this.klm_1 = new StringResource('xapi_verb_header', this.zlb_1);
    this.llm_1 = new StringResource('xapi_result_header', this.zlb_1);
    this.mlm_1 = new StringResource('xapi_score', this.zlb_1);
    this.nlm_1 = new StringResource('import_title_not_entered', this.zlb_1);
    this.olm_1 = new StringResource('no_account', this.zlb_1);
    this.plm_1 = new StringResource('enter_url', this.zlb_1);
    this.qlm_1 = new StringResource('invalid_link', this.zlb_1);
    this.rlm_1 = new StringResource('invalid_file', this.zlb_1);
    this.slm_1 = new StringResource('import_link_content_not_supported', this.zlb_1);
    this.tlm_1 = new StringResource('unsupported_file_type', this.zlb_1);
    this.ulm_1 = new StringResource('import_link_big_size', this.zlb_1);
    this.vlm_1 = new StringResource('import_link_error', this.zlb_1);
    this.wlm_1 = new StringResource('supported_link', this.zlb_1);
    this.xlm_1 = new StringResource('offline_sharing_enable_bluetooth_prompt', this.zlb_1);
    this.ylm_1 = new StringResource('offline_sharing_enable_wifi_promot', this.zlb_1);
    this.zlm_1 = new StringResource('enable', this.zlb_1);
    this.aln_1 = new StringResource('repo_loading_status_loading_cloud', this.zlb_1);
    this.bln_1 = new StringResource('repo_loading_status_loading_mirror', this.zlb_1);
    this.cln_1 = new StringResource('repo_loading_status_failed_noconnection', this.zlb_1);
    this.dln_1 = new StringResource('repo_loading_status_failed_connection_error', this.zlb_1);
    this.eln_1 = new StringResource('licence_type_cc_by', this.zlb_1);
    this.fln_1 = new StringResource('licence_type_cc_by_sa', this.zlb_1);
    this.gln_1 = new StringResource('licence_type_cc_by_sa_nc', this.zlb_1);
    this.hln_1 = new StringResource('licence_type_cc_by_nc', this.zlb_1);
    this.iln_1 = new StringResource('licence_type_cc_by_nc_sa', this.zlb_1);
    this.jln_1 = new StringResource('licence_type_public_domain', this.zlb_1);
    this.kln_1 = new StringResource('licence_type_all_rights', this.zlb_1);
    this.lln_1 = new StringResource('license_type_cc_0', this.zlb_1);
    this.mln_1 = new StringResource('syncing', this.zlb_1);
    this.nln_1 = new StringResource('feed', this.zlb_1);
    this.oln_1 = new StringResource('people', this.zlb_1);
    this.pln_1 = new StringResource('record_attendance', this.zlb_1);
    this.qln_1 = new StringResource('today', this.zlb_1);
    this.rln_1 = new StringResource('sort_by', this.zlb_1);
    this.sln_1 = new StringResource('log', this.zlb_1);
    this.tln_1 = new StringResource('schedule', this.zlb_1);
    this.uln_1 = new StringResource('add_a_schedule', this.zlb_1);
    this.vln_1 = new StringResource('edit_schedule', this.zlb_1);
    this.wln_1 = new StringResource('first_key', this.zlb_1);
    this.xln_1 = new StringResource('last_key', this.zlb_1);
    this.yln_1 = new StringResource('last_week', this.zlb_1);
    this.zln_1 = new StringResource('mark_all', this.zlb_1);
    this.alo_1 = new StringResource('mark_all_present', this.zlb_1);
    this.blo_1 = new StringResource('mark_all_absent', this.zlb_1);
    this.clo_1 = new StringResource('present', this.zlb_1);
    this.dlo_1 = new StringResource('absent', this.zlb_1);
    this.elo_1 = new StringResource('attendance_report', this.zlb_1);
    this.flo_1 = new StringResource('father', this.zlb_1);
    this.glo_1 = new StringResource('mother', this.zlb_1);
    this.hlo_1 = new StringResource('birthday', this.zlb_1);
    this.ilo_1 = new StringResource('first_names', this.zlb_1);
    this.jlo_1 = new StringResource('basic_details', this.zlb_1);
    this.klo_1 = new StringResource('address', this.zlb_1);
    this.llo_1 = new StringResource('add_person_to_class', this.zlb_1);
    this.mlo_1 = new StringResource('edit', this.zlb_1);
    this.nlo_1 = new StringResource('clazz', this.zlb_1);
    this.olo_1 = new StringResource('add_a_new_class', this.zlb_1);
    this.plo_1 = new StringResource('edit_clazz', this.zlb_1);
    this.qlo_1 = new StringResource('add_a_class', this.zlb_1);
    this.rlo_1 = new StringResource('join_existing_class', this.zlb_1);
    this.slo_1 = new StringResource('student_image', this.zlb_1);
    this.tlo_1 = new StringResource('question_key', this.zlb_1);
    this.ulo_1 = new StringResource('add_question', this.zlb_1);
    this.vlo_1 = new StringResource('edit_question', this.zlb_1);
    this.wlo_1 = new StringResource('questions', this.zlb_1);
    this.xlo_1 = new StringResource('add_person', this.zlb_1);
    this.ylo_1 = new StringResource('add_class', this.zlb_1);
    this.zlo_1 = new StringResource('class_name', this.zlb_1);
    this.alp_1 = new StringResource('class_description', this.zlb_1);
    this.blp_1 = new StringResource('to_key', this.zlb_1);
    this.clp_1 = new StringResource('holiday', this.zlb_1);
    this.dlp_1 = new StringResource('add_a_holiday', this.zlb_1);
    this.elp_1 = new StringResource('edit_holiday', this.zlb_1);
    this.flp_1 = new StringResource('holidays', this.zlb_1);
    this.glp_1 = new StringResource('holiday_calendar', this.zlb_1);
    this.hlp_1 = new StringResource('add_a_new_holiday_calendar', this.zlb_1);
    this.ilp_1 = new StringResource('edit_holiday_calendar', this.zlb_1);
    this.jlp_1 = new StringResource('features_enabled', this.zlb_1);
    this.klp_1 = new StringResource('weekly', this.zlb_1);
    this.llp_1 = new StringResource('once', this.zlb_1);
    this.mlp_1 = new StringResource('daily', this.zlb_1);
    this.nlp_1 = new StringResource('monthly', this.zlb_1);
    this.olp_1 = new StringResource('yearly', this.zlb_1);
    this.plp_1 = new StringResource('sunday', this.zlb_1);
    this.qlp_1 = new StringResource('monday', this.zlb_1);
    this.rlp_1 = new StringResource('tuesday', this.zlb_1);
    this.slp_1 = new StringResource('wednesday', this.zlb_1);
    this.tlp_1 = new StringResource('thursday', this.zlb_1);
    this.ulp_1 = new StringResource('friday', this.zlb_1);
    this.vlp_1 = new StringResource('saturday', this.zlb_1);
    this.wlp_1 = new StringResource('day', this.zlb_1);
    this.xlp_1 = new StringResource('toC', this.zlb_1);
    this.ylp_1 = new StringResource('last_month', this.zlb_1);
    this.zlp_1 = new StringResource('activity_change', this.zlb_1);
    this.alq_1 = new StringResource('change_implemented_if_any', this.zlb_1);
    this.blq_1 = new StringResource('duration', this.zlb_1);
    this.clq_1 = new StringResource('how_did_it_go', this.zlb_1);
    this.dlq_1 = new StringResource('notes', this.zlb_1);
    this.elq_1 = new StringResource('activity', this.zlb_1);
    this.flq_1 = new StringResource('sort_by_name', this.zlb_1);
    this.glq_1 = new StringResource('sort_by_name_asc', this.zlb_1);
    this.hlq_1 = new StringResource('sort_by_name_desc', this.zlb_1);
    this.ilq_1 = new StringResource('date_enroll', this.zlb_1);
    this.jlq_1 = new StringResource('date_left', this.zlb_1);
    this.klq_1 = new StringResource('enroled', this.zlb_1);
    this.llq_1 = new StringResource('class_enrolment', this.zlb_1);
    this.mlq_1 = new StringResource('graduated', this.zlb_1);
    this.nlq_1 = new StringResource('dropped_out', this.zlb_1);
    this.olq_1 = new StringResource('moved', this.zlb_1);
    this.plq_1 = new StringResource('new_leaving_reason', this.zlb_1);
    this.qlq_1 = new StringResource('edit_leaving_reason', this.zlb_1);
    this.rlq_1 = new StringResource('edit_enrolment', this.zlb_1);
    this.slq_1 = new StringResource('new_enrolment', this.zlb_1);
    this.tlq_1 = new StringResource('select_leaving_reason', this.zlb_1);
    this.ulq_1 = new StringResource('add_leaving_reason', this.zlb_1);
    this.vlq_1 = new StringResource('leaving_reason', this.zlb_1);
    this.wlq_1 = new StringResource('leaving_reasons', this.zlb_1);
    this.xlq_1 = new StringResource('leaving_reason_manage', this.zlb_1);
    this.ylq_1 = new StringResource('view_profile', this.zlb_1);
    this.zlq_1 = new StringResource('class_enrolment_outcome', this.zlb_1);
    this.alr_1 = new StringResource('class_enrolment_leaving', this.zlb_1);
    this.blr_1 = new StringResource('in_progress', this.zlb_1);
    this.clr_1 = new StringResource('outcome', this.zlb_1);
    this.dlr_1 = new StringResource('person_enrolment_in_class', this.zlb_1);
    this.elr_1 = new StringResource('enrolment', this.zlb_1);
    this.flr_1 = new StringResource('error_start_date_before_clazz_date', this.zlb_1);
    this.glr_1 = new StringResource('error_start_date_before_previous_enrolment_date', this.zlb_1);
    this.hlr_1 = new StringResource('time_present', this.zlb_1);
    this.ilr_1 = new StringResource('ascending', this.zlb_1);
    this.jlr_1 = new StringResource('descending', this.zlb_1);
    this.klr_1 = new StringResource('sort_by_text', this.zlb_1);
    this.llr_1 = new StringResource('attendance_high_to_low', this.zlb_1);
    this.mlr_1 = new StringResource('attendance_low_to_high', this.zlb_1);
    this.nlr_1 = new StringResource('teacher', this.zlb_1);
    this.olr_1 = new StringResource('add_a_teacher', this.zlb_1);
    this.plr_1 = new StringResource('partial', this.zlb_1);
    this.qlr_1 = new StringResource('teachers_literal', this.zlb_1);
    this.rlr_1 = new StringResource('participant', this.zlb_1);
    this.slr_1 = new StringResource('primary_user', this.zlb_1);
    this.tlr_1 = new StringResource('up_key', this.zlb_1);
    this.ulr_1 = new StringResource('down_key', this.zlb_1);
    this.vlr_1 = new StringResource('activity_went_good', this.zlb_1);
    this.wlr_1 = new StringResource('activity_went_bad', this.zlb_1);
    this.xlr_1 = new StringResource('activity_enter_any_notes', this.zlb_1);
    this.ylr_1 = new StringResource('uom_frequency_title', this.zlb_1);
    this.zlr_1 = new StringResource('uom_duration_title', this.zlb_1);
    this.als_1 = new StringResource('uom_boolean_title', this.zlb_1);
    this.bls_1 = new StringResource('uom_default_title', this.zlb_1);
    this.cls_1 = new StringResource('add_activity', this.zlb_1);
    this.dls_1 = new StringResource('add_activity_literal', this.zlb_1);
    this.els_1 = new StringResource('select_one', this.zlb_1);
    this.fls_1 = new StringResource('measurement_type', this.zlb_1);
    this.gls_1 = new StringResource('frequency', this.zlb_1);
    this.hls_1 = new StringResource('yes_no', this.zlb_1);
    this.ils_1 = new StringResource('time_period', this.zlb_1);
    this.jls_1 = new StringResource('location', this.zlb_1);
    this.kls_1 = new StringResource('last_three_months', this.zlb_1);
    this.lls_1 = new StringResource('export', this.zlb_1);
    this.mls_1 = new StringResource('date', this.zlb_1);
    this.nls_1 = new StringResource('average', this.zlb_1);
    this.ols_1 = new StringResource('age', this.zlb_1);
    this.pls_1 = new StringResource('days', this.zlb_1);
    this.qls_1 = new StringResource('apply', this.zlb_1);
    this.rls_1 = new StringResource('file_selected', this.zlb_1);
    this.sls_1 = new StringResource('all', this.zlb_1);
    this.tls_1 = new StringResource('holiday_calendars', this.zlb_1);
    this.uls_1 = new StringResource('holiday_calendars_desc', this.zlb_1);
    this.vls_1 = new StringResource('sel_question_set', this.zlb_1);
    this.wls_1 = new StringResource('sel_question_set_desc', this.zlb_1);
    this.xls_1 = new StringResource('users', this.zlb_1);
    this.yls_1 = new StringResource('nomination', this.zlb_1);
    this.zls_1 = new StringResource('active', this.zlb_1);
    this.alt_1 = new StringResource('class_id', this.zlb_1);
    this.blt_1 = new StringResource('gender_literal', this.zlb_1);
    this.clt_1 = new StringResource('country', this.zlb_1);
    this.dlt_1 = new StringResource('connectivity', this.zlb_1);
    this.elt_1 = new StringResource('home_internet_access', this.zlb_1);
    this.flt_1 = new StringResource('mobile_internet_access', this.zlb_1);
    this.glt_1 = new StringResource('connectivity_limited', this.zlb_1);
    this.hlt_1 = new StringResource('connectivity_full', this.zlb_1);
    this.ilt_1 = new StringResource('prefer_not_to_say', this.zlb_1);
    this.jlt_1 = new StringResource('sel_question_set_to_use', this.zlb_1);
    this.klt_1 = new StringResource('search', this.zlb_1);
    this.llt_1 = new StringResource('attendance_percentage', this.zlb_1);
    this.mlt_1 = new StringResource('filter', this.zlb_1);
    this.nlt_1 = new StringResource('over_key', this.zlb_1);
    this.olt_1 = new StringResource('sync', this.zlb_1);
    this.plt_1 = new StringResource('not_recorded', this.zlb_1);
    this.qlt_1 = new StringResource('groups', this.zlb_1);
    this.rlt_1 = new StringResource('group_setting_desc', this.zlb_1);
    this.slt_1 = new StringResource('roles', this.zlb_1);
    this.tlt_1 = new StringResource('role', this.zlb_1);
    this.ult_1 = new StringResource('add_a_new_role', this.zlb_1);
    this.vlt_1 = new StringResource('edit_role', this.zlb_1);
    this.wlt_1 = new StringResource('rols_assignment', this.zlb_1);
    this.xlt_1 = new StringResource('role_assignment_setting_desc', this.zlb_1);
    this.ylt_1 = new StringResource('locations', this.zlb_1);
    this.zlt_1 = new StringResource('locations_setting_desc', this.zlb_1);
    this.alu_1 = new StringResource('audit_log', this.zlb_1);
    this.blu_1 = new StringResource('audit_log_setting_desc', this.zlb_1);
    this.clu_1 = new StringResource('entry_key', this.zlb_1);
    this.dlu_1 = new StringResource('permission_key', this.zlb_1);
    this.elu_1 = new StringResource('permissions', this.zlb_1);
    this.flu_1 = new StringResource('role_name', this.zlb_1);
    this.glu_1 = new StringResource('members_key', this.zlb_1);
    this.hlu_1 = new StringResource('member_key', this.zlb_1);
    this.ilu_1 = new StringResource('role_assignment', this.zlb_1);
    this.jlu_1 = new StringResource('scope_by', this.zlb_1);
    this.klu_1 = new StringResource('assign_to', this.zlb_1);
    this.llu_1 = new StringResource('person', this.zlb_1);
    this.mlu_1 = new StringResource('add_a_new_person', this.zlb_1);
    this.nlu_1 = new StringResource('edit_person', this.zlb_1);
    this.olu_1 = new StringResource('permission_person_select', this.zlb_1);
    this.plu_1 = new StringResource('permission_person_insert', this.zlb_1);
    this.qlu_1 = new StringResource('permission_person_update', this.zlb_1);
    this.rlu_1 = new StringResource('permission_person_picture_select', this.zlb_1);
    this.slu_1 = new StringResource('permission_person_picture_insert', this.zlb_1);
    this.tlu_1 = new StringResource('permission_person_picture_update', this.zlb_1);
    this.ulu_1 = new StringResource('permission_clazz_select', this.zlb_1);
    this.vlu_1 = new StringResource('permission_clazz_insert', this.zlb_1);
    this.wlu_1 = new StringResource('permission_clazz_update', this.zlb_1);
    this.xlu_1 = new StringResource('permission_clazz_add_teacher', this.zlb_1);
    this.ylu_1 = new StringResource('permission_clazz_add_student', this.zlb_1);
    this.zlu_1 = new StringResource('permission_attendance_select', this.zlb_1);
    this.alv_1 = new StringResource('permission_attendance_insert', this.zlb_1);
    this.blv_1 = new StringResource('permission_attendance_update', this.zlb_1);
    this.clv_1 = new StringResource('permission_activity_select', this.zlb_1);
    this.dlv_1 = new StringResource('permission_activity_insert', this.zlb_1);
    this.elv_1 = new StringResource('permission_activity_update', this.zlb_1);
    this.flv_1 = new StringResource('permission_sel_question_select', this.zlb_1);
    this.glv_1 = new StringResource('permission_sel_question_insert', this.zlb_1);
    this.hlv_1 = new StringResource('permission_sel_question_update', this.zlb_1);
    this.ilv_1 = new StringResource('permission_sel_select', this.zlb_1);
    this.jlv_1 = new StringResource('permission_sel_update', this.zlb_1);
    this.klv_1 = new StringResource('custom_fields', this.zlb_1);
    this.llv_1 = new StringResource('custom_field', this.zlb_1);
    this.mlv_1 = new StringResource('custom_fields_desc', this.zlb_1);
    this.nlv_1 = new StringResource('field_type', this.zlb_1);
    this.olv_1 = new StringResource('text', this.zlb_1);
    this.plv_1 = new StringResource('dropdown', this.zlb_1);
    this.qlv_1 = new StringResource('options', this.zlb_1);
    this.rlv_1 = new StringResource('option_value', this.zlb_1);
    this.slv_1 = new StringResource('errors', this.zlb_1);
    this.tlv_1 = new StringResource('shake_feedback', this.zlb_1);
    this.ulv_1 = new StringResource('feedback_hint', this.zlb_1);
    this.vlv_1 = new StringResource('send_feedback', this.zlb_1);
    this.wlv_1 = new StringResource('feedback_thanks', this.zlb_1);
    this.xlv_1 = new StringResource('start_date', this.zlb_1);
    this.ylv_1 = new StringResource('end_date', this.zlb_1);
    this.zlv_1 = new StringResource('last_active', this.zlb_1);
    this.alw_1 = new StringResource('save', this.zlb_1);
    this.blw_1 = new StringResource('change_password', this.zlb_1);
    this.clw_1 = new StringResource('current_password', this.zlb_1);
    this.dlw_1 = new StringResource('password_unchanged', this.zlb_1);
    this.elw_1 = new StringResource('timezone', this.zlb_1);
    this.flw_1 = new StringResource('users_settings_desc', this.zlb_1);
    this.glw_1 = new StringResource('add', this.zlb_1);
    this.hlw_1 = new StringResource('refresh', this.zlb_1);
    this.ilw_1 = new StringResource('school', this.zlb_1);
    this.jlw_1 = new StringResource('add_a_new_school', this.zlb_1);
    this.klw_1 = new StringResource('edit_school', this.zlb_1);
    this.llw_1 = new StringResource('join_existing_school', this.zlb_1);
    this.mlw_1 = new StringResource('schools', this.zlb_1);
    this.nlw_1 = new StringResource('assignments', this.zlb_1);
    this.olw_1 = new StringResource('assignment', this.zlb_1);
    this.plw_1 = new StringResource('none_key', this.zlb_1);
    this.qlw_1 = new StringResource('instructions_for_students', this.zlb_1);
    this.rlw_1 = new StringResource('not_started', this.zlb_1);
    this.slw_1 = new StringResource('percentage_complete', this.zlb_1);
    this.tlw_1 = new StringResource('percentage_score', this.zlb_1);
    this.ulw_1 = new StringResource('started_date', this.zlb_1);
    this.vlw_1 = new StringResource('started', this.zlb_1);
    this.wlw_1 = new StringResource('mixed', this.zlb_1);
    this.xlw_1 = new StringResource('store_title', this.zlb_1);
    this.ylw_1 = new StringResource('store_description_short', this.zlb_1);
    this.zlw_1 = new StringResource('store_description_full', this.zlb_1);
    this.alx_1 = new StringResource('due_date', this.zlb_1);
    this.blx_1 = new StringResource('content', this.zlb_1);
    this.clx_1 = new StringResource('add_new_content', this.zlb_1);
    this.dlx_1 = new StringResource('add_content', this.zlb_1);
    this.elx_1 = new StringResource('student_progress', this.zlb_1);
    this.flx_1 = new StringResource('status', this.zlb_1);
    this.glx_1 = new StringResource('use_device_language', this.zlb_1);
    this.hlx_1 = new StringResource('select_item', this.zlb_1);
    this.ilx_1 = new StringResource('from_to_date', this.zlb_1);
    this.jlx_1 = new StringResource('num_items_with_name', this.zlb_1);
    this.klx_1 = new StringResource('num_items_with_name_with_comma', this.zlb_1);
    this.llx_1 = new StringResource('add_to', this.zlb_1);
    this.mlx_1 = new StringResource('remove_from', this.zlb_1);
    this.nlx_1 = new StringResource('change_photo', this.zlb_1);
    this.olx_1 = new StringResource('remove_picture', this.zlb_1);
    this.plx_1 = new StringResource('take_new_photo_from_camera', this.zlb_1);
    this.qlx_1 = new StringResource('select_picture_from_gallery', this.zlb_1);
    this.rlx_1 = new StringResource('select_file', this.zlb_1);
    this.slx_1 = new StringResource('permission_clazz_assignment_view', this.zlb_1);
    this.tlx_1 = new StringResource('permission_clazz_asignment_edit', this.zlb_1);
    this.ulx_1 = new StringResource('overview', this.zlb_1);
    this.vlx_1 = new StringResource('add_new', this.zlb_1);
    this.wlx_1 = new StringResource('staff', this.zlb_1);
    this.xlx_1 = new StringResource('x_teachers_y_students', this.zlb_1);
    this.ylx_1 = new StringResource('call', this.zlb_1);
    this.zlx_1 = new StringResource('organization_id', this.zlb_1);
    this.aly_1 = new StringResource('student', this.zlb_1);
    this.bly_1 = new StringResource('contact_details', this.zlb_1);
    this.cly_1 = new StringResource('untitled', this.zlb_1);
    this.dly_1 = new StringResource('present_late_absent', this.zlb_1);
    this.ely_1 = new StringResource('marked_cap', this.zlb_1);
    this.fly_1 = new StringResource('submitted_cap', this.zlb_1);
    this.gly_1 = new StringResource('not_submitted_cap', this.zlb_1);
    this.hly_1 = new StringResource('submitliteral', this.zlb_1);
    this.ily_1 = new StringResource('x_percent_attended', this.zlb_1);
    this.jly_1 = new StringResource('answer', this.zlb_1);
    this.kly_1 = new StringResource('of_content', this.zlb_1);
    this.lly_1 = new StringResource('nothing_here', this.zlb_1);
    this.mly_1 = new StringResource('not_answered', this.zlb_1);
    this.nly_1 = new StringResource('clazz_work', this.zlb_1);
    this.oly_1 = new StringResource('add_a_new_clazzwork', this.zlb_1);
    this.ply_1 = new StringResource('edit_clazzwork', this.zlb_1);
    this.qly_1 = new StringResource('clazz_assignment', this.zlb_1);
    this.rly_1 = new StringResource('new_assignment', this.zlb_1);
    this.sly_1 = new StringResource('edit_assignment', this.zlb_1);
    this.tly_1 = new StringResource('total_score', this.zlb_1);
    this.uly_1 = new StringResource('late_submission', this.zlb_1);
    this.vly_1 = new StringResource('mark_penalty', this.zlb_1);
    this.wly_1 = new StringResource('late_submission_penalty', this.zlb_1);
    this.xly_1 = new StringResource('end_of_grace_period', this.zlb_1);
    this.yly_1 = new StringResource('allow_class_comments', this.zlb_1);
    this.zly_1 = new StringResource('after_deadline_date_error', this.zlb_1);
    this.alz_1 = new StringResource('points', this.zlb_1);
    this.blz_1 = new StringResource('minimum_score', this.zlb_1);
    this.clz_1 = new StringResource('automatic', this.zlb_1);
    this.dlz_1 = new StringResource('student_marks_content', this.zlb_1);
    this.elz_1 = new StringResource('completion_criteria', this.zlb_1);
    this.flz_1 = new StringResource('mark_complete', this.zlb_1);
    this.glz_1 = new StringResource('late_penalty', this.zlb_1);
    this.hlz_1 = new StringResource('marked_key', this.zlb_1);
    this.ilz_1 = new StringResource('submitted_key', this.zlb_1);
    this.jlz_1 = new StringResource('not_submitted', this.zlb_1);
    this.klz_1 = new StringResource('visible_from_date', this.zlb_1);
    this.llz_1 = new StringResource('submission_type', this.zlb_1);
    this.mlz_1 = new StringResource('no_submission_required', this.zlb_1);
    this.nlz_1 = new StringResource('short_text', this.zlb_1);
    this.olz_1 = new StringResource('attachment', this.zlb_1);
    this.plz_1 = new StringResource('quiz', this.zlb_1);
    this.qlz_1 = new StringResource('allow_private_comments_from_students', this.zlb_1);
    this.rlz_1 = new StringResource('deadline', this.zlb_1);
    this.slz_1 = new StringResource('class_timezone', this.zlb_1);
    this.tlz_1 = new StringResource('maximum_score', this.zlb_1);
    this.ulz_1 = new StringResource('quiz_questions', this.zlb_1);
    this.vlz_1 = new StringResource('time', this.zlb_1);
    this.wlz_1 = new StringResource('submission', this.zlb_1);
    this.xlz_1 = new StringResource('public_comments', this.zlb_1);
    this.ylz_1 = new StringResource('private_comments', this.zlb_1);
    this.zlz_1 = new StringResource('submit_your_answer', this.zlb_1);
    this.am0_1 = new StringResource('add_class_comment', this.zlb_1);
    this.bm0_1 = new StringResource('add_private_comment', this.zlb_1);
    this.cm0_1 = new StringResource('class_comments', this.zlb_1);
    this.dm0_1 = new StringResource('submit', this.zlb_1);
    this.em0_1 = new StringResource('three_num_items_with_name_with_comma', this.zlb_1);
    this.fm0_1 = new StringResource('marking', this.zlb_1);
    this.gm0_1 = new StringResource('return_and_mark_next', this.zlb_1);
    this.hm0_1 = new StringResource('return_only', this.zlb_1);
    this.im0_1 = new StringResource('workspace', this.zlb_1);
    this.jm0_1 = new StringResource('organisation', this.zlb_1);
    this.km0_1 = new StringResource('use_public_library_site', this.zlb_1);
    this.lm0_1 = new StringResource('create_site', this.zlb_1);
    this.mm0_1 = new StringResource('connect_as_guest', this.zlb_1);
    this.nm0_1 = new StringResource('create_account', this.zlb_1);
    this.om0_1 = new StringResource('my', this.zlb_1);
    this.pm0_1 = new StringResource('add_another', this.zlb_1);
    this.qm0_1 = new StringResource('logged_in_as', this.zlb_1);
    this.rm0_1 = new StringResource('person_exists', this.zlb_1);
    this.sm0_1 = new StringResource('incorrect_current_password', this.zlb_1);
    this.tm0_1 = new StringResource('sel_question_type_free_text', this.zlb_1);
    this.um0_1 = new StringResource('sel_question_type_multiple_choice', this.zlb_1);
    this.vm0_1 = new StringResource('question_text', this.zlb_1);
    this.wm0_1 = new StringResource('question_type', this.zlb_1);
    this.xm0_1 = new StringResource('add_option', this.zlb_1);
    this.ym0_1 = new StringResource('roles_and_permissions', this.zlb_1);
    this.zm0_1 = new StringResource('add_role_permission', this.zlb_1);
    this.am1_1 = new StringResource('scope', this.zlb_1);
    this.bm1_1 = new StringResource('scope_description', this.zlb_1);
    this.cm1_1 = new StringResource('role_description', this.zlb_1);
    this.dm1_1 = new StringResource('assign_role', this.zlb_1);
    this.em1_1 = new StringResource('more_information', this.zlb_1);
    this.fm1_1 = new StringResource('pending_requests', this.zlb_1);
    this.gm1_1 = new StringResource('pending', this.zlb_1);
    this.hm1_1 = new StringResource('please_wait_for_approval', this.zlb_1);
    this.im1_1 = new StringResource('reject', this.zlb_1);
    this.jm1_1 = new StringResource('ask_your_teacher_for_code', this.zlb_1);
    this.km1_1 = new StringResource('copied_to_clipboard', this.zlb_1);
    this.lm1_1 = new StringResource('invite_link_desc', this.zlb_1);
    this.mm1_1 = new StringResource('copy_link', this.zlb_1);
    this.nm1_1 = new StringResource('copy_code', this.zlb_1);
    this.om1_1 = new StringResource('share_link', this.zlb_1);
    this.pm1_1 = new StringResource('invite_with_link', this.zlb_1);
    this.qm1_1 = new StringResource('role_not_selected_error', this.zlb_1);
    this.rm1_1 = new StringResource('permission_person_delegate', this.zlb_1);
    this.sm1_1 = new StringResource('this_field_is_mandatory', this.zlb_1);
    this.tm1_1 = new StringResource('permission_role_select', this.zlb_1);
    this.um1_1 = new StringResource('permission_role_insert', this.zlb_1);
    this.vm1_1 = new StringResource('permission_school_select', this.zlb_1);
    this.wm1_1 = new StringResource('permission_school_insert', this.zlb_1);
    this.xm1_1 = new StringResource('permission_school_update', this.zlb_1);
    this.ym1_1 = new StringResource('add_student_to_school', this.zlb_1);
    this.zm1_1 = new StringResource('add_staff_to_school', this.zlb_1);
    this.am2_1 = new StringResource('permission_password_reset', this.zlb_1);
    this.bm2_1 = new StringResource('school_code', this.zlb_1);
    this.cm2_1 = new StringResource('invite_code', this.zlb_1);
    this.dm2_1 = new StringResource('entity_code', this.zlb_1);
    this.em2_1 = new StringResource('join_code_instructions', this.zlb_1);
    this.fm2_1 = new StringResource('record_for_student', this.zlb_1);
    this.gm2_1 = new StringResource('moved_x_entries', this.zlb_1);
    this.hm2_1 = new StringResource('end_is_before_start_error', this.zlb_1);
    this.im2_1 = new StringResource('record_attendance_for_most_recent_occurrence', this.zlb_1);
    this.jm2_1 = new StringResource('add_a_new_occurrence', this.zlb_1);
    this.km2_1 = new StringResource('active_classes', this.zlb_1);
    this.lm2_1 = new StringResource('terms_and_policies', this.zlb_1);
    this.mm2_1 = new StringResource('manage_site_settings', this.zlb_1);
    this.nm2_1 = new StringResource('guest_login_enabled', this.zlb_1);
    this.om2_1 = new StringResource('registration_allowed', this.zlb_1);
    this.pm2_1 = new StringResource('yes', this.zlb_1);
    this.qm2_1 = new StringResource('no', this.zlb_1);
    this.rm2_1 = new StringResource('edit_site', this.zlb_1);
    this.sm2_1 = new StringResource('site', this.zlb_1);
    this.tm2_1 = new StringResource('site_link', this.zlb_1);
    this.um2_1 = new StringResource('please_enter_the_linK', this.zlb_1);
    this.vm2_1 = new StringResource('or', this.zlb_1);
    this.wm2_1 = new StringResource('connect', this.zlb_1);
    this.xm2_1 = new StringResource('terms_and_policies_text', this.zlb_1);
    this.ym2_1 = new StringResource('edit_terms_and_policies', this.zlb_1);
    this.zm2_1 = new StringResource('strings_not_allowed', this.zlb_1);
    this.am3_1 = new StringResource('undo', this.zlb_1);
    this.bm3_1 = new StringResource('video', this.zlb_1);
    this.cm3_1 = new StringResource('content_editor_create_new_category', this.zlb_1);
    this.dm3_1 = new StringResource('content_pieces_completed', this.zlb_1);
    this.em3_1 = new StringResource('content_usage_duration', this.zlb_1);
    this.fm3_1 = new StringResource('manage_download', this.zlb_1);
    this.gm3_1 = new StringResource('powered_by', this.zlb_1);
    this.hm3_1 = new StringResource('invalid_email', this.zlb_1);
    this.im3_1 = new StringResource('select_account', this.zlb_1);
    this.jm3_1 = new StringResource('opening_link', this.zlb_1);
    this.km3_1 = new StringResource('select_account_to_continue', this.zlb_1);
    this.lm3_1 = new StringResource('you_are_already_in_class', this.zlb_1);
    this.mm3_1 = new StringResource('you_are_already_in_school', this.zlb_1);
    this.nm3_1 = new StringResource('join_class', this.zlb_1);
    this.om3_1 = new StringResource('join_school', this.zlb_1);
    this.pm3_1 = new StringResource('what_is_your_date_of_birth', this.zlb_1);
    this.qm3_1 = new StringResource('parents_email_address', this.zlb_1);
    this.rm3_1 = new StringResource('we_sent_a_message_to_your_parent', this.zlb_1);
    this.sm3_1 = new StringResource('toggle_visibility', this.zlb_1);
    this.tm3_1 = new StringResource('parental_consent', this.zlb_1);
    this.um3_1 = new StringResource('parent_child_register_message_subject', this.zlb_1);
    this.vm3_1 = new StringResource('parent_child_register_message', this.zlb_1);
    this.wm3_1 = new StringResource('parent_consent_explanation', this.zlb_1);
    this.xm3_1 = new StringResource('relationship', this.zlb_1);
    this.ym3_1 = new StringResource('i_consent', this.zlb_1);
    this.zm3_1 = new StringResource('i_do_not_consent', this.zlb_1);
    this.am4_1 = new StringResource('revoke_consent', this.zlb_1);
    this.bm4_1 = new StringResource('restore_consent', this.zlb_1);
    this.cm4_1 = new StringResource('status_consent_granted', this.zlb_1);
    this.dm4_1 = new StringResource('status_consent_denied', this.zlb_1);
    this.em4_1 = new StringResource('other_legal_guardian', this.zlb_1);
    this.fm4_1 = new StringResource('manage_parental_consent', this.zlb_1);
    this.gm4_1 = new StringResource('view_class_content', this.zlb_1);
    this.hm4_1 = new StringResource('edit_class_content', this.zlb_1);
    this.im4_1 = new StringResource('view_class_learning_records', this.zlb_1);
    this.jm4_1 = new StringResource('view_contact_details_of_members', this.zlb_1);
    this.km4_1 = new StringResource('edit_contact_details_of_members', this.zlb_1);
    this.lm4_1 = new StringResource('view_socioeconomic_details_of_members', this.zlb_1);
    this.mm4_1 = new StringResource('edit_socioeconomic_details_of_members', this.zlb_1);
    this.nm4_1 = new StringResource('add_person_or_group', this.zlb_1);
    this.om4_1 = new StringResource('lets_get_started', this.zlb_1);
    this.pm4_1 = new StringResource('looks_like_installed_app_from_link', this.zlb_1);
    this.qm4_1 = new StringResource('continue_using_link_recommended', this.zlb_1);
    this.rm4_1 = new StringResource('continue_using_the_link', this.zlb_1);
    this.sm4_1 = new StringResource('start_from_scratch', this.zlb_1);
    this.tm4_1 = new StringResource('ignore_the_link', this.zlb_1);
    this.um4_1 = new StringResource('add_permission_for_a_person', this.zlb_1);
    this.vm4_1 = new StringResource('add_permission_for_a_group', this.zlb_1);
    this.wm4_1 = new StringResource('add_using_link', this.zlb_1);
    this.xm4_1 = new StringResource('add_using_a_web_link_then', this.zlb_1);
    this.ym4_1 = new StringResource('add_from_gallery', this.zlb_1);
    this.zm4_1 = new StringResource('add_video_or_audio_from_the_device_gallery', this.zlb_1);
    this.am5_1 = new StringResource('add_file', this.zlb_1);
    this.bm5_1 = new StringResource('add_folder', this.zlb_1);
    this.cm5_1 = new StringResource('importing', this.zlb_1);
    this.dm5_1 = new StringResource('downloading_content', this.zlb_1);
    this.em5_1 = new StringResource('deleting_content', this.zlb_1);
    this.fm5_1 = new StringResource('add_folder_description', this.zlb_1);
    this.gm5_1 = new StringResource('add_educational_content_using_supported_formats_eg_pdf_xapi_h5p', this.zlb_1);
    this.hm5_1 = new StringResource('current_status_consent_granted', this.zlb_1);
    this.im5_1 = new StringResource('select_country', this.zlb_1);
    this.jm5_1 = new StringResource('enter_link', this.zlb_1);
    this.km5_1 = new StringResource('add_subject', this.zlb_1);
    this.lm5_1 = new StringResource('share_via', this.zlb_1);
    this.mm5_1 = new StringResource('share_apk_file', this.zlb_1);
    this.nm5_1 = new StringResource('recommended_for_advanced_users', this.zlb_1);
    this.om5_1 = new StringResource('nearby_share', this.zlb_1);
    this.pm5_1 = new StringResource('recommended_for_offline_installation', this.zlb_1);
    this.qm5_1 = new StringResource('app_store_link', this.zlb_1);
    this.rm5_1 = new StringResource('everything_works_offline', this.zlb_1);
    this.sm5_1 = new StringResource('swipe_to_next', this.zlb_1);
    this.tm5_1 = new StringResource('content_entries_completed', this.zlb_1);
    this.um5_1 = new StringResource('content_usage_time', this.zlb_1);
    this.vm5_1 = new StringResource('all_permissions', this.zlb_1);
    this.wm5_1 = new StringResource('folder', this.zlb_1);
    this.xm5_1 = new StringResource('create_a_new_learning_env', this.zlb_1);
    this.ym5_1 = new StringResource('add_educational_content_to_new_learning_env', this.zlb_1);
    this.zm5_1 = new StringResource('connect_to_an_existing_learning_environment', this.zlb_1);
    this.am6_1 = new StringResource('does_your_class_already_have_learning_env', this.zlb_1);
    this.bm6_1 = new StringResource('use_the_public_lib_env', this.zlb_1);
    this.cm6_1 = new StringResource('just_want_to_browse', this.zlb_1);
    this.dm6_1 = new StringResource('revoking_consent_will', this.zlb_1);
    this.em6_1 = new StringResource('you_must_comply_with_license', this.zlb_1);
    this.fm6_1 = new StringResource('you_can_copypaste_a_link', this.zlb_1);
    this.gm6_1 = new StringResource('see_supported_sites', this.zlb_1);
    this.hm6_1 = new StringResource('class_setup', this.zlb_1);
    this.im6_1 = new StringResource('anyone_with_this_can_join_school', this.zlb_1);
    this.jm6_1 = new StringResource('this_class', this.zlb_1);
    this.km6_1 = new StringResource('from_my_classes', this.zlb_1);
    this.lm6_1 = new StringResource('my_content', this.zlb_1);
    this.mm6_1 = new StringResource('learning_environment', this.zlb_1);
    this.nm6_1 = new StringResource('grades_class_age', this.zlb_1);
    this.om6_1 = new StringResource('add_remove_and_modify_grades', this.zlb_1);
    this.pm6_1 = new StringResource('subjects', this.zlb_1);
    this.qm6_1 = new StringResource('add_remove_and_modify_subjects', this.zlb_1);
    this.rm6_1 = new StringResource('create_my_account', this.zlb_1);
    this.sm6_1 = new StringResource('recommend_it', this.zlb_1);
    this.tm6_1 = new StringResource('edit_permissions', this.zlb_1);
    this.um6_1 = new StringResource('add_from_contacts', this.zlb_1);
    this.vm6_1 = new StringResource('almost_done', this.zlb_1);
    this.wm6_1 = new StringResource('your_username', this.zlb_1);
    this.xm6_1 = new StringResource('select_content', this.zlb_1);
    this.ym6_1 = new StringResource('search_in', this.zlb_1);
    this.zm6_1 = new StringResource('type', this.zlb_1);
    this.am7_1 = new StringResource('please_download_the_app', this.zlb_1);
    this.bm7_1 = new StringResource('alternatively_you_can_download_the_apk', this.zlb_1);
    this.cm7_1 = new StringResource('full_i_can_download_as_much_as_i_like', this.zlb_1);
    this.dm7_1 = new StringResource('limited_i_avoid_downloading_too_much', this.zlb_1);
    this.em7_1 = new StringResource('oops', this.zlb_1);
    this.fm7_1 = new StringResource('sorry_something_went_wrong', this.zlb_1);
    this.gm7_1 = new StringResource('incident_id', this.zlb_1);
    this.hm7_1 = new StringResource('error_code', this.zlb_1);
    this.im7_1 = new StringResource('take_me_home', this.zlb_1);
    this.jm7_1 = new StringResource('view_clazz', this.zlb_1);
    this.km7_1 = new StringResource('view_clazzes', this.zlb_1);
    this.lm7_1 = new StringResource('enrol_and_unenrol_students', this.zlb_1);
    this.mm7_1 = new StringResource('enrol_and_unenrol_teachers', this.zlb_1);
    this.nm7_1 = new StringResource('view_assignments', this.zlb_1);
    this.om7_1 = new StringResource('add_or_edit_assignment', this.zlb_1);
    this.pm7_1 = new StringResource('view_basic_profile_of_members', this.zlb_1);
    this.qm7_1 = new StringResource('edit_basic_profile_of_members', this.zlb_1);
    this.rm7_1 = new StringResource('view_school', this.zlb_1);
    this.sm7_1 = new StringResource('edit_clazzes', this.zlb_1);
    this.tm7_1 = new StringResource('add_new_clazz_to_school', this.zlb_1);
    this.um7_1 = new StringResource('added_to_class_content', this.zlb_1);
    this.vm7_1 = new StringResource('content_already_added_to_class', this.zlb_1);
    this.wm7_1 = new StringResource('your_account_needs_approved', this.zlb_1);
    this.xm7_1 = new StringResource('adult_account_required', this.zlb_1);
    this.ym7_1 = new StringResource('blank_report', this.zlb_1);
    this.zm7_1 = new StringResource('attendance_over_time_by_class', this.zlb_1);
    this.am8_1 = new StringResource('percentage_of_students_attending_over_time', this.zlb_1);
    this.bm8_1 = new StringResource('content_completion', this.zlb_1);
    this.cm8_1 = new StringResource('number_of_students_completed_time', this.zlb_1);
    this.dm8_1 = new StringResource('content_usage_by_class', this.zlb_1);
    this.em8_1 = new StringResource('total_content_usage_duration_class', this.zlb_1);
    this.fm8_1 = new StringResource('content_usage_over_time', this.zlb_1);
    this.gm8_1 = new StringResource('total_content_duration_gender', this.zlb_1);
    this.hm8_1 = new StringResource('unique_content_users_over_time', this.zlb_1);
    this.im8_1 = new StringResource('number_of_active_users_over_time', this.zlb_1);
    this.jm8_1 = new StringResource('parent', this.zlb_1);
    this.km8_1 = new StringResource('upload', this.zlb_1);
    this.lm8_1 = new StringResource('selected_file_summary', this.zlb_1);
    this.mm8_1 = new StringResource('drag_and_drop_or_click_to_add_file', this.zlb_1);
    this.nm8_1 = new StringResource('extra_active_tab_warning', this.zlb_1);
    this.om8_1 = new StringResource('saved', this.zlb_1);
    this.pm8_1 = new StringResource('individual', this.zlb_1);
    this.qm8_1 = new StringResource('group', this.zlb_1);
    this.rm8_1 = new StringResource('dont_show_before', this.zlb_1);
    this.sm8_1 = new StringResource('group_submission', this.zlb_1);
    this.tm8_1 = new StringResource('require_file_submission', this.zlb_1);
    this.um8_1 = new StringResource('require_text_submission', this.zlb_1);
    this.vm8_1 = new StringResource('maximum', this.zlb_1);
    this.wm8_1 = new StringResource('size_limit', this.zlb_1);
    this.xm8_1 = new StringResource('size_limit_error', this.zlb_1);
    this.ym8_1 = new StringResource('limit', this.zlb_1);
    this.zm8_1 = new StringResource('number_of_files', this.zlb_1);
    this.am9_1 = new StringResource('edit_after_submission', this.zlb_1);
    this.bm9_1 = new StringResource('allowed_till_deadline', this.zlb_1);
    this.cm9_1 = new StringResource('allowed_till_grace', this.zlb_1);
    this.dm9_1 = new StringResource('not_allowed', this.zlb_1);
    this.em9_1 = new StringResource('marked_by', this.zlb_1);
    this.fm9_1 = new StringResource('peers', this.zlb_1);
    this.gm9_1 = new StringResource('peers_to_review', this.zlb_1);
    this.hm9_1 = new StringResource('file_type', this.zlb_1);
    this.im9_1 = new StringResource('file_type_chosen', this.zlb_1);
    this.jm9_1 = new StringResource('file_type_any', this.zlb_1);
    this.km9_1 = new StringResource('file_document', this.zlb_1);
    this.lm9_1 = new StringResource('file_image', this.zlb_1);
    this.mm9_1 = new StringResource('submit_grade', this.zlb_1);
    this.nm9_1 = new StringResource('submit_grade_and_mark_next', this.zlb_1);
    this.om9_1 = new StringResource('graded', this.zlb_1);
    this.pm9_1 = new StringResource('score_greater_than_zero', this.zlb_1);
    this.qm9_1 = new StringResource('words', this.zlb_1);
    this.rm9_1 = new StringResource('characters', this.zlb_1);
    this.sm9_1 = new StringResource('class_timezone_set', this.zlb_1);
    this.tm9_1 = new StringResource('maximum_points', this.zlb_1);
    this.um9_1 = new StringResource('penalty_label', this.zlb_1);
    this.vm9_1 = new StringResource('submissions', this.zlb_1);
    this.wm9_1 = new StringResource('add_text', this.zlb_1);
    this.xm9_1 = new StringResource('course_blocks', this.zlb_1);
    this.ym9_1 = new StringResource('add_block', this.zlb_1);
    this.zm9_1 = new StringResource('edit_block', this.zlb_1);
    this.ama_1 = new StringResource('module', this.zlb_1);
    this.bma_1 = new StringResource('course_module', this.zlb_1);
    this.cma_1 = new StringResource('formatted_text_to_show_to_course_participants', this.zlb_1);
    this.dma_1 = new StringResource('add_course_block_content_desc', this.zlb_1);
    this.ema_1 = new StringResource('add_assignment_block_content_desc', this.zlb_1);
    this.fma_1 = new StringResource('discussion_board', this.zlb_1);
    this.gma_1 = new StringResource('add_discussion_board_desc', this.zlb_1);
    this.hma_1 = new StringResource('new_module', this.zlb_1);
    this.ima_1 = new StringResource('edit_module', this.zlb_1);
    this.jma_1 = new StringResource('indent', this.zlb_1);
    this.kma_1 = new StringResource('unindent', this.zlb_1);
    this.lma_1 = new StringResource('institution', this.zlb_1);
    this.mma_1 = new StringResource('student_enrolment_policy', this.zlb_1);
    this.nma_1 = new StringResource('teacher_enrolment_policy', this.zlb_1);
    this.oma_1 = new StringResource('open_enrolment', this.zlb_1);
    this.pma_1 = new StringResource('enrolment_requests_must_be_approved', this.zlb_1);
    this.qma_1 = new StringResource('accept_enrolment_requests_automatically', this.zlb_1);
    this.rma_1 = new StringResource('visibility', this.zlb_1);
    this.sma_1 = new StringResource('hidden_enrolment_via_links_code_or_invitation', this.zlb_1);
    this.tma_1 = new StringResource('visible_for_all', this.zlb_1);
    this.uma_1 = new StringResource('terminology', this.zlb_1);
    this.vma_1 = new StringResource('select_terminology', this.zlb_1);
    this.wma_1 = new StringResource('add_new_terminology', this.zlb_1);
    this.xma_1 = new StringResource('edit_terminology', this.zlb_1);
    this.yma_1 = new StringResource('your_words_for', this.zlb_1);
    this.zma_1 = new StringResource('course_setup', this.zlb_1);
    this.amb_1 = new StringResource('number_of_groups', this.zlb_1);
    this.bmb_1 = new StringResource('assign_to_random_groups', this.zlb_1);
    this.cmb_1 = new StringResource('add_new_groups', this.zlb_1);
    this.dmb_1 = new StringResource('edit_groups', this.zlb_1);
    this.emb_1 = new StringResource('num_replies', this.zlb_1);
    this.fmb_1 = new StringResource('topics', this.zlb_1);
    this.gmb_1 = new StringResource('add_topic', this.zlb_1);
    this.hmb_1 = new StringResource('add_a_reply', this.zlb_1);
    this.imb_1 = new StringResource('messages', this.zlb_1);
    this.jmb_1 = new StringResource('message', this.zlb_1);
    this.kmb_1 = new StringResource('library', this.zlb_1);
    this.lmb_1 = new StringResource('courses', this.zlb_1);
    this.mmb_1 = new StringResource('course', this.zlb_1);
    this.nmb_1 = new StringResource('reports_and_analytics', this.zlb_1);
    this.omb_1 = new StringResource('course_comments', this.zlb_1);
    this.pmb_1 = new StringResource('currently_enroled', this.zlb_1);
    this.qmb_1 = new StringResource('past_enrolments', this.zlb_1);
    this.rmb_1 = new StringResource('standard', this.zlb_1);
    this.smb_1 = new StringResource('group_number', this.zlb_1);
    this.tmb_1 = new StringResource('add_group', this.zlb_1);
    this.umb_1 = new StringResource('edit_group', this.zlb_1);
    this.vmb_1 = new StringResource('new_group_set', this.zlb_1);
    this.wmb_1 = new StringResource('edit_text', this.zlb_1);
    this.xmb_1 = new StringResource('add_module', this.zlb_1);
    this.ymb_1 = new StringResource('add_a_new_course', this.zlb_1);
    this.zmb_1 = new StringResource('join_existing_course', this.zlb_1);
    this.amc_1 = new StringResource('edit_course', this.zlb_1);
    this.bmc_1 = new StringResource('currently_enrolled', this.zlb_1);
    this.cmc_1 = new StringResource('past_enrollments', this.zlb_1);
    this.dmc_1 = new StringResource('unread', this.zlb_1);
    this.emc_1 = new StringResource('new_chat', this.zlb_1);
    this.fmc_1 = new StringResource('new_group', this.zlb_1);
    this.gmc_1 = new StringResource('chat', this.zlb_1);
    this.hmc_1 = new StringResource('you', this.zlb_1);
    this.imc_1 = new StringResource('edit_topic', this.zlb_1);
    this.jmc_1 = new StringResource('posts', this.zlb_1);
    this.kmc_1 = new StringResource('post', this.zlb_1);
    this.lmc_1 = new StringResource('individual_submission', this.zlb_1);
    this.mmc_1 = new StringResource('unassigned', this.zlb_1);
    this.nmc_1 = new StringResource('error_too_long_text', this.zlb_1);
    this.omc_1 = new StringResource('managed_enrolment', this.zlb_1);
    this.pmc_1 = new StringResource('text_file_submission_error', this.zlb_1);
    this.qmc_1 = new StringResource('submit_all_at_once_submission_policy', this.zlb_1);
    this.rmc_1 = new StringResource('multiple_submission_allowed_submission_policy', this.zlb_1);
    this.smc_1 = new StringResource('enrolment_policy', this.zlb_1);
    this.tmc_1 = new StringResource('submission_policy', this.zlb_1);
    this.umc_1 = new StringResource('submission_already_made', this.zlb_1);
    this.vmc_1 = new StringResource('grade_out_of_range', this.zlb_1);
    this.wmc_1 = new StringResource('update_grade', this.zlb_1);
    this.xmc_1 = new StringResource('update_grade_and_mark_next', this.zlb_1);
    this.ymc_1 = new StringResource('add_discussion', this.zlb_1);
    this.zmc_1 = new StringResource('edit_discussion', this.zlb_1);
    this.amd_1 = new StringResource('type_here', this.zlb_1);
    this.bmd_1 = new StringResource('deadline_has_passed', this.zlb_1);
    this.cmd_1 = new StringResource('already_submitted', this.zlb_1);
    this.dmd_1 = new StringResource('exceeds_word_limit', this.zlb_1);
    this.emd_1 = new StringResource('exceeds_char_limit', this.zlb_1);
    this.fmd_1 = new StringResource('unassigned_error', this.zlb_1);
    this.gmd_1 = new StringResource('enabled', this.zlb_1);
    this.hmd_1 = new StringResource('disabled', this.zlb_1);
    this.imd_1 = new StringResource('from_my_courses', this.zlb_1);
    this.jmd_1 = new StringResource('assign_reviewers', this.zlb_1);
    this.kmd_1 = new StringResource('reviews_per_user_group', this.zlb_1);
    this.lmd_1 = new StringResource('assign_random_reviewers', this.zlb_1);
    this.mmd_1 = new StringResource('reviewer', this.zlb_1);
    this.nmd_1 = new StringResource('app_language', this.zlb_1);
    this.omd_1 = new StringResource('pdf', this.zlb_1);
    this.pmd_1 = new StringResource('panic_button_app', this.zlb_1);
    this.qmd_1 = new StringResource('actions_to_be_taken_in_case_of_emergency', this.zlb_1);
    this.rmd_1 = new StringResource('exit_app', this.zlb_1);
    this.smd_1 = new StringResource('delete_app_data_from_device', this.zlb_1);
    this.tmd_1 = new StringResource('more_options', this.zlb_1);
    this.umd_1 = new StringResource('num_holidays', this.zlb_1);
    this.vmd_1 = new StringResource('hide_app', this.zlb_1);
    this.wmd_1 = new StringResource('panic_button_explanation', this.zlb_1);
    this.xmd_1 = new StringResource('hide_app_explanation', this.zlb_1);
    this.ymd_1 = new StringResource('most_recent', this.zlb_1);
    this.zmd_1 = new StringResource('comment', this.zlb_1);
    this.ame_1 = new StringResource('grant_app_permission', this.zlb_1);
    this.bme_1 = new StringResource('this_app_will_receive', this.zlb_1);
    this.cme_1 = new StringResource('my_profile', this.zlb_1);
    this.dme_1 = new StringResource('add_another_account', this.zlb_1);
    this.eme_1 = new StringResource('end_is_before_start', this.zlb_1);
    this.fme_1 = new StringResource('select_person', this.zlb_1);
    this.gme_1 = new StringResource('your_submission', this.zlb_1);
    this.hme_1 = new StringResource('edit_content', this.zlb_1);
    this.ime_1 = new StringResource('edit_folder', this.zlb_1);
    this.jme_1 = new StringResource('add_new_post', this.zlb_1);
    this.kme_1 = new StringResource('grades_scoring', this.zlb_1);
    this.lme_1 = new StringResource('mark_comment', this.zlb_1);
    this.mme_1 = new StringResource('mark', this.zlb_1);
    this.nme_1 = new StringResource('too_high', this.zlb_1);
    this.ome_1 = new StringResource('required', this.zlb_1);
    this.pme_1 = new StringResource('expand', this.zlb_1);
    this.qme_1 = new StringResource('collapse', this.zlb_1);
    this.rme_1 = new StringResource('remove', this.zlb_1);
    this.sme_1 = new StringResource('table_of_contents', this.zlb_1);
    this.tme_1 = new StringResource('select_date', this.zlb_1);
    this.ume_1 = new StringResource('link', this.zlb_1);
    this.vme_1 = new StringResource('time_submitted', this.zlb_1);
    this.wme_1 = new StringResource('group_assignment', this.zlb_1);
    this.xme_1 = new StringResource('menu', this.zlb_1);
    this.yme_1 = new StringResource('restarting', this.zlb_1);
    this.zme_1 = new StringResource('terms_required_if_registration_enabled', this.zlb_1);
    this.amf_1 = new StringResource('drop_files_to_import', this.zlb_1);
    this.bmf_1 = new StringResource('compose_post', this.zlb_1);
    this.cmf_1 = new StringResource('password_updated', this.zlb_1);
    this.dmf_1 = new StringResource('html5_content_display_engine', this.zlb_1);
    this.emf_1 = new StringResource('chrome_recommended', this.zlb_1);
    this.fmf_1 = new StringResource('chrome_recommended_info', this.zlb_1);
    this.gmf_1 = new StringResource('internal_webview', this.zlb_1);
    this.hmf_1 = new StringResource('internal_webview_info', this.zlb_1);
    this.imf_1 = new StringResource('content_not_ready_try_later', this.zlb_1);
    this.jmf_1 = new StringResource('version', this.zlb_1);
    this.kmf_1 = new StringResource('licenses', this.zlb_1);
    this.lmf_1 = new StringResource('cannot_record_attendance_for_future_date_time', this.zlb_1);
    this.mmf_1 = new StringResource('could_not_load_vlc', this.zlb_1);
    this.nmf_1 = new StringResource('selected', this.zlb_1);
    this.omf_1 = new StringResource('clear_selection', this.zlb_1);
    this.pmf_1 = new StringResource('move_entries_to_this_folder', this.zlb_1);
    this.qmf_1 = new StringResource('cannot_move_to_subfolder_of_self', this.zlb_1);
    this.rmf_1 = new StringResource('cannot_move_already_in_same_folder', this.zlb_1);
    this.smf_1 = new StringResource('move_to', this.zlb_1);
    this.tmf_1 = new StringResource('restore', this.zlb_1);
    this.umf_1 = new StringResource('delete_permanently', this.zlb_1);
    this.vmf_1 = new StringResource('deleted_items', this.zlb_1);
    this.wmf_1 = new StringResource('delete_or_restore_items', this.zlb_1);
    this.xmf_1 = new StringResource('yesterday', this.zlb_1);
    this.ymf_1 = new StringResource('request_to_enrol_already_pending', this.zlb_1);
    this.zmf_1 = new StringResource('request_submitted', this.zlb_1);
    this.amg_1 = new StringResource('canceled_enrolment_request', this.zlb_1);
    this.bmg_1 = new StringResource('enroled_into_name', this.zlb_1);
    this.cmg_1 = new StringResource('declined_request_from_name', this.zlb_1);
    this.dmg_1 = new StringResource('view_course', this.zlb_1);
    this.emg_1 = new StringResource('moderate', this.zlb_1);
    this.fmg_1 = new StringResource('manage_student_enrolments', this.zlb_1);
    this.gmg_1 = new StringResource('manage_teacher_enrolments', this.zlb_1);
    this.hmg_1 = new StringResource('view_learning_records', this.zlb_1);
    this.img_1 = new StringResource('edit_learning_records', this.zlb_1);
    this.jmg_1 = new StringResource('view_members', this.zlb_1);
    this.kmg_1 = new StringResource('copy_invite_code', this.zlb_1);
    this.lmg_1 = new StringResource('direct_enrol_users_onto_courses', this.zlb_1);
    this.mmg_1 = new StringResource('could_not_restart', this.zlb_1);
    this.nmg_1 = new StringResource('close_now', this.zlb_1);
    this.omg_1 = new StringResource('view_all_courses', this.zlb_1);
    this.pmg_1 = new StringResource('edit_all_courses', this.zlb_1);
    this.qmg_1 = new StringResource('moderate_all_courses', this.zlb_1);
    this.rmg_1 = new StringResource('manage_student_enrolments_for_all_courses', this.zlb_1);
    this.smg_1 = new StringResource('manage_teacher_enrolments_for_all_courses', this.zlb_1);
    this.tmg_1 = new StringResource('view_attendance_records_for_all_courses', this.zlb_1);
    this.umg_1 = new StringResource('edit_attendance_records_for_all_courses', this.zlb_1);
    this.vmg_1 = new StringResource('add_new_users', this.zlb_1);
    this.wmg_1 = new StringResource('view_all_users', this.zlb_1);
    this.xmg_1 = new StringResource('edit_all_users', this.zlb_1);
    this.ymg_1 = new StringResource('view_learning_records_for_all_courses', this.zlb_1);
    this.zmg_1 = new StringResource('edit_learning_records_for_all_courses', this.zlb_1);
    this.amh_1 = new StringResource('add_new_courses', this.zlb_1);
    this.bmh_1 = new StringResource('manage_user_permissions', this.zlb_1);
    this.cmh_1 = new StringResource('reset_passwords', this.zlb_1);
    this.dmh_1 = new StringResource('upload_failed', this.zlb_1);
    this.emh_1 = new StringResource('opening_name', this.zlb_1);
    this.fmh_1 = new StringResource('invalid_invite_code', this.zlb_1);
    this.gmh_1 = new StringResource('bulk_import', this.zlb_1);
    this.hmh_1 = new StringResource('import_key', this.zlb_1);
    this.imh_1 = new StringResource('imported', this.zlb_1);
    this.jmh_1 = new StringResource('you_can_import_users_using_a_csv_file', this.zlb_1);
    this.kmh_1 = new StringResource('get_template', this.zlb_1);
    this.lmh_1 = new StringResource('line_number', this.zlb_1);
    this.mmh_1 = new StringResource('selected_content', this.zlb_1);
    this.nmh_1 = new StringResource('edit_content_block', this.zlb_1);
    this.omh_1 = new StringResource('compression', this.zlb_1);
    this.pmh_1 = new StringResource('compression_highest', this.zlb_1);
    this.qmh_1 = new StringResource('compression_high', this.zlb_1);
    this.rmh_1 = new StringResource('compression_medium', this.zlb_1);
    this.smh_1 = new StringResource('compression_low', this.zlb_1);
    this.tmh_1 = new StringResource('compression_lowest', this.zlb_1);
    this.umh_1 = new StringResource('compression_none', this.zlb_1);
    this.vmh_1 = new StringResource('size_compressed_was', this.zlb_1);
    this.wmh_1 = new StringResource('size', this.zlb_1);
    this.xmh_1 = new StringResource('import_error', this.zlb_1);
    this.ymh_1 = new StringResource('upload_error', this.zlb_1);
    this.zmh_1 = new StringResource('offline_items_storage', this.zlb_1);
    this.ami_1 = new StringResource('space_available', this.zlb_1);
    this.bmi_1 = new StringResource('grant_permission', this.zlb_1);
    this.cmi_1 = new StringResource('gradebook', this.zlb_1);
    this.dmi_1 = new StringResource('full_screen', this.zlb_1);
    this.emi_1 = new StringResource('exit_full_screen', this.zlb_1);
    this.fmi_1 = new StringResource('increase_text_size', this.zlb_1);
    this.gmi_1 = new StringResource('decrease_text_size', this.zlb_1);
    this.hmi_1 = new StringResource('nothing_here_yet', this.zlb_1);
    this.imi_1 = new StringResource('select_picture_from_files', this.zlb_1);
    this.jmi_1 = new StringResource('add_subtitles', this.zlb_1);
    this.kmi_1 = new StringResource('edit_subtitles', this.zlb_1);
    this.lmi_1 = new StringResource('subtitles', this.zlb_1);
  }
  var strings_instance;
  function strings_getInstance() {
    if (strings_instance == null)
      new strings();
    return strings_instance;
  }
  function plurals() {
    plurals_instance = this;
    var tmp = this;
    var tmp_0 = require('localization/comustadmobilecore_pluralsJson.json');
    tmp.mmi_1 = (!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) ? tmp_0 : THROW_CCE();
    var tmp_1 = this;
    var tmp_2 = require('localization/comustadmobilecore_pluralsJson_rw.json');
    var tmp_3 = new SupportedLocale('rw', (!(tmp_2 == null) ? typeof tmp_2 === 'string' : false) ? tmp_2 : THROW_CCE());
    var tmp_4 = require('localization/comustadmobilecore_pluralsJson_bn.json');
    var tmp_5 = new SupportedLocale('bn', (!(tmp_4 == null) ? typeof tmp_4 === 'string' : false) ? tmp_4 : THROW_CCE());
    var tmp_6 = require('localization/comustadmobilecore_pluralsJson_ps.json');
    var tmp_7 = new SupportedLocale('ps', (!(tmp_6 == null) ? typeof tmp_6 === 'string' : false) ? tmp_6 : THROW_CCE());
    var tmp_8 = require('localization/comustadmobilecore_pluralsJson_tg.json');
    var tmp_9 = new SupportedLocale('tg', (!(tmp_8 == null) ? typeof tmp_8 === 'string' : false) ? tmp_8 : THROW_CCE());
    var tmp_10 = require('localization/comustadmobilecore_pluralsJson_ne.json');
    var tmp_11 = new SupportedLocale('ne', (!(tmp_10 == null) ? typeof tmp_10 === 'string' : false) ? tmp_10 : THROW_CCE());
    var tmp_12 = require('localization/comustadmobilecore_pluralsJson_it.json');
    var tmp_13 = new SupportedLocale('it', (!(tmp_12 == null) ? typeof tmp_12 === 'string' : false) ? tmp_12 : THROW_CCE());
    var tmp_14 = require('localization/comustadmobilecore_pluralsJson_fr.json');
    var tmp_15 = new SupportedLocale('fr', (!(tmp_14 == null) ? typeof tmp_14 === 'string' : false) ? tmp_14 : THROW_CCE());
    var tmp_16 = require('localization/comustadmobilecore_pluralsJson_fa.json');
    var tmp_17 = new SupportedLocale('fa', (!(tmp_16 == null) ? typeof tmp_16 === 'string' : false) ? tmp_16 : THROW_CCE());
    var tmp_18 = require('localization/comustadmobilecore_pluralsJson_ru.json');
    var tmp_19 = new SupportedLocale('ru', (!(tmp_18 == null) ? typeof tmp_18 === 'string' : false) ? tmp_18 : THROW_CCE());
    var tmp_20 = require('localization/comustadmobilecore_pluralsJson_ar.json');
    var tmp_21 = new SupportedLocale('ar', (!(tmp_20 == null) ? typeof tmp_20 === 'string' : false) ? tmp_20 : THROW_CCE());
    var tmp_22 = require('localization/comustadmobilecore_pluralsJson_nb-NO.json');
    var tmp_23 = new SupportedLocale('nb-NO', (!(tmp_22 == null) ? typeof tmp_22 === 'string' : false) ? tmp_22 : THROW_CCE());
    var tmp_24 = require('localization/comustadmobilecore_pluralsJson_my.json');
    tmp_1.nmi_1 = new SupportedLocales(listOf([tmp_3, tmp_5, tmp_7, tmp_9, tmp_11, tmp_13, tmp_15, tmp_17, tmp_19, tmp_21, tmp_23, new SupportedLocale('my', (!(tmp_24 == null) ? typeof tmp_24 === 'string' : false) ? tmp_24 : THROW_CCE())]));
    this.omi_1 = new Impl(this.nmi_1, this.mmi_1);
    this.pmi_1 = new PluralsResource('number_of_attempts', this.omi_1);
    this.qmi_1 = new PluralsResource('duration_hours', this.omi_1);
    this.rmi_1 = new PluralsResource('duration_minutes', this.omi_1);
    this.smi_1 = new PluralsResource('duration_seconds', this.omi_1);
    this.tmi_1 = new PluralsResource('items_selected', this.omi_1);
    this.umi_1 = new PluralsResource('items_deleted', this.omi_1);
    this.vmi_1 = new PluralsResource('items_restored', this.omi_1);
    this.wmi_1 = new PluralsResource('are_you_sure_you_want_to_permanently_delete', this.omi_1);
  }
  var plurals_instance;
  function plurals_getInstance() {
    if (plurals_instance == null)
      new plurals();
    return plurals_instance;
  }
  function MR() {
    MR_instance = this;
    this.xmi_1 = '9139361c3e4328bde6458a24547e7041';
    this.ymi_1 = strings_getInstance().zlb_1.hl7(plurals_getInstance().omi_1);
  }
  var MR_instance;
  function MR_getInstance() {
    if (MR_instance == null)
      new MR();
    return MR_instance;
  }
  function AccountRegisterOptions(makeAccountActive, parentJoin) {
    makeAccountActive = makeAccountActive === VOID ? true : makeAccountActive;
    parentJoin = parentJoin === VOID ? null : parentJoin;
    this.zmi_1 = makeAccountActive;
    this.amj_1 = parentJoin;
  }
  protoOf(AccountRegisterOptions).toString = function () {
    return 'AccountRegisterOptions(makeAccountActive=' + this.zmi_1 + ', parentJoin=' + this.amj_1 + ')';
  };
  protoOf(AccountRegisterOptions).hashCode = function () {
    var result = getBooleanHashCode(this.zmi_1);
    result = imul(result, 31) + (this.amj_1 == null ? 0 : this.amj_1.hashCode()) | 0;
    return result;
  };
  protoOf(AccountRegisterOptions).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof AccountRegisterOptions))
      return false;
    var tmp0_other_with_cast = other instanceof AccountRegisterOptions ? other : THROW_CCE();
    if (!(this.zmi_1 === tmp0_other_with_cast.zmi_1))
      return false;
    if (!equals(this.amj_1, tmp0_other_with_cast.amj_1))
      return false;
    return true;
  };
  function AdultAccountRequiredException(message, cause) {
    message = message === VOID ? null : message;
    cause = cause === VOID ? null : cause;
    IllegalStateException_init_$Init$(message, cause, this);
    captureStack(this, AdultAccountRequiredException);
  }
  function _get_db__ndbzd9($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.dmj_1;
    db$factory_0();
    return this_0.t2();
  }
  function _get_repo__dd1xjt($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.emj_1;
    repo$factory_0();
    return this_0.t2();
  }
  function $setAuthCOROUTINE$1(_this__u8e3s4, personUid, password, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.nmj_1 = _this__u8e3s4;
    this.omj_1 = personUid;
    this.pmj_1 = password;
  }
  protoOf($setAuthCOROUTINE$1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            suspendResult = doublePbkdf2HashAsBase64(this.nmj_1, this.pmj_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.qmj_1 = suspendResult;
            this.hd_1 = 2;
            var tmp0_elvis_lhs = _get_repo__dd1xjt(this.nmj_1);
            var tmp_0 = (tmp0_elvis_lhs == null ? _get_db__ndbzd9(this.nmj_1) : tmp0_elvis_lhs).n7e();
            var this_0 = new PersonAuth2();
            this_0.yfk_1 = this.omj_1;
            var tmp_1 = this_0;
            tmp_1.zfk_1 = 'PBKDF2x2';
            this_0.afl_1 = this.qmj_1;
            suspendResult = tmp_0.vfk(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function AuthManager(endpoint, di) {
    this.bmj_1 = endpoint;
    this.cmj_1 = di;
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = this.bmj_1;
    var trigger = this.q56();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_0 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var tmp$ret$1 = tmp_0.u56(tmp$ret$0, context);
    var this_0 = On(this, tmp$ret$1, trigger);
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$3 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp.dmj_1 = Instance(this_0, tmp$ret$3, 1).n5c(this, db$factory());
    var tmp_3 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.di.on' call
    var context_0 = this.bmj_1;
    var trigger_0 = this.q56();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_4 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_5 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
    var tmp$ret$5 = isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE();
    var tmp$ret$6 = tmp_4.u56(tmp$ret$5, context_0);
    var this_1 = On(this, tmp$ret$6, trigger_0);
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$8 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    tmp_3.emj_1 = InstanceOrNull(this_1, tmp$ret$8, 2).n5c(this, repo$factory());
  }
  protoOf(AuthManager).n56 = function () {
    return this.cmj_1;
  };
  protoOf(AuthManager).rmj = function (personUid, password, $completion) {
    var tmp = new $setAuthCOROUTINE$1(this, personUid, password, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function db$factory() {
    return getPropertyCallableRef('db', 1, KProperty1, function (receiver) {
      return _get_db__ndbzd9(receiver);
    }, null);
  }
  function repo$factory() {
    return getPropertyCallableRef('repo', 1, KProperty1, function (receiver) {
      return _get_repo__dd1xjt(receiver);
    }, null);
  }
  function db$factory_0() {
    return getPropertyCallableRef('db', 1, KProperty1, function (receiver) {
      return _get_db__ndbzd9(receiver);
    }, null);
  }
  function repo$factory_0() {
    return getPropertyCallableRef('repo', 1, KProperty1, function (receiver) {
      return _get_repo__dd1xjt(receiver);
    }, null);
  }
  function ConsentNotGrantedException(message, cause) {
    message = message === VOID ? null : message;
    cause = cause === VOID ? null : cause;
    IllegalStateException_init_$Init$(message, cause, this);
    captureStack(this, ConsentNotGrantedException);
  }
  function Companion() {
  }
  var Companion_instance_47;
  function Companion_getInstance_16() {
    return Companion_instance_47;
  }
  function $serializer() {
    $serializer_instance = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.account.Endpoint', this, 1);
    tmp0_serialDesc.g4f('url', false);
    this.smj_1 = tmp0_serialDesc;
  }
  protoOf($serializer).d44 = function () {
    return this.smj_1;
  };
  protoOf($serializer).x4f = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance()];
  };
  protoOf($serializer).f44 = function (decoder) {
    var tmp0_desc = this.smj_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.v47(tmp0_desc);
    if (tmp5_input.k48()) {
      tmp4_local0 = tmp5_input.f48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.f48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.w47(tmp0_desc);
    return Endpoint_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer).tmj = function (encoder, value) {
    var tmp0_desc = this.smj_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    tmp1_output.j49(tmp0_desc, 0, value.umj_1);
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer).e44 = function (encoder, value) {
    return this.tmj(encoder, value instanceof Endpoint ? value : THROW_CCE());
  };
  var $serializer_instance;
  function $serializer_getInstance_11() {
    if ($serializer_instance == null)
      new $serializer();
    return $serializer_instance;
  }
  function Endpoint_init_$Init$(seen1, url, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_11().smj_1);
    }
    $this.umj_1 = url;
    return $this;
  }
  function Endpoint_init_$Create$(seen1, url, serializationConstructorMarker) {
    return Endpoint_init_$Init$(seen1, url, serializationConstructorMarker, objectCreate(protoOf(Endpoint)));
  }
  function Endpoint(url) {
    this.umj_1 = url;
  }
  protoOf(Endpoint).toString = function () {
    return 'Endpoint(url=' + this.umj_1 + ')';
  };
  protoOf(Endpoint).hashCode = function () {
    return getStringHashCode(this.umj_1);
  };
  protoOf(Endpoint).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof Endpoint))
      return false;
    var tmp0_other_with_cast = other instanceof Endpoint ? other : THROW_CCE();
    if (!(this.umj_1 === tmp0_other_with_cast.umj_1))
      return false;
    return true;
  };
  function Companion_0() {
    Companion_instance_48 = this;
    this.vmj_1 = new EndpointScope();
  }
  var Companion_instance_48;
  function Companion_getInstance_17() {
    if (Companion_instance_48 == null)
      new Companion_0();
    return Companion_instance_48;
  }
  function EndpointScope() {
    Companion_getInstance_17();
    var tmp = this;
    // Inline function 'kotlin.collections.mutableMapOf' call
    tmp.wmj_1 = LinkedHashMap_init_$Create$();
  }
  protoOf(EndpointScope).xmj = function (context) {
    // Inline function 'kotlin.collections.getOrPut' call
    var this_0 = this.wmj_1;
    var key = context.umj_1;
    var value = this_0.q(key);
    var tmp;
    if (value == null) {
      // Inline function 'com.ustadmobile.core.account.EndpointScope.getRegistry.<anonymous>' call
      var answer = new StandardScopeRegistry();
      this_0.s(key, answer);
      tmp = answer;
    } else {
      tmp = value;
    }
    return tmp;
  };
  protoOf(EndpointScope).u58 = function (context) {
    return this.xmj(context instanceof Endpoint ? context : THROW_CCE());
  };
  function Pbkdf2Params(iterations, keyLength) {
    iterations = iterations === VOID ? 10000 : iterations;
    keyLength = keyLength === VOID ? 512 : keyLength;
    this.ymj_1 = iterations;
    this.zmj_1 = keyLength;
  }
  protoOf(Pbkdf2Params).toString = function () {
    return 'Pbkdf2Params(iterations=' + this.ymj_1 + ', keyLength=' + this.zmj_1 + ')';
  };
  protoOf(Pbkdf2Params).hashCode = function () {
    var result = this.ymj_1;
    result = imul(result, 31) + this.zmj_1 | 0;
    return result;
  };
  protoOf(Pbkdf2Params).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof Pbkdf2Params))
      return false;
    var tmp0_other_with_cast = other instanceof Pbkdf2Params ? other : THROW_CCE();
    if (!(this.ymj_1 === tmp0_other_with_cast.ymj_1))
      return false;
    if (!(this.zmj_1 === tmp0_other_with_cast.zmj_1))
      return false;
    return true;
  };
  function Companion_1() {
  }
  protoOf(Companion_1).a4r = function () {
    return $serializer_getInstance_12();
  };
  var Companion_instance_49;
  function Companion_getInstance_18() {
    return Companion_instance_49;
  }
  function $serializer_0() {
    $serializer_instance_0 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.account.RegisterRequest', this, 5);
    tmp0_serialDesc.g4f('person', false);
    tmp0_serialDesc.g4f('newPassword', false);
    tmp0_serialDesc.g4f('parent', false);
    tmp0_serialDesc.g4f('endpointUrl', false);
    tmp0_serialDesc.g4f('langCode', true);
    this.amk_1 = tmp0_serialDesc;
  }
  protoOf($serializer_0).d44 = function () {
    return this.amk_1;
  };
  protoOf($serializer_0).x4f = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [$serializer_getInstance(), StringSerializer_getInstance(), get_nullable($serializer_getInstance_0()), StringSerializer_getInstance(), StringSerializer_getInstance()];
  };
  protoOf($serializer_0).f44 = function (decoder) {
    var tmp0_desc = this.amk_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_input = decoder.v47(tmp0_desc);
    if (tmp9_input.k48()) {
      tmp4_local0 = tmp9_input.h48(tmp0_desc, 0, $serializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp9_input.f48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp9_input.j48(tmp0_desc, 2, $serializer_getInstance_0(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp9_input.f48(tmp0_desc, 3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp9_input.f48(tmp0_desc, 4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp9_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp9_input.h48(tmp0_desc, 0, $serializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp9_input.f48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp9_input.j48(tmp0_desc, 2, $serializer_getInstance_0(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp9_input.f48(tmp0_desc, 3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp9_input.f48(tmp0_desc, 4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp9_input.w47(tmp0_desc);
    return RegisterRequest_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, null);
  };
  protoOf($serializer_0).bmk = function (encoder, value) {
    var tmp0_desc = this.amk_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    tmp1_output.l49(tmp0_desc, 0, $serializer_getInstance(), value.cmk_1);
    tmp1_output.j49(tmp0_desc, 1, value.dmk_1);
    tmp1_output.n49(tmp0_desc, 2, $serializer_getInstance_0(), value.emk_1);
    tmp1_output.j49(tmp0_desc, 3, value.fmk_1);
    if (tmp1_output.r49(tmp0_desc, 4) ? true : !(value.gmk_1 === 'en')) {
      tmp1_output.j49(tmp0_desc, 4, value.gmk_1);
    }
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_0).e44 = function (encoder, value) {
    return this.bmk(encoder, value instanceof RegisterRequest ? value : THROW_CCE());
  };
  var $serializer_instance_0;
  function $serializer_getInstance_12() {
    if ($serializer_instance_0 == null)
      new $serializer_0();
    return $serializer_instance_0;
  }
  function RegisterRequest_init_$Init$(seen1, person, newPassword, parent, endpointUrl, langCode, serializationConstructorMarker, $this) {
    if (!(15 === (15 & seen1))) {
      throwMissingFieldException(seen1, 15, $serializer_getInstance_12().amk_1);
    }
    $this.cmk_1 = person;
    $this.dmk_1 = newPassword;
    $this.emk_1 = parent;
    $this.fmk_1 = endpointUrl;
    if (0 === (seen1 & 16))
      $this.gmk_1 = 'en';
    else
      $this.gmk_1 = langCode;
    return $this;
  }
  function RegisterRequest_init_$Create$(seen1, person, newPassword, parent, endpointUrl, langCode, serializationConstructorMarker) {
    return RegisterRequest_init_$Init$(seen1, person, newPassword, parent, endpointUrl, langCode, serializationConstructorMarker, objectCreate(protoOf(RegisterRequest)));
  }
  function RegisterRequest(person, newPassword, parent, endpointUrl, langCode) {
    langCode = langCode === VOID ? 'en' : langCode;
    this.cmk_1 = person;
    this.dmk_1 = newPassword;
    this.emk_1 = parent;
    this.fmk_1 = endpointUrl;
    this.gmk_1 = langCode;
  }
  protoOf(RegisterRequest).toString = function () {
    return 'RegisterRequest(person=' + this.cmk_1 + ', newPassword=' + this.dmk_1 + ', parent=' + this.emk_1 + ', endpointUrl=' + this.fmk_1 + ', langCode=' + this.gmk_1 + ')';
  };
  protoOf(RegisterRequest).hashCode = function () {
    var result = this.cmk_1.hashCode();
    result = imul(result, 31) + getStringHashCode(this.dmk_1) | 0;
    result = imul(result, 31) + (this.emk_1 == null ? 0 : this.emk_1.hashCode()) | 0;
    result = imul(result, 31) + getStringHashCode(this.fmk_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.gmk_1) | 0;
    return result;
  };
  protoOf(RegisterRequest).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof RegisterRequest))
      return false;
    var tmp0_other_with_cast = other instanceof RegisterRequest ? other : THROW_CCE();
    if (!this.cmk_1.equals(tmp0_other_with_cast.cmk_1))
      return false;
    if (!(this.dmk_1 === tmp0_other_with_cast.dmk_1))
      return false;
    if (!equals(this.emk_1, tmp0_other_with_cast.emk_1))
      return false;
    if (!(this.fmk_1 === tmp0_other_with_cast.fmk_1))
      return false;
    if (!(this.gmk_1 === tmp0_other_with_cast.gmk_1))
      return false;
    return true;
  };
  function UnauthorizedException(message, cause) {
    message = message === VOID ? null : message;
    cause = cause === VOID ? null : cause;
    IllegalStateException_init_$Init$(message, cause, this);
    captureStack(this, UnauthorizedException);
  }
  function Companion_2() {
  }
  var Companion_instance_50;
  function Companion_getInstance_19() {
    return Companion_instance_50;
  }
  function $serializer_1() {
    $serializer_instance_1 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.account.UserSessionWithPersonAndEndpoint', this, 4);
    tmp0_serialDesc.g4f('userSession', false);
    tmp0_serialDesc.g4f('person', false);
    tmp0_serialDesc.g4f('endpoint', false);
    tmp0_serialDesc.g4f('personPicture', true);
    this.hmk_1 = tmp0_serialDesc;
  }
  protoOf($serializer_1).d44 = function () {
    return this.hmk_1;
  };
  protoOf($serializer_1).x4f = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [$serializer_getInstance_1(), $serializer_getInstance(), $serializer_getInstance_11(), get_nullable($serializer_getInstance_2())];
  };
  protoOf($serializer_1).f44 = function (decoder) {
    var tmp0_desc = this.hmk_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_input = decoder.v47(tmp0_desc);
    if (tmp8_input.k48()) {
      tmp4_local0 = tmp8_input.h48(tmp0_desc, 0, $serializer_getInstance_1(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp8_input.h48(tmp0_desc, 1, $serializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp8_input.h48(tmp0_desc, 2, $serializer_getInstance_11(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp8_input.j48(tmp0_desc, 3, $serializer_getInstance_2(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp8_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp8_input.h48(tmp0_desc, 0, $serializer_getInstance_1(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp8_input.h48(tmp0_desc, 1, $serializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp8_input.h48(tmp0_desc, 2, $serializer_getInstance_11(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp8_input.j48(tmp0_desc, 3, $serializer_getInstance_2(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp8_input.w47(tmp0_desc);
    return UserSessionWithPersonAndEndpoint_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
  };
  protoOf($serializer_1).imk = function (encoder, value) {
    var tmp0_desc = this.hmk_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    tmp1_output.l49(tmp0_desc, 0, $serializer_getInstance_1(), value.jmk_1);
    tmp1_output.l49(tmp0_desc, 1, $serializer_getInstance(), value.kmk_1);
    tmp1_output.l49(tmp0_desc, 2, $serializer_getInstance_11(), value.lmk_1);
    if (tmp1_output.r49(tmp0_desc, 3) ? true : !(value.mmk_1 == null)) {
      tmp1_output.n49(tmp0_desc, 3, $serializer_getInstance_2(), value.mmk_1);
    }
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_1).e44 = function (encoder, value) {
    return this.imk(encoder, value instanceof UserSessionWithPersonAndEndpoint ? value : THROW_CCE());
  };
  var $serializer_instance_1;
  function $serializer_getInstance_13() {
    if ($serializer_instance_1 == null)
      new $serializer_1();
    return $serializer_instance_1;
  }
  function UserSessionWithPersonAndEndpoint_init_$Init$(seen1, userSession, person, endpoint, personPicture, serializationConstructorMarker, $this) {
    if (!(7 === (7 & seen1))) {
      throwMissingFieldException(seen1, 7, $serializer_getInstance_13().hmk_1);
    }
    $this.jmk_1 = userSession;
    $this.kmk_1 = person;
    $this.lmk_1 = endpoint;
    if (0 === (seen1 & 8))
      $this.mmk_1 = null;
    else
      $this.mmk_1 = personPicture;
    return $this;
  }
  function UserSessionWithPersonAndEndpoint_init_$Create$(seen1, userSession, person, endpoint, personPicture, serializationConstructorMarker) {
    return UserSessionWithPersonAndEndpoint_init_$Init$(seen1, userSession, person, endpoint, personPicture, serializationConstructorMarker, objectCreate(protoOf(UserSessionWithPersonAndEndpoint)));
  }
  function UserSessionWithPersonAndEndpoint(userSession, person, endpoint, personPicture) {
    personPicture = personPicture === VOID ? null : personPicture;
    this.jmk_1 = userSession;
    this.kmk_1 = person;
    this.lmk_1 = endpoint;
    this.mmk_1 = personPicture;
  }
  protoOf(UserSessionWithPersonAndEndpoint).nmk = function () {
    var displayUrl = removeSuffix(removePrefix(removePrefix(this.lmk_1.umj_1, 'http://'), 'https://'), '/');
    return '' + this.kmk_1.g95_1 + '@' + displayUrl;
  };
  protoOf(UserSessionWithPersonAndEndpoint).omk = function () {
    return toUmAccount(this.kmk_1, this.lmk_1.umj_1);
  };
  protoOf(UserSessionWithPersonAndEndpoint).pmk = function () {
    var tmp0_elvis_lhs = this.kmk_1.g95_1;
    return new XapiAgent(VOID, VOID, VOID, VOID, VOID, new XapiAccount(this.lmk_1.umj_1, tmp0_elvis_lhs == null ? 'anonymous' : tmp0_elvis_lhs));
  };
  protoOf(UserSessionWithPersonAndEndpoint).qmk = function (userSession, person, endpoint, personPicture) {
    return new UserSessionWithPersonAndEndpoint(userSession, person, endpoint, personPicture);
  };
  protoOf(UserSessionWithPersonAndEndpoint).rmk = function (userSession, person, endpoint, personPicture, $super) {
    userSession = userSession === VOID ? this.jmk_1 : userSession;
    person = person === VOID ? this.kmk_1 : person;
    endpoint = endpoint === VOID ? this.lmk_1 : endpoint;
    personPicture = personPicture === VOID ? this.mmk_1 : personPicture;
    return $super === VOID ? this.qmk(userSession, person, endpoint, personPicture) : $super.qmk.call(this, userSession, person, endpoint, personPicture);
  };
  protoOf(UserSessionWithPersonAndEndpoint).toString = function () {
    return 'UserSessionWithPersonAndEndpoint(userSession=' + this.jmk_1 + ', person=' + this.kmk_1 + ', endpoint=' + this.lmk_1 + ', personPicture=' + this.mmk_1 + ')';
  };
  protoOf(UserSessionWithPersonAndEndpoint).hashCode = function () {
    var result = hashCode(this.jmk_1);
    result = imul(result, 31) + this.kmk_1.hashCode() | 0;
    result = imul(result, 31) + this.lmk_1.hashCode() | 0;
    result = imul(result, 31) + (this.mmk_1 == null ? 0 : this.mmk_1.hashCode()) | 0;
    return result;
  };
  protoOf(UserSessionWithPersonAndEndpoint).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof UserSessionWithPersonAndEndpoint))
      return false;
    var tmp0_other_with_cast = other instanceof UserSessionWithPersonAndEndpoint ? other : THROW_CCE();
    if (!equals(this.jmk_1, tmp0_other_with_cast.jmk_1))
      return false;
    if (!this.kmk_1.equals(tmp0_other_with_cast.kmk_1))
      return false;
    if (!this.lmk_1.equals(tmp0_other_with_cast.lmk_1))
      return false;
    if (!equals(this.mmk_1, tmp0_other_with_cast.mmk_1))
      return false;
    return true;
  };
  function UstadAccountManager$slambda$slambda$slambda$slambda$slambda$lambda(a, b) {
    // Inline function 'kotlin.comparisons.compareValuesBy' call
    // Inline function 'com.ustadmobile.core.account.UstadAccountManager.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
    var tmp = a.nmk();
    // Inline function 'com.ustadmobile.core.account.UstadAccountManager.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
    var tmp$ret$1 = b.nmk();
    return compareValues(tmp, tmp$ret$1);
  }
  function UstadAccountManager$slambda$slambda$slambda$slambda$slambda(this$0, $endpoint, resultContinuation) {
    this.aml_1 = this$0;
    this.bml_1 = $endpoint;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda$slambda).dml = function (endpointSessions, $completion) {
    var tmp = this.eml(endpointSessions, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.dml((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.aml_1.jml_1;
            while (true) {
              var prevValue = this_0.t2();
              var destination = ArrayList_init_$Create$();
              var tmp0_iterator = prevValue.w();
              while (tmp0_iterator.f()) {
                var element = tmp0_iterator.e();
                if (!element.lmk_1.equals(this.bml_1)) {
                  destination.i1(element);
                }
              }
              var this_1 = this.cml_1;
              var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
              var tmp0_iterator_0 = this_1.w();
              while (tmp0_iterator_0.f()) {
                var item = tmp0_iterator_0.e();
                var tmp0_elvis_lhs = item.ghw_1;
                var tmp_0 = tmp0_elvis_lhs == null ? new UserSession() : tmp0_elvis_lhs;
                var tmp1_elvis_lhs = item.ehw_1;
                destination_0.i1(new UserSessionWithPersonAndEndpoint(tmp_0, tmp1_elvis_lhs == null ? new Person() : tmp1_elvis_lhs, this.bml_1, item.fhw_1));
              }
              var tmp_1 = UstadAccountManager$slambda$slambda$slambda$slambda$slambda$lambda;
              var nextValue = plus(destination, sortedWith(destination_0, new sam$kotlin_Comparator$0(tmp_1)));
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda$slambda).eml = function (endpointSessions, completion) {
    var i = new UstadAccountManager$slambda$slambda$slambda$slambda$slambda(this.aml_1, this.bml_1, completion);
    i.cml_1 = endpointSessions;
    return i;
  };
  function UstadAccountManager$slambda$slambda$slambda$slambda$slambda_0(this$0, $endpoint, resultContinuation) {
    var i = new UstadAccountManager$slambda$slambda$slambda$slambda$slambda(this$0, $endpoint, resultContinuation);
    var l = function (endpointSessions, $completion) {
      return i.dml(endpointSessions, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$slambda$slambda$slambda$slambda(this$0, $endpoint, resultContinuation) {
    this.xml_1 = this$0;
    this.yml_1 = $endpoint;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var this_0 = this.xml_1.gml_1;
            var context = this.yml_1;
            var trigger = this_0.q56();
            var tmp_1 = Companion_instance_0;
            var tmp_2 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
            var tmp_3 = get_direct(On(this_0, tmp_1.u56(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), context), trigger)).s57();
            var tmp_4 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
            tmp_0.amm_1 = tmp_3.q57(isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), 1);
            this.hd_1 = 1;
            var tmp_5 = this.amm_1.o7e().zhu();
            var tmp_6 = UstadAccountManager$slambda$slambda$slambda$slambda$slambda_0(this.xml_1, this.yml_1, null);
            suspendResult = tmp_5.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0(tmp_6), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new UstadAccountManager$slambda$slambda$slambda$slambda(this.xml_1, this.yml_1, completion);
    i.zml_1 = $this$launch;
    return i;
  };
  function UstadAccountManager$slambda$slambda$slambda$slambda_0(this$0, $endpoint, resultContinuation) {
    var i = new UstadAccountManager$slambda$slambda$slambda$slambda(this$0, $endpoint, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$slambda$slambda$slambda(this$0, resultContinuation) {
    this.jmm_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$slambda$slambda$slambda).lmm = function (endpointsWithSessions, $completion) {
    var tmp = this.mmm(endpointsWithSessions, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.lmm((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp0_iterator = this.kmm_1.w();
          while (tmp0_iterator.f()) {
            var element = tmp0_iterator.e();
            launch(this.jmm_1.oml_1, VOID, VOID, UstadAccountManager$slambda$slambda$slambda$slambda_0(this.jmm_1, element, null));
          }
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda).mmm = function (endpointsWithSessions, completion) {
    var i = new UstadAccountManager$slambda$slambda$slambda(this.jmm_1, completion);
    i.kmm_1 = endpointsWithSessions;
    return i;
  };
  function UstadAccountManager$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new UstadAccountManager$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (endpointsWithSessions, $completion) {
      return i.lmm(endpointsWithSessions, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$slambda$slambda(this$0, resultContinuation) {
    this.vmm_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$slambda$slambda).m86 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$slambda$slambda).z77 = function ($completion) {
    return this.m86($completion);
  };
  protoOf(UstadAccountManager$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = collectLatest(this.vmm_1.iml_1, UstadAccountManager$slambda$slambda$slambda_0(this.vmm_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(UstadAccountManager$slambda$slambda).y77 = function (completion) {
    return new UstadAccountManager$slambda$slambda(this.vmm_1, completion);
  };
  function UstadAccountManager$slambda$slambda_0(this$0, resultContinuation) {
    var i = new UstadAccountManager$slambda$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.m86($completion);
    };
    l.$arity = 0;
    return l;
  }
  function UstadAccountManager$slambda$slambda$slambda$slambda$lambda($personAndPictureFromDb) {
    return function ($this$shallowCopy) {
      var tmp = $this$shallowCopy;
      var tmp0_safe_receiver = $personAndPictureFromDb;
      var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ofo_1;
      tmp.h95_1 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.h95_1;
      var tmp_0 = $this$shallowCopy;
      var tmp2_safe_receiver = $personAndPictureFromDb;
      var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.ofo_1;
      tmp_0.i95_1 = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.i95_1;
      return Unit_instance;
    };
  }
  function UstadAccountManager$slambda$slambda$slambda$slambda_1($session, this$0, resultContinuation) {
    this.emn_1 = $session;
    this.fmn_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda_1).hmn = function (personAndPictureFromDb, $completion) {
    var tmp = this.imn(personAndPictureFromDb, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.hmn((p1 == null ? true : p1 instanceof PersonAndPicture) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp0_safe_receiver = this.gmn_1;
          var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ofo_1;
          var nameChanged = !((tmp1_safe_receiver == null ? null : tmp1_safe_receiver.xjm()) === this.emn_1.kmk_1.xjm());
          var tmp2_safe_receiver = this.gmn_1;
          var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.pfo_1;
          var tmp_0 = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.g96_1;
          var tmp4_safe_receiver = this.emn_1.mmk_1;
          var pictureUriChanged = !(tmp_0 == (tmp4_safe_receiver == null ? null : tmp4_safe_receiver.g96_1));
          if (nameChanged ? true : pictureUriChanged) {
            var tmp_1;
            if (nameChanged) {
              tmp_1 = shallowCopy(this.emn_1.kmk_1, UstadAccountManager$slambda$slambda$slambda$slambda$lambda(this.gmn_1));
            } else {
              tmp_1 = this.emn_1.kmk_1;
            }
            var tmp_2 = tmp_1;
            var tmp_3;
            if (pictureUriChanged) {
              var tmp5_safe_receiver = this.gmn_1;
              tmp_3 = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.pfo_1;
            } else {
              tmp_3 = this.emn_1.mmk_1;
            }
            this.fmn_1.jmn(this.emn_1.rmk(VOID, tmp_2, VOID, tmp_3));
          }
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda$slambda_1).imn = function (personAndPictureFromDb, completion) {
    var i = new UstadAccountManager$slambda$slambda$slambda$slambda_1(this.emn_1, this.fmn_1, completion);
    i.gmn_1 = personAndPictureFromDb;
    return i;
  };
  function UstadAccountManager$slambda$slambda$slambda$slambda_2($session, this$0, resultContinuation) {
    var i = new UstadAccountManager$slambda$slambda$slambda$slambda_1($session, this$0, resultContinuation);
    var l = function (personAndPictureFromDb, $completion) {
      return i.hmn(personAndPictureFromDb, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.smn_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$slambda$slambda$slambda_1).vmn = function (session, $completion) {
    var tmp = this.wmn(session, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.vmn(p1 instanceof UserSessionWithPersonAndEndpoint ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var this_0 = this.smn_1.gml_1;
            var context = this.tmn_1.lmk_1;
            var trigger = this_0.q56();
            var tmp_1 = Companion_instance_0;
            var tmp_2 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
            var tmp_3 = get_direct(On(this_0, tmp_1.u56(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), context), trigger)).s57();
            var tmp_4 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
            tmp_0.umn_1 = tmp_3.q57(isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), 1);
            this.hd_1 = 1;
            var tmp_5 = this.umn_1.a7d().dc6(this.tmn_1.jmk_1.whv_1);
            var tmp_6 = UstadAccountManager$slambda$slambda$slambda$slambda_2(this.tmn_1, this.smn_1, null);
            suspendResult = tmp_5.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0(tmp_6), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(UstadAccountManager$slambda$slambda$slambda_1).wmn = function (session, completion) {
    var i = new UstadAccountManager$slambda$slambda$slambda_1(this.smn_1, completion);
    i.tmn_1 = session;
    return i;
  };
  function UstadAccountManager$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new UstadAccountManager$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (session, $completion) {
      return i.vmn(session, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$slambda$slambda_1(this$0, resultContinuation) {
    this.fmo_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$slambda$slambda_1).m86 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$slambda$slambda_1).z77 = function ($completion) {
    return this.m86($completion);
  };
  protoOf(UstadAccountManager$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = collectLatest(this.fmo_1.hml_1, UstadAccountManager$slambda$slambda$slambda_2(this.fmo_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(UstadAccountManager$slambda$slambda_1).y77 = function (completion) {
    return new UstadAccountManager$slambda$slambda_1(this.fmo_1, completion);
  };
  function UstadAccountManager$slambda$slambda_2(this$0, resultContinuation) {
    var i = new UstadAccountManager$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($completion) {
      return i.m86($completion);
    };
    l.$arity = 0;
    return l;
  }
  function invoke$lambda($repo$delegate) {
    // Inline function 'kotlin.getValue' call
    getLocalDelegateReference('repo', KProperty0, false, function () {
      return THROW_ISE();
    });
    return $repo$delegate.t2();
  }
  function UstadAccountManager$register$slambda$slambda(this$0, resultContinuation) {
    this.omo_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$register$slambda$slambda).smo = function (response, $completion) {
    var tmp = this.p3h(response, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$register$slambda$slambda).he = function (p1, $completion) {
    return this.smo(p1 instanceof HttpResponse ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$register$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            if (this.pmo_1.w3a().s2z_1 === 200) {
              var tmp_0 = this;
              tmp_0.rmo_1 = _get_json__d8whur(this.omo_1);
              this.hd_1 = 1;
              suspendResult = bodyAsText(this.pmo_1, VOID, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_1 = this;
              tmp_1.qmo_1 = new Pair(null, this.pmo_1.w3a().s2z_1);
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            var string = suspendResult;
            var this_0 = this.rmo_1.g45();
            var this_1 = serializer(this_0, createKType(getKClass(Person), arrayOf([]), false));
            var ARGUMENT = this.rmo_1.f45(isInterface(this_1, KSerializer) ? this_1 : THROW_CCE(), string);
            this.qmo_1 = new Pair(ARGUMENT, 200);
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.qmo_1;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(UstadAccountManager$register$slambda$slambda).p3h = function (response, completion) {
    var i = new UstadAccountManager$register$slambda$slambda(this.omo_1, completion);
    i.pmo_1 = response;
    return i;
  };
  function UstadAccountManager$register$slambda$slambda_0(this$0, resultContinuation) {
    var i = new UstadAccountManager$register$slambda$slambda(this$0, resultContinuation);
    var l = function (response, $completion) {
      return i.smo(response, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$register$slambda$slambda_1($db, $registeredPerson, resultContinuation) {
    this.bmp_1 = $db;
    this.cmp_1 = $registeredPerson;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$register$slambda$slambda_1).fmp = function (it, $completion) {
    var tmp = this.gmp(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$register$slambda$slambda_1).he = function (p1, $completion) {
    return this.fmp(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$register$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = this.bmp_1.a7d().sfn(this.cmp_1.f95_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.emp_1 = suspendResult;
            if (this.emp_1 == null) {
              this.hd_1 = 2;
              suspendResult = this.bmp_1.a7d().insertAsync(this.cmp_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(UstadAccountManager$register$slambda$slambda_1).gmp = function (it, completion) {
    var i = new UstadAccountManager$register$slambda$slambda_1(this.bmp_1, this.cmp_1, completion);
    i.dmp_1 = it;
    return i;
  };
  function UstadAccountManager$register$slambda$slambda_2($db, $registeredPerson, resultContinuation) {
    var i = new UstadAccountManager$register$slambda$slambda_1($db, $registeredPerson, resultContinuation);
    var l = function (it, $completion) {
      return i.fmp(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function invoke$lambda_0($repo$delegate) {
    // Inline function 'kotlin.getValue' call
    getLocalDelegateReference('repo', KProperty0, false, function () {
      return THROW_ISE();
    });
    return $repo$delegate.t2();
  }
  function _get_httpClient__2ty1zc($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.kml_1;
    httpClient$factory_0();
    return this_0.t2();
  }
  function _get_json__d8whur($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.lml_1;
    json$factory_0();
    return this_0.t2();
  }
  function _get_apiUrlConfig__mldllg($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.mml_1;
    apiUrlConfig$factory_0();
    return this_0.t2();
  }
  function makeNewTempGuestSession($this, endpointUrl, currentDb) {
    // Inline function 'kotlin.also' call
    // Inline function 'kotlin.apply' call
    var this_0 = new UserSession();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.account.UstadAccountManager.makeNewTempGuestSession.<anonymous>' call
    var tmp = this_0;
    var tmp_0 = get_doorPrimaryKeyManager(currentDb);
    tmp.rhv_1 = tmp_0.a62(679);
    this_0.xhv_1 = get_doorWrapperNodeId(currentDb);
    this_0.yhv_1 = systemTimeInMillis();
    var tmp_1 = this_0;
    tmp_1.dhw_1 = 8 | 4;
    var tmp_2 = this_0;
    tmp_2.ahw_1 = 1;
    var this_1 = new UserSessionWithPersonAndEndpoint(this_0, Companion_getInstance_20().hmp_1, new Endpoint(endpointUrl));
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.account.UstadAccountManager.makeNewTempGuestSession.<anonymous>' call
    launch($this.oml_1, VOID, VOID, UstadAccountManager$makeNewTempGuestSession$slambda_0(currentDb, this_1, null));
    return this_1;
  }
  function assertNotClosed($this) {
    if ($this.nml_1.kotlinx$atomicfu$value)
      throw IllegalStateException_init_$Create$('UstadAccountManager is closed');
  }
  function addActiveEndpoint($this, endpoint, commit, $completion) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = $this.iml_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.account.UstadAccountManager.addActiveEndpoint.<anonymous>' call
        var nextValue = plus(prevValue, listOf_0(endpoint));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    if (commit) {
      commitActiveEndpointsToPref($this);
    }
    return Unit_instance;
  }
  function removeActiveEndpoint($this, endpoint, commit) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = $this.iml_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.account.UstadAccountManager.removeActiveEndpoint.<anonymous>' call
        // Inline function 'kotlin.collections.filter' call
        // Inline function 'kotlin.collections.filterTo' call
        var destination = ArrayList_init_$Create$();
        var tmp0_iterator = prevValue.w();
        while (tmp0_iterator.f()) {
          var element = tmp0_iterator.e();
          // Inline function 'com.ustadmobile.core.account.UstadAccountManager.removeActiveEndpoint.<anonymous>.<anonymous>' call
          if (!element.equals(endpoint)) {
            destination.i1(element);
          }
        }
        var nextValue = destination;
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    if (commit) {
      commitActiveEndpointsToPref($this);
    }
  }
  function removeActiveEndpoint$default($this, endpoint, commit, $super) {
    commit = commit === VOID ? true : commit;
    return removeActiveEndpoint($this, endpoint, commit);
  }
  function commitActiveEndpointsToPref($this) {
    var tmp = Default_getInstance();
    var tmp_0 = ListSerializer(serializer_0(StringCompanionObject_instance));
    // Inline function 'kotlin.collections.map' call
    var this_0 = toSet($this.iml_1.t2());
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.account.UstadAccountManager.commitActiveEndpointsToPref.<anonymous>' call
      var tmp$ret$0 = item.umj_1;
      destination.i1(tmp$ret$0);
    }
    var json = tmp.e45(tmp_0, toList(destination));
    // Inline function 'com.russhwolf.settings.set' call
    var this_1 = $this.fml_1;
    var key = 'accountmgr.endpointswithsessions';
    this_1.sl1(key, json);
  }
  function getSiteFromDbOrLoadFromHttp($this, repo, $completion) {
    var tmp = new $getSiteFromDbOrLoadFromHttpCOROUTINE$7($this, repo, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function Companion_3() {
    Companion_instance_51 = this;
    var tmp = this;
    // Inline function 'kotlin.apply' call
    var this_0 = new Person();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.account.Companion.GUEST_PERSON.<anonymous>' call
    this_0.f95_1 = new Long(0, 0);
    this_0.h95_1 = 'Guest';
    this_0.i95_1 = 'User';
    tmp.hmp_1 = this_0;
    this.imp_1 = 'accountmgr.activesession';
    this.jmp_1 = 'accountmgr.activeendpoint';
    this.kmp_1 = 'accountmgr.endpointswithsessions';
    this.lmp_1 = 'http://localhost/';
    this.mmp_1 = 'com.ustadmobile';
    this.nmp_1 = 'com.ustadmobile.AUTH_GET_TOKEN';
  }
  var Companion_instance_51;
  function Companion_getInstance_20() {
    if (Companion_instance_51 == null)
      new Companion_3();
    return Companion_instance_51;
  }
  function sam$kotlin_Comparator$0(function_0) {
    this.amq_1 = function_0;
  }
  protoOf(sam$kotlin_Comparator$0).pa = function (a, b) {
    return this.amq_1(a, b);
  };
  protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {
    return this.pa(a, b);
  };
  function sam$kotlinx_coroutines_flow_FlowCollector$0(function_0) {
    this.bmq_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0).t1d = function (value, $completion) {
    return this.bmq_1(value, $completion);
  };
  function sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0(function_0) {
    this.cmq_1 = function_0;
  }
  protoOf(sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0).dmq = function (endpointUrl) {
    return this.cmq_1(endpointUrl);
  };
  function sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_0(function_0) {
    this.emq_1 = function_0;
  }
  protoOf(sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_0).dmq = function (endpointUrl) {
    return this.emq_1(endpointUrl);
  };
  function startGuestSession$lambda($repo$delegate) {
    // Inline function 'kotlin.getValue' call
    getLocalDelegateReference('repo', KProperty0, false, function () {
      return THROW_ISE();
    });
    return $repo$delegate.t2();
  }
  function UstadAccountManager$slambda(this$0, resultContinuation) {
    this.nmq_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.nmq_1.jml_1, UstadAccountManager$slambda$slambda_0(this.nmq_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(UstadAccountManager$slambda).v1m = function ($this$launch, completion) {
    var i = new UstadAccountManager$slambda(this.nmq_1, completion);
    i.omq_1 = $this$launch;
    return i;
  };
  function UstadAccountManager$slambda_0(this$0, resultContinuation) {
    var i = new UstadAccountManager$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$slambda_1(this$0, resultContinuation) {
    this.xmq_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.xmq_1.hml_1, UstadAccountManager$slambda$slambda_2(this.xmq_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(UstadAccountManager$slambda_1).v1m = function ($this$launch, completion) {
    var i = new UstadAccountManager$slambda_1(this.xmq_1, completion);
    i.ymq_1 = $this$launch;
    return i;
  };
  function UstadAccountManager$slambda_2(this$0, resultContinuation) {
    var i = new UstadAccountManager$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$makeNewTempGuestSession$slambda($currentDb, $it, resultContinuation) {
    this.hmr_1 = $currentDb;
    this.imr_1 = $it;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$makeNewTempGuestSession$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$makeNewTempGuestSession$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$makeNewTempGuestSession$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.hmr_1.o7e().yhu(this.imr_1.jmk_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(UstadAccountManager$makeNewTempGuestSession$slambda).v1m = function ($this$launch, completion) {
    var i = new UstadAccountManager$makeNewTempGuestSession$slambda(this.hmr_1, this.imr_1, completion);
    i.jmr_1 = $this$launch;
    return i;
  };
  function UstadAccountManager$makeNewTempGuestSession$slambda_0($currentDb, $it, resultContinuation) {
    var i = new UstadAccountManager$makeNewTempGuestSession$slambda($currentDb, $it, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$activeSessionCount$lambda(it) {
    return true;
  }
  function UstadAccountManager$register$slambda(this$0, $endpointUrl, $accountRegisterOptions, $person, $password, resultContinuation) {
    this.smr_1 = this$0;
    this.tmr_1 = $endpointUrl;
    this.umr_1 = $accountRegisterOptions;
    this.vmr_1 = $person;
    this.wmr_1 = $password;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$register$slambda).ims = function ($this$withContext, $completion) {
    var tmp = this.v1m($this$withContext, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$register$slambda).he = function (p1, $completion) {
    return this.ims((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$register$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 6;
            assertNotClosed(this.smr_1);
            this.ymr_1 = new Endpoint(this.tmr_1);
            this.zmr_1 = this.umr_1.amj_1;
            var tmp_0 = this;
            var this_0 = _get_httpClient__2ty1zc(this.smr_1);
            var this_1 = new HttpRequestBuilder();
            url(this_1, removeSuffix(this.tmr_1, '/') + '/auth/register');
            contentType(this_1, Application_getInstance().i2r_1);
            setBodyJson(this_1, _get_json__d8whur(this.smr_1), Companion_instance_49.a4r(), new RegisterRequest(this.vmr_1, this.wmr_1, this.zmr_1, this.tmr_1));
            this_1.j38_1 = Companion_getInstance().z2w_1;
            tmp_0.ams_1 = new HttpStatement(this_1, this_0);
            this.hd_1 = 1;
            suspendResult = this.ams_1.t3y(UstadAccountManager$register$slambda$slambda_0(this.smr_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.bms_1 = suspendResult;
            this.cms_1 = this.bms_1.y6();
            this.dms_1 = this.bms_1.z6();
            if (this.dms_1 === 200 ? !(this.cms_1 == null) : false) {
              var tmp_1 = this;
              var this_2 = this.smr_1.gml_1;
              var context = this.ymr_1;
              var trigger = this_2.q56();
              var tmp_2 = Companion_instance_0;
              var tmp_3 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
              var this_3 = On(this_2, tmp_2.u56(isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE(), context), trigger);
              var tmp_4 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
              tmp_1.fms_1 = Instance(this_3, isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), 2).n5c(null, getLocalDelegateReference('repo', KProperty0, false, function () {
                return THROW_ISE();
              }));
              this.hd_1 = 2;
              suspendResult = getSiteFromDbOrLoadFromHttp(this.smr_1, invoke$lambda(this.fms_1), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              if (this.dms_1 === 409) {
                var tmp_5 = this;
                throw IllegalStateException_init_$Create$('Conflict: username already taken');
              } else {
                var tmp_6 = this;
                throw Exception_init_$Create$('register request: non-OK status code: ' + this.dms_1);
              }
            }

          case 2:
            this.hd_1 = 3;
            suspendResult = this.smr_1.jms(this.cms_1, this.tmr_1, this.wmr_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.gms_1 = suspendResult;
            var tmp_7 = this;
            var this_4 = this.smr_1.gml_1;
            var context_0 = this.ymr_1;
            var trigger_0 = this_4.q56();
            var tmp_8 = Companion_instance_0;
            var tmp_9 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
            var tmp_10 = get_direct(On(this_4, tmp_8.u56(isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE(), context_0), trigger_0)).s57();
            var tmp_11 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
            tmp_7.hms_1 = tmp_10.q57(isInterface(tmp_11, TypeToken) ? tmp_11 : THROW_CCE(), 1);
            this.hd_1 = 4;
            suspendResult = withDoorTransactionAsync(this.hms_1, VOID, UstadAccountManager$register$slambda$slambda_2(this.hms_1, this.cms_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            if (this.umr_1.zmi_1) {
              this.smr_1.jmn(this.gms_1);
            }

            this.ems_1 = this.cms_1;
            this.hd_1 = 5;
            continue $sm;
          case 5:
            return this.ems_1;
          case 6:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 6) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(UstadAccountManager$register$slambda).v1m = function ($this$withContext, completion) {
    var i = new UstadAccountManager$register$slambda(this.smr_1, this.tmr_1, this.umr_1, this.vmr_1, this.wmr_1, completion);
    i.xmr_1 = $this$withContext;
    return i;
  };
  function UstadAccountManager$register$slambda_0(this$0, $endpointUrl, $accountRegisterOptions, $person, $password, resultContinuation) {
    var i = new UstadAccountManager$register$slambda(this$0, $endpointUrl, $accountRegisterOptions, $person, $password, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.ims($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$addSession$slambda(this$0, $endpoint, $person, $password, $authManager, $endpointRepo, $endpointDb, resultContinuation) {
    this.sms_1 = this$0;
    this.tms_1 = $endpoint;
    this.ums_1 = $person;
    this.vms_1 = $password;
    this.wms_1 = $authManager;
    this.xms_1 = $endpointRepo;
    this.yms_1 = $endpointDb;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$addSession$slambda).lmt = function (it, $completion) {
    var tmp = this.gmp(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$addSession$slambda).he = function (p1, $completion) {
    return this.lmt(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$addSession$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            var tmp_0 = this;
            var this_0 = this.sms_1.gml_1;
            var context = this.tms_1;
            var trigger = this_0.q56();
            var tmp_1 = Companion_instance_0;
            var tmp_2 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
            var tmp_3 = get_direct(On(this_0, tmp_1.u56(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), context), trigger)).s57();
            var tmp_4 = typeToken(createKType(getKClass(NodeIdAndAuth), arrayOf([]), false));
            tmp_0.amt_1 = tmp_3.q57(isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), null).d64_1;
            var tmp_5 = this;
            tmp_5.bmt_1 = new UserSession();
            var tmp_6 = this;
            tmp_6.cmt_1 = this.bmt_1;
            this.cmt_1.xhv_1 = this.amt_1;
            this.cmt_1.whv_1 = this.ums_1.f95_1;
            this.cmt_1.yhv_1 = systemTimeInMillis();
            var tmp_7 = this.cmt_1;
            tmp_7.dhw_1 = 1;
            var tmp_8 = this.cmt_1;
            tmp_8.ahw_1 = 1;
            this.dmt_1 = this.vms_1;
            if (this.dmt_1 == null) {
              this.emt_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              var tmp_9 = this;
              tmp_9.fmt_1 = this.dmt_1;
              var tmp_10 = this;
              tmp_10.gmt_1 = this.fmt_1;
              this.hd_1 = 1;
              suspendResult = encryptPbkdf2(this.wms_1, this.gmt_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.hmt_1 = suspendResult;
            this.emt_1 = toHexString(this.hmt_1);
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.imt_1 = this.emt_1;
            this.cmt_1.chw_1 = this.imt_1;
            this.hd_1 = 3;
            suspendResult = this.xms_1.o7e().yhu(this.cmt_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.jmt_1 = suspendResult;
            this.cmt_1.rhv_1 = this.jmt_1;
            this.kmt_1 = this.bmt_1;
            this.hd_1 = 4;
            suspendResult = this.yms_1.s7d().ugg(this.ums_1.f95_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            var personPicture = suspendResult;
            return to(this.kmt_1, personPicture);
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(UstadAccountManager$addSession$slambda).gmp = function (it, completion) {
    var i = new UstadAccountManager$addSession$slambda(this.sms_1, this.tms_1, this.ums_1, this.vms_1, this.wms_1, this.xms_1, this.yms_1, completion);
    i.zms_1 = it;
    return i;
  };
  function UstadAccountManager$addSession$slambda_0(this$0, $endpoint, $person, $password, $authManager, $endpointRepo, $endpointDb, resultContinuation) {
    var i = new UstadAccountManager$addSession$slambda(this$0, $endpoint, $person, $password, $authManager, $endpointRepo, $endpointDb, resultContinuation);
    var l = function (it, $completion) {
      return i.lmt(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadAccountManager$endSession$lambda($session) {
    return function (it) {
      return it === $session.lmk_1.umj_1;
    };
  }
  function UstadAccountManager$login$slambda(this$0, $endpointUrl, $username, $password, $maxDateOfBirth, $dontSetCurrentSession, resultContinuation) {
    this.umt_1 = this$0;
    this.vmt_1 = $endpointUrl;
    this.wmt_1 = $username;
    this.xmt_1 = $password;
    this.ymt_1 = $maxDateOfBirth;
    this.zmt_1 = $dontSetCurrentSession;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadAccountManager$login$slambda).qmu = function ($this$withContext, $completion) {
    var tmp = this.v1m($this$withContext, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager$login$slambda).he = function (p1, $completion) {
    return this.qmu((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadAccountManager$login$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 6;
            assertNotClosed(this.umt_1);
            var tmp_0 = this;
            var this_0 = this.umt_1.gml_1;
            var context = new Endpoint(this.vmt_1);
            var trigger = this_0.q56();
            var tmp_1 = Companion_instance_0;
            var tmp_2 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
            var this_1 = On(this_0, tmp_1.u56(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), context), trigger);
            var tmp_3 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
            tmp_0.bmu_1 = Instance(this_1, isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE(), 2).n5c(null, getLocalDelegateReference('repo', KProperty0, false, function () {
              return THROW_ISE();
            }));
            var tmp_4 = this;
            var this_2 = this.umt_1.gml_1;
            var context_0 = new Endpoint(this.vmt_1);
            var trigger_0 = this_2.q56();
            var tmp_5 = Companion_instance_0;
            var tmp_6 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
            var this_3 = On(this_2, tmp_5.u56(isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE(), context_0), trigger_0);
            var tmp_7 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
            tmp_4.cmu_1 = Instance(this_3, isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE(), 1).n5c(null, getLocalDelegateReference('db', KProperty0, false, function () {
              return THROW_ISE();
            }));
            var tmp_8 = this;
            var tmp_9 = invoke$lambda_0(this.bmu_1);
            var tmp0_safe_receiver = isInterface(tmp_9, DoorDatabaseRepository) ? tmp_9 : null;
            var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.w38();
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.i65_1;
            var tmp_10;
            if (tmp2_elvis_lhs == null) {
              throw IllegalStateException_init_$Create$('Could not open repo for endpoint ' + this.vmt_1);
            } else {
              tmp_10 = tmp2_elvis_lhs;
            }

            tmp_8.dmu_1 = tmp_10;
            var tmp_11 = this;
            tmp_11.emu_1 = _get_httpClient__2ty1zc(this.umt_1);
            var tmp_12 = this;
            tmp_12.fmu_1 = this.emu_1;
            var tmp_13 = this;
            var this_4 = new HttpRequestBuilder();
            url(this_4, removeSuffix(this.vmt_1, '/') + '/auth/login');
            parameter(this_4, 'username', this.wmt_1);
            parameter(this_4, 'password', this.xmt_1);
            parameter(this_4, 'maxDateOfBirth', this.ymt_1);
            header(this_4, 'X-nid', this.dmu_1);
            set_expectSuccess(this_4, false);
            tmp_13.gmu_1 = this_4;
            this.gmu_1.j38_1 = Companion_getInstance().z2w_1;
            var tmp_14 = this;
            tmp_14.hmu_1 = this.fmu_1;
            var tmp_15 = this;
            tmp_15.imu_1 = this.gmu_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.imu_1, this.hmu_1)).u3y(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.jmu_1 = suspendResult;
            if (this.jmu_1.w3a().s2z_1 === 403) {
              throw new UnauthorizedException('Access denied');
            } else if (this.jmu_1.w3a().equals(Companion_getInstance_0().d2z_1)) {
              throw new ConsentNotGrantedException('Parental consent required but not granted');
            } else if (this.jmu_1.w3a().equals(Companion_getInstance_0().s2y_1)) {
              throw new AdultAccountRequiredException('Adult account required, credentials for child account');
            } else if (!(this.jmu_1.w3a().s2z_1 === 200)) {
              throw IllegalStateException_init_$Create$('Server error - response ' + this.jmu_1.w3a().s2z_1);
            }

            var tmp_16 = this;
            tmp_16.kmu_1 = _get_json__d8whur(this.umt_1);
            this.hd_1 = 2;
            suspendResult = bodyAsText(this.jmu_1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.lmu_1 = suspendResult;
            var tmp_17 = this;
            var this_5 = this.kmu_1.g45();
            var this_6 = serializer(this_5, createKType(getKClass(UmAccount), arrayOf([]), false));
            tmp_17.mmu_1 = this.kmu_1.f45(isInterface(this_6, KSerializer) ? this_6 : THROW_CCE(), this.lmu_1);
            this.mmu_1.jju_1 = this.vmt_1;
            this.hd_1 = 3;
            suspendResult = invoke$lambda_0(this.bmu_1).a7d().rfn(this.mmu_1.gju_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.nmu_1 = suspendResult;
            var tmp_18 = this;
            var tmp_19;
            if (this.nmu_1 == null) {
              throw IllegalStateException_init_$Create$('Cannot find person in repo/db');
            } else {
              tmp_19 = this.nmu_1;
            }

            tmp_18.omu_1 = tmp_19;
            this.pmu_1 = ensureNotNull(this.omu_1.ofo_1);
            this.hd_1 = 4;
            suspendResult = getSiteFromDbOrLoadFromHttp(this.umt_1, invoke$lambda_0(this.bmu_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.hd_1 = 5;
            suspendResult = this.umt_1.jms(this.pmu_1, this.vmt_1, this.xmt_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            var newSession = suspendResult;
            if (!this.zmt_1) {
              this.umt_1.jmn(newSession);
            }

            return this.mmu_1;
          case 6:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 6) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(UstadAccountManager$login$slambda).v1m = function ($this$withContext, completion) {
    var i = new UstadAccountManager$login$slambda(this.umt_1, this.vmt_1, this.wmt_1, this.xmt_1, this.ymt_1, this.zmt_1, completion);
    i.amu_1 = $this$withContext;
    return i;
  };
  function UstadAccountManager$login$slambda_0(this$0, $endpointUrl, $username, $password, $maxDateOfBirth, $dontSetCurrentSession, resultContinuation) {
    var i = new UstadAccountManager$login$slambda(this$0, $endpointUrl, $username, $password, $maxDateOfBirth, $dontSetCurrentSession, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.qmu($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $activeSessionsListCOROUTINE$2(_this__u8e3s4, endpointFilter, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.zmu_1 = _this__u8e3s4;
    this.amv_1 = endpointFilter;
  }
  protoOf($activeSessionsListCOROUTINE$2).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            var tmp_0 = this;
            var this_0 = this.zmu_1.iml_1.t2();
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              if (this.amv_1.dmq(element.umj_1)) {
                destination.i1(element);
              }
            }

            tmp_0.bmv_1 = destination;
            var tmp_1 = this;
            tmp_1.cmv_1 = this.bmv_1;
            var tmp_2 = this;
            tmp_2.dmv_1 = ArrayList_init_$Create$();
            this.emv_1 = this.cmv_1.w();
            this.hd_1 = 1;
            continue $sm;
          case 1:
            if (!this.emv_1.f()) {
              this.hd_1 = 3;
              continue $sm;
            }

            this.fmv_1 = this.emv_1.e();
            var tmp_3 = this;
            tmp_3.gmv_1 = this.fmv_1;
            var tmp_4 = this;
            var this_1 = this.zmu_1.gml_1;
            var context = this.gmv_1;
            var trigger = this_1.q56();
            var tmp_5 = Companion_instance_0;
            var tmp_6 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
            var tmp_7 = get_direct(On(this_1, tmp_5.u56(isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE(), context), trigger)).s57();
            var tmp_8 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
            tmp_4.hmv_1 = tmp_7.q57(isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE(), 1);
            this.hd_1 = 2;
            suspendResult = this.hmv_1.o7e().ahv(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var this_2 = suspendResult;
            var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_2, 10));
            var tmp0_iterator_0 = this_2.w();
            while (tmp0_iterator_0.f()) {
              var item = tmp0_iterator_0.e();
              destination_0.i1(withEndpoint(item, this.gmv_1));
            }

            var list = destination_0;
            addAll(this.dmv_1, list);
            this.hd_1 = 1;
            continue $sm;
          case 3:
            return this.dmv_1;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function $activeSessionCountCOROUTINE$3(_this__u8e3s4, maxDateOfBirth, endpointFilter, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.qmv_1 = _this__u8e3s4;
    this.rmv_1 = maxDateOfBirth;
    this.smv_1 = endpointFilter;
  }
  protoOf($activeSessionCountCOROUTINE$3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            var tmp_0 = this;
            var this_0 = this.qmv_1.iml_1.t2();
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              if (this.smv_1.dmq(element.umj_1)) {
                destination.i1(element);
              }
            }

            tmp_0.tmv_1 = destination;
            var tmp_1 = this;
            tmp_1.umv_1 = 0;
            this.vmv_1 = this.umv_1;
            this.wmv_1 = this.tmv_1.w();
            this.hd_1 = 1;
            continue $sm;
          case 1:
            if (!this.wmv_1.f()) {
              this.hd_1 = 3;
              continue $sm;
            }

            this.xmv_1 = this.wmv_1.e();
            var tmp_2 = this;
            tmp_2.ymv_1 = this.vmv_1;
            var tmp_3 = this;
            tmp_3.zmv_1 = this.xmv_1;
            var tmp_4 = this;
            var this_1 = this.qmv_1.gml_1;
            var context = this.zmv_1;
            var trigger = this_1.q56();
            var tmp_5 = Companion_instance_0;
            var tmp_6 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
            var tmp_7 = get_direct(On(this_1, tmp_5.u56(isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE(), context), trigger)).s57();
            var tmp_8 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
            tmp_4.amw_1 = tmp_7.q57(isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE(), 1);
            this.hd_1 = 2;
            suspendResult = this.amw_1.o7e().bhv(this.rmv_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var ARGUMENT = suspendResult;
            this.vmv_1 = this.ymv_1 + ARGUMENT | 0;
            this.hd_1 = 1;
            continue $sm;
          case 3:
            return this.vmv_1;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function $addSessionCOROUTINE$4(_this__u8e3s4, person, endpointUrl, password, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.jmw_1 = _this__u8e3s4;
    this.kmw_1 = person;
    this.lmw_1 = endpointUrl;
    this.mmw_1 = password;
  }
  protoOf($addSessionCOROUTINE$4).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            assertNotClosed(this.jmw_1);
            this.nmw_1 = new Endpoint(this.lmw_1);
            var tmp_0 = this;
            var this_0 = this.jmw_1.gml_1;
            var context = this.nmw_1;
            var trigger = this_0.q56();
            var tmp_1 = Companion_instance_0;
            var tmp_2 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
            var tmp_3 = get_direct(On(this_0, tmp_1.u56(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), context), trigger)).s57();
            var tmp_4 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
            tmp_0.omw_1 = tmp_3.q57(isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), 2);
            var tmp_5 = this;
            var this_1 = this.jmw_1.gml_1;
            var context_0 = this.nmw_1;
            var trigger_0 = this_1.q56();
            var tmp_6 = Companion_instance_0;
            var tmp_7 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
            var tmp_8 = get_direct(On(this_1, tmp_6.u56(isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE(), context_0), trigger_0)).s57();
            var tmp_9 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
            tmp_5.pmw_1 = tmp_8.q57(isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE(), 1);
            if (!this.jmw_1.iml_1.t2().a1(this.nmw_1)) {
              this.hd_1 = 1;
              suspendResult = addActiveEndpoint(this.jmw_1, this.nmw_1, false, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            commitActiveEndpointsToPref(this.jmw_1);
            this.hd_1 = 2;
            continue $sm;
          case 2:
            var tmp_10 = this;
            var this_2 = this.jmw_1.gml_1;
            var context_1 = this.nmw_1;
            var trigger_1 = this_2.q56();
            var tmp_11 = Companion_instance_0;
            var tmp_12 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
            var tmp_13 = get_direct(On(this_2, tmp_11.u56(isInterface(tmp_12, TypeToken) ? tmp_12 : THROW_CCE(), context_1), trigger_1)).s57();
            var tmp_14 = typeToken(createKType(getKClass(AuthManager), arrayOf([]), false));
            tmp_10.qmw_1 = tmp_13.q57(isInterface(tmp_14, TypeToken) ? tmp_14 : THROW_CCE(), null);
            this.hd_1 = 3;
            suspendResult = withDoorTransactionAsync(this.omw_1, VOID, UstadAccountManager$addSession$slambda_0(this.jmw_1, this.nmw_1, this.kmw_1, this.mmw_1, this.qmw_1, this.omw_1, this.pmw_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            var tmp0_container = suspendResult;
            var userSession = tmp0_container.y6();
            var personPicture = tmp0_container.z6();
            return new UserSessionWithPersonAndEndpoint(userSession, this.kmw_1, this.nmw_1, personPicture);
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function $endSessionCOROUTINE$6(_this__u8e3s4, session, endStatus, endReason, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.zmw_1 = _this__u8e3s4;
    this.amx_1 = session;
    this.bmx_1 = endStatus;
    this.cmx_1 = endReason;
  }
  protoOf($endSessionCOROUTINE$6).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            var tmp_0 = this;
            var this_0 = this.zmw_1.gml_1;
            var context = this.amx_1.lmk_1;
            var trigger = this_0.q56();
            var tmp_1 = Companion_instance_0;
            var tmp_2 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
            var tmp_3 = get_direct(On(this_0, tmp_1.u56(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), context), trigger)).s57();
            var tmp_4 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
            tmp_0.dmx_1 = tmp_3.q57(isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), 2);
            this.hd_1 = 1;
            suspendResult = this.dmx_1.o7e().chv(this.amx_1.jmk_1.rhv_1, this.bmx_1, this.cmx_1, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (this.zmw_1.emx().jmk_1.rhv_1.equals(this.amx_1.jmk_1.rhv_1) ? this.zmw_1.emx().lmk_1.equals(this.amx_1.lmk_1) : false) {
              this.zmw_1.jmn(makeNewTempGuestSession(this.zmw_1, this.amx_1.lmk_1.umj_1, this.dmx_1));
            }

            this.hd_1 = 2;
            var tmp_5 = UstadAccountManager$endSession$lambda(this.amx_1);
            suspendResult = this.zmw_1.fmx(new sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_0(tmp_5), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var ARGUMENT = suspendResult;
            if (ARGUMENT.c1()) {
              removeActiveEndpoint$default(this.zmw_1, this.amx_1.lmk_1);
              this.hd_1 = 3;
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function $getSiteFromDbOrLoadFromHttpCOROUTINE$7(_this__u8e3s4, repo, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.wmp_1 = _this__u8e3s4;
    this.xmp_1 = repo;
  }
  protoOf($getSiteFromDbOrLoadFromHttpCOROUTINE$7).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            var tmp_0 = this;
            var tmp_1 = this.xmp_1;
            var tmp_2 = (isInterface(tmp_1, DoorDatabaseRepository) ? tmp_1 : THROW_CCE()).k5i();
            tmp_0.ymp_1 = tmp_2 instanceof UmAppDatabase ? tmp_2 : THROW_CCE();
            this.hd_1 = 1;
            suspendResult = this.ymp_1.i7e().lgz(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.zmp_1 = suspendResult;
            if (this.zmp_1 == null) {
              this.hd_1 = 2;
              suspendResult = this.xmp_1.i7e().lgz(this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            if (suspendResult == null)
              throw IllegalStateException_init_$Create$('Internal error: no Site in database and could not fetch it from server');
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function $startGuestSessionCOROUTINE$8(_this__u8e3s4, endpointUrl, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.omx_1 = _this__u8e3s4;
    this.pmx_1 = endpointUrl;
  }
  protoOf($startGuestSessionCOROUTINE$8).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            var tmp_0 = this;
            var this_0 = this.omx_1.gml_1;
            var context = new Endpoint(this.pmx_1);
            var trigger = this_0.q56();
            var tmp_1 = Companion_instance_0;
            var tmp_2 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
            var this_1 = On(this_0, tmp_1.u56(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), context), trigger);
            var tmp_3 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
            tmp_0.qmx_1 = Instance(this_1, isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE(), 2).n5c(null, getLocalDelegateReference('repo', KProperty0, false, function () {
              return THROW_ISE();
            }));
            this.hd_1 = 1;
            var tmp_4 = startGuestSession$lambda(this.qmx_1);
            var this_2 = new Person();
            this_2.g95_1 = null;
            this_2.h95_1 = 'Guest';
            this_2.i95_1 = 'User';
            var tmp_5 = this_2;
            tmp_5.t95_1 = 2;
            suspendResult = insertPersonAndGroup(tmp_4, this_2, 1 | 16, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.rmx_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = getSiteFromDbOrLoadFromHttp(this.omx_1, startGuestSession$lambda(this.qmx_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.hd_1 = 3;
            suspendResult = this.omx_1.jms(this.rmx_1, this.pmx_1, null, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            var guestSession = suspendResult;
            this.omx_1.jmn(guestSession);
            return guestSession;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function UstadAccountManager(settings, di) {
    Companion_getInstance_20();
    this.fml_1 = settings;
    this.gml_1 = di;
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = this.gml_1;
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.kml_1 = Instance(this_0, tmp$ret$0, null).n5c(this, httpClient$factory());
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_1 = this.gml_1;
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(Json), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.lml_1 = Instance(this_1, tmp$ret$2, null).n5c(this, json$factory());
    var tmp_3 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_2 = this.gml_1;
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(ApiUrlConfig), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    tmp_3.mml_1 = Instance(this_2, tmp$ret$4, null).n5c(this, apiUrlConfig$factory());
    this.nml_1 = atomic$boolean$1(false);
    this.oml_1 = CoroutineScope_0(Dispatchers_getInstance().t12().lj(Job()));
    var tmp0_elvis_lhs = this.fml_1.tl1('accountmgr.activeendpoint');
    var tmp1_elvis_lhs = tmp0_elvis_lhs == null ? _get_apiUrlConfig__mldllg(this).smx_1 : tmp0_elvis_lhs;
    var currentEndpointStr = tmp1_elvis_lhs == null ? 'http://localhost/' : tmp1_elvis_lhs;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var this_3 = get_direct(this.gml_1);
    var context = new Endpoint(currentEndpointStr);
    var tmp_5 = this_3.s57();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_6 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_7 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    var tmp$ret$7 = tmp_6.u56(tmp$ret$6, context);
    var tmp_8 = tmp_5.p57(tmp$ret$7).s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_9 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$9 = isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE();
    var currentDb = tmp_8.q57(tmp$ret$9, 1);
    var tmp2_safe_receiver = this.fml_1.tl1('accountmgr.activesession');
    var tmp_10;
    if (tmp2_safe_receiver == null) {
      tmp_10 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.account.UstadAccountManager.<anonymous>' call
      // Inline function 'kotlinx.serialization.json.Json.decodeFromString' call
      var this_4 = _get_json__d8whur(this);
      // Inline function 'kotlinx.serialization.serializer' call
      var this_5 = this_4.g45();
      // Inline function 'kotlinx.serialization.internal.cast' call
      var this_6 = serializer(this_5, createKType(getKClass(UserSessionWithPersonAndEndpoint), arrayOf([]), true));
      var tmp$ret$12 = isInterface(this_6, KSerializer) ? this_6 : THROW_CCE();
      tmp_10 = this_4.f45(tmp$ret$12, tmp2_safe_receiver);
    }
    var tmp3_elvis_lhs = tmp_10;
    var initUserSession = tmp3_elvis_lhs == null ? makeNewTempGuestSession(this, currentEndpointStr, currentDb) : tmp3_elvis_lhs;
    this.hml_1 = MutableStateFlow(initUserSession);
    var tmp4_safe_receiver = this.fml_1.tl1('accountmgr.endpointswithsessions');
    var tmp_11;
    if (tmp4_safe_receiver == null) {
      tmp_11 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.account.UstadAccountManager.<anonymous>' call
      tmp_11 = _get_json__d8whur(this).f45(ListSerializer(serializer_0(StringCompanionObject_instance)), tmp4_safe_receiver);
    }
    var tmp5_elvis_lhs = tmp_11;
    var initEndpoints = tmp5_elvis_lhs == null ? listOf_0(currentEndpointStr) : tmp5_elvis_lhs;
    var tmp_12 = this;
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(initEndpoints, 10));
    var tmp0_iterator = initEndpoints.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.account.UstadAccountManager.<anonymous>' call
      var tmp$ret$18 = new Endpoint(item);
      destination.i1(tmp$ret$18);
    }
    tmp_12.iml_1 = MutableStateFlow(destination);
    this.jml_1 = MutableStateFlow(listOf_0(initUserSession));
    launch(this.oml_1, VOID, VOID, UstadAccountManager$slambda_0(this, null));
    launch(this.oml_1, VOID, VOID, UstadAccountManager$slambda_2(this, null));
  }
  protoOf(UstadAccountManager).jmn = function (value) {
    this.hml_1.x1k(value);
    // Inline function 'kotlinx.serialization.encodeToString' call
    var this_0 = _get_json__d8whur(this);
    // Inline function 'kotlinx.serialization.serializer' call
    var this_1 = this_0.g45();
    // Inline function 'kotlinx.serialization.internal.cast' call
    var this_2 = serializer(this_1, createKType(getKClass(UserSessionWithPersonAndEndpoint), arrayOf([]), false));
    var tmp$ret$1 = isInterface(this_2, KSerializer) ? this_2 : THROW_CCE();
    var activeAccountJson = this_0.e45(tmp$ret$1, value);
    // Inline function 'com.russhwolf.settings.set' call
    var this_3 = this.fml_1;
    var key = 'accountmgr.activesession';
    this_3.sl1(key, activeAccountJson);
    // Inline function 'com.russhwolf.settings.set' call
    var this_4 = this.fml_1;
    var key_0 = 'accountmgr.activeendpoint';
    var value_0 = value.lmk_1.umj_1;
    this_4.sl1(key_0, value_0);
  };
  protoOf(UstadAccountManager).emx = function () {
    return this.hml_1.t2();
  };
  protoOf(UstadAccountManager).umx = function () {
    return asStateFlow(this.hml_1);
  };
  protoOf(UstadAccountManager).vmx = function () {
    return this.hml_1.t2().omk();
  };
  protoOf(UstadAccountManager).wmx = function () {
    return asStateFlow(this.jml_1);
  };
  protoOf(UstadAccountManager).xmx = function () {
    return this.hml_1.t2().lmk_1;
  };
  protoOf(UstadAccountManager).fmx = function (endpointFilter, $completion) {
    var tmp = new $activeSessionsListCOROUTINE$2(this, endpointFilter, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager).ymx = function (maxDateOfBirth, endpointFilter, $completion) {
    var tmp = new $activeSessionCountCOROUTINE$3(this, maxDateOfBirth, endpointFilter, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager).zmx = function (maxDateOfBirth, endpointFilter, $completion, $super) {
    maxDateOfBirth = maxDateOfBirth === VOID ? new Long(0, 0) : maxDateOfBirth;
    var tmp;
    if (endpointFilter === VOID) {
      var tmp_0 = UstadAccountManager$activeSessionCount$lambda;
      tmp = new sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0(tmp_0);
    } else {
      tmp = endpointFilter;
    }
    endpointFilter = tmp;
    return $super === VOID ? this.ymx(maxDateOfBirth, endpointFilter, $completion) : $super.ymx.call(this, maxDateOfBirth, endpointFilter, $completion);
  };
  protoOf(UstadAccountManager).amy = function (person, password, endpointUrl, accountRegisterOptions, $completion) {
    var tmp = Dispatchers_getInstance().p12_1;
    return withContext(tmp, UstadAccountManager$register$slambda_0(this, endpointUrl, accountRegisterOptions, person, password, null), $completion);
  };
  protoOf(UstadAccountManager).jms = function (person, endpointUrl, password, $completion) {
    var tmp = new $addSessionCOROUTINE$4(this, person, endpointUrl, password, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager).bmy = function (session, endStatus, endReason, $completion) {
    var tmp = new $endSessionCOROUTINE$6(this, session, endStatus, endReason, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadAccountManager).cmy = function (session, endStatus, endReason, $completion, $super) {
    var tmp;
    if (endStatus === VOID) {
      tmp = 4;
    } else {
      tmp = endStatus;
    }
    endStatus = tmp;
    var tmp_0;
    if (endReason === VOID) {
      tmp_0 = 1;
    } else {
      tmp_0 = endReason;
    }
    endReason = tmp_0;
    return $super === VOID ? this.bmy(session, endStatus, endReason, $completion) : $super.bmy.call(this, session, endStatus, endReason, $completion);
  };
  protoOf(UstadAccountManager).dmy = function (username, password, endpointUrl, maxDateOfBirth, dontSetCurrentSession, $completion) {
    var tmp = Dispatchers_getInstance().p12_1;
    return withContext(tmp, UstadAccountManager$login$slambda_0(this, endpointUrl, username, password, maxDateOfBirth, dontSetCurrentSession, null), $completion);
  };
  protoOf(UstadAccountManager).emy = function (endpointUrl, $completion) {
    var tmp = new $startGuestSessionCOROUTINE$8(this, endpointUrl, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function httpClient$factory() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc(receiver);
    }, null);
  }
  function json$factory() {
    return getPropertyCallableRef('json', 1, KProperty1, function (receiver) {
      return _get_json__d8whur(receiver);
    }, null);
  }
  function apiUrlConfig$factory() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg(receiver);
    }, null);
  }
  function httpClient$factory_0() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc(receiver);
    }, null);
  }
  function json$factory_0() {
    return getPropertyCallableRef('json', 1, KProperty1, function (receiver) {
      return _get_json__d8whur(receiver);
    }, null);
  }
  function apiUrlConfig$factory_0() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg(receiver);
    }, null);
  }
  function Companion_4() {
    this.fmy_1 = 101;
  }
  var Companion_instance_52;
  function Companion_getInstance_21() {
    return Companion_instance_52;
  }
  function Companion_5() {
  }
  protoOf(Companion_5).a4r = function () {
    return AnchorSerializer_getInstance();
  };
  var Companion_instance_53;
  function Companion_getInstance_22() {
    return Companion_instance_53;
  }
  function Anchor(content, href) {
    content = content === VOID ? '' : content;
    href = href === VOID ? '' : href;
    this.gmy_1 = content;
    this.hmy_1 = href;
  }
  function deserializeDynamic($this, reader) {
    var href = reader.z7c(null, 'href');
    // Inline function 'kotlin.text.trim' call
    var this_0 = xhtmlContentToText(reader);
    var text = toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
    return new Anchor(text, href == null ? '' : href);
  }
  function AnchorSerializer() {
    AnchorSerializer_instance = this;
    this.imy_1 = buildClassSerialDescriptor('a', []);
  }
  protoOf(AnchorSerializer).d44 = function () {
    return this.imy_1;
  };
  protoOf(AnchorSerializer).f44 = function (decoder) {
    var tmp;
    if (isInterface(decoder, XmlInput)) {
      tmp = deserializeDynamic(this, decoder.nk9());
    } else {
      // Inline function 'kotlinx.serialization.encoding.decodeStructure' call
      var descriptor = this.imy_1;
      var composite = decoder.v47(descriptor);
      // Inline function 'com.ustadmobile.core.contentformats.epub.nav.AnchorSerializer.deserialize.<anonymous>' call
      var result = composite.i48(AnchorSerializer_getInstance().imy_1, 0, Companion_instance_53.a4r());
      composite.w47(descriptor);
      tmp = result;
    }
    return tmp;
  };
  protoOf(AnchorSerializer).jmy = function (encoder, value) {
    encoder.m49(Companion_instance_53.a4r(), value);
  };
  protoOf(AnchorSerializer).e44 = function (encoder, value) {
    return this.jmy(encoder, value instanceof Anchor ? value : THROW_CCE());
  };
  var AnchorSerializer_instance;
  function AnchorSerializer_getInstance() {
    if (AnchorSerializer_instance == null)
      new AnchorSerializer();
    return AnchorSerializer_instance;
  }
  function Companion_6() {
  }
  protoOf(Companion_6).a4r = function () {
    return BodySerializer_instance;
  };
  var Companion_instance_54;
  function Companion_getInstance_23() {
    return Companion_instance_54;
  }
  function Body(navigationElements) {
    this.kmy_1 = navigationElements;
  }
  function BodySerializer() {
  }
  protoOf(BodySerializer).d44 = function () {
    return buildClassSerialDescriptor('body', []);
  };
  protoOf(BodySerializer).f44 = function (decoder) {
    var tmp;
    if (isInterface(decoder, XmlInput)) {
      tmp = this.lmy(decoder, decoder.nk9());
    } else {
      // Inline function 'kotlinx.serialization.encoding.decodeStructure' call
      var descriptor = this.d44();
      var composite = decoder.v47(descriptor);
      // Inline function 'com.ustadmobile.core.contentformats.epub.nav.BodySerializer.deserialize.<anonymous>' call
      var result = composite.i48(BodySerializer_instance.d44(), 0, Companion_instance_54.a4r());
      composite.w47(descriptor);
      tmp = result;
    }
    return tmp;
  };
  protoOf(BodySerializer).lmy = function (decoder, reader) {
    var xml = this.mmy(decoder);
    // Inline function 'kotlin.collections.mutableListOf' call
    var navElementList = ArrayList_init_$Create$();
    // Inline function 'kotlinx.serialization.encoding.decodeStructure' call
    var descriptor = this.d44();
    var composite = decoder.v47(descriptor);
    while (!(reader.e().equals(EventType_END_ELEMENT_getInstance()) ? reader.dc().lk3() === 'body' : false)) {
      if (reader.ujz().equals(EventType_START_ELEMENT_getInstance()) ? reader.mjz() === 'nav' : false) {
        // Inline function 'kotlin.collections.plusAssign' call
        var element = xml.ake(Companion_instance_56.a4r(), reader);
        navElementList.i1(element);
      }
    }
    var result = Unit_instance;
    composite.w47(descriptor);
    return new Body(toList(navElementList));
  };
  protoOf(BodySerializer).nmy = function (encoder, value) {
    encoder.m49(Companion_instance_54.a4r(), value);
  };
  protoOf(BodySerializer).e44 = function (encoder, value) {
    return this.nmy(encoder, value instanceof Body ? value : THROW_CCE());
  };
  protoOf(BodySerializer).mmy = function (decoder) {
    return (isInterface(decoder, XmlInput) ? decoder : THROW_CCE()).wkb();
  };
  var BodySerializer_instance;
  function BodySerializer_getInstance() {
    return BodySerializer_instance;
  }
  function Companion_7() {
  }
  var Companion_instance_55;
  function Companion_getInstance_24() {
    return Companion_instance_55;
  }
  function $serializer_2() {
    $serializer_instance_2 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.nav.ListItem', this, 3);
    tmp0_serialDesc.g4f('anchor', true);
    tmp0_serialDesc.g4f('span', true);
    tmp0_serialDesc.g4f('orderedList', true);
    tmp0_serialDesc.i4f(new XmlSerialName('li', 'http://www.w3.org/1999/xhtml'));
    this.omy_1 = tmp0_serialDesc;
  }
  protoOf($serializer_2).d44 = function () {
    return this.omy_1;
  };
  protoOf($serializer_2).x4f = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(AnchorSerializer_getInstance()), get_nullable(SpanSerializer_getInstance()), get_nullable($serializer_getInstance_17())];
  };
  protoOf($serializer_2).f44 = function (decoder) {
    var tmp0_desc = this.omy_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_input = decoder.v47(tmp0_desc);
    if (tmp7_input.k48()) {
      tmp4_local0 = tmp7_input.j48(tmp0_desc, 0, AnchorSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp7_input.j48(tmp0_desc, 1, SpanSerializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp7_input.j48(tmp0_desc, 2, $serializer_getInstance_17(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp7_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp7_input.j48(tmp0_desc, 0, AnchorSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp7_input.j48(tmp0_desc, 1, SpanSerializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp7_input.j48(tmp0_desc, 2, $serializer_getInstance_17(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp7_input.w47(tmp0_desc);
    return ListItem_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
  };
  protoOf($serializer_2).pmy = function (encoder, value) {
    var tmp0_desc = this.omy_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    if (tmp1_output.r49(tmp0_desc, 0) ? true : !(value.qmy_1 == null)) {
      tmp1_output.n49(tmp0_desc, 0, AnchorSerializer_getInstance(), value.qmy_1);
    }
    if (tmp1_output.r49(tmp0_desc, 1) ? true : !(value.rmy_1 == null)) {
      tmp1_output.n49(tmp0_desc, 1, SpanSerializer_getInstance(), value.rmy_1);
    }
    if (tmp1_output.r49(tmp0_desc, 2) ? true : !(value.smy_1 == null)) {
      tmp1_output.n49(tmp0_desc, 2, $serializer_getInstance_17(), value.smy_1);
    }
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_2).e44 = function (encoder, value) {
    return this.pmy(encoder, value instanceof ListItem ? value : THROW_CCE());
  };
  var $serializer_instance_2;
  function $serializer_getInstance_14() {
    if ($serializer_instance_2 == null)
      new $serializer_2();
    return $serializer_instance_2;
  }
  function ListItem_init_$Init$(seen1, anchor, span, orderedList, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_14().omy_1);
    }
    if (0 === (seen1 & 1))
      $this.qmy_1 = null;
    else
      $this.qmy_1 = anchor;
    if (0 === (seen1 & 2))
      $this.rmy_1 = null;
    else
      $this.rmy_1 = span;
    if (0 === (seen1 & 4))
      $this.smy_1 = null;
    else
      $this.smy_1 = orderedList;
    return $this;
  }
  function ListItem_init_$Create$(seen1, anchor, span, orderedList, serializationConstructorMarker) {
    return ListItem_init_$Init$(seen1, anchor, span, orderedList, serializationConstructorMarker, objectCreate(protoOf(ListItem)));
  }
  function ListItem(anchor, span, orderedList) {
    anchor = anchor === VOID ? null : anchor;
    span = span === VOID ? null : span;
    orderedList = orderedList === VOID ? null : orderedList;
    this.qmy_1 = anchor;
    this.rmy_1 = span;
    this.smy_1 = orderedList;
  }
  function Companion_8() {
  }
  protoOf(Companion_8).a4r = function () {
    return $serializer_getInstance_15();
  };
  var Companion_instance_56;
  function Companion_getInstance_25() {
    return Companion_instance_56;
  }
  function $serializer_3() {
    $serializer_instance_3 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.nav.NavElement', this, 2);
    tmp0_serialDesc.g4f('epubType', true);
    tmp0_serialDesc.h4f(new XmlSerialName('type', 'http://www.idpf.org/2007/ops'));
    tmp0_serialDesc.g4f('orderedList', false);
    tmp0_serialDesc.i4f(new XmlSerialName('nav', 'http://www.w3.org/1999/xhtml'));
    this.tmy_1 = tmp0_serialDesc;
  }
  protoOf($serializer_3).d44 = function () {
    return this.tmy_1;
  };
  protoOf($serializer_3).x4f = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), $serializer_getInstance_17()];
  };
  protoOf($serializer_3).f44 = function (decoder) {
    var tmp0_desc = this.tmy_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.v47(tmp0_desc);
    if (tmp6_input.k48()) {
      tmp4_local0 = tmp6_input.j48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.h48(tmp0_desc, 1, $serializer_getInstance_17(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.j48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.h48(tmp0_desc, 1, $serializer_getInstance_17(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.w47(tmp0_desc);
    return NavElement_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_3).umy = function (encoder, value) {
    var tmp0_desc = this.tmy_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    if (tmp1_output.r49(tmp0_desc, 0) ? true : !(value.vmy_1 == null)) {
      tmp1_output.n49(tmp0_desc, 0, StringSerializer_getInstance(), value.vmy_1);
    }
    tmp1_output.l49(tmp0_desc, 1, $serializer_getInstance_17(), value.wmy_1);
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_3).e44 = function (encoder, value) {
    return this.umy(encoder, value instanceof NavElement ? value : THROW_CCE());
  };
  var $serializer_instance_3;
  function $serializer_getInstance_15() {
    if ($serializer_instance_3 == null)
      new $serializer_3();
    return $serializer_instance_3;
  }
  function NavElement_init_$Init$(seen1, epubType, orderedList, serializationConstructorMarker, $this) {
    if (!(2 === (2 & seen1))) {
      throwMissingFieldException(seen1, 2, $serializer_getInstance_15().tmy_1);
    }
    if (0 === (seen1 & 1))
      $this.vmy_1 = null;
    else
      $this.vmy_1 = epubType;
    $this.wmy_1 = orderedList;
    return $this;
  }
  function NavElement_init_$Create$(seen1, epubType, orderedList, serializationConstructorMarker) {
    return NavElement_init_$Init$(seen1, epubType, orderedList, serializationConstructorMarker, objectCreate(protoOf(NavElement)));
  }
  function NavElement() {
  }
  function Companion_9() {
    this.xmy_1 = 'http://www.w3.org/1999/xhtml';
    this.ymy_1 = 'http://www.idpf.org/2007/ops';
  }
  var Companion_instance_57;
  function Companion_getInstance_26() {
    return Companion_instance_57;
  }
  function $serializer_4() {
    $serializer_instance_4 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.nav.NavigationDocument', this, 1);
    tmp0_serialDesc.g4f('bodyElement', false);
    tmp0_serialDesc.i4f(new XmlSerialName('html', 'http://www.w3.org/1999/xhtml'));
    this.zmy_1 = tmp0_serialDesc;
  }
  protoOf($serializer_4).d44 = function () {
    return this.zmy_1;
  };
  protoOf($serializer_4).x4f = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [BodySerializer_instance];
  };
  protoOf($serializer_4).f44 = function (decoder) {
    var tmp0_desc = this.zmy_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.v47(tmp0_desc);
    if (tmp5_input.k48()) {
      tmp4_local0 = tmp5_input.h48(tmp0_desc, 0, BodySerializer_instance, tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.h48(tmp0_desc, 0, BodySerializer_instance, tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.w47(tmp0_desc);
    return NavigationDocument_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_4).amz = function (encoder, value) {
    var tmp0_desc = this.zmy_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    tmp1_output.l49(tmp0_desc, 0, BodySerializer_instance, value.bmz_1);
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_4).e44 = function (encoder, value) {
    return this.amz(encoder, value instanceof NavigationDocument ? value : THROW_CCE());
  };
  var $serializer_instance_4;
  function $serializer_getInstance_16() {
    if ($serializer_instance_4 == null)
      new $serializer_4();
    return $serializer_instance_4;
  }
  function NavigationDocument_init_$Init$(seen1, bodyElement, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_16().zmy_1);
    }
    $this.bmz_1 = bodyElement;
    return $this;
  }
  function NavigationDocument_init_$Create$(seen1, bodyElement, serializationConstructorMarker) {
    return NavigationDocument_init_$Init$(seen1, bodyElement, serializationConstructorMarker, objectCreate(protoOf(NavigationDocument)));
  }
  function NavigationDocument(bodyElement) {
    this.bmz_1 = bodyElement;
  }
  function Companion_10() {
    Companion_instance_58 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.cmz_1 = [new ArrayListSerializer($serializer_getInstance_14())];
  }
  var Companion_instance_58;
  function Companion_getInstance_27() {
    if (Companion_instance_58 == null)
      new Companion_10();
    return Companion_instance_58;
  }
  function $serializer_5() {
    $serializer_instance_5 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.nav.OrderedList', this, 1);
    tmp0_serialDesc.g4f('listItems', false);
    tmp0_serialDesc.i4f(new XmlSerialName('ol', 'http://www.w3.org/1999/xhtml'));
    this.dmz_1 = tmp0_serialDesc;
  }
  protoOf($serializer_5).d44 = function () {
    return this.dmz_1;
  };
  protoOf($serializer_5).x4f = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_27().cmz_1[0]];
  };
  protoOf($serializer_5).f44 = function (decoder) {
    var tmp0_desc = this.dmz_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.v47(tmp0_desc);
    var tmp6_cached = Companion_getInstance_27().cmz_1;
    if (tmp5_input.k48()) {
      tmp4_local0 = tmp5_input.h48(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.h48(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.w47(tmp0_desc);
    return OrderedList_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_5).emz = function (encoder, value) {
    var tmp0_desc = this.dmz_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    var tmp2_cached = Companion_getInstance_27().cmz_1;
    tmp1_output.l49(tmp0_desc, 0, tmp2_cached[0], value.fmz_1);
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_5).e44 = function (encoder, value) {
    return this.emz(encoder, value instanceof OrderedList ? value : THROW_CCE());
  };
  var $serializer_instance_5;
  function $serializer_getInstance_17() {
    if ($serializer_instance_5 == null)
      new $serializer_5();
    return $serializer_instance_5;
  }
  function OrderedList_init_$Init$(seen1, listItems, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_17().dmz_1);
    }
    $this.fmz_1 = listItems;
    return $this;
  }
  function OrderedList_init_$Create$(seen1, listItems, serializationConstructorMarker) {
    return OrderedList_init_$Init$(seen1, listItems, serializationConstructorMarker, objectCreate(protoOf(OrderedList)));
  }
  function OrderedList() {
  }
  function Companion_11() {
  }
  protoOf(Companion_11).a4r = function () {
    return SpanSerializer_getInstance();
  };
  var Companion_instance_59;
  function Companion_getInstance_28() {
    return Companion_instance_59;
  }
  function Span(content) {
    content = content === VOID ? '' : content;
    this.gmz_1 = content;
  }
  function deserializeDynamic_0($this, reader) {
    // Inline function 'kotlin.text.trim' call
    var this_0 = xhtmlContentToText(reader);
    var text = toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
    return new Span(text);
  }
  function SpanSerializer() {
    SpanSerializer_instance = this;
    this.hmz_1 = buildClassSerialDescriptor('span', []);
  }
  protoOf(SpanSerializer).d44 = function () {
    return this.hmz_1;
  };
  protoOf(SpanSerializer).f44 = function (decoder) {
    var tmp;
    if (isInterface(decoder, XmlInput)) {
      tmp = deserializeDynamic_0(this, decoder.nk9());
    } else {
      // Inline function 'kotlinx.serialization.encoding.decodeStructure' call
      var descriptor = AnchorSerializer_getInstance().imy_1;
      var composite = decoder.v47(descriptor);
      // Inline function 'com.ustadmobile.core.contentformats.epub.nav.SpanSerializer.deserialize.<anonymous>' call
      var result = composite.i48(AnchorSerializer_getInstance().imy_1, 0, Companion_instance_59.a4r());
      composite.w47(descriptor);
      tmp = result;
    }
    return tmp;
  };
  protoOf(SpanSerializer).imz = function (encoder, value) {
    encoder.m49(Companion_instance_59.a4r(), value);
  };
  protoOf(SpanSerializer).e44 = function (encoder, value) {
    return this.imz(encoder, value instanceof Span ? value : THROW_CCE());
  };
  var SpanSerializer_instance;
  function SpanSerializer_getInstance() {
    if (SpanSerializer_instance == null)
      new SpanSerializer();
    return SpanSerializer_instance;
  }
  function $serializer_6() {
    $serializer_instance_6 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.ncx.Content', this, 2);
    tmp0_serialDesc.g4f('id', true);
    tmp0_serialDesc.g4f('src', false);
    tmp0_serialDesc.i4f(new XmlSerialName('content', 'http://www.daisy.org/z3986/2005/ncx/'));
    this.jmz_1 = tmp0_serialDesc;
  }
  protoOf($serializer_6).d44 = function () {
    return this.jmz_1;
  };
  protoOf($serializer_6).x4f = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), StringSerializer_getInstance()];
  };
  protoOf($serializer_6).f44 = function (decoder) {
    var tmp0_desc = this.jmz_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.v47(tmp0_desc);
    if (tmp6_input.k48()) {
      tmp4_local0 = tmp6_input.j48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.f48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.j48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.f48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.w47(tmp0_desc);
    return Content_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_6).kmz = function (encoder, value) {
    var tmp0_desc = this.jmz_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    if (tmp1_output.r49(tmp0_desc, 0) ? true : !(value.lmz_1 == null)) {
      tmp1_output.n49(tmp0_desc, 0, StringSerializer_getInstance(), value.lmz_1);
    }
    tmp1_output.j49(tmp0_desc, 1, value.mmz_1);
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_6).e44 = function (encoder, value) {
    return this.kmz(encoder, value instanceof Content ? value : THROW_CCE());
  };
  var $serializer_instance_6;
  function $serializer_getInstance_18() {
    if ($serializer_instance_6 == null)
      new $serializer_6();
    return $serializer_instance_6;
  }
  function Content_init_$Init$(seen1, id, src, serializationConstructorMarker, $this) {
    if (!(2 === (2 & seen1))) {
      throwMissingFieldException(seen1, 2, $serializer_getInstance_18().jmz_1);
    }
    if (0 === (seen1 & 1))
      $this.lmz_1 = null;
    else
      $this.lmz_1 = id;
    $this.mmz_1 = src;
    return $this;
  }
  function Content_init_$Create$(seen1, id, src, serializationConstructorMarker) {
    return Content_init_$Init$(seen1, id, src, serializationConstructorMarker, objectCreate(protoOf(Content)));
  }
  function Content() {
  }
  function Companion_12() {
    Companion_instance_60 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.nmz_1 = [new ArrayListSerializer($serializer_getInstance_25())];
  }
  var Companion_instance_60;
  function Companion_getInstance_29() {
    if (Companion_instance_60 == null)
      new Companion_12();
    return Companion_instance_60;
  }
  function $serializer_7() {
    $serializer_instance_7 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.ncx.DocTitle', this, 1);
    tmp0_serialDesc.g4f('texts', false);
    tmp0_serialDesc.i4f(new XmlSerialName('docTitle', 'http://www.daisy.org/z3986/2005/ncx/'));
    this.omz_1 = tmp0_serialDesc;
  }
  protoOf($serializer_7).d44 = function () {
    return this.omz_1;
  };
  protoOf($serializer_7).x4f = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_29().nmz_1[0]];
  };
  protoOf($serializer_7).f44 = function (decoder) {
    var tmp0_desc = this.omz_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.v47(tmp0_desc);
    var tmp6_cached = Companion_getInstance_29().nmz_1;
    if (tmp5_input.k48()) {
      tmp4_local0 = tmp5_input.h48(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.h48(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.w47(tmp0_desc);
    return DocTitle_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_7).pmz = function (encoder, value) {
    var tmp0_desc = this.omz_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    var tmp2_cached = Companion_getInstance_29().nmz_1;
    tmp1_output.l49(tmp0_desc, 0, tmp2_cached[0], value.qmz_1);
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_7).e44 = function (encoder, value) {
    return this.pmz(encoder, value instanceof DocTitle ? value : THROW_CCE());
  };
  var $serializer_instance_7;
  function $serializer_getInstance_19() {
    if ($serializer_instance_7 == null)
      new $serializer_7();
    return $serializer_instance_7;
  }
  function DocTitle_init_$Init$(seen1, texts, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_19().omz_1);
    }
    $this.qmz_1 = texts;
    return $this;
  }
  function DocTitle_init_$Create$(seen1, texts, serializationConstructorMarker) {
    return DocTitle_init_$Init$(seen1, texts, serializationConstructorMarker, objectCreate(protoOf(DocTitle)));
  }
  function DocTitle() {
  }
  function Companion_13() {
    Companion_instance_61 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.rmz_1 = [new ArrayListSerializer($serializer_getInstance_35())];
  }
  var Companion_instance_61;
  function Companion_getInstance_30() {
    if (Companion_instance_61 == null)
      new Companion_13();
    return Companion_instance_61;
  }
  function $serializer_8() {
    $serializer_instance_8 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.ncx.Head', this, 1);
    tmp0_serialDesc.g4f('metadata', true);
    tmp0_serialDesc.i4f(new XmlSerialName('head', 'http://www.daisy.org/z3986/2005/ncx/'));
    this.smz_1 = tmp0_serialDesc;
  }
  protoOf($serializer_8).d44 = function () {
    return this.smz_1;
  };
  protoOf($serializer_8).x4f = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_30().rmz_1[0]];
  };
  protoOf($serializer_8).f44 = function (decoder) {
    var tmp0_desc = this.smz_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.v47(tmp0_desc);
    var tmp6_cached = Companion_getInstance_30().rmz_1;
    if (tmp5_input.k48()) {
      tmp4_local0 = tmp5_input.h48(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.h48(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.w47(tmp0_desc);
    return Head_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_8).tmz = function (encoder, value) {
    var tmp0_desc = this.smz_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    var tmp2_cached = Companion_getInstance_30().rmz_1;
    if (tmp1_output.r49(tmp0_desc, 0) ? true : !equals(value.umz_1, emptyList())) {
      tmp1_output.l49(tmp0_desc, 0, tmp2_cached[0], value.umz_1);
    }
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_8).e44 = function (encoder, value) {
    return this.tmz(encoder, value instanceof Head ? value : THROW_CCE());
  };
  var $serializer_instance_8;
  function $serializer_getInstance_20() {
    if ($serializer_instance_8 == null)
      new $serializer_8();
    return $serializer_instance_8;
  }
  function Head_init_$Init$(seen1, metadata, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_20().smz_1);
    }
    if (0 === (seen1 & 1))
      $this.umz_1 = emptyList();
    else
      $this.umz_1 = metadata;
    return $this;
  }
  function Head_init_$Create$(seen1, metadata, serializationConstructorMarker) {
    return Head_init_$Init$(seen1, metadata, serializationConstructorMarker, objectCreate(protoOf(Head)));
  }
  function Head(metadata) {
    Companion_getInstance_30();
    metadata = metadata === VOID ? emptyList() : metadata;
    this.umz_1 = metadata;
  }
  function $serializer_9() {
    $serializer_instance_9 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.ncx.NavLabel', this, 1);
    tmp0_serialDesc.g4f('text', false);
    tmp0_serialDesc.i4f(new XmlSerialName('navLabel', 'http://www.daisy.org/z3986/2005/ncx/'));
    this.vmz_1 = tmp0_serialDesc;
  }
  protoOf($serializer_9).d44 = function () {
    return this.vmz_1;
  };
  protoOf($serializer_9).x4f = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [$serializer_getInstance_25()];
  };
  protoOf($serializer_9).f44 = function (decoder) {
    var tmp0_desc = this.vmz_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.v47(tmp0_desc);
    if (tmp5_input.k48()) {
      tmp4_local0 = tmp5_input.h48(tmp0_desc, 0, $serializer_getInstance_25(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.h48(tmp0_desc, 0, $serializer_getInstance_25(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.w47(tmp0_desc);
    return NavLabel_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_9).wmz = function (encoder, value) {
    var tmp0_desc = this.vmz_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    tmp1_output.l49(tmp0_desc, 0, $serializer_getInstance_25(), value.xmz_1);
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_9).e44 = function (encoder, value) {
    return this.wmz(encoder, value instanceof NavLabel ? value : THROW_CCE());
  };
  var $serializer_instance_9;
  function $serializer_getInstance_21() {
    if ($serializer_instance_9 == null)
      new $serializer_9();
    return $serializer_instance_9;
  }
  function NavLabel_init_$Init$(seen1, text, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_21().vmz_1);
    }
    $this.xmz_1 = text;
    return $this;
  }
  function NavLabel_init_$Create$(seen1, text, serializationConstructorMarker) {
    return NavLabel_init_$Init$(seen1, text, serializationConstructorMarker, objectCreate(protoOf(NavLabel)));
  }
  function NavLabel() {
  }
  function Companion_14() {
    Companion_instance_62 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.ymz_1 = [new ArrayListSerializer($serializer_getInstance_23())];
  }
  var Companion_instance_62;
  function Companion_getInstance_31() {
    if (Companion_instance_62 == null)
      new Companion_14();
    return Companion_instance_62;
  }
  function $serializer_10() {
    $serializer_instance_10 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.ncx.NavMap', this, 1);
    tmp0_serialDesc.g4f('navPoints', false);
    tmp0_serialDesc.i4f(new XmlSerialName('navMap', 'http://www.daisy.org/z3986/2005/ncx/'));
    this.zmz_1 = tmp0_serialDesc;
  }
  protoOf($serializer_10).d44 = function () {
    return this.zmz_1;
  };
  protoOf($serializer_10).x4f = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_31().ymz_1[0]];
  };
  protoOf($serializer_10).f44 = function (decoder) {
    var tmp0_desc = this.zmz_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.v47(tmp0_desc);
    var tmp6_cached = Companion_getInstance_31().ymz_1;
    if (tmp5_input.k48()) {
      tmp4_local0 = tmp5_input.h48(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.h48(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.w47(tmp0_desc);
    return NavMap_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_10).an0 = function (encoder, value) {
    var tmp0_desc = this.zmz_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    var tmp2_cached = Companion_getInstance_31().ymz_1;
    tmp1_output.l49(tmp0_desc, 0, tmp2_cached[0], value.bn0_1);
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_10).e44 = function (encoder, value) {
    return this.an0(encoder, value instanceof NavMap ? value : THROW_CCE());
  };
  var $serializer_instance_10;
  function $serializer_getInstance_22() {
    if ($serializer_instance_10 == null)
      new $serializer_10();
    return $serializer_instance_10;
  }
  function NavMap_init_$Init$(seen1, navPoints, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_22().zmz_1);
    }
    $this.bn0_1 = navPoints;
    return $this;
  }
  function NavMap_init_$Create$(seen1, navPoints, serializationConstructorMarker) {
    return NavMap_init_$Init$(seen1, navPoints, serializationConstructorMarker, objectCreate(protoOf(NavMap)));
  }
  function NavMap() {
  }
  function Companion_15() {
    Companion_instance_63 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.cn0_1 = [new ArrayListSerializer($serializer_getInstance_21()), null, null, null];
  }
  var Companion_instance_63;
  function Companion_getInstance_32() {
    if (Companion_instance_63 == null)
      new Companion_15();
    return Companion_instance_63;
  }
  function $serializer_11() {
    $serializer_instance_11 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.ncx.NavPoint', this, 4);
    tmp0_serialDesc.g4f('navLabels', false);
    tmp0_serialDesc.g4f('content', false);
    tmp0_serialDesc.g4f('id', false);
    tmp0_serialDesc.g4f('childPoints', false);
    tmp0_serialDesc.i4f(new XmlSerialName('navPoint', 'http://www.daisy.org/z3986/2005/ncx/'));
    this.dn0_1 = tmp0_serialDesc;
  }
  protoOf($serializer_11).d44 = function () {
    return this.dn0_1;
  };
  protoOf($serializer_11).x4f = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_32().cn0_1[0], $serializer_getInstance_18(), StringSerializer_getInstance(), new ArrayListSerializer($serializer_getInstance_23())];
  };
  protoOf($serializer_11).f44 = function (decoder) {
    var tmp0_desc = this.dn0_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_input = decoder.v47(tmp0_desc);
    var tmp9_cached = Companion_getInstance_32().cn0_1;
    if (tmp8_input.k48()) {
      tmp4_local0 = tmp8_input.h48(tmp0_desc, 0, tmp9_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp8_input.h48(tmp0_desc, 1, $serializer_getInstance_18(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp8_input.f48(tmp0_desc, 2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp8_input.h48(tmp0_desc, 3, new ArrayListSerializer($serializer_getInstance_23()), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp8_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp8_input.h48(tmp0_desc, 0, tmp9_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp8_input.h48(tmp0_desc, 1, $serializer_getInstance_18(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp8_input.f48(tmp0_desc, 2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp8_input.h48(tmp0_desc, 3, new ArrayListSerializer($serializer_getInstance_23()), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp8_input.w47(tmp0_desc);
    return NavPoint_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
  };
  protoOf($serializer_11).en0 = function (encoder, value) {
    var tmp0_desc = this.dn0_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    var tmp2_cached = Companion_getInstance_32().cn0_1;
    tmp1_output.l49(tmp0_desc, 0, tmp2_cached[0], value.fn0_1);
    tmp1_output.l49(tmp0_desc, 1, $serializer_getInstance_18(), value.gn0_1);
    tmp1_output.j49(tmp0_desc, 2, value.hn0_1);
    tmp1_output.l49(tmp0_desc, 3, new ArrayListSerializer($serializer_getInstance_23()), value.in0_1);
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_11).e44 = function (encoder, value) {
    return this.en0(encoder, value instanceof NavPoint ? value : THROW_CCE());
  };
  var $serializer_instance_11;
  function $serializer_getInstance_23() {
    if ($serializer_instance_11 == null)
      new $serializer_11();
    return $serializer_instance_11;
  }
  function NavPoint_init_$Init$(seen1, navLabels, content, id, childPoints, serializationConstructorMarker, $this) {
    if (!(15 === (15 & seen1))) {
      throwMissingFieldException(seen1, 15, $serializer_getInstance_23().dn0_1);
    }
    $this.fn0_1 = navLabels;
    $this.gn0_1 = content;
    $this.hn0_1 = id;
    $this.in0_1 = childPoints;
    return $this;
  }
  function NavPoint_init_$Create$(seen1, navLabels, content, id, childPoints, serializationConstructorMarker) {
    return NavPoint_init_$Init$(seen1, navLabels, content, id, childPoints, serializationConstructorMarker, objectCreate(protoOf(NavPoint)));
  }
  function NavPoint() {
  }
  function Companion_16() {
    this.jn0_1 = 'http://www.daisy.org/z3986/2005/ncx/';
    this.kn0_1 = 'application/x-dtbncx+xml';
  }
  var Companion_instance_64;
  function Companion_getInstance_33() {
    return Companion_instance_64;
  }
  function $serializer_12() {
    $serializer_instance_12 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.ncx.NcxDocument', this, 3);
    tmp0_serialDesc.g4f('head', false);
    tmp0_serialDesc.g4f('docTitle', false);
    tmp0_serialDesc.g4f('navMap', false);
    tmp0_serialDesc.i4f(new XmlSerialName('ncx', 'http://www.daisy.org/z3986/2005/ncx/'));
    this.ln0_1 = tmp0_serialDesc;
  }
  protoOf($serializer_12).d44 = function () {
    return this.ln0_1;
  };
  protoOf($serializer_12).x4f = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [$serializer_getInstance_20(), $serializer_getInstance_19(), $serializer_getInstance_22()];
  };
  protoOf($serializer_12).f44 = function (decoder) {
    var tmp0_desc = this.ln0_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_input = decoder.v47(tmp0_desc);
    if (tmp7_input.k48()) {
      tmp4_local0 = tmp7_input.h48(tmp0_desc, 0, $serializer_getInstance_20(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp7_input.h48(tmp0_desc, 1, $serializer_getInstance_19(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp7_input.h48(tmp0_desc, 2, $serializer_getInstance_22(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp7_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp7_input.h48(tmp0_desc, 0, $serializer_getInstance_20(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp7_input.h48(tmp0_desc, 1, $serializer_getInstance_19(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp7_input.h48(tmp0_desc, 2, $serializer_getInstance_22(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp7_input.w47(tmp0_desc);
    return NcxDocument_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
  };
  protoOf($serializer_12).mn0 = function (encoder, value) {
    var tmp0_desc = this.ln0_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    tmp1_output.l49(tmp0_desc, 0, $serializer_getInstance_20(), value.nn0_1);
    tmp1_output.l49(tmp0_desc, 1, $serializer_getInstance_19(), value.on0_1);
    tmp1_output.l49(tmp0_desc, 2, $serializer_getInstance_22(), value.pn0_1);
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_12).e44 = function (encoder, value) {
    return this.mn0(encoder, value instanceof NcxDocument ? value : THROW_CCE());
  };
  var $serializer_instance_12;
  function $serializer_getInstance_24() {
    if ($serializer_instance_12 == null)
      new $serializer_12();
    return $serializer_instance_12;
  }
  function NcxDocument_init_$Init$(seen1, head, docTitle, navMap, serializationConstructorMarker, $this) {
    if (!(7 === (7 & seen1))) {
      throwMissingFieldException(seen1, 7, $serializer_getInstance_24().ln0_1);
    }
    $this.nn0_1 = head;
    $this.on0_1 = docTitle;
    $this.pn0_1 = navMap;
    return $this;
  }
  function NcxDocument_init_$Create$(seen1, head, docTitle, navMap, serializationConstructorMarker) {
    return NcxDocument_init_$Init$(seen1, head, docTitle, navMap, serializationConstructorMarker, objectCreate(protoOf(NcxDocument)));
  }
  function NcxDocument(head, docTitle, navMap) {
    this.nn0_1 = head;
    this.on0_1 = docTitle;
    this.pn0_1 = navMap;
  }
  function Companion_17() {
  }
  var Companion_instance_65;
  function Companion_getInstance_34() {
    return Companion_instance_65;
  }
  function $serializer_13() {
    $serializer_instance_13 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.ncx.Text', this, 1);
    tmp0_serialDesc.g4f('content', true);
    tmp0_serialDesc.h4f(new XmlValue());
    tmp0_serialDesc.i4f(new XmlSerialName('text', 'http://www.daisy.org/z3986/2005/ncx/'));
    this.qn0_1 = tmp0_serialDesc;
  }
  protoOf($serializer_13).d44 = function () {
    return this.qn0_1;
  };
  protoOf($serializer_13).x4f = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance()];
  };
  protoOf($serializer_13).f44 = function (decoder) {
    var tmp0_desc = this.qn0_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.v47(tmp0_desc);
    if (tmp5_input.k48()) {
      tmp4_local0 = tmp5_input.f48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.f48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.w47(tmp0_desc);
    return Text_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_13).rn0 = function (encoder, value) {
    var tmp0_desc = this.qn0_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    if (tmp1_output.r49(tmp0_desc, 0) ? true : !(value.sn0_1 === '')) {
      tmp1_output.j49(tmp0_desc, 0, value.sn0_1);
    }
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_13).e44 = function (encoder, value) {
    return this.rn0(encoder, value instanceof Text ? value : THROW_CCE());
  };
  var $serializer_instance_13;
  function $serializer_getInstance_25() {
    if ($serializer_instance_13 == null)
      new $serializer_13();
    return $serializer_instance_13;
  }
  function Text_init_$Init$(seen1, content, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_25().qn0_1);
    }
    if (0 === (seen1 & 1))
      $this.sn0_1 = '';
    else
      $this.sn0_1 = content;
    return $this;
  }
  function Text_init_$Create$(seen1, content, serializationConstructorMarker) {
    return Text_init_$Init$(seen1, content, serializationConstructorMarker, objectCreate(protoOf(Text)));
  }
  function Text(content) {
    content = content === VOID ? '' : content;
    this.sn0_1 = content;
  }
  function Companion_18() {
  }
  var Companion_instance_66;
  function Companion_getInstance_35() {
    return Companion_instance_66;
  }
  function $serializer_14() {
    $serializer_instance_14 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.DcCreator', this, 2);
    tmp0_serialDesc.g4f('id', true);
    tmp0_serialDesc.g4f('content', true);
    tmp0_serialDesc.h4f(new XmlValue());
    tmp0_serialDesc.i4f(new XmlSerialName('creator', 'http://purl.org/dc/elements/1.1/'));
    this.tn0_1 = tmp0_serialDesc;
  }
  protoOf($serializer_14).d44 = function () {
    return this.tn0_1;
  };
  protoOf($serializer_14).x4f = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), StringSerializer_getInstance()];
  };
  protoOf($serializer_14).f44 = function (decoder) {
    var tmp0_desc = this.tn0_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.v47(tmp0_desc);
    if (tmp6_input.k48()) {
      tmp4_local0 = tmp6_input.j48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.f48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.j48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.f48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.w47(tmp0_desc);
    return DcCreator_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_14).un0 = function (encoder, value) {
    var tmp0_desc = this.tn0_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    if (tmp1_output.r49(tmp0_desc, 0) ? true : !(value.vn0_1 == null)) {
      tmp1_output.n49(tmp0_desc, 0, StringSerializer_getInstance(), value.vn0_1);
    }
    if (tmp1_output.r49(tmp0_desc, 1) ? true : !(value.wn0_1 === '')) {
      tmp1_output.j49(tmp0_desc, 1, value.wn0_1);
    }
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_14).e44 = function (encoder, value) {
    return this.un0(encoder, value instanceof DcCreator ? value : THROW_CCE());
  };
  var $serializer_instance_14;
  function $serializer_getInstance_26() {
    if ($serializer_instance_14 == null)
      new $serializer_14();
    return $serializer_instance_14;
  }
  function DcCreator_init_$Init$(seen1, id, content, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_26().tn0_1);
    }
    if (0 === (seen1 & 1))
      $this.vn0_1 = null;
    else
      $this.vn0_1 = id;
    if (0 === (seen1 & 2))
      $this.wn0_1 = '';
    else
      $this.wn0_1 = content;
    return $this;
  }
  function DcCreator_init_$Create$(seen1, id, content, serializationConstructorMarker) {
    return DcCreator_init_$Init$(seen1, id, content, serializationConstructorMarker, objectCreate(protoOf(DcCreator)));
  }
  function DcCreator(id, content) {
    id = id === VOID ? null : id;
    content = content === VOID ? '' : content;
    this.vn0_1 = id;
    this.wn0_1 = content;
  }
  function Companion_19() {
  }
  var Companion_instance_67;
  function Companion_getInstance_36() {
    return Companion_instance_67;
  }
  function $serializer_15() {
    $serializer_instance_15 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.DcDescription', this, 2);
    tmp0_serialDesc.g4f('lang', true);
    tmp0_serialDesc.g4f('content', true);
    tmp0_serialDesc.h4f(new XmlValue());
    tmp0_serialDesc.i4f(new XmlSerialName('description', 'http://purl.org/dc/elements/1.1/'));
    this.xn0_1 = tmp0_serialDesc;
  }
  protoOf($serializer_15).d44 = function () {
    return this.xn0_1;
  };
  protoOf($serializer_15).x4f = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), StringSerializer_getInstance()];
  };
  protoOf($serializer_15).f44 = function (decoder) {
    var tmp0_desc = this.xn0_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.v47(tmp0_desc);
    if (tmp6_input.k48()) {
      tmp4_local0 = tmp6_input.j48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.f48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.j48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.f48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.w47(tmp0_desc);
    return DcDescription_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_15).yn0 = function (encoder, value) {
    var tmp0_desc = this.xn0_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    if (tmp1_output.r49(tmp0_desc, 0) ? true : !(value.zn0_1 == null)) {
      tmp1_output.n49(tmp0_desc, 0, StringSerializer_getInstance(), value.zn0_1);
    }
    if (tmp1_output.r49(tmp0_desc, 1) ? true : !(value.an1_1 === '')) {
      tmp1_output.j49(tmp0_desc, 1, value.an1_1);
    }
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_15).e44 = function (encoder, value) {
    return this.yn0(encoder, value instanceof DcDescription ? value : THROW_CCE());
  };
  var $serializer_instance_15;
  function $serializer_getInstance_27() {
    if ($serializer_instance_15 == null)
      new $serializer_15();
    return $serializer_instance_15;
  }
  function DcDescription_init_$Init$(seen1, lang, content, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_27().xn0_1);
    }
    if (0 === (seen1 & 1))
      $this.zn0_1 = null;
    else
      $this.zn0_1 = lang;
    if (0 === (seen1 & 2))
      $this.an1_1 = '';
    else
      $this.an1_1 = content;
    return $this;
  }
  function DcDescription_init_$Create$(seen1, lang, content, serializationConstructorMarker) {
    return DcDescription_init_$Init$(seen1, lang, content, serializationConstructorMarker, objectCreate(protoOf(DcDescription)));
  }
  function DcDescription(lang, content) {
    lang = lang === VOID ? null : lang;
    content = content === VOID ? '' : content;
    this.zn0_1 = lang;
    this.an1_1 = content;
  }
  function Companion_20() {
  }
  var Companion_instance_68;
  function Companion_getInstance_37() {
    return Companion_instance_68;
  }
  function $serializer_16() {
    $serializer_instance_16 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.DcIdentifier', this, 2);
    tmp0_serialDesc.g4f('id', true);
    tmp0_serialDesc.g4f('content', true);
    tmp0_serialDesc.h4f(new XmlValue());
    tmp0_serialDesc.i4f(new XmlSerialName('identifier', 'http://purl.org/dc/elements/1.1/'));
    this.bn1_1 = tmp0_serialDesc;
  }
  protoOf($serializer_16).d44 = function () {
    return this.bn1_1;
  };
  protoOf($serializer_16).x4f = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), StringSerializer_getInstance()];
  };
  protoOf($serializer_16).f44 = function (decoder) {
    var tmp0_desc = this.bn1_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.v47(tmp0_desc);
    if (tmp6_input.k48()) {
      tmp4_local0 = tmp6_input.j48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.f48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.j48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.f48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.w47(tmp0_desc);
    return DcIdentifier_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_16).cn1 = function (encoder, value) {
    var tmp0_desc = this.bn1_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    if (tmp1_output.r49(tmp0_desc, 0) ? true : !(value.dn1_1 == null)) {
      tmp1_output.n49(tmp0_desc, 0, StringSerializer_getInstance(), value.dn1_1);
    }
    if (tmp1_output.r49(tmp0_desc, 1) ? true : !(value.en1_1 === '')) {
      tmp1_output.j49(tmp0_desc, 1, value.en1_1);
    }
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_16).e44 = function (encoder, value) {
    return this.cn1(encoder, value instanceof DcIdentifier ? value : THROW_CCE());
  };
  var $serializer_instance_16;
  function $serializer_getInstance_28() {
    if ($serializer_instance_16 == null)
      new $serializer_16();
    return $serializer_instance_16;
  }
  function DcIdentifier_init_$Init$(seen1, id, content, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_28().bn1_1);
    }
    if (0 === (seen1 & 1))
      $this.dn1_1 = null;
    else
      $this.dn1_1 = id;
    if (0 === (seen1 & 2))
      $this.en1_1 = '';
    else
      $this.en1_1 = content;
    return $this;
  }
  function DcIdentifier_init_$Create$(seen1, id, content, serializationConstructorMarker) {
    return DcIdentifier_init_$Init$(seen1, id, content, serializationConstructorMarker, objectCreate(protoOf(DcIdentifier)));
  }
  function DcIdentifier(id, content) {
    id = id === VOID ? null : id;
    content = content === VOID ? '' : content;
    this.dn1_1 = id;
    this.en1_1 = content;
  }
  function $serializer_17() {
    $serializer_instance_17 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.DcLanguage', this, 1);
    tmp0_serialDesc.g4f('content', false);
    tmp0_serialDesc.h4f(new XmlValue());
    tmp0_serialDesc.i4f(new XmlSerialName('language', 'http://purl.org/dc/elements/1.1/'));
    this.fn1_1 = tmp0_serialDesc;
  }
  protoOf($serializer_17).d44 = function () {
    return this.fn1_1;
  };
  protoOf($serializer_17).x4f = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance()];
  };
  protoOf($serializer_17).f44 = function (decoder) {
    var tmp0_desc = this.fn1_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.v47(tmp0_desc);
    if (tmp5_input.k48()) {
      tmp4_local0 = tmp5_input.f48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.f48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.w47(tmp0_desc);
    return DcLanguage_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_17).gn1 = function (encoder, value) {
    var tmp0_desc = this.fn1_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    tmp1_output.j49(tmp0_desc, 0, value.hn1_1);
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_17).e44 = function (encoder, value) {
    return this.gn1(encoder, value instanceof DcLanguage ? value : THROW_CCE());
  };
  var $serializer_instance_17;
  function $serializer_getInstance_29() {
    if ($serializer_instance_17 == null)
      new $serializer_17();
    return $serializer_instance_17;
  }
  function DcLanguage_init_$Init$(seen1, content, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_29().fn1_1);
    }
    $this.hn1_1 = content;
    return $this;
  }
  function DcLanguage_init_$Create$(seen1, content, serializationConstructorMarker) {
    return DcLanguage_init_$Init$(seen1, content, serializationConstructorMarker, objectCreate(protoOf(DcLanguage)));
  }
  function DcLanguage() {
  }
  function Companion_21() {
  }
  var Companion_instance_69;
  function Companion_getInstance_38() {
    return Companion_instance_69;
  }
  function $serializer_18() {
    $serializer_instance_18 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.DcTitle', this, 2);
    tmp0_serialDesc.g4f('lang', true);
    tmp0_serialDesc.h4f(new XmlSerialName(VOID, VOID, 'xml'));
    tmp0_serialDesc.g4f('content', true);
    tmp0_serialDesc.h4f(new XmlValue());
    tmp0_serialDesc.i4f(new XmlSerialName('title', 'http://purl.org/dc/elements/1.1/'));
    this.in1_1 = tmp0_serialDesc;
  }
  protoOf($serializer_18).d44 = function () {
    return this.in1_1;
  };
  protoOf($serializer_18).x4f = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), StringSerializer_getInstance()];
  };
  protoOf($serializer_18).f44 = function (decoder) {
    var tmp0_desc = this.in1_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.v47(tmp0_desc);
    if (tmp6_input.k48()) {
      tmp4_local0 = tmp6_input.j48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.f48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.j48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.f48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.w47(tmp0_desc);
    return DcTitle_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_18).jn1 = function (encoder, value) {
    var tmp0_desc = this.in1_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    if (tmp1_output.r49(tmp0_desc, 0) ? true : !(value.kn1_1 == null)) {
      tmp1_output.n49(tmp0_desc, 0, StringSerializer_getInstance(), value.kn1_1);
    }
    if (tmp1_output.r49(tmp0_desc, 1) ? true : !(value.ln1_1 === '')) {
      tmp1_output.j49(tmp0_desc, 1, value.ln1_1);
    }
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_18).e44 = function (encoder, value) {
    return this.jn1(encoder, value instanceof DcTitle ? value : THROW_CCE());
  };
  var $serializer_instance_18;
  function $serializer_getInstance_30() {
    if ($serializer_instance_18 == null)
      new $serializer_18();
    return $serializer_instance_18;
  }
  function DcTitle_init_$Init$(seen1, lang, content, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_30().in1_1);
    }
    if (0 === (seen1 & 1))
      $this.kn1_1 = null;
    else
      $this.kn1_1 = lang;
    if (0 === (seen1 & 2))
      $this.ln1_1 = '';
    else
      $this.ln1_1 = content;
    return $this;
  }
  function DcTitle_init_$Create$(seen1, lang, content, serializationConstructorMarker) {
    return DcTitle_init_$Init$(seen1, lang, content, serializationConstructorMarker, objectCreate(protoOf(DcTitle)));
  }
  function DcTitle(lang, content) {
    lang = lang === VOID ? null : lang;
    content = content === VOID ? '' : content;
    this.kn1_1 = lang;
    this.ln1_1 = content;
  }
  function $serializer_19() {
    $serializer_instance_19 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.Item', this, 4);
    tmp0_serialDesc.g4f('id', false);
    tmp0_serialDesc.g4f('href', false);
    tmp0_serialDesc.g4f('properties', true);
    tmp0_serialDesc.g4f('mediaType', false);
    tmp0_serialDesc.h4f(new XmlSerialName('media-type'));
    tmp0_serialDesc.i4f(new XmlSerialName('item', 'http://www.idpf.org/2007/opf'));
    this.mn1_1 = tmp0_serialDesc;
  }
  protoOf($serializer_19).d44 = function () {
    return this.mn1_1;
  };
  protoOf($serializer_19).x4f = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance(), StringSerializer_getInstance(), get_nullable(StringSerializer_getInstance()), StringSerializer_getInstance()];
  };
  protoOf($serializer_19).f44 = function (decoder) {
    var tmp0_desc = this.mn1_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_input = decoder.v47(tmp0_desc);
    if (tmp8_input.k48()) {
      tmp4_local0 = tmp8_input.f48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp8_input.f48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp8_input.j48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp8_input.f48(tmp0_desc, 3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp8_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp8_input.f48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp8_input.f48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp8_input.j48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp8_input.f48(tmp0_desc, 3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp8_input.w47(tmp0_desc);
    return Item_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
  };
  protoOf($serializer_19).nn1 = function (encoder, value) {
    var tmp0_desc = this.mn1_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    tmp1_output.j49(tmp0_desc, 0, value.on1_1);
    tmp1_output.j49(tmp0_desc, 1, value.pn1_1);
    if (tmp1_output.r49(tmp0_desc, 2) ? true : !(value.qn1_1 == null)) {
      tmp1_output.n49(tmp0_desc, 2, StringSerializer_getInstance(), value.qn1_1);
    }
    tmp1_output.j49(tmp0_desc, 3, value.rn1_1);
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_19).e44 = function (encoder, value) {
    return this.nn1(encoder, value instanceof Item ? value : THROW_CCE());
  };
  var $serializer_instance_19;
  function $serializer_getInstance_31() {
    if ($serializer_instance_19 == null)
      new $serializer_19();
    return $serializer_instance_19;
  }
  function Item_init_$Init$(seen1, id, href, properties, mediaType, serializationConstructorMarker, $this) {
    if (!(11 === (11 & seen1))) {
      throwMissingFieldException(seen1, 11, $serializer_getInstance_31().mn1_1);
    }
    $this.on1_1 = id;
    $this.pn1_1 = href;
    if (0 === (seen1 & 4))
      $this.qn1_1 = null;
    else
      $this.qn1_1 = properties;
    $this.rn1_1 = mediaType;
    return $this;
  }
  function Item_init_$Create$(seen1, id, href, properties, mediaType, serializationConstructorMarker) {
    return Item_init_$Init$(seen1, id, href, properties, mediaType, serializationConstructorMarker, objectCreate(protoOf(Item)));
  }
  function Item() {
  }
  function Companion_22() {
  }
  var Companion_instance_70;
  function Companion_getInstance_39() {
    return Companion_instance_70;
  }
  function $serializer_20() {
    $serializer_instance_20 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.ItemRef', this, 1);
    tmp0_serialDesc.g4f('idRef', true);
    tmp0_serialDesc.h4f(new XmlSerialName('idref'));
    tmp0_serialDesc.i4f(new XmlSerialName('itemref', 'http://www.idpf.org/2007/opf'));
    this.sn1_1 = tmp0_serialDesc;
  }
  protoOf($serializer_20).d44 = function () {
    return this.sn1_1;
  };
  protoOf($serializer_20).x4f = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance()];
  };
  protoOf($serializer_20).f44 = function (decoder) {
    var tmp0_desc = this.sn1_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.v47(tmp0_desc);
    if (tmp5_input.k48()) {
      tmp4_local0 = tmp5_input.f48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.f48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.w47(tmp0_desc);
    return ItemRef_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_20).tn1 = function (encoder, value) {
    var tmp0_desc = this.sn1_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    if (tmp1_output.r49(tmp0_desc, 0) ? true : !(value.un1_1 === '')) {
      tmp1_output.j49(tmp0_desc, 0, value.un1_1);
    }
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_20).e44 = function (encoder, value) {
    return this.tn1(encoder, value instanceof ItemRef ? value : THROW_CCE());
  };
  var $serializer_instance_20;
  function $serializer_getInstance_32() {
    if ($serializer_instance_20 == null)
      new $serializer_20();
    return $serializer_instance_20;
  }
  function ItemRef_init_$Init$(seen1, idRef, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_32().sn1_1);
    }
    if (0 === (seen1 & 1))
      $this.un1_1 = '';
    else
      $this.un1_1 = idRef;
    return $this;
  }
  function ItemRef_init_$Create$(seen1, idRef, serializationConstructorMarker) {
    return ItemRef_init_$Init$(seen1, idRef, serializationConstructorMarker, objectCreate(protoOf(ItemRef)));
  }
  function ItemRef(idRef) {
    idRef = idRef === VOID ? '' : idRef;
    this.un1_1 = idRef;
  }
  function Companion_23() {
    Companion_instance_71 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.vn1_1 = [new ArrayListSerializer($serializer_getInstance_31())];
  }
  var Companion_instance_71;
  function Companion_getInstance_40() {
    if (Companion_instance_71 == null)
      new Companion_23();
    return Companion_instance_71;
  }
  function $serializer_21() {
    $serializer_instance_21 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.Manifest', this, 1);
    tmp0_serialDesc.g4f('items', true);
    tmp0_serialDesc.i4f(new XmlSerialName('manifest', 'http://www.idpf.org/2007/opf'));
    this.wn1_1 = tmp0_serialDesc;
  }
  protoOf($serializer_21).d44 = function () {
    return this.wn1_1;
  };
  protoOf($serializer_21).x4f = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_40().vn1_1[0]];
  };
  protoOf($serializer_21).f44 = function (decoder) {
    var tmp0_desc = this.wn1_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.v47(tmp0_desc);
    var tmp6_cached = Companion_getInstance_40().vn1_1;
    if (tmp5_input.k48()) {
      tmp4_local0 = tmp5_input.h48(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.h48(tmp0_desc, 0, tmp6_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.w47(tmp0_desc);
    return Manifest_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_21).xn1 = function (encoder, value) {
    var tmp0_desc = this.wn1_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    var tmp2_cached = Companion_getInstance_40().vn1_1;
    if (tmp1_output.r49(tmp0_desc, 0) ? true : !equals(value.yn1_1, emptyList())) {
      tmp1_output.l49(tmp0_desc, 0, tmp2_cached[0], value.yn1_1);
    }
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_21).e44 = function (encoder, value) {
    return this.xn1(encoder, value instanceof Manifest ? value : THROW_CCE());
  };
  var $serializer_instance_21;
  function $serializer_getInstance_33() {
    if ($serializer_instance_21 == null)
      new $serializer_21();
    return $serializer_instance_21;
  }
  function Manifest_init_$Init$(seen1, items, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_33().wn1_1);
    }
    if (0 === (seen1 & 1))
      $this.yn1_1 = emptyList();
    else
      $this.yn1_1 = items;
    return $this;
  }
  function Manifest_init_$Create$(seen1, items, serializationConstructorMarker) {
    return Manifest_init_$Init$(seen1, items, serializationConstructorMarker, objectCreate(protoOf(Manifest)));
  }
  function Manifest(items) {
    Companion_getInstance_40();
    items = items === VOID ? emptyList() : items;
    this.yn1_1 = items;
  }
  function Companion_24() {
  }
  var Companion_instance_72;
  function Companion_getInstance_41() {
    return Companion_instance_72;
  }
  function $serializer_22() {
    $serializer_instance_22 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.Meta', this, 2);
    tmp0_serialDesc.g4f('name', true);
    tmp0_serialDesc.g4f('content', true);
    tmp0_serialDesc.i4f(new XmlSerialName('meta', 'http://www.idpf.org/2007/opf'));
    this.zn1_1 = tmp0_serialDesc;
  }
  protoOf($serializer_22).d44 = function () {
    return this.zn1_1;
  };
  protoOf($serializer_22).x4f = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance())];
  };
  protoOf($serializer_22).f44 = function (decoder) {
    var tmp0_desc = this.zn1_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.v47(tmp0_desc);
    if (tmp6_input.k48()) {
      tmp4_local0 = tmp6_input.j48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.j48(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.j48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.j48(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.w47(tmp0_desc);
    return Meta_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_22).an2 = function (encoder, value) {
    var tmp0_desc = this.zn1_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    if (tmp1_output.r49(tmp0_desc, 0) ? true : !(value.bn2_1 == null)) {
      tmp1_output.n49(tmp0_desc, 0, StringSerializer_getInstance(), value.bn2_1);
    }
    if (tmp1_output.r49(tmp0_desc, 1) ? true : !(value.cn2_1 == null)) {
      tmp1_output.n49(tmp0_desc, 1, StringSerializer_getInstance(), value.cn2_1);
    }
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_22).e44 = function (encoder, value) {
    return this.an2(encoder, value instanceof Meta ? value : THROW_CCE());
  };
  var $serializer_instance_22;
  function $serializer_getInstance_34() {
    if ($serializer_instance_22 == null)
      new $serializer_22();
    return $serializer_instance_22;
  }
  function Meta_init_$Init$(seen1, name, content, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_34().zn1_1);
    }
    if (0 === (seen1 & 1))
      $this.bn2_1 = null;
    else
      $this.bn2_1 = name;
    if (0 === (seen1 & 2))
      $this.cn2_1 = null;
    else
      $this.cn2_1 = content;
    return $this;
  }
  function Meta_init_$Create$(seen1, name, content, serializationConstructorMarker) {
    return Meta_init_$Init$(seen1, name, content, serializationConstructorMarker, objectCreate(protoOf(Meta)));
  }
  function Meta(name, content) {
    name = name === VOID ? null : name;
    content = content === VOID ? null : content;
    this.bn2_1 = name;
    this.cn2_1 = content;
  }
  function Companion_25() {
    Companion_instance_73 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.dn2_1 = [new ArrayListSerializer($serializer_getInstance_30()), new ArrayListSerializer($serializer_getInstance_26()), new ArrayListSerializer($serializer_getInstance_29()), new ArrayListSerializer($serializer_getInstance_27()), new ArrayListSerializer($serializer_getInstance_28()), new ArrayListSerializer($serializer_getInstance_34())];
  }
  var Companion_instance_73;
  function Companion_getInstance_42() {
    if (Companion_instance_73 == null)
      new Companion_25();
    return Companion_instance_73;
  }
  function $serializer_23() {
    $serializer_instance_23 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.Metadata', this, 6);
    tmp0_serialDesc.g4f('titles', true);
    tmp0_serialDesc.g4f('creators', true);
    tmp0_serialDesc.g4f('languages', true);
    tmp0_serialDesc.g4f('descriptions', true);
    tmp0_serialDesc.g4f('identifiers', true);
    tmp0_serialDesc.g4f('metas', true);
    tmp0_serialDesc.i4f(new XmlSerialName('metadata', 'http://www.idpf.org/2007/opf'));
    this.en2_1 = tmp0_serialDesc;
  }
  protoOf($serializer_23).d44 = function () {
    return this.en2_1;
  };
  protoOf($serializer_23).x4f = function () {
    var tmp0_cached = Companion_getInstance_42().dn2_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [tmp0_cached[0], tmp0_cached[1], tmp0_cached[2], tmp0_cached[3], tmp0_cached[4], tmp0_cached[5]];
  };
  protoOf($serializer_23).f44 = function (decoder) {
    var tmp0_desc = this.en2_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_input = decoder.v47(tmp0_desc);
    var tmp11_cached = Companion_getInstance_42().dn2_1;
    if (tmp10_input.k48()) {
      tmp4_local0 = tmp10_input.h48(tmp0_desc, 0, tmp11_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp10_input.h48(tmp0_desc, 1, tmp11_cached[1], tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp10_input.h48(tmp0_desc, 2, tmp11_cached[2], tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp10_input.h48(tmp0_desc, 3, tmp11_cached[3], tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp10_input.h48(tmp0_desc, 4, tmp11_cached[4], tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp10_input.h48(tmp0_desc, 5, tmp11_cached[5], tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp10_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp10_input.h48(tmp0_desc, 0, tmp11_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp10_input.h48(tmp0_desc, 1, tmp11_cached[1], tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp10_input.h48(tmp0_desc, 2, tmp11_cached[2], tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp10_input.h48(tmp0_desc, 3, tmp11_cached[3], tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp10_input.h48(tmp0_desc, 4, tmp11_cached[4], tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp10_input.h48(tmp0_desc, 5, tmp11_cached[5], tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp10_input.w47(tmp0_desc);
    return Metadata_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, null);
  };
  protoOf($serializer_23).fn2 = function (encoder, value) {
    var tmp0_desc = this.en2_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    var tmp2_cached = Companion_getInstance_42().dn2_1;
    if (tmp1_output.r49(tmp0_desc, 0) ? true : !equals(value.gn2_1, emptyList())) {
      tmp1_output.l49(tmp0_desc, 0, tmp2_cached[0], value.gn2_1);
    }
    if (tmp1_output.r49(tmp0_desc, 1) ? true : !equals(value.hn2_1, emptyList())) {
      tmp1_output.l49(tmp0_desc, 1, tmp2_cached[1], value.hn2_1);
    }
    if (tmp1_output.r49(tmp0_desc, 2) ? true : !equals(value.in2_1, emptyList())) {
      tmp1_output.l49(tmp0_desc, 2, tmp2_cached[2], value.in2_1);
    }
    if (tmp1_output.r49(tmp0_desc, 3) ? true : !equals(value.jn2_1, emptyList())) {
      tmp1_output.l49(tmp0_desc, 3, tmp2_cached[3], value.jn2_1);
    }
    if (tmp1_output.r49(tmp0_desc, 4) ? true : !equals(value.kn2_1, emptyList())) {
      tmp1_output.l49(tmp0_desc, 4, tmp2_cached[4], value.kn2_1);
    }
    if (tmp1_output.r49(tmp0_desc, 5) ? true : !equals(value.ln2_1, emptyList())) {
      tmp1_output.l49(tmp0_desc, 5, tmp2_cached[5], value.ln2_1);
    }
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_23).e44 = function (encoder, value) {
    return this.fn2(encoder, value instanceof Metadata ? value : THROW_CCE());
  };
  var $serializer_instance_23;
  function $serializer_getInstance_35() {
    if ($serializer_instance_23 == null)
      new $serializer_23();
    return $serializer_instance_23;
  }
  function Metadata_init_$Init$(seen1, titles, creators, languages, descriptions, identifiers, metas, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_35().en2_1);
    }
    if (0 === (seen1 & 1))
      $this.gn2_1 = emptyList();
    else
      $this.gn2_1 = titles;
    if (0 === (seen1 & 2))
      $this.hn2_1 = emptyList();
    else
      $this.hn2_1 = creators;
    if (0 === (seen1 & 4))
      $this.in2_1 = emptyList();
    else
      $this.in2_1 = languages;
    if (0 === (seen1 & 8))
      $this.jn2_1 = emptyList();
    else
      $this.jn2_1 = descriptions;
    if (0 === (seen1 & 16))
      $this.kn2_1 = emptyList();
    else
      $this.kn2_1 = identifiers;
    if (0 === (seen1 & 32))
      $this.ln2_1 = emptyList();
    else
      $this.ln2_1 = metas;
    return $this;
  }
  function Metadata_init_$Create$(seen1, titles, creators, languages, descriptions, identifiers, metas, serializationConstructorMarker) {
    return Metadata_init_$Init$(seen1, titles, creators, languages, descriptions, identifiers, metas, serializationConstructorMarker, objectCreate(protoOf(Metadata)));
  }
  function Metadata(titles, creators, languages, descriptions, identifiers, metas) {
    Companion_getInstance_42();
    titles = titles === VOID ? emptyList() : titles;
    creators = creators === VOID ? emptyList() : creators;
    languages = languages === VOID ? emptyList() : languages;
    descriptions = descriptions === VOID ? emptyList() : descriptions;
    identifiers = identifiers === VOID ? emptyList() : identifiers;
    metas = metas === VOID ? emptyList() : metas;
    this.gn2_1 = titles;
    this.hn2_1 = creators;
    this.in2_1 = languages;
    this.jn2_1 = descriptions;
    this.kn2_1 = identifiers;
    this.ln2_1 = metas;
  }
  function Companion_26() {
    this.mn2_1 = 'http://www.idpf.org/2007/opf';
    this.nn2_1 = 'http://purl.org/dc/elements/1.1/';
  }
  protoOf(Companion_26).a4r = function () {
    return $serializer_getInstance_36();
  };
  var Companion_instance_74;
  function Companion_getInstance_43() {
    return Companion_instance_74;
  }
  function $serializer_24() {
    $serializer_instance_24 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.PackageDocument', this, 5);
    tmp0_serialDesc.g4f('version', true);
    tmp0_serialDesc.g4f('uniqueIdentifier', true);
    tmp0_serialDesc.h4f(new XmlSerialName('unique-identifier'));
    tmp0_serialDesc.g4f('metadata', true);
    tmp0_serialDesc.g4f('manifest', true);
    tmp0_serialDesc.g4f('spine', true);
    tmp0_serialDesc.i4f(new XmlSerialName('package', 'http://www.idpf.org/2007/opf'));
    this.on2_1 = tmp0_serialDesc;
  }
  protoOf($serializer_24).d44 = function () {
    return this.on2_1;
  };
  protoOf($serializer_24).x4f = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), StringSerializer_getInstance(), $serializer_getInstance_35(), $serializer_getInstance_33(), $serializer_getInstance_37()];
  };
  protoOf($serializer_24).f44 = function (decoder) {
    var tmp0_desc = this.on2_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_input = decoder.v47(tmp0_desc);
    if (tmp9_input.k48()) {
      tmp4_local0 = tmp9_input.j48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp9_input.f48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp9_input.h48(tmp0_desc, 2, $serializer_getInstance_35(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp9_input.h48(tmp0_desc, 3, $serializer_getInstance_33(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp9_input.h48(tmp0_desc, 4, $serializer_getInstance_37(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp9_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp9_input.j48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp9_input.f48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp9_input.h48(tmp0_desc, 2, $serializer_getInstance_35(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp9_input.h48(tmp0_desc, 3, $serializer_getInstance_33(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp9_input.h48(tmp0_desc, 4, $serializer_getInstance_37(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp9_input.w47(tmp0_desc);
    return PackageDocument_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, null);
  };
  protoOf($serializer_24).pn2 = function (encoder, value) {
    var tmp0_desc = this.on2_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    if (tmp1_output.r49(tmp0_desc, 0) ? true : !(value.qn2_1 == null)) {
      tmp1_output.n49(tmp0_desc, 0, StringSerializer_getInstance(), value.qn2_1);
    }
    if (tmp1_output.r49(tmp0_desc, 1) ? true : !(value.rn2_1 === '')) {
      tmp1_output.j49(tmp0_desc, 1, value.rn2_1);
    }
    if (tmp1_output.r49(tmp0_desc, 2) ? true : !equals(value.sn2_1, new Metadata())) {
      tmp1_output.l49(tmp0_desc, 2, $serializer_getInstance_35(), value.sn2_1);
    }
    if (tmp1_output.r49(tmp0_desc, 3) ? true : !equals(value.tn2_1, new Manifest())) {
      tmp1_output.l49(tmp0_desc, 3, $serializer_getInstance_33(), value.tn2_1);
    }
    if (tmp1_output.r49(tmp0_desc, 4) ? true : !equals(value.un2_1, new Spine())) {
      tmp1_output.l49(tmp0_desc, 4, $serializer_getInstance_37(), value.un2_1);
    }
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_24).e44 = function (encoder, value) {
    return this.pn2(encoder, value instanceof PackageDocument ? value : THROW_CCE());
  };
  var $serializer_instance_24;
  function $serializer_getInstance_36() {
    if ($serializer_instance_24 == null)
      new $serializer_24();
    return $serializer_instance_24;
  }
  function PackageDocument_init_$Init$(seen1, version, uniqueIdentifier, metadata, manifest, spine, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_36().on2_1);
    }
    if (0 === (seen1 & 1))
      $this.qn2_1 = null;
    else
      $this.qn2_1 = version;
    if (0 === (seen1 & 2))
      $this.rn2_1 = '';
    else
      $this.rn2_1 = uniqueIdentifier;
    if (0 === (seen1 & 4))
      $this.sn2_1 = new Metadata();
    else
      $this.sn2_1 = metadata;
    if (0 === (seen1 & 8))
      $this.tn2_1 = new Manifest();
    else
      $this.tn2_1 = manifest;
    if (0 === (seen1 & 16))
      $this.un2_1 = new Spine();
    else
      $this.un2_1 = spine;
    return $this;
  }
  function PackageDocument_init_$Create$(seen1, version, uniqueIdentifier, metadata, manifest, spine, serializationConstructorMarker) {
    return PackageDocument_init_$Init$(seen1, version, uniqueIdentifier, metadata, manifest, spine, serializationConstructorMarker, objectCreate(protoOf(PackageDocument)));
  }
  function PackageDocument(version, uniqueIdentifier, metadata, manifest, spine) {
    version = version === VOID ? null : version;
    uniqueIdentifier = uniqueIdentifier === VOID ? '' : uniqueIdentifier;
    metadata = metadata === VOID ? new Metadata() : metadata;
    manifest = manifest === VOID ? new Manifest() : manifest;
    spine = spine === VOID ? new Spine() : spine;
    this.qn2_1 = version;
    this.rn2_1 = uniqueIdentifier;
    this.sn2_1 = metadata;
    this.tn2_1 = manifest;
    this.un2_1 = spine;
  }
  protoOf(PackageDocument).vn2 = function () {
    var whitespaceRegex = Regex_init_$Create$('\\s+');
    var tmp$ret$2;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator = this.tn2_1.yn1_1.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.contentformats.epub.opf.PackageDocument.coverItem.<anonymous>' call
        var tmp0_safe_receiver = element.qn1_1;
        var tmp;
        if (tmp0_safe_receiver == null) {
          tmp = null;
        } else {
          // Inline function 'kotlin.text.split' call
          tmp = whitespaceRegex.y9(tmp0_safe_receiver, 0);
        }
        var tmp1_safe_receiver = tmp;
        var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.a1('cover-image');
        if (tmp2_elvis_lhs == null ? false : tmp2_elvis_lhs) {
          tmp$ret$2 = element;
          break $l$block;
        }
      }
      tmp$ret$2 = null;
    }
    var tmp2_elvis_lhs_0 = tmp$ret$2;
    var tmp_0;
    if (tmp2_elvis_lhs_0 == null) {
      var tmp$ret$4;
      $l$block_0: {
        // Inline function 'kotlin.collections.firstOrNull' call
        var tmp0_iterator_0 = this.sn2_1.ln2_1.w();
        while (tmp0_iterator_0.f()) {
          var element_0 = tmp0_iterator_0.e();
          // Inline function 'com.ustadmobile.core.contentformats.epub.opf.PackageDocument.coverItem.<anonymous>' call
          if (element_0.bn2_1 === 'cover') {
            tmp$ret$4 = element_0;
            break $l$block_0;
          }
        }
        tmp$ret$4 = null;
      }
      var tmp0_safe_receiver_0 = tmp$ret$4;
      var tmp1_safe_receiver_0 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.cn2_1;
      var tmp_1;
      if (tmp1_safe_receiver_0 == null) {
        tmp_1 = null;
      } else {
        // Inline function 'kotlin.let' call
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'com.ustadmobile.core.contentformats.epub.opf.PackageDocument.coverItem.<anonymous>' call
        var tmp$ret$6;
        $l$block_1: {
          // Inline function 'kotlin.collections.firstOrNull' call
          var tmp0_iterator_1 = this.tn2_1.yn1_1.w();
          while (tmp0_iterator_1.f()) {
            var element_1 = tmp0_iterator_1.e();
            // Inline function 'com.ustadmobile.core.contentformats.epub.opf.PackageDocument.coverItem.<anonymous>.<anonymous>' call
            if (element_1.on1_1 === tmp1_safe_receiver_0) {
              tmp$ret$6 = element_1;
              break $l$block_1;
            }
          }
          tmp$ret$6 = null;
        }
        tmp_1 = tmp$ret$6;
      }
      tmp_0 = tmp_1;
    } else {
      tmp_0 = tmp2_elvis_lhs_0;
    }
    return tmp_0;
  };
  protoOf(PackageDocument).wn2 = function () {
    var whiteSpaceRegex = Regex_init_$Create$('\\s+');
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var this_0 = this.tn2_1.yn1_1;
    var destination = ArrayList_init_$Create$();
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.contentformats.epub.opf.PackageDocument.tableOfContentItem.<anonymous>' call
      var tmp0_safe_receiver = element.qn1_1;
      var tmp;
      if (tmp0_safe_receiver == null) {
        tmp = null;
      } else {
        // Inline function 'kotlin.text.split' call
        tmp = whiteSpaceRegex.y9(tmp0_safe_receiver, 0);
      }
      var tmp1_safe_receiver = tmp;
      var tmp_0;
      if (tmp1_safe_receiver == null) {
        tmp_0 = null;
      } else {
        // Inline function 'kotlin.let' call
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'com.ustadmobile.core.contentformats.epub.opf.PackageDocument.tableOfContentItem.<anonymous>.<anonymous>' call
        tmp_0 = tmp1_safe_receiver.a1('toc') ? true : tmp1_safe_receiver.a1('nav');
      }
      var tmp2_elvis_lhs = tmp_0;
      if (tmp2_elvis_lhs == null ? false : tmp2_elvis_lhs) {
        destination.i1(element);
      }
    }
    var tocCandidates = destination;
    var tmp0_safe_receiver_0 = this.un2_1.yn2_1;
    var tmp_1;
    if (tmp0_safe_receiver_0 == null) {
      tmp_1 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.contentformats.epub.opf.PackageDocument.tableOfContentItem.<anonymous>' call
      var tmp$ret$7;
      $l$block: {
        // Inline function 'kotlin.collections.firstOrNull' call
        var tmp0_iterator_0 = this.tn2_1.yn1_1.w();
        while (tmp0_iterator_0.f()) {
          var element_0 = tmp0_iterator_0.e();
          // Inline function 'com.ustadmobile.core.contentformats.epub.opf.PackageDocument.tableOfContentItem.<anonymous>.<anonymous>' call
          if (element_0.on1_1 === tmp0_safe_receiver_0) {
            tmp$ret$7 = element_0;
            break $l$block;
          }
        }
        tmp$ret$7 = null;
      }
      var tmp0_safe_receiver_1 = tmp$ret$7;
      var tmp_2;
      if (tmp0_safe_receiver_1 == null) {
        tmp_2 = null;
      } else {
        // Inline function 'kotlin.let' call
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'com.ustadmobile.core.contentformats.epub.opf.PackageDocument.tableOfContentItem.<anonymous>.<anonymous>' call
        tmp_2 = listOf_0(tmp0_safe_receiver_1);
      }
      var tmp1_elvis_lhs = tmp_2;
      tmp_1 = tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;
    }
    var tmp1_elvis_lhs_0 = tmp_1;
    var spineNcxCandidate = tmp1_elvis_lhs_0 == null ? emptyList() : tmp1_elvis_lhs_0;
    var allTocCandidates = plus(tocCandidates, spineNcxCandidate);
    var tmp$ret$13;
    $l$block_0: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator_1 = allTocCandidates.w();
      while (tmp0_iterator_1.f()) {
        var element_1 = tmp0_iterator_1.e();
        // Inline function 'com.ustadmobile.core.contentformats.epub.opf.PackageDocument.tableOfContentItem.<anonymous>' call
        var tmp0_safe_receiver_2 = element_1.qn1_1;
        var tmp1_elvis_lhs_1 = tmp0_safe_receiver_2 == null ? null : contains(tmp0_safe_receiver_2, 'nav');
        if (tmp1_elvis_lhs_1 == null ? false : tmp1_elvis_lhs_1) {
          tmp$ret$13 = element_1;
          break $l$block_0;
        }
      }
      tmp$ret$13 = null;
    }
    var tmp2_elvis_lhs_0 = tmp$ret$13;
    return tmp2_elvis_lhs_0 == null ? firstOrNull(allTocCandidates) : tmp2_elvis_lhs_0;
  };
  function Companion_27() {
    Companion_instance_75 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.zn2_1 = [new ArrayListSerializer($serializer_getInstance_32()), null];
  }
  var Companion_instance_75;
  function Companion_getInstance_44() {
    if (Companion_instance_75 == null)
      new Companion_27();
    return Companion_instance_75;
  }
  function $serializer_25() {
    $serializer_instance_25 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.epub.opf.Spine', this, 2);
    tmp0_serialDesc.g4f('itemRefs', true);
    tmp0_serialDesc.g4f('toc', true);
    tmp0_serialDesc.i4f(new XmlSerialName('spine', 'http://www.idpf.org/2007/opf'));
    this.an3_1 = tmp0_serialDesc;
  }
  protoOf($serializer_25).d44 = function () {
    return this.an3_1;
  };
  protoOf($serializer_25).x4f = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_44().zn2_1[0], get_nullable(StringSerializer_getInstance())];
  };
  protoOf($serializer_25).f44 = function (decoder) {
    var tmp0_desc = this.an3_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.v47(tmp0_desc);
    var tmp7_cached = Companion_getInstance_44().zn2_1;
    if (tmp6_input.k48()) {
      tmp4_local0 = tmp6_input.h48(tmp0_desc, 0, tmp7_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.j48(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.h48(tmp0_desc, 0, tmp7_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.j48(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.w47(tmp0_desc);
    return Spine_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_25).bn3 = function (encoder, value) {
    var tmp0_desc = this.an3_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    var tmp2_cached = Companion_getInstance_44().zn2_1;
    if (tmp1_output.r49(tmp0_desc, 0) ? true : !equals(value.xn2_1, emptyList())) {
      tmp1_output.l49(tmp0_desc, 0, tmp2_cached[0], value.xn2_1);
    }
    if (tmp1_output.r49(tmp0_desc, 1) ? true : !(value.yn2_1 == null)) {
      tmp1_output.n49(tmp0_desc, 1, StringSerializer_getInstance(), value.yn2_1);
    }
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_25).e44 = function (encoder, value) {
    return this.bn3(encoder, value instanceof Spine ? value : THROW_CCE());
  };
  var $serializer_instance_25;
  function $serializer_getInstance_37() {
    if ($serializer_instance_25 == null)
      new $serializer_25();
    return $serializer_instance_25;
  }
  function Spine_init_$Init$(seen1, itemRefs, toc, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_37().an3_1);
    }
    if (0 === (seen1 & 1))
      $this.xn2_1 = emptyList();
    else
      $this.xn2_1 = itemRefs;
    if (0 === (seen1 & 2))
      $this.yn2_1 = null;
    else
      $this.yn2_1 = toc;
    return $this;
  }
  function Spine_init_$Create$(seen1, itemRefs, toc, serializationConstructorMarker) {
    return Spine_init_$Init$(seen1, itemRefs, toc, serializationConstructorMarker, objectCreate(protoOf(Spine)));
  }
  function Spine(itemRefs, toc) {
    Companion_getInstance_44();
    itemRefs = itemRefs === VOID ? emptyList() : itemRefs;
    toc = toc === VOID ? null : toc;
    this.xn2_1 = itemRefs;
    this.yn2_1 = toc;
  }
  function Companion_28() {
    Companion_instance_76 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.cn3_1 = [null, new LinkedHashMapSerializer(StringSerializer_getInstance(), StringSerializer_getInstance()), new ArrayListSerializer($serializer_getInstance_39())];
  }
  var Companion_instance_76;
  function Companion_getInstance_45() {
    if (Companion_instance_76 == null)
      new Companion_28();
    return Companion_instance_76;
  }
  function $serializer_26() {
    $serializer_instance_26 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.manifest.ContentManifest', this, 3);
    tmp0_serialDesc.g4f('version', false);
    tmp0_serialDesc.g4f('metadata', false);
    tmp0_serialDesc.g4f('entries', false);
    this.dn3_1 = tmp0_serialDesc;
  }
  protoOf($serializer_26).d44 = function () {
    return this.dn3_1;
  };
  protoOf($serializer_26).x4f = function () {
    var tmp0_cached = Companion_getInstance_45().cn3_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [IntSerializer_getInstance(), tmp0_cached[1], tmp0_cached[2]];
  };
  protoOf($serializer_26).f44 = function (decoder) {
    var tmp0_desc = this.dn3_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = 0;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_input = decoder.v47(tmp0_desc);
    var tmp8_cached = Companion_getInstance_45().cn3_1;
    if (tmp7_input.k48()) {
      tmp4_local0 = tmp7_input.a48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp7_input.h48(tmp0_desc, 1, tmp8_cached[1], tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp7_input.h48(tmp0_desc, 2, tmp8_cached[2], tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp7_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp7_input.a48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp7_input.h48(tmp0_desc, 1, tmp8_cached[1], tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp7_input.h48(tmp0_desc, 2, tmp8_cached[2], tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp7_input.w47(tmp0_desc);
    return ContentManifest_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
  };
  protoOf($serializer_26).en3 = function (encoder, value) {
    var tmp0_desc = this.dn3_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    var tmp2_cached = Companion_getInstance_45().cn3_1;
    tmp1_output.e49(tmp0_desc, 0, value.fn3_1);
    tmp1_output.l49(tmp0_desc, 1, tmp2_cached[1], value.gn3_1);
    tmp1_output.l49(tmp0_desc, 2, tmp2_cached[2], value.hn3_1);
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_26).e44 = function (encoder, value) {
    return this.en3(encoder, value instanceof ContentManifest ? value : THROW_CCE());
  };
  var $serializer_instance_26;
  function $serializer_getInstance_38() {
    if ($serializer_instance_26 == null)
      new $serializer_26();
    return $serializer_instance_26;
  }
  function ContentManifest_init_$Init$(seen1, version, metadata, entries, serializationConstructorMarker, $this) {
    if (!(7 === (7 & seen1))) {
      throwMissingFieldException(seen1, 7, $serializer_getInstance_38().dn3_1);
    }
    $this.fn3_1 = version;
    $this.gn3_1 = metadata;
    $this.hn3_1 = entries;
    return $this;
  }
  function ContentManifest_init_$Create$(seen1, version, metadata, entries, serializationConstructorMarker) {
    return ContentManifest_init_$Init$(seen1, version, metadata, entries, serializationConstructorMarker, objectCreate(protoOf(ContentManifest)));
  }
  function ContentManifest(version, metadata, entries) {
    Companion_getInstance_45();
    this.fn3_1 = version;
    this.gn3_1 = metadata;
    this.hn3_1 = entries;
  }
  protoOf(ContentManifest).toString = function () {
    return 'ContentManifest(version=' + this.fn3_1 + ', metadata=' + this.gn3_1 + ', entries=' + this.hn3_1 + ')';
  };
  protoOf(ContentManifest).hashCode = function () {
    var result = this.fn3_1;
    result = imul(result, 31) + hashCode(this.gn3_1) | 0;
    result = imul(result, 31) + hashCode(this.hn3_1) | 0;
    return result;
  };
  protoOf(ContentManifest).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentManifest))
      return false;
    var tmp0_other_with_cast = other instanceof ContentManifest ? other : THROW_CCE();
    if (!(this.fn3_1 === tmp0_other_with_cast.fn3_1))
      return false;
    if (!equals(this.gn3_1, tmp0_other_with_cast.gn3_1))
      return false;
    if (!equals(this.hn3_1, tmp0_other_with_cast.hn3_1))
      return false;
    return true;
  };
  function Companion_29() {
    Companion_instance_77 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.in3_1 = [null, null, null, null, null, null, new StringValuesSerializer(), new StringValuesSerializer(), null];
  }
  var Companion_instance_77;
  function Companion_getInstance_46() {
    if (Companion_instance_77 == null)
      new Companion_29();
    return Companion_instance_77;
  }
  function $serializer_27() {
    $serializer_instance_27 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.manifest.ContentManifestEntry', this, 9);
    tmp0_serialDesc.g4f('uri', false);
    tmp0_serialDesc.g4f('storageSize', false);
    tmp0_serialDesc.g4f('ignoreQueryParams', true);
    tmp0_serialDesc.g4f('status', true);
    tmp0_serialDesc.g4f('method', true);
    tmp0_serialDesc.g4f('integrity', false);
    tmp0_serialDesc.g4f('requestHeaders', true);
    tmp0_serialDesc.g4f('responseHeaders', false);
    tmp0_serialDesc.g4f('bodyDataUrl', false);
    this.jn3_1 = tmp0_serialDesc;
  }
  protoOf($serializer_27).d44 = function () {
    return this.jn3_1;
  };
  protoOf($serializer_27).x4f = function () {
    var tmp0_cached = Companion_getInstance_46().in3_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance(), LongSerializer_getInstance(), BooleanSerializer_getInstance(), IntSerializer_getInstance(), StringSerializer_getInstance(), StringSerializer_getInstance(), tmp0_cached[6], tmp0_cached[7], StringSerializer_getInstance()];
  };
  protoOf($serializer_27).f44 = function (decoder) {
    var tmp0_desc = this.jn3_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = new Long(0, 0);
    var tmp6_local2 = false;
    var tmp7_local3 = 0;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_local6 = null;
    var tmp11_local7 = null;
    var tmp12_local8 = null;
    var tmp13_input = decoder.v47(tmp0_desc);
    var tmp14_cached = Companion_getInstance_46().in3_1;
    if (tmp13_input.k48()) {
      tmp4_local0 = tmp13_input.f48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp13_input.b48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp13_input.x47(tmp0_desc, 2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp13_input.a48(tmp0_desc, 3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp13_input.f48(tmp0_desc, 4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp13_input.f48(tmp0_desc, 5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
      tmp10_local6 = tmp13_input.h48(tmp0_desc, 6, tmp14_cached[6], tmp10_local6);
      tmp3_bitMask0 = tmp3_bitMask0 | 64;
      tmp11_local7 = tmp13_input.h48(tmp0_desc, 7, tmp14_cached[7], tmp11_local7);
      tmp3_bitMask0 = tmp3_bitMask0 | 128;
      tmp12_local8 = tmp13_input.f48(tmp0_desc, 8);
      tmp3_bitMask0 = tmp3_bitMask0 | 256;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp13_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp13_input.f48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp13_input.b48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp13_input.x47(tmp0_desc, 2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp13_input.a48(tmp0_desc, 3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp13_input.f48(tmp0_desc, 4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp13_input.f48(tmp0_desc, 5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          case 6:
            tmp10_local6 = tmp13_input.h48(tmp0_desc, 6, tmp14_cached[6], tmp10_local6);
            tmp3_bitMask0 = tmp3_bitMask0 | 64;
            break;
          case 7:
            tmp11_local7 = tmp13_input.h48(tmp0_desc, 7, tmp14_cached[7], tmp11_local7);
            tmp3_bitMask0 = tmp3_bitMask0 | 128;
            break;
          case 8:
            tmp12_local8 = tmp13_input.f48(tmp0_desc, 8);
            tmp3_bitMask0 = tmp3_bitMask0 | 256;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp13_input.w47(tmp0_desc);
    return ContentManifestEntry_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, tmp11_local7, tmp12_local8, null);
  };
  protoOf($serializer_27).kn3 = function (encoder, value) {
    var tmp0_desc = this.jn3_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    var tmp2_cached = Companion_getInstance_46().in3_1;
    tmp1_output.j49(tmp0_desc, 0, value.ln3_1);
    tmp1_output.f49(tmp0_desc, 1, value.mn3_1);
    if (tmp1_output.r49(tmp0_desc, 2) ? true : !(value.nn3_1 === true)) {
      tmp1_output.b49(tmp0_desc, 2, value.nn3_1);
    }
    if (tmp1_output.r49(tmp0_desc, 3) ? true : !(value.on3_1 === 200)) {
      tmp1_output.e49(tmp0_desc, 3, value.on3_1);
    }
    if (tmp1_output.r49(tmp0_desc, 4) ? true : !(value.pn3_1 === 'GET')) {
      tmp1_output.j49(tmp0_desc, 4, value.pn3_1);
    }
    tmp1_output.j49(tmp0_desc, 5, value.qn3_1);
    if (tmp1_output.r49(tmp0_desc, 6) ? true : !equals(value.rn3_1, emptyStringValues())) {
      tmp1_output.l49(tmp0_desc, 6, tmp2_cached[6], value.rn3_1);
    }
    tmp1_output.l49(tmp0_desc, 7, tmp2_cached[7], value.sn3_1);
    tmp1_output.j49(tmp0_desc, 8, value.tn3_1);
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_27).e44 = function (encoder, value) {
    return this.kn3(encoder, value instanceof ContentManifestEntry ? value : THROW_CCE());
  };
  var $serializer_instance_27;
  function $serializer_getInstance_39() {
    if ($serializer_instance_27 == null)
      new $serializer_27();
    return $serializer_instance_27;
  }
  function ContentManifestEntry_init_$Init$(seen1, uri, storageSize, ignoreQueryParams, status, method, integrity, requestHeaders, responseHeaders, bodyDataUrl, serializationConstructorMarker, $this) {
    if (!(419 === (419 & seen1))) {
      throwMissingFieldException(seen1, 419, $serializer_getInstance_39().jn3_1);
    }
    $this.ln3_1 = uri;
    $this.mn3_1 = storageSize;
    if (0 === (seen1 & 4))
      $this.nn3_1 = true;
    else
      $this.nn3_1 = ignoreQueryParams;
    if (0 === (seen1 & 8))
      $this.on3_1 = 200;
    else
      $this.on3_1 = status;
    if (0 === (seen1 & 16))
      $this.pn3_1 = 'GET';
    else
      $this.pn3_1 = method;
    $this.qn3_1 = integrity;
    if (0 === (seen1 & 64))
      $this.rn3_1 = emptyStringValues();
    else
      $this.rn3_1 = requestHeaders;
    $this.sn3_1 = responseHeaders;
    $this.tn3_1 = bodyDataUrl;
    return $this;
  }
  function ContentManifestEntry_init_$Create$(seen1, uri, storageSize, ignoreQueryParams, status, method, integrity, requestHeaders, responseHeaders, bodyDataUrl, serializationConstructorMarker) {
    return ContentManifestEntry_init_$Init$(seen1, uri, storageSize, ignoreQueryParams, status, method, integrity, requestHeaders, responseHeaders, bodyDataUrl, serializationConstructorMarker, objectCreate(protoOf(ContentManifestEntry)));
  }
  function ContentManifestEntry() {
  }
  function Companion_30() {
    Companion_instance_78 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.un3_1 = [new ArrayListSerializer($serializer_getInstance_41()), new ArrayListSerializer($serializer_getInstance_42())];
  }
  var Companion_instance_78;
  function Companion_getInstance_47() {
    if (Companion_instance_78 == null)
      new Companion_30();
    return Companion_instance_78;
  }
  function $serializer_28() {
    $serializer_instance_28 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.media.MediaContentInfo', this, 2);
    tmp0_serialDesc.g4f('sources', false);
    tmp0_serialDesc.g4f('subtitles', true);
    this.vn3_1 = tmp0_serialDesc;
  }
  protoOf($serializer_28).d44 = function () {
    return this.vn3_1;
  };
  protoOf($serializer_28).x4f = function () {
    var tmp0_cached = Companion_getInstance_47().un3_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [tmp0_cached[0], tmp0_cached[1]];
  };
  protoOf($serializer_28).f44 = function (decoder) {
    var tmp0_desc = this.vn3_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.v47(tmp0_desc);
    var tmp7_cached = Companion_getInstance_47().un3_1;
    if (tmp6_input.k48()) {
      tmp4_local0 = tmp6_input.h48(tmp0_desc, 0, tmp7_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.h48(tmp0_desc, 1, tmp7_cached[1], tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.h48(tmp0_desc, 0, tmp7_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.h48(tmp0_desc, 1, tmp7_cached[1], tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.w47(tmp0_desc);
    return MediaContentInfo_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_28).wn3 = function (encoder, value) {
    var tmp0_desc = this.vn3_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    var tmp2_cached = Companion_getInstance_47().un3_1;
    tmp1_output.l49(tmp0_desc, 0, tmp2_cached[0], value.xn3_1);
    if (tmp1_output.r49(tmp0_desc, 1) ? true : !equals(value.yn3_1, emptyList())) {
      tmp1_output.l49(tmp0_desc, 1, tmp2_cached[1], value.yn3_1);
    }
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_28).e44 = function (encoder, value) {
    return this.wn3(encoder, value instanceof MediaContentInfo ? value : THROW_CCE());
  };
  var $serializer_instance_28;
  function $serializer_getInstance_40() {
    if ($serializer_instance_28 == null)
      new $serializer_28();
    return $serializer_instance_28;
  }
  function MediaContentInfo_init_$Init$(seen1, sources, subtitles, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_40().vn3_1);
    }
    $this.xn3_1 = sources;
    if (0 === (seen1 & 2))
      $this.yn3_1 = emptyList();
    else
      $this.yn3_1 = subtitles;
    return $this;
  }
  function MediaContentInfo_init_$Create$(seen1, sources, subtitles, serializationConstructorMarker) {
    return MediaContentInfo_init_$Init$(seen1, sources, subtitles, serializationConstructorMarker, objectCreate(protoOf(MediaContentInfo)));
  }
  function MediaContentInfo(sources, subtitles) {
    Companion_getInstance_47();
    subtitles = subtitles === VOID ? emptyList() : subtitles;
    this.xn3_1 = sources;
    this.yn3_1 = subtitles;
  }
  function $serializer_29() {
    $serializer_instance_29 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.media.MediaSource', this, 2);
    tmp0_serialDesc.g4f('uri', false);
    tmp0_serialDesc.g4f('mimeType', false);
    this.zn3_1 = tmp0_serialDesc;
  }
  protoOf($serializer_29).d44 = function () {
    return this.zn3_1;
  };
  protoOf($serializer_29).x4f = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance(), StringSerializer_getInstance()];
  };
  protoOf($serializer_29).f44 = function (decoder) {
    var tmp0_desc = this.zn3_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.v47(tmp0_desc);
    if (tmp6_input.k48()) {
      tmp4_local0 = tmp6_input.f48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.f48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.f48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.f48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.w47(tmp0_desc);
    return MediaSource_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_29).an4 = function (encoder, value) {
    var tmp0_desc = this.zn3_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    tmp1_output.j49(tmp0_desc, 0, value.bn4_1);
    tmp1_output.j49(tmp0_desc, 1, value.cn4_1);
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_29).e44 = function (encoder, value) {
    return this.an4(encoder, value instanceof MediaSource ? value : THROW_CCE());
  };
  var $serializer_instance_29;
  function $serializer_getInstance_41() {
    if ($serializer_instance_29 == null)
      new $serializer_29();
    return $serializer_instance_29;
  }
  function MediaSource_init_$Init$(seen1, uri, mimeType, serializationConstructorMarker, $this) {
    if (!(3 === (3 & seen1))) {
      throwMissingFieldException(seen1, 3, $serializer_getInstance_41().zn3_1);
    }
    $this.bn4_1 = uri;
    $this.cn4_1 = mimeType;
    return $this;
  }
  function MediaSource_init_$Create$(seen1, uri, mimeType, serializationConstructorMarker) {
    return MediaSource_init_$Init$(seen1, uri, mimeType, serializationConstructorMarker, objectCreate(protoOf(MediaSource)));
  }
  function MediaSource() {
  }
  function Companion_31() {
  }
  protoOf(Companion_31).a4r = function () {
    return $serializer_getInstance_42();
  };
  var Companion_instance_79;
  function Companion_getInstance_48() {
    return Companion_instance_79;
  }
  function $serializer_30() {
    $serializer_instance_30 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentformats.media.SubtitleTrack', this, 4);
    tmp0_serialDesc.g4f('uri', false);
    tmp0_serialDesc.g4f('mimeType', false);
    tmp0_serialDesc.g4f('langCode', false);
    tmp0_serialDesc.g4f('title', false);
    this.dn4_1 = tmp0_serialDesc;
  }
  protoOf($serializer_30).d44 = function () {
    return this.dn4_1;
  };
  protoOf($serializer_30).x4f = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance(), StringSerializer_getInstance(), get_nullable(StringSerializer_getInstance()), StringSerializer_getInstance()];
  };
  protoOf($serializer_30).f44 = function (decoder) {
    var tmp0_desc = this.dn4_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_input = decoder.v47(tmp0_desc);
    if (tmp8_input.k48()) {
      tmp4_local0 = tmp8_input.f48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp8_input.f48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp8_input.j48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp8_input.f48(tmp0_desc, 3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp8_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp8_input.f48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp8_input.f48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp8_input.j48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp8_input.f48(tmp0_desc, 3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp8_input.w47(tmp0_desc);
    return SubtitleTrack_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
  };
  protoOf($serializer_30).en4 = function (encoder, value) {
    var tmp0_desc = this.dn4_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    tmp1_output.j49(tmp0_desc, 0, value.fn4_1);
    tmp1_output.j49(tmp0_desc, 1, value.gn4_1);
    tmp1_output.n49(tmp0_desc, 2, StringSerializer_getInstance(), value.hn4_1);
    tmp1_output.j49(tmp0_desc, 3, value.in4_1);
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_30).e44 = function (encoder, value) {
    return this.en4(encoder, value instanceof SubtitleTrack ? value : THROW_CCE());
  };
  var $serializer_instance_30;
  function $serializer_getInstance_42() {
    if ($serializer_instance_30 == null)
      new $serializer_30();
    return $serializer_instance_30;
  }
  function SubtitleTrack_init_$Init$(seen1, uri, mimeType, langCode, title, serializationConstructorMarker, $this) {
    if (!(15 === (15 & seen1))) {
      throwMissingFieldException(seen1, 15, $serializer_getInstance_42().dn4_1);
    }
    $this.fn4_1 = uri;
    $this.gn4_1 = mimeType;
    $this.hn4_1 = langCode;
    $this.in4_1 = title;
    return $this;
  }
  function SubtitleTrack_init_$Create$(seen1, uri, mimeType, langCode, title, serializationConstructorMarker) {
    return SubtitleTrack_init_$Init$(seen1, uri, mimeType, langCode, title, serializationConstructorMarker, objectCreate(protoOf(SubtitleTrack)));
  }
  function SubtitleTrack(uri, mimeType, langCode, title) {
    this.fn4_1 = uri;
    this.gn4_1 = mimeType;
    this.hn4_1 = langCode;
    this.in4_1 = title;
  }
  protoOf(SubtitleTrack).jn4 = function (uri, mimeType, langCode, title) {
    return new SubtitleTrack(uri, mimeType, langCode, title);
  };
  protoOf(SubtitleTrack).kn4 = function (uri, mimeType, langCode, title, $super) {
    uri = uri === VOID ? this.fn4_1 : uri;
    mimeType = mimeType === VOID ? this.gn4_1 : mimeType;
    langCode = langCode === VOID ? this.hn4_1 : langCode;
    title = title === VOID ? this.in4_1 : title;
    return $super === VOID ? this.jn4(uri, mimeType, langCode, title) : $super.jn4.call(this, uri, mimeType, langCode, title);
  };
  protoOf(SubtitleTrack).toString = function () {
    return 'SubtitleTrack(uri=' + this.fn4_1 + ', mimeType=' + this.gn4_1 + ', langCode=' + this.hn4_1 + ', title=' + this.in4_1 + ')';
  };
  protoOf(SubtitleTrack).hashCode = function () {
    var result = getStringHashCode(this.fn4_1);
    result = imul(result, 31) + getStringHashCode(this.gn4_1) | 0;
    result = imul(result, 31) + (this.hn4_1 == null ? 0 : getStringHashCode(this.hn4_1)) | 0;
    result = imul(result, 31) + getStringHashCode(this.in4_1) | 0;
    return result;
  };
  protoOf(SubtitleTrack).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SubtitleTrack))
      return false;
    var tmp0_other_with_cast = other instanceof SubtitleTrack ? other : THROW_CCE();
    if (!(this.fn4_1 === tmp0_other_with_cast.fn4_1))
      return false;
    if (!(this.gn4_1 === tmp0_other_with_cast.gn4_1))
      return false;
    if (!(this.hn4_1 == tmp0_other_with_cast.hn4_1))
      return false;
    if (!(this.in4_1 === tmp0_other_with_cast.in4_1))
      return false;
    return true;
  };
  function InvalidContentException(message, cause) {
    cause = cause === VOID ? null : cause;
    IllegalArgumentException_init_$Init$(message, cause, this);
    captureStack(this, InvalidContentException);
  }
  function Companion_32() {
    this.ln4_1 = 'upload-tmp';
    this.mn4_1 = 'upload-tmp:///';
  }
  protoOf(Companion_32).a4r = function () {
    return $serializer_getInstance_43();
  };
  var Companion_instance_80;
  function Companion_getInstance_49() {
    return Companion_instance_80;
  }
  function $serializer_31() {
    $serializer_instance_31 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.contentjob.MetadataResult', this, 4);
    tmp0_serialDesc.g4f('entry', false);
    tmp0_serialDesc.g4f('importerId', false);
    tmp0_serialDesc.g4f('originalFilename', true);
    tmp0_serialDesc.g4f('picture', true);
    this.nn4_1 = tmp0_serialDesc;
  }
  protoOf($serializer_31).d44 = function () {
    return this.nn4_1;
  };
  protoOf($serializer_31).x4f = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [$serializer_getInstance_3(), IntSerializer_getInstance(), get_nullable(StringSerializer_getInstance()), get_nullable($serializer_getInstance_4())];
  };
  protoOf($serializer_31).f44 = function (decoder) {
    var tmp0_desc = this.nn4_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = 0;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_input = decoder.v47(tmp0_desc);
    if (tmp8_input.k48()) {
      tmp4_local0 = tmp8_input.h48(tmp0_desc, 0, $serializer_getInstance_3(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp8_input.a48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp8_input.j48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp8_input.j48(tmp0_desc, 3, $serializer_getInstance_4(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp8_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp8_input.h48(tmp0_desc, 0, $serializer_getInstance_3(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp8_input.a48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp8_input.j48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp8_input.j48(tmp0_desc, 3, $serializer_getInstance_4(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp8_input.w47(tmp0_desc);
    return MetadataResult_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
  };
  protoOf($serializer_31).on4 = function (encoder, value) {
    var tmp0_desc = this.nn4_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    tmp1_output.l49(tmp0_desc, 0, $serializer_getInstance_3(), value.pn4_1);
    tmp1_output.e49(tmp0_desc, 1, value.qn4_1);
    if (tmp1_output.r49(tmp0_desc, 2) ? true : !(value.rn4_1 == null)) {
      tmp1_output.n49(tmp0_desc, 2, StringSerializer_getInstance(), value.rn4_1);
    }
    if (tmp1_output.r49(tmp0_desc, 3) ? true : !(value.sn4_1 == null)) {
      tmp1_output.n49(tmp0_desc, 3, $serializer_getInstance_4(), value.sn4_1);
    }
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_31).e44 = function (encoder, value) {
    return this.on4(encoder, value instanceof MetadataResult ? value : THROW_CCE());
  };
  var $serializer_instance_31;
  function $serializer_getInstance_43() {
    if ($serializer_instance_31 == null)
      new $serializer_31();
    return $serializer_instance_31;
  }
  function MetadataResult_init_$Init$(seen1, entry, importerId, originalFilename, picture, serializationConstructorMarker, $this) {
    if (!(3 === (3 & seen1))) {
      throwMissingFieldException(seen1, 3, $serializer_getInstance_43().nn4_1);
    }
    $this.pn4_1 = entry;
    $this.qn4_1 = importerId;
    if (0 === (seen1 & 4))
      $this.rn4_1 = null;
    else
      $this.rn4_1 = originalFilename;
    if (0 === (seen1 & 8))
      $this.sn4_1 = null;
    else
      $this.sn4_1 = picture;
    return $this;
  }
  function MetadataResult_init_$Create$(seen1, entry, importerId, originalFilename, picture, serializationConstructorMarker) {
    return MetadataResult_init_$Init$(seen1, entry, importerId, originalFilename, picture, serializationConstructorMarker, objectCreate(protoOf(MetadataResult)));
  }
  function MetadataResult(entry, importerId, originalFilename, picture) {
    originalFilename = originalFilename === VOID ? null : originalFilename;
    picture = picture === VOID ? null : picture;
    this.pn4_1 = entry;
    this.qn4_1 = importerId;
    this.rn4_1 = originalFilename;
    this.sn4_1 = picture;
  }
  protoOf(MetadataResult).toString = function () {
    return 'MetadataResult(entry=' + this.pn4_1 + ', importerId=' + this.qn4_1 + ', originalFilename=' + this.rn4_1 + ', picture=' + this.sn4_1 + ')';
  };
  protoOf(MetadataResult).hashCode = function () {
    var result = this.pn4_1.hashCode();
    result = imul(result, 31) + this.qn4_1 | 0;
    result = imul(result, 31) + (this.rn4_1 == null ? 0 : getStringHashCode(this.rn4_1)) | 0;
    result = imul(result, 31) + (this.sn4_1 == null ? 0 : this.sn4_1.hashCode()) | 0;
    return result;
  };
  protoOf(MetadataResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof MetadataResult))
      return false;
    var tmp0_other_with_cast = other instanceof MetadataResult ? other : THROW_CCE();
    if (!this.pn4_1.equals(tmp0_other_with_cast.pn4_1))
      return false;
    if (!(this.qn4_1 === tmp0_other_with_cast.qn4_1))
      return false;
    if (!(this.rn4_1 == tmp0_other_with_cast.rn4_1))
      return false;
    if (!equals(this.sn4_1, tmp0_other_with_cast.sn4_1))
      return false;
    return true;
  };
  function PersonConstants() {
    PersonConstants_instance = this;
    var tmp = this;
    var tmp_0 = to(1, strings_getInstance().ble_1);
    var tmp_1 = to(2, strings_getInstance().ale_1);
    var tmp_2 = to(4, strings_getInstance().cle_1);
    tmp.tn4_1 = mapOf([tmp_0, tmp_1, tmp_2, to(0, strings_getInstance().dle_1)]);
  }
  var PersonConstants_instance;
  function PersonConstants_getInstance() {
    if (PersonConstants_instance == null)
      new PersonConstants();
    return PersonConstants_instance;
  }
  function SubmissionConstants() {
    SubmissionConstants_instance = this;
    var tmp = this;
    var tmp_0 = to(0, strings_getInstance().jm9_1);
    var tmp_1 = to(4, strings_getInstance().klg_1);
    var tmp_2 = to(1, strings_getInstance().km9_1);
    var tmp_3 = to(2, strings_getInstance().lm9_1);
    tmp.un4_1 = mapOf([tmp_0, tmp_1, tmp_2, tmp_3, to(3, strings_getInstance().bm3_1)]);
    var tmp_4 = this;
    Companion_getInstance_1();
    var tmp_5 = to(0, strings_getInstance().gly_1);
    Companion_getInstance_1();
    var tmp_6 = to(1, strings_getInstance().fly_1);
    Companion_getInstance_1();
    tmp_4.vn4_1 = mapOf([tmp_5, tmp_6, to(2, strings_getInstance().ely_1)]);
  }
  var SubmissionConstants_instance;
  function SubmissionConstants_getInstance() {
    if (SubmissionConstants_instance == null)
      new SubmissionConstants();
    return SubmissionConstants_instance;
  }
  function TerminologyKeys() {
    TerminologyKeys_instance = this;
    this.wn4_1 = 'Teacher';
    this.xn4_1 = 'Student';
    this.yn4_1 = 'Teachers';
    this.zn4_1 = 'Students';
    this.an5_1 = 'AddTeacher';
    this.bn5_1 = 'AddStudent';
    this.cn5_1 = mapOf([to('Teacher', strings_getInstance().nlr_1), to('Student', strings_getInstance().aly_1), to('Teachers', strings_getInstance().qlr_1), to('Students', strings_getInstance().blf_1), to('AddTeacher', strings_getInstance().olr_1), to('AddStudent', strings_getInstance().clf_1)]);
  }
  var TerminologyKeys_instance;
  function TerminologyKeys_getInstance() {
    if (TerminologyKeys_instance == null)
      new TerminologyKeys();
    return TerminologyKeys_instance;
  }
  function SetPasswordUseCase() {
  }
  function AccountIsNotSubmitterException(message) {
    AssignmentSubmissionException.call(this, message);
    captureStack(this, AccountIsNotSubmitterException);
  }
  function AssignmentAlreadySubmittedException(message) {
    AssignmentSubmissionException.call(this, message);
    captureStack(this, AssignmentAlreadySubmittedException);
  }
  function AssignmentDeadlinePassedException(message) {
    AssignmentSubmissionException.call(this, message);
    captureStack(this, AssignmentDeadlinePassedException);
  }
  function AssignmentTextTooLongException(message) {
    AssignmentSubmissionException.call(this, message);
    captureStack(this, AssignmentTextTooLongException);
  }
  function AssignmentSubmissionException(message) {
    Exception_init_$Init$(message, this);
    captureStack(this, AssignmentSubmissionException);
  }
  function SubmitAssignmentResult(submission) {
    this.en5_1 = submission;
  }
  protoOf(SubmitAssignmentResult).toString = function () {
    return 'SubmitAssignmentResult(submission=' + this.en5_1 + ')';
  };
  protoOf(SubmitAssignmentResult).hashCode = function () {
    return this.en5_1 == null ? 0 : this.en5_1.hashCode();
  };
  protoOf(SubmitAssignmentResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SubmitAssignmentResult))
      return false;
    var tmp0_other_with_cast = other instanceof SubmitAssignmentResult ? other : THROW_CCE();
    if (!equals(this.en5_1, tmp0_other_with_cast.en5_1))
      return false;
    return true;
  };
  function SubmitAssignmentUseCase$invoke$lambda($assignmentUid, $submitterUid, $accountPersonUid, $assignment) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.ibn_1 = $assignmentUid;
      $this$shallowCopy.jbn_1 = $submitterUid;
      $this$shallowCopy.kbn_1 = $accountPersonUid;
      $this$shallowCopy.nbn_1 = systemTimeInMillis();
      $this$shallowCopy.obn_1 = $assignment.i7t_1;
      return Unit_instance;
    };
  }
  function $invokeCOROUTINE$9(_this__u8e3s4, repo, submitterUid, assignmentUid, accountPersonUid, submission, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.nn5_1 = _this__u8e3s4;
    this.on5_1 = repo;
    this.pn5_1 = submitterUid;
    this.qn5_1 = assignmentUid;
    this.rn5_1 = accountPersonUid;
    this.sn5_1 = submission;
  }
  protoOf($invokeCOROUTINE$9).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 6;
            if (this.pn5_1.equals(new Long(0, 0)))
              throw new AccountIsNotSubmitterException('Not a valid submitter');
            this.hd_1 = 1;
            suspendResult = this.on5_1.d7e().t7r(this.qn5_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.tn5_1 = suspendResult;
            var tmp_0 = this;
            var tmp_1;
            if (this.tn5_1 == null) {
              throw IllegalArgumentException_init_$Create$('Could not find assignment uid ' + this.qn5_1.toString());
            } else {
              tmp_1 = this.tn5_1;
            }

            tmp_0.un5_1 = tmp_1;
            var tmp_2 = this;
            var tmp1_elvis_lhs = this.un5_1.v7w_1;
            var tmp_3;
            if (tmp1_elvis_lhs == null) {
              throw IllegalArgumentException_init_$Create$('Could not load courseblock');
            } else {
              tmp_3 = tmp1_elvis_lhs;
            }

            tmp_2.vn5_1 = tmp_3;
            var tmp_4 = this;
            var tmp2_elvis_lhs = this.un5_1.u7w_1;
            var tmp_5;
            if (tmp2_elvis_lhs == null) {
              throw IllegalArgumentException_init_$Create$('assignment cannot be null');
            } else {
              tmp_5 = tmp2_elvis_lhs;
            }

            tmp_4.wn5_1 = tmp_5;
            var tmp_6 = this.wn5_1.c7t_1;
            if (tmp_6 === 1) {
              this.hd_1 = 2;
              suspendResult = this.on5_1.e7e().pbm(this.rn5_1, this.qn5_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.xn5_1 = false;
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.xn5_1 = suspendResult;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            if (this.xn5_1) {
              throw new AssignmentAlreadySubmittedException(this.nn5_1.zn5_1.en6(strings_getInstance().cmd_1));
            } else {
              this.hd_1 = 4;
              continue $sm;
            }

          case 4:
            if (lastPossibleSubmissionTime(this.vn5_1).c7(systemTimeInMillis()) < 0) {
              throw new AssignmentDeadlinePassedException(this.nn5_1.zn5_1.en6(strings_getInstance().bmd_1));
            }

            if (this.wn5_1.e7t_1) {
              var tmp_7 = this.wn5_1.f7t_1;
              if (tmp_7 === 1) {
                var tmp3_safe_receiver = this.sn5_1.lbn_1;
                var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : htmlToPlainText(tmp3_safe_receiver);
                var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : countWords(tmp4_safe_receiver);
                var wordCount = tmp5_elvis_lhs == null ? 0 : tmp5_elvis_lhs;
                if (wordCount > this.wn5_1.g7t_1) {
                  throw new AssignmentTextTooLongException(this.nn5_1.zn5_1.fn6(strings_getInstance().dmd_1, [wordCount.toString(), this.wn5_1.g7t_1.toString()]));
                }
              } else {
                var tmp_8 = this.wn5_1.f7t_1;
                if (tmp_8 === 2) {
                  var tmp6_safe_receiver = this.sn5_1.lbn_1;
                  var tmp7_safe_receiver = tmp6_safe_receiver == null ? null : htmlToPlainText(tmp6_safe_receiver);
                  var tmp8_elvis_lhs = tmp7_safe_receiver == null ? null : tmp7_safe_receiver.length;
                  var charCount = tmp8_elvis_lhs == null ? 0 : tmp8_elvis_lhs;
                  if (charCount > this.wn5_1.g7t_1) {
                    throw new AssignmentTextTooLongException(this.nn5_1.zn5_1.fn6(strings_getInstance().emd_1, [charCount.toString(), this.wn5_1.g7t_1.toString()]));
                  }
                }
              }
            }

            var tmp_9 = this;
            tmp_9.yn5_1 = shallowCopy_0(this.sn5_1, SubmitAssignmentUseCase$invoke$lambda(this.qn5_1, this.pn5_1, this.rn5_1, this.wn5_1));
            Napier_getInstance().v5d('SubmitAssignmentUseCase: save to repo for submitterUid=' + this.pn5_1.toString() + ' assignmentUid=' + this.qn5_1.toString());
            this.hd_1 = 5;
            suspendResult = this.on5_1.e7e().insertAsync(this.yn5_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            return new SubmitAssignmentResult(this.yn5_1);
          case 6:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 6) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function SubmitAssignmentUseCase(systemImpl) {
    this.zn5_1 = systemImpl;
  }
  protoOf(SubmitAssignmentUseCase).gn6 = function (repo, submitterUid, assignmentUid, accountPersonUid, submission, $completion) {
    var tmp = new $invokeCOROUTINE$9(this, repo, submitterUid, assignmentUid, accountPersonUid, submission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function SubmitMarkUseCase$invoke$lambda($assignment, $submitterUid, $activeUserSubmitterUid, $activeUserPerson, $courseBlock, $clazzUid, $applyPenalty) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.dbh_1 = $assignment.q7s_1;
      $this$shallowCopy.ebh_1 = $submitterUid;
      $this$shallowCopy.fbh_1 = $activeUserSubmitterUid;
      $this$shallowCopy.gbh_1 = $activeUserPerson.f95_1;
      var tmp = $this$shallowCopy;
      var tmp0_elvis_lhs = $courseBlock.h7x_1;
      tmp.jbh_1 = tmp0_elvis_lhs == null ? 0.0 : tmp0_elvis_lhs;
      $this$shallowCopy.mbh_1 = $clazzUid;
      var tmp_0;
      if ($applyPenalty) {
        $this$shallowCopy.kbh_1 = roundTo($this$shallowCopy.ibh_1 * ($courseBlock.f7x_1 / 100.0), 2);
        $this$shallowCopy.ibh_1 = $this$shallowCopy.ibh_1 - $this$shallowCopy.kbh_1;
        tmp_0 = Unit_instance;
      }
      return Unit_instance;
    };
  }
  function SubmitMarkUseCase$invoke$slambda(this$0, $stmt, $activeUserPerson, $courseBlock, $instructorActorToPersonUidMap, $actorToPersonUidMap, $clazzUid, $activityId, $markToRecord, resultContinuation) {
    this.pn6_1 = this$0;
    this.qn6_1 = $stmt;
    this.rn6_1 = $activeUserPerson;
    this.sn6_1 = $courseBlock;
    this.tn6_1 = $instructorActorToPersonUidMap;
    this.un6_1 = $actorToPersonUidMap;
    this.vn6_1 = $clazzUid;
    this.wn6_1 = $activityId;
    this.xn6_1 = $markToRecord;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SubmitMarkUseCase$invoke$slambda).an7 = function (it, $completion) {
    var tmp = this.gmp(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SubmitMarkUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.an7(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SubmitMarkUseCase$invoke$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.zn6_1 = uuid4();
            this.hd_1 = 1;
            var tmp_0 = listOf_0(this.qn6_1);
            var tmp0_xseAccountPersonUid = this.rn6_1.f95_1;
            var tmp1_xseAccountUsername = ensureNotNull(this.rn6_1.g95_1);
            var tmp2_xseCbUid = this.sn6_1.w7w_1;
            var tmp3_xseRegistrationHi = this.zn6_1.pl7();
            var tmp4_xseRegistrationLo = this.zn6_1.ql7();
            var tmp5_knownActorUidToPersonUids = this.pn6_1.gn7_1.e45(MapSerializer(serializer_1(Companion_getInstance_2()), serializer_1(Companion_getInstance_2())), plus_0(this.tn6_1, this.un6_1));
            suspendResult = this.pn6_1.en7_1.on7(tmp_0, new XapiSessionEntity(VOID, VOID, tmp3_xseRegistrationHi, tmp4_xseRegistrationLo, VOID, tmp0_xseAccountPersonUid, VOID, tmp1_xseAccountUsername, this.vn6_1, tmp2_xseCbUid, VOID, VOID, this.wn6_1, VOID, VOID, VOID, VOID, VOID, tmp5_knownActorUidToPersonUids), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            suspendResult = this.pn6_1.bn7_1.g7e().insertAsync(this.xn6_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return suspendResult;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SubmitMarkUseCase$invoke$slambda).gmp = function (it, completion) {
    var i = new SubmitMarkUseCase$invoke$slambda(this.pn6_1, this.qn6_1, this.rn6_1, this.sn6_1, this.tn6_1, this.un6_1, this.vn6_1, this.wn6_1, this.xn6_1, completion);
    i.yn6_1 = it;
    return i;
  };
  function SubmitMarkUseCase$invoke$slambda_0(this$0, $stmt, $activeUserPerson, $courseBlock, $instructorActorToPersonUidMap, $actorToPersonUidMap, $clazzUid, $activityId, $markToRecord, resultContinuation) {
    var i = new SubmitMarkUseCase$invoke$slambda(this$0, $stmt, $activeUserPerson, $courseBlock, $instructorActorToPersonUidMap, $actorToPersonUidMap, $clazzUid, $activityId, $markToRecord, resultContinuation);
    var l = function (it, $completion) {
      return i.an7(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$10(_this__u8e3s4, activeUserPerson, assignment, clazzUid, submitterUid, draftMark, submissions, courseBlock, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.xn7_1 = _this__u8e3s4;
    this.yn7_1 = activeUserPerson;
    this.zn7_1 = assignment;
    this.an8_1 = clazzUid;
    this.bn8_1 = submitterUid;
    this.cn8_1 = draftMark;
    this.dn8_1 = submissions;
    this.en8_1 = courseBlock;
  }
  protoOf($invokeCOROUTINE$10).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 8;
            var tmp_0 = this;
            var tmp_1;
            if (!this.dn8_1.c1()) {
              var iterator = this.dn8_1.w();
              if (!iterator.f())
                throw NoSuchElementException_init_$Create$();
              var maxValue = iterator.e().nbn_1;
              while (iterator.f()) {
                var v = iterator.e().nbn_1;
                if (compareTo(maxValue, v) < 0) {
                  maxValue = v;
                }
              }
              tmp_1 = maxValue.c7(this.en8_1.e7x_1) > 0;
            } else {
              tmp_1 = false;
            }

            tmp_0.fn8_1 = tmp_1;
            this.hd_1 = 1;
            suspendResult = this.xn7_1.bn7_1.d7e().r7r(this.zn7_1.q7s_1, this.an8_1, this.yn7_1.f95_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.gn8_1 = suspendResult;
            var tmp_2;
            if (this.zn7_1.t7s_1.equals(new Long(0, 0))) {
              tmp_2 = true;
            } else {
              var tmp_3 = this.zn7_1.d7t_1;
              tmp_2 = tmp_3 === 1;
            }

            if (tmp_2) {
              var tmp_4 = this;
              var activeUserPersonXapiAgent = toXapiAgent(this.yn7_1, this.xn7_1.cn7_1);
              tmp_4.hn8_1 = to(activeUserPersonXapiAgent, mapOf_0(to(identifierHash(activeUserPersonXapiAgent, this.xn7_1.fn7_1), this.yn7_1.f95_1)));
              this.hd_1 = 3;
              continue $sm;
            } else {
              this.hd_1 = 2;
              suspendResult = this.xn7_1.dn7_1.an9(this.zn7_1.t7s_1, this.gn8_1.mb(), this.zn7_1.i7t_1, this.zn7_1.q7s_1, this.yn7_1.f95_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 2:
            this.in8_1 = suspendResult;
            var tmp_5 = this;
            var it = this.in8_1;
            tmp_5.hn8_1 = to(it.bn9_1, it.cn9_1);
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.jn8_1 = this.hn8_1;
            this.kn8_1 = this.jn8_1.y6();
            this.ln8_1 = this.jn8_1.z6();
            if (this.zn7_1.t7s_1.equals(new Long(0, 0))) {
              this.hd_1 = 5;
              suspendResult = this.xn7_1.bn7_1.a7d().sfn(this.bn8_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 4;
              suspendResult = this.xn7_1.dn7_1.an9(this.zn7_1.t7s_1, this.bn8_1.mb(), this.zn7_1.i7t_1, this.zn7_1.q7s_1, this.yn7_1.f95_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 4:
            this.nn8_1 = suspendResult;
            var tmp_6 = this;
            var it_0 = this.nn8_1;
            tmp_6.mn8_1 = to(it_0.bn9_1, it_0.cn9_1);
            this.hd_1 = 6;
            continue $sm;
          case 5:
            this.on8_1 = suspendResult;
            this.pn8_1 = this.on8_1 == null ? null : toXapiAgent(this.on8_1, this.xn7_1.cn7_1);
            var tmp_7 = this;
            var tmp_8;
            if (this.pn8_1 == null) {
              throw IllegalStateException_init_$Create$('Could not find person for ' + this.bn8_1.toString());
            } else {
              tmp_8 = this.pn8_1;
            }

            tmp_7.qn8_1 = tmp_8;
            this.mn8_1 = to(this.qn8_1, mapOf_0(to(identifierHash(this.qn8_1, this.xn7_1.fn7_1), this.bn8_1)));
            this.hd_1 = 6;
            continue $sm;
          case 6:
            this.rn8_1 = this.mn8_1;
            this.sn8_1 = this.rn8_1.y6();
            this.tn8_1 = this.rn8_1.z6();
            var tmp_9 = this;
            tmp_9.un8_1 = shallowCopy_1(this.cn8_1, SubmitMarkUseCase$invoke$lambda(this.zn7_1, this.bn8_1, this.gn8_1, this.yn7_1, this.en8_1, this.an8_1, this.fn8_1));
            var tmp_10 = this;
            var tmp4_viewName = 'CourseAssignment';
            var tmp5_endpoint = this.xn7_1.cn7_1.umj_1;
            Companion_getInstance_112();
            var tmp_11 = to('clazzUid', this.an8_1.toString());
            Companion_getInstance_112();
            var tmp6_queryString = toQueryString(mapOf([tmp_11, to('entityUid', this.zn7_1.q7s_1.toString())]));
            tmp_10.vn8_1 = (new UstadUrlComponents(tmp5_endpoint, tmp4_viewName, tmp6_queryString)).in9();
            var tmp_12 = this;
            var tmp7_verb = new XapiVerb(get_VERB_COMPLETED());
            var tmp8_object = new XapiActivityStatementObject(XapiObjectType_Activity_getInstance(), this.vn8_1);
            var tmp9_context = new XapiContext(this.kn8_1);
            var tmp10_result = new XapiResult(true, true, new Score(this.un8_1.ibh_1 / this.un8_1.jbh_1, this.un8_1.ibh_1, 0.0, this.un8_1.jbh_1));
            tmp_12.wn8_1 = new XapiStatement(VOID, this.sn8_1, tmp7_verb, tmp8_object, tmp10_result, tmp9_context);
            this.hd_1 = 7;
            suspendResult = withDoorTransactionAsync(this.xn7_1.bn7_1, VOID, SubmitMarkUseCase$invoke$slambda_0(this.xn7_1, this.wn8_1, this.yn7_1, this.en8_1, this.ln8_1, this.tn8_1, this.an8_1, this.vn8_1, this.un8_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            return Unit_instance;
          case 8:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 8) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function SubmitMarkUseCase(repo, endpoint, createXapiGroupUseCase, xapiStatementResource, xxStringHasher, json) {
    this.bn7_1 = repo;
    this.cn7_1 = endpoint;
    this.dn7_1 = createXapiGroupUseCase;
    this.en7_1 = xapiStatementResource;
    this.fn7_1 = xxStringHasher;
    this.gn7_1 = json;
  }
  protoOf(SubmitMarkUseCase).jn9 = function (activeUserPerson, assignment, clazzUid, submitterUid, draftMark, submissions, courseBlock, $completion) {
    var tmp = new $invokeCOROUTINE$10(this, activeUserPerson, assignment, clazzUid, submitterUid, draftMark, submissions, courseBlock, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda($$this$unsafeFlow, resultContinuation) {
    this.sn9_1 = $$this$unsafeFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda).xn9 = function (value, $completion) {
    var tmp = this.yn9(value, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda).he = function (p1, $completion) {
    return this.xn9((p1 == null ? true : p1 instanceof PersonNames) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            var tmp_0 = this;
            tmp_0.vn9_1 = this.sn9_1;
            var tmp_1 = this;
            tmp_1.wn9_1 = this.tn9_1;
            var tmp0_safe_receiver = this.wn9_1;
            if (!((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ofr_1) == null)) {
              this.hd_1 = 3;
              suspendResult = this.vn9_1.t1d(this.wn9_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 2;
              continue $sm;
            }

          case 2:
            if (false) {
              this.hd_1 = 1;
              continue $sm;
            }

            this.hd_1 = 4;
            continue $sm;
          case 3:
            this.un9_1 = suspendResult;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            return Unit_instance;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda).yn9 = function (value, completion) {
    var i = new GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda(this.sn9_1, completion);
    i.tn9_1 = value;
    return i;
  };
  function GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda_0($$this$unsafeFlow, resultContinuation) {
    var i = new GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda($$this$unsafeFlow, resultContinuation);
    var l = function (value, $completion) {
      return i.xn9(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$12(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.hna_1 = _this__u8e3s4;
    this.ina_1 = collector;
  }
  protoOf($collectCOROUTINE$12).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.jna_1 = this.ina_1;
            this.hd_1 = 1;
            var tmp_1 = GetAssignmentSubmitterNameUseCase$invoke$o$collect$slambda_0(this.jna_1, null);
            suspendResult = this.hna_1.kna_1.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_0(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function sam$kotlinx_coroutines_flow_FlowCollector$0_0(function_0) {
    this.lna_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_0).t1d = function (value, $completion) {
    return this.lna_1(value, $completion);
  };
  function _no_name_provided__qut3iv($this) {
    this.kna_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv).mna = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$12(this, collector, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(_no_name_provided__qut3iv).z1b = function (collector, $completion) {
    return this.mna(collector, $completion);
  };
  function $invokeCOROUTINE$11(_this__u8e3s4, submitterUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.vna_1 = _this__u8e3s4;
    this.wna_1 = submitterUid;
  }
  protoOf($invokeCOROUTINE$11).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            Companion_getInstance_1();
            if (this.wna_1.c7(toLong(10000)) < 0) {
              var tmp_0 = this;
              tmp_0.xna_1 = this.vna_1.zna_1.en6(strings_getInstance().qm8_1) + ' ' + this.wna_1.toString();
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              var this_0 = this.vna_1.yna_1.a7d().wfn(this.wna_1);
              suspendResult = first(new _no_name_provided__qut3iv(this_0), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            var tmp_1 = this;
            var it = suspendResult;
            var tmp_2 = it == null ? null : it.ofr_1;
            tmp_1.xna_1 = '' + tmp_2 + ' ' + (it == null ? null : it.pfr_1);
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.xna_1;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function GetAssignmentSubmitterNameUseCase(repo, systemImpl) {
    this.yna_1 = repo;
    this.zna_1 = systemImpl;
  }
  protoOf(GetAssignmentSubmitterNameUseCase).anb = function (submitterUid, $completion) {
    var tmp = new $invokeCOROUTINE$11(this, submitterUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function BlobTransferJobItem(blobUrl, transferJobItemUid, lockIdToRelease, estimatedSize, partialResponseFile) {
    lockIdToRelease = lockIdToRelease === VOID ? new Long(0, 0) : lockIdToRelease;
    estimatedSize = estimatedSize === VOID ? null : estimatedSize;
    partialResponseFile = partialResponseFile === VOID ? null : partialResponseFile;
    this.bnb_1 = blobUrl;
    this.cnb_1 = transferJobItemUid;
    this.dnb_1 = lockIdToRelease;
    this.enb_1 = estimatedSize;
    this.fnb_1 = partialResponseFile;
  }
  protoOf(BlobTransferJobItem).toString = function () {
    return 'BlobTransferJobItem(blobUrl=' + this.bnb_1 + ', transferJobItemUid=' + this.cnb_1 + ', lockIdToRelease=' + this.dnb_1.toString() + ', estimatedSize=' + toString_0(this.enb_1) + ', partialResponseFile=' + this.fnb_1 + ')';
  };
  protoOf(BlobTransferJobItem).hashCode = function () {
    var result = getStringHashCode(this.bnb_1);
    result = imul(result, 31) + this.cnb_1 | 0;
    result = imul(result, 31) + this.dnb_1.hashCode() | 0;
    result = imul(result, 31) + (this.enb_1 == null ? 0 : this.enb_1.hashCode()) | 0;
    result = imul(result, 31) + (this.fnb_1 == null ? 0 : getStringHashCode(this.fnb_1)) | 0;
    return result;
  };
  protoOf(BlobTransferJobItem).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof BlobTransferJobItem))
      return false;
    var tmp0_other_with_cast = other instanceof BlobTransferJobItem ? other : THROW_CCE();
    if (!(this.bnb_1 === tmp0_other_with_cast.bnb_1))
      return false;
    if (!(this.cnb_1 === tmp0_other_with_cast.cnb_1))
      return false;
    if (!this.dnb_1.equals(tmp0_other_with_cast.dnb_1))
      return false;
    if (!equals(this.enb_1, tmp0_other_with_cast.enb_1))
      return false;
    if (!(this.fnb_1 == tmp0_other_with_cast.fnb_1))
      return false;
    return true;
  };
  function BlobTransferProgressUpdate(transferItem, bytesTransferred) {
    this.gnb_1 = transferItem;
    this.hnb_1 = bytesTransferred;
  }
  protoOf(BlobTransferProgressUpdate).toString = function () {
    return 'Uid #' + this.gnb_1.cnb_1 + ' transferred=' + this.hnb_1.toString() + ' bytes';
  };
  protoOf(BlobTransferProgressUpdate).hashCode = function () {
    var result = this.gnb_1.hashCode();
    result = imul(result, 31) + this.hnb_1.hashCode() | 0;
    return result;
  };
  protoOf(BlobTransferProgressUpdate).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof BlobTransferProgressUpdate))
      return false;
    var tmp0_other_with_cast = other instanceof BlobTransferProgressUpdate ? other : THROW_CCE();
    if (!this.gnb_1.equals(tmp0_other_with_cast.gnb_1))
      return false;
    if (!this.hnb_1.equals(tmp0_other_with_cast.hnb_1))
      return false;
    return true;
  };
  function BlobTransferStatusUpdate(transferItem, status) {
    this.inb_1 = transferItem;
    this.jnb_1 = status;
  }
  protoOf(BlobTransferStatusUpdate).toString = function () {
    return 'BlobTransferStatusUpdate(transferItem=' + this.inb_1 + ', status=' + this.jnb_1 + ')';
  };
  protoOf(BlobTransferStatusUpdate).hashCode = function () {
    var result = this.inb_1.hashCode();
    result = imul(result, 31) + this.jnb_1 | 0;
    return result;
  };
  protoOf(BlobTransferStatusUpdate).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof BlobTransferStatusUpdate))
      return false;
    var tmp0_other_with_cast = other instanceof BlobTransferStatusUpdate ? other : THROW_CCE();
    if (!this.inb_1.equals(tmp0_other_with_cast.inb_1))
      return false;
    if (!(this.jnb_1 === tmp0_other_with_cast.jnb_1))
      return false;
    return true;
  };
  function CancelDownloadUseCase() {
  }
  function MakeContentEntryAvailableOfflineUseCase(repo, nodeIdAndAuth, enqueueContentManifestDownloadUseCase) {
    this.knb_1 = repo;
    this.lnb_1 = nodeIdAndAuth;
    this.mnb_1 = enqueueContentManifestDownloadUseCase;
  }
  function OpenBlobItem(uri, mimeType, fileName, fileSize) {
    this.nnb_1 = uri;
    this.onb_1 = mimeType;
    this.pnb_1 = fileName;
    this.qnb_1 = fileSize;
  }
  protoOf(OpenBlobItem).toString = function () {
    return 'OpenBlobItem(uri=' + this.nnb_1 + ', mimeType=' + this.onb_1 + ', fileName=' + this.pnb_1 + ', fileSize=' + this.qnb_1.toString() + ')';
  };
  protoOf(OpenBlobItem).hashCode = function () {
    var result = getStringHashCode(this.nnb_1);
    result = imul(result, 31) + getStringHashCode(this.onb_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.pnb_1) | 0;
    result = imul(result, 31) + this.qnb_1.hashCode() | 0;
    return result;
  };
  protoOf(OpenBlobItem).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof OpenBlobItem))
      return false;
    var tmp0_other_with_cast = other instanceof OpenBlobItem ? other : THROW_CCE();
    if (!(this.nnb_1 === tmp0_other_with_cast.nnb_1))
      return false;
    if (!(this.onb_1 === tmp0_other_with_cast.onb_1))
      return false;
    if (!(this.pnb_1 === tmp0_other_with_cast.pnb_1))
      return false;
    if (!this.qnb_1.equals(tmp0_other_with_cast.qnb_1))
      return false;
    return true;
  };
  function OpenBlobUiUseCase$invoke$lambda($onUiUpdate, $openItem) {
    return function (transferred, total) {
      $onUiUpdate(new OpeningBlobState($openItem, transferred, total));
      return Unit_instance;
    };
  }
  function $invokeCOROUTINE$14(_this__u8e3s4, openItem, onUiUpdate, intent, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.znb_1 = _this__u8e3s4;
    this.anc_1 = openItem;
    this.bnc_1 = onUiUpdate;
    this.cnc_1 = intent;
  }
  protoOf($invokeCOROUTINE$14).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.bnc_1(new OpeningBlobState(this.anc_1, new Long(0, 0), new Long(0, 0)));
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.znb_1.dnc_1.fnc(this.anc_1, OpenBlobUiUseCase$invoke$lambda(this.bnc_1, this.anc_1), this.cnc_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.bnc_1(null);
            this.id_1 = 4;
            this.hd_1 = 3;
            continue $sm;
          case 2:
            this.id_1 = 4;
            var tmp_0 = this.kd_1;
            if (tmp_0 instanceof Error) {
              var e = this.kd_1;
              Napier_getInstance().z5d('OpenBlobUiCase: could not open ' + this.anc_1, e);
              if (!(e instanceof CancellationException)) {
                var tmp_1 = new Long(0, 0);
                var tmp_2 = new Long(0, 0);
                var tmp0_elvis_lhs = e.message;
                this.bnc_1(new OpeningBlobState(this.anc_1, tmp_1, tmp_2, tmp0_elvis_lhs == null ? this.znb_1.enc_1.en6(strings_getInstance().glc_1) : tmp0_elvis_lhs));
              }
              this.hd_1 = 3;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 3:
            this.id_1 = 4;
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 4) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  function OpenBlobUiUseCase(openBlobUseCase, systemImpl) {
    this.dnc_1 = openBlobUseCase;
    this.enc_1 = systemImpl;
  }
  protoOf(OpenBlobUiUseCase).gnc = function (openItem, onUiUpdate, intent, $completion) {
    var tmp = new $invokeCOROUTINE$14(this, openItem, onUiUpdate, intent, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  var OpenBlobIntent_VIEW_instance;
  var OpenBlobIntent_SEND_instance;
  var OpenBlobIntent_entriesInitialized;
  function OpenBlobIntent_initEntries() {
    if (OpenBlobIntent_entriesInitialized)
      return Unit_instance;
    OpenBlobIntent_entriesInitialized = true;
    OpenBlobIntent_VIEW_instance = new OpenBlobIntent('VIEW', 0);
    OpenBlobIntent_SEND_instance = new OpenBlobIntent('SEND', 1);
  }
  function OpenBlobIntent(name, ordinal) {
    Enum.call(this, name, ordinal);
  }
  function OpenBlobIntent_VIEW_getInstance() {
    OpenBlobIntent_initEntries();
    return OpenBlobIntent_VIEW_instance;
  }
  function OpenBlobIntent_SEND_getInstance() {
    OpenBlobIntent_initEntries();
    return OpenBlobIntent_SEND_instance;
  }
  function OpenBlobUseCase() {
  }
  function OpeningBlobState(item, bytesReady, totalBytes, error) {
    error = error === VOID ? null : error;
    this.hnc_1 = item;
    this.inc_1 = bytesReady;
    this.jnc_1 = totalBytes;
    this.knc_1 = error;
  }
  protoOf(OpeningBlobState).toString = function () {
    return 'OpeningBlobState(item=' + this.hnc_1 + ', bytesReady=' + this.inc_1.toString() + ', totalBytes=' + this.jnc_1.toString() + ', error=' + this.knc_1 + ')';
  };
  protoOf(OpeningBlobState).hashCode = function () {
    var result = this.hnc_1.hashCode();
    result = imul(result, 31) + this.inc_1.hashCode() | 0;
    result = imul(result, 31) + this.jnc_1.hashCode() | 0;
    result = imul(result, 31) + (this.knc_1 == null ? 0 : getStringHashCode(this.knc_1)) | 0;
    return result;
  };
  protoOf(OpeningBlobState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof OpeningBlobState))
      return false;
    var tmp0_other_with_cast = other instanceof OpeningBlobState ? other : THROW_CCE();
    if (!this.hnc_1.equals(tmp0_other_with_cast.hnc_1))
      return false;
    if (!this.inc_1.equals(tmp0_other_with_cast.inc_1))
      return false;
    if (!this.jnc_1.equals(tmp0_other_with_cast.jnc_1))
      return false;
    if (!(this.knc_1 == tmp0_other_with_cast.knc_1))
      return false;
    return true;
  };
  function updateUris(_this__u8e3s4, $this, blobs, $completion) {
    var timeNow = systemTimeInMillis();
    return withDoorTransactionAsync(_this__u8e3s4, VOID, SaveAndUploadLocalUrisUseCase$updateUris$slambda_0(blobs, _this__u8e3s4, timeNow, null), $completion);
  }
  function SaveAndUploadLocalUrisUseCase$updateUris$slambda($blobs, $this_updateUris, $timeNow, resultContinuation) {
    this.tnc_1 = $blobs;
    this.unc_1 = $this_updateUris;
    this.vnc_1 = $timeNow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SaveAndUploadLocalUrisUseCase$updateUris$slambda).fmp = function (_anonymous_parameter_0__qggqh8, $completion) {
    var tmp = this.gmp(_anonymous_parameter_0__qggqh8, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SaveAndUploadLocalUrisUseCase$updateUris$slambda).he = function (p1, $completion) {
    return this.fmp(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SaveAndUploadLocalUrisUseCase$updateUris$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            var tmp_0 = this;
            tmp_0.xnc_1 = this.tnc_1;
            this.ync_1 = this.xnc_1.w();
            this.hd_1 = 1;
            continue $sm;
          case 1:
            if (!this.ync_1.f()) {
              this.hd_1 = 4;
              continue $sm;
            }

            this.znc_1 = this.ync_1.e();
            var tmp_1 = this;
            tmp_1.and_1 = this.znc_1;
            this.bnd_1 = this.and_1.dnd_1;
            if (this.bnd_1 === 90) {
              this.hd_1 = 2;
              suspendResult = this.unc_1.f7e().abv(this.and_1.cnd_1, this.and_1.fnd_1, this.vnc_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.hd_1 = 1;
            continue $sm;
          case 4:
            return Unit_instance;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SaveAndUploadLocalUrisUseCase$updateUris$slambda).gmp = function (_anonymous_parameter_0__qggqh8, completion) {
    var i = new SaveAndUploadLocalUrisUseCase$updateUris$slambda(this.tnc_1, this.unc_1, this.vnc_1, completion);
    i.wnc_1 = _anonymous_parameter_0__qggqh8;
    return i;
  };
  function SaveAndUploadLocalUrisUseCase$updateUris$slambda_0($blobs, $this_updateUris, $timeNow, resultContinuation) {
    var i = new SaveAndUploadLocalUrisUseCase$updateUris$slambda($blobs, $this_updateUris, $timeNow, resultContinuation);
    var l = function (_anonymous_parameter_0__qggqh8, $completion) {
      return i.fmp(_anonymous_parameter_0__qggqh8, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$15(_this__u8e3s4, localUrisToSave, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.snd_1 = _this__u8e3s4;
    this.tnd_1 = localUrisToSave;
  }
  protoOf($invokeCOROUTINE$15).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 6;
            this.hd_1 = 1;
            suspendResult = this.snd_1.wnd_1.ane(this.tnd_1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.und_1 = suspendResult;
            this.vnd_1 = this.snd_1.xnd_1;
            if (!(this.vnd_1 == null)) {
              this.hd_1 = 3;
              suspendResult = updateUris(this.snd_1.ynd_1, this.snd_1, this.und_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 2;
              var tmp0_elvis_lhs = this.snd_1.znd_1;
              suspendResult = updateUris(tmp0_elvis_lhs == null ? this.snd_1.ynd_1 : tmp0_elvis_lhs, this.snd_1, this.und_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 2:
            this.hd_1 = 5;
            continue $sm;
          case 3:
            this.hd_1 = 4;
            var this_0 = this.und_1;
            var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var item = tmp0_iterator.e();
              var tmp0_blobUrl = item.fnd_1;
              var tmp1_entityUid = item.cnd_1;
              var tmp2_tableId = item.dnd_1;
              var tmp3_retentionLockIdToRelease = item.gnd_1;
              destination.i1(new EnqueueBlobUploadItem(tmp0_blobUrl, tmp2_tableId, tmp1_entityUid, tmp3_retentionLockIdToRelease));
            }

            suspendResult = this.vnd_1.bne(destination, randomUuidAsString(), VOID, VOID, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.hd_1 = 5;
            continue $sm;
          case 5:
            return Unit_instance;
          case 6:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 6) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function SaveAndUploadLocalUrisUseCase(saveLocalUrisAsBlobsUseCase, enqueueBlobUploadClientUseCase, activeDb, activeRepo) {
    this.wnd_1 = saveLocalUrisAsBlobsUseCase;
    this.xnd_1 = enqueueBlobUploadClientUseCase;
    this.ynd_1 = activeDb;
    this.znd_1 = activeRepo;
  }
  protoOf(SaveAndUploadLocalUrisUseCase).cne = function (localUrisToSave, $completion) {
    var tmp = new $invokeCOROUTINE$15(this, localUrisToSave, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function Companion_33() {
  }
  protoOf(Companion_33).a4r = function () {
    return $serializer_getInstance_44();
  };
  var Companion_instance_81;
  function Companion_getInstance_50() {
    return Companion_instance_81;
  }
  function $serializer_32() {
    $serializer_instance_32 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.blob.savelocaluris.SaveLocalUrisAsBlobsUseCase.SavedBlob', this, 8);
    tmp0_serialDesc.g4f('entityUid', false);
    tmp0_serialDesc.g4f('tableId', false);
    tmp0_serialDesc.g4f('localUri', false);
    tmp0_serialDesc.g4f('blobUrl', false);
    tmp0_serialDesc.g4f('retentionLockId', true);
    tmp0_serialDesc.g4f('integrity', false);
    tmp0_serialDesc.g4f('mimeType', false);
    tmp0_serialDesc.g4f('storageSize', false);
    this.dne_1 = tmp0_serialDesc;
  }
  protoOf($serializer_32).d44 = function () {
    return this.dne_1;
  };
  protoOf($serializer_32).x4f = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [LongSerializer_getInstance(), IntSerializer_getInstance(), StringSerializer_getInstance(), StringSerializer_getInstance(), LongSerializer_getInstance(), StringSerializer_getInstance(), StringSerializer_getInstance(), LongSerializer_getInstance()];
  };
  protoOf($serializer_32).f44 = function (decoder) {
    var tmp0_desc = this.dne_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = new Long(0, 0);
    var tmp5_local1 = 0;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = new Long(0, 0);
    var tmp9_local5 = null;
    var tmp10_local6 = null;
    var tmp11_local7 = new Long(0, 0);
    var tmp12_input = decoder.v47(tmp0_desc);
    if (tmp12_input.k48()) {
      tmp4_local0 = tmp12_input.b48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp12_input.a48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp12_input.f48(tmp0_desc, 2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp12_input.f48(tmp0_desc, 3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp12_input.b48(tmp0_desc, 4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp12_input.f48(tmp0_desc, 5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
      tmp10_local6 = tmp12_input.f48(tmp0_desc, 6);
      tmp3_bitMask0 = tmp3_bitMask0 | 64;
      tmp11_local7 = tmp12_input.b48(tmp0_desc, 7);
      tmp3_bitMask0 = tmp3_bitMask0 | 128;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp12_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp12_input.b48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp12_input.a48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp12_input.f48(tmp0_desc, 2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp12_input.f48(tmp0_desc, 3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp12_input.b48(tmp0_desc, 4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp12_input.f48(tmp0_desc, 5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          case 6:
            tmp10_local6 = tmp12_input.f48(tmp0_desc, 6);
            tmp3_bitMask0 = tmp3_bitMask0 | 64;
            break;
          case 7:
            tmp11_local7 = tmp12_input.b48(tmp0_desc, 7);
            tmp3_bitMask0 = tmp3_bitMask0 | 128;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp12_input.w47(tmp0_desc);
    return SavedBlob_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, tmp11_local7, null);
  };
  protoOf($serializer_32).ene = function (encoder, value) {
    var tmp0_desc = this.dne_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    tmp1_output.f49(tmp0_desc, 0, value.cnd_1);
    tmp1_output.e49(tmp0_desc, 1, value.dnd_1);
    tmp1_output.j49(tmp0_desc, 2, value.end_1);
    tmp1_output.j49(tmp0_desc, 3, value.fnd_1);
    if (tmp1_output.r49(tmp0_desc, 4) ? true : !value.gnd_1.equals(new Long(0, 0))) {
      tmp1_output.f49(tmp0_desc, 4, value.gnd_1);
    }
    tmp1_output.j49(tmp0_desc, 5, value.hnd_1);
    tmp1_output.j49(tmp0_desc, 6, value.ind_1);
    tmp1_output.f49(tmp0_desc, 7, value.jnd_1);
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_32).e44 = function (encoder, value) {
    return this.ene(encoder, value instanceof SavedBlob ? value : THROW_CCE());
  };
  var $serializer_instance_32;
  function $serializer_getInstance_44() {
    if ($serializer_instance_32 == null)
      new $serializer_32();
    return $serializer_instance_32;
  }
  function SavedBlob_init_$Init$(seen1, entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize, serializationConstructorMarker, $this) {
    if (!(239 === (239 & seen1))) {
      throwMissingFieldException(seen1, 239, $serializer_getInstance_44().dne_1);
    }
    $this.cnd_1 = entityUid;
    $this.dnd_1 = tableId;
    $this.end_1 = localUri;
    $this.fnd_1 = blobUrl;
    if (0 === (seen1 & 16))
      $this.gnd_1 = new Long(0, 0);
    else
      $this.gnd_1 = retentionLockId;
    $this.hnd_1 = integrity;
    $this.ind_1 = mimeType;
    $this.jnd_1 = storageSize;
    return $this;
  }
  function SavedBlob_init_$Create$(seen1, entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize, serializationConstructorMarker) {
    return SavedBlob_init_$Init$(seen1, entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize, serializationConstructorMarker, objectCreate(protoOf(SavedBlob)));
  }
  function SaveLocalUriAsBlobItem(localUri, entityUid, tableId, mimeType, deleteLocalUriAfterSave, createRetentionLock, extraHeaders) {
    entityUid = entityUid === VOID ? new Long(0, 0) : entityUid;
    tableId = tableId === VOID ? 0 : tableId;
    mimeType = mimeType === VOID ? null : mimeType;
    deleteLocalUriAfterSave = deleteLocalUriAfterSave === VOID ? false : deleteLocalUriAfterSave;
    createRetentionLock = createRetentionLock === VOID ? false : createRetentionLock;
    extraHeaders = extraHeaders === VOID ? Companion_instance_123.o4d() : extraHeaders;
    this.fne_1 = localUri;
    this.gne_1 = entityUid;
    this.hne_1 = tableId;
    this.ine_1 = mimeType;
    this.jne_1 = deleteLocalUriAfterSave;
    this.kne_1 = createRetentionLock;
    this.lne_1 = extraHeaders;
  }
  protoOf(SaveLocalUriAsBlobItem).toString = function () {
    return 'SaveLocalUriAsBlobItem(localUri=' + this.fne_1 + ', entityUid=' + this.gne_1.toString() + ', tableId=' + this.hne_1 + ', mimeType=' + this.ine_1 + ', deleteLocalUriAfterSave=' + this.jne_1 + ', createRetentionLock=' + this.kne_1 + ', extraHeaders=' + this.lne_1 + ')';
  };
  protoOf(SaveLocalUriAsBlobItem).hashCode = function () {
    var result = getStringHashCode(this.fne_1);
    result = imul(result, 31) + this.gne_1.hashCode() | 0;
    result = imul(result, 31) + this.hne_1 | 0;
    result = imul(result, 31) + (this.ine_1 == null ? 0 : getStringHashCode(this.ine_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.jne_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.kne_1) | 0;
    result = imul(result, 31) + hashCode(this.lne_1) | 0;
    return result;
  };
  protoOf(SaveLocalUriAsBlobItem).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SaveLocalUriAsBlobItem))
      return false;
    var tmp0_other_with_cast = other instanceof SaveLocalUriAsBlobItem ? other : THROW_CCE();
    if (!(this.fne_1 === tmp0_other_with_cast.fne_1))
      return false;
    if (!this.gne_1.equals(tmp0_other_with_cast.gne_1))
      return false;
    if (!(this.hne_1 === tmp0_other_with_cast.hne_1))
      return false;
    if (!(this.ine_1 == tmp0_other_with_cast.ine_1))
      return false;
    if (!(this.jne_1 === tmp0_other_with_cast.jne_1))
      return false;
    if (!(this.kne_1 === tmp0_other_with_cast.kne_1))
      return false;
    if (!equals(this.lne_1, tmp0_other_with_cast.lne_1))
      return false;
    return true;
  };
  function SavedBlob(entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize) {
    retentionLockId = retentionLockId === VOID ? new Long(0, 0) : retentionLockId;
    this.cnd_1 = entityUid;
    this.dnd_1 = tableId;
    this.end_1 = localUri;
    this.fnd_1 = blobUrl;
    this.gnd_1 = retentionLockId;
    this.hnd_1 = integrity;
    this.ind_1 = mimeType;
    this.jnd_1 = storageSize;
  }
  protoOf(SavedBlob).mne = function (entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize) {
    return new SavedBlob(entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize);
  };
  protoOf(SavedBlob).nne = function (entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize, $super) {
    entityUid = entityUid === VOID ? this.cnd_1 : entityUid;
    tableId = tableId === VOID ? this.dnd_1 : tableId;
    localUri = localUri === VOID ? this.end_1 : localUri;
    blobUrl = blobUrl === VOID ? this.fnd_1 : blobUrl;
    retentionLockId = retentionLockId === VOID ? this.gnd_1 : retentionLockId;
    integrity = integrity === VOID ? this.hnd_1 : integrity;
    mimeType = mimeType === VOID ? this.ind_1 : mimeType;
    storageSize = storageSize === VOID ? this.jnd_1 : storageSize;
    return $super === VOID ? this.mne(entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize) : $super.mne.call(this, entityUid, tableId, localUri, blobUrl, retentionLockId, integrity, mimeType, storageSize);
  };
  protoOf(SavedBlob).toString = function () {
    return 'SavedBlob(entityUid=' + this.cnd_1.toString() + ', tableId=' + this.dnd_1 + ', localUri=' + this.end_1 + ', blobUrl=' + this.fnd_1 + ', retentionLockId=' + this.gnd_1.toString() + ', integrity=' + this.hnd_1 + ', mimeType=' + this.ind_1 + ', storageSize=' + this.jnd_1.toString() + ')';
  };
  protoOf(SavedBlob).hashCode = function () {
    var result = this.cnd_1.hashCode();
    result = imul(result, 31) + this.dnd_1 | 0;
    result = imul(result, 31) + getStringHashCode(this.end_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.fnd_1) | 0;
    result = imul(result, 31) + this.gnd_1.hashCode() | 0;
    result = imul(result, 31) + getStringHashCode(this.hnd_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.ind_1) | 0;
    result = imul(result, 31) + this.jnd_1.hashCode() | 0;
    return result;
  };
  protoOf(SavedBlob).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SavedBlob))
      return false;
    var tmp0_other_with_cast = other instanceof SavedBlob ? other : THROW_CCE();
    if (!this.cnd_1.equals(tmp0_other_with_cast.cnd_1))
      return false;
    if (!(this.dnd_1 === tmp0_other_with_cast.dnd_1))
      return false;
    if (!(this.end_1 === tmp0_other_with_cast.end_1))
      return false;
    if (!(this.fnd_1 === tmp0_other_with_cast.fnd_1))
      return false;
    if (!this.gnd_1.equals(tmp0_other_with_cast.gnd_1))
      return false;
    if (!(this.hnd_1 === tmp0_other_with_cast.hnd_1))
      return false;
    if (!(this.ind_1 === tmp0_other_with_cast.ind_1))
      return false;
    if (!this.jnd_1.equals(tmp0_other_with_cast.jnd_1))
      return false;
    return true;
  };
  function SaveLocalUrisAsBlobsUseCase$invoke$lambda(_anonymous_parameter_0__qggqh8, _anonymous_parameter_1__qggqgd) {
    return Unit_instance;
  }
  function SaveLocalUrisAsBlobsUseCase() {
  }
  function EnqueueSavePictureUseCase() {
  }
  function imageDaoForTable(_this__u8e3s4, $this, tableId) {
    var tmp;
    if (tableId === 50) {
      tmp = _this__u8e3s4.s7d();
    } else {
      if (tableId === 125) {
        tmp = _this__u8e3s4.q7e();
      } else {
        if (tableId === 6677) {
          tmp = _this__u8e3s4.d7f();
        } else {
          if (tableId === 6678) {
            tmp = _this__u8e3s4.e7f();
          } else {
            tmp = null;
          }
        }
      }
    }
    return tmp;
  }
  function Companion_34() {
    this.qne_1 = 160;
  }
  var Companion_instance_82;
  function Companion_getInstance_51() {
    return Companion_instance_82;
  }
  function $invokeCOROUTINE$16(_this__u8e3s4, entityUid, tableId, pictureUri, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.zne_1 = _this__u8e3s4;
    this.anf_1 = entityUid;
    this.bnf_1 = tableId;
    this.cnf_1 = pictureUri;
  }
  protoOf($invokeCOROUTINE$16).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 21;
            var tmp0_safe_receiver = this.cnf_1;
            var tmp_0;
            if (tmp0_safe_receiver == null) {
              tmp_0 = null;
            } else {
              var tmp_1;
              if (charSequenceLength(tmp0_safe_receiver) === 0) {
                tmp_1 = null;
              } else {
                tmp_1 = tmp0_safe_receiver;
              }
              tmp_0 = tmp_1;
            }

            if (!(tmp_0 == null)) {
              this.dnf_1 = Companion_getInstance_3().b2r(this.cnf_1);
              this.enf_1 = this.zne_1.lng_1;
              if (this.enf_1 == null) {
                this.fnf_1 = null;
                this.hd_1 = 4;
                continue $sm;
              } else {
                this.hd_1 = 3;
                suspendResult = getLocalUriIfRemote(this.enf_1, this.dnf_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              }
            } else {
              this.gnf_1 = imageDaoForTable(this.zne_1.ing_1, this.zne_1, this.bnf_1);
              if (this.gnf_1 == null) {
                this.hnf_1 = null;
                this.hd_1 = 2;
                continue $sm;
              } else {
                this.hd_1 = 1;
                suspendResult = this.gnf_1.rb3(this.anf_1, null, null, systemTimeInMillis(), this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              }
            }

          case 1:
            var tmp_2 = this;
            tmp_2.hnf_1 = Unit_instance;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.hd_1 = 20;
            continue $sm;
          case 3:
            this.fnf_1 = suspendResult;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            this.inf_1 = this.fnf_1;
            this.jnf_1 = this.inf_1 == null ? this.dnf_1 : this.inf_1;
            this.hd_1 = 5;
            suspendResult = this.zne_1.jng_1.mng(this.jnf_1.toString(), VOID, VOID, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            this.knf_1 = suspendResult;
            this.hd_1 = 6;
            suspendResult = this.zne_1.jng_1.mng(this.jnf_1.toString(), VOID, new CompressParams(160, 160), VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            this.lnf_1 = suspendResult;
            this.mnf_1 = this.zne_1.fng_1;
            var tmp_3 = this;
            tmp_3.nnf_1 = ArrayList_init_$Create$();
            var tmp_4 = this;
            tmp_4.onf_1 = this.nnf_1;
            if (this.knf_1 == null)
              null;
            else {
              this.onf_1.i1(new SaveLocalUriAsBlobItem(this.knf_1.nng_1, this.anf_1, this.bnf_1, this.knf_1.ong_1, true, true));
            }

            if (this.lnf_1 == null)
              null;
            else {
              this.onf_1.i1(new SaveLocalUriAsBlobItem(this.lnf_1.nng_1, this.anf_1, this.bnf_1, this.lnf_1.ong_1, true, true));
            }

            if (this.knf_1 == null ? true : this.lnf_1 == null) {
              this.hd_1 = 7;
              suspendResult = isRemote(this.dnf_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.pnf_1 = false;
              this.hd_1 = 8;
              continue $sm;
            }

          case 7:
            this.qnf_1 = suspendResult;
            this.pnf_1 = !this.qnf_1;
            this.hd_1 = 8;
            continue $sm;
          case 8:
            this.rnf_1 = this.pnf_1;
            if (this.rnf_1) {
              this.onf_1.i1(new SaveLocalUriAsBlobItem(this.cnf_1, this.anf_1, this.bnf_1, VOID, VOID, true));
            }

            this.snf_1 = this.nnf_1;
            this.tnf_1 = this.snf_1.f3();
            this.hd_1 = 9;
            suspendResult = this.mnf_1.ane(this.tnf_1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 9:
            this.unf_1 = suspendResult;
            this.hd_1 = 10;
            suspendResult = this.zne_1.kng_1.rng(listOf_0(this.cnf_1), true, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 10:
            var tmp_5 = this;
            var tmp$ret$0;
            l$ret$1: do {
              var tmp0_iterator = this.unf_1.w();
              while (tmp0_iterator.f()) {
                var element = tmp0_iterator.e();
                if (element.end_1 === this.cnf_1) {
                  tmp$ret$0 = element;
                  break l$ret$1;
                }
              }
              tmp$ret$0 = null;
            }
             while (false);
            var tmp3_safe_receiver = tmp$ret$0;
            var tmp4_elvis_lhs = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.fnd_1;
            tmp_5.vnf_1 = tmp4_elvis_lhs == null ? this.dnf_1.toString() : tmp4_elvis_lhs;
            var tmp_6 = this;
            var tmp$ret$2;
            l$ret$3: do {
              var tmp0_iterator_0 = this.unf_1.w();
              while (tmp0_iterator_0.f()) {
                var element_0 = tmp0_iterator_0.e();
                var tmp0_safe_receiver_0 = this.knf_1;
                if (element_0.end_1 === (tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.nng_1)) {
                  tmp$ret$2 = element_0;
                  break l$ret$3;
                }
              }
              tmp$ret$2 = null;
            }
             while (false);
            var tmp5_safe_receiver = tmp$ret$2;
            var tmp6_elvis_lhs = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.fnd_1;
            tmp_6.wnf_1 = tmp6_elvis_lhs == null ? this.vnf_1 : tmp6_elvis_lhs;
            var tmp_7 = this;
            var tmp$ret$4;
            l$ret$5: do {
              var tmp0_iterator_1 = this.unf_1.w();
              while (tmp0_iterator_1.f()) {
                var element_1 = tmp0_iterator_1.e();
                var tmp0_safe_receiver_1 = this.lnf_1;
                if (element_1.end_1 === (tmp0_safe_receiver_1 == null ? null : tmp0_safe_receiver_1.nng_1)) {
                  tmp$ret$4 = element_1;
                  break l$ret$5;
                }
              }
              tmp$ret$4 = null;
            }
             while (false);
            var tmp7_safe_receiver = tmp$ret$4;
            var tmp8_elvis_lhs = tmp7_safe_receiver == null ? null : tmp7_safe_receiver.fnd_1;
            tmp_7.xnf_1 = tmp8_elvis_lhs == null ? this.vnf_1 : tmp8_elvis_lhs;
            if (!(this.zne_1.gng_1 == null)) {
              if (this.knf_1 == null ? true : this.lnf_1 == null) {
                this.hd_1 = 13;
                suspendResult = isRemote(this.dnf_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                this.znf_1 = false;
                this.hd_1 = 14;
                continue $sm;
              }
            } else {
              this.ang_1 = imageDaoForTable(this.zne_1.ing_1, this.zne_1, this.bnf_1);
              if (this.ang_1 == null) {
                this.bng_1 = null;
                this.hd_1 = 12;
                continue $sm;
              } else {
                this.hd_1 = 11;
                suspendResult = this.ang_1.rb3(this.anf_1, this.wnf_1, this.xnf_1, systemTimeInMillis(), this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              }
            }

          case 11:
            var tmp_8 = this;
            tmp_8.bng_1 = Unit_instance;
            this.hd_1 = 12;
            continue $sm;
          case 12:
            this.hd_1 = 19;
            continue $sm;
          case 13:
            this.znf_1 = suspendResult;
            this.hd_1 = 14;
            continue $sm;
          case 14:
            if (this.znf_1) {
              var tmp_9 = this;
              tmp_9.ynf_1 = new EnqueueBlobUploadItem(this.dnf_1.toString(), this.bnf_1, this.anf_1, new Long(0, 0));
              this.hd_1 = 15;
              continue $sm;
            } else {
              var tmp_10 = this;
              tmp_10.ynf_1 = null;
              this.hd_1 = 15;
              continue $sm;
            }

          case 15:
            this.cng_1 = this.ynf_1;
            this.dng_1 = imageDaoForTable(this.zne_1.hng_1, this.zne_1, this.bnf_1);
            if (this.dng_1 == null) {
              this.eng_1 = null;
              this.hd_1 = 17;
              continue $sm;
            } else {
              this.hd_1 = 16;
              suspendResult = this.dng_1.rb3(this.anf_1, this.wnf_1, this.xnf_1, systemTimeInMillis(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 16:
            var tmp_11 = this;
            tmp_11.eng_1 = Unit_instance;
            this.hd_1 = 17;
            continue $sm;
          case 17:
            Napier_getInstance().v5d('SavePictureUseCase: Set picture url = ' + this.wnf_1 + ' on entity=' + this.anf_1.toString() + ' table=' + this.bnf_1);
            this.hd_1 = 18;
            var this_0 = this.unf_1;
            var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
            var tmp0_iterator_2 = this_0.w();
            while (tmp0_iterator_2.f()) {
              var item = tmp0_iterator_2.e();
              destination.i1(new EnqueueBlobUploadItem(item.fnd_1, this.bnf_1, this.anf_1, item.gnd_1));
            }

            var this_1 = listOf_0(this.cng_1);
            var destination_0 = ArrayList_init_$Create$();
            var tmp0_iterator_3 = this_1.w();
            while (tmp0_iterator_3.f()) {
              var element_2 = tmp0_iterator_3.e();
              if (element_2 == null)
                null;
              else {
                destination_0.i1(element_2);
              }
            }

            suspendResult = this.zne_1.gng_1.bne(plus(destination, destination_0), randomUuidAsString(), VOID, VOID, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 18:
            this.hd_1 = 19;
            continue $sm;
          case 19:
            this.hd_1 = 20;
            continue $sm;
          case 20:
            return Unit_instance;
          case 21:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 21) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function SavePictureUseCase(saveLocalUrisAsBlobUseCase, enqueueBlobUploadClientUseCase, db, repo, compressImageUseCase, deleteUrisUseCase, getStoragePathForUrlUseCase) {
    getStoragePathForUrlUseCase = getStoragePathForUrlUseCase === VOID ? null : getStoragePathForUrlUseCase;
    this.fng_1 = saveLocalUrisAsBlobUseCase;
    this.gng_1 = enqueueBlobUploadClientUseCase;
    this.hng_1 = db;
    this.ing_1 = repo;
    this.jng_1 = compressImageUseCase;
    this.kng_1 = deleteUrisUseCase;
    this.lng_1 = getStoragePathForUrlUseCase;
  }
  protoOf(SavePictureUseCase).pne = function (entityUid, tableId, pictureUri, $completion) {
    var tmp = new $invokeCOROUTINE$16(this, entityUid, tableId, pictureUri, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function TransferJobItemStatusUpdater$commit$slambda$lambda($updateTransferJobStatusUid, $numUpdates) {
    return function () {
      return 'TransferJobItemStatusUpdater: update status complete for ' + ('' + $updateTransferJobStatusUid + ' updates=' + $numUpdates);
    };
  }
  function TransferJobItemStatusUpdater$updateJob$slambda(this$0, resultContinuation) {
    this.anh_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(TransferJobItemStatusUpdater$updateJob$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(TransferJobItemStatusUpdater$updateJob$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(TransferJobItemStatusUpdater$updateJob$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            if (!get_isActive(this.bnh_1)) {
              this.hd_1 = 4;
              continue $sm;
            }

            this.hd_1 = 2;
            suspendResult = delay(this.anh_1.enh_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.hd_1 = 3;
            suspendResult = this.anh_1.jnh(VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.hd_1 = 1;
            continue $sm;
          case 4:
            return Unit_instance;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(TransferJobItemStatusUpdater$updateJob$slambda).v1m = function ($this$launch, completion) {
    var i = new TransferJobItemStatusUpdater$updateJob$slambda(this.anh_1, completion);
    i.bnh_1 = $this$launch;
    return i;
  };
  function TransferJobItemStatusUpdater$updateJob$slambda_0(this$0, resultContinuation) {
    var i = new TransferJobItemStatusUpdater$updateJob$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function TransferJobItemStatusUpdater$commit$slambda($progressUpdatesToCommit, this$0, $statusUpdatesToCommit, $repoNodeId, $updateTransferJobStatusUid, resultContinuation) {
    this.snh_1 = $progressUpdatesToCommit;
    this.tnh_1 = this$0;
    this.unh_1 = $statusUpdatesToCommit;
    this.vnh_1 = $repoNodeId;
    this.wnh_1 = $updateTransferJobStatusUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(TransferJobItemStatusUpdater$commit$slambda).fmp = function (it, $completion) {
    var tmp = this.gmp(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(TransferJobItemStatusUpdater$commit$slambda).he = function (p1, $completion) {
    return this.fmp(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(TransferJobItemStatusUpdater$commit$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 11;
            var tmp_0 = this;
            tmp_0.ynh_1 = this.snh_1;
            this.znh_1 = this.ynh_1.w();
            this.hd_1 = 1;
            continue $sm;
          case 1:
            if (!this.znh_1.f()) {
              this.hd_1 = 3;
              continue $sm;
            }

            this.ani_1 = this.znh_1.e();
            var tmp_1 = this;
            tmp_1.bni_1 = this.ani_1;
            this.hd_1 = 2;
            suspendResult = this.tnh_1.cnh_1.x7e().vhq(this.bni_1.gnb_1.cnb_1, this.bni_1.hnb_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.hd_1 = 1;
            continue $sm;
          case 3:
            var tmp_2 = this;
            tmp_2.cni_1 = this.unh_1;
            this.dni_1 = this.cni_1.w();
            this.hd_1 = 4;
            continue $sm;
          case 4:
            if (!this.dni_1.f()) {
              this.hd_1 = 8;
              continue $sm;
            }

            this.eni_1 = this.dni_1.e();
            var tmp_3 = this;
            tmp_3.fni_1 = this.eni_1;
            this.hd_1 = 5;
            suspendResult = this.tnh_1.cnh_1.x7e().whq(this.fni_1.inb_1.cnb_1, this.fni_1.jnb_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            if (this.fni_1.jnb_1 === TransferJobItemStatus_COMPLETE_getInstance().pj8_1 ? !(this.vnh_1 == null) : false) {
              this.hd_1 = 6;
              suspendResult = this.tnh_1.cnh_1.x7e().xhq(this.vnh_1, this.fni_1.inb_1.cnb_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 7;
              continue $sm;
            }

          case 6:
            this.hd_1 = 7;
            continue $sm;
          case 7:
            this.hd_1 = 4;
            continue $sm;
          case 8:
            if (!(this.wnh_1 === 0)) {
              this.hd_1 = 9;
              suspendResult = this.tnh_1.cnh_1.w7e().lho(this.wnh_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 10;
              continue $sm;
            }

          case 9:
            var numUpdates = suspendResult;
            var tmp_4 = Napier_getInstance();
            tmp_4.x5d(VOID, VOID, TransferJobItemStatusUpdater$commit$slambda$lambda(this.wnh_1, numUpdates));
            this.hd_1 = 10;
            continue $sm;
          case 10:
            return Unit_instance;
          case 11:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 11) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(TransferJobItemStatusUpdater$commit$slambda).gmp = function (it, completion) {
    var i = new TransferJobItemStatusUpdater$commit$slambda(this.snh_1, this.tnh_1, this.unh_1, this.vnh_1, this.wnh_1, completion);
    i.xnh_1 = it;
    return i;
  };
  function TransferJobItemStatusUpdater$commit$slambda_0($progressUpdatesToCommit, this$0, $statusUpdatesToCommit, $repoNodeId, $updateTransferJobStatusUid, resultContinuation) {
    var i = new TransferJobItemStatusUpdater$commit$slambda($progressUpdatesToCommit, this$0, $statusUpdatesToCommit, $repoNodeId, $updateTransferJobStatusUid, resultContinuation);
    var l = function (it, $completion) {
      return i.fmp(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $commitCOROUTINE$17(_this__u8e3s4, updateTransferJobStatusUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.oni_1 = _this__u8e3s4;
    this.pni_1 = updateTransferJobStatusUid;
  }
  protoOf($commitCOROUTINE$17).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.qni_1 = this.oni_1.gnh_1.atomicfu$getAndSet(emptyList());
            this.rni_1 = this.oni_1.hnh_1.atomicfu$getAndSet(emptyList());
            var tmp_0 = this;
            var this_0 = this.qni_1;
            var map = LinkedHashMap_init_$Create$();
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              var key = element.gnb_1.cnb_1;
              map.s(key, element);
            }

            tmp_0.sni_1 = toList(map.p2());
            var tmp_1 = this;
            var this_1 = this.rni_1;
            var map_0 = LinkedHashMap_init_$Create$();
            var tmp0_iterator_0 = this_1.w();
            while (tmp0_iterator_0.f()) {
              var element_0 = tmp0_iterator_0.e();
              var key_0 = element_0.inb_1.cnb_1;
              map_0.s(key_0, element_0);
            }

            tmp_1.tni_1 = toList(map_0.p2());
            var tmp_2 = this;
            var tmp_3 = this.oni_1.dnh_1;
            var tmp0_safe_receiver = (!(tmp_3 == null) ? isInterface(tmp_3, DoorDatabaseRepository) : false) ? tmp_3 : null;
            tmp_2.uni_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.z60();
            var tmp_4 = this;
            var this_2 = this.oni_1.cnh_1;
            var tmp_5;
            var tmp_6;
            var tmp_7;
            if (!this.sni_1.c1()) {
              tmp_7 = true;
            } else {
              tmp_7 = !this.tni_1.c1();
            }

            if (tmp_7) {
              tmp_6 = true;
            } else {
              tmp_6 = !(this.pni_1 === 0);
            }

            if (tmp_6) {
              tmp_5 = this_2;
            } else {
              tmp_5 = null;
            }

            tmp_4.vni_1 = tmp_5;
            if (this.vni_1 == null) {
              this.wni_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = withDoorTransactionAsync(this.vni_1, VOID, TransferJobItemStatusUpdater$commit$slambda_0(this.sni_1, this.oni_1, this.tni_1, this.uni_1, this.pni_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            var tmp_8 = this;
            tmp_8.wni_1 = Unit_instance;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function $onFinishedCOROUTINE$18(_this__u8e3s4, updateTransferJobStatusUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.fnj_1 = _this__u8e3s4;
    this.gnj_1 = updateTransferJobStatusUid;
  }
  protoOf($onFinishedCOROUTINE$18).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            if (!this.fnj_1.fnh_1.atomicfu$getAndSet(true)) {
              this.fnj_1.inh_1.mr();
              this.hd_1 = 1;
              suspendResult = this.fnj_1.hnj(this.gnj_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function TransferJobItemStatusUpdater(db, repo, scope, commitInterval) {
    commitInterval = commitInterval === VOID ? new Long(500, 0) : commitInterval;
    this.cnh_1 = db;
    this.dnh_1 = repo;
    this.enh_1 = commitInterval;
    this.fnh_1 = atomic$boolean$1(false);
    this.gnh_1 = atomic$ref$1(emptyList());
    this.hnh_1 = atomic$ref$1(emptyList());
    var tmp = this;
    tmp.inh_1 = launch(scope, VOID, VOID, TransferJobItemStatusUpdater$updateJob$slambda_0(this, null));
  }
  protoOf(TransferJobItemStatusUpdater).inj = function (update) {
    $l$block: {
      // Inline function 'kotlinx.atomicfu.update' call
      var this_0 = this.gnh_1;
      while (true) {
        var cur = this_0.kotlinx$atomicfu$value;
        // Inline function 'com.ustadmobile.core.domain.blob.transferjobitem.TransferJobItemStatusUpdater.onProgressUpdate.<anonymous>' call
        var upd = plus_1(cur, update);
        if (this_0.atomicfu$compareAndSet(cur, upd)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(TransferJobItemStatusUpdater).jnj = function (update) {
    $l$block: {
      // Inline function 'kotlinx.atomicfu.update' call
      var this_0 = this.hnh_1;
      while (true) {
        var cur = this_0.kotlinx$atomicfu$value;
        // Inline function 'com.ustadmobile.core.domain.blob.transferjobitem.TransferJobItemStatusUpdater.onStatusUpdate.<anonymous>' call
        var upd = plus_1(cur, update);
        if (this_0.atomicfu$compareAndSet(cur, upd)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(TransferJobItemStatusUpdater).hnj = function (updateTransferJobStatusUid, $completion) {
    var tmp = new $commitCOROUTINE$17(this, updateTransferJobStatusUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(TransferJobItemStatusUpdater).jnh = function (updateTransferJobStatusUid, $completion, $super) {
    updateTransferJobStatusUid = updateTransferJobStatusUid === VOID ? 0 : updateTransferJobStatusUid;
    return $super === VOID ? this.hnj(updateTransferJobStatusUid, $completion) : $super.hnj.call(this, updateTransferJobStatusUid, $completion);
  };
  protoOf(TransferJobItemStatusUpdater).knj = function (updateTransferJobStatusUid, $completion) {
    var tmp = new $onFinishedCOROUTINE$18(this, updateTransferJobStatusUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(TransferJobItemStatusUpdater).lnj = function (updateTransferJobStatusUid, $completion, $super) {
    updateTransferJobStatusUid = updateTransferJobStatusUid === VOID ? 0 : updateTransferJobStatusUid;
    return $super === VOID ? this.knj(updateTransferJobStatusUid, $completion) : $super.knj.call(this, updateTransferJobStatusUid, $completion);
  };
  function $invokeCOROUTINE$19(_this__u8e3s4, db, tableId, entityUid, transferJobItemUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.unj_1 = _this__u8e3s4;
    this.vnj_1 = db;
    this.wnj_1 = tableId;
    this.xnj_1 = entityUid;
    this.ynj_1 = transferJobItemUid;
  }
  protoOf($invokeCOROUTINE$19).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.znj_1 = this.wnj_1;
            if (this.znj_1 === 50) {
              this.hd_1 = 2;
              suspendResult = this.vnj_1.s7d().fbb(this.xnj_1, this.ynj_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              if (this.znj_1 === 738) {
                this.hd_1 = 1;
                suspendResult = this.vnj_1.v7e().fbb(this.xnj_1, this.ynj_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                this.hd_1 = 3;
                continue $sm;
              }
            }

          case 1:
            this.hd_1 = 3;
            continue $sm;
          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function UpdateTransferJobItemEtagUseCase() {
  }
  protoOf(UpdateTransferJobItemEtagUseCase).ank = function (db, tableId, entityUid, transferJobItemUid, $completion) {
    var tmp = new $invokeCOROUTINE$19(this, db, tableId, entityUid, transferJobItemUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function Companion_35() {
    this.bnk_1 = 'X-Blob-Response-';
    this.cnk_1 = 'Blob-Upload-Batch-Uuid';
  }
  var Companion_instance_83;
  function Companion_getInstance_52() {
    return Companion_instance_83;
  }
  function CancelBlobUploadClientUseCase() {
  }
  function EnqueueBlobUploadItem(blobUrl, tableId, entityUid, retentionLockIdToRelease) {
    tableId = tableId === VOID ? 0 : tableId;
    entityUid = entityUid === VOID ? new Long(0, 0) : entityUid;
    retentionLockIdToRelease = retentionLockIdToRelease === VOID ? new Long(0, 0) : retentionLockIdToRelease;
    this.dnk_1 = blobUrl;
    this.enk_1 = tableId;
    this.fnk_1 = entityUid;
    this.gnk_1 = retentionLockIdToRelease;
  }
  protoOf(EnqueueBlobUploadItem).toString = function () {
    return 'EnqueueBlobUploadItem(blobUrl=' + this.dnk_1 + ', tableId=' + this.enk_1 + ', entityUid=' + this.fnk_1.toString() + ', retentionLockIdToRelease=' + this.gnk_1.toString() + ')';
  };
  protoOf(EnqueueBlobUploadItem).hashCode = function () {
    var result = getStringHashCode(this.dnk_1);
    result = imul(result, 31) + this.enk_1 | 0;
    result = imul(result, 31) + this.fnk_1.hashCode() | 0;
    result = imul(result, 31) + this.gnk_1.hashCode() | 0;
    return result;
  };
  protoOf(EnqueueBlobUploadItem).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof EnqueueBlobUploadItem))
      return false;
    var tmp0_other_with_cast = other instanceof EnqueueBlobUploadItem ? other : THROW_CCE();
    if (!(this.dnk_1 === tmp0_other_with_cast.dnk_1))
      return false;
    if (!(this.enk_1 === tmp0_other_with_cast.enk_1))
      return false;
    if (!this.fnk_1.equals(tmp0_other_with_cast.fnk_1))
      return false;
    if (!this.gnk_1.equals(tmp0_other_with_cast.gnk_1))
      return false;
    return true;
  };
  function EnqueueBlobUploadClientUseCase() {
  }
  function getLocalUriIfRemote(_this__u8e3s4, uri, $completion) {
    var tmp = new $getLocalUriIfRemoteCOROUTINE$20(_this__u8e3s4, uri, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function $getLocalUriIfRemoteCOROUTINE$20(_this__u8e3s4, uri, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.qnk_1 = _this__u8e3s4;
    this.rnk_1 = uri;
  }
  protoOf($getLocalUriIfRemoteCOROUTINE$20).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = isRemote(this.rnk_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (suspendResult) {
              this.tnk_1 = Companion_getInstance_3();
              this.hd_1 = 2;
              suspendResult = this.qnk_1.unk(this.rnk_1.toString(), VOID, VOID, VOID, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_0 = this;
              tmp_0.snk_1 = this.rnk_1;
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            var ARGUMENT = suspendResult;
            var ARGUMENT_0 = ARGUMENT.vnk_1;
            this.snk_1 = this.tnk_1.b2r(ARGUMENT_0);
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return this.snk_1;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function GetStoragePathForUrlUseCase$invoke$lambda(it) {
    return Unit_instance;
  }
  function GetStoragePathForUrlUseCase() {
  }
  function CreateNewClazzUseCase$invoke$slambda($clazz, this$0, resultContinuation) {
    this.gnl_1 = $clazz;
    this.hnl_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CreateNewClazzUseCase$invoke$slambda).an7 = function (it, $completion) {
    var tmp = this.gmp(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CreateNewClazzUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.an7(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CreateNewClazzUseCase$invoke$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            var this_0 = this.gnl_1;
            var tmp_0;
            if (this_0.r8d_1 == null) {
              tmp_0 = this_0;
            } else {
              tmp_0 = null;
            }

            var tmp0_safe_receiver = tmp_0;
            if (tmp0_safe_receiver != null) {
              var tmp_1 = tmp0_safe_receiver;
              Companion_getInstance_4();
              tmp_1.r8d_1 = randomString(6);
            }

            this.hd_1 = 1;
            suspendResult = this.hnl_1.knl_1.b7d().insertAsync(this.gnl_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.jnl_1 = suspendResult;
            this.hd_1 = 2;
            var tmp_2 = this.hnl_1.knl_1.b7f();
            var tmp_3 = this.gnl_1.u8c_1;
            Companion_getInstance_5();
            suspendResult = tmp_2.ad5(new CoursePermission(VOID, VOID, tmp_3, 1001, VOID, VOID, new Long(8703, 0)), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.hd_1 = 3;
            var tmp_4 = this.hnl_1.knl_1.b7f();
            var tmp_5 = this.gnl_1.u8c_1;
            Companion_getInstance_5();
            suspendResult = tmp_4.ad5(new CoursePermission(VOID, VOID, tmp_5, 1000, VOID, VOID, new Long(8193, 0)), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            return this.jnl_1;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CreateNewClazzUseCase$invoke$slambda).gmp = function (it, completion) {
    var i = new CreateNewClazzUseCase$invoke$slambda(this.gnl_1, this.hnl_1, completion);
    i.inl_1 = it;
    return i;
  };
  function CreateNewClazzUseCase$invoke$slambda_0($clazz, this$0, resultContinuation) {
    var i = new CreateNewClazzUseCase$invoke$slambda($clazz, this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.an7(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CreateNewClazzUseCase(repoOrDb) {
    this.knl_1 = repoOrDb;
  }
  protoOf(CreateNewClazzUseCase).lnl = function (clazz, $completion) {
    return withDoorTransactionAsync(this.knl_1, VOID, CreateNewClazzUseCase$invoke$slambda_0(clazz, this, null), $completion);
  };
  function AlreadyEnroledInClassException() {
    Exception_init_$Init$_0(this);
    captureStack(this, AlreadyEnroledInClassException);
  }
  function AlreadyHasPendingRequestException() {
    IllegalStateException_init_$Init$_0(this);
    captureStack(this, AlreadyHasPendingRequestException);
  }
  function ApproveOrDeclinePendingEnrolmentUseCase$invoke$slambda($approved, this$0, $enrolmentRequest, $effectiveClazz, resultContinuation) {
    this.unl_1 = $approved;
    this.vnl_1 = this$0;
    this.wnl_1 = $enrolmentRequest;
    this.xnl_1 = $effectiveClazz;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ApproveOrDeclinePendingEnrolmentUseCase$invoke$slambda).fmp = function (it, $completion) {
    var tmp = this.gmp(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ApproveOrDeclinePendingEnrolmentUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.fmp(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ApproveOrDeclinePendingEnrolmentUseCase$invoke$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            if (this.unl_1) {
              this.hd_1 = 1;
              var tmp_0 = this.wnl_1.iej_1;
              var tmp_1 = this.wnl_1.kej_1;
              var tmp_2 = ClazzEnrolment_init_$Create$(tmp_0, tmp_1, 1000);
              var tmp0_elvis_lhs = this.xnl_1.m8d_1;
              suspendResult = this.vnl_1.dnm_1.gnm(tmp_2, tmp0_elvis_lhs == null ? 'UTC' : tmp0_elvis_lhs, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_3 = this;
              tmp_3.znl_1 = 3;
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            var tmp_4 = this;
            tmp_4.znl_1 = 2;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.anm_1 = this.znl_1;
            this.hd_1 = 3;
            suspendResult = this.vnl_1.cnm_1.a7f().rei(this.wnl_1.hej_1, this.anm_1, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ApproveOrDeclinePendingEnrolmentUseCase$invoke$slambda).gmp = function (it, completion) {
    var i = new ApproveOrDeclinePendingEnrolmentUseCase$invoke$slambda(this.unl_1, this.vnl_1, this.wnl_1, this.xnl_1, completion);
    i.ynl_1 = it;
    return i;
  };
  function ApproveOrDeclinePendingEnrolmentUseCase$invoke$slambda_0($approved, this$0, $enrolmentRequest, $effectiveClazz, resultContinuation) {
    var i = new ApproveOrDeclinePendingEnrolmentUseCase$invoke$slambda($approved, this$0, $enrolmentRequest, $effectiveClazz, resultContinuation);
    var l = function (it, $completion) {
      return i.fmp(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$21(_this__u8e3s4, enrolmentRequest, approved, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.pnm_1 = _this__u8e3s4;
    this.qnm_1 = enrolmentRequest;
    this.rnm_1 = approved;
  }
  protoOf($invokeCOROUTINE$21).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            suspendResult = this.pnm_1.bnm_1.b7d().v8b(this.qnm_1.iej_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.snm_1 = suspendResult;
            var tmp_0 = this;
            var tmp_1;
            if (this.snm_1 == null) {
              throw IllegalStateException_init_$Create$('Class does not exist');
            } else {
              tmp_1 = this.snm_1;
            }

            tmp_0.tnm_1 = tmp_1;
            this.hd_1 = 2;
            suspendResult = withDoorTransactionAsync(this.pnm_1.cnm_1, VOID, ApproveOrDeclinePendingEnrolmentUseCase$invoke$slambda_0(this.rnm_1, this.pnm_1, this.qnm_1, this.tnm_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function ApproveOrDeclinePendingEnrolmentUseCase(db, repo, enrolIntoCourseUseCase) {
    this.bnm_1 = db;
    this.cnm_1 = repo;
    this.dnm_1 = enrolIntoCourseUseCase;
  }
  protoOf(ApproveOrDeclinePendingEnrolmentUseCase).unm = function (enrolmentRequest, approved, $completion) {
    var tmp = new $invokeCOROUTINE$21(this, enrolmentRequest, approved, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function EnrolIntoCourseUseCase$invoke$slambda($effectiveDb, $enrolment, resultContinuation) {
    this.dnn_1 = $effectiveDb;
    this.enn_1 = $enrolment;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(EnrolIntoCourseUseCase$invoke$slambda).an7 = function (it, $completion) {
    var tmp = this.gmp(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(EnrolIntoCourseUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.an7(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(EnrolIntoCourseUseCase$invoke$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.dnn_1.g7d().insertAsync(this.enn_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(EnrolIntoCourseUseCase$invoke$slambda).gmp = function (it, completion) {
    var i = new EnrolIntoCourseUseCase$invoke$slambda(this.dnn_1, this.enn_1, completion);
    i.fnn_1 = it;
    return i;
  };
  function EnrolIntoCourseUseCase$invoke$slambda_0($effectiveDb, $enrolment, resultContinuation) {
    var i = new EnrolIntoCourseUseCase$invoke$slambda($effectiveDb, $enrolment, resultContinuation);
    var l = function (it, $completion) {
      return i.an7(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function EnrolIntoCourseUseCase(db, repo) {
    this.enm_1 = db;
    this.fnm_1 = repo;
  }
  protoOf(EnrolIntoCourseUseCase).gnm = function (enrolment, timeZoneId, $completion) {
    enrolment.h8h_1 = toLocalMidnight(Companion_getInstance_6().zla(enrolment.h8h_1), timeZoneId).yla();
    if (enrolment.i8h_1.c7(get_UNSET_DISTANT_FUTURE()) < 0) {
      enrolment.i8h_1 = toLocalEndOfDay(Companion_getInstance_6().zla(enrolment.i8h_1), timeZoneId).yla();
    }
    var tmp0_elvis_lhs = this.fnm_1;
    var effectiveDb = tmp0_elvis_lhs == null ? this.enm_1 : tmp0_elvis_lhs;
    return withDoorTransactionAsync(effectiveDb, VOID, EnrolIntoCourseUseCase$invoke$slambda_0(effectiveDb, enrolment, null), $completion);
  };
  function IApproveOrDeclinePendingEnrolmentRequestUseCase() {
  }
  function $invokeCOROUTINE$22(_this__u8e3s4, clazzCode, person, roleId, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.onn_1 = _this__u8e3s4;
    this.pnn_1 = clazzCode;
    this.qnn_1 = person;
    this.rnn_1 = roleId;
  }
  protoOf($invokeCOROUTINE$22).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 7;
            this.hd_1 = 1;
            suspendResult = this.onn_1.vnn_1.b7d().u8b(this.pnn_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.snn_1 = suspendResult;
            var tmp_0 = this;
            var tmp_1;
            if (this.snn_1 == null) {
              throw IllegalArgumentException_init_$Create$_0();
            } else {
              tmp_1 = this.snn_1;
            }

            tmp_0.tnn_1 = tmp_1;
            this.hd_1 = 2;
            suspendResult = this.onn_1.vnn_1.a7f().pei(this.qnn_1.f95_1, this.tnn_1.u8c_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            if (suspendResult) {
              throw new AlreadyHasPendingRequestException();
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 3:
            this.hd_1 = 4;
            suspendResult = this.onn_1.vnn_1.g7d().k92(this.tnn_1.u8c_1, this.qnn_1.f95_1, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.unn_1 = suspendResult;
            if (!this.unn_1.c1()) {
              throw new AlreadyEnroledInClassException();
            } else {
              this.hd_1 = 5;
              continue $sm;
            }

          case 5:
            this.hd_1 = 6;
            var tmp_2 = this.onn_1.vnn_1.a7f();
            var tmp_3 = this.tnn_1.u8c_1;
            var tmp_4 = this.tnn_1.v8c_1;
            var tmp_5 = this.qnn_1.f95_1;
            var tmp_6 = this.qnn_1.xjm();
            var tmp_7 = this.qnn_1.g95_1;
            var tmp_8 = systemTimeInMillis();
            suspendResult = tmp_2.oei(new EnrolmentRequest(VOID, tmp_3, tmp_4, tmp_5, tmp_6, VOID, tmp_7, this.rnn_1, tmp_8, 1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            return Unit_instance;
          case 7:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 7) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function RequestEnrolmentUseCase(activeRepo) {
    this.vnn_1 = activeRepo;
  }
  protoOf(RequestEnrolmentUseCase).wnn = function (clazzCode, person, roleId, $completion) {
    var tmp = new $invokeCOROUTINE$22(this, clazzCode, person, roleId, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function SetClipboardStringUseCase() {
  }
  function Companion_36() {
  }
  var Companion_instance_84;
  function Companion_getInstance_53() {
    return Companion_instance_84;
  }
  function $serializer_33() {
    $serializer_instance_33 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.compress.CompressParams', this, 3);
    tmp0_serialDesc.g4f('maxWidth', true);
    tmp0_serialDesc.g4f('maxHeight', true);
    tmp0_serialDesc.g4f('compressionLevel', true);
    this.ynn_1 = tmp0_serialDesc;
  }
  protoOf($serializer_33).d44 = function () {
    return this.ynn_1;
  };
  protoOf($serializer_33).x4f = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [IntSerializer_getInstance(), IntSerializer_getInstance(), CompressionLevelSerializer_getInstance()];
  };
  protoOf($serializer_33).f44 = function (decoder) {
    var tmp0_desc = this.ynn_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = 0;
    var tmp5_local1 = 0;
    var tmp6_local2 = null;
    var tmp7_input = decoder.v47(tmp0_desc);
    if (tmp7_input.k48()) {
      tmp4_local0 = tmp7_input.a48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp7_input.a48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp7_input.h48(tmp0_desc, 2, CompressionLevelSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp7_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp7_input.a48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp7_input.a48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp7_input.h48(tmp0_desc, 2, CompressionLevelSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp7_input.w47(tmp0_desc);
    return CompressParams_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
  };
  protoOf($serializer_33).znn = function (encoder, value) {
    var tmp0_desc = this.ynn_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    if (tmp1_output.r49(tmp0_desc, 0) ? true : !(value.ano_1 === 1280)) {
      tmp1_output.e49(tmp0_desc, 0, value.ano_1);
    }
    if (tmp1_output.r49(tmp0_desc, 1) ? true : !(value.bno_1 === 1280)) {
      tmp1_output.e49(tmp0_desc, 1, value.bno_1);
    }
    if (tmp1_output.r49(tmp0_desc, 2) ? true : !value.cno_1.equals(CompressionLevel_MEDIUM_getInstance())) {
      tmp1_output.l49(tmp0_desc, 2, CompressionLevelSerializer_getInstance(), value.cno_1);
    }
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_33).e44 = function (encoder, value) {
    return this.znn(encoder, value instanceof CompressParams ? value : THROW_CCE());
  };
  var $serializer_instance_33;
  function $serializer_getInstance_45() {
    if ($serializer_instance_33 == null)
      new $serializer_33();
    return $serializer_instance_33;
  }
  function CompressParams_init_$Init$(seen1, maxWidth, maxHeight, compressionLevel, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_45().ynn_1);
    }
    if (0 === (seen1 & 1))
      $this.ano_1 = 1280;
    else
      $this.ano_1 = maxWidth;
    if (0 === (seen1 & 2))
      $this.bno_1 = 1280;
    else
      $this.bno_1 = maxHeight;
    if (0 === (seen1 & 4))
      $this.cno_1 = CompressionLevel_MEDIUM_getInstance();
    else
      $this.cno_1 = compressionLevel;
    return $this;
  }
  function CompressParams_init_$Create$(seen1, maxWidth, maxHeight, compressionLevel, serializationConstructorMarker) {
    return CompressParams_init_$Init$(seen1, maxWidth, maxHeight, compressionLevel, serializationConstructorMarker, objectCreate(protoOf(CompressParams)));
  }
  function CompressParams(maxWidth, maxHeight, compressionLevel) {
    maxWidth = maxWidth === VOID ? 1280 : maxWidth;
    maxHeight = maxHeight === VOID ? 1280 : maxHeight;
    compressionLevel = compressionLevel === VOID ? CompressionLevel_MEDIUM_getInstance() : compressionLevel;
    this.ano_1 = maxWidth;
    this.bno_1 = maxHeight;
    this.cno_1 = compressionLevel;
  }
  protoOf(CompressParams).toString = function () {
    return 'CompressParams(maxWidth=' + this.ano_1 + ', maxHeight=' + this.bno_1 + ', compressionLevel=' + this.cno_1 + ')';
  };
  protoOf(CompressParams).hashCode = function () {
    var result = this.ano_1;
    result = imul(result, 31) + this.bno_1 | 0;
    result = imul(result, 31) + this.cno_1.hashCode() | 0;
    return result;
  };
  protoOf(CompressParams).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CompressParams))
      return false;
    var tmp0_other_with_cast = other instanceof CompressParams ? other : THROW_CCE();
    if (!(this.ano_1 === tmp0_other_with_cast.ano_1))
      return false;
    if (!(this.bno_1 === tmp0_other_with_cast.bno_1))
      return false;
    if (!this.cno_1.equals(tmp0_other_with_cast.cno_1))
      return false;
    return true;
  };
  function CompressResult(uri, mimeType, originalSize, compressedSize) {
    this.nng_1 = uri;
    this.ong_1 = mimeType;
    this.png_1 = originalSize;
    this.qng_1 = compressedSize;
  }
  protoOf(CompressResult).toString = function () {
    return 'CompressResult(uri=' + this.nng_1 + ', mimeType=' + this.ong_1 + ', originalSize=' + this.png_1.toString() + ', compressedSize=' + this.qng_1.toString() + ')';
  };
  protoOf(CompressResult).hashCode = function () {
    var result = getStringHashCode(this.nng_1);
    result = imul(result, 31) + getStringHashCode(this.ong_1) | 0;
    result = imul(result, 31) + this.png_1.hashCode() | 0;
    result = imul(result, 31) + this.qng_1.hashCode() | 0;
    return result;
  };
  protoOf(CompressResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CompressResult))
      return false;
    var tmp0_other_with_cast = other instanceof CompressResult ? other : THROW_CCE();
    if (!(this.nng_1 === tmp0_other_with_cast.nng_1))
      return false;
    if (!(this.ong_1 === tmp0_other_with_cast.ong_1))
      return false;
    if (!this.png_1.equals(tmp0_other_with_cast.png_1))
      return false;
    if (!this.qng_1.equals(tmp0_other_with_cast.qng_1))
      return false;
    return true;
  };
  function CompressUseCase() {
  }
  function _get_$cachedSerializer__te6jhj($this) {
    return $this.eno_1.t2();
  }
  function CompressionLevel$Companion$_anonymous__cmsj0x() {
    return CompressionLevelSerializer_getInstance();
  }
  var CompressionLevel_NONE_instance;
  var CompressionLevel_LOWEST_instance;
  var CompressionLevel_LOW_instance;
  var CompressionLevel_MEDIUM_instance;
  var CompressionLevel_HIGH_instance;
  var CompressionLevel_HIGHEST_instance;
  function Companion_37() {
    Companion_instance_85 = this;
    var tmp = this;
    var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
    tmp.eno_1 = lazy(tmp_0, CompressionLevel$Companion$_anonymous__cmsj0x);
  }
  protoOf(Companion_37).fno = function (value) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.first' call
      var tmp0_iterator = get_entries().w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.domain.compress.Companion.forValue.<anonymous>' call
        if (element.ino_1 === value) {
          tmp$ret$1 = element;
          break $l$block;
        }
      }
      throw NoSuchElementException_init_$Create$_0('Collection contains no element matching the predicate.');
    }
    return tmp$ret$1;
  };
  protoOf(Companion_37).a4r = function () {
    return _get_$cachedSerializer__te6jhj(this);
  };
  protoOf(Companion_37).i4g = function (typeParamsSerializers) {
    return this.a4r();
  };
  var Companion_instance_85;
  function Companion_getInstance_54() {
    CompressionLevel_initEntries();
    if (Companion_instance_85 == null)
      new Companion_37();
    return Companion_instance_85;
  }
  function values_0() {
    return [CompressionLevel_NONE_getInstance(), CompressionLevel_LOWEST_getInstance(), CompressionLevel_LOW_getInstance(), CompressionLevel_MEDIUM_getInstance(), CompressionLevel_HIGH_getInstance(), CompressionLevel_HIGHEST_getInstance()];
  }
  function get_entries() {
    if ($ENTRIES == null)
      $ENTRIES = enumEntries(values_0());
    return $ENTRIES;
  }
  var CompressionLevel_entriesInitialized;
  function CompressionLevel_initEntries() {
    if (CompressionLevel_entriesInitialized)
      return Unit_instance;
    CompressionLevel_entriesInitialized = true;
    CompressionLevel_NONE_instance = new CompressionLevel('NONE', 0, 0);
    CompressionLevel_LOWEST_instance = new CompressionLevel('LOWEST', 1, 1);
    CompressionLevel_LOW_instance = new CompressionLevel('LOW', 2, 2);
    CompressionLevel_MEDIUM_instance = new CompressionLevel('MEDIUM', 3, 3);
    CompressionLevel_HIGH_instance = new CompressionLevel('HIGH', 4, 4);
    CompressionLevel_HIGHEST_instance = new CompressionLevel('HIGHEST', 5, 5);
    Companion_getInstance_54();
  }
  var $ENTRIES;
  function CompressionLevel(name, ordinal, value) {
    Enum.call(this, name, ordinal);
    this.ino_1 = value;
  }
  function CompressionLevel_NONE_getInstance() {
    CompressionLevel_initEntries();
    return CompressionLevel_NONE_instance;
  }
  function CompressionLevel_LOWEST_getInstance() {
    CompressionLevel_initEntries();
    return CompressionLevel_LOWEST_instance;
  }
  function CompressionLevel_LOW_getInstance() {
    CompressionLevel_initEntries();
    return CompressionLevel_LOW_instance;
  }
  function CompressionLevel_MEDIUM_getInstance() {
    CompressionLevel_initEntries();
    return CompressionLevel_MEDIUM_instance;
  }
  function CompressionLevel_HIGH_getInstance() {
    CompressionLevel_initEntries();
    return CompressionLevel_HIGH_instance;
  }
  function CompressionLevel_HIGHEST_getInstance() {
    CompressionLevel_initEntries();
    return CompressionLevel_HIGHEST_instance;
  }
  function CompressionLevelSerializer() {
    CompressionLevelSerializer_instance = this;
    this.jno_1 = PrimitiveSerialDescriptor('CompressionLevel', INT_getInstance());
  }
  protoOf(CompressionLevelSerializer).d44 = function () {
    return this.jno_1;
  };
  protoOf(CompressionLevelSerializer).f44 = function (decoder) {
    return Companion_getInstance_54().fno(decoder.l47());
  };
  protoOf(CompressionLevelSerializer).kno = function (encoder, value) {
    encoder.t48(value.ino_1);
  };
  protoOf(CompressionLevelSerializer).e44 = function (encoder, value) {
    return this.kno(encoder, value instanceof CompressionLevel ? value : THROW_CCE());
  };
  var CompressionLevelSerializer_instance;
  function CompressionLevelSerializer_getInstance() {
    if (CompressionLevelSerializer_instance == null)
      new CompressionLevelSerializer();
    return CompressionLevelSerializer_instance;
  }
  function ContentManifestMap(manifest, entryMap) {
    var tmp;
    if (entryMap === VOID) {
      // Inline function 'kotlin.collections.associateBy' call
      var this_0 = manifest.hn3_1;
      var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(this_0, 10)), 16);
      // Inline function 'kotlin.collections.associateByTo' call
      var destination = LinkedHashMap_init_$Create$_0(capacity);
      var tmp0_iterator = this_0.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.domain.contententry.ContentManifestMap.<init>.<anonymous>' call
        var tmp$ret$0 = UrlEncoderUtil_getInstance().ml7(element.ln3_1);
        destination.s(tmp$ret$0, element);
      }
      tmp = destination;
    } else {
      tmp = entryMap;
    }
    entryMap = tmp;
    this.lno_1 = manifest;
    this.mno_1 = entryMap;
  }
  protoOf(ContentManifestMap).nno = function (manifestUrl, pathInContentEntryVersion) {
    return UrlKmp(manifestUrl).ono(pathInContentEntryVersion).toString();
  };
  protoOf(ContentManifestMap).toString = function () {
    return 'ContentManifestMap(manifest=' + this.lno_1 + ', entryMap=' + this.mno_1 + ')';
  };
  protoOf(ContentManifestMap).hashCode = function () {
    var result = this.lno_1.hashCode();
    result = imul(result, 31) + hashCode(this.mno_1) | 0;
    return result;
  };
  protoOf(ContentManifestMap).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentManifestMap))
      return false;
    var tmp0_other_with_cast = other instanceof ContentManifestMap ? other : THROW_CCE();
    if (!this.lno_1.equals(tmp0_other_with_cast.lno_1))
      return false;
    if (!equals(this.mno_1, tmp0_other_with_cast.mno_1))
      return false;
    return true;
  };
  function DeleteContentEntryParentChildJoinUseCase$invoke$slambda(this$0, $entries, $timeNow, $activeUserPersonUid, resultContinuation) {
    this.xno_1 = this$0;
    this.yno_1 = $entries;
    this.zno_1 = $timeNow;
    this.anp_1 = $activeUserPersonUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DeleteContentEntryParentChildJoinUseCase$invoke$slambda).fmp = function (it, $completion) {
    var tmp = this.gmp(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DeleteContentEntryParentChildJoinUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.fmp(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DeleteContentEntryParentChildJoinUseCase$invoke$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            var tmp_0 = this.xno_1.gnp_1.k7d();
            var this_0 = this.yno_1;
            var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var item = tmp0_iterator.e();
              destination.i1(item.inp_1);
            }

            suspendResult = tmp_0.oay(destination, true, this.zno_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp_1 = this;
            tmp_1.cnp_1 = this.yno_1;
            this.dnp_1 = this.cnp_1.w();
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (!this.dnp_1.f()) {
              this.hd_1 = 4;
              continue $sm;
            }

            this.enp_1 = this.dnp_1.e();
            var tmp_2 = this;
            tmp_2.fnp_1 = this.enp_1;
            this.hd_1 = 3;
            suspendResult = this.xno_1.gnp_1.z7e().ze0(this.fnp_1.inp_1, this.zno_1, this.anp_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.hd_1 = 2;
            continue $sm;
          case 4:
            return Unit_instance;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(DeleteContentEntryParentChildJoinUseCase$invoke$slambda).gmp = function (it, completion) {
    var i = new DeleteContentEntryParentChildJoinUseCase$invoke$slambda(this.xno_1, this.yno_1, this.zno_1, this.anp_1, completion);
    i.bnp_1 = it;
    return i;
  };
  function DeleteContentEntryParentChildJoinUseCase$invoke$slambda_0(this$0, $entries, $timeNow, $activeUserPersonUid, resultContinuation) {
    var i = new DeleteContentEntryParentChildJoinUseCase$invoke$slambda(this$0, $entries, $timeNow, $activeUserPersonUid, resultContinuation);
    var l = function (it, $completion) {
      return i.fmp(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DeleteContentEntryParentChildJoinUseCase(repoOrDb) {
    this.gnp_1 = repoOrDb;
  }
  protoOf(DeleteContentEntryParentChildJoinUseCase).knp = function (entries, activeUserPersonUid, $completion) {
    var timeNow = systemTimeInMillis();
    return withDoorTransactionAsync(this.gnp_1, VOID, DeleteContentEntryParentChildJoinUseCase$invoke$slambda_0(this, entries, timeNow, activeUserPersonUid, null), $completion);
  };
  function Companion_38() {
    this.lnp_1 = 'upload-original-filename';
  }
  var Companion_instance_86;
  function Companion_getInstance_55() {
    return Companion_instance_86;
  }
  function ContentEntryGetMetaDataFromUriUseCase() {
  }
  function ContentEntryGetMetadataStatus(indeterminate, error, processedBytes, totalBytes) {
    indeterminate = indeterminate === VOID ? true : indeterminate;
    error = error === VOID ? null : error;
    processedBytes = processedBytes === VOID ? new Long(0, 0) : processedBytes;
    totalBytes = totalBytes === VOID ? new Long(0, 0) : totalBytes;
    this.nnp_1 = indeterminate;
    this.onp_1 = error;
    this.pnp_1 = processedBytes;
    this.qnp_1 = totalBytes;
  }
  protoOf(ContentEntryGetMetadataStatus).rnp = function () {
    var tmp;
    if (!this.qnp_1.equals(new Long(0, 0))) {
      // Inline function 'kotlin.Long.times' call
      tmp = this.pnp_1.cb(toLong(100)).bb(this.qnp_1).mb();
    } else {
      tmp = 0;
    }
    return tmp;
  };
  protoOf(ContentEntryGetMetadataStatus).snp = function (indeterminate, error, processedBytes, totalBytes) {
    return new ContentEntryGetMetadataStatus(indeterminate, error, processedBytes, totalBytes);
  };
  protoOf(ContentEntryGetMetadataStatus).tnp = function (indeterminate, error, processedBytes, totalBytes, $super) {
    indeterminate = indeterminate === VOID ? this.nnp_1 : indeterminate;
    error = error === VOID ? this.onp_1 : error;
    processedBytes = processedBytes === VOID ? this.pnp_1 : processedBytes;
    totalBytes = totalBytes === VOID ? this.qnp_1 : totalBytes;
    return $super === VOID ? this.snp(indeterminate, error, processedBytes, totalBytes) : $super.snp.call(this, indeterminate, error, processedBytes, totalBytes);
  };
  protoOf(ContentEntryGetMetadataStatus).toString = function () {
    return 'ContentEntryGetMetadataStatus(indeterminate=' + this.nnp_1 + ', error=' + this.onp_1 + ', processedBytes=' + this.pnp_1.toString() + ', totalBytes=' + this.qnp_1.toString() + ')';
  };
  protoOf(ContentEntryGetMetadataStatus).hashCode = function () {
    var result = getBooleanHashCode(this.nnp_1);
    result = imul(result, 31) + (this.onp_1 == null ? 0 : getStringHashCode(this.onp_1)) | 0;
    result = imul(result, 31) + this.pnp_1.hashCode() | 0;
    result = imul(result, 31) + this.qnp_1.hashCode() | 0;
    return result;
  };
  protoOf(ContentEntryGetMetadataStatus).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentEntryGetMetadataStatus))
      return false;
    var tmp0_other_with_cast = other instanceof ContentEntryGetMetadataStatus ? other : THROW_CCE();
    if (!(this.nnp_1 === tmp0_other_with_cast.nnp_1))
      return false;
    if (!(this.onp_1 == tmp0_other_with_cast.onp_1))
      return false;
    if (!this.pnp_1.equals(tmp0_other_with_cast.pnp_1))
      return false;
    if (!this.qnp_1.equals(tmp0_other_with_cast.qnp_1))
      return false;
    return true;
  };
  function UnsupportedContentException(message) {
    Exception_init_$Init$(message, this);
    captureStack(this, UnsupportedContentException);
  }
  function Companion_39() {
    this.unp_1 = 'text/vtt';
    this.vnp_1 = 'filename';
    this.wnp_1 = 'locale';
    this.xnp_1 = 'WEBVTT';
  }
  var Companion_instance_87;
  function Companion_getInstance_56() {
    return Companion_instance_87;
  }
  function GetSubtitleTrackFromUriUseCase() {
  }
  function CancelImportContentEntryUseCase() {
  }
  function $invokeCOROUTINE$23(_this__u8e3s4, cjiUid, activeUserPersonUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.inq_1 = _this__u8e3s4;
    this.jnq_1 = cjiUid;
    this.knq_1 = activeUserPersonUid;
  }
  protoOf($invokeCOROUTINE$23).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var tmp_1 = this.inq_1.vnq_1;
            var tmp0_elvis_lhs = isInterface(tmp_1, DoorDatabaseRepository) ? tmp_1 : null;
            var tmp_2;
            if (tmp0_elvis_lhs == null) {
              throw IllegalArgumentException_init_$Create$_0();
            } else {
              tmp_2 = tmp0_elvis_lhs;
            }

            tmp_0.lnq_1 = tmp_2;
            var tmp_3 = this;
            tmp_3.mnq_1 = this.inq_1.unq_1;
            var tmp_4 = this;
            tmp_4.nnq_1 = this.inq_1.tnq_1.umj_1 + 'api/contententryimportjob/cancel';
            var tmp_5 = this;
            tmp_5.onq_1 = this.mnq_1;
            var tmp_6 = this;
            tmp_6.pnq_1 = this.onq_1;
            var tmp_7 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.nnq_1);
            parameter(this_0, 'jobUid', this.jnq_1);
            doorNodeIdHeader(this_0, this.lnq_1);
            parameter(this_0, 'accountPersonUid', this.knq_1);
            header(this_0, 'cache-control', 'no-store');
            tmp_7.qnq_1 = this_0;
            this.qnq_1.j38_1 = Companion_getInstance().y2w_1;
            var tmp_8 = this;
            tmp_8.rnq_1 = this.pnq_1;
            var tmp_9 = this;
            tmp_9.snq_1 = this.qnq_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.snq_1, this.rnq_1)).u3y(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function CancelRemoteContentEntryImportUseCase(endpoint, httpClient, repo) {
    this.tnq_1 = endpoint;
    this.unq_1 = httpClient;
    this.vnq_1 = repo;
  }
  protoOf(CancelRemoteContentEntryImportUseCase).wnq = function (cjiUid, activeUserPersonUid, $completion) {
    var tmp = new $invokeCOROUTINE$23(this, cjiUid, activeUserPersonUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function $invokeCOROUTINE$24(_this__u8e3s4, cjiUid, activeUserPersonUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.fnr_1 = _this__u8e3s4;
    this.gnr_1 = cjiUid;
    this.hnr_1 = activeUserPersonUid;
  }
  protoOf($invokeCOROUTINE$24).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var tmp_1 = this.fnr_1.snr_1;
            var tmp0_elvis_lhs = isInterface(tmp_1, DoorDatabaseRepository) ? tmp_1 : null;
            var tmp_2;
            if (tmp0_elvis_lhs == null) {
              throw IllegalArgumentException_init_$Create$('no repo');
            } else {
              tmp_2 = tmp0_elvis_lhs;
            }

            tmp_0.inr_1 = tmp_2;
            var tmp_3 = this;
            tmp_3.jnr_1 = this.fnr_1.qnr_1;
            var tmp_4 = this;
            tmp_4.knr_1 = this.fnr_1.rnr_1.umj_1 + 'api/contententryimportjob/dismissError';
            var tmp_5 = this;
            tmp_5.lnr_1 = this.jnr_1;
            var tmp_6 = this;
            tmp_6.mnr_1 = this.lnr_1;
            var tmp_7 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.knr_1);
            parameter(this_0, 'jobUid', this.gnr_1);
            doorNodeIdHeader(this_0, this.inr_1);
            parameter(this_0, 'accountPersonUid', this.hnr_1);
            header(this_0, 'cache-control', 'no-store');
            tmp_7.nnr_1 = this_0;
            this.nnr_1.j38_1 = Companion_getInstance().y2w_1;
            var tmp_8 = this;
            tmp_8.onr_1 = this.mnr_1;
            var tmp_9 = this;
            tmp_9.pnr_1 = this.nnr_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.pnr_1, this.onr_1)).u3y(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function DismissRemoteContentEntryImportErrorUseCase(httpClient, endpoint, repo) {
    this.qnr_1 = httpClient;
    this.rnr_1 = endpoint;
    this.snr_1 = repo;
  }
  protoOf(DismissRemoteContentEntryImportErrorUseCase).wnq = function (cjiUid, activeUserPersonUid, $completion) {
    var tmp = new $invokeCOROUTINE$24(this, cjiUid, activeUserPersonUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function EnqueueContentEntryImportUseCase() {
  }
  function $invokeCOROUTINE$25(_this__u8e3s4, contentJobItem, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.cns_1 = _this__u8e3s4;
    this.dns_1 = contentJobItem;
  }
  protoOf($invokeCOROUTINE$25).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.ens_1 = this.cns_1.mns_1;
            var tmp_1 = this;
            tmp_1.fns_1 = this.cns_1.lns_1.umj_1 + 'api/import/importRequest';
            var tmp_2 = this;
            tmp_2.gns_1 = this.ens_1;
            var tmp_3 = this;
            tmp_3.hns_1 = this.gns_1;
            var tmp_4 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.fns_1);
            contentType(this_0, Application_getInstance().i2r_1);
            setBodyJson(this_0, this.cns_1.nns_1, Companion_instance_88.a4r(), new ImportRequest(this.dns_1));
            tmp_4.ins_1 = this_0;
            this.ins_1.j38_1 = Companion_getInstance().z2w_1;
            var tmp_5 = this;
            tmp_5.jns_1 = this.hns_1;
            var tmp_6 = this;
            tmp_6.kns_1 = this.ins_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.kns_1, this.jns_1)).u3y(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function EnqueueImportContentEntryUseCaseRemote(endpoint, httpClient, json) {
    this.lns_1 = endpoint;
    this.mns_1 = httpClient;
    this.nns_1 = json;
  }
  protoOf(EnqueueImportContentEntryUseCaseRemote).tnr = function (contentJobItem, $completion) {
    var tmp = new $invokeCOROUTINE$25(this, contentJobItem, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function Companion_40() {
  }
  protoOf(Companion_40).a4r = function () {
    return $serializer_getInstance_46();
  };
  var Companion_instance_88;
  function Companion_getInstance_57() {
    return Companion_instance_88;
  }
  function $serializer_34() {
    $serializer_instance_34 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.contententry.importcontent.ImportRequest', this, 1);
    tmp0_serialDesc.g4f('contentJobItem', false);
    this.ons_1 = tmp0_serialDesc;
  }
  protoOf($serializer_34).d44 = function () {
    return this.ons_1;
  };
  protoOf($serializer_34).x4f = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [$serializer_getInstance_5()];
  };
  protoOf($serializer_34).f44 = function (decoder) {
    var tmp0_desc = this.ons_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_input = decoder.v47(tmp0_desc);
    if (tmp5_input.k48()) {
      tmp4_local0 = tmp5_input.h48(tmp0_desc, 0, $serializer_getInstance_5(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.h48(tmp0_desc, 0, $serializer_getInstance_5(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.w47(tmp0_desc);
    return ImportRequest_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_34).pns = function (encoder, value) {
    var tmp0_desc = this.ons_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    tmp1_output.l49(tmp0_desc, 0, $serializer_getInstance_5(), value.qns_1);
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_34).e44 = function (encoder, value) {
    return this.pns(encoder, value instanceof ImportRequest ? value : THROW_CCE());
  };
  var $serializer_instance_34;
  function $serializer_getInstance_46() {
    if ($serializer_instance_34 == null)
      new $serializer_34();
    return $serializer_instance_34;
  }
  function ImportRequest_init_$Init$(seen1, contentJobItem, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_46().ons_1);
    }
    $this.qns_1 = contentJobItem;
    return $this;
  }
  function ImportRequest_init_$Create$(seen1, contentJobItem, serializationConstructorMarker) {
    return ImportRequest_init_$Init$(seen1, contentJobItem, serializationConstructorMarker, objectCreate(protoOf(ImportRequest)));
  }
  function ImportRequest(contentJobItem) {
    this.qns_1 = contentJobItem;
  }
  protoOf(ImportRequest).toString = function () {
    return 'ImportRequest(contentJobItem=' + this.qns_1 + ')';
  };
  protoOf(ImportRequest).hashCode = function () {
    return this.qns_1.hashCode();
  };
  protoOf(ImportRequest).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ImportRequest))
      return false;
    var tmp0_other_with_cast = other instanceof ImportRequest ? other : THROW_CCE();
    if (!this.qns_1.equals(tmp0_other_with_cast.qns_1))
      return false;
    return true;
  };
  function DefaultLaunchContentEntryVersionUseCase() {
  }
  protoOf(DefaultLaunchContentEntryVersionUseCase).rns = function (contentEntryVersion, navController, clazzUid, cbUid, target, $completion) {
    var tmp0_subject = contentEntryVersion.gaj_1;
    var tmp;
    if (tmp0_subject === 'xapi') {
      tmp = 'XapiContent';
    } else {
      if (tmp0_subject === 'pdf') {
        tmp = 'PdfContent';
      } else {
        if (tmp0_subject === 'epub') {
          tmp = 'EpubContent';
        } else {
          if (tmp0_subject === 'video') {
            tmp = 'Video';
          } else {
            tmp = null;
          }
        }
      }
    }
    var destName = tmp;
    if (!(destName == null)) {
      Companion_getInstance_112();
      var tmp_0 = to('entityUid', contentEntryVersion.daj_1.toString());
      Companion_getInstance_112();
      var tmp_1 = to('courseBlockUid', cbUid.toString());
      Companion_getInstance_112();
      var tmp_2 = to('clazzUid', clazzUid.toString());
      Companion_getInstance_112();
      navController.sns(destName, mapOf([tmp_0, tmp_1, tmp_2, to('entryid', contentEntryVersion.eaj_1.toString())]));
    }
    return new LaunchResult();
  };
  protoOf(DefaultLaunchContentEntryVersionUseCase).tns = function (contentEntryVersion, navController, clazzUid, cbUid, target, $completion) {
    return this.rns(contentEntryVersion, navController, clazzUid, cbUid, target, $completion);
  };
  function LaunchResult(message) {
    message = message === VOID ? null : message;
    this.uns_1 = message;
  }
  protoOf(LaunchResult).toString = function () {
    return 'LaunchResult(message=' + this.uns_1 + ')';
  };
  protoOf(LaunchResult).hashCode = function () {
    return this.uns_1 == null ? 0 : getStringHashCode(this.uns_1);
  };
  protoOf(LaunchResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof LaunchResult))
      return false;
    var tmp0_other_with_cast = other instanceof LaunchResult ? other : THROW_CCE();
    if (!(this.uns_1 == tmp0_other_with_cast.uns_1))
      return false;
    return true;
  };
  function LaunchContentEntryVersionUseCase() {
  }
  function LaunchEpubUseCase() {
  }
  function LaunchXapiUseCase() {
  }
  function XapiLaunchHrefResult(url, launchUriInContent, launchActivity, manifestUrl) {
    this.vns_1 = url;
    this.wns_1 = launchUriInContent;
    this.xns_1 = launchActivity;
    this.yns_1 = manifestUrl;
  }
  function ResolveXapiLaunchHrefUseCase$invoke$lambda($contentEntryVersionUid) {
    return function () {
      return 'Resolving xAPI url for contentEntryVersion ' + $contentEntryVersionUid.toString();
    };
  }
  function ResolveXapiLaunchHrefUseCase$invoke$slambda($contentEntryVersionUid, resultContinuation) {
    this.hnt_1 = $contentEntryVersionUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ResolveXapiLaunchHrefUseCase$invoke$slambda).jnt = function (it, $completion) {
    var tmp = this.gmp(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ResolveXapiLaunchHrefUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.jnt(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ResolveXapiLaunchHrefUseCase$invoke$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.int_1.v7e().cbb(this.hnt_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ResolveXapiLaunchHrefUseCase$invoke$slambda).gmp = function (it, completion) {
    var i = new ResolveXapiLaunchHrefUseCase$invoke$slambda(this.hnt_1, completion);
    i.int_1 = it;
    return i;
  };
  function ResolveXapiLaunchHrefUseCase$invoke$slambda_0($contentEntryVersionUid, resultContinuation) {
    var i = new ResolveXapiLaunchHrefUseCase$invoke$slambda($contentEntryVersionUid, resultContinuation);
    var l = function (it, $completion) {
      return i.jnt(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ResolveXapiLaunchHrefUseCase$invoke$lambda_0($contentEntryVersionUid, $url) {
    return function () {
      return 'Resolved xAPI url for contentEntryVersion ' + $contentEntryVersionUid.toString() + ' : ' + $url;
    };
  }
  function $invokeCOROUTINE$26(_this__u8e3s4, contentEntryVersionUid, clazzUid, cbUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.snt_1 = _this__u8e3s4;
    this.tnt_1 = contentEntryVersionUid;
    this.unt_1 = clazzUid;
    this.vnt_1 = cbUid;
  }
  protoOf($invokeCOROUTINE$26).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 7;
            var tmp_0 = Napier_getInstance();
            tmp_0.r5d(VOID, VOID, ResolveXapiLaunchHrefUseCase$invoke$lambda(this.tnt_1));
            this.hd_1 = 1;
            suspendResult = localFirstThenRepoIfNull(this.snt_1.znu_1, ResolveXapiLaunchHrefUseCase$invoke$slambda_0(this.tnt_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.wnt_1 = suspendResult;
            var tmp_1 = this;
            var tmp_2;
            if (this.wnt_1 == null) {
              throw IllegalArgumentException_init_$Create$('could not load contententryversion ' + this.tnt_1.toString());
            } else {
              tmp_2 = this.wnt_1;
            }

            tmp_1.xnt_1 = tmp_2;
            var tmp_3 = this;
            var tmp1_elvis_lhs = this.xnt_1.haj_1;
            var tmp_4;
            if (tmp1_elvis_lhs == null) {
              throw IllegalStateException_init_$Create$('ContentEntryVersion ' + this.tnt_1.toString() + ' manifesturl is null');
            } else {
              tmp_4 = tmp1_elvis_lhs;
            }

            tmp_3.ynt_1 = tmp_4;
            var tmp_5 = this;
            tmp_5.znt_1 = this.snt_1.bnv_1;
            var tmp_6 = this;
            tmp_6.anu_1 = this.snt_1.anv_1;
            var tmp_7 = this;
            tmp_7.bnu_1 = this.ynt_1;
            var tmp_8 = this;
            tmp_8.cnu_1 = this.anu_1;
            var tmp_9 = this;
            tmp_9.dnu_1 = this.cnu_1;
            var tmp_10 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.bnu_1);
            tmp_10.enu_1 = this_0;
            this.enu_1.j38_1 = Companion_getInstance().y2w_1;
            var tmp_11 = this;
            tmp_11.fnu_1 = this.dnu_1;
            var tmp_12 = this;
            tmp_12.gnu_1 = this.enu_1;
            this.hd_1 = 2;
            suspendResult = (new HttpStatement(this.gnu_1, this.fnu_1)).u3y(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.hnu_1 = suspendResult;
            this.hd_1 = 3;
            suspendResult = bodyAsDecodedText(this.hnu_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.inu_1 = suspendResult;
            var tmp_13 = this;
            var this_1 = this.znt_1.g45();
            var this_2 = serializer(this_1, createKType(getKClass(ContentManifest), arrayOf([]), false));
            tmp_13.jnu_1 = this.znt_1.f45(isInterface(this_2, KSerializer) ? this_2 : THROW_CCE(), this.inu_1);
            this.knu_1 = requireEntryByUri(this.jnu_1, ensureNotNull(this.xnt_1.faj_1));
            var tmp_14 = this;
            tmp_14.lnu_1 = this.snt_1.anv_1;
            var tmp_15 = this;
            tmp_15.mnu_1 = this.knu_1.tn3_1;
            var tmp_16 = this;
            tmp_16.nnu_1 = this.lnu_1;
            var tmp_17 = this;
            tmp_17.onu_1 = this.nnu_1;
            var tmp_18 = this;
            var this_3 = new HttpRequestBuilder();
            url(this_3, this.mnu_1);
            tmp_18.pnu_1 = this_3;
            this.pnu_1.j38_1 = Companion_getInstance().y2w_1;
            var tmp_19 = this;
            tmp_19.qnu_1 = this.onu_1;
            var tmp_20 = this;
            tmp_20.rnu_1 = this.pnu_1;
            this.hd_1 = 4;
            suspendResult = (new HttpStatement(this.rnu_1, this.qnu_1)).u3y(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.snu_1 = suspendResult;
            this.hd_1 = 5;
            suspendResult = bodyAsDecodedText(this.snu_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            this.tnu_1 = suspendResult;
            this.unu_1 = this.snt_1.cnv_1.l7c();
            setInputString(this.unu_1, this.tnu_1);
            this.vnu_1 = Companion_instance_120.inv(this.unu_1);
            var tmp_21 = this;
            var tmp2_safe_receiver = this.vnu_1.jnv_1;
            var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.rnv_1;
            var tmp_22;
            if (tmp3_elvis_lhs == null) {
              throw IllegalStateException_init_$Create$('ContentEntryVersion ' + this.tnt_1.toString() + ' manifesturl is null');
            } else {
              tmp_22 = tmp3_elvis_lhs;
            }

            tmp_21.wnu_1 = tmp_22;
            var tmp_23 = this;
            var tmp4_safe_receiver = this.vnu_1.jnv_1;
            var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.onv_1;
            var tmp_24;
            if (tmp5_elvis_lhs == null) {
              throw IllegalStateException_init_$Create$('Launch Activity must have id');
            } else {
              tmp_24 = tmp5_elvis_lhs;
            }

            tmp_23.xnu_1 = tmp_24;
            this.ynu_1 = this.snt_1.fnv_1.emx().kmk_1.f95_1;
            this.hd_1 = 6;
            suspendResult = this.snt_1.dnv_1.unv(this.ynu_1, this.snt_1.fnv_1.emx().pmk(), this.xnu_1, this.unt_1, this.vnt_1, this.xnt_1.eaj_1, this.tnt_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            var xapiSession = suspendResult;
            var queryParams = mapOf([to('endpoint', this.snt_1.env_1.vnv('/api/xapi/')), to('auth', authorizationHeader(xapiSession)), to('actor', this.snt_1.bnv_1.e45(Companion_instance_100.a4r(), agent(xapiSession, this.snt_1.gnv_1))), to('registration', get_registrationUuid(xapiSession).toString()), to('activity_id', xapiSession.oix_1)]);
            var url_0 = appendQueryArgs(UMFileUtil_getInstance().bnw(this.ynt_1, this.wnu_1), queryParams);
            var tinCanXmlPathPrefix = substringBeforeLast(ensureNotNull(this.xnt_1.faj_1), '/', '');
            var tmp_25 = Napier_getInstance();
            tmp_25.r5d(VOID, VOID, ResolveXapiLaunchHrefUseCase$invoke$lambda_0(this.tnt_1, url_0));
            return new XapiLaunchHrefResult(url_0, appendQueryArgs(tinCanXmlPathPrefix + this.wnu_1, queryParams), ensureNotNull(this.vnu_1.jnv_1), this.ynt_1);
          case 7:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 7) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function ResolveXapiLaunchHrefUseCase(activeRepo, httpClient, json, xppFactory, resumeOrStartXapiSessionUseCase, getApiUrlUseCase, accountManager, endpoint) {
    this.znu_1 = activeRepo;
    this.anv_1 = httpClient;
    this.bnv_1 = json;
    this.cnv_1 = xppFactory;
    this.dnv_1 = resumeOrStartXapiSessionUseCase;
    this.env_1 = getApiUrlUseCase;
    this.fnv_1 = accountManager;
    this.gnv_1 = endpoint;
  }
  protoOf(ResolveXapiLaunchHrefUseCase).cnw = function (contentEntryVersionUid, clazzUid, cbUid, $completion) {
    var tmp = new $invokeCOROUTINE$26(this, contentEntryVersionUid, clazzUid, cbUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function MoveContentEntriesUseCase(repo, systemImpl) {
    this.dnw_1 = repo;
    this.enw_1 = systemImpl;
  }
  protoOf(MoveContentEntriesUseCase).fnw = function (destContentEntry, selectedEntriesToMove, $completion) {
    var tmp$ret$0;
    $l$block_0: {
      // Inline function 'kotlin.collections.any' call
      var tmp;
      if (isInterface(selectedEntriesToMove, Collection)) {
        tmp = selectedEntriesToMove.c1();
      } else {
        tmp = false;
      }
      if (tmp) {
        tmp$ret$0 = false;
        break $l$block_0;
      }
      var tmp0_iterator = selectedEntriesToMove.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.domain.contententry.move.MoveContentEntriesUseCase.invoke.<anonymous>' call
        if (element.hnp_1.equals(destContentEntry.fah_1)) {
          tmp$ret$0 = true;
          break $l$block_0;
        }
      }
      tmp$ret$0 = false;
    }
    if (tmp$ret$0) {
      throw IllegalArgumentException_init_$Create$(this.enw_1.en6(strings_getInstance().qmf_1));
    }
    var tmp$ret$2;
    $l$block_2: {
      // Inline function 'kotlin.collections.any' call
      var tmp_0;
      if (isInterface(selectedEntriesToMove, Collection)) {
        tmp_0 = selectedEntriesToMove.c1();
      } else {
        tmp_0 = false;
      }
      if (tmp_0) {
        tmp$ret$2 = false;
        break $l$block_2;
      }
      var tmp0_iterator_0 = selectedEntriesToMove.w();
      while (tmp0_iterator_0.f()) {
        var element_0 = tmp0_iterator_0.e();
        // Inline function 'com.ustadmobile.core.domain.contententry.move.MoveContentEntriesUseCase.invoke.<anonymous>' call
        if (element_0.jnp_1.equals(destContentEntry.fah_1)) {
          tmp$ret$2 = true;
          break $l$block_2;
        }
      }
      tmp$ret$2 = false;
    }
    if (tmp$ret$2) {
      throw IllegalArgumentException_init_$Create$(this.enw_1.en6(strings_getInstance().rmf_1));
    }
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(selectedEntriesToMove, 10));
    var tmp0_iterator_1 = selectedEntriesToMove.w();
    while (tmp0_iterator_1.f()) {
      var item = tmp0_iterator_1.e();
      // Inline function 'com.ustadmobile.core.domain.contententry.move.MoveContentEntriesUseCase.invoke.<anonymous>' call
      var tmp$ret$4 = item.inp_1;
      destination.i1(tmp$ret$4);
    }
    var uidsToMove = destination;
    if (uidsToMove.c1())
      return Unit_instance;
    return this.dnw_1.k7d().nay(destContentEntry.fah_1, uidsToMove, systemTimeInMillis(), $completion);
  };
  function SaveContentEntryUseCase$invoke$slambda$lambda($picture) {
    return function () {
      return 'SavePictureUseCase: ContentEntry Set picture upsert uri = ' + $picture.xai_1 + ' uid=' + $picture.vai_1.toString();
    };
  }
  function SaveContentEntryUseCase$invoke$slambda($effectiveDb, $contentEntry, $picture, $initPictureUri, this$0, $joinToParentUid, resultContinuation) {
    this.onw_1 = $effectiveDb;
    this.pnw_1 = $contentEntry;
    this.qnw_1 = $picture;
    this.rnw_1 = $initPictureUri;
    this.snw_1 = this$0;
    this.tnw_1 = $joinToParentUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SaveContentEntryUseCase$invoke$slambda).fmp = function (it, $completion) {
    var tmp = this.gmp(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SaveContentEntryUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.fmp(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SaveContentEntryUseCase$invoke$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 6;
            this.hd_1 = 1;
            suspendResult = this.onw_1.i7d().jag(this.pnw_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.qnw_1 == null) ? !(this.qnw_1.xai_1 == this.rnw_1) : false) {
              var tmp_0 = Napier_getInstance();
              tmp_0.r5d(VOID, VOID, SaveContentEntryUseCase$invoke$slambda$lambda(this.qnw_1));
              this.hd_1 = 2;
              suspendResult = this.snw_1.vnw_1.e7f().qb3(listOf_0(this.qnw_1), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            if (!(this.tnw_1 == null)) {
              this.hd_1 = 4;
              suspendResult = this.onw_1.k7d().insertAsync(new ContentEntryParentChildJoin(this.tnw_1, this.pnw_1.fah_1), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 5;
              continue $sm;
            }

          case 4:
            this.hd_1 = 5;
            continue $sm;
          case 5:
            return Unit_instance;
          case 6:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 6) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SaveContentEntryUseCase$invoke$slambda).gmp = function (it, completion) {
    var i = new SaveContentEntryUseCase$invoke$slambda(this.onw_1, this.pnw_1, this.qnw_1, this.rnw_1, this.snw_1, this.tnw_1, completion);
    i.unw_1 = it;
    return i;
  };
  function SaveContentEntryUseCase$invoke$slambda_0($effectiveDb, $contentEntry, $picture, $initPictureUri, this$0, $joinToParentUid, resultContinuation) {
    var i = new SaveContentEntryUseCase$invoke$slambda($effectiveDb, $contentEntry, $picture, $initPictureUri, this$0, $joinToParentUid, resultContinuation);
    var l = function (it, $completion) {
      return i.fmp(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$27(_this__u8e3s4, contentEntry, joinToParentUid, picture, initPictureUri, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.gnx_1 = _this__u8e3s4;
    this.hnx_1 = contentEntry;
    this.inx_1 = joinToParentUid;
    this.jnx_1 = picture;
    this.knx_1 = initPictureUri;
  }
  protoOf($invokeCOROUTINE$27).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            var tmp_0 = this;
            var tmp0_elvis_lhs = this.gnx_1.wnw_1;
            tmp_0.lnx_1 = tmp0_elvis_lhs == null ? this.gnx_1.vnw_1 : tmp0_elvis_lhs;
            this.hd_1 = 1;
            suspendResult = withDoorTransactionAsync(this.lnx_1, VOID, SaveContentEntryUseCase$invoke$slambda_0(this.lnx_1, this.hnx_1, this.jnx_1, this.knx_1, this.gnx_1, this.inx_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.jnx_1 == null) ? !(this.jnx_1.xai_1 == this.knx_1) : false) {
              this.hd_1 = 2;
              var tmp_1 = this.jnx_1.vai_1;
              suspendResult = this.gnx_1.xnw_1.pne(tmp_1, 6678, this.jnx_1.xai_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function SaveContentEntryUseCase(db, repo, enqueueSavePictureUseCase) {
    this.vnw_1 = db;
    this.wnw_1 = repo;
    this.xnw_1 = enqueueSavePictureUseCase;
  }
  protoOf(SaveContentEntryUseCase).mnx = function (contentEntry, joinToParentUid, picture, initPictureUri, $completion) {
    var tmp = new $invokeCOROUTINE$27(this, contentEntry, joinToParentUid, picture, initPictureUri, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function AddOrUpdateCourseBlockUseCase() {
  }
  protoOf(AddOrUpdateCourseBlockUseCase).nnx = function (currentList, clazzUid, addOrUpdateBlock) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.indexOfFirst' call
      var index = 0;
      var tmp0_iterator = currentList.w();
      while (tmp0_iterator.f()) {
        var item = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.domain.courseblockupdate.AddOrUpdateCourseBlockUseCase.invoke.<anonymous>' call
        if (item.yj5_1.w7w_1.equals(addOrUpdateBlock.yj5_1.w7w_1)) {
          tmp$ret$1 = index;
          break $l$block;
        }
        index = index + 1 | 0;
      }
      tmp$ret$1 = -1;
    }
    var currentIndex = tmp$ret$1;
    var courseBlockMutableList = toMutableList(currentList);
    var tmp;
    if (currentIndex >= 0) {
      // Inline function 'kotlin.apply' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.courseblockupdate.AddOrUpdateCourseBlockUseCase.invoke.<anonymous>' call
      courseBlockMutableList.f1(currentIndex, addOrUpdateBlock);
      tmp = courseBlockMutableList;
    } else {
      courseBlockMutableList.i1(addOrUpdateBlock.kj6(addOrUpdateBlock.yj5_1.cji(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, clazzUid)));
      tmp = updateParentModuleUidsAndIndex(autoIndent(courseBlockMutableList, courseBlockMutableList.u() - 1 | 0));
    }
    var newCourseBlockList = tmp;
    return toList(newCourseBlockList);
  };
  function updateParentModuleUidsAndIndex(_this__u8e3s4) {
    // Inline function 'kotlin.collections.mapIndexed' call
    var this_0 = toMutableList(_this__u8e3s4);
    // Inline function 'kotlin.collections.mapIndexedTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var index = 0;
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.domain.courseblockupdate.updateParentModuleUidsAndIndex.<anonymous>' call
      var tmp1 = index;
      index = tmp1 + 1 | 0;
      var index_0 = checkIndexOverflow(tmp1);
      var parentModUid = findParentModule(_this__u8e3s4, item);
      var tmp;
      if (!item.yj5_1.z7w_1.equals(parentModUid) ? true : !(item.yj5_1.j7x_1 === index_0)) {
        tmp = item.kj6(item.yj5_1.cji(VOID, VOID, VOID, parentModUid, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, index_0));
      } else {
        tmp = item;
      }
      var tmp$ret$0 = tmp;
      destination.i1(tmp$ret$0);
    }
    return toList(destination);
  }
  function autoIndent(_this__u8e3s4, index) {
    var block = _this__u8e3s4.v(index).yj5_1;
    var tmp = block.x7w_1;
    if (tmp === 100)
      return _this__u8e3s4;
    var tmp0_safe_receiver = getOrNull(_this__u8e3s4, index - 1 | 0);
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.yj5_1;
    var tmp_0;
    if (tmp1_elvis_lhs == null) {
      return _this__u8e3s4;
    } else {
      tmp_0 = tmp1_elvis_lhs;
    }
    var prevBlock = tmp_0;
    var tmp_1;
    var tmp_2 = prevBlock.x7w_1;
    if (tmp_2 === 100) {
      tmp_1 = 1;
    } else {
      tmp_1 = prevBlock.y7w_1;
    }
    var autoIndent = tmp_1;
    var tmp_3;
    if (!(block.y7w_1 === autoIndent)) {
      // Inline function 'kotlin.apply' call
      var this_0 = toMutableList(_this__u8e3s4);
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.courseblockupdate.autoIndent.<anonymous>' call
      this_0.f1(index, this_0.v(index).kj6(this_0.v(index).yj5_1.cji(VOID, VOID, autoIndent)));
      tmp_3 = toList(this_0);
    } else {
      tmp_3 = _this__u8e3s4;
    }
    return tmp_3;
  }
  function findParentModule(_this__u8e3s4, forBlock) {
    var tmp = forBlock.yj5_1.x7w_1;
    if (tmp === 100)
      return new Long(0, 0);
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.indexOfFirst' call
      var index = 0;
      var tmp0_iterator = _this__u8e3s4.w();
      while (tmp0_iterator.f()) {
        var item = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.domain.courseblockupdate.findParentModule.<anonymous>' call
        if (item.yj5_1.w7w_1.equals(forBlock.yj5_1.w7w_1)) {
          tmp$ret$1 = index;
          break $l$block;
        }
        index = index + 1 | 0;
      }
      tmp$ret$1 = -1;
    }
    var index_0 = tmp$ret$1;
    var tmp0_elvis_lhs = getOrNull(_this__u8e3s4, index_0 - 1 | 0);
    var tmp_0;
    if (tmp0_elvis_lhs == null) {
      return new Long(0, 0);
    } else {
      tmp_0 = tmp0_elvis_lhs;
    }
    var prevBlock = tmp_0;
    var tmp_1;
    var tmp_2 = prevBlock.yj5_1.x7w_1;
    if (tmp_2 === 100) {
      tmp_1 = prevBlock.yj5_1.w7w_1;
    } else {
      if (prevBlock.yj5_1.y7w_1 >= 1) {
        tmp_1 = prevBlock.yj5_1.z7w_1;
      } else {
        tmp_1 = new Long(0, 0);
      }
    }
    return tmp_1;
  }
  function UpdateCourseBlocksOnReorderOrCommitUseCase() {
  }
  protoOf(UpdateCourseBlocksOnReorderOrCommitUseCase).onx = function (currentList, autoIndentIndex) {
    var tmp;
    if (autoIndentIndex >= 0) {
      tmp = autoIndent(currentList, autoIndentIndex);
    } else {
      tmp = currentList;
    }
    var listIndented = tmp;
    return updateParentModuleUidsAndIndex(listIndented);
  };
  protoOf(UpdateCourseBlocksOnReorderOrCommitUseCase).pnx = function (currentList, autoIndentIndex, $super) {
    autoIndentIndex = autoIndentIndex === VOID ? -1 : autoIndentIndex;
    return $super === VOID ? this.onx(currentList, autoIndentIndex) : $super.onx.call(this, currentList, autoIndentIndex);
  };
  function DeletePermanentlyUseCase(repoOrDb) {
    this.qnx_1 = repoOrDb;
  }
  protoOf(DeletePermanentlyUseCase).rnx = function (items, $completion) {
    var timeNow = systemTimeInMillis();
    var tmp = this.qnx_1.z7e();
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(items, 10));
    var tmp0_iterator = items.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.domain.deleteditem.DeletePermanentlyUseCase.invoke.<anonymous>' call
      var tmp$ret$0 = item.ce1_1;
      destination.i1(tmp$ret$0);
    }
    var tmp_0 = destination;
    return tmp.be1(tmp_0, 3, timeNow, $completion);
  };
  function RestoreDeletedItemUseCase$invoke$slambda($itemsByType, this$0, $timeNow, $items, resultContinuation) {
    this.any_1 = $itemsByType;
    this.bny_1 = this$0;
    this.cny_1 = $timeNow;
    this.dny_1 = $items;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(RestoreDeletedItemUseCase$invoke$slambda).fmp = function (it, $completion) {
    var tmp = this.gmp(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(RestoreDeletedItemUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.fmp(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(RestoreDeletedItemUseCase$invoke$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 6;
            var tmp_0 = this;
            tmp_0.fny_1 = this.any_1;
            var tmp_1 = this;
            tmp_1.gny_1 = this.fny_1.q2().w();
            this.hd_1 = 1;
            continue $sm;
          case 1:
            if (!this.gny_1.f()) {
              this.hd_1 = 4;
              continue $sm;
            }

            this.hny_1 = this.gny_1.e();
            var tmp_2 = this;
            tmp_2.iny_1 = this.hny_1;
            this.jny_1 = this.iny_1.s2();
            if (this.jny_1 === 7) {
              this.hd_1 = 2;
              var tmp_3 = this.bny_1.kny_1.k7d();
              var this_0 = this.iny_1.t2();
              var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
              var tmp0_iterator = this_0.w();
              while (tmp0_iterator.f()) {
                var item = tmp0_iterator.e();
                destination.i1(item.ie1_1);
              }
              suspendResult = tmp_3.oay(destination, false, this.cny_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.hd_1 = 1;
            continue $sm;
          case 4:
            this.hd_1 = 5;
            var tmp_4 = this.bny_1.kny_1.z7e();
            var this_1 = this.dny_1;
            var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
            var tmp0_iterator_0 = this_1.w();
            while (tmp0_iterator_0.f()) {
              var item_0 = tmp0_iterator_0.e();
              destination_0.i1(item_0.ce1_1);
            }

            suspendResult = tmp_4.be1(destination_0, 2, this.cny_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            return Unit_instance;
          case 6:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 6) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(RestoreDeletedItemUseCase$invoke$slambda).gmp = function (it, completion) {
    var i = new RestoreDeletedItemUseCase$invoke$slambda(this.any_1, this.bny_1, this.cny_1, this.dny_1, completion);
    i.eny_1 = it;
    return i;
  };
  function RestoreDeletedItemUseCase$invoke$slambda_0($itemsByType, this$0, $timeNow, $items, resultContinuation) {
    var i = new RestoreDeletedItemUseCase$invoke$slambda($itemsByType, this$0, $timeNow, $items, resultContinuation);
    var l = function (it, $completion) {
      return i.fmp(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function RestoreDeletedItemUseCase(repoOrDb) {
    this.kny_1 = repoOrDb;
  }
  protoOf(RestoreDeletedItemUseCase).rnx = function (items, $completion) {
    // Inline function 'kotlin.collections.groupBy' call
    // Inline function 'kotlin.collections.groupByTo' call
    var destination = LinkedHashMap_init_$Create$();
    var tmp0_iterator = items.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.domain.deleteditem.RestoreDeletedItemUseCase.invoke.<anonymous>' call
      var key = element.he1_1;
      // Inline function 'kotlin.collections.getOrPut' call
      var value = destination.q(key);
      var tmp;
      if (value == null) {
        // Inline function 'kotlin.collections.groupByTo.<anonymous>' call
        var answer = ArrayList_init_$Create$();
        destination.s(key, answer);
        tmp = answer;
      } else {
        tmp = value;
      }
      var list = tmp;
      list.i1(element);
    }
    var itemsByType = destination;
    var timeNow = systemTimeInMillis();
    return withDoorTransactionAsync(this.kny_1, VOID, RestoreDeletedItemUseCase$invoke$slambda_0(itemsByType, this, timeNow, items, null), $completion);
  };
  function toEpubTocItem(_this__u8e3s4, $this, indentLevel, parentUids) {
    var uid = $this.mny_1.atomicfu$incrementAndGet();
    var uidsForChildren = plus_2(parentUids, uid);
    var tmp8_uid = $this.mny_1.atomicfu$incrementAndGet();
    var tmp0_safe_receiver = _this__u8e3s4.qmy_1;
    var tmp2_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.gmy_1;
    var tmp;
    if (tmp2_elvis_lhs == null) {
      var tmp1_safe_receiver = _this__u8e3s4.rmy_1;
      tmp = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.gmz_1;
    } else {
      tmp = tmp2_elvis_lhs;
    }
    var tmp3_elvis_lhs = tmp;
    var tmp9_label = tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs;
    var tmp4_safe_receiver = _this__u8e3s4.qmy_1;
    var tmp10_href = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.hmy_1;
    var tmp5_safe_receiver = _this__u8e3s4.smy_1;
    var tmp6_safe_receiver = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.fmz_1;
    var tmp_0;
    if (tmp6_safe_receiver == null) {
      tmp_0 = null;
    } else {
      // Inline function 'kotlin.collections.map' call
      // Inline function 'kotlin.collections.mapTo' call
      var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp6_safe_receiver, 10));
      var tmp0_iterator = tmp6_safe_receiver.w();
      while (tmp0_iterator.f()) {
        var item = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.domain.epub.GetEpubTableOfContentsUseCase.toEpubTocItem.<anonymous>' call
        var tmp$ret$0 = toEpubTocItem(item, $this, indentLevel + 1 | 0, uidsForChildren);
        destination.i1(tmp$ret$0);
      }
      tmp_0 = destination;
    }
    var tmp7_elvis_lhs = tmp_0;
    var tmp11_children = tmp7_elvis_lhs == null ? emptyList() : tmp7_elvis_lhs;
    return new EpubTocItem(tmp8_uid, tmp9_label, tmp10_href, tmp11_children, parentUids, indentLevel);
  }
  function toTocItem(_this__u8e3s4, $this, indentLevel, parentUids) {
    var uid = $this.mny_1.atomicfu$incrementAndGet();
    var uidsForChildren = plus_2(parentUids, uid);
    var tmp0_safe_receiver = firstOrNull(_this__u8e3s4.fn0_1);
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.xmz_1;
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.sn0_1;
    var tmp3_label = tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs;
    var tmp4_href = _this__u8e3s4.gn0_1.mmz_1;
    // Inline function 'kotlin.collections.map' call
    var this_0 = _this__u8e3s4.in0_1;
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.domain.epub.GetEpubTableOfContentsUseCase.toTocItem.<anonymous>' call
      var tmp$ret$0 = toTocItem(item, $this, indentLevel + 1 | 0, uidsForChildren);
      destination.i1(tmp$ret$0);
    }
    return new EpubTocItem(uid, tmp3_label, tmp4_href, destination, parentUids, indentLevel);
  }
  function $invokeCOROUTINE$28(_this__u8e3s4, opfPackage, readItemText, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.vny_1 = _this__u8e3s4;
    this.wny_1 = opfPackage;
    this.xny_1 = readItemText;
  }
  protoOf($invokeCOROUTINE$28).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.yny_1 = this.wny_1.wn2();
            if (!(this.yny_1 == null) ? startsWith(this.yny_1.rn1_1, 'application/xhtml') : false) {
              this.hd_1 = 2;
              suspendResult = this.xny_1(this.yny_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_0;
              if (!(this.yny_1 == null)) {
                tmp_0 = this.yny_1.rn1_1 === 'application/x-dtbncx+xml';
              } else {
                tmp_0 = false;
              }
              if (tmp_0) {
                this.hd_1 = 1;
                suspendResult = this.xny_1(this.yny_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                var tmp_1 = this;
                tmp_1.zny_1 = null;
                this.hd_1 = 3;
                continue $sm;
              }
            }

          case 1:
            var docStr = suspendResult;
            var this_0 = this.vny_1.lny_1;
            var this_1 = this_0.g45();
            var this_2 = serializer(this_1, createKType(getKClass(NcxDocument), arrayOf([]), false));
            var ncxDoc = this_0.f45(isInterface(this_2, KSerializer) ? this_2 : THROW_CCE(), docStr);
            var tmp_2 = this;
            var this_3 = ncxDoc.pn0_1.bn0_1;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_3.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              var it = toTocItem(element, this.vny_1, 0, emptySet());
              var list = plus(listOf_0(it), it.dnz_1);
              addAll(destination, list);
            }

            tmp_2.zny_1 = destination;
            this.hd_1 = 3;
            continue $sm;
          case 2:
            var docStr_0 = suspendResult;
            var this_4 = this.vny_1.lny_1;
            var this_5 = this_4.g45();
            var this_6 = serializer(this_5, createKType(getKClass(NavigationDocument), arrayOf([]), false));
            var navDoc = this_4.f45(isInterface(this_6, KSerializer) ? this_6 : THROW_CCE(), docStr_0);
            var tmp_3 = this;
            var this_7 = first_0(navDoc.bmz_1.kmy_1).wmy_1.fmz_1;
            var destination_0 = ArrayList_init_$Create$();
            var tmp0_iterator_0 = this_7.w();
            while (tmp0_iterator_0.f()) {
              var element_0 = tmp0_iterator_0.e();
              var it_0 = toEpubTocItem(element_0, this.vny_1, 0, emptySet());
              var list_0 = plus(listOf_0(it_0), it_0.dnz_1);
              addAll(destination_0, list_0);
            }

            tmp_3.zny_1 = destination_0;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return this.zny_1;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function GetEpubTableOfContentsUseCase(xml) {
    this.lny_1 = xml;
    this.mny_1 = atomic$int$1(0);
  }
  protoOf(GetEpubTableOfContentsUseCase).hnz = function (opfPackage, readItemText, $completion) {
    var tmp = new $invokeCOROUTINE$28(this, opfPackage, readItemText, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function GetApiUrlUseCase() {
  }
  function GetApiUrlUseCaseDirect(endpoint) {
    this.inz_1 = endpoint;
  }
  protoOf(GetApiUrlUseCaseDirect).vnv = function (path) {
    return requirePostfix(this.inz_1.umj_1, '/') + removePrefix(path, '/');
  };
  function VersionInfo(versionString, buildTime) {
    this.jnz_1 = versionString;
    this.knz_1 = buildTime;
  }
  protoOf(VersionInfo).toString = function () {
    return 'VersionInfo(versionString=' + this.jnz_1 + ', buildTime=' + this.knz_1.toString() + ')';
  };
  protoOf(VersionInfo).hashCode = function () {
    var result = getStringHashCode(this.jnz_1);
    result = imul(result, 31) + this.knz_1.hashCode() | 0;
    return result;
  };
  protoOf(VersionInfo).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof VersionInfo))
      return false;
    var tmp0_other_with_cast = other instanceof VersionInfo ? other : THROW_CCE();
    if (!(this.jnz_1 === tmp0_other_with_cast.jnz_1))
      return false;
    if (!this.knz_1.equals(tmp0_other_with_cast.knz_1))
      return false;
    return true;
  };
  function GetVersionUseCase() {
  }
  function GetHtmlContentDisplayEngineOptionsUseCase(optionsList) {
    this.mnz_1 = optionsList;
  }
  protoOf(GetHtmlContentDisplayEngineOptionsUseCase).lnz = function () {
    return this.mnz_1;
  };
  function GetHtmlContentDisplayEngineUseCase(settings, getOptionsUseCase) {
    this.nnz_1 = settings;
    this.onz_1 = getOptionsUseCase;
  }
  protoOf(GetHtmlContentDisplayEngineUseCase).lnz = function () {
    // Inline function 'com.russhwolf.settings.get' call
    var this_0 = this.nnz_1;
    var key = 'com.ustadmobile.htmlcontentdisplayengine';
    var settingInt = this_0.rl1(key, 0);
    var tmp$ret$2;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator = this.onz_1.lnz().w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.domain.htmlcontentdisplayengine.GetHtmlContentDisplayEngineUseCase.invoke.<anonymous>' call
        if (element.pnz_1 === settingInt) {
          tmp$ret$2 = element;
          break $l$block;
        }
      }
      tmp$ret$2 = null;
    }
    var tmp0_elvis_lhs = tmp$ret$2;
    return tmp0_elvis_lhs == null ? first_0(this.onz_1.lnz()) : tmp0_elvis_lhs;
  };
  function Companion_41() {
    this.snz_1 = 'com.ustadmobile.htmlcontentdisplayengine';
  }
  var Companion_instance_89;
  function Companion_getInstance_58() {
    return Companion_instance_89;
  }
  function SetHtmlContentDisplayEngineUseCase(settings) {
    this.tnz_1 = settings;
  }
  function SetLangResult(waitForRestart) {
    this.unz_1 = waitForRestart;
  }
  protoOf(SetLangResult).toString = function () {
    return 'SetLangResult(waitForRestart=' + this.unz_1 + ')';
  };
  protoOf(SetLangResult).hashCode = function () {
    return getBooleanHashCode(this.unz_1);
  };
  protoOf(SetLangResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SetLangResult))
      return false;
    var tmp0_other_with_cast = other instanceof SetLangResult ? other : THROW_CCE();
    if (!(this.unz_1 === tmp0_other_with_cast.unz_1))
      return false;
    return true;
  };
  function SetLanguageUseCase() {
  }
  function LaunchOpenLicensesUseCase() {
  }
  function MakeLinkUseCase(endpoint) {
    this.xnz_1 = endpoint;
  }
  protoOf(MakeLinkUseCase).ynz = function (destName, args) {
    var tmp = UMFileUtil_getInstance();
    Companion_getInstance_84();
    return appendQueryArgs_0(tmp.znz([this.xnz_1.umj_1, '/umapp/#/']) + destName, toQueryString(args));
  };
  function OnClickLinkUseCase_init_$Init$(navController, accountManager, openExternalLinkUseCase, apiUrlConfig, $this) {
    OnClickLinkUseCase.call($this, navController, accountManager, openExternalLinkUseCase, apiUrlConfig.tmx_1);
    return $this;
  }
  function OnClickLinkUseCase_init_$Create$(navController, accountManager, openExternalLinkUseCase, apiUrlConfig) {
    return OnClickLinkUseCase_init_$Init$(navController, accountManager, openExternalLinkUseCase, apiUrlConfig, objectCreate(protoOf(OnClickLinkUseCase)));
  }
  function OnClickLinkUseCase(navController, accountManager, openExternalLinkUseCase, userCanSelectServer) {
    this.ao0_1 = navController;
    this.bo0_1 = accountManager;
    this.co0_1 = openExternalLinkUseCase;
    this.do0_1 = userCanSelectServer;
  }
  protoOf(OnClickLinkUseCase).eo0 = function (link, target) {
    navigateToLink(this.ao0_1, link, this.bo0_1, this.co0_1, VOID, VOID, this.do0_1, VOID, VOID, target);
  };
  var LinkTarget_BLANK_instance;
  var LinkTarget_TOP_instance;
  var LinkTarget_SELF_instance;
  var LinkTarget_DEFAULT_instance;
  function Companion_42() {
  }
  protoOf(Companion_42).pla = function (targetAttr) {
    // Inline function 'kotlin.text.lowercase' call
    // Inline function 'kotlin.js.asDynamic' call
    switch (targetAttr.toLowerCase()) {
      case '_top':
        return LinkTarget_TOP_getInstance();
      case '_blank':
        return LinkTarget_BLANK_getInstance();
      case '_self':
        return LinkTarget_SELF_getInstance();
      default:
        return LinkTarget_DEFAULT_getInstance();
    }
  };
  var Companion_instance_90;
  function Companion_getInstance_59() {
    return Companion_instance_90;
  }
  var LinkTarget_entriesInitialized;
  function LinkTarget_initEntries() {
    if (LinkTarget_entriesInitialized)
      return Unit_instance;
    LinkTarget_entriesInitialized = true;
    LinkTarget_BLANK_instance = new LinkTarget('BLANK', 0);
    LinkTarget_TOP_instance = new LinkTarget('TOP', 1);
    LinkTarget_SELF_instance = new LinkTarget('SELF', 2);
    LinkTarget_DEFAULT_instance = new LinkTarget('DEFAULT', 3);
  }
  function LinkTarget(name, ordinal) {
    Enum.call(this, name, ordinal);
  }
  function LinkTarget_BLANK_getInstance() {
    LinkTarget_initEntries();
    return LinkTarget_BLANK_instance;
  }
  function LinkTarget_TOP_getInstance() {
    LinkTarget_initEntries();
    return LinkTarget_TOP_instance;
  }
  function LinkTarget_SELF_getInstance() {
    LinkTarget_initEntries();
    return LinkTarget_SELF_instance;
  }
  function LinkTarget_DEFAULT_getInstance() {
    LinkTarget_initEntries();
    return LinkTarget_DEFAULT_instance;
  }
  function OpenExternalLinkUseCase() {
  }
  function UpdatePeerReviewAllocationUseCase$invoke$lambda($selectedMarkerUid) {
    return function ($this$shallowCopy) {
      var tmp = $this$shallowCopy;
      var tmp0_elvis_lhs = $selectedMarkerUid;
      tmp.lff_1 = tmp0_elvis_lhs == null ? new Long(0, 0) : tmp0_elvis_lhs;
      return Unit_instance;
    };
  }
  function $invokeCOROUTINE$29(_this__u8e3s4, existingAllocations, groupUid, clazzUid, assignmentUid, numReviewsPerSubmission, allocateRemaining, resetAllocations, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.no0_1 = _this__u8e3s4;
    this.oo0_1 = existingAllocations;
    this.po0_1 = groupUid;
    this.qo0_1 = clazzUid;
    this.ro0_1 = assignmentUid;
    this.so0_1 = numReviewsPerSubmission;
    this.to0_1 = allocateRemaining;
    this.uo0_1 = resetAllocations;
  }
  protoOf($invokeCOROUTINE$29).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 8;
            this.hd_1 = 1;
            suspendResult = this.no0_1.oo1_1.d7e().p7r(this.qo0_1, this.po0_1, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.vo0_1 = suspendResult;
            var tmp_0 = this;
            tmp_0.wo0_1 = this.vo0_1;
            var tmp_1 = this;
            tmp_1.xo0_1 = this.wo0_1;
            var tmp_2 = this;
            tmp_2.yo0_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.wo0_1, 10));
            this.zo0_1 = this.xo0_1.w();
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (!this.zo0_1.f()) {
              this.hd_1 = 7;
              continue $sm;
            }

            this.ao1_1 = this.zo0_1.e();
            var tmp_3 = this;
            tmp_3.bo1_1 = this.ao1_1;
            var tmp_4 = this;
            tmp_4.co1_1 = this.no0_1;
            var tmp_5 = this;
            var this_0 = this.oo0_1;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              if (element.mff_1.equals(this.bo1_1)) {
                destination.i1(element);
              }
            }

            tmp_5.do1_1 = this.no0_1.qo1(destination, this.so0_1);
            var tmp_6 = this;
            tmp_6.eo1_1 = this.so0_1;
            if (this.do1_1.u() >= this.eo1_1) {
              this.fo1_1 = this.do1_1;
              this.hd_1 = 6;
              continue $sm;
            } else {
              var tmp_7 = this;
              tmp_7.go1_1 = until(0, this.eo1_1 - this.do1_1.u() | 0);
              var tmp_8 = this;
              tmp_8.ho1_1 = this.go1_1;
              var tmp_9 = this;
              tmp_9.io1_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.go1_1, 10));
              this.jo1_1 = this.ho1_1.w();
              this.hd_1 = 3;
              continue $sm;
            }

          case 3:
            if (!this.jo1_1.f()) {
              this.hd_1 = 5;
              continue $sm;
            }

            this.ko1_1 = this.jo1_1.e();
            var tmp_10 = this;
            tmp_10.lo1_1 = this.ko1_1;
            var tmp_11 = this;
            tmp_11.mo1_1 = new PeerReviewerAllocation();
            var tmp_12 = this;
            tmp_12.no1_1 = this.mo1_1;
            this.hd_1 = 4;
            var tmp_13 = get_doorPrimaryKeyManager(this.no0_1.oo1_1);
            suspendResult = tmp_13.b62(140, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            var ARGUMENT = suspendResult;
            this.no1_1.kff_1 = ARGUMENT;
            this.no1_1.mff_1 = this.bo1_1;
            this.no1_1.nff_1 = this.ro0_1;
            var ARGUMENT_0 = this.mo1_1;
            this.io1_1.i1(ARGUMENT_0);
            this.hd_1 = 3;
            continue $sm;
          case 5:
            var ARGUMENT_1 = this.io1_1;
            this.fo1_1 = plus(this.do1_1, ARGUMENT_1);
            this.hd_1 = 6;
            continue $sm;
          case 6:
            var existingAllocationsForSubmitter = this.fo1_1;
            var ARGUMENT_2 = to(this.bo1_1, existingAllocationsForSubmitter);
            this.yo0_1.i1(ARGUMENT_2);
            this.hd_1 = 2;
            continue $sm;
          case 7:
            var ARGUMENT_3 = this.yo0_1;
            var allocationsForEachSubmitter = toMap(ARGUMENT_3);
            var destination_0 = ArrayList_init_$Create$();
            var tmp0_iterator_0 = allocationsForEachSubmitter.q2().w();
            while (tmp0_iterator_0.f()) {
              var element_0 = tmp0_iterator_0.e();
              var list = element_0.t2();
              addAll(destination_0, list);
            }

            var allocationList = toMutableList(destination_0);
            if (this.uo0_1) {
              var inductionVariable = 0;
              var last = allocationList.u() - 1 | 0;
              if (inductionVariable <= last)
                do {
                  var index = inductionVariable;
                  inductionVariable = inductionVariable + 1 | 0;
                  allocationList.f1(index, allocationList.v(index).jjm(VOID, new Long(0, 0)));
                }
                 while (inductionVariable <= last);
            }

            if (this.to0_1) {
              var this_1 = this.vo0_1;
              var destination_1 = ArrayList_init_$Create$();
              var tmp0_iterator_1 = this_1.w();
              while (tmp0_iterator_1.f()) {
                var element_1 = tmp0_iterator_1.e();
                var tmp$ret$0;
                l$ret$1: do {
                  var tmp_14;
                  if (isInterface(allocationList, Collection)) {
                    tmp_14 = allocationList.c1();
                  } else {
                    tmp_14 = false;
                  }
                  if (tmp_14) {
                    tmp$ret$0 = 0;
                    break l$ret$1;
                  }
                  var count = 0;
                  var tmp0_iterator_2 = allocationList.w();
                  while (tmp0_iterator_2.f()) {
                    var element_2 = tmp0_iterator_2.e();
                    if (element_2.lff_1.equals(element_1)) {
                      count = count + 1 | 0;
                      checkCountOverflow(count);
                    }
                  }
                  tmp$ret$0 = count;
                }
                 while (false);
                var numToMarkAlreadyAssignedToSubmitter = tmp$ret$0;
                var this_2 = until(0, this.so0_1 - numToMarkAlreadyAssignedToSubmitter | 0);
                var destination_2 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_2, 10));
                var tmp0_iterator_3 = this_2.w();
                while (tmp0_iterator_3.f()) {
                  var item = tmp0_iterator_3.e();
                  destination_2.i1(element_1);
                }
                var list_0 = destination_2;
                addAll(destination_1, list_0);
              }
              var fromBucket = toMutableList(shuffled(destination_1));
              var inductionVariable_0 = 0;
              var last_0 = allocationList.u() - 1 | 0;
              if (inductionVariable_0 <= last_0)
                do {
                  var index_0 = inductionVariable_0;
                  inductionVariable_0 = inductionVariable_0 + 1 | 0;
                  var allocation = allocationList.v(index_0);
                  if (allocation.lff_1.equals(new Long(0, 0))) {
                    var destination_3 = ArrayList_init_$Create$();
                    var tmp0_iterator_4 = allocationList.w();
                    while (tmp0_iterator_4.f()) {
                      var element_3 = tmp0_iterator_4.e();
                      if (element_3.mff_1.equals(allocation.mff_1)) {
                        destination_3.i1(element_3);
                      }
                    }
                    var destination_4 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination_3, 10));
                    var tmp0_iterator_5 = destination_3.w();
                    while (tmp0_iterator_5.f()) {
                      var item_0 = tmp0_iterator_5.e();
                      destination_4.i1(item_0.lff_1);
                    }
                    var destination_5 = ArrayList_init_$Create$();
                    var tmp0_iterator_6 = destination_4.w();
                    while (tmp0_iterator_6.f()) {
                      var element_4 = tmp0_iterator_6.e();
                      if (!element_4.equals(new Long(0, 0))) {
                        destination_5.i1(element_4);
                      }
                    }
                    var otherMarkersForThisSubmitter = destination_5;
                    var tmp$ret$2;
                    l$ret$3: do {
                      var tmp0_iterator_7 = fromBucket.w();
                      while (tmp0_iterator_7.f()) {
                        var element_5 = tmp0_iterator_7.e();
                        if (!element_5.equals(allocation.mff_1) ? !otherMarkersForThisSubmitter.a1(element_5) : false) {
                          tmp$ret$2 = element_5;
                          break l$ret$3;
                        }
                      }
                      tmp$ret$2 = null;
                    }
                     while (false);
                    var tmp2_safe_receiver = tmp$ret$2;
                    var tmp_15;
                    if (tmp2_safe_receiver == null) {
                      tmp_15 = null;
                    } else {
                      fromBucket.j1(tmp2_safe_receiver);
                      tmp_15 = tmp2_safe_receiver;
                    }
                    var selectedMarkerUid = tmp_15;
                    allocationList.f1(index_0, shallowCopy_2(allocation, UpdatePeerReviewAllocationUseCase$invoke$lambda(selectedMarkerUid)));
                  }
                }
                 while (inductionVariable_0 <= last_0);
            }

            return allocationList;
          case 8:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 8) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function UpdatePeerReviewAllocationUseCase(db, systemImpl) {
    this.oo1_1 = db;
    this.po1_1 = systemImpl;
  }
  protoOf(UpdatePeerReviewAllocationUseCase).qo1 = function (_this__u8e3s4, maxSize) {
    return _this__u8e3s4.u() <= maxSize ? _this__u8e3s4 : _this__u8e3s4.z(0, maxSize);
  };
  protoOf(UpdatePeerReviewAllocationUseCase).ro1 = function (existingAllocations, groupUid, clazzUid, assignmentUid, numReviewsPerSubmission, allocateRemaining, resetAllocations, $completion) {
    var tmp = new $invokeCOROUTINE$29(this, existingAllocations, groupUid, clazzUid, assignmentUid, numReviewsPerSubmission, allocateRemaining, resetAllocations, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UpdatePeerReviewAllocationUseCase).so1 = function (existingAllocations, groupUid, clazzUid, assignmentUid, numReviewsPerSubmission, allocateRemaining, resetAllocations, $completion, $super) {
    resetAllocations = resetAllocations === VOID ? false : resetAllocations;
    return $super === VOID ? this.ro1(existingAllocations, groupUid, clazzUid, assignmentUid, numReviewsPerSubmission, allocateRemaining, resetAllocations, $completion) : $super.ro1.call(this, existingAllocations, groupUid, clazzUid, assignmentUid, numReviewsPerSubmission, allocateRemaining, resetAllocations, $completion);
  };
  function AddNewPersonUseCase$invoke$slambda($effectiveDb, $person, $systemPermissions, $createPersonParentApprovalIfMinor, $addedByPersonUid, resultContinuation) {
    this.bo2_1 = $effectiveDb;
    this.co2_1 = $person;
    this.do2_1 = $systemPermissions;
    this.eo2_1 = $createPersonParentApprovalIfMinor;
    this.fo2_1 = $addedByPersonUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AddNewPersonUseCase$invoke$slambda).an7 = function (it, $completion) {
    var tmp = this.gmp(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AddNewPersonUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.an7(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AddNewPersonUseCase$invoke$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            suspendResult = this.bo2_1.a7d().insertAsync(this.co2_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.ho2_1 = suspendResult;
            this.io2_1 = this.co2_1.f95_1.equals(new Long(0, 0)) ? this.ho2_1 : this.co2_1.f95_1;
            this.hd_1 = 2;
            suspendResult = this.bo2_1.c7f().yhc(new SystemPermission(VOID, this.io2_1, VOID, this.do2_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            if (isDateOfBirthAMinor(Companion_getInstance_6().zla(this.co2_1.n95_1)) ? this.eo2_1 : false) {
              this.hd_1 = 3;
              var tmp_0 = this.bo2_1.k7e();
              var tmp2_ppjApprovalTiemstamp = systemTimeInMillis();
              suspendResult = tmp_0.yga(new PersonParentJoin(VOID, VOID, VOID, VOID, VOID, this.fo2_1, this.io2_1, 8, VOID, VOID, VOID, 1, tmp2_ppjApprovalTiemstamp), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 4;
              continue $sm;
            }

          case 3:
            this.hd_1 = 4;
            continue $sm;
          case 4:
            return this.io2_1;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(AddNewPersonUseCase$invoke$slambda).gmp = function (it, completion) {
    var i = new AddNewPersonUseCase$invoke$slambda(this.bo2_1, this.co2_1, this.do2_1, this.eo2_1, this.fo2_1, completion);
    i.go2_1 = it;
    return i;
  };
  function AddNewPersonUseCase$invoke$slambda_0($effectiveDb, $person, $systemPermissions, $createPersonParentApprovalIfMinor, $addedByPersonUid, resultContinuation) {
    var i = new AddNewPersonUseCase$invoke$slambda($effectiveDb, $person, $systemPermissions, $createPersonParentApprovalIfMinor, $addedByPersonUid, resultContinuation);
    var l = function (it, $completion) {
      return i.an7(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AddNewPersonUseCase(db, repo) {
    this.jo2_1 = db;
    this.ko2_1 = repo;
  }
  protoOf(AddNewPersonUseCase).lo2 = function (person, addedByPersonUid, createPersonParentApprovalIfMinor, systemPermissions, $completion) {
    var tmp0_elvis_lhs = this.ko2_1;
    var effectiveDb = tmp0_elvis_lhs == null ? this.jo2_1 : tmp0_elvis_lhs;
    return withDoorTransactionAsync(effectiveDb, VOID, AddNewPersonUseCase$invoke$slambda_0(effectiveDb, person, systemPermissions, createPersonParentApprovalIfMinor, addedByPersonUid, null), $completion);
  };
  protoOf(AddNewPersonUseCase).mo2 = function (person, addedByPersonUid, createPersonParentApprovalIfMinor, systemPermissions, $completion, $super) {
    addedByPersonUid = addedByPersonUid === VOID ? new Long(0, 0) : addedByPersonUid;
    createPersonParentApprovalIfMinor = createPersonParentApprovalIfMinor === VOID ? true : createPersonParentApprovalIfMinor;
    var tmp;
    if (systemPermissions === VOID) {
      Companion_getInstance_7();
      tmp = new Long(0, 0);
    } else {
      tmp = systemPermissions;
    }
    systemPermissions = tmp;
    return $super === VOID ? this.lo2(person, addedByPersonUid, createPersonParentApprovalIfMinor, systemPermissions, $completion) : $super.lo2.call(this, person, addedByPersonUid, createPersonParentApprovalIfMinor, systemPermissions, $completion);
  };
  function BulkAddPersonException(message, errors) {
    message = message === VOID ? null : message;
    IllegalArgumentException_init_$Init$_0(message, this);
    captureStack(this, BulkAddPersonException);
    this.no2_1 = errors;
  }
  function $serializer_35() {
    $serializer_instance_35 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.person.bulkadd.BulkAddPersonsDataError', this, 3);
    tmp0_serialDesc.g4f('lineNum', false);
    tmp0_serialDesc.g4f('colName', false);
    tmp0_serialDesc.g4f('invalidValue', false);
    this.oo2_1 = tmp0_serialDesc;
  }
  protoOf($serializer_35).d44 = function () {
    return this.oo2_1;
  };
  protoOf($serializer_35).x4f = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [IntSerializer_getInstance(), StringSerializer_getInstance(), get_nullable(StringSerializer_getInstance())];
  };
  protoOf($serializer_35).f44 = function (decoder) {
    var tmp0_desc = this.oo2_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = 0;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_input = decoder.v47(tmp0_desc);
    if (tmp7_input.k48()) {
      tmp4_local0 = tmp7_input.a48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp7_input.f48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp7_input.j48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp7_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp7_input.a48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp7_input.f48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp7_input.j48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp7_input.w47(tmp0_desc);
    return BulkAddPersonsDataError_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
  };
  protoOf($serializer_35).po2 = function (encoder, value) {
    var tmp0_desc = this.oo2_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    tmp1_output.e49(tmp0_desc, 0, value.qo2_1);
    tmp1_output.j49(tmp0_desc, 1, value.ro2_1);
    tmp1_output.n49(tmp0_desc, 2, StringSerializer_getInstance(), value.so2_1);
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_35).e44 = function (encoder, value) {
    return this.po2(encoder, value instanceof BulkAddPersonsDataError ? value : THROW_CCE());
  };
  var $serializer_instance_35;
  function $serializer_getInstance_47() {
    if ($serializer_instance_35 == null)
      new $serializer_35();
    return $serializer_instance_35;
  }
  function BulkAddPersonsDataError_init_$Init$(seen1, lineNum, colName, invalidValue, serializationConstructorMarker, $this) {
    if (!(7 === (7 & seen1))) {
      throwMissingFieldException(seen1, 7, $serializer_getInstance_47().oo2_1);
    }
    $this.qo2_1 = lineNum;
    $this.ro2_1 = colName;
    $this.so2_1 = invalidValue;
    return $this;
  }
  function BulkAddPersonsDataError_init_$Create$(seen1, lineNum, colName, invalidValue, serializationConstructorMarker) {
    return BulkAddPersonsDataError_init_$Init$(seen1, lineNum, colName, invalidValue, serializationConstructorMarker, objectCreate(protoOf(BulkAddPersonsDataError)));
  }
  function BulkAddPersonsDataError() {
  }
  protoOf(BulkAddPersonsDataError).toString = function () {
    return 'BulkAddPersonsDataError(lineNum=' + this.qo2_1 + ', colName=' + this.ro2_1 + ', invalidValue=' + this.so2_1 + ')';
  };
  protoOf(BulkAddPersonsDataError).hashCode = function () {
    var result = this.qo2_1;
    result = imul(result, 31) + getStringHashCode(this.ro2_1) | 0;
    result = imul(result, 31) + (this.so2_1 == null ? 0 : getStringHashCode(this.so2_1)) | 0;
    return result;
  };
  protoOf(BulkAddPersonsDataError).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof BulkAddPersonsDataError))
      return false;
    var tmp0_other_with_cast = other instanceof BulkAddPersonsDataError ? other : THROW_CCE();
    if (!(this.qo2_1 === tmp0_other_with_cast.qo2_1))
      return false;
    if (!(this.ro2_1 === tmp0_other_with_cast.ro2_1))
      return false;
    if (!(this.so2_1 == tmp0_other_with_cast.so2_1))
      return false;
    return true;
  };
  function BulkAddPersonsFromLocalUriUseCase() {
  }
  function Companion_43() {
  }
  var Companion_instance_91;
  function Companion_getInstance_60() {
    return Companion_instance_91;
  }
  function $serializer_36() {
    $serializer_instance_36 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.person.bulkadd.BulkAddPersonsUseCase.BulkAddUsersResult', this, 1);
    tmp0_serialDesc.g4f('numImported', false);
    this.uo2_1 = tmp0_serialDesc;
  }
  protoOf($serializer_36).d44 = function () {
    return this.uo2_1;
  };
  protoOf($serializer_36).x4f = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [IntSerializer_getInstance()];
  };
  protoOf($serializer_36).f44 = function (decoder) {
    var tmp0_desc = this.uo2_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = 0;
    var tmp5_input = decoder.v47(tmp0_desc);
    if (tmp5_input.k48()) {
      tmp4_local0 = tmp5_input.a48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp5_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp5_input.a48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp5_input.w47(tmp0_desc);
    return BulkAddUsersResult_init_$Create$(tmp3_bitMask0, tmp4_local0, null);
  };
  protoOf($serializer_36).vo2 = function (encoder, value) {
    var tmp0_desc = this.uo2_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    tmp1_output.e49(tmp0_desc, 0, value.wo2_1);
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_36).e44 = function (encoder, value) {
    return this.vo2(encoder, value instanceof BulkAddUsersResult ? value : THROW_CCE());
  };
  var $serializer_instance_36;
  function $serializer_getInstance_48() {
    if ($serializer_instance_36 == null)
      new $serializer_36();
    return $serializer_instance_36;
  }
  function BulkAddUsersResult_init_$Init$(seen1, numImported, serializationConstructorMarker, $this) {
    if (!(1 === (1 & seen1))) {
      throwMissingFieldException(seen1, 1, $serializer_getInstance_48().uo2_1);
    }
    $this.wo2_1 = numImported;
    return $this;
  }
  function BulkAddUsersResult_init_$Create$(seen1, numImported, serializationConstructorMarker) {
    return BulkAddUsersResult_init_$Init$(seen1, numImported, serializationConstructorMarker, objectCreate(protoOf(BulkAddUsersResult)));
  }
  function BulkAddUsersResult(numImported) {
    this.wo2_1 = numImported;
  }
  protoOf(BulkAddUsersResult).toString = function () {
    return 'BulkAddUsersResult(numImported=' + this.wo2_1 + ')';
  };
  protoOf(BulkAddUsersResult).hashCode = function () {
    return this.wo2_1;
  };
  protoOf(BulkAddUsersResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof BulkAddUsersResult))
      return false;
    var tmp0_other_with_cast = other instanceof BulkAddUsersResult ? other : THROW_CCE();
    if (!(this.wo2_1 === tmp0_other_with_cast.wo2_1))
      return false;
    return true;
  };
  function IPhoneNumberUtil() {
  }
  function formatInternationalOrNull(_this__u8e3s4, number) {
    var tmp;
    try {
      tmp = _this__u8e3s4.yo2(_this__u8e3s4.xo2(number, 'US'));
    } catch ($p) {
      var tmp_0;
      if ($p instanceof Error) {
        var e = $p;
        tmp_0 = null;
      } else {
        throw $p;
      }
      tmp = tmp_0;
    }
    return tmp;
  }
  function OnClickPhoneNumUseCase() {
  }
  function PhoneNumValidatorUseCase() {
  }
  function OnClickEmailUseCase() {
  }
  function ShareAppUseCase() {
  }
  function ShareTextUseCase() {
  }
  function GetShowPoweredByUseCase(showPoweredBy) {
    this.ao3_1 = showPoweredBy;
  }
  protoOf(GetShowPoweredByUseCase).lnz = function () {
    return this.ao3_1;
  };
  function Companion_44() {
    this.bo3_1 = 'en';
  }
  var Companion_instance_92;
  function Companion_getInstance_61() {
    return Companion_instance_92;
  }
  function $invokeCOROUTINE$30(_this__u8e3s4, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.ko3_1 = _this__u8e3s4;
  }
  protoOf($invokeCOROUTINE$30).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.lo3_1 = plus(listOf_0(this.ko3_1.to3_1.so3_1), this.ko3_1.to3_1.mo3_1);
            this.hd_1 = 1;
            suspendResult = this.ko3_1.uo3_1.j7e().ih4(1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            var availableLocales = filterNotNull(ARGUMENT);
            var tmp$ret$0;
            l$ret$1: do {
              var tmp0_iterator = this.lo3_1.w();
              while (tmp0_iterator.f()) {
                var element = tmp0_iterator.e();
                if (availableLocales.a1(element)) {
                  tmp$ret$0 = element;
                  break l$ret$1;
                }
              }
              tmp$ret$0 = null;
            }
             while (false);
            var tmp0_elvis_lhs = tmp$ret$0;
            return tmp0_elvis_lhs == null ? 'en' : tmp0_elvis_lhs;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function GetLocaleForSiteTermsUseCase(supportedLangConfig, repo) {
    this.to3_1 = supportedLangConfig;
    this.uo3_1 = repo;
  }
  protoOf(GetLocaleForSiteTermsUseCase).vo3 = function ($completion) {
    var tmp = new $invokeCOROUTINE$30(this, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function OnClickSendSmsUseCase() {
  }
  function GetOfflineStorageAvailableSpace() {
  }
  function Companion_45() {
    this.xo3_1 = 'offlineStoragePath';
  }
  var Companion_instance_93;
  function Companion_getInstance_62() {
    return Companion_instance_93;
  }
  function GetOfflineStorageOptionsUseCase() {
  }
  function GetOfflineStorageSettingUseCase(getOfflineStorageOptionsUseCase, settings) {
    this.yo3_1 = getOfflineStorageOptionsUseCase;
    this.zo3_1 = settings;
  }
  protoOf(GetOfflineStorageSettingUseCase).lnz = function () {
    var setting = this.zo3_1.tl1('offlineStoragePath');
    var options = this.yo3_1.lnz();
    // Inline function 'kotlin.takeIf' call
    // Inline function 'kotlin.contracts.contract' call
    var tmp;
    // Inline function 'com.ustadmobile.core.domain.storage.GetOfflineStorageSettingUseCase.invoke.<anonymous>' call
    if (!(setting == null)) {
      tmp = options;
    } else {
      tmp = null;
    }
    var tmp0_safe_receiver = tmp;
    var tmp_0;
    if (tmp0_safe_receiver == null) {
      tmp_0 = null;
    } else {
      var tmp$ret$3;
      $l$block: {
        // Inline function 'kotlin.collections.firstOrNull' call
        var tmp0_iterator = tmp0_safe_receiver.w();
        while (tmp0_iterator.f()) {
          var element = tmp0_iterator.e();
          // Inline function 'com.ustadmobile.core.domain.storage.GetOfflineStorageSettingUseCase.invoke.<anonymous>' call
          if (element.bo4_1 === setting) {
            tmp$ret$3 = element;
            break $l$block;
          }
        }
        tmp$ret$3 = null;
      }
      tmp_0 = tmp$ret$3;
    }
    var tmp1_elvis_lhs = tmp_0;
    return tmp1_elvis_lhs == null ? first_0(options) : tmp1_elvis_lhs;
  };
  function OfflineStorageOption() {
  }
  protoOf(OfflineStorageOption).hashCode = function () {
    var result = this.ao4_1.hashCode();
    result = imul(result, 31) + getStringHashCode(this.bo4_1) | 0;
    return result;
  };
  protoOf(OfflineStorageOption).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof OfflineStorageOption))
      return false;
    var tmp0_other_with_cast = other instanceof OfflineStorageOption ? other : THROW_CCE();
    if (!this.ao4_1.equals(tmp0_other_with_cast.ao4_1))
      return false;
    if (!(this.bo4_1 === tmp0_other_with_cast.bo4_1))
      return false;
    return true;
  };
  function SetOfflineStorageSettingUseCase(settings) {
    this.co4_1 = settings;
  }
  function DeleteUrisUseCase() {
  }
  function IsTempFileCheckerUseCase() {
  }
  function ChunkIterator(chunkInfo) {
    this.do4_1 = chunkInfo;
    this.eo4_1 = 0;
  }
  protoOf(ChunkIterator).f = function () {
    return this.eo4_1 < this.do4_1.jo4_1;
  };
  protoOf(ChunkIterator).e = function () {
    // Inline function 'kotlin.also' call
    var this_0 = this.do4_1.v(this.eo4_1);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.domain.upload.ChunkIterator.next.<anonymous>' call
    this.eo4_1 = this.eo4_1 + 1 | 0;
    return this_0;
  };
  function Chunk(start, end, isLastChunk, size) {
    size = size === VOID ? end.mc(start).mb() : size;
    this.ko4_1 = start;
    this.lo4_1 = end;
    this.mo4_1 = isLastChunk;
    this.no4_1 = size;
  }
  protoOf(Chunk).toString = function () {
    return 'Chunk(start=' + this.ko4_1.toString() + ', end=' + this.lo4_1.toString() + ', isLastChunk=' + this.mo4_1 + ', size=' + this.no4_1 + ')';
  };
  protoOf(Chunk).hashCode = function () {
    var result = this.ko4_1.hashCode();
    result = imul(result, 31) + this.lo4_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.mo4_1) | 0;
    result = imul(result, 31) + this.no4_1 | 0;
    return result;
  };
  protoOf(Chunk).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof Chunk))
      return false;
    var tmp0_other_with_cast = other instanceof Chunk ? other : THROW_CCE();
    if (!this.ko4_1.equals(tmp0_other_with_cast.ko4_1))
      return false;
    if (!this.lo4_1.equals(tmp0_other_with_cast.lo4_1))
      return false;
    if (!(this.mo4_1 === tmp0_other_with_cast.mo4_1))
      return false;
    if (!(this.no4_1 === tmp0_other_with_cast.no4_1))
      return false;
    return true;
  };
  function ChunkInfo(totalSize, chunkSize, fromByte) {
    fromByte = fromByte === VOID ? new Long(0, 0) : fromByte;
    this.fo4_1 = totalSize;
    this.go4_1 = chunkSize;
    this.ho4_1 = fromByte;
    this.io4_1 = this.fo4_1.mc(this.ho4_1);
    var tmp = this;
    // Inline function 'kotlin.comparisons.maxOf' call
    // Inline function 'kotlin.let' call
    // Inline function 'kotlin.Long.div' call
    var this_0 = this.io4_1;
    var other = this.go4_1;
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.domain.upload.ChunkInfo.numChunks.<anonymous>' call
    var it = this_0.bb(toLong(other));
    var tmp_0;
    // Inline function 'kotlin.mod' call
    var this_1 = this.io4_1;
    var other_0 = this.go4_1;
    // Inline function 'kotlin.mod' call
    var other_1 = toLong(other_0);
    var r = this_1.nc(other_1);
    if (!(r.lc(other_1.uc(r.wc(other_1).uc(r.vc(r.b7())).sc(63))).mb() === 0)) {
      // Inline function 'kotlin.Long.plus' call
      tmp_0 = it.lc(toLong(1));
    } else {
      tmp_0 = it;
    }
    var a = tmp_0.mb();
    tmp.jo4_1 = Math.max(a, 1);
  }
  protoOf(ChunkInfo).w = function () {
    return new ChunkIterator(this);
  };
  protoOf(ChunkInfo).v = function (index) {
    var start = numberToLong(index).cb(toLong(this.go4_1)).lc(this.ho4_1);
    // Inline function 'kotlin.math.min' call
    // Inline function 'kotlin.Long.plus' call
    var other = this.go4_1;
    var a = start.lc(toLong(other));
    var b = this.fo4_1;
    var end = a.c7(b) <= 0 ? a : b;
    var isLastChunk = index === (this.jo4_1 - 1 | 0);
    return new Chunk(start, end, isLastChunk);
  };
  function UploadProgress(bytesTransferred, totalBytes) {
    this.oo4_1 = bytesTransferred;
    this.po4_1 = totalBytes;
  }
  protoOf(UploadProgress).toString = function () {
    return 'UploadProgress(bytesTransferred=' + this.oo4_1.toString() + ', totalBytes=' + this.po4_1.toString() + ')';
  };
  protoOf(UploadProgress).hashCode = function () {
    var result = this.oo4_1.hashCode();
    result = imul(result, 31) + this.po4_1.hashCode() | 0;
    return result;
  };
  protoOf(UploadProgress).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof UploadProgress))
      return false;
    var tmp0_other_with_cast = other instanceof UploadProgress ? other : THROW_CCE();
    if (!this.oo4_1.equals(tmp0_other_with_cast.oo4_1))
      return false;
    if (!this.po4_1.equals(tmp0_other_with_cast.po4_1))
      return false;
    return true;
  };
  function LastChunkResponse(body, statusCode, headers) {
    this.qo4_1 = body;
    this.ro4_1 = statusCode;
    this.so4_1 = headers;
  }
  protoOf(LastChunkResponse).toString = function () {
    return 'LastChunkResponse(body=' + this.qo4_1 + ', statusCode=' + this.ro4_1 + ', headers=' + this.so4_1 + ')';
  };
  protoOf(LastChunkResponse).hashCode = function () {
    var result = this.qo4_1 == null ? 0 : getStringHashCode(this.qo4_1);
    result = imul(result, 31) + this.ro4_1 | 0;
    result = imul(result, 31) + hashCode(this.so4_1) | 0;
    return result;
  };
  protoOf(LastChunkResponse).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof LastChunkResponse))
      return false;
    var tmp0_other_with_cast = other instanceof LastChunkResponse ? other : THROW_CCE();
    if (!(this.qo4_1 == tmp0_other_with_cast.qo4_1))
      return false;
    if (!(this.ro4_1 === tmp0_other_with_cast.ro4_1))
      return false;
    if (!equals(this.so4_1, tmp0_other_with_cast.so4_1))
      return false;
    return true;
  };
  function ChunkedUploadClientLocalUriUseCase$invoke$lambda(it) {
    return Unit_instance;
  }
  function ChunkedUploadClientLocalUriUseCase$invoke$lambda_0(it) {
    return Unit_instance;
  }
  function ChunkedUploadClientLocalUriUseCase() {
  }
  function Companion_46() {
    this.vo4_1 = 524288;
  }
  var Companion_instance_94;
  function Companion_getInstance_63() {
    return Companion_instance_94;
  }
  function get_HEADER_UPLOAD_UUID() {
    return HEADER_UPLOAD_UUID;
  }
  var HEADER_UPLOAD_UUID;
  function get_HEADER_IS_FINAL_CHUNK() {
    return HEADER_IS_FINAL_CHUNK;
  }
  var HEADER_IS_FINAL_CHUNK;
  function get_HEADER_UPLOAD_START_BYTE() {
    return HEADER_UPLOAD_START_BYTE;
  }
  var HEADER_UPLOAD_START_BYTE;
  function get_DEFAULT_CHUNK_SIZE() {
    return DEFAULT_CHUNK_SIZE;
  }
  var DEFAULT_CHUNK_SIZE;
  function StartUserSessionUseCase(accountManager) {
    this.wo4_1 = accountManager;
  }
  protoOf(StartUserSessionUseCase).xo4 = function (session, nextDest, navController, goOptions, dontSetCurrentSession) {
    // Inline function 'kotlin.takeIf' call
    var this_0 = this.wo4_1;
    // Inline function 'kotlin.contracts.contract' call
    var tmp;
    // Inline function 'com.ustadmobile.core.domain.usersession.StartUserSessionUseCase.invoke.<anonymous>' call
    if (!dontSetCurrentSession) {
      tmp = this_0;
    } else {
      tmp = null;
    }
    var tmp0_safe_receiver = tmp;
    if (tmp0_safe_receiver != null) {
      tmp0_safe_receiver.jmn(session);
    }
    navigateToViewUri(navController, appendSelectedAccount(nextDest, session.kmk_1.f95_1, session.lmk_1), goOptions);
  };
  protoOf(StartUserSessionUseCase).yo4 = function (session, nextDest, navController, goOptions, dontSetCurrentSession, $super) {
    var tmp;
    if (nextDest === VOID) {
      Companion_getInstance_122();
      tmp = 'CourseListHome';
    } else {
      tmp = nextDest;
    }
    nextDest = tmp;
    goOptions = goOptions === VOID ? new UstadGoOptions(VOID, VOID, true) : goOptions;
    dontSetCurrentSession = dontSetCurrentSession === VOID ? false : dontSetCurrentSession;
    var tmp_0;
    if ($super === VOID) {
      this.xo4(session, nextDest, navController, goOptions, dontSetCurrentSession);
      tmp_0 = Unit_instance;
    } else {
      tmp_0 = $super.xo4.call(this, session, nextDest, navController, goOptions, dontSetCurrentSession);
    }
    return tmp_0;
  };
  function ValidateEmailUseCase() {
  }
  protoOf(ValidateEmailUseCase).vnv = function (email) {
    // Inline function 'kotlin.text.trim' call
    var trimmed = toString(trim(isCharSequence(email) ? email : THROW_CCE()));
    var atPos = indexOf(trimmed, _Char___init__impl__6a9atx(64));
    if (atPos === -1)
      return null;
    if (indexOf(trimmed, _Char___init__impl__6a9atx(46), atPos) === -1)
      return null;
    var tmp$ret$2;
    $l$block: {
      // Inline function 'kotlin.text.any' call
      var inductionVariable = 0;
      while (inductionVariable < charSequenceLength(trimmed)) {
        var element = charSequenceGet(trimmed, inductionVariable);
        inductionVariable = inductionVariable + 1 | 0;
        // Inline function 'com.ustadmobile.core.domain.validateemail.ValidateEmailUseCase.invoke.<anonymous>' call
        if (((isWhitespace(element) ? true : element === _Char___init__impl__6a9atx(91)) ? true : element === _Char___init__impl__6a9atx(93)) ? true : element === _Char___init__impl__6a9atx(92)) {
          tmp$ret$2 = true;
          break $l$block;
        }
      }
      tmp$ret$2 = false;
    }
    if (tmp$ret$2)
      return null;
    return trimmed;
  };
  function isAnonymous(_this__u8e3s4) {
    return ((_this__u8e3s4.yid_1 == null ? _this__u8e3s4.wid_1 == null : false) ? _this__u8e3s4.zid_1 == null : false) ? _this__u8e3s4.xid_1 == null : false;
  }
  function _get_isIdOnly__t0wrie(_this__u8e3s4, $this) {
    var tmp;
    var tmp_0;
    if (_this__u8e3s4.wi1_1 == null ? _this__u8e3s4.xi1_1 == null : false) {
      var tmp_1 = _this__u8e3s4.yi1_1;
      tmp_0 = tmp_1 === 0;
    } else {
      tmp_0 = false;
    }
    if (tmp_0) {
      tmp = _this__u8e3s4.zi1_1 == null;
    } else {
      tmp = false;
    }
    return tmp;
  }
  function StoreActivitiesUseCase$invoke$slambda($activityEntities, $timeNow, this$0, resultContinuation) {
    this.ho5_1 = $activityEntities;
    this.io5_1 = $timeNow;
    this.jo5_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(StoreActivitiesUseCase$invoke$slambda).po6 = function (it, $completion) {
    var tmp = this.gmp(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(StoreActivitiesUseCase$invoke$slambda).he = function (p1, $completion) {
    return this.po6(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(StoreActivitiesUseCase$invoke$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 18;
            var tmp_0 = this;
            var this_0 = this.ho5_1;
            var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var item = tmp0_iterator.e();
              destination.i1(item.qo6_1.pjv(VOID, VOID, VOID, VOID, VOID, VOID, this.io5_1));
            }

            tmp_0.lo5_1 = destination;
            this.hd_1 = 1;
            suspendResult = this.jo5_1.wo6_1.u7d().pi1(this.lo5_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp_1 = this;
            var this_1 = this.lo5_1;
            var destination_0 = ArrayList_init_$Create$();
            var tmp0_iterator_0 = this_1.w();
            while (tmp0_iterator_0.f()) {
              var element = tmp0_iterator_0.e();
              if (!_get_isIdOnly__t0wrie(element, this.jo5_1)) {
                destination_0.i1(element);
              }
            }

            tmp_1.mo5_1 = destination_0;
            this.no5_1 = this.mo5_1.w();
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (!this.no5_1.f()) {
              this.hd_1 = 5;
              continue $sm;
            }

            this.oo5_1 = this.no5_1.e();
            var tmp_2 = this;
            tmp_2.po5_1 = this.oo5_1;
            this.hd_1 = 3;
            suspendResult = this.jo5_1.wo6_1.u7d().qi1(this.po5_1.ui1_1, this.po5_1.xi1_1, this.io5_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.hd_1 = 4;
            suspendResult = this.jo5_1.wo6_1.u7d().ri1(this.po5_1.ui1_1, this.po5_1.wi1_1, this.po5_1.xi1_1, this.po5_1.yi1_1, this.po5_1.zi1_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.hd_1 = 2;
            continue $sm;
          case 5:
            var tmp_3 = this;
            var this_2 = this.ho5_1;
            var destination_1 = ArrayList_init_$Create$();
            var tmp0_iterator_1 = this_2.w();
            while (tmp0_iterator_1.f()) {
              var element_0 = tmp0_iterator_1.e();
              var list = element_0.ro6_1;
              addAll(destination_1, list);
            }

            tmp_3.qo5_1 = destination_1;
            var tmp_4 = this;
            var this_3 = this.ho5_1;
            var destination_2 = ArrayList_init_$Create$();
            var tmp0_iterator_2 = this_3.w();
            while (tmp0_iterator_2.f()) {
              var element_1 = tmp0_iterator_2.e();
              var list_0 = element_1.so6_1;
              addAll(destination_2, list_0);
            }

            tmp_4.ro5_1 = destination_2;
            this.hd_1 = 6;
            var tmp_5 = this.jo5_1.vo6_1.j7f();
            var this_4 = this.ro5_1;
            var destination_3 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_4, 10));
            var tmp0_iterator_3 = this_4.w();
            while (tmp0_iterator_3.f()) {
              var item_0 = tmp0_iterator_3.e();
              destination_3.i1(item_0.ei7_1);
            }

            suspendResult = tmp_5.bi7(toList(distinct(destination_3)), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            this.so5_1 = suspendResult;
            this.to5_1 = toSet(this.so5_1);
            this.hd_1 = 7;
            var tmp_6 = this.jo5_1.wo6_1.j7f();
            var this_5 = this.ro5_1;
            var destination_4 = ArrayList_init_$Create$();
            var tmp0_iterator_4 = this_5.w();
            while (tmp0_iterator_4.f()) {
              var element_2 = tmp0_iterator_4.e();
              if (!this.to5_1.a1(element_2.ei7_1)) {
                destination_4.i1(element_2);
              }
            }

            suspendResult = tmp_6.ai7(destination_4, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            var tmp_7 = this;
            var this_6 = this.qo5_1;
            var first = ArrayList_init_$Create$();
            var second = ArrayList_init_$Create$();
            var tmp0_iterator_5 = this_6.w();
            while (tmp0_iterator_5.f()) {
              var element_3 = tmp0_iterator_5.e();
              if (element_3.ii9_1.equals(new Long(0, 0))) {
                first.i1(element_3);
              } else {
                second.i1(element_3);
              }
            }

            tmp_7.uo5_1 = new Pair(first, second);
            this.vo5_1 = this.uo5_1.y6();
            this.wo5_1 = this.uo5_1.z6();
            this.hd_1 = 8;
            suspendResult = this.jo5_1.wo6_1.i7f().zi8(this.vo5_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 8:
            var tmp_8 = this;
            tmp_8.xo5_1 = this.wo5_1;
            this.yo5_1 = this.xo5_1.w();
            this.hd_1 = 9;
            continue $sm;
          case 9:
            if (!this.yo5_1.f()) {
              this.hd_1 = 11;
              continue $sm;
            }

            this.zo5_1 = this.yo5_1.e();
            var tmp_9 = this;
            tmp_9.ao6_1 = this.zo5_1;
            this.bo6_1 = this.jo5_1.wo6_1.i7f();
            this.co6_1 = this.ao6_1.ei9_1;
            this.do6_1 = this.ao6_1.ii9_1;
            this.eo6_1 = this.ao6_1.hi9_1;
            this.fo6_1 = this.ao6_1.gi9_1;
            this.go6_1 = this.ao6_1.fi9_1;
            this.hd_1 = 10;
            suspendResult = this.bo6_1.ai9(this.co6_1, this.go6_1, this.fo6_1, this.eo6_1, this.do6_1, this.io5_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 10:
            this.hd_1 = 9;
            continue $sm;
          case 11:
            var tmp_10 = this;
            tmp_10.ho6_1 = this.qo5_1;
            this.io6_1 = this.ho6_1.w();
            this.hd_1 = 12;
            continue $sm;
          case 12:
            if (!this.io6_1.f()) {
              this.hd_1 = 14;
              continue $sm;
            }

            this.jo6_1 = this.io6_1.e();
            var tmp_11 = this;
            tmp_11.ko6_1 = this.jo6_1;
            this.hd_1 = 13;
            suspendResult = this.jo5_1.wo6_1.i7f().bi9(this.ko6_1.ei9_1, this.ko6_1.fi9_1, this.ko6_1.hi9_1, this.io5_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 13:
            this.hd_1 = 12;
            continue $sm;
          case 14:
            this.hd_1 = 15;
            var tmp_12 = this.jo5_1.wo6_1.k7f();
            var this_7 = this.ho5_1;
            var destination_5 = ArrayList_init_$Create$();
            var tmp0_iterator_6 = this_7.w();
            while (tmp0_iterator_6.f()) {
              var element_4 = tmp0_iterator_6.e();
              var list_1 = element_4.to6_1;
              addAll(destination_5, list_1);
            }

            suspendResult = tmp_12.wi5(destination_5, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 15:
            var tmp_13 = this;
            var this_8 = this.ho5_1;
            var destination_6 = ArrayList_init_$Create$();
            var tmp0_iterator_7 = this_8.w();
            while (tmp0_iterator_7.f()) {
              var element_5 = tmp0_iterator_7.e();
              var tmp0_safe_receiver = element_5.uo6_1;
              if (tmp0_safe_receiver == null)
                null;
              else {
                destination_6.i1(tmp0_safe_receiver);
              }
            }

            var tmp_14;
            if (!destination_6.c1()) {
              tmp_14 = destination_6;
            } else {
              tmp_14 = null;
            }

            tmp_13.lo6_1 = tmp_14;
            if (this.lo6_1 == null) {
              this.mo6_1 = null;
              this.hd_1 = 17;
              continue $sm;
            } else {
              var tmp_15 = this;
              tmp_15.no6_1 = this.lo6_1;
              var tmp_16 = this;
              tmp_16.oo6_1 = this.no6_1;
              this.hd_1 = 16;
              suspendResult = this.jo5_1.wo6_1.l7f().gin(this.oo6_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 16:
            this.mo6_1 = this.no6_1;
            this.hd_1 = 17;
            continue $sm;
          case 17:
            return this.mo6_1;
          case 18:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 18) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(StoreActivitiesUseCase$invoke$slambda).gmp = function (it, completion) {
    var i = new StoreActivitiesUseCase$invoke$slambda(this.ho5_1, this.io5_1, this.jo5_1, completion);
    i.ko5_1 = it;
    return i;
  };
  function StoreActivitiesUseCase$invoke$slambda_0($activityEntities, $timeNow, this$0, resultContinuation) {
    var i = new StoreActivitiesUseCase$invoke$slambda($activityEntities, $timeNow, this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.po6(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$34(_this__u8e3s4, activityEntities, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.fo7_1 = _this__u8e3s4;
    this.go7_1 = activityEntities;
  }
  protoOf($invokeCOROUTINE$34).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.ho7_1 = systemTimeInMillis();
            this.hd_1 = 1;
            suspendResult = withDoorTransactionAsync(this.fo7_1.wo6_1, VOID, StoreActivitiesUseCase$invoke$slambda_0(this.go7_1, this.ho7_1, this.fo7_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function StoreActivitiesUseCase(db, repo) {
    this.vo6_1 = db;
    var tmp = this;
    tmp.wo6_1 = repo == null ? this.vo6_1 : repo;
  }
  protoOf(StoreActivitiesUseCase).io7 = function (activityEntities, $completion) {
    var tmp = new $invokeCOROUTINE$34(this, activityEntities, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function XapiException(responseCode, message, cause) {
    cause = cause === VOID ? null : cause;
    Exception_init_$Init$_1(message, cause, this);
    captureStack(this, XapiException);
    this.jo7_1 = responseCode;
  }
  function XapiJson$_init_$lambda_lhwgtd($this$Json) {
    $this$Json.q4p_1 = false;
    $this$Json.s4p_1 = true;
    return Unit_instance;
  }
  function XapiJson(json) {
    var tmp;
    if (json === VOID) {
      tmp = Json_0(VOID, XapiJson$_init_$lambda_lhwgtd);
    } else {
      tmp = json;
    }
    json = tmp;
    this.ko7_1 = json;
  }
  protoOf(XapiJson).toString = function () {
    return 'XapiJson(json=' + this.ko7_1 + ')';
  };
  protoOf(XapiJson).hashCode = function () {
    return hashCode(this.ko7_1);
  };
  protoOf(XapiJson).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiJson))
      return false;
    var tmp0_other_with_cast = other instanceof XapiJson ? other : THROW_CCE();
    if (!equals(this.ko7_1, tmp0_other_with_cast.ko7_1))
      return false;
    return true;
  };
  function xapiRequireValidUuidOrNullAsString(uuid, errorMessage) {
    errorMessage = errorMessage === VOID ? 'Invalid uuid' : errorMessage;
    try {
      if (!(uuid == null)) {
        uuidFrom(uuid);
      }
      return uuid;
    } catch ($p) {
      if ($p instanceof Error) {
        var e = $p;
        throw new XapiException(400, errorMessage + ': ' + e.message, e);
      } else {
        throw $p;
      }
    }
  }
  function xapiRequireValidUuidOrNull(uuid, errorMessage) {
    errorMessage = errorMessage === VOID ? 'Invalid uuid' : errorMessage;
    try {
      var tmp;
      if (uuid == null) {
        tmp = null;
      } else {
        // Inline function 'kotlin.let' call
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'com.ustadmobile.core.domain.xapi.xapiRequireValidUuidOrNull.<anonymous>' call
        tmp = uuidFrom(uuid);
      }
      return tmp;
    } catch ($p) {
      if ($p instanceof Error) {
        var e = $p;
        throw new XapiException(400, errorMessage + ': ' + e.message, e);
      } else {
        throw $p;
      }
    }
  }
  function xapiRequireValidIRI(iri, errorMessage) {
    errorMessage = errorMessage === VOID ? 'Invalid iri' : errorMessage;
    if (iri == null)
      throw new XapiException(400, errorMessage + ': iri is null');
    xapiRequireValidIRIOrNull(iri);
    return iri;
  }
  function xapiRequireDurationOrNullAsLong(duration) {
    var tmp;
    if (duration == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.xapi.xapiRequireDurationOrNullAsLong.<anonymous>' call
      var tmp_0;
      try {
        tmp_0 = _Duration___get_inWholeMilliseconds__impl__msfiry(Companion_getInstance_8().jm(duration));
      } catch ($p) {
        var tmp_1;
        if ($p instanceof Error) {
          var e = $p;
          throw new XapiException(400, 'Invalid duration: ' + e.message, e);
        } else {
          throw $p;
        }
      }
      tmp = tmp_0;
    }
    return tmp;
  }
  function xapiRequireTimestampAsLong(timestampStr) {
    try {
      return Companion_getInstance_6().b2r(timestampStr).yla();
    } catch ($p) {
      if ($p instanceof Error) {
        var e = $p;
        throw new XapiException(400, 'Invalid timestamp: ' + e.message, e);
      } else {
        throw $p;
      }
    }
  }
  function xapiRequireValidIRIOrNull(iri, errorMessage) {
    errorMessage = errorMessage === VOID ? 'Invalid IRI:' : errorMessage;
    if (!(iri == null)) {
      try {
        Companion_getInstance_3().b2r(iri);
      } catch ($p) {
        if ($p instanceof Error) {
          var e = $p;
          throw new XapiException(400, errorMessage + ': ' + e.message, e);
        } else {
          throw $p;
        }
      }
    }
    return iri;
  }
  function StatementStoreResult(statementUuids) {
    this.lo7_1 = statementUuids;
  }
  protoOf(StatementStoreResult).toString = function () {
    return 'StatementStoreResult(statementUuids=' + this.lo7_1 + ')';
  };
  protoOf(StatementStoreResult).hashCode = function () {
    return hashCode(this.lo7_1);
  };
  protoOf(StatementStoreResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof StatementStoreResult))
      return false;
    var tmp0_other_with_cast = other instanceof StatementStoreResult ? other : THROW_CCE();
    if (!equals(this.lo7_1, tmp0_other_with_cast.lo7_1))
      return false;
    return true;
  };
  function storeStatements($this, statements, xapiSession, $completion) {
    var tmp = new $storeStatementsCOROUTINE$35($this, statements, xapiSession, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function XapiStatementResource$storeStatements$slambda($statementEntities, this$0, $xapiSession, resultContinuation) {
    this.io8_1 = $statementEntities;
    this.jo8_1 = this$0;
    this.ko8_1 = $xapiSession;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(XapiStatementResource$storeStatements$slambda).fmp = function (it, $completion) {
    var tmp = this.gmp(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(XapiStatementResource$storeStatements$slambda).he = function (p1, $completion) {
    return this.fmp(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(XapiStatementResource$storeStatements$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 18;
            var tmp$ret$0;
            l$ret$1: do {
              var this_0 = this.io8_1;
              var tmp_0;
              if (isInterface(this_0, Collection)) {
                tmp_0 = this_0.c1();
              } else {
                tmp_0 = false;
              }
              if (tmp_0) {
                tmp$ret$0 = false;
                break l$ret$1;
              }
              var tmp0_iterator = this_0.w();
              while (tmp0_iterator.f()) {
                var element = tmp0_iterator.e();
                var tmp0_safe_receiver = element.fo9_1;
                var tmp_1;
                if (tmp0_safe_receiver == null) {
                  tmp_1 = null;
                } else {
                  tmp_1 = tmp0_safe_receiver.sip_1 ? tmp0_safe_receiver.aip_1 === true : false;
                }
                if (tmp_1 === true) {
                  tmp$ret$0 = true;
                  break l$ret$1;
                }
              }
              tmp$ret$0 = false;
            }
             while (false);
            if (tmp$ret$0) {
              this.mo8_1 = this.jo8_1.mn7_1.m7f();
              this.no8_1 = this.ko8_1.cix_1;
              this.oo8_1 = systemTimeInMillis();
              this.hd_1 = 1;
              suspendResult = this.mo8_1.uiw(true, this.oo8_1, this.no8_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.hd_1 = 3;
            var tmp_2 = this.jo8_1.mn7_1.w7d();
            var this_1 = this.io8_1;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator_0 = this_1.w();
            while (tmp0_iterator_0.f()) {
              var element_0 = tmp0_iterator_0.e();
              var tmp0_safe_receiver_0 = element_0.fo9_1;
              if (tmp0_safe_receiver_0 == null)
                null;
              else {
                destination.i1(tmp0_safe_receiver_0);
              }
            }

            suspendResult = tmp_2.lio(destination, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.hd_1 = 4;
            var tmp_3 = this.jo8_1.mn7_1.n7f();
            var this_2 = this.io8_1;
            var destination_0 = ArrayList_init_$Create$();
            var tmp0_iterator_1 = this_2.w();
            while (tmp0_iterator_1.f()) {
              var element_1 = tmp0_iterator_1.e();
              var tmp0_safe_receiver_1 = element_1.go9_1;
              if (tmp0_safe_receiver_1 == null)
                null;
              else {
                destination_0.i1(tmp0_safe_receiver_1);
              }
            }

            suspendResult = tmp_3.nit(destination_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            var tmp_4 = this;
            var this_3 = this.io8_1;
            var destination_1 = ArrayList_init_$Create$();
            var tmp0_iterator_2 = this_3.w();
            while (tmp0_iterator_2.f()) {
              var element_2 = tmp0_iterator_2.e();
              var tmp0_elvis_lhs = element_2.ho9_1;
              var list = tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs;
              addAll(destination_1, list);
            }

            tmp_4.po8_1 = destination_1;
            var tmp_5 = this;
            var this_4 = this.po8_1;
            var destination_2 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_4, 10));
            var tmp0_iterator_3 = this_4.w();
            while (tmp0_iterator_3.f()) {
              var item = tmp0_iterator_3.e();
              destination_2.i1(item.ko9_1);
            }

            var destination_3 = ArrayList_init_$Create$();
            var tmp0_iterator_4 = destination_2.w();
            while (tmp0_iterator_4.f()) {
              var element_3 = tmp0_iterator_4.e();
              var tmp_6 = element_3.die_1;
              if (tmp_6 === 1) {
                destination_3.i1(element_3);
              }
            }

            var tmp_7;
            if (!destination_3.c1()) {
              tmp_7 = destination_3;
            } else {
              tmp_7 = null;
            }

            tmp_5.qo8_1 = tmp_7;
            if (this.qo8_1 == null) {
              this.ro8_1 = null;
              this.hd_1 = 6;
              continue $sm;
            } else {
              var tmp_8 = this;
              tmp_8.so8_1 = this.qo8_1;
              var tmp_9 = this;
              tmp_9.to8_1 = this.so8_1;
              this.hd_1 = 5;
              suspendResult = insertOrUpdateActorsIfNameChanged(this.jo8_1.mn7_1.x7d(), this.to8_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 5:
            this.ro8_1 = this.so8_1;
            this.hd_1 = 6;
            continue $sm;
          case 6:
            var tmp_10 = this;
            var this_5 = this.po8_1;
            var destination_4 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_5, 10));
            var tmp0_iterator_5 = this_5.w();
            while (tmp0_iterator_5.f()) {
              var item_0 = tmp0_iterator_5.e();
              destination_4.i1(item_0.ko9_1);
            }

            var destination_5 = ArrayList_init_$Create$();
            var tmp0_iterator_6 = destination_4.w();
            while (tmp0_iterator_6.f()) {
              var element_4 = tmp0_iterator_6.e();
              var tmp_11 = element_4.die_1;
              if (tmp_11 === 2) {
                destination_5.i1(element_4);
              }
            }

            tmp_10.uo8_1 = destination_5;
            this.hd_1 = 7;
            var tmp_12 = this.jo8_1.hn7_1.x7d();
            var this_6 = this.uo8_1;
            var destination_6 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_6, 10));
            var tmp0_iterator_7 = this_6.w();
            while (tmp0_iterator_7.f()) {
              var item_1 = tmp0_iterator_7.e();
              destination_6.i1(item_1.tid_1);
            }

            suspendResult = tmp_12.zic(destination_6, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            this.vo8_1 = suspendResult;
            var tmp_13 = this;
            var this_7 = this.po8_1;
            var destination_7 = ArrayList_init_$Create$();
            var tmp0_iterator_8 = this_7.w();
            while (tmp0_iterator_8.f()) {
              var element_5 = tmp0_iterator_8.e();
              var list_0 = element_5.lo9_1;
              addAll(destination_7, list_0);
            }

            var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(destination_7, 10)), 16);
            var destination_8 = LinkedHashMap_init_$Create$_0(capacity);
            var tmp0_iterator_9 = destination_7.w();
            while (tmp0_iterator_9.f()) {
              var element_6 = tmp0_iterator_9.e();
              destination_8.s(element_6.tid_1, element_6);
            }

            tmp_13.wo8_1 = destination_8;
            var tmp_14 = this;
            tmp_14.xo8_1 = this.uo8_1;
            this.yo8_1 = this.xo8_1.w();
            this.hd_1 = 8;
            continue $sm;
          case 8:
            if (!this.yo8_1.f()) {
              this.hd_1 = 14;
              continue $sm;
            }

            this.zo8_1 = this.yo8_1.e();
            var tmp_15 = this;
            tmp_15.ao9_1 = this.zo8_1;
            var tmp_16 = this;
            var tmp$ret$2;
            l$ret$3: do {
              var tmp0_iterator_10 = this.vo8_1.w();
              while (tmp0_iterator_10.f()) {
                var element_7 = tmp0_iterator_10.e();
                if (element_7.vie_1.equals(this.ao9_1.tid_1)) {
                  tmp$ret$2 = element_7;
                  break l$ret$3;
                }
              }
              tmp$ret$2 = null;
            }
             while (false);
            tmp_16.bo9_1 = tmp$ret$2;
            var tmp_17 = this;
            var tmp_18;
            if (!isAnonymous(this.ao9_1)) {
              var tmp_19 = this.ao9_1.bie_1;
              var tmp0_safe_receiver_2 = this.bo9_1;
              tmp_18 = !tmp_19.equals(tmp0_safe_receiver_2 == null ? null : tmp0_safe_receiver_2.wie_1);
            } else {
              tmp_18 = true;
            }

            tmp_17.co9_1 = tmp_18;
            var tmp_20 = this;
            var this_8 = this.po8_1;
            var destination_9 = ArrayList_init_$Create$();
            var tmp0_iterator_11 = this_8.w();
            while (tmp0_iterator_11.f()) {
              var element_8 = tmp0_iterator_11.e();
              var list_1 = element_8.mo9_1;
              addAll(destination_9, list_1);
            }

            var destination_10 = ArrayList_init_$Create$();
            var tmp0_iterator_12 = destination_9.w();
            while (tmp0_iterator_12.f()) {
              var element_9 = tmp0_iterator_12.e();
              if (element_9.qii_1.equals(this.ao9_1.tid_1)) {
                destination_10.i1(element_9);
              }
            }

            tmp_20.do9_1 = destination_10;
            var tmp_21 = this;
            var this_9 = this.do9_1;
            var destination_11 = ArrayList_init_$Create$();
            var tmp0_iterator_13 = this_9.w();
            while (tmp0_iterator_13.f()) {
              var element_10 = tmp0_iterator_13.e();
              var tmp0_safe_receiver_3 = this.wo8_1.q(element_10.rii_1);
              if (tmp0_safe_receiver_3 == null)
                null;
              else {
                destination_11.i1(tmp0_safe_receiver_3);
              }
            }

            tmp_21.eo9_1 = destination_11;
            this.hd_1 = 9;
            suspendResult = insertOrUpdateActorsIfNameChanged(this.jo8_1.mn7_1.x7d(), this.eo9_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 9:
            if (!this.co9_1 ? !(this.bo9_1 == null) : false) {
              this.hd_1 = 12;
              var tmp_22 = this.jo8_1.mn7_1.h7f();
              var this_10 = this.do9_1;
              var destination_12 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_10, 10));
              var tmp0_iterator_14 = this_10.w();
              while (tmp0_iterator_14.f()) {
                var item_2 = tmp0_iterator_14.e();
                destination_12.i1(item_2.ljw(VOID, VOID, this.bo9_1.xie_1));
              }
              suspendResult = insertOrUpdateIfLastModChanged(tmp_22, destination_12, this.bo9_1.xie_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 10;
              suspendResult = this.jo8_1.mn7_1.x7d().xic(listOf_0(this.ao9_1), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 10:
            this.hd_1 = 11;
            suspendResult = this.jo8_1.mn7_1.h7f().mii(this.do9_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 11:
            this.hd_1 = 13;
            continue $sm;
          case 12:
            this.hd_1 = 13;
            continue $sm;
          case 13:
            this.hd_1 = 8;
            continue $sm;
          case 14:
            this.hd_1 = 15;
            var tmp_23 = this.jo8_1.mn7_1.t7d();
            var this_11 = this.io8_1;
            var destination_13 = ArrayList_init_$Create$();
            var tmp0_iterator_15 = this_11.w();
            while (tmp0_iterator_15.f()) {
              var element_11 = tmp0_iterator_15.e();
              var tmp0_safe_receiver_4 = element_11.io9_1;
              var tmp0_safe_receiver_5 = tmp0_safe_receiver_4 == null ? null : tmp0_safe_receiver_4.no9_1;
              if (tmp0_safe_receiver_5 == null)
                null;
              else {
                destination_13.i1(tmp0_safe_receiver_5);
              }
            }

            suspendResult = tmp_23.piu(destination_13, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 15:
            this.hd_1 = 16;
            var tmp_24 = this.jo8_1.mn7_1.g7f();
            var this_12 = this.io8_1;
            var destination_14 = ArrayList_init_$Create$();
            var tmp0_iterator_16 = this_12.w();
            while (tmp0_iterator_16.f()) {
              var element_12 = tmp0_iterator_16.e();
              var tmp0_safe_receiver_6 = element_12.io9_1;
              var tmp1_elvis_lhs = tmp0_safe_receiver_6 == null ? null : tmp0_safe_receiver_6.oo9_1;
              var list_2 = tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;
              addAll(destination_14, list_2);
            }

            suspendResult = tmp_24.riv(destination_14, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 16:
            this.hd_1 = 17;
            var this_13 = this.io8_1;
            var destination_15 = ArrayList_init_$Create$();
            var tmp0_iterator_17 = this_13.w();
            while (tmp0_iterator_17.f()) {
              var element_13 = tmp0_iterator_17.e();
              var tmp0_elvis_lhs_0 = element_13.jo9_1;
              var list_3 = tmp0_elvis_lhs_0 == null ? emptyList() : tmp0_elvis_lhs_0;
              addAll(destination_15, list_3);
            }

            suspendResult = this.jo8_1.ln7_1.io7(destination_15, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 17:
            return Unit_instance;
          case 18:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 18) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(XapiStatementResource$storeStatements$slambda).gmp = function (it, completion) {
    var i = new XapiStatementResource$storeStatements$slambda(this.io8_1, this.jo8_1, this.ko8_1, completion);
    i.lo8_1 = it;
    return i;
  };
  function XapiStatementResource$storeStatements$slambda_0($statementEntities, this$0, $xapiSession, resultContinuation) {
    var i = new XapiStatementResource$storeStatements$slambda($statementEntities, this$0, $xapiSession, resultContinuation);
    var l = function (it, $completion) {
      return i.fmp(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $storeStatementsCOROUTINE$35(_this__u8e3s4, statements, xapiSession, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.uo7_1 = _this__u8e3s4;
    this.vo7_1 = statements;
    this.wo7_1 = xapiSession;
  }
  protoOf($storeStatementsCOROUTINE$35).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.xo7_1 = identifierHash(agent(this.wo7_1, this.uo7_1.jn7_1), this.uo7_1.in7_1);
            var tmp_0 = this;
            var it = knownActorUidToPersonUidsMap(this.wo7_1, this.uo7_1.nn7_1);
            var tmp_1;
            if (!it.r(this.xo7_1)) {
              tmp_1 = plus_3(it, to(this.xo7_1, this.wo7_1.hix_1));
            } else {
              tmp_1 = it;
            }

            tmp_0.yo7_1 = tmp_1;
            var tmp_2 = this;
            var this_0 = this.vo7_1;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              var timeNowStr = System_instance.sl7().toString();
              var tmp1_elvis_lhs = element.vo9_1;
              var tmp4_timestamp = tmp1_elvis_lhs == null ? timeNowStr : tmp1_elvis_lhs;
              var tmp0_elvis_lhs = xapiRequireValidUuidOrNullAsString(element.po9_1);
              var tmp5_id = tmp0_elvis_lhs == null ? randomUuidAsString() : tmp0_elvis_lhs;
              var tmp2_name = this.wo7_1.jix_1;
              var tmp3_homePage = this.uo7_1.jn7_1.umj_1;
              var tmp6_authority = new XapiAgent(VOID, VOID, VOID, VOID, VOID, new XapiAccount(tmp3_homePage, tmp2_name));
              var exactStatement = element.boa(tmp5_id, VOID, VOID, VOID, VOID, VOID, tmp4_timestamp, timeNowStr, tmp6_authority);
              var tmp7_stringHasher = this.uo7_1.in7_1;
              var tmp8_exactJson = this.uo7_1.nn7_1.e45(Companion_getInstance_78().a4r(), exactStatement);
              var tmp9_primaryKeyManager = get_doorPrimaryKeyManager(this.uo7_1.hn7_1);
              var tmp10_hasherFactory = this.uo7_1.kn7_1;
              var tmp11_json = this.uo7_1.nn7_1;
              var tmp12_endpoint = this.uo7_1.jn7_1;
              var list = toEntities_3(exactStatement, tmp7_stringHasher, tmp9_primaryKeyManager, tmp10_hasherFactory, tmp11_json, this.wo7_1, this.yo7_1, tmp8_exactJson, false, tmp12_endpoint);
              addAll(destination, list);
            }

            tmp_2.zo7_1 = destination;
            this.hd_1 = 1;
            suspendResult = withDoorTransactionAsync(this.uo7_1.mn7_1, VOID, XapiStatementResource$storeStatements$slambda_0(this.zo7_1, this.uo7_1, this.wo7_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var this_1 = this.zo7_1;
            var destination_0 = ArrayList_init_$Create$();
            var tmp0_iterator_0 = this_1.w();
            while (tmp0_iterator_0.f()) {
              var element_0 = tmp0_iterator_0.e();
              var tmp0_safe_receiver = element_0.fo9_1;
              var tmp_3;
              if (tmp0_safe_receiver == null) {
                tmp_3 = null;
              } else {
                tmp_3 = Uuid_init_$Create$(tmp0_safe_receiver.qio_1, tmp0_safe_receiver.rio_1);
              }
              var tmp0_safe_receiver_0 = tmp_3;
              if (tmp0_safe_receiver_0 == null)
                null;
              else {
                destination_0.i1(tmp0_safe_receiver_0);
              }
            }

            return new StatementStoreResult(destination_0);
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function $postCOROUTINE$37(_this__u8e3s4, statements, xapiSession, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.loa_1 = _this__u8e3s4;
    this.moa_1 = statements;
    this.noa_1 = xapiSession;
  }
  protoOf($postCOROUTINE$37).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = storeStatements(this.loa_1, this.moa_1, this.noa_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            return ARGUMENT.lo7_1;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function XapiStatementResource(db, repo, xxHasher, endpoint, xapiJson, hasherFactory, storeActivitiesUseCase) {
    this.hn7_1 = db;
    this.in7_1 = xxHasher;
    this.jn7_1 = endpoint;
    this.kn7_1 = hasherFactory;
    this.ln7_1 = storeActivitiesUseCase;
    var tmp = this;
    tmp.mn7_1 = repo == null ? this.hn7_1 : repo;
    this.nn7_1 = xapiJson.ko7_1;
  }
  protoOf(XapiStatementResource).on7 = function (statements, xapiSession, $completion) {
    var tmp = new $postCOROUTINE$37(this, statements, xapiSession, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function XapiGroupAndPersonUidMap(group, actorUidToPersonUidMap) {
    this.bn9_1 = group;
    this.cn9_1 = actorUidToPersonUidMap;
  }
  protoOf(XapiGroupAndPersonUidMap).toString = function () {
    return 'XapiGroupAndPersonUidMap(group=' + this.bn9_1 + ', actorUidToPersonUidMap=' + this.cn9_1 + ')';
  };
  protoOf(XapiGroupAndPersonUidMap).hashCode = function () {
    var result = this.bn9_1.hashCode();
    result = imul(result, 31) + hashCode(this.cn9_1) | 0;
    return result;
  };
  protoOf(XapiGroupAndPersonUidMap).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiGroupAndPersonUidMap))
      return false;
    var tmp0_other_with_cast = other instanceof XapiGroupAndPersonUidMap ? other : THROW_CCE();
    if (!this.bn9_1.equals(tmp0_other_with_cast.bn9_1))
      return false;
    if (!equals(this.cn9_1, tmp0_other_with_cast.cn9_1))
      return false;
    return true;
  };
  function $invokeCOROUTINE$39(_this__u8e3s4, groupSetUid, groupNum, clazzUid, assignmentUid, accountPersonUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.woa_1 = _this__u8e3s4;
    this.xoa_1 = groupSetUid;
    this.yoa_1 = groupNum;
    this.zoa_1 = clazzUid;
    this.aob_1 = assignmentUid;
    this.bob_1 = accountPersonUid;
  }
  protoOf($invokeCOROUTINE$39).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.woa_1.xn8_1.f7d().sco(this.xoa_1, this.yoa_1, this.zoa_1, this.aob_1, this.bob_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var groupMembers = suspendResult;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = groupMembers.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              var tmp0_safe_receiver = element.zcq_1;
              var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : toXapiAgent(tmp0_safe_receiver, this.woa_1.yn8_1);
              var tmp_0;
              if (tmp1_safe_receiver == null) {
                tmp_0 = null;
              } else {
                var tmp0_safe_receiver_0 = element.ycq_1;
                var tmp1_elvis_lhs = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.pcp_1;
                tmp_0 = new Pair(tmp1_safe_receiver, tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs);
              }
              var tmp0_safe_receiver_1 = tmp_0;
              if (tmp0_safe_receiver_1 == null)
                null;
              else {
                destination.i1(tmp0_safe_receiver_1);
              }
            }

            var membersAndPersonUids = destination;
            var tmp_1 = new XapiAccount(this.woa_1.yn8_1.umj_1, 'cgs-' + this.xoa_1.toString() + '-' + this.yoa_1);
            var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(membersAndPersonUids, 10));
            var tmp0_iterator_0 = membersAndPersonUids.w();
            while (tmp0_iterator_0.f()) {
              var item = tmp0_iterator_0.e();
              destination_0.i1(item.w6_1);
            }

            var tmp_2 = new XapiGroup(VOID, VOID, VOID, VOID, VOID, tmp_1, destination_0);
            var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(membersAndPersonUids, 10)), 16);
            var destination_1 = LinkedHashMap_init_$Create$_0(capacity);
            var tmp0_iterator_1 = membersAndPersonUids.w();
            while (tmp0_iterator_1.f()) {
              var element_0 = tmp0_iterator_1.e();
              var pair = to(identifierHash(element_0.w6_1, this.woa_1.zn8_1), element_0.x6_1);
              destination_1.s(pair.w6_1, pair.x6_1);
            }

            return new XapiGroupAndPersonUidMap(tmp_2, destination_1);
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function CreateXapiGroupForCourseGroupUseCase(repo, endpoint, stringHasher) {
    this.xn8_1 = repo;
    this.yn8_1 = endpoint;
    this.zn8_1 = stringHasher;
  }
  protoOf(CreateXapiGroupForCourseGroupUseCase).an9 = function (groupSetUid, groupNum, clazzUid, assignmentUid, accountPersonUid, $completion) {
    var tmp = new $invokeCOROUTINE$39(this, groupSetUid, groupNum, clazzUid, assignmentUid, accountPersonUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function insertOrUpdateActorsIfNameChanged(_this__u8e3s4, actors, $completion) {
    var tmp = new $insertOrUpdateActorsIfNameChangedCOROUTINE$40(_this__u8e3s4, actors, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function $insertOrUpdateActorsIfNameChangedCOROUTINE$40(_this__u8e3s4, actors, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.kob_1 = _this__u8e3s4;
    this.lob_1 = actors;
  }
  protoOf($insertOrUpdateActorsIfNameChangedCOROUTINE$40).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            suspendResult = this.kob_1.wic(this.lob_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.mob_1 = systemTimeInMillis();
            var tmp_0 = this;
            tmp_0.nob_1 = this.lob_1;
            this.oob_1 = this.nob_1.w();
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (!this.oob_1.f()) {
              this.hd_1 = 4;
              continue $sm;
            }

            this.pob_1 = this.oob_1.e();
            var tmp_1 = this;
            tmp_1.qob_1 = this.pob_1;
            this.hd_1 = 3;
            suspendResult = this.kob_1.yic(this.qob_1.tid_1, this.qob_1.vid_1, this.mob_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.hd_1 = 2;
            continue $sm;
          case 4:
            return Unit_instance;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function insertOrUpdateIfLastModChanged(_this__u8e3s4, memberJoins, lastModTime, $completion) {
    var tmp = new $insertOrUpdateIfLastModChangedCOROUTINE$41(_this__u8e3s4, memberJoins, lastModTime, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function $insertOrUpdateIfLastModChangedCOROUTINE$41(_this__u8e3s4, memberJoins, lastModTime, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.zob_1 = _this__u8e3s4;
    this.aoc_1 = memberJoins;
    this.boc_1 = lastModTime;
  }
  protoOf($insertOrUpdateIfLastModChangedCOROUTINE$41).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            suspendResult = this.zob_1.lii(this.aoc_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp_0 = this;
            tmp_0.coc_1 = this.aoc_1;
            this.doc_1 = this.coc_1.w();
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (!this.doc_1.f()) {
              this.hd_1 = 4;
              continue $sm;
            }

            this.eoc_1 = this.doc_1.e();
            var tmp_1 = this;
            tmp_1.foc_1 = this.eoc_1;
            this.hd_1 = 3;
            suspendResult = this.zob_1.nii(this.foc_1.qii_1, this.foc_1.rii_1, this.boc_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.hd_1 = 2;
            continue $sm;
          case 4:
            return Unit_instance;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function agent(_this__u8e3s4, endpoint) {
    var tmp0_account = new XapiAccount(endpoint.umj_1, _this__u8e3s4.jix_1);
    var tmp1_objectType = XapiObjectType_Agent_getInstance();
    return new XapiAgent(VOID, VOID, VOID, VOID, tmp1_objectType, tmp0_account);
  }
  function knownActorUidToPersonUidsMap(_this__u8e3s4, json) {
    var tmp;
    // Inline function 'kotlin.text.isNotEmpty' call
    var this_0 = _this__u8e3s4.uix_1;
    if (charSequenceLength(this_0) > 0) {
      tmp = json.f45(MapSerializer(serializer_1(Companion_getInstance_2()), serializer_1(Companion_getInstance_2())), _this__u8e3s4.uix_1);
    } else {
      tmp = emptyMap();
    }
    return tmp;
  }
  function authorizationHeader(_this__u8e3s4) {
    return 'Basic ' + encodeBase64(_this__u8e3s4.cix_1.toString() + ':' + _this__u8e3s4.six_1);
  }
  function get_registrationUuid(_this__u8e3s4) {
    return Uuid_init_$Create$(_this__u8e3s4.eix_1, _this__u8e3s4.fix_1);
  }
  function get_resultProgressExtension(_this__u8e3s4) {
    var tmp0_safe_receiver = _this__u8e3s4.to9_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.loc_1;
    var tmp;
    if (tmp1_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.xapi.ext.<get-resultProgressExtension>.<anonymous>' call
      var tmp$ret$1;
      $l$block: {
        // Inline function 'kotlin.collections.firstNotNullOfOrNull' call
        var tmp0_iterator = get_XAPI_PROGRESSED_EXTENSIONS().w();
        while (tmp0_iterator.f()) {
          var element = tmp0_iterator.e();
          // Inline function 'com.ustadmobile.core.domain.xapi.ext.<get-resultProgressExtension>.<anonymous>.<anonymous>' call
          var tmp0_safe_receiver_0 = tmp1_safe_receiver.q(element);
          var tmp1_safe_receiver_0 = tmp0_safe_receiver_0 == null ? null : get_jsonPrimitive(tmp0_safe_receiver_0);
          var result = tmp1_safe_receiver_0 == null ? null : get_intOrNull(tmp1_safe_receiver_0);
          if (!(result == null)) {
            tmp$ret$1 = result;
            break $l$block;
          }
        }
        tmp$ret$1 = null;
      }
      tmp = tmp$ret$1;
    }
    return tmp;
  }
  function Companion_47() {
    Companion_instance_95 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.moc_1 = [null, new LinkedHashMapSerializer(StringSerializer_getInstance(), StringSerializer_getInstance()), new LinkedHashMapSerializer(StringSerializer_getInstance(), StringSerializer_getInstance()), null, null, null];
  }
  var Companion_instance_95;
  function Companion_getInstance_64() {
    if (Companion_instance_95 == null)
      new Companion_47();
    return Companion_instance_95;
  }
  function $serializer_37() {
    $serializer_instance_37 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.Attachment', this, 6);
    tmp0_serialDesc.g4f('usageType', true);
    tmp0_serialDesc.g4f('display', true);
    tmp0_serialDesc.g4f('description', true);
    tmp0_serialDesc.g4f('contentType', true);
    tmp0_serialDesc.g4f('length', true);
    tmp0_serialDesc.g4f('sha2', true);
    this.noc_1 = tmp0_serialDesc;
  }
  protoOf($serializer_37).d44 = function () {
    return this.noc_1;
  };
  protoOf($serializer_37).x4f = function () {
    var tmp0_cached = Companion_getInstance_64().moc_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), get_nullable(tmp0_cached[1]), get_nullable(tmp0_cached[2]), get_nullable(StringSerializer_getInstance()), LongSerializer_getInstance(), get_nullable(StringSerializer_getInstance())];
  };
  protoOf($serializer_37).f44 = function (decoder) {
    var tmp0_desc = this.noc_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = new Long(0, 0);
    var tmp9_local5 = null;
    var tmp10_input = decoder.v47(tmp0_desc);
    var tmp11_cached = Companion_getInstance_64().moc_1;
    if (tmp10_input.k48()) {
      tmp4_local0 = tmp10_input.j48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp10_input.j48(tmp0_desc, 1, tmp11_cached[1], tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp10_input.j48(tmp0_desc, 2, tmp11_cached[2], tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp10_input.j48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp10_input.b48(tmp0_desc, 4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp10_input.j48(tmp0_desc, 5, StringSerializer_getInstance(), tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp10_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp10_input.j48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp10_input.j48(tmp0_desc, 1, tmp11_cached[1], tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp10_input.j48(tmp0_desc, 2, tmp11_cached[2], tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp10_input.j48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp10_input.b48(tmp0_desc, 4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp10_input.j48(tmp0_desc, 5, StringSerializer_getInstance(), tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp10_input.w47(tmp0_desc);
    return Attachment_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, null);
  };
  protoOf($serializer_37).ooc = function (encoder, value) {
    var tmp0_desc = this.noc_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    var tmp2_cached = Companion_getInstance_64().moc_1;
    if (tmp1_output.r49(tmp0_desc, 0) ? true : !(value.poc_1 == null)) {
      tmp1_output.n49(tmp0_desc, 0, StringSerializer_getInstance(), value.poc_1);
    }
    if (tmp1_output.r49(tmp0_desc, 1) ? true : !(value.qoc_1 == null)) {
      tmp1_output.n49(tmp0_desc, 1, tmp2_cached[1], value.qoc_1);
    }
    if (tmp1_output.r49(tmp0_desc, 2) ? true : !(value.roc_1 == null)) {
      tmp1_output.n49(tmp0_desc, 2, tmp2_cached[2], value.roc_1);
    }
    if (tmp1_output.r49(tmp0_desc, 3) ? true : !(value.soc_1 == null)) {
      tmp1_output.n49(tmp0_desc, 3, StringSerializer_getInstance(), value.soc_1);
    }
    if (tmp1_output.r49(tmp0_desc, 4) ? true : !value.toc_1.equals(new Long(0, 0))) {
      tmp1_output.f49(tmp0_desc, 4, value.toc_1);
    }
    if (tmp1_output.r49(tmp0_desc, 5) ? true : !(value.uoc_1 == null)) {
      tmp1_output.n49(tmp0_desc, 5, StringSerializer_getInstance(), value.uoc_1);
    }
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_37).e44 = function (encoder, value) {
    return this.ooc(encoder, value instanceof Attachment ? value : THROW_CCE());
  };
  var $serializer_instance_37;
  function $serializer_getInstance_49() {
    if ($serializer_instance_37 == null)
      new $serializer_37();
    return $serializer_instance_37;
  }
  function Attachment_init_$Init$(seen1, usageType, display, description, contentType, length, sha2, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_49().noc_1);
    }
    if (0 === (seen1 & 1))
      $this.poc_1 = null;
    else
      $this.poc_1 = usageType;
    if (0 === (seen1 & 2))
      $this.qoc_1 = null;
    else
      $this.qoc_1 = display;
    if (0 === (seen1 & 4))
      $this.roc_1 = null;
    else
      $this.roc_1 = description;
    if (0 === (seen1 & 8))
      $this.soc_1 = null;
    else
      $this.soc_1 = contentType;
    if (0 === (seen1 & 16))
      $this.toc_1 = new Long(0, 0);
    else
      $this.toc_1 = length;
    if (0 === (seen1 & 32))
      $this.uoc_1 = null;
    else
      $this.uoc_1 = sha2;
    return $this;
  }
  function Attachment_init_$Create$(seen1, usageType, display, description, contentType, length, sha2, serializationConstructorMarker) {
    return Attachment_init_$Init$(seen1, usageType, display, description, contentType, length, sha2, serializationConstructorMarker, objectCreate(protoOf(Attachment)));
  }
  function Attachment(usageType, display, description, contentType, length, sha2) {
    Companion_getInstance_64();
    usageType = usageType === VOID ? null : usageType;
    display = display === VOID ? null : display;
    description = description === VOID ? null : description;
    contentType = contentType === VOID ? null : contentType;
    length = length === VOID ? new Long(0, 0) : length;
    sha2 = sha2 === VOID ? null : sha2;
    this.poc_1 = usageType;
    this.qoc_1 = display;
    this.roc_1 = description;
    this.soc_1 = contentType;
    this.toc_1 = length;
    this.uoc_1 = sha2;
  }
  protoOf(Attachment).toString = function () {
    return 'Attachment(usageType=' + this.poc_1 + ', display=' + this.qoc_1 + ', description=' + this.roc_1 + ', contentType=' + this.soc_1 + ', length=' + this.toc_1.toString() + ', sha2=' + this.uoc_1 + ')';
  };
  protoOf(Attachment).hashCode = function () {
    var result = this.poc_1 == null ? 0 : getStringHashCode(this.poc_1);
    result = imul(result, 31) + (this.qoc_1 == null ? 0 : hashCode(this.qoc_1)) | 0;
    result = imul(result, 31) + (this.roc_1 == null ? 0 : hashCode(this.roc_1)) | 0;
    result = imul(result, 31) + (this.soc_1 == null ? 0 : getStringHashCode(this.soc_1)) | 0;
    result = imul(result, 31) + this.toc_1.hashCode() | 0;
    result = imul(result, 31) + (this.uoc_1 == null ? 0 : getStringHashCode(this.uoc_1)) | 0;
    return result;
  };
  protoOf(Attachment).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof Attachment))
      return false;
    var tmp0_other_with_cast = other instanceof Attachment ? other : THROW_CCE();
    if (!(this.poc_1 == tmp0_other_with_cast.poc_1))
      return false;
    if (!equals(this.qoc_1, tmp0_other_with_cast.qoc_1))
      return false;
    if (!equals(this.roc_1, tmp0_other_with_cast.roc_1))
      return false;
    if (!(this.soc_1 == tmp0_other_with_cast.soc_1))
      return false;
    if (!this.toc_1.equals(tmp0_other_with_cast.toc_1))
      return false;
    if (!(this.uoc_1 == tmp0_other_with_cast.uoc_1))
      return false;
    return true;
  };
  function Companion_48() {
  }
  var Companion_instance_96;
  function Companion_getInstance_65() {
    return Companion_instance_96;
  }
  function $serializer_38() {
    $serializer_instance_38 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiAccount', this, 2);
    tmp0_serialDesc.g4f('homePage', false);
    tmp0_serialDesc.g4f('name', false);
    this.voc_1 = tmp0_serialDesc;
  }
  protoOf($serializer_38).d44 = function () {
    return this.voc_1;
  };
  protoOf($serializer_38).x4f = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [StringSerializer_getInstance(), StringSerializer_getInstance()];
  };
  protoOf($serializer_38).f44 = function (decoder) {
    var tmp0_desc = this.voc_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.v47(tmp0_desc);
    if (tmp6_input.k48()) {
      tmp4_local0 = tmp6_input.f48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.f48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.f48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.f48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.w47(tmp0_desc);
    return XapiAccount_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_38).woc = function (encoder, value) {
    var tmp0_desc = this.voc_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    tmp1_output.j49(tmp0_desc, 0, value.xoc_1);
    tmp1_output.j49(tmp0_desc, 1, value.yoc_1);
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_38).e44 = function (encoder, value) {
    return this.woc(encoder, value instanceof XapiAccount ? value : THROW_CCE());
  };
  var $serializer_instance_38;
  function $serializer_getInstance_50() {
    if ($serializer_instance_38 == null)
      new $serializer_38();
    return $serializer_instance_38;
  }
  function XapiAccount_init_$Init$(seen1, homePage, name, serializationConstructorMarker, $this) {
    if (!(3 === (3 & seen1))) {
      throwMissingFieldException(seen1, 3, $serializer_getInstance_50().voc_1);
    }
    $this.xoc_1 = homePage;
    $this.yoc_1 = name;
    return $this;
  }
  function XapiAccount_init_$Create$(seen1, homePage, name, serializationConstructorMarker) {
    return XapiAccount_init_$Init$(seen1, homePage, name, serializationConstructorMarker, objectCreate(protoOf(XapiAccount)));
  }
  function XapiAccount(homePage, name) {
    this.xoc_1 = homePage;
    this.yoc_1 = name;
  }
  protoOf(XapiAccount).toString = function () {
    return 'XapiAccount(homePage=' + this.xoc_1 + ', name=' + this.yoc_1 + ')';
  };
  protoOf(XapiAccount).hashCode = function () {
    var result = getStringHashCode(this.xoc_1);
    result = imul(result, 31) + getStringHashCode(this.yoc_1) | 0;
    return result;
  };
  protoOf(XapiAccount).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiAccount))
      return false;
    var tmp0_other_with_cast = other instanceof XapiAccount ? other : THROW_CCE();
    if (!(this.xoc_1 === tmp0_other_with_cast.xoc_1))
      return false;
    if (!(this.yoc_1 === tmp0_other_with_cast.yoc_1))
      return false;
    return true;
  };
  function Companion_49() {
    Companion_instance_97 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.zoc_1 = [null, new LinkedHashMapSerializer(StringSerializer_getInstance(), StringSerializer_getInstance())];
  }
  var Companion_instance_97;
  function Companion_getInstance_66() {
    if (Companion_instance_97 == null)
      new Companion_49();
    return Companion_instance_97;
  }
  function $serializer_39() {
    $serializer_instance_39 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiActivity.Interaction', this, 2);
    tmp0_serialDesc.g4f('id', true);
    tmp0_serialDesc.g4f('description', true);
    this.aod_1 = tmp0_serialDesc;
  }
  protoOf($serializer_39).d44 = function () {
    return this.aod_1;
  };
  protoOf($serializer_39).x4f = function () {
    var tmp0_cached = Companion_getInstance_66().zoc_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), get_nullable(tmp0_cached[1])];
  };
  protoOf($serializer_39).f44 = function (decoder) {
    var tmp0_desc = this.aod_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.v47(tmp0_desc);
    var tmp7_cached = Companion_getInstance_66().zoc_1;
    if (tmp6_input.k48()) {
      tmp4_local0 = tmp6_input.j48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.j48(tmp0_desc, 1, tmp7_cached[1], tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.j48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.j48(tmp0_desc, 1, tmp7_cached[1], tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.w47(tmp0_desc);
    return Interaction_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_39).bod = function (encoder, value) {
    var tmp0_desc = this.aod_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    var tmp2_cached = Companion_getInstance_66().zoc_1;
    if (tmp1_output.r49(tmp0_desc, 0) ? true : !(value.cod_1 == null)) {
      tmp1_output.n49(tmp0_desc, 0, StringSerializer_getInstance(), value.cod_1);
    }
    if (tmp1_output.r49(tmp0_desc, 1) ? true : !(value.dod_1 == null)) {
      tmp1_output.n49(tmp0_desc, 1, tmp2_cached[1], value.dod_1);
    }
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_39).e44 = function (encoder, value) {
    return this.bod(encoder, value instanceof Interaction ? value : THROW_CCE());
  };
  var $serializer_instance_39;
  function $serializer_getInstance_51() {
    if ($serializer_instance_39 == null)
      new $serializer_39();
    return $serializer_instance_39;
  }
  function Interaction_init_$Init$(seen1, id, description, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_51().aod_1);
    }
    if (0 === (seen1 & 1))
      $this.cod_1 = null;
    else
      $this.cod_1 = id;
    if (0 === (seen1 & 2))
      $this.dod_1 = null;
    else
      $this.dod_1 = description;
    return $this;
  }
  function Interaction_init_$Create$(seen1, id, description, serializationConstructorMarker) {
    return Interaction_init_$Init$(seen1, id, description, serializationConstructorMarker, objectCreate(protoOf(Interaction)));
  }
  function Interaction(id, description) {
    Companion_getInstance_66();
    id = id === VOID ? null : id;
    description = description === VOID ? null : description;
    this.cod_1 = id;
    this.dod_1 = description;
  }
  protoOf(Interaction).toString = function () {
    return 'Interaction(id=' + this.cod_1 + ', description=' + this.dod_1 + ')';
  };
  protoOf(Interaction).hashCode = function () {
    var result = this.cod_1 == null ? 0 : getStringHashCode(this.cod_1);
    result = imul(result, 31) + (this.dod_1 == null ? 0 : hashCode(this.dod_1)) | 0;
    return result;
  };
  protoOf(Interaction).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof Interaction))
      return false;
    var tmp0_other_with_cast = other instanceof Interaction ? other : THROW_CCE();
    if (!(this.cod_1 == tmp0_other_with_cast.cod_1))
      return false;
    if (!equals(this.dod_1, tmp0_other_with_cast.dod_1))
      return false;
    return true;
  };
  function Companion_50() {
    Companion_instance_98 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.eod_1 = [new LinkedHashMapSerializer(StringSerializer_getInstance(), StringSerializer_getInstance()), new LinkedHashMapSerializer(StringSerializer_getInstance(), StringSerializer_getInstance()), null, new LinkedHashMapSerializer(StringSerializer_getInstance(), JsonElementSerializer_getInstance()), null, null, new ArrayListSerializer(StringSerializer_getInstance()), new ArrayListSerializer($serializer_getInstance_51()), new ArrayListSerializer($serializer_getInstance_51()), new ArrayListSerializer($serializer_getInstance_51()), new ArrayListSerializer($serializer_getInstance_51()), new ArrayListSerializer($serializer_getInstance_51())];
  }
  var Companion_instance_98;
  function Companion_getInstance_67() {
    if (Companion_instance_98 == null)
      new Companion_50();
    return Companion_instance_98;
  }
  function $serializer_40() {
    $serializer_instance_40 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('Activity', this, 12);
    tmp0_serialDesc.g4f('name', true);
    tmp0_serialDesc.g4f('description', true);
    tmp0_serialDesc.g4f('type', true);
    tmp0_serialDesc.g4f('extensions', true);
    tmp0_serialDesc.g4f('moreInfo', true);
    tmp0_serialDesc.g4f('interactionType', true);
    tmp0_serialDesc.g4f('correctResponsePattern', true);
    tmp0_serialDesc.g4f('choices', true);
    tmp0_serialDesc.g4f('scale', true);
    tmp0_serialDesc.g4f('source', true);
    tmp0_serialDesc.g4f('target', true);
    tmp0_serialDesc.g4f('steps', true);
    this.fod_1 = tmp0_serialDesc;
  }
  protoOf($serializer_40).d44 = function () {
    return this.fod_1;
  };
  protoOf($serializer_40).x4f = function () {
    var tmp0_cached = Companion_getInstance_67().eod_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(tmp0_cached[0]), get_nullable(tmp0_cached[1]), get_nullable(StringSerializer_getInstance()), get_nullable(tmp0_cached[3]), get_nullable(StringSerializer_getInstance()), get_nullable(XapiInteractionTypeSerializer_instance), get_nullable(tmp0_cached[6]), get_nullable(tmp0_cached[7]), get_nullable(tmp0_cached[8]), get_nullable(tmp0_cached[9]), get_nullable(tmp0_cached[10]), get_nullable(tmp0_cached[11])];
  };
  protoOf($serializer_40).f44 = function (decoder) {
    var tmp0_desc = this.fod_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_local6 = null;
    var tmp11_local7 = null;
    var tmp12_local8 = null;
    var tmp13_local9 = null;
    var tmp14_local10 = null;
    var tmp15_local11 = null;
    var tmp16_input = decoder.v47(tmp0_desc);
    var tmp17_cached = Companion_getInstance_67().eod_1;
    if (tmp16_input.k48()) {
      tmp4_local0 = tmp16_input.j48(tmp0_desc, 0, tmp17_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp16_input.j48(tmp0_desc, 1, tmp17_cached[1], tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp16_input.j48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp16_input.j48(tmp0_desc, 3, tmp17_cached[3], tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp16_input.j48(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp16_input.j48(tmp0_desc, 5, XapiInteractionTypeSerializer_instance, tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
      tmp10_local6 = tmp16_input.j48(tmp0_desc, 6, tmp17_cached[6], tmp10_local6);
      tmp3_bitMask0 = tmp3_bitMask0 | 64;
      tmp11_local7 = tmp16_input.j48(tmp0_desc, 7, tmp17_cached[7], tmp11_local7);
      tmp3_bitMask0 = tmp3_bitMask0 | 128;
      tmp12_local8 = tmp16_input.j48(tmp0_desc, 8, tmp17_cached[8], tmp12_local8);
      tmp3_bitMask0 = tmp3_bitMask0 | 256;
      tmp13_local9 = tmp16_input.j48(tmp0_desc, 9, tmp17_cached[9], tmp13_local9);
      tmp3_bitMask0 = tmp3_bitMask0 | 512;
      tmp14_local10 = tmp16_input.j48(tmp0_desc, 10, tmp17_cached[10], tmp14_local10);
      tmp3_bitMask0 = tmp3_bitMask0 | 1024;
      tmp15_local11 = tmp16_input.j48(tmp0_desc, 11, tmp17_cached[11], tmp15_local11);
      tmp3_bitMask0 = tmp3_bitMask0 | 2048;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp16_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp16_input.j48(tmp0_desc, 0, tmp17_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp16_input.j48(tmp0_desc, 1, tmp17_cached[1], tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp16_input.j48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp16_input.j48(tmp0_desc, 3, tmp17_cached[3], tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp16_input.j48(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp16_input.j48(tmp0_desc, 5, XapiInteractionTypeSerializer_instance, tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          case 6:
            tmp10_local6 = tmp16_input.j48(tmp0_desc, 6, tmp17_cached[6], tmp10_local6);
            tmp3_bitMask0 = tmp3_bitMask0 | 64;
            break;
          case 7:
            tmp11_local7 = tmp16_input.j48(tmp0_desc, 7, tmp17_cached[7], tmp11_local7);
            tmp3_bitMask0 = tmp3_bitMask0 | 128;
            break;
          case 8:
            tmp12_local8 = tmp16_input.j48(tmp0_desc, 8, tmp17_cached[8], tmp12_local8);
            tmp3_bitMask0 = tmp3_bitMask0 | 256;
            break;
          case 9:
            tmp13_local9 = tmp16_input.j48(tmp0_desc, 9, tmp17_cached[9], tmp13_local9);
            tmp3_bitMask0 = tmp3_bitMask0 | 512;
            break;
          case 10:
            tmp14_local10 = tmp16_input.j48(tmp0_desc, 10, tmp17_cached[10], tmp14_local10);
            tmp3_bitMask0 = tmp3_bitMask0 | 1024;
            break;
          case 11:
            tmp15_local11 = tmp16_input.j48(tmp0_desc, 11, tmp17_cached[11], tmp15_local11);
            tmp3_bitMask0 = tmp3_bitMask0 | 2048;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp16_input.w47(tmp0_desc);
    return XapiActivity_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, tmp11_local7, tmp12_local8, tmp13_local9, tmp14_local10, tmp15_local11, null);
  };
  protoOf($serializer_40).god = function (encoder, value) {
    var tmp0_desc = this.fod_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    var tmp2_cached = Companion_getInstance_67().eod_1;
    if (tmp1_output.r49(tmp0_desc, 0) ? true : !(value.hod_1 == null)) {
      tmp1_output.n49(tmp0_desc, 0, tmp2_cached[0], value.hod_1);
    }
    if (tmp1_output.r49(tmp0_desc, 1) ? true : !(value.iod_1 == null)) {
      tmp1_output.n49(tmp0_desc, 1, tmp2_cached[1], value.iod_1);
    }
    if (tmp1_output.r49(tmp0_desc, 2) ? true : !(value.jod_1 == null)) {
      tmp1_output.n49(tmp0_desc, 2, StringSerializer_getInstance(), value.jod_1);
    }
    if (tmp1_output.r49(tmp0_desc, 3) ? true : !(value.kod_1 == null)) {
      tmp1_output.n49(tmp0_desc, 3, tmp2_cached[3], value.kod_1);
    }
    if (tmp1_output.r49(tmp0_desc, 4) ? true : !(value.lod_1 == null)) {
      tmp1_output.n49(tmp0_desc, 4, StringSerializer_getInstance(), value.lod_1);
    }
    if (tmp1_output.r49(tmp0_desc, 5) ? true : !(value.mod_1 == null)) {
      tmp1_output.n49(tmp0_desc, 5, XapiInteractionTypeSerializer_instance, value.mod_1);
    }
    if (tmp1_output.r49(tmp0_desc, 6) ? true : !(value.nod_1 == null)) {
      tmp1_output.n49(tmp0_desc, 6, tmp2_cached[6], value.nod_1);
    }
    if (tmp1_output.r49(tmp0_desc, 7) ? true : !(value.ood_1 == null)) {
      tmp1_output.n49(tmp0_desc, 7, tmp2_cached[7], value.ood_1);
    }
    if (tmp1_output.r49(tmp0_desc, 8) ? true : !(value.pod_1 == null)) {
      tmp1_output.n49(tmp0_desc, 8, tmp2_cached[8], value.pod_1);
    }
    if (tmp1_output.r49(tmp0_desc, 9) ? true : !(value.qod_1 == null)) {
      tmp1_output.n49(tmp0_desc, 9, tmp2_cached[9], value.qod_1);
    }
    if (tmp1_output.r49(tmp0_desc, 10) ? true : !(value.rod_1 == null)) {
      tmp1_output.n49(tmp0_desc, 10, tmp2_cached[10], value.rod_1);
    }
    if (tmp1_output.r49(tmp0_desc, 11) ? true : !(value.sod_1 == null)) {
      tmp1_output.n49(tmp0_desc, 11, tmp2_cached[11], value.sod_1);
    }
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_40).e44 = function (encoder, value) {
    return this.god(encoder, value instanceof XapiActivity ? value : THROW_CCE());
  };
  var $serializer_instance_40;
  function $serializer_getInstance_52() {
    if ($serializer_instance_40 == null)
      new $serializer_40();
    return $serializer_instance_40;
  }
  function XapiActivity_init_$Init$(seen1, name, description, type, extensions, moreInfo, interactionType, correctResponsePattern, choices, scale, source, target, steps, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_52().fod_1);
    }
    if (0 === (seen1 & 1))
      $this.hod_1 = null;
    else
      $this.hod_1 = name;
    if (0 === (seen1 & 2))
      $this.iod_1 = null;
    else
      $this.iod_1 = description;
    if (0 === (seen1 & 4))
      $this.jod_1 = null;
    else
      $this.jod_1 = type;
    if (0 === (seen1 & 8))
      $this.kod_1 = null;
    else
      $this.kod_1 = extensions;
    if (0 === (seen1 & 16))
      $this.lod_1 = null;
    else
      $this.lod_1 = moreInfo;
    if (0 === (seen1 & 32))
      $this.mod_1 = null;
    else
      $this.mod_1 = interactionType;
    if (0 === (seen1 & 64))
      $this.nod_1 = null;
    else
      $this.nod_1 = correctResponsePattern;
    if (0 === (seen1 & 128))
      $this.ood_1 = null;
    else
      $this.ood_1 = choices;
    if (0 === (seen1 & 256))
      $this.pod_1 = null;
    else
      $this.pod_1 = scale;
    if (0 === (seen1 & 512))
      $this.qod_1 = null;
    else
      $this.qod_1 = source;
    if (0 === (seen1 & 1024))
      $this.rod_1 = null;
    else
      $this.rod_1 = target;
    if (0 === (seen1 & 2048))
      $this.sod_1 = null;
    else
      $this.sod_1 = steps;
    return $this;
  }
  function XapiActivity_init_$Create$(seen1, name, description, type, extensions, moreInfo, interactionType, correctResponsePattern, choices, scale, source, target, steps, serializationConstructorMarker) {
    return XapiActivity_init_$Init$(seen1, name, description, type, extensions, moreInfo, interactionType, correctResponsePattern, choices, scale, source, target, steps, serializationConstructorMarker, objectCreate(protoOf(XapiActivity)));
  }
  function XapiActivity(name, description, type, extensions, moreInfo, interactionType, correctResponsePattern, choices, scale, source, target, steps) {
    Companion_getInstance_67();
    name = name === VOID ? null : name;
    description = description === VOID ? null : description;
    type = type === VOID ? null : type;
    extensions = extensions === VOID ? null : extensions;
    moreInfo = moreInfo === VOID ? null : moreInfo;
    interactionType = interactionType === VOID ? null : interactionType;
    correctResponsePattern = correctResponsePattern === VOID ? null : correctResponsePattern;
    choices = choices === VOID ? null : choices;
    scale = scale === VOID ? null : scale;
    source = source === VOID ? null : source;
    target = target === VOID ? null : target;
    steps = steps === VOID ? null : steps;
    this.hod_1 = name;
    this.iod_1 = description;
    this.jod_1 = type;
    this.kod_1 = extensions;
    this.lod_1 = moreInfo;
    this.mod_1 = interactionType;
    this.nod_1 = correctResponsePattern;
    this.ood_1 = choices;
    this.pod_1 = scale;
    this.qod_1 = source;
    this.rod_1 = target;
    this.sod_1 = steps;
  }
  protoOf(XapiActivity).toString = function () {
    return 'XapiActivity(name=' + this.hod_1 + ', description=' + this.iod_1 + ', type=' + this.jod_1 + ', extensions=' + this.kod_1 + ', moreInfo=' + this.lod_1 + ', interactionType=' + this.mod_1 + ', correctResponsePattern=' + this.nod_1 + ', choices=' + this.ood_1 + ', scale=' + this.pod_1 + ', source=' + this.qod_1 + ', target=' + this.rod_1 + ', steps=' + this.sod_1 + ')';
  };
  protoOf(XapiActivity).hashCode = function () {
    var result = this.hod_1 == null ? 0 : hashCode(this.hod_1);
    result = imul(result, 31) + (this.iod_1 == null ? 0 : hashCode(this.iod_1)) | 0;
    result = imul(result, 31) + (this.jod_1 == null ? 0 : getStringHashCode(this.jod_1)) | 0;
    result = imul(result, 31) + (this.kod_1 == null ? 0 : hashCode(this.kod_1)) | 0;
    result = imul(result, 31) + (this.lod_1 == null ? 0 : getStringHashCode(this.lod_1)) | 0;
    result = imul(result, 31) + (this.mod_1 == null ? 0 : this.mod_1.hashCode()) | 0;
    result = imul(result, 31) + (this.nod_1 == null ? 0 : hashCode(this.nod_1)) | 0;
    result = imul(result, 31) + (this.ood_1 == null ? 0 : hashCode(this.ood_1)) | 0;
    result = imul(result, 31) + (this.pod_1 == null ? 0 : hashCode(this.pod_1)) | 0;
    result = imul(result, 31) + (this.qod_1 == null ? 0 : hashCode(this.qod_1)) | 0;
    result = imul(result, 31) + (this.rod_1 == null ? 0 : hashCode(this.rod_1)) | 0;
    result = imul(result, 31) + (this.sod_1 == null ? 0 : hashCode(this.sod_1)) | 0;
    return result;
  };
  protoOf(XapiActivity).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiActivity))
      return false;
    var tmp0_other_with_cast = other instanceof XapiActivity ? other : THROW_CCE();
    if (!equals(this.hod_1, tmp0_other_with_cast.hod_1))
      return false;
    if (!equals(this.iod_1, tmp0_other_with_cast.iod_1))
      return false;
    if (!(this.jod_1 == tmp0_other_with_cast.jod_1))
      return false;
    if (!equals(this.kod_1, tmp0_other_with_cast.kod_1))
      return false;
    if (!(this.lod_1 == tmp0_other_with_cast.lod_1))
      return false;
    if (!equals(this.mod_1, tmp0_other_with_cast.mod_1))
      return false;
    if (!equals(this.nod_1, tmp0_other_with_cast.nod_1))
      return false;
    if (!equals(this.ood_1, tmp0_other_with_cast.ood_1))
      return false;
    if (!equals(this.pod_1, tmp0_other_with_cast.pod_1))
      return false;
    if (!equals(this.qod_1, tmp0_other_with_cast.qod_1))
      return false;
    if (!equals(this.rod_1, tmp0_other_with_cast.rod_1))
      return false;
    if (!equals(this.sod_1, tmp0_other_with_cast.sod_1))
      return false;
    return true;
  };
  function ActivityEntities(activityEntity, activityLangMapEntries, activityInteractionEntities, activityExtensionEntities, statementContextActivityJoin) {
    activityLangMapEntries = activityLangMapEntries === VOID ? emptyList() : activityLangMapEntries;
    activityInteractionEntities = activityInteractionEntities === VOID ? emptyList() : activityInteractionEntities;
    activityExtensionEntities = activityExtensionEntities === VOID ? emptyList() : activityExtensionEntities;
    statementContextActivityJoin = statementContextActivityJoin === VOID ? null : statementContextActivityJoin;
    this.qo6_1 = activityEntity;
    this.ro6_1 = activityLangMapEntries;
    this.so6_1 = activityInteractionEntities;
    this.to6_1 = activityExtensionEntities;
    this.uo6_1 = statementContextActivityJoin;
  }
  protoOf(ActivityEntities).tod = function (activityEntity, activityLangMapEntries, activityInteractionEntities, activityExtensionEntities, statementContextActivityJoin) {
    return new ActivityEntities(activityEntity, activityLangMapEntries, activityInteractionEntities, activityExtensionEntities, statementContextActivityJoin);
  };
  protoOf(ActivityEntities).uod = function (activityEntity, activityLangMapEntries, activityInteractionEntities, activityExtensionEntities, statementContextActivityJoin, $super) {
    activityEntity = activityEntity === VOID ? this.qo6_1 : activityEntity;
    activityLangMapEntries = activityLangMapEntries === VOID ? this.ro6_1 : activityLangMapEntries;
    activityInteractionEntities = activityInteractionEntities === VOID ? this.so6_1 : activityInteractionEntities;
    activityExtensionEntities = activityExtensionEntities === VOID ? this.to6_1 : activityExtensionEntities;
    statementContextActivityJoin = statementContextActivityJoin === VOID ? this.uo6_1 : statementContextActivityJoin;
    return $super === VOID ? this.tod(activityEntity, activityLangMapEntries, activityInteractionEntities, activityExtensionEntities, statementContextActivityJoin) : $super.tod.call(this, activityEntity, activityLangMapEntries, activityInteractionEntities, activityExtensionEntities, statementContextActivityJoin);
  };
  protoOf(ActivityEntities).toString = function () {
    return 'ActivityEntities(activityEntity=' + this.qo6_1 + ', activityLangMapEntries=' + this.ro6_1 + ', activityInteractionEntities=' + this.so6_1 + ', activityExtensionEntities=' + this.to6_1 + ', statementContextActivityJoin=' + this.uo6_1 + ')';
  };
  protoOf(ActivityEntities).hashCode = function () {
    var result = this.qo6_1.hashCode();
    result = imul(result, 31) + hashCode(this.ro6_1) | 0;
    result = imul(result, 31) + hashCode(this.so6_1) | 0;
    result = imul(result, 31) + hashCode(this.to6_1) | 0;
    result = imul(result, 31) + (this.uo6_1 == null ? 0 : this.uo6_1.hashCode()) | 0;
    return result;
  };
  protoOf(ActivityEntities).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ActivityEntities))
      return false;
    var tmp0_other_with_cast = other instanceof ActivityEntities ? other : THROW_CCE();
    if (!this.qo6_1.equals(tmp0_other_with_cast.qo6_1))
      return false;
    if (!equals(this.ro6_1, tmp0_other_with_cast.ro6_1))
      return false;
    if (!equals(this.so6_1, tmp0_other_with_cast.so6_1))
      return false;
    if (!equals(this.to6_1, tmp0_other_with_cast.to6_1))
      return false;
    if (!equals(this.uo6_1, tmp0_other_with_cast.uo6_1))
      return false;
    return true;
  };
  function toEntities(_this__u8e3s4, activityId, stringHasher, json) {
    xapiRequireValidIRI(activityId, 'Activity ID is not a valid IRI: ' + activityId);
    var activityUid = stringHasher.vod(activityId);
    var tmp9_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.ood_1;
    var tmp;
    if (tmp9_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.collections.map' call
      // Inline function 'kotlin.collections.mapTo' call
      var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp9_safe_receiver, 10));
      var tmp0_iterator = tmp9_safe_receiver.w();
      while (tmp0_iterator.f()) {
        var item = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
        var tmp$ret$0 = toEntities$toEntities(item, stringHasher, activityUid, 1, 'choices');
        destination.i1(tmp$ret$0);
      }
      tmp = destination;
    }
    var tmp_0 = toEmptyIfNull(tmp);
    var tmp7_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.pod_1;
    var tmp_1;
    if (tmp7_safe_receiver == null) {
      tmp_1 = null;
    } else {
      // Inline function 'kotlin.collections.map' call
      // Inline function 'kotlin.collections.mapTo' call
      var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp7_safe_receiver, 10));
      var tmp0_iterator_0 = tmp7_safe_receiver.w();
      while (tmp0_iterator_0.f()) {
        var item_0 = tmp0_iterator_0.e();
        // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
        var tmp$ret$3 = toEntities$toEntities(item_0, stringHasher, activityUid, 2, 'scale');
        destination_0.i1(tmp$ret$3);
      }
      tmp_1 = destination_0;
    }
    var tmp_2 = plus(tmp_0, toEmptyIfNull(tmp_1));
    var tmp5_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.qod_1;
    var tmp_3;
    if (tmp5_safe_receiver == null) {
      tmp_3 = null;
    } else {
      // Inline function 'kotlin.collections.map' call
      // Inline function 'kotlin.collections.mapTo' call
      var destination_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp5_safe_receiver, 10));
      var tmp0_iterator_1 = tmp5_safe_receiver.w();
      while (tmp0_iterator_1.f()) {
        var item_1 = tmp0_iterator_1.e();
        // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
        var tmp$ret$6 = toEntities$toEntities(item_1, stringHasher, activityUid, 3, 'source');
        destination_1.i1(tmp$ret$6);
      }
      tmp_3 = destination_1;
    }
    var tmp_4 = plus(tmp_2, toEmptyIfNull(tmp_3));
    var tmp3_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.rod_1;
    var tmp_5;
    if (tmp3_safe_receiver == null) {
      tmp_5 = null;
    } else {
      // Inline function 'kotlin.collections.map' call
      // Inline function 'kotlin.collections.mapTo' call
      var destination_2 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp3_safe_receiver, 10));
      var tmp0_iterator_2 = tmp3_safe_receiver.w();
      while (tmp0_iterator_2.f()) {
        var item_2 = tmp0_iterator_2.e();
        // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
        var tmp$ret$9 = toEntities$toEntities(item_2, stringHasher, activityUid, 4, 'target');
        destination_2.i1(tmp$ret$9);
      }
      tmp_5 = destination_2;
    }
    var tmp_6 = plus(tmp_4, toEmptyIfNull(tmp_5));
    var tmp1_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.sod_1;
    var tmp_7;
    if (tmp1_safe_receiver == null) {
      tmp_7 = null;
    } else {
      // Inline function 'kotlin.collections.map' call
      // Inline function 'kotlin.collections.mapTo' call
      var destination_3 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp1_safe_receiver, 10));
      var tmp0_iterator_3 = tmp1_safe_receiver.w();
      while (tmp0_iterator_3.f()) {
        var item_3 = tmp0_iterator_3.e();
        // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
        var tmp$ret$12 = toEntities$toEntities(item_3, stringHasher, activityUid, 5, 'steps');
        destination_3.i1(tmp$ret$12);
      }
      tmp_7 = destination_3;
    }
    var interactionEntitiesAndLangMaps = plus(tmp_6, toEmptyIfNull(tmp_7));
    var tmp_8 = _this__u8e3s4 == null ? null : _this__u8e3s4.jod_1;
    var tmp_9 = _this__u8e3s4 == null ? null : _this__u8e3s4.lod_1;
    var tmp13_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.mod_1;
    var tmp14_elvis_lhs = tmp13_safe_receiver == null ? null : tmp13_safe_receiver.zod_1;
    var tmp_10;
    if (tmp14_elvis_lhs == null) {
      tmp_10 = 0;
    } else {
      tmp_10 = tmp14_elvis_lhs;
    }
    var tmp_11 = tmp_10;
    var tmp16_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.nod_1;
    var tmp_12;
    if (tmp16_safe_receiver == null) {
      tmp_12 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
      // Inline function 'kotlinx.serialization.encodeToString' call
      // Inline function 'kotlinx.serialization.serializer' call
      var this_0 = json.g45();
      // Inline function 'kotlinx.serialization.internal.cast' call
      var this_1 = serializer(this_0, createKType(getKClass(List), arrayOf([createInvariantKTypeProjection(createKType(PrimitiveClasses_getInstance().g8(), arrayOf([]), false))]), false));
      var tmp$ret$16 = isInterface(this_1, KSerializer) ? this_1 : THROW_CCE();
      tmp_12 = json.e45(tmp$ret$16, tmp16_safe_receiver);
    }
    var tmp_13 = new ActivityEntity(activityUid, activityId, tmp_8, tmp_9, tmp_11, tmp_12);
    var tmp20_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.hod_1;
    var tmp_14;
    if (tmp20_safe_receiver == null) {
      tmp_14 = null;
    } else {
      tmp_14 = toEntities$toLangMapEntries(tmp20_safe_receiver, activityUid, stringHasher, 'name');
    }
    var tmp_15 = toEmptyIfNull(tmp_14);
    var tmp18_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.iod_1;
    var tmp_16;
    if (tmp18_safe_receiver == null) {
      tmp_16 = null;
    } else {
      tmp_16 = toEntities$toLangMapEntries(tmp18_safe_receiver, activityUid, stringHasher, 'description');
    }
    var tmp_17 = plus(tmp_15, toEmptyIfNull(tmp_16));
    // Inline function 'kotlin.collections.flatMap' call
    // Inline function 'kotlin.collections.flatMapTo' call
    var destination_4 = ArrayList_init_$Create$();
    var tmp0_iterator_4 = interactionEntitiesAndLangMaps.w();
    while (tmp0_iterator_4.f()) {
      var element = tmp0_iterator_4.e();
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
      var list = element.x6_1;
      addAll(destination_4, list);
    }
    var tmp_18 = plus(tmp_17, destination_4);
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination_5 = ArrayList_init_$Create$_0(collectionSizeOrDefault(interactionEntitiesAndLangMaps, 10));
    var tmp0_iterator_5 = interactionEntitiesAndLangMaps.w();
    while (tmp0_iterator_5.f()) {
      var item_4 = tmp0_iterator_5.e();
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
      var tmp$ret$23 = item_4.w6_1;
      destination_5.i1(tmp$ret$23);
    }
    var tmp_19 = destination_5;
    var tmp22_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.kod_1;
    var tmp_20;
    if (tmp22_safe_receiver == null) {
      tmp_20 = null;
    } else {
      // Inline function 'kotlin.collections.map' call
      // Inline function 'kotlin.collections.mapTo' call
      var destination_6 = ArrayList_init_$Create$_0(tmp22_safe_receiver.u());
      // Inline function 'kotlin.collections.iterator' call
      var tmp0_iterator_6 = tmp22_safe_receiver.q2().w();
      while (tmp0_iterator_6.f()) {
        var item_5 = tmp0_iterator_6.e();
        // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
        // Inline function 'kotlin.collections.component1' call
        var key = item_5.s2();
        // Inline function 'kotlin.collections.component2' call
        var value = item_5.t2();
        var tmp$ret$29 = new ActivityExtensionEntity(activityUid, stringHasher.vod(key), xapiRequireValidIRI(key, activityId + ' extension ' + key + ' is not a valid IRI'), json.e45(Companion_instance_22.a4r(), value));
        destination_6.i1(tmp$ret$29);
      }
      tmp_20 = destination_6;
    }
    var tmp23_elvis_lhs = tmp_20;
    return new ActivityEntities(tmp_13, tmp_18, tmp_19, tmp23_elvis_lhs == null ? emptyList() : tmp23_elvis_lhs);
  }
  function toEntities$toLangMapEntries(_this__u8e3s4, activityUid, $stringHasher, propName, almeAieHash) {
    almeAieHash = almeAieHash === VOID ? new Long(0, 0) : almeAieHash;
    // Inline function 'kotlin.collections.map' call
    var this_0 = _this__u8e3s4.q2();
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.toLangMapEntries.<anonymous>' call
      // Inline function 'kotlin.collections.component1' call
      var lang = item.s2();
      // Inline function 'kotlin.collections.component2' call
      var text = item.t2();
      var tmp$ret$2 = new ActivityLangMapEntry(activityUid, $stringHasher.vod(propName + '-' + lang), lang, text, almeAieHash);
      destination.i1(tmp$ret$2);
    }
    return destination;
  }
  function toEntities$toEntities(_this__u8e3s4, $stringHasher, activityUid, propId, propName) {
    var aieHash = $stringHasher.vod('' + propId + _this__u8e3s4.cod_1);
    var tmp = new ActivityInteractionEntity(activityUid, aieHash, propId, _this__u8e3s4.cod_1);
    var tmp0_safe_receiver = _this__u8e3s4.dod_1;
    return to(tmp, toEmptyIfNull(tmp0_safe_receiver == null ? null : toEntities$toLangMapEntries(tmp0_safe_receiver, activityUid, $stringHasher, propName + '-' + _this__u8e3s4.cod_1, aieHash)));
  }
  function Companion_51() {
  }
  protoOf(Companion_51).a4r = function () {
    return XapiActorSerializer_getInstance();
  };
  protoOf(Companion_51).i4g = function (typeParamsSerializers) {
    return this.a4r();
  };
  var Companion_instance_99;
  function Companion_getInstance_68() {
    return Companion_instance_99;
  }
  function XapiActor() {
  }
  function XapiActorSerializer() {
    XapiActorSerializer_instance = this;
    JsonContentPolymorphicSerializer.call(this, getKClass(XapiActor));
  }
  protoOf(XapiActorSerializer).y4q = function (element) {
    var tmp0_safe_receiver = get_jsonObject(element).ba('type');
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : get_jsonPrimitive(tmp0_safe_receiver);
    var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.t3a();
    var tmp;
    if (tmp2_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.xapi.model.XapiActorSerializer.selectDeserializer.<anonymous>' call
      tmp = valueOf(tmp2_safe_receiver);
    }
    var tmp3_elvis_lhs = tmp;
    var objectType = tmp3_elvis_lhs == null ? XapiObjectType_Agent_getInstance() : tmp3_elvis_lhs;
    var tmp_0;
    switch (objectType.za_1) {
      case 3:
        tmp_0 = Companion_instance_100.a4r();
        break;
      case 4:
        tmp_0 = Companion_getInstance_73().a4r();
        break;
      default:
        throw new XapiException(400, 'Invalid object type for actor: must be Agent or Group');
    }
    return tmp_0;
  };
  var XapiActorSerializer_instance;
  function XapiActorSerializer_getInstance() {
    if (XapiActorSerializer_instance == null)
      new XapiActorSerializer();
    return XapiActorSerializer_instance;
  }
  function identifierHash(_this__u8e3s4, xxHasher) {
    var tmp;
    if (!(_this__u8e3s4.doe() == null)) {
      var tmp0_safe_receiver = _this__u8e3s4.doe();
      var tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.yoc_1;
      var tmp1_safe_receiver = _this__u8e3s4.doe();
      tmp = '' + tmp_0 + '@' + (tmp1_safe_receiver == null ? null : tmp1_safe_receiver.xoc_1);
    } else if (!(_this__u8e3s4.aoe() == null)) {
      tmp = _this__u8e3s4.aoe();
    } else if (!(_this__u8e3s4.boe() == null)) {
      tmp = _this__u8e3s4.boe();
    } else if (!(_this__u8e3s4.coe() == null)) {
      tmp = _this__u8e3s4.coe();
    } else {
      tmp = null;
    }
    var idStr = tmp;
    var tmp_1;
    if (idStr == null) {
      tmp_1 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.xapi.model.identifierHash.<anonymous>' call
      tmp_1 = xxHasher.vod(idStr);
    }
    var tmp3_elvis_lhs = tmp_1;
    return tmp3_elvis_lhs == null ? new Long(0, 0) : tmp3_elvis_lhs;
  }
  function ActorEntities(actor, groupMemberAgents, groupMemberJoins) {
    groupMemberAgents = groupMemberAgents === VOID ? emptyList() : groupMemberAgents;
    groupMemberJoins = groupMemberJoins === VOID ? emptyList() : groupMemberJoins;
    this.ko9_1 = actor;
    this.lo9_1 = groupMemberAgents;
    this.mo9_1 = groupMemberJoins;
  }
  protoOf(ActorEntities).toString = function () {
    return 'ActorEntities(actor=' + this.ko9_1 + ', groupMemberAgents=' + this.lo9_1 + ', groupMemberJoins=' + this.mo9_1 + ')';
  };
  protoOf(ActorEntities).hashCode = function () {
    var result = this.ko9_1.hashCode();
    result = imul(result, 31) + hashCode(this.lo9_1) | 0;
    result = imul(result, 31) + hashCode(this.mo9_1) | 0;
    return result;
  };
  protoOf(ActorEntities).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ActorEntities))
      return false;
    var tmp0_other_with_cast = other instanceof ActorEntities ? other : THROW_CCE();
    if (!this.ko9_1.equals(tmp0_other_with_cast.ko9_1))
      return false;
    if (!equals(this.lo9_1, tmp0_other_with_cast.lo9_1))
      return false;
    if (!equals(this.mo9_1, tmp0_other_with_cast.mo9_1))
      return false;
    return true;
  };
  function toEntities_0(_this__u8e3s4, stringHasher, primaryKeyManager, hasherFactory, knownActorUidToPersonUidMap) {
    knownActorUidToPersonUidMap = knownActorUidToPersonUidMap === VOID ? emptyMap() : knownActorUidToPersonUidMap;
    var tmp;
    if (_this__u8e3s4 instanceof XapiAgent) {
      tmp = new ActorEntities(toActorEntity(_this__u8e3s4, stringHasher, knownActorUidToPersonUidMap));
    } else {
      if (_this__u8e3s4 instanceof XapiGroup) {
        tmp = toGroupEntities(_this__u8e3s4, stringHasher, primaryKeyManager, hasherFactory, knownActorUidToPersonUidMap);
      } else {
        noWhenBranchMatchedException();
      }
    }
    return tmp;
  }
  function Companion_52() {
  }
  protoOf(Companion_52).a4r = function () {
    return $serializer_getInstance_53();
  };
  var Companion_instance_100;
  function Companion_getInstance_69() {
    return Companion_instance_100;
  }
  function $serializer_41() {
    $serializer_instance_41 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiAgent', this, 6);
    tmp0_serialDesc.g4f('name', true);
    tmp0_serialDesc.g4f('mbox', true);
    tmp0_serialDesc.g4f('mbox_sha1sum', true);
    tmp0_serialDesc.g4f('openid', true);
    tmp0_serialDesc.g4f('objectType', true);
    tmp0_serialDesc.g4f('account', true);
    this.hoe_1 = tmp0_serialDesc;
  }
  protoOf($serializer_41).d44 = function () {
    return this.hoe_1;
  };
  protoOf($serializer_41).x4f = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(XapiObjectTypeSerializer_instance), get_nullable($serializer_getInstance_50())];
  };
  protoOf($serializer_41).f44 = function (decoder) {
    var tmp0_desc = this.hoe_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_input = decoder.v47(tmp0_desc);
    if (tmp10_input.k48()) {
      tmp4_local0 = tmp10_input.j48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp10_input.j48(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp10_input.j48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp10_input.j48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp10_input.j48(tmp0_desc, 4, XapiObjectTypeSerializer_instance, tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp10_input.j48(tmp0_desc, 5, $serializer_getInstance_50(), tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp10_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp10_input.j48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp10_input.j48(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp10_input.j48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp10_input.j48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp10_input.j48(tmp0_desc, 4, XapiObjectTypeSerializer_instance, tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp10_input.j48(tmp0_desc, 5, $serializer_getInstance_50(), tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp10_input.w47(tmp0_desc);
    return XapiAgent_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, null);
  };
  protoOf($serializer_41).ioe = function (encoder, value) {
    var tmp0_desc = this.hoe_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    if (tmp1_output.r49(tmp0_desc, 0) ? true : !(value.joe_1 == null)) {
      tmp1_output.n49(tmp0_desc, 0, StringSerializer_getInstance(), value.joe_1);
    }
    if (tmp1_output.r49(tmp0_desc, 1) ? true : !(value.koe_1 == null)) {
      tmp1_output.n49(tmp0_desc, 1, StringSerializer_getInstance(), value.koe_1);
    }
    if (tmp1_output.r49(tmp0_desc, 2) ? true : !(value.loe_1 == null)) {
      tmp1_output.n49(tmp0_desc, 2, StringSerializer_getInstance(), value.loe_1);
    }
    if (tmp1_output.r49(tmp0_desc, 3) ? true : !(value.moe_1 == null)) {
      tmp1_output.n49(tmp0_desc, 3, StringSerializer_getInstance(), value.moe_1);
    }
    if (tmp1_output.r49(tmp0_desc, 4) ? true : !(value.noe_1 == null)) {
      tmp1_output.n49(tmp0_desc, 4, XapiObjectTypeSerializer_instance, value.noe_1);
    }
    if (tmp1_output.r49(tmp0_desc, 5) ? true : !(value.ooe_1 == null)) {
      tmp1_output.n49(tmp0_desc, 5, $serializer_getInstance_50(), value.ooe_1);
    }
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_41).e44 = function (encoder, value) {
    return this.ioe(encoder, value instanceof XapiAgent ? value : THROW_CCE());
  };
  var $serializer_instance_41;
  function $serializer_getInstance_53() {
    if ($serializer_instance_41 == null)
      new $serializer_41();
    return $serializer_instance_41;
  }
  function XapiAgent_init_$Init$(seen1, name, mbox, mbox_sha1sum, openid, objectType, account, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_53().hoe_1);
    }
    if (0 === (seen1 & 1))
      $this.joe_1 = null;
    else
      $this.joe_1 = name;
    if (0 === (seen1 & 2))
      $this.koe_1 = null;
    else
      $this.koe_1 = mbox;
    if (0 === (seen1 & 4))
      $this.loe_1 = null;
    else
      $this.loe_1 = mbox_sha1sum;
    if (0 === (seen1 & 8))
      $this.moe_1 = null;
    else
      $this.moe_1 = openid;
    if (0 === (seen1 & 16))
      $this.noe_1 = null;
    else
      $this.noe_1 = objectType;
    if (0 === (seen1 & 32))
      $this.ooe_1 = null;
    else
      $this.ooe_1 = account;
    return $this;
  }
  function XapiAgent_init_$Create$(seen1, name, mbox, mbox_sha1sum, openid, objectType, account, serializationConstructorMarker) {
    return XapiAgent_init_$Init$(seen1, name, mbox, mbox_sha1sum, openid, objectType, account, serializationConstructorMarker, objectCreate(protoOf(XapiAgent)));
  }
  function XapiAgent(name, mbox, mbox_sha1sum, openid, objectType, account) {
    name = name === VOID ? null : name;
    mbox = mbox === VOID ? null : mbox;
    mbox_sha1sum = mbox_sha1sum === VOID ? null : mbox_sha1sum;
    openid = openid === VOID ? null : openid;
    objectType = objectType === VOID ? null : objectType;
    account = account === VOID ? null : account;
    this.joe_1 = name;
    this.koe_1 = mbox;
    this.loe_1 = mbox_sha1sum;
    this.moe_1 = openid;
    this.noe_1 = objectType;
    this.ooe_1 = account;
  }
  protoOf(XapiAgent).aoe = function () {
    return this.koe_1;
  };
  protoOf(XapiAgent).boe = function () {
    return this.loe_1;
  };
  protoOf(XapiAgent).coe = function () {
    return this.moe_1;
  };
  protoOf(XapiAgent).poe = function () {
    return this.noe_1;
  };
  protoOf(XapiAgent).doe = function () {
    return this.ooe_1;
  };
  protoOf(XapiAgent).toString = function () {
    return 'XapiAgent(name=' + this.joe_1 + ', mbox=' + this.koe_1 + ', mbox_sha1sum=' + this.loe_1 + ', openid=' + this.moe_1 + ', objectType=' + this.noe_1 + ', account=' + this.ooe_1 + ')';
  };
  protoOf(XapiAgent).hashCode = function () {
    var result = this.joe_1 == null ? 0 : getStringHashCode(this.joe_1);
    result = imul(result, 31) + (this.koe_1 == null ? 0 : getStringHashCode(this.koe_1)) | 0;
    result = imul(result, 31) + (this.loe_1 == null ? 0 : getStringHashCode(this.loe_1)) | 0;
    result = imul(result, 31) + (this.moe_1 == null ? 0 : getStringHashCode(this.moe_1)) | 0;
    result = imul(result, 31) + (this.noe_1 == null ? 0 : this.noe_1.hashCode()) | 0;
    result = imul(result, 31) + (this.ooe_1 == null ? 0 : this.ooe_1.hashCode()) | 0;
    return result;
  };
  protoOf(XapiAgent).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiAgent))
      return false;
    var tmp0_other_with_cast = other instanceof XapiAgent ? other : THROW_CCE();
    if (!(this.joe_1 == tmp0_other_with_cast.joe_1))
      return false;
    if (!(this.koe_1 == tmp0_other_with_cast.koe_1))
      return false;
    if (!(this.loe_1 == tmp0_other_with_cast.loe_1))
      return false;
    if (!(this.moe_1 == tmp0_other_with_cast.moe_1))
      return false;
    if (!equals(this.noe_1, tmp0_other_with_cast.noe_1))
      return false;
    if (!equals(this.ooe_1, tmp0_other_with_cast.ooe_1))
      return false;
    return true;
  };
  function toActorEntity(_this__u8e3s4, xxHasher, knownActorUidToPersonUidMap, lastModifiedTime) {
    lastModifiedTime = lastModifiedTime === VOID ? systemTimeInMillis() : lastModifiedTime;
    var uid = identifierHash(_this__u8e3s4, xxHasher);
    var tmp0_elvis_lhs = knownActorUidToPersonUidMap.q(uid);
    var tmp5_actorPersonUid = tmp0_elvis_lhs == null ? new Long(0, 0) : tmp0_elvis_lhs;
    var tmp6_actorMbox = _this__u8e3s4.koe_1;
    var tmp7_actorMbox_sha1sum = _this__u8e3s4.loe_1;
    var tmp8_actorOpenid = _this__u8e3s4.moe_1;
    var tmp1_safe_receiver = _this__u8e3s4.ooe_1;
    var tmp9_actorAccountName = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.yoc_1;
    var tmp2_safe_receiver = _this__u8e3s4.ooe_1;
    var tmp10_actorAccountHomePage = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.xoc_1;
    var tmp3_safe_receiver = _this__u8e3s4.joe_1;
    var tmp;
    if (tmp3_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toActorEntity.<anonymous>' call
      tmp = xxHasher.vod(tmp3_safe_receiver);
    }
    var tmp4_elvis_lhs = tmp;
    var tmp11_actorEtag = tmp4_elvis_lhs == null ? new Long(0, 0) : tmp4_elvis_lhs;
    return new ActorEntity(uid, tmp5_actorPersonUid, VOID, tmp6_actorMbox, tmp7_actorMbox_sha1sum, tmp8_actorOpenid, tmp9_actorAccountName, tmp10_actorAccountHomePage, tmp11_actorEtag, lastModifiedTime, 1);
  }
  function Companion_53() {
    Companion_instance_101 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.qoe_1 = [null, null, null, null, null, null, null, null, new LinkedHashMapSerializer(StringSerializer_getInstance(), JsonElementSerializer_getInstance())];
  }
  var Companion_instance_101;
  function Companion_getInstance_70() {
    if (Companion_instance_101 == null)
      new Companion_53();
    return Companion_instance_101;
  }
  function $serializer_42() {
    $serializer_instance_42 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiContext', this, 9);
    tmp0_serialDesc.g4f('instructor', true);
    tmp0_serialDesc.g4f('registration', true);
    tmp0_serialDesc.g4f('language', true);
    tmp0_serialDesc.g4f('platform', true);
    tmp0_serialDesc.g4f('revision', true);
    tmp0_serialDesc.g4f('team', true);
    tmp0_serialDesc.g4f('statement', true);
    tmp0_serialDesc.g4f('contextActivities', true);
    tmp0_serialDesc.g4f('extensions', true);
    this.roe_1 = tmp0_serialDesc;
  }
  protoOf($serializer_42).d44 = function () {
    return this.roe_1;
  };
  protoOf($serializer_42).x4f = function () {
    var tmp0_cached = Companion_getInstance_70().qoe_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(XapiActorSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(XapiActorSerializer_getInstance()), get_nullable($serializer_getInstance_60()), get_nullable(XapiContextActivitiesSerializer_getInstance()), get_nullable(tmp0_cached[8])];
  };
  protoOf($serializer_42).f44 = function (decoder) {
    var tmp0_desc = this.roe_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_local6 = null;
    var tmp11_local7 = null;
    var tmp12_local8 = null;
    var tmp13_input = decoder.v47(tmp0_desc);
    var tmp14_cached = Companion_getInstance_70().qoe_1;
    if (tmp13_input.k48()) {
      tmp4_local0 = tmp13_input.j48(tmp0_desc, 0, XapiActorSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp13_input.j48(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp13_input.j48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp13_input.j48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp13_input.j48(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp13_input.j48(tmp0_desc, 5, XapiActorSerializer_getInstance(), tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
      tmp10_local6 = tmp13_input.j48(tmp0_desc, 6, $serializer_getInstance_60(), tmp10_local6);
      tmp3_bitMask0 = tmp3_bitMask0 | 64;
      tmp11_local7 = tmp13_input.j48(tmp0_desc, 7, XapiContextActivitiesSerializer_getInstance(), tmp11_local7);
      tmp3_bitMask0 = tmp3_bitMask0 | 128;
      tmp12_local8 = tmp13_input.j48(tmp0_desc, 8, tmp14_cached[8], tmp12_local8);
      tmp3_bitMask0 = tmp3_bitMask0 | 256;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp13_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp13_input.j48(tmp0_desc, 0, XapiActorSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp13_input.j48(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp13_input.j48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp13_input.j48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp13_input.j48(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp13_input.j48(tmp0_desc, 5, XapiActorSerializer_getInstance(), tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          case 6:
            tmp10_local6 = tmp13_input.j48(tmp0_desc, 6, $serializer_getInstance_60(), tmp10_local6);
            tmp3_bitMask0 = tmp3_bitMask0 | 64;
            break;
          case 7:
            tmp11_local7 = tmp13_input.j48(tmp0_desc, 7, XapiContextActivitiesSerializer_getInstance(), tmp11_local7);
            tmp3_bitMask0 = tmp3_bitMask0 | 128;
            break;
          case 8:
            tmp12_local8 = tmp13_input.j48(tmp0_desc, 8, tmp14_cached[8], tmp12_local8);
            tmp3_bitMask0 = tmp3_bitMask0 | 256;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp13_input.w47(tmp0_desc);
    return XapiContext_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, tmp11_local7, tmp12_local8, null);
  };
  protoOf($serializer_42).soe = function (encoder, value) {
    var tmp0_desc = this.roe_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    var tmp2_cached = Companion_getInstance_70().qoe_1;
    if (tmp1_output.r49(tmp0_desc, 0) ? true : !(value.toe_1 == null)) {
      tmp1_output.n49(tmp0_desc, 0, XapiActorSerializer_getInstance(), value.toe_1);
    }
    if (tmp1_output.r49(tmp0_desc, 1) ? true : !(value.uoe_1 == null)) {
      tmp1_output.n49(tmp0_desc, 1, StringSerializer_getInstance(), value.uoe_1);
    }
    if (tmp1_output.r49(tmp0_desc, 2) ? true : !(value.voe_1 == null)) {
      tmp1_output.n49(tmp0_desc, 2, StringSerializer_getInstance(), value.voe_1);
    }
    if (tmp1_output.r49(tmp0_desc, 3) ? true : !(value.woe_1 == null)) {
      tmp1_output.n49(tmp0_desc, 3, StringSerializer_getInstance(), value.woe_1);
    }
    if (tmp1_output.r49(tmp0_desc, 4) ? true : !(value.xoe_1 == null)) {
      tmp1_output.n49(tmp0_desc, 4, StringSerializer_getInstance(), value.xoe_1);
    }
    if (tmp1_output.r49(tmp0_desc, 5) ? true : !(value.yoe_1 == null)) {
      tmp1_output.n49(tmp0_desc, 5, XapiActorSerializer_getInstance(), value.yoe_1);
    }
    if (tmp1_output.r49(tmp0_desc, 6) ? true : !(value.zoe_1 == null)) {
      tmp1_output.n49(tmp0_desc, 6, $serializer_getInstance_60(), value.zoe_1);
    }
    if (tmp1_output.r49(tmp0_desc, 7) ? true : !(value.aof_1 == null)) {
      tmp1_output.n49(tmp0_desc, 7, XapiContextActivitiesSerializer_getInstance(), value.aof_1);
    }
    if (tmp1_output.r49(tmp0_desc, 8) ? true : !(value.bof_1 == null)) {
      tmp1_output.n49(tmp0_desc, 8, tmp2_cached[8], value.bof_1);
    }
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_42).e44 = function (encoder, value) {
    return this.soe(encoder, value instanceof XapiContext ? value : THROW_CCE());
  };
  var $serializer_instance_42;
  function $serializer_getInstance_54() {
    if ($serializer_instance_42 == null)
      new $serializer_42();
    return $serializer_instance_42;
  }
  function XapiContext_init_$Init$(seen1, instructor, registration, language, platform, revision, team, statement, contextActivities, extensions, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_54().roe_1);
    }
    if (0 === (seen1 & 1))
      $this.toe_1 = null;
    else
      $this.toe_1 = instructor;
    if (0 === (seen1 & 2))
      $this.uoe_1 = null;
    else
      $this.uoe_1 = registration;
    if (0 === (seen1 & 4))
      $this.voe_1 = null;
    else
      $this.voe_1 = language;
    if (0 === (seen1 & 8))
      $this.woe_1 = null;
    else
      $this.woe_1 = platform;
    if (0 === (seen1 & 16))
      $this.xoe_1 = null;
    else
      $this.xoe_1 = revision;
    if (0 === (seen1 & 32))
      $this.yoe_1 = null;
    else
      $this.yoe_1 = team;
    if (0 === (seen1 & 64))
      $this.zoe_1 = null;
    else
      $this.zoe_1 = statement;
    if (0 === (seen1 & 128))
      $this.aof_1 = null;
    else
      $this.aof_1 = contextActivities;
    if (0 === (seen1 & 256))
      $this.bof_1 = null;
    else
      $this.bof_1 = extensions;
    return $this;
  }
  function XapiContext_init_$Create$(seen1, instructor, registration, language, platform, revision, team, statement, contextActivities, extensions, serializationConstructorMarker) {
    return XapiContext_init_$Init$(seen1, instructor, registration, language, platform, revision, team, statement, contextActivities, extensions, serializationConstructorMarker, objectCreate(protoOf(XapiContext)));
  }
  function XapiContext(instructor, registration, language, platform, revision, team, statement, contextActivities, extensions) {
    Companion_getInstance_70();
    instructor = instructor === VOID ? null : instructor;
    registration = registration === VOID ? null : registration;
    language = language === VOID ? null : language;
    platform = platform === VOID ? null : platform;
    revision = revision === VOID ? null : revision;
    team = team === VOID ? null : team;
    statement = statement === VOID ? null : statement;
    contextActivities = contextActivities === VOID ? null : contextActivities;
    extensions = extensions === VOID ? null : extensions;
    this.toe_1 = instructor;
    this.uoe_1 = registration;
    this.voe_1 = language;
    this.woe_1 = platform;
    this.xoe_1 = revision;
    this.yoe_1 = team;
    this.zoe_1 = statement;
    this.aof_1 = contextActivities;
    this.bof_1 = extensions;
  }
  protoOf(XapiContext).toString = function () {
    return 'XapiContext(instructor=' + this.toe_1 + ', registration=' + this.uoe_1 + ', language=' + this.voe_1 + ', platform=' + this.woe_1 + ', revision=' + this.xoe_1 + ', team=' + this.yoe_1 + ', statement=' + this.zoe_1 + ', contextActivities=' + this.aof_1 + ', extensions=' + this.bof_1 + ')';
  };
  protoOf(XapiContext).hashCode = function () {
    var result = this.toe_1 == null ? 0 : hashCode(this.toe_1);
    result = imul(result, 31) + (this.uoe_1 == null ? 0 : getStringHashCode(this.uoe_1)) | 0;
    result = imul(result, 31) + (this.voe_1 == null ? 0 : getStringHashCode(this.voe_1)) | 0;
    result = imul(result, 31) + (this.woe_1 == null ? 0 : getStringHashCode(this.woe_1)) | 0;
    result = imul(result, 31) + (this.xoe_1 == null ? 0 : getStringHashCode(this.xoe_1)) | 0;
    result = imul(result, 31) + (this.yoe_1 == null ? 0 : hashCode(this.yoe_1)) | 0;
    result = imul(result, 31) + (this.zoe_1 == null ? 0 : this.zoe_1.hashCode()) | 0;
    result = imul(result, 31) + (this.aof_1 == null ? 0 : this.aof_1.hashCode()) | 0;
    result = imul(result, 31) + (this.bof_1 == null ? 0 : hashCode(this.bof_1)) | 0;
    return result;
  };
  protoOf(XapiContext).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiContext))
      return false;
    var tmp0_other_with_cast = other instanceof XapiContext ? other : THROW_CCE();
    if (!equals(this.toe_1, tmp0_other_with_cast.toe_1))
      return false;
    if (!(this.uoe_1 == tmp0_other_with_cast.uoe_1))
      return false;
    if (!(this.voe_1 == tmp0_other_with_cast.voe_1))
      return false;
    if (!(this.woe_1 == tmp0_other_with_cast.woe_1))
      return false;
    if (!(this.xoe_1 == tmp0_other_with_cast.xoe_1))
      return false;
    if (!equals(this.yoe_1, tmp0_other_with_cast.yoe_1))
      return false;
    if (!equals(this.zoe_1, tmp0_other_with_cast.zoe_1))
      return false;
    if (!equals(this.aof_1, tmp0_other_with_cast.aof_1))
      return false;
    if (!equals(this.bof_1, tmp0_other_with_cast.bof_1))
      return false;
    return true;
  };
  function Companion_54() {
  }
  var Companion_instance_102;
  function Companion_getInstance_71() {
    return Companion_instance_102;
  }
  function XapiContextActivities(parent, grouping, category, other) {
    parent = parent === VOID ? null : parent;
    grouping = grouping === VOID ? null : grouping;
    category = category === VOID ? null : category;
    other = other === VOID ? null : other;
    this.cof_1 = parent;
    this.dof_1 = grouping;
    this.eof_1 = category;
    this.fof_1 = other;
  }
  protoOf(XapiContextActivities).toString = function () {
    return 'XapiContextActivities(parent=' + this.cof_1 + ', grouping=' + this.dof_1 + ', category=' + this.eof_1 + ', other=' + this.fof_1 + ')';
  };
  protoOf(XapiContextActivities).hashCode = function () {
    var result = this.cof_1 == null ? 0 : hashCode(this.cof_1);
    result = imul(result, 31) + (this.dof_1 == null ? 0 : hashCode(this.dof_1)) | 0;
    result = imul(result, 31) + (this.eof_1 == null ? 0 : hashCode(this.eof_1)) | 0;
    result = imul(result, 31) + (this.fof_1 == null ? 0 : hashCode(this.fof_1)) | 0;
    return result;
  };
  protoOf(XapiContextActivities).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiContextActivities))
      return false;
    var tmp0_other_with_cast = other instanceof XapiContextActivities ? other : THROW_CCE();
    if (!equals(this.cof_1, tmp0_other_with_cast.cof_1))
      return false;
    if (!equals(this.dof_1, tmp0_other_with_cast.dof_1))
      return false;
    if (!equals(this.eof_1, tmp0_other_with_cast.eof_1))
      return false;
    if (!equals(this.fof_1, tmp0_other_with_cast.fof_1))
      return false;
    return true;
  };
  function deserialize$propertyToObjectList(jsonObject, jsonDecoder, propName) {
    var jsonElement = jsonObject.ba(propName);
    var tmp;
    if (!(jsonElement == null)) {
      tmp = decodeListOrSingleObjectAsList(jsonDecoder.z4q(), Companion_instance_110.a4r(), jsonElement);
    } else {
      tmp = null;
    }
    return tmp;
  }
  function XapiContextActivitiesSerializer() {
    XapiContextActivitiesSerializer_instance = this;
    this.gof_1 = Companion_getInstance_72().a4r().d44();
  }
  protoOf(XapiContextActivitiesSerializer).d44 = function () {
    return this.gof_1;
  };
  protoOf(XapiContextActivitiesSerializer).iof = function (encoder, value) {
    encoder.m49(Companion_getInstance_72().a4r(), toSurrogate(value));
  };
  protoOf(XapiContextActivitiesSerializer).e44 = function (encoder, value) {
    return this.iof(encoder, value instanceof XapiContextActivities ? value : THROW_CCE());
  };
  protoOf(XapiContextActivitiesSerializer).f44 = function (decoder) {
    var tmp0_elvis_lhs = isInterface(decoder, JsonDecoder) ? decoder : null;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      throw IllegalStateException_init_$Create$_0();
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var jsonDecoder = tmp;
    var tmp_0 = jsonDecoder.x4q();
    var jsonObject = tmp_0 instanceof JsonObject ? tmp_0 : THROW_CCE();
    return new XapiContextActivities(deserialize$propertyToObjectList(jsonObject, jsonDecoder, 'parent'), deserialize$propertyToObjectList(jsonObject, jsonDecoder, 'grouping'), deserialize$propertyToObjectList(jsonObject, jsonDecoder, 'category'), deserialize$propertyToObjectList(jsonObject, jsonDecoder, 'other'));
  };
  var XapiContextActivitiesSerializer_instance;
  function XapiContextActivitiesSerializer_getInstance() {
    if (XapiContextActivitiesSerializer_instance == null)
      new XapiContextActivitiesSerializer();
    return XapiContextActivitiesSerializer_instance;
  }
  function Companion_55() {
    Companion_instance_103 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.hof_1 = [new ArrayListSerializer($serializer_getInstance_60()), new ArrayListSerializer($serializer_getInstance_60()), new ArrayListSerializer($serializer_getInstance_60()), new ArrayListSerializer($serializer_getInstance_60())];
  }
  protoOf(Companion_55).a4r = function () {
    return $serializer_getInstance_55();
  };
  var Companion_instance_103;
  function Companion_getInstance_72() {
    if (Companion_instance_103 == null)
      new Companion_55();
    return Companion_instance_103;
  }
  function $serializer_43() {
    $serializer_instance_43 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('XapiContextActivities', this, 4);
    tmp0_serialDesc.g4f('parent', true);
    tmp0_serialDesc.g4f('grouping', true);
    tmp0_serialDesc.g4f('category', true);
    tmp0_serialDesc.g4f('other', true);
    this.jof_1 = tmp0_serialDesc;
  }
  protoOf($serializer_43).d44 = function () {
    return this.jof_1;
  };
  protoOf($serializer_43).x4f = function () {
    var tmp0_cached = Companion_getInstance_72().hof_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(tmp0_cached[0]), get_nullable(tmp0_cached[1]), get_nullable(tmp0_cached[2]), get_nullable(tmp0_cached[3])];
  };
  protoOf($serializer_43).f44 = function (decoder) {
    var tmp0_desc = this.jof_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_input = decoder.v47(tmp0_desc);
    var tmp9_cached = Companion_getInstance_72().hof_1;
    if (tmp8_input.k48()) {
      tmp4_local0 = tmp8_input.j48(tmp0_desc, 0, tmp9_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp8_input.j48(tmp0_desc, 1, tmp9_cached[1], tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp8_input.j48(tmp0_desc, 2, tmp9_cached[2], tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp8_input.j48(tmp0_desc, 3, tmp9_cached[3], tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp8_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp8_input.j48(tmp0_desc, 0, tmp9_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp8_input.j48(tmp0_desc, 1, tmp9_cached[1], tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp8_input.j48(tmp0_desc, 2, tmp9_cached[2], tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp8_input.j48(tmp0_desc, 3, tmp9_cached[3], tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp8_input.w47(tmp0_desc);
    return XapiContextActivitiesSurrogate_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
  };
  protoOf($serializer_43).kof = function (encoder, value) {
    var tmp0_desc = this.jof_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    var tmp2_cached = Companion_getInstance_72().hof_1;
    if (tmp1_output.r49(tmp0_desc, 0) ? true : !(value.lof_1 == null)) {
      tmp1_output.n49(tmp0_desc, 0, tmp2_cached[0], value.lof_1);
    }
    if (tmp1_output.r49(tmp0_desc, 1) ? true : !(value.mof_1 == null)) {
      tmp1_output.n49(tmp0_desc, 1, tmp2_cached[1], value.mof_1);
    }
    if (tmp1_output.r49(tmp0_desc, 2) ? true : !(value.nof_1 == null)) {
      tmp1_output.n49(tmp0_desc, 2, tmp2_cached[2], value.nof_1);
    }
    if (tmp1_output.r49(tmp0_desc, 3) ? true : !(value.oof_1 == null)) {
      tmp1_output.n49(tmp0_desc, 3, tmp2_cached[3], value.oof_1);
    }
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_43).e44 = function (encoder, value) {
    return this.kof(encoder, value instanceof XapiContextActivitiesSurrogate ? value : THROW_CCE());
  };
  var $serializer_instance_43;
  function $serializer_getInstance_55() {
    if ($serializer_instance_43 == null)
      new $serializer_43();
    return $serializer_instance_43;
  }
  function XapiContextActivitiesSurrogate_init_$Init$(seen1, parent, grouping, category, other, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_55().jof_1);
    }
    if (0 === (seen1 & 1))
      $this.lof_1 = null;
    else
      $this.lof_1 = parent;
    if (0 === (seen1 & 2))
      $this.mof_1 = null;
    else
      $this.mof_1 = grouping;
    if (0 === (seen1 & 4))
      $this.nof_1 = null;
    else
      $this.nof_1 = category;
    if (0 === (seen1 & 8))
      $this.oof_1 = null;
    else
      $this.oof_1 = other;
    return $this;
  }
  function XapiContextActivitiesSurrogate_init_$Create$(seen1, parent, grouping, category, other, serializationConstructorMarker) {
    return XapiContextActivitiesSurrogate_init_$Init$(seen1, parent, grouping, category, other, serializationConstructorMarker, objectCreate(protoOf(XapiContextActivitiesSurrogate)));
  }
  function XapiContextActivitiesSurrogate(parent, grouping, category, other) {
    Companion_getInstance_72();
    parent = parent === VOID ? null : parent;
    grouping = grouping === VOID ? null : grouping;
    category = category === VOID ? null : category;
    other = other === VOID ? null : other;
    this.lof_1 = parent;
    this.mof_1 = grouping;
    this.nof_1 = category;
    this.oof_1 = other;
  }
  function toSurrogate(_this__u8e3s4) {
    return new XapiContextActivitiesSurrogate(_this__u8e3s4.cof_1, _this__u8e3s4.dof_1, _this__u8e3s4.eof_1, _this__u8e3s4.fof_1);
  }
  function toEntities_1(_this__u8e3s4, stringHasher, json, statementUuid) {
    var tmp = toEntities$toEntitiesInternal(_this__u8e3s4.cof_1, stringHasher, json, statementUuid, 1);
    var tmp_0 = plus(tmp, toEntities$toEntitiesInternal(_this__u8e3s4.dof_1, stringHasher, json, statementUuid, 2));
    var tmp_1 = plus(tmp_0, toEntities$toEntitiesInternal(_this__u8e3s4.eof_1, stringHasher, json, statementUuid, 3));
    return plus(tmp_1, toEntities$toEntitiesInternal(_this__u8e3s4.fof_1, stringHasher, json, statementUuid, 4));
  }
  function toEntities_2(_this__u8e3s4, stringHasher, json, statementUuid, contextType) {
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(_this__u8e3s4, 10));
    var tmp0_iterator = _this__u8e3s4.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
      var activityUid = stringHasher.vod(item.qof_1);
      var scajToHash = stringHasher.vod('' + contextType + '-' + item.qof_1);
      var statementContextActivityJoin = new StatementContextActivityJoin(statementUuid.pl7(), statementUuid.ql7(), scajToHash, contextType, activityUid, item.qof_1);
      var tmp0_safe_receiver = item.rof_1;
      var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : toEntities(tmp0_safe_receiver, item.qof_1, stringHasher, json);
      var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.uod(VOID, VOID, VOID, VOID, statementContextActivityJoin);
      var tmp$ret$0 = tmp2_elvis_lhs == null ? new ActivityEntities(new ActivityEntity(activityUid, item.qof_1), VOID, VOID, VOID, statementContextActivityJoin) : tmp2_elvis_lhs;
      destination.i1(tmp$ret$0);
    }
    return destination;
  }
  function toEntities$toEntitiesInternal(_this__u8e3s4, $stringHasher, $json, $statementUuid, type) {
    return toEmptyIfNull(_this__u8e3s4 == null ? null : toEntities_2(_this__u8e3s4, $stringHasher, $json, $statementUuid, type));
  }
  function Companion_56() {
    Companion_instance_104 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.goe_1 = [null, null, null, null, null, null, new ArrayListSerializer($serializer_getInstance_53())];
  }
  protoOf(Companion_56).a4r = function () {
    return $serializer_getInstance_56();
  };
  var Companion_instance_104;
  function Companion_getInstance_73() {
    if (Companion_instance_104 == null)
      new Companion_56();
    return Companion_instance_104;
  }
  function $serializer_44() {
    $serializer_instance_44 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiGroup', this, 7);
    tmp0_serialDesc.g4f('name', true);
    tmp0_serialDesc.g4f('mbox', true);
    tmp0_serialDesc.g4f('mbox_sha1sum', true);
    tmp0_serialDesc.g4f('openid', true);
    tmp0_serialDesc.g4f('objectType', true);
    tmp0_serialDesc.g4f('account', true);
    tmp0_serialDesc.g4f('member', true);
    this.sof_1 = tmp0_serialDesc;
  }
  protoOf($serializer_44).d44 = function () {
    return this.sof_1;
  };
  protoOf($serializer_44).x4f = function () {
    var tmp0_cached = Companion_getInstance_73().goe_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(XapiObjectTypeSerializer_instance), get_nullable($serializer_getInstance_50()), tmp0_cached[6]];
  };
  protoOf($serializer_44).f44 = function (decoder) {
    var tmp0_desc = this.sof_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_local6 = null;
    var tmp11_input = decoder.v47(tmp0_desc);
    var tmp12_cached = Companion_getInstance_73().goe_1;
    if (tmp11_input.k48()) {
      tmp4_local0 = tmp11_input.j48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp11_input.j48(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp11_input.j48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp11_input.j48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp11_input.j48(tmp0_desc, 4, XapiObjectTypeSerializer_instance, tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp11_input.j48(tmp0_desc, 5, $serializer_getInstance_50(), tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
      tmp10_local6 = tmp11_input.h48(tmp0_desc, 6, tmp12_cached[6], tmp10_local6);
      tmp3_bitMask0 = tmp3_bitMask0 | 64;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp11_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp11_input.j48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp11_input.j48(tmp0_desc, 1, StringSerializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp11_input.j48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp11_input.j48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp11_input.j48(tmp0_desc, 4, XapiObjectTypeSerializer_instance, tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp11_input.j48(tmp0_desc, 5, $serializer_getInstance_50(), tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          case 6:
            tmp10_local6 = tmp11_input.h48(tmp0_desc, 6, tmp12_cached[6], tmp10_local6);
            tmp3_bitMask0 = tmp3_bitMask0 | 64;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp11_input.w47(tmp0_desc);
    return XapiGroup_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, null);
  };
  protoOf($serializer_44).tof = function (encoder, value) {
    var tmp0_desc = this.sof_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    var tmp2_cached = Companion_getInstance_73().goe_1;
    if (tmp1_output.r49(tmp0_desc, 0) ? true : !(value.uof_1 == null)) {
      tmp1_output.n49(tmp0_desc, 0, StringSerializer_getInstance(), value.uof_1);
    }
    if (tmp1_output.r49(tmp0_desc, 1) ? true : !(value.vof_1 == null)) {
      tmp1_output.n49(tmp0_desc, 1, StringSerializer_getInstance(), value.vof_1);
    }
    if (tmp1_output.r49(tmp0_desc, 2) ? true : !(value.wof_1 == null)) {
      tmp1_output.n49(tmp0_desc, 2, StringSerializer_getInstance(), value.wof_1);
    }
    if (tmp1_output.r49(tmp0_desc, 3) ? true : !(value.xof_1 == null)) {
      tmp1_output.n49(tmp0_desc, 3, StringSerializer_getInstance(), value.xof_1);
    }
    if (tmp1_output.r49(tmp0_desc, 4) ? true : !(value.yof_1 == null)) {
      tmp1_output.n49(tmp0_desc, 4, XapiObjectTypeSerializer_instance, value.yof_1);
    }
    if (tmp1_output.r49(tmp0_desc, 5) ? true : !(value.zof_1 == null)) {
      tmp1_output.n49(tmp0_desc, 5, $serializer_getInstance_50(), value.zof_1);
    }
    if (tmp1_output.r49(tmp0_desc, 6) ? true : !equals(value.aog_1, emptyList())) {
      tmp1_output.l49(tmp0_desc, 6, tmp2_cached[6], value.aog_1);
    }
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_44).e44 = function (encoder, value) {
    return this.tof(encoder, value instanceof XapiGroup ? value : THROW_CCE());
  };
  var $serializer_instance_44;
  function $serializer_getInstance_56() {
    if ($serializer_instance_44 == null)
      new $serializer_44();
    return $serializer_instance_44;
  }
  function XapiGroup_init_$Init$(seen1, name, mbox, mbox_sha1sum, openid, objectType, account, member, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_56().sof_1);
    }
    if (0 === (seen1 & 1))
      $this.uof_1 = null;
    else
      $this.uof_1 = name;
    if (0 === (seen1 & 2))
      $this.vof_1 = null;
    else
      $this.vof_1 = mbox;
    if (0 === (seen1 & 4))
      $this.wof_1 = null;
    else
      $this.wof_1 = mbox_sha1sum;
    if (0 === (seen1 & 8))
      $this.xof_1 = null;
    else
      $this.xof_1 = openid;
    if (0 === (seen1 & 16))
      $this.yof_1 = null;
    else
      $this.yof_1 = objectType;
    if (0 === (seen1 & 32))
      $this.zof_1 = null;
    else
      $this.zof_1 = account;
    if (0 === (seen1 & 64))
      $this.aog_1 = emptyList();
    else
      $this.aog_1 = member;
    return $this;
  }
  function XapiGroup_init_$Create$(seen1, name, mbox, mbox_sha1sum, openid, objectType, account, member, serializationConstructorMarker) {
    return XapiGroup_init_$Init$(seen1, name, mbox, mbox_sha1sum, openid, objectType, account, member, serializationConstructorMarker, objectCreate(protoOf(XapiGroup)));
  }
  function XapiGroup(name, mbox, mbox_sha1sum, openid, objectType, account, member) {
    Companion_getInstance_73();
    name = name === VOID ? null : name;
    mbox = mbox === VOID ? null : mbox;
    mbox_sha1sum = mbox_sha1sum === VOID ? null : mbox_sha1sum;
    openid = openid === VOID ? null : openid;
    objectType = objectType === VOID ? null : objectType;
    account = account === VOID ? null : account;
    member = member === VOID ? emptyList() : member;
    this.uof_1 = name;
    this.vof_1 = mbox;
    this.wof_1 = mbox_sha1sum;
    this.xof_1 = openid;
    this.yof_1 = objectType;
    this.zof_1 = account;
    this.aog_1 = member;
  }
  protoOf(XapiGroup).aoe = function () {
    return this.vof_1;
  };
  protoOf(XapiGroup).boe = function () {
    return this.wof_1;
  };
  protoOf(XapiGroup).coe = function () {
    return this.xof_1;
  };
  protoOf(XapiGroup).poe = function () {
    return this.yof_1;
  };
  protoOf(XapiGroup).doe = function () {
    return this.zof_1;
  };
  protoOf(XapiGroup).toString = function () {
    return 'XapiGroup(name=' + this.uof_1 + ', mbox=' + this.vof_1 + ', mbox_sha1sum=' + this.wof_1 + ', openid=' + this.xof_1 + ', objectType=' + this.yof_1 + ', account=' + this.zof_1 + ', member=' + this.aog_1 + ')';
  };
  protoOf(XapiGroup).hashCode = function () {
    var result = this.uof_1 == null ? 0 : getStringHashCode(this.uof_1);
    result = imul(result, 31) + (this.vof_1 == null ? 0 : getStringHashCode(this.vof_1)) | 0;
    result = imul(result, 31) + (this.wof_1 == null ? 0 : getStringHashCode(this.wof_1)) | 0;
    result = imul(result, 31) + (this.xof_1 == null ? 0 : getStringHashCode(this.xof_1)) | 0;
    result = imul(result, 31) + (this.yof_1 == null ? 0 : this.yof_1.hashCode()) | 0;
    result = imul(result, 31) + (this.zof_1 == null ? 0 : this.zof_1.hashCode()) | 0;
    result = imul(result, 31) + hashCode(this.aog_1) | 0;
    return result;
  };
  protoOf(XapiGroup).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiGroup))
      return false;
    var tmp0_other_with_cast = other instanceof XapiGroup ? other : THROW_CCE();
    if (!(this.uof_1 == tmp0_other_with_cast.uof_1))
      return false;
    if (!(this.vof_1 == tmp0_other_with_cast.vof_1))
      return false;
    if (!(this.wof_1 == tmp0_other_with_cast.wof_1))
      return false;
    if (!(this.xof_1 == tmp0_other_with_cast.xof_1))
      return false;
    if (!equals(this.yof_1, tmp0_other_with_cast.yof_1))
      return false;
    if (!equals(this.zof_1, tmp0_other_with_cast.zof_1))
      return false;
    if (!equals(this.aog_1, tmp0_other_with_cast.aog_1))
      return false;
    return true;
  };
  function toGroupEntities(_this__u8e3s4, stringHasher, primaryKeyManager, hasherFactory, knownActorUidToPersonUidMap) {
    knownActorUidToPersonUidMap = knownActorUidToPersonUidMap === VOID ? emptyMap() : knownActorUidToPersonUidMap;
    var modTime = systemTimeInMillis();
    // Inline function 'kotlin.collections.sortedBy' call
    // Inline function 'kotlin.collections.map' call
    var this_0 = _this__u8e3s4.aog_1;
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toGroupEntities.<anonymous>' call
      var tmp$ret$0 = to(identifierHash(item, stringHasher), toActorEntity(item, stringHasher, knownActorUidToPersonUidMap));
      destination.i1(tmp$ret$0);
    }
    // Inline function 'kotlin.comparisons.compareBy' call
    var tmp = toGroupEntities$lambda;
    var tmp$ret$3 = new sam$kotlin_Comparator$0_0(tmp);
    var memberActors = sortedWith(destination, tmp$ret$3);
    var hasher = hasherFactory.bog(new Long(0, 0));
    // Inline function 'kotlin.collections.forEach' call
    var tmp0_iterator_0 = memberActors.w();
    while (tmp0_iterator_0.f()) {
      var element = tmp0_iterator_0.e();
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toGroupEntities.<anonymous>' call
      hasher.cog(toByteArray(element.w6_1));
    }
    var memberHash = hasher.dog();
    var tmp_0;
    if (get_isAnonymous(_this__u8e3s4)) {
      tmp_0 = primaryKeyManager.a62(68);
    } else {
      tmp_0 = identifierHash(_this__u8e3s4, stringHasher);
    }
    var tmp2_actorUid = tmp_0;
    var tmp4_actorName = _this__u8e3s4.uof_1;
    var tmp5_actorMbox = _this__u8e3s4.vof_1;
    var tmp6_actorMbox_sha1sum = _this__u8e3s4.wof_1;
    var tmp7_actorOpenid = _this__u8e3s4.xof_1;
    var tmp0_safe_receiver = _this__u8e3s4.zof_1;
    var tmp8_actorAccountName = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.yoc_1;
    var tmp1_safe_receiver = _this__u8e3s4.zof_1;
    var tmp9_actorAccountHomePage = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.xoc_1;
    var groupActor = new ActorEntity(tmp2_actorUid, VOID, tmp4_actorName, tmp5_actorMbox, tmp6_actorMbox_sha1sum, tmp7_actorOpenid, tmp8_actorAccountName, tmp9_actorAccountHomePage, memberHash, modTime, 2);
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(memberActors, 10));
    var tmp0_iterator_1 = memberActors.w();
    while (tmp0_iterator_1.f()) {
      var item_0 = tmp0_iterator_1.e();
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toGroupEntities.<anonymous>' call
      var tmp$ret$5 = item_0.x6_1;
      destination_0.i1(tmp$ret$5);
    }
    var tmp_1 = destination_0;
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(memberActors, 10));
    var tmp0_iterator_2 = memberActors.w();
    while (tmp0_iterator_2.f()) {
      var item_1 = tmp0_iterator_2.e();
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toGroupEntities.<anonymous>' call
      var tmp$ret$8 = new GroupMemberActorJoin(groupActor.tid_1, item_1.x6_1.tid_1, modTime);
      destination_1.i1(tmp$ret$8);
    }
    return new ActorEntities(groupActor, tmp_1, destination_1);
  }
  function get_isAnonymous(_this__u8e3s4) {
    return (_this__u8e3s4.vof_1 == null ? _this__u8e3s4.xof_1 == null : false) ? _this__u8e3s4.zof_1 == null : false;
  }
  function sam$kotlin_Comparator$0_0(function_0) {
    this.eog_1 = function_0;
  }
  protoOf(sam$kotlin_Comparator$0_0).pa = function (a, b) {
    return this.eog_1(a, b);
  };
  protoOf(sam$kotlin_Comparator$0_0).compare = function (a, b) {
    return this.pa(a, b);
  };
  function toGroupEntities$lambda(a, b) {
    // Inline function 'kotlin.comparisons.compareValuesBy' call
    // Inline function 'com.ustadmobile.core.domain.xapi.model.toGroupEntities.<anonymous>' call
    var tmp = a.w6_1;
    // Inline function 'com.ustadmobile.core.domain.xapi.model.toGroupEntities.<anonymous>' call
    var tmp$ret$1 = b.w6_1;
    return compareValues(tmp, tmp$ret$1);
  }
  function _get_$cachedSerializer__te6jhj_0($this) {
    return $this.fog_1.t2();
  }
  function XapiInteractionType$Companion$_anonymous__3zafad() {
    return XapiInteractionTypeSerializer_instance;
  }
  var XapiInteractionType_TrueFalse_instance;
  var XapiInteractionType_Choice_instance;
  var XapiInteractionType_FillIn_instance;
  var XapiInteractionType_LongFillIn_instance;
  var XapiInteractionType_Matching_instance;
  var XapiInteractionType_Performance_instance;
  var XapiInteractionType_Sequencing_instance;
  var XapiInteractionType_Likert_instance;
  var XapiInteractionType_Numeric_instance;
  var XapiInteractionType_Other_instance;
  function Companion_57() {
    Companion_instance_105 = this;
    var tmp = this;
    var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
    tmp.fog_1 = lazy(tmp_0, XapiInteractionType$Companion$_anonymous__3zafad);
  }
  protoOf(Companion_57).gog = function (value) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator = get_entries_0().w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.domain.xapi.model.Companion.fromJsonFieldValue.<anonymous>' call
        if (element.yod_1 === value) {
          tmp$ret$1 = element;
          break $l$block;
        }
      }
      tmp$ret$1 = null;
    }
    var tmp0_elvis_lhs = tmp$ret$1;
    return tmp0_elvis_lhs == null ? XapiInteractionType_Other_getInstance() : tmp0_elvis_lhs;
  };
  protoOf(Companion_57).a4r = function () {
    return _get_$cachedSerializer__te6jhj_0(this);
  };
  protoOf(Companion_57).i4g = function (typeParamsSerializers) {
    return this.a4r();
  };
  var Companion_instance_105;
  function Companion_getInstance_74() {
    XapiInteractionType_initEntries();
    if (Companion_instance_105 == null)
      new Companion_57();
    return Companion_instance_105;
  }
  function values_1() {
    return [XapiInteractionType_TrueFalse_getInstance(), XapiInteractionType_Choice_getInstance(), XapiInteractionType_FillIn_getInstance(), XapiInteractionType_LongFillIn_getInstance(), XapiInteractionType_Matching_getInstance(), XapiInteractionType_Performance_getInstance(), XapiInteractionType_Sequencing_getInstance(), XapiInteractionType_Likert_getInstance(), XapiInteractionType_Numeric_getInstance(), XapiInteractionType_Other_getInstance()];
  }
  function get_entries_0() {
    if ($ENTRIES_0 == null)
      $ENTRIES_0 = enumEntries(values_1());
    return $ENTRIES_0;
  }
  var XapiInteractionType_entriesInitialized;
  function XapiInteractionType_initEntries() {
    if (XapiInteractionType_entriesInitialized)
      return Unit_instance;
    XapiInteractionType_entriesInitialized = true;
    XapiInteractionType_TrueFalse_instance = new XapiInteractionType('TrueFalse', 0, 'true-false', 1);
    XapiInteractionType_Choice_instance = new XapiInteractionType('Choice', 1, 'choice', 2);
    XapiInteractionType_FillIn_instance = new XapiInteractionType('FillIn', 2, 'fill-in', 3);
    XapiInteractionType_LongFillIn_instance = new XapiInteractionType('LongFillIn', 3, 'long-fill-in', 4);
    XapiInteractionType_Matching_instance = new XapiInteractionType('Matching', 4, 'matching', 5);
    XapiInteractionType_Performance_instance = new XapiInteractionType('Performance', 5, 'performance', 6);
    XapiInteractionType_Sequencing_instance = new XapiInteractionType('Sequencing', 6, 'sequencing', 7);
    XapiInteractionType_Likert_instance = new XapiInteractionType('Likert', 7, 'likert', 8);
    XapiInteractionType_Numeric_instance = new XapiInteractionType('Numeric', 8, 'numeric', 9);
    XapiInteractionType_Other_instance = new XapiInteractionType('Other', 9, 'other', 10);
    Companion_getInstance_74();
  }
  var $ENTRIES_0;
  function XapiInteractionType(name, ordinal, jsonFieldValue, dbFlag) {
    Enum.call(this, name, ordinal);
    this.yod_1 = jsonFieldValue;
    this.zod_1 = dbFlag;
  }
  function XapiInteractionTypeSerializer() {
  }
  protoOf(XapiInteractionTypeSerializer).d44 = function () {
    // Inline function 'kotlinx.serialization.descriptors.serialDescriptor' call
    // Inline function 'kotlinx.serialization.serializer' call
    // Inline function 'kotlinx.serialization.internal.cast' call
    var this_0 = serializer_2(createKType(PrimitiveClasses_getInstance().g8(), arrayOf([]), false));
    return (isInterface(this_0, KSerializer) ? this_0 : THROW_CCE()).d44();
  };
  protoOf(XapiInteractionTypeSerializer).f44 = function (decoder) {
    return Companion_getInstance_74().gog(decoder.q47());
  };
  protoOf(XapiInteractionTypeSerializer).hog = function (encoder, value) {
    encoder.y48(value.yod_1);
  };
  protoOf(XapiInteractionTypeSerializer).e44 = function (encoder, value) {
    return this.hog(encoder, value instanceof XapiInteractionType ? value : THROW_CCE());
  };
  var XapiInteractionTypeSerializer_instance;
  function XapiInteractionTypeSerializer_getInstance() {
    return XapiInteractionTypeSerializer_instance;
  }
  function XapiInteractionType_TrueFalse_getInstance() {
    XapiInteractionType_initEntries();
    return XapiInteractionType_TrueFalse_instance;
  }
  function XapiInteractionType_Choice_getInstance() {
    XapiInteractionType_initEntries();
    return XapiInteractionType_Choice_instance;
  }
  function XapiInteractionType_FillIn_getInstance() {
    XapiInteractionType_initEntries();
    return XapiInteractionType_FillIn_instance;
  }
  function XapiInteractionType_LongFillIn_getInstance() {
    XapiInteractionType_initEntries();
    return XapiInteractionType_LongFillIn_instance;
  }
  function XapiInteractionType_Matching_getInstance() {
    XapiInteractionType_initEntries();
    return XapiInteractionType_Matching_instance;
  }
  function XapiInteractionType_Performance_getInstance() {
    XapiInteractionType_initEntries();
    return XapiInteractionType_Performance_instance;
  }
  function XapiInteractionType_Sequencing_getInstance() {
    XapiInteractionType_initEntries();
    return XapiInteractionType_Sequencing_instance;
  }
  function XapiInteractionType_Likert_getInstance() {
    XapiInteractionType_initEntries();
    return XapiInteractionType_Likert_instance;
  }
  function XapiInteractionType_Numeric_getInstance() {
    XapiInteractionType_initEntries();
    return XapiInteractionType_Numeric_instance;
  }
  function XapiInteractionType_Other_getInstance() {
    XapiInteractionType_initEntries();
    return XapiInteractionType_Other_instance;
  }
  function _get_$cachedSerializer__te6jhj_1($this) {
    return $this.iog_1.t2();
  }
  function XapiObjectType$Companion$_anonymous__v4av7w() {
    return XapiObjectTypeSerializer_instance;
  }
  var XapiObjectType_StatementRef_instance;
  var XapiObjectType_SubStatement_instance;
  var XapiObjectType_Activity_instance;
  var XapiObjectType_Agent_instance;
  var XapiObjectType_Group_instance;
  var XapiObjectType_Statement_instance;
  function Companion_58() {
    Companion_instance_106 = this;
    var tmp = this;
    var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
    tmp.iog_1 = lazy(tmp_0, XapiObjectType$Companion$_anonymous__v4av7w);
  }
  protoOf(Companion_58).a4r = function () {
    return _get_$cachedSerializer__te6jhj_1(this);
  };
  protoOf(Companion_58).i4g = function (typeParamsSerializers) {
    return this.a4r();
  };
  var Companion_instance_106;
  function Companion_getInstance_75() {
    XapiObjectType_initEntries();
    if (Companion_instance_106 == null)
      new Companion_58();
    return Companion_instance_106;
  }
  function valueOf(value) {
    switch (value) {
      case 'StatementRef':
        return XapiObjectType_StatementRef_getInstance();
      case 'SubStatement':
        return XapiObjectType_SubStatement_getInstance();
      case 'Activity':
        return XapiObjectType_Activity_getInstance();
      case 'Agent':
        return XapiObjectType_Agent_getInstance();
      case 'Group':
        return XapiObjectType_Group_getInstance();
      case 'Statement':
        return XapiObjectType_Statement_getInstance();
      default:
        XapiObjectType_initEntries();
        THROW_IAE('No enum constant value.');
        break;
    }
  }
  var XapiObjectType_entriesInitialized;
  function XapiObjectType_initEntries() {
    if (XapiObjectType_entriesInitialized)
      return Unit_instance;
    XapiObjectType_entriesInitialized = true;
    XapiObjectType_StatementRef_instance = new XapiObjectType('StatementRef', 0);
    XapiObjectType_SubStatement_instance = new XapiObjectType('SubStatement', 1);
    XapiObjectType_Activity_instance = new XapiObjectType('Activity', 2);
    XapiObjectType_Agent_instance = new XapiObjectType('Agent', 3);
    XapiObjectType_Group_instance = new XapiObjectType('Group', 4);
    XapiObjectType_Statement_instance = new XapiObjectType('Statement', 5);
    Companion_getInstance_75();
  }
  function XapiObjectType(name, ordinal) {
    Enum.call(this, name, ordinal);
  }
  function XapiObjectTypeSerializer() {
  }
  protoOf(XapiObjectTypeSerializer).d44 = function () {
    // Inline function 'kotlinx.serialization.descriptors.serialDescriptor' call
    // Inline function 'kotlinx.serialization.serializer' call
    // Inline function 'kotlinx.serialization.internal.cast' call
    var this_0 = serializer_2(createKType(PrimitiveClasses_getInstance().g8(), arrayOf([]), false));
    return (isInterface(this_0, KSerializer) ? this_0 : THROW_CCE()).d44();
  };
  protoOf(XapiObjectTypeSerializer).f44 = function (decoder) {
    var strValue = decoder.q47();
    return valueOf(strValue);
  };
  protoOf(XapiObjectTypeSerializer).jog = function (encoder, value) {
    encoder.y48(value.toString());
  };
  protoOf(XapiObjectTypeSerializer).e44 = function (encoder, value) {
    return this.jog(encoder, value instanceof XapiObjectType ? value : THROW_CCE());
  };
  var XapiObjectTypeSerializer_instance;
  function XapiObjectTypeSerializer_getInstance() {
    return XapiObjectTypeSerializer_instance;
  }
  function get_typeFlag(_this__u8e3s4) {
    var tmp;
    switch (_this__u8e3s4.za_1) {
      case 0:
        tmp = 3;
        break;
      case 1:
        tmp = 4;
        break;
      case 2:
        tmp = 5;
        break;
      case 3:
        tmp = 1;
        break;
      case 4:
        tmp = 2;
        break;
      case 5:
        tmp = 6;
        break;
      default:
        noWhenBranchMatchedException();
        break;
    }
    return tmp;
  }
  function XapiObjectType_StatementRef_getInstance() {
    XapiObjectType_initEntries();
    return XapiObjectType_StatementRef_instance;
  }
  function XapiObjectType_SubStatement_getInstance() {
    XapiObjectType_initEntries();
    return XapiObjectType_SubStatement_instance;
  }
  function XapiObjectType_Activity_getInstance() {
    XapiObjectType_initEntries();
    return XapiObjectType_Activity_instance;
  }
  function XapiObjectType_Agent_getInstance() {
    XapiObjectType_initEntries();
    return XapiObjectType_Agent_instance;
  }
  function XapiObjectType_Group_getInstance() {
    XapiObjectType_initEntries();
    return XapiObjectType_Group_instance;
  }
  function XapiObjectType_Statement_getInstance() {
    XapiObjectType_initEntries();
    return XapiObjectType_Statement_instance;
  }
  function Companion_59() {
  }
  var Companion_instance_107;
  function Companion_getInstance_76() {
    return Companion_instance_107;
  }
  function $serializer_45() {
    $serializer_instance_45 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiResult.Score', this, 4);
    tmp0_serialDesc.g4f('scaled', true);
    tmp0_serialDesc.g4f('raw', true);
    tmp0_serialDesc.g4f('min', true);
    tmp0_serialDesc.g4f('max', true);
    this.kog_1 = tmp0_serialDesc;
  }
  protoOf($serializer_45).d44 = function () {
    return this.kog_1;
  };
  protoOf($serializer_45).x4f = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(FloatSerializer_getInstance()), get_nullable(FloatSerializer_getInstance()), get_nullable(FloatSerializer_getInstance()), get_nullable(FloatSerializer_getInstance())];
  };
  protoOf($serializer_45).f44 = function (decoder) {
    var tmp0_desc = this.kog_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_input = decoder.v47(tmp0_desc);
    if (tmp8_input.k48()) {
      tmp4_local0 = tmp8_input.j48(tmp0_desc, 0, FloatSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp8_input.j48(tmp0_desc, 1, FloatSerializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp8_input.j48(tmp0_desc, 2, FloatSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp8_input.j48(tmp0_desc, 3, FloatSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp8_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp8_input.j48(tmp0_desc, 0, FloatSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp8_input.j48(tmp0_desc, 1, FloatSerializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp8_input.j48(tmp0_desc, 2, FloatSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp8_input.j48(tmp0_desc, 3, FloatSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp8_input.w47(tmp0_desc);
    return Score_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, null);
  };
  protoOf($serializer_45).log = function (encoder, value) {
    var tmp0_desc = this.kog_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    if (tmp1_output.r49(tmp0_desc, 0) ? true : !(value.mog_1 == null)) {
      tmp1_output.n49(tmp0_desc, 0, FloatSerializer_getInstance(), value.mog_1);
    }
    if (tmp1_output.r49(tmp0_desc, 1) ? true : !(value.nog_1 == null)) {
      tmp1_output.n49(tmp0_desc, 1, FloatSerializer_getInstance(), value.nog_1);
    }
    if (tmp1_output.r49(tmp0_desc, 2) ? true : !(value.oog_1 == null)) {
      tmp1_output.n49(tmp0_desc, 2, FloatSerializer_getInstance(), value.oog_1);
    }
    if (tmp1_output.r49(tmp0_desc, 3) ? true : !(value.pog_1 == null)) {
      tmp1_output.n49(tmp0_desc, 3, FloatSerializer_getInstance(), value.pog_1);
    }
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_45).e44 = function (encoder, value) {
    return this.log(encoder, value instanceof Score ? value : THROW_CCE());
  };
  var $serializer_instance_45;
  function $serializer_getInstance_57() {
    if ($serializer_instance_45 == null)
      new $serializer_45();
    return $serializer_instance_45;
  }
  function Score_init_$Init$(seen1, scaled, raw, min, max, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_57().kog_1);
    }
    if (0 === (seen1 & 1))
      $this.mog_1 = null;
    else
      $this.mog_1 = scaled;
    if (0 === (seen1 & 2))
      $this.nog_1 = null;
    else
      $this.nog_1 = raw;
    if (0 === (seen1 & 4))
      $this.oog_1 = null;
    else
      $this.oog_1 = min;
    if (0 === (seen1 & 8))
      $this.pog_1 = null;
    else
      $this.pog_1 = max;
    return $this;
  }
  function Score_init_$Create$(seen1, scaled, raw, min, max, serializationConstructorMarker) {
    return Score_init_$Init$(seen1, scaled, raw, min, max, serializationConstructorMarker, objectCreate(protoOf(Score)));
  }
  function Score(scaled, raw, min, max) {
    scaled = scaled === VOID ? null : scaled;
    raw = raw === VOID ? null : raw;
    min = min === VOID ? null : min;
    max = max === VOID ? null : max;
    this.mog_1 = scaled;
    this.nog_1 = raw;
    this.oog_1 = min;
    this.pog_1 = max;
  }
  protoOf(Score).toString = function () {
    return 'Score(scaled=' + this.mog_1 + ', raw=' + this.nog_1 + ', min=' + this.oog_1 + ', max=' + this.pog_1 + ')';
  };
  protoOf(Score).hashCode = function () {
    var result = this.mog_1 == null ? 0 : getNumberHashCode(this.mog_1);
    result = imul(result, 31) + (this.nog_1 == null ? 0 : getNumberHashCode(this.nog_1)) | 0;
    result = imul(result, 31) + (this.oog_1 == null ? 0 : getNumberHashCode(this.oog_1)) | 0;
    result = imul(result, 31) + (this.pog_1 == null ? 0 : getNumberHashCode(this.pog_1)) | 0;
    return result;
  };
  protoOf(Score).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof Score))
      return false;
    var tmp0_other_with_cast = other instanceof Score ? other : THROW_CCE();
    if (!equals(this.mog_1, tmp0_other_with_cast.mog_1))
      return false;
    if (!equals(this.nog_1, tmp0_other_with_cast.nog_1))
      return false;
    if (!equals(this.oog_1, tmp0_other_with_cast.oog_1))
      return false;
    if (!equals(this.pog_1, tmp0_other_with_cast.pog_1))
      return false;
    return true;
  };
  function Companion_60() {
    Companion_instance_108 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.qog_1 = [null, null, null, null, null, new LinkedHashMapSerializer(StringSerializer_getInstance(), JsonElementSerializer_getInstance())];
  }
  var Companion_instance_108;
  function Companion_getInstance_77() {
    if (Companion_instance_108 == null)
      new Companion_60();
    return Companion_instance_108;
  }
  function $serializer_46() {
    $serializer_instance_46 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiResult', this, 6);
    tmp0_serialDesc.g4f('completion', true);
    tmp0_serialDesc.g4f('success', true);
    tmp0_serialDesc.g4f('score', true);
    tmp0_serialDesc.g4f('duration', true);
    tmp0_serialDesc.g4f('response', true);
    tmp0_serialDesc.g4f('extensions', true);
    this.rog_1 = tmp0_serialDesc;
  }
  protoOf($serializer_46).d44 = function () {
    return this.rog_1;
  };
  protoOf($serializer_46).x4f = function () {
    var tmp0_cached = Companion_getInstance_77().qog_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(BooleanSerializer_getInstance()), get_nullable(BooleanSerializer_getInstance()), get_nullable($serializer_getInstance_57()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(tmp0_cached[5])];
  };
  protoOf($serializer_46).f44 = function (decoder) {
    var tmp0_desc = this.rog_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_input = decoder.v47(tmp0_desc);
    var tmp11_cached = Companion_getInstance_77().qog_1;
    if (tmp10_input.k48()) {
      tmp4_local0 = tmp10_input.j48(tmp0_desc, 0, BooleanSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp10_input.j48(tmp0_desc, 1, BooleanSerializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp10_input.j48(tmp0_desc, 2, $serializer_getInstance_57(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp10_input.j48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp10_input.j48(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp10_input.j48(tmp0_desc, 5, tmp11_cached[5], tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp10_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp10_input.j48(tmp0_desc, 0, BooleanSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp10_input.j48(tmp0_desc, 1, BooleanSerializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp10_input.j48(tmp0_desc, 2, $serializer_getInstance_57(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp10_input.j48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp10_input.j48(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp10_input.j48(tmp0_desc, 5, tmp11_cached[5], tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp10_input.w47(tmp0_desc);
    return XapiResult_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, null);
  };
  protoOf($serializer_46).sog = function (encoder, value) {
    var tmp0_desc = this.rog_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    var tmp2_cached = Companion_getInstance_77().qog_1;
    if (tmp1_output.r49(tmp0_desc, 0) ? true : !(value.goc_1 == null)) {
      tmp1_output.n49(tmp0_desc, 0, BooleanSerializer_getInstance(), value.goc_1);
    }
    if (tmp1_output.r49(tmp0_desc, 1) ? true : !(value.hoc_1 == null)) {
      tmp1_output.n49(tmp0_desc, 1, BooleanSerializer_getInstance(), value.hoc_1);
    }
    if (tmp1_output.r49(tmp0_desc, 2) ? true : !(value.ioc_1 == null)) {
      tmp1_output.n49(tmp0_desc, 2, $serializer_getInstance_57(), value.ioc_1);
    }
    if (tmp1_output.r49(tmp0_desc, 3) ? true : !(value.joc_1 == null)) {
      tmp1_output.n49(tmp0_desc, 3, StringSerializer_getInstance(), value.joc_1);
    }
    if (tmp1_output.r49(tmp0_desc, 4) ? true : !(value.koc_1 == null)) {
      tmp1_output.n49(tmp0_desc, 4, StringSerializer_getInstance(), value.koc_1);
    }
    if (tmp1_output.r49(tmp0_desc, 5) ? true : !(value.loc_1 == null)) {
      tmp1_output.n49(tmp0_desc, 5, tmp2_cached[5], value.loc_1);
    }
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_46).e44 = function (encoder, value) {
    return this.sog(encoder, value instanceof XapiResult ? value : THROW_CCE());
  };
  var $serializer_instance_46;
  function $serializer_getInstance_58() {
    if ($serializer_instance_46 == null)
      new $serializer_46();
    return $serializer_instance_46;
  }
  function XapiResult_init_$Init$(seen1, completion, success, score, duration, response, extensions, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_58().rog_1);
    }
    if (0 === (seen1 & 1))
      $this.goc_1 = null;
    else
      $this.goc_1 = completion;
    if (0 === (seen1 & 2))
      $this.hoc_1 = null;
    else
      $this.hoc_1 = success;
    if (0 === (seen1 & 4))
      $this.ioc_1 = null;
    else
      $this.ioc_1 = score;
    if (0 === (seen1 & 8))
      $this.joc_1 = null;
    else
      $this.joc_1 = duration;
    if (0 === (seen1 & 16))
      $this.koc_1 = null;
    else
      $this.koc_1 = response;
    if (0 === (seen1 & 32))
      $this.loc_1 = null;
    else
      $this.loc_1 = extensions;
    return $this;
  }
  function XapiResult_init_$Create$(seen1, completion, success, score, duration, response, extensions, serializationConstructorMarker) {
    return XapiResult_init_$Init$(seen1, completion, success, score, duration, response, extensions, serializationConstructorMarker, objectCreate(protoOf(XapiResult)));
  }
  function XapiResult(completion, success, score, duration, response, extensions) {
    Companion_getInstance_77();
    completion = completion === VOID ? null : completion;
    success = success === VOID ? null : success;
    score = score === VOID ? null : score;
    duration = duration === VOID ? null : duration;
    response = response === VOID ? null : response;
    extensions = extensions === VOID ? null : extensions;
    this.goc_1 = completion;
    this.hoc_1 = success;
    this.ioc_1 = score;
    this.joc_1 = duration;
    this.koc_1 = response;
    this.loc_1 = extensions;
  }
  protoOf(XapiResult).toString = function () {
    return 'XapiResult(completion=' + this.goc_1 + ', success=' + this.hoc_1 + ', score=' + this.ioc_1 + ', duration=' + this.joc_1 + ', response=' + this.koc_1 + ', extensions=' + this.loc_1 + ')';
  };
  protoOf(XapiResult).hashCode = function () {
    var result = this.goc_1 == null ? 0 : getBooleanHashCode(this.goc_1);
    result = imul(result, 31) + (this.hoc_1 == null ? 0 : getBooleanHashCode(this.hoc_1)) | 0;
    result = imul(result, 31) + (this.ioc_1 == null ? 0 : this.ioc_1.hashCode()) | 0;
    result = imul(result, 31) + (this.joc_1 == null ? 0 : getStringHashCode(this.joc_1)) | 0;
    result = imul(result, 31) + (this.koc_1 == null ? 0 : getStringHashCode(this.koc_1)) | 0;
    result = imul(result, 31) + (this.loc_1 == null ? 0 : hashCode(this.loc_1)) | 0;
    return result;
  };
  protoOf(XapiResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiResult))
      return false;
    var tmp0_other_with_cast = other instanceof XapiResult ? other : THROW_CCE();
    if (!(this.goc_1 == tmp0_other_with_cast.goc_1))
      return false;
    if (!(this.hoc_1 == tmp0_other_with_cast.hoc_1))
      return false;
    if (!equals(this.ioc_1, tmp0_other_with_cast.ioc_1))
      return false;
    if (!(this.joc_1 == tmp0_other_with_cast.joc_1))
      return false;
    if (!(this.koc_1 == tmp0_other_with_cast.koc_1))
      return false;
    if (!equals(this.loc_1, tmp0_other_with_cast.loc_1))
      return false;
    return true;
  };
  function get_XAPI_PROGRESSED_EXTENSIONS() {
    _init_properties_XapiStatement_kt__raho1n();
    return XAPI_PROGRESSED_EXTENSIONS;
  }
  var XAPI_PROGRESSED_EXTENSIONS;
  function get_XAPI_RESULT_EXTENSION_PROGRESS() {
    return XAPI_RESULT_EXTENSION_PROGRESS;
  }
  var XAPI_RESULT_EXTENSION_PROGRESS;
  function Companion_61() {
    Companion_instance_109 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.coa_1 = [null, null, null, null, null, null, null, null, null, null, new ArrayListSerializer($serializer_getInstance_49()), null];
  }
  protoOf(Companion_61).a4r = function () {
    return $serializer_getInstance_59();
  };
  var Companion_instance_109;
  function Companion_getInstance_78() {
    if (Companion_instance_109 == null)
      new Companion_61();
    return Companion_instance_109;
  }
  function $serializer_47() {
    $serializer_instance_47 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiStatement', this, 12);
    tmp0_serialDesc.g4f('id', true);
    tmp0_serialDesc.g4f('actor', false);
    tmp0_serialDesc.g4f('verb', false);
    tmp0_serialDesc.g4f('object', false);
    tmp0_serialDesc.g4f('result', true);
    tmp0_serialDesc.g4f('context', true);
    tmp0_serialDesc.g4f('timestamp', true);
    tmp0_serialDesc.g4f('stored', true);
    tmp0_serialDesc.g4f('authority', true);
    tmp0_serialDesc.g4f('version', true);
    tmp0_serialDesc.g4f('attachments', true);
    tmp0_serialDesc.g4f('objectType', true);
    this.tog_1 = tmp0_serialDesc;
  }
  protoOf($serializer_47).d44 = function () {
    return this.tog_1;
  };
  protoOf($serializer_47).x4f = function () {
    var tmp0_cached = Companion_getInstance_78().coa_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), XapiActorSerializer_getInstance(), $serializer_getInstance_62(), XapiStatementObjectSerializer_getInstance(), get_nullable($serializer_getInstance_58()), get_nullable($serializer_getInstance_54()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(XapiActorSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(tmp0_cached[10]), get_nullable(XapiObjectTypeSerializer_instance)];
  };
  protoOf($serializer_47).f44 = function (decoder) {
    var tmp0_desc = this.tog_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_local6 = null;
    var tmp11_local7 = null;
    var tmp12_local8 = null;
    var tmp13_local9 = null;
    var tmp14_local10 = null;
    var tmp15_local11 = null;
    var tmp16_input = decoder.v47(tmp0_desc);
    var tmp17_cached = Companion_getInstance_78().coa_1;
    if (tmp16_input.k48()) {
      tmp4_local0 = tmp16_input.j48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp16_input.h48(tmp0_desc, 1, XapiActorSerializer_getInstance(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp16_input.h48(tmp0_desc, 2, $serializer_getInstance_62(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp16_input.h48(tmp0_desc, 3, XapiStatementObjectSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp16_input.j48(tmp0_desc, 4, $serializer_getInstance_58(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp16_input.j48(tmp0_desc, 5, $serializer_getInstance_54(), tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
      tmp10_local6 = tmp16_input.j48(tmp0_desc, 6, StringSerializer_getInstance(), tmp10_local6);
      tmp3_bitMask0 = tmp3_bitMask0 | 64;
      tmp11_local7 = tmp16_input.j48(tmp0_desc, 7, StringSerializer_getInstance(), tmp11_local7);
      tmp3_bitMask0 = tmp3_bitMask0 | 128;
      tmp12_local8 = tmp16_input.j48(tmp0_desc, 8, XapiActorSerializer_getInstance(), tmp12_local8);
      tmp3_bitMask0 = tmp3_bitMask0 | 256;
      tmp13_local9 = tmp16_input.j48(tmp0_desc, 9, StringSerializer_getInstance(), tmp13_local9);
      tmp3_bitMask0 = tmp3_bitMask0 | 512;
      tmp14_local10 = tmp16_input.j48(tmp0_desc, 10, tmp17_cached[10], tmp14_local10);
      tmp3_bitMask0 = tmp3_bitMask0 | 1024;
      tmp15_local11 = tmp16_input.j48(tmp0_desc, 11, XapiObjectTypeSerializer_instance, tmp15_local11);
      tmp3_bitMask0 = tmp3_bitMask0 | 2048;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp16_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp16_input.j48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp16_input.h48(tmp0_desc, 1, XapiActorSerializer_getInstance(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp16_input.h48(tmp0_desc, 2, $serializer_getInstance_62(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp16_input.h48(tmp0_desc, 3, XapiStatementObjectSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp16_input.j48(tmp0_desc, 4, $serializer_getInstance_58(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp16_input.j48(tmp0_desc, 5, $serializer_getInstance_54(), tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          case 6:
            tmp10_local6 = tmp16_input.j48(tmp0_desc, 6, StringSerializer_getInstance(), tmp10_local6);
            tmp3_bitMask0 = tmp3_bitMask0 | 64;
            break;
          case 7:
            tmp11_local7 = tmp16_input.j48(tmp0_desc, 7, StringSerializer_getInstance(), tmp11_local7);
            tmp3_bitMask0 = tmp3_bitMask0 | 128;
            break;
          case 8:
            tmp12_local8 = tmp16_input.j48(tmp0_desc, 8, XapiActorSerializer_getInstance(), tmp12_local8);
            tmp3_bitMask0 = tmp3_bitMask0 | 256;
            break;
          case 9:
            tmp13_local9 = tmp16_input.j48(tmp0_desc, 9, StringSerializer_getInstance(), tmp13_local9);
            tmp3_bitMask0 = tmp3_bitMask0 | 512;
            break;
          case 10:
            tmp14_local10 = tmp16_input.j48(tmp0_desc, 10, tmp17_cached[10], tmp14_local10);
            tmp3_bitMask0 = tmp3_bitMask0 | 1024;
            break;
          case 11:
            tmp15_local11 = tmp16_input.j48(tmp0_desc, 11, XapiObjectTypeSerializer_instance, tmp15_local11);
            tmp3_bitMask0 = tmp3_bitMask0 | 2048;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp16_input.w47(tmp0_desc);
    return XapiStatement_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, tmp11_local7, tmp12_local8, tmp13_local9, tmp14_local10, tmp15_local11, null);
  };
  protoOf($serializer_47).uog = function (encoder, value) {
    var tmp0_desc = this.tog_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    var tmp2_cached = Companion_getInstance_78().coa_1;
    if (tmp1_output.r49(tmp0_desc, 0) ? true : !(value.po9_1 == null)) {
      tmp1_output.n49(tmp0_desc, 0, StringSerializer_getInstance(), value.po9_1);
    }
    tmp1_output.l49(tmp0_desc, 1, XapiActorSerializer_getInstance(), value.qo9_1);
    tmp1_output.l49(tmp0_desc, 2, $serializer_getInstance_62(), value.ro9_1);
    tmp1_output.l49(tmp0_desc, 3, XapiStatementObjectSerializer_getInstance(), value.so9_1);
    if (tmp1_output.r49(tmp0_desc, 4) ? true : !(value.to9_1 == null)) {
      tmp1_output.n49(tmp0_desc, 4, $serializer_getInstance_58(), value.to9_1);
    }
    if (tmp1_output.r49(tmp0_desc, 5) ? true : !(value.uo9_1 == null)) {
      tmp1_output.n49(tmp0_desc, 5, $serializer_getInstance_54(), value.uo9_1);
    }
    if (tmp1_output.r49(tmp0_desc, 6) ? true : !(value.vo9_1 == null)) {
      tmp1_output.n49(tmp0_desc, 6, StringSerializer_getInstance(), value.vo9_1);
    }
    if (tmp1_output.r49(tmp0_desc, 7) ? true : !(value.wo9_1 == null)) {
      tmp1_output.n49(tmp0_desc, 7, StringSerializer_getInstance(), value.wo9_1);
    }
    if (tmp1_output.r49(tmp0_desc, 8) ? true : !(value.xo9_1 == null)) {
      tmp1_output.n49(tmp0_desc, 8, XapiActorSerializer_getInstance(), value.xo9_1);
    }
    if (tmp1_output.r49(tmp0_desc, 9) ? true : !(value.yo9_1 == null)) {
      tmp1_output.n49(tmp0_desc, 9, StringSerializer_getInstance(), value.yo9_1);
    }
    if (tmp1_output.r49(tmp0_desc, 10) ? true : !(value.zo9_1 == null)) {
      tmp1_output.n49(tmp0_desc, 10, tmp2_cached[10], value.zo9_1);
    }
    if (tmp1_output.r49(tmp0_desc, 11) ? true : !(value.aoa_1 == null)) {
      tmp1_output.n49(tmp0_desc, 11, XapiObjectTypeSerializer_instance, value.aoa_1);
    }
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_47).e44 = function (encoder, value) {
    return this.uog(encoder, value instanceof XapiStatement ? value : THROW_CCE());
  };
  var $serializer_instance_47;
  function $serializer_getInstance_59() {
    if ($serializer_instance_47 == null)
      new $serializer_47();
    return $serializer_instance_47;
  }
  function XapiStatement_init_$Init$(seen1, id, actor, verb, object, result, context, timestamp, stored, authority, version, attachments, objectType, serializationConstructorMarker, $this) {
    if (!(14 === (14 & seen1))) {
      throwMissingFieldException(seen1, 14, $serializer_getInstance_59().tog_1);
    }
    if (0 === (seen1 & 1))
      $this.po9_1 = null;
    else
      $this.po9_1 = id;
    $this.qo9_1 = actor;
    $this.ro9_1 = verb;
    $this.so9_1 = object;
    if (0 === (seen1 & 16))
      $this.to9_1 = null;
    else
      $this.to9_1 = result;
    if (0 === (seen1 & 32))
      $this.uo9_1 = null;
    else
      $this.uo9_1 = context;
    if (0 === (seen1 & 64))
      $this.vo9_1 = null;
    else
      $this.vo9_1 = timestamp;
    if (0 === (seen1 & 128))
      $this.wo9_1 = null;
    else
      $this.wo9_1 = stored;
    if (0 === (seen1 & 256))
      $this.xo9_1 = null;
    else
      $this.xo9_1 = authority;
    if (0 === (seen1 & 512))
      $this.yo9_1 = null;
    else
      $this.yo9_1 = version;
    if (0 === (seen1 & 1024))
      $this.zo9_1 = null;
    else
      $this.zo9_1 = attachments;
    if (0 === (seen1 & 2048))
      $this.aoa_1 = null;
    else
      $this.aoa_1 = objectType;
    return $this;
  }
  function XapiStatement_init_$Create$(seen1, id, actor, verb, object, result, context, timestamp, stored, authority, version, attachments, objectType, serializationConstructorMarker) {
    return XapiStatement_init_$Init$(seen1, id, actor, verb, object, result, context, timestamp, stored, authority, version, attachments, objectType, serializationConstructorMarker, objectCreate(protoOf(XapiStatement)));
  }
  function XapiStatement(id, actor, verb, object, result, context, timestamp, stored, authority, version, attachments, objectType) {
    Companion_getInstance_78();
    id = id === VOID ? null : id;
    result = result === VOID ? null : result;
    context = context === VOID ? null : context;
    timestamp = timestamp === VOID ? null : timestamp;
    stored = stored === VOID ? null : stored;
    authority = authority === VOID ? null : authority;
    version = version === VOID ? null : version;
    attachments = attachments === VOID ? null : attachments;
    objectType = objectType === VOID ? null : objectType;
    this.po9_1 = id;
    this.qo9_1 = actor;
    this.ro9_1 = verb;
    this.so9_1 = object;
    this.to9_1 = result;
    this.uo9_1 = context;
    this.vo9_1 = timestamp;
    this.wo9_1 = stored;
    this.xo9_1 = authority;
    this.yo9_1 = version;
    this.zo9_1 = attachments;
    this.aoa_1 = objectType;
  }
  protoOf(XapiStatement).poe = function () {
    return this.aoa_1;
  };
  protoOf(XapiStatement).vog = function (id, actor, verb, object, result, context, timestamp, stored, authority, version, attachments, objectType) {
    return new XapiStatement(id, actor, verb, object, result, context, timestamp, stored, authority, version, attachments, objectType);
  };
  protoOf(XapiStatement).boa = function (id, actor, verb, object, result, context, timestamp, stored, authority, version, attachments, objectType, $super) {
    id = id === VOID ? this.po9_1 : id;
    actor = actor === VOID ? this.qo9_1 : actor;
    verb = verb === VOID ? this.ro9_1 : verb;
    object = object === VOID ? this.so9_1 : object;
    result = result === VOID ? this.to9_1 : result;
    context = context === VOID ? this.uo9_1 : context;
    timestamp = timestamp === VOID ? this.vo9_1 : timestamp;
    stored = stored === VOID ? this.wo9_1 : stored;
    authority = authority === VOID ? this.xo9_1 : authority;
    version = version === VOID ? this.yo9_1 : version;
    attachments = attachments === VOID ? this.zo9_1 : attachments;
    objectType = objectType === VOID ? this.aoa_1 : objectType;
    return $super === VOID ? this.vog(id, actor, verb, object, result, context, timestamp, stored, authority, version, attachments, objectType) : $super.vog.call(this, id, actor, verb, object, result, context, timestamp, stored, authority, version, attachments, objectType);
  };
  protoOf(XapiStatement).toString = function () {
    return 'XapiStatement(id=' + this.po9_1 + ', actor=' + this.qo9_1 + ', verb=' + this.ro9_1 + ', object=' + this.so9_1 + ', result=' + this.to9_1 + ', context=' + this.uo9_1 + ', timestamp=' + this.vo9_1 + ', stored=' + this.wo9_1 + ', authority=' + this.xo9_1 + ', version=' + this.yo9_1 + ', attachments=' + this.zo9_1 + ', objectType=' + this.aoa_1 + ')';
  };
  protoOf(XapiStatement).hashCode = function () {
    var result = this.po9_1 == null ? 0 : getStringHashCode(this.po9_1);
    result = imul(result, 31) + hashCode(this.qo9_1) | 0;
    result = imul(result, 31) + this.ro9_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.so9_1) | 0;
    result = imul(result, 31) + (this.to9_1 == null ? 0 : this.to9_1.hashCode()) | 0;
    result = imul(result, 31) + (this.uo9_1 == null ? 0 : this.uo9_1.hashCode()) | 0;
    result = imul(result, 31) + (this.vo9_1 == null ? 0 : getStringHashCode(this.vo9_1)) | 0;
    result = imul(result, 31) + (this.wo9_1 == null ? 0 : getStringHashCode(this.wo9_1)) | 0;
    result = imul(result, 31) + (this.xo9_1 == null ? 0 : hashCode(this.xo9_1)) | 0;
    result = imul(result, 31) + (this.yo9_1 == null ? 0 : getStringHashCode(this.yo9_1)) | 0;
    result = imul(result, 31) + (this.zo9_1 == null ? 0 : hashCode(this.zo9_1)) | 0;
    result = imul(result, 31) + (this.aoa_1 == null ? 0 : this.aoa_1.hashCode()) | 0;
    return result;
  };
  protoOf(XapiStatement).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiStatement))
      return false;
    var tmp0_other_with_cast = other instanceof XapiStatement ? other : THROW_CCE();
    if (!(this.po9_1 == tmp0_other_with_cast.po9_1))
      return false;
    if (!equals(this.qo9_1, tmp0_other_with_cast.qo9_1))
      return false;
    if (!this.ro9_1.equals(tmp0_other_with_cast.ro9_1))
      return false;
    if (!equals(this.so9_1, tmp0_other_with_cast.so9_1))
      return false;
    if (!equals(this.to9_1, tmp0_other_with_cast.to9_1))
      return false;
    if (!equals(this.uo9_1, tmp0_other_with_cast.uo9_1))
      return false;
    if (!(this.vo9_1 == tmp0_other_with_cast.vo9_1))
      return false;
    if (!(this.wo9_1 == tmp0_other_with_cast.wo9_1))
      return false;
    if (!equals(this.xo9_1, tmp0_other_with_cast.xo9_1))
      return false;
    if (!(this.yo9_1 == tmp0_other_with_cast.yo9_1))
      return false;
    if (!equals(this.zo9_1, tmp0_other_with_cast.zo9_1))
      return false;
    if (!equals(this.aoa_1, tmp0_other_with_cast.aoa_1))
      return false;
    return true;
  };
  function StatementEntities(statementEntity, statementEntityJson, actorEntities, verbEntities, activityEntities) {
    statementEntity = statementEntity === VOID ? null : statementEntity;
    statementEntityJson = statementEntityJson === VOID ? null : statementEntityJson;
    actorEntities = actorEntities === VOID ? null : actorEntities;
    verbEntities = verbEntities === VOID ? null : verbEntities;
    activityEntities = activityEntities === VOID ? null : activityEntities;
    this.fo9_1 = statementEntity;
    this.go9_1 = statementEntityJson;
    this.ho9_1 = actorEntities;
    this.io9_1 = verbEntities;
    this.jo9_1 = activityEntities;
  }
  protoOf(StatementEntities).toString = function () {
    return 'StatementEntities(statementEntity=' + this.fo9_1 + ', statementEntityJson=' + this.go9_1 + ', actorEntities=' + this.ho9_1 + ', verbEntities=' + this.io9_1 + ', activityEntities=' + this.jo9_1 + ')';
  };
  protoOf(StatementEntities).hashCode = function () {
    var result = this.fo9_1 == null ? 0 : this.fo9_1.hashCode();
    result = imul(result, 31) + (this.go9_1 == null ? 0 : this.go9_1.hashCode()) | 0;
    result = imul(result, 31) + (this.ho9_1 == null ? 0 : hashCode(this.ho9_1)) | 0;
    result = imul(result, 31) + (this.io9_1 == null ? 0 : this.io9_1.hashCode()) | 0;
    result = imul(result, 31) + (this.jo9_1 == null ? 0 : hashCode(this.jo9_1)) | 0;
    return result;
  };
  protoOf(StatementEntities).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof StatementEntities))
      return false;
    var tmp0_other_with_cast = other instanceof StatementEntities ? other : THROW_CCE();
    if (!equals(this.fo9_1, tmp0_other_with_cast.fo9_1))
      return false;
    if (!equals(this.go9_1, tmp0_other_with_cast.go9_1))
      return false;
    if (!equals(this.ho9_1, tmp0_other_with_cast.ho9_1))
      return false;
    if (!equals(this.io9_1, tmp0_other_with_cast.io9_1))
      return false;
    if (!equals(this.jo9_1, tmp0_other_with_cast.jo9_1))
      return false;
    return true;
  };
  function toEntities_3(_this__u8e3s4, stringHasher, primaryKeyManager, hasherFactory, json, xapiSession, knownActorUidToPersonUidMap, exactJson, isSubStatement, endpoint) {
    isSubStatement = isSubStatement === VOID ? false : isSubStatement;
    _init_properties_XapiStatement_kt__raho1n();
    var tmp0_safe_receiver = _this__u8e3s4.po9_1;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
      tmp = uuidFrom(tmp0_safe_receiver);
    }
    var tmp1_elvis_lhs = tmp;
    var tmp_0;
    if (tmp1_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('id is null');
    } else {
      tmp_0 = tmp1_elvis_lhs;
    }
    var statementUuid = tmp_0;
    var tmp_1;
    if (isSubStatement) {
      var tmp_2 = _this__u8e3s4.so9_1;
      tmp_1 = tmp_2 instanceof XapiStatement;
    } else {
      tmp_1 = false;
    }
    if (tmp_1)
      throw new XapiException(400, 'SubStatement cannot have another nested subs== XapiObjectType.SubStatementtatement');
    var tmp2_safe_receiver = _this__u8e3s4.uo9_1;
    var contextRegistration = xapiRequireValidUuidOrNull(tmp2_safe_receiver == null ? null : tmp2_safe_receiver.uoe_1, 'Invalid context registration uuid');
    var statementActorEntities = toEntities_0(_this__u8e3s4.qo9_1, stringHasher, primaryKeyManager, hasherFactory, knownActorUidToPersonUidMap);
    var tmp3_safe_receiver = _this__u8e3s4.xo9_1;
    var authorityActor = tmp3_safe_receiver == null ? null : toEntities_0(tmp3_safe_receiver, stringHasher, primaryKeyManager, hasherFactory, knownActorUidToPersonUidMap);
    var tmp4_safe_receiver = _this__u8e3s4.uo9_1;
    var tmp5_safe_receiver = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.toe_1;
    var contextInstructorActorEntities = tmp5_safe_receiver == null ? null : toEntities_0(tmp5_safe_receiver, stringHasher, primaryKeyManager, hasherFactory, knownActorUidToPersonUidMap);
    var statementObjectForeignKeys = objectForeignKeys(_this__u8e3s4.so9_1, stringHasher, statementUuid);
    var tmp34_statementIdHi = statementUuid.pl7();
    var tmp35_statementIdLo = statementUuid.ql7();
    var tmp_3;
    var tmp_4;
    var tmp6_safe_receiver = _this__u8e3s4.qo9_1.doe();
    if ((tmp6_safe_receiver == null ? null : tmp6_safe_receiver.xoc_1) === endpoint.umj_1) {
      var tmp7_safe_receiver = _this__u8e3s4.qo9_1.doe();
      tmp_4 = (tmp7_safe_receiver == null ? null : tmp7_safe_receiver.yoc_1) === xapiSession.jix_1;
    } else {
      tmp_4 = false;
    }
    if (tmp_4) {
      tmp_3 = xapiSession.hix_1;
    } else {
      tmp_3 = new Long(0, 0);
    }
    var tmp36_statementActorPersonUid = tmp_3;
    var tmp37_statementActorUid = statementActorEntities.ko9_1.tid_1;
    var tmp9_safe_receiver = authorityActor == null ? null : authorityActor.ko9_1;
    var tmp10_elvis_lhs = tmp9_safe_receiver == null ? null : tmp9_safe_receiver.tid_1;
    var tmp38_authorityActorUid = tmp10_elvis_lhs == null ? new Long(0, 0) : tmp10_elvis_lhs;
    var tmp39_statementVerbUid = stringHasher.vod(xapiRequireValidIRI(_this__u8e3s4.ro9_1.wog_1, 'Statement ' + statementUuid + ' VerbID ' + _this__u8e3s4.ro9_1.wog_1 + ' is not a valid IRI'));
    var tmp11_safe_receiver = _this__u8e3s4.to9_1;
    var tmp40_resultCompletion = tmp11_safe_receiver == null ? null : tmp11_safe_receiver.goc_1;
    var tmp12_safe_receiver = _this__u8e3s4.to9_1;
    var tmp41_resultSuccess = tmp12_safe_receiver == null ? null : tmp12_safe_receiver.hoc_1;
    var tmp13_safe_receiver = _this__u8e3s4.to9_1;
    var tmp14_safe_receiver = tmp13_safe_receiver == null ? null : tmp13_safe_receiver.ioc_1;
    var tmp42_resultScoreScaled = tmp14_safe_receiver == null ? null : tmp14_safe_receiver.mog_1;
    var tmp15_safe_receiver = _this__u8e3s4.to9_1;
    var tmp16_safe_receiver = tmp15_safe_receiver == null ? null : tmp15_safe_receiver.ioc_1;
    var tmp43_resultScoreRaw = tmp16_safe_receiver == null ? null : tmp16_safe_receiver.nog_1;
    var tmp17_safe_receiver = _this__u8e3s4.to9_1;
    var tmp18_safe_receiver = tmp17_safe_receiver == null ? null : tmp17_safe_receiver.ioc_1;
    var tmp44_resultScoreMin = tmp18_safe_receiver == null ? null : tmp18_safe_receiver.oog_1;
    var tmp19_safe_receiver = _this__u8e3s4.to9_1;
    var tmp20_safe_receiver = tmp19_safe_receiver == null ? null : tmp19_safe_receiver.ioc_1;
    var tmp45_resultScoreMax = tmp20_safe_receiver == null ? null : tmp20_safe_receiver.pog_1;
    var tmp21_safe_receiver = _this__u8e3s4.to9_1;
    var tmp46_resultDuration = xapiRequireDurationOrNullAsLong(tmp21_safe_receiver == null ? null : tmp21_safe_receiver.joc_1);
    var tmp22_safe_receiver = _this__u8e3s4.to9_1;
    var tmp47_resultResponse = tmp22_safe_receiver == null ? null : tmp22_safe_receiver.koc_1;
    var tmp23_safe_receiver = _this__u8e3s4.vo9_1;
    var tmp_5;
    if (tmp23_safe_receiver == null) {
      tmp_5 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
      tmp_5 = xapiRequireTimestampAsLong(tmp23_safe_receiver);
    }
    var tmp24_elvis_lhs = tmp_5;
    var tmp48_timestamp = tmp24_elvis_lhs == null ? systemTimeInMillis() : tmp24_elvis_lhs;
    var tmp49_stored = systemTimeInMillis();
    var tmp26_elvis_lhs = contextRegistration == null ? null : contextRegistration.pl7();
    var tmp50_contextRegistrationHi = tmp26_elvis_lhs == null ? new Long(0, 0) : tmp26_elvis_lhs;
    var tmp28_elvis_lhs = contextRegistration == null ? null : contextRegistration.ql7();
    var tmp51_contextRegistrationLo = tmp28_elvis_lhs == null ? new Long(0, 0) : tmp28_elvis_lhs;
    var tmp29_safe_receiver = _this__u8e3s4.uo9_1;
    var tmp52_contextPlatform = tmp29_safe_receiver == null ? null : tmp29_safe_receiver.woe_1;
    var tmp31_safe_receiver = contextInstructorActorEntities == null ? null : contextInstructorActorEntities.ko9_1;
    var tmp32_elvis_lhs = tmp31_safe_receiver == null ? null : tmp31_safe_receiver.tid_1;
    var tmp53_contextInstructorActorUid = tmp32_elvis_lhs == null ? new Long(0, 0) : tmp32_elvis_lhs;
    var tmp54_statementContentEntryUid = xapiSession.mix_1;
    var tmp55_statementClazzUid = xapiSession.kix_1;
    var tmp56_statementCbUid = xapiSession.lix_1;
    var tmp_6;
    if (isCompletionOrProgress(_this__u8e3s4)) {
      var tmp_7;
      if (xapiSession.mix_1.equals(new Long(0, 0))) {
        tmp_7 = true;
      } else {
        var tmp_8 = _this__u8e3s4.so9_1;
        var tmp33_safe_receiver = tmp_8 instanceof XapiActivityStatementObject ? tmp_8 : null;
        tmp_7 = (tmp33_safe_receiver == null ? null : tmp33_safe_receiver.qof_1) === xapiSession.oix_1;
      }
      tmp_6 = tmp_7;
    } else {
      tmp_6 = false;
    }
    var tmp57_completionOrProgress = tmp_6;
    var tmp58_extensionProgress = get_resultProgressExtension(_this__u8e3s4);
    var tmp59_statementObjectType = get_objectTypeFlag(_this__u8e3s4.so9_1);
    var tmp60_statementObjectUid1 = statementObjectForeignKeys.w6_1;
    var tmp61_statementObjectUid2 = statementObjectForeignKeys.x6_1;
    var tmp_9 = new StatementEntity(tmp34_statementIdHi, tmp35_statementIdLo, tmp36_statementActorPersonUid, tmp39_statementVerbUid, tmp59_statementObjectType, tmp60_statementObjectUid1, tmp61_statementObjectUid2, tmp37_statementActorUid, tmp38_authorityActorUid, VOID, tmp40_resultCompletion, tmp41_resultSuccess, tmp42_resultScoreScaled, tmp43_resultScoreRaw, tmp44_resultScoreMin, tmp45_resultScoreMax, tmp46_resultDuration, tmp47_resultResponse, tmp48_timestamp, tmp49_stored, tmp50_contextRegistrationHi, tmp51_contextRegistrationLo, tmp52_contextPlatform, VOID, VOID, tmp53_contextInstructorActorUid, VOID, tmp58_extensionProgress, tmp57_completionOrProgress, tmp54_statementContentEntryUid, VOID, tmp55_statementClazzUid, tmp56_statementCbUid, VOID, isSubStatement);
    var tmp_10 = new StatementEntityJson(statementUuid.pl7(), statementUuid.ql7(), VOID, exactJson);
    // Inline function 'kotlin.collections.buildList' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildListInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = ArrayList_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>' call
    this_0.i1(statementActorEntities);
    if (contextInstructorActorEntities == null)
      null;
    else {
      // Inline function 'kotlin.also' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.xapi.model.toEntities.<anonymous>.<anonymous>' call
      this_0.i1(contextInstructorActorEntities);
    }
    var tmp_11 = this_0.f3();
    var tmp_12 = toVerbEntities(_this__u8e3s4.ro9_1, stringHasher);
    var tmp62_safe_receiver = _this__u8e3s4.uo9_1;
    var tmp63_safe_receiver = tmp62_safe_receiver == null ? null : tmp62_safe_receiver.aof_1;
    return plus(listOf_0(new StatementEntities(tmp_9, tmp_10, tmp_11, tmp_12, toEmptyIfNull(tmp63_safe_receiver == null ? null : toEntities_1(tmp63_safe_receiver, stringHasher, json, statementUuid)))), objectToEntities(_this__u8e3s4.so9_1, stringHasher, primaryKeyManager, hasherFactory, json, xapiSession, knownActorUidToPersonUidMap, statementUuid, endpoint));
  }
  function isCompletionOrProgress(_this__u8e3s4) {
    _init_properties_XapiStatement_kt__raho1n();
    var tmp;
    var tmp0_safe_receiver = _this__u8e3s4.to9_1;
    if (!((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.goc_1) == null)) {
      tmp = true;
    } else {
      tmp = !(get_resultProgressExtension(_this__u8e3s4) == null);
    }
    return tmp;
  }
  var properties_initialized_XapiStatement_kt_2xltj7;
  function _init_properties_XapiStatement_kt__raho1n() {
    if (!properties_initialized_XapiStatement_kt_2xltj7) {
      properties_initialized_XapiStatement_kt_2xltj7 = true;
      XAPI_PROGRESSED_EXTENSIONS = listOf(['https://w3id.org/xapi/cmi5/result/extensions/progress', 'http://w3id.org/xapi/cmi5/result/extensions/progress']);
    }
  }
  function XapiStatementObject() {
  }
  function XapiStatementObjectSerializer() {
    XapiStatementObjectSerializer_instance = this;
    JsonContentPolymorphicSerializer.call(this, getKClass(XapiStatementObject));
  }
  protoOf(XapiStatementObjectSerializer).y4q = function (element) {
    var tmp0_safe_receiver = get_jsonObject(element).ba('objectType');
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : get_jsonPrimitive(tmp0_safe_receiver);
    var tmp;
    if (tmp1_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.takeIf' call
      // Inline function 'kotlin.contracts.contract' call
      var tmp_0;
      // Inline function 'com.ustadmobile.core.domain.xapi.model.XapiStatementObjectSerializer.selectDeserializer.<anonymous>' call
      if (!(tmp1_safe_receiver instanceof JsonNull)) {
        tmp_0 = tmp1_safe_receiver;
      } else {
        tmp_0 = null;
      }
      tmp = tmp_0;
    }
    var tmp2_safe_receiver = tmp;
    var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.t3a();
    var tmp_1;
    if (tmp3_safe_receiver == null) {
      tmp_1 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.domain.xapi.model.XapiStatementObjectSerializer.selectDeserializer.<anonymous>' call
      tmp_1 = valueOf(tmp3_safe_receiver);
    }
    var tmp4_elvis_lhs = tmp_1;
    var objectType = tmp4_elvis_lhs == null ? XapiObjectType_Activity_getInstance() : tmp4_elvis_lhs;
    var tmp_2;
    switch (objectType.za_1) {
      case 2:
        tmp_2 = Companion_instance_110.a4r();
        break;
      case 3:
        tmp_2 = Companion_instance_100.a4r();
        break;
      case 4:
        tmp_2 = Companion_getInstance_73().a4r();
        break;
      case 0:
        tmp_2 = Companion_instance_111.a4r();
        break;
      case 1:
        tmp_2 = Companion_getInstance_78().a4r();
        break;
      default:
        throw new XapiException(400, 'Statement object type invalid');
    }
    return tmp_2;
  };
  var XapiStatementObjectSerializer_instance;
  function XapiStatementObjectSerializer_getInstance() {
    if (XapiStatementObjectSerializer_instance == null)
      new XapiStatementObjectSerializer();
    return XapiStatementObjectSerializer_instance;
  }
  function Companion_62() {
  }
  protoOf(Companion_62).a4r = function () {
    return $serializer_getInstance_60();
  };
  var Companion_instance_110;
  function Companion_getInstance_79() {
    return Companion_instance_110;
  }
  function $serializer_48() {
    $serializer_instance_48 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiActivityStatementObject', this, 3);
    tmp0_serialDesc.g4f('objectType', true);
    tmp0_serialDesc.g4f('id', false);
    tmp0_serialDesc.g4f('definition', true);
    this.aoh_1 = tmp0_serialDesc;
  }
  protoOf($serializer_48).d44 = function () {
    return this.aoh_1;
  };
  protoOf($serializer_48).x4f = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(XapiObjectTypeSerializer_instance), StringSerializer_getInstance(), get_nullable($serializer_getInstance_52())];
  };
  protoOf($serializer_48).f44 = function (decoder) {
    var tmp0_desc = this.aoh_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_input = decoder.v47(tmp0_desc);
    if (tmp7_input.k48()) {
      tmp4_local0 = tmp7_input.j48(tmp0_desc, 0, XapiObjectTypeSerializer_instance, tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp7_input.f48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp7_input.j48(tmp0_desc, 2, $serializer_getInstance_52(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp7_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp7_input.j48(tmp0_desc, 0, XapiObjectTypeSerializer_instance, tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp7_input.f48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp7_input.j48(tmp0_desc, 2, $serializer_getInstance_52(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp7_input.w47(tmp0_desc);
    return XapiActivityStatementObject_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
  };
  protoOf($serializer_48).boh = function (encoder, value) {
    var tmp0_desc = this.aoh_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    if (tmp1_output.r49(tmp0_desc, 0) ? true : !(value.pof_1 == null)) {
      tmp1_output.n49(tmp0_desc, 0, XapiObjectTypeSerializer_instance, value.pof_1);
    }
    tmp1_output.j49(tmp0_desc, 1, value.qof_1);
    if (tmp1_output.r49(tmp0_desc, 2) ? true : !(value.rof_1 == null)) {
      tmp1_output.n49(tmp0_desc, 2, $serializer_getInstance_52(), value.rof_1);
    }
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_48).e44 = function (encoder, value) {
    return this.boh(encoder, value instanceof XapiActivityStatementObject ? value : THROW_CCE());
  };
  var $serializer_instance_48;
  function $serializer_getInstance_60() {
    if ($serializer_instance_48 == null)
      new $serializer_48();
    return $serializer_instance_48;
  }
  function XapiActivityStatementObject_init_$Init$(seen1, objectType, id, definition, serializationConstructorMarker, $this) {
    if (!(2 === (2 & seen1))) {
      throwMissingFieldException(seen1, 2, $serializer_getInstance_60().aoh_1);
    }
    if (0 === (seen1 & 1))
      $this.pof_1 = null;
    else
      $this.pof_1 = objectType;
    $this.qof_1 = id;
    if (0 === (seen1 & 4))
      $this.rof_1 = null;
    else
      $this.rof_1 = definition;
    return $this;
  }
  function XapiActivityStatementObject_init_$Create$(seen1, objectType, id, definition, serializationConstructorMarker) {
    return XapiActivityStatementObject_init_$Init$(seen1, objectType, id, definition, serializationConstructorMarker, objectCreate(protoOf(XapiActivityStatementObject)));
  }
  function XapiActivityStatementObject(objectType, id, definition) {
    objectType = objectType === VOID ? null : objectType;
    definition = definition === VOID ? null : definition;
    this.pof_1 = objectType;
    this.qof_1 = id;
    this.rof_1 = definition;
  }
  protoOf(XapiActivityStatementObject).poe = function () {
    return this.pof_1;
  };
  protoOf(XapiActivityStatementObject).toString = function () {
    return 'XapiActivityStatementObject(objectType=' + this.pof_1 + ', id=' + this.qof_1 + ', definition=' + this.rof_1 + ')';
  };
  protoOf(XapiActivityStatementObject).hashCode = function () {
    var result = this.pof_1 == null ? 0 : this.pof_1.hashCode();
    result = imul(result, 31) + getStringHashCode(this.qof_1) | 0;
    result = imul(result, 31) + (this.rof_1 == null ? 0 : this.rof_1.hashCode()) | 0;
    return result;
  };
  protoOf(XapiActivityStatementObject).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiActivityStatementObject))
      return false;
    var tmp0_other_with_cast = other instanceof XapiActivityStatementObject ? other : THROW_CCE();
    if (!equals(this.pof_1, tmp0_other_with_cast.pof_1))
      return false;
    if (!(this.qof_1 === tmp0_other_with_cast.qof_1))
      return false;
    if (!equals(this.rof_1, tmp0_other_with_cast.rof_1))
      return false;
    return true;
  };
  function objectForeignKeys(_this__u8e3s4, stringHasher, statementUuid) {
    var tmp;
    if (_this__u8e3s4 instanceof XapiActivityStatementObject) {
      tmp = new Pair(stringHasher.vod(_this__u8e3s4.qof_1), new Long(0, 0));
    } else {
      if (_this__u8e3s4 instanceof XapiAgent) {
        tmp = new Pair(identifierHash(_this__u8e3s4, stringHasher), new Long(0, 0));
      } else {
        if (_this__u8e3s4 instanceof XapiGroup) {
          tmp = new Pair(identifierHash(_this__u8e3s4, stringHasher), new Long(0, 0));
        } else {
          if (_this__u8e3s4 instanceof XapiStatementRef) {
            var uuid = uuidFrom(_this__u8e3s4.doh_1);
            tmp = new Pair(uuid.pl7(), uuid.ql7());
          } else {
            if (_this__u8e3s4 instanceof XapiStatement) {
              var tmp_0 = statementUuid.pl7();
              // Inline function 'kotlin.Long.plus' call
              var tmp$ret$0 = statementUuid.ql7().lc(toLong(1));
              tmp = new Pair(tmp_0, tmp$ret$0);
            } else {
              noWhenBranchMatchedException();
            }
          }
        }
      }
    }
    return tmp;
  }
  function objectToEntities(_this__u8e3s4, stringHasher, primaryKeyManager, hasherFactory, json, xapiSession, knownActorUidToPersonUidMap, parentStatementUuid, endpoint) {
    var tmp;
    if (_this__u8e3s4 instanceof XapiActivityStatementObject) {
      tmp = listOf_0(new StatementEntities(VOID, VOID, VOID, VOID, listOf_0(toEntities(_this__u8e3s4.rof_1, _this__u8e3s4.qof_1, stringHasher, json))));
    } else {
      if (isInterface(_this__u8e3s4, XapiActor)) {
        tmp = listOf_0(new StatementEntities(VOID, VOID, listOf_0(toEntities_0(_this__u8e3s4, stringHasher, primaryKeyManager, hasherFactory, knownActorUidToPersonUidMap))));
      } else {
        if (_this__u8e3s4 instanceof XapiStatementRef) {
          tmp = emptyList();
        } else {
          if (_this__u8e3s4 instanceof XapiStatement) {
            var tmp_0 = parentStatementUuid.pl7();
            // Inline function 'kotlin.Long.plus' call
            var tmp$ret$0 = parentStatementUuid.ql7().lc(toLong(1));
            tmp = toEntities_3(_this__u8e3s4.boa(Uuid_init_$Create$(tmp_0, tmp$ret$0).toString()), stringHasher, primaryKeyManager, hasherFactory, json, xapiSession, knownActorUidToPersonUidMap, null, true, endpoint);
          } else {
            throw IllegalStateException_init_$Create$('This cant really happen. The compiler does not recognize XapiActor as covering XapiGroup and XapiAgent, but it does.');
          }
        }
      }
    }
    return tmp;
  }
  function get_objectTypeFlag(_this__u8e3s4) {
    var tmp0_safe_receiver = _this__u8e3s4.poe();
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : get_typeFlag(tmp0_safe_receiver);
    var tmp;
    if (tmp1_elvis_lhs == null) {
      tmp = 5;
    } else {
      tmp = tmp1_elvis_lhs;
    }
    return tmp;
  }
  function Companion_63() {
  }
  protoOf(Companion_63).a4r = function () {
    return $serializer_getInstance_61();
  };
  var Companion_instance_111;
  function Companion_getInstance_80() {
    return Companion_instance_111;
  }
  function $serializer_49() {
    $serializer_instance_49 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiStatementRef', this, 2);
    tmp0_serialDesc.g4f('objectType', false);
    tmp0_serialDesc.g4f('id', false);
    this.eoh_1 = tmp0_serialDesc;
  }
  protoOf($serializer_49).d44 = function () {
    return this.eoh_1;
  };
  protoOf($serializer_49).x4f = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [XapiObjectTypeSerializer_instance, StringSerializer_getInstance()];
  };
  protoOf($serializer_49).f44 = function (decoder) {
    var tmp0_desc = this.eoh_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.v47(tmp0_desc);
    if (tmp6_input.k48()) {
      tmp4_local0 = tmp6_input.h48(tmp0_desc, 0, XapiObjectTypeSerializer_instance, tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.f48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.h48(tmp0_desc, 0, XapiObjectTypeSerializer_instance, tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.f48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.w47(tmp0_desc);
    return XapiStatementRef_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_49).foh = function (encoder, value) {
    var tmp0_desc = this.eoh_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    tmp1_output.l49(tmp0_desc, 0, XapiObjectTypeSerializer_instance, value.coh_1);
    tmp1_output.j49(tmp0_desc, 1, value.doh_1);
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_49).e44 = function (encoder, value) {
    return this.foh(encoder, value instanceof XapiStatementRef ? value : THROW_CCE());
  };
  var $serializer_instance_49;
  function $serializer_getInstance_61() {
    if ($serializer_instance_49 == null)
      new $serializer_49();
    return $serializer_instance_49;
  }
  function XapiStatementRef_init_$Init$(seen1, objectType, id, serializationConstructorMarker, $this) {
    if (!(3 === (3 & seen1))) {
      throwMissingFieldException(seen1, 3, $serializer_getInstance_61().eoh_1);
    }
    $this.coh_1 = objectType;
    $this.doh_1 = id;
    return $this;
  }
  function XapiStatementRef_init_$Create$(seen1, objectType, id, serializationConstructorMarker) {
    return XapiStatementRef_init_$Init$(seen1, objectType, id, serializationConstructorMarker, objectCreate(protoOf(XapiStatementRef)));
  }
  function XapiStatementRef() {
  }
  protoOf(XapiStatementRef).poe = function () {
    return this.coh_1;
  };
  protoOf(XapiStatementRef).toString = function () {
    return 'XapiStatementRef(objectType=' + this.coh_1 + ', id=' + this.doh_1 + ')';
  };
  protoOf(XapiStatementRef).hashCode = function () {
    var result = this.coh_1.hashCode();
    result = imul(result, 31) + getStringHashCode(this.doh_1) | 0;
    return result;
  };
  protoOf(XapiStatementRef).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiStatementRef))
      return false;
    var tmp0_other_with_cast = other instanceof XapiStatementRef ? other : THROW_CCE();
    if (!this.coh_1.equals(tmp0_other_with_cast.coh_1))
      return false;
    if (!(this.doh_1 === tmp0_other_with_cast.doh_1))
      return false;
    return true;
  };
  function Companion_64() {
    Companion_instance_112 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.goh_1 = [null, new LinkedHashMapSerializer(StringSerializer_getInstance(), StringSerializer_getInstance())];
  }
  var Companion_instance_112;
  function Companion_getInstance_81() {
    if (Companion_instance_112 == null)
      new Companion_64();
    return Companion_instance_112;
  }
  function $serializer_50() {
    $serializer_instance_50 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.model.XapiVerb', this, 2);
    tmp0_serialDesc.g4f('id', true);
    tmp0_serialDesc.g4f('display', true);
    this.hoh_1 = tmp0_serialDesc;
  }
  protoOf($serializer_50).d44 = function () {
    return this.hoh_1;
  };
  protoOf($serializer_50).x4f = function () {
    var tmp0_cached = Companion_getInstance_81().goh_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable(StringSerializer_getInstance()), get_nullable(tmp0_cached[1])];
  };
  protoOf($serializer_50).f44 = function (decoder) {
    var tmp0_desc = this.hoh_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.v47(tmp0_desc);
    var tmp7_cached = Companion_getInstance_81().goh_1;
    if (tmp6_input.k48()) {
      tmp4_local0 = tmp6_input.j48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.j48(tmp0_desc, 1, tmp7_cached[1], tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.j48(tmp0_desc, 0, StringSerializer_getInstance(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.j48(tmp0_desc, 1, tmp7_cached[1], tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.w47(tmp0_desc);
    return XapiVerb_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_50).ioh = function (encoder, value) {
    var tmp0_desc = this.hoh_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    var tmp2_cached = Companion_getInstance_81().goh_1;
    if (tmp1_output.r49(tmp0_desc, 0) ? true : !(value.wog_1 == null)) {
      tmp1_output.n49(tmp0_desc, 0, StringSerializer_getInstance(), value.wog_1);
    }
    if (tmp1_output.r49(tmp0_desc, 1) ? true : !(value.xog_1 == null)) {
      tmp1_output.n49(tmp0_desc, 1, tmp2_cached[1], value.xog_1);
    }
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_50).e44 = function (encoder, value) {
    return this.ioh(encoder, value instanceof XapiVerb ? value : THROW_CCE());
  };
  var $serializer_instance_50;
  function $serializer_getInstance_62() {
    if ($serializer_instance_50 == null)
      new $serializer_50();
    return $serializer_instance_50;
  }
  function XapiVerb_init_$Init$(seen1, id, display, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_62().hoh_1);
    }
    if (0 === (seen1 & 1))
      $this.wog_1 = null;
    else
      $this.wog_1 = id;
    if (0 === (seen1 & 2))
      $this.xog_1 = null;
    else
      $this.xog_1 = display;
    return $this;
  }
  function XapiVerb_init_$Create$(seen1, id, display, serializationConstructorMarker) {
    return XapiVerb_init_$Init$(seen1, id, display, serializationConstructorMarker, objectCreate(protoOf(XapiVerb)));
  }
  function XapiVerb(id, display) {
    Companion_getInstance_81();
    id = id === VOID ? null : id;
    display = display === VOID ? null : display;
    this.wog_1 = id;
    this.xog_1 = display;
  }
  protoOf(XapiVerb).toString = function () {
    return 'XapiVerb(id=' + this.wog_1 + ', display=' + this.xog_1 + ')';
  };
  protoOf(XapiVerb).hashCode = function () {
    var result = this.wog_1 == null ? 0 : getStringHashCode(this.wog_1);
    result = imul(result, 31) + (this.xog_1 == null ? 0 : hashCode(this.xog_1)) | 0;
    return result;
  };
  protoOf(XapiVerb).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiVerb))
      return false;
    var tmp0_other_with_cast = other instanceof XapiVerb ? other : THROW_CCE();
    if (!(this.wog_1 == tmp0_other_with_cast.wog_1))
      return false;
    if (!equals(this.xog_1, tmp0_other_with_cast.xog_1))
      return false;
    return true;
  };
  function get_VERB_COMPLETED() {
    return VERB_COMPLETED;
  }
  var VERB_COMPLETED;
  function VerbEntities(verbEntity, verbLangMapEntries) {
    this.no9_1 = verbEntity;
    this.oo9_1 = verbLangMapEntries;
  }
  protoOf(VerbEntities).toString = function () {
    return 'VerbEntities(verbEntity=' + this.no9_1 + ', verbLangMapEntries=' + this.oo9_1 + ')';
  };
  protoOf(VerbEntities).hashCode = function () {
    var result = this.no9_1.hashCode();
    result = imul(result, 31) + hashCode(this.oo9_1) | 0;
    return result;
  };
  protoOf(VerbEntities).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof VerbEntities))
      return false;
    var tmp0_other_with_cast = other instanceof VerbEntities ? other : THROW_CCE();
    if (!this.no9_1.equals(tmp0_other_with_cast.no9_1))
      return false;
    if (!equals(this.oo9_1, tmp0_other_with_cast.oo9_1))
      return false;
    return true;
  };
  function toVerbEntities(_this__u8e3s4, xxHasher) {
    var verbIri = xapiRequireValidIRI(_this__u8e3s4.wog_1);
    var verbUid = xxHasher.vod(verbIri);
    var tmp = new VerbEntity(verbUid, _this__u8e3s4.wog_1);
    var tmp0_safe_receiver = _this__u8e3s4.xog_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.q2();
    var tmp_0;
    if (tmp1_safe_receiver == null) {
      tmp_0 = null;
    } else {
      // Inline function 'kotlin.collections.map' call
      // Inline function 'kotlin.collections.mapTo' call
      var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp1_safe_receiver, 10));
      var tmp0_iterator = tmp1_safe_receiver.w();
      while (tmp0_iterator.f()) {
        var item = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.domain.xapi.model.toVerbEntities.<anonymous>' call
        var tmp0_vlmeLangHash = xxHasher.vod(item.s2());
        var tmp1_vlmeEntryString = item.t2();
        var tmp2_vlmeLangCode = item.s2();
        var tmp$ret$0 = new VerbLangMapEntry(verbUid, tmp0_vlmeLangHash, tmp2_vlmeLangCode, tmp1_vlmeEntryString);
        destination.i1(tmp$ret$0);
      }
      tmp_0 = destination;
    }
    var tmp2_elvis_lhs = tmp_0;
    return new VerbEntities(tmp, tmp2_elvis_lhs == null ? emptyList() : tmp2_elvis_lhs);
  }
  function get_VERB_PROGRESSED() {
    return VERB_PROGRESSED;
  }
  var VERB_PROGRESSED;
  function createXapiStatement($this, totalDuration, progress, isComplete) {
    var tmp = agent($this.moh_1, $this.poh_1);
    var tmp_0;
    if (isComplete === true) {
      tmp_0 = get_VERB_COMPLETED();
    } else {
      tmp_0 = get_VERB_PROGRESSED();
    }
    var tmp_1 = new XapiVerb(tmp_0);
    var tmp_2 = $this.ooh_1();
    // Inline function 'kotlin.time.Companion.milliseconds' call
    Companion_getInstance_8();
    var tmp$ret$0 = toDuration(totalDuration, DurationUnit_MILLISECONDS_getInstance());
    return new XapiStatement(VOID, tmp, tmp_1, tmp_2, new XapiResult(isComplete, VOID, VOID, Duration__toIsoString_impl_9h6wsm(tmp$ret$0), VOID, mapOf_0(to(get_XAPI_RESULT_EXTENSION_PROGRESS(), JsonPrimitive(progress)))));
  }
  function createFinalStatement($this) {
    $this.toh(false);
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.atomicfu.getAndUpdate' call
      var this_0 = $this.qoh_1;
      while (true) {
        var cur = this_0.kotlinx$atomicfu$value;
        // Inline function 'com.ustadmobile.core.domain.xapi.noninteractivecontentusagestatementrecorder.NonInteractiveContentXapiStatementRecorder.createFinalStatement.<anonymous>' call
        var upd = new Long(0, 0);
        if (this_0.atomicfu$compareAndSet(cur, upd)) {
          tmp$ret$1 = cur;
          break $l$block;
        }
      }
    }
    var usageDurationVal = tmp$ret$1;
    var tmp$ret$3;
    $l$block_0: {
      // Inline function 'kotlinx.atomicfu.getAndUpdate' call
      var this_1 = $this.roh_1;
      while (true) {
        var cur_0 = this_1.kotlinx$atomicfu$value;
        // Inline function 'com.ustadmobile.core.domain.xapi.noninteractivecontentusagestatementrecorder.NonInteractiveContentXapiStatementRecorder.createFinalStatement.<anonymous>' call
        var upd_0 = 0;
        if (this_1.atomicfu$compareAndSet(cur_0, upd_0)) {
          tmp$ret$3 = cur_0;
          break $l$block_0;
        }
      }
    }
    var maxProgressVal = tmp$ret$3;
    return createXapiStatement($this, usageDurationVal, maxProgressVal, false);
  }
  function NonInteractiveContentXapiStatementRecorder$onActiveChanged$lambda($active) {
    return function () {
      return 'ContentUsageStatementRecorder: active=' + $active;
    };
  }
  function NonInteractiveContentXapiStatementRecorder$onComplete$slambda(this$0, $usageDurationVal, $timeSinceActive, resultContinuation) {
    this.coi_1 = this$0;
    this.doi_1 = $usageDurationVal;
    this.eoi_1 = $timeSinceActive;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(NonInteractiveContentXapiStatementRecorder$onComplete$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(NonInteractiveContentXapiStatementRecorder$onComplete$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(NonInteractiveContentXapiStatementRecorder$onComplete$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.coi_1.loh_1.on7(listOf_0(createXapiStatement(this.coi_1, this.doi_1.lc(this.eoi_1), 100, true)), this.coi_1.moh_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(NonInteractiveContentXapiStatementRecorder$onComplete$slambda).v1m = function ($this$launch, completion) {
    var i = new NonInteractiveContentXapiStatementRecorder$onComplete$slambda(this.coi_1, this.doi_1, this.eoi_1, completion);
    i.foi_1 = $this$launch;
    return i;
  };
  function NonInteractiveContentXapiStatementRecorder$onComplete$slambda_0(this$0, $usageDurationVal, $timeSinceActive, resultContinuation) {
    var i = new NonInteractiveContentXapiStatementRecorder$onComplete$slambda(this$0, $usageDurationVal, $timeSinceActive, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function NonInteractiveContentXapiStatementRecorder(saveStatementOnClearUseCase, saveStatementOnUnloadUseCase, xapiStatementResource, xapiSession, scope, xapiActivityProvider, endpoint) {
    this.joh_1 = saveStatementOnClearUseCase;
    this.koh_1 = saveStatementOnUnloadUseCase;
    this.loh_1 = xapiStatementResource;
    this.moh_1 = xapiSession;
    this.noh_1 = scope;
    this.ooh_1 = xapiActivityProvider;
    this.poh_1 = endpoint;
    this.qoh_1 = atomic$long$1(new Long(0, 0));
    this.roh_1 = atomic$int$1(0);
    this.soh_1 = atomic$long$1(new Long(0, 0));
  }
  protoOf(NonInteractiveContentXapiStatementRecorder).toh = function (active) {
    var tmp = Napier_getInstance();
    tmp.r5d(VOID, VOID, NonInteractiveContentXapiStatementRecorder$onActiveChanged$lambda(active));
    if (active) {
      $l$block: {
        // Inline function 'kotlinx.atomicfu.update' call
        var this_0 = this.soh_1;
        while (true) {
          var cur = this_0.kotlinx$atomicfu$value;
          // Inline function 'com.ustadmobile.core.domain.xapi.noninteractivecontentusagestatementrecorder.NonInteractiveContentXapiStatementRecorder.onActiveChanged.<anonymous>' call
          var upd = cur.equals(new Long(0, 0)) ? systemTimeInMillis() : cur;
          if (this_0.atomicfu$compareAndSet(cur, upd)) {
            break $l$block;
          }
        }
      }
    } else {
      var tmp$ret$3;
      $l$block_0: {
        // Inline function 'kotlinx.atomicfu.getAndUpdate' call
        var this_1 = this.soh_1;
        while (true) {
          var cur_0 = this_1.kotlinx$atomicfu$value;
          // Inline function 'com.ustadmobile.core.domain.xapi.noninteractivecontentusagestatementrecorder.NonInteractiveContentXapiStatementRecorder.onActiveChanged.<anonymous>' call
          var upd_0 = new Long(0, 0);
          if (this_1.atomicfu$compareAndSet(cur_0, upd_0)) {
            tmp$ret$3 = cur_0;
            break $l$block_0;
          }
        }
      }
      var activeStarted = tmp$ret$3;
      if (!activeStarted.equals(new Long(0, 0))) {
        $l$block_1: {
          // Inline function 'kotlinx.atomicfu.update' call
          var this_2 = this.qoh_1;
          while (true) {
            var cur_1 = this_2.kotlinx$atomicfu$value;
            // Inline function 'com.ustadmobile.core.domain.xapi.noninteractivecontentusagestatementrecorder.NonInteractiveContentXapiStatementRecorder.onActiveChanged.<anonymous>' call
            var upd_1 = cur_1.lc(systemTimeInMillis().mc(activeStarted));
            if (this_2.atomicfu$compareAndSet(cur_1, upd_1)) {
              break $l$block_1;
            }
          }
        }
      }
    }
  };
  protoOf(NonInteractiveContentXapiStatementRecorder).goi = function (progress) {
    $l$block: {
      // Inline function 'kotlinx.atomicfu.update' call
      var this_0 = this.roh_1;
      while (true) {
        var cur = this_0.kotlinx$atomicfu$value;
        // Inline function 'com.ustadmobile.core.domain.xapi.noninteractivecontentusagestatementrecorder.NonInteractiveContentXapiStatementRecorder.onProgressed.<anonymous>' call
        // Inline function 'kotlin.comparisons.maxOf' call
        var upd = Math.max(cur, progress);
        if (this_0.atomicfu$compareAndSet(cur, upd)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(NonInteractiveContentXapiStatementRecorder).hoi = function () {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.atomicfu.getAndUpdate' call
      var this_0 = this.qoh_1;
      while (true) {
        var cur = this_0.kotlinx$atomicfu$value;
        // Inline function 'com.ustadmobile.core.domain.xapi.noninteractivecontentusagestatementrecorder.NonInteractiveContentXapiStatementRecorder.onComplete.<anonymous>' call
        var upd = new Long(0, 0);
        if (this_0.atomicfu$compareAndSet(cur, upd)) {
          tmp$ret$1 = cur;
          break $l$block;
        }
      }
    }
    var usageDurationVal = tmp$ret$1;
    var tmp$ret$3;
    $l$block_0: {
      // Inline function 'kotlinx.atomicfu.getAndUpdate' call
      var this_1 = this.soh_1;
      while (true) {
        var cur_0 = this_1.kotlinx$atomicfu$value;
        // Inline function 'com.ustadmobile.core.domain.xapi.noninteractivecontentusagestatementrecorder.NonInteractiveContentXapiStatementRecorder.onComplete.<anonymous>' call
        var upd_0 = new Long(0, 0);
        if (this_1.atomicfu$compareAndSet(cur_0, upd_0)) {
          tmp$ret$3 = cur_0;
          break $l$block_0;
        }
      }
    }
    var activeStartTimeVal = tmp$ret$3;
    var tmp;
    if (!activeStartTimeVal.equals(new Long(0, 0))) {
      tmp = systemTimeInMillis().mc(activeStartTimeVal);
    } else {
      tmp = new Long(0, 0);
    }
    var timeSinceActive = tmp;
    $l$block_1: {
      // Inline function 'kotlinx.atomicfu.update' call
      var this_2 = this.roh_1;
      while (true) {
        var cur_1 = this_2.kotlinx$atomicfu$value;
        // Inline function 'com.ustadmobile.core.domain.xapi.noninteractivecontentusagestatementrecorder.NonInteractiveContentXapiStatementRecorder.onComplete.<anonymous>' call
        var upd_1 = 0;
        if (this_2.atomicfu$compareAndSet(cur_1, upd_1)) {
          break $l$block_1;
        }
      }
    }
    launch(this.noh_1, VOID, VOID, NonInteractiveContentXapiStatementRecorder$onComplete$slambda_0(this, usageDurationVal, timeSinceActive, null));
  };
  protoOf(NonInteractiveContentXapiStatementRecorder).pl1 = function () {
    this.joh_1.ioi(listOf_0(createFinalStatement(this)), this.moh_1);
  };
  protoOf(NonInteractiveContentXapiStatementRecorder).joi = function () {
    var tmp0_safe_receiver = this.koh_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.ioi(listOf_0(createFinalStatement(this)), this.moh_1);
    }
  };
  function NonInteractiveContentXapiStatementRecorderFactory(saveStatementOnClearUseCase, saveStatementOnUnloadUseCase, xapiStatementResource, endpoint) {
    this.koi_1 = saveStatementOnClearUseCase;
    this.loi_1 = saveStatementOnUnloadUseCase;
    this.moi_1 = xapiStatementResource;
    this.noi_1 = endpoint;
  }
  protoOf(NonInteractiveContentXapiStatementRecorderFactory).ooi = function (xapiSession, scope, xapiActivityProvider) {
    return new NonInteractiveContentXapiStatementRecorder(this.koi_1, this.loi_1, this.moi_1, xapiSession, scope, xapiActivityProvider, this.noi_1);
  };
  function SaveStatementOnClearUseCase() {
  }
  function SaveStatementOnUnloadUseCase() {
  }
  function Companion_65() {
    Companion_instance_113 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.poi_1 = [new ArrayListSerializer($serializer_getInstance_59()), null];
  }
  protoOf(Companion_65).a4r = function () {
    return $serializer_getInstance_63();
  };
  var Companion_instance_113;
  function Companion_getInstance_82() {
    if (Companion_instance_113 == null)
      new Companion_65();
    return Companion_instance_113;
  }
  function $serializer_51() {
    $serializer_instance_51 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.domain.xapi.savestatementonclear.XapiStatementsAndSession', this, 2);
    tmp0_serialDesc.g4f('statements', false);
    tmp0_serialDesc.g4f('session', false);
    this.qoi_1 = tmp0_serialDesc;
  }
  protoOf($serializer_51).d44 = function () {
    return this.qoi_1;
  };
  protoOf($serializer_51).x4f = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [Companion_getInstance_82().poi_1[0], $serializer_getInstance_6()];
  };
  protoOf($serializer_51).f44 = function (decoder) {
    var tmp0_desc = this.qoi_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = null;
    var tmp6_input = decoder.v47(tmp0_desc);
    var tmp7_cached = Companion_getInstance_82().poi_1;
    if (tmp6_input.k48()) {
      tmp4_local0 = tmp6_input.h48(tmp0_desc, 0, tmp7_cached[0], tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp6_input.h48(tmp0_desc, 1, $serializer_getInstance_6(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp6_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp6_input.h48(tmp0_desc, 0, tmp7_cached[0], tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp6_input.h48(tmp0_desc, 1, $serializer_getInstance_6(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp6_input.w47(tmp0_desc);
    return XapiStatementsAndSession_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, null);
  };
  protoOf($serializer_51).roi = function (encoder, value) {
    var tmp0_desc = this.qoi_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    var tmp2_cached = Companion_getInstance_82().poi_1;
    tmp1_output.l49(tmp0_desc, 0, tmp2_cached[0], value.soi_1);
    tmp1_output.l49(tmp0_desc, 1, $serializer_getInstance_6(), value.toi_1);
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_51).e44 = function (encoder, value) {
    return this.roi(encoder, value instanceof XapiStatementsAndSession ? value : THROW_CCE());
  };
  var $serializer_instance_51;
  function $serializer_getInstance_63() {
    if ($serializer_instance_51 == null)
      new $serializer_51();
    return $serializer_instance_51;
  }
  function XapiStatementsAndSession_init_$Init$(seen1, statements, session, serializationConstructorMarker, $this) {
    if (!(3 === (3 & seen1))) {
      throwMissingFieldException(seen1, 3, $serializer_getInstance_63().qoi_1);
    }
    $this.soi_1 = statements;
    $this.toi_1 = session;
    return $this;
  }
  function XapiStatementsAndSession_init_$Create$(seen1, statements, session, serializationConstructorMarker) {
    return XapiStatementsAndSession_init_$Init$(seen1, statements, session, serializationConstructorMarker, objectCreate(protoOf(XapiStatementsAndSession)));
  }
  function XapiStatementsAndSession(statements, session) {
    Companion_getInstance_82();
    this.soi_1 = statements;
    this.toi_1 = session;
  }
  protoOf(XapiStatementsAndSession).toString = function () {
    return 'XapiStatementsAndSession(statements=' + this.soi_1 + ', session=' + this.toi_1 + ')';
  };
  protoOf(XapiStatementsAndSession).hashCode = function () {
    var result = hashCode(this.soi_1);
    result = imul(result, 31) + this.toi_1.hashCode() | 0;
    return result;
  };
  protoOf(XapiStatementsAndSession).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiStatementsAndSession))
      return false;
    var tmp0_other_with_cast = other instanceof XapiStatementsAndSession ? other : THROW_CCE();
    if (!equals(this.soi_1, tmp0_other_with_cast.soi_1))
      return false;
    if (!this.toi_1.equals(tmp0_other_with_cast.toi_1))
      return false;
    return true;
  };
  function ResumeOrStartXapiSessionUseCase() {
  }
  function XXHasher64Factory() {
  }
  function XXStringHasher() {
  }
  function UstadMobileConstants() {
    UstadMobileConstants_instance = this;
    this.uoi_1 = 'UTF-8';
    this.voi_1 = 0;
    this.woi_1 = 'UTC';
    this.xoi_1 = mapOf([to('en', 'English'), to('tg', '\u0422\u043E\u04B7\u0438\u043A\u04E3'), to('ps', '\u067E\u069A\u062A\u0648'), to('fa', '\u062F\u0631\u06CC'), to('ar', '\u0627\u0644\u0639\u0631\u0628\u064A\u0629'), to('bn', '\u09AC\u09BE\u0982\u09B2\u09BE'), to('ne', '\u0928\u0947\u092A\u093E\u0932\u0940'), to('my', '\u1019\u103C\u1014\u103A\u1019\u102C\u1005\u102C'), to('ru', '\u0420\u0443\u0441\u0441\u043A\u0438\u0439'), to('rw', 'Kinyarwanda')]);
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.yoi_1 = ['ar', 'arc', 'dv', 'fa', 'ha', 'he', 'khw', 'ks', 'ku', 'ps', 'ur', 'yi'];
    this.zoi_1 = 13;
    this.aoj_1 = 18;
    this.boj_1 = 10000;
    this.coj_1 = 512;
  }
  var UstadMobileConstants_instance;
  function UstadMobileConstants_getInstance() {
    if (UstadMobileConstants_instance == null)
      new UstadMobileConstants();
    return UstadMobileConstants_instance;
  }
  function Companion_66() {
    Companion_instance_114 = this;
    this.doj_1 = new UstadGoOptions(null, false);
  }
  var Companion_instance_114;
  function Companion_getInstance_83() {
    if (Companion_instance_114 == null)
      new Companion_66();
    return Companion_instance_114;
  }
  function UstadGoOptions(popUpToViewName, popUpToInclusive, clearStack, serializer) {
    Companion_getInstance_83();
    popUpToViewName = popUpToViewName === VOID ? null : popUpToViewName;
    popUpToInclusive = popUpToInclusive === VOID ? false : popUpToInclusive;
    clearStack = clearStack === VOID ? false : clearStack;
    serializer = serializer === VOID ? null : serializer;
    this.eoj_1 = popUpToViewName;
    this.foj_1 = popUpToInclusive;
    this.goj_1 = clearStack;
    this.hoj_1 = serializer;
  }
  protoOf(UstadGoOptions).toString = function () {
    return 'UstadGoOptions(popUpToViewName=' + this.eoj_1 + ', popUpToInclusive=' + this.foj_1 + ', clearStack=' + this.goj_1 + ', serializer=' + this.hoj_1 + ')';
  };
  protoOf(UstadGoOptions).hashCode = function () {
    var result = this.eoj_1 == null ? 0 : getStringHashCode(this.eoj_1);
    result = imul(result, 31) + getBooleanHashCode(this.foj_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.goj_1) | 0;
    result = imul(result, 31) + (this.hoj_1 == null ? 0 : hashCode(this.hoj_1)) | 0;
    return result;
  };
  protoOf(UstadGoOptions).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof UstadGoOptions))
      return false;
    var tmp0_other_with_cast = other instanceof UstadGoOptions ? other : THROW_CCE();
    if (!(this.eoj_1 == tmp0_other_with_cast.eoj_1))
      return false;
    if (!(this.foj_1 === tmp0_other_with_cast.foj_1))
      return false;
    if (!(this.goj_1 === tmp0_other_with_cast.goj_1))
      return false;
    if (!equals(this.hoj_1, tmp0_other_with_cast.hoj_1))
      return false;
    return true;
  };
  function UiLanguage(langCode, langDisplay) {
    this.ioj_1 = langCode;
    this.joj_1 = langDisplay;
  }
  protoOf(UiLanguage).toString = function () {
    return 'UiLanguage(langCode=' + this.ioj_1 + ', langDisplay=' + this.joj_1 + ')';
  };
  protoOf(UiLanguage).hashCode = function () {
    var result = getStringHashCode(this.ioj_1);
    result = imul(result, 31) + getStringHashCode(this.joj_1) | 0;
    return result;
  };
  protoOf(UiLanguage).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof UiLanguage))
      return false;
    var tmp0_other_with_cast = other instanceof UiLanguage ? other : THROW_CCE();
    if (!(this.ioj_1 === tmp0_other_with_cast.ioj_1))
      return false;
    if (!(this.joj_1 === tmp0_other_with_cast.joj_1))
      return false;
    return true;
  };
  function Companion_67() {
    Companion_instance_115 = this;
    this.koj_1 = mapOf([to('image/jpg', 'jpg'), to('image/jpg', 'jpg'), to('image/jpeg', 'jpg'), to('image/png', 'png'), to('image/gif', 'gif'), to('image/svg', 'svg'), to('application/epub+zip', 'epub')]);
    var tmp = this;
    // Inline function 'kotlin.collections.associateBy' call
    var this_0 = this.koj_1.q2();
    var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(this_0, 10)), 16);
    // Inline function 'kotlin.collections.associateByTo' call
    var destination = LinkedHashMap_init_$Create$_0(capacity);
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.impl.Companion.MIME_TYPES_REVERSE.<anonymous>' call
      var tmp_0 = element.t2();
      // Inline function 'com.ustadmobile.core.impl.Companion.MIME_TYPES_REVERSE.<anonymous>' call
      var tmp$ret$1 = element.s2();
      destination.s(tmp_0, tmp$ret$1);
    }
    tmp.loj_1 = destination;
    this.moj_1 = 'ustadmobileContent';
    this.noj_1 = '';
    this.PREFKEY_LOCALE = 'locale';
    this.ooj_1 = 2;
    this.poj_1 = 4;
    this.qoj_1 = 'ref';
    this.roj_1 = 67108864;
    this.soj_1 = 'dlenabled';
    this.toj_1 = 16;
    this.uoj_1 = 32;
    this.voj_1 = 64;
    this.woj_1 = 'umclient';
    this.xoj_1 = '/umapp/#/';
    this.yoj_1 = 'sitedata';
    this.zoj_1 = 'container';
    this.aok_1 = 'attachments';
    this.bok_1 = 'rootViewName';
    this.cok_1 = 'client_id';
  }
  protoOf(Companion_67).dok = function () {
    return this.PREFKEY_LOCALE;
  };
  var Companion_instance_115;
  function Companion_getInstance_84() {
    if (Companion_instance_115 == null)
      new Companion_67();
    return Companion_instance_115;
  }
  function UstadMobileSystemCommon(settings, langConfig) {
    Companion_getInstance_84();
    this.eok_1 = settings;
    this.fok_1 = langConfig;
    this.gok_1 = null;
  }
  protoOf(UstadMobileSystemCommon).hok = function () {
    Companion_getInstance_122();
    return 'CourseListHome';
  };
  protoOf(UstadMobileSystemCommon).iok = function () {
    // Inline function 'kotlin.collections.associateWith' call
    var this_0 = values();
    var result = LinkedHashMap_init_$Create$_0(coerceAtLeast(mapCapacity(this_0.length), 16));
    // Inline function 'kotlin.collections.associateWithTo' call
    var inductionVariable = 0;
    var last = this_0.length;
    while (inductionVariable < last) {
      var element = this_0[inductionVariable];
      inductionVariable = inductionVariable + 1 | 0;
      // Inline function 'com.ustadmobile.core.impl.UstadMobileSystemCommon.getDayOfWeekStrings.<anonymous>' call
      var tmp$ret$0 = this.en6(get_dayStringResource(element));
      result.s(element, tmp$ret$0);
    }
    return result;
  };
  function ActionBarButtonUiState$_init_$lambda_4nqccj() {
    return Unit_instance;
  }
  function ActionBarButtonUiState(visible, text, enabled, onClick) {
    visible = visible === VOID ? false : visible;
    text = text === VOID ? null : text;
    enabled = enabled === VOID ? true : enabled;
    var tmp;
    if (onClick === VOID) {
      tmp = ActionBarButtonUiState$_init_$lambda_4nqccj;
    } else {
      tmp = onClick;
    }
    onClick = tmp;
    this.jok_1 = visible;
    this.kok_1 = text;
    this.lok_1 = enabled;
    this.mok_1 = onClick;
  }
  protoOf(ActionBarButtonUiState).nok = function (visible, text, enabled, onClick) {
    return new ActionBarButtonUiState(visible, text, enabled, onClick);
  };
  protoOf(ActionBarButtonUiState).ook = function (visible, text, enabled, onClick, $super) {
    visible = visible === VOID ? this.jok_1 : visible;
    text = text === VOID ? this.kok_1 : text;
    enabled = enabled === VOID ? this.lok_1 : enabled;
    onClick = onClick === VOID ? this.mok_1 : onClick;
    return $super === VOID ? this.nok(visible, text, enabled, onClick) : $super.nok.call(this, visible, text, enabled, onClick);
  };
  protoOf(ActionBarButtonUiState).toString = function () {
    return 'ActionBarButtonUiState(visible=' + this.jok_1 + ', text=' + this.kok_1 + ', enabled=' + this.lok_1 + ', onClick=' + this.mok_1 + ')';
  };
  protoOf(ActionBarButtonUiState).hashCode = function () {
    var result = getBooleanHashCode(this.jok_1);
    result = imul(result, 31) + (this.kok_1 == null ? 0 : getStringHashCode(this.kok_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.lok_1) | 0;
    result = imul(result, 31) + hashCode(this.mok_1) | 0;
    return result;
  };
  protoOf(ActionBarButtonUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ActionBarButtonUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ActionBarButtonUiState ? other : THROW_CCE();
    if (!(this.jok_1 === tmp0_other_with_cast.jok_1))
      return false;
    if (!(this.kok_1 == tmp0_other_with_cast.kok_1))
      return false;
    if (!(this.lok_1 === tmp0_other_with_cast.lok_1))
      return false;
    if (!equals(this.mok_1, tmp0_other_with_cast.mok_1))
      return false;
    return true;
  };
  function AppActionButton(icon, contentDescription, onClick, id) {
    this.pok_1 = icon;
    this.qok_1 = contentDescription;
    this.rok_1 = onClick;
    this.sok_1 = id;
  }
  protoOf(AppActionButton).toString = function () {
    return 'AppActionButton(icon=' + this.pok_1 + ', contentDescription=' + this.qok_1 + ', onClick=' + this.rok_1 + ', id=' + this.sok_1 + ')';
  };
  protoOf(AppActionButton).hashCode = function () {
    var result = this.pok_1.hashCode();
    result = imul(result, 31) + getStringHashCode(this.qok_1) | 0;
    result = imul(result, 31) + hashCode(this.rok_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.sok_1) | 0;
    return result;
  };
  protoOf(AppActionButton).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof AppActionButton))
      return false;
    var tmp0_other_with_cast = other instanceof AppActionButton ? other : THROW_CCE();
    if (!this.pok_1.equals(tmp0_other_with_cast.pok_1))
      return false;
    if (!(this.qok_1 === tmp0_other_with_cast.qok_1))
      return false;
    if (!equals(this.rok_1, tmp0_other_with_cast.rok_1))
      return false;
    if (!(this.sok_1 === tmp0_other_with_cast.sok_1))
      return false;
    return true;
  };
  var AppBarColors_STANDARD_instance;
  var AppBarColors_SELECTION_MODE_instance;
  var AppBarColors_entriesInitialized;
  function AppBarColors_initEntries() {
    if (AppBarColors_entriesInitialized)
      return Unit_instance;
    AppBarColors_entriesInitialized = true;
    AppBarColors_STANDARD_instance = new AppBarColors('STANDARD', 0);
    AppBarColors_SELECTION_MODE_instance = new AppBarColors('SELECTION_MODE', 1);
  }
  function AppBarColors(name, ordinal) {
    Enum.call(this, name, ordinal);
  }
  function AppBarColors_STANDARD_getInstance() {
    AppBarColors_initEntries();
    return AppBarColors_STANDARD_instance;
  }
  function AppBarColors_SELECTION_MODE_getInstance() {
    AppBarColors_initEntries();
    return AppBarColors_SELECTION_MODE_instance;
  }
  function AppBarSearchUiState$_init_$lambda_rwjni0(it) {
    return Unit_instance;
  }
  function AppBarSearchUiState(visible, searchText, onSearchTextChanged) {
    visible = visible === VOID ? false : visible;
    searchText = searchText === VOID ? '' : searchText;
    var tmp;
    if (onSearchTextChanged === VOID) {
      tmp = AppBarSearchUiState$_init_$lambda_rwjni0;
    } else {
      tmp = onSearchTextChanged;
    }
    onSearchTextChanged = tmp;
    this.tok_1 = visible;
    this.uok_1 = searchText;
    this.vok_1 = onSearchTextChanged;
  }
  protoOf(AppBarSearchUiState).wok = function (visible, searchText, onSearchTextChanged) {
    return new AppBarSearchUiState(visible, searchText, onSearchTextChanged);
  };
  protoOf(AppBarSearchUiState).xok = function (visible, searchText, onSearchTextChanged, $super) {
    visible = visible === VOID ? this.tok_1 : visible;
    searchText = searchText === VOID ? this.uok_1 : searchText;
    onSearchTextChanged = onSearchTextChanged === VOID ? this.vok_1 : onSearchTextChanged;
    return $super === VOID ? this.wok(visible, searchText, onSearchTextChanged) : $super.wok.call(this, visible, searchText, onSearchTextChanged);
  };
  protoOf(AppBarSearchUiState).toString = function () {
    return 'AppBarSearchUiState(visible=' + this.tok_1 + ', searchText=' + this.uok_1 + ', onSearchTextChanged=' + this.vok_1 + ')';
  };
  protoOf(AppBarSearchUiState).hashCode = function () {
    var result = getBooleanHashCode(this.tok_1);
    result = imul(result, 31) + getStringHashCode(this.uok_1) | 0;
    result = imul(result, 31) + hashCode(this.vok_1) | 0;
    return result;
  };
  protoOf(AppBarSearchUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof AppBarSearchUiState))
      return false;
    var tmp0_other_with_cast = other instanceof AppBarSearchUiState ? other : THROW_CCE();
    if (!(this.tok_1 === tmp0_other_with_cast.tok_1))
      return false;
    if (!(this.uok_1 === tmp0_other_with_cast.uok_1))
      return false;
    if (!equals(this.vok_1, tmp0_other_with_cast.vok_1))
      return false;
    return true;
  };
  var AppStateIcon_MOVE_instance;
  var AppStateIcon_CLOSE_instance;
  var AppStateIcon_DELETE_instance;
  var AppStateIcon_entriesInitialized;
  function AppStateIcon_initEntries() {
    if (AppStateIcon_entriesInitialized)
      return Unit_instance;
    AppStateIcon_entriesInitialized = true;
    AppStateIcon_MOVE_instance = new AppStateIcon('MOVE', 0);
    AppStateIcon_CLOSE_instance = new AppStateIcon('CLOSE', 1);
    AppStateIcon_DELETE_instance = new AppStateIcon('DELETE', 2);
  }
  function AppStateIcon(name, ordinal) {
    Enum.call(this, name, ordinal);
  }
  function AppStateIcon_MOVE_getInstance() {
    AppStateIcon_initEntries();
    return AppStateIcon_MOVE_instance;
  }
  function AppStateIcon_CLOSE_getInstance() {
    AppStateIcon_initEntries();
    return AppStateIcon_CLOSE_instance;
  }
  function AppStateIcon_DELETE_getInstance() {
    AppStateIcon_initEntries();
    return AppStateIcon_DELETE_instance;
  }
  function AppUiState(fabState, loadingState, title, navigationVisible, hideBottomNavigation, hideSettingsIcon, userAccountIconVisible, searchState, actionBarButtonState, overflowItems, hideAppBar, actionButtons, leadingActionButton, appBarColors) {
    fabState = fabState === VOID ? new FabUiState() : fabState;
    loadingState = loadingState === VOID ? new LoadingUiState() : loadingState;
    title = title === VOID ? null : title;
    navigationVisible = navigationVisible === VOID ? true : navigationVisible;
    hideBottomNavigation = hideBottomNavigation === VOID ? false : hideBottomNavigation;
    hideSettingsIcon = hideSettingsIcon === VOID ? false : hideSettingsIcon;
    userAccountIconVisible = userAccountIconVisible === VOID ? true : userAccountIconVisible;
    searchState = searchState === VOID ? new AppBarSearchUiState() : searchState;
    actionBarButtonState = actionBarButtonState === VOID ? new ActionBarButtonUiState() : actionBarButtonState;
    overflowItems = overflowItems === VOID ? emptyList() : overflowItems;
    hideAppBar = hideAppBar === VOID ? false : hideAppBar;
    actionButtons = actionButtons === VOID ? emptyList() : actionButtons;
    leadingActionButton = leadingActionButton === VOID ? null : leadingActionButton;
    appBarColors = appBarColors === VOID ? AppBarColors_STANDARD_getInstance() : appBarColors;
    this.yok_1 = fabState;
    this.zok_1 = loadingState;
    this.aol_1 = title;
    this.bol_1 = navigationVisible;
    this.col_1 = hideBottomNavigation;
    this.dol_1 = hideSettingsIcon;
    this.eol_1 = userAccountIconVisible;
    this.fol_1 = searchState;
    this.gol_1 = actionBarButtonState;
    this.hol_1 = overflowItems;
    this.iol_1 = hideAppBar;
    this.jol_1 = actionButtons;
    this.kol_1 = leadingActionButton;
    this.lol_1 = appBarColors;
  }
  protoOf(AppUiState).mol = function (fabState, loadingState, title, navigationVisible, hideBottomNavigation, hideSettingsIcon, userAccountIconVisible, searchState, actionBarButtonState, overflowItems, hideAppBar, actionButtons, leadingActionButton, appBarColors) {
    return new AppUiState(fabState, loadingState, title, navigationVisible, hideBottomNavigation, hideSettingsIcon, userAccountIconVisible, searchState, actionBarButtonState, overflowItems, hideAppBar, actionButtons, leadingActionButton, appBarColors);
  };
  protoOf(AppUiState).nol = function (fabState, loadingState, title, navigationVisible, hideBottomNavigation, hideSettingsIcon, userAccountIconVisible, searchState, actionBarButtonState, overflowItems, hideAppBar, actionButtons, leadingActionButton, appBarColors, $super) {
    fabState = fabState === VOID ? this.yok_1 : fabState;
    loadingState = loadingState === VOID ? this.zok_1 : loadingState;
    title = title === VOID ? this.aol_1 : title;
    navigationVisible = navigationVisible === VOID ? this.bol_1 : navigationVisible;
    hideBottomNavigation = hideBottomNavigation === VOID ? this.col_1 : hideBottomNavigation;
    hideSettingsIcon = hideSettingsIcon === VOID ? this.dol_1 : hideSettingsIcon;
    userAccountIconVisible = userAccountIconVisible === VOID ? this.eol_1 : userAccountIconVisible;
    searchState = searchState === VOID ? this.fol_1 : searchState;
    actionBarButtonState = actionBarButtonState === VOID ? this.gol_1 : actionBarButtonState;
    overflowItems = overflowItems === VOID ? this.hol_1 : overflowItems;
    hideAppBar = hideAppBar === VOID ? this.iol_1 : hideAppBar;
    actionButtons = actionButtons === VOID ? this.jol_1 : actionButtons;
    leadingActionButton = leadingActionButton === VOID ? this.kol_1 : leadingActionButton;
    appBarColors = appBarColors === VOID ? this.lol_1 : appBarColors;
    return $super === VOID ? this.mol(fabState, loadingState, title, navigationVisible, hideBottomNavigation, hideSettingsIcon, userAccountIconVisible, searchState, actionBarButtonState, overflowItems, hideAppBar, actionButtons, leadingActionButton, appBarColors) : $super.mol.call(this, fabState, loadingState, title, navigationVisible, hideBottomNavigation, hideSettingsIcon, userAccountIconVisible, searchState, actionBarButtonState, overflowItems, hideAppBar, actionButtons, leadingActionButton, appBarColors);
  };
  protoOf(AppUiState).toString = function () {
    return 'AppUiState(fabState=' + this.yok_1 + ', loadingState=' + this.zok_1 + ', title=' + this.aol_1 + ', navigationVisible=' + this.bol_1 + ', hideBottomNavigation=' + this.col_1 + ', hideSettingsIcon=' + this.dol_1 + ', userAccountIconVisible=' + this.eol_1 + ', searchState=' + this.fol_1 + ', actionBarButtonState=' + this.gol_1 + ', overflowItems=' + this.hol_1 + ', hideAppBar=' + this.iol_1 + ', actionButtons=' + this.jol_1 + ', leadingActionButton=' + this.kol_1 + ', appBarColors=' + this.lol_1 + ')';
  };
  protoOf(AppUiState).hashCode = function () {
    var result = this.yok_1.hashCode();
    result = imul(result, 31) + this.zok_1.hashCode() | 0;
    result = imul(result, 31) + (this.aol_1 == null ? 0 : getStringHashCode(this.aol_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.bol_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.col_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.dol_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.eol_1) | 0;
    result = imul(result, 31) + this.fol_1.hashCode() | 0;
    result = imul(result, 31) + this.gol_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.hol_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.iol_1) | 0;
    result = imul(result, 31) + hashCode(this.jol_1) | 0;
    result = imul(result, 31) + (this.kol_1 == null ? 0 : this.kol_1.hashCode()) | 0;
    result = imul(result, 31) + this.lol_1.hashCode() | 0;
    return result;
  };
  protoOf(AppUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof AppUiState))
      return false;
    var tmp0_other_with_cast = other instanceof AppUiState ? other : THROW_CCE();
    if (!this.yok_1.equals(tmp0_other_with_cast.yok_1))
      return false;
    if (!this.zok_1.equals(tmp0_other_with_cast.zok_1))
      return false;
    if (!(this.aol_1 == tmp0_other_with_cast.aol_1))
      return false;
    if (!(this.bol_1 === tmp0_other_with_cast.bol_1))
      return false;
    if (!(this.col_1 === tmp0_other_with_cast.col_1))
      return false;
    if (!(this.dol_1 === tmp0_other_with_cast.dol_1))
      return false;
    if (!(this.eol_1 === tmp0_other_with_cast.eol_1))
      return false;
    if (!this.fol_1.equals(tmp0_other_with_cast.fol_1))
      return false;
    if (!this.gol_1.equals(tmp0_other_with_cast.gol_1))
      return false;
    if (!equals(this.hol_1, tmp0_other_with_cast.hol_1))
      return false;
    if (!(this.iol_1 === tmp0_other_with_cast.iol_1))
      return false;
    if (!equals(this.jol_1, tmp0_other_with_cast.jol_1))
      return false;
    if (!equals(this.kol_1, tmp0_other_with_cast.kol_1))
      return false;
    if (!this.lol_1.equals(tmp0_other_with_cast.lol_1))
      return false;
    return true;
  };
  var FabIcon_NONE_instance;
  var FabIcon_ADD_instance;
  var FabIcon_EDIT_instance;
  var FabIcon_entriesInitialized;
  function FabIcon_initEntries() {
    if (FabIcon_entriesInitialized)
      return Unit_instance;
    FabIcon_entriesInitialized = true;
    FabIcon_NONE_instance = new FabIcon('NONE', 0);
    FabIcon_ADD_instance = new FabIcon('ADD', 1);
    FabIcon_EDIT_instance = new FabIcon('EDIT', 2);
  }
  function FabIcon(name, ordinal) {
    Enum.call(this, name, ordinal);
  }
  function FabUiState$_init_$lambda_e3ylcb() {
    return Unit_instance;
  }
  function FabIcon_NONE_getInstance() {
    FabIcon_initEntries();
    return FabIcon_NONE_instance;
  }
  function FabIcon_ADD_getInstance() {
    FabIcon_initEntries();
    return FabIcon_ADD_instance;
  }
  function FabIcon_EDIT_getInstance() {
    FabIcon_initEntries();
    return FabIcon_EDIT_instance;
  }
  function FabUiState(visible, text, icon, onClick) {
    visible = visible === VOID ? false : visible;
    text = text === VOID ? null : text;
    icon = icon === VOID ? FabIcon_NONE_getInstance() : icon;
    var tmp;
    if (onClick === VOID) {
      tmp = FabUiState$_init_$lambda_e3ylcb;
    } else {
      tmp = onClick;
    }
    onClick = tmp;
    this.ool_1 = visible;
    this.pol_1 = text;
    this.qol_1 = icon;
    this.rol_1 = onClick;
  }
  protoOf(FabUiState).sol = function (visible, text, icon, onClick) {
    return new FabUiState(visible, text, icon, onClick);
  };
  protoOf(FabUiState).tol = function (visible, text, icon, onClick, $super) {
    visible = visible === VOID ? this.ool_1 : visible;
    text = text === VOID ? this.pol_1 : text;
    icon = icon === VOID ? this.qol_1 : icon;
    onClick = onClick === VOID ? this.rol_1 : onClick;
    return $super === VOID ? this.sol(visible, text, icon, onClick) : $super.sol.call(this, visible, text, icon, onClick);
  };
  protoOf(FabUiState).toString = function () {
    return 'FabUiState(visible=' + this.ool_1 + ', text=' + this.pol_1 + ', icon=' + this.qol_1 + ', onClick=' + this.rol_1 + ')';
  };
  protoOf(FabUiState).hashCode = function () {
    var result = getBooleanHashCode(this.ool_1);
    result = imul(result, 31) + (this.pol_1 == null ? 0 : getStringHashCode(this.pol_1)) | 0;
    result = imul(result, 31) + this.qol_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.rol_1) | 0;
    return result;
  };
  protoOf(FabUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof FabUiState))
      return false;
    var tmp0_other_with_cast = other instanceof FabUiState ? other : THROW_CCE();
    if (!(this.ool_1 === tmp0_other_with_cast.ool_1))
      return false;
    if (!(this.pol_1 == tmp0_other_with_cast.pol_1))
      return false;
    if (!this.qol_1.equals(tmp0_other_with_cast.qol_1))
      return false;
    if (!equals(this.rol_1, tmp0_other_with_cast.rol_1))
      return false;
    return true;
  };
  var State_NOT_LOADING_instance;
  var State_INDETERMINATE_instance;
  var State_entriesInitialized;
  function State_initEntries() {
    if (State_entriesInitialized)
      return Unit_instance;
    State_entriesInitialized = true;
    State_NOT_LOADING_instance = new State('NOT_LOADING', 0);
    State_INDETERMINATE_instance = new State('INDETERMINATE', 1);
  }
  function State(name, ordinal) {
    Enum.call(this, name, ordinal);
  }
  function Companion_68() {
    Companion_instance_116 = this;
    this.uol_1 = new LoadingUiState(State_INDETERMINATE_getInstance());
    this.vol_1 = new LoadingUiState(State_NOT_LOADING_getInstance());
  }
  var Companion_instance_116;
  function Companion_getInstance_85() {
    if (Companion_instance_116 == null)
      new Companion_68();
    return Companion_instance_116;
  }
  function State_NOT_LOADING_getInstance() {
    State_initEntries();
    return State_NOT_LOADING_instance;
  }
  function State_INDETERMINATE_getInstance() {
    State_initEntries();
    return State_INDETERMINATE_instance;
  }
  function LoadingUiState(loadingState) {
    Companion_getInstance_85();
    loadingState = loadingState === VOID ? State_NOT_LOADING_getInstance() : loadingState;
    this.wol_1 = loadingState;
  }
  protoOf(LoadingUiState).toString = function () {
    return 'LoadingUiState(loadingState=' + this.wol_1 + ')';
  };
  protoOf(LoadingUiState).hashCode = function () {
    return this.wol_1.hashCode();
  };
  protoOf(LoadingUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof LoadingUiState))
      return false;
    var tmp0_other_with_cast = other instanceof LoadingUiState ? other : THROW_CCE();
    if (!this.wol_1.equals(tmp0_other_with_cast.wol_1))
      return false;
    return true;
  };
  function OverflowItem(label, onClick) {
    this.xol_1 = label;
    this.yol_1 = onClick;
  }
  protoOf(OverflowItem).toString = function () {
    return 'OverflowItem(label=' + this.xol_1 + ', onClick=' + this.yol_1 + ')';
  };
  protoOf(OverflowItem).hashCode = function () {
    var result = getStringHashCode(this.xol_1);
    result = imul(result, 31) + hashCode(this.yol_1) | 0;
    return result;
  };
  protoOf(OverflowItem).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof OverflowItem))
      return false;
    var tmp0_other_with_cast = other instanceof OverflowItem ? other : THROW_CCE();
    if (!(this.xol_1 === tmp0_other_with_cast.xol_1))
      return false;
    if (!equals(this.yol_1, tmp0_other_with_cast.yol_1))
      return false;
    return true;
  };
  function Snack(message, action, onAction) {
    action = action === VOID ? null : action;
    onAction = onAction === VOID ? null : onAction;
    this.zol_1 = message;
    this.aom_1 = action;
    this.bom_1 = onAction;
  }
  protoOf(Snack).toString = function () {
    return 'Snack(message=' + this.zol_1 + ', action=' + this.aom_1 + ', onAction=' + this.bom_1 + ')';
  };
  protoOf(Snack).hashCode = function () {
    var result = getStringHashCode(this.zol_1);
    result = imul(result, 31) + (this.aom_1 == null ? 0 : getStringHashCode(this.aom_1)) | 0;
    result = imul(result, 31) + (this.bom_1 == null ? 0 : hashCode(this.bom_1)) | 0;
    return result;
  };
  protoOf(Snack).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof Snack))
      return false;
    var tmp0_other_with_cast = other instanceof Snack ? other : THROW_CCE();
    if (!(this.zol_1 === tmp0_other_with_cast.zol_1))
      return false;
    if (!(this.aom_1 == tmp0_other_with_cast.aom_1))
      return false;
    if (!equals(this.bom_1, tmp0_other_with_cast.bom_1))
      return false;
    return true;
  };
  function SnackBarDispatcher() {
  }
  function TabItem(viewName, args, label) {
    this.dom_1 = viewName;
    this.eom_1 = args;
    this.fom_1 = label;
  }
  protoOf(TabItem).toString = function () {
    return 'TabItem(viewName=' + this.dom_1 + ', args=' + this.eom_1 + ', label=' + this.fom_1 + ')';
  };
  protoOf(TabItem).hashCode = function () {
    var result = getStringHashCode(this.dom_1);
    result = imul(result, 31) + hashCode(this.eom_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.fom_1) | 0;
    return result;
  };
  protoOf(TabItem).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof TabItem))
      return false;
    var tmp0_other_with_cast = other instanceof TabItem ? other : THROW_CCE();
    if (!(this.dom_1 === tmp0_other_with_cast.dom_1))
      return false;
    if (!equals(this.eom_1, tmp0_other_with_cast.eom_1))
      return false;
    if (!(this.fom_1 === tmp0_other_with_cast.fom_1))
      return false;
    return true;
  };
  function UstadContextMenuItem(label, onClick) {
    this.gom_1 = label;
    this.hom_1 = onClick;
  }
  protoOf(UstadContextMenuItem).toString = function () {
    return 'UstadContextMenuItem(label=' + this.gom_1 + ', onClick=' + this.hom_1 + ')';
  };
  protoOf(UstadContextMenuItem).hashCode = function () {
    var result = getStringHashCode(this.gom_1);
    result = imul(result, 31) + hashCode(this.hom_1) | 0;
    return result;
  };
  protoOf(UstadContextMenuItem).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof UstadContextMenuItem))
      return false;
    var tmp0_other_with_cast = other instanceof UstadContextMenuItem ? other : THROW_CCE();
    if (!(this.gom_1 === tmp0_other_with_cast.gom_1))
      return false;
    if (!equals(this.hom_1, tmp0_other_with_cast.hom_1))
      return false;
    return true;
  };
  function ApiUrlConfig(presetApiUrl) {
    this.smx_1 = presetApiUrl;
    this.tmx_1 = this.smx_1 == null;
  }
  protoOf(ApiUrlConfig).toString = function () {
    return 'ApiUrlConfig(presetApiUrl=' + this.smx_1 + ')';
  };
  protoOf(ApiUrlConfig).hashCode = function () {
    return this.smx_1 == null ? 0 : getStringHashCode(this.smx_1);
  };
  protoOf(ApiUrlConfig).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ApiUrlConfig))
      return false;
    var tmp0_other_with_cast = other instanceof ApiUrlConfig ? other : THROW_CCE();
    if (!(this.smx_1 == tmp0_other_with_cast.smx_1))
      return false;
    return true;
  };
  function AppConfig() {
  }
  function AppConfigMap(delegate) {
    this.iom_1 = delegate;
  }
  function Companion_69() {
    this.jom_1 = '1,2,4';
  }
  var Companion_instance_117;
  function Companion_getInstance_86() {
    return Companion_instance_117;
  }
  function GenderConfig(genderConfigStr) {
    genderConfigStr = genderConfigStr === VOID ? '1,2,4' : genderConfigStr;
    var tmp = this;
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var this_0 = split(genderConfigStr, [',']);
    var destination = ArrayList_init_$Create$();
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.impl.config.GenderConfig.genderOptions.<anonymous>' call
      // Inline function 'kotlin.text.isNotBlank' call
      if (!isBlank(element)) {
        destination.i1(element);
      }
    }
    // Inline function 'kotlin.collections.mapTo' call
    var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination, 10));
    var tmp0_iterator_0 = destination.w();
    while (tmp0_iterator_0.f()) {
      var item = tmp0_iterator_0.e();
      // Inline function 'com.ustadmobile.core.impl.config.GenderConfig.genderOptions.<anonymous>' call
      var tmp$ret$4 = toInt(item);
      destination_0.i1(tmp$ret$4);
    }
    tmp.kom_1 = destination_0;
    var tmp_0 = this;
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var this_1 = PersonConstants_getInstance_0().nom_1;
    var destination_1 = ArrayList_init_$Create$();
    var tmp0_iterator_1 = this_1.w();
    while (tmp0_iterator_1.f()) {
      var element_0 = tmp0_iterator_1.e();
      // Inline function 'com.ustadmobile.core.impl.config.GenderConfig.genderMessageIds.<anonymous>' call
      if (this.kom_1.a1(element_0.qom_1)) {
        destination_1.i1(element_0);
      }
    }
    tmp_0.lom_1 = destination_1;
    var tmp_1 = this;
    var tmp_2 = strings_getInstance().blc_1;
    tmp_1.mom_1 = plus(this.lom_1, listOf_0(new MessageIdOption2(tmp_2, 0)));
  }
  function SupportedLanguagesConfig_init_$Init$(systemLocales, settings, availableLanguagesConfig, fallbackLocaleCode, $this) {
    availableLanguagesConfig = availableLanguagesConfig === VOID ? 'en,fa,ps,ar,tg,bn,ne,my,rw,ru' : availableLanguagesConfig;
    fallbackLocaleCode = fallbackLocaleCode === VOID ? 'en' : fallbackLocaleCode;
    SupportedLanguagesConfig.call($this, systemLocales, new SettingsLocaleSettingDelegate(settings), availableLanguagesConfig, fallbackLocaleCode);
    return $this;
  }
  function SupportedLanguagesConfig_init_$Create$(systemLocales, settings, availableLanguagesConfig, fallbackLocaleCode) {
    return SupportedLanguagesConfig_init_$Init$(systemLocales, settings, availableLanguagesConfig, fallbackLocaleCode, objectCreate(protoOf(SupportedLanguagesConfig)));
  }
  function SettingsLocaleSettingDelegate(settings) {
    this.rom_1 = settings;
  }
  protoOf(SettingsLocaleSettingDelegate).som = function (value) {
    if (!(value == null)) {
      this.rom_1.sl1('locale', value);
    } else {
      this.rom_1.n2n('locale');
    }
  };
  protoOf(SettingsLocaleSettingDelegate).tom = function () {
    return this.rom_1.tl1('locale');
  };
  function displayLocaleForLangSetting($this, setting) {
    var tmp;
    // Inline function 'kotlin.text.isNullOrEmpty' call
    // Inline function 'kotlin.contracts.contract' call
    if (setting == null ? true : charSequenceLength(setting) === 0) {
      tmp = $this.uom().ioj_1;
    } else {
      tmp = setting;
    }
    return tmp;
  }
  function Companion_70() {
    this.vom_1 = 'locale';
    this.wom_1 = 'com.ustadmobile.presetlocale';
    this.xom_1 = 'localePresetDone';
    this.yom_1 = 'en,fa,ps,ar,tg,bn,ne,my,rw,ru';
    this.zom_1 = '';
  }
  var Companion_instance_118;
  function Companion_getInstance_87() {
    return Companion_instance_118;
  }
  function SupportedLanguagesConfig(systemLocales, localeSettingDelegate, availableLanguagesConfig, fallbackLocaleCode) {
    availableLanguagesConfig = availableLanguagesConfig === VOID ? 'en,fa,ps,ar,tg,bn,ne,my,rw,ru' : availableLanguagesConfig;
    fallbackLocaleCode = fallbackLocaleCode === VOID ? 'en' : fallbackLocaleCode;
    this.mo3_1 = systemLocales;
    this.no3_1 = localeSettingDelegate;
    this.oo3_1 = availableLanguagesConfig;
    this.po3_1 = fallbackLocaleCode;
    var tmp = this;
    // Inline function 'kotlin.collections.map' call
    var this_0 = sorted(split(this.oo3_1, [',']));
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.impl.config.SupportedLanguagesConfig.supportedUiLanguages.<anonymous>' call
      var tmp0_elvis_lhs = UstadMobileConstants_getInstance().xoi_1.q(item);
      var tmp$ret$0 = new UiLanguage(item, tmp0_elvis_lhs == null ? item : tmp0_elvis_lhs);
      destination.i1(tmp$ret$0);
    }
    tmp.qo3_1 = destination;
    var tmp_0 = this;
    // Inline function 'kotlin.collections.associateBy' call
    var this_1 = this.qo3_1;
    var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(this_1, 10)), 16);
    // Inline function 'kotlin.collections.associateByTo' call
    var destination_0 = LinkedHashMap_init_$Create$_0(capacity);
    var tmp0_iterator_0 = this_1.w();
    while (tmp0_iterator_0.f()) {
      var element = tmp0_iterator_0.e();
      // Inline function 'com.ustadmobile.core.impl.config.SupportedLanguagesConfig.supportedLangMap.<anonymous>' call
      var tmp$ret$3 = element.ioj_1;
      destination_0.s(tmp$ret$3, element);
    }
    tmp_0.ro3_1 = destination_0;
    this.so3_1 = displayLocaleForLangSetting(this, this.tom());
    if (!this.ro3_1.r(this.po3_1))
      throw IllegalStateException_init_$Create$('available languages ' + this.oo3_1 + ' does not ' + ("include fallback: '" + this.po3_1 + "'"));
  }
  protoOf(SupportedLanguagesConfig).som = function (value) {
    this.no3_1.som(value);
    this.so3_1 = displayLocaleForLangSetting(this, value);
  };
  protoOf(SupportedLanguagesConfig).tom = function () {
    return this.no3_1.tom();
  };
  protoOf(SupportedLanguagesConfig).aon = function (systemImpl) {
    var tmp0_elvis_lhs = this.tom();
    var currentLocaleSetting = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.first' call
      var tmp0_iterator = this.bon(systemImpl).w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.impl.config.SupportedLanguagesConfig.getCurrentLanguage.<anonymous>' call
        if (element.ioj_1 === currentLocaleSetting) {
          tmp$ret$1 = element;
          break $l$block;
        }
      }
      throw NoSuchElementException_init_$Create$_0('Collection contains no element matching the predicate.');
    }
    return tmp$ret$1;
  };
  protoOf(SupportedLanguagesConfig).con = function (useDeviceLangDisplay) {
    Companion_getInstance_84();
    return plus(listOf_0(new UiLanguage('', useDeviceLangDisplay)), this.qo3_1);
  };
  protoOf(SupportedLanguagesConfig).bon = function (systemImpl) {
    return this.con(systemImpl.en6(strings_getInstance().glx_1));
  };
  protoOf(SupportedLanguagesConfig).don = function (preferredLocales) {
    // Inline function 'kotlin.collections.map' call
    var this_0 = this.qo3_1;
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.impl.config.SupportedLanguagesConfig.selectFirstSupportedLocale.<anonymous>' call
      var tmp$ret$0 = item.ioj_1;
      destination.i1(tmp$ret$0);
    }
    var supportedLocaleCodes = destination;
    var tmp$ret$6;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator_0 = preferredLocales.w();
      while (tmp0_iterator_0.f()) {
        var element = tmp0_iterator_0.e();
        // Inline function 'com.ustadmobile.core.impl.config.SupportedLanguagesConfig.selectFirstSupportedLocale.<anonymous>' call
        // Inline function 'kotlin.text.substring' call
        // Inline function 'kotlin.js.asDynamic' call
        var tmp$ret$4 = element.substring(0, 2);
        if (supportedLocaleCodes.a1(tmp$ret$4)) {
          tmp$ret$6 = element;
          break $l$block;
        }
      }
      tmp$ret$6 = null;
    }
    var tmp0_safe_receiver = tmp$ret$6;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.impl.config.SupportedLanguagesConfig.selectFirstSupportedLocale.<anonymous>' call
      // Inline function 'kotlin.text.substring' call
      // Inline function 'kotlin.js.asDynamic' call
      var tmp$ret$8 = tmp0_safe_receiver.substring(0, 2);
      tmp = ensureNotNull(this.ro3_1.q(tmp$ret$8));
    }
    var tmp1_elvis_lhs = tmp;
    return tmp1_elvis_lhs == null ? ensureNotNull(this.ro3_1.q(this.po3_1)) : tmp1_elvis_lhs;
  };
  protoOf(SupportedLanguagesConfig).uom = function (preferredLocales, $super) {
    preferredLocales = preferredLocales === VOID ? this.mo3_1 : preferredLocales;
    return $super === VOID ? this.don(preferredLocales) : $super.don.call(this, preferredLocales);
  };
  function commonDomainDiModule(endpointScope) {
    return Module_init_$Create$('CommonDomain', VOID, VOID, commonDomainDiModule$lambda(endpointScope));
  }
  function commonDomainDiModule$lambda$lambda($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.q57(tmp$ret$0, 1);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$provider.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp$ret$3 = tmp_2.q57(tmp$ret$2, 2);
    return new EnrolIntoCourseUseCase(tmp_1, tmp$ret$3);
  }
  function commonDomainDiModule$lambda$lambda_0($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp0_repo = tmp.q57(tmp$ret$0, 2);
    // Inline function 'org.kodein.di.instance' call
    var tmp_1 = $this$provider.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    var tmp1_db = tmp_1.q57(tmp$ret$2, 1);
    // Inline function 'org.kodein.di.instance' call
    var tmp_3 = $this$provider.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(EnrolIntoCourseUseCase), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    var tmp2_enrolIntoCourseUseCase = tmp_3.q57(tmp$ret$4, null);
    return new ApproveOrDeclinePendingEnrolmentUseCase(tmp1_db, tmp0_repo, tmp2_enrolIntoCourseUseCase);
  }
  function commonDomainDiModule$lambda$lambda_1($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.q57(tmp$ret$0, 1);
    // Inline function 'org.kodein.di.instanceOrNull' call
    var tmp_2 = $this$provider.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp_4 = tmp_2.r57(tmp$ret$2, 2);
    // Inline function 'org.kodein.di.instance' call
    var tmp_5 = $this$provider.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(EnqueueSavePictureUseCase), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    var tmp$ret$5 = tmp_5.q57(tmp$ret$4, null);
    return new SaveContentEntryUseCase(tmp_1, tmp_4, tmp$ret$5);
  }
  function commonDomainDiModule$lambda$lambda_2($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = $this$provider.od();
    var tmp = $this$provider.s57();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_0 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var tmp$ret$1 = tmp_0.u56(tmp$ret$0, context);
    var tmp_2 = tmp.p57(tmp$ret$1).s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$3 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp_4 = tmp_2.q57(tmp$ret$3, 2);
    // Inline function 'org.kodein.di.instance' call
    var tmp_5 = $this$provider.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(UstadMobileSystemImpl), arrayOf([]), false));
    var tmp$ret$5 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    var tmp$ret$6 = tmp_5.q57(tmp$ret$5, null);
    return new GetAssignmentSubmitterNameUseCase(tmp_4, tmp$ret$6);
  }
  function commonDomainDiModule$lambda$lambda_3($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(SupportedLanguagesConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.q57(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = $this$provider.od();
    var tmp_2 = $this$provider.s57();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_3 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    var tmp$ret$3 = tmp_3.u56(tmp$ret$2, context);
    var tmp_5 = tmp_2.p57(tmp$ret$3).s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$5 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    var tmp$ret$6 = tmp_5.q57(tmp$ret$5, 2);
    return new GetLocaleForSiteTermsUseCase(tmp_1, tmp$ret$6);
  }
  function commonDomainDiModule$lambda$lambda_4($this$provider) {
    return new DefaultLaunchContentEntryVersionUseCase();
  }
  function commonDomainDiModule$lambda$lambda_5($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp$ret$1 = tmp.q57(tmp$ret$0, 2);
    return new RequestEnrolmentUseCase(tmp$ret$1);
  }
  function commonDomainDiModule$lambda$lambda_6($this$singleton) {
    return new MakeLinkUseCase($this$singleton.od());
  }
  function commonDomainDiModule$lambda$lambda_7($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp$ret$1 = tmp.q57(tmp$ret$0, 2);
    return new CreateNewClazzUseCase(tmp$ret$1);
  }
  function commonDomainDiModule$lambda$lambda_8($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.q57(tmp$ret$0, 1);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$singleton.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp$ret$3 = tmp_2.q57(tmp$ret$2, 2);
    return new AddNewPersonUseCase(tmp_1, tmp$ret$3);
  }
  function commonDomainDiModule$lambda$lambda_9($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.q57(tmp$ret$0, 2);
    var tmp_2 = $this$provider.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp_3 = $this$provider.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(CreateXapiGroupForCourseGroupUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    var tmp_5 = tmp_3.q57(tmp$ret$2, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_6 = $this$provider.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_7 = typeToken(createKType(getKClass(XapiStatementResource), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    var tmp_8 = tmp_6.q57(tmp$ret$4, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_9 = $this$provider.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_10 = typeToken(createKType(getKClass(XXStringHasher), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_10, TypeToken) ? tmp_10 : THROW_CCE();
    var tmp_11 = tmp_9.q57(tmp$ret$6, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_12 = $this$provider.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_13 = typeToken(createKType(getKClass(Json), arrayOf([]), false));
    var tmp$ret$8 = isInterface(tmp_13, TypeToken) ? tmp_13 : THROW_CCE();
    var tmp$ret$9 = tmp_12.q57(tmp$ret$8, null);
    return new SubmitMarkUseCase(tmp_1, tmp_2, tmp_5, tmp_8, tmp_11, tmp$ret$9);
  }
  function commonDomainDiModule$lambda$lambda_10($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.q57(tmp$ret$0, 2);
    var tmp_2 = $this$provider.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp_3 = $this$provider.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(XXStringHasher), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    var tmp$ret$3 = tmp_3.q57(tmp$ret$2, null);
    return new CreateXapiGroupForCourseGroupUseCase(tmp_1, tmp_2, tmp$ret$3);
  }
  function commonDomainDiModule$lambda($endpointScope) {
    return function ($this$$receiver) {
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp = typeToken(createKType(getKClass(EnrolIntoCourseUseCase), arrayOf([]), false));
      var tmp$ret$0 = isInterface(tmp, TypeToken) ? tmp : THROW_CCE();
      var tmp_0 = $this$$receiver.b56(tmp$ret$0, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_1 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$2 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
      var this_0 = new ImplWithScope(tmp$ret$2, scope);
      var creator = commonDomainDiModule$lambda$lambda;
      var tmp_2 = this_0.o55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_3 = typeToken(createKType(getKClass(EnrolIntoCourseUseCase), arrayOf([]), false));
      var tmp$ret$4 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
      var tmp$ret$5 = new Provider(tmp_2, tmp$ret$4, creator);
      tmp_0.p5a(tmp$ret$5);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_4 = typeToken(createKType(getKClass(IApproveOrDeclinePendingEnrolmentRequestUseCase), arrayOf([]), false));
      var tmp$ret$6 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
      var tmp_5 = $this$$receiver.b56(tmp$ret$6, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_0 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_6 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$8 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
      var this_1 = new ImplWithScope(tmp$ret$8, scope_0);
      var creator_0 = commonDomainDiModule$lambda$lambda_0;
      var tmp_7 = this_1.o55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_8 = typeToken(createKType(getKClass(ApproveOrDeclinePendingEnrolmentUseCase), arrayOf([]), false));
      var tmp$ret$10 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
      var tmp$ret$11 = new Provider(tmp_7, tmp$ret$10, creator_0);
      tmp_5.p5a(tmp$ret$11);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_9 = typeToken(createKType(getKClass(SaveContentEntryUseCase), arrayOf([]), false));
      var tmp$ret$12 = isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE();
      var tmp_10 = $this$$receiver.b56(tmp$ret$12, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_1 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_11 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$14 = isInterface(tmp_11, TypeToken) ? tmp_11 : THROW_CCE();
      var this_2 = new ImplWithScope(tmp$ret$14, scope_1);
      var creator_1 = commonDomainDiModule$lambda$lambda_1;
      var tmp_12 = this_2.o55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_13 = typeToken(createKType(getKClass(SaveContentEntryUseCase), arrayOf([]), false));
      var tmp$ret$16 = isInterface(tmp_13, TypeToken) ? tmp_13 : THROW_CCE();
      var tmp$ret$17 = new Provider(tmp_12, tmp$ret$16, creator_1);
      tmp_10.p5a(tmp$ret$17);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_14 = typeToken(createKType(getKClass(GetAssignmentSubmitterNameUseCase), arrayOf([]), false));
      var tmp$ret$18 = isInterface(tmp_14, TypeToken) ? tmp_14 : THROW_CCE();
      var tmp_15 = $this$$receiver.b56(tmp$ret$18, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_2 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_16 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$20 = isInterface(tmp_16, TypeToken) ? tmp_16 : THROW_CCE();
      var this_3 = new ImplWithScope(tmp$ret$20, scope_2);
      var creator_2 = commonDomainDiModule$lambda$lambda_2;
      var tmp_17 = this_3.o55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_18 = typeToken(createKType(getKClass(GetAssignmentSubmitterNameUseCase), arrayOf([]), false));
      var tmp$ret$22 = isInterface(tmp_18, TypeToken) ? tmp_18 : THROW_CCE();
      var tmp$ret$23 = new Provider(tmp_17, tmp$ret$22, creator_2);
      tmp_15.p5a(tmp$ret$23);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_19 = typeToken(createKType(getKClass(GetLocaleForSiteTermsUseCase), arrayOf([]), false));
      var tmp$ret$24 = isInterface(tmp_19, TypeToken) ? tmp_19 : THROW_CCE();
      var tmp_20 = $this$$receiver.b56(tmp$ret$24, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_3 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_21 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$26 = isInterface(tmp_21, TypeToken) ? tmp_21 : THROW_CCE();
      var this_4 = new ImplWithScope(tmp$ret$26, scope_3);
      var creator_3 = commonDomainDiModule$lambda$lambda_3;
      var tmp_22 = this_4.o55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_23 = typeToken(createKType(getKClass(GetLocaleForSiteTermsUseCase), arrayOf([]), false));
      var tmp$ret$28 = isInterface(tmp_23, TypeToken) ? tmp_23 : THROW_CCE();
      var tmp$ret$29 = new Provider(tmp_22, tmp$ret$28, creator_3);
      tmp_20.p5a(tmp$ret$29);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_24 = typeToken(createKType(getKClass(LaunchContentEntryVersionUseCase), arrayOf([]), false));
      var tmp$ret$30 = isInterface(tmp_24, TypeToken) ? tmp_24 : THROW_CCE();
      var tmp_25 = $this$$receiver.b56(tmp$ret$30, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_4 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_26 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$32 = isInterface(tmp_26, TypeToken) ? tmp_26 : THROW_CCE();
      var this_5 = new ImplWithScope(tmp$ret$32, scope_4);
      var creator_4 = commonDomainDiModule$lambda$lambda_4;
      var tmp_27 = this_5.o55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_28 = typeToken(createKType(getKClass(DefaultLaunchContentEntryVersionUseCase), arrayOf([]), false));
      var tmp$ret$34 = isInterface(tmp_28, TypeToken) ? tmp_28 : THROW_CCE();
      var tmp$ret$35 = new Provider(tmp_27, tmp$ret$34, creator_4);
      tmp_25.p5a(tmp$ret$35);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_29 = typeToken(createKType(getKClass(RequestEnrolmentUseCase), arrayOf([]), false));
      var tmp$ret$36 = isInterface(tmp_29, TypeToken) ? tmp_29 : THROW_CCE();
      var tmp_30 = $this$$receiver.b56(tmp$ret$36, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_5 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_31 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$38 = isInterface(tmp_31, TypeToken) ? tmp_31 : THROW_CCE();
      var this_6 = new ImplWithScope(tmp$ret$38, scope_5);
      var creator_5 = commonDomainDiModule$lambda$lambda_5;
      var tmp_32 = this_6.o55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_33 = typeToken(createKType(getKClass(RequestEnrolmentUseCase), arrayOf([]), false));
      var tmp$ret$40 = isInterface(tmp_33, TypeToken) ? tmp_33 : THROW_CCE();
      var tmp$ret$41 = new Provider(tmp_32, tmp$ret$40, creator_5);
      tmp_30.p5a(tmp$ret$41);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_34 = typeToken(createKType(getKClass(MakeLinkUseCase), arrayOf([]), false));
      var tmp$ret$42 = isInterface(tmp_34, TypeToken) ? tmp_34 : THROW_CCE();
      var tmp_35 = $this$$receiver.b56(tmp$ret$42, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_6 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_36 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$44 = isInterface(tmp_36, TypeToken) ? tmp_36 : THROW_CCE();
      var this_7 = new ImplWithScope(tmp$ret$44, scope_6);
      var creator_6 = commonDomainDiModule$lambda$lambda_6;
      var tmp_37 = this_7.p55();
      var tmp_38 = this_7.o55();
      var tmp_39 = this_7.q55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_40 = typeToken(createKType(getKClass(MakeLinkUseCase), arrayOf([]), false));
      var tmp$ret$46 = isInterface(tmp_40, TypeToken) ? tmp_40 : THROW_CCE();
      var tmp$ret$47 = new Singleton(tmp_37, tmp_38, tmp_39, tmp$ret$46, null, true, creator_6);
      tmp_35.p5a(tmp$ret$47);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_41 = typeToken(createKType(getKClass(CreateNewClazzUseCase), arrayOf([]), false));
      var tmp$ret$48 = isInterface(tmp_41, TypeToken) ? tmp_41 : THROW_CCE();
      var tmp_42 = $this$$receiver.b56(tmp$ret$48, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_7 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_43 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$50 = isInterface(tmp_43, TypeToken) ? tmp_43 : THROW_CCE();
      var this_8 = new ImplWithScope(tmp$ret$50, scope_7);
      var creator_7 = commonDomainDiModule$lambda$lambda_7;
      var tmp_44 = this_8.p55();
      var tmp_45 = this_8.o55();
      var tmp_46 = this_8.q55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_47 = typeToken(createKType(getKClass(CreateNewClazzUseCase), arrayOf([]), false));
      var tmp$ret$52 = isInterface(tmp_47, TypeToken) ? tmp_47 : THROW_CCE();
      var tmp$ret$53 = new Singleton(tmp_44, tmp_45, tmp_46, tmp$ret$52, null, true, creator_7);
      tmp_42.p5a(tmp$ret$53);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_48 = typeToken(createKType(getKClass(AddNewPersonUseCase), arrayOf([]), false));
      var tmp$ret$54 = isInterface(tmp_48, TypeToken) ? tmp_48 : THROW_CCE();
      var tmp_49 = $this$$receiver.b56(tmp$ret$54, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_8 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_50 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$56 = isInterface(tmp_50, TypeToken) ? tmp_50 : THROW_CCE();
      var this_9 = new ImplWithScope(tmp$ret$56, scope_8);
      var creator_8 = commonDomainDiModule$lambda$lambda_8;
      var tmp_51 = this_9.p55();
      var tmp_52 = this_9.o55();
      var tmp_53 = this_9.q55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_54 = typeToken(createKType(getKClass(AddNewPersonUseCase), arrayOf([]), false));
      var tmp$ret$58 = isInterface(tmp_54, TypeToken) ? tmp_54 : THROW_CCE();
      var tmp$ret$59 = new Singleton(tmp_51, tmp_52, tmp_53, tmp$ret$58, null, true, creator_8);
      tmp_49.p5a(tmp$ret$59);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_55 = typeToken(createKType(getKClass(SubmitMarkUseCase), arrayOf([]), false));
      var tmp$ret$60 = isInterface(tmp_55, TypeToken) ? tmp_55 : THROW_CCE();
      var tmp_56 = $this$$receiver.b56(tmp$ret$60, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_9 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_57 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$62 = isInterface(tmp_57, TypeToken) ? tmp_57 : THROW_CCE();
      var this_10 = new ImplWithScope(tmp$ret$62, scope_9);
      var creator_9 = commonDomainDiModule$lambda$lambda_9;
      var tmp_58 = this_10.o55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_59 = typeToken(createKType(getKClass(SubmitMarkUseCase), arrayOf([]), false));
      var tmp$ret$64 = isInterface(tmp_59, TypeToken) ? tmp_59 : THROW_CCE();
      var tmp$ret$65 = new Provider(tmp_58, tmp$ret$64, creator_9);
      tmp_56.p5a(tmp$ret$65);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_60 = typeToken(createKType(getKClass(CreateXapiGroupForCourseGroupUseCase), arrayOf([]), false));
      var tmp$ret$66 = isInterface(tmp_60, TypeToken) ? tmp_60 : THROW_CCE();
      var tmp_61 = $this$$receiver.b56(tmp$ret$66, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_10 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_62 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$68 = isInterface(tmp_62, TypeToken) ? tmp_62 : THROW_CCE();
      var this_11 = new ImplWithScope(tmp$ret$68, scope_10);
      var creator_10 = commonDomainDiModule$lambda$lambda_10;
      var tmp_63 = this_11.o55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_64 = typeToken(createKType(getKClass(CreateXapiGroupForCourseGroupUseCase), arrayOf([]), false));
      var tmp$ret$70 = isInterface(tmp_64, TypeToken) ? tmp_64 : THROW_CCE();
      var tmp$ret$71 = new Provider(tmp_63, tmp$ret$70, creator_10);
      tmp_61.p5a(tmp$ret$71);
      return Unit_instance;
    };
  }
  function CourseTerminologyStrings_init_$Init$(courseTerminology, systemImpl, json, $this) {
    CourseTerminologyStrings.call($this, toTerminologyEntries(courseTerminology, json, systemImpl), courseTerminology.s8f_1);
    return $this;
  }
  function CourseTerminologyStrings_init_$Create$(courseTerminology, systemImpl, json) {
    return CourseTerminologyStrings_init_$Init$(courseTerminology, systemImpl, json, objectCreate(protoOf(CourseTerminologyStrings)));
  }
  function Companion_71() {
    Companion_instance_119 = this;
    this.eon_1 = new CourseTerminologyStrings(emptyList());
  }
  var Companion_instance_119;
  function Companion_getInstance_88() {
    if (Companion_instance_119 == null)
      new Companion_71();
    return Companion_instance_119;
  }
  function CourseTerminologyStrings(terminologyEntries, terminologyKey) {
    Companion_getInstance_88();
    terminologyKey = terminologyKey === VOID ? null : terminologyKey;
    this.fon_1 = terminologyEntries;
    this.gon_1 = terminologyKey;
  }
  protoOf(CourseTerminologyStrings).hon = function (messageId) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator = this.fon_1.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.impl.locale.CourseTerminologyStrings.get.<anonymous>' call
        if (element.jon_1.equals(messageId)) {
          tmp$ret$1 = element;
          break $l$block;
        }
      }
      tmp$ret$1 = null;
    }
    var tmp0_safe_receiver = tmp$ret$1;
    return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.kon_1;
  };
  protoOf(CourseTerminologyStrings).equals = function (other) {
    var tmp0_safe_receiver = other instanceof CourseTerminologyStrings ? other : null;
    return equals(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.fon_1, this.fon_1);
  };
  protoOf(CourseTerminologyStrings).hashCode = function () {
    return hashCode(this.fon_1);
  };
  function mapLookup(_this__u8e3s4, key, map, fallback) {
    var tmp;
    if (fallback === VOID) {
      tmp = mapLookup$lambda;
    } else {
      tmp = fallback;
    }
    fallback = tmp;
    var tmp0_safe_receiver = map.q(key);
    var tmp_0;
    if (tmp0_safe_receiver == null) {
      tmp_0 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.impl.locale.mapLookup.<anonymous>' call
      tmp_0 = _this__u8e3s4.hon(tmp0_safe_receiver);
    }
    var tmp1_elvis_lhs = tmp_0;
    return tmp1_elvis_lhs == null ? fallback(key) : tmp1_elvis_lhs;
  }
  function mapLookup$lambda(it) {
    return '';
  }
  function TerminologyEntry(id, stringResource, term, errorMessage) {
    errorMessage = errorMessage === VOID ? null : errorMessage;
    this.ion_1 = id;
    this.jon_1 = stringResource;
    this.kon_1 = term;
    this.lon_1 = errorMessage;
  }
  protoOf(TerminologyEntry).mon = function (id, stringResource, term, errorMessage) {
    return new TerminologyEntry(id, stringResource, term, errorMessage);
  };
  protoOf(TerminologyEntry).non = function (id, stringResource, term, errorMessage, $super) {
    id = id === VOID ? this.ion_1 : id;
    stringResource = stringResource === VOID ? this.jon_1 : stringResource;
    term = term === VOID ? this.kon_1 : term;
    errorMessage = errorMessage === VOID ? this.lon_1 : errorMessage;
    return $super === VOID ? this.mon(id, stringResource, term, errorMessage) : $super.mon.call(this, id, stringResource, term, errorMessage);
  };
  protoOf(TerminologyEntry).toString = function () {
    return 'TerminologyEntry(id=' + this.ion_1 + ', stringResource=' + this.jon_1 + ', term=' + this.kon_1 + ', errorMessage=' + this.lon_1 + ')';
  };
  protoOf(TerminologyEntry).hashCode = function () {
    var result = getStringHashCode(this.ion_1);
    result = imul(result, 31) + this.jon_1.hashCode() | 0;
    result = imul(result, 31) + (this.kon_1 == null ? 0 : getStringHashCode(this.kon_1)) | 0;
    result = imul(result, 31) + (this.lon_1 == null ? 0 : getStringHashCode(this.lon_1)) | 0;
    return result;
  };
  protoOf(TerminologyEntry).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof TerminologyEntry))
      return false;
    var tmp0_other_with_cast = other instanceof TerminologyEntry ? other : THROW_CCE();
    if (!(this.ion_1 === tmp0_other_with_cast.ion_1))
      return false;
    if (!this.jon_1.equals(tmp0_other_with_cast.jon_1))
      return false;
    if (!(this.kon_1 == tmp0_other_with_cast.kon_1))
      return false;
    if (!(this.lon_1 == tmp0_other_with_cast.lon_1))
      return false;
    return true;
  };
  function ClazzEnrolmentListConstants() {
    ClazzEnrolmentListConstants_instance = this;
    var tmp = this;
    var tmp_0 = to(1000, strings_getInstance().aly_1);
    var tmp_1 = to(1001, strings_getInstance().nlr_1);
    var tmp_2 = to(1003, strings_getInstance().jm8_1);
    tmp.oon_1 = mapOf([tmp_0, tmp_1, tmp_2, to(1002, strings_getInstance().gm1_1)]);
    var tmp_3 = this;
    var tmp_4 = to(202, strings_getInstance().clr_1);
    var tmp_5 = to(201, strings_getInstance().mlq_1);
    var tmp_6 = to(203, strings_getInstance().nlq_1);
    tmp_3.pon_1 = mapOf([tmp_4, tmp_5, tmp_6, to(200, strings_getInstance().blr_1)]);
  }
  var ClazzEnrolmentListConstants_instance;
  function ClazzEnrolmentListConstants_getInstance() {
    if (ClazzEnrolmentListConstants_instance == null)
      new ClazzEnrolmentListConstants();
    return ClazzEnrolmentListConstants_instance;
  }
  function ConditionConstants() {
    ConditionConstants_instance = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().vll_1;
    var tmp_1 = new MessageIdOption2(tmp_0, 200);
    var tmp_2 = strings_getInstance().wll_1;
    var tmp_3 = new MessageIdOption2(tmp_2, 201);
    var tmp_4 = strings_getInstance().xll_1;
    var tmp_5 = new MessageIdOption2(tmp_4, 202);
    var tmp_6 = strings_getInstance().yll_1;
    var tmp_7 = new MessageIdOption2(tmp_6, 203);
    var tmp_8 = strings_getInstance().blm_1;
    var tmp_9 = new MessageIdOption2(tmp_8, 205);
    var tmp_10 = strings_getInstance().zll_1;
    var tmp_11 = new MessageIdOption2(tmp_10, 206);
    var tmp_12 = strings_getInstance().alm_1;
    tmp.qon_1 = listOf([tmp_1, tmp_3, tmp_5, tmp_7, tmp_9, tmp_11, new MessageIdOption2(tmp_12, 207)]);
  }
  var ConditionConstants_instance;
  function ConditionConstants_getInstance() {
    if (ConditionConstants_instance == null)
      new ConditionConstants();
    return ConditionConstants_instance;
  }
  function ContentCompletionStatusConstants() {
    ContentCompletionStatusConstants_instance = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().slf_1;
    var tmp_1 = new MessageIdOption2(tmp_0, 100);
    var tmp_2 = strings_getInstance().plf_1;
    var tmp_3 = new MessageIdOption2(tmp_2, 102);
    var tmp_4 = strings_getInstance().olf_1;
    tmp.ron_1 = listOf([tmp_1, tmp_3, new MessageIdOption2(tmp_4, 103)]);
  }
  var ContentCompletionStatusConstants_instance;
  function ContentCompletionStatusConstants_getInstance() {
    if (ContentCompletionStatusConstants_instance == null)
      new ContentCompletionStatusConstants();
    return ContentCompletionStatusConstants_instance;
  }
  function EnrolmentPolicyConstants() {
    EnrolmentPolicyConstants_instance = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().oma_1;
    Companion_getInstance_4();
    var tmp_1 = new MessageIdOption2(tmp_0, 102);
    var tmp_2 = strings_getInstance().omc_1;
    Companion_getInstance_4();
    tmp.son_1 = listOf([tmp_1, new MessageIdOption2(tmp_2, 100)]);
  }
  var EnrolmentPolicyConstants_instance;
  function EnrolmentPolicyConstants_getInstance() {
    if (EnrolmentPolicyConstants_instance == null)
      new EnrolmentPolicyConstants();
    return EnrolmentPolicyConstants_instance;
  }
  function FieldConstants() {
    FieldConstants_instance = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().pll_1;
    var tmp_1 = new MessageIdOption2(tmp_0, 100);
    var tmp_2 = strings_getInstance().qll_1;
    var tmp_3 = new MessageIdOption2(tmp_2, 101);
    var tmp_4 = strings_getInstance().rll_1;
    var tmp_5 = new MessageIdOption2(tmp_4, 102);
    var tmp_6 = strings_getInstance().sll_1;
    var tmp_7 = new MessageIdOption2(tmp_6, 103);
    var tmp_8 = strings_getInstance().tll_1;
    var tmp_9 = new MessageIdOption2(tmp_8, 104);
    var tmp_10 = strings_getInstance().ull_1;
    var tmp_11 = new MessageIdOption2(tmp_10, 105);
    var tmp_12 = strings_getInstance().zlq_1;
    var tmp_13 = new MessageIdOption2(tmp_12, 106);
    var tmp_14 = strings_getInstance().alr_1;
    tmp.ton_1 = listOf([tmp_1, tmp_3, tmp_5, tmp_7, tmp_9, tmp_11, tmp_13, new MessageIdOption2(tmp_14, 107)]);
  }
  var FieldConstants_instance;
  function FieldConstants_getInstance() {
    if (FieldConstants_instance == null)
      new FieldConstants();
    return FieldConstants_instance;
  }
  function LicenceConstants() {
    LicenceConstants_instance = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().eln_1;
    var tmp_1 = new MessageIdOption2(tmp_0, 1);
    var tmp_2 = strings_getInstance().fln_1;
    var tmp_3 = new MessageIdOption2(tmp_2, 2);
    var tmp_4 = strings_getInstance().gln_1;
    var tmp_5 = new MessageIdOption2(tmp_4, 3);
    var tmp_6 = strings_getInstance().hln_1;
    var tmp_7 = new MessageIdOption2(tmp_6, 4);
    var tmp_8 = strings_getInstance().kln_1;
    var tmp_9 = new MessageIdOption2(tmp_8, 5);
    var tmp_10 = strings_getInstance().iln_1;
    var tmp_11 = new MessageIdOption2(tmp_10, 6);
    var tmp_12 = strings_getInstance().jln_1;
    var tmp_13 = new MessageIdOption2(tmp_12, 7);
    var tmp_14 = strings_getInstance().cle_1;
    var tmp_15 = new MessageIdOption2(tmp_14, 8);
    var tmp_16 = strings_getInstance().lln_1;
    var tmp_17 = new MessageIdOption2(tmp_16, 9);
    var tmp_18 = strings_getInstance().dle_1;
    tmp.uon_1 = listOf([tmp_1, tmp_3, tmp_5, tmp_7, tmp_9, tmp_11, tmp_13, tmp_15, tmp_17, new MessageIdOption2(tmp_18, 0)]);
  }
  var LicenceConstants_instance;
  function LicenceConstants_getInstance() {
    if (LicenceConstants_instance == null)
      new LicenceConstants();
    return LicenceConstants_instance;
  }
  function OutcomeConstants() {
    OutcomeConstants_instance = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().blr_1;
    var tmp_1 = new MessageIdOption2(tmp_0, 200);
    var tmp_2 = strings_getInstance().mlq_1;
    var tmp_3 = new MessageIdOption2(tmp_2, 201);
    var tmp_4 = strings_getInstance().olf_1;
    var tmp_5 = new MessageIdOption2(tmp_4, 202);
    var tmp_6 = strings_getInstance().nlq_1;
    tmp.von_1 = listOf([tmp_1, tmp_3, tmp_5, new MessageIdOption2(tmp_6, 203)]);
  }
  var OutcomeConstants_instance;
  function OutcomeConstants_getInstance() {
    if (OutcomeConstants_instance == null)
      new OutcomeConstants();
    return OutcomeConstants_instance;
  }
  function PersonConstants_0() {
    PersonConstants_instance_0 = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().ble_1;
    var tmp_1 = new MessageIdOption2(tmp_0, 1);
    var tmp_2 = strings_getInstance().ale_1;
    var tmp_3 = new MessageIdOption2(tmp_2, 2);
    var tmp_4 = strings_getInstance().cle_1;
    tmp.nom_1 = listOf([tmp_1, tmp_3, new MessageIdOption2(tmp_4, 4)]);
    var tmp_5 = this;
    var tmp_6 = strings_getInstance().dle_1;
    tmp_5.oom_1 = plus(listOf_0(new MessageIdOption2(tmp_6, 0)), this.nom_1);
  }
  var PersonConstants_instance_0;
  function PersonConstants_getInstance_0() {
    if (PersonConstants_instance_0 == null)
      new PersonConstants_0();
    return PersonConstants_instance_0;
  }
  function PersonParentJoinConstants() {
    PersonParentJoinConstants_instance = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().glo_1;
    var tmp_1 = new MessageIdOption2(tmp_0, 1);
    var tmp_2 = strings_getInstance().flo_1;
    var tmp_3 = new MessageIdOption2(tmp_2, 2);
    var tmp_4 = strings_getInstance().em4_1;
    var tmp_5 = new MessageIdOption2(tmp_4, 4);
    var tmp_6 = strings_getInstance().cle_1;
    tmp.won_1 = listOf([tmp_1, tmp_3, tmp_5, new MessageIdOption2(tmp_6, 8)]);
  }
  var PersonParentJoinConstants_instance;
  function PersonParentJoinConstants_getInstance() {
    if (PersonParentJoinConstants_instance == null)
      new PersonParentJoinConstants();
    return PersonParentJoinConstants_instance;
  }
  function RoleConstants() {
    RoleConstants_instance = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().aly_1;
    var tmp_1 = new MessageIdOption2(tmp_0, 1000);
    var tmp_2 = strings_getInstance().nlr_1;
    tmp.xon_1 = listOf([tmp_1, new MessageIdOption2(tmp_2, 1001)]);
  }
  var RoleConstants_instance;
  function RoleConstants_getInstance() {
    if (RoleConstants_instance == null)
      new RoleConstants();
    return RoleConstants_instance;
  }
  function ScheduleConstants() {
    ScheduleConstants_instance = this;
    this.yon_1 = listOf([new MessageIdOption2(strings_getInstance().plp_1, Companion_instance_28.sjr_1), new MessageIdOption2(strings_getInstance().qlp_1, Companion_instance_28.mjr_1), new MessageIdOption2(strings_getInstance().rlp_1, Companion_instance_28.njr_1), new MessageIdOption2(strings_getInstance().slp_1, Companion_instance_28.ojr_1), new MessageIdOption2(strings_getInstance().tlp_1, Companion_instance_28.pjr_1), new MessageIdOption2(strings_getInstance().ulp_1, Companion_instance_28.qjr_1), new MessageIdOption2(strings_getInstance().vlp_1, Companion_instance_28.rjr_1)]);
    var tmp = this;
    // Inline function 'kotlin.collections.map' call
    var this_0 = this.yon_1;
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.impl.locale.entityconstants.ScheduleConstants.DAY_MESSAGE_ID_MAP.<anonymous>' call
      var tmp$ret$0 = to(item.qom_1, item.pom_1);
      destination.i1(tmp$ret$0);
    }
    tmp.zon_1 = toMap(destination);
    this.aoo_1 = mapOf([to(Companion_instance_28.hjr_1, strings_getInstance().mlp_1), to(Companion_instance_28.ijr_1, strings_getInstance().klp_1)]);
  }
  var ScheduleConstants_instance;
  function ScheduleConstants_getInstance() {
    if (ScheduleConstants_instance == null)
      new ScheduleConstants();
    return ScheduleConstants_instance;
  }
  function SubmissionPolicyConstants() {
    SubmissionPolicyConstants_instance = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().qmc_1;
    var tmp_1 = new MessageIdOption2(tmp_0, 1);
    var tmp_2 = strings_getInstance().rmc_1;
    tmp.boo_1 = listOf([tmp_1, new MessageIdOption2(tmp_2, 2)]);
  }
  var SubmissionPolicyConstants_instance;
  function SubmissionPolicyConstants_getInstance() {
    if (SubmissionPolicyConstants_instance == null)
      new SubmissionPolicyConstants();
    return SubmissionPolicyConstants_instance;
  }
  function CommandFlowUstadNavController() {
    this.coo_1 = MutableSharedFlow(1, 0, BufferOverflow_DROP_OLDEST_getInstance());
    this.doo_1 = asSharedFlow(this.coo_1);
  }
  protoOf(CommandFlowUstadNavController).eoo = function (viewName, args, goOptions) {
    this.coo_1.i1h(new NavigateNavCommand(viewName, args, goOptions));
  };
  protoOf(CommandFlowUstadNavController).foo = function (viewName, inclusive) {
    this.coo_1.i1h(new PopNavCommand(viewName, inclusive));
  };
  function NavCommand(timestamp) {
    this.goo_1 = timestamp;
  }
  function NavigateNavCommand(viewName, args, goOptions) {
    NavCommand.call(this, systemTimeInMillis());
    this.ioo_1 = viewName;
    this.joo_1 = args;
    this.koo_1 = goOptions;
  }
  protoOf(NavigateNavCommand).toString = function () {
    return 'NavigateNavCommand(viewName=' + this.ioo_1 + ', args=' + this.joo_1 + ', goOptions=' + this.koo_1 + ')';
  };
  protoOf(NavigateNavCommand).hashCode = function () {
    var result = getStringHashCode(this.ioo_1);
    result = imul(result, 31) + hashCode(this.joo_1) | 0;
    result = imul(result, 31) + this.koo_1.hashCode() | 0;
    return result;
  };
  protoOf(NavigateNavCommand).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof NavigateNavCommand))
      return false;
    var tmp0_other_with_cast = other instanceof NavigateNavCommand ? other : THROW_CCE();
    if (!(this.ioo_1 === tmp0_other_with_cast.ioo_1))
      return false;
    if (!equals(this.joo_1, tmp0_other_with_cast.joo_1))
      return false;
    if (!this.koo_1.equals(tmp0_other_with_cast.koo_1))
      return false;
    return true;
  };
  function PopNavCommand(viewName, inclusive) {
    NavCommand.call(this, systemTimeInMillis());
    this.moo_1 = viewName;
    this.noo_1 = inclusive;
  }
  protoOf(PopNavCommand).toString = function () {
    return 'PopNavCommand(viewName=' + this.moo_1 + ', inclusive=' + this.noo_1 + ')';
  };
  protoOf(PopNavCommand).hashCode = function () {
    var result = getStringHashCode(this.moo_1);
    result = imul(result, 31) + getBooleanHashCode(this.noo_1) | 0;
    return result;
  };
  protoOf(PopNavCommand).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof PopNavCommand))
      return false;
    var tmp0_other_with_cast = other instanceof PopNavCommand ? other : THROW_CCE();
    if (!(this.moo_1 === tmp0_other_with_cast.moo_1))
      return false;
    if (!(this.noo_1 === tmp0_other_with_cast.noo_1))
      return false;
    return true;
  };
  function NavResult(key, timestamp, result) {
    this.ooo_1 = key;
    this.poo_1 = timestamp;
    this.qoo_1 = result;
  }
  protoOf(NavResult).toString = function () {
    return 'NavResult(key=' + this.ooo_1 + ', timestamp=' + this.poo_1.toString() + ', result=' + toString_0(this.qoo_1) + ')';
  };
  protoOf(NavResult).hashCode = function () {
    var result = getStringHashCode(this.ooo_1);
    result = imul(result, 31) + this.poo_1.hashCode() | 0;
    result = imul(result, 31) + (this.qoo_1 == null ? 0 : hashCode(this.qoo_1)) | 0;
    return result;
  };
  protoOf(NavResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof NavResult))
      return false;
    var tmp0_other_with_cast = other instanceof NavResult ? other : THROW_CCE();
    if (!(this.ooo_1 === tmp0_other_with_cast.ooo_1))
      return false;
    if (!this.poo_1.equals(tmp0_other_with_cast.poo_1))
      return false;
    if (!equals(this.qoo_1, tmp0_other_with_cast.qoo_1))
      return false;
    return true;
  };
  function NavResultDest(viewName, key) {
    this.roo_1 = viewName;
    this.soo_1 = key;
  }
  function NavResultReturner() {
  }
  function NavResultReturnerImpl$resultFlowForKey$o$collect$slambda($$this$unsafeFlow, $key, resultContinuation) {
    this.dop_1 = $$this$unsafeFlow;
    this.eop_1 = $key;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(NavResultReturnerImpl$resultFlowForKey$o$collect$slambda).jop = function (value, $completion) {
    var tmp = this.kop(value, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(NavResultReturnerImpl$resultFlowForKey$o$collect$slambda).he = function (p1, $completion) {
    return this.jop(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(NavResultReturnerImpl$resultFlowForKey$o$collect$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            var tmp_0 = this;
            tmp_0.hop_1 = this.dop_1;
            var tmp_1 = this;
            tmp_1.iop_1 = this.fop_1;
            if (this.iop_1.ooo_1 === this.eop_1) {
              this.hd_1 = 3;
              suspendResult = this.hop_1.t1d(this.iop_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 2;
              continue $sm;
            }

          case 2:
            if (false) {
              this.hd_1 = 1;
              continue $sm;
            }

            this.hd_1 = 4;
            continue $sm;
          case 3:
            this.gop_1 = suspendResult;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            return Unit_instance;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(NavResultReturnerImpl$resultFlowForKey$o$collect$slambda).kop = function (value, completion) {
    var i = new NavResultReturnerImpl$resultFlowForKey$o$collect$slambda(this.dop_1, this.eop_1, completion);
    i.fop_1 = value;
    return i;
  };
  function NavResultReturnerImpl$resultFlowForKey$o$collect$slambda_0($$this$unsafeFlow, $key, resultContinuation) {
    var i = new NavResultReturnerImpl$resultFlowForKey$o$collect$slambda($$this$unsafeFlow, $key, resultContinuation);
    var l = function (value, $completion) {
      return i.jop(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$42(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.top_1 = _this__u8e3s4;
    this.uop_1 = collector;
  }
  protoOf($collectCOROUTINE$42).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.vop_1 = this.uop_1;
            this.hd_1 = 1;
            var tmp_1 = NavResultReturnerImpl$resultFlowForKey$o$collect$slambda_0(this.vop_1, this.top_1.xop_1, null);
            suspendResult = this.top_1.wop_1.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_1(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function sam$kotlinx_coroutines_flow_FlowCollector$0_1(function_0) {
    this.yop_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_1).t1d = function (value, $completion) {
    return this.yop_1(value, $completion);
  };
  function _no_name_provided__qut3iv_0($this, $key) {
    this.wop_1 = $this;
    this.xop_1 = $key;
  }
  protoOf(_no_name_provided__qut3iv_0).zop = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$42(this, collector, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(_no_name_provided__qut3iv_0).z1b = function (collector, $completion) {
    return this.zop(collector, $completion);
  };
  function NavResultReturnerImpl() {
    this.aoq_1 = MutableSharedFlow(1, 0, BufferOverflow_DROP_OLDEST_getInstance());
  }
  protoOf(NavResultReturnerImpl).too = function (key) {
    // Inline function 'kotlinx.coroutines.flow.filter' call
    // Inline function 'kotlinx.coroutines.flow.unsafeTransform' call
    var this_0 = this.aoq_1;
    // Inline function 'kotlinx.coroutines.flow.internal.unsafeFlow' call
    return new _no_name_provided__qut3iv_0(this_0, key);
  };
  protoOf(NavResultReturnerImpl).uoo = function (result) {
    this.aoq_1.i1h(result);
  };
  function UstadNavController() {
  }
  function BitmaskFlag(flagVal, stringResource, enabled) {
    enabled = enabled === VOID ? false : enabled;
    this.boq_1 = flagVal;
    this.coq_1 = stringResource;
    this.doq_1 = enabled;
  }
  protoOf(BitmaskFlag).eoq = function (flagVal, stringResource, enabled) {
    return new BitmaskFlag(flagVal, stringResource, enabled);
  };
  protoOf(BitmaskFlag).foq = function (flagVal, stringResource, enabled, $super) {
    flagVal = flagVal === VOID ? this.boq_1 : flagVal;
    stringResource = stringResource === VOID ? this.coq_1 : stringResource;
    enabled = enabled === VOID ? this.doq_1 : enabled;
    return $super === VOID ? this.eoq(flagVal, stringResource, enabled) : $super.eoq.call(this, flagVal, stringResource, enabled);
  };
  protoOf(BitmaskFlag).toString = function () {
    return 'BitmaskFlag(flagVal=' + this.boq_1.toString() + ', stringResource=' + this.coq_1 + ', enabled=' + this.doq_1 + ')';
  };
  protoOf(BitmaskFlag).hashCode = function () {
    var result = this.boq_1.hashCode();
    result = imul(result, 31) + this.coq_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.doq_1) | 0;
    return result;
  };
  protoOf(BitmaskFlag).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof BitmaskFlag))
      return false;
    var tmp0_other_with_cast = other instanceof BitmaskFlag ? other : THROW_CCE();
    if (!this.boq_1.equals(tmp0_other_with_cast.boq_1))
      return false;
    if (!this.coq_1.equals(tmp0_other_with_cast.coq_1))
      return false;
    if (!(this.doq_1 === tmp0_other_with_cast.doq_1))
      return false;
    return true;
  };
  function ListPagingSource(list) {
    PagingSource.call(this);
    this.hoq_1 = list;
  }
  protoOf(ListPagingSource).p5r = function (params, $completion) {
    var tmp0_elvis_lhs = params.s2();
    var startFrom = tmp0_elvis_lhs == null ? 0 : tmp0_elvis_lhs;
    var loadSize = params.u53_1;
    var tmp1_elvis_lhs = params.s2();
    var tmp = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
    // Inline function 'kotlin.math.min' call
    var a = this.hoq_1.u();
    var b = startFrom + loadSize | 0;
    var tmp$ret$0 = Math.min(a, b);
    var subList = this.hoq_1.z(tmp, tmp$ret$0);
    var tmp_0;
    if (startFrom > 0) {
      // Inline function 'kotlin.math.max' call
      var b_0 = startFrom - loadSize | 0;
      tmp_0 = Math.max(0, b_0);
    } else {
      tmp_0 = null;
    }
    var tmp_1 = tmp_0;
    var tmp_2;
    if ((startFrom + loadSize | 0) < this.hoq_1.u()) {
      tmp_2 = startFrom + loadSize | 0;
    } else {
      tmp_2 = null;
    }
    var tmp_3 = Page_init_$Create$(subList, tmp_1, tmp_2);
    return tmp_3 instanceof LoadResult ? tmp_3 : THROW_CCE();
  };
  protoOf(ListPagingSource).c54 = function (params, $completion) {
    return this.p5r(params, $completion);
  };
  function RefreshCommand(time) {
    time = time === VOID ? systemTimeInMillis() : time;
    this.ioq_1 = time;
  }
  function ClazzLogCreatorManager() {
  }
  function generateUid(_this__u8e3s4) {
    return toLong(_this__u8e3s4.a9q_1.hashCode()).rc(32).vc(toLong(_this__u8e3s4.b9q_1.hashCode()));
  }
  function get_totalAttendeeStatusRecorded(_this__u8e3s4) {
    return (_this__u8e3s4.g9q_1 + _this__u8e3s4.i9q_1 | 0) + _this__u8e3s4.h9q_1 | 0;
  }
  function Activity(id, aType, lang) {
    lang = lang === VOID ? 'en' : lang;
    this.mnv_1 = aType;
    this.nnv_1 = lang;
    this.pnv_1 = null;
    this.qnv_1 = null;
    this.rnv_1 = null;
    this.snv_1 = null;
    this.tnv_1 = new JsonObject(mapOf_0(to('id', JsonPrimitive_0(id))));
    this.onv_1 = id;
  }
  protoOf(Activity).koq = function (key, value) {
    // Inline function 'kotlin.collections.isNullOrEmpty' call
    var this_0 = this.snv_1;
    // Inline function 'kotlin.contracts.contract' call
    if (this_0 == null ? true : this_0.c1()) {
      var tmp = this;
      // Inline function 'kotlin.collections.mutableMapOf' call
      tmp.snv_1 = LinkedHashMap_init_$Create$();
    }
    // Inline function 'kotlin.collections.set' call
    ensureNotNull(this.snv_1).s(key, value);
  };
  function Companion_72() {
    this.hnv_1 = 1;
  }
  protoOf(Companion_72).loq = function (xpp, parseFlags) {
    var tcxml = new TinCanXML();
    var activity = null;
    var evtType = xpp.y7c();
    var storeActivities = (parseFlags & this.hnv_1) === this.hnv_1;
    var inExtensions = false;
    var tagName;
    var extKey;
    var extVal;
    $l$1: do {
      $l$0: do {
        var tmp;
        var tmp_0 = evtType;
        if (tmp_0 === 2) {
          tmp = !(xpp.x7c() == null);
        } else {
          tmp = false;
        }
        if (tmp) {
          tagName = ensureNotNull(xpp.x7c());
          if (!inExtensions) {
            if (tagName === 'activity') {
              activity = new Activity(ensureNotNull(xpp.z7c(null, 'id')), ensureNotNull(xpp.z7c(null, 'type')));
            } else {
              var tmp_1;
              if (tagName === 'launch') {
                var tmp_2 = xpp.e();
                tmp_1 = tmp_2 === 4;
              } else {
                tmp_1 = false;
              }
              if (tmp_1) {
                ensureNotNull(activity).rnv_1 = xpp.w7c();
              } else {
                var tmp_3;
                if (tagName === 'name') {
                  var tmp_4 = xpp.e();
                  tmp_3 = tmp_4 === 4;
                } else {
                  tmp_3 = false;
                }
                if (tmp_3) {
                  ensureNotNull(activity).qnv_1 = xpp.w7c();
                } else {
                  var tmp_5;
                  if (tagName === 'description') {
                    var tmp_6 = xpp.e();
                    tmp_5 = tmp_6 === 4;
                  } else {
                    tmp_5 = false;
                  }
                  if (tmp_5) {
                    ensureNotNull(activity).pnv_1 = xpp.w7c();
                  } else {
                    if (xpp.x7c() === 'extensions') {
                      inExtensions = true;
                    }
                  }
                }
              }
            }
          } else {
            if (tagName === 'extension') {
              extKey = ensureNotNull(xpp.z7c(null, 'key'));
              var tmp_7;
              var tmp_8 = xpp.e();
              if (tmp_8 === 4) {
                var tmp0_elvis_lhs = xpp.w7c();
                tmp_7 = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
              } else {
                tmp_7 = '';
              }
              extVal = tmp_7;
              ensureNotNull(activity).koq(extKey, extVal);
            }
          }
        } else {
          var tmp_9 = evtType;
          if (tmp_9 === 3) {
            if (!(xpp.x7c() == null)) {
              if (xpp.x7c() === 'activity') {
                if (!(ensureNotNull(activity).rnv_1 == null)) {
                  tcxml.jnv_1 = activity;
                  if (!storeActivities) {
                    break $l$1;
                  }
                }
              } else if (xpp.x7c() === 'extensions') {
                inExtensions = false;
              }
            }
          }
        }
        evtType = xpp.e();
      }
       while (false);
      var tmp_10 = evtType;
    }
     while (!(tmp_10 === 1));
    return tcxml;
  };
  protoOf(Companion_72).inv = function (xpp, parseFlags, $super) {
    parseFlags = parseFlags === VOID ? 0 : parseFlags;
    return $super === VOID ? this.loq(xpp, parseFlags) : $super.loq.call(this, xpp, parseFlags);
  };
  var Companion_instance_120;
  function Companion_getInstance_89() {
    return Companion_instance_120;
  }
  function TinCanXML() {
    this.jnv_1 = null;
    this.knv_1 = false;
    this.lnv_1 = null;
  }
  function avatarColorForName(name) {
    var hash = 0;
    // Inline function 'kotlin.text.forEach' call
    var inductionVariable = 0;
    while (inductionVariable < charSequenceLength(name)) {
      var element = charSequenceGet(name, inductionVariable);
      inductionVariable = inductionVariable + 1 | 0;
      // Inline function 'com.ustadmobile.core.util.avatarColorForName.<anonymous>' call
      // Inline function 'kotlin.code' call
      hash = Char__toInt_impl_vasixd(element) + ((hash << 5) - hash | 0) | 0;
    }
    var colorInt = hash | 255;
    return colorInt;
  }
  function requireEntryByUri(_this__u8e3s4, uri) {
    var tmp0_elvis_lhs = entryByUri(_this__u8e3s4, uri);
    var tmp;
    if (tmp0_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('Manifest has no entry for ' + uri);
    } else {
      tmp = tmp0_elvis_lhs;
    }
    return tmp;
  }
  function entryByUri(_this__u8e3s4, uri) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator = _this__u8e3s4.hn3_1.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.util.entryByUri.<anonymous>' call
        if (element.ln3_1 === uri) {
          tmp$ret$1 = element;
          break $l$block;
        }
      }
      tmp$ret$1 = null;
    }
    return tmp$ret$1;
  }
  function bodyDataUrlForUri(_this__u8e3s4, uri) {
    var tmp0_safe_receiver = entryByUri(_this__u8e3s4, uri);
    return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.tn3_1;
  }
  function requireBodyUrlForUri(_this__u8e3s4, uri) {
    return requireEntryByUri(_this__u8e3s4, uri).tn3_1;
  }
  function DiTag() {
    this.moq_1 = 13;
    this.noq_1 = 81;
    this.ooq_1 = 12;
    this.poq_1 = 1;
    this.qoq_1 = 0;
    this.roq_1 = 32;
    this.soq_1 = 42;
  }
  var DiTag_instance;
  function DiTag_getInstance() {
    return DiTag_instance;
  }
  function tryReceiveAll(_this__u8e3s4, $this) {
    var resultList = mutableLinkedListOf([]);
    while (true) {
      var result = _this__u8e3s4.a1a();
      if (_ChannelResult___get_isSuccess__impl__odq1z9(result)) {
        // Inline function 'kotlin.collections.plusAssign' call
        var element = ChannelResult__getOrThrow_impl_od1axs(result);
        resultList.i1(element);
      } else
        return resultList;
    }
  }
  function EventCollator2$receiveEvent$slambda(this$0, resultContinuation) {
    this.bor_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(EventCollator2$receiveEvent$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(EventCollator2$receiveEvent$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(EventCollator2$receiveEvent$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            suspendResult = delay(this.bor_1.dor_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.bor_1.hor_1 = null;
            this.hd_1 = 2;
            suspendResult = this.bor_1.for_1(tryReceiveAll(this.bor_1.gor_1, this.bor_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(EventCollator2$receiveEvent$slambda).v1m = function ($this$launch, completion) {
    var i = new EventCollator2$receiveEvent$slambda(this.bor_1, completion);
    i.cor_1 = $this$launch;
    return i;
  };
  function EventCollator2$receiveEvent$slambda_0(this$0, resultContinuation) {
    var i = new EventCollator2$receiveEvent$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function EventCollator2(maxWaitTime, coroutineScope, capacity, onBufferOverflow, onCollate) {
    this.dor_1 = maxWaitTime;
    this.eor_1 = coroutineScope;
    this.for_1 = onCollate;
    this.gor_1 = Channel(capacity, onBufferOverflow);
    this.hor_1 = null;
  }
  protoOf(EventCollator2).f6x = function (event) {
    this.gor_1.w19(event);
    if (this.hor_1 == null) {
      var tmp = this;
      tmp.hor_1 = launch(this.eor_1, VOID, VOID, EventCollator2$receiveEvent$slambda_0(this, null));
    }
  };
  function Companion_73() {
    Companion_instance_121 = this;
    this.ior_1 = -1;
    this.jor_1 = new MessageIdOption2(strings_getInstance().dle_1, this.ior_1);
  }
  var Companion_instance_121;
  function Companion_getInstance_90() {
    if (Companion_instance_121 == null)
      new Companion_73();
    return Companion_instance_121;
  }
  function MessageIdOption2(stringResource, value) {
    Companion_getInstance_90();
    this.pom_1 = stringResource;
    this.qom_1 = value;
  }
  protoOf(MessageIdOption2).toString = function () {
    return 'MessageIdOption2(stringResource=' + this.pom_1 + ', value=' + this.qom_1 + ')';
  };
  protoOf(MessageIdOption2).hashCode = function () {
    var result = this.pom_1.hashCode();
    result = imul(result, 31) + this.qom_1 | 0;
    return result;
  };
  protoOf(MessageIdOption2).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof MessageIdOption2))
      return false;
    var tmp0_other_with_cast = other instanceof MessageIdOption2 ? other : THROW_CCE();
    if (!this.pom_1.equals(tmp0_other_with_cast.pom_1))
      return false;
    if (!(this.qom_1 === tmp0_other_with_cast.qom_1))
      return false;
    return true;
  };
  function get_MS_PER_HOUR() {
    return MS_PER_HOUR;
  }
  var MS_PER_HOUR;
  function get_MS_PER_MIN() {
    return MS_PER_MIN;
  }
  var MS_PER_MIN;
  function SortOrderOption(fieldMessageId, flag, order) {
    this.kor_1 = fieldMessageId;
    this.lor_1 = flag;
    this.mor_1 = order;
  }
  protoOf(SortOrderOption).toString = function () {
    return 'SortOrderOption(fieldMessageId=' + this.kor_1 + ', flag=' + this.lor_1 + ', order=' + this.mor_1 + ')';
  };
  protoOf(SortOrderOption).hashCode = function () {
    var result = this.kor_1.hashCode();
    result = imul(result, 31) + this.lor_1 | 0;
    result = imul(result, 31) + getBooleanHashCode(this.mor_1) | 0;
    return result;
  };
  protoOf(SortOrderOption).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SortOrderOption))
      return false;
    var tmp0_other_with_cast = other instanceof SortOrderOption ? other : THROW_CCE();
    if (!this.kor_1.equals(tmp0_other_with_cast.kor_1))
      return false;
    if (!(this.lor_1 === tmp0_other_with_cast.lor_1))
      return false;
    if (!(this.mor_1 === tmp0_other_with_cast.mor_1))
      return false;
    return true;
  };
  function splitString($this, str, splitChar) {
    var numParts = countChar($this, str, splitChar);
    // Inline function 'kotlin.arrayOfNulls' call
    var size = numParts + 1 | 0;
    var splitStr = fillArrayVal(Array(size), null);
    var buffer = StringBuilder_init_$Create$();
    var partCounter = 0;
    var currentChar;
    var inductionVariable = 0;
    var last = str.length;
    if (inductionVariable < last)
      do {
        var i = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        currentChar = charSequenceGet(str, i);
        if (currentChar === splitChar) {
          splitStr[partCounter] = buffer.toString();
          partCounter = partCounter + 1 | 0;
          buffer = StringBuilder_init_$Create$();
        } else {
          buffer.z5(currentChar);
        }
      }
       while (inductionVariable < last);
    splitStr[partCounter] = buffer.toString();
    return splitStr;
  }
  function countChar($this, str, c) {
    var count = 0;
    var strLen = str.length;
    var inductionVariable = 0;
    if (inductionVariable < strLen)
      do {
        var i = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        if (charSequenceGet(str, i) === c) {
          count = count + 1 | 0;
        }
      }
       while (inductionVariable < strLen);
    return count;
  }
  function isWhiteSpace($this, c) {
    return ((c === _Char___init__impl__6a9atx(32) ? true : c === _Char___init__impl__6a9atx(10)) ? true : c === _Char___init__impl__6a9atx(9)) ? true : c === _Char___init__impl__6a9atx(13);
  }
  function UMFileUtil() {
    UMFileUtil_instance = this;
    this.wnv_1 = _Char___init__impl__6a9atx(47);
    this.xnv_1 = 'file:///';
    this.ynv_1 = new Long(1073741824, 0);
    this.znv_1 = new Long(1048576, 0);
    this.anw_1 = new Long(1024, 0);
  }
  protoOf(UMFileUtil).znz = function (paths) {
    // Inline function 'kotlin.text.buildString' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.apply' call
    var this_0 = StringBuilder_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.util.UMFileUtil.joinPaths.<anonymous>' call
    // Inline function 'kotlin.collections.forEachIndexed' call
    var index = 0;
    var inductionVariable = 0;
    var last = paths.length;
    while (inductionVariable < last) {
      var item = paths[inductionVariable];
      inductionVariable = inductionVariable + 1 | 0;
      // Inline function 'com.ustadmobile.core.util.UMFileUtil.joinPaths.<anonymous>.<anonymous>' call
      var tmp1 = index;
      index = tmp1 + 1 | 0;
      var tmp;
      if (tmp1 > 0) {
        tmp = removePrefix(item, '/');
      } else {
        tmp = item;
      }
      this_0.y5(tmp);
      if (tmp1 < (paths.length - 1 | 0) ? !endsWith(item, '/') : false) {
        this_0.z5(_Char___init__impl__6a9atx(47));
      }
    }
    return this_0.toString();
  };
  protoOf(UMFileUtil).bnw = function (baseLink, link) {
    var base = baseLink;
    // Inline function 'kotlin.text.lowercase' call
    // Inline function 'kotlin.js.asDynamic' call
    var linkLower = link.toLowerCase();
    var charFoundIndex;
    charFoundIndex = indexOf_0(linkLower, '://');
    if (!(charFoundIndex === -1)) {
      var isAllChars = true;
      var cc;
      var inductionVariable = 0;
      var last = charFoundIndex;
      if (inductionVariable < last)
        do {
          var i = inductionVariable;
          inductionVariable = inductionVariable + 1 | 0;
          cc = charSequenceGet(linkLower, i);
          isAllChars = !!(isAllChars & (((((Char__compareTo_impl_ypi4mb(cc, _Char___init__impl__6a9atx(97)) > 0 ? Char__compareTo_impl_ypi4mb(cc, _Char___init__impl__6a9atx(122)) < 0 : false) ? true : Char__compareTo_impl_ypi4mb(cc, _Char___init__impl__6a9atx(48)) > 0 ? Char__compareTo_impl_ypi4mb(cc, _Char___init__impl__6a9atx(57)) < 0 : false) ? true : cc === _Char___init__impl__6a9atx(43)) ? true : cc === _Char___init__impl__6a9atx(46)) ? true : cc === _Char___init__impl__6a9atx(45)));
        }
         while (inductionVariable < last);
      if (isAllChars) {
        return link;
      }
    }
    if (startsWith(link, 'data:')) {
      return link;
    }
    if ((link.length > 2 ? charSequenceGet(link, 0) === _Char___init__impl__6a9atx(47) : false) ? charSequenceGet(link, 1) === _Char___init__impl__6a9atx(47) : false) {
      // Inline function 'kotlin.text.substring' call
      var this_0 = base;
      var endIndex = indexOf(base, _Char___init__impl__6a9atx(58)) + 1 | 0;
      // Inline function 'kotlin.js.asDynamic' call
      return this_0.substring(0, endIndex) + link;
    }
    if (link.length > 1 ? charSequenceGet(link, 0) === _Char___init__impl__6a9atx(47) : false) {
      var serverStartPos = indexOf_0(base, '://') + 3 | 0;
      var serverFinishPos = indexOf(base, _Char___init__impl__6a9atx(47), serverStartPos + 1 | 0);
      // Inline function 'kotlin.text.substring' call
      // Inline function 'kotlin.js.asDynamic' call
      return base.substring(0, serverFinishPos) + link;
    }
    charFoundIndex = indexOf(base, _Char___init__impl__6a9atx(63));
    if (!(charFoundIndex === -1)) {
      // Inline function 'kotlin.text.substring' call
      var this_1 = base;
      var endIndex_0 = charFoundIndex;
      // Inline function 'kotlin.js.asDynamic' call
      base = this_1.substring(0, endIndex_0);
    }
    charFoundIndex = lastIndexOf(base, _Char___init__impl__6a9atx(47));
    if (charFoundIndex === -1) {
      return link;
    }
    // Inline function 'kotlin.text.substring' call
    var this_2 = base;
    var endIndex_1 = charFoundIndex;
    // Inline function 'kotlin.js.asDynamic' call
    base = this_2.substring(0, endIndex_1);
    var baseParts = splitString(this, base, _Char___init__impl__6a9atx(47));
    var linkParts = splitString(this, link, _Char___init__impl__6a9atx(47));
    // Inline function 'kotlin.collections.mutableListOf' call
    var resultVector = ArrayList_init_$Create$();
    var inductionVariable_0 = 0;
    var last_0 = baseParts.length - 1 | 0;
    if (inductionVariable_0 <= last_0)
      do {
        var i_0 = inductionVariable_0;
        inductionVariable_0 = inductionVariable_0 + 1 | 0;
        resultVector.i1(ensureNotNull(baseParts[i_0]));
      }
       while (inductionVariable_0 <= last_0);
    var inductionVariable_1 = 0;
    var last_1 = linkParts.length - 1 | 0;
    if (inductionVariable_1 <= last_1)
      $l$loop: do {
        var i_1 = inductionVariable_1;
        inductionVariable_1 = inductionVariable_1 + 1 | 0;
        if (linkParts[i_1] === '.') {
          continue $l$loop;
        }
        if (linkParts[i_1] === '..') {
          resultVector.s1(resultVector.u() - 1 | 0);
        } else {
          resultVector.i1(ensureNotNull(linkParts[i_1]));
        }
      }
       while (inductionVariable_1 <= last_1);
    var resultSB = StringBuilder_init_$Create$();
    var numElements = resultVector.u();
    var inductionVariable_2 = 0;
    if (inductionVariable_2 < numElements)
      do {
        var i_2 = inductionVariable_2;
        inductionVariable_2 = inductionVariable_2 + 1 | 0;
        // Inline function 'kotlin.collections.elementAt' call
        var tmp$ret$11 = resultVector.v(i_2);
        resultSB.y5(tmp$ret$11);
        if (i_2 < (numElements - 1 | 0)) {
          resultSB.z5(_Char___init__impl__6a9atx(47));
        }
      }
       while (inductionVariable_2 < numElements);
    return resultSB.toString();
  };
  protoOf(UMFileUtil).nor = function (str, deliminator) {
    var paramName = null;
    var params = HashMap_init_$Create$();
    var inQuotes = false;
    var strLen = str.length;
    var sb = StringBuilder_init_$Create$();
    var c;
    var lastChar = _Char___init__impl__6a9atx(0);
    var inductionVariable = 0;
    if (inductionVariable < strLen)
      do {
        var i = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        c = charSequenceGet(str, i);
        if (c === _Char___init__impl__6a9atx(34)) {
          if (!inQuotes) {
            inQuotes = true;
          } else if (inQuotes ? !(lastChar === _Char___init__impl__6a9atx(92)) : false) {
            inQuotes = false;
          }
        }
        if (!((isWhiteSpace(this, c) ? !inQuotes : false) ? true : c === _Char___init__impl__6a9atx(34) ? i < (strLen - 1 | 0) : false))
          if (c === deliminator ? true : i === (strLen - 1 | 0)) {
            if (i === (strLen - 1 | 0) ? !(c === _Char___init__impl__6a9atx(34)) : false) {
              sb.z5(c);
            }
            if (!(paramName == null)) {
              // Inline function 'kotlin.collections.set' call
              var key = paramName;
              var value = sb.toString();
              params.s(key, value);
            } else {
              // Inline function 'kotlin.collections.set' call
              var key_0 = sb.toString();
              params.s(key_0, '');
            }
            sb = StringBuilder_init_$Create$();
            paramName = null;
          } else if (c === _Char___init__impl__6a9atx(61)) {
            paramName = sb.toString();
            sb = StringBuilder_init_$Create$();
          } else {
            sb.z5(c);
          }
        lastChar = c;
      }
       while (inductionVariable < strLen);
    return params;
  };
  protoOf(UMFileUtil).parseURLQueryString = function (urlQuery) {
    var retVal = urlQuery;
    var queryPos = indexOf(retVal, _Char___init__impl__6a9atx(63));
    if (!(queryPos === -1)) {
      // Inline function 'kotlin.text.substring' call
      var this_0 = retVal;
      var startIndex = queryPos + 1 | 0;
      // Inline function 'kotlin.js.asDynamic' call
      retVal = this_0.substring(startIndex);
    }
    var parsedParams = this.nor(retVal, _Char___init__impl__6a9atx(38));
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(parsedParams.u());
    // Inline function 'kotlin.collections.iterator' call
    var tmp0_iterator = parsedParams.q2().w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.util.UMFileUtil.parseURLQueryString.<anonymous>' call
      var tmp$ret$3 = to(Companion_instance_230.oor(item.s2()), Companion_instance_230.oor(item.t2()));
      destination.i1(tmp$ret$3);
    }
    return toMap(destination);
  };
  protoOf(UMFileUtil).mapToQueryString = function (ht) {
    var sb = StringBuilder_init_$Create$();
    if (ht.c1()) {
      return '';
    }
    var keys = ht.o2().w();
    var key;
    var firstEl = true;
    while (keys.f()) {
      if (!firstEl) {
        sb.z5(_Char___init__impl__6a9atx(38));
      } else {
        firstEl = false;
      }
      key = keys.e();
      sb.y5(Companion_instance_230.por(key)).z5(_Char___init__impl__6a9atx(61));
      var tmp = Companion_instance_230;
      var tmp_0 = ht.q(key);
      sb.y5(tmp.por((!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) ? tmp_0 : THROW_CCE()));
    }
    return sb.toString();
  };
  protoOf(UMFileUtil).qor = function (fileSize) {
    var unit;
    var factor;
    if (fileSize.c7(new Long(1073741824, 0)) > 0) {
      factor = new Long(1073741824, 0);
      unit = 'GB';
    } else if (fileSize.c7(new Long(1048576, 0)) > 0) {
      factor = new Long(1048576, 0);
      unit = 'MB';
    } else if (fileSize.c7(new Long(1024, 0)) > 0) {
      factor = new Long(1024, 0);
      unit = 'kB';
    } else {
      factor = new Long(1, 0);
      unit = 'bytes';
    }
    var unitSize = fileSize.a7() / factor.a7();
    unitSize = round(unitSize * 100) / 100.0;
    return '' + unitSize + ' ' + unit;
  };
  protoOf(UMFileUtil).ror = function (fileSize) {
    var fileSizeMb = roundTo(fileSize.zc() / 1048576, 2);
    return '' + fileSizeMb + ' MB';
  };
  var UMFileUtil_instance;
  function UMFileUtil_getInstance() {
    if (UMFileUtil_instance == null)
      new UMFileUtil();
    return UMFileUtil_instance;
  }
  function Companion_74() {
    this.sor_1 = '/#/';
  }
  protoOf(Companion_74).tor = function (url, divider) {
    var dividerIndex = indexOf_0(url, divider);
    if (dividerIndex === -1)
      throw IllegalArgumentException_init_$Create$('Not a valid UstadUrl: ' + url);
    // Inline function 'kotlin.text.substring' call
    var endIndex = dividerIndex + 1 | 0;
    // Inline function 'kotlin.js.asDynamic' call
    var tmp$ret$1 = url.substring(0, endIndex);
    var endpoint = removeSuffix(tmp$ret$1, 'umapp/');
    var queryIndex = indexOf_0(url, '?', dividerIndex);
    var viewName;
    var queryString;
    if (queryIndex === -1 ? true : queryIndex === (url.length - 1 | 0)) {
      // Inline function 'kotlin.text.substring' call
      var startIndex = dividerIndex + divider.length | 0;
      // Inline function 'kotlin.js.asDynamic' call
      var tmp$ret$3 = url.substring(startIndex);
      viewName = removeSuffix(tmp$ret$3, '?');
      queryString = '';
    } else {
      // Inline function 'kotlin.text.substring' call
      var startIndex_0 = dividerIndex + divider.length | 0;
      // Inline function 'kotlin.js.asDynamic' call
      viewName = url.substring(startIndex_0, queryIndex);
      // Inline function 'kotlin.text.substring' call
      var startIndex_1 = queryIndex + 1 | 0;
      // Inline function 'kotlin.js.asDynamic' call
      queryString = url.substring(startIndex_1);
    }
    return new UstadUrlComponents(endpoint, viewName, queryString);
  };
  protoOf(Companion_74).uor = function (url, divider, $super) {
    divider = divider === VOID ? '/#/' : divider;
    return $super === VOID ? this.tor(url, divider) : $super.tor.call(this, url, divider);
  };
  var Companion_instance_122;
  function Companion_getInstance_91() {
    return Companion_instance_122;
  }
  function UstadUrlComponents$arguments$delegate$lambda(this$0) {
    return function () {
      var parsedParams = UMFileUtil_getInstance().nor(this$0.fn9_1, _Char___init__impl__6a9atx(38));
      // Inline function 'kotlin.collections.map' call
      // Inline function 'kotlin.collections.mapTo' call
      var destination = ArrayList_init_$Create$_0(parsedParams.u());
      // Inline function 'kotlin.collections.iterator' call
      var tmp0_iterator = parsedParams.q2().w();
      while (tmp0_iterator.f()) {
        var item = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.util.UstadUrlComponents.arguments$delegate.<anonymous>.<anonymous>' call
        var tmp$ret$1 = to(Companion_instance_230.oor(item.s2()), Companion_instance_230.oor(item.t2()));
        destination.i1(tmp$ret$1);
      }
      return toMap(destination);
    };
  }
  function UstadUrlComponents$viewUri$delegate$lambda(this$0) {
    return function () {
      var tmp;
      // Inline function 'kotlin.text.isEmpty' call
      var this_0 = this$0.fn9_1;
      if (charSequenceLength(this_0) === 0) {
        tmp = this$0.en9_1;
      } else {
        tmp = this$0.en9_1 + '?' + this$0.fn9_1;
      }
      return tmp;
    };
  }
  function UstadUrlComponents(endpoint, viewName, queryString) {
    this.dn9_1 = endpoint;
    this.en9_1 = viewName;
    this.fn9_1 = queryString;
    var tmp = this;
    var tmp_0 = LazyThreadSafetyMode_NONE_getInstance();
    tmp.gn9_1 = lazy(tmp_0, UstadUrlComponents$arguments$delegate$lambda(this));
    var tmp_1 = this;
    tmp_1.hn9_1 = lazy_0(UstadUrlComponents$viewUri$delegate$lambda(this));
  }
  protoOf(UstadUrlComponents).vor = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.hn9_1;
    viewUri$factory();
    return this_0.t2();
  };
  protoOf(UstadUrlComponents).wor = function (divider) {
    return UMFileUtil_getInstance().znz([this.dn9_1, divider, this.vor()]);
  };
  protoOf(UstadUrlComponents).in9 = function (divider, $super) {
    var tmp;
    if (divider === VOID) {
      Companion_getInstance_84();
      tmp = '/umapp/#/';
    } else {
      tmp = divider;
    }
    divider = tmp;
    return $super === VOID ? this.wor(divider) : $super.wor.call(this, divider);
  };
  protoOf(UstadUrlComponents).toString = function () {
    return 'UstadUrlComponents(endpoint=' + this.dn9_1 + ', viewName=' + this.en9_1 + ', queryString=' + this.fn9_1 + ')';
  };
  protoOf(UstadUrlComponents).hashCode = function () {
    var result = getStringHashCode(this.dn9_1);
    result = imul(result, 31) + getStringHashCode(this.en9_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.fn9_1) | 0;
    return result;
  };
  protoOf(UstadUrlComponents).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof UstadUrlComponents))
      return false;
    var tmp0_other_with_cast = other instanceof UstadUrlComponents ? other : THROW_CCE();
    if (!(this.dn9_1 === tmp0_other_with_cast.dn9_1))
      return false;
    if (!(this.en9_1 === tmp0_other_with_cast.en9_1))
      return false;
    if (!(this.fn9_1 === tmp0_other_with_cast.fn9_1))
      return false;
    return true;
  };
  function viewUri$factory() {
    return getPropertyCallableRef('viewUri', 1, KProperty1, function (receiver) {
      return receiver.vor();
    }, null);
  }
  function roundTo(_this__u8e3s4, decimalPlaces) {
    decimalPlaces = decimalPlaces === VOID ? 0 : decimalPlaces;
    // Inline function 'kotlin.math.pow' call
    var factor = Math.pow(10.0, decimalPlaces);
    return roundToInt(_this__u8e3s4 * factor) / factor;
  }
  function toDisplayString(_this__u8e3s4, decimalPlaces) {
    decimalPlaces = decimalPlaces === VOID ? 2 : decimalPlaces;
    var strVal = _this__u8e3s4.toString();
    var tmp;
    // Inline function 'kotlin.math.round' call
    if (round(_this__u8e3s4) === _this__u8e3s4) {
      tmp = substringBefore(strVal, _Char___init__impl__6a9atx(46));
    } else {
      tmp = removeSuffix(roundTo(_this__u8e3s4, decimalPlaces).toString(), '0');
    }
    return tmp;
  }
  function paramSubtitles(_this__u8e3s4, json) {
    var tmp0_safe_receiver = paramMap(_this__u8e3s4, json);
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      tmp = tmp0_safe_receiver.q('subtitles');
    }
    var tmp1_safe_receiver = tmp;
    var tmp_0;
    if (tmp1_safe_receiver == null) {
      tmp_0 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.util.ext.paramSubtitles.<anonymous>' call
      tmp_0 = json.f45(ListSerializer(Companion_instance_79.a4r()), tmp1_safe_receiver);
    }
    return tmp_0;
  }
  function paramMap(_this__u8e3s4, json) {
    var tmp0_safe_receiver = _this__u8e3s4.bay_1;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.util.ext.paramMap.<anonymous>' call
      tmp = json.f45(MapSerializer(serializer_0(StringCompanionObject_instance), serializer_0(StringCompanionObject_instance)), tmp0_safe_receiver);
    }
    return tmp;
  }
  function penaltyPercentage(_this__u8e3s4) {
    // Inline function 'kotlin.math.roundToInt' call
    var this_0 = _this__u8e3s4.kbh_1 * 100 / (_this__u8e3s4.ibh_1 + _this__u8e3s4.kbh_1);
    return roundToInt(this_0);
  }
  function textLength(_this__u8e3s4, limitType) {
    var tmp;
    if (limitType === 1) {
      var tmp0_safe_receiver = _this__u8e3s4.lbn_1;
      var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : htmlToPlainText(tmp0_safe_receiver);
      var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : countWords(tmp1_safe_receiver);
      tmp = tmp2_elvis_lhs == null ? 0 : tmp2_elvis_lhs;
    } else {
      if (limitType === 2) {
        var tmp3_safe_receiver = _this__u8e3s4.lbn_1;
        var tmp4_safe_receiver = tmp3_safe_receiver == null ? null : htmlToPlainText(tmp3_safe_receiver);
        var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.length;
        tmp = tmp5_elvis_lhs == null ? 0 : tmp5_elvis_lhs;
      } else {
        tmp = null;
      }
    }
    return tmp;
  }
  function lastPossibleSubmissionTime(_this__u8e3s4) {
    if (isDateSet(_this__u8e3s4.g7x_1) ? _this__u8e3s4.g7x_1.c7(_this__u8e3s4.e7x_1) > 0 : false)
      return _this__u8e3s4.g7x_1;
    else
      return _this__u8e3s4.e7x_1;
  }
  function maxScoreSummedIfModule(_this__u8e3s4, allBlocks) {
    var tmp = _this__u8e3s4.x7w_1;
    if (!(tmp === 100))
      return _this__u8e3s4.h7x_1;
    var totalModPoints = 0.0;
    var numModBlocks = 0;
    // Inline function 'kotlin.collections.forEach' call
    var tmp0_iterator = allBlocks.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.util.ext.maxScoreSummedIfModule.<anonymous>' call
      if (element.z7w_1.equals(_this__u8e3s4.w7w_1)) {
        numModBlocks = numModBlocks + 1 | 0;
        var tmp_0 = totalModPoints;
        var tmp1_elvis_lhs = element.h7x_1;
        totalModPoints = tmp_0 + (tmp1_elvis_lhs == null ? 0.0 : tmp1_elvis_lhs);
      }
    }
    return (numModBlocks > 0 ? totalModPoints > 0.0 : false) ? totalModPoints : null;
  }
  function toTerminologyEntries(_this__u8e3s4, json, systemImpl) {
    var tmp1_safe_receiver = _this__u8e3s4 == null ? null : _this__u8e3s4.r8f_1;
    var tmp;
    if (tmp1_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.util.ext.toTerminologyEntries.<anonymous>' call
      tmp = decodeStringMapFromString(json, tmp1_safe_receiver);
    }
    var tmp2_elvis_lhs = tmp;
    var tmp_0;
    if (tmp2_elvis_lhs == null) {
      // Inline function 'kotlin.collections.mapOf' call
      tmp_0 = emptyMap();
    } else {
      tmp_0 = tmp2_elvis_lhs;
    }
    var termMap = tmp_0;
    // Inline function 'kotlin.collections.map' call
    var this_0 = TerminologyKeys_getInstance().cn5_1;
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(this_0.u());
    // Inline function 'kotlin.collections.iterator' call
    var tmp0_iterator = this_0.q2().w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.util.ext.toTerminologyEntries.<anonymous>' call
      var tmp_1 = item.s2();
      var tmp_2 = item.t2();
      var tmp1_elvis_lhs = termMap.q(item.s2());
      var tmp_3;
      if (tmp1_elvis_lhs == null) {
        tmp_3 = systemImpl == null ? null : systemImpl.en6(item.t2());
      } else {
        tmp_3 = tmp1_elvis_lhs;
      }
      var tmp$ret$4 = new TerminologyEntry(tmp_1, tmp_2, tmp_3);
      destination.i1(tmp$ret$4);
    }
    return destination;
  }
  function encodeToStringMap(_this__u8e3s4, json) {
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(_this__u8e3s4, 10));
    var tmp0_iterator = _this__u8e3s4.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.util.ext.encodeToStringMap.<anonymous>' call
      var tmp0_elvis_lhs = item.kon_1;
      var tmp$ret$0 = to(item.ion_1, tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs);
      destination.i1(tmp$ret$0);
    }
    return encodeStringMapToString(json, toMap(destination));
  }
  function onActiveEndpoint(_this__u8e3s4) {
    // Inline function 'org.kodein.di.on' call
    // Inline function 'org.kodein.di.instance' call
    var tmp = get_direct(_this__u8e3s4).s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UstadAccountManager), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var context = tmp.q57(tmp$ret$0, null).xmx();
    var trigger = _this__u8e3s4.q56();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_1 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    var tmp$ret$3 = tmp_1.u56(tmp$ret$2, context);
    return On(_this__u8e3s4, tmp$ret$3, trigger);
  }
  function get_dayStringResource(_this__u8e3s4) {
    switch (_this__u8e3s4.za_1) {
      case 0:
        return strings_getInstance().qlp_1;
      case 1:
        return strings_getInstance().rlp_1;
      case 2:
        return strings_getInstance().slp_1;
      case 3:
        return strings_getInstance().tlp_1;
      case 4:
        return strings_getInstance().ulp_1;
      case 5:
        return strings_getInstance().vlp_1;
      case 6:
        return strings_getInstance().plp_1;
      default:
        return strings_getInstance().blc_1;
    }
  }
  function verifySite(_this__u8e3s4, endpointUrl, timeout, json, $completion) {
    timeout = timeout === VOID ? new Long(30000, 0) : timeout;
    var tmp = new $verifySiteCOROUTINE$43(_this__u8e3s4, endpointUrl, timeout, json, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function verifySite$lambda($timeout) {
    return function ($this$timeout) {
      $this$timeout.l3s($timeout);
      return Unit_instance;
    };
  }
  function $verifySiteCOROUTINE$43(_this__u8e3s4, endpointUrl, timeout, json, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.fos_1 = _this__u8e3s4;
    this.gos_1 = endpointUrl;
    this.hos_1 = timeout;
    this.ios_1 = json;
  }
  protoOf($verifySiteCOROUTINE$43).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.jos_1 = UMFileUtil_getInstance().znz([this.gos_1, 'Site', 'verify']);
            var tmp_0 = this;
            tmp_0.kos_1 = this.fos_1;
            var tmp_1 = this;
            tmp_1.los_1 = this.jos_1;
            var tmp_2 = this;
            tmp_2.mos_1 = this.kos_1;
            var tmp_3 = this;
            tmp_3.nos_1 = this.mos_1;
            var tmp_4 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.los_1);
            header(this_0, 'cache-control', 'no-cache');
            timeout(this_0, verifySite$lambda(this.hos_1));
            tmp_4.oos_1 = this_0;
            this.oos_1.j38_1 = Companion_getInstance().y2w_1;
            var tmp_5 = this;
            tmp_5.pos_1 = this.nos_1;
            var tmp_6 = this;
            tmp_6.qos_1 = this.oos_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.qos_1, this.pos_1)).u3y(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.ros_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = bodyAsText(this.ros_1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var responseStr = suspendResult;
            return this.ios_1.f45(Companion_instance_30.a4r(), responseStr);
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function toMap_1(_this__u8e3s4) {
    var tmp;
    if (_this__u8e3s4 instanceof MapStringValues) {
      tmp = _this__u8e3s4.sos_1;
    } else {
      // Inline function 'kotlin.collections.map' call
      var this_0 = _this__u8e3s4.b2n();
      // Inline function 'kotlin.collections.mapTo' call
      var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
      var tmp0_iterator = this_0.w();
      while (tmp0_iterator.f()) {
        var item = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.util.ext.toMap.<anonymous>' call
        var tmp$ret$0 = to(item, _this__u8e3s4.a2n(item));
        destination.i1(tmp$ret$0);
      }
      tmp = toMap(destination);
    }
    return tmp;
  }
  function toLocalMidnight(_this__u8e3s4, timeZoneId) {
    return toLocalMidnight_0(_this__u8e3s4, Companion_getInstance_9().pla(timeZoneId));
  }
  function toLocalEndOfDay(_this__u8e3s4, timeZoneId) {
    return toLocalEndOfDay_0(_this__u8e3s4, Companion_getInstance_9().pla(timeZoneId));
  }
  function isDateOfBirthAnAdult(_this__u8e3s4) {
    return ageInYears(_this__u8e3s4) >= UstadMobileConstants_getInstance().aoj_1;
  }
  function isDateOfBirthAMinor(_this__u8e3s4) {
    return ageInYears(_this__u8e3s4) < UstadMobileConstants_getInstance().zoi_1;
  }
  function toLocalMidnight_0(_this__u8e3s4, timeZone) {
    return toInstant(toLocalMidnight_1(toLocalDateTime(_this__u8e3s4, timeZone)), timeZone);
  }
  function toLocalEndOfDay_0(_this__u8e3s4, timeZone) {
    return toInstant(toLocalEndOfDay_1(toLocalDateTime(_this__u8e3s4, timeZone)), timeZone);
  }
  function ageInYears(_this__u8e3s4) {
    return periodUntil(_this__u8e3s4, System_instance.sl7(), Companion_getInstance_9().ola_1).al8();
  }
  function hasFlag(_this__u8e3s4, flag) {
    return (_this__u8e3s4 & flag) === flag;
  }
  function decodeStringMapFromString(_this__u8e3s4, string) {
    return _this__u8e3s4.f45(MapSerializer(serializer_0(StringCompanionObject_instance), serializer_0(StringCompanionObject_instance)), string);
  }
  function encodeStringMapToString(_this__u8e3s4, stringMap) {
    return _this__u8e3s4.e45(MapSerializer(serializer_0(StringCompanionObject_instance), serializer_0(StringCompanionObject_instance)), stringMap);
  }
  function decodeListOrSingleObjectAsList(_this__u8e3s4, serializer, element) {
    var tmp;
    if (element instanceof JsonArray) {
      tmp = _this__u8e3s4.b4p(ListSerializer(serializer), element);
    } else {
      if (element instanceof JsonObject) {
        tmp = listOf_0(_this__u8e3s4.b4p(serializer, element));
      } else {
        tmp = null;
      }
    }
    return tmp;
  }
  function replaceOrAppend(_this__u8e3s4, element, replacePredicate) {
    var tmp$ret$0;
    $l$block: {
      // Inline function 'kotlin.collections.indexOfFirst' call
      var index = 0;
      var tmp0_iterator = _this__u8e3s4.w();
      while (tmp0_iterator.f()) {
        var item = tmp0_iterator.e();
        if (replacePredicate(item)) {
          tmp$ret$0 = index;
          break $l$block;
        }
        index = index + 1 | 0;
      }
      tmp$ret$0 = -1;
    }
    var replaceIndex = tmp$ret$0;
    var tmp;
    if (replaceIndex >= 0) {
      // Inline function 'kotlin.also' call
      var this_0 = toMutableList(_this__u8e3s4);
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.util.ext.replaceOrAppend.<anonymous>' call
      this_0.f1(replaceIndex, element);
      tmp = toList(this_0);
    } else {
      tmp = plus_1(_this__u8e3s4, element);
    }
    return tmp;
  }
  function findKeysNotInOtherList(_this__u8e3s4, otherList, key) {
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(otherList, 10));
    var tmp0_iterator = otherList.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      destination.i1(key(item));
    }
    var otherListKeys = destination;
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(_this__u8e3s4, 10));
    var tmp0_iterator_0 = _this__u8e3s4.w();
    while (tmp0_iterator_0.f()) {
      var item_0 = tmp0_iterator_0.e();
      destination_0.i1(key(item_0));
    }
    var thisListKeys = destination_0;
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var destination_1 = ArrayList_init_$Create$();
    var tmp0_iterator_1 = thisListKeys.w();
    while (tmp0_iterator_1.f()) {
      var element = tmp0_iterator_1.e();
      // Inline function 'com.ustadmobile.core.util.ext.findKeysNotInOtherList.<anonymous>' call
      if (!otherListKeys.a1(element)) {
        destination_1.i1(element);
      }
    }
    return destination_1;
  }
  function replace_0(_this__u8e3s4, element, replacePredicate) {
    var tmp$ret$0;
    $l$block: {
      // Inline function 'kotlin.collections.indexOfFirst' call
      var index = 0;
      var tmp0_iterator = _this__u8e3s4.w();
      while (tmp0_iterator.f()) {
        var item = tmp0_iterator.e();
        if (replacePredicate(item)) {
          tmp$ret$0 = index;
          break $l$block;
        }
        index = index + 1 | 0;
      }
      tmp$ret$0 = -1;
    }
    var replaceIndex = tmp$ret$0;
    if (replaceIndex === -1)
      throw IllegalArgumentException_init_$Create$('element to replace not found');
    // Inline function 'kotlin.also' call
    var this_0 = toMutableList(_this__u8e3s4);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.util.ext.replace.<anonymous>' call
    this_0.f1(replaceIndex, element);
    return toList(this_0);
  }
  function trimToSize(_this__u8e3s4, maxSize) {
    var tmp;
    if (_this__u8e3s4.u() > maxSize) {
      tmp = _this__u8e3s4.z(0, maxSize);
    } else {
      tmp = _this__u8e3s4;
    }
    return tmp;
  }
  function toEmptyIfNull(_this__u8e3s4) {
    return _this__u8e3s4 == null ? emptyList() : _this__u8e3s4;
  }
  function filterByFlags(_this__u8e3s4, value) {
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var destination = ArrayList_init_$Create$();
    var tmp0_iterator = _this__u8e3s4.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.util.ext.filterByFlags.<anonymous>' call
      if (hasFlag_0(value, element.x6_1)) {
        destination.i1(element);
      }
    }
    return destination;
  }
  function toLocalMidnight_1(_this__u8e3s4) {
    return LocalDateTime_init_$Create$(_this__u8e3s4.mlb(), LocalTime_init_$Create$(0, 0, 0));
  }
  function toLocalEndOfDay_1(_this__u8e3s4) {
    return LocalDateTime_init_$Create$(_this__u8e3s4.mlb(), LocalTime_init_$Create$(23, 59, 59));
  }
  function chopOffSeconds(_this__u8e3s4) {
    if (_this__u8e3s4.klb() > 0 ? true : _this__u8e3s4.llb() > 0) {
      return LocalDateTime_init_$Create$(_this__u8e3s4.mlb(), LocalTime_init_$Create$(_this__u8e3s4.ilb(), _this__u8e3s4.jlb()));
    } else {
      return _this__u8e3s4;
    }
  }
  function chopOffSeconds_0(_this__u8e3s4) {
    if (_this__u8e3s4.klb() > 0 ? true : _this__u8e3s4.llb() > 0)
      return LocalTime_init_$Create$(_this__u8e3s4.ilb(), _this__u8e3s4.jlb());
    else
      return _this__u8e3s4;
  }
  function hasFlag_0(_this__u8e3s4, flag) {
    return _this__u8e3s4.uc(flag).equals(flag);
  }
  function toggleFlag(_this__u8e3s4, flag) {
    var tmp;
    if (hasFlag_0(_this__u8e3s4, flag)) {
      tmp = _this__u8e3s4.uc(flag.qc());
    } else {
      tmp = _this__u8e3s4.vc(flag);
    }
    return tmp;
  }
  function isDateSet(_this__u8e3s4) {
    return (!(_this__u8e3s4 == null) ? _this__u8e3s4.c7(new Long(0, 0)) > 0 : false) ? _this__u8e3s4.c7(new Long(-376330240, 1689)) < 0 : false;
  }
  function get_UNSET_DISTANT_FUTURE() {
    return UNSET_DISTANT_FUTURE;
  }
  var UNSET_DISTANT_FUTURE;
  function toByteArray(_this__u8e3s4) {
    var buffer = new Int8Array(8);
    var temp = _this__u8e3s4;
    var inductionVariable = 0;
    if (inductionVariable < 8)
      do {
        var i = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        buffer[7 - i | 0] = temp.uc(new Long(255, 0)).xc();
        temp = temp.sc(8);
      }
       while (inductionVariable < 8);
    return buffer;
  }
  function putFromSavedStateIfPresent(_this__u8e3s4, savedState, key) {
    var tmp0_safe_receiver = savedState.ba(key);
    if (tmp0_safe_receiver == null)
      null;
    else {
      // Inline function 'kotlin.also' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.util.ext.putFromSavedStateIfPresent.<anonymous>' call
      _this__u8e3s4.s(key, tmp0_safe_receiver);
    }
  }
  function toQueryString(_this__u8e3s4) {
    // Inline function 'kotlin.collections.map' call
    var this_0 = _this__u8e3s4.q2();
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.util.ext.toQueryString.<anonymous>' call
      var tmp$ret$0 = Companion_instance_230.por(item.s2()) + '=' + Companion_instance_230.por(item.t2());
      destination.i1(tmp$ret$0);
    }
    return joinToString(destination, '&');
  }
  function whenSubscribed(_this__u8e3s4, block, $completion) {
    // Inline function 'kotlinx.coroutines.flow.map' call
    // Inline function 'kotlinx.coroutines.flow.unsafeTransform' call
    var this_0 = _this__u8e3s4.n1h();
    // Inline function 'kotlinx.coroutines.flow.internal.unsafeFlow' call
    var tmp$ret$2 = new _no_name_provided__qut3iv_1(this_0);
    var tmp = distinctUntilChanged(tmp$ret$2);
    return collectLatest(tmp, whenSubscribed$slambda_0(block, null), $completion);
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_2(function_0) {
    this.tos_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_2).t1d = function (value, $completion) {
    return this.tos_1(value, $completion);
  };
  function whenSubscribed$o$collect$slambda($$this$unsafeFlow, resultContinuation) {
    this.cot_1 = $$this$unsafeFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(whenSubscribed$o$collect$slambda).i1i = function (value, $completion) {
    var tmp = this.j1i(value, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(whenSubscribed$o$collect$slambda).he = function (p1, $completion) {
    return this.i1i((!(p1 == null) ? typeof p1 === 'number' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(whenSubscribed$o$collect$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.eot_1 = this.cot_1;
            var tmp_1 = this;
            tmp_1.fot_1 = this.dot_1;
            this.hd_1 = 1;
            var it = this.fot_1;
            suspendResult = this.eot_1.t1d(it > 0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(whenSubscribed$o$collect$slambda).j1i = function (value, completion) {
    var i = new whenSubscribed$o$collect$slambda(this.cot_1, completion);
    i.dot_1 = value;
    return i;
  };
  function whenSubscribed$o$collect$slambda_0($$this$unsafeFlow, resultContinuation) {
    var i = new whenSubscribed$o$collect$slambda($$this$unsafeFlow, resultContinuation);
    var l = function (value, $completion) {
      return i.i1i(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$44(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.oot_1 = _this__u8e3s4;
    this.pot_1 = collector;
  }
  protoOf($collectCOROUTINE$44).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.qot_1 = this.pot_1;
            this.hd_1 = 1;
            var tmp_1 = whenSubscribed$o$collect$slambda_0(this.qot_1, null);
            suspendResult = this.oot_1.rot_1.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_2(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function _no_name_provided__qut3iv_1($this) {
    this.rot_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_1).sot = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$44(this, collector, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(_no_name_provided__qut3iv_1).z1b = function (collector, $completion) {
    return this.sot(collector, $completion);
  };
  function whenSubscribed$slambda($block, resultContinuation) {
    this.bou_1 = $block;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(whenSubscribed$slambda).dou = function (active, $completion) {
    var tmp = this.eou(active, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(whenSubscribed$slambda).he = function (p1, $completion) {
    return this.dou((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(whenSubscribed$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            if (this.cou_1) {
              this.hd_1 = 1;
              suspendResult = this.bou_1(this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(whenSubscribed$slambda).eou = function (active, completion) {
    var i = new whenSubscribed$slambda(this.bou_1, completion);
    i.cou_1 = active;
    return i;
  };
  function whenSubscribed$slambda_0($block, resultContinuation) {
    var i = new whenSubscribed$slambda($block, resultContinuation);
    var l = function (active, $completion) {
      return i.dou(active, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function navigateToLink(_this__u8e3s4, link, accountManager, openExternalLinkUseCase, goOptions, forceAccountSelection, userCanSelectServer, accountName, scope, linkTarget, dontSetCurrentSession) {
    goOptions = goOptions === VOID ? Companion_getInstance_83().doj_1 : goOptions;
    forceAccountSelection = forceAccountSelection === VOID ? false : forceAccountSelection;
    userCanSelectServer = userCanSelectServer === VOID ? true : userCanSelectServer;
    accountName = accountName === VOID ? null : accountName;
    scope = scope === VOID ? GlobalScope_instance : scope;
    linkTarget = linkTarget === VOID ? LinkTarget_DEFAULT_getInstance() : linkTarget;
    dontSetCurrentSession = dontSetCurrentSession === VOID ? false : dontSetCurrentSession;
    var endpointUrl = {_v: null};
    var viewUri = {_v: null};
    var tmp;
    if (startsWithHttpProtocol(link)) {
      tmp = contains(link, '/#/');
    } else {
      tmp = false;
    }
    if (tmp) {
      var urlComponents = Companion_instance_122.uor(link);
      endpointUrl._v = urlComponents.dn9_1;
      viewUri._v = urlComponents.vor();
    } else {
      if (!startsWithHttpProtocol(link)) {
        viewUri._v = link;
      }
    }
    var tmp_0;
    var tmp0_safe_receiver = viewUri._v;
    var tmp_1;
    if (tmp0_safe_receiver == null) {
      tmp_1 = null;
    } else {
      tmp_1 = startsWith(tmp0_safe_receiver, 'ParentalConsentManagement');
    }
    if (tmp_1 === true) {
      tmp_0 = minus(System_instance.sl7(), UstadMobileConstants_getInstance().aoj_1, Companion_getInstance_10().dl9_1, Companion_getInstance_9().ola_1).yla();
    } else {
      tmp_0 = new Long(0, 0);
    }
    var maxDateOfBirth = tmp_0;
    var tmp_2;
    if (viewUri._v == null ? true : (!userCanSelectServer ? !(endpointUrl._v == null) : false) ? !(endpointUrl._v === accountManager.xmx().umj_1) : false) {
      openExternalLinkUseCase.eo0(link, linkTarget);
      tmp_2 = null;
    } else {
      tmp_2 = launch(scope, VOID, VOID, navigateToLink$slambda_0(accountName, endpointUrl, accountManager, dontSetCurrentSession, _this__u8e3s4, viewUri, goOptions, forceAccountSelection, maxDateOfBirth, userCanSelectServer, null));
    }
    return tmp_2;
  }
  function navigateToViewUri(_this__u8e3s4, viewUri, goOptions) {
    var questionIndex = indexOf(viewUri, _Char___init__impl__6a9atx(63));
    var tmp;
    if (!(questionIndex === -1)) {
      // Inline function 'kotlin.text.substring' call
      // Inline function 'kotlin.js.asDynamic' call
      tmp = viewUri.substring(0, questionIndex);
    } else {
      tmp = viewUri;
    }
    var viewName = tmp;
    var tmp_0;
    if (questionIndex > 0) {
      var tmp_1 = UMFileUtil_getInstance();
      // Inline function 'kotlin.text.substring' call
      // Inline function 'kotlin.js.asDynamic' call
      var tmp$ret$3 = viewUri.substring(questionIndex);
      tmp_0 = tmp_1.parseURLQueryString(tmp$ret$3);
    } else {
      tmp_0 = emptyMap();
    }
    var args = tmp_0;
    _this__u8e3s4.eoo(viewName, args, goOptions);
  }
  function sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_1(function_0) {
    this.fou_1 = function_0;
  }
  protoOf(sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_1).dmq = function (endpointUrl) {
    return this.fou_1(endpointUrl);
  };
  function navigateToLink$slambda$lambda($endpointUrl) {
    return function (filterUrl) {
      return filterUrl === $endpointUrl._v;
    };
  }
  function navigateToLink$slambda$lambda_0($endpointUrl) {
    return function (it) {
      return it === $endpointUrl._v;
    };
  }
  function navigateToLink$slambda($accountName, $endpointUrl, $accountManager, $dontSetCurrentSession, $this_navigateToLink, $viewUri, $goOptions, $forceAccountSelection, $maxDateOfBirth, $userCanSelectServer, resultContinuation) {
    this.oou_1 = $accountName;
    this.pou_1 = $endpointUrl;
    this.qou_1 = $accountManager;
    this.rou_1 = $dontSetCurrentSession;
    this.sou_1 = $this_navigateToLink;
    this.tou_1 = $viewUri;
    this.uou_1 = $goOptions;
    this.vou_1 = $forceAccountSelection;
    this.wou_1 = $maxDateOfBirth;
    this.xou_1 = $userCanSelectServer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(navigateToLink$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(navigateToLink$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(navigateToLink$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 17;
            if (!(this.oou_1 == null) ? !(this.pou_1._v == null) : false) {
              this.hd_1 = 10;
              continue $sm;
            } else {
              if ((!this.vou_1 ? !isTemporary(this.qou_1.emx().jmk_1) : false) ? this.pou_1._v == null ? true : this.qou_1.xmx().umj_1 === this.pou_1._v : false) {
                navigateToViewUri(this.sou_1, this.tou_1._v, this.uou_1);
                this.hd_1 = 16;
                continue $sm;
              } else {
                if (!(this.pou_1._v == null)) {
                  this.hd_1 = 1;
                  var tmp_0 = navigateToLink$slambda$lambda_0(this.pou_1);
                  suspendResult = this.qou_1.ymx(this.wou_1, new sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_1(tmp_0), this);
                  if (suspendResult === get_COROUTINE_SUSPENDED()) {
                    return suspendResult;
                  }
                  continue $sm;
                } else {
                  this.bov_1 = false;
                  this.hd_1 = 2;
                  continue $sm;
                }
              }
            }

          case 1:
            this.cov_1 = suspendResult;
            this.bov_1 = this.cov_1 === 0;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (this.bov_1) {
              this.aov_1 = true;
              this.hd_1 = 6;
              continue $sm;
            } else {
              if (this.pou_1._v == null) {
                this.hd_1 = 3;
                suspendResult = this.qou_1.zmx(this.wou_1, VOID, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                this.eov_1 = false;
                this.hd_1 = 4;
                continue $sm;
              }
            }

          case 3:
            this.fov_1 = suspendResult;
            this.eov_1 = this.fov_1 === 0;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            if (this.eov_1) {
              this.dov_1 = !this.xou_1;
              this.hd_1 = 5;
              continue $sm;
            } else {
              this.dov_1 = false;
              this.hd_1 = 5;
              continue $sm;
            }

          case 5:
            this.aov_1 = this.dov_1;
            this.hd_1 = 6;
            continue $sm;
          case 6:
            if (this.aov_1) {
              Companion_getInstance_102();
              var tmp_1 = to('next', this.tou_1._v);
              Companion_getInstance_112();
              var args = mutableMapOf([tmp_1, to('noSessionChange', this.rou_1.toString())]);
              if (!(this.pou_1._v == null)) {
                Companion_getInstance_102();
                var key = 'serverUrl';
                var value = this.pou_1._v;
                args.s(key, value);
              }
              this.sou_1.eoo('Login', toMap_0(args), this.uou_1);
              this.hd_1 = 16;
              continue $sm;
            } else {
              if (this.pou_1._v == null) {
                this.hd_1 = 7;
                suspendResult = this.qou_1.zmx(this.wou_1, VOID, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                this.hov_1 = false;
                this.hd_1 = 8;
                continue $sm;
              }
            }

          case 7:
            this.iov_1 = suspendResult;
            this.hov_1 = this.iov_1 === 0;
            this.hd_1 = 8;
            continue $sm;
          case 8:
            if (this.hov_1) {
              this.gov_1 = this.xou_1;
              this.hd_1 = 9;
              continue $sm;
            } else {
              this.gov_1 = false;
              this.hd_1 = 9;
              continue $sm;
            }

          case 9:
            if (this.gov_1) {
              Companion_getInstance_190();
              Companion_getInstance_102();
              var tmp_2 = to('next', this.tou_1._v);
              Companion_getInstance_112();
              this.sou_1.eoo('SiteEnterLink', mapOf([tmp_2, to('noSessionChange', this.rou_1.toString())]), this.uou_1);
              this.hd_1 = 16;
              continue $sm;
            } else {
              Companion_getInstance_102();
              var tmp_3 = to('next', this.tou_1._v);
              Companion_getInstance_112();
              var args_0 = mutableMapOf([tmp_3, to('noSessionChange', this.rou_1.toString())]);
              if (!(this.pou_1._v == null)) {
                var key_0 = 'filterByEndpoint';
                var value_0 = this.pou_1._v;
                args_0.s(key_0, value_0);
              }
              var key_1 = 'activeAccountMode';
              args_0.s(key_1, 'inlist');
              Companion_getInstance_102();
              var key_2 = 'listMode';
              var value_1 = ListViewMode_PICKER_getInstance().toString();
              args_0.s(key_2, value_1);
              Companion_getInstance_102();
              var value_2 = this.wou_1.toString();
              args_0.s('maxDob', value_2);
              this.sou_1.eoo('AccountList', toMap_0(args_0), this.uou_1);
              this.hd_1 = 16;
              continue $sm;
            }

          case 10:
            this.hd_1 = 11;
            var tmp_4 = navigateToLink$slambda$lambda(this.pou_1);
            suspendResult = this.qou_1.fmx(new sam$com_ustadmobile_core_account_UstadAccountManager_EndpointFilter$0_1(tmp_4), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 11:
            var tmp0_iterator = suspendResult.w();
            this.hd_1 = 12;
            continue $sm;
          case 12:
            if (!tmp0_iterator.f()) {
              this.hd_1 = 14;
              continue $sm;
            }

            var element = tmp0_iterator.e();
            if (element.kmk_1.g95_1 === substringBefore_0(this.oou_1, '@')) {
              this.zou_1 = element;
              this.hd_1 = 15;
              continue $sm;
            } else {
              this.hd_1 = 13;
              continue $sm;
            }

          case 13:
            this.hd_1 = 12;
            continue $sm;
          case 14:
            this.zou_1 = null;
            if (false) {
              this.hd_1 = 10;
              continue $sm;
            }

            this.hd_1 = 15;
            continue $sm;
          case 15:
            var session = this.zou_1;
            if (!(session == null)) {
              var this_0 = this.qou_1;
              var tmp_5;
              if (!this.rou_1) {
                tmp_5 = this_0;
              } else {
                tmp_5 = null;
              }
              var tmp0_safe_receiver = tmp_5;
              if (tmp0_safe_receiver != null) {
                tmp0_safe_receiver.jmn(session);
              }
              navigateToViewUri(this.sou_1, this.tou_1._v, this.uou_1);
            }

            this.hd_1 = 16;
            continue $sm;
          case 16:
            return Unit_instance;
          case 17:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 17) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(navigateToLink$slambda).v1m = function ($this$launch, completion) {
    var i = new navigateToLink$slambda(this.oou_1, this.pou_1, this.qou_1, this.rou_1, this.sou_1, this.tou_1, this.uou_1, this.vou_1, this.wou_1, this.xou_1, completion);
    i.you_1 = $this$launch;
    return i;
  };
  function navigateToLink$slambda_0($accountName, $endpointUrl, $accountManager, $dontSetCurrentSession, $this_navigateToLink, $viewUri, $goOptions, $forceAccountSelection, $maxDateOfBirth, $userCanSelectServer, resultContinuation) {
    var i = new navigateToLink$slambda($accountName, $endpointUrl, $accountManager, $dontSetCurrentSession, $this_navigateToLink, $viewUri, $goOptions, $forceAccountSelection, $maxDateOfBirth, $userCanSelectServer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function isGuestUser(_this__u8e3s4) {
    return _this__u8e3s4.g95_1 == null;
  }
  function toUmAccount(_this__u8e3s4, endpointUrl) {
    return new UmAccount(_this__u8e3s4.f95_1, _this__u8e3s4.g95_1, '', endpointUrl, _this__u8e3s4.h95_1, _this__u8e3s4.i95_1);
  }
  function personFullName(_this__u8e3s4) {
    var tmp0_elvis_lhs = _this__u8e3s4.h95_1;
    var tmp = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
    var tmp1_elvis_lhs = _this__u8e3s4.i95_1;
    return tmp + ' ' + (tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
  }
  function toXapiAgent(_this__u8e3s4, endpoint) {
    var tmp = personFullName(_this__u8e3s4);
    var tmp0_elvis_lhs = _this__u8e3s4.g95_1;
    var tmp1_name = tmp0_elvis_lhs == null ? _this__u8e3s4.f95_1.toString() : tmp0_elvis_lhs;
    var tmp2_homePage = endpoint.umj_1;
    return new XapiAgent(tmp, VOID, VOID, VOID, VOID, new XapiAccount(tmp2_homePage, tmp1_name));
  }
  function toggle(_this__u8e3s4, item) {
    var tmp;
    if (_this__u8e3s4.a1(item)) {
      // Inline function 'kotlin.collections.filter' call
      // Inline function 'kotlin.collections.filterTo' call
      var destination = ArrayList_init_$Create$();
      var tmp0_iterator = _this__u8e3s4.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.util.ext.toggle.<anonymous>' call
        if (!equals(element, item)) {
          destination.i1(element);
        }
      }
      tmp = toSet(destination);
    } else {
      // Inline function 'kotlin.apply' call
      var this_0 = toMutableSet(_this__u8e3s4);
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.util.ext.toggle.<anonymous>' call
      this_0.i1(item);
      tmp = toSet(this_0);
    }
    return tmp;
  }
  function toQueryLikeParam(_this__u8e3s4) {
    var tmp;
    // Inline function 'kotlin.text.isNullOrEmpty' call
    // Inline function 'kotlin.contracts.contract' call
    if (_this__u8e3s4 == null ? true : charSequenceLength(_this__u8e3s4) === 0) {
      tmp = '%';
    } else {
      tmp = '%' + _this__u8e3s4 + '%';
    }
    return tmp;
  }
  function capitalizeFirstLetter(_this__u8e3s4) {
    // Inline function 'kotlin.text.replaceFirstChar' call
    var tmp;
    // Inline function 'kotlin.text.isNotEmpty' call
    if (charSequenceLength(_this__u8e3s4) > 0) {
      // Inline function 'com.ustadmobile.core.util.ext.capitalizeFirstLetter.<anonymous>' call
      var it = charSequenceGet(_this__u8e3s4, 0);
      var tmp$ret$1 = isLowerCase(it) ? titlecase(it) : toString_1(it);
      var tmp_0 = toString(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 appendQueryArgs(_this__u8e3s4, args) {
    var tmp;
    // Inline function 'kotlin.collections.isNotEmpty' call
    if (!args.c1()) {
      tmp = appendQueryArgs_0(_this__u8e3s4, toQueryString(args));
    } else {
      tmp = _this__u8e3s4;
    }
    return tmp;
  }
  function appendQueryArgs_0(_this__u8e3s4, queryArgs) {
    var retVal = _this__u8e3s4;
    if (contains(_this__u8e3s4, '?'))
      retVal = retVal + '&';
    else
      retVal = retVal + '?';
    retVal = retVal + queryArgs;
    return retVal;
  }
  function countWords(_this__u8e3s4) {
    var lastCharWasWhitespace = true;
    var wordCount = 0;
    var inductionVariable = 0;
    var last = _this__u8e3s4.length;
    if (inductionVariable < last)
      do {
        var i = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        var thisCharWhitespace = isWhitespace(charSequenceGet(_this__u8e3s4, i));
        if (!thisCharWhitespace ? lastCharWasWhitespace : false) {
          wordCount = wordCount + 1 | 0;
        }
        lastCharWasWhitespace = thisCharWhitespace;
      }
       while (inductionVariable < last);
    return wordCount;
  }
  function startsWithHttpProtocol(_this__u8e3s4) {
    // Inline function 'kotlin.let' call
    // Inline function 'kotlin.text.lowercase' call
    // Inline function 'kotlin.js.asDynamic' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.util.ext.startsWithHttpProtocol.<anonymous>' call
    var it = _this__u8e3s4.toLowerCase();
    return startsWith(it, 'http://') ? true : startsWith(it, 'https://');
  }
  function requirePostfix(_this__u8e3s4, postFix, ignoreCase) {
    ignoreCase = ignoreCase === VOID ? false : ignoreCase;
    return endsWith(_this__u8e3s4, postFix, ignoreCase) ? _this__u8e3s4 : _this__u8e3s4 + postFix;
  }
  function appendSelectedAccount(_this__u8e3s4, personUid, endpoint) {
    Companion_getInstance_112();
    var tmp = to('selectedAccountPersonUid', personUid.toString());
    Companion_getInstance_112();
    return appendQueryArgs(_this__u8e3s4, mapOf([tmp, to('selectedAccountEndpointUrl', endpoint.umj_1)]));
  }
  function requireHttpPrefix(_this__u8e3s4, defaultProtocol) {
    defaultProtocol = defaultProtocol === VOID ? 'https' : defaultProtocol;
    return startsWithHttpProtocol(_this__u8e3s4) ? _this__u8e3s4 : defaultProtocol + '://' + _this__u8e3s4;
  }
  function toNullIfBlank(_this__u8e3s4) {
    var tmp;
    if (isBlank(_this__u8e3s4)) {
      tmp = null;
    } else {
      tmp = _this__u8e3s4;
    }
    return tmp;
  }
  function trimExcessWhiteSpace(_this__u8e3s4) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.text.indexOfFirst' call
      var inductionVariable = 0;
      var last = charSequenceLength(_this__u8e3s4) - 1 | 0;
      if (inductionVariable <= last)
        do {
          var index = inductionVariable;
          inductionVariable = inductionVariable + 1 | 0;
          // Inline function 'com.ustadmobile.core.util.ext.trimExcessWhiteSpace.<anonymous>' call
          var it = charSequenceGet(_this__u8e3s4, index);
          if (!isWhitespace(it)) {
            tmp$ret$1 = index;
            break $l$block;
          }
        }
         while (inductionVariable <= last);
      tmp$ret$1 = -1;
    }
    var firstNonWhiteSpace = tmp$ret$1;
    var tmp$ret$3;
    $l$block_0: {
      // Inline function 'kotlin.text.indexOfLast' call
      var inductionVariable_0 = charSequenceLength(_this__u8e3s4) - 1 | 0;
      if (0 <= inductionVariable_0)
        do {
          var index_0 = inductionVariable_0;
          inductionVariable_0 = inductionVariable_0 + -1 | 0;
          // Inline function 'com.ustadmobile.core.util.ext.trimExcessWhiteSpace.<anonymous>' call
          var it_0 = charSequenceGet(_this__u8e3s4, index_0);
          if (!isWhitespace(it_0)) {
            tmp$ret$3 = index_0;
            break $l$block_0;
          }
        }
         while (0 <= inductionVariable_0);
      tmp$ret$3 = -1;
    }
    var lastNonWhiteSpace = tmp$ret$3;
    // Inline function 'kotlin.math.max' call
    var b = firstNonWhiteSpace - 1 | 0;
    var startPos = Math.max(0, b);
    // Inline function 'kotlin.math.min' call
    var a = _this__u8e3s4.length;
    var b_0 = lastNonWhiteSpace + 2 | 0;
    var endPos = Math.min(a, b_0);
    var tmp;
    if (!(startPos === 0) ? true : !(endPos === _this__u8e3s4.length)) {
      // Inline function 'kotlin.text.substring' call
      // Inline function 'kotlin.js.asDynamic' call
      tmp = _this__u8e3s4.substring(startPos, endPos);
    } else {
      tmp = _this__u8e3s4;
    }
    return tmp;
  }
  function initial(_this__u8e3s4) {
    var tmp0_safe_receiver = firstNonWhiteSpaceChar(_this__u8e3s4);
    var tmp;
    var tmp_0 = tmp0_safe_receiver;
    if ((tmp_0 == null ? null : new Char(tmp_0)) == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.text.uppercase' call
      // Inline function 'kotlin.js.unsafeCast' call
      // Inline function 'kotlin.js.asDynamic' call
      tmp = toString_1(tmp0_safe_receiver).toUpperCase();
    }
    var tmp1_elvis_lhs = tmp;
    return tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs;
  }
  function firstNonWhiteSpaceChar(_this__u8e3s4) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.text.indexOfFirst' call
      var inductionVariable = 0;
      var last = charSequenceLength(_this__u8e3s4) - 1 | 0;
      if (inductionVariable <= last)
        do {
          var index = inductionVariable;
          inductionVariable = inductionVariable + 1 | 0;
          // Inline function 'com.ustadmobile.core.util.ext.firstNonWhiteSpaceChar.<anonymous>' call
          var it = charSequenceGet(_this__u8e3s4, index);
          if (!isWhitespace(it)) {
            tmp$ret$1 = index;
            break $l$block;
          }
        }
         while (inductionVariable <= last);
      tmp$ret$1 = -1;
    }
    var index_0 = tmp$ret$1;
    return !(index_0 === -1) ? charSequenceGet(_this__u8e3s4, index_0) : null;
  }
  function formattedString(_this__u8e3s4, instant) {
    instant = instant === VOID ? System_instance.sl7() : instant;
    return gmtOffsetString(offsetAt(_this__u8e3s4, instant)) + ' ' + _this__u8e3s4.sla();
  }
  function get_progressAsFloat(_this__u8e3s4) {
    var tmp = _this__u8e3s4.ybw_1.zc();
    // Inline function 'kotlin.takeIf' call
    var this_0 = _this__u8e3s4.xbw_1.zc();
    // Inline function 'kotlin.contracts.contract' call
    var tmp_0;
    // Inline function 'com.ustadmobile.core.util.ext.<get-progressAsFloat>.<anonymous>' call
    if (!(this_0 === 0.0)) {
      tmp_0 = this_0;
    } else {
      tmp_0 = null;
    }
    var tmp0_elvis_lhs = tmp_0;
    return tmp / (tmp0_elvis_lhs == null ? 1.0 : tmp0_elvis_lhs);
  }
  function insertPersonAndGroup(_this__u8e3s4, entity, groupFlag, $completion) {
    var tmp;
    if (groupFlag === VOID) {
      tmp = 1;
    } else {
      tmp = groupFlag;
    }
    groupFlag = tmp;
    var tmp_0 = new $insertPersonAndGroupCOROUTINE$45(_this__u8e3s4, entity, groupFlag, $completion);
    tmp_0.jd_1 = Unit_instance;
    tmp_0.kd_1 = null;
    return tmp_0.ud();
  }
  function localFirstThenRepoIfFalse(_this__u8e3s4, block, $completion) {
    var tmp = new $localFirstThenRepoIfFalseCOROUTINE$46(_this__u8e3s4, block, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function ScopedGrantResult(sgUid) {
    this.now_1 = sgUid;
  }
  protoOf(ScopedGrantResult).toString = function () {
    return 'ScopedGrantResult(sgUid=' + this.now_1.toString() + ')';
  };
  protoOf(ScopedGrantResult).hashCode = function () {
    return this.now_1.hashCode();
  };
  protoOf(ScopedGrantResult).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ScopedGrantResult))
      return false;
    var tmp0_other_with_cast = other instanceof ScopedGrantResult ? other : THROW_CCE();
    if (!this.now_1.equals(tmp0_other_with_cast.now_1))
      return false;
    return true;
  };
  function grantScopedPermission(_this__u8e3s4, toPerson, permissions, scopeTableId, scopeEntityUid, $completion) {
    return grantScopedPermission_0(_this__u8e3s4, toPerson.q95_1, permissions, scopeTableId, scopeEntityUid, $completion);
  }
  function grantScopedPermission_0(_this__u8e3s4, toGroupUid, permissions, scopeTableId, scopeEntityUid, $completion) {
    var tmp = new $grantScopedPermissionCOROUTINE$47(_this__u8e3s4, toGroupUid, permissions, scopeTableId, scopeEntityUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function localFirstThenRepoIfNull(_this__u8e3s4, block, $completion) {
    var tmp = new $localFirstThenRepoIfNullCOROUTINE$48(_this__u8e3s4, block, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function $insertPersonAndGroupCOROUTINE$45(_this__u8e3s4, entity, groupFlag, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.rov_1 = _this__u8e3s4;
    this.sov_1 = entity;
    this.tov_1 = groupFlag;
  }
  protoOf($insertPersonAndGroupCOROUTINE$45).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            var tmp_0 = this;
            var this_0 = new PersonGroup();
            this_0.wfs_1 = 'Person individual group';
            this_0.yfs_1 = this.tov_1;
            tmp_0.uov_1 = this_0;
            this.hd_1 = 1;
            suspendResult = this.rov_1.q7d().insertAsync(this.uov_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.vov_1 = suspendResult;
            this.uov_1.rfs_1 = this.vov_1;
            this.sov_1.q95_1 = this.uov_1.rfs_1;
            this.hd_1 = 2;
            suspendResult = this.rov_1.a7d().insertAsync(this.sov_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.wov_1 = suspendResult;
            this.sov_1.f95_1 = this.wov_1;
            this.hd_1 = 3;
            suspendResult = this.rov_1.r7d().insertAsync(PersonGroupMember_init_$Create$(this.sov_1.f95_1, this.sov_1.q95_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.hd_1 = 4;
            Companion_getInstance_2();
            var tmp_1 = new Long(-1, 2147483647);
            suspendResult = grantScopedPermission(this.rov_1, this.sov_1, tmp_1, 9, this.sov_1.f95_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            return this.sov_1;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function $localFirstThenRepoIfFalseCOROUTINE$46(_this__u8e3s4, block, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.fow_1 = _this__u8e3s4;
    this.gow_1 = block;
  }
  protoOf($localFirstThenRepoIfFalseCOROUTINE$46).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            var tmp_0 = this;
            var tmp_1 = this.fow_1;
            var tmp0_safe_receiver = isInterface(tmp_1, DoorDatabaseRepository) ? tmp_1 : null;
            var tmp_2 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.k5i();
            tmp_0.how_1 = tmp_2 instanceof UmAppDatabase ? tmp_2 : null;
            this.iow_1 = this.how_1;
            if (this.iow_1 == null) {
              this.jow_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              var tmp_3 = this;
              tmp_3.kow_1 = this.iow_1;
              var tmp_4 = this;
              tmp_4.low_1 = this.kow_1;
              this.hd_1 = 1;
              suspendResult = this.gow_1(this.low_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.jow_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.mow_1 = this.jow_1;
            if (this.mow_1 === true)
              return this.mow_1;
            this.hd_1 = 3;
            suspendResult = this.gow_1(this.fow_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            return suspendResult;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function $grantScopedPermissionCOROUTINE$47(_this__u8e3s4, toGroupUid, permissions, scopeTableId, scopeEntityUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.wow_1 = _this__u8e3s4;
    this.xow_1 = toGroupUid;
    this.yow_1 = permissions;
    this.zow_1 = scopeTableId;
    this.aox_1 = scopeEntityUid;
  }
  protoOf($grantScopedPermissionCOROUTINE$47).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.wow_1.l7e();
            var this_0 = new ScopedGrant();
            this_0.tgx_1 = this.xow_1;
            this_0.sgx_1 = this.yow_1;
            this_0.qgx_1 = this.zow_1;
            this_0.rgx_1 = this.aox_1;
            suspendResult = tmp_0.wgw(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var sgUid = suspendResult;
            return new ScopedGrantResult(sgUid);
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function $localFirstThenRepoIfNullCOROUTINE$48(_this__u8e3s4, block, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.jox_1 = _this__u8e3s4;
    this.kox_1 = block;
  }
  protoOf($localFirstThenRepoIfNullCOROUTINE$48).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            var tmp_0 = this;
            var tmp_1 = this.jox_1;
            var tmp0_safe_receiver = isInterface(tmp_1, DoorDatabaseRepository) ? tmp_1 : null;
            var tmp_2 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.k5i();
            tmp_0.lox_1 = tmp_2 instanceof UmAppDatabase ? tmp_2 : null;
            this.mox_1 = this.lox_1;
            if (this.mox_1 == null) {
              this.nox_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              var tmp_3 = this;
              tmp_3.oox_1 = this.mox_1;
              var tmp_4 = this;
              tmp_4.pox_1 = this.oox_1;
              this.hd_1 = 1;
              suspendResult = this.kox_1(this.pox_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.nox_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.qox_1 = this.nox_1;
            if (!(this.qox_1 == null))
              return this.qox_1;
            this.hd_1 = 3;
            suspendResult = this.kox_1(this.jox_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            return suspendResult;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function withEndpoint(_this__u8e3s4, endpoint) {
    var tmp0_elvis_lhs = _this__u8e3s4.ghw_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('session withendpoint : usersession must not be null');
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var tmp_0 = tmp;
    var tmp1_elvis_lhs = _this__u8e3s4.ehw_1;
    var tmp_1;
    if (tmp1_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('session withendpoint: person msut not be null');
    } else {
      tmp_1 = tmp1_elvis_lhs;
    }
    return new UserSessionWithPersonAndEndpoint(tmp_0, tmp_1, endpoint);
  }
  function isTemporary(_this__u8e3s4) {
    var tmp = _this__u8e3s4.dhw_1;
    var tmp_0 = tmp & 8;
    return tmp_0 === 8;
  }
  function setIfNoValueSetYet(_this__u8e3s4, key, value) {
    if (_this__u8e3s4.ba(key) == null) {
      _this__u8e3s4.rox(key, value);
    }
  }
  function require_0(_this__u8e3s4, key) {
    var tmp0_elvis_lhs = _this__u8e3s4.ba(key);
    var tmp;
    if (tmp0_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('SavedStateHandle: required key not found: ' + key);
    } else {
      tmp = tmp0_elvis_lhs;
    }
    return tmp;
  }
  function gmtOffsetString(_this__u8e3s4) {
    var hours = _this__u8e3s4.wlb() / 3600 | 0;
    // Inline function 'kotlin.mod' call
    var r = _this__u8e3s4.wlb() % 3600 | 0;
    var minutes = r + (3600 & ((r ^ 3600) & (r | (-r | 0))) >> 31) | 0;
    // Inline function 'kotlin.text.buildString' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.apply' call
    var this_0 = StringBuilder_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.util.ext.gmtOffsetString.<anonymous>' call
    this_0.y5('GMT');
    if (hours >= 0) {
      this_0.y5('+');
    } else {
      this_0.y5('-');
    }
    // Inline function 'kotlin.math.absoluteValue' call
    var tmp$ret$1 = abs(hours);
    this_0.y5(padStart(tmp$ret$1.toString(), 2, _Char___init__impl__6a9atx(48)));
    this_0.y5(':');
    // Inline function 'kotlin.math.absoluteValue' call
    var tmp$ret$2 = abs(minutes);
    this_0.y5(padStart(tmp$ret$2.toString(), 2, _Char___init__impl__6a9atx(48)));
    return this_0.toString();
  }
  function xhtmlContentToText(_this__u8e3s4) {
    // Inline function 'kotlin.text.buildString' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.apply' call
    var this_0 = StringBuilder_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.util.ext.xhtmlContentToText.<anonymous>' call
    var initTagName = _this__u8e3s4.dc();
    var initDepth = _this__u8e3s4.pjz();
    while (!((_this__u8e3s4.e().equals(EventType_END_ELEMENT_getInstance()) ? _this__u8e3s4.pjz() === (initDepth - 1 | 0) : false) ? _this__u8e3s4.dc().equals(initTagName) : false)) {
      switch (_this__u8e3s4.ujz().za_1) {
        case 1:
          if (_this__u8e3s4.dc().lk3() === 'img') {
            var tmp1_elvis_lhs = _this__u8e3s4.z7c(null, 'alt');
            var textVal = tmp1_elvis_lhs == null ? _this__u8e3s4.z7c(null, 'title') : tmp1_elvis_lhs;
            if (textVal == null)
              null;
            else {
              // Inline function 'kotlin.also' call
              // Inline function 'kotlin.contracts.contract' call
              // Inline function 'com.ustadmobile.core.util.ext.xhtmlContentToText.<anonymous>.<anonymous>' call
              this_0.y5(textVal);
            }
          }

          break;
        case 4:
          this_0.y5(trimExcessWhiteSpace(_this__u8e3s4.sjz()));
          break;
        default:
          break;
      }
    }
    return this_0.toString();
  }
  function emptyStringValues() {
    return new MapStringValues(emptyMap());
  }
  function Companion_75() {
  }
  protoOf(Companion_75).o4d = function () {
    return new MapStringValues(emptyMap());
  };
  protoOf(Companion_75).a4r = function () {
    return new StringValuesSerializer();
  };
  protoOf(Companion_75).i4g = function (typeParamsSerializers) {
    return this.a4r();
  };
  var Companion_instance_123;
  function Companion_getInstance_92() {
    return Companion_instance_123;
  }
  function IStringValues() {
  }
  function MapStringValues(map) {
    this.sos_1 = map;
  }
  protoOf(MapStringValues).a2n = function (key) {
    // Inline function 'kotlin.collections.flatMap' call
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var this_0 = this.sos_1.q2();
    var destination = ArrayList_init_$Create$();
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.util.stringvalues.MapStringValues.getAll.<anonymous>' call
      if (equals_0(element.s2(), key, true)) {
        destination.i1(element);
      }
    }
    // Inline function 'kotlin.collections.flatMapTo' call
    var destination_0 = ArrayList_init_$Create$();
    var tmp0_iterator_0 = destination.w();
    while (tmp0_iterator_0.f()) {
      var element_0 = tmp0_iterator_0.e();
      // Inline function 'com.ustadmobile.core.util.stringvalues.MapStringValues.getAll.<anonymous>' call
      var list = element_0.t2();
      addAll(destination_0, list);
    }
    return destination_0;
  };
  protoOf(MapStringValues).b2n = function () {
    return this.sos_1.o2();
  };
  function asIStringValues(_this__u8e3s4) {
    return new MapStringValues(_this__u8e3s4);
  }
  function StringValuesSerializer() {
    this.sox_1 = MapSerializer(serializer_0(StringCompanionObject_instance), ListSerializer(serializer_0(StringCompanionObject_instance)));
    this.tox_1 = SerialDescriptor('StringValuesSerializer', this.sox_1.d44());
  }
  protoOf(StringValuesSerializer).d44 = function () {
    return this.tox_1;
  };
  protoOf(StringValuesSerializer).f44 = function (decoder) {
    var stringMap = decoder.u47(this.sox_1);
    return new MapStringValues(stringMap);
  };
  protoOf(StringValuesSerializer).uox = function (encoder, value) {
    encoder.m49(this.sox_1, toMap_1(value));
  };
  protoOf(StringValuesSerializer).e44 = function (encoder, value) {
    return this.uox(encoder, (!(value == null) ? isInterface(value, IStringValues) : false) ? value : THROW_CCE());
  };
  function Companion_76() {
    this.vox_1 = 'errCode';
    this.wox_1 = 'msg';
    this.xox_1 = 'stacktraceKey';
    this.yox_1 = 'fromUri';
    this.zox_1 = 'ErrorReport';
  }
  var Companion_instance_124;
  function Companion_getInstance_93() {
    return Companion_instance_124;
  }
  function Companion_77() {
    this.aoy_1 = 'HolidayCalendarDetail';
  }
  var Companion_instance_125;
  function Companion_getInstance_94() {
    return Companion_instance_125;
  }
  function Companion_78() {
    this.boy_1 = 'InviteViaLink';
  }
  var Companion_instance_126;
  function Companion_getInstance_95() {
    return Companion_instance_126;
  }
  function Companion_79() {
    this.coy_1 = 'JoinWithCode';
  }
  var Companion_instance_127;
  function Companion_getInstance_96() {
    return Companion_instance_127;
  }
  function Companion_80() {
    this.doy_1 = 'LanguageDetailView';
  }
  var Companion_instance_128;
  function Companion_getInstance_97() {
    return Companion_instance_128;
  }
  function Companion_81() {
    this.eoy_1 = 'LanguageEditEditView';
  }
  var Companion_instance_129;
  function Companion_getInstance_98() {
    return Companion_instance_129;
  }
  function Companion_82() {
    this.foy_1 = 'ScopedGrantDetail';
  }
  var Companion_instance_130;
  function Companion_getInstance_99() {
    return Companion_instance_130;
  }
  function Companion_83() {
    this.goy_1 = 'SiteTermsDetailView';
    this.hoy_1 = 'SiteTermsDetailAcceptTerms';
    this.ioy_1 = 'useDisplayLocale';
    this.joy_1 = 'showAccept';
  }
  var Companion_instance_131;
  function Companion_getInstance_100() {
    return Companion_instance_131;
  }
  function Companion_84() {
    Companion_instance_132 = this;
    this.koy_1 = 'entity';
    this.loy_1 = new Long(200, 0);
  }
  var Companion_instance_132;
  function Companion_getInstance_101() {
    if (Companion_instance_132 == null)
      new Companion_84();
    return Companion_instance_132;
  }
  var ListViewMode_BROWSER_instance;
  var ListViewMode_PICKER_instance;
  var ListViewMode_entriesInitialized;
  function ListViewMode_initEntries() {
    if (ListViewMode_entriesInitialized)
      return Unit_instance;
    ListViewMode_entriesInitialized = true;
    ListViewMode_BROWSER_instance = new ListViewMode('BROWSER', 0, 'BROWSER');
    ListViewMode_PICKER_instance = new ListViewMode('PICKER', 1, 'PICKER');
  }
  function ListViewMode(name, ordinal, mode) {
    Enum.call(this, name, ordinal);
    this.ooy_1 = mode;
  }
  function ListViewMode_BROWSER_getInstance() {
    ListViewMode_initEntries();
    return ListViewMode_BROWSER_instance;
  }
  function ListViewMode_PICKER_getInstance() {
    ListViewMode_initEntries();
    return ListViewMode_PICKER_instance;
  }
  function Companion_85() {
    Companion_instance_133 = this;
    this.poy_1 = 'entityUid';
    this.qoy_1 = 'containerUid';
    this.roy_1 = 'parentUid';
    this.soy_1 = 'parentTitle';
    this.toy_1 = 'entryid';
    this.uoy_1 = 'learnerGroupUid';
    this.voy_1 = 'noiframe';
    this.woy_1 = 'schoolUid';
    this.xoy_1 = 'content_type';
    this.yoy_1 = 'filterBySchoolUid';
    this.zoy_1 = 'filterByRole';
    this.aoz_1 = 'listMode';
    this.boz_1 = 'getResultMode';
    this.coz_1 = 'listAddMode';
    this.doz_1 = 'filterByPermission';
    this.eoz_1 = 'clazzUid';
    this.foz_1 = 'filterByPersonGroupUid';
    this.goz_1 = 'filterByEnrolmentRole';
    this.hoz_1 = 'clazzAssignmentUid';
    this.ioz_1 = 'clazzAssignmentSubmitterUid';
    this.joz_1 = 'personUid';
    this.koz_1 = 'next';
    this.loz_1 = 'site';
    this.moz_1 = 'serverUrl';
    this.noz_1 = 'openLink';
    this.ooz_1 = 'account';
    this.poz_1 = 'accountEndpoint';
    this.qoz_1 = 'snack_message';
    this.roz_1 = 'argCode';
    this.soz_1 = 'argCodeTable';
    this.toz_1 = 'argEntityName';
    this.uoz_1 = '';
    this.voz_1 = 'root';
    this.woz_1 = 'current';
    this.xoz_1 = 'goToComplete';
    this.yoz_1 = 'saveDb';
    this.zoz_1 = 'popUpToOnFinish';
    this.ap0_1 = 'result_dest';
    this.bp0_1 = 'result_viewname';
    this.cp0_1 = 'registration_allowed';
    this.dp0_1 = 'result_key';
    this.ep0_1 = 'intMsg';
    this.fp0_1 = 'title';
    this.gp0_1 = 'navChild';
    this.hp0_1 = 'activeTabIndex';
    this.ip0_1 = 'maxDob';
    this.jp0_1 = new Long(1, -955361223);
  }
  var Companion_instance_133;
  function Companion_getInstance_102() {
    if (Companion_instance_133 == null)
      new Companion_85();
    return Companion_instance_133;
  }
  function DetailViewModel(di, savedStateHandle, destinationName) {
    UstadViewModel.call(this, di, savedStateHandle, destinationName);
    var tmp = this;
    Companion_getInstance_102();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.fp1_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
  }
  function ErrorReportUiState(errorReport, fieldsEnabled) {
    errorReport = errorReport === VOID ? null : errorReport;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    this.cp3_1 = errorReport;
    this.dp3_1 = fieldsEnabled;
  }
  protoOf(ErrorReportUiState).toString = function () {
    return 'ErrorReportUiState(errorReport=' + this.cp3_1 + ', fieldsEnabled=' + this.dp3_1 + ')';
  };
  protoOf(ErrorReportUiState).hashCode = function () {
    var result = this.cp3_1 == null ? 0 : hashCode(this.cp3_1);
    result = imul(result, 31) + getBooleanHashCode(this.dp3_1) | 0;
    return result;
  };
  protoOf(ErrorReportUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ErrorReportUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ErrorReportUiState ? other : THROW_CCE();
    if (!equals(this.cp3_1, tmp0_other_with_cast.cp3_1))
      return false;
    if (!(this.dp3_1 === tmp0_other_with_cast.dp3_1))
      return false;
    return true;
  };
  function HolidayCalendarDetailUIState(holidayCalendar, holidayList) {
    holidayCalendar = holidayCalendar === VOID ? null : holidayCalendar;
    holidayList = holidayList === VOID ? emptyList() : holidayList;
    this.ep3_1 = holidayCalendar;
    this.fp3_1 = holidayList;
  }
  protoOf(HolidayCalendarDetailUIState).toString = function () {
    return 'HolidayCalendarDetailUIState(holidayCalendar=' + this.ep3_1 + ', holidayList=' + this.fp3_1 + ')';
  };
  protoOf(HolidayCalendarDetailUIState).hashCode = function () {
    var result = this.ep3_1 == null ? 0 : hashCode(this.ep3_1);
    result = imul(result, 31) + hashCode(this.fp3_1) | 0;
    return result;
  };
  protoOf(HolidayCalendarDetailUIState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof HolidayCalendarDetailUIState))
      return false;
    var tmp0_other_with_cast = other instanceof HolidayCalendarDetailUIState ? other : THROW_CCE();
    if (!equals(this.ep3_1, tmp0_other_with_cast.ep3_1))
      return false;
    if (!equals(this.fp3_1, tmp0_other_with_cast.fp3_1))
      return false;
    return true;
  };
  function Companion_86() {
    this.gp3_1 = 'HolidayCalendarEdit';
  }
  var Companion_instance_134;
  function Companion_getInstance_103() {
    return Companion_instance_134;
  }
  function HolidayCalendarEditUiState(holidayCalendar, fieldsEnabled, holidayList) {
    holidayCalendar = holidayCalendar === VOID ? null : holidayCalendar;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    holidayList = holidayList === VOID ? emptyList() : holidayList;
    this.hp3_1 = holidayCalendar;
    this.ip3_1 = fieldsEnabled;
    this.jp3_1 = holidayList;
  }
  protoOf(HolidayCalendarEditUiState).toString = function () {
    return 'HolidayCalendarEditUiState(holidayCalendar=' + this.hp3_1 + ', fieldsEnabled=' + this.ip3_1 + ', holidayList=' + this.jp3_1 + ')';
  };
  protoOf(HolidayCalendarEditUiState).hashCode = function () {
    var result = this.hp3_1 == null ? 0 : hashCode(this.hp3_1);
    result = imul(result, 31) + getBooleanHashCode(this.ip3_1) | 0;
    result = imul(result, 31) + (this.jp3_1 == null ? 0 : hashCode(this.jp3_1)) | 0;
    return result;
  };
  protoOf(HolidayCalendarEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof HolidayCalendarEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof HolidayCalendarEditUiState ? other : THROW_CCE();
    if (!equals(this.hp3_1, tmp0_other_with_cast.hp3_1))
      return false;
    if (!(this.ip3_1 === tmp0_other_with_cast.ip3_1))
      return false;
    if (!equals(this.jp3_1, tmp0_other_with_cast.jp3_1))
      return false;
    return true;
  };
  function Companion_87() {
    this.kp3_1 = 'HolidayCalendarList';
  }
  var Companion_instance_135;
  function Companion_getInstance_104() {
    return Companion_instance_135;
  }
  function HolidayCalendarListUiState(holidayCalendarList) {
    var tmp;
    if (holidayCalendarList === VOID) {
      // Inline function 'kotlin.collections.listOf' call
      tmp = emptyList();
    } else {
      tmp = holidayCalendarList;
    }
    holidayCalendarList = tmp;
    this.lp3_1 = holidayCalendarList;
  }
  protoOf(HolidayCalendarListUiState).toString = function () {
    return 'HolidayCalendarListUiState(holidayCalendarList=' + this.lp3_1 + ')';
  };
  protoOf(HolidayCalendarListUiState).hashCode = function () {
    return hashCode(this.lp3_1);
  };
  protoOf(HolidayCalendarListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof HolidayCalendarListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof HolidayCalendarListUiState ? other : THROW_CCE();
    if (!equals(this.lp3_1, tmp0_other_with_cast.lp3_1))
      return false;
    return true;
  };
  function LanguageDetailUiState(language) {
    language = language === VOID ? null : language;
    this.mp3_1 = language;
  }
  protoOf(LanguageDetailUiState).toString = function () {
    return 'LanguageDetailUiState(language=' + this.mp3_1 + ')';
  };
  protoOf(LanguageDetailUiState).hashCode = function () {
    return this.mp3_1 == null ? 0 : this.mp3_1.hashCode();
  };
  protoOf(LanguageDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof LanguageDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof LanguageDetailUiState ? other : THROW_CCE();
    if (!equals(this.mp3_1, tmp0_other_with_cast.mp3_1))
      return false;
    return true;
  };
  function LanguageEditUiState(language, fieldsEnabled, languageNameError, twoLettersCodeError, threeLettersCodeError) {
    language = language === VOID ? null : language;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    languageNameError = languageNameError === VOID ? null : languageNameError;
    twoLettersCodeError = twoLettersCodeError === VOID ? null : twoLettersCodeError;
    threeLettersCodeError = threeLettersCodeError === VOID ? null : threeLettersCodeError;
    this.np3_1 = language;
    this.op3_1 = fieldsEnabled;
    this.pp3_1 = languageNameError;
    this.qp3_1 = twoLettersCodeError;
    this.rp3_1 = threeLettersCodeError;
  }
  protoOf(LanguageEditUiState).toString = function () {
    return 'LanguageEditUiState(language=' + this.np3_1 + ', fieldsEnabled=' + this.op3_1 + ', languageNameError=' + this.pp3_1 + ', twoLettersCodeError=' + this.qp3_1 + ', threeLettersCodeError=' + this.rp3_1 + ')';
  };
  protoOf(LanguageEditUiState).hashCode = function () {
    var result = this.np3_1 == null ? 0 : this.np3_1.hashCode();
    result = imul(result, 31) + getBooleanHashCode(this.op3_1) | 0;
    result = imul(result, 31) + (this.pp3_1 == null ? 0 : getStringHashCode(this.pp3_1)) | 0;
    result = imul(result, 31) + (this.qp3_1 == null ? 0 : getStringHashCode(this.qp3_1)) | 0;
    result = imul(result, 31) + (this.rp3_1 == null ? 0 : getStringHashCode(this.rp3_1)) | 0;
    return result;
  };
  protoOf(LanguageEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof LanguageEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof LanguageEditUiState ? other : THROW_CCE();
    if (!equals(this.np3_1, tmp0_other_with_cast.np3_1))
      return false;
    if (!(this.op3_1 === tmp0_other_with_cast.op3_1))
      return false;
    if (!(this.pp3_1 == tmp0_other_with_cast.pp3_1))
      return false;
    if (!(this.qp3_1 == tmp0_other_with_cast.qp3_1))
      return false;
    if (!(this.rp3_1 == tmp0_other_with_cast.rp3_1))
      return false;
    return true;
  };
  function Companion_88() {
    this.sp3_1 = 'LanguageList';
  }
  var Companion_instance_136;
  function Companion_getInstance_105() {
    return Companion_instance_136;
  }
  function LanguageListUiState(languageList, sortOptions, sortOrder) {
    languageList = languageList === VOID ? emptyList() : languageList;
    var tmp;
    if (sortOptions === VOID) {
      var tmp_0 = strings_getInstance().yld_1;
      var tmp_1 = new SortOrderOption(tmp_0, 1, true);
      var tmp_2 = strings_getInstance().yld_1;
      var tmp_3 = new SortOrderOption(tmp_2, 2, false);
      var tmp_4 = strings_getInstance().lle_1;
      var tmp_5 = new SortOrderOption(tmp_4, 3, true);
      var tmp_6 = strings_getInstance().lle_1;
      var tmp_7 = new SortOrderOption(tmp_6, 4, false);
      var tmp_8 = strings_getInstance().mle_1;
      var tmp_9 = new SortOrderOption(tmp_8, 5, true);
      var tmp_10 = strings_getInstance().mle_1;
      tmp = listOf([tmp_1, tmp_3, tmp_5, tmp_7, tmp_9, new SortOrderOption(tmp_10, 6, false)]);
    } else {
      tmp = sortOptions;
    }
    sortOptions = tmp;
    sortOrder = sortOrder === VOID ? first_0(sortOptions) : sortOrder;
    this.tp3_1 = languageList;
    this.up3_1 = sortOptions;
    this.vp3_1 = sortOrder;
  }
  protoOf(LanguageListUiState).toString = function () {
    return 'LanguageListUiState(languageList=' + this.tp3_1 + ', sortOptions=' + this.up3_1 + ', sortOrder=' + this.vp3_1 + ')';
  };
  protoOf(LanguageListUiState).hashCode = function () {
    var result = hashCode(this.tp3_1);
    result = imul(result, 31) + hashCode(this.up3_1) | 0;
    result = imul(result, 31) + this.vp3_1.hashCode() | 0;
    return result;
  };
  protoOf(LanguageListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof LanguageListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof LanguageListUiState ? other : THROW_CCE();
    if (!equals(this.tp3_1, tmp0_other_with_cast.tp3_1))
      return false;
    if (!equals(this.up3_1, tmp0_other_with_cast.up3_1))
      return false;
    if (!this.vp3_1.equals(tmp0_other_with_cast.vp3_1))
      return false;
    return true;
  };
  function LeavingReasonEditViewModel$slambda$slambda($savedStateHandle, resultContinuation) {
    this.ep4_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(LeavingReasonEditViewModel$slambda$slambda).gp4 = function (it, $completion) {
    var tmp = this.gmp(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(LeavingReasonEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.gp4(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(LeavingReasonEditViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.fp4_1.h7d();
            Companion_getInstance_102();
            var tmp0_safe_receiver = this.ep4_1.ba('entityUid');
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
            suspendResult = tmp_0.uf2(tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(LeavingReasonEditViewModel$slambda$slambda).gmp = function (it, completion) {
    var i = new LeavingReasonEditViewModel$slambda$slambda(this.ep4_1, completion);
    i.fp4_1 = it;
    return i;
  };
  function LeavingReasonEditViewModel$slambda$slambda_0($savedStateHandle, resultContinuation) {
    var i = new LeavingReasonEditViewModel$slambda$slambda($savedStateHandle, resultContinuation);
    var l = function (it, $completion) {
      return i.gp4(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function LeavingReasonEditViewModel$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(LeavingReasonEditViewModel$slambda$slambda_1).pp4 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(LeavingReasonEditViewModel$slambda$slambda_1).z77 = function ($completion) {
    return this.pp4($completion);
  };
  protoOf(LeavingReasonEditViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = new LeavingReason();
          this_0.u93_1 = '';
          return this_0;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(LeavingReasonEditViewModel$slambda$slambda_1).y77 = function (completion) {
    return new LeavingReasonEditViewModel$slambda$slambda_1(completion);
  };
  function LeavingReasonEditViewModel$slambda$slambda_2(resultContinuation) {
    var i = new LeavingReasonEditViewModel$slambda$slambda_1(resultContinuation);
    var l = function ($completion) {
      return i.pp4($completion);
    };
    l.$arity = 0;
    return l;
  }
  function LeavingReasonEditViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.np5_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.LeavingReasonEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.sp5(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function Companion_89() {
    this.tp5_1 = 'LeavingReasonEdit';
  }
  var Companion_instance_137;
  function Companion_getInstance_106() {
    return Companion_instance_137;
  }
  function LeavingReasonEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.cp6_1 = this$0;
    this.dp6_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(LeavingReasonEditViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(LeavingReasonEditViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(LeavingReasonEditViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.fp6_1 = Companion_getInstance_11().a4r();
            this.hd_1 = 1;
            var tmp_0 = LeavingReasonEditViewModel$slambda$slambda_0(this.dp6_1, null);
            var tmp_1 = LeavingReasonEditViewModel$slambda$slambda_2(null);
            suspendResult = this.cp6_1.tp2(this.fp6_1, VOID, VOID, tmp_0, tmp_1, LeavingReasonEditViewModel$slambda$lambda(this.cp6_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.cp6_1.np5_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.sp5(VOID, VOID, true);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(LeavingReasonEditViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new LeavingReasonEditViewModel$slambda(this.cp6_1, this.dp6_1, completion);
    i.ep6_1 = $this$launch;
    return i;
  };
  function LeavingReasonEditViewModel$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new LeavingReasonEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function LeavingReasonEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.op6_1 = $commitDelay;
    this.pp6_1 = $entity;
    this.qp6_1 = $this;
    this.rp6_1 = $key;
    this.sp6_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(LeavingReasonEditViewModel$onEntityChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(LeavingReasonEditViewModel$onEntityChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(LeavingReasonEditViewModel$onEntityChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.op6_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.pp6_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.qp6_1.pp2(this.qp6_1.lp1_1, this.rp6_1, this.sp6_1, this.pp6_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(LeavingReasonEditViewModel$onEntityChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new LeavingReasonEditViewModel$onEntityChanged$slambda(this.op6_1, this.pp6_1, this.qp6_1, this.rp6_1, this.sp6_1, completion);
    i.tp6_1 = $this$launch;
    return i;
  };
  function LeavingReasonEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new LeavingReasonEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function LeavingReasonEditViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'LeavingReasonEdit');
    this.np5_1 = MutableStateFlow(new LeavingReasonEditUiState(VOID, VOID, false));
    this.op5_1 = asStateFlow(this.np5_1);
    var tmp = this.cp2();
    launch(tmp, VOID, VOID, LeavingReasonEditViewModel$slambda_0(this, savedStateHandle, null));
  }
  protoOf(LeavingReasonEditViewModel).up6 = function (leavingReason) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.np5_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.LeavingReasonEditViewModel.onEntityChanged.<anonymous>' call
        var nextValue = prevValue.sp5(leavingReason);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_getInstance_11().a4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_112();
    var key = 'entityState';
    var tmp0_safe_receiver = this.qp7_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp = this;
    var tmp_0 = this.cp2();
    tmp.qp7_1 = launch(tmp_0, VOID, VOID, LeavingReasonEditViewModel$onEntityChanged$slambda_0(commitDelay, leavingReason, this, key, serializer, null));
  };
  function LeavingReasonEditUiState(leavingReason, reasonTitleError, fieldsEnabled) {
    leavingReason = leavingReason === VOID ? null : leavingReason;
    reasonTitleError = reasonTitleError === VOID ? null : reasonTitleError;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    this.pp5_1 = leavingReason;
    this.qp5_1 = reasonTitleError;
    this.rp5_1 = fieldsEnabled;
  }
  protoOf(LeavingReasonEditUiState).vp7 = function (leavingReason, reasonTitleError, fieldsEnabled) {
    return new LeavingReasonEditUiState(leavingReason, reasonTitleError, fieldsEnabled);
  };
  protoOf(LeavingReasonEditUiState).sp5 = function (leavingReason, reasonTitleError, fieldsEnabled, $super) {
    leavingReason = leavingReason === VOID ? this.pp5_1 : leavingReason;
    reasonTitleError = reasonTitleError === VOID ? this.qp5_1 : reasonTitleError;
    fieldsEnabled = fieldsEnabled === VOID ? this.rp5_1 : fieldsEnabled;
    return $super === VOID ? this.vp7(leavingReason, reasonTitleError, fieldsEnabled) : $super.vp7.call(this, leavingReason, reasonTitleError, fieldsEnabled);
  };
  protoOf(LeavingReasonEditUiState).toString = function () {
    return 'LeavingReasonEditUiState(leavingReason=' + this.pp5_1 + ', reasonTitleError=' + this.qp5_1 + ', fieldsEnabled=' + this.rp5_1 + ')';
  };
  protoOf(LeavingReasonEditUiState).hashCode = function () {
    var result = this.pp5_1 == null ? 0 : hashCode(this.pp5_1);
    result = imul(result, 31) + (this.qp5_1 == null ? 0 : getStringHashCode(this.qp5_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.rp5_1) | 0;
    return result;
  };
  protoOf(LeavingReasonEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof LeavingReasonEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof LeavingReasonEditUiState ? other : THROW_CCE();
    if (!equals(this.pp5_1, tmp0_other_with_cast.pp5_1))
      return false;
    if (!(this.qp5_1 == tmp0_other_with_cast.qp5_1))
      return false;
    if (!(this.rp5_1 === tmp0_other_with_cast.rp5_1))
      return false;
    return true;
  };
  function Companion_90() {
    this.wp7_1 = 'Onboarding';
    this.xp7_1 = 'onboaring_screen';
  }
  var Companion_instance_138;
  function Companion_getInstance_107() {
    return Companion_instance_138;
  }
  function Companion_91() {
    this.yp7_1 = 'ReportFilterEdit';
  }
  var Companion_instance_139;
  function Companion_getInstance_108() {
    return Companion_instance_139;
  }
  function ReportFilterEditUiState(fieldError, conditionsError, valuesError, fieldsEnabled, reportFilter, uidAndLabelList, createNewFilter, reportFilterValueVisible, reportFilterBetweenValueVisible, reportFilterUidAndLabelListVisible) {
    fieldError = fieldError === VOID ? null : fieldError;
    conditionsError = conditionsError === VOID ? null : conditionsError;
    valuesError = valuesError === VOID ? null : valuesError;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    reportFilter = reportFilter === VOID ? null : reportFilter;
    uidAndLabelList = uidAndLabelList === VOID ? emptyList() : uidAndLabelList;
    createNewFilter = createNewFilter === VOID ? '' : createNewFilter;
    reportFilterValueVisible = reportFilterValueVisible === VOID ? true : reportFilterValueVisible;
    reportFilterBetweenValueVisible = reportFilterBetweenValueVisible === VOID ? true : reportFilterBetweenValueVisible;
    reportFilterUidAndLabelListVisible = reportFilterUidAndLabelListVisible === VOID ? true : reportFilterUidAndLabelListVisible;
    this.zp7_1 = fieldError;
    this.ap8_1 = conditionsError;
    this.bp8_1 = valuesError;
    this.cp8_1 = fieldsEnabled;
    this.dp8_1 = reportFilter;
    this.ep8_1 = uidAndLabelList;
    this.fp8_1 = createNewFilter;
    this.gp8_1 = reportFilterValueVisible;
    this.hp8_1 = reportFilterBetweenValueVisible;
    this.ip8_1 = reportFilterUidAndLabelListVisible;
  }
  protoOf(ReportFilterEditUiState).toString = function () {
    return 'ReportFilterEditUiState(fieldError=' + this.zp7_1 + ', conditionsError=' + this.ap8_1 + ', valuesError=' + this.bp8_1 + ', fieldsEnabled=' + this.cp8_1 + ', reportFilter=' + this.dp8_1 + ', uidAndLabelList=' + this.ep8_1 + ', createNewFilter=' + this.fp8_1 + ', reportFilterValueVisible=' + this.gp8_1 + ', reportFilterBetweenValueVisible=' + this.hp8_1 + ', reportFilterUidAndLabelListVisible=' + this.ip8_1 + ')';
  };
  protoOf(ReportFilterEditUiState).hashCode = function () {
    var result = this.zp7_1 == null ? 0 : getStringHashCode(this.zp7_1);
    result = imul(result, 31) + (this.ap8_1 == null ? 0 : getStringHashCode(this.ap8_1)) | 0;
    result = imul(result, 31) + (this.bp8_1 == null ? 0 : getStringHashCode(this.bp8_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.cp8_1) | 0;
    result = imul(result, 31) + (this.dp8_1 == null ? 0 : this.dp8_1.hashCode()) | 0;
    result = imul(result, 31) + hashCode(this.ep8_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.fp8_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.gp8_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.hp8_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ip8_1) | 0;
    return result;
  };
  protoOf(ReportFilterEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ReportFilterEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ReportFilterEditUiState ? other : THROW_CCE();
    if (!(this.zp7_1 == tmp0_other_with_cast.zp7_1))
      return false;
    if (!(this.ap8_1 == tmp0_other_with_cast.ap8_1))
      return false;
    if (!(this.bp8_1 == tmp0_other_with_cast.bp8_1))
      return false;
    if (!(this.cp8_1 === tmp0_other_with_cast.cp8_1))
      return false;
    if (!equals(this.dp8_1, tmp0_other_with_cast.dp8_1))
      return false;
    if (!equals(this.ep8_1, tmp0_other_with_cast.ep8_1))
      return false;
    if (!(this.fp8_1 === tmp0_other_with_cast.fp8_1))
      return false;
    if (!(this.gp8_1 === tmp0_other_with_cast.gp8_1))
      return false;
    if (!(this.hp8_1 === tmp0_other_with_cast.hp8_1))
      return false;
    if (!(this.ip8_1 === tmp0_other_with_cast.ip8_1))
      return false;
    return true;
  };
  function ScopedGrantDetailUiState(entity, bitmaskList) {
    entity = entity === VOID ? null : entity;
    bitmaskList = bitmaskList === VOID ? emptyList() : bitmaskList;
    this.jp8_1 = entity;
    this.kp8_1 = bitmaskList;
  }
  protoOf(ScopedGrantDetailUiState).toString = function () {
    return 'ScopedGrantDetailUiState(entity=' + this.jp8_1 + ', bitmaskList=' + this.kp8_1 + ')';
  };
  protoOf(ScopedGrantDetailUiState).hashCode = function () {
    var result = this.jp8_1 == null ? 0 : hashCode(this.jp8_1);
    result = imul(result, 31) + hashCode(this.kp8_1) | 0;
    return result;
  };
  protoOf(ScopedGrantDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ScopedGrantDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ScopedGrantDetailUiState ? other : THROW_CCE();
    if (!equals(this.jp8_1, tmp0_other_with_cast.jp8_1))
      return false;
    if (!equals(this.kp8_1, tmp0_other_with_cast.kp8_1))
      return false;
    return true;
  };
  function Companion_92() {
    this.lp8_1 = 'ScopedGrantEdit';
    this.mp8_1 = 'grantToGroup';
    this.np8_1 = 'grantToName';
    this.op8_1 = 'grantTableId';
    this.pp8_1 = 'grantEntityUid';
    this.qp8_1 = 'permissionList';
  }
  var Companion_instance_140;
  function Companion_getInstance_109() {
    return Companion_instance_140;
  }
  function ScopedGrantEditUiState(entity, bitmaskList) {
    entity = entity === VOID ? null : entity;
    var tmp;
    if (bitmaskList === VOID) {
      // Inline function 'kotlin.collections.listOf' call
      tmp = emptyList();
    } else {
      tmp = bitmaskList;
    }
    bitmaskList = tmp;
    this.rp8_1 = entity;
    this.sp8_1 = bitmaskList;
  }
  protoOf(ScopedGrantEditUiState).toString = function () {
    return 'ScopedGrantEditUiState(entity=' + this.rp8_1 + ', bitmaskList=' + this.sp8_1 + ')';
  };
  protoOf(ScopedGrantEditUiState).hashCode = function () {
    var result = this.rp8_1 == null ? 0 : hashCode(this.rp8_1);
    result = imul(result, 31) + hashCode(this.sp8_1) | 0;
    return result;
  };
  protoOf(ScopedGrantEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ScopedGrantEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ScopedGrantEditUiState ? other : THROW_CCE();
    if (!equals(this.rp8_1, tmp0_other_with_cast.rp8_1))
      return false;
    if (!equals(this.sp8_1, tmp0_other_with_cast.sp8_1))
      return false;
    return true;
  };
  function Companion_93() {
    Companion_instance_141 = this;
    this.tp8_1 = new Long(200, 0);
    this.up8_1 = 'initPicUri';
  }
  var Companion_instance_141;
  function Companion_getInstance_110() {
    if (Companion_instance_141 == null)
      new Companion_93();
    return Companion_instance_141;
  }
  function UstadEditViewModel(di, savedStateHandle, destinationName) {
    Companion_getInstance_110();
    UstadViewModel.call(this, di, savedStateHandle, destinationName);
    this.qp7_1 = null;
    var tmp = this;
    Companion_getInstance_112();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.rp7_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
  }
  protoOf(UstadEditViewModel).sp7 = function (detailViewName, entityUid, result, detailViewExtraArgs) {
    Companion_getInstance_102();
    var popUpToViewName = this.lp1_1.ba('result_viewname');
    Companion_getInstance_102();
    var saveToKey = this.lp1_1.ba('result_key');
    Companion_getInstance_112();
    var createdNewEntity = this.lp1_1.ba('entityUid') == null;
    var returnResultExpected = !(popUpToViewName == null) ? !(saveToKey == null) : false;
    if (createdNewEntity ? !returnResultExpected : false) {
      // Inline function 'kotlin.collections.buildMap' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'kotlin.collections.buildMapInternal' call
      // Inline function 'kotlin.apply' call
      var this_0 = LinkedHashMap_init_$Create$();
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.finishWithResult.<anonymous>' call
      this_0.r2(detailViewExtraArgs);
      Companion_getInstance_112();
      this_0.s('entityUid', entityUid.toString());
      var tmp = this_0.f3();
      Companion_getInstance_102();
      this.np1_1.eoo(detailViewName, tmp, new UstadGoOptions('', true));
    } else {
      this.up7(result);
    }
  };
  protoOf(UstadEditViewModel).tp7 = function (detailViewName, entityUid, result, detailViewExtraArgs, $super) {
    detailViewExtraArgs = detailViewExtraArgs === VOID ? emptyMap() : detailViewExtraArgs;
    var tmp;
    if ($super === VOID) {
      this.sp7(detailViewName, entityUid, result, detailViewExtraArgs);
      tmp = Unit_instance;
    } else {
      tmp = $super.sp7.call(this, detailViewName, entityUid, result, detailViewExtraArgs);
    }
    return tmp;
  };
  protoOf(UstadEditViewModel).vp8 = function (newEntityStringResource, editEntityStringResource) {
    var tmp;
    if (!this.rp7_1.equals(new Long(0, 0))) {
      tmp = true;
    } else {
      Companion_getInstance_101();
      tmp = !(this.lp1_1.ba('entity') == null);
    }
    var isEditing = tmp;
    var tmp_0 = this.jp2();
    var tmp_1;
    if (isEditing) {
      tmp_1 = editEntityStringResource;
    } else {
      tmp_1 = newEntityStringResource;
    }
    return tmp_0.en6(tmp_1);
  };
  protoOf(UstadEditViewModel).wp8 = function (prevFieldValue, currentFieldValue, currentErrorMessage) {
    return currentErrorMessage == null ? null : !equals(prevFieldValue, currentFieldValue) ? null : currentErrorMessage;
  };
  function UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda(this$0, $fabStringResource, $onSetAddListItemVisibility, resultContinuation) {
    this.hp9_1 = this$0;
    this.ip9_1 = $fabStringResource;
    this.jp9_1 = $onSetAddListItemVisibility;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda).dou = function (hasAddPermission, $completion) {
    var tmp = this.eou(hasAddPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda).he = function (p1, $completion) {
    return this.dou((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          setAddNewItemUiState(this.hp9_1, this.kp9_1, this.ip9_1, this.jp9_1);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda).eou = function (hasAddPermission, completion) {
    var i = new UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda(this.hp9_1, this.ip9_1, this.jp9_1, completion);
    i.kp9_1 = hasAddPermission;
    return i;
  };
  function UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda_0(this$0, $fabStringResource, $onSetAddListItemVisibility, resultContinuation) {
    var i = new UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda(this$0, $fabStringResource, $onSetAddListItemVisibility, resultContinuation);
    var l = function (hasAddPermission, $completion) {
      return i.dou(hasAddPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function setAddNewItemUiState($this, hasAddPermission, fabStringResource, onSetAddItemVisibility) {
    var tmp;
    if (hasAddPermission ? $this.lpa().equals(ListViewMode_BROWSER_getInstance()) : false) {
      var tmp_0 = $this.jp2().en6(fabStringResource);
      var tmp_1 = FabIcon_ADD_getInstance();
      tmp = new FabUiState(true, tmp_0, tmp_1, UstadListViewModel$onClickAdd$ref($this));
    } else {
      tmp = new FabUiState(false);
    }
    var fabState = tmp;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = $this.pp1_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.UstadListViewModel.setAddNewItemUiState.<anonymous>' call
        var nextValue = prevValue.nol(fabState);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    onSetAddItemVisibility(hasAddPermission ? $this.lpa().equals(ListViewMode_PICKER_getInstance()) : false);
  }
  function Companion_94() {
    this.mpa_1 = 'listMode';
  }
  var Companion_instance_142;
  function Companion_getInstance_111() {
    return Companion_instance_142;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_3(function_0) {
    this.npa_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_3).t1d = function (value, $completion) {
    return this.npa_1(value, $completion);
  };
  function UstadListViewModel$searchEvtCollator$slambda(this$0, resultContinuation) {
    this.wpa_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadListViewModel$searchEvtCollator$slambda).ypa = function (it, $completion) {
    var tmp = this.zpa(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadListViewModel$searchEvtCollator$slambda).he = function (p1, $completion) {
    return this.ypa((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadListViewModel$searchEvtCollator$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp0_elvis_lhs = lastOrNull(this.xpa_1);
          this.wpa_1.apb(tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(UstadListViewModel$searchEvtCollator$slambda).zpa = function (it, completion) {
    var i = new UstadListViewModel$searchEvtCollator$slambda(this.wpa_1, completion);
    i.xpa_1 = it;
    return i;
  };
  function UstadListViewModel$searchEvtCollator$slambda_0(this$0, resultContinuation) {
    var i = new UstadListViewModel$searchEvtCollator$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.ypa(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadListViewModel$createSearchEnabledState$lambda(this$0) {
    return function (searchText) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.pp1_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.UstadListViewModel.createSearchEnabledState.<anonymous>.<anonymous>' call
          var nextValue = prevValue.nol(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue.fol_1.xok(VOID, searchText));
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      this$0.kpa_1.f6x(searchText);
      return Unit_instance;
    };
  }
  function UstadListViewModel$onClickAdd$ref($boundThis) {
    var l = function () {
      $boundThis.bpb();
      return Unit_instance;
    };
    l.callableName = 'onClickAdd';
    return l;
  }
  function UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda($hasPermissionFlow, this$0, $fabStringResource, $onSetAddListItemVisibility, resultContinuation) {
    this.kpb_1 = $hasPermissionFlow;
    this.lpb_1 = this$0;
    this.mpb_1 = $fabStringResource;
    this.npb_1 = $onSetAddListItemVisibility;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda).m86 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda).z77 = function ($completion) {
    return this.m86($completion);
  };
  protoOf(UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = distinctUntilChanged(this.kpb_1());
            var tmp_1 = UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda$slambda_0(this.lpb_1, this.mpb_1, this.npb_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_3(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda).y77 = function (completion) {
    return new UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda(this.kpb_1, this.lpb_1, this.mpb_1, this.npb_1, completion);
  };
  function UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda_0($hasPermissionFlow, this$0, $fabStringResource, $onSetAddListItemVisibility, resultContinuation) {
    var i = new UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda($hasPermissionFlow, this$0, $fabStringResource, $onSetAddListItemVisibility, resultContinuation);
    var l = function ($completion) {
      return i.m86($completion);
    };
    l.$arity = 0;
    return l;
  }
  function UstadListViewModel$onClickAdd$ref_0($boundThis) {
    var l = function () {
      $boundThis.bpb();
      return Unit_instance;
    };
    l.callableName = 'onClickAdd';
    return l;
  }
  function UstadListViewModel(di, savedStateHandle, initialState, destinationName) {
    UstadViewModel.call(this, di, savedStateHandle, destinationName);
    this.gpa_1 = MutableStateFlow(initialState);
    this.hpa_1 = asStateFlow(this.gpa_1);
    this.ipa_1 = MutableSharedFlow(1, 0, BufferOverflow_DROP_OLDEST_getInstance());
    this.jpa_1 = asSharedFlow(this.ipa_1);
    var tmp = this;
    var tmp_0 = new Long(200, 0);
    var tmp_1 = this.cp2();
    var tmp_2 = BufferOverflow_DROP_OLDEST_getInstance();
    tmp.kpa_1 = new EventCollator2(tmp_0, tmp_1, 1, tmp_2, UstadListViewModel$searchEvtCollator$slambda_0(this, null));
  }
  protoOf(UstadListViewModel).lpa = function () {
    var tmp;
    var tmp_0;
    Companion_getInstance_102();
    if (this.lp1_1.ba('listMode') === ListViewMode_PICKER_getInstance().ooy_1) {
      tmp_0 = true;
    } else {
      var tmp_1;
      Companion_getInstance_102();
      if (!(this.lp1_1.ba('result_viewname') == null)) {
        Companion_getInstance_102();
        tmp_1 = !(this.lp1_1.ba('result_key') == null);
      } else {
        tmp_1 = false;
      }
      tmp_0 = tmp_1;
    }
    if (tmp_0) {
      tmp = ListViewMode_PICKER_getInstance();
    } else {
      tmp = ListViewMode_BROWSER_getInstance();
    }
    return tmp;
  };
  protoOf(UstadListViewModel).opb = function (visible) {
    return new AppBarSearchUiState(visible, VOID, UstadListViewModel$createSearchEnabledState$lambda(this));
  };
  protoOf(UstadListViewModel).ppb = function (visible, $super) {
    visible = visible === VOID ? true : visible;
    return $super === VOID ? this.opb(visible) : $super.opb.call(this, visible);
  };
  protoOf(UstadListViewModel).qpb = function (hasPermissionFlow, fabStringResource, onSetAddListItemVisibility, $completion) {
    return whenSubscribed(this.gpa_1, UstadListViewModel$collectHasPermissionFlowAndSetAddNewItemUiState$slambda_0(hasPermissionFlow, this, fabStringResource, onSetAddListItemVisibility, null), $completion);
  };
  protoOf(UstadListViewModel).rpb = function (hasAddPermission, stringResource, onClick) {
    var tmp;
    if (hasAddPermission ? this.lpa().equals(ListViewMode_BROWSER_getInstance()) : false) {
      tmp = new FabUiState(true, this.jp2().en6(stringResource), FabIcon_ADD_getInstance(), onClick);
    } else {
      tmp = new FabUiState(false);
    }
    return tmp;
  };
  protoOf(UstadListViewModel).spb = function (hasAddPermission, stringResource, onClick, $super) {
    var tmp;
    if (onClick === VOID) {
      tmp = UstadListViewModel$onClickAdd$ref_0(this);
    } else {
      tmp = onClick;
    }
    onClick = tmp;
    return $super === VOID ? this.rpb(hasAddPermission, stringResource, onClick) : $super.rpb.call(this, hasAddPermission, stringResource, onClick);
  };
  protoOf(UstadListViewModel).tpb = function (editViewName, extraArgs) {
    var resultDest = this.kp2();
    var tmp;
    if (!(resultDest == null)) {
      Companion_getInstance_102();
      var tmp_0 = to('result_viewname', resultDest.roo_1);
      Companion_getInstance_102();
      tmp = plus_0(mapOf([tmp_0, to('result_key', resultDest.soo_1)]), extraArgs);
    } else {
      tmp = extraArgs;
    }
    var args = tmp;
    this.np1_1.sns(editViewName, args);
  };
  protoOf(UstadListViewModel).upb = function (editViewName, extraArgs, $super) {
    extraArgs = extraArgs === VOID ? emptyMap() : extraArgs;
    var tmp;
    if ($super === VOID) {
      this.tpb(editViewName, extraArgs);
      tmp = Unit_instance;
    } else {
      tmp = $super.tpb.call(this, editViewName, extraArgs);
    }
    return tmp;
  };
  protoOf(UstadListViewModel).vpb = function (detailViewName, entityUid, result, extraArgs) {
    var resultDest = this.kp2();
    if (!(resultDest == null)) {
      this.up7(result);
    } else {
      // Inline function 'kotlin.collections.buildMap' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'kotlin.collections.buildMapInternal' call
      // Inline function 'kotlin.apply' call
      var this_0 = LinkedHashMap_init_$Create$();
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.UstadListViewModel.navigateOnItemClicked.<anonymous>' call
      this_0.r2(extraArgs);
      Companion_getInstance_112();
      this_0.s('entityUid', entityUid.toString());
      var tmp$ret$2 = this_0.f3();
      this.np1_1.sns(detailViewName, tmp$ret$2);
    }
  };
  protoOf(UstadListViewModel).wpb = function (detailViewName, entityUid, result, extraArgs, $super) {
    extraArgs = extraArgs === VOID ? emptyMap() : extraArgs;
    var tmp;
    if ($super === VOID) {
      this.vpb(detailViewName, entityUid, result, extraArgs);
      tmp = Unit_instance;
    } else {
      tmp = $super.vpb.call(this, detailViewName, entityUid, result, extraArgs);
    }
    return tmp;
  };
  protoOf(UstadListViewModel).xpb = function (browseStringResource, selectStringResource) {
    var tmp = this.jp2();
    var tmp_0;
    if (this.lpa().equals(ListViewMode_BROWSER_getInstance())) {
      tmp_0 = browseStringResource;
    } else {
      tmp_0 = selectStringResource;
    }
    return tmp.en6(tmp_0);
  };
  function UstadViewModel$filteredResultFlowForKey$o$collect$slambda($$this$unsafeFlow, this$0, resultContinuation) {
    this.gpc_1 = $$this$unsafeFlow;
    this.hpc_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadViewModel$filteredResultFlowForKey$o$collect$slambda).jop = function (value, $completion) {
    var tmp = this.kop(value, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadViewModel$filteredResultFlowForKey$o$collect$slambda).he = function (p1, $completion) {
    return this.jop(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadViewModel$filteredResultFlowForKey$o$collect$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            var tmp_0 = this;
            tmp_0.kpc_1 = this.gpc_1;
            var tmp_1 = this;
            tmp_1.lpc_1 = this.ipc_1;
            var it = this.lpc_1;
            var isNew = it.poo_1.c7(this.hpc_1.ap2_1) > 0;
            if (isNew) {
              _set_lastNavResultTimestampCollected__txfbew(this.hpc_1, it.poo_1);
            }

            if (isNew) {
              this.hd_1 = 3;
              suspendResult = this.kpc_1.t1d(this.lpc_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 2;
              continue $sm;
            }

          case 2:
            if (false) {
              this.hd_1 = 1;
              continue $sm;
            }

            this.hd_1 = 4;
            continue $sm;
          case 3:
            this.jpc_1 = suspendResult;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            return Unit_instance;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(UstadViewModel$filteredResultFlowForKey$o$collect$slambda).kop = function (value, completion) {
    var i = new UstadViewModel$filteredResultFlowForKey$o$collect$slambda(this.gpc_1, this.hpc_1, completion);
    i.ipc_1 = value;
    return i;
  };
  function UstadViewModel$filteredResultFlowForKey$o$collect$slambda_0($$this$unsafeFlow, this$0, resultContinuation) {
    var i = new UstadViewModel$filteredResultFlowForKey$o$collect$slambda($$this$unsafeFlow, this$0, resultContinuation);
    var l = function (value, $completion) {
      return i.jop(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$52(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.upc_1 = _this__u8e3s4;
    this.vpc_1 = collector;
  }
  protoOf($collectCOROUTINE$52).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.wpc_1 = this.vpc_1;
            this.hd_1 = 1;
            var tmp_1 = UstadViewModel$filteredResultFlowForKey$o$collect$slambda_0(this.wpc_1, this.upc_1.ypc_1, null);
            suspendResult = this.upc_1.xpc_1.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_4(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function _set_lastNavResultTimestampCollected__txfbew($this, value) {
    $this.ap2_1 = value;
    $this.lp1_1.rox('collectedTs', value.toString());
  }
  function Companion_95() {
    Companion_instance_143 = this;
    this.zpc_1 = 'entityState';
    this.apd_1 = 'collectedTs';
    this.bpd_1 = 'initState';
    this.cpd_1 = 'timeZone';
    this.dpd_1 = 'parentUid';
    this.epd_1 = 'courseBlockUid';
    this.fpd_1 = 'entityUid';
    this.gpd_1 = 'serverUrl';
    this.hpd_1 = 'next';
    this.ipd_1 = 'maxDob';
    var tmp = this;
    Companion_getInstance_122();
    Companion_getInstance_148();
    Companion_getInstance_169();
    Companion_getInstance_180();
    tmp.jpd_1 = listOf(['CourseListHome', 'ContentEntryListHome', 'ConversationListHome', 'PersonListHome']);
    this.kpd_1 = 'openLink';
    this.lpd_1 = 'account';
    this.mpd_1 = 'popUpToOnFinish';
    this.npd_1 = 'inviteCode';
    this.opd_1 = 'clazzUid';
    this.ppd_1 = 'entryid';
    this.qpd_1 = 'personUid';
    this.rpd_1 = 't';
    this.spd_1 = 'noSessionChange';
    this.tpd_1 = 'selectedAccountPersonUid';
    this.upd_1 = 'selectedAccountEndpointUrl';
    this.vpd_1 = 'result_viewname';
    this.wpd_1 = 'result_key';
  }
  var Companion_instance_143;
  function Companion_getInstance_112() {
    if (Companion_instance_143 == null)
      new Companion_95();
    return Companion_instance_143;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_4(function_0) {
    this.xpd_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_4).t1d = function (value, $completion) {
    return this.xpd_1(value, $completion);
  };
  function sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0(function_0) {
    this.ypd_1 = function_0;
  }
  protoOf(sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0).eo0 = function (url, target) {
    return this.ypd_1(url, target);
  };
  function ifLoggedInElseNavigateToLoginWithNextDestSet$lambda($apiUrlConfig$delegate) {
    // Inline function 'kotlin.getValue' call
    getLocalDelegateReference('apiUrlConfig', KProperty0, false, function () {
      return THROW_ISE();
    });
    return $apiUrlConfig$delegate.t2();
  }
  function UstadViewModel$onClickLinkUseCase$delegate$lambda(this$0) {
    return function () {
      var tmp = this$0.bp2();
      // Inline function 'org.kodein.di.instance' call
      var tmp_0 = get_direct(this$0.n56()).s57();
      // Inline function 'org.kodein.type.generic' call
      var tmp_1 = typeToken(createKType(getKClass(OpenExternalLinkUseCase), arrayOf([]), false));
      var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
      var tmp_2 = tmp_0.q57(tmp$ret$0, null);
      // Inline function 'org.kodein.di.instance' call
      var tmp_3 = get_direct(this$0.n56()).s57();
      // Inline function 'org.kodein.type.generic' call
      var tmp_4 = typeToken(createKType(getKClass(ApiUrlConfig), arrayOf([]), false));
      var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
      var tmp$ret$3 = tmp_3.q57(tmp$ret$2, null);
      return OnClickLinkUseCase_init_$Create$(this$0.np1_1, tmp, tmp_2, tmp$ret$3);
    };
  }
  function _no_name_provided__qut3iv_2($this, this$0) {
    this.xpc_1 = $this;
    this.ypc_1 = this$0;
  }
  protoOf(_no_name_provided__qut3iv_2).zop = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$52(this, collector, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(_no_name_provided__qut3iv_2).z1b = function (collector, $completion) {
    return this.zop(collector, $completion);
  };
  function UstadViewModel$getJson$slambda(this$0, $deserializer, $jsonStr, resultContinuation) {
    this.hpe_1 = this$0;
    this.ipe_1 = $deserializer;
    this.jpe_1 = $jsonStr;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadViewModel$getJson$slambda).lpe = function ($this$withContext, $completion) {
    var tmp = this.v1m($this$withContext, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadViewModel$getJson$slambda).he = function (p1, $completion) {
    return this.lpe((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadViewModel$getJson$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return this.hpe_1.z4q().f45(this.ipe_1, this.jpe_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(UstadViewModel$getJson$slambda).v1m = function ($this$withContext, completion) {
    var i = new UstadViewModel$getJson$slambda(this.hpe_1, this.ipe_1, this.jpe_1, completion);
    i.kpe_1 = $this$withContext;
    return i;
  };
  function UstadViewModel$getJson$slambda_0(this$0, $deserializer, $jsonStr, resultContinuation) {
    var i = new UstadViewModel$getJson$slambda(this$0, $deserializer, $jsonStr, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.lpe($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadViewModel$setJson$slambda(this$0, $serializer, $value, resultContinuation) {
    this.upe_1 = this$0;
    this.vpe_1 = $serializer;
    this.wpe_1 = $value;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadViewModel$setJson$slambda).ype = function ($this$withContext, $completion) {
    var tmp = this.v1m($this$withContext, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadViewModel$setJson$slambda).he = function (p1, $completion) {
    return this.ype((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadViewModel$setJson$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return this.upe_1.z4q().e45(this.vpe_1, this.wpe_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(UstadViewModel$setJson$slambda).v1m = function ($this$withContext, completion) {
    var i = new UstadViewModel$setJson$slambda(this.upe_1, this.vpe_1, this.wpe_1, completion);
    i.xpe_1 = $this$withContext;
    return i;
  };
  function UstadViewModel$setJson$slambda_0(this$0, $serializer, $value, resultContinuation) {
    var i = new UstadViewModel$setJson$slambda(this$0, $serializer, $value, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.ype($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadViewModel$launchIfHasPermission$slambda(this$0, $permissionCheck, $block, $onSetFieldsEnabled, resultContinuation) {
    this.hpf_1 = this$0;
    this.ipf_1 = $permissionCheck;
    this.jpf_1 = $block;
    this.kpf_1 = $onSetFieldsEnabled;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadViewModel$launchIfHasPermission$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadViewModel$launchIfHasPermission$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadViewModel$launchIfHasPermission$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 7;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.id_1 = 6;
            this.hd_1 = 2;
            suspendResult = localFirstThenRepoIfFalse(this.hpf_1.fp2(), this.ipf_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.npf_1 = suspendResult;
            if (!this.npf_1) {
              this.hpf_1.np1_1.eoo('Error', emptyMap(), new UstadGoOptions(this.hpf_1.mp1_1, true));
              this.hd_1 = 4;
              continue $sm;
            } else {
              this.hd_1 = 3;
              suspendResult = this.jpf_1(this.lpf_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 3:
            this.hd_1 = 4;
            continue $sm;
          case 4:
            this.mpf_1 = Unit_instance;
            this.id_1 = 7;
            this.hd_1 = 5;
            continue $sm;
          case 5:
            this.id_1 = 7;
            l$ret$5: do {
              var this_0 = this.hpf_1.pp1_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.nol(VOID, Companion_getInstance_85().vol_1);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$5;
                }
              }
            }
             while (false);
            var tmp0_safe_receiver = this.kpf_1;
            if (tmp0_safe_receiver == null)
              null;
            else
              tmp0_safe_receiver(true);
            return Unit_instance;
          case 6:
            this.id_1 = 7;
            var t = this.kd_1;
            l$ret$3: do {
              var this_1 = this.hpf_1.pp1_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.nol(VOID, Companion_getInstance_85().vol_1);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            var tmp0_safe_receiver_0 = this.kpf_1;
            if (tmp0_safe_receiver_0 == null)
              null;
            else
              tmp0_safe_receiver_0(true);
            throw t;
          case 7:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 7) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(UstadViewModel$launchIfHasPermission$slambda).v1m = function ($this$launch, completion) {
    var i = new UstadViewModel$launchIfHasPermission$slambda(this.hpf_1, this.ipf_1, this.jpf_1, this.kpf_1, completion);
    i.lpf_1 = $this$launch;
    return i;
  };
  function UstadViewModel$launchIfHasPermission$slambda_0(this$0, $permissionCheck, $block, $onSetFieldsEnabled, resultContinuation) {
    var i = new UstadViewModel$launchIfHasPermission$slambda(this$0, $permissionCheck, $block, $onSetFieldsEnabled, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadViewModel$launchWithLoadingIndicator$slambda($onSetFieldsEnabled, this$0, $block, resultContinuation) {
    this.wpf_1 = $onSetFieldsEnabled;
    this.xpf_1 = this$0;
    this.ypf_1 = $block;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(UstadViewModel$launchWithLoadingIndicator$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadViewModel$launchWithLoadingIndicator$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(UstadViewModel$launchWithLoadingIndicator$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.id_1 = 4;
            this.wpf_1(false);
            l$ret$1: do {
              var this_0 = this.xpf_1.pp1_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.nol(VOID, Companion_getInstance_85().uol_1, VOID, VOID, VOID, VOID, VOID, VOID, prevValue.gol_1.ook(VOID, VOID, false));
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.hd_1 = 2;
            suspendResult = this.ypf_1(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.apg_1 = suspendResult;
            this.id_1 = 5;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.id_1 = 5;
            this.wpf_1(true);
            l$ret$7: do {
              var this_1 = this.xpf_1.pp1_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.nol(VOID, Companion_getInstance_85().vol_1, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_0.gol_1.ook(VOID, VOID, true));
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$7;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 4:
            this.id_1 = 5;
            var t = this.kd_1;
            this.wpf_1(true);
            l$ret$5: do {
              var this_2 = this.xpf_1.pp1_1;
              while (true) {
                var prevValue_1 = this_2.t2();
                var nextValue_1 = prevValue_1.nol(VOID, Companion_getInstance_85().vol_1, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_1.gol_1.ook(VOID, VOID, true));
                if (this_2.y1k(prevValue_1, nextValue_1)) {
                  break l$ret$5;
                }
              }
            }
             while (false);
            throw t;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(UstadViewModel$launchWithLoadingIndicator$slambda).v1m = function ($this$launch, completion) {
    var i = new UstadViewModel$launchWithLoadingIndicator$slambda(this.wpf_1, this.xpf_1, this.ypf_1, completion);
    i.zpf_1 = $this$launch;
    return i;
  };
  function UstadViewModel$launchWithLoadingIndicator$slambda_0($onSetFieldsEnabled, this$0, $block, resultContinuation) {
    var i = new UstadViewModel$launchWithLoadingIndicator$slambda($onSetFieldsEnabled, this$0, $block, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UstadViewModel$ifLoggedInElseNavigateToLoginWithNextDestSet$lambda(_anonymous_parameter_0__qggqh8, _anonymous_parameter_1__qggqgd) {
    return Unit_instance;
  }
  function $getJsonCOROUTINE$49(_this__u8e3s4, _this__u8e3s4_0, key, deserializer, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.jpg_1 = _this__u8e3s4;
    this.kpg_1 = _this__u8e3s4_0;
    this.lpg_1 = key;
    this.mpg_1 = deserializer;
  }
  protoOf($getJsonCOROUTINE$49).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.npg_1 = this.kpg_1.ba(this.lpg_1);
            if (!(this.npg_1 == null)) {
              this.hd_1 = 1;
              var tmp_0 = Dispatchers_getInstance().p12_1;
              suspendResult = withContext(tmp_0, UstadViewModel$getJson$slambda_0(this.jpg_1, this.mpg_1, this.npg_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_1 = this;
              tmp_1.opg_1 = null;
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            this.opg_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.opg_1;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function $setJsonCOROUTINE$50(_this__u8e3s4, _this__u8e3s4_0, key, serializer, value, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.xpg_1 = _this__u8e3s4;
    this.ypg_1 = _this__u8e3s4_0;
    this.zpg_1 = key;
    this.aph_1 = serializer;
    this.bph_1 = value;
  }
  protoOf($setJsonCOROUTINE$50).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = Dispatchers_getInstance().p12_1;
            suspendResult = withContext(tmp_0, UstadViewModel$setJson$slambda_0(this.xpg_1, this.aph_1, this.bph_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var jsonStr = suspendResult;
            this.ypg_1.rox(this.zpg_1, jsonStr);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function $loadEntityCOROUTINE$51(_this__u8e3s4, serializer, loadFromStateKeys, savedStateKey, onLoadFromDb, makeDefault, uiUpdate, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.kph_1 = _this__u8e3s4;
    this.lph_1 = serializer;
    this.mph_1 = loadFromStateKeys;
    this.nph_1 = savedStateKey;
    this.oph_1 = onLoadFromDb;
    this.pph_1 = makeDefault;
    this.qph_1 = uiUpdate;
  }
  protoOf($loadEntityCOROUTINE$51).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 18;
            var tmp_0 = this;
            tmp_0.rph_1 = this.mph_1;
            this.sph_1 = this.rph_1.w();
            this.hd_1 = 1;
            continue $sm;
          case 1:
            if (!this.sph_1.f()) {
              this.hd_1 = 3;
              continue $sm;
            }

            this.tph_1 = this.sph_1.e();
            var tmp_1 = this;
            tmp_1.uph_1 = this.tph_1;
            this.hd_1 = 2;
            suspendResult = this.kph_1.op2(this.kph_1.lp1_1, this.uph_1, this.lph_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.vph_1 = suspendResult;
            if (!(this.vph_1 == null)) {
              this.qph_1(this.vph_1);
              return this.vph_1;
            }

            this.hd_1 = 1;
            continue $sm;
          case 3:
            this.wph_1 = this.oph_1;
            if (this.wph_1 == null) {
              this.xph_1 = null;
              this.hd_1 = 5;
              continue $sm;
            } else {
              this.hd_1 = 4;
              suspendResult = this.wph_1(this.kph_1.ep2(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 4:
            this.xph_1 = suspendResult;
            this.hd_1 = 5;
            continue $sm;
          case 5:
            this.yph_1 = this.xph_1;
            if (!(this.yph_1 == null)) {
              this.qph_1(this.yph_1);
            }

            this.id_1 = 12;
            this.api_1 = this.oph_1;
            if (this.api_1 == null) {
              this.bpi_1 = null;
              this.hd_1 = 7;
              continue $sm;
            } else {
              this.hd_1 = 6;
              suspendResult = this.api_1(this.kph_1.fp2(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 6:
            this.bpi_1 = suspendResult;
            this.hd_1 = 7;
            continue $sm;
          case 7:
            this.cpi_1 = this.bpi_1;
            if (this.cpi_1 == null) {
              this.hd_1 = 8;
              suspendResult = this.pph_1(this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.dpi_1 = this.cpi_1;
              this.hd_1 = 9;
              continue $sm;
            }

          case 8:
            this.dpi_1 = suspendResult;
            this.hd_1 = 9;
            continue $sm;
          case 9:
            this.epi_1 = this.dpi_1;
            if (!(this.epi_1 == null)) {
              this.hd_1 = 10;
              suspendResult = this.kph_1.pp2(this.kph_1.lp1_1, this.nph_1, this.lph_1, this.epi_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 11;
              continue $sm;
            }

          case 10:
            this.hd_1 = 11;
            continue $sm;
          case 11:
            this.qph_1(this.epi_1);
            this.zph_1 = this.epi_1;
            this.id_1 = 18;
            this.hd_1 = 17;
            continue $sm;
          case 12:
            this.id_1 = 18;
            var tmp_2 = this.kd_1;
            if (tmp_2 instanceof Exception) {
              this.fpi_1 = this.kd_1;
              if (!(this.yph_1 == null)) {
                this.hd_1 = 13;
                suspendResult = this.kph_1.pp2(this.kph_1.lp1_1, this.nph_1, this.lph_1, this.yph_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                this.hd_1 = 14;
                continue $sm;
              }
            } else {
              throw this.kd_1;
            }

          case 13:
            this.hd_1 = 14;
            continue $sm;
          case 14:
            this.gpi_1 = this.yph_1;
            if (this.gpi_1 == null) {
              this.hd_1 = 15;
              suspendResult = this.pph_1(this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hpi_1 = this.gpi_1;
              this.hd_1 = 16;
              continue $sm;
            }

          case 15:
            var this_0 = suspendResult;
            this.qph_1(this_0);
            this.hpi_1 = this_0;
            this.hd_1 = 16;
            continue $sm;
          case 16:
            this.zph_1 = this.hpi_1;
            this.hd_1 = 17;
            continue $sm;
          case 17:
            this.id_1 = 18;
            return this.zph_1;
          case 18:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 18) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function UstadViewModel(di, savedStateHandle, destinationName) {
    Companion_getInstance_112();
    ViewModel_init_$Init$(this);
    this.kp1_1 = di;
    this.lp1_1 = savedStateHandle;
    this.mp1_1 = destinationName;
    this.np1_1 = new CommandFlowUstadNavController();
    this.op1_1 = this.np1_1.doo_1;
    this.pp1_1 = MutableStateFlow(new AppUiState());
    this.qp1_1 = asStateFlow(this.pp1_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UstadAccountManager), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.rp1_1 = Instance(this, tmp$ret$0, null).n5c(this, accountManager$factory());
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = this.bp2().xmx();
    var trigger = this.q56();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_2 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp$ret$3 = tmp_2.u56(tmp$ret$2, context);
    var this_0 = On(this, tmp$ret$3, trigger);
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$5 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    tmp_1.sp1_1 = Instance(this_0, tmp$ret$5, 1).n5c(this, activeDb$factory());
    var tmp_5 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context_0 = this.bp2().xmx();
    var trigger_0 = this.q56();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_6 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_7 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
    var tmp$ret$7 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    var tmp$ret$8 = tmp_6.u56(tmp$ret$7, context_0);
    var this_1 = On(this, tmp$ret$8, trigger_0);
    // Inline function 'org.kodein.type.generic' call
    var tmp_8 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$10 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
    tmp_5.tp1_1 = Instance(this_1, tmp$ret$10, 2).n5c(this, activeRepo$factory());
    var tmp_9 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_10 = typeToken(createKType(getKClass(NavResultReturner), arrayOf([]), false));
    var tmp$ret$12 = isInterface(tmp_10, TypeToken) ? tmp_10 : THROW_CCE();
    tmp_9.up1_1 = Instance(this, tmp$ret$12, null).n5c(this, navResultReturner$factory());
    var tmp_11 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_12 = typeToken(createKType(getKClass(Json), arrayOf([]), false));
    var tmp$ret$14 = isInterface(tmp_12, TypeToken) ? tmp_12 : THROW_CCE();
    tmp_11.vp1_1 = Instance(this, tmp$ret$14, null).n5c(this, json$factory_1());
    var tmp_13 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_14 = typeToken(createKType(getKClass(SnackBarDispatcher), arrayOf([]), false));
    var tmp$ret$16 = isInterface(tmp_14, TypeToken) ? tmp_14 : THROW_CCE();
    tmp_13.wp1_1 = Instance(this, tmp$ret$16, null).n5c(this, snackDispatcher$factory());
    var tmp_15 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_16 = typeToken(createKType(getKClass(NavResultReturner), arrayOf([]), false));
    var tmp$ret$18 = isInterface(tmp_16, TypeToken) ? tmp_16 : THROW_CCE();
    tmp_15.xp1_1 = Instance(this, tmp$ret$18, null).n5c(this, resultReturner$factory());
    var tmp_17 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_18 = typeToken(createKType(getKClass(UstadMobileSystemImpl), arrayOf([]), false));
    var tmp$ret$20 = isInterface(tmp_18, TypeToken) ? tmp_18 : THROW_CCE();
    tmp_17.yp1_1 = Instance(this, tmp$ret$20, null).n5c(this, systemImpl$factory());
    var tmp_19 = this;
    tmp_19.zp1_1 = lazy_0(UstadViewModel$onClickLinkUseCase$delegate$lambda(this));
    var tmp_20 = this;
    var tmp0_safe_receiver = this.lp1_1.ba('collectedTs');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_20.ap2_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    if (this.ap2_1.equals(new Long(0, 0))) {
      _set_lastNavResultTimestampCollected__txfbew(this, systemTimeInMillis());
    }
  }
  protoOf(UstadViewModel).n56 = function () {
    return this.kp1_1;
  };
  protoOf(UstadViewModel).bp2 = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.rp1_1;
    accountManager$factory_0();
    return this_0.t2();
  };
  protoOf(UstadViewModel).cp2 = function () {
    return get_viewModelScope(this);
  };
  protoOf(UstadViewModel).dp2 = function () {
    return this.bp2().emx().kmk_1.f95_1;
  };
  protoOf(UstadViewModel).ep2 = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.sp1_1;
    activeDb$factory_0();
    return this_0.t2();
  };
  protoOf(UstadViewModel).fp2 = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.tp1_1;
    activeRepo$factory_0();
    return this_0.t2();
  };
  protoOf(UstadViewModel).gp2 = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.up1_1;
    navResultReturner$factory_0();
    return this_0.t2();
  };
  protoOf(UstadViewModel).z4q = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.vp1_1;
    json$factory_2();
    return this_0.t2();
  };
  protoOf(UstadViewModel).hp2 = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.wp1_1;
    snackDispatcher$factory_0();
    return this_0.t2();
  };
  protoOf(UstadViewModel).ip2 = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.xp1_1;
    resultReturner$factory_0();
    return this_0.t2();
  };
  protoOf(UstadViewModel).jp2 = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.yp1_1;
    systemImpl$factory_0();
    return this_0.t2();
  };
  protoOf(UstadViewModel).kp2 = function () {
    var popUpToViewName = this.lp1_1.ba('result_viewname');
    var saveToKey = this.lp1_1.ba('result_key');
    var tmp;
    if (!(popUpToViewName == null) ? !(saveToKey == null) : false) {
      tmp = new NavResultDest(popUpToViewName, saveToKey);
    } else {
      tmp = null;
    }
    return tmp;
  };
  protoOf(UstadViewModel).lp2 = function (value) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.pp1_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.UstadViewModel.<set-loadingState>.<anonymous>' call
        var nextValue = prevValue.nol(VOID, value);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(UstadViewModel).mp2 = function () {
    return this.pp1_1.t2().zok_1;
  };
  protoOf(UstadViewModel).np2 = function (_this__u8e3s4, key) {
    // Inline function 'kotlinx.coroutines.flow.filter' call
    // Inline function 'kotlinx.coroutines.flow.unsafeTransform' call
    var this_0 = _this__u8e3s4.too(key);
    // Inline function 'kotlinx.coroutines.flow.internal.unsafeFlow' call
    return new _no_name_provided__qut3iv_2(this_0, this);
  };
  protoOf(UstadViewModel).op2 = function (_this__u8e3s4, key, deserializer, $completion) {
    var tmp = new $getJsonCOROUTINE$49(this, _this__u8e3s4, key, deserializer, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadViewModel).pp2 = function (_this__u8e3s4, key, serializer, value, $completion) {
    var tmp = new $setJsonCOROUTINE$50(this, _this__u8e3s4, key, serializer, value, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadViewModel).xp8 = function (_this__u8e3s4, viewUri, goOptions) {
    var viewName = substringBefore_0(viewUri, '?');
    var tmp;
    if (contains(viewUri, '?')) {
      tmp = UMFileUtil_getInstance().parseURLQueryString(viewUri);
    } else {
      // Inline function 'kotlin.collections.mapOf' call
      tmp = emptyMap();
    }
    var args = tmp;
    _this__u8e3s4.eoo(viewName, args, goOptions);
  };
  protoOf(UstadViewModel).up7 = function (result) {
    var resultDest = this.kp2();
    if (!(resultDest == null)) {
      this.gp2().uoo(new NavResult(resultDest.soo_1, systemTimeInMillis(), result));
      this.np1_1.foo(resultDest.roo_1, false);
    } else {
      Companion_getInstance_102();
      this.np1_1.foo('', true);
    }
  };
  protoOf(UstadViewModel).qp2 = function (nextViewName, key, currentValue, serializer, args, goOptions, overwriteDestination) {
    var navArgs = toMutableMap(args);
    // Inline function 'kotlin.takeIf' call
    // Inline function 'kotlin.contracts.contract' call
    var tmp;
    // Inline function 'com.ustadmobile.core.viewmodel.UstadViewModel.navigateForResult.<anonymous>' call
    if (!overwriteDestination) {
      tmp = navArgs;
    } else {
      tmp = null;
    }
    var tmp0_safe_receiver = tmp;
    if (tmp0_safe_receiver == null)
      null;
    else {
      this.wp2(tmp0_safe_receiver, 'result_key');
    }
    if (!navArgs.r('result_key') ? true : overwriteDestination) {
      // Inline function 'kotlin.collections.set' call
      var key_0 = 'result_key';
      navArgs.s(key_0, key);
    }
    // Inline function 'kotlin.takeIf' call
    // Inline function 'kotlin.contracts.contract' call
    var tmp_0;
    // Inline function 'com.ustadmobile.core.viewmodel.UstadViewModel.navigateForResult.<anonymous>' call
    if (!overwriteDestination) {
      tmp_0 = navArgs;
    } else {
      tmp_0 = null;
    }
    var tmp1_safe_receiver = tmp_0;
    if (tmp1_safe_receiver == null)
      null;
    else {
      this.wp2(tmp1_safe_receiver, 'result_viewname');
    }
    if (!navArgs.r('result_viewname') ? true : overwriteDestination) {
      // Inline function 'kotlin.collections.set' call
      var key_1 = 'result_viewname';
      var value = this.mp1_1;
      navArgs.s(key_1, value);
    }
    if (!(currentValue == null)) {
      // Inline function 'kotlin.collections.set' call
      Companion_getInstance_101();
      var value_0 = this.z4q().e45(serializer, currentValue);
      navArgs.s('entity', value_0);
    }
    this.np1_1.eoo(nextViewName, toMap_0(navArgs), goOptions);
  };
  protoOf(UstadViewModel).rp2 = function (nextViewName, key, currentValue, serializer, args, goOptions, overwriteDestination, $super) {
    args = args === VOID ? emptyMap() : args;
    goOptions = goOptions === VOID ? Companion_getInstance_83().doj_1 : goOptions;
    var tmp;
    if (overwriteDestination === VOID) {
      tmp = this instanceof UstadEditViewModel;
    } else {
      tmp = overwriteDestination;
    }
    overwriteDestination = tmp;
    var tmp_0;
    if ($super === VOID) {
      this.qp2(nextViewName, key, currentValue, serializer, args, goOptions, overwriteDestination);
      tmp_0 = Unit_instance;
    } else {
      tmp_0 = $super.qp2.call(this, nextViewName, key, currentValue, serializer, args, goOptions, overwriteDestination);
    }
    return tmp_0;
  };
  protoOf(UstadViewModel).sp2 = function (serializer, loadFromStateKeys, savedStateKey, onLoadFromDb, makeDefault, uiUpdate, $completion) {
    var tmp = new $loadEntityCOROUTINE$51(this, serializer, loadFromStateKeys, savedStateKey, onLoadFromDb, makeDefault, uiUpdate, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(UstadViewModel).tp2 = function (serializer, loadFromStateKeys, savedStateKey, onLoadFromDb, makeDefault, uiUpdate, $completion, $super) {
    var tmp;
    if (loadFromStateKeys === VOID) {
      Companion_getInstance_101();
      tmp = listOf(['entityState', 'entity']);
    } else {
      tmp = loadFromStateKeys;
    }
    loadFromStateKeys = tmp;
    savedStateKey = savedStateKey === VOID ? first_0(loadFromStateKeys) : savedStateKey;
    return $super === VOID ? this.sp2(serializer, loadFromStateKeys, savedStateKey, onLoadFromDb, makeDefault, uiUpdate, $completion) : $super.sp2.call(this, serializer, loadFromStateKeys, savedStateKey, onLoadFromDb, makeDefault, uiUpdate, $completion);
  };
  protoOf(UstadViewModel).up2 = function (permissionCheck, setLoadingState, onSetFieldsEnabled, block) {
    if (setLoadingState) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this.pp1_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.UstadViewModel.launchIfHasPermission.<anonymous>' call
          var nextValue = prevValue.nol(VOID, Companion_getInstance_85().uol_1);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    }
    if (onSetFieldsEnabled == null)
      null;
    else
      onSetFieldsEnabled(false);
    var tmp = this.cp2();
    launch(tmp, VOID, VOID, UstadViewModel$launchIfHasPermission$slambda_0(this, permissionCheck, block, onSetFieldsEnabled, null));
  };
  protoOf(UstadViewModel).vp2 = function (permissionCheck, setLoadingState, onSetFieldsEnabled, block, $super) {
    setLoadingState = setLoadingState === VOID ? false : setLoadingState;
    onSetFieldsEnabled = onSetFieldsEnabled === VOID ? null : onSetFieldsEnabled;
    var tmp;
    if ($super === VOID) {
      this.up2(permissionCheck, setLoadingState, onSetFieldsEnabled, block);
      tmp = Unit_instance;
    } else {
      tmp = $super.up2.call(this, permissionCheck, setLoadingState, onSetFieldsEnabled, block);
    }
    return tmp;
  };
  protoOf(UstadViewModel).wp2 = function (_this__u8e3s4, key) {
    putFromSavedStateIfPresent(_this__u8e3s4, this.lp1_1, key);
  };
  protoOf(UstadViewModel).xp2 = function (_this__u8e3s4, keys) {
    // Inline function 'kotlin.collections.forEach' call
    var tmp0_iterator = keys.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.viewmodel.UstadViewModel.putFromSavedStateIfPresent.<anonymous>' call
      this.wp2(_this__u8e3s4, element);
    }
  };
  protoOf(UstadViewModel).yp8 = function (onSetFieldsEnabled, block) {
    var tmp = this.cp2();
    launch(tmp, VOID, VOID, UstadViewModel$launchWithLoadingIndicator$slambda_0(onSetFieldsEnabled, this, block, null));
  };
  protoOf(UstadViewModel).yp2 = function (requireAdultAccount, args, block) {
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp = typeToken(createKType(getKClass(ApiUrlConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp, TypeToken) ? tmp : THROW_CCE();
    var apiUrlConfig$delegate = Instance(this, tmp$ret$0, null).n5c(null, getLocalDelegateReference('apiUrlConfig', KProperty0, false, function () {
      return THROW_ISE();
    }));
    // Inline function 'kotlin.let' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.UstadViewModel.ifLoggedInElseNavigateToLoginWithNextDestSet.<anonymous>' call
    var it = this.bp2().emx().kmk_1;
    if (isGuestUser(it) ? true : requireAdultAccount ? !isDateOfBirthAnAdult(Companion_getInstance_6().zla(it.n95_1)) : false) {
      var tmp_0 = this.mp1_1 + '?' + toQueryString(args);
      var tmp_1 = this.bp2();
      var tmp_2 = UstadViewModel$ifLoggedInElseNavigateToLoginWithNextDestSet$lambda;
      navigateToLink(this.np1_1, tmp_0, tmp_1, new sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0(tmp_2), new UstadGoOptions(this.mp1_1, true), VOID, ifLoggedInElseNavigateToLoginWithNextDestSet$lambda(apiUrlConfig$delegate).tmx_1);
    } else {
      block();
    }
  };
  protoOf(UstadViewModel).zp2 = function (requireAdultAccount, args, block, $super) {
    requireAdultAccount = requireAdultAccount === VOID ? false : requireAdultAccount;
    var tmp;
    if ($super === VOID) {
      this.yp2(requireAdultAccount, args, block);
      tmp = Unit_instance;
    } else {
      tmp = $super.yp2.call(this, requireAdultAccount, args, block);
    }
    return tmp;
  };
  protoOf(UstadViewModel).ap3 = function (contentEntryUid, clazzUid, cbUid) {
    var registrationUuid = uuid4();
    var activityId = this.bp2().xmx().umj_1 + 'ns/xapi/contentEntry/' + contentEntryUid.toString();
    // Inline function 'org.kodein.di.instance' call
    var tmp = get_direct(this.n56()).s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(XXStringHasher), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var xxStringHasher = tmp.q57(tmp$ret$0, null);
    var tmp_1 = get_doorPrimaryKeyManager(this.ep2());
    var tmp1_xseUid = tmp_1.a62(400122);
    var tmp2_xseAccountPersonUid = this.dp2();
    var tmp0_elvis_lhs = this.bp2().emx().kmk_1.g95_1;
    var tmp3_xseAccountUsername = tmp0_elvis_lhs == null ? 'anonymous' : tmp0_elvis_lhs;
    var tmp4_xseRootActivityUid = xxStringHasher.vod(activityId);
    var tmp5_xseRegistrationHi = registrationUuid.pl7();
    var tmp6_xseRegistrationLo = registrationUuid.ql7();
    return new XapiSessionEntity(tmp1_xseUid, VOID, tmp5_xseRegistrationHi, tmp6_xseRegistrationLo, VOID, tmp2_xseAccountPersonUid, VOID, tmp3_xseAccountUsername, clazzUid, cbUid, contentEntryUid, VOID, activityId, tmp4_xseRootActivityUid);
  };
  protoOf(UstadViewModel).bp3 = function (contentEntryUid, clazzUid, cbUid, $super) {
    contentEntryUid = contentEntryUid === VOID ? new Long(0, 0) : contentEntryUid;
    var tmp;
    if (clazzUid === VOID) {
      var tmp0_safe_receiver = this.lp1_1.ba('clazzUid');
      var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
      tmp = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    } else {
      tmp = clazzUid;
    }
    clazzUid = tmp;
    var tmp_0;
    if (cbUid === VOID) {
      var tmp2_safe_receiver = this.lp1_1.ba('courseBlockUid');
      var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : toLong_0(tmp2_safe_receiver);
      tmp_0 = tmp3_elvis_lhs == null ? new Long(0, 0) : tmp3_elvis_lhs;
    } else {
      tmp_0 = cbUid;
    }
    cbUid = tmp_0;
    return $super === VOID ? this.ap3(contentEntryUid, clazzUid, cbUid) : $super.ap3.call(this, contentEntryUid, clazzUid, cbUid);
  };
  function accountManager$factory() {
    return getPropertyCallableRef('accountManager', 1, KProperty1, function (receiver) {
      return receiver.bp2();
    }, null);
  }
  function activeDb$factory() {
    return getPropertyCallableRef('activeDb', 1, KProperty1, function (receiver) {
      return receiver.ep2();
    }, null);
  }
  function activeRepo$factory() {
    return getPropertyCallableRef('activeRepo', 1, KProperty1, function (receiver) {
      return receiver.fp2();
    }, null);
  }
  function navResultReturner$factory() {
    return getPropertyCallableRef('navResultReturner', 1, KProperty1, function (receiver) {
      return receiver.gp2();
    }, null);
  }
  function json$factory_1() {
    return getPropertyCallableRef('json', 1, KProperty1, function (receiver) {
      return receiver.z4q();
    }, null);
  }
  function snackDispatcher$factory() {
    return getPropertyCallableRef('snackDispatcher', 1, KProperty1, function (receiver) {
      return receiver.hp2();
    }, null);
  }
  function resultReturner$factory() {
    return getPropertyCallableRef('resultReturner', 1, KProperty1, function (receiver) {
      return receiver.ip2();
    }, null);
  }
  function systemImpl$factory() {
    return getPropertyCallableRef('systemImpl', 1, KProperty1, function (receiver) {
      return receiver.jp2();
    }, null);
  }
  function accountManager$factory_0() {
    return getPropertyCallableRef('accountManager', 1, KProperty1, function (receiver) {
      return receiver.bp2();
    }, null);
  }
  function activeDb$factory_0() {
    return getPropertyCallableRef('activeDb', 1, KProperty1, function (receiver) {
      return receiver.ep2();
    }, null);
  }
  function activeRepo$factory_0() {
    return getPropertyCallableRef('activeRepo', 1, KProperty1, function (receiver) {
      return receiver.fp2();
    }, null);
  }
  function navResultReturner$factory_0() {
    return getPropertyCallableRef('navResultReturner', 1, KProperty1, function (receiver) {
      return receiver.gp2();
    }, null);
  }
  function json$factory_2() {
    return getPropertyCallableRef('json', 1, KProperty1, function (receiver) {
      return receiver.z4q();
    }, null);
  }
  function snackDispatcher$factory_0() {
    return getPropertyCallableRef('snackDispatcher', 1, KProperty1, function (receiver) {
      return receiver.hp2();
    }, null);
  }
  function resultReturner$factory_0() {
    return getPropertyCallableRef('resultReturner', 1, KProperty1, function (receiver) {
      return receiver.ip2();
    }, null);
  }
  function systemImpl$factory_0() {
    return getPropertyCallableRef('systemImpl', 1, KProperty1, function (receiver) {
      return receiver.jp2();
    }, null);
  }
  function Companion_96() {
    this.ipi_1 = 'OpenLicenses';
  }
  var Companion_instance_144;
  function Companion_getInstance_113() {
    return Companion_instance_144;
  }
  function OpenLicensesViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'EpubContent');
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.pp1_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.about.OpenLicensesViewModel.<anonymous>' call
        var tmp0_title = this.jp2().en6(strings_getInstance().kmf_1);
        var nextValue = prevValue.nol(VOID, VOID, tmp0_title, false, true, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  }
  function AccountListViewModel$slambda$slambda(this$0, resultContinuation) {
    this.rpi_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AccountListViewModel$slambda$slambda).vmn = function (it, $completion) {
    var tmp = this.wmn(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AccountListViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.vmn(p1 instanceof UserSessionWithPersonAndEndpoint ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AccountListViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.rpi_1.upj_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.hpk(this.spi_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(AccountListViewModel$slambda$slambda).wmn = function (it, completion) {
    var i = new AccountListViewModel$slambda$slambda(this.rpi_1, completion);
    i.spi_1 = it;
    return i;
  };
  function AccountListViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new AccountListViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.vmn(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AccountListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.qpk_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AccountListViewModel$slambda$slambda$slambda).spk = function (accountList, $completion) {
    var tmp = this.tpk(accountList, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AccountListViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.spk((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AccountListViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var currentUserSessionUid = this.qpk_1.bp2().emx().jmk_1.rhv_1;
          var this_0 = this.rpk_1;
          var destination = ArrayList_init_$Create$();
          var tmp0_iterator = this_0.w();
          while (tmp0_iterator.f()) {
            var element = tmp0_iterator.e();
            var isFilteredOutActiveAccount = this.qpk_1.qpj_1 === 'header' ? element.jmk_1.rhv_1.equals(currentUserSessionUid) : false;
            var isFilteredOutByEndpoint = !(this.qpk_1.ppj_1 == null) ? !(element.lmk_1.umj_1 === this.qpk_1.ppj_1) : false;
            var isFilteredOutByDateOfBirth = this.qpk_1.rpj_1.c7(new Long(0, 0)) > 0 ? element.kmk_1.n95_1.c7(this.qpk_1.rpj_1) > 0 : false;
            if (!(((isFilteredOutActiveAccount ? true : isFilteredOutByEndpoint) ? true : isFilteredOutByDateOfBirth) ? true : isTemporary(element.jmk_1))) {
              destination.i1(element);
            }
          }
          var accountsToDisplay = destination;
          l$ret$1: do {
            var this_1 = this.qpk_1.upj_1;
            while (true) {
              var prevValue = this_1.t2();
              var nextValue = prevValue.hpk(VOID, accountsToDisplay);
              if (this_1.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(AccountListViewModel$slambda$slambda$slambda).tpk = function (accountList, completion) {
    var i = new AccountListViewModel$slambda$slambda$slambda(this.qpk_1, completion);
    i.rpk_1 = accountList;
    return i;
  };
  function AccountListViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new AccountListViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (accountList, $completion) {
      return i.spk(accountList, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AccountListViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.cpl_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AccountListViewModel$slambda$slambda_1).m86 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AccountListViewModel$slambda$slambda_1).z77 = function ($completion) {
    return this.m86($completion);
  };
  protoOf(AccountListViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.cpl_1.bp2().wmx();
            var tmp_1 = AccountListViewModel$slambda$slambda$slambda_0(this.cpl_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_5(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(AccountListViewModel$slambda$slambda_1).y77 = function (completion) {
    return new AccountListViewModel$slambda$slambda_1(this.cpl_1, completion);
  };
  function AccountListViewModel$slambda$slambda_2(this$0, resultContinuation) {
    var i = new AccountListViewModel$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($completion) {
      return i.m86($completion);
    };
    l.$arity = 0;
    return l;
  }
  function AccountListViewModel$onClickLogout$slambda$lambda(_anonymous_parameter_0__qggqh8, _anonymous_parameter_1__qggqgd) {
    return Unit_instance;
  }
  function _get_apiUrlConfig__mldllg_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.spj_1;
    apiUrlConfig$factory_2();
    return this_0.t2();
  }
  function _get_shareAppUseCase__louoas($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.tpj_1;
    shareAppUseCase$factory_0();
    return this_0.t2();
  }
  function _get_getVersionUseCase__n7x57g($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.wpj_1;
    getVersionUseCase$factory_0();
    return this_0.t2();
  }
  function _get_launchOpenLicensesUseCase__f5qz1z($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.xpj_1;
    launchOpenLicensesUseCase$factory_0();
    return this_0.t2();
  }
  function _get_getShowPoweredByUseCase__5l0p0e($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.ypj_1;
    getShowPoweredByUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_97() {
    this.dpl_1 = 'AccountList';
    this.epl_1 = 'filterByEndpoint';
    this.fpl_1 = 'activeAccountMode';
    this.gpl_1 = 'header';
    this.hpl_1 = 'inlist';
  }
  var Companion_instance_145;
  function Companion_getInstance_114() {
    return Companion_instance_145;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_5(function_0) {
    this.ipl_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_5).t1d = function (value, $completion) {
    return this.ipl_1(value, $completion);
  };
  function sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0_0(function_0) {
    this.jpl_1 = function_0;
  }
  protoOf(sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0_0).eo0 = function (url, target) {
    return this.jpl_1(url, target);
  };
  function AccountListViewModel$slambda(this$0, resultContinuation) {
    this.spl_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AccountListViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AccountListViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AccountListViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.spl_1.bp2().umx();
            var tmp_1 = AccountListViewModel$slambda$slambda_0(this.spl_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_5(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(AccountListViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new AccountListViewModel$slambda(this.spl_1, completion);
    i.tpl_1 = $this$launch;
    return i;
  };
  function AccountListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new AccountListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AccountListViewModel$slambda_1(this$0, resultContinuation) {
    this.cpm_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AccountListViewModel$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AccountListViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AccountListViewModel$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.cpm_1.upj_1, AccountListViewModel$slambda$slambda_2(this.cpm_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(AccountListViewModel$slambda_1).v1m = function ($this$launch, completion) {
    var i = new AccountListViewModel$slambda_1(this.cpm_1, completion);
    i.dpm_1 = $this$launch;
    return i;
  };
  function AccountListViewModel$slambda_2(this$0, resultContinuation) {
    var i = new AccountListViewModel$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AccountListViewModel$onClickLogout$slambda(this$0, $currentSession, resultContinuation) {
    this.mpm_1 = this$0;
    this.npm_1 = $currentSession;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AccountListViewModel$onClickLogout$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AccountListViewModel$onClickLogout$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AccountListViewModel$onClickLogout$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.mpm_1.bp2().cmy(this.npm_1, VOID, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp0_$receiver = this.mpm_1.np1_1;
            Companion_getInstance_122();
            var tmp1_link = 'CourseListHome';
            var tmp2_accountManager = this.mpm_1.bp2();
            var tmp_0 = AccountListViewModel$onClickLogout$slambda$lambda;
            var tmp3_openExternalLinkUseCase = new sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0_0(tmp_0);
            var tmp4_userCanSelectServer = _get_apiUrlConfig__mldllg_0(this.mpm_1).tmx_1;
            var tmp5_goOptions = new UstadGoOptions(VOID, VOID, true);
            navigateToLink(tmp0_$receiver, tmp1_link, tmp2_accountManager, tmp3_openExternalLinkUseCase, tmp5_goOptions, VOID, tmp4_userCanSelectServer);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(AccountListViewModel$onClickLogout$slambda).v1m = function ($this$launch, completion) {
    var i = new AccountListViewModel$onClickLogout$slambda(this.mpm_1, this.npm_1, completion);
    i.opm_1 = $this$launch;
    return i;
  };
  function AccountListViewModel$onClickLogout$slambda_0(this$0, $currentSession, resultContinuation) {
    var i = new AccountListViewModel$onClickLogout$slambda(this$0, $currentSession, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AccountListViewModel$onClickDeleteAccount$slambda(this$0, $session, resultContinuation) {
    this.xpm_1 = this$0;
    this.ypm_1 = $session;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AccountListViewModel$onClickDeleteAccount$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AccountListViewModel$onClickDeleteAccount$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AccountListViewModel$onClickDeleteAccount$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.xpm_1.bp2().cmy(this.ypm_1, VOID, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(AccountListViewModel$onClickDeleteAccount$slambda).v1m = function ($this$launch, completion) {
    var i = new AccountListViewModel$onClickDeleteAccount$slambda(this.xpm_1, this.ypm_1, completion);
    i.zpm_1 = $this$launch;
    return i;
  };
  function AccountListViewModel$onClickDeleteAccount$slambda_0(this$0, $session, resultContinuation) {
    var i = new AccountListViewModel$onClickDeleteAccount$slambda(this$0, $session, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AccountListViewModel$onClickOpenLicenses$slambda($launchUseCaseVal, resultContinuation) {
    this.ipn_1 = $launchUseCaseVal;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(AccountListViewModel$onClickOpenLicenses$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(AccountListViewModel$onClickOpenLicenses$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(AccountListViewModel$onClickOpenLicenses$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.ipn_1.m86(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(AccountListViewModel$onClickOpenLicenses$slambda).v1m = function ($this$launch, completion) {
    var i = new AccountListViewModel$onClickOpenLicenses$slambda(this.ipn_1, completion);
    i.jpn_1 = $this$launch;
    return i;
  };
  function AccountListViewModel$onClickOpenLicenses$slambda_0($launchUseCaseVal, resultContinuation) {
    var i = new AccountListViewModel$onClickOpenLicenses$slambda($launchUseCaseVal, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function AccountListViewModel(di, savedStateHandle, startUserSessionUseCase) {
    var tmp;
    if (startUserSessionUseCase === VOID) {
      // Inline function 'org.kodein.di.instance' call
      var tmp_0 = get_direct(di).s57();
      // Inline function 'org.kodein.type.generic' call
      var tmp_1 = typeToken(createKType(getKClass(UstadAccountManager), arrayOf([]), false));
      var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
      var tmp$ret$1 = tmp_0.q57(tmp$ret$0, null);
      tmp = new StartUserSessionUseCase(tmp$ret$1);
    } else {
      tmp = startUserSessionUseCase;
    }
    startUserSessionUseCase = tmp;
    UstadViewModel.call(this, di, savedStateHandle, 'AccountList');
    this.opj_1 = startUserSessionUseCase;
    this.ppj_1 = savedStateHandle.ba('filterByEndpoint');
    var tmp_2 = this;
    var tmp0_elvis_lhs = savedStateHandle.ba('activeAccountMode');
    tmp_2.qpj_1 = tmp0_elvis_lhs == null ? 'header' : tmp0_elvis_lhs;
    var tmp_3 = this;
    Companion_getInstance_102();
    var tmp0_safe_receiver = savedStateHandle.ba('maxDob');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_3.rpj_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_4 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_5 = typeToken(createKType(getKClass(ApiUrlConfig), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE();
    tmp_4.spj_1 = Instance(this, tmp$ret$2, null).n5c(this, apiUrlConfig$factory_1());
    var tmp_6 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_7 = typeToken(createKType(getKClass(ShareAppUseCase), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    tmp_6.tpj_1 = InstanceOrNull(this, tmp$ret$4, null).n5c(this, shareAppUseCase$factory());
    this.upj_1 = MutableStateFlow(new AccountListUiState(VOID, VOID, _get_apiUrlConfig__mldllg_0(this).tmx_1, VOID, VOID, !(_get_shareAppUseCase__louoas(this) == null)));
    this.vpj_1 = asStateFlow(this.upj_1);
    var tmp_8 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_9 = typeToken(createKType(getKClass(GetVersionUseCase), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE();
    tmp_8.wpj_1 = InstanceOrNull(this, tmp$ret$6, null).n5c(this, getVersionUseCase$factory());
    var tmp_10 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_11 = typeToken(createKType(getKClass(LaunchOpenLicensesUseCase), arrayOf([]), false));
    var tmp$ret$8 = isInterface(tmp_11, TypeToken) ? tmp_11 : THROW_CCE();
    tmp_10.xpj_1 = InstanceOrNull(this, tmp$ret$8, null).n5c(this, launchOpenLicensesUseCase$factory());
    var tmp_12 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_13 = typeToken(createKType(getKClass(GetShowPoweredByUseCase), arrayOf([]), false));
    var tmp$ret$10 = isInterface(tmp_13, TypeToken) ? tmp_13 : THROW_CCE();
    tmp_12.ypj_1 = InstanceOrNull(this, tmp$ret$10, null).n5c(this, getShowPoweredByUseCase$factory());
    var tmp_14 = this;
    Companion_getInstance_112();
    var tmp0_safe_receiver_0 = savedStateHandle.ba('noSessionChange');
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : toBoolean(tmp0_safe_receiver_0);
    tmp_14.zpj_1 = tmp1_elvis_lhs_0 == null ? false : tmp1_elvis_lhs_0;
    var tmp_15;
    if (savedStateHandle.ba('listMode') === ListViewMode_PICKER_getInstance().ooy_1) {
      tmp_15 = this.jp2().en6(strings_getInstance().im3_1);
    } else {
      tmp_15 = this.jp2().en6(strings_getInstance().glf_1);
    }
    var tmp0_title = tmp_15;
    this.pp1_1.x1k(new AppUiState(VOID, VOID, tmp0_title, false, VOID, VOID, false));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.upj_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.accountlist.AccountListViewModel.<anonymous>' call
        var tmp0_safe_receiver_1 = _get_getVersionUseCase__n7x57g(this);
        var tmp1_safe_receiver = tmp0_safe_receiver_1 == null ? null : tmp0_safe_receiver_1.lnz();
        var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.jnz_1;
        var tmp_16 = tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs;
        var tmp3_safe_receiver = _get_getShowPoweredByUseCase__5l0p0e(this);
        var tmp4_elvis_lhs = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.lnz();
        var nextValue = prevValue.hpk(VOID, VOID, VOID, tmp_16, tmp4_elvis_lhs == null ? false : tmp4_elvis_lhs);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'kotlin.takeIf' call
    var this_1 = this.cp2();
    // Inline function 'kotlin.contracts.contract' call
    var tmp_17;
    // Inline function 'com.ustadmobile.core.viewmodel.accountlist.AccountListViewModel.<anonymous>' call
    if (this.qpj_1 === 'header') {
      tmp_17 = this_1;
    } else {
      tmp_17 = null;
    }
    var tmp1_safe_receiver_0 = tmp_17;
    if (tmp1_safe_receiver_0 == null)
      null;
    else {
      launch(tmp1_safe_receiver_0, VOID, VOID, AccountListViewModel$slambda_0(this, null));
    }
    var tmp_18 = this.cp2();
    launch(tmp_18, VOID, VOID, AccountListViewModel$slambda_2(this, null));
  }
  protoOf(AccountListViewModel).kpn = function () {
    var tmp0_elvis_lhs = this.upj_1.t2().apk_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var currentSession = tmp;
    var tmp_0 = this.cp2();
    launch(tmp_0, VOID, VOID, AccountListViewModel$onClickLogout$slambda_0(this, currentSession, null));
  };
  protoOf(AccountListViewModel).lpn = function () {
    var tmp0_safe_receiver = this.upj_1.t2().apk_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.kmk_1;
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.f95_1;
    var tmp;
    if (tmp2_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp2_elvis_lhs;
    }
    var personUid = tmp;
    Companion_getInstance_112();
    this.np1_1.sns('PersonDetailView', mapOf_0(to('entityUid', personUid.toString())));
  };
  protoOf(AccountListViewModel).mpn = function () {
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.accountlist.AccountListViewModel.onClickAddAccount.<anonymous>' call
    if (!(this.ppj_1 == null)) {
      Companion_getInstance_112();
      this_0.s('serverUrl', this.ppj_1);
    }
    Companion_getInstance_112();
    Companion_getInstance_112();
    this.xp2(this_0, listOf(['next', 'noSessionChange']));
    Companion_getInstance_112();
    Companion_getInstance_112();
    var tmp0_elvis_lhs = this.lp1_1.ba('maxDob');
    this_0.s('maxDob', tmp0_elvis_lhs == null ? '0' : tmp0_elvis_lhs);
    var args = this_0.f3();
    if (!(this.ppj_1 == null) ? true : !_get_apiUrlConfig__mldllg_0(this).tmx_1) {
      this.np1_1.sns('Login', args);
    } else {
      Companion_getInstance_190();
      this.np1_1.sns('SiteEnterLink', args);
    }
  };
  protoOf(AccountListViewModel).npn = function (sessionWithPersonAndEndpoint) {
    var tmp1_$this = this.opj_1;
    var tmp2_navController = this.np1_1;
    Companion_getInstance_112();
    var tmp0_elvis_lhs = this.lp1_1.ba('next');
    var tmp;
    if (tmp0_elvis_lhs == null) {
      Companion_getInstance_122();
      tmp = 'CourseListHome';
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var tmp3_nextDest = tmp;
    var tmp4_dontSetCurrentSession = this.zpj_1;
    tmp1_$this.yo4(sessionWithPersonAndEndpoint, tmp3_nextDest, tmp2_navController, VOID, tmp4_dontSetCurrentSession);
  };
  protoOf(AccountListViewModel).opn = function (session) {
    var tmp = this.cp2();
    launch(tmp, VOID, VOID, AccountListViewModel$onClickDeleteAccount$slambda_0(this, session, null));
  };
  protoOf(AccountListViewModel).ppn = function () {
    var launchUseCaseVal = _get_launchOpenLicensesUseCase__f5qz1z(this);
    if (!(launchUseCaseVal == null)) {
      var tmp = this.cp2();
      launch(tmp, VOID, VOID, AccountListViewModel$onClickOpenLicenses$slambda_0(launchUseCaseVal, null));
    } else {
      this.np1_1.sns('OpenLicenses', emptyMap());
    }
  };
  function AccountListUiState(headerAccount, accountsList, showAccountEndpoint, version, showPoweredBy, shareAppOptionVisible, shareAppBottomSheetVisible) {
    headerAccount = headerAccount === VOID ? null : headerAccount;
    accountsList = accountsList === VOID ? emptyList() : accountsList;
    showAccountEndpoint = showAccountEndpoint === VOID ? false : showAccountEndpoint;
    version = version === VOID ? '' : version;
    showPoweredBy = showPoweredBy === VOID ? false : showPoweredBy;
    shareAppOptionVisible = shareAppOptionVisible === VOID ? false : shareAppOptionVisible;
    shareAppBottomSheetVisible = shareAppBottomSheetVisible === VOID ? false : shareAppBottomSheetVisible;
    this.apk_1 = headerAccount;
    this.bpk_1 = accountsList;
    this.cpk_1 = showAccountEndpoint;
    this.dpk_1 = version;
    this.epk_1 = showPoweredBy;
    this.fpk_1 = shareAppOptionVisible;
    this.gpk_1 = shareAppBottomSheetVisible;
  }
  protoOf(AccountListUiState).qpn = function () {
    return !(this.apk_1 == null) ? !this.apk_1.kmk_1.f95_1.equals(new Long(0, 0)) : false;
  };
  protoOf(AccountListUiState).rpn = function () {
    return !(this.apk_1 == null) ? !isGuestUser(this.apk_1.kmk_1) : false;
  };
  protoOf(AccountListUiState).spn = function (headerAccount, accountsList, showAccountEndpoint, version, showPoweredBy, shareAppOptionVisible, shareAppBottomSheetVisible) {
    return new AccountListUiState(headerAccount, accountsList, showAccountEndpoint, version, showPoweredBy, shareAppOptionVisible, shareAppBottomSheetVisible);
  };
  protoOf(AccountListUiState).hpk = function (headerAccount, accountsList, showAccountEndpoint, version, showPoweredBy, shareAppOptionVisible, shareAppBottomSheetVisible, $super) {
    headerAccount = headerAccount === VOID ? this.apk_1 : headerAccount;
    accountsList = accountsList === VOID ? this.bpk_1 : accountsList;
    showAccountEndpoint = showAccountEndpoint === VOID ? this.cpk_1 : showAccountEndpoint;
    version = version === VOID ? this.dpk_1 : version;
    showPoweredBy = showPoweredBy === VOID ? this.epk_1 : showPoweredBy;
    shareAppOptionVisible = shareAppOptionVisible === VOID ? this.fpk_1 : shareAppOptionVisible;
    shareAppBottomSheetVisible = shareAppBottomSheetVisible === VOID ? this.gpk_1 : shareAppBottomSheetVisible;
    return $super === VOID ? this.spn(headerAccount, accountsList, showAccountEndpoint, version, showPoweredBy, shareAppOptionVisible, shareAppBottomSheetVisible) : $super.spn.call(this, headerAccount, accountsList, showAccountEndpoint, version, showPoweredBy, shareAppOptionVisible, shareAppBottomSheetVisible);
  };
  protoOf(AccountListUiState).toString = function () {
    return 'AccountListUiState(headerAccount=' + this.apk_1 + ', accountsList=' + this.bpk_1 + ', showAccountEndpoint=' + this.cpk_1 + ', version=' + this.dpk_1 + ', showPoweredBy=' + this.epk_1 + ', shareAppOptionVisible=' + this.fpk_1 + ', shareAppBottomSheetVisible=' + this.gpk_1 + ')';
  };
  protoOf(AccountListUiState).hashCode = function () {
    var result = this.apk_1 == null ? 0 : this.apk_1.hashCode();
    result = imul(result, 31) + hashCode(this.bpk_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.cpk_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.dpk_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.epk_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fpk_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.gpk_1) | 0;
    return result;
  };
  protoOf(AccountListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof AccountListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof AccountListUiState ? other : THROW_CCE();
    if (!equals(this.apk_1, tmp0_other_with_cast.apk_1))
      return false;
    if (!equals(this.bpk_1, tmp0_other_with_cast.bpk_1))
      return false;
    if (!(this.cpk_1 === tmp0_other_with_cast.cpk_1))
      return false;
    if (!(this.dpk_1 === tmp0_other_with_cast.dpk_1))
      return false;
    if (!(this.epk_1 === tmp0_other_with_cast.epk_1))
      return false;
    if (!(this.fpk_1 === tmp0_other_with_cast.fpk_1))
      return false;
    if (!(this.gpk_1 === tmp0_other_with_cast.gpk_1))
      return false;
    return true;
  };
  function apiUrlConfig$factory_1() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_0(receiver);
    }, null);
  }
  function shareAppUseCase$factory() {
    return getPropertyCallableRef('shareAppUseCase', 1, KProperty1, function (receiver) {
      return _get_shareAppUseCase__louoas(receiver);
    }, null);
  }
  function getVersionUseCase$factory() {
    return getPropertyCallableRef('getVersionUseCase', 1, KProperty1, function (receiver) {
      return _get_getVersionUseCase__n7x57g(receiver);
    }, null);
  }
  function launchOpenLicensesUseCase$factory() {
    return getPropertyCallableRef('launchOpenLicensesUseCase', 1, KProperty1, function (receiver) {
      return _get_launchOpenLicensesUseCase__f5qz1z(receiver);
    }, null);
  }
  function getShowPoweredByUseCase$factory() {
    return getPropertyCallableRef('getShowPoweredByUseCase', 1, KProperty1, function (receiver) {
      return _get_getShowPoweredByUseCase__5l0p0e(receiver);
    }, null);
  }
  function apiUrlConfig$factory_2() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_0(receiver);
    }, null);
  }
  function shareAppUseCase$factory_0() {
    return getPropertyCallableRef('shareAppUseCase', 1, KProperty1, function (receiver) {
      return _get_shareAppUseCase__louoas(receiver);
    }, null);
  }
  function getVersionUseCase$factory_0() {
    return getPropertyCallableRef('getVersionUseCase', 1, KProperty1, function (receiver) {
      return _get_getVersionUseCase__n7x57g(receiver);
    }, null);
  }
  function launchOpenLicensesUseCase$factory_0() {
    return getPropertyCallableRef('launchOpenLicensesUseCase', 1, KProperty1, function (receiver) {
      return _get_launchOpenLicensesUseCase__f5qz1z(receiver);
    }, null);
  }
  function getShowPoweredByUseCase$factory_0() {
    return getPropertyCallableRef('getShowPoweredByUseCase', 1, KProperty1, function (receiver) {
      return _get_getShowPoweredByUseCase__5l0p0e(receiver);
    }, null);
  }
  function launchSetTitleFromClazzUid(_this__u8e3s4, clazzUid, updateUi) {
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveEndpoint(_this__u8e3s4.n56());
    // Inline function 'org.kodein.type.generic' call
    var tmp = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp, TypeToken) ? tmp : THROW_CCE();
    var repo$delegate = Instance(this_0, tmp$ret$0, 2).n5c(null, getLocalDelegateReference('repo', KProperty0, false, function () {
      return THROW_ISE();
    }));
    // Inline function 'kotlin.takeIf' call
    var this_1 = _this__u8e3s4.cp2();
    // Inline function 'kotlin.contracts.contract' call
    var tmp_0;
    // Inline function 'com.ustadmobile.core.viewmodel.clazz.launchSetTitleFromClazzUid.<anonymous>' call
    if (!clazzUid.equals(new Long(0, 0))) {
      tmp_0 = this_1;
    } else {
      tmp_0 = null;
    }
    var tmp0_safe_receiver = tmp_0;
    if (tmp0_safe_receiver == null)
      null;
    else {
      launch(tmp0_safe_receiver, VOID, VOID, launchSetTitleFromClazzUid$slambda_0(clazzUid, repo$delegate, updateUi, null));
    }
  }
  function launchSetTitleFromClazzUid$lambda($repo$delegate) {
    // Inline function 'kotlin.getValue' call
    getLocalDelegateReference('repo', KProperty0, false, function () {
      return THROW_ISE();
    });
    return $repo$delegate.t2();
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_6(function_0) {
    this.tpn_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_6).t1d = function (value, $completion) {
    return this.tpn_1(value, $completion);
  };
  function launchSetTitleFromClazzUid$slambda$slambda($updateUi, resultContinuation) {
    this.cpo_1 = $updateUi;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(launchSetTitleFromClazzUid$slambda$slambda).epo = function (it, $completion) {
    var tmp = this.fpo(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(launchSetTitleFromClazzUid$slambda$slambda).he = function (p1, $completion) {
    return this.epo((p1 == null ? true : typeof p1 === 'string') ? p1 : THROW_CCE(), $completion);
  };
  protoOf(launchSetTitleFromClazzUid$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          this.cpo_1(this.dpo_1);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(launchSetTitleFromClazzUid$slambda$slambda).fpo = function (it, completion) {
    var i = new launchSetTitleFromClazzUid$slambda$slambda(this.cpo_1, completion);
    i.dpo_1 = it;
    return i;
  };
  function launchSetTitleFromClazzUid$slambda$slambda_0($updateUi, resultContinuation) {
    var i = new launchSetTitleFromClazzUid$slambda$slambda($updateUi, resultContinuation);
    var l = function (it, $completion) {
      return i.epo(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function launchSetTitleFromClazzUid$slambda($clazzUid, $repo$delegate, $updateUi, resultContinuation) {
    this.opo_1 = $clazzUid;
    this.ppo_1 = $repo$delegate;
    this.qpo_1 = $updateUi;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(launchSetTitleFromClazzUid$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(launchSetTitleFromClazzUid$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(launchSetTitleFromClazzUid$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = launchSetTitleFromClazzUid$lambda(this.ppo_1).b7d().c8c(this.opo_1);
            var tmp_1 = launchSetTitleFromClazzUid$slambda$slambda_0(this.qpo_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_6(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(launchSetTitleFromClazzUid$slambda).v1m = function ($this$launch, completion) {
    var i = new launchSetTitleFromClazzUid$slambda(this.opo_1, this.ppo_1, this.qpo_1, completion);
    i.rpo_1 = $this$launch;
    return i;
  };
  function launchSetTitleFromClazzUid$slambda_0($clazzUid, $repo$delegate, $updateUi, resultContinuation) {
    var i = new launchSetTitleFromClazzUid$slambda($clazzUid, $repo$delegate, $updateUi, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function parseAndUpdateTerminologyStringsIfNeeded(currentTerminologyStrings, terminology, systemImpl, json, onUpdate) {
    var tmp = currentTerminologyStrings == null ? null : currentTerminologyStrings.gon_1;
    if (!equals(tmp, terminology == null ? null : terminology.s8f_1)) {
      var tmp_0;
      if (terminology == null) {
        tmp_0 = null;
      } else {
        // Inline function 'kotlin.let' call
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.parseAndUpdateTerminologyStringsIfNeeded.<anonymous>' call
        tmp_0 = CourseTerminologyStrings_init_$Create$(terminology, systemImpl, json);
      }
      var courseTerminologyStrings = tmp_0;
      onUpdate(courseTerminologyStrings);
    }
  }
  function collectClazzNameAndUpdateTitle(clazzUid, activeDb, appUiState, $completion) {
    var tmp = activeDb.b7d().c8c(clazzUid);
    var tmp_0 = collectClazzNameAndUpdateTitle$slambda_0(appUiState, null);
    return tmp.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_7(tmp_0), $completion);
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_7(function_0) {
    this.spo_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_7).t1d = function (value, $completion) {
    return this.spo_1(value, $completion);
  };
  function collectClazzNameAndUpdateTitle$slambda($appUiState, resultContinuation) {
    this.bpp_1 = $appUiState;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(collectClazzNameAndUpdateTitle$slambda).epo = function (clazzTitle, $completion) {
    var tmp = this.fpo(clazzTitle, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(collectClazzNameAndUpdateTitle$slambda).he = function (p1, $completion) {
    return this.epo((p1 == null ? true : typeof p1 === 'string') ? p1 : THROW_CCE(), $completion);
  };
  protoOf(collectClazzNameAndUpdateTitle$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = this.bpp_1;
          var tmp_0;
          if (!(this.bpp_1.t2().aol_1 == this.cpp_1)) {
            tmp_0 = this_0;
          } else {
            tmp_0 = null;
          }
          var tmp0_safe_receiver = tmp_0;
          if (tmp0_safe_receiver == null)
            null;
          else {
            l$ret$1: do {
              while (true) {
                var prevValue = tmp0_safe_receiver.t2();
                var nextValue = prevValue.nol(VOID, VOID, this.cpp_1);
                if (tmp0_safe_receiver.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
          }
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(collectClazzNameAndUpdateTitle$slambda).fpo = function (clazzTitle, completion) {
    var i = new collectClazzNameAndUpdateTitle$slambda(this.bpp_1, completion);
    i.cpp_1 = clazzTitle;
    return i;
  };
  function collectClazzNameAndUpdateTitle$slambda_0($appUiState, resultContinuation) {
    var i = new collectClazzNameAndUpdateTitle$slambda($appUiState, resultContinuation);
    var l = function (clazzTitle, $completion) {
      return i.epo(clazzTitle, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function get_blockTypeStringResource(_this__u8e3s4) {
    var tmp0_subject = _this__u8e3s4.x7w_1;
    var tmp;
    if (tmp0_subject === 102) {
      tmp = strings_getInstance().olv_1;
    } else {
      if (tmp0_subject === 104) {
        tmp = strings_getInstance().blx_1;
      } else {
        if (tmp0_subject === 100) {
          tmp = strings_getInstance().ama_1;
        } else {
          if (tmp0_subject === 103) {
            tmp = strings_getInstance().olw_1;
          } else {
            if (tmp0_subject === 105) {
              tmp = strings_getInstance().fma_1;
            } else {
              tmp = strings_getInstance().blc_1;
            }
          }
        }
      }
    }
    return tmp;
  }
  function CoursePermissionConstants() {
    CoursePermissionConstants_instance = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().dmg_1;
    PermissionFlags_getInstance();
    var tmp_1 = to(tmp_0, new Long(1, 0));
    var tmp_2 = strings_getInstance().jmg_1;
    PermissionFlags_getInstance();
    var tmp_3 = to(tmp_2, new Long(8192, 0));
    var tmp_4 = strings_getInstance().amc_1;
    PermissionFlags_getInstance();
    var tmp_5 = to(tmp_4, new Long(2, 0));
    var tmp_6 = strings_getInstance().emg_1;
    PermissionFlags_getInstance();
    var tmp_7 = to(tmp_6, new Long(4, 0));
    var tmp_8 = strings_getInstance().fmg_1;
    PermissionFlags_getInstance();
    var tmp_9 = to(tmp_8, new Long(8, 0));
    var tmp_10 = strings_getInstance().gmg_1;
    PermissionFlags_getInstance();
    var tmp_11 = to(tmp_10, new Long(16, 0));
    var tmp_12 = strings_getInstance().zlu_1;
    PermissionFlags_getInstance();
    var tmp_13 = to(tmp_12, new Long(32, 0));
    var tmp_14 = strings_getInstance().blv_1;
    PermissionFlags_getInstance();
    var tmp_15 = to(tmp_14, new Long(64, 0));
    var tmp_16 = strings_getInstance().hmg_1;
    PermissionFlags_getInstance();
    var tmp_17 = to(tmp_16, new Long(128, 0));
    var tmp_18 = strings_getInstance().img_1;
    PermissionFlags_getInstance();
    tmp.dpp_1 = listOf([tmp_1, tmp_3, tmp_5, tmp_7, tmp_9, tmp_11, tmp_13, tmp_15, tmp_17, to(tmp_18, new Long(256, 0))]);
  }
  var CoursePermissionConstants_instance;
  function CoursePermissionConstants_getInstance() {
    if (CoursePermissionConstants_instance == null)
      new CoursePermissionConstants();
    return CoursePermissionConstants_instance;
  }
  function getTitleForCoursePermission(_this__u8e3s4, entity, $completion) {
    var tmp = new $getTitleForCoursePermissionCOROUTINE$53(_this__u8e3s4, entity, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function titleStringResource(_this__u8e3s4) {
    var tmp0_subject = _this__u8e3s4.zd5_1;
    var tmp;
    if (tmp0_subject === 1000) {
      tmp = strings_getInstance().blf_1;
    } else {
      if (tmp0_subject === 1001) {
        tmp = strings_getInstance().qlr_1;
      } else {
        tmp = null;
      }
    }
    return tmp;
  }
  function getTitleForCoursePermission$slambda($entity, resultContinuation) {
    this.zpp_1 = $entity;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(getTitleForCoursePermission$slambda).bpq = function (it, $completion) {
    var tmp = this.gmp(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(getTitleForCoursePermission$slambda).he = function (p1, $completion) {
    return this.bpq(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(getTitleForCoursePermission$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.apq_1.d7d().dds(this.zpp_1.yd5_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(getTitleForCoursePermission$slambda).gmp = function (it, completion) {
    var i = new getTitleForCoursePermission$slambda(this.zpp_1, completion);
    i.apq_1 = it;
    return i;
  };
  function getTitleForCoursePermission$slambda_0($entity, resultContinuation) {
    var i = new getTitleForCoursePermission$slambda($entity, resultContinuation);
    var l = function (it, $completion) {
      return i.bpq(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function getTitleForCoursePermission$slambda_1($entity, resultContinuation) {
    this.kpq_1 = $entity;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(getTitleForCoursePermission$slambda_1).mpq = function (it, $completion) {
    var tmp = this.gmp(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(getTitleForCoursePermission$slambda_1).he = function (p1, $completion) {
    return this.mpq(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(getTitleForCoursePermission$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.lpq_1.a7d();
            var tmp0_safe_receiver = this.kpq_1;
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ad6_1;
            suspendResult = tmp_0.sfn(tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp2_safe_receiver = suspendResult;
            return tmp2_safe_receiver == null ? null : personFullName(tmp2_safe_receiver);
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(getTitleForCoursePermission$slambda_1).gmp = function (it, completion) {
    var i = new getTitleForCoursePermission$slambda_1(this.kpq_1, completion);
    i.lpq_1 = it;
    return i;
  };
  function getTitleForCoursePermission$slambda_2($entity, resultContinuation) {
    var i = new getTitleForCoursePermission$slambda_1($entity, resultContinuation);
    var l = function (it, $completion) {
      return i.mpq(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $getTitleForCoursePermissionCOROUTINE$53(_this__u8e3s4, entity, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.mpp_1 = _this__u8e3s4;
    this.npp_1 = entity;
  }
  protoOf($getTitleForCoursePermissionCOROUTINE$53).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            var tmp_0 = this;
            var tmp_1 = get_direct(this.mpp_1.n56()).s57();
            var tmp_2 = typeToken(createKType(getKClass(Json), arrayOf([]), false));
            tmp_0.opp_1 = tmp_1.q57(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), null);
            var tmp_3 = this;
            var tmp0_safe_receiver = this.npp_1;
            tmp_3.ppp_1 = tmp0_safe_receiver == null ? null : titleStringResource(tmp0_safe_receiver);
            if (!(this.ppp_1 == null)) {
              this.hd_1 = 2;
              var tmp_4 = this.mpp_1.fp2();
              suspendResult = localFirstThenRepoIfNull(tmp_4, getTitleForCoursePermission$slambda_0(this.npp_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 1;
              var tmp_5 = this.mpp_1.fp2();
              suspendResult = localFirstThenRepoIfNull(tmp_5, getTitleForCoursePermission$slambda_2(this.npp_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            var tmp5_elvis_lhs = suspendResult;
            this.qpp_1 = tmp5_elvis_lhs == null ? '' : tmp5_elvis_lhs;
            this.hd_1 = 3;
            continue $sm;
          case 2:
            var terminology = suspendResult;
            var tmp2_elvis_lhs = terminology == null ? null : toTerminologyEntries(terminology, this.opp_1, this.mpp_1.jp2());
            var terminologyEntries = tmp2_elvis_lhs == null ? emptyList() : tmp2_elvis_lhs;
            var tmp_6 = this;
            var tmp$ret$0;
            l$ret$1: do {
              var tmp0_iterator = terminologyEntries.w();
              while (tmp0_iterator.f()) {
                var element = tmp0_iterator.e();
                if (element.jon_1.equals(this.ppp_1)) {
                  tmp$ret$0 = element;
                  break l$ret$1;
                }
              }
              tmp$ret$0 = null;
            }
             while (false);
            var tmp3_safe_receiver = tmp$ret$0;
            var tmp4_elvis_lhs = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.kon_1;
            tmp_6.qpp_1 = tmp4_elvis_lhs == null ? this.mpp_1.jp2().en6(this.ppp_1) : tmp4_elvis_lhs;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return this.qpp_1;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function defaultCourseBannerImageIndex(courseName) {
    // Inline function 'kotlin.mod' call
    var r = avatarColorForName(courseName == null ? '' : courseName) % 5 | 0;
    return r + (5 & ((r ^ 5) & (r | (-r | 0))) >> 31) | 0;
  }
  function ClazzDetailViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.vpq_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailViewModel$slambda$slambda$slambda$slambda).xpq = function (it, $completion) {
    var tmp = this.ypq(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailViewModel$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.xpq((p1 == null ? true : p1 instanceof ClazzAndDetailPermissions) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp0_safe_receiver = this.wpq_1;
          var clazz = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.b8j_1;
          var tmp_0;
          if (clazz == null) {
            tmp_0 = emptyList();
          } else {
            var tmp_1;
            var tmp_2 = clazz.e8d_1;
            Companion_getInstance_4();
            if (hasFlag_0(tmp_2, new Long(1, 0))) {
              tmp_1 = this.wpq_1.c8j_1;
            } else {
              tmp_1 = false;
            }
            tmp_0 = createTabList(this.vpq_1, tmp_1, this.wpq_1.d8j_1, this.wpq_1.e8j_1);
          }
          var tabList = tmp_0;
          l$ret$1: do {
            var this_0 = this.vpq_1.vpr_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.ypr(tabList);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzDetailViewModel$slambda$slambda$slambda$slambda).ypq = function (it, completion) {
    var i = new ClazzDetailViewModel$slambda$slambda$slambda$slambda(this.vpq_1, completion);
    i.wpq_1 = it;
    return i;
  };
  function ClazzDetailViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzDetailViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.xpq(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.hps_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.hps_1.ep2().b7d().a8c(this.hps_1.dp2(), this.hps_1.fp1_1);
            var tmp_1 = ClazzDetailViewModel$slambda$slambda$slambda$slambda_0(this.hps_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_8(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzDetailViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzDetailViewModel$slambda$slambda$slambda(this.hps_1, completion);
    i.ips_1 = $this$launch;
    return i;
  };
  function ClazzDetailViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzDetailViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailViewModel$slambda$slambda($this_launch, this$0, resultContinuation) {
    this.rps_1 = $this_launch;
    this.sps_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailViewModel$slambda$slambda).m86 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailViewModel$slambda$slambda).z77 = function ($completion) {
    return this.m86($completion);
  };
  protoOf(ClazzDetailViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.rps_1, VOID, VOID, ClazzDetailViewModel$slambda$slambda$slambda_0(this.sps_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzDetailViewModel$slambda$slambda).y77 = function (completion) {
    return new ClazzDetailViewModel$slambda$slambda(this.rps_1, this.sps_1, completion);
  };
  function ClazzDetailViewModel$slambda$slambda_0($this_launch, this$0, resultContinuation) {
    var i = new ClazzDetailViewModel$slambda$slambda($this_launch, this$0, resultContinuation);
    var l = function ($completion) {
      return i.m86($completion);
    };
    l.$arity = 0;
    return l;
  }
  function createTabList($this, showAttendance, showMembers, showProgressReport) {
    Companion_getInstance_102();
    var tabs = mutableListOf([new TabItem('CourseDetailOverviewView', mapOf_0(to('entityUid', $this.fp1_1.toString())), $this.jp2().en6(strings_getInstance().mmb_1))]);
    if (showMembers) {
      Companion_getInstance_102();
      tabs.i1(new TabItem('CourseMembers', mapOf_0(to('clazzUid', $this.fp1_1.toString())), capitalizeFirstLetter($this.jp2().en6(strings_getInstance().glu_1))));
    }
    if (showProgressReport) {
      Companion_getInstance_102();
      tabs.i1(new TabItem('Gradebook', mapOf_0(to('clazzUid', $this.fp1_1.toString())), $this.jp2().en6(strings_getInstance().cmi_1)));
    }
    if (showAttendance) {
      Companion_getInstance_102();
      tabs.i1(new TabItem('CourseLogListAttendanceView', mapOf_0(to('clazzUid', $this.fp1_1.toString())), $this.jp2().en6(strings_getInstance().ule_1)));
    }
    Companion_getInstance_102();
    tabs.i1(new TabItem('CourseGroups', mapOf_0(to('clazzUid', $this.fp1_1.toString())), $this.jp2().en6(strings_getInstance().qlt_1)));
    return toList(tabs);
  }
  function Companion_98() {
    this.tps_1 = 'Course';
  }
  var Companion_instance_146;
  function Companion_getInstance_115() {
    return Companion_instance_146;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_8(function_0) {
    this.ups_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_8).t1d = function (value, $completion) {
    return this.ups_1(value, $completion);
  };
  function ClazzDetailViewModel$slambda(this$0, resultContinuation) {
    this.dpt_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.dpt_1.vpr_1, ClazzDetailViewModel$slambda$slambda_0(this.ept_1, this.dpt_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzDetailViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzDetailViewModel$slambda(this.dpt_1, completion);
    i.ept_1 = $this$launch;
    return i;
  };
  function ClazzDetailViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzDetailViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailViewModel(di, savedStateHandle) {
    DetailViewModel.call(this, di, savedStateHandle, 'Course');
    this.vpr_1 = MutableStateFlow(new ClazzDetailUiState());
    this.wpr_1 = asStateFlow(this.vpr_1);
    var tmp = this.cp2();
    launch(tmp, VOID, VOID, ClazzDetailViewModel$slambda_0(this, null));
  }
  function ClazzDetailUiState(tabs) {
    tabs = tabs === VOID ? emptyList() : tabs;
    this.xpr_1 = tabs;
  }
  protoOf(ClazzDetailUiState).ypr = function (tabs) {
    return new ClazzDetailUiState(tabs);
  };
  protoOf(ClazzDetailUiState).toString = function () {
    return 'ClazzDetailUiState(tabs=' + this.xpr_1 + ')';
  };
  protoOf(ClazzDetailUiState).hashCode = function () {
    return hashCode(this.xpr_1);
  };
  protoOf(ClazzDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzDetailUiState ? other : THROW_CCE();
    if (!equals(this.xpr_1, tmp0_other_with_cast.xpr_1))
      return false;
    return true;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda($$this$unsafeFlow, resultContinuation) {
    this.npt_1 = $$this$unsafeFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda).rpt = function (value, $completion) {
    var tmp = this.spt(value, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda).he = function (p1, $completion) {
    return this.rpt(p1 instanceof PermissionTriple ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.ppt_1 = this.npt_1;
            var tmp_1 = this;
            tmp_1.qpt_1 = this.opt_1;
            this.hd_1 = 1;
            var it = this.qpt_1;
            suspendResult = this.ppt_1.t1d(it.ud8_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda).spt = function (value, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda(this.npt_1, completion);
    i.opt_1 = value;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_0($$this$unsafeFlow, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda($$this$unsafeFlow, resultContinuation);
    var l = function (value, $completion) {
      return i.rpt(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$54(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.bpu_1 = _this__u8e3s4;
    this.cpu_1 = collector;
  }
  protoOf($collectCOROUTINE$54).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.dpu_1 = this.cpu_1;
            this.hd_1 = 1;
            var tmp_1 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_0(this.dpu_1, null);
            suspendResult = this.bpu_1.epu_1.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_9(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.npu_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda).ppu = function (courseBlockList, $completion) {
    var tmp = this.qpu(courseBlockList, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.ppu((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.npu_1.npv_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.bpw(VOID, VOID, this.opu_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda).qpu = function (courseBlockList, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda(this.npu_1, completion);
    i.opu_1 = courseBlockList;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (courseBlockList, $completion) {
      return i.ppu(courseBlockList, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.kpw_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1).mpw = function (blockStatuses, $completion) {
    var tmp = this.npw(blockStatuses, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.mpw((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.kpw_1.npv_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.bpw(VOID, VOID, VOID, this.lpw_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1).npw = function (blockStatuses, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1(this.kpw_1, completion);
    i.lpw_1 = blockStatuses;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (blockStatuses, $completion) {
      return i.mpw(blockStatuses, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.wpw_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.wpw_1.fp2().c7d().fc6(this.wpw_1.fp1_1, false, false, systemTimeInMillis(), this.wpw_1.dp2());
            var tmp_1 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_0(this.wpw_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_9(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda(this.wpw_1, completion);
    i.xpw_1 = $this$launch;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.gpx_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.gpx_1.fp2().w7d().nio(this.gpx_1.fp1_1, listOf_0(this.gpx_1.dp2()), this.gpx_1.dp2());
            var tmp_1 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda$slambda_2(this.gpx_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_9(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_1(this.gpx_1, completion);
    i.hpx_1 = $this$launch;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _no_name_provided__qut3iv_3($this) {
    this.epu_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_3).sot = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$54(this, collector, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(_no_name_provided__qut3iv_3).z1b = function (collector, $completion) {
    return this.sot(collector, $completion);
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda($this_launch, this$0, resultContinuation) {
    this.qpx_1 = $this_launch;
    this.rpx_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda).dou = function (hasViewPermission, $completion) {
    var tmp = this.eou(hasViewPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.dou((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          if (this.spx_1) {
            launch(this.qpx_1, VOID, VOID, ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_0(this.rpx_1, null));
            launch(this.qpx_1, VOID, VOID, ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_2(this.rpx_1, null));
          } else {
            l$ret$1: do {
              var this_0 = this.rpx_1.npv_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.bpw(VOID, VOID, emptyList());
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
          }
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda).eou = function (hasViewPermission, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda(this.qpx_1, this.rpx_1, completion);
    i.spx_1 = hasViewPermission;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_0($this_launch, this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda($this_launch, this$0, resultContinuation);
    var l = function (hasViewPermission, $completion) {
      return i.dou(hasViewPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.npv_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.detailoverview.ClazzDetailOverviewViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.bpw(VOID, VOID, VOID, VOID, VOID, VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).dpy = function (clazzWithDisplayDetails, permissions, $completion) {
    var tmp = this.epy(clazzWithDisplayDetails, permissions, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).um = function (p1, p2, $completion) {
    var tmp = (p1 == null ? true : p1 instanceof ClazzAndDisplayDetails) ? p1 : THROW_CCE();
    return this.dpy(tmp, p2 instanceof PermissionTriple ? p2 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = this.bpy_1;
          var tmp_0;
          if (this.cpy_1.ud8_1) {
            tmp_0 = this_0;
          } else {
            tmp_0 = null;
          }
          return tmp_0;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).epy = function (clazzWithDisplayDetails, permissions, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_1(completion);
    i.bpy_1 = clazzWithDisplayDetails;
    i.cpy_1 = permissions;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_2(resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_1(resultContinuation);
    var l = function (clazzWithDisplayDetails, permissions, $completion) {
      return i.dpy(clazzWithDisplayDetails, permissions, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.npy_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).ppy = function (it, $completion) {
    var tmp = this.qpy(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.ppy((p1 == null ? true : p1 instanceof ClazzAndDisplayDetails) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.npy_1.npv_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.bpw(this.opy_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          var tmp1_currentTerminologyStrings = this.npy_1.npv_1.t2().ypv_1;
          var tmp0_safe_receiver = this.opy_1;
          var tmp2_terminology = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.s8j_1;
          var tmp3_json = this.npy_1.z4q();
          var tmp4_systemImpl = this.npy_1.jp2();
          parseAndUpdateTerminologyStringsIfNeeded(tmp1_currentTerminologyStrings, tmp2_terminology, tmp4_systemImpl, tmp3_json, ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda$lambda(this.npy_1));
          l$ret$3: do {
            var this_1 = this.npy_1.pp1_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var tmp0_safe_receiver_0 = this.opy_1;
              var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.r8j_1;
              var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.v8c_1;
              var nextValue_0 = prevValue_0.nol(VOID, VOID, tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs);
              if (this_1.y1k(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).qpy = function (it, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this.npy_1, completion);
    i.opy_1 = it;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.ppy(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_1($$this$unsafeFlow, resultContinuation) {
    this.zpy_1 = $$this$unsafeFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_1).rpt = function (value, $completion) {
    var tmp = this.spt(value, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_1).he = function (p1, $completion) {
    return this.rpt(p1 instanceof PermissionTriple ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.bpz_1 = this.zpy_1;
            var tmp_1 = this;
            tmp_1.cpz_1 = this.apz_1;
            this.hd_1 = 1;
            var it = this.cpz_1;
            suspendResult = this.bpz_1.t1d(it.vd8_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_1).spt = function (value, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_1(this.zpy_1, completion);
    i.apz_1 = value;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_2($$this$unsafeFlow, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_1($$this$unsafeFlow, resultContinuation);
    var l = function (value, $completion) {
      return i.rpt(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$55(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.lpz_1 = _this__u8e3s4;
    this.mpz_1 = collector;
  }
  protoOf($collectCOROUTINE$55).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.npz_1 = this.mpz_1;
            this.hd_1 = 1;
            var tmp_1 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_2(this.npz_1, null);
            suspendResult = this.lpz_1.opz_1.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_9(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function _no_name_provided__qut3iv_4($this) {
    this.opz_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_4).sot = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$55(this, collector, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(_no_name_provided__qut3iv_4).z1b = function (collector, $completion) {
    return this.sot(collector, $completion);
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.xpz_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).dou = function (hasEditPermission, $completion) {
    var tmp = this.eou(hasEditPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).he = function (p1, $completion) {
    return this.dou((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.xpz_1.pp1_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.nol(prevValue.yok_1.tol(this.ypz_1));
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_1 = this.xpz_1.npv_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var nextValue_0 = prevValue_0.bpw(VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.ypz_1);
              if (this_1.y1k(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).eou = function (hasEditPermission, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this.xpz_1, completion);
    i.ypz_1 = hasEditPermission;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation);
    var l = function (hasEditPermission, $completion) {
      return i.dou(hasEditPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_3($$this$unsafeFlow, resultContinuation) {
    this.hq0_1 = $$this$unsafeFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_3).rpt = function (value, $completion) {
    var tmp = this.spt(value, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_3).he = function (p1, $completion) {
    return this.rpt(p1 instanceof PermissionTriple ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.jq0_1 = this.hq0_1;
            var tmp_1 = this;
            tmp_1.kq0_1 = this.iq0_1;
            this.hd_1 = 1;
            var it = this.kq0_1;
            suspendResult = this.jq0_1.t1d(it.wd8_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_3).spt = function (value, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_3(this.hq0_1, completion);
    i.iq0_1 = value;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_4($$this$unsafeFlow, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_3($$this$unsafeFlow, resultContinuation);
    var l = function (value, $completion) {
      return i.rpt(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$56(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.tq0_1 = _this__u8e3s4;
    this.uq0_1 = collector;
  }
  protoOf($collectCOROUTINE$56).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.vq0_1 = this.uq0_1;
            this.hd_1 = 1;
            var tmp_1 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_4(this.vq0_1, null);
            suspendResult = this.tq0_1.wq0_1.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_9(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function _no_name_provided__qut3iv_5($this) {
    this.wq0_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_5).sot = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$56(this, collector, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(_no_name_provided__qut3iv_5).z1b = function (collector, $completion) {
    return this.sot(collector, $completion);
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this$0, resultContinuation) {
    this.fq1_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).dou = function (canAddStudent, $completion) {
    var tmp = this.eou(canAddStudent, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).he = function (p1, $completion) {
    return this.dou((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.fq1_1.npv_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.bpw(VOID, VOID, VOID, VOID, this.gq1_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).eou = function (canAddStudent, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this.fq1_1, completion);
    i.gq1_1 = canAddStudent;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_8(this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this$0, resultContinuation);
    var l = function (canAddStudent, $completion) {
      return i.dou(canAddStudent, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda($permissionFlow, this$0, resultContinuation) {
    this.pq1_1 = $permissionFlow;
    this.qq1_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var this_0 = this.pq1_1;
            var tmp_0 = distinctUntilChanged(new _no_name_provided__qut3iv_3(this_0));
            suspendResult = collectLatest(tmp_0, ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_0(this.rq1_1, this.qq1_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda(this.pq1_1, this.qq1_1, completion);
    i.rq1_1 = $this$launch;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda_0($permissionFlow, this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda($permissionFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda_1(this$0, $permissionFlow, resultContinuation) {
    this.aq2_1 = this$0;
    this.bq2_1 = $permissionFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.aq2_1.fp2().b7d().b8c(this.aq2_1.fp1_1, systemTimeInMillis(), this.aq2_1.dp2());
            var tmp_1 = combine(tmp_0, this.bq2_1, ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_2(null));
            var tmp_2 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_4(this.aq2_1, null);
            suspendResult = tmp_1.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_9(tmp_2), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda_1(this.aq2_1, this.bq2_1, completion);
    i.cq2_1 = $this$launch;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda_2(this$0, $permissionFlow, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda_1(this$0, $permissionFlow, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda_3($permissionFlow, this$0, resultContinuation) {
    this.lq2_1 = $permissionFlow;
    this.mq2_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_3).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var this_0 = this.lq2_1;
            var tmp_0 = distinctUntilChanged(new _no_name_provided__qut3iv_4(this_0));
            var tmp_1 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_6(this.mq2_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_9(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_3).v1m = function ($this$launch, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda_3(this.lq2_1, this.mq2_1, completion);
    i.nq2_1 = $this$launch;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda_4($permissionFlow, this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda_3($permissionFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda_5($permissionFlow, this$0, resultContinuation) {
    this.wq2_1 = $permissionFlow;
    this.xq2_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_5).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_5).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var this_0 = this.wq2_1;
            var tmp_0 = distinctUntilChanged(new _no_name_provided__qut3iv_5(this_0));
            var tmp_1 = ClazzDetailOverviewViewModel$slambda$slambda$slambda$slambda_8(this.xq2_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_9(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda$slambda_5).v1m = function ($this$launch, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda_5(this.wq2_1, this.xq2_1, completion);
    i.yq2_1 = $this$launch;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda$slambda$slambda_6($permissionFlow, this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda$slambda_5($permissionFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda$slambda($this_launch, $permissionFlow, this$0, resultContinuation) {
    this.hq3_1 = $this_launch;
    this.iq3_1 = $permissionFlow;
    this.jq3_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda).m86 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda).z77 = function ($completion) {
    return this.m86($completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.hq3_1, VOID, VOID, ClazzDetailOverviewViewModel$slambda$slambda$slambda_0(this.iq3_1, this.jq3_1, null));
          launch(this.hq3_1, VOID, VOID, ClazzDetailOverviewViewModel$slambda$slambda$slambda_2(this.jq3_1, this.iq3_1, null));
          launch(this.hq3_1, VOID, VOID, ClazzDetailOverviewViewModel$slambda$slambda$slambda_4(this.iq3_1, this.jq3_1, null));
          launch(this.hq3_1, VOID, VOID, ClazzDetailOverviewViewModel$slambda$slambda$slambda_6(this.iq3_1, this.jq3_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda$slambda).y77 = function (completion) {
    return new ClazzDetailOverviewViewModel$slambda$slambda(this.hq3_1, this.iq3_1, this.jq3_1, completion);
  };
  function ClazzDetailOverviewViewModel$slambda$slambda_0($this_launch, $permissionFlow, this$0, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda$slambda($this_launch, $permissionFlow, this$0, resultContinuation);
    var l = function ($completion) {
      return i.m86($completion);
    };
    l.$arity = 0;
    return l;
  }
  function _get_setClipboardStringUseCase__31i1s1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.ppv_1;
    setClipboardStringUseCase$factory_0();
    return this_0.t2();
  }
  function onClickEdit($this) {
    Companion_getInstance_102();
    $this.np1_1.sns('CourseEdit', mapOf_0(to('entityUid', $this.fp1_1.toString())));
  }
  function Companion_99() {
    this.kq3_1 = 'CourseDetailOverviewView';
  }
  var Companion_instance_147;
  function Companion_getInstance_116() {
    return Companion_instance_147;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_9(function_0) {
    this.lq3_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_9).t1d = function (value, $completion) {
    return this.lq3_1(value, $completion);
  };
  function ClazzDetailOverviewViewModel$onClickEdit$ref($boundThis) {
    var l = function () {
      onClickEdit($boundThis);
      return Unit_instance;
    };
    l.callableName = 'onClickEdit';
    return l;
  }
  function ClazzDetailOverviewViewModel$slambda(this$0, $permissionFlow, resultContinuation) {
    this.uq3_1 = this$0;
    this.vq3_1 = $permissionFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzDetailOverviewViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzDetailOverviewViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.uq3_1.npv_1, ClazzDetailOverviewViewModel$slambda$slambda_0(this.wq3_1, this.vq3_1, this.uq3_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzDetailOverviewViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzDetailOverviewViewModel$slambda(this.uq3_1, this.vq3_1, completion);
    i.wq3_1 = $this$launch;
    return i;
  };
  function ClazzDetailOverviewViewModel$slambda_0(this$0, $permissionFlow, resultContinuation) {
    var i = new ClazzDetailOverviewViewModel$slambda(this$0, $permissionFlow, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzDetailOverviewViewModel(di, savedStateHandle, destinationName) {
    destinationName = destinationName === VOID ? 'CourseDetailOverviewView' : destinationName;
    DetailViewModel.call(this, di, savedStateHandle, destinationName);
    this.npv_1 = MutableStateFlow(new ClazzDetailOverviewUiState());
    this.opv_1 = asStateFlow(this.npv_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(SetClipboardStringUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.ppv_1 = Instance(this, tmp$ret$0, null).n5c(this, setClipboardStringUseCase$factory());
    this.qpv_1 = MutableSharedFlow(1, 0, BufferOverflow_DROP_OLDEST_getInstance());
    this.rpv_1 = asSharedFlow(this.qpv_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.pp1_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.detailoverview.ClazzDetailOverviewViewModel.<anonymous>' call
        var tmp_1 = this.jp2().en6(strings_getInstance().mlo_1);
        var tmp_2 = FabIcon_EDIT_getInstance();
        var nextValue = prevValue.nol(new FabUiState(false, tmp_1, tmp_2, ClazzDetailOverviewViewModel$onClickEdit$ref(this)));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_3 = this.fp2().b7f();
    var tmp_4 = this.dp2();
    PermissionFlags_getInstance();
    var tmp_5 = new Long(1, 0);
    PermissionFlags_getInstance();
    var tmp_6 = new Long(2, 0);
    PermissionFlags_getInstance();
    var permissionFlow = shareIn(tmp_3.fd5(tmp_4, this.fp1_1, tmp_5, tmp_6, new Long(8, 0)), this.cp2(), Companion_getInstance_12().v1h());
    var tmp_7 = this.cp2();
    launch(tmp_7, VOID, VOID, ClazzDetailOverviewViewModel$slambda_0(this, permissionFlow, null));
  }
  protoOf(ClazzDetailOverviewViewModel).xq3 = function (code) {
    _get_setClipboardStringUseCase__31i1s1(this).xnn(code);
    this.hp2().com(new Snack(this.jp2().en6(strings_getInstance().km1_1)));
  };
  protoOf(ClazzDetailOverviewViewModel).yq3 = function (courseBlock) {
    Companion_getInstance_112();
    var tmp = to('entityUid', courseBlock.w7w_1.toString());
    Companion_getInstance_112();
    var navArgs = mapOf([tmp, to('clazzUid', this.fp1_1.toString())]);
    var tmp0_subject = courseBlock.x7w_1;
    if (tmp0_subject === 100) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this.npv_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.detailoverview.ClazzDetailOverviewViewModel.onClickCourseBlock.<anonymous>' call
          var nextValue = prevValue.bpw(VOID, VOID, VOID, VOID, VOID, toggle(prevValue.xpv_1, courseBlock.w7w_1));
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      this.qpv_1.i1h(new RefreshCommand());
    } else {
      if (tmp0_subject === 102) {
        this.np1_1.sns('CourseText', navArgs);
      } else {
        if (tmp0_subject === 103) {
          this.np1_1.sns('CourseAssignment', navArgs);
        } else {
          if (tmp0_subject === 105) {
            this.np1_1.sns('CourseDiscussion', navArgs);
          } else {
            if (tmp0_subject === 104) {
              Companion_getInstance_142();
              Companion_getInstance_112();
              var tmp_0 = to('entityUid', courseBlock.o7x_1.toString());
              Companion_getInstance_112();
              var tmp_1 = to('clazzUid', this.fp1_1.toString());
              Companion_getInstance_112();
              this.np1_1.sns('ContentEntry', mapOf([tmp_0, tmp_1, to('courseBlockUid', courseBlock.w7w_1.toString())]));
            }
          }
        }
      }
    }
  };
  protoOf(ClazzDetailOverviewViewModel).zq3 = function () {
    Companion_getInstance_112();
    this.np1_1.sns('CoursePermissionList', mapOf_0(to('clazzUid', this.fp1_1.toString())));
  };
  function ClazzDetailOverviewUiState$displayBlockList$delegate$lambda(this$0) {
    return function () {
      // Inline function 'kotlin.collections.filter' call
      // Inline function 'kotlin.collections.filterTo' call
      var this_0 = this$0.upv_1;
      var destination = ArrayList_init_$Create$();
      var tmp0_iterator = this_0.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.detailoverview.ClazzDetailOverviewUiState.displayBlockList$delegate.<anonymous>.<anonymous>' call
        var tmp0_safe_receiver = element.wc8_1;
        var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.z7w_1;
        if (!this$0.xpv_1.a1(tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs)) {
          destination.i1(element);
        }
      }
      return destination;
    };
  }
  function ClazzDetailOverviewUiState(clazzAndDetail, scheduleList, courseBlockList, blockStatusesForActiveUser, clazzCodeVisible, collapsedBlockUids, terminologyStrings, managePermissionVisible) {
    clazzAndDetail = clazzAndDetail === VOID ? null : clazzAndDetail;
    scheduleList = scheduleList === VOID ? emptyList() : scheduleList;
    courseBlockList = courseBlockList === VOID ? emptyList() : courseBlockList;
    blockStatusesForActiveUser = blockStatusesForActiveUser === VOID ? emptyList() : blockStatusesForActiveUser;
    clazzCodeVisible = clazzCodeVisible === VOID ? false : clazzCodeVisible;
    collapsedBlockUids = collapsedBlockUids === VOID ? emptySet() : collapsedBlockUids;
    terminologyStrings = terminologyStrings === VOID ? null : terminologyStrings;
    managePermissionVisible = managePermissionVisible === VOID ? false : managePermissionVisible;
    this.spv_1 = clazzAndDetail;
    this.tpv_1 = scheduleList;
    this.upv_1 = courseBlockList;
    this.vpv_1 = blockStatusesForActiveUser;
    this.wpv_1 = clazzCodeVisible;
    this.xpv_1 = collapsedBlockUids;
    this.ypv_1 = terminologyStrings;
    this.zpv_1 = managePermissionVisible;
    var tmp = this;
    var tmp_0 = LazyThreadSafetyMode_NONE_getInstance();
    tmp.apw_1 = lazy(tmp_0, ClazzDetailOverviewUiState$displayBlockList$delegate$lambda(this));
  }
  protoOf(ClazzDetailOverviewUiState).aq4 = function () {
    var tmp0_safe_receiver = this.spv_1;
    return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.r8j_1;
  };
  protoOf(ClazzDetailOverviewUiState).bq4 = function () {
    var tmp;
    var tmp0_safe_receiver = this.spv_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.r8j_1;
    if (isDateSet(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.c8d_1)) {
      tmp = true;
    } else {
      var tmp2_safe_receiver = this.spv_1;
      var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.r8j_1;
      tmp = isDateSet(tmp3_safe_receiver == null ? null : tmp3_safe_receiver.d8d_1);
    }
    return tmp;
  };
  protoOf(ClazzDetailOverviewUiState).cq4 = function () {
    var tmp0_safe_receiver = this.spv_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.u8j_1;
    return tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
  };
  protoOf(ClazzDetailOverviewUiState).dq4 = function () {
    var tmp0_safe_receiver = this.spv_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.v8j_1;
    return tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
  };
  protoOf(ClazzDetailOverviewUiState).eq4 = function () {
    var tmp$ret$0;
    $l$block_0: {
      // Inline function 'kotlin.collections.any' call
      var this_0 = this.upv_1;
      var tmp;
      if (isInterface(this_0, Collection)) {
        tmp = this_0.c1();
      } else {
        tmp = false;
      }
      if (tmp) {
        tmp$ret$0 = false;
        break $l$block_0;
      }
      var tmp0_iterator = this_0.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.detailoverview.ClazzDetailOverviewUiState.<get-hasModules>.<anonymous>' call
        var tmp0_safe_receiver = element.wc8_1;
        var tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.x7w_1;
        if (tmp_0 === 100) {
          tmp$ret$0 = true;
          break $l$block_0;
        }
      }
      tmp$ret$0 = false;
    }
    return tmp$ret$0;
  };
  protoOf(ClazzDetailOverviewUiState).fq4 = function () {
    var tmp2_safe_receiver = this.ypv_1;
    var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.hon(strings_getInstance().qlr_1);
    var tmp = (tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs) + ': ' + this.dq4() + ', ';
    var tmp0_safe_receiver = this.ypv_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.hon(strings_getInstance().blf_1);
    return tmp + ((tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs) + ': ' + this.cq4());
  };
  protoOf(ClazzDetailOverviewUiState).gq4 = function () {
    return this.zpv_1;
  };
  protoOf(ClazzDetailOverviewUiState).hq4 = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.apw_1;
    displayBlockList$factory();
    return this_0.t2();
  };
  protoOf(ClazzDetailOverviewUiState).iq4 = function (clazzAndDetail, scheduleList, courseBlockList, blockStatusesForActiveUser, clazzCodeVisible, collapsedBlockUids, terminologyStrings, managePermissionVisible) {
    return new ClazzDetailOverviewUiState(clazzAndDetail, scheduleList, courseBlockList, blockStatusesForActiveUser, clazzCodeVisible, collapsedBlockUids, terminologyStrings, managePermissionVisible);
  };
  protoOf(ClazzDetailOverviewUiState).bpw = function (clazzAndDetail, scheduleList, courseBlockList, blockStatusesForActiveUser, clazzCodeVisible, collapsedBlockUids, terminologyStrings, managePermissionVisible, $super) {
    clazzAndDetail = clazzAndDetail === VOID ? this.spv_1 : clazzAndDetail;
    scheduleList = scheduleList === VOID ? this.tpv_1 : scheduleList;
    courseBlockList = courseBlockList === VOID ? this.upv_1 : courseBlockList;
    blockStatusesForActiveUser = blockStatusesForActiveUser === VOID ? this.vpv_1 : blockStatusesForActiveUser;
    clazzCodeVisible = clazzCodeVisible === VOID ? this.wpv_1 : clazzCodeVisible;
    collapsedBlockUids = collapsedBlockUids === VOID ? this.xpv_1 : collapsedBlockUids;
    terminologyStrings = terminologyStrings === VOID ? this.ypv_1 : terminologyStrings;
    managePermissionVisible = managePermissionVisible === VOID ? this.zpv_1 : managePermissionVisible;
    return $super === VOID ? this.iq4(clazzAndDetail, scheduleList, courseBlockList, blockStatusesForActiveUser, clazzCodeVisible, collapsedBlockUids, terminologyStrings, managePermissionVisible) : $super.iq4.call(this, clazzAndDetail, scheduleList, courseBlockList, blockStatusesForActiveUser, clazzCodeVisible, collapsedBlockUids, terminologyStrings, managePermissionVisible);
  };
  protoOf(ClazzDetailOverviewUiState).toString = function () {
    return 'ClazzDetailOverviewUiState(clazzAndDetail=' + this.spv_1 + ', scheduleList=' + this.tpv_1 + ', courseBlockList=' + this.upv_1 + ', blockStatusesForActiveUser=' + this.vpv_1 + ', clazzCodeVisible=' + this.wpv_1 + ', collapsedBlockUids=' + this.xpv_1 + ', terminologyStrings=' + this.ypv_1 + ', managePermissionVisible=' + this.zpv_1 + ')';
  };
  protoOf(ClazzDetailOverviewUiState).hashCode = function () {
    var result = this.spv_1 == null ? 0 : this.spv_1.hashCode();
    result = imul(result, 31) + hashCode(this.tpv_1) | 0;
    result = imul(result, 31) + hashCode(this.upv_1) | 0;
    result = imul(result, 31) + hashCode(this.vpv_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.wpv_1) | 0;
    result = imul(result, 31) + hashCode(this.xpv_1) | 0;
    result = imul(result, 31) + (this.ypv_1 == null ? 0 : this.ypv_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.zpv_1) | 0;
    return result;
  };
  protoOf(ClazzDetailOverviewUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzDetailOverviewUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzDetailOverviewUiState ? other : THROW_CCE();
    if (!equals(this.spv_1, tmp0_other_with_cast.spv_1))
      return false;
    if (!equals(this.tpv_1, tmp0_other_with_cast.tpv_1))
      return false;
    if (!equals(this.upv_1, tmp0_other_with_cast.upv_1))
      return false;
    if (!equals(this.vpv_1, tmp0_other_with_cast.vpv_1))
      return false;
    if (!(this.wpv_1 === tmp0_other_with_cast.wpv_1))
      return false;
    if (!equals(this.xpv_1, tmp0_other_with_cast.xpv_1))
      return false;
    if (!equals(this.ypv_1, tmp0_other_with_cast.ypv_1))
      return false;
    if (!(this.zpv_1 === tmp0_other_with_cast.zpv_1))
      return false;
    return true;
  };
  function setClipboardStringUseCase$factory() {
    return getPropertyCallableRef('setClipboardStringUseCase', 1, KProperty1, function (receiver) {
      return _get_setClipboardStringUseCase__31i1s1(receiver);
    }, null);
  }
  function setClipboardStringUseCase$factory_0() {
    return getPropertyCallableRef('setClipboardStringUseCase', 1, KProperty1, function (receiver) {
      return _get_setClipboardStringUseCase__31i1s1(receiver);
    }, null);
  }
  function displayBlockList$factory() {
    return getPropertyCallableRef('displayBlockList', 1, KProperty1, function (receiver) {
      return receiver.hq4();
    }, null);
  }
  function ClazzEditViewModel$slambda$slambda$slambda$lambda(this$0) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.o8f_1 = new CoursePicture(this$0.rp7_1);
      return Unit_instance;
    };
  }
  function ClazzEditViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.rq4_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda).vq4 = function (it, $completion) {
    var tmp = this.gmp(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.vq4(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            var this_0 = this.sq4_1.b7d();
            var tmp_1;
            if (!this.rq4_1.rp7_1.equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            tmp_0.tq4_1 = tmp_1;
            if (this.tq4_1 == null) {
              this.uq4_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.tq4_1.x8b(this.rq4_1.rp7_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.uq4_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            var dbResult = this.uq4_1;
            var hasPicture = !((dbResult == null ? null : dbResult.o8f_1) == null);
            var tmp_2;
            if (dbResult == null ? true : hasPicture) {
              tmp_2 = dbResult;
            } else {
              tmp_2 = shallowCopy_3(dbResult, ClazzEditViewModel$slambda$slambda$slambda$lambda(this.rq4_1));
            }

            return tmp_2;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda).gmp = function (it, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda(this.rq4_1, completion);
    i.sq4_1 = it;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.vq4(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.eq5_1 = this$0;
    this.fq5_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_1).kq5 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_1).z77 = function ($completion) {
    return this.kq5($completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            tmp_0.gq5_1 = new ClazzWithHolidayCalendarAndAndTerminology();
            var tmp_1 = this;
            tmp_1.hq5_1 = this.gq5_1;
            this.hq5_1.u8c_1 = this.eq5_1.pq6_1;
            this.hq5_1.v8c_1 = '';
            this.hq5_1.a8d_1 = true;
            this.hq5_1.c8d_1 = systemTimeInMillis();
            this.hq5_1.m8d_1 = getDefaultTimeZoneId();
            var tmp_2 = this.hq5_1;
            Companion_getInstance_102();
            var tmp0_safe_receiver = this.fq5_1.ba('schoolUid');
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
            tmp_2.f8d_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
            var tmp_3 = this;
            var this_0 = this.eq5_1.fp2().d7d();
            var tmp_4;
            if (!this.hq5_1.h8d_1.equals(new Long(0, 0))) {
              tmp_4 = this_0;
            } else {
              tmp_4 = null;
            }

            tmp_3.iq5_1 = tmp_4;
            if (this.iq5_1 == null) {
              this.jq5_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.iq5_1.dds(this.hq5_1.h8d_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.jq5_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            var ARGUMENT = this.jq5_1;
            this.hq5_1.n8f_1 = ARGUMENT;
            this.hq5_1.o8f_1 = new CoursePicture(this.eq5_1.pq6_1);
            this.hq5_1.s8d_1 = this.eq5_1.dp2();
            return this.gq5_1;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_1).y77 = function (completion) {
    return new ClazzEditViewModel$slambda$slambda$slambda_1(this.eq5_1, this.fq5_1, completion);
  };
  function ClazzEditViewModel$slambda$slambda$slambda_2(this$0, $savedStateHandle, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation);
    var l = function ($completion) {
      return i.kq5($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.nq6_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.zq6(VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzEditViewModel$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.iq7_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_3).mq7 = function (it, $completion) {
    var tmp = this.gmp(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.mq7(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            var this_0 = this.jq7_1.a7e();
            var tmp_1;
            if (!this.iq7_1.rp7_1.equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            tmp_0.kq7_1 = tmp_1;
            if (this.kq7_1 == null) {
              this.lq7_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.kq7_1.vgq(this.iq7_1.rp7_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.lq7_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.lq7_1;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_3).gmp = function (it, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_3(this.iq7_1, completion);
    i.jq7_1 = it;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.mq7(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$slambda_5(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_5).vq7 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_5).z77 = function ($completion) {
    return this.vq7($completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return emptyList();
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_5).y77 = function (completion) {
    return new ClazzEditViewModel$slambda$slambda$slambda_5(completion);
  };
  function ClazzEditViewModel$slambda$slambda$slambda_6(resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_5(resultContinuation);
    var l = function ($completion) {
      return i.vq7($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$lambda_0(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.nq6_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.zq6(VOID, VOID, VOID, VOID, VOID, it == null ? emptyList() : it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzEditViewModel$slambda$slambda$slambda_7(this$0, resultContinuation) {
    this.eq8_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_7).mq8 = function (db, $completion) {
    var tmp = this.gmp(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_7).he = function (p1, $completion) {
    return this.mq8(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_7).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            var tmp_0 = this;
            var this_0 = this.fq8_1.c7d();
            var tmp_1;
            if (!this.eq8_1.rp7_1.equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            tmp_0.gq8_1 = tmp_1;
            if (this.gq8_1 == null) {
              this.hq8_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.gq8_1.ec6(this.eq8_1.rp7_1, false, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.hq8_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.iq8_1 = this.hq8_1;
            this.jq8_1 = this.iq8_1 == null ? emptyList() : this.iq8_1;
            var tmp_2 = this;
            var this_1 = this.fq8_1.t7e();
            var tmp_3;
            if (!this.eq8_1.rp7_1.equals(new Long(0, 0))) {
              tmp_3 = this_1;
            } else {
              tmp_3 = null;
            }

            tmp_2.kq8_1 = tmp_3;
            if (this.kq8_1 == null) {
              this.lq8_1 = null;
              this.hd_1 = 4;
              continue $sm;
            } else {
              this.hd_1 = 3;
              suspendResult = this.kq8_1.pfe(this.eq8_1.rp7_1, false, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 3:
            this.lq8_1 = suspendResult;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            var tmp3_elvis_lhs = this.lq8_1;
            var assignmentPeerAllocations = tmp3_elvis_lhs == null ? emptyList() : tmp3_elvis_lhs;
            var this_2 = this.jq8_1;
            var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_2, 10));
            var tmp0_iterator = this_2.w();
            while (tmp0_iterator.f()) {
              var item = tmp0_iterator.e();
              var tmp_4 = ensureNotNull(item.fc8_1);
              var tmp0_elvis_lhs = item.gc8_1;
              var tmp_5 = tmp0_elvis_lhs == null ? new CourseBlockPicture(ensureNotNull(item.fc8_1).w7w_1) : tmp0_elvis_lhs;
              var tmp_6 = item.hc8_1;
              var tmp_7 = item.ic8_1;
              var tmp_8 = item.jc8_1;
              var tmp_9 = item.kc8_1;
              var destination_0 = ArrayList_init_$Create$();
              var tmp0_iterator_0 = assignmentPeerAllocations.w();
              while (tmp0_iterator_0.f()) {
                var element = tmp0_iterator_0.e();
                var tmp_10 = element.nff_1;
                var tmp0_safe_receiver = item.jc8_1;
                if (tmp_10.equals(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.q7s_1)) {
                  destination_0.i1(element);
                }
              }
              destination.i1(new CourseBlockAndEditEntities(tmp_4, tmp_5, tmp_6, VOID, VOID, VOID, tmp_7, tmp_8, tmp_9, destination_0));
            }

            return destination;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_7).gmp = function (db, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_7(this.eq8_1, completion);
    i.fq8_1 = db;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda$slambda_8(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_7(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.mq8(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$slambda_9(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_9).vq8 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_9).z77 = function ($completion) {
    return this.vq8($completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_9).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return emptyList();
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_9).y77 = function (completion) {
    return new ClazzEditViewModel$slambda$slambda$slambda_9(completion);
  };
  function ClazzEditViewModel$slambda$slambda$slambda_10(resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_9(resultContinuation);
    var l = function ($completion) {
      return i.vq8($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$lambda_1(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.nq6_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.zq6(VOID, VOID, VOID, VOID, VOID, VOID, it == null ? emptyList() : it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzEditViewModel$slambda$slambda$slambda$lambda_0($returnedSchedule) {
    return function (it) {
      return it.pgr_1.equals($returnedSchedule.pgr_1);
    };
  }
  function ClazzEditViewModel$slambda$slambda$slambda$slambda(this$0, $newSchedules, resultContinuation) {
    this.eq9_1 = this$0;
    this.fq9_1 = $newSchedules;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda$slambda).ype = function ($this$withContext, $completion) {
    var tmp = this.v1m($this$withContext, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.ype((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return this.eq9_1.z4q().e45(ListSerializer(Companion_instance_28.a4r()), this.fq9_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda$slambda).v1m = function ($this$withContext, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda$slambda(this.eq9_1, this.fq9_1, completion);
    i.gq9_1 = $this$withContext;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda$slambda$slambda_0(this$0, $newSchedules, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda$slambda(this$0, $newSchedules, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.ype($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$slambda_11(this$0, $savedStateHandle, resultContinuation) {
    this.pq9_1 = this$0;
    this.qq9_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_11).jop = function (result, $completion) {
    var tmp = this.kop(result, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_11).he = function (p1, $completion) {
    return this.jop(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_11).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var tmp_1 = this.rq9_1.qoo_1;
            var tmp0_elvis_lhs = tmp_1 instanceof Schedule ? tmp_1 : null;
            var tmp_2;
            if (tmp0_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_2 = tmp0_elvis_lhs;
            }

            tmp_0.sq9_1 = tmp_2;
            var tmp_3 = this;
            var tmp_4 = this.pq9_1.nq6_1.t2().wq6_1;
            tmp_3.tq9_1 = replaceOrAppend(tmp_4, this.sq9_1, ClazzEditViewModel$slambda$slambda$slambda$lambda_0(this.sq9_1));
            l$ret$1: do {
              var this_0 = this.pq9_1.nq6_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.zq6(VOID, VOID, VOID, VOID, VOID, this.tq9_1);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.hd_1 = 1;
            var tmp_5 = Dispatchers_getInstance().p12_1;
            suspendResult = withContext(tmp_5, ClazzEditViewModel$slambda$slambda$slambda$slambda_0(this.pq9_1, this.tq9_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            this.qq9_1.rox('schedule', ARGUMENT);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_11).kop = function (result, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_11(this.pq9_1, this.qq9_1, completion);
    i.rq9_1 = result;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda$slambda_12(this$0, $savedStateHandle, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_11(this$0, $savedStateHandle, resultContinuation);
    var l = function (result, $completion) {
      return i.jop(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$slambda_13(this$0, resultContinuation) {
    this.cqa_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_13).jop = function (result, $completion) {
    var tmp = this.kop(result, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_13).he = function (p1, $completion) {
    return this.jop(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_13).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var tmp_1 = this.dqa_1.qoo_1;
            var tmp0_elvis_lhs = tmp_1 instanceof CourseBlockAndEditEntities ? tmp_1 : null;
            var tmp_2;
            if (tmp0_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_2 = tmp0_elvis_lhs;
            }

            tmp_0.eqa_1 = tmp_2;
            var tmp_3 = this;
            var tmp_4 = this.cqa_1.nq6_1.t2().xq6_1;
            var tmp1_safe_receiver = this.cqa_1.nq6_1.t2().sq6_1;
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.u8c_1;
            tmp_3.fqa_1 = this.cqa_1.iq6_1.nnx(tmp_4, tmp2_elvis_lhs == null ? new Long(0, 0) : tmp2_elvis_lhs, this.eqa_1);
            this.hd_1 = 1;
            suspendResult = updateCourseBlockList(this.cqa_1, this.fqa_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_13).kop = function (result, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_13(this.cqa_1, completion);
    i.dqa_1 = result;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda$slambda_14(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_13(this$0, resultContinuation);
    var l = function (result, $completion) {
      return i.jop(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$slambda$lambda_1($timeZoneId) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.m8d_1 = $timeZoneId;
      return Unit_instance;
    };
  }
  function ClazzEditViewModel$slambda$slambda$slambda_15(this$0, resultContinuation) {
    this.oqa_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_15).jop = function (result, $completion) {
    var tmp = this.kop(result, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_15).he = function (p1, $completion) {
    return this.jop(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_15).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp_0 = this.pqa_1.qoo_1;
          var tmp0_elvis_lhs = (!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) ? tmp_0 : null;
          var tmp_1;
          if (tmp0_elvis_lhs == null) {
            return Unit_instance;
          } else {
            tmp_1 = tmp0_elvis_lhs;
          }
          var timeZoneId = tmp_1;
          var tmp1_safe_receiver = this.oqa_1.nq6_1.t2().sq6_1;
          var tmp_2;
          if (tmp1_safe_receiver == null) {
            tmp_2 = null;
          } else {
            tmp_2 = shallowCopy_3(tmp1_safe_receiver, ClazzEditViewModel$slambda$slambda$slambda$lambda_1(timeZoneId));
          }
          this.oqa_1.qqa(tmp_2);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_15).kop = function (result, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_15(this.oqa_1, completion);
    i.pqa_1 = result;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda$slambda_16(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_15(this$0, resultContinuation);
    var l = function (result, $completion) {
      return i.jop(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$slambda$lambda_2($newTerminology) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.h8d_1 = $newTerminology.p8f_1;
      $this$shallowCopy.n8f_1 = $newTerminology;
      return Unit_instance;
    };
  }
  function ClazzEditViewModel$slambda$slambda$slambda_17(this$0, resultContinuation) {
    this.zqa_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_17).jop = function (result, $completion) {
    var tmp = this.kop(result, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_17).he = function (p1, $completion) {
    return this.jop(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_17).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp_0 = this.aqb_1.qoo_1;
          var tmp0_elvis_lhs = tmp_0 instanceof CourseTerminology ? tmp_0 : null;
          var tmp_1;
          if (tmp0_elvis_lhs == null) {
            return Unit_instance;
          } else {
            tmp_1 = tmp0_elvis_lhs;
          }
          var newTerminology = tmp_1;
          var tmp1_safe_receiver = this.zqa_1.nq6_1.t2().sq6_1;
          var tmp_2;
          if (tmp1_safe_receiver == null) {
            tmp_2 = null;
          } else {
            tmp_2 = shallowCopy_3(tmp1_safe_receiver, ClazzEditViewModel$slambda$slambda$slambda$lambda_2(newTerminology));
          }
          this.zqa_1.qqa(tmp_2);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_17).kop = function (result, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_17(this.zqa_1, completion);
    i.aqb_1 = result;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda$slambda_18(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_17(this$0, resultContinuation);
    var l = function (result, $completion) {
      return i.jop(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda$slambda$lambda_3($newDescription) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.w8c_1 = $newDescription;
      return Unit_instance;
    };
  }
  function ClazzEditViewModel$slambda$slambda$slambda_19(this$0, resultContinuation) {
    this.jqb_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_19).jop = function (result, $completion) {
    var tmp = this.kop(result, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_19).he = function (p1, $completion) {
    return this.jop(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_19).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp_0 = this.kqb_1.qoo_1;
          var tmp0_elvis_lhs = (!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) ? tmp_0 : null;
          var tmp_1;
          if (tmp0_elvis_lhs == null) {
            return Unit_instance;
          } else {
            tmp_1 = tmp0_elvis_lhs;
          }
          var newDescription = tmp_1;
          var tmp1_safe_receiver = this.jqb_1.nq6_1.t2().sq6_1;
          var tmp_2;
          if (tmp1_safe_receiver == null) {
            tmp_2 = null;
          } else {
            tmp_2 = shallowCopy_3(tmp1_safe_receiver, ClazzEditViewModel$slambda$slambda$slambda$lambda_3(newDescription));
          }
          this.jqb_1.qqa(tmp_2);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda$slambda_19).kop = function (result, completion) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_19(this.jqb_1, completion);
    i.kqb_1 = result;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda$slambda_20(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda$slambda_19(this$0, resultContinuation);
    var l = function (result, $completion) {
      return i.jop(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.tqb_1 = this$0;
    this.uqb_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda).wqb = function ($this$async, $completion) {
    var tmp = this.v1m($this$async, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.wqb((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = Companion_instance_32.a4r();
            var tmp_1 = ClazzEditViewModel$slambda$slambda$slambda_0(this.tqb_1, null);
            var tmp_2 = ClazzEditViewModel$slambda$slambda$slambda_2(this.tqb_1, this.uqb_1, null);
            suspendResult = this.tqb_1.tp2(tmp_0, VOID, VOID, tmp_1, tmp_2, ClazzEditViewModel$slambda$slambda$lambda(this.tqb_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var this_0 = suspendResult;
            Companion_getInstance_110();
            var tmp1_safe_receiver = this_0 == null ? null : this_0.o8f_1;
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.v8f_1;
            setIfNoValueSetYet(this.uqb_1, 'initPicUri', tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs);
            return this_0;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda).v1m = function ($this$async, completion) {
    var i = new ClazzEditViewModel$slambda$slambda(this.tqb_1, this.uqb_1, completion);
    i.vqb_1 = $this$async;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$async, $completion) {
      return i.wqb($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.fqc_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda_1).hqc = function ($this$async, $completion) {
    var tmp = this.v1m($this$async, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda_1).he = function (p1, $completion) {
    return this.hqc((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = ListSerializer(Companion_instance_28.a4r());
            var tmp_1 = listOf_0('schedule');
            var tmp_2 = ClazzEditViewModel$slambda$slambda$slambda_4(this.fqc_1, null);
            var tmp_3 = ClazzEditViewModel$slambda$slambda$slambda_6(null);
            suspendResult = this.fqc_1.tp2(tmp_0, tmp_1, VOID, tmp_2, tmp_3, ClazzEditViewModel$slambda$slambda$lambda_0(this.fqc_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_1).v1m = function ($this$async, completion) {
    var i = new ClazzEditViewModel$slambda$slambda_1(this.fqc_1, completion);
    i.gqc_1 = $this$async;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($this$async, $completion) {
      return i.hqc($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda_3(this$0, resultContinuation) {
    this.qqc_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda_3).sqc = function ($this$async, $completion) {
    var tmp = this.v1m($this$async, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda_3).he = function (p1, $completion) {
    return this.sqc((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = ListSerializer(Companion_getInstance_13().a4r());
            var tmp_1 = listOf_0('courseblocks');
            var tmp_2 = ClazzEditViewModel$slambda$slambda$slambda_8(this.qqc_1, null);
            var tmp_3 = ClazzEditViewModel$slambda$slambda$slambda_10(null);
            suspendResult = this.qqc_1.tp2(tmp_0, tmp_1, VOID, tmp_2, tmp_3, ClazzEditViewModel$slambda$slambda$lambda_1(this.qqc_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_3).v1m = function ($this$async, completion) {
    var i = new ClazzEditViewModel$slambda$slambda_3(this.qqc_1, completion);
    i.rqc_1 = $this$async;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda_3(this$0, resultContinuation);
    var l = function ($this$async, $completion) {
      return i.sqc($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda_5(this$0, resultContinuation) {
    this.bqd_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda_5).ype = function ($this$withContext, $completion) {
    var tmp = this.v1m($this$withContext, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda_5).he = function (p1, $completion) {
    return this.ype((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = this.bqd_1.z4q();
          var value = this.bqd_1.nq6_1.t2();
          var this_1 = this_0.g45();
          var this_2 = serializer(this_1, createKType(getKClass(ClazzEditUiState), arrayOf([]), false));
          return this_0.e45(isInterface(this_2, KSerializer) ? this_2 : THROW_CCE(), value);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_5).v1m = function ($this$withContext, completion) {
    var i = new ClazzEditViewModel$slambda$slambda_5(this.bqd_1, completion);
    i.cqd_1 = $this$withContext;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda_5(this$0, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.ype($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda_7(this$0, $savedStateHandle, resultContinuation) {
    this.lqd_1 = this$0;
    this.mqd_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda_7).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda_7).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_7).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.lqd_1.np2(this.lqd_1.ip2(), 'Schedule');
            var tmp_1 = ClazzEditViewModel$slambda$slambda$slambda_12(this.lqd_1, this.mqd_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_10(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_7).v1m = function ($this$launch, completion) {
    var i = new ClazzEditViewModel$slambda$slambda_7(this.lqd_1, this.mqd_1, completion);
    i.nqd_1 = $this$launch;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda_8(this$0, $savedStateHandle, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda_7(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda_9(this$0, resultContinuation) {
    this.wqd_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda_9).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda_9).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_9).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.wqd_1.np2(this.wqd_1.ip2(), 'courseblock');
            var tmp_1 = ClazzEditViewModel$slambda$slambda$slambda_14(this.wqd_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_10(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_9).v1m = function ($this$launch, completion) {
    var i = new ClazzEditViewModel$slambda$slambda_9(this.wqd_1, completion);
    i.xqd_1 = $this$launch;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda_10(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda_9(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda_11(this$0, resultContinuation) {
    this.gqe_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda_11).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda_11).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_11).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.gqe_1.np2(this.gqe_1.ip2(), 'timeZone');
            var tmp_1 = ClazzEditViewModel$slambda$slambda$slambda_16(this.gqe_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_10(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_11).v1m = function ($this$launch, completion) {
    var i = new ClazzEditViewModel$slambda$slambda_11(this.gqe_1, completion);
    i.hqe_1 = $this$launch;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda_12(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda_11(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda_13(this$0, resultContinuation) {
    this.qqe_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda_13).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda_13).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_13).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.qqe_1.np2(this.qqe_1.ip2(), 'terminology');
            var tmp_1 = ClazzEditViewModel$slambda$slambda$slambda_18(this.qqe_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_10(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_13).v1m = function ($this$launch, completion) {
    var i = new ClazzEditViewModel$slambda$slambda_13(this.qqe_1, completion);
    i.rqe_1 = $this$launch;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda_14(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda_13(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda$slambda_15(this$0, resultContinuation) {
    this.aqf_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda$slambda_15).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda$slambda_15).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_15).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.aqf_1.np2(this.aqf_1.ip2(), 'clazzDescriptionHtml');
            var tmp_1 = ClazzEditViewModel$slambda$slambda$slambda_20(this.aqf_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_10(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda$slambda_15).v1m = function ($this$launch, completion) {
    var i = new ClazzEditViewModel$slambda$slambda_15(this.aqf_1, completion);
    i.bqf_1 = $this$launch;
    return i;
  };
  function ClazzEditViewModel$slambda$slambda_16(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda$slambda_15(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.cqf();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function ClazzEditViewModel$onClickSave$slambda$slambda$lambda($clazzUid) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.wgr_1 = $clazzUid;
      return Unit_instance;
    };
  }
  function ClazzEditViewModel$onClickSave$slambda$slambda$lambda_0(it) {
    return it.pgr_1;
  }
  function ClazzEditViewModel$onClickSave$slambda$slambda$lambda_1(it) {
    return it.yj5_1.w7w_1;
  }
  function ClazzEditViewModel$onClickSave$slambda$slambda$lambda_2(it) {
    return it.q7s_1;
  }
  function ClazzEditViewModel$onClickSave$slambda$slambda$lambda_3(it) {
    return it.kff_1;
  }
  function invoke$lambda_1($clazzLogCreatorManager$delegate) {
    // Inline function 'kotlin.getValue' call
    getLocalDelegateReference('clazzLogCreatorManager', KProperty0, false, function () {
      return THROW_ISE();
    });
    return $clazzLogCreatorManager$delegate.t2();
  }
  function ClazzEditViewModel$onClickSave$slambda$slambda(this$0, $initEntity, $updateImage, $coursePictureVal, $entity, $initState, $courseBlockListVal, $updatedCourseBlockPictures, resultContinuation) {
    this.lqf_1 = this$0;
    this.mqf_1 = $initEntity;
    this.nqf_1 = $updateImage;
    this.oqf_1 = $coursePictureVal;
    this.pqf_1 = $entity;
    this.qqf_1 = $initState;
    this.rqf_1 = $courseBlockListVal;
    this.sqf_1 = $updatedCourseBlockPictures;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$onClickSave$slambda$slambda).fmp = function (it, $completion) {
    var tmp = this.gmp(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$onClickSave$slambda$slambda).he = function (p1, $completion) {
    return this.fmp(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$onClickSave$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 20;
            if (this.lqf_1.rp7_1.equals(new Long(0, 0))) {
              this.hd_1 = 2;
              suspendResult = _get_createNewClazzUseCase__mo489e(this.lqf_1).lnl(this.mqf_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.lqf_1.fp2().b7d().y8b(this.mqf_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.hd_1 = 3;
            continue $sm;
          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            if (this.nqf_1 ? !(this.oqf_1 == null) : false) {
              this.oqf_1.u8f_1 = systemTimeInMillis();
              this.hd_1 = 4;
              suspendResult = this.lqf_1.ep2().q7e().ddp(this.oqf_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 5;
              continue $sm;
            }

          case 4:
            this.hd_1 = 5;
            continue $sm;
          case 5:
            this.uqf_1 = this.pqf_1.u8c_1;
            var tmp_0 = this;
            var this_0 = this.lqf_1.nq6_1.t2().wq6_1;
            var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var item = tmp0_iterator.e();
              destination.i1(shallowCopy_4(item, ClazzEditViewModel$onClickSave$slambda$slambda$lambda(this.uqf_1)));
            }

            tmp_0.vqf_1 = destination;
            this.hd_1 = 6;
            suspendResult = this.lqf_1.fp2().a7e().tgq(this.vqf_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            this.hd_1 = 7;
            var tmp_1 = this.lqf_1.fp2().a7e();
            suspendResult = deactivateByUids(tmp_1, findKeysNotInOtherList(this.qqf_1.wq6_1, this.vqf_1, ClazzEditViewModel$onClickSave$slambda$slambda$lambda_0), systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            this.wqf_1 = this.lqf_1.jq6_1.pnx(this.rqf_1);
            this.hd_1 = 8;
            var tmp_2 = this.lqf_1.fp2().c7d();
            var this_1 = this.wqf_1;
            var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
            var tmp0_iterator_0 = this_1.w();
            while (tmp0_iterator_0.f()) {
              var item_0 = tmp0_iterator_0.e();
              destination_0.i1(item_0.yj5_1);
            }

            suspendResult = tmp_2.hc6(destination_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 8:
            this.hd_1 = 9;
            var tmp_3 = this.lqf_1.fp2().c7d();
            suspendResult = deactivateByUids_0(tmp_3, findKeysNotInOtherList(this.qqf_1.xq6_1, this.wqf_1, ClazzEditViewModel$onClickSave$slambda$slambda$lambda_1), systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 9:
            var tmp_4 = this;
            var this_2 = this.rqf_1;
            var destination_1 = ArrayList_init_$Create$();
            var tmp0_iterator_1 = this_2.w();
            while (tmp0_iterator_1.f()) {
              var element = tmp0_iterator_1.e();
              var tmp0_safe_receiver = element.fj6_1;
              if (tmp0_safe_receiver == null)
                null;
              else {
                destination_1.i1(tmp0_safe_receiver);
              }
            }

            tmp_4.xqf_1 = destination_1;
            this.hd_1 = 10;
            suspendResult = this.lqf_1.fp2().d7e().u7r(this.xqf_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 10:
            var tmp_5 = this;
            var this_3 = this.qqf_1.xq6_1;
            var destination_2 = ArrayList_init_$Create$();
            var tmp0_iterator_2 = this_3.w();
            while (tmp0_iterator_2.f()) {
              var element_0 = tmp0_iterator_2.e();
              var tmp0_safe_receiver_0 = element_0.fj6_1;
              if (tmp0_safe_receiver_0 == null)
                null;
              else {
                destination_2.i1(tmp0_safe_receiver_0);
              }
            }

            tmp_5.yqf_1 = findKeysNotInOtherList(destination_2, this.xqf_1, ClazzEditViewModel$onClickSave$slambda$slambda$lambda_2);
            var tmp_6 = this;
            var this_4 = this.lqf_1.fp2().d7e();
            var tmp_7;
            if (!this.yqf_1.c1()) {
              tmp_7 = this_4;
            } else {
              tmp_7 = null;
            }

            tmp_6.zqf_1 = tmp_7;
            if (this.zqf_1 == null) {
              this.aqg_1 = null;
              this.hd_1 = 12;
              continue $sm;
            } else {
              this.hd_1 = 11;
              suspendResult = this.zqf_1.v7r(this.yqf_1, false, systemTimeInMillis(), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 11:
            var tmp_8 = this;
            tmp_8.aqg_1 = Unit_instance;
            this.hd_1 = 12;
            continue $sm;
          case 12:
            var tmp_9 = this;
            var this_5 = this.rqf_1;
            var destination_3 = ArrayList_init_$Create$();
            var tmp0_iterator_3 = this_5.w();
            while (tmp0_iterator_3.f()) {
              var element_1 = tmp0_iterator_3.e();
              var list = element_1.hj6_1;
              addAll(destination_3, list);
            }

            tmp_9.bqg_1 = destination_3;
            var tmp_10 = this;
            var this_6 = this.qqf_1.xq6_1;
            var destination_4 = ArrayList_init_$Create$();
            var tmp0_iterator_4 = this_6.w();
            while (tmp0_iterator_4.f()) {
              var element_2 = tmp0_iterator_4.e();
              var list_0 = element_2.hj6_1;
              addAll(destination_4, list_0);
            }

            tmp_10.cqg_1 = destination_4;
            this.hd_1 = 13;
            var tmp_11 = this.lqf_1.fp2().t7e();
            suspendResult = deactivateByUids_1(tmp_11, findKeysNotInOtherList(this.cqg_1, this.bqg_1, ClazzEditViewModel$onClickSave$slambda$slambda$lambda_3), systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 13:
            this.hd_1 = 14;
            suspendResult = this.lqf_1.fp2().t7e().qfe(this.bqg_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 14:
            var tmp_12 = this;
            var this_7 = this.rqf_1;
            var destination_5 = ArrayList_init_$Create$();
            var tmp0_iterator_5 = this_7.w();
            while (tmp0_iterator_5.f()) {
              var element_3 = tmp0_iterator_5.e();
              var tmp0_safe_receiver_1 = element_3.cj6_1;
              if (tmp0_safe_receiver_1 == null)
                null;
              else {
                destination_5.i1(tmp0_safe_receiver_1);
              }
            }

            tmp_12.dqg_1 = destination_5;
            this.eqg_1 = this.dqg_1.w();
            this.hd_1 = 15;
            continue $sm;
          case 15:
            if (!this.eqg_1.f()) {
              this.hd_1 = 17;
              continue $sm;
            }

            this.fqg_1 = this.eqg_1.e();
            var tmp_13 = this;
            tmp_13.gqg_1 = this.fqg_1;
            this.hd_1 = 16;
            suspendResult = this.lqf_1.lq6_1.tnr(this.gqg_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 16:
            this.hd_1 = 15;
            continue $sm;
          case 17:
            var tmp_14 = this;
            var this_8 = this.lqf_1.ep2().d7f();
            var tmp_15;
            if (!this.sqf_1.c1()) {
              tmp_15 = this_8;
            } else {
              tmp_15 = null;
            }

            tmp_14.hqg_1 = tmp_15;
            if (this.hqg_1 == null) {
              this.iqg_1 = null;
              this.hd_1 = 19;
              continue $sm;
            } else {
              this.hd_1 = 18;
              suspendResult = this.hqg_1.ecm(this.sqf_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 18:
            var tmp_16 = this;
            tmp_16.iqg_1 = Unit_instance;
            this.hd_1 = 19;
            continue $sm;
          case 19:
            Napier_getInstance().v5d('onClickSave: transaction block done');
            return Unit_instance;
          case 20:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 20) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$onClickSave$slambda$slambda).gmp = function (it, completion) {
    var i = new ClazzEditViewModel$onClickSave$slambda$slambda(this.lqf_1, this.mqf_1, this.nqf_1, this.oqf_1, this.pqf_1, this.qqf_1, this.rqf_1, this.sqf_1, completion);
    i.tqf_1 = it;
    return i;
  };
  function ClazzEditViewModel$onClickSave$slambda$slambda_0(this$0, $initEntity, $updateImage, $coursePictureVal, $entity, $initState, $courseBlockListVal, $updatedCourseBlockPictures, resultContinuation) {
    var i = new ClazzEditViewModel$onClickSave$slambda$slambda(this$0, $initEntity, $updateImage, $coursePictureVal, $entity, $initState, $courseBlockListVal, $updatedCourseBlockPictures, resultContinuation);
    var l = function (it, $completion) {
      return i.fmp(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$updateCourseBlock$slambda$lambda($updatedBlock) {
    return function (it) {
      return it.yj5_1.w7w_1.equals($updatedBlock.yj5_1.w7w_1);
    };
  }
  function _get_createNewClazzUseCase__mo489e($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.qq6_1;
    createNewClazzUseCase$factory_0();
    return this_0.t2();
  }
  function updateCourseBlockList($this, newCourseBlockList, $completion) {
    var tmp = new $updateCourseBlockListCOROUTINE$57($this, newCourseBlockList, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function hasErrors(_this__u8e3s4, $this) {
    return (!(_this__u8e3s4.tq6_1 == null) ? true : !(_this__u8e3s4.uq6_1 == null)) ? true : !(_this__u8e3s4.vq6_1 == null);
  }
  function updateCourseBlock($this, updatedBlock) {
    var tmp = $this.cp2();
    launch(tmp, VOID, VOID, ClazzEditViewModel$updateCourseBlock$slambda_0($this, updatedBlock, null));
  }
  function Companion_100() {
    this.uqg_1 = 'CourseEdit';
    this.vqg_1 = 'Schedule';
    this.wqg_1 = 'schedule';
    this.xqg_1 = 'courseblock';
    this.yqg_1 = 'timeZone';
    this.zqg_1 = 'terminology';
    this.aqh_1 = 'courseblocks';
    this.bqh_1 = 'clazzDescriptionHtml';
  }
  var Companion_instance_148;
  function Companion_getInstance_117() {
    return Companion_instance_148;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_10(function_0) {
    this.cqh_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_10).t1d = function (value, $completion) {
    return this.cqh_1(value, $completion);
  };
  function ClazzEditViewModel$slambda(this$0, resultContinuation) {
    this.lqh_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda).oqh = function (it, $completion) {
    var tmp = this.gmp(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda).he = function (p1, $completion) {
    return this.oqh(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            if (!this.lqh_1.rp7_1.equals(new Long(0, 0))) {
              this.hd_1 = 2;
              var tmp_0 = this.mqh_1.b7f();
              var tmp_1 = this.lqh_1.dp2();
              PermissionFlags_getInstance();
              suspendResult = tmp_0.gd5(tmp_1, this.lqh_1.rp7_1, new Long(2, 0), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 1;
              var tmp_2 = this.mqh_1.c7f();
              var tmp_3 = this.lqh_1.dp2();
              PermissionFlags_getInstance();
              suspendResult = tmp_2.thc(tmp_3, new Long(512, 0), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.nqh_1 = suspendResult;
            this.hd_1 = 3;
            continue $sm;
          case 2:
            this.nqh_1 = suspendResult;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return this.nqh_1;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda).gmp = function (it, completion) {
    var i = new ClazzEditViewModel$slambda(this.lqh_1, completion);
    i.mqh_1 = it;
    return i;
  };
  function ClazzEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.oqh(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$slambda_1($savedStateHandle, this$0, resultContinuation) {
    this.xqh_1 = $savedStateHandle;
    this.yqh_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$slambda_1).u1m = function ($this$launchIfHasPermission, $completion) {
    var tmp = this.v1m($this$launchIfHasPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            var tmp_0 = async(this.zqh_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_0(this.yqh_1, this.xqh_1, null));
            var tmp_1 = async(this.zqh_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_2(this.yqh_1, null));
            suspendResult = awaitAll([tmp_0, tmp_1, async(this.zqh_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_4(this.yqh_1, null))], this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            Companion_getInstance_112();
            if (this.xqh_1.ba('initState') == null) {
              var tmp_2 = this;
              Companion_getInstance_112();
              tmp_2.aqi_1 = 'initState';
              this.hd_1 = 2;
              var tmp_3 = Dispatchers_getInstance().p12_1;
              suspendResult = withContext(tmp_3, ClazzEditViewModel$slambda$slambda_6(this.yqh_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            var ARGUMENT = suspendResult;
            this.xqh_1.rox(this.aqi_1, ARGUMENT);
            this.hd_1 = 3;
            continue $sm;
          case 3:
            launch(this.zqh_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_8(this.yqh_1, this.xqh_1, null));
            launch(this.zqh_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_10(this.yqh_1, null));
            launch(this.zqh_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_12(this.yqh_1, null));
            launch(this.zqh_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_14(this.yqh_1, null));
            launch(this.zqh_1, VOID, VOID, ClazzEditViewModel$slambda$slambda_16(this.yqh_1, null));
            l$ret$1: do {
              var this_0 = this.yqh_1.nq6_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.zq6(true);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.yqh_1.pp1_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var tmp_4 = Companion_getInstance_85().vol_1;
                var tmp_5 = this.yqh_1.jp2().en6(strings_getInstance().alw_1);
                var nextValue_0 = prevValue_0.nol(VOID, tmp_4, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_5, VOID, ClazzEditViewModel$onClickSave$ref(this.yqh_1)));
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$slambda_1).v1m = function ($this$launchIfHasPermission, completion) {
    var i = new ClazzEditViewModel$slambda_1(this.xqh_1, this.yqh_1, completion);
    i.zqh_1 = $this$launchIfHasPermission;
    return i;
  };
  function ClazzEditViewModel$slambda_2($savedStateHandle, this$0, resultContinuation) {
    var i = new ClazzEditViewModel$slambda_1($savedStateHandle, this$0, resultContinuation);
    var l = function ($this$launchIfHasPermission, $completion) {
      return i.u1m($this$launchIfHasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$updateCourseBlockList$slambda(this$0, $newCourseBlockList, resultContinuation) {
    this.jqi_1 = this$0;
    this.kqi_1 = $newCourseBlockList;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$updateCourseBlockList$slambda).ype = function ($this$withContext, $completion) {
    var tmp = this.v1m($this$withContext, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$updateCourseBlockList$slambda).he = function (p1, $completion) {
    return this.ype((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$updateCourseBlockList$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return this.jqi_1.z4q().e45(ListSerializer(Companion_getInstance_13().a4r()), this.kqi_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$updateCourseBlockList$slambda).v1m = function ($this$withContext, completion) {
    var i = new ClazzEditViewModel$updateCourseBlockList$slambda(this.jqi_1, this.kqi_1, completion);
    i.lqi_1 = $this$withContext;
    return i;
  };
  function ClazzEditViewModel$updateCourseBlockList$slambda_0(this$0, $newCourseBlockList, resultContinuation) {
    var i = new ClazzEditViewModel$updateCourseBlockList$slambda(this$0, $newCourseBlockList, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.ype($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.uqi_1 = $commitDelay;
    this.vqi_1 = $entity;
    this.wqi_1 = $this;
    this.xqi_1 = $key;
    this.yqi_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$onEntityChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$onEntityChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$onEntityChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.uqi_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.vqi_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.wqi_1.pp2(this.wqi_1.lp1_1, this.xqi_1, this.yqi_1, this.vqi_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$onEntityChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzEditViewModel$onEntityChanged$slambda(this.uqi_1, this.vqi_1, this.wqi_1, this.xqi_1, this.yqi_1, completion);
    i.zqi_1 = $this$launch;
    return i;
  };
  function ClazzEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new ClazzEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$onCheckedAttendanceChanged$lambda($checked) {
    return function ($this$shallowCopy) {
      var tmp = $this$shallowCopy;
      var tmp_0;
      if ($checked) {
        Companion_getInstance_4();
        tmp_0 = new Long(1, 0);
      } else {
        tmp_0 = new Long(0, 0);
      }
      tmp.e8d_1 = tmp_0;
      return Unit_instance;
    };
  }
  function ClazzEditViewModel$onClickSave$lambda($initEntity) {
    return function ($this$shallowCopy) {
      var tmp = $this$shallowCopy;
      var tmp0_safe_receiver = $this$shallowCopy.v8c_1;
      var tmp_0;
      if (tmp0_safe_receiver == null) {
        tmp_0 = null;
      } else {
        // Inline function 'kotlin.text.trim' call
        tmp_0 = toString(trim(isCharSequence(tmp0_safe_receiver) ? tmp0_safe_receiver : THROW_CCE()));
      }
      tmp.v8c_1 = tmp_0;
      var tmp_1 = $this$shallowCopy;
      var tmp_2 = Companion_getInstance_6().zla($initEntity.c8d_1);
      // Inline function 'com.ustadmobile.core.util.ext.effectiveTimeZone' call
      var tmp0_elvis_lhs = $initEntity.m8d_1;
      var tmp$ret$1 = tmp0_elvis_lhs == null ? 'UTC' : tmp0_elvis_lhs;
      tmp_1.c8d_1 = toLocalMidnight(tmp_2, tmp$ret$1).yla();
      var tmp_3;
      var tmp_4 = $this$shallowCopy.d8d_1;
      Companion_getInstance_2();
      if (!tmp_4.equals(new Long(-1, 2147483647))) {
        var tmp_5 = $this$shallowCopy;
        var tmp_6 = Companion_getInstance_6().zla($initEntity.d8d_1);
        // Inline function 'com.ustadmobile.core.util.ext.effectiveTimeZone' call
        var tmp0_elvis_lhs_0 = $initEntity.m8d_1;
        var tmp$ret$2 = tmp0_elvis_lhs_0 == null ? 'UTC' : tmp0_elvis_lhs_0;
        tmp_5.d8d_1 = toLocalEndOfDay(tmp_6, tmp$ret$2).yla();
        tmp_3 = Unit_instance;
      }
      return Unit_instance;
    };
  }
  function ClazzEditViewModel$onClickSave$lambda_0(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.nq6_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onClickSave.<anonymous>.<anonymous>' call
          var nextValue = prevValue.zq6(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzEditViewModel$onClickSave$slambda(this$0, $entity, $initEntity, resultContinuation) {
    this.iqj_1 = this$0;
    this.jqj_1 = $entity;
    this.kqj_1 = $initEntity;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$onClickSave$slambda).m86 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$onClickSave$slambda).z77 = function ($completion) {
    return this.m86($completion);
  };
  protoOf(ClazzEditViewModel$onClickSave$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 12;
            this.hd_1 = 1;
            Companion_getInstance_112();
            suspendResult = this.iqj_1.op2(this.iqj_1.lp1_1, 'initState', Companion_getInstance_118().a4r(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.lqj_1 = suspendResult;
            var tmp_0 = this;
            var tmp_1;
            if (this.lqj_1 == null) {
              return Unit_instance;
            } else {
              tmp_1 = this.lqj_1;
            }

            tmp_0.mqj_1 = tmp_1;
            Napier_getInstance().v5d('onClickSave: start transaction');
            this.nqj_1 = this.iqj_1.nq6_1.t2().xq6_1;
            this.oqj_1 = this.jqj_1.o8f_1;
            var tmp_2 = this;
            var tmp_3;
            if (!(this.oqj_1 == null)) {
              Companion_getInstance_110();
              var tmp_4 = this.iqj_1.lp1_1.ba('initPicUri');
              var tmp1_safe_receiver = this.jqj_1.o8f_1;
              var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.v8f_1;
              tmp_3 = !(tmp_4 === (tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs));
            } else {
              tmp_3 = false;
            }

            tmp_2.pqj_1 = tmp_3;
            var tmp_5 = this;
            var this_0 = this.nqj_1;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              var tmp0_safe_receiver = element.zj5_1;
              var imageUriNow = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.b7y_1;
              var tmp$ret$0;
              l$ret$1: do {
                var tmp0_iterator_0 = this.mqj_1.xq6_1.w();
                while (tmp0_iterator_0.f()) {
                  var element_0 = tmp0_iterator_0.e();
                  var tmp0_safe_receiver_0 = element_0.zj5_1;
                  var tmp_6 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.z7x_1;
                  var tmp1_safe_receiver_0 = element.zj5_1;
                  if (equals(tmp_6, tmp1_safe_receiver_0 == null ? null : tmp1_safe_receiver_0.z7x_1)) {
                    tmp$ret$0 = element_0;
                    break l$ret$1;
                  }
                }
                tmp$ret$0 = null;
              }
               while (false);
              var tmp1_safe_receiver_1 = tmp$ret$0;
              var tmp2_safe_receiver = tmp1_safe_receiver_1 == null ? null : tmp1_safe_receiver_1.zj5_1;
              var initImageUri = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.b7y_1;
              var tmp3_safe_receiver = element.zj5_1;
              var tmp_7;
              if (tmp3_safe_receiver == null) {
                tmp_7 = null;
              } else {
                var tmp_8;
                if (!(imageUriNow == initImageUri)) {
                  tmp_8 = tmp3_safe_receiver;
                } else {
                  tmp_8 = null;
                }
                tmp_7 = tmp_8;
              }
              var tmp0_safe_receiver_1 = tmp_7;
              if (tmp0_safe_receiver_1 == null)
                null;
              else {
                destination.i1(tmp0_safe_receiver_1);
              }
            }

            tmp_5.qqj_1 = destination;
            this.hd_1 = 2;
            var tmp_9 = this.iqj_1.ep2();
            suspendResult = withDoorTransactionAsync(tmp_9, VOID, ClazzEditViewModel$onClickSave$slambda$slambda_0(this.iqj_1, this.kqj_1, this.pqj_1, this.oqj_1, this.jqj_1, this.mqj_1, this.nqj_1, this.qqj_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            Napier_getInstance().v5d('onClickSave: transaction done');
            var tmp_10 = this;
            tmp_10.rqj_1 = this.nqj_1;
            this.sqj_1 = this.rqj_1.w();
            this.hd_1 = 3;
            continue $sm;
          case 3:
            if (!this.sqj_1.f()) {
              this.hd_1 = 6;
              continue $sm;
            }

            this.tqj_1 = this.sqj_1.e();
            var tmp_11 = this;
            tmp_11.uqj_1 = this.tqj_1;
            this.vqj_1 = this.uqj_1.aj6_1;
            if (this.vqj_1 == null) {
              this.wqj_1 = null;
              this.hd_1 = 5;
              continue $sm;
            } else {
              var tmp_12 = this;
              tmp_12.xqj_1 = this.vqj_1;
              var tmp_13 = this;
              tmp_13.yqj_1 = this.xqj_1;
              this.hd_1 = 4;
              var tmp$ret$2;
              l$ret$3: do {
                var tmp0_iterator_1 = this.mqj_1.xq6_1.w();
                while (tmp0_iterator_1.f()) {
                  var element_1 = tmp0_iterator_1.e();
                  var tmp0_safe_receiver_2 = element_1.zj5_1;
                  var tmp_14 = tmp0_safe_receiver_2 == null ? null : tmp0_safe_receiver_2.z7x_1;
                  var tmp1_safe_receiver_2 = this.uqj_1.zj5_1;
                  if (equals(tmp_14, tmp1_safe_receiver_2 == null ? null : tmp1_safe_receiver_2.z7x_1)) {
                    tmp$ret$2 = element_1;
                    break l$ret$3;
                  }
                }
                tmp$ret$2 = null;
              }
               while (false);
              var tmp0_safe_receiver_3 = tmp$ret$2;
              var tmp1_safe_receiver_3 = tmp0_safe_receiver_3 == null ? null : tmp0_safe_receiver_3.zj5_1;
              suspendResult = this.iqj_1.kq6_1.mnx(this.yqj_1, null, this.uqj_1.bj6_1, tmp1_safe_receiver_3 == null ? null : tmp1_safe_receiver_3.b7y_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 4:
            this.wqj_1 = this.xqj_1;
            this.hd_1 = 5;
            continue $sm;
          case 5:
            this.hd_1 = 3;
            continue $sm;
          case 6:
            var tmp_15 = this;
            var this_1 = this.iqj_1.mq6_1;
            var tmp_16;
            if (this.pqj_1) {
              tmp_16 = this_1;
            } else {
              tmp_16 = null;
            }

            tmp_15.zqj_1 = tmp_16;
            if (this.zqj_1 == null) {
              this.aqk_1 = null;
              this.hd_1 = 8;
              continue $sm;
            } else {
              this.hd_1 = 7;
              var tmp_17 = this.jqj_1.u8c_1;
              var tmp3_safe_receiver_0 = this.oqj_1;
              suspendResult = this.zqj_1.pne(tmp_17, 125, tmp3_safe_receiver_0 == null ? null : tmp3_safe_receiver_0.v8f_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 7:
            var tmp_18 = this;
            tmp_18.aqk_1 = Unit_instance;
            this.hd_1 = 8;
            continue $sm;
          case 8:
            var tmp_19 = this;
            tmp_19.bqk_1 = this.qqj_1;
            this.cqk_1 = this.bqk_1.w();
            this.hd_1 = 9;
            continue $sm;
          case 9:
            if (!this.cqk_1.f()) {
              this.hd_1 = 11;
              continue $sm;
            }

            this.dqk_1 = this.cqk_1.e();
            var tmp_20 = this;
            tmp_20.eqk_1 = this.dqk_1;
            this.hd_1 = 10;
            var tmp_21 = this.eqk_1.z7x_1;
            suspendResult = this.iqj_1.mq6_1.pne(tmp_21, 6677, this.eqk_1.b7y_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 10:
            this.hd_1 = 9;
            continue $sm;
          case 11:
            var tmp_22 = Companion_getInstance_9();
            var tmp0_elvis_lhs = this.jqj_1.m8d_1;
            var entityTimeZone = tmp_22.pla(tmp0_elvis_lhs == null ? 'UTC' : tmp0_elvis_lhs);
            var fromLocalDate = toLocalMidnight_1(toLocalDateTime(System_instance.sl7(), entityTimeZone));
            var this_2 = this.iqj_1.n56();
            var tmp_23 = typeToken(createKType(getKClass(ClazzLogCreatorManager), arrayOf([]), false));
            var clazzLogCreatorManager$delegate = Instance(this_2, isInterface(tmp_23, TypeToken) ? tmp_23 : THROW_CCE(), null).n5c(null, getLocalDelegateReference('clazzLogCreatorManager', KProperty0, false, function () {
              return THROW_ISE();
            }));
            invoke$lambda_1(clazzLogCreatorManager$delegate).joq(this.jqj_1.u8c_1, this.iqj_1.bp2().vmx().jju_1, toInstant(fromLocalDate, entityTimeZone).yla(), toInstant(toLocalEndOfDay_1(fromLocalDate), entityTimeZone).yla());
            Napier_getInstance().v5d('onClickSave: done');
            this.iqj_1.tp7('Course', this.jqj_1.u8c_1, this.jqj_1);
            return Unit_instance;
          case 12:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 12) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$onClickSave$slambda).y77 = function (completion) {
    return new ClazzEditViewModel$onClickSave$slambda(this.iqj_1, this.jqj_1, this.kqj_1, completion);
  };
  function ClazzEditViewModel$onClickSave$slambda_0(this$0, $entity, $initEntity, resultContinuation) {
    var i = new ClazzEditViewModel$onClickSave$slambda(this$0, $entity, $initEntity, resultContinuation);
    var l = function ($completion) {
      return i.m86($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzEditViewModel$onCourseBlockMoved$slambda(this$0, $newList, resultContinuation) {
    this.pqk_1 = this$0;
    this.qqk_1 = $newList;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$onCourseBlockMoved$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$onCourseBlockMoved$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$onCourseBlockMoved$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = updateCourseBlockList(this.pqk_1, this.qqk_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$onCourseBlockMoved$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzEditViewModel$onCourseBlockMoved$slambda(this.pqk_1, this.qqk_1, completion);
    i.rqk_1 = $this$launch;
    return i;
  };
  function ClazzEditViewModel$onCourseBlockMoved$slambda_0(this$0, $newList, resultContinuation) {
    var i = new ClazzEditViewModel$onCourseBlockMoved$slambda(this$0, $newList, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$updateCourseBlock$slambda(this$0, $updatedBlock, resultContinuation) {
    this.aql_1 = this$0;
    this.bql_1 = $updatedBlock;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$updateCourseBlock$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$updateCourseBlock$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$updateCourseBlock$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.aql_1.nq6_1.t2().xq6_1;
            suspendResult = updateCourseBlockList(this.aql_1, replace_0(tmp_0, this.bql_1, ClazzEditViewModel$updateCourseBlock$slambda$lambda(this.bql_1)), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$updateCourseBlock$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzEditViewModel$updateCourseBlock$slambda(this.aql_1, this.bql_1, completion);
    i.cql_1 = $this$launch;
    return i;
  };
  function ClazzEditViewModel$updateCourseBlock$slambda_0(this$0, $updatedBlock, resultContinuation) {
    var i = new ClazzEditViewModel$updateCourseBlock$slambda(this$0, $updatedBlock, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEditViewModel$onClickDeleteCourseBlock$slambda(this$0, $block, resultContinuation) {
    this.lql_1 = this$0;
    this.mql_1 = $block;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEditViewModel$onClickDeleteCourseBlock$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEditViewModel$onClickDeleteCourseBlock$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEditViewModel$onClickDeleteCourseBlock$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var this_0 = this.lql_1.nq6_1.t2().xq6_1;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              if (!element.yj5_1.w7w_1.equals(this.mql_1.yj5_1.w7w_1)) {
                destination.i1(element);
              }
            }

            suspendResult = updateCourseBlockList(this.lql_1, destination, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEditViewModel$onClickDeleteCourseBlock$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzEditViewModel$onClickDeleteCourseBlock$slambda(this.lql_1, this.mql_1, completion);
    i.nql_1 = $this$launch;
    return i;
  };
  function ClazzEditViewModel$onClickDeleteCourseBlock$slambda_0(this$0, $block, resultContinuation) {
    var i = new ClazzEditViewModel$onClickDeleteCourseBlock$slambda(this$0, $block, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $updateCourseBlockListCOROUTINE$57(_this__u8e3s4, newCourseBlockList, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.rqg_1 = _this__u8e3s4;
    this.sqg_1 = newCourseBlockList;
  }
  protoOf($updateCourseBlockListCOROUTINE$57).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            l$ret$1: do {
              var this_0 = this.rqg_1.nq6_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.zq6(VOID, VOID, VOID, VOID, VOID, VOID, this.sqg_1);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.tqg_1 = this.rqg_1.lp1_1;
            this.hd_1 = 1;
            var tmp_0 = Dispatchers_getInstance().p12_1;
            suspendResult = withContext(tmp_0, ClazzEditViewModel$updateCourseBlockList$slambda_0(this.rqg_1, this.sqg_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            this.tqg_1.rox('courseblocks', ARGUMENT);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function ClazzEditViewModel(di, savedStateHandle, addOrUpdateCourseBlockUseCase, updateCourseBlocksOnReorderOrCommitUseCase, saveContentEntryUseCase, importContentUseCase, enqueueSavePictureUseCase) {
    addOrUpdateCourseBlockUseCase = addOrUpdateCourseBlockUseCase === VOID ? new AddOrUpdateCourseBlockUseCase() : addOrUpdateCourseBlockUseCase;
    updateCourseBlocksOnReorderOrCommitUseCase = updateCourseBlocksOnReorderOrCommitUseCase === VOID ? new UpdateCourseBlocksOnReorderOrCommitUseCase() : updateCourseBlocksOnReorderOrCommitUseCase;
    var tmp;
    if (saveContentEntryUseCase === VOID) {
      // Inline function 'org.kodein.di.instance' call
      var tmp_0 = get_direct(onActiveEndpoint(di)).s57();
      // Inline function 'org.kodein.type.generic' call
      var tmp_1 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
      var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
      var tmp_2 = tmp_0.q57(tmp$ret$0, 1);
      // Inline function 'org.kodein.di.instanceOrNull' call
      var tmp_3 = get_direct(onActiveEndpoint(di)).s57();
      // Inline function 'org.kodein.type.generic' call
      var tmp_4 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
      var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
      var tmp_5 = tmp_3.r57(tmp$ret$2, 2);
      // Inline function 'org.kodein.di.instance' call
      var tmp_6 = get_direct(onActiveEndpoint(di)).s57();
      // Inline function 'org.kodein.type.generic' call
      var tmp_7 = typeToken(createKType(getKClass(EnqueueSavePictureUseCase), arrayOf([]), false));
      var tmp$ret$4 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
      var tmp$ret$5 = tmp_6.q57(tmp$ret$4, null);
      tmp = new SaveContentEntryUseCase(tmp_2, tmp_5, tmp$ret$5);
    } else {
      tmp = saveContentEntryUseCase;
    }
    saveContentEntryUseCase = tmp;
    var tmp_8;
    if (importContentUseCase === VOID) {
      // Inline function 'org.kodein.di.instance' call
      var tmp_9 = get_direct(onActiveEndpoint(di)).s57();
      // Inline function 'org.kodein.type.generic' call
      var tmp_10 = typeToken(createKType(getKClass(EnqueueContentEntryImportUseCase), arrayOf([]), false));
      var tmp$ret$0_0 = isInterface(tmp_10, TypeToken) ? tmp_10 : THROW_CCE();
      tmp_8 = tmp_9.q57(tmp$ret$0_0, null);
    } else {
      tmp_8 = importContentUseCase;
    }
    importContentUseCase = tmp_8;
    var tmp_11;
    if (enqueueSavePictureUseCase === VOID) {
      // Inline function 'org.kodein.di.instance' call
      var tmp_12 = get_direct(onActiveEndpoint(di)).s57();
      // Inline function 'org.kodein.type.generic' call
      var tmp_13 = typeToken(createKType(getKClass(EnqueueSavePictureUseCase), arrayOf([]), false));
      var tmp$ret$0_1 = isInterface(tmp_13, TypeToken) ? tmp_13 : THROW_CCE();
      tmp_11 = tmp_12.q57(tmp$ret$0_1, null);
    } else {
      tmp_11 = enqueueSavePictureUseCase;
    }
    enqueueSavePictureUseCase = tmp_11;
    UstadEditViewModel.call(this, di, savedStateHandle, 'CourseEdit');
    this.iq6_1 = addOrUpdateCourseBlockUseCase;
    this.jq6_1 = updateCourseBlocksOnReorderOrCommitUseCase;
    this.kq6_1 = saveContentEntryUseCase;
    this.lq6_1 = importContentUseCase;
    this.mq6_1 = enqueueSavePictureUseCase;
    this.nq6_1 = MutableStateFlow(new ClazzEditUiState());
    this.oq6_1 = asStateFlow(this.nq6_1);
    var tmp_14 = this;
    Companion_getInstance_112();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    var tmp_15;
    if (tmp1_elvis_lhs == null) {
      var tmp_16 = get_doorPrimaryKeyManager(this.ep2());
      Companion_getInstance_4();
      tmp_15 = tmp_16.a62(6);
    } else {
      tmp_15 = tmp1_elvis_lhs;
    }
    tmp_14.pq6_1 = tmp_15;
    var tmp_17 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_18 = typeToken(createKType(getKClass(CreateNewClazzUseCase), arrayOf([]), false));
    var tmp$ret$10 = isInterface(tmp_18, TypeToken) ? tmp_18 : THROW_CCE();
    tmp_17.qq6_1 = Instance(this_0, tmp$ret$10, null).n5c(this, createNewClazzUseCase$factory());
    var title = this.vp8(strings_getInstance().ymb_1, strings_getInstance().amc_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.pp1_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.<anonymous>' call
        var tmp0_loadingState = Companion_getInstance_85().uol_1;
        var nextValue = new AppUiState(VOID, tmp0_loadingState, title, VOID, true);
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_19 = ClazzEditViewModel$slambda_0(this, null);
    this.vp2(tmp_19, VOID, VOID, ClazzEditViewModel$slambda_2(savedStateHandle, this, null));
  }
  protoOf(ClazzEditViewModel).qqa = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.nq6_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onEntityChanged.<anonymous>' call
        var tmp2_safe_receiver = prevValue.sq6_1;
        var tmp = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.d8d_1;
        var tmp6_clazzEndDateError = this.wp8(tmp, entity == null ? null : entity.d8d_1, prevValue.uq6_1);
        var tmp0_safe_receiver = prevValue.sq6_1;
        var tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.c8d_1;
        var tmp7_clazzStartDateError = this.wp8(tmp_0, entity == null ? null : entity.c8d_1, prevValue.tq6_1);
        var tmp4_safe_receiver = prevValue.sq6_1;
        var tmp_1 = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.v8c_1;
        var tmp8_clazzNameError = this.wp8(tmp_1, entity == null ? null : entity.v8c_1, prevValue.vq6_1);
        var nextValue = prevValue.zq6(VOID, entity, tmp7_clazzStartDateError, tmp6_clazzEndDateError, tmp8_clazzNameError);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_32.a4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_112();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.qp7_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_2 = this;
    var tmp_3 = this.cp2();
    tmp_2.qp7_1 = launch(tmp_3, VOID, VOID, ClazzEditViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(ClazzEditViewModel).oql = function (checked) {
    var tmp0_safe_receiver = this.nq6_1.t2().sq6_1;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      tmp = shallowCopy_3(tmp0_safe_receiver, ClazzEditViewModel$onCheckedAttendanceChanged$lambda(checked));
    }
    this.qqa(tmp);
  };
  protoOf(ClazzEditViewModel).pql = function () {
    this.rp2('ScheduleEdit', 'Schedule', null, Companion_instance_28.a4r());
  };
  protoOf(ClazzEditViewModel).qql = function (schedule) {
    this.rp2('ScheduleEdit', 'Schedule', schedule, Companion_instance_28.a4r());
  };
  protoOf(ClazzEditViewModel).rql = function (schedule) {
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var this_0 = this.nq6_1.t2().wq6_1;
    var destination = ArrayList_init_$Create$();
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onClickDeleteSchedule.<anonymous>' call
      if (!element.pgr_1.equals(schedule.pgr_1)) {
        destination.i1(element);
      }
    }
    var newSchedules = destination;
    this.lp1_1.rox('schedule', this.z4q().e45(ListSerializer(Companion_instance_28.a4r()), newSchedules));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.nq6_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onClickDeleteSchedule.<anonymous>' call
        var nextValue = prevValue.zq6(VOID, VOID, VOID, VOID, VOID, newSchedules);
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzEditViewModel).sql = function (blockType) {
    if (blockType === 104) {
      Companion_getInstance_148();
      var tmp = Companion_getInstance_13().a4r();
      Companion_getInstance_102();
      var tmp_0 = to('listMode', ListViewMode_PICKER_getInstance().toString());
      Companion_getInstance_102();
      var tmp_1 = to('clazzUid', this.pq6_1.toString());
      Companion_getInstance_153();
      var tmp_2 = to('blockType', (104).toString());
      this.rp2('ContentEntries', 'courseblock', null, tmp, mapOf([tmp_0, tmp_1, tmp_2, to('goToOnContentEntryDone', (1).toString())]));
      return Unit_instance;
    }
    var tmp_3;
    var tmp_4;
    var tmp_5;
    if (blockType === 105) {
      tmp_5 = true;
    } else {
      tmp_5 = blockType === 102;
    }
    if (tmp_5) {
      tmp_4 = true;
    } else {
      tmp_4 = blockType === 100;
    }
    if (tmp_4) {
      Companion_getInstance_153();
      tmp_3 = to('CourseBlockEdit', 'courseblock');
    } else {
      if (blockType === 103) {
        tmp_3 = to('CourseAssignmentEdit', 'courseblock');
      } else {
        return Unit_instance;
      }
    }
    var tmp1_container = tmp_3;
    var viewName = tmp1_container.y6();
    var keyName = tmp1_container.z6();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onAddCourseBlock.<anonymous>' call
    Companion_getInstance_153();
    this_0.s('blockType', blockType.toString());
    Companion_getInstance_102();
    this_0.s('clazzUid', this.pq6_1.toString());
    if (blockType === 103) {
      var tmp0_safe_receiver = this.nq6_1.t2().sq6_1;
      var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.n8f_1;
      if (tmp1_safe_receiver == null)
        null;
      else {
        // Inline function 'kotlin.also' call
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onAddCourseBlock.<anonymous>.<anonymous>' call
        this_0.s('terminology', this.z4q().e45(Companion_instance_33.a4r(), tmp1_safe_receiver));
      }
    }
    var tmp2_args = this_0.f3();
    var tmp3_serializer = Companion_getInstance_13().a4r();
    this.rp2(viewName, keyName, null, tmp3_serializer, tmp2_args);
  };
  protoOf(ClazzEditViewModel).cqf = function () {
    var tmp0_elvis_lhs = this.nq6_1.t2().sq6_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var initEntity = tmp;
    if (this.mp2().equals(Companion_getInstance_85().uol_1)) {
      Napier_getInstance().v5d('onClickSave: indeterminate');
      return Unit_instance;
    }
    if (initEntity.c8d_1.equals(new Long(0, 0))) {
      Napier_getInstance().v5d('onClickSave: clazzstarttime = 0');
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this.nq6_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onClickSave.<anonymous>' call
          var nextValue = prevValue.zq6(VOID, VOID, this.jp2().en6(strings_getInstance().blh_1));
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    }
    if (initEntity.d8d_1.c7(initEntity.c8d_1) <= 0) {
      Napier_getInstance().v5d('onClickSave: endbeforestart');
      $l$block_0: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_1 = this.nq6_1;
        while (true) {
          var prevValue_0 = this_1.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onClickSave.<anonymous>' call
          var nextValue_0 = prevValue_0.zq6(VOID, VOID, VOID, this.jp2().en6(strings_getInstance().eme_1));
          if (this_1.y1k(prevValue_0, nextValue_0)) {
            break $l$block_0;
          }
        }
      }
    }
    // Inline function 'kotlin.text.isNullOrBlank' call
    var this_2 = initEntity.v8c_1;
    // Inline function 'kotlin.contracts.contract' call
    if (this_2 == null ? true : isBlank(this_2)) {
      $l$block_1: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_3 = this.nq6_1;
        while (true) {
          var prevValue_1 = this_3.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onClickSave.<anonymous>' call
          var nextValue_1 = prevValue_1.zq6(VOID, VOID, VOID, VOID, this.jp2().en6(strings_getInstance().ome_1));
          if (this_3.y1k(prevValue_1, nextValue_1)) {
            break $l$block_1;
          }
        }
      }
    }
    if (hasErrors(this.nq6_1.t2(), this)) {
      Napier_getInstance().v5d('onClickSave: hasErrors');
      return Unit_instance;
    }
    var entity = shallowCopy_3(initEntity, ClazzEditViewModel$onClickSave$lambda(initEntity));
    $l$block_2: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_4 = this.nq6_1;
      while (true) {
        var prevValue_2 = this_4.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onClickSave.<anonymous>' call
        var nextValue_2 = prevValue_2.zq6(VOID, entity);
        if (this_4.y1k(prevValue_2, nextValue_2)) {
          break $l$block_2;
        }
      }
    }
    var tmp_0 = ClazzEditViewModel$onClickSave$lambda_0(this);
    this.yp8(tmp_0, ClazzEditViewModel$onClickSave$slambda_0(this, entity, initEntity, null));
  };
  protoOf(ClazzEditViewModel).tql = function (from, to) {
    // Inline function 'kotlin.apply' call
    var this_0 = toMutableList(this.nq6_1.t2().xq6_1);
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onCourseBlockMoved.<anonymous>' call
    this_0.c2(to, this_0.s1(from));
    var reorderedList = toList(this_0);
    var newList = this.jq6_1.onx(reorderedList, to);
    var tmp = this.cp2();
    launch(tmp, VOID, VOID, ClazzEditViewModel$onCourseBlockMoved$slambda_0(this, newList, null));
  };
  protoOf(ClazzEditViewModel).uql = function () {
    Companion_getInstance_102();
    var tmp = to('result_key', 'timeZone');
    Companion_getInstance_102();
    this.np1_1.sns('TimeZoneList', mapOf([tmp, to('result_viewname', this.mp1_1)]));
  };
  protoOf(ClazzEditViewModel).vql = function () {
  };
  protoOf(ClazzEditViewModel).wql = function () {
    this.rp2('CourseTerminologyList', 'terminology', null, Companion_instance_33.a4r());
  };
  protoOf(ClazzEditViewModel).xql = function (block) {
    updateCourseBlock(this, block.kj6(block.yj5_1.cji(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true)));
  };
  protoOf(ClazzEditViewModel).yql = function (block) {
    updateCourseBlock(this, block.kj6(block.yj5_1.cji(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, false)));
  };
  protoOf(ClazzEditViewModel).zql = function (block) {
    updateCourseBlock(this, block.kj6(block.yj5_1.cji(VOID, VOID, block.yj5_1.y7w_1 + 1 | 0)));
  };
  protoOf(ClazzEditViewModel).aqm = function (block) {
    updateCourseBlock(this, block.kj6(block.yj5_1.cji(VOID, VOID, block.yj5_1.y7w_1 - 1 | 0)));
  };
  protoOf(ClazzEditViewModel).bqm = function (block) {
    var tmp = this.cp2();
    launch(tmp, VOID, VOID, ClazzEditViewModel$onClickDeleteCourseBlock$slambda_0(this, block, null));
  };
  protoOf(ClazzEditViewModel).cqm = function (block) {
    var tmp0_subject = block.yj5_1.x7w_1;
    var tmp;
    var tmp_0;
    var tmp_1;
    if (tmp0_subject === 104) {
      tmp_1 = true;
    } else {
      tmp_1 = tmp0_subject === 105;
    }
    if (tmp_1) {
      tmp_0 = true;
    } else {
      tmp_0 = tmp0_subject === 102;
    }
    if (tmp_0) {
      tmp = true;
    } else {
      tmp = tmp0_subject === 100;
    }
    if (tmp) {
      Companion_getInstance_153();
      var tmp1_nextViewName = 'CourseBlockEdit';
      var tmp2_key = 'courseblock';
      var tmp3_serializer = Companion_getInstance_13().a4r();
      this.rp2(tmp1_nextViewName, tmp2_key, block, tmp3_serializer);
    } else {
      if (tmp0_subject === 103) {
        var tmp4_nextViewName = 'CourseAssignmentEdit';
        var tmp5_key = 'courseblock';
        var tmp6_serializer = Companion_getInstance_13().a4r();
        // Inline function 'kotlin.collections.buildMap' call
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'kotlin.collections.buildMapInternal' call
        // Inline function 'kotlin.apply' call
        var this_0 = LinkedHashMap_init_$Create$();
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onClickEditCourseBlock.<anonymous>' call
        Companion_getInstance_102();
        this_0.s('clazzUid', this.pq6_1.toString());
        var tmp0_safe_receiver = this.nq6_1.t2().sq6_1;
        var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.n8f_1;
        if (tmp1_safe_receiver == null)
          null;
        else {
          // Inline function 'kotlin.also' call
          // Inline function 'kotlin.contracts.contract' call
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditViewModel.onClickEditCourseBlock.<anonymous>.<anonymous>' call
          this_0.s('terminology', this.z4q().e45(Companion_instance_33.a4r(), tmp1_safe_receiver));
        }
        var tmp7_args = this_0.f3();
        this.rp2(tmp4_nextViewName, tmp5_key, block, tmp6_serializer, tmp7_args);
      }
    }
  };
  function CourseBlockUiState(block) {
    this.dqm_1 = block;
  }
  protoOf(CourseBlockUiState).eqm = function () {
    var tmp;
    var tmp_0 = this.dqm_1.yj5_1.x7w_1;
    if (!(tmp_0 === 100)) {
      tmp = this.dqm_1.yj5_1.y7w_1 < 3;
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(CourseBlockUiState).fqm = function () {
    return this.dqm_1.yj5_1.y7w_1 > 0;
  };
  protoOf(CourseBlockUiState).gqm = function () {
    return !this.dqm_1.yj5_1.n7x_1;
  };
  protoOf(CourseBlockUiState).hqm = function () {
    return this.dqm_1.yj5_1.n7x_1;
  };
  function Companion_101() {
    Companion_instance_149 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.fqk_1 = [null, null, null, null, null, new ArrayListSerializer($serializer_getInstance_7()), new ArrayListSerializer($serializer_getInstance_8()), null];
    this.gqk_1 = 3;
  }
  protoOf(Companion_101).a4r = function () {
    return $serializer_getInstance_64();
  };
  var Companion_instance_149;
  function Companion_getInstance_118() {
    if (Companion_instance_149 == null)
      new Companion_101();
    return Companion_instance_149;
  }
  function $serializer_52() {
    $serializer_instance_52 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.viewmodel.clazz.edit.ClazzEditUiState', this, 8);
    tmp0_serialDesc.g4f('fieldsEnabled', true);
    tmp0_serialDesc.g4f('entity', true);
    tmp0_serialDesc.g4f('clazzStartDateError', true);
    tmp0_serialDesc.g4f('clazzEndDateError', true);
    tmp0_serialDesc.g4f('clazzNameError', true);
    tmp0_serialDesc.g4f('clazzSchedules', true);
    tmp0_serialDesc.g4f('courseBlockList', true);
    tmp0_serialDesc.g4f('timeZone', true);
    this.iqm_1 = tmp0_serialDesc;
  }
  protoOf($serializer_52).d44 = function () {
    return this.iqm_1;
  };
  protoOf($serializer_52).x4f = function () {
    var tmp0_cached = Companion_getInstance_118().fqk_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [BooleanSerializer_getInstance(), get_nullable($serializer_getInstance_9()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), tmp0_cached[5], tmp0_cached[6], StringSerializer_getInstance()];
  };
  protoOf($serializer_52).f44 = function (decoder) {
    var tmp0_desc = this.iqm_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = false;
    var tmp5_local1 = null;
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_local6 = null;
    var tmp11_local7 = null;
    var tmp12_input = decoder.v47(tmp0_desc);
    var tmp13_cached = Companion_getInstance_118().fqk_1;
    if (tmp12_input.k48()) {
      tmp4_local0 = tmp12_input.x47(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp12_input.j48(tmp0_desc, 1, $serializer_getInstance_9(), tmp5_local1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp12_input.j48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp12_input.j48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp12_input.j48(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp12_input.h48(tmp0_desc, 5, tmp13_cached[5], tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
      tmp10_local6 = tmp12_input.h48(tmp0_desc, 6, tmp13_cached[6], tmp10_local6);
      tmp3_bitMask0 = tmp3_bitMask0 | 64;
      tmp11_local7 = tmp12_input.f48(tmp0_desc, 7);
      tmp3_bitMask0 = tmp3_bitMask0 | 128;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp12_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp12_input.x47(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp12_input.j48(tmp0_desc, 1, $serializer_getInstance_9(), tmp5_local1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp12_input.j48(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp12_input.j48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp12_input.j48(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp12_input.h48(tmp0_desc, 5, tmp13_cached[5], tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          case 6:
            tmp10_local6 = tmp12_input.h48(tmp0_desc, 6, tmp13_cached[6], tmp10_local6);
            tmp3_bitMask0 = tmp3_bitMask0 | 64;
            break;
          case 7:
            tmp11_local7 = tmp12_input.f48(tmp0_desc, 7);
            tmp3_bitMask0 = tmp3_bitMask0 | 128;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp12_input.w47(tmp0_desc);
    return ClazzEditUiState_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, tmp11_local7, null);
  };
  protoOf($serializer_52).jqm = function (encoder, value) {
    var tmp0_desc = this.iqm_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    var tmp2_cached = Companion_getInstance_118().fqk_1;
    if (tmp1_output.r49(tmp0_desc, 0) ? true : !(value.rq6_1 === false)) {
      tmp1_output.b49(tmp0_desc, 0, value.rq6_1);
    }
    if (tmp1_output.r49(tmp0_desc, 1) ? true : !(value.sq6_1 == null)) {
      tmp1_output.n49(tmp0_desc, 1, $serializer_getInstance_9(), value.sq6_1);
    }
    if (tmp1_output.r49(tmp0_desc, 2) ? true : !(value.tq6_1 == null)) {
      tmp1_output.n49(tmp0_desc, 2, StringSerializer_getInstance(), value.tq6_1);
    }
    if (tmp1_output.r49(tmp0_desc, 3) ? true : !(value.uq6_1 == null)) {
      tmp1_output.n49(tmp0_desc, 3, StringSerializer_getInstance(), value.uq6_1);
    }
    if (tmp1_output.r49(tmp0_desc, 4) ? true : !(value.vq6_1 == null)) {
      tmp1_output.n49(tmp0_desc, 4, StringSerializer_getInstance(), value.vq6_1);
    }
    if (tmp1_output.r49(tmp0_desc, 5) ? true : !equals(value.wq6_1, emptyList())) {
      tmp1_output.l49(tmp0_desc, 5, tmp2_cached[5], value.wq6_1);
    }
    if (tmp1_output.r49(tmp0_desc, 6) ? true : !equals(value.xq6_1, emptyList())) {
      tmp1_output.l49(tmp0_desc, 6, tmp2_cached[6], value.xq6_1);
    }
    if (tmp1_output.r49(tmp0_desc, 7) ? true : !(value.yq6_1 === 'UTC')) {
      tmp1_output.j49(tmp0_desc, 7, value.yq6_1);
    }
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_52).e44 = function (encoder, value) {
    return this.jqm(encoder, value instanceof ClazzEditUiState ? value : THROW_CCE());
  };
  var $serializer_instance_52;
  function $serializer_getInstance_64() {
    if ($serializer_instance_52 == null)
      new $serializer_52();
    return $serializer_instance_52;
  }
  function ClazzEditUiState_init_$Init$(seen1, fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_64().iqm_1);
    }
    if (0 === (seen1 & 1))
      $this.rq6_1 = false;
    else
      $this.rq6_1 = fieldsEnabled;
    if (0 === (seen1 & 2))
      $this.sq6_1 = null;
    else
      $this.sq6_1 = entity;
    if (0 === (seen1 & 4))
      $this.tq6_1 = null;
    else
      $this.tq6_1 = clazzStartDateError;
    if (0 === (seen1 & 8))
      $this.uq6_1 = null;
    else
      $this.uq6_1 = clazzEndDateError;
    if (0 === (seen1 & 16))
      $this.vq6_1 = null;
    else
      $this.vq6_1 = clazzNameError;
    if (0 === (seen1 & 32))
      $this.wq6_1 = emptyList();
    else
      $this.wq6_1 = clazzSchedules;
    if (0 === (seen1 & 64))
      $this.xq6_1 = emptyList();
    else
      $this.xq6_1 = courseBlockList;
    if (0 === (seen1 & 128))
      $this.yq6_1 = 'UTC';
    else
      $this.yq6_1 = timeZone;
    return $this;
  }
  function ClazzEditUiState_init_$Create$(seen1, fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone, serializationConstructorMarker) {
    return ClazzEditUiState_init_$Init$(seen1, fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone, serializationConstructorMarker, objectCreate(protoOf(ClazzEditUiState)));
  }
  function ClazzEditUiState(fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone) {
    Companion_getInstance_118();
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    entity = entity === VOID ? null : entity;
    clazzStartDateError = clazzStartDateError === VOID ? null : clazzStartDateError;
    clazzEndDateError = clazzEndDateError === VOID ? null : clazzEndDateError;
    clazzNameError = clazzNameError === VOID ? null : clazzNameError;
    clazzSchedules = clazzSchedules === VOID ? emptyList() : clazzSchedules;
    courseBlockList = courseBlockList === VOID ? emptyList() : courseBlockList;
    timeZone = timeZone === VOID ? 'UTC' : timeZone;
    this.rq6_1 = fieldsEnabled;
    this.sq6_1 = entity;
    this.tq6_1 = clazzStartDateError;
    this.uq6_1 = clazzEndDateError;
    this.vq6_1 = clazzNameError;
    this.wq6_1 = clazzSchedules;
    this.xq6_1 = courseBlockList;
    this.yq6_1 = timeZone;
  }
  protoOf(ClazzEditUiState).kqm = function () {
    var tmp;
    var tmp0_safe_receiver = this.sq6_1;
    var tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.e8d_1;
    Companion_getInstance_4();
    if (equals(tmp_0, new Long(1, 0))) {
      Companion_getInstance_4();
      var tmp_1 = new Long(1, 0);
      Companion_getInstance_4();
      tmp = tmp_1.equals(new Long(1, 0));
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(ClazzEditUiState).lqm = function (courseBlockAndEditEntities) {
    return new CourseBlockUiState(courseBlockAndEditEntities);
  };
  protoOf(ClazzEditUiState).mqm = function (fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone) {
    return new ClazzEditUiState(fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone);
  };
  protoOf(ClazzEditUiState).zq6 = function (fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone, $super) {
    fieldsEnabled = fieldsEnabled === VOID ? this.rq6_1 : fieldsEnabled;
    entity = entity === VOID ? this.sq6_1 : entity;
    clazzStartDateError = clazzStartDateError === VOID ? this.tq6_1 : clazzStartDateError;
    clazzEndDateError = clazzEndDateError === VOID ? this.uq6_1 : clazzEndDateError;
    clazzNameError = clazzNameError === VOID ? this.vq6_1 : clazzNameError;
    clazzSchedules = clazzSchedules === VOID ? this.wq6_1 : clazzSchedules;
    courseBlockList = courseBlockList === VOID ? this.xq6_1 : courseBlockList;
    timeZone = timeZone === VOID ? this.yq6_1 : timeZone;
    return $super === VOID ? this.mqm(fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone) : $super.mqm.call(this, fieldsEnabled, entity, clazzStartDateError, clazzEndDateError, clazzNameError, clazzSchedules, courseBlockList, timeZone);
  };
  protoOf(ClazzEditUiState).toString = function () {
    return 'ClazzEditUiState(fieldsEnabled=' + this.rq6_1 + ', entity=' + this.sq6_1 + ', clazzStartDateError=' + this.tq6_1 + ', clazzEndDateError=' + this.uq6_1 + ', clazzNameError=' + this.vq6_1 + ', clazzSchedules=' + this.wq6_1 + ', courseBlockList=' + this.xq6_1 + ', timeZone=' + this.yq6_1 + ')';
  };
  protoOf(ClazzEditUiState).hashCode = function () {
    var result = getBooleanHashCode(this.rq6_1);
    result = imul(result, 31) + (this.sq6_1 == null ? 0 : this.sq6_1.hashCode()) | 0;
    result = imul(result, 31) + (this.tq6_1 == null ? 0 : getStringHashCode(this.tq6_1)) | 0;
    result = imul(result, 31) + (this.uq6_1 == null ? 0 : getStringHashCode(this.uq6_1)) | 0;
    result = imul(result, 31) + (this.vq6_1 == null ? 0 : getStringHashCode(this.vq6_1)) | 0;
    result = imul(result, 31) + hashCode(this.wq6_1) | 0;
    result = imul(result, 31) + hashCode(this.xq6_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.yq6_1) | 0;
    return result;
  };
  protoOf(ClazzEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzEditUiState ? other : THROW_CCE();
    if (!(this.rq6_1 === tmp0_other_with_cast.rq6_1))
      return false;
    if (!equals(this.sq6_1, tmp0_other_with_cast.sq6_1))
      return false;
    if (!(this.tq6_1 == tmp0_other_with_cast.tq6_1))
      return false;
    if (!(this.uq6_1 == tmp0_other_with_cast.uq6_1))
      return false;
    if (!(this.vq6_1 == tmp0_other_with_cast.vq6_1))
      return false;
    if (!equals(this.wq6_1, tmp0_other_with_cast.wq6_1))
      return false;
    if (!equals(this.xq6_1, tmp0_other_with_cast.xq6_1))
      return false;
    if (!(this.yq6_1 === tmp0_other_with_cast.yq6_1))
      return false;
    return true;
  };
  function createNewClazzUseCase$factory() {
    return getPropertyCallableRef('createNewClazzUseCase', 1, KProperty1, function (receiver) {
      return _get_createNewClazzUseCase__mo489e(receiver);
    }, null);
  }
  function createNewClazzUseCase$factory_0() {
    return getPropertyCallableRef('createNewClazzUseCase', 1, KProperty1, function (receiver) {
      return _get_createNewClazzUseCase__mo489e(receiver);
    }, null);
  }
  function get_COMPLETABLE_BLOCK_TYPES() {
    _init_properties_BlockStatusExt_kt__pb774u();
    return COMPLETABLE_BLOCK_TYPES;
  }
  var COMPLETABLE_BLOCK_TYPES;
  function aggregateIfModule(_this__u8e3s4, blockUid, blocks) {
    _init_properties_BlockStatusExt_kt__pb774u();
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator = blocks.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.gradebook.aggregateIfModule.<anonymous>' call
        if (element.w7w_1.equals(blockUid)) {
          tmp$ret$1 = element;
          break $l$block;
        }
      }
      tmp$ret$1 = null;
    }
    var tmp0_elvis_lhs = tmp$ret$1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return null;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var block = tmp;
    var tmp_0;
    var tmp_1 = block.x7w_1;
    if (tmp_1 === 100) {
      var tmp$ret$2;
      $l$block_0: {
        // Inline function 'kotlin.collections.count' call
        var tmp_2;
        if (isInterface(blocks, Collection)) {
          tmp_2 = blocks.c1();
        } else {
          tmp_2 = false;
        }
        if (tmp_2) {
          tmp$ret$2 = 0;
          break $l$block_0;
        }
        var count = 0;
        var tmp0_iterator_0 = blocks.w();
        while (tmp0_iterator_0.f()) {
          var element_0 = tmp0_iterator_0.e();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.gradebook.aggregateIfModule.<anonymous>' call
          if (element_0.z7w_1.equals(blockUid)) {
            count = count + 1 | 0;
            checkCountOverflow(count);
          }
        }
        tmp$ret$2 = count;
      }
      var moduleBlockCount = tmp$ret$2;
      if (moduleBlockCount === 0)
        return null;
      // Inline function 'kotlin.collections.associateBy' call
      // Inline function 'kotlin.collections.filter' call
      // Inline function 'kotlin.collections.filterTo' call
      var destination = ArrayList_init_$Create$();
      var tmp0_iterator_1 = blocks.w();
      while (tmp0_iterator_1.f()) {
        var element_1 = tmp0_iterator_1.e();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.gradebook.aggregateIfModule.<anonymous>' call
        if (element_1.z7w_1.equals(blockUid)) {
          destination.i1(element_1);
        }
      }
      var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(destination, 10)), 16);
      // Inline function 'kotlin.collections.associateByTo' call
      var destination_0 = LinkedHashMap_init_$Create$_0(capacity);
      var tmp0_iterator_2 = destination.w();
      while (tmp0_iterator_2.f()) {
        var element_2 = tmp0_iterator_2.e();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.gradebook.aggregateIfModule.<anonymous>' call
        var tmp$ret$7 = element_2.w7w_1;
        destination_0.s(tmp$ret$7, element_2);
      }
      var moduleBlockUids = destination_0;
      var numBlocksWithScoreResult = 0;
      var numBlocksWithScore = 0;
      var numModsComplete = 0;
      var numBlocksSuccessSet = 0;
      var numBlocksSuccess = 0;
      var numBlocksFailed = 0;
      var totalPointsScored = 0.0;
      var maxPointsInModule = 0.0;
      var numCompleteableBlocksInModule = 0;
      // Inline function 'kotlin.collections.forEach' call
      var tmp0_iterator_3 = _this__u8e3s4.w();
      while (tmp0_iterator_3.f()) {
        var element_3 = tmp0_iterator_3.e();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.gradebook.aggregateIfModule.<anonymous>' call
        if (moduleBlockUids.o2().a1(element_3.paj_1)) {
          var blockForStatus = moduleBlockUids.q(element_3.paj_1);
          if ((blockForStatus == null ? null : isCompleteable(blockForStatus)) === true) {
            numCompleteableBlocksInModule = numCompleteableBlocksInModule + 1 | 0;
          }
          var tmp3_safe_receiver = blockForStatus == null ? null : blockForStatus.h7x_1;
          if (tmp3_safe_receiver == null)
            null;
          else {
            // Inline function 'kotlin.also' call
            // Inline function 'kotlin.contracts.contract' call
            // Inline function 'com.ustadmobile.core.viewmodel.clazz.gradebook.aggregateIfModule.<anonymous>.<anonymous>' call
            maxPointsInModule = maxPointsInModule + tmp3_safe_receiver;
            numBlocksWithScore = numBlocksWithScore + 1 | 0;
          }
          var tmp4_safe_receiver = element_3.taj_1;
          if (tmp4_safe_receiver == null)
            null;
          else {
            // Inline function 'kotlin.also' call
            // Inline function 'kotlin.contracts.contract' call
            // Inline function 'com.ustadmobile.core.viewmodel.clazz.gradebook.aggregateIfModule.<anonymous>.<anonymous>' call
            var tmp_3 = totalPointsScored;
            var tmp1_elvis_lhs = blockForStatus == null ? null : blockForStatus.h7x_1;
            totalPointsScored = tmp_3 + tmp4_safe_receiver * (tmp1_elvis_lhs == null ? 0.0 : tmp1_elvis_lhs);
            numBlocksWithScoreResult = numBlocksWithScoreResult + 1 | 0;
          }
          if (element_3.raj_1) {
            numModsComplete = numModsComplete + 1 | 0;
          }
          var tmp6_safe_receiver = element_3.saj_1;
          if (tmp6_safe_receiver == null)
            null;
          else {
            // Inline function 'kotlin.also' call
            // Inline function 'kotlin.contracts.contract' call
            // Inline function 'com.ustadmobile.core.viewmodel.clazz.gradebook.aggregateIfModule.<anonymous>.<anonymous>' call
            numBlocksSuccessSet = numBlocksSuccessSet + 1 | 0;
            if (tmp6_safe_receiver) {
              numBlocksSuccess = numBlocksSuccess + 1 | 0;
            } else {
              numBlocksFailed = numBlocksFailed + 1 | 0;
            }
          }
        }
      }
      var isModuleComplete = numCompleteableBlocksInModule > 0 ? numCompleteableBlocksInModule === numModsComplete : false;
      var tmp1_safe_receiver = firstOrNull(_this__u8e3s4);
      var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.oaj_1;
      var tmp3_sPersonUid = tmp2_elvis_lhs == null ? new Long(0, 0) : tmp2_elvis_lhs;
      var tmp_4;
      if (!(maxPointsInModule === 0.0)) {
        tmp_4 = totalPointsScored / maxPointsInModule;
      } else {
        tmp_4 = null;
      }
      var tmp4_sScoreScaled = tmp_4;
      var tmp5_sIsSuccess = (isModuleComplete ? numBlocksSuccess === numBlocksSuccessSet : false) ? true : (isModuleComplete ? numBlocksFailed > 0 : false) ? false : null;
      tmp_0 = new BlockStatus(tmp3_sPersonUid, blockUid, VOID, isModuleComplete, tmp5_sIsSuccess, tmp4_sScoreScaled);
    } else {
      var tmp$ret$14;
      $l$block_1: {
        // Inline function 'kotlin.collections.firstOrNull' call
        var tmp0_iterator_4 = _this__u8e3s4.w();
        while (tmp0_iterator_4.f()) {
          var element_4 = tmp0_iterator_4.e();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.gradebook.aggregateIfModule.<anonymous>' call
          if (element_4.paj_1.equals(blockUid)) {
            tmp$ret$14 = element_4;
            break $l$block_1;
          }
        }
        tmp$ret$14 = null;
      }
      tmp_0 = tmp$ret$14;
    }
    return tmp_0;
  }
  function displayMarkFor(_this__u8e3s4, maxPoints) {
    _init_properties_BlockStatusExt_kt__pb774u();
    var tmp0_safe_receiver = markFor(_this__u8e3s4, maxPoints);
    return tmp0_safe_receiver == null ? null : toDisplayString(tmp0_safe_receiver);
  }
  function isCompleteable(_this__u8e3s4) {
    _init_properties_BlockStatusExt_kt__pb774u();
    return get_COMPLETABLE_BLOCK_TYPES().a1(_this__u8e3s4.x7w_1);
  }
  function markFor(_this__u8e3s4, maxPoints) {
    _init_properties_BlockStatusExt_kt__pb774u();
    var scaledMarkVal = _this__u8e3s4.taj_1;
    var tmp;
    if (!(scaledMarkVal == null) ? !(maxPoints == null) : false) {
      tmp = scaledMarkVal * maxPoints;
    } else {
      tmp = null;
    }
    return tmp;
  }
  var properties_initialized_BlockStatusExt_kt_h05ldo;
  function _init_properties_BlockStatusExt_kt__pb774u() {
    if (!properties_initialized_BlockStatusExt_kt_h05ldo) {
      properties_initialized_BlockStatusExt_kt_h05ldo = true;
      COMPLETABLE_BLOCK_TYPES = listOf([104, 103]);
    }
  }
  function $loadCOROUTINE$58(_this__u8e3s4, params, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.vqm_1 = _this__u8e3s4;
    this.wqm_1 = params;
  }
  protoOf($loadCOROUTINE$58).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.vqm_1.w6b();
            this.hd_1 = 1;
            suspendResult = this.vqm_1.dqn_1.c54(this.wqm_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.xqm_1 = suspendResult;
            this.hd_1 = 2;
            var tmp_0 = this.vqm_1.eqn_1.w7d();
            var tmp_1 = this.xqm_1;
            var tmp0_safe_receiver = tmp_1 instanceof Page ? tmp_1 : null;
            var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.p53_1;
            var tmp_2;
            if (tmp1_safe_receiver == null) {
              tmp_2 = null;
            } else {
              var destination = ArrayList_init_$Create$();
              var tmp0_iterator = tmp1_safe_receiver.w();
              while (tmp0_iterator.f()) {
                var element = tmp0_iterator.e();
                var tmp0_safe_receiver_0 = element.a95_1;
                var tmp0_safe_receiver_1 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.f95_1;
                if (tmp0_safe_receiver_1 == null)
                  null;
                else {
                  destination.i1(tmp0_safe_receiver_1);
                }
              }
              tmp_2 = destination;
            }

            var tmp2_elvis_lhs = tmp_2;
            suspendResult = tmp_0.mio(this.vqm_1.fqn_1, tmp2_elvis_lhs == null ? emptyList() : tmp2_elvis_lhs, this.vqm_1.gqn_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var blockResults = suspendResult;
            var tmp3_subject = this.xqm_1;
            var tmp_3;
            if (tmp3_subject instanceof Page) {
              var tmp_4 = this.xqm_1;
              var studentListResultCasted = tmp_4 instanceof Page ? tmp_4 : THROW_CCE();
              var this_0 = studentListResultCasted.p53_1;
              var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
              var tmp0_iterator_0 = this_0.w();
              while (tmp0_iterator_0.f()) {
                var item = tmp0_iterator_0.e();
                var destination_1 = ArrayList_init_$Create$();
                var tmp0_iterator_1 = blockResults.w();
                while (tmp0_iterator_1.f()) {
                  var element_0 = tmp0_iterator_1.e();
                  var tmp_5 = element_0.oaj_1;
                  var tmp0_safe_receiver_2 = item.a95_1;
                  if (tmp_5.equals(tmp0_safe_receiver_2 == null ? null : tmp0_safe_receiver_2.f95_1)) {
                    destination_1.i1(element_0);
                  }
                }
                destination_0.i1(new StudentAndBlockStatuses(item, destination_1));
              }
              tmp_3 = new Page(destination_0, studentListResultCasted.q53_1, studentListResultCasted.r53_1, studentListResultCasted.s53_1, studentListResultCasted.t53_1);
            } else {
              if (tmp3_subject instanceof Error_0) {
                tmp_3 = new Error_0(this.xqm_1.o53_1);
              } else {
                if (tmp3_subject instanceof Invalid) {
                  tmp_3 = new Invalid();
                } else {
                  throw IllegalStateException_init_$Create$("Cant get here really, but compiler doesn't know that");
                }
              }
            }

            var tmp_6 = tmp_3;
            return tmp_6 instanceof LoadResult ? tmp_6 : THROW_CCE();
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function $loadHttpCOROUTINE$59(_this__u8e3s4, params, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.pqn_1 = _this__u8e3s4;
    this.qqn_1 = params;
  }
  protoOf($loadHttpCOROUTINE$59).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            var tmp_1 = this.pqn_1.dqn_1;
            tmp_0.rqn_1 = isInterface(tmp_1, PagingSourceWithHttpLoader) ? tmp_1 : null;
            if (this.rqn_1 == null) {
              this.sqn_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.rqn_1.l6e(this.qqn_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.sqn_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            var tmp1_elvis_lhs = this.sqn_1;
            return tmp1_elvis_lhs == null ? true : tmp1_elvis_lhs;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function ClazzGradebookPagingSource(studentListPagingSource, db, clazzUid, accountPersonUid) {
    DelegatedInvalidationPagingSource.call(this, studentListPagingSource);
    this.dqn_1 = studentListPagingSource;
    this.eqn_1 = db;
    this.fqn_1 = clazzUid;
    this.gqn_1 = accountPersonUid;
  }
  protoOf(ClazzGradebookPagingSource).tqn = function (params, $completion) {
    var tmp = new $loadCOROUTINE$58(this, params, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzGradebookPagingSource).c54 = function (params, $completion) {
    return this.tqn(params, $completion);
  };
  protoOf(ClazzGradebookPagingSource).k6e = function (params, $completion) {
    var tmp = new $loadHttpCOROUTINE$59(this, params, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzGradebookPagingSource).l6e = function (params, $completion) {
    return this.k6e(params, $completion);
  };
  function ClazzGradebookViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.cqo_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda$slambda).eqo = function (courseBlockList, $completion) {
    var tmp = this.fqo(courseBlockList, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.eqo((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.cqo_1.gpa_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.mqp(this.dqo_1, this.cqo_1.hqp_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda$slambda).fqo = function (courseBlockList, completion) {
    var i = new ClazzGradebookViewModel$slambda$slambda$slambda$slambda(this.cqo_1, completion);
    i.dqo_1 = courseBlockList;
    return i;
  };
  function ClazzGradebookViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzGradebookViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (courseBlockList, $completion) {
      return i.eqo(courseBlockList, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzGradebookViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.vqp_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda$slambda_1).epo = function (it, $completion) {
    var tmp = this.fpo(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.epo((p1 == null ? true : typeof p1 === 'string') ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.vqp_1.pp1_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.nol(VOID, VOID, this.wqp_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda$slambda_1).fpo = function (it, completion) {
    var i = new ClazzGradebookViewModel$slambda$slambda$slambda$slambda_1(this.vqp_1, completion);
    i.wqp_1 = it;
    return i;
  };
  function ClazzGradebookViewModel$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzGradebookViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.epo(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzGradebookViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.fqq_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = distinctUntilChanged(this.fqq_1.fp2().c7d().lc6(this.fqq_1.gqp_1));
            var tmp_1 = ClazzGradebookViewModel$slambda$slambda$slambda$slambda_0(this.fqq_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_11(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzGradebookViewModel$slambda$slambda$slambda(this.fqq_1, completion);
    i.gqq_1 = $this$launch;
    return i;
  };
  function ClazzGradebookViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzGradebookViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzGradebookViewModel$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.pqq_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = distinctUntilChanged(this.pqq_1.fp2().b7d().e8c(this.pqq_1.gqp_1));
            var tmp_1 = ClazzGradebookViewModel$slambda$slambda$slambda$slambda_2(this.pqq_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_11(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new ClazzGradebookViewModel$slambda$slambda$slambda_1(this.pqq_1, completion);
    i.qqq_1 = $this$launch;
    return i;
  };
  function ClazzGradebookViewModel$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzGradebookViewModel$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzGradebookViewModel$slambda$slambda($this_launch, this$0, resultContinuation) {
    this.zqq_1 = $this_launch;
    this.aqr_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzGradebookViewModel$slambda$slambda).m86 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda).z77 = function ($completion) {
    return this.m86($completion);
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.zqq_1, VOID, VOID, ClazzGradebookViewModel$slambda$slambda$slambda_0(this.aqr_1, null));
          launch(this.zqq_1, VOID, VOID, ClazzGradebookViewModel$slambda$slambda$slambda_2(this.aqr_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzGradebookViewModel$slambda$slambda).y77 = function (completion) {
    return new ClazzGradebookViewModel$slambda$slambda(this.zqq_1, this.aqr_1, completion);
  };
  function ClazzGradebookViewModel$slambda$slambda_0($this_launch, this$0, resultContinuation) {
    var i = new ClazzGradebookViewModel$slambda$slambda($this_launch, this$0, resultContinuation);
    var l = function ($completion) {
      return i.m86($completion);
    };
    l.$arity = 0;
    return l;
  }
  function Companion_102() {
    this.bqr_1 = 'Gradebook';
  }
  var Companion_instance_150;
  function Companion_getInstance_119() {
    return Companion_instance_150;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_11(function_0) {
    this.cqr_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_11).t1d = function (value, $completion) {
    return this.cqr_1(value, $completion);
  };
  function ClazzGradebookViewModel$studentPagingSource$lambda(this$0) {
    return function () {
      var tmp = this$0.fp2().g7d();
      return new ClazzGradebookPagingSource(tmp.m92(this$0.gqp_1, 1000, 1, '%', 0, this$0.dp2(), systemTimeInMillis()), this$0.ep2(), this$0.gqp_1, this$0.dp2());
    };
  }
  function ClazzGradebookViewModel$slambda(this$0, resultContinuation) {
    this.lqr_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzGradebookViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzGradebookViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzGradebookViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.lqr_1.gpa_1, ClazzGradebookViewModel$slambda$slambda_0(this.mqr_1, this.lqr_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzGradebookViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzGradebookViewModel$slambda(this.lqr_1, completion);
    i.mqr_1 = $this$launch;
    return i;
  };
  function ClazzGradebookViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzGradebookViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzGradebookViewModel(di, savedStateHandle) {
    UstadListViewModel.call(this, di, savedStateHandle, new ClazzGradebookUiState(), 'Gradebook');
    var tmp = this;
    Companion_getInstance_112();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    var tmp_0;
    if (tmp1_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('No clazzuid');
    } else {
      tmp_0 = tmp1_elvis_lhs;
    }
    tmp.gqp_1 = tmp_0;
    var tmp_1 = this;
    tmp_1.hqp_1 = ClazzGradebookViewModel$studentPagingSource$lambda(this);
    var tmp_2 = this.cp2();
    launch(tmp_2, VOID, VOID, ClazzGradebookViewModel$slambda_0(this, null));
  }
  protoOf(ClazzGradebookViewModel).apb = function (searchText) {
  };
  protoOf(ClazzGradebookViewModel).bpb = function () {
  };
  function ClazzGradebookUiState$_init_$lambda_aseg4q() {
    return new EmptyPagingSource();
  }
  function ClazzGradebookUiState(courseBlocks, results, isFullScreen, scale) {
    courseBlocks = courseBlocks === VOID ? emptyList() : courseBlocks;
    var tmp;
    if (results === VOID) {
      tmp = ClazzGradebookUiState$_init_$lambda_aseg4q;
    } else {
      tmp = results;
    }
    results = tmp;
    isFullScreen = isFullScreen === VOID ? false : isFullScreen;
    scale = scale === VOID ? 1.0 : scale;
    this.iqp_1 = courseBlocks;
    this.jqp_1 = results;
    this.kqp_1 = isFullScreen;
    this.lqp_1 = scale;
  }
  protoOf(ClazzGradebookUiState).nqr = function (courseBlocks, results, isFullScreen, scale) {
    return new ClazzGradebookUiState(courseBlocks, results, isFullScreen, scale);
  };
  protoOf(ClazzGradebookUiState).mqp = function (courseBlocks, results, isFullScreen, scale, $super) {
    courseBlocks = courseBlocks === VOID ? this.iqp_1 : courseBlocks;
    results = results === VOID ? this.jqp_1 : results;
    isFullScreen = isFullScreen === VOID ? this.kqp_1 : isFullScreen;
    scale = scale === VOID ? this.lqp_1 : scale;
    return $super === VOID ? this.nqr(courseBlocks, results, isFullScreen, scale) : $super.nqr.call(this, courseBlocks, results, isFullScreen, scale);
  };
  protoOf(ClazzGradebookUiState).toString = function () {
    return 'ClazzGradebookUiState(courseBlocks=' + this.iqp_1 + ', results=' + this.jqp_1 + ', isFullScreen=' + this.kqp_1 + ', scale=' + this.lqp_1 + ')';
  };
  protoOf(ClazzGradebookUiState).hashCode = function () {
    var result = hashCode(this.iqp_1);
    result = imul(result, 31) + hashCode(this.jqp_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.kqp_1) | 0;
    result = imul(result, 31) + getNumberHashCode(this.lqp_1) | 0;
    return result;
  };
  protoOf(ClazzGradebookUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzGradebookUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzGradebookUiState ? other : THROW_CCE();
    if (!equals(this.iqp_1, tmp0_other_with_cast.iqp_1))
      return false;
    if (!equals(this.jqp_1, tmp0_other_with_cast.jqp_1))
      return false;
    if (!(this.kqp_1 === tmp0_other_with_cast.kqp_1))
      return false;
    if (!equals(this.lqp_1, tmp0_other_with_cast.lqp_1))
      return false;
    return true;
  };
  function get_thumbnailUri(_this__u8e3s4) {
    var tmp0_safe_receiver = _this__u8e3s4.fca_1;
    var tmp2_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.c7y_1;
    var tmp;
    if (tmp2_elvis_lhs == null) {
      var tmp1_safe_receiver = _this__u8e3s4.hca_1;
      tmp = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.yai_1;
    } else {
      tmp = tmp2_elvis_lhs;
    }
    return tmp;
  }
  function maxScoreForBlock(_this__u8e3s4, block) {
    var blockVal = block.eca_1;
    var tmp;
    var tmp_0 = blockVal == null ? null : blockVal.x7w_1;
    if (tmp_0 === 100) {
      var tmp$ret$0;
      $l$block: {
        // Inline function 'kotlin.collections.count' call
        var tmp_1;
        if (isInterface(_this__u8e3s4, Collection)) {
          tmp_1 = _this__u8e3s4.c1();
        } else {
          tmp_1 = false;
        }
        if (tmp_1) {
          tmp$ret$0 = 0;
          break $l$block;
        }
        var count = 0;
        var tmp0_iterator = _this__u8e3s4.w();
        while (tmp0_iterator.f()) {
          var element = tmp0_iterator.e();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.gradebook.maxScoreForBlock.<anonymous>' call
          var tmp_2;
          var tmp0_safe_receiver = element.eca_1;
          if (equals(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.z7w_1, blockVal.w7w_1)) {
            var tmp1_safe_receiver = element.eca_1;
            tmp_2 = !((tmp1_safe_receiver == null ? null : tmp1_safe_receiver.h7x_1) == null);
          } else {
            tmp_2 = false;
          }
          if (tmp_2) {
            count = count + 1 | 0;
            checkCountOverflow(count);
          }
        }
        tmp$ret$0 = count;
      }
      var numBlocksWithScore = tmp$ret$0;
      var tmp_3;
      if (numBlocksWithScore === 0) {
        tmp_3 = null;
      } else {
        // Inline function 'kotlin.collections.sumOf' call
        var sum = 0.0;
        var tmp0_iterator_0 = _this__u8e3s4.w();
        while (tmp0_iterator_0.f()) {
          var element_0 = tmp0_iterator_0.e();
          var tmp_4 = sum;
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.gradebook.maxScoreForBlock.<anonymous>' call
          var tmp0_safe_receiver_0 = element_0.eca_1;
          var tmp1_safe_receiver_0 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.h7x_1;
          var tmp_5;
          if (tmp1_safe_receiver_0 == null) {
            tmp_5 = null;
          } else {
            // Inline function 'kotlin.takeIf' call
            // Inline function 'kotlin.contracts.contract' call
            var tmp_6;
            // Inline function 'com.ustadmobile.core.viewmodel.clazz.gradebook.maxScoreForBlock.<anonymous>.<anonymous>' call
            var tmp0_safe_receiver_1 = element_0.eca_1;
            if (equals(tmp0_safe_receiver_1 == null ? null : tmp0_safe_receiver_1.z7w_1, blockVal.w7w_1)) {
              tmp_6 = tmp1_safe_receiver_0;
            } else {
              tmp_6 = null;
            }
            tmp_5 = tmp_6;
          }
          var tmp2_safe_receiver = tmp_5;
          var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver;
          sum = tmp_4 + (tmp3_elvis_lhs == null ? 0.0 : tmp3_elvis_lhs);
        }
        tmp_3 = sum;
      }
      tmp = tmp_3;
    } else {
      tmp = blockVal == null ? null : blockVal.h7x_1;
    }
    return tmp;
  }
  function _get_makeLinkUseCase__qbv742($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.lqs_1;
    makeLinkUseCase$factory_0();
    return this_0.t2();
  }
  function _get_setClipboardStringUseCase__31i1s1_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.nqs_1;
    setClipboardStringUseCase$factory_2();
    return this_0.t2();
  }
  function _get_shareTextUseCase__god44g($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.oqs_1;
    shareTextUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_103() {
    this.qqs_1 = 'InviteWithLink';
  }
  var Companion_instance_151;
  function Companion_getInstance_120() {
    return Companion_instance_151;
  }
  function InviteViaLinkViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'InviteWithLink');
    this.jqs_1 = MutableStateFlow(new InviteViaLinkUiState());
    this.kqs_1 = asStateFlow(this.jqs_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(MakeLinkUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.lqs_1 = Instance(this_0, tmp$ret$0, null).n5c(this, makeLinkUseCase$factory());
    var tmp_1 = this;
    Companion_getInstance_112();
    var tmp0_elvis_lhs = savedStateHandle.ba('inviteCode');
    var tmp_2;
    if (tmp0_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('no invite code');
    } else {
      tmp_2 = tmp0_elvis_lhs;
    }
    tmp_1.mqs_1 = tmp_2;
    var tmp_3 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(SetClipboardStringUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    tmp_3.nqs_1 = Instance(this, tmp$ret$2, null).n5c(this, setClipboardStringUseCase$factory_1());
    var tmp_5 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(ShareTextUseCase), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    tmp_5.oqs_1 = InstanceOrNull(this, tmp$ret$4, null).n5c(this, shareTextUseCase$factory());
    var tmp_7 = this;
    var tmp_8 = _get_makeLinkUseCase__qbv742(this);
    Companion_getInstance_112();
    tmp_7.pqs_1 = tmp_8.ynz('JoinWithCode', mapOf_0(to('inviteCode', this.mqs_1)));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.pp1_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.invitevialink.InviteViaLinkViewModel.<anonymous>' call
        var nextValue = prevValue.nol(VOID, VOID, this.jp2().en6(strings_getInstance().pm1_1));
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.jqs_1;
      while (true) {
        var prevValue_0 = this_2.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.invitevialink.InviteViaLinkViewModel.<anonymous>' call
        var nextValue_0 = prevValue_0.tqs(this.pqs_1, !(_get_shareTextUseCase__god44g(this) == null));
        if (this_2.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
  }
  protoOf(InviteViaLinkViewModel).uqs = function () {
    _get_setClipboardStringUseCase__31i1s1_0(this).xnn(this.pqs_1);
    this.hp2().com(new Snack(this.jp2().en6(strings_getInstance().km1_1)));
  };
  function InviteViaLinkUiState(inviteLink, showShareLinkButton) {
    inviteLink = inviteLink === VOID ? null : inviteLink;
    showShareLinkButton = showShareLinkButton === VOID ? false : showShareLinkButton;
    this.rqs_1 = inviteLink;
    this.sqs_1 = showShareLinkButton;
  }
  protoOf(InviteViaLinkUiState).tqs = function (inviteLink, showShareLinkButton) {
    return new InviteViaLinkUiState(inviteLink, showShareLinkButton);
  };
  protoOf(InviteViaLinkUiState).toString = function () {
    return 'InviteViaLinkUiState(inviteLink=' + this.rqs_1 + ', showShareLinkButton=' + this.sqs_1 + ')';
  };
  protoOf(InviteViaLinkUiState).hashCode = function () {
    var result = this.rqs_1 == null ? 0 : getStringHashCode(this.rqs_1);
    result = imul(result, 31) + getBooleanHashCode(this.sqs_1) | 0;
    return result;
  };
  protoOf(InviteViaLinkUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof InviteViaLinkUiState))
      return false;
    var tmp0_other_with_cast = other instanceof InviteViaLinkUiState ? other : THROW_CCE();
    if (!(this.rqs_1 == tmp0_other_with_cast.rqs_1))
      return false;
    if (!(this.sqs_1 === tmp0_other_with_cast.sqs_1))
      return false;
    return true;
  };
  function makeLinkUseCase$factory() {
    return getPropertyCallableRef('makeLinkUseCase', 1, KProperty1, function (receiver) {
      return _get_makeLinkUseCase__qbv742(receiver);
    }, null);
  }
  function setClipboardStringUseCase$factory_1() {
    return getPropertyCallableRef('setClipboardStringUseCase', 1, KProperty1, function (receiver) {
      return _get_setClipboardStringUseCase__31i1s1_0(receiver);
    }, null);
  }
  function shareTextUseCase$factory() {
    return getPropertyCallableRef('shareTextUseCase', 1, KProperty1, function (receiver) {
      return _get_shareTextUseCase__god44g(receiver);
    }, null);
  }
  function makeLinkUseCase$factory_0() {
    return getPropertyCallableRef('makeLinkUseCase', 1, KProperty1, function (receiver) {
      return _get_makeLinkUseCase__qbv742(receiver);
    }, null);
  }
  function setClipboardStringUseCase$factory_2() {
    return getPropertyCallableRef('setClipboardStringUseCase', 1, KProperty1, function (receiver) {
      return _get_setClipboardStringUseCase__31i1s1_0(receiver);
    }, null);
  }
  function shareTextUseCase$factory_0() {
    return getPropertyCallableRef('shareTextUseCase', 1, KProperty1, function (receiver) {
      return _get_shareTextUseCase__god44g(receiver);
    }, null);
  }
  function _get_requestEnrolmentUseCase__62wq8f($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.sqt_1;
    requestEnrolmentUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_104() {
    this.tqt_1 = 'JoinWithCode';
  }
  var Companion_instance_152;
  function Companion_getInstance_121() {
    return Companion_instance_152;
  }
  function JoinWithCodeViewModel$lambda(this$0) {
    return function () {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.pp1_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.joinwithcode.JoinWithCodeViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.nol(VOID, VOID, this$0.jp2().en6(strings_getInstance().zmb_1));
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function JoinWithCodeViewModel$onClickJoin$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.qqt_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.joinwithcode.JoinWithCodeViewModel.onClickJoin.<anonymous>.<anonymous>' call
          var nextValue = prevValue.xqt(VOID, VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function JoinWithCodeViewModel$onClickJoin$slambda(this$0, resultContinuation) {
    this.gqu_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(JoinWithCodeViewModel$onClickJoin$slambda).m86 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(JoinWithCodeViewModel$onClickJoin$slambda).z77 = function ($completion) {
    return this.m86($completion);
  };
  protoOf(JoinWithCodeViewModel$onClickJoin$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = _get_requestEnrolmentUseCase__62wq8f(this.gqu_1);
            var tmp_1 = this.gqu_1.qqt_1.t2().vqt_1;
            var tmp_2 = this.gqu_1.bp2().emx().kmk_1;
            suspendResult = tmp_0.wnn(tmp_1, tmp_2, 1000, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.gqu_1.hp2().com(new Snack(this.gqu_1.jp2().en6(strings_getInstance().zmf_1)));
            if (!(this.gqu_1.kp2() == null)) {
              this.gqu_1.up7(null);
            } else {
              Companion_getInstance_122();
              this.gqu_1.np1_1.eoo('CourseListHome', emptyMap(), new UstadGoOptions(VOID, VOID, true));
            }

            this.id_1 = 3;
            this.hd_1 = 4;
            continue $sm;
          case 2:
            this.id_1 = 3;
            var tmp_3 = this.kd_1;
            if (tmp_3 instanceof Error) {
              var e = this.kd_1;
              var tmp_4;
              if (e instanceof IllegalArgumentException) {
                tmp_4 = strings_getInstance().fmh_1;
              } else {
                if (e instanceof AlreadyHasPendingRequestException) {
                  tmp_4 = strings_getInstance().ymf_1;
                } else {
                  if (e instanceof AlreadyEnroledInClassException) {
                    tmp_4 = strings_getInstance().lm3_1;
                  } else {
                    tmp_4 = strings_getInstance().glc_1;
                  }
                }
              }
              var errorMessage = tmp_4;
              l$ret$1: do {
                var this_0 = this.gqu_1.qqt_1;
                while (true) {
                  var prevValue = this_0.t2();
                  var tmp_5 = this.gqu_1.jp2().en6(errorMessage);
                  var tmp0_safe_receiver = e.message;
                  var tmp_6;
                  if (tmp0_safe_receiver == null) {
                    tmp_6 = null;
                  } else {
                    tmp_6 = ' :' + tmp0_safe_receiver;
                  }
                  var tmp1_elvis_lhs = tmp_6;
                  var nextValue = prevValue.xqt(tmp_5 + (tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs));
                  if (this_0.y1k(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
              this.hd_1 = 4;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 3:
            throw this.kd_1;
          case 4:
            this.id_1 = 3;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 3) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(JoinWithCodeViewModel$onClickJoin$slambda).y77 = function (completion) {
    return new JoinWithCodeViewModel$onClickJoin$slambda(this.gqu_1, completion);
  };
  function JoinWithCodeViewModel$onClickJoin$slambda_0(this$0, resultContinuation) {
    var i = new JoinWithCodeViewModel$onClickJoin$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.m86($completion);
    };
    l.$arity = 0;
    return l;
  }
  function JoinWithCodeViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'JoinWithCode');
    var tmp = this;
    Companion_getInstance_112();
    var tmp0_elvis_lhs = savedStateHandle.ba('inviteCode');
    tmp.qqt_1 = MutableStateFlow(new JoinWithCodeUiState(VOID, tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs));
    this.rqt_1 = asStateFlow(this.qqt_1);
    var tmp_0 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(RequestEnrolmentUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    tmp_0.sqt_1 = Instance(this_0, tmp$ret$0, null).n5c(this, requestEnrolmentUseCase$factory());
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_1 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazz.joinwithcode.JoinWithCodeViewModel.<anonymous>' call
    Companion_getInstance_112();
    this.wp2(this_1, 'inviteCode');
    var tmp_2 = this_1.f3();
    this.zp2(VOID, tmp_2, JoinWithCodeViewModel$lambda(this));
  }
  protoOf(JoinWithCodeViewModel).hqu = function (codeVal) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.qqt_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.joinwithcode.JoinWithCodeViewModel.onCodeValueChange.<anonymous>' call
        var nextValue = prevValue.xqt(null, codeVal);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(JoinWithCodeViewModel).iqu = function () {
    var tmp = JoinWithCodeViewModel$onClickJoin$lambda(this);
    this.yp8(tmp, JoinWithCodeViewModel$onClickJoin$slambda_0(this, null));
  };
  function JoinWithCodeUiState(codeError, code, fieldsEnabled) {
    codeError = codeError === VOID ? null : codeError;
    code = code === VOID ? '' : code;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    this.uqt_1 = codeError;
    this.vqt_1 = code;
    this.wqt_1 = fieldsEnabled;
  }
  protoOf(JoinWithCodeUiState).jqu = function (codeError, code, fieldsEnabled) {
    return new JoinWithCodeUiState(codeError, code, fieldsEnabled);
  };
  protoOf(JoinWithCodeUiState).xqt = function (codeError, code, fieldsEnabled, $super) {
    codeError = codeError === VOID ? this.uqt_1 : codeError;
    code = code === VOID ? this.vqt_1 : code;
    fieldsEnabled = fieldsEnabled === VOID ? this.wqt_1 : fieldsEnabled;
    return $super === VOID ? this.jqu(codeError, code, fieldsEnabled) : $super.jqu.call(this, codeError, code, fieldsEnabled);
  };
  protoOf(JoinWithCodeUiState).toString = function () {
    return 'JoinWithCodeUiState(codeError=' + this.uqt_1 + ', code=' + this.vqt_1 + ', fieldsEnabled=' + this.wqt_1 + ')';
  };
  protoOf(JoinWithCodeUiState).hashCode = function () {
    var result = this.uqt_1 == null ? 0 : getStringHashCode(this.uqt_1);
    result = imul(result, 31) + getStringHashCode(this.vqt_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.wqt_1) | 0;
    return result;
  };
  protoOf(JoinWithCodeUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof JoinWithCodeUiState))
      return false;
    var tmp0_other_with_cast = other instanceof JoinWithCodeUiState ? other : THROW_CCE();
    if (!(this.uqt_1 == tmp0_other_with_cast.uqt_1))
      return false;
    if (!(this.vqt_1 === tmp0_other_with_cast.vqt_1))
      return false;
    if (!(this.wqt_1 === tmp0_other_with_cast.wqt_1))
      return false;
    return true;
  };
  function requestEnrolmentUseCase$factory() {
    return getPropertyCallableRef('requestEnrolmentUseCase', 1, KProperty1, function (receiver) {
      return _get_requestEnrolmentUseCase__62wq8f(receiver);
    }, null);
  }
  function requestEnrolmentUseCase$factory_0() {
    return getPropertyCallableRef('requestEnrolmentUseCase', 1, KProperty1, function (receiver) {
      return _get_requestEnrolmentUseCase__62wq8f(receiver);
    }, null);
  }
  function ClazzListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.squ_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzListViewModel$slambda$slambda$slambda).dou = function (hasPermission, $completion) {
    var tmp = this.eou(hasPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzListViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.dou((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzListViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.squ_1.gpa_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp0_newClazzListOptionVisible = this.tqu_1 ? this.squ_1.lpa().equals(ListViewMode_PICKER_getInstance()) : false;
              var nextValue = prevValue.fqv(tmp0_newClazzListOptionVisible, VOID, VOID, VOID, VOID, VOID, this.tqu_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzListViewModel$slambda$slambda$slambda).eou = function (hasPermission, completion) {
    var i = new ClazzListViewModel$slambda$slambda$slambda(this.squ_1, completion);
    i.tqu_1 = hasPermission;
    return i;
  };
  function ClazzListViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzListViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (hasPermission, $completion) {
      return i.dou(hasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzListViewModel$slambda$slambda(this$0, resultContinuation) {
    this.oqv_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzListViewModel$slambda$slambda).m86 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzListViewModel$slambda$slambda).z77 = function ($completion) {
    return this.m86($completion);
  };
  protoOf(ClazzListViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.oqv_1.fp2().c7f();
            var tmp_1 = this.oqv_1.bp2().vmx().gju_1;
            PermissionFlags_getInstance();
            var tmp_2 = distinctUntilChanged(tmp_0.uhc(tmp_1, new Long(512, 0)));
            var tmp_3 = ClazzListViewModel$slambda$slambda$slambda_0(this.oqv_1, null);
            suspendResult = tmp_2.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_12(tmp_3), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzListViewModel$slambda$slambda).y77 = function (completion) {
    return new ClazzListViewModel$slambda$slambda(this.oqv_1, completion);
  };
  function ClazzListViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzListViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.m86($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzListViewModel$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.xqv_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzListViewModel$slambda$slambda$slambda_1).zqv = function (it, $completion) {
    var tmp = this.aqw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzListViewModel$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.zqv((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzListViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.xqv_1.gpa_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.fqv(VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.yqv_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzListViewModel$slambda$slambda$slambda_1).aqw = function (it, completion) {
    var i = new ClazzListViewModel$slambda$slambda$slambda_1(this.xqv_1, completion);
    i.yqv_1 = it;
    return i;
  };
  function ClazzListViewModel$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzListViewModel$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.zqv(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzListViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.jqw_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzListViewModel$slambda$slambda_1).m86 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzListViewModel$slambda$slambda_1).z77 = function ($completion) {
    return this.m86($completion);
  };
  protoOf(ClazzListViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.jqw_1.fp2().a7f();
            var tmp_1 = this.jqw_1.dp2();
            var tmp_2 = tmp_0.qei(tmp_1, 1);
            var tmp_3 = ClazzListViewModel$slambda$slambda$slambda_2(this.jqw_1, null);
            suspendResult = tmp_2.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_12(tmp_3), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzListViewModel$slambda$slambda_1).y77 = function (completion) {
    return new ClazzListViewModel$slambda$slambda_1(this.jqw_1, completion);
  };
  function ClazzListViewModel$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzListViewModel$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($completion) {
      return i.m86($completion);
    };
    l.$arity = 0;
    return l;
  }
  function Companion_105() {
    Companion_instance_153 = this;
    this.kqw_1 = 'CourseList';
    this.lqw_1 = 'CourseListHome';
    this.mqw_1 = listOf(['CourseList', 'CourseListHome']);
    this.nqw_1 = 'excludeAlreadySelectedClazzList';
  }
  var Companion_instance_153;
  function Companion_getInstance_122() {
    if (Companion_instance_153 == null)
      new Companion_105();
    return Companion_instance_153;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_12(function_0) {
    this.oqw_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_12).t1d = function (value, $completion) {
    return this.oqw_1(value, $completion);
  };
  function ClazzListViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.fp2().b7d().z8b(toQueryLikeParam(this$0.pp1_1.t2().fol_1.uok_1), this$0.bp2().vmx().gju_1, this$0.pqx_1, this$0.gpa_1.t2().xqu_1.lor_1, this$0.gpa_1.t2().zqu_1, systemTimeInMillis(), this$0.qqx_1);
    };
  }
  function ClazzListViewModel$slambda(this$0, resultContinuation) {
    this.aqy_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzListViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzListViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzListViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.aqy_1.gpa_1, ClazzListViewModel$slambda$slambda_0(this.aqy_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzListViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzListViewModel$slambda(this.aqy_1, completion);
    i.bqy_1 = $this$launch;
    return i;
  };
  function ClazzListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzListViewModel$slambda_1(this$0, resultContinuation) {
    this.kqy_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzListViewModel$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzListViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzListViewModel$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.kqy_1.gpa_1, ClazzListViewModel$slambda$slambda_2(this.kqy_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzListViewModel$slambda_1).v1m = function ($this$launch, completion) {
    var i = new ClazzListViewModel$slambda_1(this.kqy_1, completion);
    i.lqy_1 = $this$launch;
    return i;
  };
  function ClazzListViewModel$slambda_2(this$0, resultContinuation) {
    var i = new ClazzListViewModel$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzListViewModel$onClickCancelEnrolmentRequest$slambda(this$0, $enrolmentRequest, resultContinuation) {
    this.uqy_1 = this$0;
    this.vqy_1 = $enrolmentRequest;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzListViewModel$onClickCancelEnrolmentRequest$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzListViewModel$onClickCancelEnrolmentRequest$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzListViewModel$onClickCancelEnrolmentRequest$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.uqy_1.fp2().a7f();
            var tmp_1 = this.vqy_1.hej_1;
            suspendResult = tmp_0.rei(tmp_1, 4, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.uqy_1.hp2().com(new Snack(this.uqy_1.jp2().en6(strings_getInstance().amg_1)));
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzListViewModel$onClickCancelEnrolmentRequest$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzListViewModel$onClickCancelEnrolmentRequest$slambda(this.uqy_1, this.vqy_1, completion);
    i.wqy_1 = $this$launch;
    return i;
  };
  function ClazzListViewModel$onClickCancelEnrolmentRequest$slambda_0(this$0, $enrolmentRequest, resultContinuation) {
    var i = new ClazzListViewModel$onClickCancelEnrolmentRequest$slambda(this$0, $enrolmentRequest, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzListViewModel(di, savedStateHandle, destinationName) {
    Companion_getInstance_122();
    destinationName = destinationName === VOID ? 'CourseList' : destinationName;
    UstadListViewModel.call(this, di, savedStateHandle, new ClazzListUiState(), destinationName);
    var tmp = this;
    var tmp0_safe_receiver = savedStateHandle.ba('excludeAlreadySelectedClazzList');
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : split(tmp0_safe_receiver, [',']);
    var tmp_0;
    if (tmp1_safe_receiver == null) {
      tmp_0 = null;
    } else {
      // Inline function 'kotlin.collections.filter' call
      // Inline function 'kotlin.collections.filterTo' call
      var destination = ArrayList_init_$Create$();
      var tmp0_iterator = tmp1_safe_receiver.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.list.ClazzListViewModel.filterAlreadySelectedList.<anonymous>' call
        // Inline function 'kotlin.text.isNotEmpty' call
        if (charSequenceLength(element) > 0) {
          destination.i1(element);
        }
      }
      tmp_0 = destination;
    }
    var tmp2_safe_receiver = tmp_0;
    var tmp_1;
    if (tmp2_safe_receiver == null) {
      tmp_1 = null;
    } else {
      // Inline function 'kotlin.collections.map' call
      // Inline function 'kotlin.collections.mapTo' call
      var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp2_safe_receiver, 10));
      var tmp0_iterator_0 = tmp2_safe_receiver.w();
      while (tmp0_iterator_0.f()) {
        var item = tmp0_iterator_0.e();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.list.ClazzListViewModel.filterAlreadySelectedList.<anonymous>' call
        // Inline function 'kotlin.text.trim' call
        var tmp$ret$4 = toString(trim(isCharSequence(item) ? item : THROW_CCE()));
        var tmp$ret$5 = toLong_0(tmp$ret$4);
        destination_0.i1(tmp$ret$5);
      }
      tmp_1 = destination_0;
    }
    var tmp3_elvis_lhs = tmp_1;
    var tmp_2;
    if (tmp3_elvis_lhs == null) {
      // Inline function 'kotlin.collections.listOf' call
      tmp_2 = emptyList();
    } else {
      tmp_2 = tmp3_elvis_lhs;
    }
    tmp.pqx_1 = tmp_2;
    var tmp_3 = this;
    Companion_getInstance_102();
    var tmp0_safe_receiver_0 = savedStateHandle.ba('filterByPermission');
    var tmp1_elvis_lhs = tmp0_safe_receiver_0 == null ? null : toLong_0(tmp0_safe_receiver_0);
    var tmp_4;
    if (tmp1_elvis_lhs == null) {
      PermissionFlags_getInstance();
      tmp_4 = new Long(1, 0);
    } else {
      tmp_4 = tmp1_elvis_lhs;
    }
    tmp_3.qqx_1 = tmp_4;
    var tmp_5 = this;
    tmp_5.rqx_1 = ClazzListViewModel$pagingSourceFactory$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.pp1_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.list.ClazzListViewModel.<anonymous>' call
        var tmp0_searchState = this.ppb();
        var tmp1_title = this.xpb(strings_getInstance().lmb_1, strings_getInstance().lmb_1);
        var tmp2_fabState = this.spb(!this.dp2().equals(new Long(0, 0)), strings_getInstance().mmb_1);
        var nextValue = prevValue.nol(tmp2_fabState, VOID, tmp1_title, true, VOID, VOID, VOID, tmp0_searchState);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.gpa_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.list.ClazzListViewModel.<anonymous>' call
        // Inline function 'kotlin.collections.associateWith' call
        var this_2 = values();
        var result = LinkedHashMap_init_$Create$_0(coerceAtLeast(mapCapacity(this_2.length), 16));
        // Inline function 'kotlin.collections.associateWithTo' call
        var inductionVariable = 0;
        var last = this_2.length;
        while (inductionVariable < last) {
          var element_0 = this_2[inductionVariable];
          inductionVariable = inductionVariable + 1 | 0;
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.list.ClazzListViewModel.<anonymous>.<anonymous>' call
          var tmp$ret$11 = this.jp2().en6(get_dayStringResource(element_0));
          result.s(element_0, tmp$ret$11);
        }
        var tmp1_clazzList = this.rqx_1;
        var nextValue_0 = prevValue_0.fqv(VOID, tmp1_clazzList, VOID, VOID, VOID, VOID, VOID, VOID, VOID, result);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_6 = this.cp2();
    launch(tmp_6, VOID, VOID, ClazzListViewModel$slambda_0(this, null));
    var tmp_7 = this.cp2();
    launch(tmp_7, VOID, VOID, ClazzListViewModel$slambda_2(this, null));
  }
  protoOf(ClazzListViewModel).apb = function (searchText) {
    this.ipa_1.i1h(new RefreshCommand());
  };
  protoOf(ClazzListViewModel).bpb = function () {
    this.upb('CourseEdit');
  };
  protoOf(ClazzListViewModel).xqy = function () {
    Companion_getInstance_102();
    Companion_getInstance_4();
    this.np1_1.sns('JoinWithCode', mapOf_0(to('argCodeTable', (6).toString())));
  };
  protoOf(ClazzListViewModel).yqy = function (entry) {
    this.wpb('Course', entry.u8c_1, entry);
  };
  protoOf(ClazzListViewModel).zqy = function (sortOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.gpa_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.list.ClazzListViewModel.onSortOrderChanged.<anonymous>' call
        var nextValue = prevValue.fqv(VOID, VOID, VOID, sortOption);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.ipa_1.i1h(new RefreshCommand());
  };
  protoOf(ClazzListViewModel).aqz = function (filterOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.gpa_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.list.ClazzListViewModel.onClickFilterChip.<anonymous>' call
        var nextValue = prevValue.fqv(VOID, VOID, VOID, VOID, VOID, filterOption.qom_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.ipa_1.i1h(new RefreshCommand());
  };
  protoOf(ClazzListViewModel).bqz = function (enrolmentRequest) {
    var tmp = this.cp2();
    launch(tmp, VOID, VOID, ClazzListViewModel$onClickCancelEnrolmentRequest$slambda_0(this, enrolmentRequest, null));
  };
  function Companion_106() {
    Companion_instance_154 = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().yld_1;
    var tmp_1 = new SortOrderOption(tmp_0, 1, true);
    var tmp_2 = strings_getInstance().yld_1;
    var tmp_3 = new SortOrderOption(tmp_2, 2, false);
    var tmp_4 = strings_getInstance().ule_1;
    var tmp_5 = new SortOrderOption(tmp_4, 3, true);
    var tmp_6 = strings_getInstance().ule_1;
    tmp.cqz_1 = listOf([tmp_1, tmp_3, tmp_5, new SortOrderOption(tmp_6, 4, false)]);
  }
  var Companion_instance_154;
  function Companion_getInstance_123() {
    if (Companion_instance_154 == null)
      new Companion_106();
    return Companion_instance_154;
  }
  function ClazzListUiState$_init_$lambda_r0y0x0() {
    return new EmptyPagingSource();
  }
  function ClazzListUiState(newClazzListOptionVisible, clazzList, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, canAddNewCourse, pendingEnrolments, filterOptions, dayOfWeekStrings, localDateTimeNow) {
    Companion_getInstance_123();
    newClazzListOptionVisible = newClazzListOptionVisible === VOID ? true : newClazzListOptionVisible;
    var tmp;
    if (clazzList === VOID) {
      tmp = ClazzListUiState$_init_$lambda_r0y0x0;
    } else {
      tmp = clazzList;
    }
    clazzList = tmp;
    sortOptions = sortOptions === VOID ? Companion_getInstance_123().cqz_1 : sortOptions;
    activeSortOrderOption = activeSortOrderOption === VOID ? first_0(sortOptions) : activeSortOrderOption;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    var tmp_0;
    if (selectedChipId === VOID) {
      tmp_0 = 5;
    } else {
      tmp_0 = selectedChipId;
    }
    selectedChipId = tmp_0;
    canAddNewCourse = canAddNewCourse === VOID ? false : canAddNewCourse;
    pendingEnrolments = pendingEnrolments === VOID ? emptyList() : pendingEnrolments;
    var tmp_1;
    if (filterOptions === VOID) {
      var tmp_2 = strings_getInstance().bmc_1;
      tmp_1 = listOf([new MessageIdOption2(tmp_2, 5), new MessageIdOption2(strings_getInstance().sls_1, 0)]);
    } else {
      tmp_1 = filterOptions;
    }
    filterOptions = tmp_1;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? emptyMap() : dayOfWeekStrings;
    localDateTimeNow = localDateTimeNow === VOID ? toLocalDateTime(System_instance.sl7(), Companion_getInstance_9().rlb()) : localDateTimeNow;
    this.uqu_1 = newClazzListOptionVisible;
    this.vqu_1 = clazzList;
    this.wqu_1 = sortOptions;
    this.xqu_1 = activeSortOrderOption;
    this.yqu_1 = fieldsEnabled;
    this.zqu_1 = selectedChipId;
    this.aqv_1 = canAddNewCourse;
    this.bqv_1 = pendingEnrolments;
    this.cqv_1 = filterOptions;
    this.dqv_1 = dayOfWeekStrings;
    this.eqv_1 = localDateTimeNow;
  }
  protoOf(ClazzListUiState).dqz = function (newClazzListOptionVisible, clazzList, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, canAddNewCourse, pendingEnrolments, filterOptions, dayOfWeekStrings, localDateTimeNow) {
    return new ClazzListUiState(newClazzListOptionVisible, clazzList, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, canAddNewCourse, pendingEnrolments, filterOptions, dayOfWeekStrings, localDateTimeNow);
  };
  protoOf(ClazzListUiState).fqv = function (newClazzListOptionVisible, clazzList, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, canAddNewCourse, pendingEnrolments, filterOptions, dayOfWeekStrings, localDateTimeNow, $super) {
    newClazzListOptionVisible = newClazzListOptionVisible === VOID ? this.uqu_1 : newClazzListOptionVisible;
    clazzList = clazzList === VOID ? this.vqu_1 : clazzList;
    sortOptions = sortOptions === VOID ? this.wqu_1 : sortOptions;
    activeSortOrderOption = activeSortOrderOption === VOID ? this.xqu_1 : activeSortOrderOption;
    fieldsEnabled = fieldsEnabled === VOID ? this.yqu_1 : fieldsEnabled;
    selectedChipId = selectedChipId === VOID ? this.zqu_1 : selectedChipId;
    canAddNewCourse = canAddNewCourse === VOID ? this.aqv_1 : canAddNewCourse;
    pendingEnrolments = pendingEnrolments === VOID ? this.bqv_1 : pendingEnrolments;
    filterOptions = filterOptions === VOID ? this.cqv_1 : filterOptions;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? this.dqv_1 : dayOfWeekStrings;
    localDateTimeNow = localDateTimeNow === VOID ? this.eqv_1 : localDateTimeNow;
    return $super === VOID ? this.dqz(newClazzListOptionVisible, clazzList, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, canAddNewCourse, pendingEnrolments, filterOptions, dayOfWeekStrings, localDateTimeNow) : $super.dqz.call(this, newClazzListOptionVisible, clazzList, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, canAddNewCourse, pendingEnrolments, filterOptions, dayOfWeekStrings, localDateTimeNow);
  };
  protoOf(ClazzListUiState).toString = function () {
    return 'ClazzListUiState(newClazzListOptionVisible=' + this.uqu_1 + ', clazzList=' + this.vqu_1 + ', sortOptions=' + this.wqu_1 + ', activeSortOrderOption=' + this.xqu_1 + ', fieldsEnabled=' + this.yqu_1 + ', selectedChipId=' + this.zqu_1 + ', canAddNewCourse=' + this.aqv_1 + ', pendingEnrolments=' + this.bqv_1 + ', filterOptions=' + this.cqv_1 + ', dayOfWeekStrings=' + this.dqv_1 + ', localDateTimeNow=' + this.eqv_1 + ')';
  };
  protoOf(ClazzListUiState).hashCode = function () {
    var result = getBooleanHashCode(this.uqu_1);
    result = imul(result, 31) + hashCode(this.vqu_1) | 0;
    result = imul(result, 31) + hashCode(this.wqu_1) | 0;
    result = imul(result, 31) + this.xqu_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.yqu_1) | 0;
    result = imul(result, 31) + this.zqu_1 | 0;
    result = imul(result, 31) + getBooleanHashCode(this.aqv_1) | 0;
    result = imul(result, 31) + hashCode(this.bqv_1) | 0;
    result = imul(result, 31) + hashCode(this.cqv_1) | 0;
    result = imul(result, 31) + hashCode(this.dqv_1) | 0;
    result = imul(result, 31) + this.eqv_1.hashCode() | 0;
    return result;
  };
  protoOf(ClazzListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzListUiState ? other : THROW_CCE();
    if (!(this.uqu_1 === tmp0_other_with_cast.uqu_1))
      return false;
    if (!equals(this.vqu_1, tmp0_other_with_cast.vqu_1))
      return false;
    if (!equals(this.wqu_1, tmp0_other_with_cast.wqu_1))
      return false;
    if (!this.xqu_1.equals(tmp0_other_with_cast.xqu_1))
      return false;
    if (!(this.yqu_1 === tmp0_other_with_cast.yqu_1))
      return false;
    if (!(this.zqu_1 === tmp0_other_with_cast.zqu_1))
      return false;
    if (!(this.aqv_1 === tmp0_other_with_cast.aqv_1))
      return false;
    if (!equals(this.bqv_1, tmp0_other_with_cast.bqv_1))
      return false;
    if (!equals(this.cqv_1, tmp0_other_with_cast.cqv_1))
      return false;
    if (!equals(this.dqv_1, tmp0_other_with_cast.dqv_1))
      return false;
    if (!this.eqv_1.equals(tmp0_other_with_cast.eqv_1))
      return false;
    return true;
  };
  function CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda).oqz = function (entity, permissions, $completion) {
    var tmp = this.pqz(entity, permissions, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda).um = function (p1, p2, $completion) {
    var tmp = (p1 == null ? true : p1 instanceof CoursePermission) ? p1 : THROW_CCE();
    return this.oqz(tmp, p2 instanceof PermissionPair ? p2 : THROW_CCE(), $completion);
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = this.mqz_1;
          var tmp_0;
          if (this.nqz_1.ed8_1) {
            tmp_0 = this_0;
          } else {
            tmp_0 = null;
          }
          return new Pair(tmp_0, this.nqz_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda).pqz = function (entity, permissions, completion) {
    var i = new CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda(completion);
    i.mqz_1 = entity;
    i.nqz_1 = permissions;
    return i;
  };
  function CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_0(resultContinuation) {
    var i = new CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda(resultContinuation);
    var l = function (entity, permissions, $completion) {
      return i.oqz(entity, permissions, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.yqz_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_1).fr0 = function (it, $completion) {
    var tmp = this.gr0(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.fr0(p1 instanceof Pair ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.ar0_1 = this.zqz_1;
            this.br0_1 = this.ar0_1.y6();
            this.cr0_1 = this.ar0_1.z6();
            this.dr0_1 = this.cr0_1;
            this.er0_1 = this.dr0_1.z6();
            l$ret$1: do {
              var this_0 = this.yqz_1.dr1_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_0;
                if (!(this.br0_1 == null)) {
                  tmp_0 = CoursePermissionConstants_getInstance().dpp_1;
                } else {
                  tmp_0 = emptyList();
                }
                var nextValue = prevValue.ir1(this.br0_1, tmp_0);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.yqz_1.pp1_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.nol(prevValue_0.yok_1.tol(this.er0_1));
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            if (!(this.br0_1 == null)) {
              this.hd_1 = 1;
              suspendResult = getTitleForCoursePermission(this.yqz_1, this.br0_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            var title = suspendResult;
            l$ret$5: do {
              var this_2 = this.yqz_1.pp1_1;
              while (true) {
                var prevValue_1 = this_2.t2();
                var nextValue_1 = prevValue_1.nol(VOID, VOID, title);
                if (this_2.y1k(prevValue_1, nextValue_1)) {
                  break l$ret$5;
                }
              }
            }
             while (false);
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_1).gr0 = function (it, completion) {
    var i = new CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_1(this.yqz_1, completion);
    i.zqz_1 = it;
    return i;
  };
  function CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.fr0(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CoursePermissionDetailViewModel$slambda$slambda$slambda($entityFlow, $permissionFlow, this$0, resultContinuation) {
    this.rr1_1 = $entityFlow;
    this.sr1_1 = $permissionFlow;
    this.tr1_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = distinctUntilChanged(combine(this.rr1_1, this.sr1_1, CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_0(null)));
            suspendResult = collectLatest(tmp_0, CoursePermissionDetailViewModel$slambda$slambda$slambda$slambda_2(this.tr1_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new CoursePermissionDetailViewModel$slambda$slambda$slambda(this.rr1_1, this.sr1_1, this.tr1_1, completion);
    i.ur1_1 = $this$launch;
    return i;
  };
  function CoursePermissionDetailViewModel$slambda$slambda$slambda_0($entityFlow, $permissionFlow, this$0, resultContinuation) {
    var i = new CoursePermissionDetailViewModel$slambda$slambda$slambda($entityFlow, $permissionFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CoursePermissionDetailViewModel$slambda$slambda($this_launch, $entityFlow, $permissionFlow, this$0, resultContinuation) {
    this.dr2_1 = $this_launch;
    this.er2_1 = $entityFlow;
    this.fr2_1 = $permissionFlow;
    this.gr2_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionDetailViewModel$slambda$slambda).m86 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda).z77 = function ($completion) {
    return this.m86($completion);
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.dr2_1, VOID, VOID, CoursePermissionDetailViewModel$slambda$slambda$slambda_0(this.er2_1, this.fr2_1, this.gr2_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CoursePermissionDetailViewModel$slambda$slambda).y77 = function (completion) {
    return new CoursePermissionDetailViewModel$slambda$slambda(this.dr2_1, this.er2_1, this.fr2_1, this.gr2_1, completion);
  };
  function CoursePermissionDetailViewModel$slambda$slambda_0($this_launch, $entityFlow, $permissionFlow, this$0, resultContinuation) {
    var i = new CoursePermissionDetailViewModel$slambda$slambda($this_launch, $entityFlow, $permissionFlow, this$0, resultContinuation);
    var l = function ($completion) {
      return i.m86($completion);
    };
    l.$arity = 0;
    return l;
  }
  function onClickEdit_0($this) {
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissiondetail.CoursePermissionDetailViewModel.onClickEdit.<anonymous>' call
    Companion_getInstance_112();
    var tmp0_safe_receiver = $this.dr1_1.t2().gr1_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.wd5_1;
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.toString();
    this_0.s('entityUid', tmp2_elvis_lhs == null ? '0' : tmp2_elvis_lhs);
    Companion_getInstance_112();
    $this.wp2(this_0, 'clazzUid');
    var tmp$ret$2 = this_0.f3();
    $this.np1_1.sns('CoursePermissionEdit', tmp$ret$2);
  }
  function Companion_107() {
    this.hr2_1 = 'CoursePermissionDetail';
  }
  var Companion_instance_155;
  function Companion_getInstance_124() {
    return Companion_instance_155;
  }
  function CoursePermissionDetailViewModel$onClickEdit$ref($boundThis) {
    var l = function () {
      onClickEdit_0($boundThis);
      return Unit_instance;
    };
    l.callableName = 'onClickEdit';
    return l;
  }
  function CoursePermissionDetailViewModel$slambda(this$0, $entityFlow, $permissionFlow, resultContinuation) {
    this.qr2_1 = this$0;
    this.rr2_1 = $entityFlow;
    this.sr2_1 = $permissionFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionDetailViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionDetailViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CoursePermissionDetailViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.qr2_1.dr1_1, CoursePermissionDetailViewModel$slambda$slambda_0(this.tr2_1, this.rr2_1, this.sr2_1, this.qr2_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CoursePermissionDetailViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new CoursePermissionDetailViewModel$slambda(this.qr2_1, this.rr2_1, this.sr2_1, completion);
    i.tr2_1 = $this$launch;
    return i;
  };
  function CoursePermissionDetailViewModel$slambda_0(this$0, $entityFlow, $permissionFlow, resultContinuation) {
    var i = new CoursePermissionDetailViewModel$slambda(this$0, $entityFlow, $permissionFlow, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CoursePermissionDetailViewModel(di, savedStateHandle) {
    DetailViewModel.call(this, di, savedStateHandle, 'CoursePermissionDetail');
    this.dr1_1 = MutableStateFlow(new CoursePermissionDetailUiState());
    this.er1_1 = asStateFlow(this.dr1_1);
    var tmp = this;
    Companion_getInstance_112();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.fr1_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var entityFlow = this.fp2().b7f().s7r(this.fp1_1, this.fr1_1);
    var tmp_0 = this.fp2().b7f();
    var tmp_1 = this.dp2();
    PermissionFlags_getInstance();
    var tmp_2 = new Long(1, 0);
    PermissionFlags_getInstance();
    var permissionFlow = tmp_0.dd5(tmp_1, this.fr1_1, tmp_2, new Long(2, 0));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.pp1_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissiondetail.CoursePermissionDetailViewModel.<anonymous>' call
        var tmp_3 = this.jp2().en6(strings_getInstance().mlo_1);
        var tmp_4 = FabIcon_EDIT_getInstance();
        var nextValue = prevValue.nol(new FabUiState(VOID, tmp_3, tmp_4, CoursePermissionDetailViewModel$onClickEdit$ref(this)));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_5 = this.cp2();
    launch(tmp_5, VOID, VOID, CoursePermissionDetailViewModel$slambda_0(this, entityFlow, permissionFlow, null));
  }
  function CoursePermissionDetailUiState(coursePermission, permissionLabels) {
    coursePermission = coursePermission === VOID ? null : coursePermission;
    permissionLabels = permissionLabels === VOID ? emptyList() : permissionLabels;
    this.gr1_1 = coursePermission;
    this.hr1_1 = permissionLabels;
  }
  protoOf(CoursePermissionDetailUiState).ir1 = function (coursePermission, permissionLabels) {
    return new CoursePermissionDetailUiState(coursePermission, permissionLabels);
  };
  protoOf(CoursePermissionDetailUiState).toString = function () {
    return 'CoursePermissionDetailUiState(coursePermission=' + this.gr1_1 + ', permissionLabels=' + this.hr1_1 + ')';
  };
  protoOf(CoursePermissionDetailUiState).hashCode = function () {
    var result = this.gr1_1 == null ? 0 : this.gr1_1.hashCode();
    result = imul(result, 31) + hashCode(this.hr1_1) | 0;
    return result;
  };
  protoOf(CoursePermissionDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CoursePermissionDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof CoursePermissionDetailUiState ? other : THROW_CCE();
    if (!equals(this.gr1_1, tmp0_other_with_cast.gr1_1))
      return false;
    if (!equals(this.hr1_1, tmp0_other_with_cast.hr1_1))
      return false;
    return true;
  };
  function CoursePermissionEditViewModel$slambda$slambda(this$0, resultContinuation) {
    this.cr3_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionEditViewModel$slambda$slambda).er3 = function (db, $completion) {
    var tmp = this.gmp(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.er3(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CoursePermissionEditViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.dr3_1.b7f().zd4(this.cr3_1.rp7_1, this.cr3_1.er4_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CoursePermissionEditViewModel$slambda$slambda).gmp = function (db, completion) {
    var i = new CoursePermissionEditViewModel$slambda$slambda(this.cr3_1, completion);
    i.dr3_1 = db;
    return i;
  };
  function CoursePermissionEditViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new CoursePermissionEditViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.er3(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CoursePermissionEditViewModel$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.nr4_1 = this$0;
    this.or4_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionEditViewModel$slambda$slambda_1).pdb = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionEditViewModel$slambda$slambda_1).z77 = function ($completion) {
    return this.pdb($completion);
  };
  protoOf(CoursePermissionEditViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = get_doorPrimaryKeyManager(this.nr4_1.ep2());
            Companion_getInstance_5();
            suspendResult = tmp_0.b62(10012, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            Companion_getInstance_112();
            var tmp0_safe_receiver = this.or4_1.ba('clazzUid');
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
            var tmp_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
            var tmp2_safe_receiver = this.or4_1.ba('grantToRole');
            var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : toInt(tmp2_safe_receiver);
            var tmp_2 = tmp3_elvis_lhs == null ? 0 : tmp3_elvis_lhs;
            Companion_getInstance_112();
            var tmp4_safe_receiver = this.or4_1.ba('personUid');
            var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : toLong_0(tmp4_safe_receiver);
            return new CoursePermission(ARGUMENT, VOID, tmp_1, tmp_2, tmp5_elvis_lhs == null ? new Long(0, 0) : tmp5_elvis_lhs);
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CoursePermissionEditViewModel$slambda$slambda_1).y77 = function (completion) {
    return new CoursePermissionEditViewModel$slambda$slambda_1(this.nr4_1, this.or4_1, completion);
  };
  function CoursePermissionEditViewModel$slambda$slambda_2(this$0, $savedStateHandle, resultContinuation) {
    var i = new CoursePermissionEditViewModel$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation);
    var l = function ($completion) {
      return i.pdb($completion);
    };
    l.$arity = 0;
    return l;
  }
  function CoursePermissionEditViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.cr4_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionedit.CoursePermissionEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.sr4(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function CoursePermissionEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.cqf();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function CoursePermissionEditViewModel$onClickSave$slambda$slambda(this$0, $entity, resultContinuation) {
    this.br5_1 = this$0;
    this.cr5_1 = $entity;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionEditViewModel$onClickSave$slambda$slambda).fmp = function (it, $completion) {
    var tmp = this.gmp(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionEditViewModel$onClickSave$slambda$slambda).he = function (p1, $completion) {
    return this.fmp(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CoursePermissionEditViewModel$onClickSave$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.br5_1.fp2().b7f().ad5(this.cr5_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CoursePermissionEditViewModel$onClickSave$slambda$slambda).gmp = function (it, completion) {
    var i = new CoursePermissionEditViewModel$onClickSave$slambda$slambda(this.br5_1, this.cr5_1, completion);
    i.dr5_1 = it;
    return i;
  };
  function CoursePermissionEditViewModel$onClickSave$slambda$slambda_0(this$0, $entity, resultContinuation) {
    var i = new CoursePermissionEditViewModel$onClickSave$slambda$slambda(this$0, $entity, resultContinuation);
    var l = function (it, $completion) {
      return i.fmp(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function Companion_108() {
    this.er5_1 = 'CoursePermissionEdit';
    this.fr5_1 = 'grantToRole';
  }
  var Companion_instance_156;
  function Companion_getInstance_125() {
    return Companion_instance_156;
  }
  function CoursePermissionEditViewModel$slambda(this$0, resultContinuation) {
    this.or5_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionEditViewModel$slambda).oqh = function (it, $completion) {
    var tmp = this.gmp(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionEditViewModel$slambda).he = function (p1, $completion) {
    return this.oqh(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CoursePermissionEditViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.pr5_1.b7f();
            var tmp_1 = this.or5_1.dp2();
            PermissionFlags_getInstance();
            suspendResult = tmp_0.gd5(tmp_1, this.or5_1.er4_1, new Long(2, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CoursePermissionEditViewModel$slambda).gmp = function (it, completion) {
    var i = new CoursePermissionEditViewModel$slambda(this.or5_1, completion);
    i.pr5_1 = it;
    return i;
  };
  function CoursePermissionEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new CoursePermissionEditViewModel$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.oqh(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CoursePermissionEditViewModel$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.cr4_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionedit.CoursePermissionEditViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.sr4(VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function CoursePermissionEditViewModel$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.yr5_1 = this$0;
    this.zr5_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionEditViewModel$slambda_1).u1m = function ($this$launchIfHasPermission, $completion) {
    var tmp = this.v1m($this$launchIfHasPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionEditViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CoursePermissionEditViewModel$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            var tmp_0 = Companion_getInstance_5().a4r();
            var tmp_1 = CoursePermissionEditViewModel$slambda$slambda_0(this.yr5_1, null);
            var tmp_2 = CoursePermissionEditViewModel$slambda$slambda_2(this.yr5_1, this.zr5_1, null);
            suspendResult = this.yr5_1.tp2(tmp_0, VOID, VOID, tmp_1, tmp_2, CoursePermissionEditViewModel$slambda$lambda(this.yr5_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.br6_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = getTitleForCoursePermission(this.yr5_1, this.br6_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var title = suspendResult;
            l$ret$1: do {
              var this_0 = this.yr5_1.pp1_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_3 = this.yr5_1.jp2().en6(strings_getInstance().alw_1);
                var nextValue = prevValue.nol(VOID, VOID, title, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_3, VOID, CoursePermissionEditViewModel$onClickSave$ref(this.yr5_1)));
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.yr5_1.cr4_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.sr4(VOID, true);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CoursePermissionEditViewModel$slambda_1).v1m = function ($this$launchIfHasPermission, completion) {
    var i = new CoursePermissionEditViewModel$slambda_1(this.yr5_1, this.zr5_1, completion);
    i.ar6_1 = $this$launchIfHasPermission;
    return i;
  };
  function CoursePermissionEditViewModel$slambda_2(this$0, $savedStateHandle, resultContinuation) {
    var i = new CoursePermissionEditViewModel$slambda_1(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launchIfHasPermission, $completion) {
      return i.u1m($this$launchIfHasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CoursePermissionEditViewModel$onClickSave$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.cr4_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionedit.CoursePermissionEditViewModel.onClickSave.<anonymous>.<anonymous>' call
          var nextValue = prevValue.sr4(VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function CoursePermissionEditViewModel$onClickSave$slambda(this$0, resultContinuation) {
    this.kr6_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionEditViewModel$onClickSave$slambda).m86 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionEditViewModel$onClickSave$slambda).z77 = function ($completion) {
    return this.m86($completion);
  };
  protoOf(CoursePermissionEditViewModel$onClickSave$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var tmp0_elvis_lhs = this.kr6_1.cr4_1.t2().pr4_1;
            var tmp_1;
            if (tmp0_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_1 = tmp0_elvis_lhs;
            }

            tmp_0.lr6_1 = tmp_1;
            this.hd_1 = 1;
            var tmp_2 = this.kr6_1.fp2();
            suspendResult = withDoorTransactionAsync(tmp_2, VOID, CoursePermissionEditViewModel$onClickSave$slambda$slambda_0(this.kr6_1, this.lr6_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            Companion_getInstance_102();
            var popUpToOnFinish = this.kr6_1.lp1_1.ba('popUpToOnFinish');
            if (!(popUpToOnFinish == null)) {
              this.kr6_1.np1_1.foo(popUpToOnFinish, false);
            } else {
              this.kr6_1.tp7('CoursePermissionDetail', this.lr6_1.wd5_1, this.lr6_1);
            }

            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CoursePermissionEditViewModel$onClickSave$slambda).y77 = function (completion) {
    return new CoursePermissionEditViewModel$onClickSave$slambda(this.kr6_1, completion);
  };
  function CoursePermissionEditViewModel$onClickSave$slambda_0(this$0, resultContinuation) {
    var i = new CoursePermissionEditViewModel$onClickSave$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.m86($completion);
    };
    l.$arity = 0;
    return l;
  }
  function CoursePermissionEditViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'CoursePermissionEdit');
    this.cr4_1 = MutableStateFlow(new CoursePermissionEditUiState());
    this.dr4_1 = asStateFlow(this.cr4_1);
    var tmp = this;
    Companion_getInstance_112();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.er4_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.cr4_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionedit.CoursePermissionEditViewModel.<anonymous>' call
        var nextValue = prevValue.sr4(VOID, VOID, CoursePermissionConstants_getInstance().dpp_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.pp1_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionedit.CoursePermissionEditViewModel.<anonymous>' call
        var nextValue_0 = prevValue_0.nol(VOID, VOID, VOID, VOID, true);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_0 = CoursePermissionEditViewModel$slambda_0(this, null);
    var tmp_1 = CoursePermissionEditViewModel$lambda(this);
    this.vp2(tmp_0, VOID, tmp_1, CoursePermissionEditViewModel$slambda_2(this, savedStateHandle, null));
  }
  protoOf(CoursePermissionEditViewModel).mr6 = function (flag) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.cr4_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionedit.CoursePermissionEditViewModel.onTogglePermission.<anonymous>' call
        var entityVal = prevValue.pr4_1;
        var tmp;
        if (!(entityVal == null)) {
          tmp = prevValue.sr4(entityVal.xji(VOID, VOID, VOID, VOID, VOID, VOID, toggleFlag(entityVal.cd6_1, flag)));
        } else {
          tmp = prevValue;
        }
        var nextValue = tmp;
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(CoursePermissionEditViewModel).cqf = function () {
    var tmp = CoursePermissionEditViewModel$onClickSave$lambda(this);
    this.yp8(tmp, CoursePermissionEditViewModel$onClickSave$slambda_0(this, null));
  };
  function CoursePermissionEditUiState(entity, fieldsEnabled, permissionLabels) {
    entity = entity === VOID ? null : entity;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    permissionLabels = permissionLabels === VOID ? emptyList() : permissionLabels;
    this.pr4_1 = entity;
    this.qr4_1 = fieldsEnabled;
    this.rr4_1 = permissionLabels;
  }
  protoOf(CoursePermissionEditUiState).nr6 = function (entity, fieldsEnabled, permissionLabels) {
    return new CoursePermissionEditUiState(entity, fieldsEnabled, permissionLabels);
  };
  protoOf(CoursePermissionEditUiState).sr4 = function (entity, fieldsEnabled, permissionLabels, $super) {
    entity = entity === VOID ? this.pr4_1 : entity;
    fieldsEnabled = fieldsEnabled === VOID ? this.qr4_1 : fieldsEnabled;
    permissionLabels = permissionLabels === VOID ? this.rr4_1 : permissionLabels;
    return $super === VOID ? this.nr6(entity, fieldsEnabled, permissionLabels) : $super.nr6.call(this, entity, fieldsEnabled, permissionLabels);
  };
  protoOf(CoursePermissionEditUiState).toString = function () {
    return 'CoursePermissionEditUiState(entity=' + this.pr4_1 + ', fieldsEnabled=' + this.qr4_1 + ', permissionLabels=' + this.rr4_1 + ')';
  };
  protoOf(CoursePermissionEditUiState).hashCode = function () {
    var result = this.pr4_1 == null ? 0 : this.pr4_1.hashCode();
    result = imul(result, 31) + getBooleanHashCode(this.qr4_1) | 0;
    result = imul(result, 31) + hashCode(this.rr4_1) | 0;
    return result;
  };
  protoOf(CoursePermissionEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CoursePermissionEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof CoursePermissionEditUiState ? other : THROW_CCE();
    if (!equals(this.pr4_1, tmp0_other_with_cast.pr4_1))
      return false;
    if (!(this.qr4_1 === tmp0_other_with_cast.qr4_1))
      return false;
    if (!equals(this.rr4_1, tmp0_other_with_cast.rr4_1))
      return false;
    return true;
  };
  function CoursePermissionListViewModel$slambda$slambda$slambda$lambda() {
    return new EmptyPagingSource();
  }
  function CoursePermissionListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.wr6_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionListViewModel$slambda$slambda$slambda).yr6 = function (it, $completion) {
    var tmp = this.zr6(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionListViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.yr6(p1 instanceof PermissionPair ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CoursePermissionListViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp0_container = this.xr6_1;
          var hasViewPermission = tmp0_container.y6();
          var hasEditPermission = tmp0_container.z6();
          l$ret$1: do {
            var this_0 = this.wr6_1.gpa_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp1_permissionLabels = CoursePermissionConstants_getInstance().dpp_1;
              var this_1 = this.wr6_1.br8_1;
              var tmp_0;
              if (hasViewPermission) {
                tmp_0 = this_1;
              } else {
                tmp_0 = null;
              }
              var tmp0_elvis_lhs = tmp_0;
              var tmp_1;
              if (tmp0_elvis_lhs == null) {
                tmp_1 = CoursePermissionListViewModel$slambda$slambda$slambda$lambda;
              } else {
                tmp_1 = tmp0_elvis_lhs;
              }
              var tmp2_permissionsList = tmp_1;
              var nextValue = prevValue.gr8(tmp2_permissionsList, tmp1_permissionLabels, VOID, hasEditPermission);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_2 = this.wr6_1.pp1_1;
            while (true) {
              var prevValue_0 = this_2.t2();
              var nextValue_0 = prevValue_0.nol(prevValue_0.yok_1.tol(hasEditPermission));
              if (this_2.y1k(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CoursePermissionListViewModel$slambda$slambda$slambda).zr6 = function (it, completion) {
    var i = new CoursePermissionListViewModel$slambda$slambda$slambda(this.wr6_1, completion);
    i.xr6_1 = it;
    return i;
  };
  function CoursePermissionListViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new CoursePermissionListViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.yr6(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CoursePermissionListViewModel$slambda$slambda(this$0, resultContinuation) {
    this.pr8_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionListViewModel$slambda$slambda).m86 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionListViewModel$slambda$slambda).z77 = function ($completion) {
    return this.m86($completion);
  };
  protoOf(CoursePermissionListViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.pr8_1.fp2().b7f();
            var tmp_1 = this.pr8_1.dp2();
            PermissionFlags_getInstance();
            var tmp_2 = new Long(1, 0);
            PermissionFlags_getInstance();
            var tmp_3 = distinctUntilChanged(tmp_0.dd5(tmp_1, this.pr8_1.ar8_1, tmp_2, new Long(2, 0)));
            var tmp_4 = CoursePermissionListViewModel$slambda$slambda$slambda_0(this.pr8_1, null);
            suspendResult = tmp_3.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_13(tmp_4), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CoursePermissionListViewModel$slambda$slambda).y77 = function (completion) {
    return new CoursePermissionListViewModel$slambda$slambda(this.pr8_1, completion);
  };
  function CoursePermissionListViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new CoursePermissionListViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.m86($completion);
    };
    l.$arity = 0;
    return l;
  }
  function Companion_109() {
    this.qr8_1 = 'CoursePermissionList';
    this.rr8_1 = 'permissionResult';
  }
  var Companion_instance_157;
  function Companion_getInstance_126() {
    return Companion_instance_157;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_13(function_0) {
    this.sr8_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_13).t1d = function (value, $completion) {
    return this.sr8_1(value, $completion);
  };
  function CoursePermissionListViewModel$pagingSource$lambda(this$0) {
    return function () {
      return this$0.fp2().b7f().yd4(this$0.ar8_1, false);
    };
  }
  function CoursePermissionListViewModel$onClickAdd$ref($boundThis) {
    var l = function () {
      $boundThis.bpb();
      return Unit_instance;
    };
    l.callableName = 'onClickAdd';
    return l;
  }
  function CoursePermissionListViewModel$slambda(this$0, resultContinuation) {
    this.br9_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionListViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionListViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CoursePermissionListViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.br9_1.gpa_1, CoursePermissionListViewModel$slambda$slambda_0(this.br9_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CoursePermissionListViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new CoursePermissionListViewModel$slambda(this.br9_1, completion);
    i.cr9_1 = $this$launch;
    return i;
  };
  function CoursePermissionListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new CoursePermissionListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CoursePermissionListViewModel$onClickDeleteEntry$slambda(this$0, $coursePermission, resultContinuation) {
    this.lr9_1 = this$0;
    this.mr9_1 = $coursePermission;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CoursePermissionListViewModel$onClickDeleteEntry$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CoursePermissionListViewModel$onClickDeleteEntry$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CoursePermissionListViewModel$onClickDeleteEntry$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.lr9_1.fp2().b7f().bbv(this.mr9_1.wd5_1, true, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CoursePermissionListViewModel$onClickDeleteEntry$slambda).v1m = function ($this$launch, completion) {
    var i = new CoursePermissionListViewModel$onClickDeleteEntry$slambda(this.lr9_1, this.mr9_1, completion);
    i.nr9_1 = $this$launch;
    return i;
  };
  function CoursePermissionListViewModel$onClickDeleteEntry$slambda_0(this$0, $coursePermission, resultContinuation) {
    var i = new CoursePermissionListViewModel$onClickDeleteEntry$slambda(this$0, $coursePermission, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CoursePermissionListViewModel(di, savedStateHandle) {
    UstadListViewModel.call(this, di, savedStateHandle, new CoursePermissionListUiState(), 'CoursePermissionList');
    var tmp = this;
    Companion_getInstance_102();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    var tmp_0;
    if (tmp1_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('No clazzuid');
    } else {
      tmp_0 = tmp1_elvis_lhs;
    }
    tmp.ar8_1 = tmp_0;
    var tmp_1 = this;
    tmp_1.br8_1 = CoursePermissionListViewModel$pagingSource$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.pp1_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionlist.CoursePermissionListViewModel.<anonymous>' call
        var tmp3_title = this.jp2().en6(strings_getInstance().elu_1);
        var tmp0_text = this.jp2().en6(strings_getInstance().elu_1);
        var tmp1_icon = FabIcon_ADD_getInstance();
        var tmp2_onClick = CoursePermissionListViewModel$onClickAdd$ref(this);
        var tmp4_fabState = new FabUiState(false, tmp0_text, tmp1_icon, tmp2_onClick);
        var nextValue = prevValue.nol(tmp4_fabState, VOID, tmp3_title);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_2 = this.cp2();
    launch(tmp_2, VOID, VOID, CoursePermissionListViewModel$slambda_0(this, null));
  }
  protoOf(CoursePermissionListViewModel).apb = function (searchText) {
  };
  protoOf(CoursePermissionListViewModel).bpb = function () {
    Companion_getInstance_102();
    var tmp = to('clazzUid', this.ar8_1.toString());
    Companion_getInstance_102();
    var goToOnPersonSelectedArg = appendQueryArgs('CoursePermissionEdit', mapOf([tmp, to('popUpToOnFinish', this.mp1_1)]));
    Companion_getInstance_180();
    var tmp_0 = Companion_getInstance_5().a4r();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionlist.CoursePermissionListViewModel.onClickAdd.<anonymous>' call
    Companion_getInstance_102();
    this_0.s('listMode', ListViewMode_PICKER_getInstance().ooy_1);
    this_0.s('goToOnPersonSelected', goToOnPersonSelectedArg);
    var tmp$ret$2 = this_0.f3();
    this.rp2('People', 'permissionResult', null, tmp_0, tmp$ret$2);
  };
  protoOf(CoursePermissionListViewModel).or9 = function (coursePermission) {
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazz.permissionlist.CoursePermissionListViewModel.onClickEntry.<anonymous>' call
    Companion_getInstance_112();
    this_0.s('entityUid', coursePermission.wd5_1.toString());
    Companion_getInstance_112();
    this.wp2(this_0, 'clazzUid');
    var tmp$ret$2 = this_0.f3();
    this.np1_1.sns('CoursePermissionDetail', tmp$ret$2);
  };
  protoOf(CoursePermissionListViewModel).pr9 = function (coursePermission) {
    var tmp = this.cp2();
    launch(tmp, VOID, VOID, CoursePermissionListViewModel$onClickDeleteEntry$slambda_0(this, coursePermission, null));
  };
  function CoursePermissionListUiState$_init_$lambda_czupre() {
    return new EmptyPagingSource();
  }
  function CoursePermissionListUiState(permissionsList, permissionLabels, courseTerminology, showDeleteOption) {
    var tmp;
    if (permissionsList === VOID) {
      tmp = CoursePermissionListUiState$_init_$lambda_czupre;
    } else {
      tmp = permissionsList;
    }
    permissionsList = tmp;
    permissionLabels = permissionLabels === VOID ? emptyList() : permissionLabels;
    courseTerminology = courseTerminology === VOID ? null : courseTerminology;
    showDeleteOption = showDeleteOption === VOID ? false : showDeleteOption;
    this.cr8_1 = permissionsList;
    this.dr8_1 = permissionLabels;
    this.er8_1 = courseTerminology;
    this.fr8_1 = showDeleteOption;
  }
  protoOf(CoursePermissionListUiState).qr9 = function (permissionsList, permissionLabels, courseTerminology, showDeleteOption) {
    return new CoursePermissionListUiState(permissionsList, permissionLabels, courseTerminology, showDeleteOption);
  };
  protoOf(CoursePermissionListUiState).gr8 = function (permissionsList, permissionLabels, courseTerminology, showDeleteOption, $super) {
    permissionsList = permissionsList === VOID ? this.cr8_1 : permissionsList;
    permissionLabels = permissionLabels === VOID ? this.dr8_1 : permissionLabels;
    courseTerminology = courseTerminology === VOID ? this.er8_1 : courseTerminology;
    showDeleteOption = showDeleteOption === VOID ? this.fr8_1 : showDeleteOption;
    return $super === VOID ? this.qr9(permissionsList, permissionLabels, courseTerminology, showDeleteOption) : $super.qr9.call(this, permissionsList, permissionLabels, courseTerminology, showDeleteOption);
  };
  protoOf(CoursePermissionListUiState).toString = function () {
    return 'CoursePermissionListUiState(permissionsList=' + this.cr8_1 + ', permissionLabels=' + this.dr8_1 + ', courseTerminology=' + this.er8_1 + ', showDeleteOption=' + this.fr8_1 + ')';
  };
  protoOf(CoursePermissionListUiState).hashCode = function () {
    var result = hashCode(this.cr8_1);
    result = imul(result, 31) + hashCode(this.dr8_1) | 0;
    result = imul(result, 31) + (this.er8_1 == null ? 0 : hashCode(this.er8_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fr8_1) | 0;
    return result;
  };
  protoOf(CoursePermissionListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CoursePermissionListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof CoursePermissionListUiState ? other : THROW_CCE();
    if (!equals(this.cr8_1, tmp0_other_with_cast.cr8_1))
      return false;
    if (!equals(this.dr8_1, tmp0_other_with_cast.dr8_1))
      return false;
    if (!equals(this.er8_1, tmp0_other_with_cast.er8_1))
      return false;
    if (!(this.fr8_1 === tmp0_other_with_cast.fr8_1))
      return false;
    return true;
  };
  function avatarName(_this__u8e3s4) {
    var tmp;
    var tmp_0 = _this__u8e3s4.u7u_1;
    Companion_getInstance_1();
    if (tmp_0.c7(toLong(10000)) >= 0) {
      tmp = _this__u8e3s4.v7u_1;
    } else {
      tmp = _this__u8e3s4.u7u_1.toString();
    }
    return tmp;
  }
  function avatarColorName(_this__u8e3s4) {
    var tmp;
    var tmp_0 = _this__u8e3s4.u7u_1;
    Companion_getInstance_1();
    if (tmp_0.c7(toLong(10000)) >= 0) {
      tmp = _this__u8e3s4.v7u_1;
    } else {
      tmp = _this__u8e3s4.u7u_1.rc(16).toString();
    }
    return tmp;
  }
  var TextLimitType_LIMIT_WORDS_instance;
  var TextLimitType_LIMIT_CHARS_instance;
  function values_2() {
    return [TextLimitType_LIMIT_WORDS_getInstance(), TextLimitType_LIMIT_CHARS_getInstance()];
  }
  var TextLimitType_entriesInitialized;
  function TextLimitType_initEntries() {
    if (TextLimitType_entriesInitialized)
      return Unit_instance;
    TextLimitType_entriesInitialized = true;
    var tmp = strings_getInstance().qm9_1;
    TextLimitType_LIMIT_WORDS_instance = new TextLimitType('LIMIT_WORDS', 0, tmp, 1);
    var tmp_0 = strings_getInstance().rm9_1;
    TextLimitType_LIMIT_CHARS_instance = new TextLimitType('LIMIT_CHARS', 1, tmp_0, 2);
  }
  var MarkingType_TEACHER_instance;
  var MarkingType_PEERS_instance;
  function Companion_110() {
  }
  protoOf(Companion_110).mj8 = function (value) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var indexedObject = values_3();
      var inductionVariable = 0;
      var last = indexedObject.length;
      while (inductionVariable < last) {
        var element = indexedObject[inductionVariable];
        inductionVariable = inductionVariable + 1 | 0;
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.Companion.valueOf.<anonymous>' call
        if (element.tr9_1 === value) {
          tmp$ret$1 = element;
          break $l$block;
        }
      }
      tmp$ret$1 = null;
    }
    var tmp0_elvis_lhs = tmp$ret$1;
    return tmp0_elvis_lhs == null ? first_1(values_3()) : tmp0_elvis_lhs;
  };
  var Companion_instance_158;
  function Companion_getInstance_127() {
    return Companion_instance_158;
  }
  function values_3() {
    return [MarkingType_TEACHER_getInstance(), MarkingType_PEERS_getInstance()];
  }
  function get_entries_1() {
    if ($ENTRIES_1 == null)
      $ENTRIES_1 = enumEntries(values_3());
    return $ENTRIES_1;
  }
  var MarkingType_entriesInitialized;
  function MarkingType_initEntries() {
    if (MarkingType_entriesInitialized)
      return Unit_instance;
    MarkingType_entriesInitialized = true;
    MarkingType_TEACHER_instance = new MarkingType('TEACHER', 0, 1);
    MarkingType_PEERS_instance = new MarkingType('PEERS', 1, 2);
  }
  var $ENTRIES_1;
  function TextLimitType(name, ordinal, stringResource, value) {
    Enum.call(this, name, ordinal);
    this.wr9_1 = stringResource;
    this.xr9_1 = value;
  }
  function MarkingType(name, ordinal, value) {
    Enum.call(this, name, ordinal);
    this.tr9_1 = value;
  }
  function TextLimitType_LIMIT_WORDS_getInstance() {
    TextLimitType_initEntries();
    return TextLimitType_LIMIT_WORDS_instance;
  }
  function TextLimitType_LIMIT_CHARS_getInstance() {
    TextLimitType_initEntries();
    return TextLimitType_LIMIT_CHARS_instance;
  }
  function MarkingType_TEACHER_getInstance() {
    MarkingType_initEntries();
    return MarkingType_TEACHER_instance;
  }
  function MarkingType_PEERS_getInstance() {
    MarkingType_initEntries();
    return MarkingType_PEERS_instance;
  }
  function ClazzAssignmentViewModelConstants() {
    ClazzAssignmentViewModelConstants_instance = this;
    var tmp = this;
    Companion_getInstance_1();
    var tmp_0 = to(1, strings_getInstance().ilz_1);
    Companion_getInstance_1();
    var tmp_1 = to(2, strings_getInstance().hlz_1);
    Companion_getInstance_1();
    tmp.yr9_1 = mapOf([tmp_0, tmp_1, to(0, strings_getInstance().jlz_1)]);
  }
  var ClazzAssignmentViewModelConstants_instance;
  function ClazzAssignmentViewModelConstants_getInstance() {
    if (ClazzAssignmentViewModelConstants_instance == null)
      new ClazzAssignmentViewModelConstants();
    return ClazzAssignmentViewModelConstants_instance;
  }
  function get_isFromSubmitterGroup(_this__u8e3s4) {
    var tmp;
    if (_this__u8e3s4.e9z_1.c7(new Long(0, 0)) > 0) {
      var tmp_0 = _this__u8e3s4.e9z_1;
      Companion_getInstance_1();
      tmp = tmp_0.c7(toLong(10000)) < 0;
    } else {
      tmp = false;
    }
    return tmp;
  }
  function asBlobOpenItem(_this__u8e3s4) {
    var tmp0_elvis_lhs = _this__u8e3s4.cbw_1;
    var tmp = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
    var tmp1_elvis_lhs = _this__u8e3s4.abw_1;
    var tmp_0 = tmp1_elvis_lhs == null ? 'application/octet-stream' : tmp1_elvis_lhs;
    var tmp2_elvis_lhs = _this__u8e3s4.bbw_1;
    return new OpenBlobItem(tmp, tmp_0, tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs, toLong(_this__u8e3s4.dbw_1));
  }
  function submissionStatusFor(markList, submissionList) {
    var tmp;
    // Inline function 'kotlin.collections.isNotEmpty' call
    if (!markList.c1()) {
      Companion_getInstance_1();
      tmp = 2;
    } else {
      // Inline function 'kotlin.collections.isNotEmpty' call
      if (!submissionList.c1()) {
        Companion_getInstance_1();
        tmp = 1;
      } else {
        Companion_getInstance_1();
        tmp = 0;
      }
    }
    return tmp;
  }
  function latestUniqueMarksByMarker(_this__u8e3s4) {
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var destination = ArrayList_init_$Create$();
    var tmp0_iterator = _this__u8e3s4.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.latestUniqueMarksByMarker.<anonymous>' call
      // Inline function 'kotlin.collections.maxOf' call
      // Inline function 'kotlin.collections.filter' call
      // Inline function 'kotlin.collections.filterTo' call
      var destination_0 = ArrayList_init_$Create$();
      var tmp0_iterator_0 = _this__u8e3s4.w();
      while (tmp0_iterator_0.f()) {
        var element_0 = tmp0_iterator_0.e();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.latestUniqueMarksByMarker.<anonymous>.<anonymous>' call
        var tmp0_safe_receiver = element_0.obh_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.fbh_1;
        var tmp1_safe_receiver = element.obh_1;
        if (equals(tmp, tmp1_safe_receiver == null ? null : tmp1_safe_receiver.fbh_1)) {
          destination_0.i1(element_0);
        }
      }
      var iterator = destination_0.w();
      if (!iterator.f())
        throw NoSuchElementException_init_$Create$();
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.latestUniqueMarksByMarker.<anonymous>.<anonymous>' call
      var tmp0_safe_receiver_0 = iterator.e().obh_1;
      var tmp1_elvis_lhs = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.lbh_1;
      var maxValue = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
      while (iterator.f()) {
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.latestUniqueMarksByMarker.<anonymous>.<anonymous>' call
        var tmp0_safe_receiver_1 = iterator.e().obh_1;
        var tmp1_elvis_lhs_0 = tmp0_safe_receiver_1 == null ? null : tmp0_safe_receiver_1.lbh_1;
        var v = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
        if (compareTo(maxValue, v) < 0) {
          maxValue = v;
        }
      }
      var mostRecentTsForSubmitterUid = maxValue;
      var tmp0_safe_receiver_2 = element.obh_1;
      if (equals(tmp0_safe_receiver_2 == null ? null : tmp0_safe_receiver_2.lbh_1, mostRecentTsForSubmitterUid)) {
        destination.i1(element);
      }
    }
    return destination;
  }
  function hasUpdatedMarks(_this__u8e3s4) {
    var tmp$ret$1;
    $l$block_0: {
      // Inline function 'kotlin.collections.any' call
      // Inline function 'kotlin.collections.groupingBy' call
      var tmp$ret$0 = new _no_name_provided__qut3iv_6(_this__u8e3s4);
      var this_0 = eachCount(tmp$ret$0);
      if (this_0.c1()) {
        tmp$ret$1 = false;
        break $l$block_0;
      }
      // Inline function 'kotlin.collections.iterator' call
      var tmp0_iterator = this_0.q2().w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.hasUpdatedMarks.<anonymous>' call
        if (element.t2() > 1) {
          tmp$ret$1 = true;
          break $l$block_0;
        }
      }
      tmp$ret$1 = false;
    }
    return tmp$ret$1;
  }
  function averageMark(_this__u8e3s4) {
    var latestUnique = latestUniqueMarksByMarker(_this__u8e3s4);
    if (latestUnique.c1())
      return null;
    // Inline function 'kotlin.apply' call
    var this_0 = new AverageCourseAssignmentMark();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.averageMark.<anonymous>' call
    var tmp = this_0;
    // Inline function 'kotlin.collections.sumOf' call
    var sum = 0.0;
    var tmp0_iterator = latestUnique.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      var tmp_0 = sum;
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.averageMark.<anonymous>.<anonymous>' call
      var tmp0_safe_receiver = element.obh_1;
      var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ibh_1;
      var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver;
      sum = tmp_0 + (tmp2_elvis_lhs == null ? 0.0 : tmp2_elvis_lhs);
    }
    tmp.dj9_1 = sum / latestUnique.u();
    var tmp_1 = this_0;
    // Inline function 'kotlin.collections.sumOf' call
    var sum_0 = 0.0;
    var tmp0_iterator_0 = latestUnique.w();
    while (tmp0_iterator_0.f()) {
      var element_0 = tmp0_iterator_0.e();
      var tmp_2 = sum_0;
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.averageMark.<anonymous>.<anonymous>' call
      var tmp0_safe_receiver_0 = element_0.obh_1;
      var tmp1_safe_receiver_0 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.kbh_1;
      var tmp2_elvis_lhs_0 = tmp1_safe_receiver_0 == null ? null : tmp1_safe_receiver_0;
      sum_0 = tmp_2 + (tmp2_elvis_lhs_0 == null ? 0.0 : tmp2_elvis_lhs_0);
    }
    var tmp$ret$3 = sum_0;
    tmp_1.ej9_1 = roundToInt(tmp$ret$3 / latestUnique.u());
    return this_0;
  }
  function _no_name_provided__qut3iv_6($this) {
    this.zr9_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_6).o = function () {
    return this.zr9_1.w();
  };
  protoOf(_no_name_provided__qut3iv_6).ara = function (element) {
    // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.hasUpdatedMarks.<anonymous>' call
    var tmp0_safe_receiver = element.obh_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.fbh_1;
    return tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
  };
  protoOf(_no_name_provided__qut3iv_6).p = function (element) {
    return this.ara(element instanceof CourseAssignmentMarkAndMarkerName ? element : THROW_CCE());
  };
  function combineWithSubmissionFiles(_this__u8e3s4, submissionFiles) {
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(_this__u8e3s4, 10));
    var tmp0_iterator = _this__u8e3s4.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.combineWithSubmissionFiles.<anonymous>' call
      // Inline function 'kotlin.collections.filter' call
      // Inline function 'kotlin.collections.filterTo' call
      var destination_0 = ArrayList_init_$Create$();
      var tmp0_iterator_0 = submissionFiles.w();
      while (tmp0_iterator_0.f()) {
        var element = tmp0_iterator_0.e();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.combineWithSubmissionFiles.<anonymous>.<anonymous>' call
        var tmp0_safe_receiver = element.tbw_1;
        if (equals(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.wbv_1, item.hbn_1)) {
          destination_0.i1(element);
        }
      }
      var tmp$ret$3 = new SubmissionAndFiles(item, destination_0);
      destination.i1(tmp$ret$3);
    }
    return destination;
  }
  function UstadAssignmentSubmissionHeaderUiState(block, assignmentMark, assignmentStatus) {
    block = block === VOID ? null : block;
    assignmentMark = assignmentMark === VOID ? null : assignmentMark;
    assignmentStatus = assignmentStatus === VOID ? null : assignmentStatus;
    this.bra_1 = block;
    this.cra_1 = assignmentMark;
    this.dra_1 = assignmentStatus;
  }
  protoOf(UstadAssignmentSubmissionHeaderUiState).toString = function () {
    return 'UstadAssignmentSubmissionHeaderUiState(block=' + this.bra_1 + ', assignmentMark=' + this.cra_1 + ', assignmentStatus=' + this.dra_1 + ')';
  };
  protoOf(UstadAssignmentSubmissionHeaderUiState).hashCode = function () {
    var result = this.bra_1 == null ? 0 : this.bra_1.hashCode();
    result = imul(result, 31) + (this.cra_1 == null ? 0 : this.cra_1.hashCode()) | 0;
    result = imul(result, 31) + (this.dra_1 == null ? 0 : this.dra_1) | 0;
    return result;
  };
  protoOf(UstadAssignmentSubmissionHeaderUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof UstadAssignmentSubmissionHeaderUiState))
      return false;
    var tmp0_other_with_cast = other instanceof UstadAssignmentSubmissionHeaderUiState ? other : THROW_CCE();
    if (!equals(this.bra_1, tmp0_other_with_cast.bra_1))
      return false;
    if (!equals(this.cra_1, tmp0_other_with_cast.cra_1))
      return false;
    if (!(this.dra_1 == tmp0_other_with_cast.dra_1))
      return false;
    return true;
  };
  function UstadCourseAssignmentMarkListItemUiState(mark, localDateTimeNow, dayOfWeekStrings) {
    mark = mark === VOID ? new CourseAssignmentMarkAndMarkerName() : mark;
    this.era_1 = mark;
    this.fra_1 = localDateTimeNow;
    this.gra_1 = dayOfWeekStrings;
  }
  protoOf(UstadCourseAssignmentMarkListItemUiState).hra = function () {
    var tmp0_safe_receiver = this.era_1.obh_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.fbh_1;
    var tmp;
    if (tmp1_elvis_lhs == null) {
      Companion_getInstance_2();
      tmp = new Long(-1, 2147483647);
    } else {
      tmp = tmp1_elvis_lhs;
    }
    var markerSubmitterUid = tmp;
    var tmp_0;
    Companion_getInstance_1();
    if (markerSubmitterUid.c7(toLong(10000)) < 0) {
      tmp_0 = markerSubmitterUid.mb();
    } else {
      tmp_0 = 0;
    }
    return tmp_0;
  };
  protoOf(UstadCourseAssignmentMarkListItemUiState).ira = function () {
    var tmp0_elvis_lhs = this.era_1.pbh_1;
    var tmp = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
    var tmp1_elvis_lhs = this.era_1.qbh_1;
    return tmp + ' ' + (tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
  };
  protoOf(UstadCourseAssignmentMarkListItemUiState).jra = function () {
    return !(this.hra() === 0);
  };
  protoOf(UstadCourseAssignmentMarkListItemUiState).kra = function () {
    // Inline function 'kotlin.let' call
    var tmp0_safe_receiver = this.era_1.obh_1;
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.UstadCourseAssignmentMarkListItemUiState.<get-camPenaltyVisible>.<anonymous>' call
    var it = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.kbh_1;
    return !(it == null) ? !(it === 0.0) : false;
  };
  protoOf(UstadCourseAssignmentMarkListItemUiState).toString = function () {
    return 'UstadCourseAssignmentMarkListItemUiState(mark=' + this.era_1 + ', localDateTimeNow=' + this.fra_1 + ', dayOfWeekStrings=' + this.gra_1 + ')';
  };
  protoOf(UstadCourseAssignmentMarkListItemUiState).hashCode = function () {
    var result = this.era_1.hashCode();
    result = imul(result, 31) + this.fra_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.gra_1) | 0;
    return result;
  };
  protoOf(UstadCourseAssignmentMarkListItemUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof UstadCourseAssignmentMarkListItemUiState))
      return false;
    var tmp0_other_with_cast = other instanceof UstadCourseAssignmentMarkListItemUiState ? other : THROW_CCE();
    if (!this.era_1.equals(tmp0_other_with_cast.era_1))
      return false;
    if (!this.fra_1.equals(tmp0_other_with_cast.fra_1))
      return false;
    if (!equals(this.gra_1, tmp0_other_with_cast.gra_1))
      return false;
    return true;
  };
  function Companion_111() {
    this.lra_1 = 'CourseAssignment';
  }
  var Companion_instance_159;
  function Companion_getInstance_128() {
    return Companion_instance_159;
  }
  function ClazzAssignmentDetailViewModel$slambda(this$0, resultContinuation) {
    this.ura_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailViewModel$slambda).xra = function (clazzAssignment, permissionPair, $completion) {
    var tmp = this.yra(clazzAssignment, permissionPair, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailViewModel$slambda).um = function (p1, p2, $completion) {
    var tmp = (p1 == null ? true : p1 instanceof ClazzAssignment) ? p1 : THROW_CCE();
    return this.xra(tmp, p2 instanceof PermissionPair ? p2 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp0_container = this.wra_1;
          var hasCourseViewPermission = tmp0_container.y6();
          var hasLearnerRecordPermission = tmp0_container.z6();
          var tmp_0;
          if (hasCourseViewPermission) {
            var tmp_1;
            var tmp1_safe_receiver = this.vra_1;
            var tmp_2 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.d7t_1;
            if (tmp_2 === 2) {
              tmp_1 = true;
            } else {
              tmp_1 = hasLearnerRecordPermission;
            }
            var hasSubmissionsTab = tmp_1;
            Companion_getInstance_112();
            var tmp_3 = to('entityUid', this.ura_1.fp1_1.toString());
            Companion_getInstance_112();
            var tabArgs = mapOf([tmp_3, to('clazzUid', this.ura_1.wrb_1.toString())]);
            var tabs = mutableListOf([new TabItem('CourseAssignmentDetailOverviewView', tabArgs, this.ura_1.jp2().en6(strings_getInstance().qly_1))]);
            if (hasSubmissionsTab) {
              var tmp_4;
              var tmp_5;
              if (!hasLearnerRecordPermission) {
                var tmp2_safe_receiver = this.vra_1;
                var tmp_6 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.d7t_1;
                tmp_5 = tmp_6 === 2;
              } else {
                tmp_5 = false;
              }
              if (tmp_5) {
                tmp_4 = this.ura_1.jp2().en6(strings_getInstance().gm9_1);
              } else {
                tmp_4 = this.ura_1.jp2().en6(strings_getInstance().vm9_1);
              }
              var tabName = tmp_4;
              tabs.i1(new TabItem('CourseAssignmentSubmissionsTab', tabArgs, tabName));
            }
            tmp_0 = new ClazzAssignmentDetailUiState(toList(tabs));
          } else {
            tmp_0 = new ClazzAssignmentDetailUiState(emptyList());
          }
          return tmp_0;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailViewModel$slambda).yra = function (clazzAssignment, permissionPair, completion) {
    var i = new ClazzAssignmentDetailViewModel$slambda(this.ura_1, completion);
    i.vra_1 = clazzAssignment;
    i.wra_1 = permissionPair;
    return i;
  };
  function ClazzAssignmentDetailViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailViewModel$slambda(this$0, resultContinuation);
    var l = function (clazzAssignment, permissionPair, $completion) {
      return i.xra(clazzAssignment, permissionPair, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function ClazzAssignmentDetailViewModel(di, savedStateHandle) {
    DetailViewModel.call(this, di, savedStateHandle, 'CourseAssignment');
    var tmp = this;
    Companion_getInstance_112();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.wrb_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var assignmentFlow = this.fp2().d7e().s7r(this.fp1_1, this.wrb_1);
    var tmp_0 = this.fp2().b7f();
    var tmp_1 = this.bp2().vmx().gju_1;
    PermissionFlags_getInstance();
    var tmp_2 = new Long(1, 0);
    PermissionFlags_getInstance();
    var permissionFlow = distinctUntilChanged(tmp_0.dd5(tmp_1, this.wrb_1, tmp_2, new Long(128, 0)));
    var tmp_3 = this;
    tmp_3.vrb_1 = combine(assignmentFlow, permissionFlow, ClazzAssignmentDetailViewModel$slambda_0(this, null));
  }
  function ClazzAssignmentDetailUiState(tabs) {
    tabs = tabs === VOID ? emptyList() : tabs;
    this.xrb_1 = tabs;
  }
  protoOf(ClazzAssignmentDetailUiState).toString = function () {
    return 'ClazzAssignmentDetailUiState(tabs=' + this.xrb_1 + ')';
  };
  protoOf(ClazzAssignmentDetailUiState).hashCode = function () {
    return hashCode(this.xrb_1);
  };
  protoOf(ClazzAssignmentDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzAssignmentDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzAssignmentDetailUiState ? other : THROW_CCE();
    if (!equals(this.xrb_1, tmp0_other_with_cast.xrb_1))
      return false;
    return true;
  };
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.grc_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda).irc = function (it, $completion) {
    var tmp = this.jrc(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.irc((p1 == null ? true : p1 instanceof AssignmentProgressSummary) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.grc_1.gpa_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.prc(this.hrc_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda).jrc = function (it, completion) {
    var i = new ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda(this.grc_1, completion);
    i.hrc_1 = it;
    return i;
  };
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.irc(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.yrc_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.yrc_1.fp2().d7e().n7r(this.yrc_1.are_1, this.yrc_1.bre_1, this.yrc_1.dp2(), this.yrc_1.jp2().en6(strings_getInstance().qm8_1));
            var tmp_1 = ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda$slambda_0(this.yrc_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_14(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda(this.yrc_1, completion);
    i.zrc_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$lambda(this$0) {
    return function (title) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.pp1_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detail.submissionstab.ClazzAssignmentDetailSubmissionsTabViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.nol(VOID, VOID, title);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda(this$0, resultContinuation) {
    this.lre_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.lre_1.fp2().d7d().cds(this.lre_1.are_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var terminology = suspendResult;
            l$ret$1: do {
              var this_0 = this.lre_1.gpa_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.prc(VOID, VOID, VOID, VOID, terminology);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda(this.lre_1, completion);
    i.mre_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_1($this_launch, this$0, resultContinuation) {
    this.vre_1 = $this_launch;
    this.wre_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_1).m86 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_1).z77 = function ($completion) {
    return this.m86($completion);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.vre_1, VOID, VOID, ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$slambda_0(this.wre_1, null));
          launchSetTitleFromClazzUid(this.wre_1, this.wre_1.bre_1, ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda$lambda(this.wre_1));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_1).y77 = function (completion) {
    return new ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_1(this.vre_1, this.wre_1, completion);
  };
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_2($this_launch, this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_1($this_launch, this$0, resultContinuation);
    var l = function ($completion) {
      return i.m86($completion);
    };
    l.$arity = 0;
    return l;
  }
  function Companion_112() {
    this.xre_1 = 'CourseAssignmentSubmissionsTab';
  }
  var Companion_instance_160;
  function Companion_getInstance_129() {
    return Companion_instance_160;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_14(function_0) {
    this.yre_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_14).t1d = function (value, $completion) {
    return this.yre_1(value, $completion);
  };
  function ClazzAssignmentDetailSubmissionsTabViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.fp2().d7e().o7r(this$0.are_1, this$0.bre_1, this$0.dp2(), this$0.jp2().en6(strings_getInstance().qm8_1), toQueryLikeParam(this$0.pp1_1.t2().fol_1.uok_1), this$0.gpa_1.t2().nrc_1.lor_1);
    };
  }
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda(this$0, resultContinuation) {
    this.hrf_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            launch(this.irf_1, VOID, VOID, ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_0(this.hrf_1, null));
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.hrf_1.gpa_1, ClazzAssignmentDetailSubmissionsTabViewModel$slambda$slambda_2(this.irf_1, this.hrf_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailSubmissionsTabViewModel$slambda(this.hrf_1, completion);
    i.irf_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailSubmissionsTabViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailSubmissionsTabViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailSubmissionsTabViewModel(di, savedStateHandle) {
    var tmp = new ClazzAssignmentDetailSubmissionsTabUiState();
    UstadListViewModel.call(this, di, savedStateHandle, tmp, 'CourseAssignment');
    var tmp_0 = this;
    Companion_getInstance_102();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_0.are_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_1 = this;
    Companion_getInstance_112();
    var tmp0_safe_receiver_0 = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : toLong_0(tmp0_safe_receiver_0);
    var tmp_2;
    if (tmp1_elvis_lhs_0 == null) {
      throw IllegalArgumentException_init_$Create$('No ClazzUid provided');
    } else {
      tmp_2 = tmp1_elvis_lhs_0;
    }
    tmp_1.bre_1 = tmp_2;
    var tmp_3 = this;
    tmp_3.cre_1 = ClazzAssignmentDetailSubmissionsTabViewModel$pagingSourceFactory$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.gpa_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detail.submissionstab.ClazzAssignmentDetailSubmissionsTabViewModel.<anonymous>' call
        var nextValue = prevValue.prc(VOID, this.cre_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.pp1_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detail.submissionstab.ClazzAssignmentDetailSubmissionsTabViewModel.<anonymous>' call
        var nextValue_0 = prevValue_0.nol(VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.ppb());
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_4 = this.cp2();
    launch(tmp_4, VOID, VOID, ClazzAssignmentDetailSubmissionsTabViewModel$slambda_0(this, null));
  }
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel).jrf = function (assignmentSubmitter) {
    var tmp = to('assignmentUid', this.are_1.toString());
    var tmp_0 = to('submitterUid', assignmentSubmitter.u7u_1.toString());
    Companion_getInstance_112();
    this.np1_1.sns('CourseAssignmentSubmitter', mapOf([tmp, tmp_0, to('clazzUid', this.bre_1.toString())]));
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel).krf = function (sortOrderOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.gpa_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detail.submissionstab.ClazzAssignmentDetailSubmissionsTabViewModel.onChangeSortOption.<anonymous>' call
        var nextValue = prevValue.prc(VOID, VOID, VOID, sortOrderOption);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.ipa_1.i1h(new RefreshCommand());
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel).apb = function (searchText) {
    this.ipa_1.i1h(new RefreshCommand());
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabViewModel).bpb = function () {
  };
  function Companion_113() {
    Companion_instance_161 = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().yld_1;
    var tmp_1 = new SortOrderOption(tmp_0, 5, true);
    var tmp_2 = strings_getInstance().yld_1;
    tmp.lrf_1 = listOf([tmp_1, new SortOrderOption(tmp_2, 6, false)]);
  }
  var Companion_instance_161;
  function Companion_getInstance_130() {
    if (Companion_instance_161 == null)
      new Companion_113();
    return Companion_instance_161;
  }
  function ClazzAssignmentDetailSubmissionsTabUiState$_init_$lambda_ecu5q() {
    return new EmptyPagingSource();
  }
  function ClazzAssignmentDetailSubmissionsTabUiState(progressSummary, assignmentSubmitterList, sortOptions, sortOption, courseTerminology) {
    Companion_getInstance_130();
    progressSummary = progressSummary === VOID ? null : progressSummary;
    var tmp;
    if (assignmentSubmitterList === VOID) {
      tmp = ClazzAssignmentDetailSubmissionsTabUiState$_init_$lambda_ecu5q;
    } else {
      tmp = assignmentSubmitterList;
    }
    assignmentSubmitterList = tmp;
    sortOptions = sortOptions === VOID ? Companion_getInstance_130().lrf_1 : sortOptions;
    sortOption = sortOption === VOID ? first_0(sortOptions) : sortOption;
    courseTerminology = courseTerminology === VOID ? null : courseTerminology;
    this.krc_1 = progressSummary;
    this.lrc_1 = assignmentSubmitterList;
    this.mrc_1 = sortOptions;
    this.nrc_1 = sortOption;
    this.orc_1 = courseTerminology;
  }
  protoOf(ClazzAssignmentDetailSubmissionsTabUiState).mrf = function (progressSummary, assignmentSubmitterList, sortOptions, sortOption, courseTerminology) {
    return new ClazzAssignmentDetailSubmissionsTabUiState(progressSummary, assignmentSubmitterList, sortOptions, sortOption, courseTerminology);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabUiState).prc = function (progressSummary, assignmentSubmitterList, sortOptions, sortOption, courseTerminology, $super) {
    progressSummary = progressSummary === VOID ? this.krc_1 : progressSummary;
    assignmentSubmitterList = assignmentSubmitterList === VOID ? this.lrc_1 : assignmentSubmitterList;
    sortOptions = sortOptions === VOID ? this.mrc_1 : sortOptions;
    sortOption = sortOption === VOID ? this.nrc_1 : sortOption;
    courseTerminology = courseTerminology === VOID ? this.orc_1 : courseTerminology;
    return $super === VOID ? this.mrf(progressSummary, assignmentSubmitterList, sortOptions, sortOption, courseTerminology) : $super.mrf.call(this, progressSummary, assignmentSubmitterList, sortOptions, sortOption, courseTerminology);
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabUiState).toString = function () {
    return 'ClazzAssignmentDetailSubmissionsTabUiState(progressSummary=' + this.krc_1 + ', assignmentSubmitterList=' + this.lrc_1 + ', sortOptions=' + this.mrc_1 + ', sortOption=' + this.nrc_1 + ', courseTerminology=' + this.orc_1 + ')';
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabUiState).hashCode = function () {
    var result = this.krc_1 == null ? 0 : hashCode(this.krc_1);
    result = imul(result, 31) + hashCode(this.lrc_1) | 0;
    result = imul(result, 31) + hashCode(this.mrc_1) | 0;
    result = imul(result, 31) + this.nrc_1.hashCode() | 0;
    result = imul(result, 31) + (this.orc_1 == null ? 0 : hashCode(this.orc_1)) | 0;
    return result;
  };
  protoOf(ClazzAssignmentDetailSubmissionsTabUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzAssignmentDetailSubmissionsTabUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzAssignmentDetailSubmissionsTabUiState ? other : THROW_CCE();
    if (!equals(this.krc_1, tmp0_other_with_cast.krc_1))
      return false;
    if (!equals(this.lrc_1, tmp0_other_with_cast.lrc_1))
      return false;
    if (!equals(this.mrc_1, tmp0_other_with_cast.mrc_1))
      return false;
    if (!this.nrc_1.equals(tmp0_other_with_cast.nrc_1))
      return false;
    if (!equals(this.orc_1, tmp0_other_with_cast.orc_1))
      return false;
    return true;
  };
  function _AssignmentSubmitterSummaryUiState___init__impl__s3rgxm(person) {
    return person;
  }
  function _AssignmentSubmitterSummaryUiState___get_person__impl__o629k2($this) {
    return $this;
  }
  function _AssignmentSubmitterSummaryUiState___get_fileSubmissionStatusIconVisible__impl__so25h0($this) {
    var tmp = _AssignmentSubmitterSummaryUiState___get_person__impl__o629k2($this).y7u_1;
    Companion_getInstance_1();
    return !(tmp === 0);
  }
  function _AssignmentSubmitterSummaryUiState___get_latestPrivateCommentVisible__impl__bdq0p0($this) {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var this_0 = _AssignmentSubmitterSummaryUiState___get_person__impl__o629k2($this).x7u_1;
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  }
  function AssignmentSubmitterSummaryUiState__toString_impl_fdil8u($this) {
    return 'AssignmentSubmitterSummaryUiState(person=' + $this + ')';
  }
  function AssignmentSubmitterSummaryUiState__hashCode_impl_6dnbk1($this) {
    return $this.hashCode();
  }
  function AssignmentSubmitterSummaryUiState__equals_impl_zhk063($this, other) {
    if (!(other instanceof AssignmentSubmitterSummaryUiState))
      return false;
    var tmp0_other_with_cast = other instanceof AssignmentSubmitterSummaryUiState ? other.nrf_1 : THROW_CCE();
    if (!$this.equals(tmp0_other_with_cast))
      return false;
    return true;
  }
  function AssignmentSubmitterSummaryUiState(person) {
    this.nrf_1 = person;
  }
  protoOf(AssignmentSubmitterSummaryUiState).toString = function () {
    return AssignmentSubmitterSummaryUiState__toString_impl_fdil8u(this.nrf_1);
  };
  protoOf(AssignmentSubmitterSummaryUiState).hashCode = function () {
    return AssignmentSubmitterSummaryUiState__hashCode_impl_6dnbk1(this.nrf_1);
  };
  protoOf(AssignmentSubmitterSummaryUiState).equals = function (other) {
    return AssignmentSubmitterSummaryUiState__equals_impl_zhk063(this.nrf_1, other);
  };
  function get_listItemUiState(_this__u8e3s4) {
    return _AssignmentSubmitterSummaryUiState___init__impl__s3rgxm(_this__u8e3s4);
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.wrf_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda).jop = function (it, $completion) {
    var tmp = this.kop(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.jop(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp_0 = this.xrf_1.qoo_1;
          var tmp0_elvis_lhs = (!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) ? tmp_0 : null;
          var tmp_1;
          if (tmp0_elvis_lhs == null) {
            return Unit_instance;
          } else {
            tmp_1 = tmp0_elvis_lhs;
          }
          var newSubmissionHtml = tmp_1;
          this.wrf_1.lrh(newSubmissionHtml);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda).kop = function (it, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda(this.wrf_1, completion);
    i.xrf_1 = it;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.jop(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.urh_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda).wrh = function (assignmentData, $completion) {
    var tmp = this.xrh(assignmentData, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.wrh((p1 == null ? true : p1 instanceof ClazzAssignmentCourseBlockAndSubmitterUid) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.urh_1.vrg_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp0_safe_receiver = this.vrh_1;
              var tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.x7x_1;
              Companion_getInstance_1();
              var isEnrolledButNotInGroup = equals(tmp_0, new Long(-1, -1));
              var tmp1_safe_receiver = this.vrh_1;
              var tmp9_assignment = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.t7x_1;
              var tmp2_safe_receiver = this.vrh_1;
              var tmp10_courseBlock = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.u7x_1;
              var tmp3_safe_receiver = this.vrh_1;
              var tmp11_courseBlockPicture = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.v7x_1;
              var tmp5_safe_receiver = this.vrh_1;
              var tmp6_elvis_lhs = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.x7x_1;
              var tmp12_submitterUid = tmp6_elvis_lhs == null ? new Long(0, 0) : tmp6_elvis_lhs;
              var tmp4_safe_receiver = this.vrh_1;
              var tmp13_courseGroupSet = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.w7x_1;
              var tmp_1;
              if (isEnrolledButNotInGroup) {
                tmp_1 = this.urh_1.jp2().en6(strings_getInstance().fmd_1);
              } else {
                tmp_1 = null;
              }
              var tmp14_unassignedError = tmp_1;
              var tmp7_safe_receiver = this.vrh_1;
              var tmp8_elvis_lhs = tmp7_safe_receiver == null ? null : tmp7_safe_receiver.y7x_1;
              var tmp15_showModerateOptions = tmp8_elvis_lhs == null ? false : tmp8_elvis_lhs;
              var nextValue = prevValue.yri(tmp9_assignment, tmp10_courseBlock, tmp11_courseBlockPicture, tmp13_courseGroupSet, tmp12_submitterUid, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp14_unassignedError, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp15_showModerateOptions);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda).xrh = function (assignmentData, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda(this.urh_1, completion);
    i.vrh_1 = assignmentData;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (assignmentData, $completion) {
      return i.wrh(assignmentData, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).jrj = function (submissions, submissionFiles, $completion) {
    var tmp = this.krj(submissions, submissionFiles, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).um = function (p1, p2, $completion) {
    var tmp = (!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE();
    return this.jrj(tmp, (!(p2 == null) ? isInterface(p2, List) : false) ? p2 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return combineWithSubmissionFiles(this.hrj_1, this.irj_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).krj = function (submissions, submissionFiles, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_1(completion);
    i.hrj_1 = submissions;
    i.irj_1 = submissionFiles;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_2(resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_1(resultContinuation);
    var l = function (submissions, submissionFiles, $completion) {
      return i.jrj(submissions, submissionFiles, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.trj_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).vrj = function (it, $completion) {
    var tmp = this.wrj(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.vrj((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.trj_1.vrg_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.yri(VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.urj_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).wrj = function (it, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this.trj_1, completion);
    i.urj_1 = it;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.vrj(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.frk_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).hrk = function (it, $completion) {
    var tmp = this.irk(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).he = function (p1, $completion) {
    return this.hrk((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.frk_1.vrg_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.yri(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.grk_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).irk = function (it, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this.frk_1, completion);
    i.grk_1 = it;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.hrk(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda($$this$unsafeFlow, resultContinuation) {
    this.rrk_1 = $$this$unsafeFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda).vrk = function (value, $completion) {
    var tmp = this.wrk(value, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda).he = function (p1, $completion) {
    return this.vrk(p1 instanceof ClazzAssignmentDetailoverviewSubmissionUiState ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.trk_1 = this.rrk_1;
            var tmp_1 = this;
            tmp_1.urk_1 = this.srk_1;
            this.hd_1 = 1;
            var tmp0_safe_receiver = this.urk_1.xrk_1;
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.hbn_1;
            suspendResult = this.trk_1.t1d(tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda).wrk = function (value, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda(this.rrk_1, completion);
    i.srk_1 = value;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_0($$this$unsafeFlow, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda($$this$unsafeFlow, resultContinuation);
    var l = function (value, $completion) {
      return i.vrk(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$60(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.grl_1 = _this__u8e3s4;
    this.hrl_1 = collector;
  }
  protoOf($collectCOROUTINE$60).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.irl_1 = this.hrl_1;
            this.hd_1 = 1;
            var tmp_1 = ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$o$collect$slambda_0(this.irl_1, null);
            suspendResult = this.grl_1.jrl_1.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_15(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.srl_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda).url = function (it, $completion) {
    var tmp = this.vrl(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.url((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.srl_1.vrg_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.yri(VOID, VOID, VOID, VOID, VOID, this.trl_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda).vrl = function (it, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda(this.srl_1, completion);
    i.trl_1 = it;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.url(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _no_name_provided__qut3iv_7($this) {
    this.jrl_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_7).wrl = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$60(this, collector, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(_no_name_provided__qut3iv_7).z1b = function (collector, $completion) {
    return this.wrl(collector, $completion);
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this$0, resultContinuation) {
    this.frm_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).hrm = function (submissionUid, $completion) {
    var tmp = this.irm(submissionUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).he = function (p1, $completion) {
    return this.hrm(p1 instanceof Long ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = distinctUntilChanged(this.frm_1.ep2().f7e().xbu(this.grm_1));
            var tmp_1 = ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda$slambda_0(this.frm_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_15(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).irm = function (submissionUid, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this.frm_1, completion);
    i.grm_1 = submissionUid;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_8(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this$0, resultContinuation);
    var l = function (submissionUid, $completion) {
      return i.hrm(submissionUid, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_1($entityFlow, this$0, resultContinuation) {
    this.rrm_1 = $entityFlow;
    this.srm_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_0(this.srm_1, null);
            suspendResult = this.rrm_1.h1h(new sam$kotlinx_coroutines_flow_FlowCollector$0_15(tmp_0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            throwKotlinNothingValueException();
            break;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_1(this.rrm_1, this.srm_1, completion);
    i.trm_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_2($entityFlow, this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_1($entityFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$lambda(this$0) {
    return function (title) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.pp1_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.nol(VOID, VOID, title);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.crn_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_3).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.ern_1 = this.crn_1.fp2().e7e().sbm(this.crn_1.dp2(), this.crn_1.fp1_1);
            this.frn_1 = this.crn_1.fp2().f7e().ybu(this.crn_1.dp2(), this.crn_1.fp1_1);
            this.hd_1 = 1;
            var tmp_0 = distinctUntilChanged(combine(this.ern_1, this.frn_1, ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_2(null)));
            var tmp_1 = ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_4(this.crn_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_15(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_3).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_3(this.crn_1, completion);
    i.drn_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.orn_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_5).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_5).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.orn_1.fp2().g7e().mbg(this.orn_1.dp2(), this.orn_1.fp1_1);
            var tmp_1 = ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_6(this.orn_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_15(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_5).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_5(this.orn_1, completion);
    i.prn_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_5(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_7(this$0, resultContinuation) {
    this.yrn_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_7).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_7).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_7).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var this_0 = this.yrn_1.xrg_1;
            var tmp_0 = distinctUntilChanged(new _no_name_provided__qut3iv_7(this_0));
            suspendResult = collectLatest(tmp_0, ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda$slambda_8(this.yrn_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_7).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_7(this.yrn_1, completion);
    i.zrn_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_8(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_7(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda(this$0, resultContinuation) {
    this.iro_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.iro_1.np2(this.iro_1.gp2(), 'submissionHtml');
            var tmp_1 = ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_0(this.iro_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_15(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda(this.iro_1, completion);
    i.jro_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda_1($this_launch, this$0, $entityFlow, resultContinuation) {
    this.sro_1 = $this_launch;
    this.tro_1 = this$0;
    this.uro_1 = $entityFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda_1).m86 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda_1).z77 = function ($completion) {
    return this.m86($completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.sro_1, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_2(this.uro_1, this.tro_1, null));
          launchSetTitleFromClazzUid(this.tro_1, this.tro_1.grh_1, ClazzAssignmentDetailOverviewViewModel$slambda$slambda$lambda(this.tro_1));
          launch(this.sro_1, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_4(this.tro_1, null));
          launch(this.sro_1, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_6(this.tro_1, null));
          launch(this.sro_1, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$slambda$slambda$slambda_8(this.tro_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda$slambda_1).y77 = function (completion) {
    return new ClazzAssignmentDetailOverviewViewModel$slambda$slambda_1(this.sro_1, this.tro_1, this.uro_1, completion);
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda$slambda_2($this_launch, this$0, $entityFlow, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda$slambda_1($this_launch, this$0, $entityFlow, resultContinuation);
    var l = function ($completion) {
      return i.m86($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda(this$0, $file, resultContinuation) {
    this.drp_1 = this$0;
    this.erp_1 = $file;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda).fmp = function (it, $completion) {
    var tmp = this.gmp(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda).he = function (p1, $completion) {
    return this.fmp(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.drp_1.fp2().f7e();
            var tmp0_safe_receiver = this.erp_1.tbw_1;
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.vbv_1;
            suspendResult = tmp_0.bbv(tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs, true, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda).gmp = function (it, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda(this.drp_1, this.erp_1, completion);
    i.frp_1 = it;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda_0(this$0, $file, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda(this$0, $file, resultContinuation);
    var l = function (it, $completion) {
      return i.fmp(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.vrg_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewViewModel.openSubmissionFileAsBlob.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.yri(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function _get_saveAndUploadUseCase__bjy5rj($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.hrh_1;
    saveAndUploadUseCase$factory_0();
    return this_0.t2();
  }
  function _get_cancelTransferJobUseCase__o6e2y4($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.irh_1;
    cancelTransferJobUseCase$factory_0();
    return this_0.t2();
  }
  function _get_openBlobUiUseCase__fzusqz($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.jrh_1;
    openBlobUiUseCase$factory_0();
    return this_0.t2();
  }
  function newCourseAssignmentSubmission($this) {
    var tmp = get_doorPrimaryKeyManager($this.ep2());
    Companion_getInstance_1();
    var tmp0_casUid = tmp.a62(522);
    var tmp1_casAssignmentUid = $this.fp1_1;
    var tmp2_casClazzUid = $this.grh_1;
    var tmp3_casSubmitterPersonUid = $this.bp2().emx().kmk_1.f95_1;
    return new CourseAssignmentSubmission(tmp0_casUid, tmp1_casAssignmentUid, VOID, tmp3_casSubmitterPersonUid, '', VOID, VOID, tmp2_casClazzUid);
  }
  function openSubmissionFileAsBlob($this, file, intent) {
    var tmp0_elvis_lhs = file.tbw_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var submissionFile = tmp;
    var tmp1_safe_receiver = $this.krh_1;
    if (tmp1_safe_receiver == null)
      null;
    else {
      tmp1_safe_receiver.mr();
    }
    var tmp_0 = $this;
    var tmp_1 = $this.cp2();
    tmp_0.krh_1 = launch(tmp_1, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda_0($this, submissionFile, intent, null));
  }
  function Companion_114() {
    this.grp_1 = 'latestSubmission';
    this.hrp_1 = 'submissionHtml';
    this.irp_1 = 'CourseAssignmentDetailOverviewView';
  }
  var Companion_instance_162;
  function Companion_getInstance_131() {
    return Companion_instance_162;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_15(function_0) {
    this.jrp_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_15).t1d = function (value, $completion) {
    return this.jrp_1(value, $completion);
  };
  function ClazzAssignmentDetailOverviewViewModel$privateCommentsPagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.fp2().h7e().h9y(this$0.dp2(), this$0.fp1_1, false);
    };
  }
  function ClazzAssignmentDetailOverviewViewModel$courseCommentsPagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.fp2().h7e().j9y(this$0.fp1_1, false);
    };
  }
  function ClazzAssignmentDetailOverviewViewModel$slambda(this$0, $savedStateHandle, $entityFlow, resultContinuation) {
    this.srp_1 = this$0;
    this.trp_1 = $savedStateHandle;
    this.urp_1 = $entityFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            suspendResult = this.srp_1.op2(this.trp_1, 'latestSubmission', Companion_getInstance_1().a4r(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.wrp_1 = suspendResult;
            this.xrp_1 = this.wrp_1 == null ? newCourseAssignmentSubmission(this.srp_1) : this.wrp_1;
            l$ret$1: do {
              var this_0 = this.srp_1.xrg_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.yrp(this.xrp_1);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            launch(this.vrp_1, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$slambda$slambda_0(this.srp_1, null));
            this.hd_1 = 2;
            suspendResult = whenSubscribed(this.srp_1.vrg_1, ClazzAssignmentDetailOverviewViewModel$slambda$slambda_2(this.vrp_1, this.srp_1, this.urp_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda(this.srp_1, this.trp_1, this.urp_1, completion);
    i.vrp_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$slambda_0(this$0, $savedStateHandle, $entityFlow, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$slambda(this$0, $savedStateHandle, $entityFlow, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$lambda($text) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.lbn_1 = $text;
      return Unit_instance;
    };
  }
  function ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda($submissionToSave, this$0, resultContinuation) {
    this.hrq_1 = $submissionToSave;
    this.irq_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(new Long(200, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.hrq_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.irq_1.pp2(this.irq_1.lp1_1, 'latestSubmission', Companion_getInstance_1().a4r(), this.hrq_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda(this.hrq_1, this.irq_1, completion);
    i.jrq_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda_0($submissionToSave, this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda($submissionToSave, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$onClickSubmitPrivateComment$slambda(this$0, $submitterUid, resultContinuation) {
    this.srq_1 = this$0;
    this.trq_1 = $submitterUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmitPrivateComment$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmitPrivateComment$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmitPrivateComment$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.id_1 = 4;
            this.hd_1 = 2;
            var tmp_0 = this.srq_1.fp2().h7e();
            var this_0 = new Comments();
            this_0.d9z_1 = this.trq_1;
            this_0.c9z_1 = this.srq_1.dp2();
            this_0.e9z_1 = this.srq_1.vrg_1.t2().cri_1;
            this_0.a9z_1 = this.srq_1.fp1_1;
            this_0.z9y_1 = this.srq_1.zrg_1.t2();
            this_0.h9z_1 = systemTimeInMillis();
            suspendResult = tmp_0.f9y(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var tmp_1 = this;
            this.srq_1.zrg_1.x1k('');
            tmp_1.vrq_1 = Unit_instance;
            this.id_1 = 5;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.id_1 = 5;
            this.srq_1.lp2(Companion_getInstance_85().vol_1);
            return Unit_instance;
          case 4:
            this.id_1 = 5;
            var t = this.kd_1;
            this.srq_1.lp2(Companion_getInstance_85().vol_1);
            throw t;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmitPrivateComment$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onClickSubmitPrivateComment$slambda(this.srq_1, this.trq_1, completion);
    i.urq_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$onClickSubmitPrivateComment$slambda_0(this$0, $submitterUid, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onClickSubmitPrivateComment$slambda(this$0, $submitterUid, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$onClickSubmitCourseComment$slambda(this$0, resultContinuation) {
    this.err_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmitCourseComment$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmitCourseComment$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmitCourseComment$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.id_1 = 4;
            this.hd_1 = 2;
            var tmp_0 = this.err_1.fp2().h7e();
            var this_0 = new Comments();
            this_0.d9z_1 = new Long(0, 0);
            this_0.c9z_1 = this.err_1.dp2();
            this_0.a9z_1 = this.err_1.fp1_1;
            this_0.z9y_1 = this.err_1.brh_1.t2();
            this_0.h9z_1 = systemTimeInMillis();
            suspendResult = tmp_0.f9y(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var tmp_1 = this;
            this.err_1.brh_1.x1k('');
            tmp_1.grr_1 = Unit_instance;
            this.id_1 = 5;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.id_1 = 5;
            this.err_1.lp2(Companion_getInstance_85().vol_1);
            return Unit_instance;
          case 4:
            this.id_1 = 5;
            var t = this.kd_1;
            this.err_1.lp2(Companion_getInstance_85().vol_1);
            throw t;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmitCourseComment$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onClickSubmitCourseComment$slambda(this.err_1, completion);
    i.frr_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$onClickSubmitCourseComment$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onClickSubmitCourseComment$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$onAddSubmissionFile$slambda(this$0, $size, $mimeType, $fileName, $uri, resultContinuation) {
    this.prr_1 = this$0;
    this.qrr_1 = $size;
    this.rrr_1 = $mimeType;
    this.srr_1 = $fileName;
    this.trr_1 = $uri;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$onAddSubmissionFile$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onAddSubmissionFile$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onAddSubmissionFile$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 6;
            this.hd_1 = 1;
            var tmp_0 = get_doorPrimaryKeyManager(this.prr_1.ep2());
            suspendResult = tmp_0.b62(90, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.vrr_1 = suspendResult;
            var tmp_1 = this;
            var tmp0_safe_receiver = this.prr_1.xrg_1.t2().xrk_1;
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.hbn_1;
            tmp_1.wrr_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
            this.xrr_1 = this.prr_1.vrg_1.t2().cri_1;
            this.yrr_1 = this.qrr_1.mb();
            this.zrr_1 = this.prr_1.fp1_1;
            this.ars_1 = this.prr_1.grh_1;
            this.brs_1 = new CourseAssignmentSubmissionFile(this.vrr_1, this.wrr_1, this.xrr_1, this.zrr_1, this.ars_1, this.rrr_1, this.srr_1, this.trr_1, this.yrr_1);
            this.hd_1 = 2;
            suspendResult = this.prr_1.ep2().f7e().wbu(listOf_0(this.brs_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.id_1 = 4;
            this.hd_1 = 3;
            var tmp_2 = _get_saveAndUploadUseCase__bjy5rj(this.prr_1);
            var tmp_3 = this.brs_1.vbv_1;
            suspendResult = tmp_2.cne(listOf_0(new SaveLocalUriAsBlobItem(this.trr_1, tmp_3, 90, this.rrr_1, VOID, true)), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.id_1 = 6;
            this.hd_1 = 5;
            continue $sm;
          case 4:
            this.id_1 = 6;
            var tmp_4 = this.kd_1;
            if (tmp_4 instanceof Error) {
              var e = this.kd_1;
              Napier_getInstance().z5d('WARNING: Exception attempting to save/enqueue submission file', e);
              this.hd_1 = 5;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 5:
            this.id_1 = 6;
            return Unit_instance;
          case 6:
            throw this.kd_1;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 6) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onAddSubmissionFile$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onAddSubmissionFile$slambda(this.prr_1, this.qrr_1, this.rrr_1, this.srr_1, this.trr_1, completion);
    i.urr_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$onAddSubmissionFile$slambda_0(this$0, $size, $mimeType, $fileName, $uri, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onAddSubmissionFile$slambda(this$0, $size, $mimeType, $fileName, $uri, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$onClickSubmit$slambda(this$0, $submission, resultContinuation) {
    this.krs_1 = this$0;
    this.lrs_1 = $submission;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmit$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmit$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmit$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 7;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.id_1 = 6;
            this.id_1 = 5;
            this.hd_1 = 2;
            suspendResult = this.krs_1.urg_1.gn6(this.krs_1.fp2(), this.krs_1.vrg_1.t2().cri_1, this.krs_1.fp1_1, this.krs_1.bp2().emx().kmk_1.f95_1, this.lrs_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var tmp_0 = this;
            var tmp$ret$0;
            l$ret$1: do {
              var this_0 = this.krs_1.xrg_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.yrp(newCourseAssignmentSubmission(this.krs_1));
                if (this_0.y1k(prevValue, nextValue)) {
                  tmp$ret$0 = nextValue;
                  break l$ret$1;
                }
              }
            }
             while (false);
            tmp_0.ors_1 = tmp$ret$0.xrk_1;
            l$ret$3: do {
              var this_1 = this.krs_1.vrg_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.yri(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, null);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            if (!(this.ors_1 == null)) {
              this.hd_1 = 3;
              suspendResult = this.krs_1.pp2(this.krs_1.lp1_1, 'latestSubmission', Companion_getInstance_1().a4r(), this.ors_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 4;
              continue $sm;
            }

          case 3:
            this.hd_1 = 4;
            continue $sm;
          case 4:
            var tmp_1 = this;
            this.krs_1.hp2().com(new Snack(this.krs_1.jp2().en6(strings_getInstance().ilz_1)));
            tmp_1.nrs_1 = Unit_instance;
            this.id_1 = 7;
            this.hd_1 = 8;
            continue $sm;
          case 5:
            this.id_1 = 6;
            var tmp_2 = this.kd_1;
            if (tmp_2 instanceof Exception) {
              var e = this.kd_1;
              var tmp_3 = this;
              Napier_getInstance().d5e('Exception submitting assignment: ' + e, e);
              l$ret$7: do {
                var this_2 = this.krs_1.vrg_1;
                while (true) {
                  var prevValue_1 = this_2.t2();
                  var nextValue_1 = prevValue_1.yri(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, e.message);
                  if (this_2.y1k(prevValue_1, nextValue_1)) {
                    break l$ret$7;
                  }
                }
              }
               while (false);
              tmp_3.nrs_1 = Unit_instance;
              this.id_1 = 7;
              this.hd_1 = 8;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 6:
            this.id_1 = 7;
            var t = this.kd_1;
            l$ret$9: do {
              var this_3 = this.krs_1.vrg_1;
              while (true) {
                var prevValue_2 = this_3.t2();
                var nextValue_2 = prevValue_2.yri(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
                if (this_3.y1k(prevValue_2, nextValue_2)) {
                  break l$ret$9;
                }
              }
            }
             while (false);
            this.krs_1.lp2(Companion_getInstance_85().vol_1);
            throw t;
          case 7:
            throw this.kd_1;
          case 8:
            this.id_1 = 7;
            l$ret$11: do {
              var this_4 = this.krs_1.vrg_1;
              while (true) {
                var prevValue_3 = this_4.t2();
                var nextValue_3 = prevValue_3.yri(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
                if (this_4.y1k(prevValue_3, nextValue_3)) {
                  break l$ret$11;
                }
              }
            }
             while (false);
            this.krs_1.lp2(Companion_getInstance_85().vol_1);
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 7) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onClickSubmit$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onClickSubmit$slambda(this.krs_1, this.lrs_1, completion);
    i.mrs_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$onClickSubmit$slambda_0(this$0, $submission, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onClickSubmit$slambda(this$0, $submission, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda(this$0, $file, resultContinuation) {
    this.xrs_1 = this$0;
    this.yrs_1 = $file;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            var tmp_0 = this.xrs_1.fp2();
            suspendResult = withDoorTransactionAsync(tmp_0, VOID, ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda$slambda_0(this.xrs_1, this.yrs_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp_1 = this;
            var tmp0_safe_receiver = this.yrs_1.ubw_1;
            tmp_1.art_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.wbw_1;
            if (this.art_1 == null) {
              this.brt_1 = null;
              this.hd_1 = 4;
              continue $sm;
            } else {
              var tmp_2 = this;
              tmp_2.crt_1 = this.art_1;
              var tmp_3 = this;
              tmp_3.drt_1 = this.crt_1;
              this.ert_1 = _get_cancelTransferJobUseCase__o6e2y4(this.xrs_1);
              if (this.ert_1 == null) {
                this.frt_1 = null;
                this.hd_1 = 3;
                continue $sm;
              } else {
                this.hd_1 = 2;
                suspendResult = this.ert_1.i1i(this.drt_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              }
            }

          case 2:
            var tmp_4 = this;
            tmp_4.frt_1 = Unit_instance;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.brt_1 = this.crt_1;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            return Unit_instance;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda(this.xrs_1, this.yrs_1, completion);
    i.zrs_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda_0(this$0, $file, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda(this$0, $file, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda(this$0, $submissionFile, $intent, resultContinuation) {
    this.ort_1 = this$0;
    this.prt_1 = $submissionFile;
    this.qrt_1 = $intent;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.srt_1 = _get_openBlobUiUseCase__fzusqz(this.ort_1);
            if (this.srt_1 == null) {
              this.trt_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              var tmp_0 = asBlobOpenItem(this.prt_1);
              suspendResult = this.srt_1.gnc(tmp_0, ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda$lambda(this.ort_1), this.qrt_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            var tmp_1 = this;
            tmp_1.trt_1 = Unit_instance;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda(this.ort_1, this.prt_1, this.qrt_1, completion);
    i.rrt_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda_0(this$0, $submissionFile, $intent, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$openSubmissionFileAsBlob$slambda(this$0, $submissionFile, $intent, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel$onDeleteComment$slambda(this$0, $comments, resultContinuation) {
    this.cru_1 = this$0;
    this.dru_1 = $comments;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel$onDeleteComment$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onDeleteComment$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onDeleteComment$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.cru_1.fp2().h7e().g9y(this.dru_1.y9y_1, true, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.cru_1.hp2().com(new Snack(this.cru_1.jp2().en6(strings_getInstance().zlc_1)));
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel$onDeleteComment$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onDeleteComment$slambda(this.cru_1, this.dru_1, completion);
    i.eru_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentDetailOverviewViewModel$onDeleteComment$slambda_0(this$0, $comments, resultContinuation) {
    var i = new ClazzAssignmentDetailOverviewViewModel$onDeleteComment$slambda(this$0, $comments, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentDetailOverviewViewModel(di, savedStateHandle, submitAssignmentUseCase) {
    var tmp;
    if (submitAssignmentUseCase === VOID) {
      // Inline function 'org.kodein.di.instance' call
      var tmp_0 = get_direct(di).s57();
      // Inline function 'org.kodein.type.generic' call
      var tmp_1 = typeToken(createKType(getKClass(UstadMobileSystemImpl), arrayOf([]), false));
      var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
      var tmp$ret$1 = tmp_0.q57(tmp$ret$0, null);
      tmp = new SubmitAssignmentUseCase(tmp$ret$1);
    } else {
      tmp = submitAssignmentUseCase;
    }
    submitAssignmentUseCase = tmp;
    DetailViewModel.call(this, di, savedStateHandle, 'CourseAssignment');
    this.urg_1 = submitAssignmentUseCase;
    this.vrg_1 = MutableStateFlow(new ClazzAssignmentDetailOverviewUiState(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.jp2().iok()));
    this.wrg_1 = asStateFlow(this.vrg_1);
    this.xrg_1 = MutableStateFlow(new ClazzAssignmentDetailoverviewSubmissionUiState());
    this.yrg_1 = asStateFlow(this.xrg_1);
    this.zrg_1 = MutableStateFlow('');
    this.arh_1 = asStateFlow(this.zrg_1);
    this.brh_1 = MutableStateFlow('');
    this.crh_1 = asStateFlow(this.brh_1);
    var tmp_2 = this;
    tmp_2.drh_1 = ClazzAssignmentDetailOverviewViewModel$privateCommentsPagingSourceFactory$lambda(this);
    var tmp_3 = this;
    tmp_3.erh_1 = ClazzAssignmentDetailOverviewViewModel$courseCommentsPagingSourceFactory$lambda(this);
    this.frh_1 = null;
    var tmp_4 = this;
    Companion_getInstance_112();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    var tmp_5;
    if (tmp1_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('clazzUid arg is required');
    } else {
      tmp_5 = tmp1_elvis_lhs;
    }
    tmp_4.grh_1 = tmp_5;
    var tmp_6 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_7 = typeToken(createKType(getKClass(SaveAndUploadLocalUrisUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    tmp_6.hrh_1 = Instance(this_0, tmp$ret$2, null).n5c(this, saveAndUploadUseCase$factory());
    var tmp_8 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    var this_1 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_9 = typeToken(createKType(getKClass(CancelBlobUploadClientUseCase), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE();
    tmp_8.irh_1 = InstanceOrNull(this_1, tmp$ret$4, null).n5c(this, cancelTransferJobUseCase$factory());
    var tmp_10 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    var this_2 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_11 = typeToken(createKType(getKClass(OpenBlobUiUseCase), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_11, TypeToken) ? tmp_11 : THROW_CCE();
    tmp_10.jrh_1 = InstanceOrNull(this_2, tmp$ret$6, null).n5c(this, openBlobUiUseCase$factory());
    this.krh_1 = null;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_3 = this.vrg_1;
      while (true) {
        var prevValue = this_3.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewViewModel.<anonymous>' call
        var tmp_12 = this.dp2();
        var tmp_13 = this.bp2().emx().kmk_1.xjm();
        var tmp0_safe_receiver_0 = this.bp2().emx().mmk_1;
        var nextValue = prevValue.yri(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp_12, tmp_13, tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.f96_1);
        if (this_3.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var entityFlow = shareIn(this.fp2().d7e().w7r(this.fp1_1, this.grh_1, this.bp2().vmx().gju_1), this.cp2(), Companion_getInstance_12().v1h());
    var tmp_14 = this.cp2();
    launch(tmp_14, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$slambda_0(this, savedStateHandle, entityFlow, null));
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_4 = this.vrg_1;
      while (true) {
        var prevValue_0 = this_4.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewViewModel.<anonymous>' call
        var tmp0_privateComments = this.drh_1;
        var tmp1_courseComments = this.erh_1;
        var nextValue_0 = prevValue_0.yri(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp1_courseComments, tmp0_privateComments);
        if (this_4.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
  }
  protoOf(ClazzAssignmentDetailOverviewViewModel).fru = function (option) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.vrg_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewViewModel.onClickMarksFilterChip.<anonymous>' call
        var nextValue = prevValue.yri(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, option.qom_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).lrh = function (text) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.xrg_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewViewModel.onChangeSubmissionText.<anonymous>' call
        var tmp0_safe_receiver = prevValue.xrk_1;
        var tmp;
        if (tmp0_safe_receiver == null) {
          tmp = null;
        } else {
          tmp = shallowCopy_0(tmp0_safe_receiver, ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$lambda(text));
        }
        var nextValue = prevValue.yrp(tmp);
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var submissionToSave = tmp$ret$1.xrk_1;
    var tmp0_safe_receiver_0 = this.frh_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_0 = this;
    var tmp_1 = this.cp2();
    tmp_0.frh_1 = launch(tmp_1, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$onChangeSubmissionText$slambda_0(submissionToSave, this, null));
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).gru = function (text) {
    this.zrg_1.x1k(text);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).hru = function () {
    var submitterUid = this.vrg_1.t2().cri_1;
    if (submitterUid.c7(new Long(0, 0)) <= 0)
      return Unit_instance;
    if (this.mp2().equals(Companion_getInstance_85().uol_1))
      return Unit_instance;
    this.lp2(Companion_getInstance_85().uol_1);
    var tmp = this.cp2();
    launch(tmp, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$onClickSubmitPrivateComment$slambda_0(this, submitterUid, null));
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).iru = function (text) {
    this.brh_1.x1k(text);
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).jru = function () {
    if (this.mp2().equals(Companion_getInstance_85().uol_1))
      return Unit_instance;
    this.lp2(Companion_getInstance_85().uol_1);
    var tmp = this.cp2();
    launch(tmp, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$onClickSubmitCourseComment$slambda_0(this, null));
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).kru = function (uri, fileName, mimeType, size) {
    var tmp0_safe_receiver = this.vrg_1.t2().yrh_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.a7t_1;
    var assignmentSizeLimit = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
    if (size.c7(toLong(imul(imul(assignmentSizeLimit, 1024), 1024))) > 0) {
      this.hp2().com(new Snack(this.jp2().en6(strings_getInstance().ulm_1)));
      return Unit_instance;
    }
    var tmp = this.cp2();
    launch(tmp, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$onAddSubmissionFile$slambda_0(this, size, mimeType, fileName, uri, null));
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).lru = function () {
    if (!this.vrg_1.t2().jri_1)
      return Unit_instance;
    var tmp0_elvis_lhs = this.xrg_1.t2().xrk_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var submission = tmp;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.vrg_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewViewModel.onClickSubmit.<anonymous>' call
        var nextValue = prevValue.yri(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.lp2(Companion_getInstance_85().uol_1);
    var tmp_0 = this.cp2();
    launch(tmp_0, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$onClickSubmit$slambda_0(this, submission, null));
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).mru = function (submission) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.vrg_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewViewModel.onToggleSubmissionExpandCollapse.<anonymous>' call
        var nextValue = prevValue.yri(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, toggle(prevValue.vri_1, submission.hbn_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).nru = function () {
    Companion_getInstance_112();
    var tmp0_safe_receiver = this.vrg_1.t2().bri_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.d7y_1;
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.toString();
    var tmp = to('entityUid', tmp2_elvis_lhs == null ? '0' : tmp2_elvis_lhs);
    Companion_getInstance_112();
    this.np1_1.sns('CourseGroupSet', mapOf([tmp, to('clazzUid', this.grh_1.toString())]));
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).oru = function (file) {
    var tmp = this.cp2();
    launch(tmp, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$onRemoveSubmissionFile$slambda_0(this, file, null));
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).pru = function (file) {
    openSubmissionFileAsBlob(this, file, OpenBlobIntent_VIEW_getInstance());
  };
  protoOf(ClazzAssignmentDetailOverviewViewModel).qru = function (comments) {
    var tmp = this.cp2();
    launch(tmp, VOID, VOID, ClazzAssignmentDetailOverviewViewModel$onDeleteComment$slambda_0(this, comments, null));
  };
  function _get_latestUniqueMarksByMarker__e0a3pq($this) {
    return latestUniqueMarksByMarker($this.gri_1);
  }
  function ClazzAssignmentDetailOverviewUiState$_init_$lambda_bkogzn() {
    return new EmptyPagingSource();
  }
  function ClazzAssignmentDetailOverviewUiState$_init_$lambda_bkogzn_0() {
    return new EmptyPagingSource();
  }
  function ClazzAssignmentDetailOverviewUiState(assignment, courseBlock, courseBlockPicture, courseGroupSet, submitterUid, editableSubmissionFiles, submissionTooLong, submissions, markList, courseComments, privateComments, fieldsEnabled, selectedChipId, gradeFilterChips, submissionHeaderUiState, unassignedError, submissionError, activeUserPersonUid, activeUserPersonName, activeUserPictureUri, courseTerminology, localDateTimeNow, dayOfWeekStringMap, collapsedSubmissions, openingFileSubmissionState, showModerateOptions) {
    assignment = assignment === VOID ? null : assignment;
    courseBlock = courseBlock === VOID ? null : courseBlock;
    courseBlockPicture = courseBlockPicture === VOID ? null : courseBlockPicture;
    courseGroupSet = courseGroupSet === VOID ? null : courseGroupSet;
    submitterUid = submitterUid === VOID ? new Long(0, 0) : submitterUid;
    editableSubmissionFiles = editableSubmissionFiles === VOID ? emptyList() : editableSubmissionFiles;
    submissionTooLong = submissionTooLong === VOID ? false : submissionTooLong;
    submissions = submissions === VOID ? emptyList() : submissions;
    markList = markList === VOID ? emptyList() : markList;
    var tmp;
    if (courseComments === VOID) {
      tmp = ClazzAssignmentDetailOverviewUiState$_init_$lambda_bkogzn;
    } else {
      tmp = courseComments;
    }
    courseComments = tmp;
    var tmp_0;
    if (privateComments === VOID) {
      tmp_0 = ClazzAssignmentDetailOverviewUiState$_init_$lambda_bkogzn_0;
    } else {
      tmp_0 = privateComments;
    }
    privateComments = tmp_0;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    var tmp_1;
    if (selectedChipId === VOID) {
      tmp_1 = 1;
    } else {
      tmp_1 = selectedChipId;
    }
    selectedChipId = tmp_1;
    var tmp_2;
    if (gradeFilterChips === VOID) {
      var tmp_3 = strings_getInstance().ymd_1;
      var tmp_4 = new MessageIdOption2(tmp_3, 1);
      var tmp_5 = strings_getInstance().sls_1;
      tmp_2 = listOf([tmp_4, new MessageIdOption2(tmp_5, 0)]);
    } else {
      tmp_2 = gradeFilterChips;
    }
    gradeFilterChips = tmp_2;
    submissionHeaderUiState = submissionHeaderUiState === VOID ? new UstadAssignmentSubmissionHeaderUiState() : submissionHeaderUiState;
    unassignedError = unassignedError === VOID ? null : unassignedError;
    submissionError = submissionError === VOID ? null : submissionError;
    activeUserPersonUid = activeUserPersonUid === VOID ? new Long(0, 0) : activeUserPersonUid;
    activeUserPersonName = activeUserPersonName === VOID ? '' : activeUserPersonName;
    activeUserPictureUri = activeUserPictureUri === VOID ? null : activeUserPictureUri;
    courseTerminology = courseTerminology === VOID ? null : courseTerminology;
    localDateTimeNow = localDateTimeNow === VOID ? toLocalDateTime(System_instance.sl7(), Companion_getInstance_9().rlb()) : localDateTimeNow;
    dayOfWeekStringMap = dayOfWeekStringMap === VOID ? emptyMap() : dayOfWeekStringMap;
    collapsedSubmissions = collapsedSubmissions === VOID ? emptySet() : collapsedSubmissions;
    openingFileSubmissionState = openingFileSubmissionState === VOID ? null : openingFileSubmissionState;
    showModerateOptions = showModerateOptions === VOID ? false : showModerateOptions;
    this.yrh_1 = assignment;
    this.zrh_1 = courseBlock;
    this.ari_1 = courseBlockPicture;
    this.bri_1 = courseGroupSet;
    this.cri_1 = submitterUid;
    this.dri_1 = editableSubmissionFiles;
    this.eri_1 = submissionTooLong;
    this.fri_1 = submissions;
    this.gri_1 = markList;
    this.hri_1 = courseComments;
    this.iri_1 = privateComments;
    this.jri_1 = fieldsEnabled;
    this.kri_1 = selectedChipId;
    this.lri_1 = gradeFilterChips;
    this.mri_1 = submissionHeaderUiState;
    this.nri_1 = unassignedError;
    this.ori_1 = submissionError;
    this.pri_1 = activeUserPersonUid;
    this.qri_1 = activeUserPersonName;
    this.rri_1 = activeUserPictureUri;
    this.sri_1 = courseTerminology;
    this.tri_1 = localDateTimeNow;
    this.uri_1 = dayOfWeekStringMap;
    this.vri_1 = collapsedSubmissions;
    this.wri_1 = openingFileSubmissionState;
    this.xri_1 = showModerateOptions;
  }
  protoOf(ClazzAssignmentDetailOverviewUiState).rru = function () {
    var tmp0_safe_receiver = this.zrh_1;
    return isDateSet(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.e7x_1);
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).sru = function () {
    return this.tru();
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).uru = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var this_0 = this.nri_1;
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).vru = function () {
    var tmp0_safe_receiver = this.yrh_1;
    return (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.v7s_1) === true;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).wru = function () {
    return this.cri_1.c7(new Long(0, 0)) > 0;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).xru = function () {
    var tmp;
    if (this.wru()) {
      var tmp0_safe_receiver = this.yrh_1;
      tmp = (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.w7s_1) === true;
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).yru = function () {
    var timeNow = systemTimeInMillis();
    var tmp0_safe_receiver = this.zrh_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.e7x_1;
    if (timeNow.c7(tmp1_elvis_lhs == null ? get_UNSET_DISTANT_FUTURE() : tmp1_elvis_lhs) < 0) {
      return true;
    }
    var tmp;
    var tmp2_safe_receiver = this.zrh_1;
    if (isDateSet(tmp2_safe_receiver == null ? null : tmp2_safe_receiver.g7x_1)) {
      var tmp3_safe_receiver = this.zrh_1;
      var tmp4_elvis_lhs = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.g7x_1;
      tmp = timeNow.c7(tmp4_elvis_lhs == null ? new Long(0, 0) : tmp4_elvis_lhs) <= 0;
    } else {
      tmp = false;
    }
    if (tmp) {
      return true;
    }
    return false;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).tru = function () {
    if (!this.wru())
      return false;
    if (!this.yru())
      return false;
    var tmp;
    var tmp0_safe_receiver = this.yrh_1;
    var tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.c7t_1;
    if (tmp_0 === 1) {
      // Inline function 'kotlin.collections.isNotEmpty' call
      tmp = !this.fri_1.c1();
    } else {
      tmp = false;
    }
    if (tmp) {
      return false;
    }
    return true;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).zru = function () {
    var tmp;
    var tmp_0;
    if (this.tru()) {
      var tmp0_safe_receiver = this.yrh_1;
      tmp_0 = (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.y7s_1) === true;
    } else {
      tmp_0 = false;
    }
    if (tmp_0) {
      tmp = this.dri_1.u() < this.yrh_1.b7t_1;
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).arv = function () {
    return this.wru() ? submissionStatusFor(this.gri_1, this.fri_1) : null;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).brv = function () {
    return !(this.crv() == null);
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).drv = function () {
    // Inline function 'kotlin.let' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewUiState.<get-latePenaltyVisible>.<anonymous>' call
    var it = this.crv();
    return !(it == null) ? !(it.ej9_1 === 0) : false;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).erv = function () {
    var tmp;
    var tmp0_safe_receiver = this.yrh_1;
    if ((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.e7t_1) === true) {
      tmp = this.tru();
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).frv = function () {
    var tmp;
    if (this.kri_1 === 1) {
      tmp = _get_latestUniqueMarksByMarker__e0a3pq(this);
    } else {
      tmp = this.gri_1;
    }
    return tmp;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).crv = function () {
    return averageMark(this.gri_1);
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).grv = function () {
    var tmp0_safe_receiver = this.yrh_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.t7s_1;
    var tmp;
    if (tmp1_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.detailoverview.ClazzAssignmentDetailOverviewUiState.<get-isGroupSubmission>.<anonymous>' call
      tmp = !tmp1_safe_receiver.equals(new Long(0, 0));
    }
    var tmp2_elvis_lhs = tmp;
    return tmp2_elvis_lhs == null ? false : tmp2_elvis_lhs;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).hrv = function (assignment, courseBlock, courseBlockPicture, courseGroupSet, submitterUid, editableSubmissionFiles, submissionTooLong, submissions, markList, courseComments, privateComments, fieldsEnabled, selectedChipId, gradeFilterChips, submissionHeaderUiState, unassignedError, submissionError, activeUserPersonUid, activeUserPersonName, activeUserPictureUri, courseTerminology, localDateTimeNow, dayOfWeekStringMap, collapsedSubmissions, openingFileSubmissionState, showModerateOptions) {
    return new ClazzAssignmentDetailOverviewUiState(assignment, courseBlock, courseBlockPicture, courseGroupSet, submitterUid, editableSubmissionFiles, submissionTooLong, submissions, markList, courseComments, privateComments, fieldsEnabled, selectedChipId, gradeFilterChips, submissionHeaderUiState, unassignedError, submissionError, activeUserPersonUid, activeUserPersonName, activeUserPictureUri, courseTerminology, localDateTimeNow, dayOfWeekStringMap, collapsedSubmissions, openingFileSubmissionState, showModerateOptions);
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).yri = function (assignment, courseBlock, courseBlockPicture, courseGroupSet, submitterUid, editableSubmissionFiles, submissionTooLong, submissions, markList, courseComments, privateComments, fieldsEnabled, selectedChipId, gradeFilterChips, submissionHeaderUiState, unassignedError, submissionError, activeUserPersonUid, activeUserPersonName, activeUserPictureUri, courseTerminology, localDateTimeNow, dayOfWeekStringMap, collapsedSubmissions, openingFileSubmissionState, showModerateOptions, $super) {
    assignment = assignment === VOID ? this.yrh_1 : assignment;
    courseBlock = courseBlock === VOID ? this.zrh_1 : courseBlock;
    courseBlockPicture = courseBlockPicture === VOID ? this.ari_1 : courseBlockPicture;
    courseGroupSet = courseGroupSet === VOID ? this.bri_1 : courseGroupSet;
    submitterUid = submitterUid === VOID ? this.cri_1 : submitterUid;
    editableSubmissionFiles = editableSubmissionFiles === VOID ? this.dri_1 : editableSubmissionFiles;
    submissionTooLong = submissionTooLong === VOID ? this.eri_1 : submissionTooLong;
    submissions = submissions === VOID ? this.fri_1 : submissions;
    markList = markList === VOID ? this.gri_1 : markList;
    courseComments = courseComments === VOID ? this.hri_1 : courseComments;
    privateComments = privateComments === VOID ? this.iri_1 : privateComments;
    fieldsEnabled = fieldsEnabled === VOID ? this.jri_1 : fieldsEnabled;
    selectedChipId = selectedChipId === VOID ? this.kri_1 : selectedChipId;
    gradeFilterChips = gradeFilterChips === VOID ? this.lri_1 : gradeFilterChips;
    submissionHeaderUiState = submissionHeaderUiState === VOID ? this.mri_1 : submissionHeaderUiState;
    unassignedError = unassignedError === VOID ? this.nri_1 : unassignedError;
    submissionError = submissionError === VOID ? this.ori_1 : submissionError;
    activeUserPersonUid = activeUserPersonUid === VOID ? this.pri_1 : activeUserPersonUid;
    activeUserPersonName = activeUserPersonName === VOID ? this.qri_1 : activeUserPersonName;
    activeUserPictureUri = activeUserPictureUri === VOID ? this.rri_1 : activeUserPictureUri;
    courseTerminology = courseTerminology === VOID ? this.sri_1 : courseTerminology;
    localDateTimeNow = localDateTimeNow === VOID ? this.tri_1 : localDateTimeNow;
    dayOfWeekStringMap = dayOfWeekStringMap === VOID ? this.uri_1 : dayOfWeekStringMap;
    collapsedSubmissions = collapsedSubmissions === VOID ? this.vri_1 : collapsedSubmissions;
    openingFileSubmissionState = openingFileSubmissionState === VOID ? this.wri_1 : openingFileSubmissionState;
    showModerateOptions = showModerateOptions === VOID ? this.xri_1 : showModerateOptions;
    return $super === VOID ? this.hrv(assignment, courseBlock, courseBlockPicture, courseGroupSet, submitterUid, editableSubmissionFiles, submissionTooLong, submissions, markList, courseComments, privateComments, fieldsEnabled, selectedChipId, gradeFilterChips, submissionHeaderUiState, unassignedError, submissionError, activeUserPersonUid, activeUserPersonName, activeUserPictureUri, courseTerminology, localDateTimeNow, dayOfWeekStringMap, collapsedSubmissions, openingFileSubmissionState, showModerateOptions) : $super.hrv.call(this, assignment, courseBlock, courseBlockPicture, courseGroupSet, submitterUid, editableSubmissionFiles, submissionTooLong, submissions, markList, courseComments, privateComments, fieldsEnabled, selectedChipId, gradeFilterChips, submissionHeaderUiState, unassignedError, submissionError, activeUserPersonUid, activeUserPersonName, activeUserPictureUri, courseTerminology, localDateTimeNow, dayOfWeekStringMap, collapsedSubmissions, openingFileSubmissionState, showModerateOptions);
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).toString = function () {
    return 'ClazzAssignmentDetailOverviewUiState(assignment=' + this.yrh_1 + ', courseBlock=' + this.zrh_1 + ', courseBlockPicture=' + this.ari_1 + ', courseGroupSet=' + this.bri_1 + ', submitterUid=' + this.cri_1.toString() + ', editableSubmissionFiles=' + this.dri_1 + ', submissionTooLong=' + this.eri_1 + ', submissions=' + this.fri_1 + ', markList=' + this.gri_1 + ', courseComments=' + this.hri_1 + ', privateComments=' + this.iri_1 + ', fieldsEnabled=' + this.jri_1 + ', selectedChipId=' + this.kri_1 + ', gradeFilterChips=' + this.lri_1 + ', submissionHeaderUiState=' + this.mri_1 + ', unassignedError=' + this.nri_1 + ', submissionError=' + this.ori_1 + ', activeUserPersonUid=' + this.pri_1.toString() + ', activeUserPersonName=' + this.qri_1 + ', activeUserPictureUri=' + this.rri_1 + ', courseTerminology=' + this.sri_1 + ', localDateTimeNow=' + this.tri_1 + ', dayOfWeekStringMap=' + this.uri_1 + ', collapsedSubmissions=' + this.vri_1 + ', openingFileSubmissionState=' + this.wri_1 + ', showModerateOptions=' + this.xri_1 + ')';
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).hashCode = function () {
    var result = this.yrh_1 == null ? 0 : this.yrh_1.hashCode();
    result = imul(result, 31) + (this.zrh_1 == null ? 0 : this.zrh_1.hashCode()) | 0;
    result = imul(result, 31) + (this.ari_1 == null ? 0 : this.ari_1.hashCode()) | 0;
    result = imul(result, 31) + (this.bri_1 == null ? 0 : hashCode(this.bri_1)) | 0;
    result = imul(result, 31) + this.cri_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.dri_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.eri_1) | 0;
    result = imul(result, 31) + hashCode(this.fri_1) | 0;
    result = imul(result, 31) + hashCode(this.gri_1) | 0;
    result = imul(result, 31) + hashCode(this.hri_1) | 0;
    result = imul(result, 31) + hashCode(this.iri_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.jri_1) | 0;
    result = imul(result, 31) + this.kri_1 | 0;
    result = imul(result, 31) + hashCode(this.lri_1) | 0;
    result = imul(result, 31) + this.mri_1.hashCode() | 0;
    result = imul(result, 31) + (this.nri_1 == null ? 0 : getStringHashCode(this.nri_1)) | 0;
    result = imul(result, 31) + (this.ori_1 == null ? 0 : getStringHashCode(this.ori_1)) | 0;
    result = imul(result, 31) + this.pri_1.hashCode() | 0;
    result = imul(result, 31) + getStringHashCode(this.qri_1) | 0;
    result = imul(result, 31) + (this.rri_1 == null ? 0 : getStringHashCode(this.rri_1)) | 0;
    result = imul(result, 31) + (this.sri_1 == null ? 0 : hashCode(this.sri_1)) | 0;
    result = imul(result, 31) + this.tri_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.uri_1) | 0;
    result = imul(result, 31) + hashCode(this.vri_1) | 0;
    result = imul(result, 31) + (this.wri_1 == null ? 0 : this.wri_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.xri_1) | 0;
    return result;
  };
  protoOf(ClazzAssignmentDetailOverviewUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzAssignmentDetailOverviewUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzAssignmentDetailOverviewUiState ? other : THROW_CCE();
    if (!equals(this.yrh_1, tmp0_other_with_cast.yrh_1))
      return false;
    if (!equals(this.zrh_1, tmp0_other_with_cast.zrh_1))
      return false;
    if (!equals(this.ari_1, tmp0_other_with_cast.ari_1))
      return false;
    if (!equals(this.bri_1, tmp0_other_with_cast.bri_1))
      return false;
    if (!this.cri_1.equals(tmp0_other_with_cast.cri_1))
      return false;
    if (!equals(this.dri_1, tmp0_other_with_cast.dri_1))
      return false;
    if (!(this.eri_1 === tmp0_other_with_cast.eri_1))
      return false;
    if (!equals(this.fri_1, tmp0_other_with_cast.fri_1))
      return false;
    if (!equals(this.gri_1, tmp0_other_with_cast.gri_1))
      return false;
    if (!equals(this.hri_1, tmp0_other_with_cast.hri_1))
      return false;
    if (!equals(this.iri_1, tmp0_other_with_cast.iri_1))
      return false;
    if (!(this.jri_1 === tmp0_other_with_cast.jri_1))
      return false;
    if (!(this.kri_1 === tmp0_other_with_cast.kri_1))
      return false;
    if (!equals(this.lri_1, tmp0_other_with_cast.lri_1))
      return false;
    if (!this.mri_1.equals(tmp0_other_with_cast.mri_1))
      return false;
    if (!(this.nri_1 == tmp0_other_with_cast.nri_1))
      return false;
    if (!(this.ori_1 == tmp0_other_with_cast.ori_1))
      return false;
    if (!this.pri_1.equals(tmp0_other_with_cast.pri_1))
      return false;
    if (!(this.qri_1 === tmp0_other_with_cast.qri_1))
      return false;
    if (!(this.rri_1 == tmp0_other_with_cast.rri_1))
      return false;
    if (!equals(this.sri_1, tmp0_other_with_cast.sri_1))
      return false;
    if (!this.tri_1.equals(tmp0_other_with_cast.tri_1))
      return false;
    if (!equals(this.uri_1, tmp0_other_with_cast.uri_1))
      return false;
    if (!equals(this.vri_1, tmp0_other_with_cast.vri_1))
      return false;
    if (!equals(this.wri_1, tmp0_other_with_cast.wri_1))
      return false;
    if (!(this.xri_1 === tmp0_other_with_cast.xri_1))
      return false;
    return true;
  };
  function ClazzAssignmentDetailoverviewSubmissionUiState(editableSubmission) {
    editableSubmission = editableSubmission === VOID ? null : editableSubmission;
    this.xrk_1 = editableSubmission;
  }
  protoOf(ClazzAssignmentDetailoverviewSubmissionUiState).yrp = function (editableSubmission) {
    return new ClazzAssignmentDetailoverviewSubmissionUiState(editableSubmission);
  };
  protoOf(ClazzAssignmentDetailoverviewSubmissionUiState).toString = function () {
    return 'ClazzAssignmentDetailoverviewSubmissionUiState(editableSubmission=' + this.xrk_1 + ')';
  };
  protoOf(ClazzAssignmentDetailoverviewSubmissionUiState).hashCode = function () {
    return this.xrk_1 == null ? 0 : this.xrk_1.hashCode();
  };
  protoOf(ClazzAssignmentDetailoverviewSubmissionUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzAssignmentDetailoverviewSubmissionUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzAssignmentDetailoverviewSubmissionUiState ? other : THROW_CCE();
    if (!equals(this.xrk_1, tmp0_other_with_cast.xrk_1))
      return false;
    return true;
  };
  function saveAndUploadUseCase$factory() {
    return getPropertyCallableRef('saveAndUploadUseCase', 1, KProperty1, function (receiver) {
      return _get_saveAndUploadUseCase__bjy5rj(receiver);
    }, null);
  }
  function cancelTransferJobUseCase$factory() {
    return getPropertyCallableRef('cancelTransferJobUseCase', 1, KProperty1, function (receiver) {
      return _get_cancelTransferJobUseCase__o6e2y4(receiver);
    }, null);
  }
  function openBlobUiUseCase$factory() {
    return getPropertyCallableRef('openBlobUiUseCase', 1, KProperty1, function (receiver) {
      return _get_openBlobUiUseCase__fzusqz(receiver);
    }, null);
  }
  function saveAndUploadUseCase$factory_0() {
    return getPropertyCallableRef('saveAndUploadUseCase', 1, KProperty1, function (receiver) {
      return _get_saveAndUploadUseCase__bjy5rj(receiver);
    }, null);
  }
  function cancelTransferJobUseCase$factory_0() {
    return getPropertyCallableRef('cancelTransferJobUseCase', 1, KProperty1, function (receiver) {
      return _get_cancelTransferJobUseCase__o6e2y4(receiver);
    }, null);
  }
  function openBlobUiUseCase$factory_0() {
    return getPropertyCallableRef('openBlobUiUseCase', 1, KProperty1, function (receiver) {
      return _get_openBlobUiUseCase__fzusqz(receiver);
    }, null);
  }
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.qrv_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda).dou = function (noSubmissions, $completion) {
    var tmp = this.eou(noSubmissions, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.dou((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          if (!this.rrv_1 ? this.qrv_1.qrw_1.t2().wrw_1 : false) {
            l$ret$1: do {
              var this_0 = this.qrv_1.qrw_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.erx(VOID, VOID, false);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
          }
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda).eou = function (noSubmissions, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda(this.qrv_1, completion);
    i.rrv_1 = noSubmissions;
    return i;
  };
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (noSubmissions, $completion) {
      return i.dou(noSubmissions, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.nrx_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda).m86 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda).z77 = function ($completion) {
    return this.m86($completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.nrx_1.ep2().e7e();
            var tmp0_safe_receiver = this.nrx_1.qrw_1.t2().orx();
            var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.fj6_1;
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.q7s_1;
            var tmp_1 = tmp_0.rbm(tmp2_elvis_lhs == null ? new Long(0, 0) : tmp2_elvis_lhs);
            var tmp_2 = ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_0(this.nrx_1, null);
            suspendResult = tmp_1.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_16(tmp_2), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda).y77 = function (completion) {
    return new ClazzAssignmentEditViewModel$slambda$slambda$slambda(this.nrx_1, completion);
  };
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.m86($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.xrx_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_1).jop = function (result, $completion) {
    var tmp = this.kop(result, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.jop(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp_0 = this.yrx_1.qoo_1;
          var tmp0_elvis_lhs = (!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) ? tmp_0 : null;
          var tmp_1;
          if (tmp0_elvis_lhs == null) {
            return Unit_instance;
          } else {
            tmp_1 = tmp0_elvis_lhs;
          }
          var descriptionHtml = tmp_1;
          var tmp1_safe_receiver = this.xrx_1.qrw_1.t2().orx();
          var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.yj5_1;
          this.xrx_1.zrx(tmp2_safe_receiver == null ? null : tmp2_safe_receiver.cji(VOID, VOID, VOID, VOID, VOID, descriptionHtml));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_1).kop = function (result, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda_1(this.xrx_1, completion);
    i.yrx_1 = result;
    return i;
  };
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (result, $completion) {
      return i.jop(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda$lambda($groupSet) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.t7s_1 = $groupSet.d7y_1;
      return Unit_instance;
    };
  }
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_1($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.iry_1 = $commitDelay;
    this.jry_1 = $entity;
    this.kry_1 = $this;
    this.lry_1 = $key;
    this.mry_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.iry_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.jry_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.kry_1.pp2(this.kry_1.lp1_1, this.lry_1, this.mry_1, this.jry_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_1(this.iry_1, this.jry_1, this.kry_1, this.lry_1, this.mry_1, completion);
    i.nry_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_2($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_1($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.wry_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_3).jop = function (result, $completion) {
    var tmp = this.kop(result, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.jop(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp_0 = this.xry_1.qoo_1;
          var tmp0_elvis_lhs = tmp_0 instanceof CourseGroupSet ? tmp_0 : null;
          var tmp_1;
          if (tmp0_elvis_lhs == null) {
            return Unit_instance;
          } else {
            tmp_1 = tmp0_elvis_lhs;
          }
          var groupSet = tmp_1;
          var tmp$ret$0;
          l$ret$1: do {
            var this_0 = this.wry_1.qrw_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp3_safe_receiver = prevValue.orx();
              var tmp_2;
              if (tmp3_safe_receiver == null) {
                tmp_2 = null;
              } else {
                var tmp0_safe_receiver = prevValue.orx();
                var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.fj6_1;
                var tmp_3;
                if (tmp1_safe_receiver == null) {
                  tmp_3 = null;
                } else {
                  tmp_3 = shallowCopy_5(tmp1_safe_receiver, ClazzAssignmentEditViewModel$slambda$slambda$slambda$lambda(groupSet));
                }
                var tmp_4 = tmp_3;
                var tmp_5;
                if (!groupSet.d7y_1.equals(new Long(0, 0))) {
                  tmp_5 = groupSet;
                } else {
                  tmp_5 = null;
                }
                var tmp2_safe_receiver = tmp_5;
                tmp_2 = tmp3_safe_receiver.kj6(VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp_4, tmp2_safe_receiver == null ? null : tmp2_safe_receiver.e7y_1);
              }
              var nextValue = prevValue.erx(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue.brx_1.jrz(tmp_2), VOID, null);
              if (this_0.y1k(prevValue, nextValue)) {
                tmp$ret$0 = nextValue;
                break l$ret$1;
              }
            }
          }
           while (false);
          var newState = tmp$ret$0;
          var this_1 = this.wry_1;
          var entity = newState.orx();
          var serializer = Companion_getInstance_13().a4r();
          var commitDelay = new Long(200, 0);
          Companion_getInstance_112();
          var key = 'entityState';
          var tmp0_safe_receiver_0 = this_1.qp7_1;
          if (tmp0_safe_receiver_0 == null)
            null;
          else {
            tmp0_safe_receiver_0.mr();
          }
          var tmp_6 = this_1;
          var tmp_7 = this_1.cp2();
          tmp_6.qp7_1 = launch(tmp_7, VOID, VOID, ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_2(commitDelay, entity, this_1, key, serializer, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_3).kop = function (result, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda_3(this.wry_1, completion);
    i.xry_1 = result;
    return i;
  };
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (result, $completion) {
      return i.jop(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_3($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.srz_1 = $commitDelay;
    this.trz_1 = $entity;
    this.urz_1 = $this;
    this.vrz_1 = $key;
    this.wrz_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_3).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.srz_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.trz_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.urz_1.pp2(this.urz_1.lp1_1, this.vrz_1, this.wrz_1, this.trz_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_3).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_3(this.srz_1, this.trz_1, this.urz_1, this.vrz_1, this.wrz_1, completion);
    i.xrz_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_4($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_3($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.gs0_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_5).jop = function (result, $completion) {
    var tmp = this.kop(result, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_5).he = function (p1, $completion) {
    return this.jop(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp_0 = this.hs0_1.qoo_1;
          var tmp0_elvis_lhs = (!(tmp_0 == null) ? isInterface(tmp_0, List) : false) ? tmp_0 : null;
          var tmp_1;
          if (tmp0_elvis_lhs == null) {
            return Unit_instance;
          } else {
            tmp_1 = tmp0_elvis_lhs;
          }
          var allocations = tmp_1;
          var tmp$ret$0;
          l$ret$1: do {
            var this_0 = this.gs0_1.qrw_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp0_safe_receiver = prevValue.brx_1.yry_1;
              var nextValue = prevValue.erx(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue.brx_1.jrz(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.kj6(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, allocations)));
              if (this_0.y1k(prevValue, nextValue)) {
                tmp$ret$0 = nextValue;
                break l$ret$1;
              }
            }
          }
           while (false);
          var newState = tmp$ret$0;
          var this_1 = this.gs0_1;
          var entity = newState.orx();
          var serializer = Companion_getInstance_13().a4r();
          var commitDelay = new Long(200, 0);
          Companion_getInstance_112();
          var key = 'entityState';
          var tmp0_safe_receiver_0 = this_1.qp7_1;
          if (tmp0_safe_receiver_0 == null)
            null;
          else {
            tmp0_safe_receiver_0.mr();
          }
          var tmp_2 = this_1;
          var tmp_3 = this_1.cp2();
          tmp_2.qp7_1 = launch(tmp_3, VOID, VOID, ClazzAssignmentEditViewModel$slambda$slambda$slambda$slambda_4(commitDelay, entity, this_1, key, serializer, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda$slambda_5).kop = function (result, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda_5(this.gs0_1, completion);
    i.hs0_1 = result;
    return i;
  };
  function ClazzAssignmentEditViewModel$slambda$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda$slambda_5(this$0, resultContinuation);
    var l = function (result, $completion) {
      return i.jop(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda).rs0 = function (it, $completion) {
    var tmp = this.gmp(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.rs0(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return null;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda).gmp = function (it, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda(completion);
    i.qs0_1 = it;
    return i;
  };
  function ClazzAssignmentEditViewModel$slambda$slambda_0(resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda(resultContinuation);
    var l = function (it, $completion) {
      return i.rs0(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.as1_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_1).bs1 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_1).z77 = function ($completion) {
    return this.bs1($completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp_0 = get_doorPrimaryKeyManager(this.as1_1.ep2());
          var assignmentUid = tmp_0.a62(520);
          var this_0 = new CourseBlock();
          var tmp_1 = this_0;
          var tmp_2 = get_doorPrimaryKeyManager(this.as1_1.ep2());
          tmp_1.w7w_1 = tmp_2.a62(124);
          var tmp_3 = this_0;
          tmp_3.x7w_1 = 103;
          this_0.o7x_1 = assignmentUid;
          var tmp_4 = this_0;
          tmp_4.c7x_1 = 102;
          this_0.h7x_1 = 10.0;
          this_0.i7x_1 = 0.0;
          var this_1 = new ClazzAssignment();
          this_1.q7s_1 = assignmentUid;
          this_1.i7t_1 = this.as1_1.trw_1;
          return new CourseBlockAndEditEntities(this_0, VOID, VOID, VOID, VOID, VOID, VOID, this_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_1).y77 = function (completion) {
    return new ClazzAssignmentEditViewModel$slambda$slambda_1(this.as1_1, completion);
  };
  function ClazzAssignmentEditViewModel$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($completion) {
      return i.bs1($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$lambda($savedStateHandle, this$0, $courseTerminology) {
    return function (it) {
      var groupSubmissionOn = $savedStateHandle.ba('groupSubmissionOn');
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.qrw_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.edit.ClazzAssignmentEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var tmp = prevValue.brx_1.jrz(it);
          var tmp4_elvis_lhs = groupSubmissionOn == null ? null : toBoolean(groupSubmissionOn);
          var tmp_0;
          if (tmp4_elvis_lhs == null) {
            var tmp2_safe_receiver = it == null ? null : it.fj6_1;
            var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.t7s_1;
            var tmp_1;
            if (tmp3_safe_receiver == null) {
              tmp_1 = null;
            } else {
              // Inline function 'kotlin.let' call
              // Inline function 'kotlin.contracts.contract' call
              // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.edit.ClazzAssignmentEditViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
              tmp_1 = !tmp3_safe_receiver.equals(new Long(0, 0));
            }
            tmp_0 = tmp_1;
          } else {
            tmp_0 = tmp4_elvis_lhs;
          }
          var tmp5_elvis_lhs = tmp_0;
          var nextValue = prevValue.erx(VOID, VOID, VOID, VOID, $courseTerminology, VOID, VOID, tmp, tmp5_elvis_lhs == null ? false : tmp5_elvis_lhs);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzAssignmentEditViewModel$slambda$slambda_3(this$0, resultContinuation) {
    this.ks1_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_3).ype = function ($this$withContext, $completion) {
    var tmp = this.v1m($this$withContext, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_3).he = function (p1, $completion) {
    return this.ype((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = this.ks1_1.z4q();
          var value = this.ks1_1.qrw_1.t2();
          var this_1 = this_0.g45();
          var this_2 = serializer(this_1, createKType(getKClass(ClazzAssignmentEditUiState), arrayOf([]), false));
          return this_0.e45(isInterface(this_2, KSerializer) ? this_2 : THROW_CCE(), value);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_3).v1m = function ($this$withContext, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda_3(this.ks1_1, completion);
    i.ls1_1 = $this$withContext;
    return i;
  };
  function ClazzAssignmentEditViewModel$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda_3(this$0, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.ype($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.cqf();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda_5(this$0, resultContinuation) {
    this.us1_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_5).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_5).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.us1_1.qrw_1, ClazzAssignmentEditViewModel$slambda$slambda$slambda_0(this.us1_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_5).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda_5(this.us1_1, completion);
    i.vs1_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentEditViewModel$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda_5(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda_7(this$0, resultContinuation) {
    this.es2_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_7).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_7).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_7).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.es2_1.gp2();
            Companion_getInstance_153();
            var tmp_1 = this.es2_1.np2(tmp_0, 'courseBlockDesc');
            var tmp_2 = ClazzAssignmentEditViewModel$slambda$slambda$slambda_2(this.es2_1, null);
            suspendResult = tmp_1.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_16(tmp_2), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_7).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda_7(this.es2_1, completion);
    i.fs2_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentEditViewModel$slambda$slambda_8(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda_7(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda_9(this$0, resultContinuation) {
    this.os2_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_9).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_9).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_9).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.os2_1.np2(this.os2_1.gp2(), 'groupSet');
            var tmp_1 = ClazzAssignmentEditViewModel$slambda$slambda$slambda_4(this.os2_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_16(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_9).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda_9(this.os2_1, completion);
    i.ps2_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentEditViewModel$slambda$slambda_10(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda_9(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$slambda$slambda_11(this$0, resultContinuation) {
    this.ys2_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_11).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_11).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_11).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.ys2_1.np2(this.ys2_1.gp2(), 'peerAllocationsResult');
            var tmp_1 = ClazzAssignmentEditViewModel$slambda$slambda$slambda_6(this.ys2_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_16(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda$slambda_11).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda_11(this.ys2_1, completion);
    i.zs2_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentEditViewModel$slambda$slambda_12(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda$slambda_11(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$onClickSave$slambda$slambda(this$0, $initStateJson, resultContinuation) {
    this.is3_1 = this$0;
    this.js3_1 = $initStateJson;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$onClickSave$slambda$slambda).ls3 = function ($this$withContext, $completion) {
    var tmp = this.v1m($this$withContext, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$onClickSave$slambda$slambda).he = function (p1, $completion) {
    return this.ls3((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$onClickSave$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return this.is3_1.z4q().f45(Companion_getInstance_133().a4r(), this.js3_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$onClickSave$slambda$slambda).v1m = function ($this$withContext, completion) {
    var i = new ClazzAssignmentEditViewModel$onClickSave$slambda$slambda(this.is3_1, this.js3_1, completion);
    i.ks3_1 = $this$withContext;
    return i;
  };
  function ClazzAssignmentEditViewModel$onClickSave$slambda$slambda_0(this$0, $initStateJson, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$onClickSave$slambda$slambda(this$0, $initStateJson, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.ls3($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$onClickSave$slambda$lambda($this$shallowCopy) {
    $this$shallowCopy.t7s_1 = new Long(0, 0);
    return Unit_instance;
  }
  function _get_snackDisaptcher__bp310a($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.srw_1;
    snackDisaptcher$factory_0();
    return this_0.t2();
  }
  function hasErrors_0(_this__u8e3s4, $this) {
    return ((((((!(_this__u8e3s4.zrw_1 == null) ? true : !(_this__u8e3s4.brx_1.frz_1 == null)) ? true : !(_this__u8e3s4.brx_1.erz_1 == null)) ? true : !(_this__u8e3s4.brx_1.hrz_1 == null)) ? true : !(_this__u8e3s4.xrw_1 == null)) ? true : !(_this__u8e3s4.arx_1 == null)) ? true : !(_this__u8e3s4.drx_1 == null)) ? true : _this__u8e3s4.brx_1.ns3();
  }
  function checkNoSubmissionsMade($this, $completion) {
    var tmp = $this.ep2().e7e();
    var tmp0_safe_receiver = $this.qrw_1.t2().orx();
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.fj6_1;
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.q7s_1;
    return tmp.qbm(tmp2_elvis_lhs == null ? new Long(0, 0) : tmp2_elvis_lhs, $completion);
  }
  function Companion_115() {
    this.os3_1 = 'groupSet';
    this.ps3_1 = 'peerAllocationsResult';
    this.qs3_1 = 'terminology';
    this.rs3_1 = 'CourseAssignmentEdit';
    this.ss3_1 = 5;
    this.ts3_1 = 100;
    this.us3_1 = 'groupSubmissionOn';
  }
  var Companion_instance_163;
  function Companion_getInstance_132() {
    return Companion_instance_163;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_16(function_0) {
    this.vs3_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_16).t1d = function (value, $completion) {
    return this.vs3_1(value, $completion);
  };
  function ClazzAssignmentEditViewModel$_init_$lambda_wdhfey(db, systemImpl) {
    return new UpdatePeerReviewAllocationUseCase(db, systemImpl);
  }
  function ClazzAssignmentEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.es4_1 = this$0;
    this.fs4_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            suspendResult = this.es4_1.op2(this.fs4_1, 'terminology', Companion_instance_33.a4r(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hs4_1 = suspendResult;
            this.hd_1 = 2;
            var tmp_0 = Companion_getInstance_13().a4r();
            var tmp_1 = ClazzAssignmentEditViewModel$slambda$slambda_0(null);
            var tmp_2 = ClazzAssignmentEditViewModel$slambda$slambda_2(this.es4_1, null);
            suspendResult = this.es4_1.tp2(tmp_0, VOID, VOID, tmp_1, tmp_2, ClazzAssignmentEditViewModel$slambda$lambda(this.fs4_1, this.es4_1, this.hs4_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            Companion_getInstance_112();
            if (this.fs4_1.ba('initState') == null) {
              var tmp_3 = this;
              Companion_getInstance_112();
              tmp_3.is4_1 = 'initState';
              this.hd_1 = 3;
              var tmp_4 = Dispatchers_getInstance().p12_1;
              suspendResult = withContext(tmp_4, ClazzAssignmentEditViewModel$slambda$slambda_4(this.es4_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 4;
              continue $sm;
            }

          case 3:
            var ARGUMENT = suspendResult;
            this.fs4_1.rox(this.is4_1, ARGUMENT);
            this.hd_1 = 4;
            continue $sm;
          case 4:
            l$ret$1: do {
              var this_0 = this.es4_1.qrw_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.js4(true);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.es4_1.pp1_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var tmp_5 = Companion_getInstance_85().vol_1;
                var tmp_6 = this.es4_1.jp2().en6(strings_getInstance().olk_1);
                var nextValue_0 = prevValue_0.nol(VOID, tmp_5, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_6, VOID, ClazzAssignmentEditViewModel$onClickSave$ref(this.es4_1)));
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            launch(this.gs4_1, VOID, VOID, ClazzAssignmentEditViewModel$slambda$slambda_6(this.es4_1, null));
            launch(this.gs4_1, VOID, VOID, ClazzAssignmentEditViewModel$slambda$slambda_8(this.es4_1, null));
            launch(this.gs4_1, VOID, VOID, ClazzAssignmentEditViewModel$slambda$slambda_10(this.es4_1, null));
            launch(this.gs4_1, VOID, VOID, ClazzAssignmentEditViewModel$slambda$slambda_12(this.es4_1, null));
            return Unit_instance;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentEditViewModel$slambda(this.es4_1, this.fs4_1, completion);
    i.gs4_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentEditViewModel$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$onAssignmentChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.ss4_1 = $commitDelay;
    this.ts4_1 = $entity;
    this.us4_1 = $this;
    this.vs4_1 = $key;
    this.ws4_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$onAssignmentChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$onAssignmentChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$onAssignmentChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.ss4_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.ts4_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.us4_1.pp2(this.us4_1.lp1_1, this.vs4_1, this.ws4_1, this.ts4_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$onAssignmentChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentEditViewModel$onAssignmentChanged$slambda(this.ss4_1, this.ts4_1, this.us4_1, this.vs4_1, this.ws4_1, completion);
    i.xs4_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentEditViewModel$onAssignmentChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$onAssignmentChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$onCourseBlockChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.gs5_1 = $commitDelay;
    this.hs5_1 = $entity;
    this.is5_1 = $this;
    this.js5_1 = $key;
    this.ks5_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$onCourseBlockChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$onCourseBlockChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$onCourseBlockChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.gs5_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.hs5_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.is5_1.pp2(this.is5_1.lp1_1, this.js5_1, this.ks5_1, this.hs5_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$onCourseBlockChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentEditViewModel$onCourseBlockChanged$slambda(this.gs5_1, this.hs5_1, this.is5_1, this.js5_1, this.ks5_1, completion);
    i.ls5_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentEditViewModel$onCourseBlockChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$onCourseBlockChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$onPictureChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.us5_1 = $commitDelay;
    this.vs5_1 = $entity;
    this.ws5_1 = $this;
    this.xs5_1 = $key;
    this.ys5_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$onPictureChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$onPictureChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentEditViewModel$onPictureChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.us5_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.vs5_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.ws5_1.pp2(this.ws5_1.lp1_1, this.xs5_1, this.ys5_1, this.vs5_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$onPictureChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentEditViewModel$onPictureChanged$slambda(this.us5_1, this.vs5_1, this.ws5_1, this.xs5_1, this.ys5_1, completion);
    i.zs5_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentEditViewModel$onPictureChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$onPictureChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentEditViewModel$onClickSave$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.qrw_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.edit.ClazzAssignmentEditViewModel.onClickSave.<anonymous>.<anonymous>' call
          var nextValue = prevValue.js4(true);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzAssignmentEditViewModel$onClickSave$slambda(this$0, resultContinuation) {
    this.is6_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentEditViewModel$onClickSave$slambda).m86 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentEditViewModel$onClickSave$slambda).z77 = function ($completion) {
    return this.m86($completion);
  };
  protoOf(ClazzAssignmentEditViewModel$onClickSave$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 11;
            var tmp_0 = this;
            Companion_getInstance_112();
            tmp_0.js6_1 = this.is6_1.lp1_1.ba('initState');
            if (this.js6_1 == null) {
              this.ks6_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              var tmp_1 = this;
              tmp_1.ls6_1 = this.js6_1;
              var tmp_2 = this;
              tmp_2.ms6_1 = this.ls6_1;
              this.hd_1 = 1;
              var tmp_3 = Dispatchers_getInstance().p12_1;
              suspendResult = withContext(tmp_3, ClazzAssignmentEditViewModel$onClickSave$slambda$slambda_0(this.is6_1, this.ms6_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.ks6_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.ns6_1 = this.ks6_1;
            var tmp_4 = this;
            var tmp_5;
            if (this.ns6_1 == null) {
              return Unit_instance;
            } else {
              tmp_5 = this.ns6_1;
            }

            tmp_4.os6_1 = tmp_5;
            var tmp_6 = this;
            var tmp2_safe_receiver = this.is6_1.qrw_1.t2().orx();
            var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.fj6_1;
            var tmp_7;
            if (tmp3_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_7 = tmp3_elvis_lhs;
            }

            tmp_6.ps6_1 = tmp_7;
            var tmp_8 = this;
            var tmp4_safe_receiver = this.is6_1.qrw_1.t2().orx();
            var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.yj5_1;
            var tmp_9;
            if (tmp5_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_9 = tmp5_elvis_lhs;
            }

            tmp_8.qs6_1 = tmp_9;
            if (!this.ps6_1.y7s_1 ? !this.ps6_1.e7t_1 : false) {
              l$ret$1: do {
                var this_0 = this.is6_1.qrw_1;
                while (true) {
                  var prevValue = this_0.t2();
                  var nextValue = prevValue.erx(VOID, VOID, VOID, VOID, VOID, this.is6_1.jp2().en6(strings_getInstance().pmc_1));
                  if (this_0.y1k(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
            }

            var it = this.qs6_1.h7x_1;
            if (it == null ? true : it <= 0.0) {
              l$ret$3: do {
                var this_1 = this.is6_1.qrw_1;
                while (true) {
                  var prevValue_0 = this_1.t2();
                  var nextValue_0 = prevValue_0.erx(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_0.brx_1.jrz(VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.is6_1.jp2().en6(strings_getInstance().blh_1)));
                  if (this_1.y1k(prevValue_0, nextValue_0)) {
                    break l$ret$3;
                  }
                }
              }
               while (false);
            }

            if (this.qs6_1.e7x_1.c7(this.qs6_1.d7x_1) <= 0) {
              l$ret$5: do {
                var this_2 = this.is6_1.qrw_1;
                while (true) {
                  var prevValue_1 = this_2.t2();
                  var nextValue_1 = prevValue_1.erx(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_1.brx_1.jrz(VOID, VOID, VOID, VOID, VOID, VOID, this.is6_1.jp2().en6(strings_getInstance().hm2_1)));
                  if (this_2.y1k(prevValue_1, nextValue_1)) {
                    break l$ret$5;
                  }
                }
              }
               while (false);
            }

            if (this.qs6_1.g7x_1.c7(this.qs6_1.e7x_1) < 0) {
              l$ret$7: do {
                var this_3 = this.is6_1.qrw_1;
                while (true) {
                  var prevValue_2 = this_3.t2();
                  var nextValue_2 = prevValue_2.erx(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_2.brx_1.jrz(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.is6_1.jp2().en6(strings_getInstance().zly_1)));
                  if (this_3.y1k(prevValue_2, nextValue_2)) {
                    break l$ret$7;
                  }
                }
              }
               while (false);
            }

            var containsArg = this.ps6_1.a7t_1;
            if (!(5 <= containsArg ? containsArg <= 100 : false)) {
              l$ret$9: do {
                var this_4 = this.is6_1.qrw_1;
                while (true) {
                  var prevValue_3 = this_4.t2();
                  var nextValue_3 = prevValue_3.erx(VOID, VOID, VOID, VOID, VOID, VOID, this.is6_1.jp2().fn6(strings_getInstance().xm8_1, ['5', '100']));
                  if (this_4.y1k(prevValue_3, nextValue_3)) {
                    break l$ret$9;
                  }
                }
              }
               while (false);
            }

            var this_5 = this.qs6_1.a7x_1;
            if (this_5 == null ? true : isBlank(this_5)) {
              l$ret$11: do {
                var this_6 = this.is6_1.qrw_1;
                while (true) {
                  var prevValue_4 = this_6.t2();
                  var nextValue_4 = prevValue_4.erx(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_4.brx_1.jrz(VOID, VOID, VOID, VOID, VOID, this.is6_1.jp2().en6(strings_getInstance().ome_1)));
                  if (this_6.y1k(prevValue_4, nextValue_4)) {
                    break l$ret$11;
                  }
                }
              }
               while (false);
            }

            if (this.is6_1.qrw_1.t2().crx_1 ? this.ps6_1.t7s_1.equals(new Long(0, 0)) : false) {
              l$ret$13: do {
                var this_7 = this.is6_1.qrw_1;
                while (true) {
                  var prevValue_5 = this_7.t2();
                  var nextValue_5 = prevValue_5.erx(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.is6_1.jp2().en6(strings_getInstance().blh_1));
                  if (this_7.y1k(prevValue_5, nextValue_5)) {
                    break l$ret$13;
                  }
                }
              }
               while (false);
            }

            this.rs6_1 = null;
            var tmp6_safe_receiver = this.os6_1.orx();
            var tmp7_safe_receiver = tmp6_safe_receiver == null ? null : tmp6_safe_receiver.fj6_1;
            if (!equals(tmp7_safe_receiver == null ? null : tmp7_safe_receiver.t7s_1, this.ps6_1.t7s_1)) {
              this.hd_1 = 3;
              suspendResult = checkNoSubmissionsMade(this.is6_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.ss6_1 = false;
              this.hd_1 = 4;
              continue $sm;
            }

          case 3:
            this.ts6_1 = suspendResult;
            this.ss6_1 = !this.ts6_1;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            if (this.ss6_1) {
              this.rs6_1 = this.is6_1.jp2().en6(strings_getInstance().glc_1) + 'Cannot change groups after submissions made';
              this.hd_1 = 5;
              continue $sm;
            } else {
              this.hd_1 = 5;
              continue $sm;
            }

          case 5:
            var tmp_10;
            var tmp8_safe_receiver = this.os6_1.orx();
            var tmp9_safe_receiver = tmp8_safe_receiver == null ? null : tmp8_safe_receiver.fj6_1;
            if (!((tmp9_safe_receiver == null ? null : tmp9_safe_receiver.d7t_1) === this.ps6_1.d7t_1)) {
              tmp_10 = this.rs6_1 == null;
            } else {
              tmp_10 = false;
            }

            if (tmp_10) {
              this.hd_1 = 6;
              suspendResult = checkNoSubmissionsMade(this.is6_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.us6_1 = false;
              this.hd_1 = 7;
              continue $sm;
            }

          case 6:
            this.vs6_1 = suspendResult;
            this.us6_1 = !this.vs6_1;
            this.hd_1 = 7;
            continue $sm;
          case 7:
            if (this.us6_1) {
              this.rs6_1 = this.is6_1.jp2().en6(strings_getInstance().glc_1) + 'Cannot change marking type after submissions made';
              this.hd_1 = 8;
              continue $sm;
            } else {
              this.hd_1 = 8;
              continue $sm;
            }

          case 8:
            var tmp_11;
            var tmp_12 = this.ps6_1.d7t_1;
            if (tmp_12 === 2) {
              tmp_11 = this.ps6_1.j7t_1 < 1;
            } else {
              tmp_11 = false;
            }

            if (tmp_11) {
              l$ret$15: do {
                var this_8 = this.is6_1.qrw_1;
                while (true) {
                  var prevValue_6 = this_8.t2();
                  var nextValue_6 = prevValue_6.erx(VOID, VOID, VOID, this.is6_1.jp2().en6(strings_getInstance().pm9_1));
                  if (this_8.y1k(prevValue_6, nextValue_6)) {
                    break l$ret$15;
                  }
                }
              }
               while (false);
            }

            this.ws6_1 = this.rs6_1;
            if (hasErrors_0(this.is6_1.qrw_1.t2(), this.is6_1) ? true : !(this.ws6_1 == null)) {
              var tmp10_safe_receiver = this.ws6_1;
              if (tmp10_safe_receiver == null)
                null;
              else {
                _get_snackDisaptcher__bp310a(this.is6_1).com(new Snack(tmp10_safe_receiver));
              }
              return Unit_instance;
            }

            var tmp_13;
            var tmp_14 = this.ps6_1.d7t_1;
            if (tmp_14 === 2) {
              var tmp11_safe_receiver = this.os6_1.orx();
              var tmp12_safe_receiver = tmp11_safe_receiver == null ? null : tmp11_safe_receiver.fj6_1;
              tmp_13 = !((tmp12_safe_receiver == null ? null : tmp12_safe_receiver.j7t_1) === this.ps6_1.j7t_1);
            } else {
              tmp_13 = false;
            }

            if (tmp_13) {
              this.hd_1 = 9;
              var tmp_15 = this.is6_1.prw_1(this.is6_1.ep2(), this.is6_1.jp2());
              var tmp13_safe_receiver = this.is6_1.qrw_1.t2().orx();
              var tmp14_elvis_lhs = tmp13_safe_receiver == null ? null : tmp13_safe_receiver.hj6_1;
              suspendResult = tmp_15.so1(tmp14_elvis_lhs == null ? emptyList() : tmp14_elvis_lhs, this.ps6_1.t7s_1, this.ps6_1.i7t_1, this.ps6_1.q7s_1, this.ps6_1.j7t_1, true, VOID, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 10;
              continue $sm;
            }

          case 9:
            var newAllocations = suspendResult;
            l$ret$17: do {
              var this_9 = this.is6_1.qrw_1;
              while (true) {
                var prevValue_7 = this_9.t2();
                var tmp0_safe_receiver = prevValue_7.brx_1.yry_1;
                var nextValue_7 = prevValue_7.erx(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_7.brx_1.jrz(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.kj6(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, newAllocations)));
                if (this_9.y1k(prevValue_7, nextValue_7)) {
                  break l$ret$17;
                }
              }
            }
             while (false);
            this.hd_1 = 10;
            continue $sm;
          case 10:
            var this_10 = this.is6_1.qrw_1;
            var tmp_16;
            var tmp_17;
            var tmp0_safe_receiver_0 = this_10.t2().orx();
            var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.fj6_1;
            if (!equals(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.t7s_1, new Long(0, 0))) {
              tmp_17 = !this_10.t2().crx_1;
            } else {
              tmp_17 = false;
            }

            if (tmp_17) {
              tmp_16 = this_10;
            } else {
              tmp_16 = null;
            }

            var tmp15_safe_receiver = tmp_16;
            if (tmp15_safe_receiver == null)
              null;
            else {
              l$ret$19: do {
                while (true) {
                  var prevValue_8 = tmp15_safe_receiver.t2();
                  var tmp1_safe_receiver_0 = prevValue_8.brx_1.yry_1;
                  var tmp_18;
                  if (tmp1_safe_receiver_0 == null) {
                    tmp_18 = null;
                  } else {
                    var tmp0_safe_receiver_1 = prevValue_8.brx_1.yry_1.fj6_1;
                    var tmp_19;
                    if (tmp0_safe_receiver_1 == null) {
                      tmp_19 = null;
                    } else {
                      tmp_19 = shallowCopy_5(tmp0_safe_receiver_1, ClazzAssignmentEditViewModel$onClickSave$slambda$lambda);
                    }
                    tmp_18 = tmp1_safe_receiver_0.kj6(VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp_19, null);
                  }
                  var nextValue_8 = prevValue_8.erx(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_8.brx_1.jrz(tmp_18));
                  if (tmp15_safe_receiver.y1k(prevValue_8, nextValue_8)) {
                    break l$ret$19;
                  }
                }
              }
               while (false);
            }

            this.is6_1.up7(this.is6_1.qrw_1.t2().orx());
            return Unit_instance;
          case 11:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 11) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentEditViewModel$onClickSave$slambda).y77 = function (completion) {
    return new ClazzAssignmentEditViewModel$onClickSave$slambda(this.is6_1, completion);
  };
  function ClazzAssignmentEditViewModel$onClickSave$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentEditViewModel$onClickSave$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.m86($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzAssignmentEditViewModel(di, savedStateHandle, peerReviewAllocationUseCaseFactory) {
    var tmp;
    if (peerReviewAllocationUseCaseFactory === VOID) {
      tmp = ClazzAssignmentEditViewModel$_init_$lambda_wdhfey;
    } else {
      tmp = peerReviewAllocationUseCaseFactory;
    }
    peerReviewAllocationUseCaseFactory = tmp;
    UstadEditViewModel.call(this, di, savedStateHandle, 'CourseAssignmentEdit');
    this.prw_1 = peerReviewAllocationUseCaseFactory;
    var tmp_0 = this;
    var tmp0_completionCriteriaOptions = Companion_getInstance_133().ms3_1;
    var tmp1_timeZone = Companion_getInstance_9().rlb().sla();
    tmp_0.qrw_1 = MutableStateFlow(new ClazzAssignmentEditUiState(VOID, VOID, VOID, VOID, VOID, VOID, VOID, new CourseBlockEditUiState(VOID, VOID, tmp0_completionCriteriaOptions, VOID, VOID, VOID, VOID, VOID, true, VOID, tmp1_timeZone)));
    this.rrw_1 = asStateFlow(this.qrw_1);
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(SnackBarDispatcher), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.srw_1 = Instance(this, tmp$ret$0, null).n5c(this, snackDisaptcher$factory());
    var tmp_3 = this;
    Companion_getInstance_112();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_3.trw_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.pp1_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.edit.ClazzAssignmentEditViewModel.<anonymous>' call
        var tmp0_loadingState = Companion_getInstance_85().uol_1;
        var tmp1_title = this.vp8(strings_getInstance().rly_1, strings_getInstance().sly_1);
        var nextValue = prevValue.nol(VOID, tmp0_loadingState, tmp1_title, VOID, true, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_4 = this.cp2();
    launch(tmp_4, VOID, VOID, ClazzAssignmentEditViewModel$slambda_0(this, savedStateHandle, null));
  }
  protoOf(ClazzAssignmentEditViewModel).xs6 = function (groupSubmissionOn) {
    this.lp1_1.rox('groupSubmissionOn', groupSubmissionOn.toString());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.qrw_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.edit.ClazzAssignmentEditViewModel.onGroupSubmissionOnChanged.<anonymous>' call
        var tmp;
        if (!(prevValue.drx_1 == null) ? groupSubmissionOn : false) {
          tmp = prevValue.drx_1;
        } else {
          tmp = null;
        }
        var nextValue = prevValue.erx(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, groupSubmissionOn, tmp);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzAssignmentEditViewModel).ys6 = function (assignment) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.qrw_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.edit.ClazzAssignmentEditViewModel.onAssignmentChanged.<anonymous>' call
        var tmp8_safe_receiver = prevValue.brx_1.yry_1;
        var tmp9_courseBlockEditUiState = prevValue.brx_1.jrz(tmp8_safe_receiver == null ? null : tmp8_safe_receiver.kj6(VOID, VOID, VOID, VOID, VOID, VOID, VOID, assignment));
        var tmp;
        var tmp_0;
        if (!(prevValue.arx_1 == null)) {
          var tmp_1 = assignment == null ? null : assignment.a7t_1;
          var tmp6_safe_receiver = prevValue.orx();
          var tmp7_safe_receiver = tmp6_safe_receiver == null ? null : tmp6_safe_receiver.fj6_1;
          tmp_0 = tmp_1 == (tmp7_safe_receiver == null ? null : tmp7_safe_receiver.a7t_1);
        } else {
          tmp_0 = false;
        }
        if (tmp_0) {
          tmp = prevValue.arx_1;
        } else {
          tmp = null;
        }
        var tmp10_sizeLimitError = tmp;
        var tmp_2;
        var tmp_3;
        var tmp_4;
        if (!(prevValue.zrw_1 == null)) {
          tmp_4 = (assignment == null ? null : assignment.y7s_1) === false;
        } else {
          tmp_4 = false;
        }
        if (tmp_4) {
          tmp_3 = !assignment.e7t_1;
        } else {
          tmp_3 = false;
        }
        if (tmp_3) {
          tmp_2 = prevValue.zrw_1;
        } else {
          tmp_2 = null;
        }
        var tmp11_submissionRequiredError = tmp_2;
        var tmp_5;
        var tmp_6;
        var tmp_7;
        if (!(prevValue.xrw_1 == null)) {
          var tmp_8 = assignment == null ? null : assignment.j7t_1;
          var tmp1_safe_receiver = prevValue.orx();
          var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.fj6_1;
          tmp_7 = tmp_8 == (tmp2_safe_receiver == null ? null : tmp2_safe_receiver.j7t_1);
        } else {
          tmp_7 = false;
        }
        if (tmp_7) {
          var tmp_9 = assignment == null ? null : assignment.d7t_1;
          tmp_6 = tmp_9 === 2;
        } else {
          tmp_6 = false;
        }
        if (tmp_6) {
          tmp_5 = prevValue.xrw_1;
        } else {
          tmp_5 = null;
        }
        var tmp12_reviewerCountError = tmp_5;
        var nextValue = prevValue.erx(VOID, VOID, VOID, tmp12_reviewerCountError, VOID, tmp11_submissionRequiredError, tmp10_sizeLimitError, tmp9_courseBlockEditUiState);
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var newState = tmp$ret$1;
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var entity = newState.orx();
    var serializer = Companion_getInstance_13().a4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_112();
    var key = 'entityState';
    var tmp0_safe_receiver = this.qp7_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp_10 = this;
    var tmp_11 = this.cp2();
    tmp_10.qp7_1 = launch(tmp_11, VOID, VOID, ClazzAssignmentEditViewModel$onAssignmentChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(ClazzAssignmentEditViewModel).zrx = function (courseBlock) {
    if (courseBlock == null) {
      Napier_getInstance().z5d('Change courseblock shoudl not really be null');
      return Unit_instance;
    }
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.qrw_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.edit.ClazzAssignmentEditViewModel.onCourseBlockChanged.<anonymous>' call
        var tmp0_safe_receiver = prevValue.orx();
        var prevBlock = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.yj5_1;
        var tmp8_$this = prevValue.brx_1;
        var tmp1_safe_receiver = prevValue.orx();
        var tmp9_block = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.kj6(courseBlock);
        var tmp5_safe_receiver = prevValue.brx_1.yry_1;
        var tmp6_safe_receiver = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.yj5_1;
        var tmp10_caMaxPointsError = this.wp8(tmp6_safe_receiver == null ? null : tmp6_safe_receiver.h7x_1, courseBlock.h7x_1, prevValue.brx_1.frz_1);
        var tmp;
        var tmp_0;
        var tmp_1;
        if (!(prevValue.brx_1.erz_1 == null)) {
          tmp_1 = equals(prevBlock == null ? null : prevBlock.e7x_1, courseBlock.e7x_1);
        } else {
          tmp_1 = false;
        }
        if (tmp_1) {
          tmp_0 = prevBlock.d7x_1.equals(courseBlock.d7x_1);
        } else {
          tmp_0 = false;
        }
        if (tmp_0) {
          tmp = prevValue.brx_1.erz_1;
        } else {
          tmp = null;
        }
        var tmp11_caDeadlineError = tmp;
        var tmp_2;
        var tmp_3;
        var tmp_4;
        if (!(prevValue.brx_1.hrz_1 == null)) {
          tmp_4 = equals(prevBlock == null ? null : prevBlock.e7x_1, courseBlock.e7x_1);
        } else {
          tmp_4 = false;
        }
        if (tmp_4) {
          tmp_3 = prevBlock.g7x_1.equals(courseBlock.g7x_1);
        } else {
          tmp_3 = false;
        }
        if (tmp_3) {
          tmp_2 = prevValue.brx_1.hrz_1;
        } else {
          tmp_2 = null;
        }
        var tmp12_caGracePeriodError = tmp_2;
        var tmp2_safe_receiver = prevValue.brx_1.yry_1;
        var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.yj5_1;
        var tmp13_caTitleError = this.wp8(tmp3_safe_receiver == null ? null : tmp3_safe_receiver.a7x_1, courseBlock.a7x_1, prevValue.brx_1.drz_1);
        var nextValue = prevValue.erx(VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp8_$this.jrz(tmp9_block, VOID, VOID, VOID, VOID, tmp13_caTitleError, tmp11_caDeadlineError, tmp10_caMaxPointsError, VOID, tmp12_caGracePeriodError));
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var newState = tmp$ret$1;
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var entity = newState.orx();
    var serializer = Companion_getInstance_13().a4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_112();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.qp7_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_5 = this;
    var tmp_6 = this.cp2();
    tmp_5.qp7_1 = launch(tmp_6, VOID, VOID, ClazzAssignmentEditViewModel$onCourseBlockChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(ClazzAssignmentEditViewModel).zs6 = function (pictureUri) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.qrw_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.edit.ClazzAssignmentEditViewModel.onPictureChanged.<anonymous>' call
        var tmp1_safe_receiver = prevValue.brx_1.yry_1;
        var tmp;
        if (tmp1_safe_receiver == null) {
          tmp = null;
        } else {
          var tmp0_safe_receiver = prevValue.brx_1.yry_1.zj5_1;
          tmp = tmp1_safe_receiver.kj6(VOID, tmp0_safe_receiver == null ? null : tmp0_safe_receiver.gji(VOID, VOID, pictureUri));
        }
        var nextValue = prevValue.erx(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue.brx_1.jrz(tmp));
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var newState = tmp$ret$1;
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var entity = newState.orx();
    var serializer = Companion_getInstance_13().a4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_112();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.qp7_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_0 = this;
    var tmp_1 = this.cp2();
    tmp_0.qp7_1 = launch(tmp_1, VOID, VOID, ClazzAssignmentEditViewModel$onPictureChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(ClazzAssignmentEditViewModel).as7 = function () {
    var tmp = serializer_0(StringCompanionObject_instance);
    Companion_getInstance_112();
    var tmp0_safe_receiver = this.qrw_1.t2().orx();
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.fj6_1;
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.i7t_1;
    this.rp2('CourseGroups', 'groupSet', null, tmp, mapOf_0(to('clazzUid', (tmp2_elvis_lhs == null ? new Long(0, 0) : tmp2_elvis_lhs).toString())));
  };
  protoOf(ClazzAssignmentEditViewModel).bs7 = function () {
    var tmp0_safe_receiver = this.qrw_1.t2().orx();
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.fj6_1;
    var tmp;
    if (tmp1_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp1_elvis_lhs;
    }
    var assignmentVal = tmp;
    var tmp_0 = ListSerializer(Companion_instance_17.a4r());
    var tmp_1 = this.z4q();
    var tmp_2 = ListSerializer(Companion_instance_17.a4r());
    var tmp2_safe_receiver = this.qrw_1.t2().orx();
    var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.hj6_1;
    var tmp_3 = to('allocations', tmp_1.e45(tmp_2, tmp3_elvis_lhs == null ? emptyList() : tmp3_elvis_lhs));
    var tmp_4 = to('groupSetUid', assignmentVal.t7s_1.toString());
    Companion_getInstance_112();
    var tmp_5 = to('clazzUid', assignmentVal.i7t_1.toString());
    var tmp_6 = to('numReviewers', assignmentVal.j7t_1.toString());
    Companion_getInstance_102();
    this.rp2('PeerReviewerAllocationEdit', 'peerAllocationsResult', null, tmp_0, mapOf([tmp_3, tmp_4, tmp_5, tmp_6, to('clazzAssignmentUid', assignmentVal.q7s_1.toString())]));
  };
  protoOf(ClazzAssignmentEditViewModel).cqf = function () {
    if (!this.qrw_1.t2().urw_1)
      return Unit_instance;
    var tmp = ClazzAssignmentEditViewModel$onClickSave$lambda(this);
    this.yp8(tmp, ClazzAssignmentEditViewModel$onClickSave$slambda_0(this, null));
  };
  function Companion_116() {
    Companion_instance_164 = this;
    this.ms3_1 = listOf([CompletionCriteria_ASSIGNMENT_SUBMITTED_getInstance(), CompletionCriteria_ASSIGNMENT_GRADED_getInstance()]);
  }
  protoOf(Companion_116).a4r = function () {
    return $serializer_getInstance_65();
  };
  var Companion_instance_164;
  function Companion_getInstance_133() {
    if (Companion_instance_164 == null)
      new Companion_116();
    return Companion_instance_164;
  }
  function $serializer_53() {
    $serializer_instance_53 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.viewmodel.clazzassignment.edit.ClazzAssignmentEditUiState', this, 10);
    tmp0_serialDesc.g4f('fieldsEnabled', true);
    tmp0_serialDesc.g4f('markingTypeEnabled', true);
    tmp0_serialDesc.g4f('groupSetEnabled', true);
    tmp0_serialDesc.g4f('reviewerCountError', true);
    tmp0_serialDesc.g4f('courseTerminology', true);
    tmp0_serialDesc.g4f('submissionRequiredError', true);
    tmp0_serialDesc.g4f('sizeLimitError', true);
    tmp0_serialDesc.g4f('courseBlockEditUiState', true);
    tmp0_serialDesc.g4f('groupSubmissionOn', true);
    tmp0_serialDesc.g4f('groupSetError', true);
    this.cs7_1 = tmp0_serialDesc;
  }
  protoOf($serializer_53).d44 = function () {
    return this.cs7_1;
  };
  protoOf($serializer_53).x4f = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [BooleanSerializer_getInstance(), BooleanSerializer_getInstance(), BooleanSerializer_getInstance(), get_nullable(StringSerializer_getInstance()), get_nullable($serializer_getInstance_10()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), $serializer_getInstance_67(), BooleanSerializer_getInstance(), get_nullable(StringSerializer_getInstance())];
  };
  protoOf($serializer_53).f44 = function (decoder) {
    var tmp0_desc = this.cs7_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = false;
    var tmp5_local1 = false;
    var tmp6_local2 = false;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_local6 = null;
    var tmp11_local7 = null;
    var tmp12_local8 = false;
    var tmp13_local9 = null;
    var tmp14_input = decoder.v47(tmp0_desc);
    if (tmp14_input.k48()) {
      tmp4_local0 = tmp14_input.x47(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp14_input.x47(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp14_input.x47(tmp0_desc, 2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp14_input.j48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp14_input.j48(tmp0_desc, 4, $serializer_getInstance_10(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp14_input.j48(tmp0_desc, 5, StringSerializer_getInstance(), tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
      tmp10_local6 = tmp14_input.j48(tmp0_desc, 6, StringSerializer_getInstance(), tmp10_local6);
      tmp3_bitMask0 = tmp3_bitMask0 | 64;
      tmp11_local7 = tmp14_input.h48(tmp0_desc, 7, $serializer_getInstance_67(), tmp11_local7);
      tmp3_bitMask0 = tmp3_bitMask0 | 128;
      tmp12_local8 = tmp14_input.x47(tmp0_desc, 8);
      tmp3_bitMask0 = tmp3_bitMask0 | 256;
      tmp13_local9 = tmp14_input.j48(tmp0_desc, 9, StringSerializer_getInstance(), tmp13_local9);
      tmp3_bitMask0 = tmp3_bitMask0 | 512;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp14_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp14_input.x47(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp14_input.x47(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp14_input.x47(tmp0_desc, 2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp14_input.j48(tmp0_desc, 3, StringSerializer_getInstance(), tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp14_input.j48(tmp0_desc, 4, $serializer_getInstance_10(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp14_input.j48(tmp0_desc, 5, StringSerializer_getInstance(), tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          case 6:
            tmp10_local6 = tmp14_input.j48(tmp0_desc, 6, StringSerializer_getInstance(), tmp10_local6);
            tmp3_bitMask0 = tmp3_bitMask0 | 64;
            break;
          case 7:
            tmp11_local7 = tmp14_input.h48(tmp0_desc, 7, $serializer_getInstance_67(), tmp11_local7);
            tmp3_bitMask0 = tmp3_bitMask0 | 128;
            break;
          case 8:
            tmp12_local8 = tmp14_input.x47(tmp0_desc, 8);
            tmp3_bitMask0 = tmp3_bitMask0 | 256;
            break;
          case 9:
            tmp13_local9 = tmp14_input.j48(tmp0_desc, 9, StringSerializer_getInstance(), tmp13_local9);
            tmp3_bitMask0 = tmp3_bitMask0 | 512;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp14_input.w47(tmp0_desc);
    return ClazzAssignmentEditUiState_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, tmp11_local7, tmp12_local8, tmp13_local9, null);
  };
  protoOf($serializer_53).ds7 = function (encoder, value) {
    var tmp0_desc = this.cs7_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    if (tmp1_output.r49(tmp0_desc, 0) ? true : !(value.urw_1 === false)) {
      tmp1_output.b49(tmp0_desc, 0, value.urw_1);
    }
    if (tmp1_output.r49(tmp0_desc, 1) ? true : !(value.vrw_1 === true)) {
      tmp1_output.b49(tmp0_desc, 1, value.vrw_1);
    }
    if (tmp1_output.r49(tmp0_desc, 2) ? true : !(value.wrw_1 === true)) {
      tmp1_output.b49(tmp0_desc, 2, value.wrw_1);
    }
    if (tmp1_output.r49(tmp0_desc, 3) ? true : !(value.xrw_1 == null)) {
      tmp1_output.n49(tmp0_desc, 3, StringSerializer_getInstance(), value.xrw_1);
    }
    if (tmp1_output.r49(tmp0_desc, 4) ? true : !(value.yrw_1 == null)) {
      tmp1_output.n49(tmp0_desc, 4, $serializer_getInstance_10(), value.yrw_1);
    }
    if (tmp1_output.r49(tmp0_desc, 5) ? true : !(value.zrw_1 == null)) {
      tmp1_output.n49(tmp0_desc, 5, StringSerializer_getInstance(), value.zrw_1);
    }
    if (tmp1_output.r49(tmp0_desc, 6) ? true : !(value.arx_1 == null)) {
      tmp1_output.n49(tmp0_desc, 6, StringSerializer_getInstance(), value.arx_1);
    }
    if (tmp1_output.r49(tmp0_desc, 7) ? true : !value.brx_1.equals(new CourseBlockEditUiState(VOID, VOID, Companion_getInstance_133().ms3_1))) {
      tmp1_output.l49(tmp0_desc, 7, $serializer_getInstance_67(), value.brx_1);
    }
    if (tmp1_output.r49(tmp0_desc, 8) ? true : !(value.crx_1 === false)) {
      tmp1_output.b49(tmp0_desc, 8, value.crx_1);
    }
    if (tmp1_output.r49(tmp0_desc, 9) ? true : !(value.drx_1 == null)) {
      tmp1_output.n49(tmp0_desc, 9, StringSerializer_getInstance(), value.drx_1);
    }
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_53).e44 = function (encoder, value) {
    return this.ds7(encoder, value instanceof ClazzAssignmentEditUiState ? value : THROW_CCE());
  };
  var $serializer_instance_53;
  function $serializer_getInstance_65() {
    if ($serializer_instance_53 == null)
      new $serializer_53();
    return $serializer_instance_53;
  }
  function ClazzAssignmentEditUiState_init_$Init$(seen1, fieldsEnabled, markingTypeEnabled, groupSetEnabled, reviewerCountError, courseTerminology, submissionRequiredError, sizeLimitError, courseBlockEditUiState, groupSubmissionOn, groupSetError, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_65().cs7_1);
    }
    if (0 === (seen1 & 1))
      $this.urw_1 = false;
    else
      $this.urw_1 = fieldsEnabled;
    if (0 === (seen1 & 2))
      $this.vrw_1 = true;
    else
      $this.vrw_1 = markingTypeEnabled;
    if (0 === (seen1 & 4))
      $this.wrw_1 = true;
    else
      $this.wrw_1 = groupSetEnabled;
    if (0 === (seen1 & 8))
      $this.xrw_1 = null;
    else
      $this.xrw_1 = reviewerCountError;
    if (0 === (seen1 & 16))
      $this.yrw_1 = null;
    else
      $this.yrw_1 = courseTerminology;
    if (0 === (seen1 & 32))
      $this.zrw_1 = null;
    else
      $this.zrw_1 = submissionRequiredError;
    if (0 === (seen1 & 64))
      $this.arx_1 = null;
    else
      $this.arx_1 = sizeLimitError;
    if (0 === (seen1 & 128))
      $this.brx_1 = new CourseBlockEditUiState(VOID, VOID, Companion_getInstance_133().ms3_1);
    else
      $this.brx_1 = courseBlockEditUiState;
    if (0 === (seen1 & 256))
      $this.crx_1 = false;
    else
      $this.crx_1 = groupSubmissionOn;
    if (0 === (seen1 & 512))
      $this.drx_1 = null;
    else
      $this.drx_1 = groupSetError;
    return $this;
  }
  function ClazzAssignmentEditUiState_init_$Create$(seen1, fieldsEnabled, markingTypeEnabled, groupSetEnabled, reviewerCountError, courseTerminology, submissionRequiredError, sizeLimitError, courseBlockEditUiState, groupSubmissionOn, groupSetError, serializationConstructorMarker) {
    return ClazzAssignmentEditUiState_init_$Init$(seen1, fieldsEnabled, markingTypeEnabled, groupSetEnabled, reviewerCountError, courseTerminology, submissionRequiredError, sizeLimitError, courseBlockEditUiState, groupSubmissionOn, groupSetError, serializationConstructorMarker, objectCreate(protoOf(ClazzAssignmentEditUiState)));
  }
  function ClazzAssignmentEditUiState(fieldsEnabled, markingTypeEnabled, groupSetEnabled, reviewerCountError, courseTerminology, submissionRequiredError, sizeLimitError, courseBlockEditUiState, groupSubmissionOn, groupSetError) {
    Companion_getInstance_133();
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    markingTypeEnabled = markingTypeEnabled === VOID ? true : markingTypeEnabled;
    groupSetEnabled = groupSetEnabled === VOID ? true : groupSetEnabled;
    reviewerCountError = reviewerCountError === VOID ? null : reviewerCountError;
    courseTerminology = courseTerminology === VOID ? null : courseTerminology;
    submissionRequiredError = submissionRequiredError === VOID ? null : submissionRequiredError;
    sizeLimitError = sizeLimitError === VOID ? null : sizeLimitError;
    courseBlockEditUiState = courseBlockEditUiState === VOID ? new CourseBlockEditUiState(VOID, VOID, Companion_getInstance_133().ms3_1) : courseBlockEditUiState;
    groupSubmissionOn = groupSubmissionOn === VOID ? false : groupSubmissionOn;
    groupSetError = groupSetError === VOID ? null : groupSetError;
    this.urw_1 = fieldsEnabled;
    this.vrw_1 = markingTypeEnabled;
    this.wrw_1 = groupSetEnabled;
    this.xrw_1 = reviewerCountError;
    this.yrw_1 = courseTerminology;
    this.zrw_1 = submissionRequiredError;
    this.arx_1 = sizeLimitError;
    this.brx_1 = courseBlockEditUiState;
    this.crx_1 = groupSubmissionOn;
    this.drx_1 = groupSetError;
  }
  protoOf(ClazzAssignmentEditUiState).orx = function () {
    return this.brx_1.yry_1;
  };
  protoOf(ClazzAssignmentEditUiState).es7 = function () {
    var tmp0_safe_receiver = this.orx();
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.fj6_1;
    var tmp = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.d7t_1;
    return tmp === 2;
  };
  protoOf(ClazzAssignmentEditUiState).fs7 = function () {
    var tmp0_safe_receiver = this.orx();
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.fj6_1;
    return (tmp1_safe_receiver == null ? null : tmp1_safe_receiver.e7t_1) === true;
  };
  protoOf(ClazzAssignmentEditUiState).gs7 = function () {
    var tmp0_safe_receiver = this.orx();
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.fj6_1;
    return (tmp1_safe_receiver == null ? null : tmp1_safe_receiver.y7s_1) === true;
  };
  protoOf(ClazzAssignmentEditUiState).js4 = function (fieldsEnabled) {
    return this.erx(fieldsEnabled, VOID, VOID, VOID, VOID, VOID, VOID, this.brx_1.jrz(VOID, VOID, VOID, fieldsEnabled));
  };
  protoOf(ClazzAssignmentEditUiState).hs7 = function (fieldsEnabled, markingTypeEnabled, groupSetEnabled, reviewerCountError, courseTerminology, submissionRequiredError, sizeLimitError, courseBlockEditUiState, groupSubmissionOn, groupSetError) {
    return new ClazzAssignmentEditUiState(fieldsEnabled, markingTypeEnabled, groupSetEnabled, reviewerCountError, courseTerminology, submissionRequiredError, sizeLimitError, courseBlockEditUiState, groupSubmissionOn, groupSetError);
  };
  protoOf(ClazzAssignmentEditUiState).erx = function (fieldsEnabled, markingTypeEnabled, groupSetEnabled, reviewerCountError, courseTerminology, submissionRequiredError, sizeLimitError, courseBlockEditUiState, groupSubmissionOn, groupSetError, $super) {
    fieldsEnabled = fieldsEnabled === VOID ? this.urw_1 : fieldsEnabled;
    markingTypeEnabled = markingTypeEnabled === VOID ? this.vrw_1 : markingTypeEnabled;
    groupSetEnabled = groupSetEnabled === VOID ? this.wrw_1 : groupSetEnabled;
    reviewerCountError = reviewerCountError === VOID ? this.xrw_1 : reviewerCountError;
    courseTerminology = courseTerminology === VOID ? this.yrw_1 : courseTerminology;
    submissionRequiredError = submissionRequiredError === VOID ? this.zrw_1 : submissionRequiredError;
    sizeLimitError = sizeLimitError === VOID ? this.arx_1 : sizeLimitError;
    courseBlockEditUiState = courseBlockEditUiState === VOID ? this.brx_1 : courseBlockEditUiState;
    groupSubmissionOn = groupSubmissionOn === VOID ? this.crx_1 : groupSubmissionOn;
    groupSetError = groupSetError === VOID ? this.drx_1 : groupSetError;
    return $super === VOID ? this.hs7(fieldsEnabled, markingTypeEnabled, groupSetEnabled, reviewerCountError, courseTerminology, submissionRequiredError, sizeLimitError, courseBlockEditUiState, groupSubmissionOn, groupSetError) : $super.hs7.call(this, fieldsEnabled, markingTypeEnabled, groupSetEnabled, reviewerCountError, courseTerminology, submissionRequiredError, sizeLimitError, courseBlockEditUiState, groupSubmissionOn, groupSetError);
  };
  protoOf(ClazzAssignmentEditUiState).toString = function () {
    return 'ClazzAssignmentEditUiState(fieldsEnabled=' + this.urw_1 + ', markingTypeEnabled=' + this.vrw_1 + ', groupSetEnabled=' + this.wrw_1 + ', reviewerCountError=' + this.xrw_1 + ', courseTerminology=' + this.yrw_1 + ', submissionRequiredError=' + this.zrw_1 + ', sizeLimitError=' + this.arx_1 + ', courseBlockEditUiState=' + this.brx_1 + ', groupSubmissionOn=' + this.crx_1 + ', groupSetError=' + this.drx_1 + ')';
  };
  protoOf(ClazzAssignmentEditUiState).hashCode = function () {
    var result = getBooleanHashCode(this.urw_1);
    result = imul(result, 31) + getBooleanHashCode(this.vrw_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.wrw_1) | 0;
    result = imul(result, 31) + (this.xrw_1 == null ? 0 : getStringHashCode(this.xrw_1)) | 0;
    result = imul(result, 31) + (this.yrw_1 == null ? 0 : hashCode(this.yrw_1)) | 0;
    result = imul(result, 31) + (this.zrw_1 == null ? 0 : getStringHashCode(this.zrw_1)) | 0;
    result = imul(result, 31) + (this.arx_1 == null ? 0 : getStringHashCode(this.arx_1)) | 0;
    result = imul(result, 31) + this.brx_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.crx_1) | 0;
    result = imul(result, 31) + (this.drx_1 == null ? 0 : getStringHashCode(this.drx_1)) | 0;
    return result;
  };
  protoOf(ClazzAssignmentEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzAssignmentEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzAssignmentEditUiState ? other : THROW_CCE();
    if (!(this.urw_1 === tmp0_other_with_cast.urw_1))
      return false;
    if (!(this.vrw_1 === tmp0_other_with_cast.vrw_1))
      return false;
    if (!(this.wrw_1 === tmp0_other_with_cast.wrw_1))
      return false;
    if (!(this.xrw_1 == tmp0_other_with_cast.xrw_1))
      return false;
    if (!equals(this.yrw_1, tmp0_other_with_cast.yrw_1))
      return false;
    if (!(this.zrw_1 == tmp0_other_with_cast.zrw_1))
      return false;
    if (!(this.arx_1 == tmp0_other_with_cast.arx_1))
      return false;
    if (!this.brx_1.equals(tmp0_other_with_cast.brx_1))
      return false;
    if (!(this.crx_1 === tmp0_other_with_cast.crx_1))
      return false;
    if (!(this.drx_1 == tmp0_other_with_cast.drx_1))
      return false;
    return true;
  };
  function snackDisaptcher$factory() {
    return getPropertyCallableRef('snackDisaptcher', 1, KProperty1, function (receiver) {
      return _get_snackDisaptcher__bp310a(receiver);
    }, null);
  }
  function snackDisaptcher$factory_0() {
    return getPropertyCallableRef('snackDisaptcher', 1, KProperty1, function (receiver) {
      return _get_snackDisaptcher__bp310a(receiver);
    }, null);
  }
  function PeerReviewerAllocationEditViewModel$slambda$slambda(this$0, $savedStateHandle, $primaryKeyManager, resultContinuation) {
    this.qs7_1 = this$0;
    this.rs7_1 = $savedStateHandle;
    this.ss7_1 = $primaryKeyManager;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PeerReviewerAllocationEditViewModel$slambda$slambda).ms8 = function (db, $completion) {
    var tmp = this.gmp(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PeerReviewerAllocationEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.ms8(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PeerReviewerAllocationEditViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 9;
            this.hd_1 = 1;
            suspendResult = this.qs7_1.op2(this.rs7_1, 'allocations', ListSerializer(Companion_instance_17.a4r()), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.us7_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = this.ts7_1.d7e().q7r(this.qs7_1.ns9_1, this.qs7_1.qs9_1, systemTimeInMillis(), this.qs7_1.jp2().en6(strings_getInstance().qm8_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.vs7_1 = suspendResult;
            Napier_getInstance().v5d('Number of submitters: ' + this.vs7_1.u());
            var tmp_0 = this;
            tmp_0.ws7_1 = this.vs7_1;
            var tmp_1 = this;
            tmp_1.xs7_1 = this.ws7_1;
            var tmp_2 = this;
            tmp_2.ys7_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.ws7_1, 10));
            this.zs7_1 = this.xs7_1.w();
            this.hd_1 = 3;
            continue $sm;
          case 3:
            if (!this.zs7_1.f()) {
              this.hd_1 = 8;
              continue $sm;
            }

            this.as8_1 = this.zs7_1.e();
            var tmp_3 = this;
            tmp_3.bs8_1 = this.as8_1;
            this.cs8_1 = new AssignmentSubmitterSummary(this.bs8_1.h7w_1, this.bs8_1.g7w_1);
            var tmp_4 = this;
            var tmp0_safe_receiver = this.us7_1;
            var tmp_5;
            if (tmp0_safe_receiver == null) {
              tmp_5 = null;
            } else {
              var destination = ArrayList_init_$Create$();
              var tmp0_iterator = tmp0_safe_receiver.w();
              while (tmp0_iterator.f()) {
                var element = tmp0_iterator.e();
                if (element.mff_1.equals(this.bs8_1.h7w_1)) {
                  destination.i1(element);
                }
              }
              tmp_5 = destination;
            }

            var tmp1_elvis_lhs = tmp_5;
            tmp_4.ds8_1 = trimToSize(tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs, this.qs7_1.os9_1);
            var tmp_6 = this;
            tmp_6.es8_1 = this.qs7_1.os9_1;
            if (this.ds8_1.u() < this.es8_1) {
              var tmp_7 = this;
              tmp_7.gs8_1 = until(this.ds8_1.u(), this.es8_1);
              var tmp_8 = this;
              tmp_8.hs8_1 = this.gs8_1;
              var tmp_9 = this;
              tmp_9.is8_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.gs8_1, 10));
              this.js8_1 = this.hs8_1.w();
              this.hd_1 = 4;
              continue $sm;
            } else {
              var tmp_10 = this;
              tmp_10.fs8_1 = this.ds8_1;
              this.hd_1 = 7;
              continue $sm;
            }

          case 4:
            if (!this.js8_1.f()) {
              this.hd_1 = 6;
              continue $sm;
            }

            this.ks8_1 = this.js8_1.e();
            var tmp_11 = this;
            tmp_11.ls8_1 = this.ks8_1;
            this.hd_1 = 5;
            suspendResult = this.ss7_1.b62(140, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            var ARGUMENT = suspendResult;
            var ARGUMENT_0 = new PeerReviewerAllocation(ARGUMENT, VOID, this.bs8_1.h7w_1, this.qs7_1.ps9_1);
            this.is8_1.i1(ARGUMENT_0);
            this.hd_1 = 4;
            continue $sm;
          case 6:
            var ARGUMENT_1 = this.is8_1;
            this.fs8_1 = plus(this.ds8_1, ARGUMENT_1);
            this.hd_1 = 7;
            continue $sm;
          case 7:
            var ARGUMENT_2 = this.fs8_1;
            var ARGUMENT_3 = new AssignmentSubmitterAndAllocations(this.cs8_1, ARGUMENT_2);
            this.ys7_1.i1(ARGUMENT_3);
            this.hd_1 = 3;
            continue $sm;
          case 8:
            return this.ys7_1;
          case 9:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 9) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PeerReviewerAllocationEditViewModel$slambda$slambda).gmp = function (db, completion) {
    var i = new PeerReviewerAllocationEditViewModel$slambda$slambda(this.qs7_1, this.rs7_1, this.ss7_1, completion);
    i.ts7_1 = db;
    return i;
  };
  function PeerReviewerAllocationEditViewModel$slambda$slambda_0(this$0, $savedStateHandle, $primaryKeyManager, resultContinuation) {
    var i = new PeerReviewerAllocationEditViewModel$slambda$slambda(this$0, $savedStateHandle, $primaryKeyManager, resultContinuation);
    var l = function (db, $completion) {
      return i.ms8(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PeerReviewerAllocationEditViewModel$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PeerReviewerAllocationEditViewModel$slambda$slambda_1).zs9 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PeerReviewerAllocationEditViewModel$slambda$slambda_1).z77 = function ($completion) {
    return this.zs9($completion);
  };
  protoOf(PeerReviewerAllocationEditViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return null;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PeerReviewerAllocationEditViewModel$slambda$slambda_1).y77 = function (completion) {
    return new PeerReviewerAllocationEditViewModel$slambda$slambda_1(completion);
  };
  function PeerReviewerAllocationEditViewModel$slambda$slambda_2(resultContinuation) {
    var i = new PeerReviewerAllocationEditViewModel$slambda$slambda_1(resultContinuation);
    var l = function ($completion) {
      return i.zs9($completion);
    };
    l.$arity = 0;
    return l;
  }
  function PeerReviewerAllocationEditViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.ls9_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.peerreviewerallocationedit.PeerReviewerAllocationEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.bsa(it == null ? emptyList() : it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function PeerReviewerAllocationEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.cqf();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function Companion_117() {
    this.csa_1 = 'allocations';
    this.dsa_1 = 'groupSetUid';
    this.esa_1 = 'numReviewers';
    this.fsa_1 = 'PeerReviewerAllocationEdit';
  }
  var Companion_instance_165;
  function Companion_getInstance_134() {
    return Companion_instance_165;
  }
  function PeerReviewerAllocationEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.osa_1 = this$0;
    this.psa_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PeerReviewerAllocationEditViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PeerReviewerAllocationEditViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PeerReviewerAllocationEditViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.rsa_1 = get_doorPrimaryKeyManager(this.osa_1.ep2());
            this.hd_1 = 1;
            var tmp_0 = ListSerializer(Companion_getInstance_14().a4r());
            var tmp_1 = PeerReviewerAllocationEditViewModel$slambda$slambda_0(this.osa_1, this.psa_1, this.rsa_1, null);
            var tmp_2 = PeerReviewerAllocationEditViewModel$slambda$slambda_2(null);
            suspendResult = this.osa_1.tp2(tmp_0, VOID, VOID, tmp_1, tmp_2, PeerReviewerAllocationEditViewModel$slambda$lambda(this.osa_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.osa_1.pp1_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_3 = this.osa_1.jp2().en6(strings_getInstance().olk_1);
                var nextValue = prevValue.nol(VOID, VOID, VOID, VOID, true, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_3, VOID, PeerReviewerAllocationEditViewModel$onClickSave$ref(this.osa_1)));
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PeerReviewerAllocationEditViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new PeerReviewerAllocationEditViewModel$slambda(this.osa_1, this.psa_1, completion);
    i.qsa_1 = $this$launch;
    return i;
  };
  function PeerReviewerAllocationEditViewModel$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new PeerReviewerAllocationEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PeerReviewerAllocationEditViewModel$onAllocationChanged$lambda($allocation) {
    return function (it) {
      return it.kff_1.equals($allocation.kff_1);
    };
  }
  function PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda(this$0, resultContinuation) {
    this.asb_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var this_0 = this.asb_1.ls9_1.t2().asa_1;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              var list = element.wj8_1;
              addAll(destination, list);
            }

            suspendResult = this.asb_1.ks9_1.ro1(destination, this.asb_1.qs9_1, this.asb_1.ns9_1, this.asb_1.ps9_1, this.asb_1.os9_1, true, true, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var newAllocations = suspendResult;
            l$ret$1: do {
              var this_1 = this.asb_1.ls9_1;
              while (true) {
                var prevValue = this_1.t2();
                var this_2 = prevValue.asa_1;
                var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_2, 10));
                var tmp0_iterator_0 = this_2.w();
                while (tmp0_iterator_0.f()) {
                  var item = tmp0_iterator_0.e();
                  var destination_1 = ArrayList_init_$Create$();
                  var tmp0_iterator_1 = newAllocations.w();
                  while (tmp0_iterator_1.f()) {
                    var element_0 = tmp0_iterator_1.e();
                    if (element_0.mff_1.equals(item.vj8_1.u7u_1)) {
                      destination_1.i1(element_0);
                    }
                  }
                  destination_0.i1(new AssignmentSubmitterAndAllocations(item.vj8_1, destination_1));
                }
                var nextValue = prevValue.bsa(destination_0);
                if (this_1.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda).v1m = function ($this$launch, completion) {
    var i = new PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda(this.asb_1, completion);
    i.bsb_1 = $this$launch;
    return i;
  };
  function PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda_0(this$0, resultContinuation) {
    var i = new PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PeerReviewerAllocationEditViewModel(di, savedStateHandle, updatePeerReviewAllocationUseCase) {
    var tmp;
    if (updatePeerReviewAllocationUseCase === VOID) {
      // Inline function 'org.kodein.di.instance' call
      var tmp_0 = get_direct(onActiveEndpoint(di)).s57();
      // Inline function 'org.kodein.type.generic' call
      var tmp_1 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
      var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
      var tmp_2 = tmp_0.q57(tmp$ret$0, 1);
      // Inline function 'org.kodein.di.instance' call
      var tmp_3 = get_direct(di).s57();
      // Inline function 'org.kodein.type.generic' call
      var tmp_4 = typeToken(createKType(getKClass(UstadMobileSystemImpl), arrayOf([]), false));
      var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
      var tmp$ret$3 = tmp_3.q57(tmp$ret$2, null);
      tmp = new UpdatePeerReviewAllocationUseCase(tmp_2, tmp$ret$3);
    } else {
      tmp = updatePeerReviewAllocationUseCase;
    }
    updatePeerReviewAllocationUseCase = tmp;
    UstadEditViewModel.call(this, di, savedStateHandle, 'PeerReviewerAllocationEdit');
    this.ks9_1 = updatePeerReviewAllocationUseCase;
    this.ls9_1 = MutableStateFlow(new PeerReviewerAllocationEditUIState());
    this.ms9_1 = asStateFlow(this.ls9_1);
    var tmp_5 = this;
    Companion_getInstance_112();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_5.ns9_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_6 = this;
    var tmp0_safe_receiver_0 = savedStateHandle.ba('numReviewers');
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : toInt(tmp0_safe_receiver_0);
    tmp_6.os9_1 = tmp1_elvis_lhs_0 == null ? 1 : tmp1_elvis_lhs_0;
    var tmp_7 = this;
    Companion_getInstance_102();
    var tmp0_safe_receiver_1 = savedStateHandle.ba('clazzAssignmentUid');
    var tmp1_elvis_lhs_1 = tmp0_safe_receiver_1 == null ? null : toLong_0(tmp0_safe_receiver_1);
    tmp_7.ps9_1 = tmp1_elvis_lhs_1 == null ? new Long(0, 0) : tmp1_elvis_lhs_1;
    var tmp_8 = this;
    var tmp0_safe_receiver_2 = savedStateHandle.ba('groupSetUid');
    var tmp1_elvis_lhs_2 = tmp0_safe_receiver_2 == null ? null : toLong_0(tmp0_safe_receiver_2);
    tmp_8.qs9_1 = tmp1_elvis_lhs_2 == null ? new Long(0, 0) : tmp1_elvis_lhs_2;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.pp1_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.peerreviewerallocationedit.PeerReviewerAllocationEditViewModel.<anonymous>' call
        var nextValue = prevValue.nol(VOID, VOID, this.jp2().en6(strings_getInstance().jmd_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_9 = this.cp2();
    launch(tmp_9, VOID, VOID, PeerReviewerAllocationEditViewModel$slambda_0(this, savedStateHandle, null));
  }
  protoOf(PeerReviewerAllocationEditViewModel).csb = function (allocation) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.ls9_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.peerreviewerallocationedit.PeerReviewerAllocationEditViewModel.onAllocationChanged.<anonymous>' call
        // Inline function 'kotlin.collections.map' call
        var this_1 = prevValue.asa_1;
        // Inline function 'kotlin.collections.mapTo' call
        var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
        var tmp0_iterator = this_1.w();
        while (tmp0_iterator.f()) {
          var item = tmp0_iterator.e();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.peerreviewerallocationedit.PeerReviewerAllocationEditViewModel.onAllocationChanged.<anonymous>.<anonymous>' call
          var tmp;
          if (item.vj8_1.u7u_1.equals(allocation.mff_1)) {
            tmp = item.yj8(VOID, replace_0(item.wj8_1, allocation, PeerReviewerAllocationEditViewModel$onAllocationChanged$lambda(allocation)));
          } else {
            tmp = item;
          }
          var tmp$ret$0 = tmp;
          destination.i1(tmp$ret$0);
        }
        var nextValue = prevValue.bsa(destination);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(PeerReviewerAllocationEditViewModel).dsb = function () {
    var tmp = this.cp2();
    launch(tmp, VOID, VOID, PeerReviewerAllocationEditViewModel$onAssignRandomReviewers$slambda_0(this, null));
  };
  protoOf(PeerReviewerAllocationEditViewModel).cqf = function () {
    // Inline function 'kotlin.collections.flatMap' call
    // Inline function 'kotlin.collections.flatMapTo' call
    var this_0 = this.ls9_1.t2().asa_1;
    var destination = ArrayList_init_$Create$();
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.peerreviewerallocationedit.PeerReviewerAllocationEditViewModel.onClickSave.<anonymous>' call
      var list = element.wj8_1;
      addAll(destination, list);
    }
    this.up7(destination);
  };
  function PeerReviewerAllocationEditUIState(submitterListWithAllocations) {
    submitterListWithAllocations = submitterListWithAllocations === VOID ? emptyList() : submitterListWithAllocations;
    this.asa_1 = submitterListWithAllocations;
  }
  protoOf(PeerReviewerAllocationEditUIState).esb = function (allocation) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator = this.asa_1.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.peerreviewerallocationedit.PeerReviewerAllocationEditUIState.reviewerOptionsForAllocation.<anonymous>' call
        if (element.vj8_1.u7u_1.equals(allocation.mff_1)) {
          tmp$ret$1 = element;
          break $l$block;
        }
      }
      tmp$ret$1 = null;
    }
    var tmp0_safe_receiver = tmp$ret$1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.wj8_1;
    var existingAllocationsForSubmitter = tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var destination = ArrayList_init_$Create$();
    var tmp0_iterator_0 = existingAllocationsForSubmitter.w();
    while (tmp0_iterator_0.f()) {
      var element_0 = tmp0_iterator_0.e();
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.peerreviewerallocationedit.PeerReviewerAllocationEditUIState.reviewerOptionsForAllocation.<anonymous>' call
      if (!element_0.kff_1.equals(allocation.kff_1)) {
        destination.i1(element_0);
      }
    }
    // Inline function 'kotlin.collections.mapTo' call
    var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination, 10));
    var tmp0_iterator_1 = destination.w();
    while (tmp0_iterator_1.f()) {
      var item = tmp0_iterator_1.e();
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.peerreviewerallocationedit.PeerReviewerAllocationEditUIState.reviewerOptionsForAllocation.<anonymous>' call
      var tmp$ret$5 = item.lff_1;
      destination_0.i1(tmp$ret$5);
    }
    var otherMarkersAlreadySelected = destination_0;
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var this_0 = this.asa_1;
    var destination_1 = ArrayList_init_$Create$();
    var tmp0_iterator_2 = this_0.w();
    while (tmp0_iterator_2.f()) {
      var element_1 = tmp0_iterator_2.e();
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.peerreviewerallocationedit.PeerReviewerAllocationEditUIState.reviewerOptionsForAllocation.<anonymous>' call
      if (!element_1.vj8_1.u7u_1.equals(allocation.mff_1) ? !otherMarkersAlreadySelected.a1(element_1.vj8_1.u7u_1) : false) {
        destination_1.i1(element_1);
      }
    }
    return destination_1;
  };
  protoOf(PeerReviewerAllocationEditUIState).bsa = function (submitterListWithAllocations) {
    return new PeerReviewerAllocationEditUIState(submitterListWithAllocations);
  };
  protoOf(PeerReviewerAllocationEditUIState).toString = function () {
    return 'PeerReviewerAllocationEditUIState(submitterListWithAllocations=' + this.asa_1 + ')';
  };
  protoOf(PeerReviewerAllocationEditUIState).hashCode = function () {
    return hashCode(this.asa_1);
  };
  protoOf(PeerReviewerAllocationEditUIState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof PeerReviewerAllocationEditUIState))
      return false;
    var tmp0_other_with_cast = other instanceof PeerReviewerAllocationEditUIState ? other : THROW_CCE();
    if (!equals(this.asa_1, tmp0_other_with_cast.asa_1))
      return false;
    return true;
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.nsb_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda).psb = function (it, $completion) {
    var tmp = this.qsb(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.psb((p1 == null ? true : p1 instanceof CourseBlockAndAssignment) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.nsb_1.nsc_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.wsd(VOID, this.osb_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda).qsb = function (it, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda(this.nsb_1, completion);
    i.osb_1 = it;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.psb(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.fse_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.fse_1.fp2().c7d().kc6(this.fse_1.rsc_1);
            var tmp_1 = ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda$slambda_0(this.fse_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_17(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda(this.fse_1, completion);
    i.gse_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1).jrj = function (submissions, submissionFiles, $completion) {
    var tmp = this.krj(submissions, submissionFiles, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1).um = function (p1, p2, $completion) {
    var tmp = (!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE();
    return this.jrj(tmp, (!(p2 == null) ? isInterface(p2, List) : false) ? p2 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return combineWithSubmissionFiles(this.pse_1, this.qse_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1).krj = function (submissions, submissionFiles, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1(completion);
    i.pse_1 = submissions;
    i.qse_1 = submissionFiles;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_2(resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_1(resultContinuation);
    var l = function (submissions, submissionFiles, $completion) {
      return i.jrj(submissions, submissionFiles, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.zse_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3).vrj = function (it, $completion) {
    var tmp = this.wrj(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.vrj((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.zse_1.nsc_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.wsd(VOID, VOID, VOID, this.asf_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3).wrj = function (it, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3(this.zse_1, completion);
    i.asf_1 = it;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.vrj(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.jsf_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_5).hrk = function (it, $completion) {
    var tmp = this.irk(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_5).he = function (p1, $completion) {
    return this.hrk((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.jsf_1.nsc_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.wsd(VOID, VOID, VOID, VOID, VOID, this.ksf_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_5).irk = function (it, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_5(this.jsf_1, completion);
    i.ksf_1 = it;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_5(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.hrk(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.tsf_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = _get_assignmentSubmitterNameUseCase__ts4wyt(this.tsf_1).anb(this.tsf_1.ssc_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var submitterName = suspendResult;
            l$ret$1: do {
              var this_0 = this.tsf_1.pp1_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.nol(VOID, VOID, submitterName);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda(this.tsf_1, completion);
    i.usf_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.dsg_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.esg_1, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_0(this.dsg_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_1(this.dsg_1, completion);
    i.esg_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.nsg_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_3).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.psg_1 = this.nsg_1.fp2().e7e().obm(this.nsg_1.ssc_1, this.nsg_1.rsc_1);
            this.qsg_1 = this.nsg_1.fp2().f7e().zbu(this.nsg_1.ssc_1, this.nsg_1.rsc_1);
            this.hd_1 = 1;
            var tmp_0 = distinctUntilChanged(combine(this.psg_1, this.qsg_1, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_2(null)));
            var tmp_1 = ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_4(this.nsg_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_17(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_3).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_3(this.nsg_1, completion);
    i.osg_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.zsg_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_5).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_5).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.zsg_1.fp2().g7e().nbg(this.zsg_1.ssc_1, this.zsg_1.rsc_1);
            var tmp_1 = ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda$slambda_6(this.zsg_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_17(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_5).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_5(this.zsg_1, completion);
    i.ash_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_5(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$lambda() {
    return new EmptyPagingSource();
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda(this$0, $this_launch, resultContinuation) {
    this.jsh_1 = this$0;
    this.ksh_1 = $this_launch;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda).msh = function (permissionPair, $completion) {
    var tmp = this.nsh(permissionPair, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.msh(p1 instanceof AssignmentPermissionAndActiveUserSubmitterUid ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          if (this.lsh_1.nd9_1) {
            l$ret$1: do {
              var this_0 = this.jsh_1.nsc_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp0_privateCommentsList = this.jsh_1.usc_1;
                var tmp1_activeUserPersonUid = this.jsh_1.dp2();
                var tmp2_activeUserSubmitterId = this.lsh_1.pd9_1;
                var tmp_0;
                if (this.lsh_1.md9_1) {
                  var this_1 = new CourseAssignmentMark();
                  this_1.ibh_1 = -1.0;
                  tmp_0 = this_1;
                } else {
                  tmp_0 = null;
                }
                var tmp3_draftMark = tmp_0;
                var tmp4_showModerateOptions = this.lsh_1.od9_1;
                var nextValue = prevValue.wsd(VOID, VOID, VOID, VOID, VOID, VOID, tmp3_draftMark, VOID, VOID, VOID, VOID, VOID, tmp0_privateCommentsList, true, tmp1_activeUserPersonUid, tmp2_activeUserSubmitterId, VOID, VOID, VOID, VOID, VOID, VOID, tmp4_showModerateOptions);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            launch(this.ksh_1, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_0(this.jsh_1, null));
            launch(this.ksh_1, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_2(this.jsh_1, null));
            launch(this.ksh_1, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_4(this.jsh_1, null));
            launch(this.ksh_1, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$slambda_6(this.jsh_1, null));
          } else {
            l$ret$3: do {
              var this_2 = this.jsh_1.nsc_1;
              while (true) {
                var prevValue_0 = this_2.t2();
                var tmp0_submissionList = emptyList();
                var tmp1_marks = emptyList();
                var nextValue_0 = prevValue_0.wsd(VOID, null, VOID, tmp0_submissionList, VOID, tmp1_marks, VOID, VOID, VOID, VOID, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda$lambda, false, VOID, new Long(0, 0));
                if (this_2.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
          }
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda).nsh = function (permissionPair, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda(this.jsh_1, this.ksh_1, completion);
    i.lsh_1 = permissionPair;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda_0(this$0, $this_launch, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda(this$0, $this_launch, resultContinuation);
    var l = function (permissionPair, $completion) {
      return i.msh(permissionPair, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda($permissionFlow, this$0, resultContinuation) {
    this.wsh_1 = $permissionFlow;
    this.xsh_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = distinctUntilChanged(this.wsh_1);
            suspendResult = collectLatest(tmp_0, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda$slambda_0(this.xsh_1, this.ysh_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda(this.wsh_1, this.xsh_1, completion);
    i.ysh_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda_0($permissionFlow, this$0, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda($permissionFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda($this_launch, $permissionFlow, this$0, resultContinuation) {
    this.hsi_1 = $this_launch;
    this.isi_1 = $permissionFlow;
    this.jsi_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda).m86 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda).z77 = function ($completion) {
    return this.m86($completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.hsi_1, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda$slambda_0(this.isi_1, this.jsi_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda$slambda).y77 = function (completion) {
    return new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda(this.hsi_1, this.isi_1, this.jsi_1, completion);
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda$slambda_0($this_launch, $permissionFlow, this$0, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda$slambda($this_launch, $permissionFlow, this$0, resultContinuation);
    var l = function ($completion) {
      return i.m86($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.nsc_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailViewModel.openSubmissionFileAsBlob.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.wsd(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function _get_assignmentSubmitterNameUseCase__ts4wyt($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.vsc_1;
    assignmentSubmitterNameUseCase$factory_0();
    return this_0.t2();
  }
  function _get_openBlobUiUseCase__fzusqz_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.xsc_1;
    openBlobUiUseCase$factory_2();
    return this_0.t2();
  }
  function _get_submitMarkUseCase__y8b5kx($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.ysc_1;
    submitMarkUseCase$factory_0();
    return this_0.t2();
  }
  function openSubmissionFileAsBlob_0($this, file, intent) {
    var tmp0_elvis_lhs = file.tbw_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var submissionFile = tmp;
    var tmp1_safe_receiver = $this.wsc_1;
    if (tmp1_safe_receiver == null)
      null;
    else {
      tmp1_safe_receiver.mr();
    }
    var tmp_0 = $this;
    var tmp_1 = $this.cp2();
    tmp_0.wsc_1 = launch(tmp_1, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda_0($this, submissionFile, intent, null));
  }
  function Companion_118() {
    this.ksi_1 = 'assignmentUid';
    this.lsi_1 = 'submitterUid';
    this.msi_1 = 'CourseAssignmentSubmitter';
  }
  var Companion_instance_166;
  function Companion_getInstance_135() {
    return Companion_instance_166;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_17(function_0) {
    this.nsi_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_17).t1d = function (value, $completion) {
    return this.nsi_1(value, $completion);
  };
  function ClazzAssignmentSubmitterDetailViewModel$privateCommentsPagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.fp2().h7e().i9y(this$0.ssc_1, this$0.rsc_1, false);
    };
  }
  function ClazzAssignmentSubmitterDetailViewModel$slambda(this$0, $permissionFlow, resultContinuation) {
    this.wsi_1 = this$0;
    this.xsi_1 = $permissionFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.wsi_1.nsc_1, ClazzAssignmentSubmitterDetailViewModel$slambda$slambda_0(this.ysi_1, this.xsi_1, this.wsi_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda(this.wsi_1, this.xsi_1, completion);
    i.ysi_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$slambda_0(this$0, $permissionFlow, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$slambda(this$0, $permissionFlow, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$onSubmitPrivateComment$slambda(this$0, resultContinuation) {
    this.hsj_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onSubmitPrivateComment$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onSubmitPrivateComment$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onSubmitPrivateComment$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.id_1 = 4;
            this.hd_1 = 2;
            var tmp_0 = this.hsj_1.fp2().h7e();
            var this_0 = new Comments();
            this_0.d9z_1 = this.hsj_1.ssc_1;
            this_0.e9z_1 = this.hsj_1.nsc_1.t2().osd_1;
            this_0.c9z_1 = this.hsj_1.dp2();
            this_0.a9z_1 = this.hsj_1.rsc_1;
            this_0.z9y_1 = this.hsj_1.psc_1.t2();
            this_0.h9z_1 = systemTimeInMillis();
            suspendResult = tmp_0.f9y(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var tmp_1 = this;
            this.hsj_1.psc_1.x1k('');
            tmp_1.jsj_1 = Unit_instance;
            this.id_1 = 5;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.id_1 = 5;
            this.hsj_1.lp2(Companion_getInstance_85().vol_1);
            return Unit_instance;
          case 4:
            this.id_1 = 5;
            var t = this.kd_1;
            this.hsj_1.lp2(Companion_getInstance_85().vol_1);
            throw t;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onSubmitPrivateComment$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$onSubmitPrivateComment$slambda(this.hsj_1, completion);
    i.isj_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$onSubmitPrivateComment$slambda_0(this$0, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$onSubmitPrivateComment$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$onClickSubmitMark$slambda(this$0, $assignment, $draftMark, $submissions, $courseBlock, resultContinuation) {
    this.ssj_1 = this$0;
    this.tsj_1 = $assignment;
    this.usj_1 = $draftMark;
    this.vsj_1 = $submissions;
    this.wsj_1 = $courseBlock;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onClickSubmitMark$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onClickSubmitMark$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onClickSubmitMark$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.id_1 = 4;
            this.id_1 = 3;
            this.hd_1 = 2;
            var tmp_0 = _get_submitMarkUseCase__y8b5kx(this.ssj_1);
            var tmp_1 = this.ssj_1.bp2().emx().kmk_1;
            var this_0 = this.vsj_1;
            var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var item = tmp0_iterator.e();
              destination.i1(item.dj8_1);
            }

            suspendResult = tmp_0.jn9(tmp_1, this.tsj_1, this.ssj_1.tsc_1, this.ssj_1.ssc_1, this.usj_1, destination, this.wsj_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var tmp_2 = this;
            l$ret$1: do {
              var this_1 = this.ssj_1.nsc_1;
              while (true) {
                var prevValue = this_1.t2();
                var this_2 = new CourseAssignmentMark();
                this_2.ibh_1 = -1.0;
                var nextValue = prevValue.wsd(VOID, VOID, VOID, VOID, VOID, VOID, this_2);
                if (this_1.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            tmp_2.ysj_1 = Unit_instance;
            this.id_1 = 5;
            this.hd_1 = 6;
            continue $sm;
          case 3:
            this.id_1 = 4;
            var tmp_3 = this.kd_1;
            if (tmp_3 instanceof Exception) {
              var e = this.kd_1;
              var tmp_4 = this;
              this.ssj_1.hp2().com(new Snack('Error: ' + e.message));
              Napier_getInstance().z5d('Exception submitting mark:', e);
              tmp_4.ysj_1 = Unit_instance;
              this.id_1 = 5;
              this.hd_1 = 6;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 4:
            this.id_1 = 5;
            var t = this.kd_1;
            l$ret$5: do {
              var this_3 = this.ssj_1.nsc_1;
              while (true) {
                var prevValue_0 = this_3.t2();
                var nextValue_0 = prevValue_0.wsd(VOID, VOID, VOID, VOID, VOID, VOID, VOID, false);
                if (this_3.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$5;
                }
              }
            }
             while (false);
            throw t;
          case 5:
            throw this.kd_1;
          case 6:
            this.id_1 = 5;
            l$ret$7: do {
              var this_4 = this.ssj_1.nsc_1;
              while (true) {
                var prevValue_1 = this_4.t2();
                var nextValue_1 = prevValue_1.wsd(VOID, VOID, VOID, VOID, VOID, VOID, VOID, false);
                if (this_4.y1k(prevValue_1, nextValue_1)) {
                  break l$ret$7;
                }
              }
            }
             while (false);
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 5) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onClickSubmitMark$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$onClickSubmitMark$slambda(this.ssj_1, this.tsj_1, this.usj_1, this.vsj_1, this.wsj_1, completion);
    i.xsj_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$onClickSubmitMark$slambda_0(this$0, $assignment, $draftMark, $submissions, $courseBlock, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$onClickSubmitMark$slambda(this$0, $assignment, $draftMark, $submissions, $courseBlock, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda(this$0, $submissionFile, $intent, resultContinuation) {
    this.hsk_1 = this$0;
    this.isk_1 = $submissionFile;
    this.jsk_1 = $intent;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.lsk_1 = _get_openBlobUiUseCase__fzusqz_0(this.hsk_1);
            if (this.lsk_1 == null) {
              this.msk_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              var tmp_0 = asBlobOpenItem(this.isk_1);
              suspendResult = this.lsk_1.gnc(tmp_0, ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda$lambda(this.hsk_1), this.jsk_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            var tmp_1 = this;
            tmp_1.msk_1 = Unit_instance;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda(this.hsk_1, this.isk_1, this.jsk_1, completion);
    i.ksk_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda_0(this$0, $submissionFile, $intent, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$openSubmissionFileAsBlob$slambda(this$0, $submissionFile, $intent, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel$onDeleteComment$slambda(this$0, $comments, resultContinuation) {
    this.vsk_1 = this$0;
    this.wsk_1 = $comments;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onDeleteComment$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onDeleteComment$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onDeleteComment$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.vsk_1.fp2().h7e().g9y(this.wsk_1.y9y_1, true, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.vsk_1.hp2().com(new Snack(this.vsk_1.jp2().en6(strings_getInstance().zlc_1)));
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel$onDeleteComment$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$onDeleteComment$slambda(this.vsk_1, this.wsk_1, completion);
    i.xsk_1 = $this$launch;
    return i;
  };
  function ClazzAssignmentSubmitterDetailViewModel$onDeleteComment$slambda_0(this$0, $comments, resultContinuation) {
    var i = new ClazzAssignmentSubmitterDetailViewModel$onDeleteComment$slambda(this$0, $comments, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzAssignmentSubmitterDetailViewModel(di, savedStateHandle) {
    DetailViewModel.call(this, di, savedStateHandle, 'CourseAssignmentSubmitter');
    this.nsc_1 = MutableStateFlow(new ClazzAssignmentSubmitterDetailUiState(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.jp2().iok()));
    this.osc_1 = asStateFlow(this.nsc_1);
    this.psc_1 = MutableStateFlow('');
    this.qsc_1 = asStateFlow(this.psc_1);
    var tmp = this;
    var tmp0_safe_receiver = savedStateHandle.ba('assignmentUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    var tmp_0;
    if (tmp1_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('No assignmentUid');
    } else {
      tmp_0 = tmp1_elvis_lhs;
    }
    tmp.rsc_1 = tmp_0;
    var tmp_1 = this;
    var tmp0_safe_receiver_0 = savedStateHandle.ba('submitterUid');
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : toLong_0(tmp0_safe_receiver_0);
    var tmp_2;
    if (tmp1_elvis_lhs_0 == null) {
      throw IllegalArgumentException_init_$Create$('No submitter uid');
    } else {
      tmp_2 = tmp1_elvis_lhs_0;
    }
    tmp_1.ssc_1 = tmp_2;
    var tmp_3 = this;
    Companion_getInstance_112();
    var tmp0_safe_receiver_1 = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs_1 = tmp0_safe_receiver_1 == null ? null : toLong_0(tmp0_safe_receiver_1);
    var tmp_4;
    if (tmp1_elvis_lhs_1 == null) {
      throw IllegalArgumentException_init_$Create$('No clazzUid');
    } else {
      tmp_4 = tmp1_elvis_lhs_1;
    }
    tmp_3.tsc_1 = tmp_4;
    var tmp_5 = this;
    tmp_5.usc_1 = ClazzAssignmentSubmitterDetailViewModel$privateCommentsPagingSourceFactory$lambda(this);
    var tmp_6 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = this.bp2().xmx();
    var trigger = this.q56();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_7 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_8 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
    var tmp$ret$1 = tmp_7.u56(tmp$ret$0, context);
    var this_0 = On(this, tmp$ret$1, trigger);
    // Inline function 'org.kodein.type.generic' call
    var tmp_9 = typeToken(createKType(getKClass(GetAssignmentSubmitterNameUseCase), arrayOf([]), false));
    var tmp$ret$3 = isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE();
    tmp_6.vsc_1 = Instance(this_0, tmp$ret$3, null).n5c(this, assignmentSubmitterNameUseCase$factory());
    this.wsc_1 = null;
    var tmp_10 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    var this_1 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_11 = typeToken(createKType(getKClass(OpenBlobUiUseCase), arrayOf([]), false));
    var tmp$ret$5 = isInterface(tmp_11, TypeToken) ? tmp_11 : THROW_CCE();
    tmp_10.xsc_1 = InstanceOrNull(this_1, tmp$ret$5, null).n5c(this, openBlobUiUseCase$factory_1());
    var tmp_12 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_2 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_13 = typeToken(createKType(getKClass(SubmitMarkUseCase), arrayOf([]), false));
    var tmp$ret$7 = isInterface(tmp_13, TypeToken) ? tmp_13 : THROW_CCE();
    tmp_12.ysc_1 = Instance(this_2, tmp$ret$7, null).n5c(this, submitMarkUseCase$factory());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_3 = this.nsc_1;
      while (true) {
        var prevValue = this_3.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailViewModel.<anonymous>' call
        var tmp_14 = this.bp2().emx().kmk_1.xjm();
        var tmp0_safe_receiver_2 = this.bp2().emx().mmk_1;
        var nextValue = prevValue.wsd(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp_14, tmp0_safe_receiver_2 == null ? null : tmp0_safe_receiver_2.g96_1);
        if (this_3.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var permissionFlow = this.fp2().b7f().hd5(this.dp2(), this.rsc_1, this.tsc_1, this.ssc_1);
    var tmp_15 = this.cp2();
    launch(tmp_15, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$slambda_0(this, permissionFlow, null));
  }
  protoOf(ClazzAssignmentSubmitterDetailViewModel).ysk = function (text) {
    this.psc_1.x1k(text);
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel).zsk = function () {
    if (this.mp2().equals(Companion_getInstance_85().uol_1))
      return Unit_instance;
    this.lp2(Companion_getInstance_85().uol_1);
    var tmp = this.cp2();
    launch(tmp, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$onSubmitPrivateComment$slambda_0(this, null));
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel).asl = function (draftMark) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.nsc_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailViewModel.onChangeDraftMark.<anonymous>' call
        var tmp;
        var tmp0_safe_receiver = prevValue.fsd_1;
        var tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ibh_1;
        if (tmp_0 == (draftMark == null ? null : draftMark.ibh_1)) {
          tmp = prevValue.zsc_1;
        } else {
          tmp = null;
        }
        var tmp2_submitMarkError = tmp;
        var nextValue = prevValue.wsd(tmp2_submitMarkError, VOID, VOID, VOID, VOID, VOID, draftMark);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel).bsl = function () {
    if (!this.nsc_1.t2().csl())
      return Unit_instance;
    var tmp0_elvis_lhs = this.nsc_1.t2().fsd_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var draftMark = tmp;
    var submissions = this.nsc_1.t2().csd_1;
    var tmp1_elvis_lhs = this.nsc_1.t2().asd_1;
    var tmp_0;
    if (tmp1_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp_0 = tmp1_elvis_lhs;
    }
    var block = tmp_0;
    var tmp2_elvis_lhs = block.rc9_1;
    var tmp_1;
    if (tmp2_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp_1 = tmp2_elvis_lhs;
    }
    var courseBlock = tmp_1;
    var tmp3_elvis_lhs = block.sc9_1;
    var tmp_2;
    if (tmp3_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp_2 = tmp3_elvis_lhs;
    }
    var assignment = tmp_2;
    if (draftMark.ibh_1 === -1.0) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this.nsc_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailViewModel.onClickSubmitMark.<anonymous>' call
          var nextValue = prevValue.wsd(this.jp2().en6(strings_getInstance().blh_1));
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    } else {
      if (draftMark.ibh_1 < 0.0) {
        $l$block_0: {
          // Inline function 'kotlinx.coroutines.flow.update' call
          var this_1 = this.nsc_1;
          while (true) {
            var prevValue_0 = this_1.t2();
            // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailViewModel.onClickSubmitMark.<anonymous>' call
            var nextValue_0 = prevValue_0.wsd(this.jp2().en6(strings_getInstance().pm9_1));
            if (this_1.y1k(prevValue_0, nextValue_0)) {
              break $l$block_0;
            }
          }
        }
        return Unit_instance;
      } else {
        var tmp_3 = draftMark.ibh_1;
        var tmp4_elvis_lhs = courseBlock.h7x_1;
        if (tmp_3 > (tmp4_elvis_lhs == null ? 0.0 : tmp4_elvis_lhs)) {
          $l$block_1: {
            // Inline function 'kotlinx.coroutines.flow.update' call
            var this_2 = this.nsc_1;
            while (true) {
              var prevValue_1 = this_2.t2();
              // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailViewModel.onClickSubmitMark.<anonymous>' call
              var nextValue_1 = prevValue_1.wsd(this.jp2().en6(strings_getInstance().nme_1));
              if (this_2.y1k(prevValue_1, nextValue_1)) {
                break $l$block_1;
              }
            }
          }
          return Unit_instance;
        }
      }
    }
    $l$block_2: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_3 = this.nsc_1;
      while (true) {
        var prevValue_2 = this_3.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailViewModel.onClickSubmitMark.<anonymous>' call
        var nextValue_2 = prevValue_2.wsd(VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
        if (this_3.y1k(prevValue_2, nextValue_2)) {
          break $l$block_2;
        }
      }
    }
    var tmp_4 = this.cp2();
    launch(tmp_4, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$onClickSubmitMark$slambda_0(this, assignment, draftMark, submissions, courseBlock, null));
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel).dsl = function (option) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.nsc_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailViewModel.onClickGradeFilterChip.<anonymous>' call
        var nextValue = prevValue.wsd(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, option.qom_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel).mru = function (submission) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.nsc_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailViewModel.onToggleSubmissionExpandCollapse.<anonymous>' call
        var nextValue = prevValue.wsd(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, toggle(prevValue.tsd_1, submission.hbn_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel).pru = function (file) {
    openSubmissionFileAsBlob_0(this, file, OpenBlobIntent_VIEW_getInstance());
  };
  protoOf(ClazzAssignmentSubmitterDetailViewModel).qru = function (comments) {
    var tmp = this.cp2();
    launch(tmp, VOID, VOID, ClazzAssignmentSubmitterDetailViewModel$onDeleteComment$slambda_0(this, comments, null));
  };
  function _get_latestUniqueMarksByMarker__e0a3pq_0($this) {
    return latestUniqueMarksByMarker($this.esd_1);
  }
  function sam$kotlin_Comparator$0_1(function_0) {
    this.esl_1 = function_0;
  }
  protoOf(sam$kotlin_Comparator$0_1).pa = function (a, b) {
    return this.esl_1(a, b);
  };
  protoOf(sam$kotlin_Comparator$0_1).compare = function (a, b) {
    return this.pa(a, b);
  };
  function ClazzAssignmentSubmitterDetailUiState$_init_$lambda_l9iher() {
    return new EmptyPagingSource();
  }
  function ClazzAssignmentSubmitterDetailUiState$_get_visibleMarks_$lambda_u07plk(a, b) {
    // Inline function 'kotlin.comparisons.compareValuesBy' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailUiState.<get-visibleMarks>.<anonymous>' call
    var tmp0_safe_receiver = b.obh_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.lbh_1;
    var tmp = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailUiState.<get-visibleMarks>.<anonymous>' call
    var tmp0_safe_receiver_0 = a.obh_1;
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.lbh_1;
    var tmp$ret$1 = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
    return compareValues(tmp, tmp$ret$1);
  }
  function ClazzAssignmentSubmitterDetailUiState(submitMarkError, block, gradeFilterChips, submissionList, submissionAttachments, marks, draftMark, markSubmissionInProgress, markNextStudentVisible, fieldsEnabled, markListSelectedChipId, markListFilterOptions, privateCommentsList, newPrivateCommentTextVisible, activeUserPersonUid, activeUserSubmitterId, activeUserPersonName, activeUserPictureUri, localDateTimeNow, dayOfWeekStrings, collapsedSubmissions, openingFileState, showModerateOptions) {
    submitMarkError = submitMarkError === VOID ? null : submitMarkError;
    block = block === VOID ? null : block;
    gradeFilterChips = gradeFilterChips === VOID ? emptyList() : gradeFilterChips;
    submissionList = submissionList === VOID ? emptyList() : submissionList;
    submissionAttachments = submissionAttachments === VOID ? emptyList() : submissionAttachments;
    marks = marks === VOID ? emptyList() : marks;
    draftMark = draftMark === VOID ? null : draftMark;
    markSubmissionInProgress = markSubmissionInProgress === VOID ? false : markSubmissionInProgress;
    markNextStudentVisible = markNextStudentVisible === VOID ? true : markNextStudentVisible;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    var tmp;
    if (markListSelectedChipId === VOID) {
      tmp = 1;
    } else {
      tmp = markListSelectedChipId;
    }
    markListSelectedChipId = tmp;
    var tmp_0;
    if (markListFilterOptions === VOID) {
      var tmp_1 = strings_getInstance().ymd_1;
      var tmp_2 = new MessageIdOption2(tmp_1, 1);
      var tmp_3 = strings_getInstance().sls_1;
      tmp_0 = listOf([tmp_2, new MessageIdOption2(tmp_3, 0)]);
    } else {
      tmp_0 = markListFilterOptions;
    }
    markListFilterOptions = tmp_0;
    var tmp_4;
    if (privateCommentsList === VOID) {
      tmp_4 = ClazzAssignmentSubmitterDetailUiState$_init_$lambda_l9iher;
    } else {
      tmp_4 = privateCommentsList;
    }
    privateCommentsList = tmp_4;
    newPrivateCommentTextVisible = newPrivateCommentTextVisible === VOID ? false : newPrivateCommentTextVisible;
    activeUserPersonUid = activeUserPersonUid === VOID ? new Long(0, 0) : activeUserPersonUid;
    activeUserSubmitterId = activeUserSubmitterId === VOID ? new Long(0, 0) : activeUserSubmitterId;
    activeUserPersonName = activeUserPersonName === VOID ? '' : activeUserPersonName;
    activeUserPictureUri = activeUserPictureUri === VOID ? null : activeUserPictureUri;
    localDateTimeNow = localDateTimeNow === VOID ? toLocalDateTime(System_instance.sl7(), Companion_getInstance_9().rlb()) : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? emptyMap() : dayOfWeekStrings;
    collapsedSubmissions = collapsedSubmissions === VOID ? emptySet() : collapsedSubmissions;
    openingFileState = openingFileState === VOID ? null : openingFileState;
    showModerateOptions = showModerateOptions === VOID ? false : showModerateOptions;
    this.zsc_1 = submitMarkError;
    this.asd_1 = block;
    this.bsd_1 = gradeFilterChips;
    this.csd_1 = submissionList;
    this.dsd_1 = submissionAttachments;
    this.esd_1 = marks;
    this.fsd_1 = draftMark;
    this.gsd_1 = markSubmissionInProgress;
    this.hsd_1 = markNextStudentVisible;
    this.isd_1 = fieldsEnabled;
    this.jsd_1 = markListSelectedChipId;
    this.ksd_1 = markListFilterOptions;
    this.lsd_1 = privateCommentsList;
    this.msd_1 = newPrivateCommentTextVisible;
    this.nsd_1 = activeUserPersonUid;
    this.osd_1 = activeUserSubmitterId;
    this.psd_1 = activeUserPersonName;
    this.qsd_1 = activeUserPictureUri;
    this.rsd_1 = localDateTimeNow;
    this.ssd_1 = dayOfWeekStrings;
    this.tsd_1 = collapsedSubmissions;
    this.usd_1 = openingFileState;
    this.vsd_1 = showModerateOptions;
  }
  protoOf(ClazzAssignmentSubmitterDetailUiState).csl = function () {
    var tmp;
    if (!this.gsd_1) {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailUiState.<get-markFieldsEnabled>.<anonymous>' call
      var it = this.asd_1;
      var tmp_0;
      if (!((it == null ? null : it.sc9_1) == null)) {
        tmp_0 = !(it.rc9_1 == null);
      } else {
        tmp_0 = false;
      }
      tmp = tmp_0;
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).arv = function () {
    return submissionStatusFor(this.esd_1, this.csd_1);
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).fsl = function () {
    // Inline function 'kotlin.let' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailUiState.<get-averageScore>.<anonymous>' call
    var latestUniqueMarks = _get_latestUniqueMarksByMarker__e0a3pq_0(this);
    // Inline function 'kotlin.collections.sumOf' call
    var sum = 0.0;
    var tmp0_iterator = latestUniqueMarks.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      var tmp = sum;
      // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailUiState.<get-averageScore>.<anonymous>.<anonymous>' call
      var tmp0_safe_receiver = element.obh_1;
      var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ibh_1;
      var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver;
      sum = tmp + (tmp2_elvis_lhs == null ? 0.0 : tmp2_elvis_lhs);
    }
    var tmp_0 = sum;
    // Inline function 'kotlin.math.max' call
    var a = latestUniqueMarks.u();
    return tmp_0 / Math.max(a, 1);
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).gsl = function (mark) {
    return new UstadCourseAssignmentMarkListItemUiState(mark, this.rsd_1, this.ssd_1);
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).hsl = function () {
    var tmp;
    var tmp$ret$0;
    $l$block_0: {
      // Inline function 'kotlin.collections.any' call
      var this_0 = this.esd_1;
      var tmp_0;
      if (isInterface(this_0, Collection)) {
        tmp_0 = this_0.c1();
      } else {
        tmp_0 = false;
      }
      if (tmp_0) {
        tmp$ret$0 = false;
        break $l$block_0;
      }
      var tmp0_iterator = this_0.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailUiState.<get-submitGradeButtonMessageId>.<anonymous>' call
        var tmp0_safe_receiver = element.obh_1;
        if (equals(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.fbh_1, this.osd_1)) {
          tmp$ret$0 = true;
          break $l$block_0;
        }
      }
      tmp$ret$0 = false;
    }
    if (tmp$ret$0) {
      tmp = strings_getInstance().wmc_1;
    } else {
      tmp = strings_getInstance().mm9_1;
    }
    return tmp;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).isl = function () {
    var tmp;
    var tmp$ret$0;
    $l$block_0: {
      // Inline function 'kotlin.collections.any' call
      var this_0 = this.esd_1;
      var tmp_0;
      if (isInterface(this_0, Collection)) {
        tmp_0 = this_0.c1();
      } else {
        tmp_0 = false;
      }
      if (tmp_0) {
        tmp$ret$0 = false;
        break $l$block_0;
      }
      var tmp0_iterator = this_0.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzassignment.submitterdetail.ClazzAssignmentSubmitterDetailUiState.<get-submitGradeButtonAndGoNextMessageId>.<anonymous>' call
        var tmp0_safe_receiver = element.obh_1;
        if (equals(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.fbh_1, this.osd_1)) {
          tmp$ret$0 = true;
          break $l$block_0;
        }
      }
      tmp$ret$0 = false;
    }
    if (tmp$ret$0) {
      tmp = strings_getInstance().xmc_1;
    } else {
      tmp = strings_getInstance().nm9_1;
    }
    return tmp;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).frv = function () {
    var tmp;
    if (this.jsd_1 === 1) {
      // Inline function 'kotlin.collections.sortedByDescending' call
      var this_0 = _get_latestUniqueMarksByMarker__e0a3pq_0(this);
      // Inline function 'kotlin.comparisons.compareByDescending' call
      var tmp_0 = ClazzAssignmentSubmitterDetailUiState$_get_visibleMarks_$lambda_u07plk;
      var tmp$ret$0 = new sam$kotlin_Comparator$0_1(tmp_0);
      tmp = sortedWith(this_0, tmp$ret$0);
    } else {
      tmp = this.esd_1;
    }
    return tmp;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).jsl = function () {
    return hasUpdatedMarks(this.esd_1);
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).ksl = function () {
    // Inline function 'kotlin.collections.isNotEmpty' call
    return !this.esd_1.c1();
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).lsl = function (submitMarkError, block, gradeFilterChips, submissionList, submissionAttachments, marks, draftMark, markSubmissionInProgress, markNextStudentVisible, fieldsEnabled, markListSelectedChipId, markListFilterOptions, privateCommentsList, newPrivateCommentTextVisible, activeUserPersonUid, activeUserSubmitterId, activeUserPersonName, activeUserPictureUri, localDateTimeNow, dayOfWeekStrings, collapsedSubmissions, openingFileState, showModerateOptions) {
    return new ClazzAssignmentSubmitterDetailUiState(submitMarkError, block, gradeFilterChips, submissionList, submissionAttachments, marks, draftMark, markSubmissionInProgress, markNextStudentVisible, fieldsEnabled, markListSelectedChipId, markListFilterOptions, privateCommentsList, newPrivateCommentTextVisible, activeUserPersonUid, activeUserSubmitterId, activeUserPersonName, activeUserPictureUri, localDateTimeNow, dayOfWeekStrings, collapsedSubmissions, openingFileState, showModerateOptions);
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).wsd = function (submitMarkError, block, gradeFilterChips, submissionList, submissionAttachments, marks, draftMark, markSubmissionInProgress, markNextStudentVisible, fieldsEnabled, markListSelectedChipId, markListFilterOptions, privateCommentsList, newPrivateCommentTextVisible, activeUserPersonUid, activeUserSubmitterId, activeUserPersonName, activeUserPictureUri, localDateTimeNow, dayOfWeekStrings, collapsedSubmissions, openingFileState, showModerateOptions, $super) {
    submitMarkError = submitMarkError === VOID ? this.zsc_1 : submitMarkError;
    block = block === VOID ? this.asd_1 : block;
    gradeFilterChips = gradeFilterChips === VOID ? this.bsd_1 : gradeFilterChips;
    submissionList = submissionList === VOID ? this.csd_1 : submissionList;
    submissionAttachments = submissionAttachments === VOID ? this.dsd_1 : submissionAttachments;
    marks = marks === VOID ? this.esd_1 : marks;
    draftMark = draftMark === VOID ? this.fsd_1 : draftMark;
    markSubmissionInProgress = markSubmissionInProgress === VOID ? this.gsd_1 : markSubmissionInProgress;
    markNextStudentVisible = markNextStudentVisible === VOID ? this.hsd_1 : markNextStudentVisible;
    fieldsEnabled = fieldsEnabled === VOID ? this.isd_1 : fieldsEnabled;
    markListSelectedChipId = markListSelectedChipId === VOID ? this.jsd_1 : markListSelectedChipId;
    markListFilterOptions = markListFilterOptions === VOID ? this.ksd_1 : markListFilterOptions;
    privateCommentsList = privateCommentsList === VOID ? this.lsd_1 : privateCommentsList;
    newPrivateCommentTextVisible = newPrivateCommentTextVisible === VOID ? this.msd_1 : newPrivateCommentTextVisible;
    activeUserPersonUid = activeUserPersonUid === VOID ? this.nsd_1 : activeUserPersonUid;
    activeUserSubmitterId = activeUserSubmitterId === VOID ? this.osd_1 : activeUserSubmitterId;
    activeUserPersonName = activeUserPersonName === VOID ? this.psd_1 : activeUserPersonName;
    activeUserPictureUri = activeUserPictureUri === VOID ? this.qsd_1 : activeUserPictureUri;
    localDateTimeNow = localDateTimeNow === VOID ? this.rsd_1 : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? this.ssd_1 : dayOfWeekStrings;
    collapsedSubmissions = collapsedSubmissions === VOID ? this.tsd_1 : collapsedSubmissions;
    openingFileState = openingFileState === VOID ? this.usd_1 : openingFileState;
    showModerateOptions = showModerateOptions === VOID ? this.vsd_1 : showModerateOptions;
    return $super === VOID ? this.lsl(submitMarkError, block, gradeFilterChips, submissionList, submissionAttachments, marks, draftMark, markSubmissionInProgress, markNextStudentVisible, fieldsEnabled, markListSelectedChipId, markListFilterOptions, privateCommentsList, newPrivateCommentTextVisible, activeUserPersonUid, activeUserSubmitterId, activeUserPersonName, activeUserPictureUri, localDateTimeNow, dayOfWeekStrings, collapsedSubmissions, openingFileState, showModerateOptions) : $super.lsl.call(this, submitMarkError, block, gradeFilterChips, submissionList, submissionAttachments, marks, draftMark, markSubmissionInProgress, markNextStudentVisible, fieldsEnabled, markListSelectedChipId, markListFilterOptions, privateCommentsList, newPrivateCommentTextVisible, activeUserPersonUid, activeUserSubmitterId, activeUserPersonName, activeUserPictureUri, localDateTimeNow, dayOfWeekStrings, collapsedSubmissions, openingFileState, showModerateOptions);
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).toString = function () {
    return 'ClazzAssignmentSubmitterDetailUiState(submitMarkError=' + this.zsc_1 + ', block=' + this.asd_1 + ', gradeFilterChips=' + this.bsd_1 + ', submissionList=' + this.csd_1 + ', submissionAttachments=' + this.dsd_1 + ', marks=' + this.esd_1 + ', draftMark=' + this.fsd_1 + ', markSubmissionInProgress=' + this.gsd_1 + ', markNextStudentVisible=' + this.hsd_1 + ', fieldsEnabled=' + this.isd_1 + ', markListSelectedChipId=' + this.jsd_1 + ', markListFilterOptions=' + this.ksd_1 + ', privateCommentsList=' + this.lsd_1 + ', newPrivateCommentTextVisible=' + this.msd_1 + ', activeUserPersonUid=' + this.nsd_1.toString() + ', activeUserSubmitterId=' + this.osd_1.toString() + ', activeUserPersonName=' + this.psd_1 + ', activeUserPictureUri=' + this.qsd_1 + ', localDateTimeNow=' + this.rsd_1 + ', dayOfWeekStrings=' + this.ssd_1 + ', collapsedSubmissions=' + this.tsd_1 + ', openingFileState=' + this.usd_1 + ', showModerateOptions=' + this.vsd_1 + ')';
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).hashCode = function () {
    var result = this.zsc_1 == null ? 0 : getStringHashCode(this.zsc_1);
    result = imul(result, 31) + (this.asd_1 == null ? 0 : this.asd_1.hashCode()) | 0;
    result = imul(result, 31) + hashCode(this.bsd_1) | 0;
    result = imul(result, 31) + hashCode(this.csd_1) | 0;
    result = imul(result, 31) + hashCode(this.dsd_1) | 0;
    result = imul(result, 31) + hashCode(this.esd_1) | 0;
    result = imul(result, 31) + (this.fsd_1 == null ? 0 : hashCode(this.fsd_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.gsd_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.hsd_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.isd_1) | 0;
    result = imul(result, 31) + this.jsd_1 | 0;
    result = imul(result, 31) + hashCode(this.ksd_1) | 0;
    result = imul(result, 31) + hashCode(this.lsd_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.msd_1) | 0;
    result = imul(result, 31) + this.nsd_1.hashCode() | 0;
    result = imul(result, 31) + this.osd_1.hashCode() | 0;
    result = imul(result, 31) + getStringHashCode(this.psd_1) | 0;
    result = imul(result, 31) + (this.qsd_1 == null ? 0 : getStringHashCode(this.qsd_1)) | 0;
    result = imul(result, 31) + this.rsd_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.ssd_1) | 0;
    result = imul(result, 31) + hashCode(this.tsd_1) | 0;
    result = imul(result, 31) + (this.usd_1 == null ? 0 : this.usd_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.vsd_1) | 0;
    return result;
  };
  protoOf(ClazzAssignmentSubmitterDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzAssignmentSubmitterDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzAssignmentSubmitterDetailUiState ? other : THROW_CCE();
    if (!(this.zsc_1 == tmp0_other_with_cast.zsc_1))
      return false;
    if (!equals(this.asd_1, tmp0_other_with_cast.asd_1))
      return false;
    if (!equals(this.bsd_1, tmp0_other_with_cast.bsd_1))
      return false;
    if (!equals(this.csd_1, tmp0_other_with_cast.csd_1))
      return false;
    if (!equals(this.dsd_1, tmp0_other_with_cast.dsd_1))
      return false;
    if (!equals(this.esd_1, tmp0_other_with_cast.esd_1))
      return false;
    if (!equals(this.fsd_1, tmp0_other_with_cast.fsd_1))
      return false;
    if (!(this.gsd_1 === tmp0_other_with_cast.gsd_1))
      return false;
    if (!(this.hsd_1 === tmp0_other_with_cast.hsd_1))
      return false;
    if (!(this.isd_1 === tmp0_other_with_cast.isd_1))
      return false;
    if (!(this.jsd_1 === tmp0_other_with_cast.jsd_1))
      return false;
    if (!equals(this.ksd_1, tmp0_other_with_cast.ksd_1))
      return false;
    if (!equals(this.lsd_1, tmp0_other_with_cast.lsd_1))
      return false;
    if (!(this.msd_1 === tmp0_other_with_cast.msd_1))
      return false;
    if (!this.nsd_1.equals(tmp0_other_with_cast.nsd_1))
      return false;
    if (!this.osd_1.equals(tmp0_other_with_cast.osd_1))
      return false;
    if (!(this.psd_1 === tmp0_other_with_cast.psd_1))
      return false;
    if (!(this.qsd_1 == tmp0_other_with_cast.qsd_1))
      return false;
    if (!this.rsd_1.equals(tmp0_other_with_cast.rsd_1))
      return false;
    if (!equals(this.ssd_1, tmp0_other_with_cast.ssd_1))
      return false;
    if (!equals(this.tsd_1, tmp0_other_with_cast.tsd_1))
      return false;
    if (!equals(this.usd_1, tmp0_other_with_cast.usd_1))
      return false;
    if (!(this.vsd_1 === tmp0_other_with_cast.vsd_1))
      return false;
    return true;
  };
  function assignmentSubmitterNameUseCase$factory() {
    return getPropertyCallableRef('assignmentSubmitterNameUseCase', 1, KProperty1, function (receiver) {
      return _get_assignmentSubmitterNameUseCase__ts4wyt(receiver);
    }, null);
  }
  function openBlobUiUseCase$factory_1() {
    return getPropertyCallableRef('openBlobUiUseCase', 1, KProperty1, function (receiver) {
      return _get_openBlobUiUseCase__fzusqz_0(receiver);
    }, null);
  }
  function submitMarkUseCase$factory() {
    return getPropertyCallableRef('submitMarkUseCase', 1, KProperty1, function (receiver) {
      return _get_submitMarkUseCase__y8b5kx(receiver);
    }, null);
  }
  function assignmentSubmitterNameUseCase$factory_0() {
    return getPropertyCallableRef('assignmentSubmitterNameUseCase', 1, KProperty1, function (receiver) {
      return _get_assignmentSubmitterNameUseCase__ts4wyt(receiver);
    }, null);
  }
  function openBlobUiUseCase$factory_2() {
    return getPropertyCallableRef('openBlobUiUseCase', 1, KProperty1, function (receiver) {
      return _get_openBlobUiUseCase__fzusqz_0(receiver);
    }, null);
  }
  function submitMarkUseCase$factory_0() {
    return getPropertyCallableRef('submitMarkUseCase', 1, KProperty1, function (receiver) {
      return _get_submitMarkUseCase__y8b5kx(receiver);
    }, null);
  }
  function ClazzMemberListViewModel$slambda$slambda$slambda$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.gpa_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.clazzmemberlist.ClazzMemberListViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.zsl(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzMemberListViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.ism_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda$slambda).ksm = function (nameAndTerminology, $completion) {
    var tmp = this.lsm(nameAndTerminology, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.ksm((p1 == null ? true : p1 instanceof ClazzNameAndTerminology) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp1_currentTerminologyStrings = this.ism_1.gpa_1.t2().wsl_1;
          var tmp0_safe_receiver = this.jsm_1;
          var tmp2_terminology = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.w8k_1;
          var tmp3_json = this.ism_1.z4q();
          var tmp4_systemImpl = this.ism_1.jp2();
          parseAndUpdateTerminologyStringsIfNeeded(tmp1_currentTerminologyStrings, tmp2_terminology, tmp4_systemImpl, tmp3_json, ClazzMemberListViewModel$slambda$slambda$slambda$slambda$lambda(this.ism_1));
          l$ret$1: do {
            var this_0 = this.ism_1.pp1_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp0_safe_receiver_0 = this.jsm_1;
              var tmp1_elvis_lhs = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.v8k_1;
              var nextValue = prevValue.nol(VOID, VOID, tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda$slambda).lsm = function (nameAndTerminology, completion) {
    var i = new ClazzMemberListViewModel$slambda$slambda$slambda$slambda(this.ism_1, completion);
    i.jsm_1 = nameAndTerminology;
    return i;
  };
  function ClazzMemberListViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzMemberListViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (nameAndTerminology, $completion) {
      return i.ksm(nameAndTerminology, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzMemberListViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.usm_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda$slambda_1).yr6 = function (it, $completion) {
    var tmp = this.zr6(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.yr6(p1 instanceof PermissionPair ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.usm_1.gpa_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.zsl(VOID, VOID, VOID, this.vsm_1.ed8_1, this.vsm_1.fd8_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda$slambda_1).zr6 = function (it, completion) {
    var i = new ClazzMemberListViewModel$slambda$slambda$slambda$slambda_1(this.usm_1, completion);
    i.vsm_1 = it;
    return i;
  };
  function ClazzMemberListViewModel$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzMemberListViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.yr6(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzMemberListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.esn_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.esn_1.fp2().b7d().d8c(this.esn_1.hso_1);
            var tmp_1 = ClazzMemberListViewModel$slambda$slambda$slambda$slambda_0(this.esn_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_18(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzMemberListViewModel$slambda$slambda$slambda(this.esn_1, completion);
    i.fsn_1 = $this$launch;
    return i;
  };
  function ClazzMemberListViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzMemberListViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzMemberListViewModel$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.tso_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.tso_1.ep2().b7f();
            var tmp_1 = this.tso_1.dp2();
            PermissionFlags_getInstance();
            var tmp_2 = new Long(16, 0);
            PermissionFlags_getInstance();
            var tmp_3 = distinctUntilChanged(tmp_0.dd5(tmp_1, this.tso_1.hso_1, tmp_2, new Long(8, 0)));
            var tmp_4 = ClazzMemberListViewModel$slambda$slambda$slambda$slambda_2(this.tso_1, null);
            suspendResult = tmp_3.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_18(tmp_4), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new ClazzMemberListViewModel$slambda$slambda$slambda_1(this.tso_1, completion);
    i.uso_1 = $this$launch;
    return i;
  };
  function ClazzMemberListViewModel$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzMemberListViewModel$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzMemberListViewModel$slambda$slambda($this_launch, this$0, resultContinuation) {
    this.dsp_1 = $this_launch;
    this.esp_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$slambda$slambda).m86 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda).z77 = function ($completion) {
    return this.m86($completion);
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.dsp_1, VOID, VOID, ClazzMemberListViewModel$slambda$slambda$slambda_0(this.esp_1, null));
          launch(this.dsp_1, VOID, VOID, ClazzMemberListViewModel$slambda$slambda$slambda_2(this.esp_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzMemberListViewModel$slambda$slambda).y77 = function (completion) {
    return new ClazzMemberListViewModel$slambda$slambda(this.dsp_1, this.esp_1, completion);
  };
  function ClazzMemberListViewModel$slambda$slambda_0($this_launch, this$0, resultContinuation) {
    var i = new ClazzMemberListViewModel$slambda$slambda($this_launch, this$0, resultContinuation);
    var l = function ($completion) {
      return i.m86($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda(this$0, resultContinuation) {
    this.nsp_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda).mpq = function (it, $completion) {
    var tmp = this.gmp(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda).he = function (p1, $completion) {
    return this.mpq(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.osp_1.b7d().v8b(this.nsp_1.hso_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp0_safe_receiver = suspendResult;
            return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.r8d_1;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda).gmp = function (it, completion) {
    var i = new ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda(this.nsp_1, completion);
    i.osp_1 = it;
    return i;
  };
  function ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.mpq(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_approveOrDeclinePendingEnrolmentUseCase__jyai0d($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.gso_1;
    approveOrDeclinePendingEnrolmentUseCase$factory_0();
    return this_0.t2();
  }
  function getMembersAsPagingSource($this, roleId) {
    var tmp0_$this = $this.fp2().g7d();
    var tmp1_clazzUid = $this.hso_1;
    var tmp2_sortOrder = $this.gpa_1.t2().ssl_1.lor_1;
    var tmp3_filter = $this.gpa_1.t2().usl_1;
    var tmp4_searchText = toQueryLikeParam($this.pp1_1.t2().fol_1.uok_1);
    var tmp5_accountPersonUid = $this.dp2();
    var tmp6_currentTime = systemTimeInMillis();
    PermissionFlags_getInstance();
    var tmp7_permission = new Long(8192, 0);
    return tmp0_$this.l92(tmp1_clazzUid, roleId, tmp2_sortOrder, tmp4_searchText, tmp3_filter, tmp5_accountPersonUid, tmp6_currentTime, tmp7_permission);
  }
  function Companion_119() {
    this.psp_1 = 'CourseMembers';
  }
  var Companion_instance_167;
  function Companion_getInstance_136() {
    return Companion_instance_167;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_18(function_0) {
    this.qsp_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_18).t1d = function (value, $completion) {
    return this.qsp_1(value, $completion);
  };
  function ClazzMemberListViewModel$teacherListPagingSource$lambda(this$0) {
    return function () {
      return getMembersAsPagingSource(this$0, 1001);
    };
  }
  function ClazzMemberListViewModel$studentListPagingSource$lambda(this$0) {
    return function () {
      return getMembersAsPagingSource(this$0, 1000);
    };
  }
  function ClazzMemberListViewModel$pendingStudentListPagingSource$lambda(this$0) {
    return function () {
      var tmp0_$this = this$0.fp2().a7f();
      var tmp1_clazzUid = this$0.hso_1;
      var tmp2_searchText = toQueryLikeParam(this$0.pp1_1.t2().fol_1.uok_1);
      var tmp4_sortOrder = this$0.gpa_1.t2().ssl_1.lor_1;
      return tmp0_$this.sei(tmp1_clazzUid, false, 1, tmp2_searchText, tmp4_sortOrder);
    };
  }
  function ClazzMemberListViewModel$slambda(this$0, resultContinuation) {
    this.zsp_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzMemberListViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzMemberListViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.zsp_1.gpa_1, ClazzMemberListViewModel$slambda$slambda_0(this.asq_1, this.zsp_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzMemberListViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzMemberListViewModel$slambda(this.zsp_1, completion);
    i.asq_1 = $this$launch;
    return i;
  };
  function ClazzMemberListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzMemberListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzMemberListViewModel$onClickRespondToPendingEnrolment$slambda(this$0, $enrolmentDetails, $approved, resultContinuation) {
    this.jsq_1 = this$0;
    this.ksq_1 = $enrolmentDetails;
    this.lsq_1 = $approved;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$onClickRespondToPendingEnrolment$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzMemberListViewModel$onClickRespondToPendingEnrolment$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzMemberListViewModel$onClickRespondToPendingEnrolment$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = _get_approveOrDeclinePendingEnrolmentUseCase__jyai0d(this.jsq_1).unm(this.ksq_1, this.lsq_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp_0 = this.jsq_1.hp2();
            var tmp_1 = this.jsq_1.jp2();
            var tmp_2 = this.lsq_1 ? strings_getInstance().bmg_1 : strings_getInstance().cmg_1;
            var tmp0_elvis_lhs = this.ksq_1.lej_1;
            tmp_0.com(new Snack(tmp_1.fn6(tmp_2, [tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs])));
            this.id_1 = 3;
            this.hd_1 = 4;
            continue $sm;
          case 2:
            this.id_1 = 3;
            var tmp_3 = this.kd_1;
            if (tmp_3 instanceof Error) {
              var e = this.kd_1;
              var tmp_4 = this.jsq_1.hp2();
              var tmp_5 = this.jsq_1.jp2().en6(strings_getInstance().glc_1);
              var tmp1_elvis_lhs = e.message;
              tmp_4.com(new Snack(tmp_5 + (tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs)));
              this.hd_1 = 4;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 3:
            throw this.kd_1;
          case 4:
            this.id_1 = 3;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 3) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(ClazzMemberListViewModel$onClickRespondToPendingEnrolment$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzMemberListViewModel$onClickRespondToPendingEnrolment$slambda(this.jsq_1, this.ksq_1, this.lsq_1, completion);
    i.msq_1 = $this$launch;
    return i;
  };
  function ClazzMemberListViewModel$onClickRespondToPendingEnrolment$slambda_0(this$0, $enrolmentDetails, $approved, resultContinuation) {
    var i = new ClazzMemberListViewModel$onClickRespondToPendingEnrolment$slambda(this$0, $enrolmentDetails, $approved, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzMemberListViewModel$onClickAddNewMember$slambda(this$0, $role, resultContinuation) {
    this.vsq_1 = this$0;
    this.wsq_1 = $role;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzMemberListViewModel$onClickAddNewMember$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzMemberListViewModel$onClickAddNewMember$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzMemberListViewModel$onClickAddNewMember$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            var this_0 = this.vsq_1.fp2();
            var tmp_1;
            if (this.wsq_1 === 1000) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            tmp_0.ysq_1 = tmp_1;
            if (this.ysq_1 == null) {
              this.zsq_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = localFirstThenRepoIfNull(this.ysq_1, ClazzMemberListViewModel$onClickAddNewMember$slambda$slambda_0(this.vsq_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.zsq_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            var clazzCode = this.zsq_1;
            var tmp_2;
            if (this.wsq_1 === 1000) {
              tmp_2 = strings_getInstance().clf_1;
            } else {
              tmp_2 = strings_getInstance().olr_1;
            }

            var titleStringResource = tmp_2;
            var tmp1_safe_receiver = this.vsq_1.gpa_1.t2().wsl_1;
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.hon(titleStringResource);
            var title = tmp2_elvis_lhs == null ? this.vsq_1.jp2().en6(titleStringResource) : tmp2_elvis_lhs;
            Companion_getInstance_102();
            var tmp_3 = to('clazzUid', this.vsq_1.hso_1.toString());
            Companion_getInstance_102();
            var tmp_4 = to('popUpToOnFinish', this.vsq_1.mp1_1);
            var goToOnPersonSelectedArg = appendQueryArgs('EnrolmentEdit', mapOf([tmp_3, tmp_4, to('role', this.wsq_1.toString())]));
            var this_1 = LinkedHashMap_init_$Create$();
            Companion_getInstance_180();
            this_1.s('exlcudeFromClazz', this.vsq_1.hso_1.toString());
            Companion_getInstance_102();
            this_1.s('listMode', ListViewMode_PICKER_getInstance().ooy_1);
            this_1.s('goToOnPersonSelected', goToOnPersonSelectedArg);
            Companion_getInstance_112();
            this_1.s('t', title);
            Companion_getInstance_180();
            PermissionFlags_getInstance();
            this_1.s('rptsl', (new Long(2048, 0)).toString());
            if (!(clazzCode == null)) {
              Companion_getInstance_180();
              this_1.s('showAddViaInviteLink', clazzCode);
            }

            var args = this_1.f3();
            Companion_getInstance_180();
            this.vsq_1.np1_1.sns('People', args);
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzMemberListViewModel$onClickAddNewMember$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzMemberListViewModel$onClickAddNewMember$slambda(this.vsq_1, this.wsq_1, completion);
    i.xsq_1 = $this$launch;
    return i;
  };
  function ClazzMemberListViewModel$onClickAddNewMember$slambda_0(this$0, $role, resultContinuation) {
    var i = new ClazzMemberListViewModel$onClickAddNewMember$slambda(this$0, $role, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzMemberListViewModel(di, savedStateHandle) {
    var tmp = new ClazzMemberListUiState();
    UstadListViewModel.call(this, di, savedStateHandle, tmp, 'Course');
    var tmp_0 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = this.bp2().xmx();
    var trigger = this.q56();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_1 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    var tmp$ret$1 = tmp_1.u56(tmp$ret$0, context);
    var this_0 = On(this, tmp$ret$1, trigger);
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(IApproveOrDeclinePendingEnrolmentRequestUseCase), arrayOf([]), false));
    var tmp$ret$3 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    tmp_0.gso_1 = Instance(this_0, tmp$ret$3, null).n5c(this, approveOrDeclinePendingEnrolmentUseCase$factory());
    var tmp_4 = this;
    Companion_getInstance_102();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    var tmp_5;
    if (tmp1_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('No clazzuid');
    } else {
      tmp_5 = tmp1_elvis_lhs;
    }
    tmp_4.hso_1 = tmp_5;
    var tmp_6 = this;
    tmp_6.iso_1 = ClazzMemberListViewModel$teacherListPagingSource$lambda(this);
    var tmp_7 = this;
    tmp_7.jso_1 = ClazzMemberListViewModel$studentListPagingSource$lambda(this);
    var tmp_8 = this;
    tmp_8.kso_1 = ClazzMemberListViewModel$pendingStudentListPagingSource$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.gpa_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.clazzmemberlist.ClazzMemberListViewModel.<anonymous>' call
        // Inline function 'kotlin.collections.associateWith' call
        var this_2 = values();
        var result = LinkedHashMap_init_$Create$_0(coerceAtLeast(mapCapacity(this_2.length), 16));
        // Inline function 'kotlin.collections.associateWithTo' call
        var inductionVariable = 0;
        var last = this_2.length;
        while (inductionVariable < last) {
          var element = this_2[inductionVariable];
          inductionVariable = inductionVariable + 1 | 0;
          // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.clazzmemberlist.ClazzMemberListViewModel.<anonymous>.<anonymous>' call
          var tmp$ret$5 = this.jp2().en6(get_dayStringResource(element));
          result.s(element, tmp$ret$5);
        }
        var nextValue = prevValue.zsl(this.jso_1, this.iso_1, this.kso_1, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, result);
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_3 = this.pp1_1;
      while (true) {
        var prevValue_0 = this_3.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.clazzmemberlist.ClazzMemberListViewModel.<anonymous>' call
        var nextValue_0 = prevValue_0.nol(VOID, VOID, VOID, true, VOID, VOID, VOID, this.ppb(), new ActionBarButtonUiState(false));
        if (this_3.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_9 = this.cp2();
    launch(tmp_9, VOID, VOID, ClazzMemberListViewModel$slambda_0(this, null));
  }
  protoOf(ClazzMemberListViewModel).apb = function (searchText) {
    this.ipa_1.i1h(new RefreshCommand());
  };
  protoOf(ClazzMemberListViewModel).bpb = function () {
  };
  protoOf(ClazzMemberListViewModel).aqz = function (filterOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.gpa_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.clazzmemberlist.ClazzMemberListViewModel.onClickFilterChip.<anonymous>' call
        var nextValue = prevValue.zsl(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, filterOption.qom_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.ipa_1.i1h(new RefreshCommand());
  };
  protoOf(ClazzMemberListViewModel).asr = function (enrolmentDetails, approved) {
    var tmp = this.cp2();
    launch(tmp, VOID, VOID, ClazzMemberListViewModel$onClickRespondToPendingEnrolment$slambda_0(this, enrolmentDetails, approved, null));
  };
  protoOf(ClazzMemberListViewModel).bsr = function (role) {
    var tmp = this.cp2();
    launch(tmp, VOID, VOID, ClazzMemberListViewModel$onClickAddNewMember$slambda_0(this, role, null));
  };
  protoOf(ClazzMemberListViewModel).csr = function (entry) {
    Companion_getInstance_102();
    var tmp0_safe_receiver = entry.a95_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.f95_1;
    var tmp = to('personUid', (tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs).toString());
    Companion_getInstance_102();
    this.np1_1.sns('CourseEnrolments', mapOf([tmp, to('clazzUid', this.hso_1.toString())]));
  };
  protoOf(ClazzMemberListViewModel).zqy = function (sortOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.gpa_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.clazzmemberlist.ClazzMemberListViewModel.onSortOrderChanged.<anonymous>' call
        var nextValue = prevValue.zsl(VOID, VOID, VOID, VOID, VOID, VOID, sortOption);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.ipa_1.i1h(new RefreshCommand());
  };
  function ClazzMemberListUiState$_init_$lambda_dc27oi() {
    return new EmptyPagingSource();
  }
  function ClazzMemberListUiState$_init_$lambda_dc27oi_0() {
    return new EmptyPagingSource();
  }
  function ClazzMemberListUiState$_init_$lambda_dc27oi_1() {
    return new EmptyPagingSource();
  }
  function ClazzMemberListUiState(studentList, teacherList, pendingStudentList, addTeacherVisible, addStudentVisible, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, filterOptions, terminologyStrings, localDateTimeNow, dayOfWeekStrings) {
    var tmp;
    if (studentList === VOID) {
      tmp = ClazzMemberListUiState$_init_$lambda_dc27oi;
    } else {
      tmp = studentList;
    }
    studentList = tmp;
    var tmp_0;
    if (teacherList === VOID) {
      tmp_0 = ClazzMemberListUiState$_init_$lambda_dc27oi_0;
    } else {
      tmp_0 = teacherList;
    }
    teacherList = tmp_0;
    var tmp_1;
    if (pendingStudentList === VOID) {
      tmp_1 = ClazzMemberListUiState$_init_$lambda_dc27oi_1;
    } else {
      tmp_1 = pendingStudentList;
    }
    pendingStudentList = tmp_1;
    addTeacherVisible = addTeacherVisible === VOID ? false : addTeacherVisible;
    addStudentVisible = addStudentVisible === VOID ? false : addStudentVisible;
    var tmp_2;
    if (sortOptions === VOID) {
      var tmp_3 = strings_getInstance().qld_1;
      var tmp_4 = new SortOrderOption(tmp_3, 1, true);
      var tmp_5 = strings_getInstance().qld_1;
      var tmp_6 = new SortOrderOption(tmp_5, 2, false);
      var tmp_7 = strings_getInstance().pld_1;
      var tmp_8 = new SortOrderOption(tmp_7, 3, true);
      var tmp_9 = strings_getInstance().pld_1;
      var tmp_10 = new SortOrderOption(tmp_9, 4, false);
      var tmp_11 = strings_getInstance().ilq_1;
      var tmp_12 = new SortOrderOption(tmp_11, 7, true);
      var tmp_13 = strings_getInstance().ilq_1;
      var tmp_14 = new SortOrderOption(tmp_13, 8, false);
      var tmp_15 = strings_getInstance().jlq_1;
      var tmp_16 = new SortOrderOption(tmp_15, 9, true);
      var tmp_17 = strings_getInstance().jlq_1;
      tmp_2 = listOf([tmp_4, tmp_6, tmp_8, tmp_10, tmp_12, tmp_14, tmp_16, new SortOrderOption(tmp_17, 10, false)]);
    } else {
      tmp_2 = sortOptions;
    }
    sortOptions = tmp_2;
    activeSortOrderOption = activeSortOrderOption === VOID ? first_0(sortOptions) : activeSortOrderOption;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    var tmp_18;
    if (selectedChipId === VOID) {
      tmp_18 = 1;
    } else {
      tmp_18 = selectedChipId;
    }
    selectedChipId = tmp_18;
    var tmp_19;
    if (filterOptions === VOID) {
      var tmp_20 = strings_getInstance().zls_1;
      tmp_19 = listOf([new MessageIdOption2(tmp_20, 1), new MessageIdOption2(strings_getInstance().sls_1, 0)]);
    } else {
      tmp_19 = filterOptions;
    }
    filterOptions = tmp_19;
    terminologyStrings = terminologyStrings === VOID ? null : terminologyStrings;
    localDateTimeNow = localDateTimeNow === VOID ? toLocalDateTime(System_instance.sl7(), Companion_getInstance_9().rlb()) : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? emptyMap() : dayOfWeekStrings;
    this.msl_1 = studentList;
    this.nsl_1 = teacherList;
    this.osl_1 = pendingStudentList;
    this.psl_1 = addTeacherVisible;
    this.qsl_1 = addStudentVisible;
    this.rsl_1 = sortOptions;
    this.ssl_1 = activeSortOrderOption;
    this.tsl_1 = fieldsEnabled;
    this.usl_1 = selectedChipId;
    this.vsl_1 = filterOptions;
    this.wsl_1 = terminologyStrings;
    this.xsl_1 = localDateTimeNow;
    this.ysl_1 = dayOfWeekStrings;
  }
  protoOf(ClazzMemberListUiState).dsr = function (studentList, teacherList, pendingStudentList, addTeacherVisible, addStudentVisible, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, filterOptions, terminologyStrings, localDateTimeNow, dayOfWeekStrings) {
    return new ClazzMemberListUiState(studentList, teacherList, pendingStudentList, addTeacherVisible, addStudentVisible, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, filterOptions, terminologyStrings, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(ClazzMemberListUiState).zsl = function (studentList, teacherList, pendingStudentList, addTeacherVisible, addStudentVisible, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, filterOptions, terminologyStrings, localDateTimeNow, dayOfWeekStrings, $super) {
    studentList = studentList === VOID ? this.msl_1 : studentList;
    teacherList = teacherList === VOID ? this.nsl_1 : teacherList;
    pendingStudentList = pendingStudentList === VOID ? this.osl_1 : pendingStudentList;
    addTeacherVisible = addTeacherVisible === VOID ? this.psl_1 : addTeacherVisible;
    addStudentVisible = addStudentVisible === VOID ? this.qsl_1 : addStudentVisible;
    sortOptions = sortOptions === VOID ? this.rsl_1 : sortOptions;
    activeSortOrderOption = activeSortOrderOption === VOID ? this.ssl_1 : activeSortOrderOption;
    fieldsEnabled = fieldsEnabled === VOID ? this.tsl_1 : fieldsEnabled;
    selectedChipId = selectedChipId === VOID ? this.usl_1 : selectedChipId;
    filterOptions = filterOptions === VOID ? this.vsl_1 : filterOptions;
    terminologyStrings = terminologyStrings === VOID ? this.wsl_1 : terminologyStrings;
    localDateTimeNow = localDateTimeNow === VOID ? this.xsl_1 : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? this.ysl_1 : dayOfWeekStrings;
    return $super === VOID ? this.dsr(studentList, teacherList, pendingStudentList, addTeacherVisible, addStudentVisible, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, filterOptions, terminologyStrings, localDateTimeNow, dayOfWeekStrings) : $super.dsr.call(this, studentList, teacherList, pendingStudentList, addTeacherVisible, addStudentVisible, sortOptions, activeSortOrderOption, fieldsEnabled, selectedChipId, filterOptions, terminologyStrings, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(ClazzMemberListUiState).toString = function () {
    return 'ClazzMemberListUiState(studentList=' + this.msl_1 + ', teacherList=' + this.nsl_1 + ', pendingStudentList=' + this.osl_1 + ', addTeacherVisible=' + this.psl_1 + ', addStudentVisible=' + this.qsl_1 + ', sortOptions=' + this.rsl_1 + ', activeSortOrderOption=' + this.ssl_1 + ', fieldsEnabled=' + this.tsl_1 + ', selectedChipId=' + this.usl_1 + ', filterOptions=' + this.vsl_1 + ', terminologyStrings=' + this.wsl_1 + ', localDateTimeNow=' + this.xsl_1 + ', dayOfWeekStrings=' + this.ysl_1 + ')';
  };
  protoOf(ClazzMemberListUiState).hashCode = function () {
    var result = hashCode(this.msl_1);
    result = imul(result, 31) + hashCode(this.nsl_1) | 0;
    result = imul(result, 31) + hashCode(this.osl_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.psl_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.qsl_1) | 0;
    result = imul(result, 31) + hashCode(this.rsl_1) | 0;
    result = imul(result, 31) + this.ssl_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.tsl_1) | 0;
    result = imul(result, 31) + this.usl_1 | 0;
    result = imul(result, 31) + hashCode(this.vsl_1) | 0;
    result = imul(result, 31) + (this.wsl_1 == null ? 0 : this.wsl_1.hashCode()) | 0;
    result = imul(result, 31) + this.xsl_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.ysl_1) | 0;
    return result;
  };
  protoOf(ClazzMemberListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzMemberListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzMemberListUiState ? other : THROW_CCE();
    if (!equals(this.msl_1, tmp0_other_with_cast.msl_1))
      return false;
    if (!equals(this.nsl_1, tmp0_other_with_cast.nsl_1))
      return false;
    if (!equals(this.osl_1, tmp0_other_with_cast.osl_1))
      return false;
    if (!(this.psl_1 === tmp0_other_with_cast.psl_1))
      return false;
    if (!(this.qsl_1 === tmp0_other_with_cast.qsl_1))
      return false;
    if (!equals(this.rsl_1, tmp0_other_with_cast.rsl_1))
      return false;
    if (!this.ssl_1.equals(tmp0_other_with_cast.ssl_1))
      return false;
    if (!(this.tsl_1 === tmp0_other_with_cast.tsl_1))
      return false;
    if (!(this.usl_1 === tmp0_other_with_cast.usl_1))
      return false;
    if (!equals(this.vsl_1, tmp0_other_with_cast.vsl_1))
      return false;
    if (!equals(this.wsl_1, tmp0_other_with_cast.wsl_1))
      return false;
    if (!this.xsl_1.equals(tmp0_other_with_cast.xsl_1))
      return false;
    if (!equals(this.ysl_1, tmp0_other_with_cast.ysl_1))
      return false;
    return true;
  };
  function approveOrDeclinePendingEnrolmentUseCase$factory() {
    return getPropertyCallableRef('approveOrDeclinePendingEnrolmentUseCase', 1, KProperty1, function (receiver) {
      return _get_approveOrDeclinePendingEnrolmentUseCase__jyai0d(receiver);
    }, null);
  }
  function approveOrDeclinePendingEnrolmentUseCase$factory_0() {
    return getPropertyCallableRef('approveOrDeclinePendingEnrolmentUseCase', 1, KProperty1, function (receiver) {
      return _get_approveOrDeclinePendingEnrolmentUseCase__jyai0d(receiver);
    }, null);
  }
  function ClazzEnrolmentEditViewModel$slambda$slambda(this$0, resultContinuation) {
    this.msr_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda).qsr = function (db, $completion) {
    var tmp = this.gmp(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.qsr(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            var this_0 = this.nsr_1.g7d();
            var tmp_1;
            if (!this.msr_1.rp7_1.equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            tmp_0.osr_1 = tmp_1;
            if (this.osr_1 == null) {
              this.psr_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.osr_1.h92(this.msr_1.rp7_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.psr_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.psr_1;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda).gmp = function (db, completion) {
    var i = new ClazzEnrolmentEditViewModel$slambda$slambda(this.msr_1, completion);
    i.nsr_1 = db;
    return i;
  };
  function ClazzEnrolmentEditViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzEnrolmentEditViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.qsr(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentEditViewModel$slambda$slambda_1($savedStateHandle, this$0, resultContinuation) {
    this.zsr_1 = $savedStateHandle;
    this.ass_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda_1).dss = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda_1).z77 = function ($completion) {
    return this.dss($completion);
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.bss_1 = new ClazzEnrolmentWithLeavingReason();
            var tmp_1 = this;
            tmp_1.css_1 = this.bss_1;
            var tmp_2 = this.css_1;
            Companion_getInstance_102();
            var tmp0_safe_receiver = this.zsr_1.ba('clazzUid');
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
            var tmp_3;
            if (tmp1_elvis_lhs == null) {
              throw IllegalArgumentException_init_$Create$('No clazzUid for enrolment!');
            } else {
              tmp_3 = tmp1_elvis_lhs;
            }

            tmp_2.g8h_1 = tmp_3;
            var tmp_4 = this.css_1;
            Companion_getInstance_102();
            var tmp2_safe_receiver = this.zsr_1.ba('personUid');
            var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : toLong_0(tmp2_safe_receiver);
            var tmp_5;
            if (tmp3_elvis_lhs == null) {
              throw IllegalArgumentException_init_$Create$('No personuid for enrolment!');
            } else {
              tmp_5 = tmp3_elvis_lhs;
            }

            tmp_4.f8h_1 = tmp_5;
            this.css_1.h8h_1 = systemTimeInMillis();
            var tmp_6 = this.css_1;
            var tmp4_safe_receiver = this.zsr_1.ba('role');
            var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : toInt(tmp4_safe_receiver);
            var tmp_7;
            if (tmp5_elvis_lhs == null) {
              tmp_7 = 1000;
            } else {
              tmp_7 = tmp5_elvis_lhs;
            }

            tmp_6.j8h_1 = tmp_7;
            this.hd_1 = 1;
            suspendResult = this.ass_1.fp2().b7d().f8c(this.css_1.g8h_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp6_elvis_lhs = suspendResult;
            var tmp_8;
            if (tmp6_elvis_lhs == null) {
              throw IllegalStateException_init_$Create$('Could not find timezone for clazzUid');
            } else {
              tmp_8 = tmp6_elvis_lhs;
            }

            var ARGUMENT = tmp_8;
            this.css_1.s93_1 = ARGUMENT;
            return this.bss_1;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda_1).y77 = function (completion) {
    return new ClazzEnrolmentEditViewModel$slambda$slambda_1(this.zsr_1, this.ass_1, completion);
  };
  function ClazzEnrolmentEditViewModel$slambda$slambda_2($savedStateHandle, this$0, resultContinuation) {
    var i = new ClazzEnrolmentEditViewModel$slambda$slambda_1($savedStateHandle, this$0, resultContinuation);
    var l = function ($completion) {
      return i.dss($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzEnrolmentEditViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.bst_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.edit.ClazzEnrolmentEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.lst(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzEnrolmentEditViewModel$slambda$slambda_3(this$0, resultContinuation) {
    this.ust_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda_3).wst = function ($this$async, $completion) {
    var tmp = this.v1m($this$async, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda_3).he = function (p1, $completion) {
    return this.wst((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.ust_1.fp2().d7d();
            var tmp0_safe_receiver = this.ust_1.bst_1.t2().est_1;
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.g8h_1;
            suspendResult = tmp_0.bds(tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda$slambda_3).v1m = function ($this$async, completion) {
    var i = new ClazzEnrolmentEditViewModel$slambda$slambda_3(this.ust_1, completion);
    i.vst_1 = $this$async;
    return i;
  };
  function ClazzEnrolmentEditViewModel$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzEnrolmentEditViewModel$slambda$slambda_3(this$0, resultContinuation);
    var l = function ($this$async, $completion) {
      return i.wst($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.cqf();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function _get_enrolIntoCourseUseCase__jh2n4b($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.dst_1;
    enrolIntoCourseUseCase$factory_0();
    return this_0.t2();
  }
  function hasErrors_1(_this__u8e3s4, $this) {
    return (!(_this__u8e3s4.fst_1 == null) ? true : !(_this__u8e3s4.gst_1 == null)) ? true : !(_this__u8e3s4.hst_1 == null);
  }
  function Companion_120() {
    this.xst_1 = 'EnrolmentEdit';
    this.yst_1 = 'role';
  }
  var Companion_instance_168;
  function Companion_getInstance_137() {
    return Companion_instance_168;
  }
  function ClazzEnrolmentEditViewModel$slambda(this$0, resultContinuation) {
    this.hsu_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentEditViewModel$slambda).oqh = function (db, $completion) {
    var tmp = this.gmp(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda).he = function (p1, $completion) {
    return this.oqh(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.isu_1.b7f().bd5(this.hsu_1.dp2(), this.hsu_1.rp7_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda).gmp = function (db, completion) {
    var i = new ClazzEnrolmentEditViewModel$slambda(this.hsu_1, completion);
    i.isu_1 = db;
    return i;
  };
  function ClazzEnrolmentEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzEnrolmentEditViewModel$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.oqh(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentEditViewModel$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.rsu_1 = this$0;
    this.ssu_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentEditViewModel$slambda_1).u1m = function ($this$launchIfHasPermission, $completion) {
    var tmp = this.v1m($this$launchIfHasPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            var tmp_0 = Companion_instance_34.a4r();
            var tmp_1 = ClazzEnrolmentEditViewModel$slambda$slambda_0(this.rsu_1, null);
            var tmp_2 = ClazzEnrolmentEditViewModel$slambda$slambda_2(this.ssu_1, this.rsu_1, null);
            suspendResult = this.rsu_1.tp2(tmp_0, VOID, VOID, tmp_1, tmp_2, ClazzEnrolmentEditViewModel$slambda$lambda(this.rsu_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            var tmp_3 = this.rsu_1.ep2().b7f();
            var tmp_4 = this.rsu_1.dp2();
            var tmp0_safe_receiver = this.rsu_1.bst_1.t2().est_1;
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.g8h_1;
            var tmp_5 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
            PermissionFlags_getInstance();
            var tmp_6 = new Long(8, 0);
            PermissionFlags_getInstance();
            suspendResult = tmp_3.ed5(tmp_4, tmp_5, tmp_6, new Long(16, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.usu_1 = suspendResult;
            this.vsu_1 = this.usu_1.y6();
            this.wsu_1 = this.usu_1.z6();
            var tmp_7 = this;
            tmp_7.xsu_1 = async(this.tsu_1, VOID, VOID, ClazzEnrolmentEditViewModel$slambda$slambda_4(this.rsu_1, null));
            var tmp_8 = this;
            var this_0 = ArrayList_init_$Create$();
            if (this.vsu_1) {
              this_0.i1(1000);
            }

            if (this.wsu_1) {
              this_0.i1(1001);
            }

            tmp_8.ysu_1 = this_0.f3();
            this.hd_1 = 3;
            suspendResult = this.xsu_1.nv(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            var tmp3_safe_receiver = suspendResult;
            var tmp_9;
            if (tmp3_safe_receiver == null) {
              tmp_9 = null;
            } else {
              tmp_9 = CourseTerminologyStrings_init_$Create$(tmp3_safe_receiver, this.rsu_1.jp2(), this.rsu_1.z4q());
            }

            var terminologyStrings = tmp_9;
            l$ret$1: do {
              var this_1 = this.rsu_1.bst_1;
              while (true) {
                var prevValue = this_1.t2();
                var nextValue = prevValue.lst(VOID, VOID, VOID, VOID, true, terminologyStrings, this.ysu_1);
                if (this_1.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_2 = this.rsu_1.pp1_1;
              while (true) {
                var prevValue_0 = this_2.t2();
                var tmp_10 = Companion_getInstance_85().vol_1;
                var tmp_11 = this.rsu_1.jp2().en6(strings_getInstance().alw_1);
                var nextValue_0 = prevValue_0.nol(VOID, tmp_10, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_11, VOID, ClazzEnrolmentEditViewModel$onClickSave$ref(this.rsu_1)));
                if (this_2.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentEditViewModel$slambda_1).v1m = function ($this$launchIfHasPermission, completion) {
    var i = new ClazzEnrolmentEditViewModel$slambda_1(this.rsu_1, this.ssu_1, completion);
    i.tsu_1 = $this$launchIfHasPermission;
    return i;
  };
  function ClazzEnrolmentEditViewModel$slambda_2(this$0, $savedStateHandle, resultContinuation) {
    var i = new ClazzEnrolmentEditViewModel$slambda_1(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launchIfHasPermission, $completion) {
      return i.u1m($this$launchIfHasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.hsv_1 = $commitDelay;
    this.isv_1 = $entity;
    this.jsv_1 = $this;
    this.ksv_1 = $key;
    this.lsv_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentEditViewModel$onEntityChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentEditViewModel$onEntityChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentEditViewModel$onEntityChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.hsv_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.isv_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.jsv_1.pp2(this.jsv_1.lp1_1, this.ksv_1, this.lsv_1, this.isv_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentEditViewModel$onEntityChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzEnrolmentEditViewModel$onEntityChanged$slambda(this.hsv_1, this.isv_1, this.jsv_1, this.ksv_1, this.lsv_1, completion);
    i.msv_1 = $this$launch;
    return i;
  };
  function ClazzEnrolmentEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new ClazzEnrolmentEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentEditViewModel$onClickSave$slambda(this$0, $entity, $timeZoneVal, resultContinuation) {
    this.vsv_1 = this$0;
    this.wsv_1 = $entity;
    this.xsv_1 = $timeZoneVal;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentEditViewModel$onClickSave$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentEditViewModel$onClickSave$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentEditViewModel$onClickSave$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            if (this.vsv_1.rp7_1.equals(new Long(0, 0))) {
              this.hd_1 = 2;
              suspendResult = _get_enrolIntoCourseUseCase__jh2n4b(this.vsv_1).gnm(this.wsv_1, this.xsv_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.vsv_1.ep2().g7d().i92(this.wsv_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.hd_1 = 3;
            continue $sm;
          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            Companion_getInstance_102();
            var popUpToOnFinish = this.vsv_1.lp1_1.ba('popUpToOnFinish');
            if (!(popUpToOnFinish == null)) {
              this.vsv_1.np1_1.foo(popUpToOnFinish, false);
            } else {
              this.vsv_1.up7(this.wsv_1);
            }

            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentEditViewModel$onClickSave$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzEnrolmentEditViewModel$onClickSave$slambda(this.vsv_1, this.wsv_1, this.xsv_1, completion);
    i.ysv_1 = $this$launch;
    return i;
  };
  function ClazzEnrolmentEditViewModel$onClickSave$slambda_0(this$0, $entity, $timeZoneVal, resultContinuation) {
    var i = new ClazzEnrolmentEditViewModel$onClickSave$slambda(this$0, $entity, $timeZoneVal, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentEditViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'EnrolmentEdit');
    this.bst_1 = MutableStateFlow(new ClazzEnrolmentEditUiState(VOID, VOID, VOID, VOID, false));
    this.cst_1 = asStateFlow(this.bst_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(EnrolIntoCourseUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.dst_1 = Instance(this_0, tmp$ret$0, null).n5c(this, enrolIntoCourseUseCase$factory());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.pp1_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.edit.ClazzEnrolmentEditViewModel.<anonymous>' call
        var nextValue = prevValue.nol(VOID, Companion_getInstance_85().uol_1, this.vp8(strings_getInstance().slq_1, strings_getInstance().rlq_1));
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_1 = ClazzEnrolmentEditViewModel$slambda_0(this, null);
    this.vp2(tmp_1, VOID, VOID, ClazzEnrolmentEditViewModel$slambda_2(this, savedStateHandle, null));
  }
  protoOf(ClazzEnrolmentEditViewModel).zsv = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.bst_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.edit.ClazzEnrolmentEditViewModel.onEntityChanged.<anonymous>' call
        var tmp0_safe_receiver = prevValue.est_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.j8h_1;
        var tmp_0 = this.wp8(tmp, entity == null ? null : entity.j8h_1, prevValue.fst_1);
        var tmp2_safe_receiver = prevValue.est_1;
        var tmp_1 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.h8h_1;
        var nextValue = prevValue.lst(entity, tmp_0, this.wp8(tmp_1, entity == null ? null : entity.h8h_1, prevValue.gst_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_34.a4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_112();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.qp7_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_2 = this;
    var tmp_3 = this.cp2();
    tmp_2.qp7_1 = launch(tmp_3, VOID, VOID, ClazzEnrolmentEditViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(ClazzEnrolmentEditViewModel).cqf = function () {
    if (this.mp2().equals(Companion_getInstance_85().uol_1))
      return Unit_instance;
    var tmp0_elvis_lhs = this.bst_1.t2().est_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var entity = tmp;
    var timeZoneVal = entity.s93_1;
    if (timeZoneVal == null) {
      this.hp2().com(new Snack('Error: no time zone for course'));
      return Unit_instance;
    }
    this.lp2(Companion_getInstance_85().uol_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.bst_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.edit.ClazzEnrolmentEditViewModel.onClickSave.<anonymous>' call
        var nextValue = prevValue.lst(VOID, VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    if (entity.j8h_1 === 0) {
      $l$block_0: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_1 = this.bst_1;
        while (true) {
          var prevValue_0 = this_1.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.edit.ClazzEnrolmentEditViewModel.onClickSave.<anonymous>' call
          var nextValue_0 = prevValue_0.lst(VOID, this.jp2().en6(strings_getInstance().blh_1));
          if (this_1.y1k(prevValue_0, nextValue_0)) {
            break $l$block_0;
          }
        }
      }
    }
    if (entity.h8h_1.c7(toLong(imul(get_MS_PER_HOUR(), 24))) <= 0) {
      $l$block_1: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_2 = this.bst_1;
        while (true) {
          var prevValue_1 = this_2.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.edit.ClazzEnrolmentEditViewModel.onClickSave.<anonymous>' call
          var nextValue_1 = prevValue_1.lst(VOID, VOID, this.jp2().en6(strings_getInstance().blh_1));
          if (this_2.y1k(prevValue_1, nextValue_1)) {
            break $l$block_1;
          }
        }
      }
    }
    if (entity.i8h_1.c7(entity.h8h_1) <= 0) {
      $l$block_2: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_3 = this.bst_1;
        while (true) {
          var prevValue_2 = this_3.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.edit.ClazzEnrolmentEditViewModel.onClickSave.<anonymous>' call
          var nextValue_2 = prevValue_2.lst(VOID, VOID, VOID, this.jp2().en6(strings_getInstance().hm2_1));
          if (this_3.y1k(prevValue_2, nextValue_2)) {
            break $l$block_2;
          }
        }
      }
    }
    if (hasErrors_1(this.bst_1.t2(), this)) {
      $l$block_3: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_4 = this.bst_1;
        while (true) {
          var prevValue_3 = this_4.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzenrolment.edit.ClazzEnrolmentEditViewModel.onClickSave.<anonymous>' call
          var nextValue_3 = prevValue_3.lst(VOID, VOID, VOID, VOID, true);
          if (this_4.y1k(prevValue_3, nextValue_3)) {
            break $l$block_3;
          }
        }
      }
      return Unit_instance;
    }
    var tmp_0 = this.cp2();
    launch(tmp_0, VOID, VOID, ClazzEnrolmentEditViewModel$onClickSave$slambda_0(this, entity, timeZoneVal, null));
  };
  function ClazzEnrolmentEditUiState(clazzEnrolment, roleSelectedError, startDateError, endDateError, fieldsEnabled, courseTerminology, roleOptions) {
    clazzEnrolment = clazzEnrolment === VOID ? null : clazzEnrolment;
    roleSelectedError = roleSelectedError === VOID ? null : roleSelectedError;
    startDateError = startDateError === VOID ? null : startDateError;
    endDateError = endDateError === VOID ? null : endDateError;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    courseTerminology = courseTerminology === VOID ? null : courseTerminology;
    var tmp;
    if (roleOptions === VOID) {
      tmp = listOf([1000, 1001]);
    } else {
      tmp = roleOptions;
    }
    roleOptions = tmp;
    this.est_1 = clazzEnrolment;
    this.fst_1 = roleSelectedError;
    this.gst_1 = startDateError;
    this.hst_1 = endDateError;
    this.ist_1 = fieldsEnabled;
    this.jst_1 = courseTerminology;
    this.kst_1 = roleOptions;
  }
  protoOf(ClazzEnrolmentEditUiState).asw = function () {
    var tmp0_safe_receiver = this.est_1;
    var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.j8h_1;
    return tmp === 1000;
  };
  protoOf(ClazzEnrolmentEditUiState).bsw = function (clazzEnrolment, roleSelectedError, startDateError, endDateError, fieldsEnabled, courseTerminology, roleOptions) {
    return new ClazzEnrolmentEditUiState(clazzEnrolment, roleSelectedError, startDateError, endDateError, fieldsEnabled, courseTerminology, roleOptions);
  };
  protoOf(ClazzEnrolmentEditUiState).lst = function (clazzEnrolment, roleSelectedError, startDateError, endDateError, fieldsEnabled, courseTerminology, roleOptions, $super) {
    clazzEnrolment = clazzEnrolment === VOID ? this.est_1 : clazzEnrolment;
    roleSelectedError = roleSelectedError === VOID ? this.fst_1 : roleSelectedError;
    startDateError = startDateError === VOID ? this.gst_1 : startDateError;
    endDateError = endDateError === VOID ? this.hst_1 : endDateError;
    fieldsEnabled = fieldsEnabled === VOID ? this.ist_1 : fieldsEnabled;
    courseTerminology = courseTerminology === VOID ? this.jst_1 : courseTerminology;
    roleOptions = roleOptions === VOID ? this.kst_1 : roleOptions;
    return $super === VOID ? this.bsw(clazzEnrolment, roleSelectedError, startDateError, endDateError, fieldsEnabled, courseTerminology, roleOptions) : $super.bsw.call(this, clazzEnrolment, roleSelectedError, startDateError, endDateError, fieldsEnabled, courseTerminology, roleOptions);
  };
  protoOf(ClazzEnrolmentEditUiState).toString = function () {
    return 'ClazzEnrolmentEditUiState(clazzEnrolment=' + this.est_1 + ', roleSelectedError=' + this.fst_1 + ', startDateError=' + this.gst_1 + ', endDateError=' + this.hst_1 + ', fieldsEnabled=' + this.ist_1 + ', courseTerminology=' + this.jst_1 + ', roleOptions=' + this.kst_1 + ')';
  };
  protoOf(ClazzEnrolmentEditUiState).hashCode = function () {
    var result = this.est_1 == null ? 0 : hashCode(this.est_1);
    result = imul(result, 31) + (this.fst_1 == null ? 0 : getStringHashCode(this.fst_1)) | 0;
    result = imul(result, 31) + (this.gst_1 == null ? 0 : getStringHashCode(this.gst_1)) | 0;
    result = imul(result, 31) + (this.hst_1 == null ? 0 : getStringHashCode(this.hst_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ist_1) | 0;
    result = imul(result, 31) + (this.jst_1 == null ? 0 : this.jst_1.hashCode()) | 0;
    result = imul(result, 31) + hashCode(this.kst_1) | 0;
    return result;
  };
  protoOf(ClazzEnrolmentEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzEnrolmentEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzEnrolmentEditUiState ? other : THROW_CCE();
    if (!equals(this.est_1, tmp0_other_with_cast.est_1))
      return false;
    if (!(this.fst_1 == tmp0_other_with_cast.fst_1))
      return false;
    if (!(this.gst_1 == tmp0_other_with_cast.gst_1))
      return false;
    if (!(this.hst_1 == tmp0_other_with_cast.hst_1))
      return false;
    if (!(this.ist_1 === tmp0_other_with_cast.ist_1))
      return false;
    if (!equals(this.jst_1, tmp0_other_with_cast.jst_1))
      return false;
    if (!equals(this.kst_1, tmp0_other_with_cast.kst_1))
      return false;
    return true;
  };
  function enrolIntoCourseUseCase$factory() {
    return getPropertyCallableRef('enrolIntoCourseUseCase', 1, KProperty1, function (receiver) {
      return _get_enrolIntoCourseUseCase__jh2n4b(receiver);
    }, null);
  }
  function enrolIntoCourseUseCase$factory_0() {
    return getPropertyCallableRef('enrolIntoCourseUseCase', 1, KProperty1, function (receiver) {
      return _get_enrolIntoCourseUseCase__jh2n4b(receiver);
    }, null);
  }
  function ClazzEnrolmentListViewModel$slambda$o$collect$slambda($$this$unsafeFlow, resultContinuation) {
    this.ksw_1 = $$this$unsafeFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$o$collect$slambda).rpt = function (value, $completion) {
    var tmp = this.spt(value, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$o$collect$slambda).he = function (p1, $completion) {
    return this.rpt(p1 instanceof PermissionTriple ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$o$collect$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.msw_1 = this.ksw_1;
            var tmp_1 = this;
            tmp_1.nsw_1 = this.lsw_1;
            this.hd_1 = 1;
            var it = this.nsw_1;
            suspendResult = this.msw_1.t1d(it.wd8_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$o$collect$slambda).spt = function (value, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$o$collect$slambda(this.ksw_1, completion);
    i.lsw_1 = value;
    return i;
  };
  function ClazzEnrolmentListViewModel$slambda$o$collect$slambda_0($$this$unsafeFlow, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda$o$collect$slambda($$this$unsafeFlow, resultContinuation);
    var l = function (value, $completion) {
      return i.rpt(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$61(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.wsw_1 = _this__u8e3s4;
    this.xsw_1 = collector;
  }
  protoOf($collectCOROUTINE$61).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.ysw_1 = this.xsw_1;
            this.hd_1 = 1;
            var tmp_1 = ClazzEnrolmentListViewModel$slambda$o$collect$slambda_0(this.ysw_1, null);
            suspendResult = this.wsw_1.zsw_1.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_19(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.isx_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda).rpt = function (it, $completion) {
    var tmp = this.spt(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.rpt(p1 instanceof PermissionTriple ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp0_container = this.jsx_1;
          var canEditTeacherEnrolments = tmp0_container.y6();
          var canEditStudentEnrolments = tmp0_container.z6();
          l$ret$1: do {
            var this_0 = this.isx_1.gpa_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.rsx(VOID, VOID, VOID, canEditTeacherEnrolments, canEditStudentEnrolments);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda).spt = function (it, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda(this.isx_1, completion);
    i.jsx_1 = it;
    return i;
  };
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.rpt(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.asy_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda).csy = function (it, $completion) {
    var tmp = this.dsy(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.csy((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.asy_1.gpa_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.rsx(this.bsy_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda).dsy = function (it, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda(this.asy_1, completion);
    i.bsy_1 = it;
    return i;
  };
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.csy(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.msy_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_1).dou = function (canViewMembers, $completion) {
    var tmp = this.eou(canViewMembers, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.dou((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var tmp_1;
            if (this.nsy_1) {
              tmp_1 = this.msy_1.fp2().g7d().g92(this.msy_1.qsz_1, this.msy_1.psz_1);
            } else {
              tmp_1 = flowOf(emptyList());
            }

            tmp_0.osy_1 = tmp_1;
            this.hd_1 = 1;
            var tmp_2 = ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda$slambda_0(this.msy_1, null);
            suspendResult = this.osy_1.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_19(tmp_2), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_1).eou = function (canViewMembers, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_1(this.msy_1, completion);
    i.nsy_1 = canViewMembers;
    return i;
  };
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (canViewMembers, $completion) {
      return i.dou(canViewMembers, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda($$this$unsafeFlow, resultContinuation) {
    this.zsz_1 = $$this$unsafeFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda).dou = function (value, $completion) {
    var tmp = this.eou(value, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda).he = function (p1, $completion) {
    return this.dou((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            var tmp_0 = this;
            tmp_0.ct0_1 = this.zsz_1;
            var tmp_1 = this;
            tmp_1.dt0_1 = this.at0_1;
            if (this.dt0_1) {
              this.hd_1 = 3;
              suspendResult = this.ct0_1.t1d(this.dt0_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 2;
              continue $sm;
            }

          case 2:
            if (false) {
              this.hd_1 = 1;
              continue $sm;
            }

            this.hd_1 = 4;
            continue $sm;
          case 3:
            this.bt0_1 = suspendResult;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            return Unit_instance;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda).eou = function (value, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda(this.zsz_1, completion);
    i.at0_1 = value;
    return i;
  };
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda_0($$this$unsafeFlow, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda($$this$unsafeFlow, resultContinuation);
    var l = function (value, $completion) {
      return i.dou(value, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $collectCOROUTINE$62(_this__u8e3s4, collector, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.mt0_1 = _this__u8e3s4;
    this.nt0_1 = collector;
  }
  protoOf($collectCOROUTINE$62).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.ot0_1 = this.nt0_1;
            this.hd_1 = 1;
            var tmp_1 = ClazzEnrolmentListViewModel$slambda$slambda$slambda$o$collect$slambda_0(this.ot0_1, null);
            suspendResult = this.mt0_1.pt0_1.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_19(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function _no_name_provided__qut3iv_8($this) {
    this.pt0_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_8).sot = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$62(this, collector, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(_no_name_provided__qut3iv_8).z1b = function (collector, $completion) {
    return this.sot(collector, $completion);
  };
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.yt0_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_3).dou = function (canViewMembers, $completion) {
    var tmp = this.eou(canViewMembers, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.dou((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            if (this.zt0_1) {
              this.hd_1 = 1;
              suspendResult = this.yt0_1.fp2().g7d().n92(this.yt0_1.qsz_1, this.yt0_1.psz_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            var courseAndPersonName = suspendResult;
            var tmp_0 = courseAndPersonName == null ? null : courseAndPersonName.d99_1;
            var personName = '' + tmp_0 + ' ' + (courseAndPersonName == null ? null : courseAndPersonName.e99_1);
            l$ret$1: do {
              var this_0 = this.yt0_1.gpa_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.rsx(VOID, personName, courseAndPersonName == null ? null : courseAndPersonName.c99_1);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.yt0_1.pp1_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.nol(VOID, VOID, personName);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_3).eou = function (canViewMembers, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_3(this.yt0_1, completion);
    i.zt0_1 = canViewMembers;
    return i;
  };
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (canViewMembers, $completion) {
      return i.dou(canViewMembers, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.it1_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.it1_1.fp2().d7d().bds(this.it1_1.psz_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var terminology = suspendResult;
            l$ret$1: do {
              var this_0 = this.it1_1.gpa_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.rsx(VOID, VOID, VOID, VOID, VOID, terminology);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda(this.it1_1, completion);
    i.jt1_1 = $this$launch;
    return i;
  };
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda_1($permissionFlow, this$0, resultContinuation) {
    this.st1_1 = $permissionFlow;
    this.tt1_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = distinctUntilChanged(this.st1_1);
            var tmp_1 = ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_0(this.tt1_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_19(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda_1(this.st1_1, this.tt1_1, completion);
    i.ut1_1 = $this$launch;
    return i;
  };
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda_2($permissionFlow, this$0, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda_1($permissionFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda_3($canViewMembersFlow, this$0, resultContinuation) {
    this.dt2_1 = $canViewMembersFlow;
    this.et2_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_3).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = distinctUntilChanged(this.dt2_1);
            suspendResult = collectLatest(tmp_0, ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_2(this.et2_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_3).v1m = function ($this$launch, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda_3(this.dt2_1, this.et2_1, completion);
    i.ft2_1 = $this$launch;
    return i;
  };
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda_4($canViewMembersFlow, this$0, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda_3($canViewMembersFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda_5($canViewMembersFlow, this$0, resultContinuation) {
    this.ot2_1 = $canViewMembersFlow;
    this.pt2_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_5).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_5).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var this_0 = distinctUntilChanged(this.ot2_1);
            var tmp_0 = new _no_name_provided__qut3iv_8(this_0);
            suspendResult = collectLatest(tmp_0, ClazzEnrolmentListViewModel$slambda$slambda$slambda$slambda_4(this.pt2_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda$slambda_5).v1m = function ($this$launch, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda_5(this.ot2_1, this.pt2_1, completion);
    i.qt2_1 = $this$launch;
    return i;
  };
  function ClazzEnrolmentListViewModel$slambda$slambda$slambda_6($canViewMembersFlow, this$0, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda$slambda_5($canViewMembersFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _no_name_provided__qut3iv_9($this) {
    this.zsw_1 = $this;
  }
  protoOf(_no_name_provided__qut3iv_9).sot = function (collector, $completion) {
    var tmp = new $collectCOROUTINE$61(this, collector, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(_no_name_provided__qut3iv_9).z1b = function (collector, $completion) {
    return this.sot(collector, $completion);
  };
  function ClazzEnrolmentListViewModel$slambda$slambda($this_launch, this$0, $permissionFlow, $canViewMembersFlow, resultContinuation) {
    this.zt2_1 = $this_launch;
    this.at3_1 = this$0;
    this.bt3_1 = $permissionFlow;
    this.ct3_1 = $canViewMembersFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda).m86 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda).z77 = function ($completion) {
    return this.m86($completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.zt2_1, VOID, VOID, ClazzEnrolmentListViewModel$slambda$slambda$slambda_0(this.at3_1, null));
          launch(this.zt2_1, VOID, VOID, ClazzEnrolmentListViewModel$slambda$slambda$slambda_2(this.bt3_1, this.at3_1, null));
          launch(this.zt2_1, VOID, VOID, ClazzEnrolmentListViewModel$slambda$slambda$slambda_4(this.ct3_1, this.at3_1, null));
          launch(this.zt2_1, VOID, VOID, ClazzEnrolmentListViewModel$slambda$slambda$slambda_6(this.ct3_1, this.at3_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda$slambda).y77 = function (completion) {
    return new ClazzEnrolmentListViewModel$slambda$slambda(this.zt2_1, this.at3_1, this.bt3_1, this.ct3_1, completion);
  };
  function ClazzEnrolmentListViewModel$slambda$slambda_0($this_launch, this$0, $permissionFlow, $canViewMembersFlow, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda$slambda($this_launch, this$0, $permissionFlow, $canViewMembersFlow, resultContinuation);
    var l = function ($completion) {
      return i.m86($completion);
    };
    l.$arity = 0;
    return l;
  }
  function Companion_121() {
    this.dt3_1 = 'CourseEnrolments';
  }
  var Companion_instance_169;
  function Companion_getInstance_138() {
    return Companion_instance_169;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_19(function_0) {
    this.et3_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_19).t1d = function (value, $completion) {
    return this.et3_1(value, $completion);
  };
  function ClazzEnrolmentListViewModel$slambda(this$0, resultContinuation) {
    this.nt3_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzEnrolmentListViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzEnrolmentListViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var tmp_1 = this.nt3_1.ep2().b7f();
            var tmp_2 = this.nt3_1.dp2();
            PermissionFlags_getInstance();
            var tmp_3 = new Long(16, 0);
            PermissionFlags_getInstance();
            var tmp_4 = new Long(8, 0);
            PermissionFlags_getInstance();
            tmp_0.pt3_1 = shareIn(tmp_1.fd5(tmp_2, this.nt3_1.psz_1, tmp_3, tmp_4, new Long(8192, 0)), this.nt3_1.cp2(), Companion_getInstance_12().v1h());
            var tmp_5 = this;
            var this_0 = this.pt3_1;
            tmp_5.qt3_1 = new _no_name_provided__qut3iv_9(this_0);
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.nt3_1.gpa_1, ClazzEnrolmentListViewModel$slambda$slambda_0(this.ot3_1, this.nt3_1, this.pt3_1, this.qt3_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzEnrolmentListViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzEnrolmentListViewModel$slambda(this.nt3_1, completion);
    i.ot3_1 = $this$launch;
    return i;
  };
  function ClazzEnrolmentListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzEnrolmentListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzEnrolmentListViewModel(di, savedStateHandle) {
    UstadListViewModel.call(this, di, savedStateHandle, new ClazzEnrolmentListUiState(), 'CourseEnrolments');
    var tmp = this;
    Companion_getInstance_102();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.psz_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    Companion_getInstance_102();
    var tmp0_safe_receiver_0 = savedStateHandle.ba('personUid');
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : toLong_0(tmp0_safe_receiver_0);
    tmp_0.qsz_1 = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
    var tmp_1 = this.cp2();
    launch(tmp_1, VOID, VOID, ClazzEnrolmentListViewModel$slambda_0(this, null));
  }
  protoOf(ClazzEnrolmentListViewModel).rt3 = function (enrolment) {
    var tmp = Companion_instance_34.a4r();
    Companion_getInstance_102();
    this.rp2('EnrolmentEdit', '', null, tmp, mapOf_0(to('entityUid', enrolment.e8h_1.toString())), VOID, true);
  };
  protoOf(ClazzEnrolmentListViewModel).st3 = function () {
    Companion_getInstance_102();
    this.np1_1.sns('PersonDetailView', mapOf_0(to('entityUid', this.qsz_1.toString())));
  };
  protoOf(ClazzEnrolmentListViewModel).apb = function (searchText) {
  };
  protoOf(ClazzEnrolmentListViewModel).bpb = function () {
  };
  function ClazzEnrolmentListUiState(enrolmentList, personName, courseName, canEditTeacherEnrolments, canEditStudentEnrolments, courseTerminology, timeZone) {
    enrolmentList = enrolmentList === VOID ? emptyList() : enrolmentList;
    personName = personName === VOID ? null : personName;
    courseName = courseName === VOID ? null : courseName;
    canEditTeacherEnrolments = canEditTeacherEnrolments === VOID ? false : canEditTeacherEnrolments;
    canEditStudentEnrolments = canEditStudentEnrolments === VOID ? false : canEditStudentEnrolments;
    courseTerminology = courseTerminology === VOID ? null : courseTerminology;
    timeZone = timeZone === VOID ? 'UTC' : timeZone;
    this.ksx_1 = enrolmentList;
    this.lsx_1 = personName;
    this.msx_1 = courseName;
    this.nsx_1 = canEditTeacherEnrolments;
    this.osx_1 = canEditStudentEnrolments;
    this.psx_1 = courseTerminology;
    this.qsx_1 = timeZone;
  }
  protoOf(ClazzEnrolmentListUiState).tt3 = function (enrolment) {
    var tmp;
    var tmp_0 = enrolment.j8h_1;
    if (tmp_0 === 1001) {
      tmp = this.nsx_1;
    } else {
      tmp = this.nsx_1;
    }
    var tmp0_canEdit = tmp;
    var tmp1_timeZone = this.qsx_1;
    return new ClazzEnrolmentListItemUiState(tmp0_canEdit, enrolment, tmp1_timeZone);
  };
  protoOf(ClazzEnrolmentListUiState).ut3 = function (enrolmentList, personName, courseName, canEditTeacherEnrolments, canEditStudentEnrolments, courseTerminology, timeZone) {
    return new ClazzEnrolmentListUiState(enrolmentList, personName, courseName, canEditTeacherEnrolments, canEditStudentEnrolments, courseTerminology, timeZone);
  };
  protoOf(ClazzEnrolmentListUiState).rsx = function (enrolmentList, personName, courseName, canEditTeacherEnrolments, canEditStudentEnrolments, courseTerminology, timeZone, $super) {
    enrolmentList = enrolmentList === VOID ? this.ksx_1 : enrolmentList;
    personName = personName === VOID ? this.lsx_1 : personName;
    courseName = courseName === VOID ? this.msx_1 : courseName;
    canEditTeacherEnrolments = canEditTeacherEnrolments === VOID ? this.nsx_1 : canEditTeacherEnrolments;
    canEditStudentEnrolments = canEditStudentEnrolments === VOID ? this.osx_1 : canEditStudentEnrolments;
    courseTerminology = courseTerminology === VOID ? this.psx_1 : courseTerminology;
    timeZone = timeZone === VOID ? this.qsx_1 : timeZone;
    return $super === VOID ? this.ut3(enrolmentList, personName, courseName, canEditTeacherEnrolments, canEditStudentEnrolments, courseTerminology, timeZone) : $super.ut3.call(this, enrolmentList, personName, courseName, canEditTeacherEnrolments, canEditStudentEnrolments, courseTerminology, timeZone);
  };
  protoOf(ClazzEnrolmentListUiState).toString = function () {
    return 'ClazzEnrolmentListUiState(enrolmentList=' + this.ksx_1 + ', personName=' + this.lsx_1 + ', courseName=' + this.msx_1 + ', canEditTeacherEnrolments=' + this.nsx_1 + ', canEditStudentEnrolments=' + this.osx_1 + ', courseTerminology=' + this.psx_1 + ', timeZone=' + this.qsx_1 + ')';
  };
  protoOf(ClazzEnrolmentListUiState).hashCode = function () {
    var result = hashCode(this.ksx_1);
    result = imul(result, 31) + (this.lsx_1 == null ? 0 : getStringHashCode(this.lsx_1)) | 0;
    result = imul(result, 31) + (this.msx_1 == null ? 0 : getStringHashCode(this.msx_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.nsx_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.osx_1) | 0;
    result = imul(result, 31) + (this.psx_1 == null ? 0 : hashCode(this.psx_1)) | 0;
    result = imul(result, 31) + getStringHashCode(this.qsx_1) | 0;
    return result;
  };
  protoOf(ClazzEnrolmentListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzEnrolmentListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzEnrolmentListUiState ? other : THROW_CCE();
    if (!equals(this.ksx_1, tmp0_other_with_cast.ksx_1))
      return false;
    if (!(this.lsx_1 == tmp0_other_with_cast.lsx_1))
      return false;
    if (!(this.msx_1 == tmp0_other_with_cast.msx_1))
      return false;
    if (!(this.nsx_1 === tmp0_other_with_cast.nsx_1))
      return false;
    if (!(this.osx_1 === tmp0_other_with_cast.osx_1))
      return false;
    if (!equals(this.psx_1, tmp0_other_with_cast.psx_1))
      return false;
    if (!(this.qsx_1 === tmp0_other_with_cast.qsx_1))
      return false;
    return true;
  };
  function ClazzEnrolmentListItemUiState(canEdit, enrolment, timeZone) {
    canEdit = canEdit === VOID ? false : canEdit;
    this.vt3_1 = canEdit;
    this.wt3_1 = enrolment;
    this.xt3_1 = timeZone;
  }
  protoOf(ClazzEnrolmentListItemUiState).toString = function () {
    return 'ClazzEnrolmentListItemUiState(canEdit=' + this.vt3_1 + ', enrolment=' + this.wt3_1 + ', timeZone=' + this.xt3_1 + ')';
  };
  protoOf(ClazzEnrolmentListItemUiState).hashCode = function () {
    var result = getBooleanHashCode(this.vt3_1);
    result = imul(result, 31) + hashCode(this.wt3_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.xt3_1) | 0;
    return result;
  };
  protoOf(ClazzEnrolmentListItemUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzEnrolmentListItemUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzEnrolmentListItemUiState ? other : THROW_CCE();
    if (!(this.vt3_1 === tmp0_other_with_cast.vt3_1))
      return false;
    if (!equals(this.wt3_1, tmp0_other_with_cast.wt3_1))
      return false;
    if (!(this.xt3_1 === tmp0_other_with_cast.xt3_1))
      return false;
    return true;
  };
  var RecordAttendanceOption_RECORD_ATTENDANCE_MOST_RECENT_SCHEDULE_instance;
  var RecordAttendanceOption_RECORD_ATTENDANCE_NEW_SCHEDULE_instance;
  var RecordAttendanceOption_entriesInitialized;
  function RecordAttendanceOption_initEntries() {
    if (RecordAttendanceOption_entriesInitialized)
      return Unit_instance;
    RecordAttendanceOption_entriesInitialized = true;
    RecordAttendanceOption_RECORD_ATTENDANCE_MOST_RECENT_SCHEDULE_instance = new RecordAttendanceOption('RECORD_ATTENDANCE_MOST_RECENT_SCHEDULE', 0, strings_getInstance().im2_1);
    RecordAttendanceOption_RECORD_ATTENDANCE_NEW_SCHEDULE_instance = new RecordAttendanceOption('RECORD_ATTENDANCE_NEW_SCHEDULE', 1, strings_getInstance().jm2_1);
  }
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.gt4_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda).it4 = function (clazz, $completion) {
    var tmp = this.jt4(clazz, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.it4((p1 == null ? true : p1 instanceof Clazz) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = this.gt4_1.gpa_1;
          var tmp_0;
          var tmp_1 = this_0.t2().lt4_1;
          var tmp0_safe_receiver = this.ht4_1;
          if (!(tmp_1 === (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.m8d_1))) {
            tmp_0 = this_0;
          } else {
            tmp_0 = null;
          }
          var tmp0_safe_receiver_0 = tmp_0;
          if (tmp0_safe_receiver_0 == null)
            null;
          else {
            l$ret$1: do {
              while (true) {
                var prevValue = tmp0_safe_receiver_0.t2();
                var tmp0_safe_receiver_1 = this.ht4_1;
                var tmp1_elvis_lhs = tmp0_safe_receiver_1 == null ? null : tmp0_safe_receiver_1.m8d_1;
                var nextValue = prevValue.st4(VOID, tmp1_elvis_lhs == null ? 'UTC' : tmp1_elvis_lhs);
                if (tmp0_safe_receiver_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
          }
          var this_1 = this.gt4_1.pp1_1;
          var tmp_2;
          var tmp_3 = this_1.t2().aol_1;
          var tmp0_safe_receiver_2 = this.ht4_1;
          if (!(tmp_3 == (tmp0_safe_receiver_2 == null ? null : tmp0_safe_receiver_2.v8c_1))) {
            tmp_2 = this_1;
          } else {
            tmp_2 = null;
          }
          var tmp1_safe_receiver = tmp_2;
          if (tmp1_safe_receiver == null)
            null;
          else {
            l$ret$3: do {
              while (true) {
                var prevValue_0 = tmp1_safe_receiver.t2();
                var tmp0_safe_receiver_3 = this.ht4_1;
                var nextValue_0 = prevValue_0.nol(VOID, VOID, tmp0_safe_receiver_3 == null ? null : tmp0_safe_receiver_3.v8c_1);
                if (tmp1_safe_receiver.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
          }
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda).jt4 = function (clazz, completion) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda(this.gt4_1, completion);
    i.ht4_1 = clazz;
    return i;
  };
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (clazz, $completion) {
      return i.it4(clazz, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda$lambda($options, this$0) {
    return function () {
      var tmp;
      if ($options.u() > 1) {
        var tmp$ret$1;
        $l$block: {
          // Inline function 'kotlinx.coroutines.flow.update' call
          var this_0 = this$0.gpa_1;
          while (true) {
            var prevValue = this_0.t2();
            // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.attendancelist.ClazzLogListAttendanceViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
            var nextValue = prevValue.st4(VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
            if (this_0.y1k(prevValue, nextValue)) {
              tmp$ret$1 = Unit_instance;
              break $l$block;
            }
          }
        }
        tmp = tmp$ret$1;
      } else {
        this$0.vt5(RecordAttendanceOption_RECORD_ATTENDANCE_NEW_SCHEDULE_getInstance());
        tmp = Unit_instance;
      }
      return Unit_instance;
    };
  }
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_1).gt6 = function (hasPermission, hasLogs, $completion) {
    var tmp = this.ht6(hasPermission, hasLogs, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_1).um = function (p1, p2, $completion) {
    var tmp = (!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE();
    return this.gt6(tmp, (!(p2 == null) ? typeof p2 === 'boolean' : false) ? p2 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return new PermissionAndExistingLogs(this.et6_1, this.ft6_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_1).ht6 = function (hasPermission, hasLogs, completion) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_1(completion);
    i.et6_1 = hasPermission;
    i.ft6_1 = hasLogs;
    return i;
  };
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_2(resultContinuation) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_1(resultContinuation);
    var l = function (hasPermission, hasLogs, $completion) {
      return i.gt6(hasPermission, hasLogs, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.qt6_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_3).st6 = function (it, $completion) {
    var tmp = this.tt6(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.st6(p1 instanceof PermissionAndExistingLogs ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = ArrayList_init_$Create$();
          if (this.rt6_1.ut6_1) {
            this_0.i1(RecordAttendanceOption_RECORD_ATTENDANCE_NEW_SCHEDULE_getInstance());
          }
          if (this.rt6_1.ut6_1 ? this.rt6_1.vt6_1 : false) {
            this_0.i1(RecordAttendanceOption_RECORD_ATTENDANCE_MOST_RECENT_SCHEDULE_getInstance());
          }
          var options = this_0.f3();
          l$ret$1: do {
            var this_1 = this.qt6_1.gpa_1;
            while (true) {
              var prevValue = this_1.t2();
              var nextValue = prevValue.st4(VOID, VOID, options);
              if (this_1.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_2 = this.qt6_1.pp1_1;
            while (true) {
              var prevValue_0 = this_2.t2();
              var tmp_0 = !options.c1();
              var tmp_1 = this.qt6_1.jp2().en6(strings_getInstance().pln_1);
              var tmp_2 = FabIcon_ADD_getInstance();
              var nextValue_0 = prevValue_0.nol(new FabUiState(tmp_0, tmp_1, tmp_2, ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda$lambda(options, this.qt6_1)));
              if (this_2.y1k(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_3).tt6 = function (it, completion) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_3(this.qt6_1, completion);
    i.rt6_1 = it;
    return i;
  };
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.st6(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.et7_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.et7_1.fp2().b7d().w8b(this.et7_1.tt5_1);
            var tmp_1 = ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_0(this.et7_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_20(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda$slambda(this.et7_1, completion);
    i.ft7_1 = $this$launch;
    return i;
  };
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.ot7_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var tmp_1 = this.ot7_1.fp2().b7f();
            var tmp_2 = this.ot7_1.dp2();
            PermissionFlags_getInstance();
            tmp_0.qt7_1 = tmp_1.cd5(tmp_2, this.ot7_1.tt5_1, new Long(64, 0));
            var tmp_3 = this;
            var tmp_4 = this.ot7_1.fp2().z7d();
            tmp_3.rt7_1 = tmp_4.d9p(this.ot7_1.tt5_1, 8);
            this.hd_1 = 1;
            var tmp_5 = combine(this.qt7_1, this.rt7_1, ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_2(null));
            var tmp_6 = ClazzLogListAttendanceViewModel$slambda$slambda$slambda$slambda_4(this.ot7_1, null);
            suspendResult = tmp_5.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_20(tmp_6), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda$slambda_1(this.ot7_1, completion);
    i.pt7_1 = $this$launch;
    return i;
  };
  function ClazzLogListAttendanceViewModel$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogListAttendanceViewModel$slambda$slambda($this_launch, this$0, resultContinuation) {
    this.at8_1 = $this_launch;
    this.bt8_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda).m86 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda).z77 = function ($completion) {
    return this.m86($completion);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.at8_1, VOID, VOID, ClazzLogListAttendanceViewModel$slambda$slambda$slambda_0(this.bt8_1, null));
          launch(this.at8_1, VOID, VOID, ClazzLogListAttendanceViewModel$slambda$slambda$slambda_2(this.bt8_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda$slambda).y77 = function (completion) {
    return new ClazzLogListAttendanceViewModel$slambda$slambda(this.at8_1, this.bt8_1, completion);
  };
  function ClazzLogListAttendanceViewModel$slambda$slambda_0($this_launch, this$0, resultContinuation) {
    var i = new ClazzLogListAttendanceViewModel$slambda$slambda($this_launch, this$0, resultContinuation);
    var l = function ($completion) {
      return i.m86($completion);
    };
    l.$arity = 0;
    return l;
  }
  function RecordAttendanceOption(name, ordinal, stringResource) {
    Enum.call(this, name, ordinal);
    this.et8_1 = stringResource;
  }
  function PermissionAndExistingLogs(hasRecordPermission, hasExistingLogs) {
    this.ut6_1 = hasRecordPermission;
    this.vt6_1 = hasExistingLogs;
  }
  protoOf(PermissionAndExistingLogs).toString = function () {
    return 'PermissionAndExistingLogs(hasRecordPermission=' + this.ut6_1 + ', hasExistingLogs=' + this.vt6_1 + ')';
  };
  protoOf(PermissionAndExistingLogs).hashCode = function () {
    var result = getBooleanHashCode(this.ut6_1);
    result = imul(result, 31) + getBooleanHashCode(this.vt6_1) | 0;
    return result;
  };
  protoOf(PermissionAndExistingLogs).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof PermissionAndExistingLogs))
      return false;
    var tmp0_other_with_cast = other instanceof PermissionAndExistingLogs ? other : THROW_CCE();
    if (!(this.ut6_1 === tmp0_other_with_cast.ut6_1))
      return false;
    if (!(this.vt6_1 === tmp0_other_with_cast.vt6_1))
      return false;
    return true;
  };
  function Companion_122() {
    this.ft8_1 = 'CourseLogListAttendanceView';
  }
  var Companion_instance_170;
  function Companion_getInstance_139() {
    return Companion_instance_170;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_20(function_0) {
    this.gt8_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_20).t1d = function (value, $completion) {
    return this.gt8_1(value, $completion);
  };
  function ClazzLogListAttendanceViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      var tmp = this$0.fp2().z7d();
      return tmp.b9p(this$0.tt5_1, 8);
    };
  }
  function ClazzLogListAttendanceViewModel$slambda(this$0, resultContinuation) {
    this.pt8_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogListAttendanceViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.pt8_1.gpa_1, ClazzLogListAttendanceViewModel$slambda$slambda_0(this.qt8_1, this.pt8_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzLogListAttendanceViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzLogListAttendanceViewModel$slambda(this.pt8_1, completion);
    i.qt8_1 = $this$launch;
    return i;
  };
  function ClazzLogListAttendanceViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzLogListAttendanceViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogListAttendanceViewModel$onClickRecordAttendance$slambda(this$0, resultContinuation) {
    this.zt8_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogListAttendanceViewModel$onClickRecordAttendance$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogListAttendanceViewModel$onClickRecordAttendance$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogListAttendanceViewModel$onClickRecordAttendance$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.zt8_1.fp2().z7d().e9p(this.zt8_1.tt5_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var mostRecentLogUid = suspendResult;
            var this_0 = this.zt8_1.np1_1;
            var tmp_0;
            if (!mostRecentLogUid.equals(new Long(0, 0))) {
              tmp_0 = this_0;
            } else {
              tmp_0 = null;
            }

            var tmp0_safe_receiver = tmp_0;
            if (tmp0_safe_receiver == null)
              null;
            else {
              Companion_getInstance_102();
              tmp0_safe_receiver.sns('EditAttendance', mapOf_0(to('entityUid', mostRecentLogUid.toString())));
            }

            this.zt8_1.bt9();
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzLogListAttendanceViewModel$onClickRecordAttendance$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzLogListAttendanceViewModel$onClickRecordAttendance$slambda(this.zt8_1, completion);
    i.at9_1 = $this$launch;
    return i;
  };
  function ClazzLogListAttendanceViewModel$onClickRecordAttendance$slambda_0(this$0, resultContinuation) {
    var i = new ClazzLogListAttendanceViewModel$onClickRecordAttendance$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function RecordAttendanceOption_RECORD_ATTENDANCE_MOST_RECENT_SCHEDULE_getInstance() {
    RecordAttendanceOption_initEntries();
    return RecordAttendanceOption_RECORD_ATTENDANCE_MOST_RECENT_SCHEDULE_instance;
  }
  function RecordAttendanceOption_RECORD_ATTENDANCE_NEW_SCHEDULE_getInstance() {
    RecordAttendanceOption_initEntries();
    return RecordAttendanceOption_RECORD_ATTENDANCE_NEW_SCHEDULE_instance;
  }
  function ClazzLogListAttendanceViewModel(di, savedStateHandle) {
    var tmp = new ClazzLogListAttendanceUiState();
    UstadListViewModel.call(this, di, savedStateHandle, tmp, 'Course');
    var tmp_0 = this;
    Companion_getInstance_102();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    var tmp_1;
    if (tmp1_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('No clazzUid specified');
    } else {
      tmp_1 = tmp1_elvis_lhs;
    }
    tmp_0.tt5_1 = tmp_1;
    var tmp_2 = this;
    tmp_2.ut5_1 = ClazzLogListAttendanceViewModel$pagingSourceFactory$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.gpa_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.attendancelist.ClazzLogListAttendanceViewModel.<anonymous>' call
        var nextValue = prevValue.st4(VOID, VOID, VOID, this.ut5_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_3 = this.cp2();
    launch(tmp_3, VOID, VOID, ClazzLogListAttendanceViewModel$slambda_0(this, null));
  }
  protoOf(ClazzLogListAttendanceViewModel).bt9 = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.gpa_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.attendancelist.ClazzLogListAttendanceViewModel.onDismissCreateNewOptions.<anonymous>' call
        var nextValue = prevValue.st4(VOID, VOID, VOID, VOID, VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ClazzLogListAttendanceViewModel).apb = function (searchText) {
  };
  protoOf(ClazzLogListAttendanceViewModel).bpb = function () {
  };
  protoOf(ClazzLogListAttendanceViewModel).vt5 = function (option) {
    var tmp0 = option.za_1;
    if (tmp0 === 1) {
      Companion_getInstance_112();
      var tmp = to('timeZone', this.gpa_1.t2().lt4_1);
      Companion_getInstance_102();
      this.tpb('ClazzLogEdit', mapOf([tmp, to('clazzUid', this.tt5_1.toString())]));
      this.bt9();
    } else if (tmp0 === 0) {
      if (this.mp2().equals(Companion_getInstance_85().uol_1))
        return Unit_instance;
      this.lp2(Companion_getInstance_85().uol_1);
      var tmp_0 = this.cp2();
      launch(tmp_0, VOID, VOID, ClazzLogListAttendanceViewModel$onClickRecordAttendance$slambda_0(this, null));
    }
  };
  protoOf(ClazzLogListAttendanceViewModel).ct9 = function (clazzLog) {
    Companion_getInstance_102();
    var tmp = to('entityUid', clazzLog.z9p_1.toString());
    Companion_getInstance_112();
    this.np1_1.sns('EditAttendance', mapOf([tmp, to('clazzUid', this.tt5_1.toString())]));
  };
  function ClazzLogListAttendanceUiState$_init_$lambda_i3ey0v() {
    return new EmptyPagingSource();
  }
  function ClazzLogListAttendanceUiState(graphData, timeZoneId, recordAttendanceOptions, clazzLogsList, fieldsEnabled, selectedChipId, viewIdToNumDays, createNewOptionsVisible) {
    graphData = graphData === VOID ? null : graphData;
    timeZoneId = timeZoneId === VOID ? Companion_getInstance_9().rlb().sla() : timeZoneId;
    recordAttendanceOptions = recordAttendanceOptions === VOID ? emptyList() : recordAttendanceOptions;
    var tmp;
    if (clazzLogsList === VOID) {
      tmp = ClazzLogListAttendanceUiState$_init_$lambda_i3ey0v;
    } else {
      tmp = clazzLogsList;
    }
    clazzLogsList = tmp;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    selectedChipId = selectedChipId === VOID ? 7 : selectedChipId;
    viewIdToNumDays = viewIdToNumDays === VOID ? listOf([new MessageIdOption2(strings_getInstance().yln_1, 7), new MessageIdOption2(strings_getInstance().ylp_1, 30), new MessageIdOption2(strings_getInstance().kls_1, 90)]) : viewIdToNumDays;
    createNewOptionsVisible = createNewOptionsVisible === VOID ? false : createNewOptionsVisible;
    this.kt4_1 = graphData;
    this.lt4_1 = timeZoneId;
    this.mt4_1 = recordAttendanceOptions;
    this.nt4_1 = clazzLogsList;
    this.ot4_1 = fieldsEnabled;
    this.pt4_1 = selectedChipId;
    this.qt4_1 = viewIdToNumDays;
    this.rt4_1 = createNewOptionsVisible;
  }
  protoOf(ClazzLogListAttendanceUiState).dt9 = function (graphData, timeZoneId, recordAttendanceOptions, clazzLogsList, fieldsEnabled, selectedChipId, viewIdToNumDays, createNewOptionsVisible) {
    return new ClazzLogListAttendanceUiState(graphData, timeZoneId, recordAttendanceOptions, clazzLogsList, fieldsEnabled, selectedChipId, viewIdToNumDays, createNewOptionsVisible);
  };
  protoOf(ClazzLogListAttendanceUiState).st4 = function (graphData, timeZoneId, recordAttendanceOptions, clazzLogsList, fieldsEnabled, selectedChipId, viewIdToNumDays, createNewOptionsVisible, $super) {
    graphData = graphData === VOID ? this.kt4_1 : graphData;
    timeZoneId = timeZoneId === VOID ? this.lt4_1 : timeZoneId;
    recordAttendanceOptions = recordAttendanceOptions === VOID ? this.mt4_1 : recordAttendanceOptions;
    clazzLogsList = clazzLogsList === VOID ? this.nt4_1 : clazzLogsList;
    fieldsEnabled = fieldsEnabled === VOID ? this.ot4_1 : fieldsEnabled;
    selectedChipId = selectedChipId === VOID ? this.pt4_1 : selectedChipId;
    viewIdToNumDays = viewIdToNumDays === VOID ? this.qt4_1 : viewIdToNumDays;
    createNewOptionsVisible = createNewOptionsVisible === VOID ? this.rt4_1 : createNewOptionsVisible;
    return $super === VOID ? this.dt9(graphData, timeZoneId, recordAttendanceOptions, clazzLogsList, fieldsEnabled, selectedChipId, viewIdToNumDays, createNewOptionsVisible) : $super.dt9.call(this, graphData, timeZoneId, recordAttendanceOptions, clazzLogsList, fieldsEnabled, selectedChipId, viewIdToNumDays, createNewOptionsVisible);
  };
  protoOf(ClazzLogListAttendanceUiState).toString = function () {
    return 'ClazzLogListAttendanceUiState(graphData=' + this.kt4_1 + ', timeZoneId=' + this.lt4_1 + ', recordAttendanceOptions=' + this.mt4_1 + ', clazzLogsList=' + this.nt4_1 + ', fieldsEnabled=' + this.ot4_1 + ', selectedChipId=' + this.pt4_1 + ', viewIdToNumDays=' + this.qt4_1 + ', createNewOptionsVisible=' + this.rt4_1 + ')';
  };
  protoOf(ClazzLogListAttendanceUiState).hashCode = function () {
    var result = this.kt4_1 == null ? 0 : this.kt4_1.hashCode();
    result = imul(result, 31) + getStringHashCode(this.lt4_1) | 0;
    result = imul(result, 31) + hashCode(this.mt4_1) | 0;
    result = imul(result, 31) + hashCode(this.nt4_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ot4_1) | 0;
    result = imul(result, 31) + this.pt4_1 | 0;
    result = imul(result, 31) + hashCode(this.qt4_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.rt4_1) | 0;
    return result;
  };
  protoOf(ClazzLogListAttendanceUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzLogListAttendanceUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzLogListAttendanceUiState ? other : THROW_CCE();
    if (!equals(this.kt4_1, tmp0_other_with_cast.kt4_1))
      return false;
    if (!(this.lt4_1 === tmp0_other_with_cast.lt4_1))
      return false;
    if (!equals(this.mt4_1, tmp0_other_with_cast.mt4_1))
      return false;
    if (!equals(this.nt4_1, tmp0_other_with_cast.nt4_1))
      return false;
    if (!(this.ot4_1 === tmp0_other_with_cast.ot4_1))
      return false;
    if (!(this.pt4_1 === tmp0_other_with_cast.pt4_1))
      return false;
    if (!equals(this.qt4_1, tmp0_other_with_cast.qt4_1))
      return false;
    if (!(this.rt4_1 === tmp0_other_with_cast.rt4_1))
      return false;
    return true;
  };
  function ClazzLogEditViewModel$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditViewModel$slambda$slambda).nt9 = function (it, $completion) {
    var tmp = this.gmp(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.nt9(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return null;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzLogEditViewModel$slambda$slambda).gmp = function (it, completion) {
    var i = new ClazzLogEditViewModel$slambda$slambda(completion);
    i.mt9_1 = it;
    return i;
  };
  function ClazzLogEditViewModel$slambda$slambda_0(resultContinuation) {
    var i = new ClazzLogEditViewModel$slambda$slambda(resultContinuation);
    var l = function (it, $completion) {
      return i.nt9(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogEditViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.wt9_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditViewModel$slambda$slambda_1).xt9 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditViewModel$slambda$slambda_1).z77 = function ($completion) {
    return this.xt9($completion);
  };
  protoOf(ClazzLogEditViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = new ClazzLog();
          this_0.a9q_1 = this.wt9_1.yta_1;
          this_0.b9q_1 = systemTimeInMillis();
          return this_0;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzLogEditViewModel$slambda$slambda_1).y77 = function (completion) {
    return new ClazzLogEditViewModel$slambda$slambda_1(this.wt9_1, completion);
  };
  function ClazzLogEditViewModel$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ClazzLogEditViewModel$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($completion) {
      return i.xt9($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzLogEditViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.wta_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.edit.ClazzLogEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.dtb(VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzLogEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.cqf();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function Companion_123() {
    this.etb_1 = 'ClazzLogEdit';
  }
  var Companion_instance_171;
  function Companion_getInstance_140() {
    return Companion_instance_171;
  }
  function ClazzLogEditViewModel$slambda(this$0, resultContinuation) {
    this.ntb_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = Companion_instance_35.a4r();
            var tmp_1 = ClazzLogEditViewModel$slambda$slambda_0(null);
            var tmp_2 = ClazzLogEditViewModel$slambda$slambda_2(this.ntb_1, null);
            suspendResult = this.ntb_1.tp2(tmp_0, VOID, VOID, tmp_1, tmp_2, ClazzLogEditViewModel$slambda$lambda(this.ntb_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.ntb_1.pp1_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_3 = this.ntb_1.jp2().en6(strings_getInstance().jld_1);
                var nextValue = prevValue.nol(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_3, VOID, ClazzLogEditViewModel$onClickSave$ref(this.ntb_1)));
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.ntb_1.wta_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.dtb(true);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzLogEditViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzLogEditViewModel$slambda(this.ntb_1, completion);
    i.otb_1 = $this$launch;
    return i;
  };
  function ClazzLogEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzLogEditViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.xtb_1 = $commitDelay;
    this.ytb_1 = $entity;
    this.ztb_1 = $this;
    this.atc_1 = $key;
    this.btc_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditViewModel$onEntityChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditViewModel$onEntityChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditViewModel$onEntityChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.xtb_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.ytb_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.ztb_1.pp2(this.ztb_1.lp1_1, this.atc_1, this.btc_1, this.ytb_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzLogEditViewModel$onEntityChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzLogEditViewModel$onEntityChanged$slambda(this.xtb_1, this.ytb_1, this.ztb_1, this.atc_1, this.btc_1, completion);
    i.ctc_1 = $this$launch;
    return i;
  };
  function ClazzLogEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new ClazzLogEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogEditViewModel$onClickSave$lambda($this$shallowCopy) {
    $this$shallowCopy.z9p_1 = generateUid($this$shallowCopy);
    return Unit_instance;
  }
  function ClazzLogEditViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'ClazzLogEdit');
    var tmp = this;
    Companion_getInstance_112();
    var tmp0_elvis_lhs = savedStateHandle.ba('timeZone');
    tmp.vta_1 = tmp0_elvis_lhs == null ? 'UTC' : tmp0_elvis_lhs;
    this.wta_1 = MutableStateFlow(new ClazzLogEditUiState(VOID, VOID, this.vta_1));
    this.xta_1 = asStateFlow(this.wta_1);
    var tmp_0 = this;
    Companion_getInstance_112();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_0.yta_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.pp1_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.edit.ClazzLogEditViewModel.<anonymous>' call
        var nextValue = prevValue.nol(VOID, VOID, this.jp2().en6(strings_getInstance().jm2_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_1 = this.cp2();
    launch(tmp_1, VOID, VOID, ClazzLogEditViewModel$slambda_0(this, null));
  }
  protoOf(ClazzLogEditViewModel).dtc = function (clazzLog) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.wta_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.edit.ClazzLogEditViewModel.onEntityChanged.<anonymous>' call
        var tmp0_safe_receiver = prevValue.atb_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.b9q_1;
        var nextValue = prevValue.dtb(VOID, clazzLog, VOID, this.wp8(tmp, clazzLog == null ? null : clazzLog.b9q_1, prevValue.ctb_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_35.a4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_112();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.qp7_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_0 = this;
    var tmp_1 = this.cp2();
    tmp_0.qp7_1 = launch(tmp_1, VOID, VOID, ClazzLogEditViewModel$onEntityChanged$slambda_0(commitDelay, clazzLog, this, key, serializer, null));
  };
  protoOf(ClazzLogEditViewModel).cqf = function () {
    var tmp0_elvis_lhs = this.wta_1.t2().atb_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var clazzLog = tmp;
    var errorMsg = !isDateSet(clazzLog.b9q_1) ? strings_getInstance().blh_1 : clazzLog.b9q_1.c7(systemTimeInMillis()) > 0 ? strings_getInstance().lmf_1 : null;
    if (!(errorMsg == null)) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this.wta_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.edit.ClazzLogEditViewModel.onClickSave.<anonymous>' call
          var nextValue = prevValue.dtb(VOID, VOID, VOID, this.jp2().en6(errorMsg));
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    }
    var clazzLogWithUid = shallowCopy_6(clazzLog, ClazzLogEditViewModel$onClickSave$lambda);
    var newClazzLogJson = this.z4q().e45(Companion_instance_35.a4r(), clazzLogWithUid);
    var tmp_0 = to('newclazzlog', newClazzLogJson);
    Companion_getInstance_112();
    this.np1_1.sns('EditAttendance', mapOf([tmp_0, to('clazzUid', this.yta_1.toString())]));
  };
  function ClazzLogEditUiState(fieldsEnabled, clazzLog, timeZone, dateError) {
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    clazzLog = clazzLog === VOID ? null : clazzLog;
    timeZone = timeZone === VOID ? 'UTC' : timeZone;
    dateError = dateError === VOID ? null : dateError;
    this.zta_1 = fieldsEnabled;
    this.atb_1 = clazzLog;
    this.btb_1 = timeZone;
    this.ctb_1 = dateError;
  }
  protoOf(ClazzLogEditUiState).etc = function (fieldsEnabled, clazzLog, timeZone, dateError) {
    return new ClazzLogEditUiState(fieldsEnabled, clazzLog, timeZone, dateError);
  };
  protoOf(ClazzLogEditUiState).dtb = function (fieldsEnabled, clazzLog, timeZone, dateError, $super) {
    fieldsEnabled = fieldsEnabled === VOID ? this.zta_1 : fieldsEnabled;
    clazzLog = clazzLog === VOID ? this.atb_1 : clazzLog;
    timeZone = timeZone === VOID ? this.btb_1 : timeZone;
    dateError = dateError === VOID ? this.ctb_1 : dateError;
    return $super === VOID ? this.etc(fieldsEnabled, clazzLog, timeZone, dateError) : $super.etc.call(this, fieldsEnabled, clazzLog, timeZone, dateError);
  };
  protoOf(ClazzLogEditUiState).toString = function () {
    return 'ClazzLogEditUiState(fieldsEnabled=' + this.zta_1 + ', clazzLog=' + this.atb_1 + ', timeZone=' + this.btb_1 + ', dateError=' + this.ctb_1 + ')';
  };
  protoOf(ClazzLogEditUiState).hashCode = function () {
    var result = getBooleanHashCode(this.zta_1);
    result = imul(result, 31) + (this.atb_1 == null ? 0 : this.atb_1.hashCode()) | 0;
    result = imul(result, 31) + getStringHashCode(this.btb_1) | 0;
    result = imul(result, 31) + (this.ctb_1 == null ? 0 : getStringHashCode(this.ctb_1)) | 0;
    return result;
  };
  protoOf(ClazzLogEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzLogEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzLogEditUiState ? other : THROW_CCE();
    if (!(this.zta_1 === tmp0_other_with_cast.zta_1))
      return false;
    if (!equals(this.atb_1, tmp0_other_with_cast.atb_1))
      return false;
    if (!(this.btb_1 === tmp0_other_with_cast.btb_1))
      return false;
    if (!(this.ctb_1 == tmp0_other_with_cast.ctb_1))
      return false;
    return true;
  };
  function ClazzLogEditAttendanceViewModel$slambda$slambda$lambda(a, b) {
    // Inline function 'kotlin.comparisons.compareValuesBy' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.<anonymous>.<anonymous>.<anonymous>' call
    var tmp = a.b9q_1;
    // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.<anonymous>.<anonymous>.<anonymous>' call
    var tmp$ret$1 = b.b9q_1;
    return compareValues(tmp, tmp$ret$1);
  }
  function ClazzLogEditAttendanceViewModel$slambda$slambda(this$0, $newClazzLogVal, resultContinuation) {
    this.ntc_1 = this$0;
    this.otc_1 = $newClazzLogVal;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda).qtc = function (db, $completion) {
    var tmp = this.gmp(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.qtc(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.ptc_1.z7d();
            suspendResult = tmp_0.c9p(this.ntc_1.ttd_1, 8, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var dbLogList = suspendResult;
            var tmp_1;
            if (!(this.otc_1 == null)) {
              var this_0 = plus(dbLogList, listOf_0(this.otc_1));
              var tmp_2 = ClazzLogEditAttendanceViewModel$slambda$slambda$lambda;
              tmp_1 = sortedWith(this_0, new sam$kotlin_Comparator$0_2(tmp_2));
            } else {
              tmp_1 = dbLogList;
            }

            var list = tmp_1;
            return list;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda).gmp = function (db, completion) {
    var i = new ClazzLogEditAttendanceViewModel$slambda$slambda(this.ntc_1, this.otc_1, completion);
    i.ptc_1 = db;
    return i;
  };
  function ClazzLogEditAttendanceViewModel$slambda$slambda_0(this$0, $newClazzLogVal, resultContinuation) {
    var i = new ClazzLogEditAttendanceViewModel$slambda$slambda(this$0, $newClazzLogVal, resultContinuation);
    var l = function (db, $completion) {
      return i.qtc(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogEditAttendanceViewModel$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda_1).cte = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda_1).z77 = function ($completion) {
    return this.cte($completion);
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return emptyList();
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda_1).y77 = function (completion) {
    return new ClazzLogEditAttendanceViewModel$slambda$slambda_1(completion);
  };
  function ClazzLogEditAttendanceViewModel$slambda$slambda_2(resultContinuation) {
    var i = new ClazzLogEditAttendanceViewModel$slambda$slambda_1(resultContinuation);
    var l = function ($completion) {
      return i.cte($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ClazzLogEditAttendanceViewModel$slambda$lambda(this$0, $hasEditPermission) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.otd_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.jte(VOID, VOID, it == null ? emptyList() : it, VOID, $hasEditPermission);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ClazzLogEditAttendanceViewModel$slambda$slambda_3(this$0, resultContinuation) {
    this.ste_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda_3).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda_3).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.ste_1.fp2().b7d().f8c(this.ste_1.otd_1.t2().ute().a9q_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var timeZone = suspendResult;
            l$ret$1: do {
              var this_0 = this.ste_1.otd_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.jte(VOID, VOID, VOID, VOID, VOID, timeZone == null ? 'UTC' : timeZone);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda$slambda_3).v1m = function ($this$launch, completion) {
    var i = new ClazzLogEditAttendanceViewModel$slambda$slambda_3(this.ste_1, completion);
    i.tte_1 = $this$launch;
    return i;
  };
  function ClazzLogEditAttendanceViewModel$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ClazzLogEditAttendanceViewModel$slambda$slambda_3(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogEditAttendanceViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.cqf();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function ClazzLogEditAttendanceViewModel$onClickSave$slambda$lambda($logRecords) {
    return function ($this$shallowCopy) {
      var tmp = $this$shallowCopy;
      var tmp$ret$0;
      $l$block: {
        // Inline function 'kotlin.collections.count' call
        var this_0 = $logRecords;
        var tmp_0;
        if (isInterface(this_0, Collection)) {
          tmp_0 = this_0.c1();
        } else {
          tmp_0 = false;
        }
        if (tmp_0) {
          tmp$ret$0 = 0;
          break $l$block;
        }
        var count = 0;
        var tmp0_iterator = this_0.w();
        while (tmp0_iterator.f()) {
          var element = tmp0_iterator.e();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.onClickSave.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var tmp_1 = element.w9k_1;
          if (tmp_1 === 1) {
            count = count + 1 | 0;
            checkCountOverflow(count);
          }
        }
        tmp$ret$0 = count;
      }
      tmp.g9q_1 = tmp$ret$0;
      var tmp_2 = $this$shallowCopy;
      var tmp$ret$2;
      $l$block_0: {
        // Inline function 'kotlin.collections.count' call
        var this_1 = $logRecords;
        var tmp_3;
        if (isInterface(this_1, Collection)) {
          tmp_3 = this_1.c1();
        } else {
          tmp_3 = false;
        }
        if (tmp_3) {
          tmp$ret$2 = 0;
          break $l$block_0;
        }
        var count_0 = 0;
        var tmp0_iterator_0 = this_1.w();
        while (tmp0_iterator_0.f()) {
          var element_0 = tmp0_iterator_0.e();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.onClickSave.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var tmp_4 = element_0.w9k_1;
          if (tmp_4 === 2) {
            count_0 = count_0 + 1 | 0;
            checkCountOverflow(count_0);
          }
        }
        tmp$ret$2 = count_0;
      }
      tmp_2.h9q_1 = tmp$ret$2;
      var tmp_5 = $this$shallowCopy;
      var tmp$ret$4;
      $l$block_1: {
        // Inline function 'kotlin.collections.count' call
        var this_2 = $logRecords;
        var tmp_6;
        if (isInterface(this_2, Collection)) {
          tmp_6 = this_2.c1();
        } else {
          tmp_6 = false;
        }
        if (tmp_6) {
          tmp$ret$4 = 0;
          break $l$block_1;
        }
        var count_1 = 0;
        var tmp0_iterator_1 = this_2.w();
        while (tmp0_iterator_1.f()) {
          var element_1 = tmp0_iterator_1.e();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.onClickSave.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var tmp_7 = element_1.w9k_1;
          if (tmp_7 === 4) {
            count_1 = count_1 + 1 | 0;
            checkCountOverflow(count_1);
          }
        }
        tmp$ret$4 = count_1;
      }
      tmp_5.i9q_1 = tmp$ret$4;
      return Unit_instance;
    };
  }
  function ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda(this$0, $clazzLogsToSave, $attendanceRecordsToSave, resultContinuation) {
    this.dtf_1 = this$0;
    this.etf_1 = $clazzLogsToSave;
    this.ftf_1 = $attendanceRecordsToSave;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda).fmp = function (it, $completion) {
    var tmp = this.gmp(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda).he = function (p1, $completion) {
    return this.fmp(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            suspendResult = this.dtf_1.fp2().z7d().f9p(this.etf_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            suspendResult = this.dtf_1.fp2().y7d().z9j(this.ftf_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda).gmp = function (it, completion) {
    var i = new ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda(this.dtf_1, this.etf_1, this.ftf_1, completion);
    i.gtf_1 = it;
    return i;
  };
  function ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda_0(this$0, $clazzLogsToSave, $attendanceRecordsToSave, resultContinuation) {
    var i = new ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda(this$0, $clazzLogsToSave, $attendanceRecordsToSave, resultContinuation);
    var l = function (it, $completion) {
      return i.fmp(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_newClazzLog__zdra0r($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.qtd_1;
    newClazzLog$factory();
    return this_0.t2();
  }
  function _set_currentClazzLogIndex__l00dbq($this, value) {
    $this.lp1_1.rox('activeIndex', toString_0(value));
  }
  function _get_currentClazzLogIndex__yy31c2($this) {
    var tmp0_safe_receiver = $this.lp1_1.ba('activeIndex');
    return tmp0_safe_receiver == null ? null : toInt(tmp0_safe_receiver);
  }
  function savePersonAndAttendanceRecords($this, clazzLogUid, records, $completion) {
    var tmp = new $savePersonAndAttendanceRecordsCOROUTINE$63($this, clazzLogUid, records, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function commitAttendanceRecordsToState($this, $completion) {
    var tmp = new $commitAttendanceRecordsToStateCOROUTINE$64($this, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function Companion_124() {
    this.jtg_1 = 'newclazzlog';
    this.ktg_1 = 'EditAttendance';
    this.ltg_1 = 'activeIndex';
    this.mtg_1 = 'log_';
    this.ntg_1 = 'logsToSave';
  }
  var Companion_instance_172;
  function Companion_getInstance_141() {
    return Companion_instance_172;
  }
  function sam$kotlin_Comparator$0_2(function_0) {
    this.otg_1 = function_0;
  }
  protoOf(sam$kotlin_Comparator$0_2).pa = function (a, b) {
    return this.otg_1(a, b);
  };
  protoOf(sam$kotlin_Comparator$0_2).compare = function (a, b) {
    return this.pa(a, b);
  };
  function ClazzLogEditAttendanceViewModel$newClazzLog$delegate$lambda($savedStateHandle, this$0) {
    return function () {
      var tmp0_safe_receiver = $savedStateHandle.ba('newclazzlog');
      var tmp;
      if (tmp0_safe_receiver == null) {
        tmp = null;
      } else {
        // Inline function 'kotlin.let' call
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.newClazzLog$delegate.<anonymous>.<anonymous>' call
        tmp = this$0.z4q().f45(Companion_instance_35.a4r(), tmp0_safe_receiver);
      }
      return tmp;
    };
  }
  function ClazzLogEditAttendanceViewModel$slambda(this$0, resultContinuation) {
    this.xtg_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$slambda).oqh = function (db, $completion) {
    var tmp = this.gmp(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda).he = function (p1, $completion) {
    return this.oqh(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.ytg_1.b7f();
            var tmp_1 = this.xtg_1.dp2();
            PermissionFlags_getInstance();
            suspendResult = tmp_0.gd5(tmp_1, this.xtg_1.ttd_1, new Long(32, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda).gmp = function (db, completion) {
    var i = new ClazzLogEditAttendanceViewModel$slambda(this.xtg_1, completion);
    i.ytg_1 = db;
    return i;
  };
  function ClazzLogEditAttendanceViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ClazzLogEditAttendanceViewModel$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.oqh(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogEditAttendanceViewModel$slambda_1(this$0, resultContinuation) {
    this.hth_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$slambda_1).u1m = function ($this$launchIfHasPermission, $completion) {
    var tmp = this.v1m($this$launchIfHasPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.jth_1 = _get_newClazzLog__zdra0r(this.hth_1);
            this.hd_1 = 1;
            var tmp_0 = this.hth_1.ep2().b7f();
            var tmp_1 = this.hth_1.dp2();
            PermissionFlags_getInstance();
            suspendResult = tmp_0.gd5(tmp_1, this.hth_1.ttd_1, new Long(64, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.kth_1 = suspendResult;
            this.hd_1 = 2;
            var tmp_2 = ListSerializer(Companion_instance_35.a4r());
            var tmp_3 = ClazzLogEditAttendanceViewModel$slambda$slambda_0(this.hth_1, this.jth_1, null);
            var tmp_4 = ClazzLogEditAttendanceViewModel$slambda$slambda_2(null);
            suspendResult = this.hth_1.tp2(tmp_2, VOID, VOID, tmp_3, tmp_4, ClazzLogEditAttendanceViewModel$slambda$lambda(this.hth_1, this.kth_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            launch(this.ith_1, VOID, VOID, ClazzLogEditAttendanceViewModel$slambda$slambda_4(this.hth_1, null));
            var currentClazzLogIndexVal = _get_currentClazzLogIndex__yy31c2(this.hth_1);
            var tmp_5;
            if (!(currentClazzLogIndexVal == null)) {
              tmp_5 = currentClazzLogIndexVal;
            } else if (!(this.jth_1 == null)) {
              var tmp0_elvis_lhs = this.hth_1.otd_1.t2().lth(this.jth_1.z9p_1);
              tmp_5 = tmp0_elvis_lhs == null ? 0 : tmp0_elvis_lhs;
            } else if (!this.hth_1.rp7_1.equals(new Long(0, 0))) {
              var tmp1_elvis_lhs = this.hth_1.otd_1.t2().lth(this.hth_1.rp7_1);
              tmp_5 = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
            } else {
              tmp_5 = this.hth_1.otd_1.t2().fte_1.u() - 1 | 0;
            }

            var startIndex = tmp_5;
            this.hth_1.mth(this.hth_1.otd_1.t2().fte_1.v(startIndex), true);
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzLogEditAttendanceViewModel$slambda_1).v1m = function ($this$launchIfHasPermission, completion) {
    var i = new ClazzLogEditAttendanceViewModel$slambda_1(this.hth_1, completion);
    i.ith_1 = $this$launchIfHasPermission;
    return i;
  };
  function ClazzLogEditAttendanceViewModel$slambda_2(this$0, resultContinuation) {
    var i = new ClazzLogEditAttendanceViewModel$slambda_1(this$0, resultContinuation);
    var l = function ($this$launchIfHasPermission, $completion) {
      return i.u1m($this$launchIfHasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogEditAttendanceViewModel$onChangeClazzLog$slambda($clazzLog, this$0, resultContinuation) {
    this.vth_1 = $clazzLog;
    this.wth_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$onChangeClazzLog$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditAttendanceViewModel$onChangeClazzLog$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditAttendanceViewModel$onChangeClazzLog$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 9;
            this.yth_1 = 'log_' + this.vth_1.z9p_1.toString();
            this.hd_1 = 1;
            suspendResult = this.wth_1.op2(this.wth_1.lp1_1, this.yth_1, ListSerializer(Companion_instance_37.a4r()), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.zth_1 = suspendResult;
            if (this.zth_1 == null) {
              this.hd_1 = 2;
              suspendResult = this.wth_1.fp2().y7d().y9j(this.vth_1.a9q_1, this.vth_1.z9p_1, this.vth_1.b9q_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.ati_1 = this.zth_1;
              this.hd_1 = 8;
              continue $sm;
            }

          case 2:
            this.bti_1 = suspendResult;
            var tmp_0 = this;
            tmp_0.cti_1 = this.bti_1;
            var tmp_1 = this;
            tmp_1.dti_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.bti_1, 10));
            this.eti_1 = this.cti_1.w();
            this.hd_1 = 3;
            continue $sm;
          case 3:
            if (!this.eti_1.f()) {
              this.hd_1 = 6;
              continue $sm;
            }

            this.fti_1 = this.eti_1.e();
            var tmp_2 = this;
            tmp_2.gti_1 = this.fti_1;
            if (this.gti_1.q9l_1 == null) {
              this.iti_1 = this.gti_1.o9l_1;
              var tmp_3 = this;
              tmp_3.jti_1 = new ClazzLogAttendanceRecord();
              var tmp_4 = this;
              tmp_4.kti_1 = this.jti_1;
              this.hd_1 = 4;
              var tmp_5 = get_doorPrimaryKeyManager(this.wth_1.ep2());
              suspendResult = tmp_5.b62(15, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_6 = this;
              tmp_6.hti_1 = this.gti_1;
              this.hd_1 = 5;
              continue $sm;
            }

          case 4:
            this.lti_1 = suspendResult;
            this.kti_1.t9k_1 = this.lti_1;
            var tmp_7 = this.kti_1;
            var tmp0_safe_receiver = this.gti_1.o9l_1;
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.f95_1;
            tmp_7.v9k_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
            this.kti_1.u9k_1 = this.vth_1.z9p_1;
            this.mti_1 = this.jti_1;
            this.nti_1 = this.gti_1.p9l_1;
            this.hti_1 = new PersonAndClazzLogAttendanceRecord(this.iti_1, this.nti_1, this.mti_1);
            this.hd_1 = 5;
            continue $sm;
          case 5:
            this.oti_1 = this.hti_1;
            this.dti_1.i1(this.oti_1);
            this.hd_1 = 3;
            continue $sm;
          case 6:
            this.pti_1 = this.dti_1;
            var tmp_8 = this;
            tmp_8.qti_1 = this.pti_1;
            this.hd_1 = 7;
            suspendResult = savePersonAndAttendanceRecords(this.wth_1, this.vth_1.z9p_1, this.qti_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            this.ati_1 = this.pti_1;
            this.hd_1 = 8;
            continue $sm;
          case 8:
            var personAndAttendanceRecords = this.ati_1;
            l$ret$1: do {
              var this_0 = this.wth_1.otd_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.jte(personAndAttendanceRecords, VOID, VOID, true);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.wth_1.pp1_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var tmp_9;
                if (!prevValue_0.gol_1.jok_1) {
                  var tmp_10 = this.wth_1.otd_1.t2().hte_1;
                  var tmp_11 = this.wth_1.jp2().en6(strings_getInstance().alw_1);
                  tmp_9 = prevValue_0.nol(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(tmp_10, tmp_11, VOID, ClazzLogEditAttendanceViewModel$onClickSave$ref(this.wth_1)));
                } else {
                  tmp_9 = prevValue_0;
                }
                var nextValue_0 = tmp_9;
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 9:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 9) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzLogEditAttendanceViewModel$onChangeClazzLog$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzLogEditAttendanceViewModel$onChangeClazzLog$slambda(this.vth_1, this.wth_1, completion);
    i.xth_1 = $this$launch;
    return i;
  };
  function ClazzLogEditAttendanceViewModel$onChangeClazzLog$slambda_0($clazzLog, this$0, resultContinuation) {
    var i = new ClazzLogEditAttendanceViewModel$onChangeClazzLog$slambda($clazzLog, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$lambda($record) {
    return function (it) {
      var tmp0_safe_receiver = it.o9l_1;
      var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.f95_1;
      var tmp1_safe_receiver = $record.o9l_1;
      return equals(tmp, tmp1_safe_receiver == null ? null : tmp1_safe_receiver.f95_1);
    };
  }
  function ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda(this$0, resultContinuation) {
    this.zti_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = commitAttendanceRecordsToState(this.zti_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda(this.zti_1, completion);
    i.atj_1 = $this$launch;
    return i;
  };
  function ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda_0(this$0, resultContinuation) {
    var i = new ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogEditAttendanceViewModel$onClickMarkAll$lambda($status) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.w9k_1 = $status;
      return Unit_instance;
    };
  }
  function ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda(this$0, resultContinuation) {
    this.jtj_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = commitAttendanceRecordsToState(this.jtj_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda(this.jtj_1, completion);
    i.ktj_1 = $this$launch;
    return i;
  };
  function ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda_0(this$0, resultContinuation) {
    var i = new ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ClazzLogEditAttendanceViewModel$onClickSave$slambda(this$0, resultContinuation) {
    this.ttj_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ClazzLogEditAttendanceViewModel$onClickSave$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClickSave$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClickSave$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 11;
            this.hd_1 = 1;
            suspendResult = delay(new Long(100, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp_0 = this;
            tmp_0.vtj_1 = this.ttj_1.std_1;
            var tmp_1 = this;
            tmp_1.wtj_1 = null;
            this.hd_1 = 2;
            suspendResult = this.vtj_1.n23(this.wtj_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.id_1 = 10;
            var tmp_2 = this;
            tmp_2.ytj_1 = ArrayList_init_$Create$();
            var tmp_3 = this;
            tmp_3.ztj_1 = ArrayList_init_$Create$();
            this.hd_1 = 4;
            suspendResult = this.ttj_1.op2(this.ttj_1.lp1_1, 'logsToSave', ListSerializer(serializer_1(Companion_getInstance_2())), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.atk_1 = suspendResult;
            this.btk_1 = this.atk_1 == null ? emptyList() : this.atk_1;
            var tmp_4 = this;
            tmp_4.ctk_1 = this.btk_1;
            this.dtk_1 = this.ctk_1.w();
            this.hd_1 = 5;
            continue $sm;
          case 5:
            if (!this.dtk_1.f()) {
              this.hd_1 = 7;
              continue $sm;
            }

            this.etk_1 = this.dtk_1.e();
            var tmp_5 = this;
            tmp_5.ftk_1 = this.etk_1;
            var tmp_6 = this;
            var tmp$ret$0;
            l$ret$1: do {
              var tmp0_iterator = this.ttj_1.otd_1.t2().fte_1.w();
              while (tmp0_iterator.f()) {
                var element = tmp0_iterator.e();
                if (element.z9p_1.equals(this.ftk_1)) {
                  tmp$ret$0 = element;
                  break l$ret$1;
                }
              }
              throw NoSuchElementException_init_$Create$_0('Collection contains no element matching the predicate.');
            }
             while (false);
            tmp_6.gtk_1 = tmp$ret$0;
            this.hd_1 = 6;
            suspendResult = this.ttj_1.op2(this.ttj_1.lp1_1, 'log_' + this.ftk_1.toString(), ListSerializer(Companion_instance_37.a4r()), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            this.htk_1 = suspendResult;
            var tmp_7 = this;
            var tmp_8;
            if (this.htk_1 == null) {
              tmp_8 = null;
            } else {
              var this_0 = this.htk_1;
              var destination = ArrayList_init_$Create$();
              var tmp0_iterator_0 = this_0.w();
              while (tmp0_iterator_0.f()) {
                var element_0 = tmp0_iterator_0.e();
                var tmp0_safe_receiver = element_0.q9l_1;
                if (tmp0_safe_receiver == null)
                  null;
                else {
                  destination.i1(tmp0_safe_receiver);
                }
              }
              tmp_8 = destination;
            }

            tmp_7.itk_1 = tmp_8;
            this.jtk_1 = this.itk_1 == null ? emptyList() : this.itk_1;
            var this_1 = this.ytj_1;
            var element_1 = shallowCopy_6(this.gtk_1, ClazzLogEditAttendanceViewModel$onClickSave$slambda$lambda(this.jtk_1));
            this_1.i1(element_1);
            var this_2 = this.ztj_1;
            var elements = this.jtk_1;
            addAll(this_2, elements);
            this.hd_1 = 5;
            continue $sm;
          case 7:
            this.hd_1 = 8;
            var tmp_9 = this.ttj_1.fp2();
            suspendResult = withDoorTransactionAsync(tmp_9, VOID, ClazzLogEditAttendanceViewModel$onClickSave$slambda$slambda_0(this.ttj_1, this.ytj_1, this.ztj_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 8:
            this.xtj_1 = suspendResult;
            this.id_1 = 11;
            this.hd_1 = 9;
            continue $sm;
          case 9:
            this.id_1 = 11;
            this.vtj_1.y22(this.wtj_1);
            if (!(_get_newClazzLog__zdra0r(this.ttj_1) == null)) {
              this.ttj_1.np1_1.foo('ClazzLogEdit', true);
            } else {
              this.ttj_1.up7(this.ttj_1.otd_1.t2().ute());
            }

            return Unit_instance;
          case 10:
            this.id_1 = 11;
            var t = this.kd_1;
            this.vtj_1.y22(this.wtj_1);
            throw t;
          case 11:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 11) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ClazzLogEditAttendanceViewModel$onClickSave$slambda).v1m = function ($this$launch, completion) {
    var i = new ClazzLogEditAttendanceViewModel$onClickSave$slambda(this.ttj_1, completion);
    i.utj_1 = $this$launch;
    return i;
  };
  function ClazzLogEditAttendanceViewModel$onClickSave$slambda_0(this$0, resultContinuation) {
    var i = new ClazzLogEditAttendanceViewModel$onClickSave$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $savePersonAndAttendanceRecordsCOROUTINE$63(_this__u8e3s4, clazzLogUid, records, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.ptf_1 = _this__u8e3s4;
    this.qtf_1 = clazzLogUid;
    this.rtf_1 = records;
  }
  protoOf($savePersonAndAttendanceRecordsCOROUTINE$63).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.stf_1 = 'log_' + this.qtf_1.toString();
            this.hd_1 = 1;
            suspendResult = this.ptf_1.pp2(this.ptf_1.lp1_1, this.stf_1, ListSerializer(Companion_instance_37.a4r()), this.rtf_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            suspendResult = this.ptf_1.op2(this.ptf_1.lp1_1, 'logsToSave', ListSerializer(serializer_1(Companion_getInstance_2())), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.ttf_1 = suspendResult;
            this.utf_1 = this.ttf_1 == null ? null : toSet(this.ttf_1);
            this.vtf_1 = this.utf_1 == null ? emptySet() : this.utf_1;
            if (!this.vtf_1.a1(this.qtf_1)) {
              this.wtf_1 = plus_2(this.vtf_1, this.qtf_1);
              this.hd_1 = 3;
              suspendResult = this.ptf_1.pp2(this.ptf_1.lp1_1, 'logsToSave', ListSerializer(serializer_1(Companion_getInstance_2())), toList(this.wtf_1), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 4;
              continue $sm;
            }

          case 3:
            this.hd_1 = 4;
            continue $sm;
          case 4:
            return Unit_instance;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function $commitAttendanceRecordsToStateCOROUTINE$64(_this__u8e3s4, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.ftg_1 = _this__u8e3s4;
  }
  protoOf($commitAttendanceRecordsToStateCOROUTINE$64).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 6;
            var tmp_0 = this;
            tmp_0.gtg_1 = this.ftg_1.std_1;
            var tmp_1 = this;
            tmp_1.htg_1 = null;
            this.hd_1 = 1;
            suspendResult = this.gtg_1.n23(this.htg_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.id_1 = 5;
            this.hd_1 = 3;
            suspendResult = savePersonAndAttendanceRecords(this.ftg_1, this.ftg_1.otd_1.t2().ute().z9p_1, this.ftg_1.otd_1.t2().dte_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.itg_1 = suspendResult;
            this.id_1 = 6;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            this.id_1 = 6;
            this.gtg_1.y22(this.htg_1);
            return Unit_instance;
          case 5:
            this.id_1 = 6;
            var t = this.kd_1;
            this.gtg_1.y22(this.htg_1);
            throw t;
          case 6:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 6) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function ClazzLogEditAttendanceViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'EditAttendance');
    this.otd_1 = MutableStateFlow(new ClazzLogEditAttendanceUiState());
    this.ptd_1 = asStateFlow(this.otd_1);
    var tmp = this;
    tmp.qtd_1 = lazy_0(ClazzLogEditAttendanceViewModel$newClazzLog$delegate$lambda(savedStateHandle, this));
    this.rtd_1 = null;
    this.std_1 = Mutex();
    var tmp_0 = this;
    Companion_getInstance_112();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_0.ttd_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.pp1_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.<anonymous>' call
        var nextValue = prevValue.nol(VOID, VOID, this.jp2().en6(strings_getInstance().pln_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_1 = ClazzLogEditAttendanceViewModel$slambda_0(this, null);
    this.vp2(tmp_1, VOID, VOID, ClazzLogEditAttendanceViewModel$slambda_2(this, null));
  }
  protoOf(ClazzLogEditAttendanceViewModel).mth = function (clazzLog, forceLoad) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.indexOfFirst' call
      var index = 0;
      var tmp0_iterator = this.otd_1.t2().fte_1.w();
      while (tmp0_iterator.f()) {
        var item = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.onChangeClazzLog.<anonymous>' call
        if (item.z9p_1.equals(clazzLog.z9p_1)) {
          tmp$ret$1 = index;
          break $l$block;
        }
        index = index + 1 | 0;
      }
      tmp$ret$1 = -1;
    }
    var logIndex = tmp$ret$1;
    if (!forceLoad ? logIndex === this.otd_1.t2().ete_1 : false)
      return Unit_instance;
    $l$block_1: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.otd_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.onChangeClazzLog.<anonymous>' call
        _set_currentClazzLogIndex__l00dbq(this, logIndex);
        var tmp$ret$3;
        $l$block_0: {
          // Inline function 'kotlin.collections.indexOfFirst' call
          var index_0 = 0;
          var tmp0_iterator_0 = prevValue.fte_1.w();
          while (tmp0_iterator_0.f()) {
            var item_0 = tmp0_iterator_0.e();
            // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.onChangeClazzLog.<anonymous>.<anonymous>' call
            if (item_0.z9p_1.equals(clazzLog.z9p_1)) {
              tmp$ret$3 = index_0;
              break $l$block_0;
            }
            index_0 = index_0 + 1 | 0;
          }
          tmp$ret$3 = -1;
        }
        var nextValue = prevValue.jte(VOID, tmp$ret$3, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block_1;
        }
      }
    }
    var tmp0_safe_receiver = this.rtd_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp = this;
    var tmp_0 = this.cp2();
    tmp.rtd_1 = launch(tmp_0, VOID, VOID, ClazzLogEditAttendanceViewModel$onChangeClazzLog$slambda_0(clazzLog, this, null));
  };
  protoOf(ClazzLogEditAttendanceViewModel).ktk = function (clazzLog, forceLoad, $super) {
    forceLoad = forceLoad === VOID ? false : forceLoad;
    var tmp;
    if ($super === VOID) {
      this.mth(clazzLog, forceLoad);
      tmp = Unit_instance;
    } else {
      tmp = $super.mth.call(this, clazzLog, forceLoad);
    }
    return tmp;
  };
  protoOf(ClazzLogEditAttendanceViewModel).ltk = function (record) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.otd_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.onClazzLogAttendanceChanged.<anonymous>' call
        var nextValue = prevValue.jte(replace_0(prevValue.dte_1, record, ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$lambda(record)));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp = this.cp2();
    launch(tmp, VOID, VOID, ClazzLogEditAttendanceViewModel$onClazzLogAttendanceChanged$slambda_0(this, null));
  };
  protoOf(ClazzLogEditAttendanceViewModel).mtk = function (status) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.otd_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.onClickMarkAll.<anonymous>' call
        // Inline function 'kotlin.collections.map' call
        var this_1 = prevValue.dte_1;
        // Inline function 'kotlin.collections.mapTo' call
        var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
        var tmp0_iterator = this_1.w();
        while (tmp0_iterator.f()) {
          var item = tmp0_iterator.e();
          // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceViewModel.onClickMarkAll.<anonymous>.<anonymous>' call
          var tmp0_safe_receiver = item.q9l_1;
          var tmp;
          if (tmp0_safe_receiver == null) {
            tmp = null;
          } else {
            tmp = shallowCopy_7(tmp0_safe_receiver, ClazzLogEditAttendanceViewModel$onClickMarkAll$lambda(status));
          }
          var tmp$ret$0 = item.mj7(VOID, VOID, tmp);
          destination.i1(tmp$ret$0);
        }
        var nextValue = prevValue.jte(destination);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_0 = this.cp2();
    launch(tmp_0, VOID, VOID, ClazzLogEditAttendanceViewModel$onClickMarkAll$slambda_0(this, null));
  };
  protoOf(ClazzLogEditAttendanceViewModel).cqf = function () {
    var tmp = this.cp2();
    launch(tmp, VOID, VOID, ClazzLogEditAttendanceViewModel$onClickSave$slambda_0(this, null));
  };
  function ClazzLogEditAttendanceUiState(clazzLogAttendanceRecordList, currentClazzLogIndex, clazzLogsList, fieldsEnabled, canEdit, timeZone) {
    clazzLogAttendanceRecordList = clazzLogAttendanceRecordList === VOID ? emptyList() : clazzLogAttendanceRecordList;
    currentClazzLogIndex = currentClazzLogIndex === VOID ? 0 : currentClazzLogIndex;
    clazzLogsList = clazzLogsList === VOID ? emptyList() : clazzLogsList;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    canEdit = canEdit === VOID ? false : canEdit;
    timeZone = timeZone === VOID ? 'UTC' : timeZone;
    this.dte_1 = clazzLogAttendanceRecordList;
    this.ete_1 = currentClazzLogIndex;
    this.fte_1 = clazzLogsList;
    this.gte_1 = fieldsEnabled;
    this.hte_1 = canEdit;
    this.ite_1 = timeZone;
  }
  protoOf(ClazzLogEditAttendanceUiState).lth = function (clazzLogUid) {
    // Inline function 'kotlin.let' call
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.indexOfFirst' call
      var index = 0;
      var tmp0_iterator = this.fte_1.w();
      while (tmp0_iterator.f()) {
        var item = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceUiState.indexOfClazzLogUid.<anonymous>' call
        if (item.z9p_1.equals(clazzLogUid)) {
          tmp$ret$1 = index;
          break $l$block;
        }
        index = index + 1 | 0;
      }
      tmp$ret$1 = -1;
    }
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.clazzlog.editattendance.ClazzLogEditAttendanceUiState.indexOfClazzLogUid.<anonymous>' call
    var it = tmp$ret$1;
    return it >= 0 ? it : null;
  };
  protoOf(ClazzLogEditAttendanceUiState).ute = function () {
    return this.fte_1.v(this.ete_1);
  };
  protoOf(ClazzLogEditAttendanceUiState).ntk = function (clazzLogAttendanceRecordList, currentClazzLogIndex, clazzLogsList, fieldsEnabled, canEdit, timeZone) {
    return new ClazzLogEditAttendanceUiState(clazzLogAttendanceRecordList, currentClazzLogIndex, clazzLogsList, fieldsEnabled, canEdit, timeZone);
  };
  protoOf(ClazzLogEditAttendanceUiState).jte = function (clazzLogAttendanceRecordList, currentClazzLogIndex, clazzLogsList, fieldsEnabled, canEdit, timeZone, $super) {
    clazzLogAttendanceRecordList = clazzLogAttendanceRecordList === VOID ? this.dte_1 : clazzLogAttendanceRecordList;
    currentClazzLogIndex = currentClazzLogIndex === VOID ? this.ete_1 : currentClazzLogIndex;
    clazzLogsList = clazzLogsList === VOID ? this.fte_1 : clazzLogsList;
    fieldsEnabled = fieldsEnabled === VOID ? this.gte_1 : fieldsEnabled;
    canEdit = canEdit === VOID ? this.hte_1 : canEdit;
    timeZone = timeZone === VOID ? this.ite_1 : timeZone;
    return $super === VOID ? this.ntk(clazzLogAttendanceRecordList, currentClazzLogIndex, clazzLogsList, fieldsEnabled, canEdit, timeZone) : $super.ntk.call(this, clazzLogAttendanceRecordList, currentClazzLogIndex, clazzLogsList, fieldsEnabled, canEdit, timeZone);
  };
  protoOf(ClazzLogEditAttendanceUiState).toString = function () {
    return 'ClazzLogEditAttendanceUiState(clazzLogAttendanceRecordList=' + this.dte_1 + ', currentClazzLogIndex=' + this.ete_1 + ', clazzLogsList=' + this.fte_1 + ', fieldsEnabled=' + this.gte_1 + ', canEdit=' + this.hte_1 + ', timeZone=' + this.ite_1 + ')';
  };
  protoOf(ClazzLogEditAttendanceUiState).hashCode = function () {
    var result = hashCode(this.dte_1);
    result = imul(result, 31) + this.ete_1 | 0;
    result = imul(result, 31) + hashCode(this.fte_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.gte_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.hte_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.ite_1) | 0;
    return result;
  };
  protoOf(ClazzLogEditAttendanceUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ClazzLogEditAttendanceUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ClazzLogEditAttendanceUiState ? other : THROW_CCE();
    if (!equals(this.dte_1, tmp0_other_with_cast.dte_1))
      return false;
    if (!(this.ete_1 === tmp0_other_with_cast.ete_1))
      return false;
    if (!equals(this.fte_1, tmp0_other_with_cast.fte_1))
      return false;
    if (!(this.gte_1 === tmp0_other_with_cast.gte_1))
      return false;
    if (!(this.hte_1 === tmp0_other_with_cast.hte_1))
      return false;
    if (!(this.ite_1 === tmp0_other_with_cast.ite_1))
      return false;
    return true;
  };
  function newClazzLog$factory() {
    return getPropertyCallableRef('newClazzLog', 1, KProperty1, function (receiver) {
      return _get_newClazzLog__zdra0r(receiver);
    }, null);
  }
  function get_stringResource(_this__u8e3s4) {
    var tmp;
    switch (_this__u8e3s4.za_1) {
      case 5:
        tmp = strings_getInstance().pmh_1;
        break;
      case 4:
        tmp = strings_getInstance().qmh_1;
        break;
      case 3:
        tmp = strings_getInstance().rmh_1;
        break;
      case 2:
        tmp = strings_getInstance().smh_1;
        break;
      case 1:
        tmp = strings_getInstance().tmh_1;
        break;
      case 0:
        tmp = strings_getInstance().umh_1;
        break;
      default:
        noWhenBranchMatchedException();
        break;
    }
    return tmp;
  }
  function get_contentTypeStringResource(_this__u8e3s4) {
    var tmp;
    if (!_this__u8e3s4.uah_1) {
      tmp = strings_getInstance().wm5_1;
    } else {
      var tmp0_subject = _this__u8e3s4.zah_1;
      var tmp_0;
      if (tmp0_subject === 1) {
        tmp_0 = strings_getInstance().hlg_1;
      } else {
        if (tmp0_subject === 2) {
          tmp_0 = strings_getInstance().flg_1;
        } else {
          if (tmp0_subject === 3) {
            tmp_0 = strings_getInstance().glg_1;
          } else {
            if (tmp0_subject === 4) {
              tmp_0 = strings_getInstance().bm3_1;
            } else {
              if (tmp0_subject === 5) {
                tmp_0 = strings_getInstance().klg_1;
              } else {
                if (tmp0_subject === 6) {
                  tmp_0 = strings_getInstance().ilg_1;
                } else {
                  if (tmp0_subject === 7) {
                    tmp_0 = strings_getInstance().jlg_1;
                  } else {
                    tmp_0 = strings_getInstance().blc_1;
                  }
                }
              }
            }
          }
        }
      }
      tmp = tmp_0;
    }
    return tmp;
  }
  function Companion_125() {
    Companion_instance_173 = this;
    this.otk_1 = 'ContentEntry';
    var tmp = this;
    Companion_getInstance_112();
    Companion_getInstance_112();
    Companion_getInstance_112();
    Companion_getInstance_112();
    tmp.ptk_1 = listOf(['entityUid', 'clazzUid', 'parentUid', 'courseBlockUid']);
  }
  var Companion_instance_173;
  function Companion_getInstance_142() {
    if (Companion_instance_173 == null)
      new Companion_125();
    return Companion_instance_173;
  }
  function ContentEntryDetailViewModel(di, savedStateHandle) {
    Companion_getInstance_142();
    DetailViewModel.call(this, di, savedStateHandle, 'ContentEntryDetailOverviewView');
    var tmp = this;
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.contententry.detail.ContentEntryDetailViewModel._uiState.<anonymous>' call
    this.xp2(this_0, Companion_getInstance_142().ptk_1);
    var tmp$ret$2 = this_0.f3();
    tmp.mtl_1 = MutableStateFlow(new ContentEntryDetailUiState(listOf_0(new TabItem('ContentEntryDetailOverviewView', tmp$ret$2, this.jp2().en6(strings_getInstance().ulx_1)))));
    this.ntl_1 = asStateFlow(this.mtl_1);
  }
  function ContentEntryDetailUiState(tabs) {
    tabs = tabs === VOID ? emptyList() : tabs;
    this.otl_1 = tabs;
  }
  protoOf(ContentEntryDetailUiState).toString = function () {
    return 'ContentEntryDetailUiState(tabs=' + this.otl_1 + ')';
  };
  protoOf(ContentEntryDetailUiState).hashCode = function () {
    return hashCode(this.otl_1);
  };
  protoOf(ContentEntryDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentEntryDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ContentEntryDetailUiState ? other : THROW_CCE();
    if (!equals(this.otl_1, tmp0_other_with_cast.otl_1))
      return false;
    return true;
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.xtl_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda).ztl = function (it, $completion) {
    var tmp = this.atm(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.ztl((p1 == null ? true : p1 instanceof ContentEntryAndDetail) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.xtl_1.xtm_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.ato(VOID, this.ytl_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda).atm = function (it, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda(this.xtl_1, completion);
    i.ytl_1 = it;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.ztl(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.jto_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).mpq = function (db, $completion) {
    var tmp = this.gmp(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.mpq(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.kto_1.i7d().nag(this.jto_1.ltn_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_1).gmp = function (db, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_1(this.jto_1, completion);
    i.kto_1 = db;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.mpq(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.tto_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).vto = function (it, $completion) {
    var tmp = this.wto(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.vto((p1 == null ? true : p1 instanceof ContentEntryVersion) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.tto_1.xtm_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.ato(VOID, VOID, this.uto_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_3).wto = function (it, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this.tto_1, completion);
    i.uto_1 = it;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.vto(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.ftp_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).htp = function (it, $completion) {
    var tmp = this.itp(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).he = function (p1, $completion) {
    return this.htp((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.ftp_1.xtm_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.ato(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.gtp_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_5).itp = function (it, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this.ftp_1, completion);
    i.gtp_1 = it;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.htp(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this$0, resultContinuation) {
    this.rtp_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).ttp = function (it, $completion) {
    var tmp = this.utp(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).he = function (p1, $completion) {
    return this.ttp((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.rtp_1.xtm_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.ato(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.stp_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_7).utp = function (it, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this.rtp_1, completion);
    i.stp_1 = it;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_8(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_7(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.ttp(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_9(this$0, resultContinuation) {
    this.dtq_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_9).ftq = function (it, $completion) {
    var tmp = this.gtq(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_9).he = function (p1, $completion) {
    return this.ftq((p1 == null ? true : p1 instanceof OfflineItemAndState) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_9).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.dtq_1.xtm_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.ato(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.etq_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_9).gtq = function (it, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_9(this.dtq_1, completion);
    i.etq_1 = it;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_10(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_9(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.ftq(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$lambda() {
    return 'Could not get list of jobs';
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.ptq_1 = this$0;
    this.qtq_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.ptq_1.fp2().i7d();
            Companion_getInstance_112();
            var tmp0_safe_receiver = this.qtq_1.ba('courseBlockUid');
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
            var tmp_1 = tmp_0.mag(this.ptq_1.fp1_1, this.ptq_1.ktn_1, tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs, this.ptq_1.dp2());
            var tmp_2 = ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_0(this.ptq_1, null);
            suspendResult = tmp_1.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_21(tmp_2), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda(this.ptq_1, this.qtq_1, completion);
    i.rtq_1 = $this$launch;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.atr_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            Companion_getInstance_148();
            if (this.atr_1.ltn_1.equals(new Long(1, 0))) {
              var tmp_0 = this;
              tmp_0.ctr_1 = this.atr_1.jp2().en6(strings_getInstance().kmb_1);
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              var tmp_1 = this.atr_1.fp2();
              suspendResult = localFirstThenRepoIfNull(tmp_1, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_2(this.atr_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.ctr_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            var parentTitle = this.ctr_1;
            l$ret$1: do {
              var this_0 = this.atr_1.pp1_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.nol(VOID, VOID, parentTitle);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_1(this.atr_1, completion);
    i.btr_1 = $this$launch;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$lambda(this$0) {
    return function (title) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.pp1_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailoverviewtab.ContentEntryDetailOverviewViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.nol(VOID, VOID, title);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.ltr_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_3).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.ltr_1.fp2().v7e().ebb(this.ltr_1.fp1_1);
            var tmp_1 = ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_4(this.ltr_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_21(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_3).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_3(this.ltr_1, completion);
    i.mtr_1 = $this$launch;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.vtr_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_5).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_5).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.vtr_1.ep2().w7e();
            var tmp_1 = tmp_0.mho(this.vtr_1.fp1_1, 1);
            var tmp_2 = ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_6(this.vtr_1, null);
            suspendResult = tmp_1.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_21(tmp_2), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_5).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_5(this.vtr_1, completion);
    i.wtr_1 = $this$launch;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_5(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_7(this$0, resultContinuation) {
    this.fts_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_7).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_7).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_7).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.fts_1.ep2().p7e().law(this.fts_1.fp1_1);
            var tmp_1 = ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_8(this.fts_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_21(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_7).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_7(this.fts_1, completion);
    i.gts_1 = $this$launch;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_8(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_7(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_9(this$0, resultContinuation) {
    this.pts_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_9).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_9).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_9).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.pts_1.ep2().y7e().afc(this.pts_1.fp1_1, this.pts_1.rts().d64_1);
            var tmp_1 = ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$slambda_10(this.pts_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_21(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_9).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_9(this.pts_1, completion);
    i.qts_1 = $this$launch;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_10(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_9(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_11(this$0, resultContinuation) {
    this.att_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_11).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_11).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_11).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 6;
            this.id_1 = 5;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            var tmp_0 = this;
            tmp_0.ctt_1 = _get_httpClient__2ty1zc_0(this.att_1);
            var tmp_1 = this;
            tmp_1.dtt_1 = this.att_1.bp2().xmx().umj_1 + 'api/contententryimportjob/importjobs';
            var tmp_2 = this;
            tmp_2.ett_1 = this.ctt_1;
            var tmp_3 = this;
            tmp_3.ftt_1 = this.ett_1;
            var tmp_4 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.dtt_1);
            parameter(this_0, 'contententryuid', this.att_1.fp1_1.toString());
            header(this_0, 'cache-control', 'no-store');
            tmp_4.gtt_1 = this_0;
            this.gtt_1.j38_1 = Companion_getInstance().y2w_1;
            var tmp_5 = this;
            tmp_5.htt_1 = this.ftt_1;
            var tmp_6 = this;
            tmp_6.itt_1 = this.gtt_1;
            this.hd_1 = 2;
            suspendResult = (new HttpStatement(this.itt_1, this.htt_1)).u3y(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.jtt_1 = suspendResult;
            this.hd_1 = 3;
            suspendResult = bodyAsDecodedText(this.jtt_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            var remoteImportJobsJson = suspendResult;
            var remoteImportJobs = this.att_1.z4q().f45(ListSerializer(Companion_instance_39.a4r()), remoteImportJobsJson);
            var tmp$ret$0;
            l$ret$1: do {
              var this_1 = this.att_1.xtm_1;
              while (true) {
                var prevValue = this_1.t2();
                var nextValue = prevValue.ato(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, remoteImportJobs);
                if (this_1.y1k(prevValue, nextValue)) {
                  tmp$ret$0 = nextValue;
                  break l$ret$1;
                }
              }
            }
             while (false);
            var state = tmp$ret$0;
            if (!state.vtn_1.c1()) {
              this.hd_1 = 1;
              continue $sm;
            }

            this.hd_1 = 4;
            continue $sm;
          case 4:
            this.id_1 = 6;
            this.hd_1 = 7;
            continue $sm;
          case 5:
            this.id_1 = 6;
            var tmp_7 = this.kd_1;
            if (tmp_7 instanceof Error) {
              var e = this.kd_1;
              var tmp_8 = Napier_getInstance();
              tmp_8.x5d(VOID, VOID, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda$lambda);
              this.hd_1 = 7;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 6:
            throw this.kd_1;
          case 7:
            this.id_1 = 6;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 6) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_11).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_11(this.att_1, completion);
    i.btt_1 = $this$launch;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_12(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_11(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$slambda$slambda($this_launch, this$0, $savedStateHandle, resultContinuation) {
    this.stt_1 = $this_launch;
    this.ttt_1 = this$0;
    this.utt_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda).m86 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda).z77 = function ($completion) {
    return this.m86($completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.stt_1, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_0(this.ttt_1, this.utt_1, null));
          if (this.ttt_1.ktn_1.equals(new Long(0, 0)) ? !this.ttt_1.ltn_1.equals(new Long(0, 0)) : false) {
            launch(this.stt_1, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_2(this.ttt_1, null));
          }
          launchSetTitleFromClazzUid(this.ttt_1, this.ttt_1.ktn_1, ContentEntryDetailOverviewViewModel$slambda$slambda$lambda(this.ttt_1));
          launch(this.stt_1, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_4(this.ttt_1, null));
          launch(this.stt_1, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_6(this.ttt_1, null));
          launch(this.stt_1, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_8(this.ttt_1, null));
          launch(this.stt_1, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_10(this.ttt_1, null));
          launch(this.stt_1, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda$slambda$slambda_12(this.ttt_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda$slambda).y77 = function (completion) {
    return new ContentEntryDetailOverviewViewModel$slambda$slambda(this.stt_1, this.ttt_1, this.utt_1, completion);
  };
  function ContentEntryDetailOverviewViewModel$slambda$slambda_0($this_launch, this$0, $savedStateHandle, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda$slambda($this_launch, this$0, $savedStateHandle, resultContinuation);
    var l = function ($completion) {
      return i.m86($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda(this$0, resultContinuation) {
    this.dtu_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda).jnt = function (it, $completion) {
    var tmp = this.gmp(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda).he = function (p1, $completion) {
    return this.jnt(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.etu_1.v7e().dbb(this.dtu_1.fp1_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda).gmp = function (it, completion) {
    var i = new ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda(this.dtu_1, completion);
    i.etu_1 = it;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.jnt(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda$lambda() {
    return 'ContentEntryDetailoverview: could not dismiss remote error message';
  }
  function _get_makeContentEntryAvailableOfflineUseCase__dvw4p1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.ytm_1;
    makeContentEntryAvailableOfflineUseCase$factory_0();
    return this_0.t2();
  }
  function _get_cancelDownloadUseCase__t8wbc4($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.ztm_1;
    cancelDownloadUseCase$factory_0();
    return this_0.t2();
  }
  function _get_defaultLaunchContentEntryUseCase__lyydsx($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.ctn_1;
    defaultLaunchContentEntryUseCase$factory_0();
    return this_0.t2();
  }
  function _get_launchXapiUseCase__jmtlap($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.dtn_1;
    launchXapiUseCase$factory_0();
    return this_0.t2();
  }
  function _get_launchEpubUseCase__sunqd7($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.etn_1;
    launchEpubUseCase$factory_0();
    return this_0.t2();
  }
  function _get_cancelImportContentEntryUseCase__kqom1e($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.gtn_1;
    cancelImportContentEntryUseCase$factory_0();
    return this_0.t2();
  }
  function _get_cancelRemoteContentEntryImportUseCase__8yb0xk($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.htn_1;
    cancelRemoteContentEntryImportUseCase$factory_0();
    return this_0.t2();
  }
  function _get_dismissRemoteContentEntryImportErrorUseCase__x9kppo($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.itn_1;
    dismissRemoteContentEntryImportErrorUseCase$factory_0();
    return this_0.t2();
  }
  function _get_httpClient__2ty1zc_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.jtn_1;
    httpClient$factory_2();
    return this_0.t2();
  }
  function Companion_126() {
    this.ftu_1 = 'ContentEntryDetailOverviewView';
    this.gtu_1 = 'target';
  }
  var Companion_instance_174;
  function Companion_getInstance_143() {
    return Companion_instance_174;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_21(function_0) {
    this.htu_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_21).t1d = function (value, $completion) {
    return this.htu_1(value, $completion);
  };
  function ContentEntryDetailOverviewViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.qtu_1 = this$0;
    this.rtu_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.qtu_1.xtm_1, ContentEntryDetailOverviewViewModel$slambda$slambda_0(this.stu_1, this.qtu_1, this.rtu_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$slambda(this.qtu_1, this.rtu_1, completion);
    i.stu_1 = $this$launch;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$onClickOpen$slambda(this$0, resultContinuation) {
    this.btv_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$onClickOpen$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$onClickOpen$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$onClickOpen$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 7;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.id_1 = 6;
            this.id_1 = 5;
            this.btv_1.lp2(Companion_getInstance_85().uol_1);
            Napier_getInstance().v5d('ContentEntryDetailOverviewViewModel: onClickOpen launched');
            l$ret$1: do {
              var this_0 = this.btv_1.xtm_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.ato(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, false);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.hd_1 = 2;
            var tmp_0 = this.btv_1.fp2();
            suspendResult = localFirstThenRepoIfNull(tmp_0, ContentEntryDetailOverviewViewModel$onClickOpen$slambda$slambda_0(this.btv_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.etv_1 = suspendResult;
            var tmp_1 = this;
            var tmp0_safe_receiver = this.btv_1.ftn_1;
            var tmp_2;
            if (tmp0_safe_receiver == null) {
              tmp_2 = null;
            } else {
              tmp_2 = Companion_instance_90.pla(tmp0_safe_receiver);
            }

            var tmp1_elvis_lhs = tmp_2;
            tmp_1.ftv_1 = tmp1_elvis_lhs == null ? LinkTarget_DEFAULT_getInstance() : tmp1_elvis_lhs;
            if (!(this.etv_1 == null)) {
              var tmp_3 = this;
              var tmp2_subject = this.etv_1.gaj_1;
              var tmp_4;
              if (tmp2_subject === 'xapi') {
                tmp_4 = _get_launchXapiUseCase__jmtlap(this.btv_1);
              } else {
                if (tmp2_subject === 'epub') {
                  tmp_4 = _get_launchEpubUseCase__sunqd7(this.btv_1);
                } else {
                  tmp_4 = null;
                }
              }
              tmp_3.gtv_1 = tmp_4;
              var tmp_5 = this;
              var tmp3_elvis_lhs = this.gtv_1;
              tmp_5.htv_1 = tmp3_elvis_lhs == null ? _get_defaultLaunchContentEntryUseCase__lyydsx(this.btv_1) : tmp3_elvis_lhs;
              Napier_getInstance().v5d('ContentEntryDetailOverviewViewModel: onClickOpen : Launching using ' + this.htv_1);
              this.hd_1 = 3;
              Companion_getInstance_112();
              var tmp4_safe_receiver = this.btv_1.lp1_1.ba('courseBlockUid');
              var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : toLong_0(tmp4_safe_receiver);
              suspendResult = this.htv_1.tns(this.etv_1, this.btv_1.np1_1, this.btv_1.ktn_1, tmp5_elvis_lhs == null ? new Long(0, 0) : tmp5_elvis_lhs, this.ftv_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              Napier_getInstance().v5d('ContentEntryDetailOverviewViewModel: onClickOpen: latestContentEntryVersion = null');
              this.btv_1.hp2().com(new Snack(this.btv_1.jp2().en6(strings_getInstance().imf_1)));
              this.hd_1 = 4;
              continue $sm;
            }

          case 3:
            this.hd_1 = 4;
            continue $sm;
          case 4:
            this.dtv_1 = Unit_instance;
            this.id_1 = 7;
            this.hd_1 = 8;
            continue $sm;
          case 5:
            this.id_1 = 6;
            var tmp_6 = this.kd_1;
            if (tmp_6 instanceof Error) {
              var e = this.kd_1;
              var tmp_7 = this;
              this.btv_1.hp2().com(new Snack(this.btv_1.jp2().en6(strings_getInstance().glc_1) + (':' + e.message)));
              Napier_getInstance().z5d('ContentEntryDetailOverview: Exception opening content', e);
              tmp_7.dtv_1 = Unit_instance;
              this.id_1 = 7;
              this.hd_1 = 8;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 6:
            this.id_1 = 7;
            var t = this.kd_1;
            this.btv_1.lp2(Companion_getInstance_85().vol_1);
            l$ret$5: do {
              var this_1 = this.btv_1.xtm_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.ato(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$5;
                }
              }
            }
             while (false);
            throw t;
          case 7:
            throw this.kd_1;
          case 8:
            this.id_1 = 7;
            this.btv_1.lp2(Companion_getInstance_85().vol_1);
            l$ret$7: do {
              var this_2 = this.btv_1.xtm_1;
              while (true) {
                var prevValue_1 = this_2.t2();
                var nextValue_1 = prevValue_1.ato(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
                if (this_2.y1k(prevValue_1, nextValue_1)) {
                  break l$ret$7;
                }
              }
            }
             while (false);
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 7) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$onClickOpen$slambda).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$onClickOpen$slambda(this.btv_1, completion);
    i.ctv_1 = $this$launch;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$onClickOpen$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$onClickOpen$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$onCancelRemoteImport$slambda(this$0, $jobUid, resultContinuation) {
    this.qtv_1 = this$0;
    this.rtv_1 = $jobUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$onCancelRemoteImport$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$onCancelRemoteImport$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$onCancelRemoteImport$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = _get_cancelRemoteContentEntryImportUseCase__8yb0xk(this.qtv_1).wnq(this.rtv_1, this.qtv_1.dp2(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.qtv_1.hp2().com(new Snack(this.qtv_1.jp2().en6(strings_getInstance().xlc_1)));
            this.id_1 = 3;
            this.hd_1 = 4;
            continue $sm;
          case 2:
            this.id_1 = 3;
            var tmp_0 = this.kd_1;
            if (tmp_0 instanceof Error) {
              var e = this.kd_1;
              this.qtv_1.hp2().com(new Snack(this.qtv_1.jp2().en6(strings_getInstance().glc_1)));
              this.hd_1 = 4;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 3:
            throw this.kd_1;
          case 4:
            this.id_1 = 3;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 3) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$onCancelRemoteImport$slambda).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$onCancelRemoteImport$slambda(this.qtv_1, this.rtv_1, completion);
    i.stv_1 = $this$launch;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$onCancelRemoteImport$slambda_0(this$0, $jobUid, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$onCancelRemoteImport$slambda(this$0, $jobUid, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda(this$0, $jobUid, resultContinuation) {
    this.btw_1 = this$0;
    this.ctw_1 = $jobUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = _get_dismissRemoteContentEntryImportErrorUseCase__x9kppo(this.btw_1).wnq(this.ctw_1, this.btw_1.dp2(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.id_1 = 3;
            this.hd_1 = 4;
            continue $sm;
          case 2:
            this.id_1 = 3;
            var tmp_0 = this.kd_1;
            if (tmp_0 instanceof Error) {
              var e = this.kd_1;
              var tmp_1 = Napier_getInstance();
              tmp_1.b5e(VOID, VOID, ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda$lambda);
              this.btw_1.hp2().com(new Snack(this.btw_1.jp2().en6(strings_getInstance().glc_1)));
              this.hd_1 = 4;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 3:
            throw this.kd_1;
          case 4:
            this.id_1 = 3;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 3) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda).v1m = function ($this$launch, completion) {
    var i = new ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda(this.btw_1, this.ctw_1, completion);
    i.dtw_1 = $this$launch;
    return i;
  };
  function ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda_0(this$0, $jobUid, resultContinuation) {
    var i = new ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda(this$0, $jobUid, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryDetailOverviewViewModel(di, savedStateHandle) {
    DetailViewModel.call(this, di, savedStateHandle, 'ContentEntryDetailOverviewView');
    this.xtm_1 = MutableStateFlow(new ContentEntryDetailOverviewUiState());
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(MakeContentEntryAvailableOfflineUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.ytm_1 = Instance(this_0, tmp$ret$0, null).n5c(this, makeContentEntryAvailableOfflineUseCase$factory());
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_1 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(CancelDownloadUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.ztm_1 = Instance(this_1, tmp$ret$2, null).n5c(this, cancelDownloadUseCase$factory());
    var tmp_3 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_2 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(NodeIdAndAuth), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    tmp_3.atn_1 = Instance(this_2, tmp$ret$4, null).n5c(this, nodeIdAndAuth$factory());
    this.btn_1 = asStateFlow(this.xtm_1);
    var tmp_5 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_3 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(LaunchContentEntryVersionUseCase), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    tmp_5.ctn_1 = Instance(this_3, tmp$ret$6, null).n5c(this, defaultLaunchContentEntryUseCase$factory());
    var tmp_7 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    var this_4 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_8 = typeToken(createKType(getKClass(LaunchXapiUseCase), arrayOf([]), false));
    var tmp$ret$8 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
    tmp_7.dtn_1 = InstanceOrNull(this_4, tmp$ret$8, null).n5c(this, launchXapiUseCase$factory());
    var tmp_9 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    var this_5 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_10 = typeToken(createKType(getKClass(LaunchEpubUseCase), arrayOf([]), false));
    var tmp$ret$10 = isInterface(tmp_10, TypeToken) ? tmp_10 : THROW_CCE();
    tmp_9.etn_1 = InstanceOrNull(this_5, tmp$ret$10, null).n5c(this, launchEpubUseCase$factory());
    this.ftn_1 = savedStateHandle.ba('target');
    var tmp_11 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    var this_6 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_12 = typeToken(createKType(getKClass(CancelImportContentEntryUseCase), arrayOf([]), false));
    var tmp$ret$12 = isInterface(tmp_12, TypeToken) ? tmp_12 : THROW_CCE();
    tmp_11.gtn_1 = InstanceOrNull(this_6, tmp$ret$12, null).n5c(this, cancelImportContentEntryUseCase$factory());
    var tmp_13 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_7 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_14 = typeToken(createKType(getKClass(CancelRemoteContentEntryImportUseCase), arrayOf([]), false));
    var tmp$ret$14 = isInterface(tmp_14, TypeToken) ? tmp_14 : THROW_CCE();
    tmp_13.htn_1 = Instance(this_7, tmp$ret$14, null).n5c(this, cancelRemoteContentEntryImportUseCase$factory());
    var tmp_15 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_8 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_16 = typeToken(createKType(getKClass(DismissRemoteContentEntryImportErrorUseCase), arrayOf([]), false));
    var tmp$ret$16 = isInterface(tmp_16, TypeToken) ? tmp_16 : THROW_CCE();
    tmp_15.itn_1 = Instance(this_8, tmp$ret$16, null).n5c(this, dismissRemoteContentEntryImportErrorUseCase$factory());
    var tmp_17 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_18 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$18 = isInterface(tmp_18, TypeToken) ? tmp_18 : THROW_CCE();
    tmp_17.jtn_1 = Instance(di, tmp$ret$18, null).n5c(this, httpClient$factory_1());
    var tmp_19 = this;
    Companion_getInstance_112();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_19.ktn_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_20 = this;
    Companion_getInstance_112();
    var tmp0_safe_receiver_0 = savedStateHandle.ba('parentUid');
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : toLong_0(tmp0_safe_receiver_0);
    tmp_20.ltn_1 = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_9 = this.xtm_1;
      while (true) {
        var prevValue = this_9.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailoverviewtab.ContentEntryDetailOverviewViewModel.<anonymous>' call
        var nextValue = prevValue.ato(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.dp2());
        if (this_9.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_21 = this.cp2();
    launch(tmp_21, VOID, VOID, ContentEntryDetailOverviewViewModel$slambda_0(this, savedStateHandle, null));
  }
  protoOf(ContentEntryDetailOverviewViewModel).rts = function () {
    // Inline function 'kotlin.getValue' call
    var this_0 = this.atn_1;
    nodeIdAndAuth$factory_0();
    return this_0.t2();
  };
  protoOf(ContentEntryDetailOverviewViewModel).etw = function () {
    Napier_getInstance().v5d('ContentEntryDetailOverviewViewModel: onClickOpen');
    var tmp = this.cp2();
    launch(tmp, VOID, VOID, ContentEntryDetailOverviewViewModel$onClickOpen$slambda_0(this, null));
  };
  protoOf(ContentEntryDetailOverviewViewModel).ftw = function (jobUid) {
    var tmp = this.cp2();
    launch(tmp, VOID, VOID, ContentEntryDetailOverviewViewModel$onCancelRemoteImport$slambda_0(this, jobUid, null));
  };
  protoOf(ContentEntryDetailOverviewViewModel).gtw = function (jobUid) {
    var tmp = this.cp2();
    launch(tmp, VOID, VOID, ContentEntryDetailOverviewViewModel$onDismissRemoteImportError$slambda_0(this, jobUid, null));
  };
  function ContentEntryDetailOverviewUiState(scoreProgress, contentEntry, latestContentEntryVersion, contentEntryButtons, locallyAvailable, markCompleteVisible, translationVisibile, availableTranslations, activeImportJobs, remoteImportJobs, activeUploadJobs, offlineItemAndState, openButtonEnabled, activeUserPersonUid) {
    scoreProgress = scoreProgress === VOID ? null : scoreProgress;
    contentEntry = contentEntry === VOID ? null : contentEntry;
    latestContentEntryVersion = latestContentEntryVersion === VOID ? null : latestContentEntryVersion;
    contentEntryButtons = contentEntryButtons === VOID ? null : contentEntryButtons;
    locallyAvailable = locallyAvailable === VOID ? false : locallyAvailable;
    markCompleteVisible = markCompleteVisible === VOID ? false : markCompleteVisible;
    translationVisibile = translationVisibile === VOID ? false : translationVisibile;
    availableTranslations = availableTranslations === VOID ? emptyList() : availableTranslations;
    activeImportJobs = activeImportJobs === VOID ? emptyList() : activeImportJobs;
    remoteImportJobs = remoteImportJobs === VOID ? emptyList() : remoteImportJobs;
    activeUploadJobs = activeUploadJobs === VOID ? emptyList() : activeUploadJobs;
    offlineItemAndState = offlineItemAndState === VOID ? null : offlineItemAndState;
    openButtonEnabled = openButtonEnabled === VOID ? true : openButtonEnabled;
    activeUserPersonUid = activeUserPersonUid === VOID ? new Long(0, 0) : activeUserPersonUid;
    this.mtn_1 = scoreProgress;
    this.ntn_1 = contentEntry;
    this.otn_1 = latestContentEntryVersion;
    this.ptn_1 = contentEntryButtons;
    this.qtn_1 = locallyAvailable;
    this.rtn_1 = markCompleteVisible;
    this.stn_1 = translationVisibile;
    this.ttn_1 = availableTranslations;
    this.utn_1 = activeImportJobs;
    this.vtn_1 = remoteImportJobs;
    this.wtn_1 = activeUploadJobs;
    this.xtn_1 = offlineItemAndState;
    this.ytn_1 = openButtonEnabled;
    this.ztn_1 = activeUserPersonUid;
  }
  protoOf(ContentEntryDetailOverviewUiState).htw = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.ntn_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.zai_1;
    var this_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.jah_1;
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  };
  protoOf(ContentEntryDetailOverviewUiState).itw = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.ntn_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.zai_1;
    var this_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.kah_1;
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  };
  protoOf(ContentEntryDetailOverviewUiState).jtw = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.ntn_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.zai_1;
    var this_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.mah_1;
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  };
  protoOf(ContentEntryDetailOverviewUiState).ktw = function () {
    return false;
  };
  protoOf(ContentEntryDetailOverviewUiState).ltw = function () {
    return !(this.mtn_1 == null);
  };
  protoOf(ContentEntryDetailOverviewUiState).mtw = function () {
    var tmp0_safe_receiver = this.otn_1;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailoverviewtab.ContentEntryDetailOverviewUiState.<get-compressedSizeVisible>.<anonymous>' call
      tmp = (tmp0_safe_receiver.maj_1.c7(new Long(0, 0)) > 0 ? tmp0_safe_receiver.maj_1.c7(new Long(0, 0)) > 0 : false) ? tmp0_safe_receiver.maj_1.c7(tmp0_safe_receiver.naj_1) < 0 : false;
    }
    var tmp1_elvis_lhs = tmp;
    return tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;
  };
  protoOf(ContentEntryDetailOverviewUiState).ntw = function () {
    var tmp0_safe_receiver = this.otn_1;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.contententry.detailoverviewtab.ContentEntryDetailOverviewUiState.<get-sizeVisible>.<anonymous>' call
      tmp = tmp0_safe_receiver.maj_1.c7(new Long(0, 0)) > 0;
    }
    var tmp1_elvis_lhs = tmp;
    return tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;
  };
  protoOf(ContentEntryDetailOverviewUiState).otw = function (importJobProgress) {
    return importJobProgress.raw_1.equals(this.ztn_1);
  };
  protoOf(ContentEntryDetailOverviewUiState).ptw = function (scoreProgress, contentEntry, latestContentEntryVersion, contentEntryButtons, locallyAvailable, markCompleteVisible, translationVisibile, availableTranslations, activeImportJobs, remoteImportJobs, activeUploadJobs, offlineItemAndState, openButtonEnabled, activeUserPersonUid) {
    return new ContentEntryDetailOverviewUiState(scoreProgress, contentEntry, latestContentEntryVersion, contentEntryButtons, locallyAvailable, markCompleteVisible, translationVisibile, availableTranslations, activeImportJobs, remoteImportJobs, activeUploadJobs, offlineItemAndState, openButtonEnabled, activeUserPersonUid);
  };
  protoOf(ContentEntryDetailOverviewUiState).ato = function (scoreProgress, contentEntry, latestContentEntryVersion, contentEntryButtons, locallyAvailable, markCompleteVisible, translationVisibile, availableTranslations, activeImportJobs, remoteImportJobs, activeUploadJobs, offlineItemAndState, openButtonEnabled, activeUserPersonUid, $super) {
    scoreProgress = scoreProgress === VOID ? this.mtn_1 : scoreProgress;
    contentEntry = contentEntry === VOID ? this.ntn_1 : contentEntry;
    latestContentEntryVersion = latestContentEntryVersion === VOID ? this.otn_1 : latestContentEntryVersion;
    contentEntryButtons = contentEntryButtons === VOID ? this.ptn_1 : contentEntryButtons;
    locallyAvailable = locallyAvailable === VOID ? this.qtn_1 : locallyAvailable;
    markCompleteVisible = markCompleteVisible === VOID ? this.rtn_1 : markCompleteVisible;
    translationVisibile = translationVisibile === VOID ? this.stn_1 : translationVisibile;
    availableTranslations = availableTranslations === VOID ? this.ttn_1 : availableTranslations;
    activeImportJobs = activeImportJobs === VOID ? this.utn_1 : activeImportJobs;
    remoteImportJobs = remoteImportJobs === VOID ? this.vtn_1 : remoteImportJobs;
    activeUploadJobs = activeUploadJobs === VOID ? this.wtn_1 : activeUploadJobs;
    offlineItemAndState = offlineItemAndState === VOID ? this.xtn_1 : offlineItemAndState;
    openButtonEnabled = openButtonEnabled === VOID ? this.ytn_1 : openButtonEnabled;
    activeUserPersonUid = activeUserPersonUid === VOID ? this.ztn_1 : activeUserPersonUid;
    return $super === VOID ? this.ptw(scoreProgress, contentEntry, latestContentEntryVersion, contentEntryButtons, locallyAvailable, markCompleteVisible, translationVisibile, availableTranslations, activeImportJobs, remoteImportJobs, activeUploadJobs, offlineItemAndState, openButtonEnabled, activeUserPersonUid) : $super.ptw.call(this, scoreProgress, contentEntry, latestContentEntryVersion, contentEntryButtons, locallyAvailable, markCompleteVisible, translationVisibile, availableTranslations, activeImportJobs, remoteImportJobs, activeUploadJobs, offlineItemAndState, openButtonEnabled, activeUserPersonUid);
  };
  protoOf(ContentEntryDetailOverviewUiState).toString = function () {
    return 'ContentEntryDetailOverviewUiState(scoreProgress=' + this.mtn_1 + ', contentEntry=' + this.ntn_1 + ', latestContentEntryVersion=' + this.otn_1 + ', contentEntryButtons=' + this.ptn_1 + ', locallyAvailable=' + this.qtn_1 + ', markCompleteVisible=' + this.rtn_1 + ', translationVisibile=' + this.stn_1 + ', availableTranslations=' + this.ttn_1 + ', activeImportJobs=' + this.utn_1 + ', remoteImportJobs=' + this.vtn_1 + ', activeUploadJobs=' + this.wtn_1 + ', offlineItemAndState=' + this.xtn_1 + ', openButtonEnabled=' + this.ytn_1 + ', activeUserPersonUid=' + this.ztn_1.toString() + ')';
  };
  protoOf(ContentEntryDetailOverviewUiState).hashCode = function () {
    var result = this.mtn_1 == null ? 0 : this.mtn_1.hashCode();
    result = imul(result, 31) + (this.ntn_1 == null ? 0 : this.ntn_1.hashCode()) | 0;
    result = imul(result, 31) + (this.otn_1 == null ? 0 : this.otn_1.hashCode()) | 0;
    result = imul(result, 31) + (this.ptn_1 == null ? 0 : hashCode(this.ptn_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.qtn_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.rtn_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.stn_1) | 0;
    result = imul(result, 31) + hashCode(this.ttn_1) | 0;
    result = imul(result, 31) + hashCode(this.utn_1) | 0;
    result = imul(result, 31) + hashCode(this.vtn_1) | 0;
    result = imul(result, 31) + hashCode(this.wtn_1) | 0;
    result = imul(result, 31) + (this.xtn_1 == null ? 0 : this.xtn_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ytn_1) | 0;
    result = imul(result, 31) + this.ztn_1.hashCode() | 0;
    return result;
  };
  protoOf(ContentEntryDetailOverviewUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentEntryDetailOverviewUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ContentEntryDetailOverviewUiState ? other : THROW_CCE();
    if (!equals(this.mtn_1, tmp0_other_with_cast.mtn_1))
      return false;
    if (!equals(this.ntn_1, tmp0_other_with_cast.ntn_1))
      return false;
    if (!equals(this.otn_1, tmp0_other_with_cast.otn_1))
      return false;
    if (!equals(this.ptn_1, tmp0_other_with_cast.ptn_1))
      return false;
    if (!(this.qtn_1 === tmp0_other_with_cast.qtn_1))
      return false;
    if (!(this.rtn_1 === tmp0_other_with_cast.rtn_1))
      return false;
    if (!(this.stn_1 === tmp0_other_with_cast.stn_1))
      return false;
    if (!equals(this.ttn_1, tmp0_other_with_cast.ttn_1))
      return false;
    if (!equals(this.utn_1, tmp0_other_with_cast.utn_1))
      return false;
    if (!equals(this.vtn_1, tmp0_other_with_cast.vtn_1))
      return false;
    if (!equals(this.wtn_1, tmp0_other_with_cast.wtn_1))
      return false;
    if (!equals(this.xtn_1, tmp0_other_with_cast.xtn_1))
      return false;
    if (!(this.ytn_1 === tmp0_other_with_cast.ytn_1))
      return false;
    if (!this.ztn_1.equals(tmp0_other_with_cast.ztn_1))
      return false;
    return true;
  };
  function makeContentEntryAvailableOfflineUseCase$factory() {
    return getPropertyCallableRef('makeContentEntryAvailableOfflineUseCase', 1, KProperty1, function (receiver) {
      return _get_makeContentEntryAvailableOfflineUseCase__dvw4p1(receiver);
    }, null);
  }
  function cancelDownloadUseCase$factory() {
    return getPropertyCallableRef('cancelDownloadUseCase', 1, KProperty1, function (receiver) {
      return _get_cancelDownloadUseCase__t8wbc4(receiver);
    }, null);
  }
  function nodeIdAndAuth$factory() {
    return getPropertyCallableRef('nodeIdAndAuth', 1, KProperty1, function (receiver) {
      return receiver.rts();
    }, null);
  }
  function defaultLaunchContentEntryUseCase$factory() {
    return getPropertyCallableRef('defaultLaunchContentEntryUseCase', 1, KProperty1, function (receiver) {
      return _get_defaultLaunchContentEntryUseCase__lyydsx(receiver);
    }, null);
  }
  function launchXapiUseCase$factory() {
    return getPropertyCallableRef('launchXapiUseCase', 1, KProperty1, function (receiver) {
      return _get_launchXapiUseCase__jmtlap(receiver);
    }, null);
  }
  function launchEpubUseCase$factory() {
    return getPropertyCallableRef('launchEpubUseCase', 1, KProperty1, function (receiver) {
      return _get_launchEpubUseCase__sunqd7(receiver);
    }, null);
  }
  function cancelImportContentEntryUseCase$factory() {
    return getPropertyCallableRef('cancelImportContentEntryUseCase', 1, KProperty1, function (receiver) {
      return _get_cancelImportContentEntryUseCase__kqom1e(receiver);
    }, null);
  }
  function cancelRemoteContentEntryImportUseCase$factory() {
    return getPropertyCallableRef('cancelRemoteContentEntryImportUseCase', 1, KProperty1, function (receiver) {
      return _get_cancelRemoteContentEntryImportUseCase__8yb0xk(receiver);
    }, null);
  }
  function dismissRemoteContentEntryImportErrorUseCase$factory() {
    return getPropertyCallableRef('dismissRemoteContentEntryImportErrorUseCase', 1, KProperty1, function (receiver) {
      return _get_dismissRemoteContentEntryImportErrorUseCase__x9kppo(receiver);
    }, null);
  }
  function httpClient$factory_1() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_0(receiver);
    }, null);
  }
  function makeContentEntryAvailableOfflineUseCase$factory_0() {
    return getPropertyCallableRef('makeContentEntryAvailableOfflineUseCase', 1, KProperty1, function (receiver) {
      return _get_makeContentEntryAvailableOfflineUseCase__dvw4p1(receiver);
    }, null);
  }
  function cancelDownloadUseCase$factory_0() {
    return getPropertyCallableRef('cancelDownloadUseCase', 1, KProperty1, function (receiver) {
      return _get_cancelDownloadUseCase__t8wbc4(receiver);
    }, null);
  }
  function nodeIdAndAuth$factory_0() {
    return getPropertyCallableRef('nodeIdAndAuth', 1, KProperty1, function (receiver) {
      return receiver.rts();
    }, null);
  }
  function defaultLaunchContentEntryUseCase$factory_0() {
    return getPropertyCallableRef('defaultLaunchContentEntryUseCase', 1, KProperty1, function (receiver) {
      return _get_defaultLaunchContentEntryUseCase__lyydsx(receiver);
    }, null);
  }
  function launchXapiUseCase$factory_0() {
    return getPropertyCallableRef('launchXapiUseCase', 1, KProperty1, function (receiver) {
      return _get_launchXapiUseCase__jmtlap(receiver);
    }, null);
  }
  function launchEpubUseCase$factory_0() {
    return getPropertyCallableRef('launchEpubUseCase', 1, KProperty1, function (receiver) {
      return _get_launchEpubUseCase__sunqd7(receiver);
    }, null);
  }
  function cancelImportContentEntryUseCase$factory_0() {
    return getPropertyCallableRef('cancelImportContentEntryUseCase', 1, KProperty1, function (receiver) {
      return _get_cancelImportContentEntryUseCase__kqom1e(receiver);
    }, null);
  }
  function cancelRemoteContentEntryImportUseCase$factory_0() {
    return getPropertyCallableRef('cancelRemoteContentEntryImportUseCase', 1, KProperty1, function (receiver) {
      return _get_cancelRemoteContentEntryImportUseCase__8yb0xk(receiver);
    }, null);
  }
  function dismissRemoteContentEntryImportErrorUseCase$factory_0() {
    return getPropertyCallableRef('dismissRemoteContentEntryImportErrorUseCase', 1, KProperty1, function (receiver) {
      return _get_dismissRemoteContentEntryImportErrorUseCase__x9kppo(receiver);
    }, null);
  }
  function httpClient$factory_2() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_0(receiver);
    }, null);
  }
  function get_progress(_this__u8e3s4) {
    var tmp;
    if (_this__u8e3s4.oaw_1.c7(new Long(0, 0)) > 0) {
      tmp = _this__u8e3s4.naw_1.zc() / _this__u8e3s4.oaw_1.zc();
    } else {
      tmp = 0.0;
    }
    return tmp;
  }
  function ContentEntryEditViewModel$slambda$slambda$lambda($newContentEntryUid, this$0, $savedStateHandle) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.fah_1 = $newContentEntryUid;
      var tmp;
      if (this$0.stx_1) {
        var tmp_0 = $this$shallowCopy;
        tmp_0.bai_1 = 2;
        var tmp_1 = $this$shallowCopy;
        Companion_getInstance_112();
        var tmp0_safe_receiver = $savedStateHandle.ba('clazzUid');
        var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
        tmp_1.aai_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
        tmp = Unit_instance;
      } else {
        var tmp_2 = $this$shallowCopy;
        tmp_2.bai_1 = 1;
        $this$shallowCopy.aai_1 = this$0.dp2();
        tmp = Unit_instance;
      }
      return Unit_instance;
    };
  }
  function ContentEntryEditViewModel$slambda$slambda$slambda$lambda($newDecription) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.hah_1 = $newDecription;
      return Unit_instance;
    };
  }
  function ContentEntryEditViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.bty_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$slambda$slambda$slambda).jop = function (it, $completion) {
    var tmp = this.kop(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.jop(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp_0 = this.cty_1.qoo_1;
          var tmp0_elvis_lhs = (!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) ? tmp_0 : null;
          var tmp_1;
          if (tmp0_elvis_lhs == null) {
            return Unit_instance;
          } else {
            tmp_1 = tmp0_elvis_lhs;
          }
          var newDecription = tmp_1;
          var tmp1_safe_receiver = this.bty_1.ptx_1.t2().dty_1;
          var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.zj4_1;
          var tmp_2;
          if (tmp2_safe_receiver == null) {
            tmp_2 = null;
          } else {
            tmp_2 = shallowCopy_8(tmp2_safe_receiver, ContentEntryEditViewModel$slambda$slambda$slambda$lambda(newDecription));
          }
          this.bty_1.pty(tmp_2);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda$slambda).kop = function (it, completion) {
    var i = new ContentEntryEditViewModel$slambda$slambda$slambda(this.bty_1, completion);
    i.cty_1 = it;
    return i;
  };
  function ContentEntryEditViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryEditViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.jop(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryEditViewModel$slambda$slambda$slambda$lambda$lambda($newSubtitleTrack) {
    return function (it) {
      return it.fn4_1 === $newSubtitleTrack.fn4_1;
    };
  }
  function ContentEntryEditViewModel$slambda$slambda$slambda$lambda_0($newSubtitleTrack) {
    return function (prev) {
      return replaceOrAppend(prev, $newSubtitleTrack, ContentEntryEditViewModel$slambda$slambda$slambda$lambda$lambda($newSubtitleTrack));
    };
  }
  function ContentEntryEditViewModel$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.yty_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$slambda$slambda$slambda_1).jop = function (navResult, $completion) {
    var tmp = this.kop(navResult, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.jop(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp_0 = this.zty_1.qoo_1;
          var tmp0_elvis_lhs = tmp_0 instanceof SubtitleTrack ? tmp_0 : null;
          var tmp_1;
          if (tmp0_elvis_lhs == null) {
            return Unit_instance;
          } else {
            tmp_1 = tmp0_elvis_lhs;
          }
          var newSubtitleTrack = tmp_1;
          updateSubtitles(this.yty_1, ContentEntryEditViewModel$slambda$slambda$slambda$lambda_0(newSubtitleTrack));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda$slambda_1).kop = function (navResult, completion) {
    var i = new ContentEntryEditViewModel$slambda$slambda$slambda_1(this.yty_1, completion);
    i.zty_1 = navResult;
    return i;
  };
  function ContentEntryEditViewModel$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ContentEntryEditViewModel$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (navResult, $completion) {
      return i.jop(navResult, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryEditViewModel$slambda$slambda(this$0, resultContinuation) {
    this.itz_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$slambda$slambda).mtz = function (db, $completion) {
    var tmp = this.gmp(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.mtz(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            var this_0 = this.jtz_1;
            var tmp_1;
            if (!this.itz_1.rp7_1.equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            var tmp0_safe_receiver = tmp_1;
            tmp_0.ktz_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.i7d();
            if (this.ktz_1 == null) {
              this.ltz_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.ktz_1.lag(this.itz_1.rp7_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.ltz_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            var tmp2_safe_receiver = this.ltz_1;
            var tmp_2;
            if (tmp2_safe_receiver == null) {
              tmp_2 = null;
            } else {
              var tmp_3;
              if (!(tmp2_safe_receiver.tai_1 == null)) {
                var tmp_4 = tmp2_safe_receiver.tai_1;
                var tmp0_elvis_lhs = tmp2_safe_receiver.uai_1;
                tmp_3 = new ContentEntryAndContentJob(tmp_4, VOID, VOID, tmp0_elvis_lhs == null ? new ContentEntryPicture2(this.itz_1.rp7_1) : tmp0_elvis_lhs);
              } else {
                tmp_3 = null;
              }
              tmp_2 = tmp_3;
            }

            return tmp_2;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda).gmp = function (db, completion) {
    var i = new ContentEntryEditViewModel$slambda$slambda(this.itz_1, completion);
    i.jtz_1 = db;
    return i;
  };
  function ContentEntryEditViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryEditViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.mtz(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryEditViewModel$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.vtz_1 = this$0;
    this.wtz_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$slambda$slambda_1).ytz = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda_1).z77 = function ($completion) {
    return this.ytz($completion);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var tmp_1 = get_doorPrimaryKeyManager(this.vtz_1.ep2());
            tmp_0.xtz_1 = tmp_1.a62(42);
            this.hd_1 = 1;
            suspendResult = this.vtz_1.op2(this.wtz_1, 'metadata', Companion_instance_80.a4r(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var importedMetaData = suspendResult;
            var tmp_2;
            if (!(importedMetaData == null)) {
              var tmp0_safe_receiver = importedMetaData.sn4_1;
              var pictureUri = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.xai_1;
              if (!(pictureUri == null)) {
                Companion_getInstance_110();
                this.wtz_1.rox('initPicUri', '');
              }
              var tmp_3 = shallowCopy_8(importedMetaData.pn4_1, ContentEntryEditViewModel$slambda$slambda$lambda(this.xtz_1, this.vtz_1, this.wtz_1));
              var tmp1_cjiPluginId = importedMetaData.qn4_1;
              var tmp2_sourceUri = importedMetaData.pn4_1.oah_1;
              var tmp3_cjiOriginalFilename = importedMetaData.rn4_1;
              var tmp4_cjiOwnerPersonUid = this.vtz_1.dp2();
              var tmp_4 = new ContentEntryImportJob(VOID, tmp2_sourceUri, tmp3_cjiOriginalFilename, this.xtz_1, VOID, VOID, VOID, VOID, VOID, VOID, tmp1_cjiPluginId, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp4_cjiOwnerPersonUid);
              var tmp5_safe_receiver = importedMetaData.sn4_1;
              var tmp6_elvis_lhs = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.zjd(this.xtz_1);
              var this_0 = new ContentEntryAndContentJob(tmp_3, VOID, tmp_4, tmp6_elvis_lhs == null ? new ContentEntryPicture2(this.xtz_1) : tmp6_elvis_lhs);
              var tmp_5 = this.vtz_1.jp2();
              var tmp_6 = strings_getInstance().cm5_1;
              var tmp0_elvis_lhs = importedMetaData.rn4_1;
              var tmp1_elvis_lhs = tmp0_elvis_lhs == null ? importedMetaData.pn4_1.oah_1 : tmp0_elvis_lhs;
              this.wtz_1.rox('savedTitle', tmp_5.fn6(tmp_6, [tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs]));
              tmp_2 = this_0;
            } else {
              var this_1 = new ContentEntry();
              this_1.fah_1 = this.xtz_1;
              var tmp_7 = this_1;
              var tmp0_safe_receiver_0 = this.wtz_1.ba('leaf');
              tmp_7.uah_1 = (tmp0_safe_receiver_0 == null ? null : toBoolean(tmp0_safe_receiver_0)) === true;
              this_1.aai_1 = this.vtz_1.dp2();
              tmp_2 = new ContentEntryAndContentJob(this_1, VOID, VOID, new ContentEntryPicture2(this.xtz_1));
            }

            return tmp_2;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda_1).y77 = function (completion) {
    return new ContentEntryEditViewModel$slambda$slambda_1(this.vtz_1, this.wtz_1, completion);
  };
  function ContentEntryEditViewModel$slambda$slambda_2(this$0, $savedStateHandle, resultContinuation) {
    var i = new ContentEntryEditViewModel$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation);
    var l = function ($completion) {
      return i.ytz($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ContentEntryEditViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.ptx_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var tmp1_safe_receiver = it == null ? null : it.bj5_1;
          var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : paramSubtitles(tmp1_safe_receiver, this$0.z4q());
          var nextValue = prevValue.ztz(it, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp2_elvis_lhs == null ? emptyList() : tmp2_elvis_lhs);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ContentEntryEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.cqf();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function ContentEntryEditViewModel$slambda$slambda_3(this$0, resultContinuation) {
    this.iu0_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$slambda$slambda_3).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda_3).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.iu0_1.np2(this.iu0_1.gp2(), 'contentEntryDesc');
            var tmp_1 = ContentEntryEditViewModel$slambda$slambda$slambda_0(this.iu0_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_22(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda_3).v1m = function ($this$launch, completion) {
    var i = new ContentEntryEditViewModel$slambda$slambda_3(this.iu0_1, completion);
    i.ju0_1 = $this$launch;
    return i;
  };
  function ContentEntryEditViewModel$slambda$slambda_4(this$0, resultContinuation) {
    var i = new ContentEntryEditViewModel$slambda$slambda_3(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryEditViewModel$slambda$slambda_5(this$0, resultContinuation) {
    this.su0_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$slambda$slambda_5).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda_5).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.su0_1.np2(this.su0_1.gp2(), 'subtitleKey');
            var tmp_1 = ContentEntryEditViewModel$slambda$slambda$slambda_2(this.su0_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_22(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryEditViewModel$slambda$slambda_5).v1m = function ($this$launch, completion) {
    var i = new ContentEntryEditViewModel$slambda$slambda_5(this.su0_1, completion);
    i.tu0_1 = $this$launch;
    return i;
  };
  function ContentEntryEditViewModel$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ContentEntryEditViewModel$slambda$slambda_5(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function updateSubtitles($this, function_0) {
    var tmp$ret$2;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = $this.ptx_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.updateSubtitles.<anonymous>' call
        var updatedSubtitles = function_0(prevValue.oty_1);
        var tmp0_safe_receiver = prevValue.dty_1;
        var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.bj5_1;
        var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : paramMap(tmp1_safe_receiver, $this.z4q());
        var prevContentJobParamMap = tmp2_elvis_lhs == null ? emptyMap() : tmp2_elvis_lhs;
        // Inline function 'kotlin.also' call
        var this_1 = toMutableMap(prevContentJobParamMap);
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.updateSubtitles.<anonymous>.<anonymous>' call
        // Inline function 'kotlin.collections.set' call
        var key = 'subtitles';
        var value = $this.z4q().e45(ListSerializer(Companion_instance_79.a4r()), updatedSubtitles);
        this_1.s(key, value);
        var contentJobParam = this_1;
        var tmp4_safe_receiver = prevValue.dty_1;
        var tmp;
        if (tmp4_safe_receiver == null) {
          tmp = null;
        } else {
          var tmp3_safe_receiver = prevValue.dty_1.bj5_1;
          tmp = tmp4_safe_receiver.ej5(VOID, VOID, tmp3_safe_receiver == null ? null : tmp3_safe_receiver.ojd(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, $this.z4q().e45(MapSerializer(serializer_0(StringCompanionObject_instance), serializer_0(StringCompanionObject_instance)), contentJobParam)));
        }
        var tmp5_entity = tmp;
        var nextValue = prevValue.ztz(tmp5_entity, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, updatedSubtitles);
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$2 = nextValue;
          break $l$block;
        }
      }
    }
    var updatedState = tmp$ret$2;
    scheduleEntityCommit($this, updatedState.dty_1);
  }
  function scheduleEntityCommit($this, entity) {
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_40.a4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_112();
    var key = 'entityState';
    var tmp0_safe_receiver = $this.qp7_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp = $this;
    var tmp_0 = $this.cp2();
    tmp.qp7_1 = launch(tmp_0, VOID, VOID, ContentEntryEditViewModel$scheduleEntityCommit$slambda_0(commitDelay, entity, $this, key, serializer, null));
  }
  function hasErrors_2(_this__u8e3s4, $this) {
    return !(_this__u8e3s4.kty_1 == null);
  }
  function Companion_127() {
    this.uu0_1 = 'leaf';
    this.vu0_1 = 'courseBlock';
    this.wu0_1 = 'ContentEntryEdit';
    this.xu0_1 = 'metadata';
    this.yu0_1 = 'savedTitle';
    this.zu0_1 = 'goToOnContentEntryDone';
    this.au1_1 = 'contentEntryDesc';
    this.bu1_1 = 'subtitleKey';
    this.cu1_1 = 1;
    this.du1_1 = 2;
  }
  var Companion_instance_175;
  function Companion_getInstance_144() {
    return Companion_instance_175;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_22(function_0) {
    this.eu1_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_22).t1d = function (value, $completion) {
    return this.eu1_1(value, $completion);
  };
  function ContentEntryEditViewModel$slambda(this$0, resultContinuation) {
    this.nu1_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$slambda).oqh = function (db, $completion) {
    var tmp = this.gmp(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryEditViewModel$slambda).he = function (p1, $completion) {
    return this.oqh(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryEditViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            if (this.nu1_1.stx_1) {
              this.pu1_1 = true;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              var tmp_0 = this.ou1_1.c7f();
              var tmp_1 = this.nu1_1.dp2();
              PermissionFlags_getInstance();
              suspendResult = tmp_0.thc(tmp_1, new Long(65536, 0), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.pu1_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.pu1_1;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryEditViewModel$slambda).gmp = function (db, completion) {
    var i = new ContentEntryEditViewModel$slambda(this.nu1_1, completion);
    i.ou1_1 = db;
    return i;
  };
  function ContentEntryEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryEditViewModel$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.oqh(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryEditViewModel$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.yu1_1 = this$0;
    this.zu1_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$slambda_1).u1m = function ($this$launchIfHasPermission, $completion) {
    var tmp = this.v1m($this$launchIfHasPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryEditViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryEditViewModel$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = Companion_instance_40.a4r();
            var tmp_1 = ContentEntryEditViewModel$slambda$slambda_0(this.yu1_1, null);
            var tmp_2 = ContentEntryEditViewModel$slambda$slambda_2(this.yu1_1, this.zu1_1, null);
            suspendResult = this.yu1_1.tp2(tmp_0, VOID, VOID, tmp_1, tmp_2, ContentEntryEditViewModel$slambda$lambda(this.yu1_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var it = suspendResult;
            Companion_getInstance_110();
            var tmp1_safe_receiver = it == null ? null : it.cj5_1;
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.xai_1;
            setIfNoValueSetYet(this.zu1_1, 'initPicUri', tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs);
            var tmp0_safe_receiver = this.yu1_1.ptx_1.t2().dty_1;
            var tmp1_safe_receiver_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.zj4_1;
            var isLeaf = (tmp1_safe_receiver_0 == null ? null : tmp1_safe_receiver_0.uah_1) === true;
            var savedStateTitle = this.zu1_1.ba('savedTitle');
            var title = !(savedStateTitle == null) ? savedStateTitle : (this.yu1_1.rp7_1.equals(new Long(0, 0)) ? !isLeaf : false) ? this.yu1_1.jp2().en6(strings_getInstance().cm3_1) : (!this.yu1_1.rp7_1.equals(new Long(0, 0)) ? !isLeaf : false) ? this.yu1_1.jp2().en6(strings_getInstance().ime_1) : this.yu1_1.jp2().en6(strings_getInstance().hme_1);
            l$ret$1: do {
              var this_0 = this.yu1_1.pp1_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_3 = this.yu1_1.jp2();
                var tmp0_subject = this.yu1_1.rtx_1;
                var tmp_4 = tmp_3.en6(tmp0_subject === 1 ? strings_getInstance().jld_1 : tmp0_subject === 2 ? strings_getInstance().olk_1 : strings_getInstance().alw_1);
                var nextValue = prevValue.nol(VOID, VOID, title, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_4, VOID, ContentEntryEditViewModel$onClickSave$ref(this.yu1_1)));
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.yu1_1.ptx_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.ztz(VOID, VOID, VOID, VOID, true);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            launch(this.au2_1, VOID, VOID, ContentEntryEditViewModel$slambda$slambda_4(this.yu1_1, null));
            launch(this.au2_1, VOID, VOID, ContentEntryEditViewModel$slambda$slambda_6(this.yu1_1, null));
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryEditViewModel$slambda_1).v1m = function ($this$launchIfHasPermission, completion) {
    var i = new ContentEntryEditViewModel$slambda_1(this.yu1_1, this.zu1_1, completion);
    i.au2_1 = $this$launchIfHasPermission;
    return i;
  };
  function ContentEntryEditViewModel$slambda_2(this$0, $savedStateHandle, resultContinuation) {
    var i = new ContentEntryEditViewModel$slambda_1(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launchIfHasPermission, $completion) {
      return i.u1m($this$launchIfHasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryEditViewModel$scheduleEntityCommit$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.ju2_1 = $commitDelay;
    this.ku2_1 = $entity;
    this.lu2_1 = $this;
    this.mu2_1 = $key;
    this.nu2_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$scheduleEntityCommit$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryEditViewModel$scheduleEntityCommit$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryEditViewModel$scheduleEntityCommit$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.ju2_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.ku2_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.lu2_1.pp2(this.lu2_1.lp1_1, this.mu2_1, this.nu2_1, this.ku2_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryEditViewModel$scheduleEntityCommit$slambda).v1m = function ($this$launch, completion) {
    var i = new ContentEntryEditViewModel$scheduleEntityCommit$slambda(this.ju2_1, this.ku2_1, this.lu2_1, this.mu2_1, this.nu2_1, completion);
    i.ou2_1 = $this$launch;
    return i;
  };
  function ContentEntryEditViewModel$scheduleEntityCommit$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new ContentEntryEditViewModel$scheduleEntityCommit$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryEditViewModel$onClickDeleteSubtitleTrack$lambda($subtitleTrack) {
    return function (prev) {
      // Inline function 'kotlin.collections.filter' call
      // Inline function 'kotlin.collections.filterTo' call
      var destination = ArrayList_init_$Create$();
      var tmp0_iterator = prev.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.onClickDeleteSubtitleTrack.<anonymous>.<anonymous>' call
        if (!(element.fn4_1 === $subtitleTrack.fn4_1)) {
          destination.i1(element);
        }
      }
      return destination;
    };
  }
  function ContentEntryEditViewModel$onClickSave$slambda(this$0, $contentEntryVal, $entityVal, resultContinuation) {
    this.xu2_1 = this$0;
    this.yu2_1 = $contentEntryVal;
    this.zu2_1 = $entityVal;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryEditViewModel$onClickSave$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryEditViewModel$onClickSave$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryEditViewModel$onClickSave$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            var tmp_0 = this;
            Companion_getInstance_112();
            var tmp0_safe_receiver = this.xu2_1.lp1_1.ba('parentUid');
            tmp_0.bu3_1 = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
            this.hd_1 = 1;
            var tmp_1 = this.xu2_1.rp7_1.equals(new Long(0, 0)) ? this.bu3_1 : null;
            Companion_getInstance_110();
            suspendResult = this.xu2_1.ntx_1.mnx(this.yu2_1, tmp_1, this.zu2_1.cj5_1, this.xu2_1.lp1_1.ba('initPicUri'), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.cu3_1 = this.zu2_1.bj5_1;
            if (!(this.cu3_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.xu2_1.otx_1.tnr(this.cu3_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            Companion_getInstance_112();
            var popUpToOnFinish = this.xu2_1.lp1_1.ba('popUpToOnFinish');
            if (!(this.xu2_1.kp2() == null)) {
              this.xu2_1.up7(this.yu2_1);
            } else {
              this.xu2_1.np1_1.foo(popUpToOnFinish == null ? this.xu2_1.mp1_1 : popUpToOnFinish, true);
            }

            if (hasErrors_2(this.xu2_1.ptx_1.t2(), this.xu2_1)) {
              this.xu2_1.lp2(Companion_getInstance_85().vol_1);
              l$ret$1: do {
                var this_0 = this.xu2_1.ptx_1;
                while (true) {
                  var prevValue = this_0.t2();
                  var nextValue = prevValue.ztz(VOID, VOID, VOID, VOID, true);
                  if (this_0.y1k(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
              return Unit_instance;
            }

            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryEditViewModel$onClickSave$slambda).v1m = function ($this$launch, completion) {
    var i = new ContentEntryEditViewModel$onClickSave$slambda(this.xu2_1, this.yu2_1, this.zu2_1, completion);
    i.au3_1 = $this$launch;
    return i;
  };
  function ContentEntryEditViewModel$onClickSave$slambda_0(this$0, $contentEntryVal, $entityVal, resultContinuation) {
    var i = new ContentEntryEditViewModel$onClickSave$slambda(this$0, $contentEntryVal, $entityVal, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryEditViewModel(di, savedStateHandle, saveContentEntryUseCase, enqueueContentEntryImportUseCase) {
    var tmp;
    if (saveContentEntryUseCase === VOID) {
      // Inline function 'org.kodein.di.instance' call
      var tmp_0 = get_direct(onActiveEndpoint(di)).s57();
      // Inline function 'org.kodein.type.generic' call
      var tmp_1 = typeToken(createKType(getKClass(SaveContentEntryUseCase), arrayOf([]), false));
      var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
      tmp = tmp_0.q57(tmp$ret$0, null);
    } else {
      tmp = saveContentEntryUseCase;
    }
    saveContentEntryUseCase = tmp;
    var tmp_2;
    if (enqueueContentEntryImportUseCase === VOID) {
      // Inline function 'org.kodein.di.instance' call
      var tmp_3 = get_direct(onActiveEndpoint(di)).s57();
      // Inline function 'org.kodein.type.generic' call
      var tmp_4 = typeToken(createKType(getKClass(EnqueueContentEntryImportUseCase), arrayOf([]), false));
      var tmp$ret$0_0 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
      tmp_2 = tmp_3.q57(tmp$ret$0_0, null);
    } else {
      tmp_2 = enqueueContentEntryImportUseCase;
    }
    enqueueContentEntryImportUseCase = tmp_2;
    UstadEditViewModel.call(this, di, savedStateHandle, 'ContentEntryEdit');
    this.ntx_1 = saveContentEntryUseCase;
    this.otx_1 = enqueueContentEntryImportUseCase;
    this.ptx_1 = MutableStateFlow(new ContentEntryEditUiState());
    this.qtx_1 = asStateFlow(this.ptx_1);
    var tmp_5 = this;
    var tmp0_safe_receiver = savedStateHandle.ba('goToOnContentEntryDone');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toInt(tmp0_safe_receiver);
    tmp_5.rtx_1 = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
    this.stx_1 = this.rtx_1 === 1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.pp1_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.<anonymous>' call
        var nextValue = prevValue.nol(VOID, VOID, VOID, VOID, true);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_6 = ContentEntryEditViewModel$slambda_0(this, null);
    this.vp2(tmp_6, VOID, VOID, ContentEntryEditViewModel$slambda_2(this, savedStateHandle, null));
  }
  protoOf(ContentEntryEditViewModel).pty = function (contentEntry) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.ptx_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.onContentEntryChanged.<anonymous>' call
        var tmp0_safe_receiver = prevValue.dty_1;
        var nextValue = prevValue.ztz(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ej5(contentEntry));
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var updatedState = tmp$ret$1;
    scheduleEntityCommit(this, updatedState.dty_1);
  };
  protoOf(ContentEntryEditViewModel).zs6 = function (pictureUri) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.ptx_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.onPictureChanged.<anonymous>' call
        var tmp1_safe_receiver = prevValue.dty_1;
        var tmp;
        if (tmp1_safe_receiver == null) {
          tmp = null;
        } else {
          var tmp0_safe_receiver = prevValue.dty_1.cj5_1;
          tmp = tmp1_safe_receiver.ej5(VOID, VOID, VOID, tmp0_safe_receiver == null ? null : tmp0_safe_receiver.zjd(VOID, VOID, pictureUri));
        }
        var nextValue = prevValue.ztz(tmp);
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var updatedState = tmp$ret$1;
    scheduleEntityCommit(this, updatedState.dty_1);
  };
  protoOf(ContentEntryEditViewModel).du3 = function (compressionLevel) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.ptx_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.onSetCompressionLevel.<anonymous>' call
        var tmp1_safe_receiver = prevValue.dty_1;
        var tmp;
        if (tmp1_safe_receiver == null) {
          tmp = null;
        } else {
          var tmp0_safe_receiver = prevValue.dty_1.bj5_1;
          tmp = tmp1_safe_receiver.ej5(VOID, VOID, tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ojd(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, compressionLevel.ino_1));
        }
        var nextValue = prevValue.ztz(tmp);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ContentEntryEditViewModel).eu3 = function (uri, fileName) {
    var tmp = Companion_instance_79.a4r();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.onSubtitleFileAdded.<anonymous>' call
    // Inline function 'kotlin.collections.set' call
    this_0.s('uri', uri);
    // Inline function 'kotlin.collections.set' call
    var key = 'filename';
    this_0.s(key, fileName);
    var tmp$ret$2 = this_0.f3();
    this.rp2('GetSubtitle', 'subtitleKey', null, tmp, tmp$ret$2);
  };
  protoOf(ContentEntryEditViewModel).fu3 = function (subtitleTrack) {
    this.rp2('SubtitleEdit', 'subtitleKey', subtitleTrack, Companion_instance_79.a4r());
  };
  protoOf(ContentEntryEditViewModel).gu3 = function (subtitleTrack) {
    updateSubtitles(this, ContentEntryEditViewModel$onClickDeleteSubtitleTrack$lambda(subtitleTrack));
  };
  protoOf(ContentEntryEditViewModel).cqf = function () {
    var entityVal = this.ptx_1.t2().dty_1;
    var tmp0_safe_receiver = this.ptx_1.t2().dty_1;
    var contentEntry = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.zj4_1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.ptx_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.onClickSave.<anonymous>' call
        var tmp;
        // Inline function 'kotlin.text.isNullOrBlank' call
        var this_1 = contentEntry == null ? null : contentEntry.gah_1;
        // Inline function 'kotlin.contracts.contract' call
        if (this_1 == null ? true : isBlank(this_1)) {
          tmp = this.jp2().en6(strings_getInstance().ome_1);
        } else {
          tmp = null;
        }
        var nextValue = prevValue.ztz(VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    if (hasErrors_2(this.ptx_1.t2(), this)) {
      this.lp2(Companion_getInstance_85().vol_1);
      $l$block_0: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_2 = this.ptx_1;
        while (true) {
          var prevValue_0 = this_2.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.onClickSave.<anonymous>' call
          var nextValue_0 = prevValue_0.ztz(VOID, VOID, VOID, VOID, true);
          if (this_2.y1k(prevValue_0, nextValue_0)) {
            break $l$block_0;
          }
        }
      }
      return Unit_instance;
    }
    var tmp2_elvis_lhs = entityVal == null ? null : entityVal.zj4_1;
    var tmp_0;
    if (tmp2_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp_0 = tmp2_elvis_lhs;
    }
    var contentEntryVal = tmp_0;
    if (!this.ptx_1.t2().hty_1) {
      return Unit_instance;
    }
    $l$block_1: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_3 = this.ptx_1;
      while (true) {
        var prevValue_1 = this_3.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.onClickSave.<anonymous>' call
        var nextValue_1 = prevValue_1.ztz(VOID, VOID, VOID, VOID, false);
        if (this_3.y1k(prevValue_1, nextValue_1)) {
          break $l$block_1;
        }
      }
    }
    if (this.rtx_1 === 1) {
      Companion_getInstance_153();
      // Inline function 'kotlin.collections.buildMap' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'kotlin.collections.buildMapInternal' call
      // Inline function 'kotlin.apply' call
      var this_4 = LinkedHashMap_init_$Create$();
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.contententry.edit.ContentEntryEditViewModel.onClickSave.<anonymous>' call
      // Inline function 'kotlin.collections.set' call
      Companion_getInstance_153();
      var key = 'SelectedContentEntry';
      var value = this.z4q().e45(Companion_instance_40.a4r(), entityVal);
      this_4.s(key, value);
      this.xp2(this_4, Companion_getInstance_153().nu3_1);
      var tmp$ret$9 = this_4.f3();
      this.np1_1.sns('CourseBlockEdit', tmp$ret$9);
    } else if (this.rtx_1 === 2) {
      this.up7(entityVal);
    } else {
      var tmp_1 = this.cp2();
      launch(tmp_1, VOID, VOID, ContentEntryEditViewModel$onClickSave$slambda_0(this, contentEntryVal, entityVal, null));
    }
  };
  function ContentEntryEditUiState(entity, licenceOptions, storageOptions, courseBlockEditUiState, fieldsEnabled, updateContentVisible, importError, titleError, selectedContainerStorageDir, metadataResult, compressionEnabled, subtitles) {
    entity = entity === VOID ? null : entity;
    licenceOptions = licenceOptions === VOID ? emptyList() : licenceOptions;
    storageOptions = storageOptions === VOID ? emptyList() : storageOptions;
    courseBlockEditUiState = courseBlockEditUiState === VOID ? new CourseBlockEditUiState() : courseBlockEditUiState;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    updateContentVisible = updateContentVisible === VOID ? false : updateContentVisible;
    importError = importError === VOID ? null : importError;
    titleError = titleError === VOID ? null : titleError;
    selectedContainerStorageDir = selectedContainerStorageDir === VOID ? null : selectedContainerStorageDir;
    metadataResult = metadataResult === VOID ? null : metadataResult;
    compressionEnabled = compressionEnabled === VOID ? false : compressionEnabled;
    subtitles = subtitles === VOID ? emptyList() : subtitles;
    this.dty_1 = entity;
    this.ety_1 = licenceOptions;
    this.fty_1 = storageOptions;
    this.gty_1 = courseBlockEditUiState;
    this.hty_1 = fieldsEnabled;
    this.ity_1 = updateContentVisible;
    this.jty_1 = importError;
    this.kty_1 = titleError;
    this.lty_1 = selectedContainerStorageDir;
    this.mty_1 = metadataResult;
    this.nty_1 = compressionEnabled;
    this.oty_1 = subtitles;
  }
  protoOf(ContentEntryEditUiState).ou3 = function () {
    var tmp0_safe_receiver = this.dty_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.bj5_1;
    var tmp = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.sax_1;
    return tmp === 101;
  };
  protoOf(ContentEntryEditUiState).pu3 = function (entity, licenceOptions, storageOptions, courseBlockEditUiState, fieldsEnabled, updateContentVisible, importError, titleError, selectedContainerStorageDir, metadataResult, compressionEnabled, subtitles) {
    return new ContentEntryEditUiState(entity, licenceOptions, storageOptions, courseBlockEditUiState, fieldsEnabled, updateContentVisible, importError, titleError, selectedContainerStorageDir, metadataResult, compressionEnabled, subtitles);
  };
  protoOf(ContentEntryEditUiState).ztz = function (entity, licenceOptions, storageOptions, courseBlockEditUiState, fieldsEnabled, updateContentVisible, importError, titleError, selectedContainerStorageDir, metadataResult, compressionEnabled, subtitles, $super) {
    entity = entity === VOID ? this.dty_1 : entity;
    licenceOptions = licenceOptions === VOID ? this.ety_1 : licenceOptions;
    storageOptions = storageOptions === VOID ? this.fty_1 : storageOptions;
    courseBlockEditUiState = courseBlockEditUiState === VOID ? this.gty_1 : courseBlockEditUiState;
    fieldsEnabled = fieldsEnabled === VOID ? this.hty_1 : fieldsEnabled;
    updateContentVisible = updateContentVisible === VOID ? this.ity_1 : updateContentVisible;
    importError = importError === VOID ? this.jty_1 : importError;
    titleError = titleError === VOID ? this.kty_1 : titleError;
    selectedContainerStorageDir = selectedContainerStorageDir === VOID ? this.lty_1 : selectedContainerStorageDir;
    metadataResult = metadataResult === VOID ? this.mty_1 : metadataResult;
    compressionEnabled = compressionEnabled === VOID ? this.nty_1 : compressionEnabled;
    subtitles = subtitles === VOID ? this.oty_1 : subtitles;
    return $super === VOID ? this.pu3(entity, licenceOptions, storageOptions, courseBlockEditUiState, fieldsEnabled, updateContentVisible, importError, titleError, selectedContainerStorageDir, metadataResult, compressionEnabled, subtitles) : $super.pu3.call(this, entity, licenceOptions, storageOptions, courseBlockEditUiState, fieldsEnabled, updateContentVisible, importError, titleError, selectedContainerStorageDir, metadataResult, compressionEnabled, subtitles);
  };
  protoOf(ContentEntryEditUiState).toString = function () {
    return 'ContentEntryEditUiState(entity=' + this.dty_1 + ', licenceOptions=' + this.ety_1 + ', storageOptions=' + this.fty_1 + ', courseBlockEditUiState=' + this.gty_1 + ', fieldsEnabled=' + this.hty_1 + ', updateContentVisible=' + this.ity_1 + ', importError=' + this.jty_1 + ', titleError=' + this.kty_1 + ', selectedContainerStorageDir=' + this.lty_1 + ', metadataResult=' + this.mty_1 + ', compressionEnabled=' + this.nty_1 + ', subtitles=' + this.oty_1 + ')';
  };
  protoOf(ContentEntryEditUiState).hashCode = function () {
    var result = this.dty_1 == null ? 0 : this.dty_1.hashCode();
    result = imul(result, 31) + hashCode(this.ety_1) | 0;
    result = imul(result, 31) + hashCode(this.fty_1) | 0;
    result = imul(result, 31) + this.gty_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.hty_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ity_1) | 0;
    result = imul(result, 31) + (this.jty_1 == null ? 0 : getStringHashCode(this.jty_1)) | 0;
    result = imul(result, 31) + (this.kty_1 == null ? 0 : getStringHashCode(this.kty_1)) | 0;
    result = imul(result, 31) + (this.lty_1 == null ? 0 : hashCode(this.lty_1)) | 0;
    result = imul(result, 31) + (this.mty_1 == null ? 0 : this.mty_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.nty_1) | 0;
    result = imul(result, 31) + hashCode(this.oty_1) | 0;
    return result;
  };
  protoOf(ContentEntryEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentEntryEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ContentEntryEditUiState ? other : THROW_CCE();
    if (!equals(this.dty_1, tmp0_other_with_cast.dty_1))
      return false;
    if (!equals(this.ety_1, tmp0_other_with_cast.ety_1))
      return false;
    if (!equals(this.fty_1, tmp0_other_with_cast.fty_1))
      return false;
    if (!this.gty_1.equals(tmp0_other_with_cast.gty_1))
      return false;
    if (!(this.hty_1 === tmp0_other_with_cast.hty_1))
      return false;
    if (!(this.ity_1 === tmp0_other_with_cast.ity_1))
      return false;
    if (!(this.jty_1 == tmp0_other_with_cast.jty_1))
      return false;
    if (!(this.kty_1 == tmp0_other_with_cast.kty_1))
      return false;
    if (!equals(this.lty_1, tmp0_other_with_cast.lty_1))
      return false;
    if (!equals(this.mty_1, tmp0_other_with_cast.mty_1))
      return false;
    if (!(this.nty_1 === tmp0_other_with_cast.nty_1))
      return false;
    if (!equals(this.oty_1, tmp0_other_with_cast.oty_1))
      return false;
    return true;
  };
  function ContentEntryGetMetadataViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.mu4_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.contententry.getmetadata.ContentEntryGetMetadataViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.pu4(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function Companion_128() {
    this.qu4_1 = 'uri';
    this.ru4_1 = 'filename';
    this.su4_1 = 'ContentEntryGetMetadata';
  }
  var Companion_instance_176;
  function Companion_getInstance_145() {
    return Companion_instance_176;
  }
  function ContentEntryGetMetadataViewModel$slambda(this$0, $uriArg, $fileName, resultContinuation) {
    this.bu5_1 = this$0;
    this.cu5_1 = $uriArg;
    this.du5_1 = $fileName;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryGetMetadataViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryGetMetadataViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryGetMetadataViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.id_1 = 2;
            this.fu5_1 = this.bu5_1.lu4_1;
            this.gu5_1 = Companion_getInstance_3().b2r(this.cu5_1);
            this.hu5_1 = this.bu5_1.bp2().xmx();
            this.hd_1 = 1;
            suspendResult = this.fu5_1.mnp(this.gu5_1, this.du5_1, this.hu5_1, ContentEntryGetMetadataViewModel$slambda$lambda(this.bu5_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var metadataResult = suspendResult;
            var this_0 = LinkedHashMap_init_$Create$();
            this_0.s('metadata', this.bu5_1.z4q().e45(Companion_instance_80.a4r(), metadataResult));
            this.bu5_1.xp2(this_0, Companion_getInstance_153().nu3_1);
            Companion_getInstance_102();
            this.bu5_1.wp2(this_0, 'result_viewname');
            Companion_getInstance_102();
            this.bu5_1.wp2(this_0, 'result_key');
            Companion_getInstance_112();
            this.bu5_1.wp2(this_0, 'parentUid');
            this.bu5_1.np1_1.eoo('ContentEntryEdit', this_0.f3(), new UstadGoOptions('ContentEntryGetMetadata', true));
            this.id_1 = 3;
            this.hd_1 = 4;
            continue $sm;
          case 2:
            this.id_1 = 3;
            var tmp_0 = this.kd_1;
            if (tmp_0 instanceof Error) {
              var e = this.kd_1;
              var tmp_1;
              if (e instanceof InvalidContentException) {
                tmp_1 = this.bu5_1.jp2().en6(strings_getInstance().rlm_1) + ' : ' + e.message;
              } else {
                if (e instanceof UnsupportedContentException) {
                  var tmp_2 = this.bu5_1.jp2();
                  var tmp_3 = strings_getInstance().tlm_1;
                  var tmp3_elvis_lhs = e.message;
                  tmp_1 = tmp_2.fn6(tmp_3, [tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs]);
                } else {
                  tmp_1 = this.bu5_1.jp2().en6(strings_getInstance().glc_1) + ' : other: ' + e.message;
                }
              }
              var errorMessage = tmp_1;
              l$ret$1: do {
                var this_1 = this.bu5_1.mu4_1;
                while (true) {
                  var prevValue = this_1.t2();
                  var nextValue = prevValue.pu4(prevValue.ou4_1.tnp(VOID, errorMessage));
                  if (this_1.y1k(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
              this.hd_1 = 4;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 3:
            throw this.kd_1;
          case 4:
            this.id_1 = 3;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 3) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(ContentEntryGetMetadataViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ContentEntryGetMetadataViewModel$slambda(this.bu5_1, this.cu5_1, this.du5_1, completion);
    i.eu5_1 = $this$launch;
    return i;
  };
  function ContentEntryGetMetadataViewModel$slambda_0(this$0, $uriArg, $fileName, resultContinuation) {
    var i = new ContentEntryGetMetadataViewModel$slambda(this$0, $uriArg, $fileName, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryGetMetadataViewModel(di, savedStateHandle, contentEntryGetMetaDataFromUriUseCase) {
    var tmp;
    if (contentEntryGetMetaDataFromUriUseCase === VOID) {
      // Inline function 'org.kodein.di.instance' call
      var tmp_0 = get_direct(onActiveEndpoint(di)).s57();
      // Inline function 'org.kodein.type.generic' call
      var tmp_1 = typeToken(createKType(getKClass(ContentEntryGetMetaDataFromUriUseCase), arrayOf([]), false));
      var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
      tmp = tmp_0.q57(tmp$ret$0, null);
    } else {
      tmp = contentEntryGetMetaDataFromUriUseCase;
    }
    contentEntryGetMetaDataFromUriUseCase = tmp;
    UstadViewModel.call(this, di, savedStateHandle, 'ContentEntryGetMetadata');
    this.lu4_1 = contentEntryGetMetaDataFromUriUseCase;
    this.mu4_1 = MutableStateFlow(new ContentEntryGetMetadataUiState());
    this.nu4_1 = asStateFlow(this.mu4_1);
    var tmp0_elvis_lhs = savedStateHandle.ba('uri');
    var tmp_2;
    if (tmp0_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('No uri');
    } else {
      tmp_2 = tmp0_elvis_lhs;
    }
    var uriArg = tmp_2;
    var fileName = savedStateHandle.ba('filename');
    var tmp_3 = this.cp2();
    launch(tmp_3, VOID, VOID, ContentEntryGetMetadataViewModel$slambda_0(this, uriArg, fileName, null));
  }
  function ContentEntryGetMetadataUiState(status) {
    status = status === VOID ? new ContentEntryGetMetadataStatus() : status;
    this.ou4_1 = status;
  }
  protoOf(ContentEntryGetMetadataUiState).pu4 = function (status) {
    return new ContentEntryGetMetadataUiState(status);
  };
  protoOf(ContentEntryGetMetadataUiState).toString = function () {
    return 'ContentEntryGetMetadataUiState(status=' + this.ou4_1 + ')';
  };
  protoOf(ContentEntryGetMetadataUiState).hashCode = function () {
    return this.ou4_1.hashCode();
  };
  protoOf(ContentEntryGetMetadataUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentEntryGetMetadataUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ContentEntryGetMetadataUiState ? other : THROW_CCE();
    if (!this.ou4_1.equals(tmp0_other_with_cast.ou4_1))
      return false;
    return true;
  };
  function _get_getSubtitleTrackUseCase__ux9onr($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.fu6_1;
    getSubtitleTrackUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_129() {
    this.gu6_1 = 'GetSubtitle';
  }
  var Companion_instance_177;
  function Companion_getInstance_146() {
    return Companion_instance_177;
  }
  function GetSubtitleViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.pu6_1 = this$0;
    this.qu6_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(GetSubtitleViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(GetSubtitleViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(GetSubtitleViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = _get_getSubtitleTrackUseCase__ux9onr(this.pu6_1);
            var tmp_1 = Companion_getInstance_3();
            var tmp_2 = tmp_1.b2r(require_0(this.qu6_1, 'uri'));
            suspendResult = tmp_0.znp(tmp_2, require_0(this.qu6_1, 'filename'), VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var subtitleTrack = suspendResult;
            var this_0 = LinkedHashMap_init_$Create$();
            Companion_getInstance_112();
            this_0.s('entityState', this.pu6_1.z4q().e45(Companion_instance_79.a4r(), subtitleTrack));
            Companion_getInstance_112();
            this.pu6_1.wp2(this_0, 'result_viewname');
            Companion_getInstance_112();
            this.pu6_1.wp2(this_0, 'result_key');
            this.pu6_1.np1_1.eoo('SubtitleEdit', this_0.f3(), new UstadGoOptions('GetSubtitle', true));
            this.id_1 = 3;
            this.hd_1 = 4;
            continue $sm;
          case 2:
            this.id_1 = 3;
            var tmp_3 = this.kd_1;
            if (tmp_3 instanceof Error) {
              var e = this.kd_1;
              l$ret$1: do {
                var this_1 = this.pu6_1.du6_1;
                while (true) {
                  var prevValue = this_1.t2();
                  var nextValue = prevValue.tu6(this.pu6_1.jp2().en6(strings_getInstance().glc_1) + ': ' + e.message);
                  if (this_1.y1k(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
              this.hd_1 = 4;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 3:
            throw this.kd_1;
          case 4:
            this.id_1 = 3;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 3) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(GetSubtitleViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new GetSubtitleViewModel$slambda(this.pu6_1, this.qu6_1, completion);
    i.ru6_1 = $this$launch;
    return i;
  };
  function GetSubtitleViewModel$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new GetSubtitleViewModel$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function GetSubtitleViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'GetSubtitle');
    this.du6_1 = MutableStateFlow(new GetSubtitleUiState());
    this.eu6_1 = asStateFlow(this.du6_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = this.bp2().xmx();
    var trigger = this.q56();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_0 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var tmp$ret$1 = tmp_0.u56(tmp$ret$0, context);
    var this_0 = On(this, tmp$ret$1, trigger);
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(GetSubtitleTrackFromUriUseCase), arrayOf([]), false));
    var tmp$ret$3 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp.fu6_1 = Instance(this_0, tmp$ret$3, null).n5c(this, getSubtitleTrackUseCase$factory());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.pp1_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.getsubtitle.GetSubtitleViewModel.<anonymous>' call
        var nextValue = prevValue.nol(VOID, VOID, this.jp2().en6(strings_getInstance().cm5_1));
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_3 = this.cp2();
    launch(tmp_3, VOID, VOID, GetSubtitleViewModel$slambda_0(this, savedStateHandle, null));
  }
  function GetSubtitleUiState(error) {
    error = error === VOID ? null : error;
    this.su6_1 = error;
  }
  protoOf(GetSubtitleUiState).tu6 = function (error) {
    return new GetSubtitleUiState(error);
  };
  protoOf(GetSubtitleUiState).toString = function () {
    return 'GetSubtitleUiState(error=' + this.su6_1 + ')';
  };
  protoOf(GetSubtitleUiState).hashCode = function () {
    return this.su6_1 == null ? 0 : getStringHashCode(this.su6_1);
  };
  protoOf(GetSubtitleUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof GetSubtitleUiState))
      return false;
    var tmp0_other_with_cast = other instanceof GetSubtitleUiState ? other : THROW_CCE();
    if (!(this.su6_1 == tmp0_other_with_cast.su6_1))
      return false;
    return true;
  };
  function getSubtitleTrackUseCase$factory() {
    return getPropertyCallableRef('getSubtitleTrackUseCase', 1, KProperty1, function (receiver) {
      return _get_getSubtitleTrackUseCase__ux9onr(receiver);
    }, null);
  }
  function getSubtitleTrackUseCase$factory_0() {
    return getPropertyCallableRef('getSubtitleTrackUseCase', 1, KProperty1, function (receiver) {
      return _get_getSubtitleTrackUseCase__ux9onr(receiver);
    }, null);
  }
  function _get_httpClient__2ty1zc_1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.ru7_1;
    httpClient$factory_4();
    return this_0.t2();
  }
  function Companion_130() {
    this.uu7_1 = 'ContentEntryImportLink';
    this.vu7_1 = 'importUrl';
  }
  var Companion_instance_178;
  function Companion_getInstance_147() {
    return Companion_instance_178;
  }
  function ContentEntryImportLinkViewModel$onClickNext$ref($boundThis) {
    var l = function () {
      $boundThis.wu7();
      return Unit_instance;
    };
    l.callableName = 'onClickNext';
    return l;
  }
  function ContentEntryImportLinkViewModel$onChangeLink$slambda(this$0, $url, resultContinuation) {
    this.fu8_1 = this$0;
    this.gu8_1 = $url;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryImportLinkViewModel$onChangeLink$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryImportLinkViewModel$onChangeLink$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryImportLinkViewModel$onChangeLink$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = delay(new Long(200, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.fu8_1.lp1_1.rox('importUrl', this.gu8_1);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryImportLinkViewModel$onChangeLink$slambda).v1m = function ($this$launch, completion) {
    var i = new ContentEntryImportLinkViewModel$onChangeLink$slambda(this.fu8_1, this.gu8_1, completion);
    i.hu8_1 = $this$launch;
    return i;
  };
  function ContentEntryImportLinkViewModel$onChangeLink$slambda_0(this$0, $url, resultContinuation) {
    var i = new ContentEntryImportLinkViewModel$onChangeLink$slambda(this$0, $url, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryImportLinkViewModel$onClickNext$slambda(this$0, resultContinuation) {
    this.qu8_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryImportLinkViewModel$onClickNext$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryImportLinkViewModel$onClickNext$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryImportLinkViewModel$onClickNext$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 9;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.id_1 = 8;
            this.id_1 = 7;
            var tmp_0 = this;
            tmp_0.uu8_1 = _get_httpClient__2ty1zc_1(this.qu8_1);
            var tmp_1 = this;
            tmp_1.vu8_1 = this.uu8_1;
            var tmp_2 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.qu8_1.bp2().xmx().umj_1 + 'api/import/validateLink');
            parameter(this_0, 'url', this.qu8_1.pu7_1.t2().bu9_1);
            set_expectSuccess(this_0, false);
            tmp_2.wu8_1 = this_0;
            this.wu8_1.j38_1 = Companion_getInstance().z2w_1;
            var tmp_3 = this;
            tmp_3.xu8_1 = this.vu8_1;
            var tmp_4 = this;
            tmp_4.yu8_1 = this.wu8_1;
            this.hd_1 = 3;
            suspendResult = (new HttpStatement(this.yu8_1, this.xu8_1)).u3y(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.zu8_1 = suspendResult;
            if (!this.zu8_1.w3a().equals(Companion_getInstance_0().s2x_1)) {
              l$ret$1: do {
                var this_1 = this.qu8_1.pu7_1;
                while (true) {
                  var prevValue = this_1.t2();
                  var nextValue = prevValue.eu9(VOID, this.qu8_1.jp2().en6(strings_getInstance().qlm_1), true);
                  if (this_1.y1k(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
              this.tu8_1 = Unit_instance;
              this.id_1 = 9;
              this.hd_1 = 6;
              continue $sm;
            } else {
              this.hd_1 = 4;
              continue $sm;
            }

          case 4:
            var tmp_5 = this;
            tmp_5.au9_1 = this.qu8_1.z4q();
            this.hd_1 = 5;
            suspendResult = bodyAsText(this.zu8_1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            var string = suspendResult;
            var this_2 = this.au9_1.g45();
            var this_3 = serializer(this_2, createKType(getKClass(MetadataResult), arrayOf([]), false));
            var metadataResult = this.au9_1.f45(isInterface(this_3, KSerializer) ? this_3 : THROW_CCE(), string);
            var tmp_6 = this;
            var tmp_7;
            if (this.qu8_1.tu7_1 === 'ContentEntryEdit') {
              var this_4 = LinkedHashMap_init_$Create$();
              this_4.s('metadata', this.qu8_1.z4q().e45(Companion_instance_80.a4r(), metadataResult));
              this.qu8_1.wp2(this_4, 'courseBlock');
              this.qu8_1.wp2(this_4, 'goToOnContentEntryDone');
              Companion_getInstance_102();
              this.qu8_1.wp2(this_4, 'result_viewname');
              Companion_getInstance_102();
              this.qu8_1.wp2(this_4, 'result_key');
              Companion_getInstance_112();
              this.qu8_1.wp2(this_4, 'parentUid');
              Companion_getInstance_112();
              this_4.s('popUpToOnFinish', 'ContentEntryImportLink');
              this.qu8_1.np1_1.sns('ContentEntryEdit', this_4.f3());
              tmp_7 = Unit_instance;
            } else {
              this.qu8_1.up7(metadataResult);
              tmp_7 = Unit_instance;
            }

            tmp_6.su8_1 = tmp_7;
            this.id_1 = 9;
            this.hd_1 = 10;
            continue $sm;
          case 6:
            this.id_1 = 9;
            l$ret$9: do {
              var this_5 = this.qu8_1.pu7_1;
              while (true) {
                var prevValue_0 = this_5.t2();
                var nextValue_0 = prevValue_0.eu9(VOID, VOID, true);
                if (this_5.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$9;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 7:
            this.id_1 = 8;
            var tmp_8 = this.kd_1;
            if (tmp_8 instanceof Exception) {
              var e = this.kd_1;
              var tmp_9 = this;
              this.qu8_1.hp2().com(new Snack(this.qu8_1.jp2().en6(strings_getInstance().glc_1) + (': ' + e)));
              tmp_9.su8_1 = Unit_instance;
              this.id_1 = 9;
              this.hd_1 = 10;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 8:
            this.id_1 = 9;
            var t = this.kd_1;
            l$ret$7: do {
              var this_6 = this.qu8_1.pu7_1;
              while (true) {
                var prevValue_1 = this_6.t2();
                var nextValue_1 = prevValue_1.eu9(VOID, VOID, true);
                if (this_6.y1k(prevValue_1, nextValue_1)) {
                  break l$ret$7;
                }
              }
            }
             while (false);
            throw t;
          case 9:
            throw this.kd_1;
          case 10:
            this.id_1 = 9;
            l$ret$11: do {
              var this_7 = this.qu8_1.pu7_1;
              while (true) {
                var prevValue_2 = this_7.t2();
                var nextValue_2 = prevValue_2.eu9(VOID, VOID, true);
                if (this_7.y1k(prevValue_2, nextValue_2)) {
                  break l$ret$11;
                }
              }
            }
             while (false);
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 9) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(ContentEntryImportLinkViewModel$onClickNext$slambda).v1m = function ($this$launch, completion) {
    var i = new ContentEntryImportLinkViewModel$onClickNext$slambda(this.qu8_1, completion);
    i.ru8_1 = $this$launch;
    return i;
  };
  function ContentEntryImportLinkViewModel$onClickNext$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryImportLinkViewModel$onClickNext$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryImportLinkViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'ContentEntryImportLink');
    this.pu7_1 = MutableStateFlow(new ContentEntryImportLinkUiState());
    this.qu7_1 = asStateFlow(this.pu7_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.ru7_1 = Instance(this, tmp$ret$0, null).n5c(this, httpClient$factory_3());
    this.su7_1 = null;
    var tmp_1 = this;
    Companion_getInstance_112();
    tmp_1.tu7_1 = savedStateHandle.ba('next');
    var tmp_2 = this.jp2().en6(strings_getInstance().glm_1);
    var tmp_3 = this.jp2().en6(strings_getInstance().jld_1);
    this.pp1_1.x1k(new AppUiState(VOID, VOID, tmp_2, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_3, VOID, ContentEntryImportLinkViewModel$onClickNext$ref(this))));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.pu7_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.importlink.ContentEntryImportLinkViewModel.<anonymous>' call
        var tmp0_elvis_lhs = savedStateHandle.ba('importUrl');
        var nextValue = prevValue.eu9(tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  }
  protoOf(ContentEntryImportLinkViewModel).fu9 = function (url) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.pu7_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.importlink.ContentEntryImportLinkViewModel.onChangeLink.<anonymous>' call
        var nextValue = prevValue.eu9(url, !(url === prevValue.bu9_1) ? null : prevValue.cu9_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp0_safe_receiver = this.su7_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp = this;
    var tmp_0 = this.cp2();
    tmp.su7_1 = launch(tmp_0, VOID, VOID, ContentEntryImportLinkViewModel$onChangeLink$slambda_0(this, url, null));
  };
  protoOf(ContentEntryImportLinkViewModel).wu7 = function () {
    if (!this.pu7_1.t2().du9_1) {
      return Unit_instance;
    }
    if (isBlank(this.pu7_1.t2().bu9_1)) {
      Napier_getInstance().v5d('link is blank');
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this.pu7_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.contententry.importlink.ContentEntryImportLinkViewModel.onClickNext.<anonymous>' call
          var nextValue = prevValue.eu9(VOID, this.jp2().en6(strings_getInstance().blh_1));
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.pu7_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.importlink.ContentEntryImportLinkViewModel.onClickNext.<anonymous>' call
        var nextValue_0 = prevValue_0.eu9(VOID, VOID, false);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp0_safe_receiver = this.su7_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    this.lp1_1.rox('importUrl', this.pu7_1.t2().bu9_1);
    var tmp = this.cp2();
    launch(tmp, VOID, VOID, ContentEntryImportLinkViewModel$onClickNext$slambda_0(this, null));
  };
  function ContentEntryImportLinkUiState(url, linkError, fieldsEnabled) {
    url = url === VOID ? '' : url;
    linkError = linkError === VOID ? null : linkError;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    this.bu9_1 = url;
    this.cu9_1 = linkError;
    this.du9_1 = fieldsEnabled;
  }
  protoOf(ContentEntryImportLinkUiState).gu9 = function (url, linkError, fieldsEnabled) {
    return new ContentEntryImportLinkUiState(url, linkError, fieldsEnabled);
  };
  protoOf(ContentEntryImportLinkUiState).eu9 = function (url, linkError, fieldsEnabled, $super) {
    url = url === VOID ? this.bu9_1 : url;
    linkError = linkError === VOID ? this.cu9_1 : linkError;
    fieldsEnabled = fieldsEnabled === VOID ? this.du9_1 : fieldsEnabled;
    return $super === VOID ? this.gu9(url, linkError, fieldsEnabled) : $super.gu9.call(this, url, linkError, fieldsEnabled);
  };
  protoOf(ContentEntryImportLinkUiState).toString = function () {
    return 'ContentEntryImportLinkUiState(url=' + this.bu9_1 + ', linkError=' + this.cu9_1 + ', fieldsEnabled=' + this.du9_1 + ')';
  };
  protoOf(ContentEntryImportLinkUiState).hashCode = function () {
    var result = getStringHashCode(this.bu9_1);
    result = imul(result, 31) + (this.cu9_1 == null ? 0 : getStringHashCode(this.cu9_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.du9_1) | 0;
    return result;
  };
  protoOf(ContentEntryImportLinkUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentEntryImportLinkUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ContentEntryImportLinkUiState ? other : THROW_CCE();
    if (!(this.bu9_1 === tmp0_other_with_cast.bu9_1))
      return false;
    if (!(this.cu9_1 == tmp0_other_with_cast.cu9_1))
      return false;
    if (!(this.du9_1 === tmp0_other_with_cast.du9_1))
      return false;
    return true;
  };
  function httpClient$factory_3() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_1(receiver);
    }, null);
  }
  function httpClient$factory_4() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_1(receiver);
    }, null);
  }
  function _ContentEntryListItemUiState___init__impl__r5o9qy(contentEntry) {
    return contentEntry;
  }
  function _ContentEntryListItemUiState___get_contentEntry__impl__3g9nl2($this) {
    return $this;
  }
  function _ContentEntryListItemUiState___get_descriptionVisible__impl__xyu083($this) {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var this_0 = _ContentEntryListItemUiState___get_contentEntry__impl__3g9nl2($this).hah_1;
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  }
  function _ContentEntryListItemUiState___get_mimetypeVisible__impl__l8r8g7($this) {
    return _ContentEntryListItemUiState___get_contentEntry__impl__3g9nl2($this).uah_1;
  }
  function ContentEntryListItemUiState__toString_impl_2mjydu($this) {
    return 'ContentEntryListItemUiState(contentEntry=' + $this + ')';
  }
  function ContentEntryListItemUiState__hashCode_impl_odpv6p($this) {
    return $this.hashCode();
  }
  function ContentEntryListItemUiState__equals_impl_d3bksl($this, other) {
    if (!(other instanceof ContentEntryListItemUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ContentEntryListItemUiState ? other.hu9_1 : THROW_CCE();
    if (!$this.equals(tmp0_other_with_cast))
      return false;
    return true;
  }
  function ContentEntryListItemUiState(contentEntry) {
    this.hu9_1 = contentEntry;
  }
  protoOf(ContentEntryListItemUiState).toString = function () {
    return ContentEntryListItemUiState__toString_impl_2mjydu(this.hu9_1);
  };
  protoOf(ContentEntryListItemUiState).hashCode = function () {
    return ContentEntryListItemUiState__hashCode_impl_odpv6p(this.hu9_1);
  };
  protoOf(ContentEntryListItemUiState).equals = function (other) {
    return ContentEntryListItemUiState__equals_impl_d3bksl(this.hu9_1, other);
  };
  function get_listItemUiState_0(_this__u8e3s4) {
    return _ContentEntryListItemUiState___init__impl__r5o9qy(_this__u8e3s4);
  }
  function ContentEntryListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.qu9_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryListViewModel$slambda$slambda$slambda).dou = function (hasNewContentPermission, $completion) {
    var tmp = this.eou(hasNewContentPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryListViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.dou((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryListViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.qu9_1.gpa_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp_0;
              if (!(prevValue.hua_1 === this.ru9_1)) {
                tmp_0 = prevValue.jua(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.ru9_1);
              } else {
                tmp_0 = prevValue;
              }
              var nextValue = tmp_0;
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_1 = this.qu9_1.pp1_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var nextValue_0 = prevValue_0.nol(prevValue_0.yok_1.tol(this.ru9_1 ? !this.qu9_1.pub_1 : false));
              if (this_1.y1k(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryListViewModel$slambda$slambda$slambda).eou = function (hasNewContentPermission, completion) {
    var i = new ContentEntryListViewModel$slambda$slambda$slambda(this.qu9_1, completion);
    i.ru9_1 = hasNewContentPermission;
    return i;
  };
  function ContentEntryListViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryListViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (hasNewContentPermission, $completion) {
      return i.dou(hasNewContentPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryListViewModel$slambda$slambda(this$0, $hasPermissionFlow, resultContinuation) {
    this.auc_1 = this$0;
    this.buc_1 = $hasPermissionFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryListViewModel$slambda$slambda).m86 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryListViewModel$slambda$slambda).z77 = function ($completion) {
    return this.m86($completion);
  };
  protoOf(ContentEntryListViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            if (!this.auc_1.lub_1) {
              this.hd_1 = 2;
              var tmp_0 = ContentEntryListViewModel$slambda$slambda$slambda_0(this.auc_1, null);
              suspendResult = this.buc_1.h1h(new sam$kotlinx_coroutines_flow_FlowCollector$0_23(tmp_0), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 1;
              continue $sm;
            }

          case 1:
            return Unit_instance;
          case 2:
            throwKotlinNothingValueException();
            break;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryListViewModel$slambda$slambda).y77 = function (completion) {
    return new ContentEntryListViewModel$slambda$slambda(this.auc_1, this.buc_1, completion);
  };
  function ContentEntryListViewModel$slambda$slambda_0(this$0, $hasPermissionFlow, resultContinuation) {
    var i = new ContentEntryListViewModel$slambda$slambda(this$0, $hasPermissionFlow, resultContinuation);
    var l = function ($completion) {
      return i.m86($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ContentEntryListViewModel$slambda$slambda_1($savedStateHandle, this$0, resultContinuation) {
    this.kuc_1 = $savedStateHandle;
    this.luc_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryListViewModel$slambda$slambda_1).jop = function (result, $completion) {
    var tmp = this.kop(result, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryListViewModel$slambda$slambda_1).he = function (p1, $completion) {
    return this.jop(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryListViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            var tmp_0 = this;
            var tmp_1 = this.muc_1.qoo_1;
            var tmp0_elvis_lhs = tmp_1 instanceof ContentEntry ? tmp_1 : null;
            var tmp_2;
            if (tmp0_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_2 = tmp0_elvis_lhs;
            }

            tmp_0.nuc_1 = tmp_2;
            var tmp_3 = this;
            var tmp1_safe_receiver = this.kuc_1.ba('entriesToMove');
            var tmp_4;
            if (tmp1_safe_receiver == null) {
              tmp_4 = null;
            } else {
              tmp_4 = this.luc_1.z4q().f45(ListSerializer(Companion_instance_181.a4r()), tmp1_safe_receiver);
            }

            var tmp2_elvis_lhs = tmp_4;
            var tmp_5;
            if (tmp2_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_5 = tmp2_elvis_lhs;
            }

            tmp_3.ouc_1 = tmp_5;
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = _get_moveContentEntriesUseCase__fb3hfi(this.luc_1).fnw(this.nuc_1, toSet(this.ouc_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.luc_1.hp2().com(new Snack(this.luc_1.jp2().fn6(strings_getInstance().gm2_1, [this.ouc_1.u().toString()])));
            this.id_1 = 4;
            this.hd_1 = 3;
            continue $sm;
          case 2:
            this.id_1 = 4;
            var tmp_6 = this.kd_1;
            if (tmp_6 instanceof Error) {
              var e = this.kd_1;
              Napier_getInstance().z5d('Could not move entries', e);
              var tmp_7 = this.luc_1.hp2();
              var tmp3_elvis_lhs = e.message;
              tmp_7.com(new Snack(tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs));
              this.hd_1 = 3;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 3:
            this.id_1 = 4;
            setSelectedItems(this.luc_1, emptySet());
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 4) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(ContentEntryListViewModel$slambda$slambda_1).kop = function (result, completion) {
    var i = new ContentEntryListViewModel$slambda$slambda_1(this.kuc_1, this.luc_1, completion);
    i.muc_1 = result;
    return i;
  };
  function ContentEntryListViewModel$slambda$slambda_2($savedStateHandle, this$0, resultContinuation) {
    var i = new ContentEntryListViewModel$slambda$slambda_1($savedStateHandle, this$0, resultContinuation);
    var l = function (result, $completion) {
      return i.jop(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryListViewModel$onClickMoveAction$ref($boundThis) {
    var l = function () {
      onClickMoveAction($boundThis);
      return Unit_instance;
    };
    l.callableName = 'onClickMoveAction';
    return l;
  }
  function ContentEntryListViewModel$onClickDeleteAction$ref($boundThis) {
    var l = function () {
      onClickDeleteAction($boundThis);
      return Unit_instance;
    };
    l.callableName = 'onClickDeleteAction';
    return l;
  }
  function ContentEntryListViewModel$slambda$slambda_3(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryListViewModel$slambda$slambda_3).zuc = function (uiState, hasPermission, $completion) {
    var tmp = this.aud(uiState, hasPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryListViewModel$slambda$slambda_3).um = function (p1, p2, $completion) {
    var tmp = p1 instanceof ContentEntryListUiState ? p1 : THROW_CCE();
    return this.zuc(tmp, (!(p2 == null) ? typeof p2 === 'boolean' : false) ? p2 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryListViewModel$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return new Pair(this.xuc_1, this.yuc_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryListViewModel$slambda$slambda_3).aud = function (uiState, hasPermission, completion) {
    var i = new ContentEntryListViewModel$slambda$slambda_3(completion);
    i.xuc_1 = uiState;
    i.yuc_1 = hasPermission;
    return i;
  };
  function ContentEntryListViewModel$slambda$slambda_4(resultContinuation) {
    var i = new ContentEntryListViewModel$slambda$slambda_3(resultContinuation);
    var l = function (uiState, hasPermission, $completion) {
      return i.zuc(uiState, hasPermission, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function ContentEntryListViewModel$slambda$slambda_5(this$0, resultContinuation) {
    this.jud_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryListViewModel$slambda$slambda_5).lud = function (it, $completion) {
    var tmp = this.mud(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryListViewModel$slambda$slambda_5).he = function (p1, $completion) {
    return this.lud(p1 instanceof Pair ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryListViewModel$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp_0;
          if (!this.kud_1.w6_1.eua_1.c1()) {
            tmp_0 = this.kud_1.x6_1;
          } else {
            tmp_0 = false;
          }
          var showMoveIcon = tmp_0;
          if (!(showMoveIcon === !this.jud_1.pp1_1.t2().jol_1.c1())) {
            l$ret$1: do {
              var this_0 = this.jud_1.pp1_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_1;
                if (showMoveIcon) {
                  var tmp_2 = AppStateIcon_MOVE_getInstance();
                  var tmp_3 = this.jud_1.jp2().en6(strings_getInstance().llg_1);
                  var tmp_4 = new AppActionButton(tmp_2, tmp_3, ContentEntryListViewModel$onClickMoveAction$ref(this.jud_1), 'action_move');
                  var tmp_5 = AppStateIcon_DELETE_getInstance();
                  var tmp_6 = this.jud_1.jp2().en6(strings_getInstance().ylc_1);
                  tmp_1 = listOf([tmp_4, new AppActionButton(tmp_5, tmp_6, ContentEntryListViewModel$onClickDeleteAction$ref(this.jud_1), 'action_delete')]);
                } else {
                  tmp_1 = emptyList();
                }
                var nextValue = prevValue.nol(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp_1);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
          }
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ContentEntryListViewModel$slambda$slambda_5).mud = function (it, completion) {
    var i = new ContentEntryListViewModel$slambda$slambda_5(this.jud_1, completion);
    i.kud_1 = it;
    return i;
  };
  function ContentEntryListViewModel$slambda$slambda_6(this$0, resultContinuation) {
    var i = new ContentEntryListViewModel$slambda$slambda_5(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.lud(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_moveContentEntriesUseCase__fb3hfi($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.qub_1;
    moveContentEntriesUseCase$factory_0();
    return this_0.t2();
  }
  function _get_deleteEntriesUseCase__hkwqc9($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.rub_1;
    deleteEntriesUseCase$factory_0();
    return this_0.t2();
  }
  function setSelectedItems($this, selectedEntries) {
    $this.lp1_1.rox('selectedEntries', $this.z4q().e45(ListSerializer(Companion_instance_181.a4r()), toList(selectedEntries)));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = $this.gpa_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.setSelectedItems.<anonymous>' call
        var nextValue = prevValue.jua(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, selectedEntries);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var numItemsSelected = $this.gpa_1.t2().eua_1.u();
    var hasSelectedItems = numItemsSelected > 0;
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = $this.pp1_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.setSelectedItems.<anonymous>' call
        var tmp0_userAccountIconVisible = !hasSelectedItems;
        var tmp;
        if (hasSelectedItems) {
          tmp = $this.jp2().nud(plurals_getInstance().tmi_1, numItemsSelected);
        } else {
          tmp = $this.oub_1;
        }
        var tmp1_title = tmp;
        var tmp_0;
        if (hasSelectedItems) {
          var tmp_1 = AppStateIcon_CLOSE_getInstance();
          var tmp_2 = $this.jp2().en6(strings_getInstance().omf_1);
          tmp_0 = new AppActionButton(tmp_1, tmp_2, ContentEntryListViewModel$setSelectedItems$lambda($this), 'clear_selection');
        } else {
          tmp_0 = null;
        }
        var tmp2_leadingActionButton = tmp_0;
        var tmp3_appBarColors = hasSelectedItems ? AppBarColors_SELECTION_MODE_getInstance() : AppBarColors_STANDARD_getInstance();
        var nextValue_0 = prevValue_0.nol(VOID, VOID, tmp1_title, VOID, VOID, hasSelectedItems, tmp0_userAccountIconVisible, VOID, VOID, VOID, VOID, VOID, tmp2_leadingActionButton, tmp3_appBarColors);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
  }
  function selectDestinationToMoveEntries($this, entries) {
    $this.lp1_1.rox('entriesToMove', $this.z4q().e45(ListSerializer(Companion_instance_181.a4r()), toList(entries)));
    var tmp = Companion_instance_27.a4r();
    $this.rp2('PickContentEntry', 'moveToDestinationResult', null, tmp, mapOf([to('listMode', ListViewMode_PICKER_getInstance().ooy_1), to('selectFolder', 'true')]));
  }
  function onClickMoveAction($this) {
    selectDestinationToMoveEntries($this, $this.gpa_1.t2().eua_1);
  }
  function launchDeleteEntries($this, entries) {
    var tmp = $this.cp2();
    launch(tmp, VOID, VOID, ContentEntryListViewModel$launchDeleteEntries$slambda_0($this, entries, null));
  }
  function onClickDeleteAction($this) {
    launchDeleteEntries($this, $this.gpa_1.t2().eua_1);
  }
  function Companion_131() {
    Companion_instance_179 = this;
    this.oud_1 = 'ContentEntries';
    this.pud_1 = 'ContentEntryListHome';
    this.qud_1 = 'PickContentEntry';
    this.rud_1 = listOf(['ContentEntries', 'ContentEntryListHome', 'PickContentEntry']);
    this.sud_1 = 'filter';
    this.tud_1 = 1;
    this.uud_1 = 2;
    this.vud_1 = 3;
    this.wud_1 = 4;
    this.xud_1 = new Long(1, 0);
    this.yud_1 = 'chipId';
    this.zud_1 = 'moveToDestinationResult';
    this.aue_1 = 'selectFolder';
    this.bue_1 = 'selectedEntries';
    this.cue_1 = 'entriesToMove';
  }
  var Companion_instance_179;
  function Companion_getInstance_148() {
    if (Companion_instance_179 == null)
      new Companion_131();
    return Companion_instance_179;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_23(function_0) {
    this.due_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_23).t1d = function (value, $completion) {
    return this.due_1(value, $completion);
  };
  function createContextMenuItemsForEntry$entriesToAction(this$0, rightClickedItem) {
    var selectedEntries = this$0.gpa_1.t2().eua_1;
    var tmp;
    var tmp_0;
    // Inline function 'kotlin.collections.isNotEmpty' call
    if (!selectedEntries.c1()) {
      tmp_0 = !selectedEntries.a1(rightClickedItem);
    } else {
      tmp_0 = false;
    }
    if (tmp_0) {
      // Inline function 'kotlin.also' call
      var this_0 = toSet(plus_2(selectedEntries, rightClickedItem));
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.createContextMenuItemsForEntry.entriesToAction.<anonymous>' call
      setSelectedItems(this$0, this_0);
      tmp = this_0;
    } else {
      if (selectedEntries.c1()) {
        tmp = setOf(rightClickedItem);
      } else {
        tmp = selectedEntries;
      }
    }
    return tmp;
  }
  function ContentEntryListViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      var tmp;
      switch (this$0.gpa_1.t2().uu9_1) {
        case 2:
          tmp = this$0.fp2().i7d().qag(this$0.dp2());
          break;
        case 3:
          tmp = this$0.fp2().i7d().pag(this$0.dp2());
          break;
        case 4:
          tmp = this$0.fp2().i7d().oag(this$0.dp2(), this$0.kub_1, new Long(0, 0), new Long(0, 0), this$0.gpa_1.t2().zu9_1.lor_1, false);
          break;
        case 1:
          tmp = this$0.fp2().i7d().oag(this$0.dp2(), this$0.kub_1, new Long(0, 0), new Long(0, 0), this$0.gpa_1.t2().zu9_1.lor_1, false);
          break;
        default:
          tmp = new EmptyPagingSource();
          break;
      }
      return tmp;
    };
  }
  function ContentEntryListViewModel$createContextMenuItemsForEntry$ref($boundThis) {
    var l = function (p0) {
      return $boundThis.eue(p0);
    };
    l.callableName = 'createContextMenuItemsForEntry';
    return l;
  }
  function ContentEntryListViewModel$lambda(this$0) {
    return function () {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.gpa_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.jua(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function ContentEntryListViewModel$slambda(this$0, resultContinuation) {
    this.nue_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryListViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryListViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryListViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            if (!(this.nue_1.kp2() == null) ? !this.nue_1.mub_1 : false) {
              this.pue_1 = this.nue_1.jp2().en6(strings_getInstance().xm6_1);
              this.hd_1 = 2;
              continue $sm;
            } else {
              if (this.nue_1.kub_1.equals(new Long(1, 0))) {
                this.pue_1 = this.nue_1.jp2().en6(strings_getInstance().kmb_1);
                this.hd_1 = 2;
                continue $sm;
              } else {
                this.hd_1 = 1;
                suspendResult = this.nue_1.fp2().i7d().nag(this.nue_1.kub_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              }
            }

          case 1:
            var tmp0_elvis_lhs = suspendResult;
            this.pue_1 = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            var ARGUMENT = this.pue_1;
            this.nue_1.oub_1 = ARGUMENT;
            l$ret$1: do {
              var this_0 = this.nue_1.pp1_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.nol(VOID, VOID, this.nue_1.oub_1);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryListViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ContentEntryListViewModel$slambda(this.nue_1, completion);
    i.oue_1 = $this$launch;
    return i;
  };
  function ContentEntryListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ContentEntryListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryListViewModel$slambda_1(this$0, $hasPermissionFlow, resultContinuation) {
    this.yue_1 = this$0;
    this.zue_1 = $hasPermissionFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryListViewModel$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryListViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryListViewModel$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.yue_1.gpa_1, ContentEntryListViewModel$slambda$slambda_0(this.yue_1, this.zue_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryListViewModel$slambda_1).v1m = function ($this$launch, completion) {
    var i = new ContentEntryListViewModel$slambda_1(this.yue_1, this.zue_1, completion);
    i.auf_1 = $this$launch;
    return i;
  };
  function ContentEntryListViewModel$slambda_2(this$0, $hasPermissionFlow, resultContinuation) {
    var i = new ContentEntryListViewModel$slambda_1(this$0, $hasPermissionFlow, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryListViewModel$slambda_3(this$0, $savedStateHandle, resultContinuation) {
    this.juf_1 = this$0;
    this.kuf_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryListViewModel$slambda_3).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryListViewModel$slambda_3).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryListViewModel$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.juf_1.np2(this.juf_1.ip2(), 'moveToDestinationResult');
            var tmp_1 = ContentEntryListViewModel$slambda$slambda_2(this.kuf_1, this.juf_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_23(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryListViewModel$slambda_3).v1m = function ($this$launch, completion) {
    var i = new ContentEntryListViewModel$slambda_3(this.juf_1, this.kuf_1, completion);
    i.luf_1 = $this$launch;
    return i;
  };
  function ContentEntryListViewModel$slambda_4(this$0, $savedStateHandle, resultContinuation) {
    var i = new ContentEntryListViewModel$slambda_3(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryListViewModel$slambda_5(this$0, $hasPermissionFlow, resultContinuation) {
    this.uuf_1 = this$0;
    this.vuf_1 = $hasPermissionFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryListViewModel$slambda_5).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryListViewModel$slambda_5).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryListViewModel$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = combine(this.uuf_1.gpa_1, this.vuf_1, ContentEntryListViewModel$slambda$slambda_4(null));
            var tmp_1 = ContentEntryListViewModel$slambda$slambda_6(this.uuf_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_23(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryListViewModel$slambda_5).v1m = function ($this$launch, completion) {
    var i = new ContentEntryListViewModel$slambda_5(this.uuf_1, this.vuf_1, completion);
    i.wuf_1 = $this$launch;
    return i;
  };
  function ContentEntryListViewModel$slambda_6(this$0, $hasPermissionFlow, resultContinuation) {
    var i = new ContentEntryListViewModel$slambda_5(this$0, $hasPermissionFlow, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryListViewModel$createContextMenuItemsForEntry$lambda(this$0, $rightClickedItem) {
    return function () {
      selectDestinationToMoveEntries(this$0, createContextMenuItemsForEntry$entriesToAction(this$0, $rightClickedItem));
      return Unit_instance;
    };
  }
  function ContentEntryListViewModel$createContextMenuItemsForEntry$lambda_0(this$0, $rightClickedItem) {
    return function () {
      launchDeleteEntries(this$0, createContextMenuItemsForEntry$entriesToAction(this$0, $rightClickedItem));
      return Unit_instance;
    };
  }
  function ContentEntryListViewModel$setSelectedItems$lambda(this$0) {
    return function () {
      setSelectedItems(this$0, emptySet());
      return Unit_instance;
    };
  }
  function ContentEntryListViewModel$launchDeleteEntries$slambda(this$0, $entries, resultContinuation) {
    this.fug_1 = this$0;
    this.gug_1 = $entries;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentEntryListViewModel$launchDeleteEntries$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentEntryListViewModel$launchDeleteEntries$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ContentEntryListViewModel$launchDeleteEntries$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = _get_deleteEntriesUseCase__hkwqc9(this.fug_1).knp(this.gug_1, this.fug_1.dp2(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            setSelectedItems(this.fug_1, emptySet());
            this.fug_1.hp2().com(new Snack(this.fug_1.jp2().nud(plurals_getInstance().umi_1, this.gug_1.u())));
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentEntryListViewModel$launchDeleteEntries$slambda).v1m = function ($this$launch, completion) {
    var i = new ContentEntryListViewModel$launchDeleteEntries$slambda(this.fug_1, this.gug_1, completion);
    i.hug_1 = $this$launch;
    return i;
  };
  function ContentEntryListViewModel$launchDeleteEntries$slambda_0(this$0, $entries, resultContinuation) {
    var i = new ContentEntryListViewModel$launchDeleteEntries$slambda(this$0, $entries, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ContentEntryListViewModel(di, savedStateHandle, destName) {
    Companion_getInstance_148();
    UstadListViewModel.call(this, di, savedStateHandle, new ContentEntryListUiState(), destName);
    var tmp = this;
    Companion_getInstance_112();
    var tmp0_safe_receiver = savedStateHandle.ba('parentUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.kub_1 = tmp1_elvis_lhs == null ? new Long(1, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    var tmp0_safe_receiver_0 = savedStateHandle.ba('goToOnContentEntryDone');
    var tmp_1 = tmp0_safe_receiver_0 == null ? null : toInt(tmp0_safe_receiver_0);
    tmp_0.lub_1 = tmp_1 === 1;
    var tmp_2 = this;
    var tmp0_safe_receiver_1 = savedStateHandle.ba('selectFolder');
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_1 == null ? null : toBoolean(tmp0_safe_receiver_1);
    tmp_2.mub_1 = tmp1_elvis_lhs_0 == null ? false : tmp1_elvis_lhs_0;
    var tmp_3 = this;
    tmp_3.nub_1 = ContentEntryListViewModel$pagingSourceFactory$lambda(this);
    this.oub_1 = '';
    this.pub_1 = this.mub_1 ? this.lpa().equals(ListViewMode_PICKER_getInstance()) : false;
    var tmp_4 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_5 = typeToken(createKType(getKClass(MoveContentEntriesUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE();
    tmp_4.qub_1 = Instance(this_0, tmp$ret$0, null).n5c(this, moveContentEntriesUseCase$factory());
    var tmp_6 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_1 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_7 = typeToken(createKType(getKClass(DeleteContentEntryParentChildJoinUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    tmp_6.rub_1 = Instance(this_1, tmp$ret$2, null).n5c(this, deleteEntriesUseCase$factory());
    var tmp0_safe_receiver_2 = savedStateHandle.ba('selectedEntries');
    var tmp_8;
    if (tmp0_safe_receiver_2 == null) {
      tmp_8 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.<anonymous>' call
      tmp_8 = this.z4q().f45(ListSerializer(Companion_instance_181.a4r()), tmp0_safe_receiver_2);
    }
    var tmp1_safe_receiver = tmp_8;
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : toSet(tmp1_safe_receiver);
    var savedStateSelectedEntries = tmp2_elvis_lhs == null ? emptySet() : tmp2_elvis_lhs;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.gpa_1;
      while (true) {
        var prevValue = this_2.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.<anonymous>' call
        var tmp0_contentEntryList = this.nub_1;
        var tmp1_showSelectFolderButton = this.pub_1;
        var tmp2_contextMenuItems = ContentEntryListViewModel$createContextMenuItemsForEntry$ref(this);
        var nextValue = prevValue.jua(VOID, tmp0_contentEntryList, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, savedStateSelectedEntries, tmp1_showSelectFolderButton, tmp2_contextMenuItems);
        if (this_2.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_3 = this.pp1_1;
      while (true) {
        var prevValue_0 = this_3.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.<anonymous>' call
        var tmp_9 = this.jp2().en6(strings_getInstance().blx_1);
        var tmp_10 = FabIcon_ADD_getInstance();
        var nextValue_0 = prevValue_0.nol(new FabUiState(false, tmp_9, tmp_10, ContentEntryListViewModel$lambda(this)), VOID, VOID, VOID, this.lpa().equals(ListViewMode_PICKER_getInstance()));
        if (this_3.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    if (this.lub_1 ? this.kub_1.equals(new Long(1, 0)) : false) {
      $l$block_1: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_4 = this.gpa_1;
        while (true) {
          var prevValue_1 = this_4.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.<anonymous>' call
          var tmp0_safe_receiver_3 = savedStateHandle.ba('chipId');
          var tmp1_elvis_lhs_1 = tmp0_safe_receiver_3 == null ? null : toInt(tmp0_safe_receiver_3);
          var tmp2_selectedChipId = tmp1_elvis_lhs_1 == null ? 2 : tmp1_elvis_lhs_1;
          var tmp3_filterOptions = listOf([new MessageIdOption2(strings_getInstance().lm6_1, 2), new MessageIdOption2(strings_getInstance().imd_1, 3), new MessageIdOption2(strings_getInstance().kmb_1, 4)]);
          var nextValue_1 = prevValue_1.jua(VOID, VOID, tmp2_selectedChipId, tmp3_filterOptions, VOID, VOID, VOID, VOID, false, true, true);
          if (this_4.y1k(prevValue_1, nextValue_1)) {
            break $l$block_1;
          }
        }
      }
    }
    var tmp_11 = this.fp2().c7f();
    var tmp_12 = this.bp2().vmx().gju_1;
    PermissionFlags_getInstance();
    var hasPermissionFlow = shareIn(tmp_11.uhc(tmp_12, new Long(65536, 0)), this.cp2(), Companion_getInstance_12().v1h());
    var tmp_13 = this.cp2();
    launch(tmp_13, VOID, VOID, ContentEntryListViewModel$slambda_0(this, null));
    var tmp_14 = this.cp2();
    launch(tmp_14, VOID, VOID, ContentEntryListViewModel$slambda_2(this, hasPermissionFlow, null));
    var tmp_15 = this.cp2();
    launch(tmp_15, VOID, VOID, ContentEntryListViewModel$slambda_4(this, savedStateHandle, null));
    var tmp_16 = this.cp2();
    launch(tmp_16, VOID, VOID, ContentEntryListViewModel$slambda_6(this, hasPermissionFlow, null));
  }
  protoOf(ContentEntryListViewModel).eue = function (entry) {
    var uiStateVal = this.gpa_1.t2();
    var tmp;
    if (uiStateVal.hua_1 ? this.lpa().equals(ListViewMode_BROWSER_getInstance()) : false) {
      var rightClickedItem = asSelectedItem(entry);
      if (!uiStateVal.eua_1.a1(rightClickedItem)) {
        setSelectedItems(this, emptySet());
      }
      var tmp_0 = this.jp2().en6(strings_getInstance().smf_1);
      var tmp_1 = new UstadContextMenuItem(tmp_0, ContentEntryListViewModel$createContextMenuItemsForEntry$lambda(this, rightClickedItem));
      var tmp_2 = this.jp2().en6(strings_getInstance().ylc_1);
      tmp = listOf([tmp_1, new UstadContextMenuItem(tmp_2, ContentEntryListViewModel$createContextMenuItemsForEntry$lambda_0(this, rightClickedItem))]);
    } else {
      tmp = emptyList();
    }
    return tmp;
  };
  protoOf(ContentEntryListViewModel).apb = function (searchText) {
  };
  protoOf(ContentEntryListViewModel).bpb = function () {
  };
  protoOf(ContentEntryListViewModel).bt9 = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.gpa_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.onDismissCreateNewOptions.<anonymous>' call
        var nextValue = prevValue.jua(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ContentEntryListViewModel).iug = function () {
    this.bt9();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.onClickNewFolder.<anonymous>' call
    this_0.s('leaf', 'false');
    Companion_getInstance_112();
    this_0.s('parentUid', this.kub_1.toString());
    var tmp$ret$2 = this_0.f3();
    this.tpb('ContentEntryEdit', tmp$ret$2);
  };
  protoOf(ContentEntryListViewModel).jug = function () {
    this.bt9();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.onClickImportFromLink.<anonymous>' call
    this_0.s('leaf', 'true');
    Companion_getInstance_112();
    this_0.s('parentUid', this.kub_1.toString());
    Companion_getInstance_112();
    this_0.s('next', 'ContentEntryEdit');
    this.xp2(this_0, Companion_getInstance_153().nu3_1);
    var tmp$ret$2 = this_0.f3();
    this.tpb('ContentEntryImportLink', tmp$ret$2);
  };
  protoOf(ContentEntryListViewModel).kug = function (fileUri, fileName) {
    this.bt9();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.onImportFile.<anonymous>' call
    this_0.s('uri', fileUri);
    this_0.s('filename', fileName);
    Companion_getInstance_112();
    this_0.s('parentUid', this.kub_1.toString());
    this.xp2(this_0, Companion_getInstance_153().nu3_1);
    var tmp$ret$2 = this_0.f3();
    this.tpb('ContentEntryGetMetadata', tmp$ret$2);
  };
  protoOf(ContentEntryListViewModel).lug = function (entry) {
    if (entry == null)
      return Unit_instance;
    var tmp0_safe_receiver = this.lp1_1.ba('goToOnContentEntryDone');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toInt(tmp0_safe_receiver);
    var goToOnContentEntryEdit = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
    if (entry.uah_1 ? this.pub_1 : false)
      return Unit_instance;
    else {
      var tmp;
      if (this.lpa().equals(ListViewMode_PICKER_getInstance()) ? entry.uah_1 : false) {
        tmp = goToOnContentEntryEdit === 1;
      } else {
        tmp = false;
      }
      if (tmp) {
        Companion_getInstance_153();
        var tmp2_nextViewName = 'CourseBlockEdit';
        var tmp3_key = 'courseblock';
        var tmp4_serializer = Companion_getInstance_13().a4r();
        // Inline function 'kotlin.collections.buildMap' call
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'kotlin.collections.buildMapInternal' call
        // Inline function 'kotlin.apply' call
        var this_0 = LinkedHashMap_init_$Create$();
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.onClickEntry.<anonymous>' call
        this.xp2(this_0, Companion_getInstance_153().nu3_1);
        Companion_getInstance_153();
        this_0.s('SelectedContentEntry', this.z4q().e45(Companion_instance_40.a4r(), new ContentEntryAndContentJob(entry)));
        var tmp5_args = this_0.f3();
        this.rp2(tmp2_nextViewName, tmp3_key, null, tmp4_serializer, tmp5_args, VOID, false);
      } else {
        if (entry.uah_1) {
          Companion_getInstance_142();
          Companion_getInstance_102();
          var tmp_0 = to('entityUid', entry.fah_1.toString());
          Companion_getInstance_112();
          this.np1_1.sns('ContentEntry', mapOf([tmp_0, to('parentUid', this.kub_1.toString())]));
        } else {
          var tmp_1;
          if (this.mp1_1 === 'ContentEntryListHome') {
            tmp_1 = 'ContentEntries';
          } else {
            tmp_1 = this.mp1_1;
          }
          var tmp_2 = tmp_1;
          // Inline function 'kotlin.collections.buildMap' call
          // Inline function 'kotlin.contracts.contract' call
          // Inline function 'kotlin.collections.buildMapInternal' call
          // Inline function 'kotlin.apply' call
          var this_1 = LinkedHashMap_init_$Create$();
          // Inline function 'kotlin.contracts.contract' call
          // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.onClickEntry.<anonymous>' call
          this_1.s('filter', '1');
          Companion_getInstance_112();
          this_1.s('parentUid', entry.fah_1.toString());
          Companion_getInstance_102();
          this.wp2(this_1, 'result_key');
          Companion_getInstance_102();
          this.wp2(this_1, 'result_viewname');
          this.wp2(this_1, 'selectFolder');
          this.wp2(this_1, 'goToOnContentEntryDone');
          var tmp$ret$5 = this_1.f3();
          this.np1_1.sns(tmp_2, tmp$ret$5);
        }
      }
    }
  };
  protoOf(ContentEntryListViewModel).mug = function () {
    // Inline function 'kotlin.apply' call
    var this_0 = new ContentEntry();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.onClickSelectThisFolder.<anonymous>' call
    this_0.fah_1 = this.kub_1;
    this.up7(this_0);
  };
  protoOf(ContentEntryListViewModel).nug = function (entry, selected) {
    var currentSelection = this.gpa_1.t2().eua_1;
    var tmp;
    if (selected) {
      tmp = toSet(plus_2(currentSelection, asSelectedItem(entry)));
    } else {
      // Inline function 'kotlin.collections.filter' call
      // Inline function 'kotlin.collections.filterTo' call
      var destination = ArrayList_init_$Create$();
      var tmp0_iterator = currentSelection.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.onSetSelected.<anonymous>' call
        var tmp0_safe_receiver = entry.iak_1;
        var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.fah_1;
        if (!element.hnp_1.equals(tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs)) {
          destination.i1(element);
        }
      }
      tmp = toSet(destination);
    }
    setSelectedItems(this, tmp);
  };
  protoOf(ContentEntryListViewModel).aqz = function (filterOption) {
    // Inline function 'kotlin.takeIf' call
    var this_0 = this.gpa_1;
    // Inline function 'kotlin.contracts.contract' call
    var tmp;
    // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.onClickFilterChip.<anonymous>' call
    if (!(this_0.t2().uu9_1 === filterOption.qom_1)) {
      tmp = this_0;
    } else {
      tmp = null;
    }
    var tmp0_safe_receiver = tmp;
    if (tmp0_safe_receiver == null)
      null;
    else {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        while (true) {
          var prevValue = tmp0_safe_receiver.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListViewModel.onClickFilterChip.<anonymous>' call
          var nextValue = prevValue.jua(VOID, VOID, filterOption.qom_1);
          if (tmp0_safe_receiver.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    }
    this.lp1_1.rox('chipId', filterOption.qom_1.toString());
    this.ipa_1.i1h(new RefreshCommand());
  };
  function Companion_132() {
    Companion_instance_180 = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().dlg_1;
    var tmp_1 = new SortOrderOption(tmp_0, 1, true);
    var tmp_2 = strings_getInstance().dlg_1;
    tmp.oug_1 = listOf([tmp_1, new SortOrderOption(tmp_2, 2, false)]);
  }
  var Companion_instance_180;
  function Companion_getInstance_149() {
    if (Companion_instance_180 == null)
      new Companion_132();
    return Companion_instance_180;
  }
  function ContentEntryListUiState$_init_$lambda_76lpy3() {
    return new EmptyPagingSource();
  }
  function ContentEntryListUiState$_init_$lambda_76lpy3_0(it) {
    return emptyList();
  }
  function ContentEntryListUiState(filterMode, contentEntryList, selectedChipId, filterOptions, showHiddenEntries, onlyFolderFilter, sortOptions, activeSortOption, createNewFolderItemVisible, importFromLinkItemVisible, importFromFileItemVisible, createNewOptionsVisible, selectedEntries, showSelectFolderButton, contextMenuItems, hasWritePermission) {
    Companion_getInstance_149();
    filterMode = filterMode === VOID ? 1 : filterMode;
    var tmp;
    if (contentEntryList === VOID) {
      tmp = ContentEntryListUiState$_init_$lambda_76lpy3;
    } else {
      tmp = contentEntryList;
    }
    contentEntryList = tmp;
    selectedChipId = selectedChipId === VOID ? 1 : selectedChipId;
    var tmp_0;
    if (filterOptions === VOID) {
      // Inline function 'kotlin.collections.listOf' call
      tmp_0 = emptyList();
    } else {
      tmp_0 = filterOptions;
    }
    filterOptions = tmp_0;
    showHiddenEntries = showHiddenEntries === VOID ? false : showHiddenEntries;
    onlyFolderFilter = onlyFolderFilter === VOID ? false : onlyFolderFilter;
    sortOptions = sortOptions === VOID ? Companion_getInstance_149().oug_1 : sortOptions;
    activeSortOption = activeSortOption === VOID ? first_0(sortOptions) : activeSortOption;
    createNewFolderItemVisible = createNewFolderItemVisible === VOID ? false : createNewFolderItemVisible;
    importFromLinkItemVisible = importFromLinkItemVisible === VOID ? false : importFromLinkItemVisible;
    importFromFileItemVisible = importFromFileItemVisible === VOID ? false : importFromFileItemVisible;
    createNewOptionsVisible = createNewOptionsVisible === VOID ? false : createNewOptionsVisible;
    selectedEntries = selectedEntries === VOID ? emptySet() : selectedEntries;
    showSelectFolderButton = showSelectFolderButton === VOID ? false : showSelectFolderButton;
    var tmp_1;
    if (contextMenuItems === VOID) {
      tmp_1 = ContentEntryListUiState$_init_$lambda_76lpy3_0;
    } else {
      tmp_1 = contextMenuItems;
    }
    contextMenuItems = tmp_1;
    hasWritePermission = hasWritePermission === VOID ? false : hasWritePermission;
    this.su9_1 = filterMode;
    this.tu9_1 = contentEntryList;
    this.uu9_1 = selectedChipId;
    this.vu9_1 = filterOptions;
    this.wu9_1 = showHiddenEntries;
    this.xu9_1 = onlyFolderFilter;
    this.yu9_1 = sortOptions;
    this.zu9_1 = activeSortOption;
    this.aua_1 = createNewFolderItemVisible;
    this.bua_1 = importFromLinkItemVisible;
    this.cua_1 = importFromFileItemVisible;
    this.dua_1 = createNewOptionsVisible;
    this.eua_1 = selectedEntries;
    this.fua_1 = showSelectFolderButton;
    this.gua_1 = contextMenuItems;
    this.hua_1 = hasWritePermission;
    var tmp_2 = this;
    // Inline function 'kotlin.collections.map' call
    var this_0 = this.eua_1;
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListUiState.selectedEntryUids.<anonymous>' call
      var tmp$ret$1 = item.hnp_1;
      destination.i1(tmp$ret$1);
    }
    tmp_2.iua_1 = toSet(destination);
  }
  protoOf(ContentEntryListUiState).pug = function () {
    // Inline function 'kotlin.collections.isNotEmpty' call
    return !this.vu9_1.c1();
  };
  protoOf(ContentEntryListUiState).qug = function (filterMode, contentEntryList, selectedChipId, filterOptions, showHiddenEntries, onlyFolderFilter, sortOptions, activeSortOption, createNewFolderItemVisible, importFromLinkItemVisible, importFromFileItemVisible, createNewOptionsVisible, selectedEntries, showSelectFolderButton, contextMenuItems, hasWritePermission) {
    return new ContentEntryListUiState(filterMode, contentEntryList, selectedChipId, filterOptions, showHiddenEntries, onlyFolderFilter, sortOptions, activeSortOption, createNewFolderItemVisible, importFromLinkItemVisible, importFromFileItemVisible, createNewOptionsVisible, selectedEntries, showSelectFolderButton, contextMenuItems, hasWritePermission);
  };
  protoOf(ContentEntryListUiState).jua = function (filterMode, contentEntryList, selectedChipId, filterOptions, showHiddenEntries, onlyFolderFilter, sortOptions, activeSortOption, createNewFolderItemVisible, importFromLinkItemVisible, importFromFileItemVisible, createNewOptionsVisible, selectedEntries, showSelectFolderButton, contextMenuItems, hasWritePermission, $super) {
    filterMode = filterMode === VOID ? this.su9_1 : filterMode;
    contentEntryList = contentEntryList === VOID ? this.tu9_1 : contentEntryList;
    selectedChipId = selectedChipId === VOID ? this.uu9_1 : selectedChipId;
    filterOptions = filterOptions === VOID ? this.vu9_1 : filterOptions;
    showHiddenEntries = showHiddenEntries === VOID ? this.wu9_1 : showHiddenEntries;
    onlyFolderFilter = onlyFolderFilter === VOID ? this.xu9_1 : onlyFolderFilter;
    sortOptions = sortOptions === VOID ? this.yu9_1 : sortOptions;
    activeSortOption = activeSortOption === VOID ? this.zu9_1 : activeSortOption;
    createNewFolderItemVisible = createNewFolderItemVisible === VOID ? this.aua_1 : createNewFolderItemVisible;
    importFromLinkItemVisible = importFromLinkItemVisible === VOID ? this.bua_1 : importFromLinkItemVisible;
    importFromFileItemVisible = importFromFileItemVisible === VOID ? this.cua_1 : importFromFileItemVisible;
    createNewOptionsVisible = createNewOptionsVisible === VOID ? this.dua_1 : createNewOptionsVisible;
    selectedEntries = selectedEntries === VOID ? this.eua_1 : selectedEntries;
    showSelectFolderButton = showSelectFolderButton === VOID ? this.fua_1 : showSelectFolderButton;
    contextMenuItems = contextMenuItems === VOID ? this.gua_1 : contextMenuItems;
    hasWritePermission = hasWritePermission === VOID ? this.hua_1 : hasWritePermission;
    return $super === VOID ? this.qug(filterMode, contentEntryList, selectedChipId, filterOptions, showHiddenEntries, onlyFolderFilter, sortOptions, activeSortOption, createNewFolderItemVisible, importFromLinkItemVisible, importFromFileItemVisible, createNewOptionsVisible, selectedEntries, showSelectFolderButton, contextMenuItems, hasWritePermission) : $super.qug.call(this, filterMode, contentEntryList, selectedChipId, filterOptions, showHiddenEntries, onlyFolderFilter, sortOptions, activeSortOption, createNewFolderItemVisible, importFromLinkItemVisible, importFromFileItemVisible, createNewOptionsVisible, selectedEntries, showSelectFolderButton, contextMenuItems, hasWritePermission);
  };
  protoOf(ContentEntryListUiState).toString = function () {
    return 'ContentEntryListUiState(filterMode=' + this.su9_1 + ', contentEntryList=' + this.tu9_1 + ', selectedChipId=' + this.uu9_1 + ', filterOptions=' + this.vu9_1 + ', showHiddenEntries=' + this.wu9_1 + ', onlyFolderFilter=' + this.xu9_1 + ', sortOptions=' + this.yu9_1 + ', activeSortOption=' + this.zu9_1 + ', createNewFolderItemVisible=' + this.aua_1 + ', importFromLinkItemVisible=' + this.bua_1 + ', importFromFileItemVisible=' + this.cua_1 + ', createNewOptionsVisible=' + this.dua_1 + ', selectedEntries=' + this.eua_1 + ', showSelectFolderButton=' + this.fua_1 + ', contextMenuItems=' + this.gua_1 + ', hasWritePermission=' + this.hua_1 + ')';
  };
  protoOf(ContentEntryListUiState).hashCode = function () {
    var result = this.su9_1;
    result = imul(result, 31) + hashCode(this.tu9_1) | 0;
    result = imul(result, 31) + this.uu9_1 | 0;
    result = imul(result, 31) + hashCode(this.vu9_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.wu9_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.xu9_1) | 0;
    result = imul(result, 31) + hashCode(this.yu9_1) | 0;
    result = imul(result, 31) + this.zu9_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.aua_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.bua_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.cua_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.dua_1) | 0;
    result = imul(result, 31) + hashCode(this.eua_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fua_1) | 0;
    result = imul(result, 31) + hashCode(this.gua_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.hua_1) | 0;
    return result;
  };
  protoOf(ContentEntryListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentEntryListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ContentEntryListUiState ? other : THROW_CCE();
    if (!(this.su9_1 === tmp0_other_with_cast.su9_1))
      return false;
    if (!equals(this.tu9_1, tmp0_other_with_cast.tu9_1))
      return false;
    if (!(this.uu9_1 === tmp0_other_with_cast.uu9_1))
      return false;
    if (!equals(this.vu9_1, tmp0_other_with_cast.vu9_1))
      return false;
    if (!(this.wu9_1 === tmp0_other_with_cast.wu9_1))
      return false;
    if (!(this.xu9_1 === tmp0_other_with_cast.xu9_1))
      return false;
    if (!equals(this.yu9_1, tmp0_other_with_cast.yu9_1))
      return false;
    if (!this.zu9_1.equals(tmp0_other_with_cast.zu9_1))
      return false;
    if (!(this.aua_1 === tmp0_other_with_cast.aua_1))
      return false;
    if (!(this.bua_1 === tmp0_other_with_cast.bua_1))
      return false;
    if (!(this.cua_1 === tmp0_other_with_cast.cua_1))
      return false;
    if (!(this.dua_1 === tmp0_other_with_cast.dua_1))
      return false;
    if (!equals(this.eua_1, tmp0_other_with_cast.eua_1))
      return false;
    if (!(this.fua_1 === tmp0_other_with_cast.fua_1))
      return false;
    if (!equals(this.gua_1, tmp0_other_with_cast.gua_1))
      return false;
    if (!(this.hua_1 === tmp0_other_with_cast.hua_1))
      return false;
    return true;
  };
  function Companion_133() {
  }
  protoOf(Companion_133).a4r = function () {
    return $serializer_getInstance_66();
  };
  var Companion_instance_181;
  function Companion_getInstance_150() {
    return Companion_instance_181;
  }
  function $serializer_54() {
    $serializer_instance_54 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.viewmodel.contententry.list.ContentEntryListSelectedItem', this, 3);
    tmp0_serialDesc.g4f('contentEntryUid', false);
    tmp0_serialDesc.g4f('contentEntryParentChildJoinUid', false);
    tmp0_serialDesc.g4f('parentContentEntryUid', false);
    this.rug_1 = tmp0_serialDesc;
  }
  protoOf($serializer_54).d44 = function () {
    return this.rug_1;
  };
  protoOf($serializer_54).x4f = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [LongSerializer_getInstance(), LongSerializer_getInstance(), LongSerializer_getInstance()];
  };
  protoOf($serializer_54).f44 = function (decoder) {
    var tmp0_desc = this.rug_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = new Long(0, 0);
    var tmp5_local1 = new Long(0, 0);
    var tmp6_local2 = new Long(0, 0);
    var tmp7_input = decoder.v47(tmp0_desc);
    if (tmp7_input.k48()) {
      tmp4_local0 = tmp7_input.b48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp7_input.b48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp7_input.b48(tmp0_desc, 2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp7_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp7_input.b48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp7_input.b48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp7_input.b48(tmp0_desc, 2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp7_input.w47(tmp0_desc);
    return ContentEntryListSelectedItem_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, null);
  };
  protoOf($serializer_54).sug = function (encoder, value) {
    var tmp0_desc = this.rug_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    tmp1_output.f49(tmp0_desc, 0, value.hnp_1);
    tmp1_output.f49(tmp0_desc, 1, value.inp_1);
    tmp1_output.f49(tmp0_desc, 2, value.jnp_1);
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_54).e44 = function (encoder, value) {
    return this.sug(encoder, value instanceof ContentEntryListSelectedItem ? value : THROW_CCE());
  };
  var $serializer_instance_54;
  function $serializer_getInstance_66() {
    if ($serializer_instance_54 == null)
      new $serializer_54();
    return $serializer_instance_54;
  }
  function ContentEntryListSelectedItem_init_$Init$(seen1, contentEntryUid, contentEntryParentChildJoinUid, parentContentEntryUid, serializationConstructorMarker, $this) {
    if (!(7 === (7 & seen1))) {
      throwMissingFieldException(seen1, 7, $serializer_getInstance_66().rug_1);
    }
    $this.hnp_1 = contentEntryUid;
    $this.inp_1 = contentEntryParentChildJoinUid;
    $this.jnp_1 = parentContentEntryUid;
    return $this;
  }
  function ContentEntryListSelectedItem_init_$Create$(seen1, contentEntryUid, contentEntryParentChildJoinUid, parentContentEntryUid, serializationConstructorMarker) {
    return ContentEntryListSelectedItem_init_$Init$(seen1, contentEntryUid, contentEntryParentChildJoinUid, parentContentEntryUid, serializationConstructorMarker, objectCreate(protoOf(ContentEntryListSelectedItem)));
  }
  function ContentEntryListSelectedItem(contentEntryUid, contentEntryParentChildJoinUid, parentContentEntryUid) {
    this.hnp_1 = contentEntryUid;
    this.inp_1 = contentEntryParentChildJoinUid;
    this.jnp_1 = parentContentEntryUid;
  }
  protoOf(ContentEntryListSelectedItem).toString = function () {
    return 'ContentEntryListSelectedItem(contentEntryUid=' + this.hnp_1.toString() + ', contentEntryParentChildJoinUid=' + this.inp_1.toString() + ', parentContentEntryUid=' + this.jnp_1.toString() + ')';
  };
  protoOf(ContentEntryListSelectedItem).hashCode = function () {
    var result = this.hnp_1.hashCode();
    result = imul(result, 31) + this.inp_1.hashCode() | 0;
    result = imul(result, 31) + this.jnp_1.hashCode() | 0;
    return result;
  };
  protoOf(ContentEntryListSelectedItem).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ContentEntryListSelectedItem))
      return false;
    var tmp0_other_with_cast = other instanceof ContentEntryListSelectedItem ? other : THROW_CCE();
    if (!this.hnp_1.equals(tmp0_other_with_cast.hnp_1))
      return false;
    if (!this.inp_1.equals(tmp0_other_with_cast.inp_1))
      return false;
    if (!this.jnp_1.equals(tmp0_other_with_cast.jnp_1))
      return false;
    return true;
  };
  function asSelectedItem(_this__u8e3s4) {
    var tmp0_safe_receiver = _this__u8e3s4.iak_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.fah_1;
    var tmp = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp2_safe_receiver = _this__u8e3s4.kak_1;
    var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.pak_1;
    var tmp_0 = tmp3_elvis_lhs == null ? new Long(0, 0) : tmp3_elvis_lhs;
    var tmp4_safe_receiver = _this__u8e3s4.kak_1;
    var tmp5_elvis_lhs = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.mak_1;
    return new ContentEntryListSelectedItem(tmp, tmp_0, tmp5_elvis_lhs == null ? new Long(0, 0) : tmp5_elvis_lhs);
  }
  function moveContentEntriesUseCase$factory() {
    return getPropertyCallableRef('moveContentEntriesUseCase', 1, KProperty1, function (receiver) {
      return _get_moveContentEntriesUseCase__fb3hfi(receiver);
    }, null);
  }
  function deleteEntriesUseCase$factory() {
    return getPropertyCallableRef('deleteEntriesUseCase', 1, KProperty1, function (receiver) {
      return _get_deleteEntriesUseCase__hkwqc9(receiver);
    }, null);
  }
  function moveContentEntriesUseCase$factory_0() {
    return getPropertyCallableRef('moveContentEntriesUseCase', 1, KProperty1, function (receiver) {
      return _get_moveContentEntriesUseCase__fb3hfi(receiver);
    }, null);
  }
  function deleteEntriesUseCase$factory_0() {
    return getPropertyCallableRef('deleteEntriesUseCase', 1, KProperty1, function (receiver) {
      return _get_deleteEntriesUseCase__hkwqc9(receiver);
    }, null);
  }
  function SubtitleEditViewModel$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SubtitleEditViewModel$slambda$slambda).cuh = function (db, $completion) {
    var tmp = this.gmp(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SubtitleEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.cuh(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SubtitleEditViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return null;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SubtitleEditViewModel$slambda$slambda).gmp = function (db, completion) {
    var i = new SubtitleEditViewModel$slambda$slambda(completion);
    i.buh_1 = db;
    return i;
  };
  function SubtitleEditViewModel$slambda$slambda_0(resultContinuation) {
    var i = new SubtitleEditViewModel$slambda$slambda(resultContinuation);
    var l = function (db, $completion) {
      return i.cuh(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SubtitleEditViewModel$slambda$slambda_1($savedStateHandle, this$0, resultContinuation) {
    this.luh_1 = $savedStateHandle;
    this.muh_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SubtitleEditViewModel$slambda$slambda_1).nuh = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SubtitleEditViewModel$slambda$slambda_1).z77 = function ($completion) {
    return this.nuh($completion);
  };
  protoOf(SubtitleEditViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp0_elvis_lhs = this.luh_1.ba('uri');
          var tmp2_uri = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
          var tmp1_elvis_lhs = this.luh_1.ba('filename');
          var tmp3_title = tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs;
          var tmp4_langCode = _get_supportedLanguagesConfig__bd0744(this.muh_1).so3_1;
          return new SubtitleTrack(tmp2_uri, 'text/vtt', tmp4_langCode, tmp3_title);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SubtitleEditViewModel$slambda$slambda_1).y77 = function (completion) {
    return new SubtitleEditViewModel$slambda$slambda_1(this.luh_1, this.muh_1, completion);
  };
  function SubtitleEditViewModel$slambda$slambda_2($savedStateHandle, this$0, resultContinuation) {
    var i = new SubtitleEditViewModel$slambda$slambda_1($savedStateHandle, this$0, resultContinuation);
    var l = function ($completion) {
      return i.nuh($completion);
    };
    l.$arity = 0;
    return l;
  }
  function SubtitleEditViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.mui_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.contententry.subtitleedit.SubtitleEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.rui(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function _get_supportedLanguagesConfig__bd0744($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.lui_1;
    supportedLanguagesConfig$factory_0();
    return this_0.t2();
  }
  function Companion_134() {
    this.sui_1 = 'uri';
    this.tui_1 = 'filename';
    this.uui_1 = 'SubtitleEdit';
  }
  var Companion_instance_182;
  function Companion_getInstance_151() {
    return Companion_instance_182;
  }
  function SubtitleEditViewModel$onClickDone$ref($boundThis) {
    var l = function () {
      $boundThis.vui();
      return Unit_instance;
    };
    l.callableName = 'onClickDone';
    return l;
  }
  function SubtitleEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.euj_1 = this$0;
    this.fuj_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SubtitleEditViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SubtitleEditViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SubtitleEditViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = Companion_instance_79.a4r();
            var tmp_1 = SubtitleEditViewModel$slambda$slambda_0(null);
            var tmp_2 = SubtitleEditViewModel$slambda$slambda_2(this.fuj_1, this.euj_1, null);
            suspendResult = this.euj_1.tp2(tmp_0, VOID, VOID, tmp_1, tmp_2, SubtitleEditViewModel$slambda$lambda(this.euj_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.euj_1.mui_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.rui(VOID, VOID, true);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.euj_1.pp1_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.nol(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_0.gol_1.ook(true));
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SubtitleEditViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new SubtitleEditViewModel$slambda(this.euj_1, this.fuj_1, completion);
    i.guj_1 = $this$launch;
    return i;
  };
  function SubtitleEditViewModel$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new SubtitleEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SubtitleEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.puj_1 = $commitDelay;
    this.quj_1 = $entity;
    this.ruj_1 = $this;
    this.suj_1 = $key;
    this.tuj_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SubtitleEditViewModel$onEntityChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SubtitleEditViewModel$onEntityChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SubtitleEditViewModel$onEntityChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.puj_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.quj_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.ruj_1.pp2(this.ruj_1.lp1_1, this.suj_1, this.tuj_1, this.quj_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SubtitleEditViewModel$onEntityChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new SubtitleEditViewModel$onEntityChanged$slambda(this.puj_1, this.quj_1, this.ruj_1, this.suj_1, this.tuj_1, completion);
    i.uuj_1 = $this$launch;
    return i;
  };
  function SubtitleEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new SubtitleEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SubtitleEditViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'SubtitleEdit');
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(SupportedLanguagesConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.lui_1 = Instance(this, tmp$ret$0, null).n5c(this, supportedLanguagesConfig$factory());
    this.mui_1 = MutableStateFlow(new SubtitleEditUiState());
    this.nui_1 = asSharedFlow(this.mui_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.pp1_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.subtitleedit.SubtitleEditViewModel.<anonymous>' call
        var tmp_1 = this.jp2().en6(strings_getInstance().kmi_1);
        var tmp_2 = this.jp2().en6(strings_getInstance().olk_1);
        var nextValue = prevValue.nol(VOID, VOID, tmp_1, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(VOID, tmp_2, VOID, SubtitleEditViewModel$onClickDone$ref(this)));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_3 = this.cp2();
    launch(tmp_3, VOID, VOID, SubtitleEditViewModel$slambda_0(this, savedStateHandle, null));
  }
  protoOf(SubtitleEditViewModel).vuj = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.mui_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.contententry.subtitleedit.SubtitleEditViewModel.onEntityChanged.<anonymous>' call
        var nextValue = prevValue.rui(entity);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_79.a4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_112();
    var key = 'entityState';
    var tmp0_safe_receiver = this.qp7_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp = this;
    var tmp_0 = this.cp2();
    tmp.qp7_1 = launch(tmp_0, VOID, VOID, SubtitleEditViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(SubtitleEditViewModel).vui = function () {
    this.up7(this.mui_1.t2().oui_1);
  };
  function SubtitleEditUiState(entity, titleError, fieldsEnabled) {
    entity = entity === VOID ? null : entity;
    titleError = titleError === VOID ? null : titleError;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    this.oui_1 = entity;
    this.pui_1 = titleError;
    this.qui_1 = fieldsEnabled;
  }
  protoOf(SubtitleEditUiState).wuj = function (entity, titleError, fieldsEnabled) {
    return new SubtitleEditUiState(entity, titleError, fieldsEnabled);
  };
  protoOf(SubtitleEditUiState).rui = function (entity, titleError, fieldsEnabled, $super) {
    entity = entity === VOID ? this.oui_1 : entity;
    titleError = titleError === VOID ? this.pui_1 : titleError;
    fieldsEnabled = fieldsEnabled === VOID ? this.qui_1 : fieldsEnabled;
    return $super === VOID ? this.wuj(entity, titleError, fieldsEnabled) : $super.wuj.call(this, entity, titleError, fieldsEnabled);
  };
  protoOf(SubtitleEditUiState).toString = function () {
    return 'SubtitleEditUiState(entity=' + this.oui_1 + ', titleError=' + this.pui_1 + ', fieldsEnabled=' + this.qui_1 + ')';
  };
  protoOf(SubtitleEditUiState).hashCode = function () {
    var result = this.oui_1 == null ? 0 : this.oui_1.hashCode();
    result = imul(result, 31) + (this.pui_1 == null ? 0 : getStringHashCode(this.pui_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.qui_1) | 0;
    return result;
  };
  protoOf(SubtitleEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SubtitleEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof SubtitleEditUiState ? other : THROW_CCE();
    if (!equals(this.oui_1, tmp0_other_with_cast.oui_1))
      return false;
    if (!(this.pui_1 == tmp0_other_with_cast.pui_1))
      return false;
    if (!(this.qui_1 === tmp0_other_with_cast.qui_1))
      return false;
    return true;
  };
  function supportedLanguagesConfig$factory() {
    return getPropertyCallableRef('supportedLanguagesConfig', 1, KProperty1, function (receiver) {
      return _get_supportedLanguagesConfig__bd0744(receiver);
    }, null);
  }
  function supportedLanguagesConfig$factory_0() {
    return getPropertyCallableRef('supportedLanguagesConfig', 1, KProperty1, function (receiver) {
      return _get_supportedLanguagesConfig__bd0744(receiver);
    }, null);
  }
  function _get_$cachedSerializer__te6jhj_2($this) {
    return $this.xuj_1.t2();
  }
  function CourseBlockViewModelConstants$CompletionCriteria$Companion$_anonymous__1j6hl9() {
    return createSimpleEnumSerializer('com.ustadmobile.core.viewmodel.courseblock.CourseBlockViewModelConstants.CompletionCriteria', values_4());
  }
  var CompletionCriteria_AUTOMATIC_instance;
  var CompletionCriteria_MIN_SCORE_instance;
  var CompletionCriteria_STUDENT_SELF_MARKS_instance;
  var CompletionCriteria_ASSIGNMENT_SUBMITTED_instance;
  var CompletionCriteria_ASSIGNMENT_GRADED_instance;
  function Companion_135() {
    Companion_instance_183 = this;
    var tmp = this;
    var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
    tmp.xuj_1 = lazy(tmp_0, CourseBlockViewModelConstants$CompletionCriteria$Companion$_anonymous__1j6hl9);
  }
  protoOf(Companion_135).mj8 = function (value) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var indexedObject = values_4();
      var inductionVariable = 0;
      var last = indexedObject.length;
      while (inductionVariable < last) {
        var element = indexedObject[inductionVariable];
        inductionVariable = inductionVariable + 1 | 0;
        // Inline function 'com.ustadmobile.core.viewmodel.courseblock.Companion.valueOf.<anonymous>' call
        if (element.buk_1 === value) {
          tmp$ret$1 = element;
          break $l$block;
        }
      }
      tmp$ret$1 = null;
    }
    var tmp0_elvis_lhs = tmp$ret$1;
    return tmp0_elvis_lhs == null ? first_1(values_4()) : tmp0_elvis_lhs;
  };
  protoOf(Companion_135).a4r = function () {
    return _get_$cachedSerializer__te6jhj_2(this);
  };
  protoOf(Companion_135).i4g = function (typeParamsSerializers) {
    return this.a4r();
  };
  var Companion_instance_183;
  function Companion_getInstance_152() {
    CompletionCriteria_initEntries();
    if (Companion_instance_183 == null)
      new Companion_135();
    return Companion_instance_183;
  }
  function values_4() {
    return [CompletionCriteria_AUTOMATIC_getInstance(), CompletionCriteria_MIN_SCORE_getInstance(), CompletionCriteria_STUDENT_SELF_MARKS_getInstance(), CompletionCriteria_ASSIGNMENT_SUBMITTED_getInstance(), CompletionCriteria_ASSIGNMENT_GRADED_getInstance()];
  }
  var CompletionCriteria_entriesInitialized;
  function CompletionCriteria_initEntries() {
    if (CompletionCriteria_entriesInitialized)
      return Unit_instance;
    CompletionCriteria_entriesInitialized = true;
    var tmp = strings_getInstance().clz_1;
    CompletionCriteria_AUTOMATIC_instance = new CompletionCriteria('AUTOMATIC', 0, tmp, 0);
    var tmp_0 = strings_getInstance().blz_1;
    CompletionCriteria_MIN_SCORE_instance = new CompletionCriteria('MIN_SCORE', 1, tmp_0, 1);
    var tmp_1 = strings_getInstance().dlz_1;
    CompletionCriteria_STUDENT_SELF_MARKS_instance = new CompletionCriteria('STUDENT_SELF_MARKS', 2, tmp_1, 2);
    var tmp_2 = strings_getInstance().ilz_1;
    CompletionCriteria_ASSIGNMENT_SUBMITTED_instance = new CompletionCriteria('ASSIGNMENT_SUBMITTED', 3, tmp_2, 100);
    var tmp_3 = strings_getInstance().om9_1;
    CompletionCriteria_ASSIGNMENT_GRADED_instance = new CompletionCriteria('ASSIGNMENT_GRADED', 4, tmp_3, 102);
    Companion_getInstance_152();
  }
  function CompletionCriteria(name, ordinal, stringResource, value) {
    Enum.call(this, name, ordinal);
    this.auk_1 = stringResource;
    this.buk_1 = value;
  }
  function CompletionCriteria_AUTOMATIC_getInstance() {
    CompletionCriteria_initEntries();
    return CompletionCriteria_AUTOMATIC_instance;
  }
  function CompletionCriteria_MIN_SCORE_getInstance() {
    CompletionCriteria_initEntries();
    return CompletionCriteria_MIN_SCORE_instance;
  }
  function CompletionCriteria_STUDENT_SELF_MARKS_getInstance() {
    CompletionCriteria_initEntries();
    return CompletionCriteria_STUDENT_SELF_MARKS_instance;
  }
  function CompletionCriteria_ASSIGNMENT_SUBMITTED_getInstance() {
    CompletionCriteria_initEntries();
    return CompletionCriteria_ASSIGNMENT_SUBMITTED_instance;
  }
  function CompletionCriteria_ASSIGNMENT_GRADED_getInstance() {
    CompletionCriteria_initEntries();
    return CompletionCriteria_ASSIGNMENT_GRADED_instance;
  }
  function CourseBlockEditViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.kuk_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseBlockEditViewModel$slambda$slambda$slambda).jop = function (result, $completion) {
    var tmp = this.kop(result, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.jop(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp_0 = this.luk_1.qoo_1;
          var tmp0_elvis_lhs = (!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) ? tmp_0 : null;
          var tmp_1;
          if (tmp0_elvis_lhs == null) {
            return Unit_instance;
          } else {
            tmp_1 = tmp0_elvis_lhs;
          }
          var descriptionHtml = tmp_1;
          var tmp1_safe_receiver = this.kuk_1.jul_1.t2().yry_1;
          var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.yj5_1;
          this.kuk_1.lul(tmp2_safe_receiver == null ? null : tmp2_safe_receiver.cji(VOID, VOID, VOID, VOID, VOID, descriptionHtml));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda$slambda).kop = function (result, completion) {
    var i = new CourseBlockEditViewModel$slambda$slambda$slambda(this.kuk_1, completion);
    i.luk_1 = result;
    return i;
  };
  function CourseBlockEditViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new CourseBlockEditViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (result, $completion) {
      return i.jop(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseBlockEditViewModel$slambda$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.uul_1 = this$0;
    this.vul_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseBlockEditViewModel$slambda$slambda$slambda_1).jop = function (result, $completion) {
    var tmp = this.kop(result, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.jop(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp_0 = this.wul_1.qoo_1;
          var tmp0_elvis_lhs = tmp_0 instanceof ContentEntryAndContentJob ? tmp_0 : null;
          var tmp_1;
          if (tmp0_elvis_lhs == null) {
            return Unit_instance;
          } else {
            tmp_1 = tmp0_elvis_lhs;
          }
          var contentEntryResult = tmp_1;
          l$ret$1: do {
            var this_0 = this.uul_1.jul_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp0_safe_receiver = prevValue.yry_1;
              var nextValue = prevValue.jrz(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.kj6(VOID, VOID, contentEntryResult.zj4_1, VOID, contentEntryResult.bj5_1, contentEntryResult.aj5_1));
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          this.vul_1.rox('SavedSelectedContentEntry', this.uul_1.z4q().e45(Companion_instance_40.a4r(), contentEntryResult));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda$slambda_1).kop = function (result, completion) {
    var i = new CourseBlockEditViewModel$slambda$slambda$slambda_1(this.uul_1, this.vul_1, completion);
    i.wul_1 = result;
    return i;
  };
  function CourseBlockEditViewModel$slambda$slambda$slambda_2(this$0, $savedStateHandle, resultContinuation) {
    var i = new CourseBlockEditViewModel$slambda$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation);
    var l = function (result, $completion) {
      return i.jop(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseBlockEditViewModel$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseBlockEditViewModel$slambda$slambda).rs0 = function (it, $completion) {
    var tmp = this.gmp(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.rs0(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return null;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda).gmp = function (it, completion) {
    var i = new CourseBlockEditViewModel$slambda$slambda(completion);
    i.fum_1 = it;
    return i;
  };
  function CourseBlockEditViewModel$slambda$slambda_0(resultContinuation) {
    var i = new CourseBlockEditViewModel$slambda$slambda(resultContinuation);
    var l = function (it, $completion) {
      return i.rs0(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseBlockEditViewModel$slambda$slambda_1(this$0, $savedStateHandle, $selectedContentEntry, resultContinuation) {
    this.oum_1 = this$0;
    this.pum_1 = $savedStateHandle;
    this.qum_1 = $selectedContentEntry;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseBlockEditViewModel$slambda$slambda_1).bs1 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda_1).z77 = function ($completion) {
    return this.bs1($completion);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = get_doorPrimaryKeyManager(this.oum_1.ep2());
            suspendResult = tmp_0.b62(124, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var newUid = suspendResult;
            var this_0 = new CourseBlock();
            this_0.w7w_1 = newUid;
            this_0.m7x_1 = true;
            var tmp_1 = this_0;
            var tmp0_safe_receiver = this.pum_1.ba('blockType');
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toInt(tmp0_safe_receiver);
            var tmp_2;
            if (tmp1_elvis_lhs == null) {
              tmp_2 = 100;
            } else {
              tmp_2 = tmp1_elvis_lhs;
            }

            tmp_1.x7w_1 = tmp_2;
            var tmp_3 = this_0;
            var tmp2_safe_receiver = this.qum_1;
            var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.zj4_1;
            tmp_3.a7x_1 = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.gah_1;
            var tmp_4 = this_0;
            var tmp4_safe_receiver = this.qum_1;
            var tmp5_safe_receiver = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.zj4_1;
            tmp_4.b7x_1 = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.hah_1;
            if (!(this.qum_1 == null)) {
              var tmp_5 = this_0;
              var tmp6_safe_receiver = this.qum_1.zj4_1;
              var tmp7_elvis_lhs = tmp6_safe_receiver == null ? null : tmp6_safe_receiver.fah_1;
              tmp_5.o7x_1 = tmp7_elvis_lhs == null ? new Long(0, 0) : tmp7_elvis_lhs;
              var tmp_6 = this_0;
              tmp_6.x7w_1 = 104;
            }

            var tmp0_safe_receiver_0 = this.qum_1;
            var tmp5_contentEntry = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.zj4_1;
            var tmp3_safe_receiver_0 = this.qum_1;
            var tmp6_contentJob = tmp3_safe_receiver_0 == null ? null : tmp3_safe_receiver_0.aj5_1;
            var tmp2_safe_receiver_0 = this.qum_1;
            var tmp7_contentJobItem = tmp2_safe_receiver_0 == null ? null : tmp2_safe_receiver_0.bj5_1;
            var tmp8_courseBlockPicture = new CourseBlockPicture(newUid);
            var tmp1_safe_receiver = this.qum_1;
            var tmp9_contentEntryPicture = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.cj5_1;
            return new CourseBlockAndEditEntities(this_0, tmp8_courseBlockPicture, tmp5_contentEntry, tmp9_contentEntryPicture, tmp7_contentJobItem, tmp6_contentJob);
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda_1).y77 = function (completion) {
    return new CourseBlockEditViewModel$slambda$slambda_1(this.oum_1, this.pum_1, this.qum_1, completion);
  };
  function CourseBlockEditViewModel$slambda$slambda_2(this$0, $savedStateHandle, $selectedContentEntry, resultContinuation) {
    var i = new CourseBlockEditViewModel$slambda$slambda_1(this$0, $savedStateHandle, $selectedContentEntry, resultContinuation);
    var l = function ($completion) {
      return i.bs1($completion);
    };
    l.$arity = 0;
    return l;
  }
  function CourseBlockEditViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.jul_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.courseblock.edit.CourseBlockEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.jrz(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function CourseBlockEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.cqf();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function CourseBlockEditViewModel$slambda$slambda_3(this$0, resultContinuation) {
    this.zum_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseBlockEditViewModel$slambda$slambda_3).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda_3).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.zum_1.np2(this.zum_1.ip2(), 'courseBlockDesc');
            var tmp_1 = CourseBlockEditViewModel$slambda$slambda$slambda_0(this.zum_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_24(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda_3).v1m = function ($this$launch, completion) {
    var i = new CourseBlockEditViewModel$slambda$slambda_3(this.zum_1, completion);
    i.aun_1 = $this$launch;
    return i;
  };
  function CourseBlockEditViewModel$slambda$slambda_4(this$0, resultContinuation) {
    var i = new CourseBlockEditViewModel$slambda$slambda_3(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseBlockEditViewModel$slambda$slambda_5(this$0, $savedStateHandle, resultContinuation) {
    this.jun_1 = this$0;
    this.kun_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseBlockEditViewModel$slambda$slambda_5).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda_5).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.jun_1.np2(this.jun_1.ip2(), 'courseBlockEditContentEntry');
            var tmp_1 = CourseBlockEditViewModel$slambda$slambda$slambda_2(this.jun_1, this.kun_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_24(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseBlockEditViewModel$slambda$slambda_5).v1m = function ($this$launch, completion) {
    var i = new CourseBlockEditViewModel$slambda$slambda_5(this.jun_1, this.kun_1, completion);
    i.lun_1 = $this$launch;
    return i;
  };
  function CourseBlockEditViewModel$slambda$slambda_6(this$0, $savedStateHandle, resultContinuation) {
    var i = new CourseBlockEditViewModel$slambda$slambda_5(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function Companion_136() {
    Companion_instance_184 = this;
    this.hu3_1 = 'CourseBlockEdit';
    this.iu3_1 = 'SelectedContentEntry';
    this.ju3_1 = 'blockType';
    this.ku3_1 = 'courseBlockDesc';
    this.lu3_1 = 'courseBlockEditContentEntry';
    this.mu3_1 = 'SavedSelectedContentEntry';
    var tmp = this;
    Companion_getInstance_112();
    Companion_getInstance_102();
    Companion_getInstance_102();
    tmp.nu3_1 = listOf(['blockType', 'clazzUid', 'goToOnContentEntryDone', 'blockType', 'result_viewname', 'result_key', 'listMode']);
  }
  var Companion_instance_184;
  function Companion_getInstance_153() {
    if (Companion_instance_184 == null)
      new Companion_136();
    return Companion_instance_184;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_24(function_0) {
    this.mun_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_24).t1d = function (value, $completion) {
    return this.mun_1(value, $completion);
  };
  function CourseBlockEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.vun_1 = this$0;
    this.wun_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseBlockEditViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseBlockEditViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseBlockEditViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 6;
            this.hd_1 = 1;
            suspendResult = this.vun_1.op2(this.wun_1, 'SelectedContentEntry', Companion_instance_40.a4r(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.yun_1 = suspendResult;
            this.zun_1 = Companion_getInstance_13().a4r();
            this.hd_1 = 2;
            var tmp_0 = CourseBlockEditViewModel$slambda$slambda_0(null);
            var tmp_1 = CourseBlockEditViewModel$slambda$slambda_2(this.vun_1, this.wun_1, this.yun_1, null);
            suspendResult = this.vun_1.tp2(this.zun_1, VOID, VOID, tmp_0, tmp_1, CourseBlockEditViewModel$slambda$lambda(this.vun_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.auo_1 = suspendResult;
            var tmp_2 = this;
            var tmp1_safe_receiver = this.auo_1;
            tmp_2.buo_1 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.aj6_1;
            var tmp_3 = this;
            var tmp2_safe_receiver = this.auo_1;
            tmp_3.cuo_1 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.yj5_1;
            if (!(this.buo_1 == null) ? !(this.cuo_1 == null) : false) {
              Companion_getInstance_101();
              if (this.wun_1.ba('entity') == null) {
                this.duo_1 = false;
                this.hd_1 = 4;
                continue $sm;
              } else {
                var tmp_4;
                var tmp_5 = this.buo_1.bai_1;
                if (tmp_5 === 2) {
                  tmp_4 = this.buo_1.aai_1.equals(this.cuo_1.w7w_1);
                } else {
                  tmp_4 = false;
                }
                if (tmp_4) {
                  var tmp_6 = this;
                  tmp_6.duo_1 = true;
                  this.hd_1 = 4;
                  continue $sm;
                } else {
                  var tmp_7 = this.buo_1.bai_1;
                  if (tmp_7 === 2) {
                    this.hd_1 = 3;
                    var tmp_8 = this.vun_1.fp2().b7f();
                    var tmp_9 = this.vun_1.dp2();
                    var tmp_10 = this.buo_1.aai_1;
                    PermissionFlags_getInstance();
                    suspendResult = tmp_8.gd5(tmp_9, tmp_10, new Long(2, 0), this);
                    if (suspendResult === get_COROUTINE_SUSPENDED()) {
                      return suspendResult;
                    }
                    continue $sm;
                  } else {
                    this.duo_1 = false;
                    this.hd_1 = 4;
                    continue $sm;
                  }
                }
              }
            } else {
              this.hd_1 = 5;
              continue $sm;
            }

          case 3:
            this.duo_1 = suspendResult;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            var canEditContentEntry = this.duo_1;
            l$ret$1: do {
              var this_0 = this.vun_1.jul_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.jrz(VOID, canEditContentEntry);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.hd_1 = 5;
            continue $sm;
          case 5:
            l$ret$3: do {
              var this_1 = this.vun_1.jul_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.jrz(VOID, VOID, VOID, true);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            l$ret$5: do {
              var this_2 = this.vun_1.pp1_1;
              while (true) {
                var prevValue_1 = this_2.t2();
                var tmp0_safe_receiver = this.cuo_1;
                var tmp1_subject = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.x7w_1;
                var tmp_11;
                if (tmp1_subject === 100) {
                  tmp_11 = this.vun_1.vp8(strings_getInstance().xmb_1, strings_getInstance().ima_1);
                } else {
                  if (tmp1_subject === 102) {
                    tmp_11 = this.vun_1.vp8(strings_getInstance().wm9_1, strings_getInstance().wmb_1);
                  } else {
                    if (tmp1_subject === 105) {
                      tmp_11 = this.vun_1.vp8(strings_getInstance().ymc_1, strings_getInstance().zmc_1);
                    } else {
                      if (tmp1_subject === 104) {
                        tmp_11 = this.vun_1.jp2().en6(strings_getInstance().nmh_1);
                      } else {
                        tmp_11 = '';
                      }
                    }
                  }
                }
                var tmp_12 = tmp_11;
                var tmp_13 = this.vun_1.jp2().en6(strings_getInstance().olk_1);
                var nextValue_1 = prevValue_1.nol(VOID, VOID, tmp_12, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_13, VOID, CourseBlockEditViewModel$onClickSave$ref(this.vun_1)));
                if (this_2.y1k(prevValue_1, nextValue_1)) {
                  break l$ret$5;
                }
              }
            }
             while (false);
            launch(this.xun_1, VOID, VOID, CourseBlockEditViewModel$slambda$slambda_4(this.vun_1, null));
            launch(this.xun_1, VOID, VOID, CourseBlockEditViewModel$slambda$slambda_6(this.vun_1, this.wun_1, null));
            return Unit_instance;
          case 6:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 6) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseBlockEditViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseBlockEditViewModel$slambda(this.vun_1, this.wun_1, completion);
    i.xun_1 = $this$launch;
    return i;
  };
  function CourseBlockEditViewModel$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new CourseBlockEditViewModel$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseBlockEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.muo_1 = $commitDelay;
    this.nuo_1 = $entity;
    this.ouo_1 = $this;
    this.puo_1 = $key;
    this.quo_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseBlockEditViewModel$onEntityChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseBlockEditViewModel$onEntityChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseBlockEditViewModel$onEntityChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.muo_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.nuo_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.ouo_1.pp2(this.ouo_1.lp1_1, this.puo_1, this.quo_1, this.nuo_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseBlockEditViewModel$onEntityChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseBlockEditViewModel$onEntityChanged$slambda(this.muo_1, this.nuo_1, this.ouo_1, this.puo_1, this.quo_1, completion);
    i.ruo_1 = $this$launch;
    return i;
  };
  function CourseBlockEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new CourseBlockEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseBlockEditViewModel$onPictureChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.aup_1 = $commitDelay;
    this.bup_1 = $entity;
    this.cup_1 = $this;
    this.dup_1 = $key;
    this.eup_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseBlockEditViewModel$onPictureChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseBlockEditViewModel$onPictureChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseBlockEditViewModel$onPictureChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.aup_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.bup_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.cup_1.pp2(this.cup_1.lp1_1, this.dup_1, this.eup_1, this.bup_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseBlockEditViewModel$onPictureChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseBlockEditViewModel$onPictureChanged$slambda(this.aup_1, this.bup_1, this.cup_1, this.dup_1, this.eup_1, completion);
    i.fup_1 = $this$launch;
    return i;
  };
  function CourseBlockEditViewModel$onPictureChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new CourseBlockEditViewModel$onPictureChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseBlockEditViewModel(di, savedStateHandle) {
    Companion_getInstance_153();
    UstadEditViewModel.call(this, di, savedStateHandle, 'CourseBlockEdit');
    this.jul_1 = MutableStateFlow(new CourseBlockEditUiState(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, Companion_getInstance_9().rlb().sla()));
    this.kul_1 = asStateFlow(this.jul_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.pp1_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.courseblock.edit.CourseBlockEditViewModel.<anonymous>' call
        var nextValue = prevValue.nol(VOID, VOID, VOID, VOID, true, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp = this.cp2();
    launch(tmp, VOID, VOID, CourseBlockEditViewModel$slambda_0(this, savedStateHandle, null));
  }
  protoOf(CourseBlockEditViewModel).lul = function (courseBlock) {
    if (courseBlock == null)
      return Unit_instance;
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.jul_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.courseblock.edit.CourseBlockEditViewModel.onEntityChanged.<anonymous>' call
        var tmp0_safe_receiver = prevValue.yry_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.kj6(courseBlock);
        var tmp1_safe_receiver = prevValue.yry_1;
        var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.yj5_1;
        var nextValue = prevValue.jrz(tmp, VOID, VOID, VOID, VOID, this.wp8(tmp2_safe_receiver == null ? null : tmp2_safe_receiver.a7x_1, courseBlock.a7x_1, prevValue.drz_1));
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var blockAndEntities = tmp$ret$1.yry_1;
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_getInstance_13().a4r();
    Companion_getInstance_101();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_112();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.qp7_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_0 = this;
    var tmp_1 = this.cp2();
    tmp_0.qp7_1 = launch(tmp_1, VOID, VOID, CourseBlockEditViewModel$onEntityChanged$slambda_0(commitDelay, blockAndEntities, this, key, serializer, null));
  };
  protoOf(CourseBlockEditViewModel).gup = function () {
    var tmp0_safe_receiver = this.jul_1.t2().yry_1;
    var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ij6();
    var tmp_0 = Companion_instance_40.a4r();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.courseblock.edit.CourseBlockEditViewModel.onClickEditContentEntry.<anonymous>' call
    var tmp0_safe_receiver_0 = this.jul_1.t2().yry_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      // Inline function 'kotlin.also' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.courseblock.edit.CourseBlockEditViewModel.onClickEditContentEntry.<anonymous>.<anonymous>' call
      // Inline function 'kotlin.collections.set' call
      var key = 'courseBlock';
      var value = this.z4q().e45(Companion_instance_14.a4r(), tmp0_safe_receiver_0.yj5_1);
      this_0.s(key, value);
      // Inline function 'kotlin.collections.set' call
      var key_0 = 'goToOnContentEntryDone';
      var value_0 = (2).toString();
      this_0.s(key_0, value_0);
    }
    var tmp$ret$3 = this_0.f3();
    this.rp2('ContentEntryEdit', 'courseBlockEditContentEntry', tmp, tmp_0, tmp$ret$3);
  };
  protoOf(CourseBlockEditViewModel).zs6 = function (pictureUri) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.jul_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.courseblock.edit.CourseBlockEditViewModel.onPictureChanged.<anonymous>' call
        var tmp1_safe_receiver = prevValue.yry_1;
        var tmp;
        if (tmp1_safe_receiver == null) {
          tmp = null;
        } else {
          var tmp0_safe_receiver = prevValue.yry_1.zj5_1;
          tmp = tmp1_safe_receiver.kj6(VOID, tmp0_safe_receiver == null ? null : tmp0_safe_receiver.gji(VOID, VOID, pictureUri));
        }
        var nextValue = prevValue.jrz(tmp);
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var blockAndEntities = tmp$ret$1.yry_1;
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_getInstance_13().a4r();
    Companion_getInstance_101();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_112();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.qp7_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_0 = this;
    var tmp_1 = this.cp2();
    tmp_0.qp7_1 = launch(tmp_1, VOID, VOID, CourseBlockEditViewModel$onPictureChanged$slambda_0(commitDelay, blockAndEntities, this, key, serializer, null));
  };
  protoOf(CourseBlockEditViewModel).cqf = function () {
    var tmp0_elvis_lhs = this.jul_1.t2().yry_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var courseBlockVal = tmp;
    // Inline function 'kotlin.text.isNullOrBlank' call
    var this_0 = courseBlockVal.yj5_1.a7x_1;
    // Inline function 'kotlin.contracts.contract' call
    if (this_0 == null ? true : isBlank(this_0)) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_1 = this.jul_1;
        while (true) {
          var prevValue = this_1.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.courseblock.edit.CourseBlockEditViewModel.onClickSave.<anonymous>' call
          var nextValue = prevValue.jrz(VOID, VOID, VOID, VOID, VOID, this.jp2().en6(strings_getInstance().ome_1));
          if (this_1.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    }
    if (this.jul_1.t2().ns3())
      return Unit_instance;
    this.up7(this.jul_1.t2().yry_1);
  };
  function Companion_137() {
    Companion_instance_185 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.hup_1 = [null, null, new ArrayListSerializer(Companion_getInstance_152().a4r()), null, null, null, null, null, null, null, null];
  }
  var Companion_instance_185;
  function Companion_getInstance_154() {
    if (Companion_instance_185 == null)
      new Companion_137();
    return Companion_instance_185;
  }
  function $serializer_55() {
    $serializer_instance_55 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.viewmodel.courseblock.edit.CourseBlockEditUiState', this, 11);
    tmp0_serialDesc.g4f('block', true);
    tmp0_serialDesc.g4f('canEditSelectedContentEntry', true);
    tmp0_serialDesc.g4f('completionCriteriaOptions', true);
    tmp0_serialDesc.g4f('fieldsEnabled', true);
    tmp0_serialDesc.g4f('caHideUntilDateError', true);
    tmp0_serialDesc.g4f('caTitleError', true);
    tmp0_serialDesc.g4f('caDeadlineError', true);
    tmp0_serialDesc.g4f('caMaxPointsError', true);
    tmp0_serialDesc.g4f('maxPointsRequired', true);
    tmp0_serialDesc.g4f('caGracePeriodError', true);
    tmp0_serialDesc.g4f('timeZone', true);
    this.iup_1 = tmp0_serialDesc;
  }
  protoOf($serializer_55).d44 = function () {
    return this.iup_1;
  };
  protoOf($serializer_55).x4f = function () {
    var tmp0_cached = Companion_getInstance_154().hup_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [get_nullable($serializer_getInstance_8()), BooleanSerializer_getInstance(), tmp0_cached[2], BooleanSerializer_getInstance(), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), get_nullable(StringSerializer_getInstance()), BooleanSerializer_getInstance(), get_nullable(StringSerializer_getInstance()), StringSerializer_getInstance()];
  };
  protoOf($serializer_55).f44 = function (decoder) {
    var tmp0_desc = this.iup_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = null;
    var tmp5_local1 = false;
    var tmp6_local2 = null;
    var tmp7_local3 = false;
    var tmp8_local4 = null;
    var tmp9_local5 = null;
    var tmp10_local6 = null;
    var tmp11_local7 = null;
    var tmp12_local8 = false;
    var tmp13_local9 = null;
    var tmp14_local10 = null;
    var tmp15_input = decoder.v47(tmp0_desc);
    var tmp16_cached = Companion_getInstance_154().hup_1;
    if (tmp15_input.k48()) {
      tmp4_local0 = tmp15_input.j48(tmp0_desc, 0, $serializer_getInstance_8(), tmp4_local0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp15_input.x47(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp15_input.h48(tmp0_desc, 2, tmp16_cached[2], tmp6_local2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp15_input.x47(tmp0_desc, 3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp15_input.j48(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
      tmp9_local5 = tmp15_input.j48(tmp0_desc, 5, StringSerializer_getInstance(), tmp9_local5);
      tmp3_bitMask0 = tmp3_bitMask0 | 32;
      tmp10_local6 = tmp15_input.j48(tmp0_desc, 6, StringSerializer_getInstance(), tmp10_local6);
      tmp3_bitMask0 = tmp3_bitMask0 | 64;
      tmp11_local7 = tmp15_input.j48(tmp0_desc, 7, StringSerializer_getInstance(), tmp11_local7);
      tmp3_bitMask0 = tmp3_bitMask0 | 128;
      tmp12_local8 = tmp15_input.x47(tmp0_desc, 8);
      tmp3_bitMask0 = tmp3_bitMask0 | 256;
      tmp13_local9 = tmp15_input.j48(tmp0_desc, 9, StringSerializer_getInstance(), tmp13_local9);
      tmp3_bitMask0 = tmp3_bitMask0 | 512;
      tmp14_local10 = tmp15_input.f48(tmp0_desc, 10);
      tmp3_bitMask0 = tmp3_bitMask0 | 1024;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp15_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp15_input.j48(tmp0_desc, 0, $serializer_getInstance_8(), tmp4_local0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp15_input.x47(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp15_input.h48(tmp0_desc, 2, tmp16_cached[2], tmp6_local2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp15_input.x47(tmp0_desc, 3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp15_input.j48(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          case 5:
            tmp9_local5 = tmp15_input.j48(tmp0_desc, 5, StringSerializer_getInstance(), tmp9_local5);
            tmp3_bitMask0 = tmp3_bitMask0 | 32;
            break;
          case 6:
            tmp10_local6 = tmp15_input.j48(tmp0_desc, 6, StringSerializer_getInstance(), tmp10_local6);
            tmp3_bitMask0 = tmp3_bitMask0 | 64;
            break;
          case 7:
            tmp11_local7 = tmp15_input.j48(tmp0_desc, 7, StringSerializer_getInstance(), tmp11_local7);
            tmp3_bitMask0 = tmp3_bitMask0 | 128;
            break;
          case 8:
            tmp12_local8 = tmp15_input.x47(tmp0_desc, 8);
            tmp3_bitMask0 = tmp3_bitMask0 | 256;
            break;
          case 9:
            tmp13_local9 = tmp15_input.j48(tmp0_desc, 9, StringSerializer_getInstance(), tmp13_local9);
            tmp3_bitMask0 = tmp3_bitMask0 | 512;
            break;
          case 10:
            tmp14_local10 = tmp15_input.f48(tmp0_desc, 10);
            tmp3_bitMask0 = tmp3_bitMask0 | 1024;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp15_input.w47(tmp0_desc);
    return CourseBlockEditUiState_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, tmp11_local7, tmp12_local8, tmp13_local9, tmp14_local10, null);
  };
  protoOf($serializer_55).jup = function (encoder, value) {
    var tmp0_desc = this.iup_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    var tmp2_cached = Companion_getInstance_154().hup_1;
    if (tmp1_output.r49(tmp0_desc, 0) ? true : !(value.yry_1 == null)) {
      tmp1_output.n49(tmp0_desc, 0, $serializer_getInstance_8(), value.yry_1);
    }
    if (tmp1_output.r49(tmp0_desc, 1) ? true : !(value.zry_1 === false)) {
      tmp1_output.b49(tmp0_desc, 1, value.zry_1);
    }
    if (tmp1_output.r49(tmp0_desc, 2) ? true : !equals(value.arz_1, emptyList())) {
      tmp1_output.l49(tmp0_desc, 2, tmp2_cached[2], value.arz_1);
    }
    if (tmp1_output.r49(tmp0_desc, 3) ? true : !(value.brz_1 === false)) {
      tmp1_output.b49(tmp0_desc, 3, value.brz_1);
    }
    if (tmp1_output.r49(tmp0_desc, 4) ? true : !(value.crz_1 == null)) {
      tmp1_output.n49(tmp0_desc, 4, StringSerializer_getInstance(), value.crz_1);
    }
    if (tmp1_output.r49(tmp0_desc, 5) ? true : !(value.drz_1 == null)) {
      tmp1_output.n49(tmp0_desc, 5, StringSerializer_getInstance(), value.drz_1);
    }
    if (tmp1_output.r49(tmp0_desc, 6) ? true : !(value.erz_1 == null)) {
      tmp1_output.n49(tmp0_desc, 6, StringSerializer_getInstance(), value.erz_1);
    }
    if (tmp1_output.r49(tmp0_desc, 7) ? true : !(value.frz_1 == null)) {
      tmp1_output.n49(tmp0_desc, 7, StringSerializer_getInstance(), value.frz_1);
    }
    if (tmp1_output.r49(tmp0_desc, 8) ? true : !(value.grz_1 === false)) {
      tmp1_output.b49(tmp0_desc, 8, value.grz_1);
    }
    if (tmp1_output.r49(tmp0_desc, 9) ? true : !(value.hrz_1 == null)) {
      tmp1_output.n49(tmp0_desc, 9, StringSerializer_getInstance(), value.hrz_1);
    }
    if (tmp1_output.r49(tmp0_desc, 10) ? true : !(value.irz_1 === 'UTC')) {
      tmp1_output.j49(tmp0_desc, 10, value.irz_1);
    }
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_55).e44 = function (encoder, value) {
    return this.jup(encoder, value instanceof CourseBlockEditUiState ? value : THROW_CCE());
  };
  var $serializer_instance_55;
  function $serializer_getInstance_67() {
    if ($serializer_instance_55 == null)
      new $serializer_55();
    return $serializer_instance_55;
  }
  function CourseBlockEditUiState_init_$Init$(seen1, block, canEditSelectedContentEntry, completionCriteriaOptions, fieldsEnabled, caHideUntilDateError, caTitleError, caDeadlineError, caMaxPointsError, maxPointsRequired, caGracePeriodError, timeZone, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_67().iup_1);
    }
    if (0 === (seen1 & 1))
      $this.yry_1 = null;
    else
      $this.yry_1 = block;
    if (0 === (seen1 & 2))
      $this.zry_1 = false;
    else
      $this.zry_1 = canEditSelectedContentEntry;
    if (0 === (seen1 & 4))
      $this.arz_1 = emptyList();
    else
      $this.arz_1 = completionCriteriaOptions;
    if (0 === (seen1 & 8))
      $this.brz_1 = false;
    else
      $this.brz_1 = fieldsEnabled;
    if (0 === (seen1 & 16))
      $this.crz_1 = null;
    else
      $this.crz_1 = caHideUntilDateError;
    if (0 === (seen1 & 32))
      $this.drz_1 = null;
    else
      $this.drz_1 = caTitleError;
    if (0 === (seen1 & 64))
      $this.erz_1 = null;
    else
      $this.erz_1 = caDeadlineError;
    if (0 === (seen1 & 128))
      $this.frz_1 = null;
    else
      $this.frz_1 = caMaxPointsError;
    if (0 === (seen1 & 256))
      $this.grz_1 = false;
    else
      $this.grz_1 = maxPointsRequired;
    if (0 === (seen1 & 512))
      $this.hrz_1 = null;
    else
      $this.hrz_1 = caGracePeriodError;
    if (0 === (seen1 & 1024))
      $this.irz_1 = 'UTC';
    else
      $this.irz_1 = timeZone;
    return $this;
  }
  function CourseBlockEditUiState_init_$Create$(seen1, block, canEditSelectedContentEntry, completionCriteriaOptions, fieldsEnabled, caHideUntilDateError, caTitleError, caDeadlineError, caMaxPointsError, maxPointsRequired, caGracePeriodError, timeZone, serializationConstructorMarker) {
    return CourseBlockEditUiState_init_$Init$(seen1, block, canEditSelectedContentEntry, completionCriteriaOptions, fieldsEnabled, caHideUntilDateError, caTitleError, caDeadlineError, caMaxPointsError, maxPointsRequired, caGracePeriodError, timeZone, serializationConstructorMarker, objectCreate(protoOf(CourseBlockEditUiState)));
  }
  function CourseBlockEditUiState(block, canEditSelectedContentEntry, completionCriteriaOptions, fieldsEnabled, caHideUntilDateError, caTitleError, caDeadlineError, caMaxPointsError, maxPointsRequired, caGracePeriodError, timeZone) {
    Companion_getInstance_154();
    block = block === VOID ? null : block;
    canEditSelectedContentEntry = canEditSelectedContentEntry === VOID ? false : canEditSelectedContentEntry;
    completionCriteriaOptions = completionCriteriaOptions === VOID ? emptyList() : completionCriteriaOptions;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    caHideUntilDateError = caHideUntilDateError === VOID ? null : caHideUntilDateError;
    caTitleError = caTitleError === VOID ? null : caTitleError;
    caDeadlineError = caDeadlineError === VOID ? null : caDeadlineError;
    caMaxPointsError = caMaxPointsError === VOID ? null : caMaxPointsError;
    maxPointsRequired = maxPointsRequired === VOID ? false : maxPointsRequired;
    caGracePeriodError = caGracePeriodError === VOID ? null : caGracePeriodError;
    timeZone = timeZone === VOID ? 'UTC' : timeZone;
    this.yry_1 = block;
    this.zry_1 = canEditSelectedContentEntry;
    this.arz_1 = completionCriteriaOptions;
    this.brz_1 = fieldsEnabled;
    this.crz_1 = caHideUntilDateError;
    this.drz_1 = caTitleError;
    this.erz_1 = caDeadlineError;
    this.frz_1 = caMaxPointsError;
    this.grz_1 = maxPointsRequired;
    this.hrz_1 = caGracePeriodError;
    this.irz_1 = timeZone;
  }
  protoOf(CourseBlockEditUiState).kup = function () {
    var tmp0_safe_receiver = this.yry_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.yj5_1;
    var tmp = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.c7x_1;
    return tmp === 1;
  };
  protoOf(CourseBlockEditUiState).lup = function () {
    var tmp;
    if (this.mup()) {
      var tmp0_safe_receiver = this.yry_1;
      var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.yj5_1;
      tmp = isDateSet(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.e7x_1);
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(CourseBlockEditUiState).drv = function () {
    var tmp;
    if (this.lup()) {
      var tmp0_safe_receiver = this.yry_1;
      var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.yj5_1;
      tmp = isDateSet(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.g7x_1);
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(CourseBlockEditUiState).nup = function () {
    // Inline function 'kotlin.collections.isNotEmpty' call
    return !this.arz_1.c1();
  };
  protoOf(CourseBlockEditUiState).mup = function () {
    var tmp;
    var tmp0_safe_receiver = this.yry_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.yj5_1;
    var tmp_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.x7w_1;
    if (tmp_0 === 103) {
      tmp = true;
    } else {
      var tmp2_safe_receiver = this.yry_1;
      var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.yj5_1;
      var tmp_1 = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.x7w_1;
      tmp = tmp_1 === 104;
    }
    return tmp;
  };
  protoOf(CourseBlockEditUiState).oup = function () {
    var tmp;
    var tmp0_safe_receiver = this.yry_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.yj5_1;
    var tmp_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.x7w_1;
    if (tmp_0 === 103) {
      tmp = true;
    } else {
      var tmp2_safe_receiver = this.yry_1;
      var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.yj5_1;
      var tmp_1 = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.x7w_1;
      tmp = tmp_1 === 104;
    }
    return tmp;
  };
  protoOf(CourseBlockEditUiState).ns3 = function () {
    return ((!(this.drz_1 == null) ? true : !(this.erz_1 == null)) ? true : !(this.hrz_1 == null)) ? true : !(this.frz_1 == null);
  };
  protoOf(CourseBlockEditUiState).pup = function (block, canEditSelectedContentEntry, completionCriteriaOptions, fieldsEnabled, caHideUntilDateError, caTitleError, caDeadlineError, caMaxPointsError, maxPointsRequired, caGracePeriodError, timeZone) {
    return new CourseBlockEditUiState(block, canEditSelectedContentEntry, completionCriteriaOptions, fieldsEnabled, caHideUntilDateError, caTitleError, caDeadlineError, caMaxPointsError, maxPointsRequired, caGracePeriodError, timeZone);
  };
  protoOf(CourseBlockEditUiState).jrz = function (block, canEditSelectedContentEntry, completionCriteriaOptions, fieldsEnabled, caHideUntilDateError, caTitleError, caDeadlineError, caMaxPointsError, maxPointsRequired, caGracePeriodError, timeZone, $super) {
    block = block === VOID ? this.yry_1 : block;
    canEditSelectedContentEntry = canEditSelectedContentEntry === VOID ? this.zry_1 : canEditSelectedContentEntry;
    completionCriteriaOptions = completionCriteriaOptions === VOID ? this.arz_1 : completionCriteriaOptions;
    fieldsEnabled = fieldsEnabled === VOID ? this.brz_1 : fieldsEnabled;
    caHideUntilDateError = caHideUntilDateError === VOID ? this.crz_1 : caHideUntilDateError;
    caTitleError = caTitleError === VOID ? this.drz_1 : caTitleError;
    caDeadlineError = caDeadlineError === VOID ? this.erz_1 : caDeadlineError;
    caMaxPointsError = caMaxPointsError === VOID ? this.frz_1 : caMaxPointsError;
    maxPointsRequired = maxPointsRequired === VOID ? this.grz_1 : maxPointsRequired;
    caGracePeriodError = caGracePeriodError === VOID ? this.hrz_1 : caGracePeriodError;
    timeZone = timeZone === VOID ? this.irz_1 : timeZone;
    return $super === VOID ? this.pup(block, canEditSelectedContentEntry, completionCriteriaOptions, fieldsEnabled, caHideUntilDateError, caTitleError, caDeadlineError, caMaxPointsError, maxPointsRequired, caGracePeriodError, timeZone) : $super.pup.call(this, block, canEditSelectedContentEntry, completionCriteriaOptions, fieldsEnabled, caHideUntilDateError, caTitleError, caDeadlineError, caMaxPointsError, maxPointsRequired, caGracePeriodError, timeZone);
  };
  protoOf(CourseBlockEditUiState).toString = function () {
    return 'CourseBlockEditUiState(block=' + this.yry_1 + ', canEditSelectedContentEntry=' + this.zry_1 + ', completionCriteriaOptions=' + this.arz_1 + ', fieldsEnabled=' + this.brz_1 + ', caHideUntilDateError=' + this.crz_1 + ', caTitleError=' + this.drz_1 + ', caDeadlineError=' + this.erz_1 + ', caMaxPointsError=' + this.frz_1 + ', maxPointsRequired=' + this.grz_1 + ', caGracePeriodError=' + this.hrz_1 + ', timeZone=' + this.irz_1 + ')';
  };
  protoOf(CourseBlockEditUiState).hashCode = function () {
    var result = this.yry_1 == null ? 0 : this.yry_1.hashCode();
    result = imul(result, 31) + getBooleanHashCode(this.zry_1) | 0;
    result = imul(result, 31) + hashCode(this.arz_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.brz_1) | 0;
    result = imul(result, 31) + (this.crz_1 == null ? 0 : getStringHashCode(this.crz_1)) | 0;
    result = imul(result, 31) + (this.drz_1 == null ? 0 : getStringHashCode(this.drz_1)) | 0;
    result = imul(result, 31) + (this.erz_1 == null ? 0 : getStringHashCode(this.erz_1)) | 0;
    result = imul(result, 31) + (this.frz_1 == null ? 0 : getStringHashCode(this.frz_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.grz_1) | 0;
    result = imul(result, 31) + (this.hrz_1 == null ? 0 : getStringHashCode(this.hrz_1)) | 0;
    result = imul(result, 31) + getStringHashCode(this.irz_1) | 0;
    return result;
  };
  protoOf(CourseBlockEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CourseBlockEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof CourseBlockEditUiState ? other : THROW_CCE();
    if (!equals(this.yry_1, tmp0_other_with_cast.yry_1))
      return false;
    if (!(this.zry_1 === tmp0_other_with_cast.zry_1))
      return false;
    if (!equals(this.arz_1, tmp0_other_with_cast.arz_1))
      return false;
    if (!(this.brz_1 === tmp0_other_with_cast.brz_1))
      return false;
    if (!(this.crz_1 == tmp0_other_with_cast.crz_1))
      return false;
    if (!(this.drz_1 == tmp0_other_with_cast.drz_1))
      return false;
    if (!(this.erz_1 == tmp0_other_with_cast.erz_1))
      return false;
    if (!(this.frz_1 == tmp0_other_with_cast.frz_1))
      return false;
    if (!(this.grz_1 === tmp0_other_with_cast.grz_1))
      return false;
    if (!(this.hrz_1 == tmp0_other_with_cast.hrz_1))
      return false;
    if (!(this.irz_1 === tmp0_other_with_cast.irz_1))
      return false;
    return true;
  };
  function TextBlockDetailViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.yup_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(TextBlockDetailViewModel$slambda$slambda$slambda$slambda).auq = function (it, $completion) {
    var tmp = this.buq(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(TextBlockDetailViewModel$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.auq((p1 == null ? true : p1 instanceof CourseBlockAndPicture) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(TextBlockDetailViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.yup_1.yuq_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.cur(this.zup_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(TextBlockDetailViewModel$slambda$slambda$slambda$slambda).buq = function (it, completion) {
    var i = new TextBlockDetailViewModel$slambda$slambda$slambda$slambda(this.yup_1, completion);
    i.zup_1 = it;
    return i;
  };
  function TextBlockDetailViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new TextBlockDetailViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.auq(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function TextBlockDetailViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.lur_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(TextBlockDetailViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(TextBlockDetailViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(TextBlockDetailViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.lur_1.fp2().c7d().dc6(this.lur_1.fp1_1);
            var tmp_1 = TextBlockDetailViewModel$slambda$slambda$slambda$slambda_0(this.lur_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_25(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(TextBlockDetailViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new TextBlockDetailViewModel$slambda$slambda$slambda(this.lur_1, completion);
    i.mur_1 = $this$launch;
    return i;
  };
  function TextBlockDetailViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new TextBlockDetailViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function TextBlockDetailViewModel$slambda$slambda$lambda(this$0) {
    return function (title) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.pp1_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.courseblock.textblockdetail.TextBlockDetailViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.nol(VOID, VOID, title);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function TextBlockDetailViewModel$slambda$slambda($this_launch, this$0, resultContinuation) {
    this.vur_1 = $this_launch;
    this.wur_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(TextBlockDetailViewModel$slambda$slambda).m86 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(TextBlockDetailViewModel$slambda$slambda).z77 = function ($completion) {
    return this.m86($completion);
  };
  protoOf(TextBlockDetailViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.vur_1, VOID, VOID, TextBlockDetailViewModel$slambda$slambda$slambda_0(this.wur_1, null));
          launchSetTitleFromClazzUid(this.wur_1, this.wur_1.aur_1, TextBlockDetailViewModel$slambda$slambda$lambda(this.wur_1));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(TextBlockDetailViewModel$slambda$slambda).y77 = function (completion) {
    return new TextBlockDetailViewModel$slambda$slambda(this.vur_1, this.wur_1, completion);
  };
  function TextBlockDetailViewModel$slambda$slambda_0($this_launch, this$0, resultContinuation) {
    var i = new TextBlockDetailViewModel$slambda$slambda($this_launch, this$0, resultContinuation);
    var l = function ($completion) {
      return i.m86($completion);
    };
    l.$arity = 0;
    return l;
  }
  function Companion_138() {
    this.xur_1 = 'CourseText';
  }
  var Companion_instance_186;
  function Companion_getInstance_155() {
    return Companion_instance_186;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_25(function_0) {
    this.yur_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_25).t1d = function (value, $completion) {
    return this.yur_1(value, $completion);
  };
  function TextBlockDetailViewModel$slambda(this$0, resultContinuation) {
    this.hus_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(TextBlockDetailViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(TextBlockDetailViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(TextBlockDetailViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.hus_1.yuq_1, TextBlockDetailViewModel$slambda$slambda_0(this.ius_1, this.hus_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(TextBlockDetailViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new TextBlockDetailViewModel$slambda(this.hus_1, completion);
    i.ius_1 = $this$launch;
    return i;
  };
  function TextBlockDetailViewModel$slambda_0(this$0, resultContinuation) {
    var i = new TextBlockDetailViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function TextBlockDetailViewModel(di, savedStateHandle) {
    DetailViewModel.call(this, di, savedStateHandle, 'CourseText');
    this.yuq_1 = MutableStateFlow(new TextBlockDetailUiState());
    this.zuq_1 = asStateFlow(this.yuq_1);
    var tmp = this;
    Companion_getInstance_112();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.aur_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this.cp2();
    launch(tmp_0, VOID, VOID, TextBlockDetailViewModel$slambda_0(this, null));
  }
  function TextBlockDetailUiState(courseBlock) {
    courseBlock = courseBlock === VOID ? null : courseBlock;
    this.bur_1 = courseBlock;
  }
  protoOf(TextBlockDetailUiState).cur = function (courseBlock) {
    return new TextBlockDetailUiState(courseBlock);
  };
  protoOf(TextBlockDetailUiState).toString = function () {
    return 'TextBlockDetailUiState(courseBlock=' + this.bur_1 + ')';
  };
  protoOf(TextBlockDetailUiState).hashCode = function () {
    return this.bur_1 == null ? 0 : this.bur_1.hashCode();
  };
  protoOf(TextBlockDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof TextBlockDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof TextBlockDetailUiState ? other : THROW_CCE();
    if (!equals(this.bur_1, tmp0_other_with_cast.bur_1))
      return false;
    return true;
  };
  function CourseGroupSetDetailViewModel$onClickEdit$ref($boundThis) {
    var l = function () {
      $boundThis.iut();
      return Unit_instance;
    };
    l.callableName = 'onClickEdit';
    return l;
  }
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda).tut = function (entity, permissionPair, $completion) {
    var tmp = this.uut(entity, permissionPair, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda).um = function (p1, p2, $completion) {
    var tmp = (!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE();
    return this.tut(tmp, p2 instanceof PermissionPair ? p2 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return to(this.rut_1, this.sut_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda).uut = function (entity, permissionPair, completion) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda(completion);
    i.rut_1 = entity;
    i.sut_1 = permissionPair;
    return i;
  };
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_0(resultContinuation) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda(resultContinuation);
    var l = function (entity, permissionPair, $completion) {
      return i.tut(entity, permissionPair, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.duu_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_1).fuu = function (it, $completion) {
    var tmp = this.guu(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.fuu(p1 instanceof Pair ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp0_container = this.euu_1.x6_1;
          var hasCourseViewPermission = tmp0_container.y6();
          var hasManageStudentPermission = tmp0_container.z6();
          l$ret$1: do {
            var this_0 = this.duu_1.fut_1;
            while (true) {
              var prevValue = this_0.t2();
              var this_1 = this.euu_1.w6_1;
              var tmp_0;
              if (hasCourseViewPermission) {
                tmp_0 = this_1;
              } else {
                tmp_0 = null;
              }
              var tmp0_elvis_lhs = tmp_0;
              var nextValue = prevValue.juu(VOID, tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_2 = this.duu_1.pp1_1;
            while (true) {
              var prevValue_0 = this_2.t2();
              var tmp_1 = this.duu_1.jp2().en6(strings_getInstance().mlo_1);
              var tmp_2 = FabIcon_EDIT_getInstance();
              var nextValue_0 = prevValue_0.nol(new FabUiState(hasManageStudentPermission, tmp_1, tmp_2, CourseGroupSetDetailViewModel$onClickEdit$ref(this.duu_1)));
              if (this_2.y1k(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_1).guu = function (it, completion) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_1(this.duu_1, completion);
    i.euu_1 = it;
    return i;
  };
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.fuu(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_3(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_3).uuu = function (entity, permissionPair, $completion) {
    var tmp = this.vuu(entity, permissionPair, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_3).um = function (p1, p2, $completion) {
    var tmp = (p1 == null ? true : p1 instanceof CourseGroupSet) ? p1 : THROW_CCE();
    return this.uuu(tmp, p2 instanceof PermissionPair ? p2 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = this.suu_1;
          var tmp_0;
          if (this.tuu_1.ed8_1) {
            tmp_0 = this_0;
          } else {
            tmp_0 = null;
          }
          return tmp_0;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_3).vuu = function (entity, permissionPair, completion) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_3(completion);
    i.suu_1 = entity;
    i.tuu_1 = permissionPair;
    return i;
  };
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_4(resultContinuation) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_3(resultContinuation);
    var l = function (entity, permissionPair, $completion) {
      return i.uuu(entity, permissionPair, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.euv_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_5).guv = function (courseGroupSet, $completion) {
    var tmp = this.huv(courseGroupSet, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_5).he = function (p1, $completion) {
    return this.guv((p1 == null ? true : p1 instanceof CourseGroupSet) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.euv_1.fut_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.juu(this.fuv_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_1 = this.euv_1.pp1_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var tmp0_safe_receiver = this.fuv_1;
              var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.e7y_1;
              var nextValue_0 = prevValue_0.nol(VOID, VOID, tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
              if (this_1.y1k(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_5).huv = function (courseGroupSet, completion) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_5(this.euv_1, completion);
    i.fuv_1 = courseGroupSet;
    return i;
  };
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_6(this$0, resultContinuation) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation);
    var l = function (courseGroupSet, $completion) {
      return i.guv(courseGroupSet, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda($memberListFlow, $permissionsFlow, this$0, resultContinuation) {
    this.quv_1 = $memberListFlow;
    this.ruv_1 = $permissionsFlow;
    this.suv_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = distinctUntilChanged(combine(this.quv_1, this.ruv_1, CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_0(null)));
            var tmp_1 = CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_2(this.suv_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_26(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda(this.quv_1, this.ruv_1, this.suv_1, completion);
    i.tuv_1 = $this$launch;
    return i;
  };
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda_0($memberListFlow, $permissionsFlow, this$0, resultContinuation) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda($memberListFlow, $permissionsFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda_1($entityFlow, $permissionsFlow, this$0, resultContinuation) {
    this.cuw_1 = $entityFlow;
    this.duw_1 = $permissionsFlow;
    this.euw_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = combine(this.cuw_1, this.duw_1, CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_4(null));
            var tmp_1 = CourseGroupSetDetailViewModel$slambda$slambda$slambda$slambda_6(this.euw_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_26(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda_1(this.cuw_1, this.duw_1, this.euw_1, completion);
    i.fuw_1 = $this$launch;
    return i;
  };
  function CourseGroupSetDetailViewModel$slambda$slambda$slambda_2($entityFlow, $permissionsFlow, this$0, resultContinuation) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda$slambda_1($entityFlow, $permissionsFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetDetailViewModel$slambda$slambda($this_launch, $memberListFlow, $permissionsFlow, this$0, $entityFlow, resultContinuation) {
    this.ouw_1 = $this_launch;
    this.puw_1 = $memberListFlow;
    this.quw_1 = $permissionsFlow;
    this.ruw_1 = this$0;
    this.suw_1 = $entityFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda).m86 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda).z77 = function ($completion) {
    return this.m86($completion);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.ouw_1, VOID, VOID, CourseGroupSetDetailViewModel$slambda$slambda$slambda_0(this.puw_1, this.quw_1, this.ruw_1, null));
          launch(this.ouw_1, VOID, VOID, CourseGroupSetDetailViewModel$slambda$slambda$slambda_2(this.suw_1, this.quw_1, this.ruw_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda$slambda).y77 = function (completion) {
    return new CourseGroupSetDetailViewModel$slambda$slambda(this.ouw_1, this.puw_1, this.quw_1, this.ruw_1, this.suw_1, completion);
  };
  function CourseGroupSetDetailViewModel$slambda$slambda_0($this_launch, $memberListFlow, $permissionsFlow, this$0, $entityFlow, resultContinuation) {
    var i = new CourseGroupSetDetailViewModel$slambda$slambda($this_launch, $memberListFlow, $permissionsFlow, this$0, $entityFlow, resultContinuation);
    var l = function ($completion) {
      return i.m86($completion);
    };
    l.$arity = 0;
    return l;
  }
  function Companion_139() {
    this.tuw_1 = 'CourseGroupSet';
  }
  var Companion_instance_187;
  function Companion_getInstance_156() {
    return Companion_instance_187;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_26(function_0) {
    this.uuw_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_26).t1d = function (value, $completion) {
    return this.uuw_1(value, $completion);
  };
  function CourseGroupSetDetailViewModel$slambda(this$0, resultContinuation) {
    this.dux_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetDetailViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetDetailViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var tmp_1 = this.dux_1.fp2().b7f();
            var tmp_2 = this.dux_1.dp2();
            PermissionFlags_getInstance();
            var tmp_3 = new Long(1, 0);
            PermissionFlags_getInstance();
            tmp_0.fux_1 = shareIn(tmp_1.dd5(tmp_2, this.dux_1.hut_1, tmp_3, new Long(8, 0)), this.dux_1.cp2(), Companion_getInstance_12().v1h());
            this.gux_1 = this.dux_1.fp2().f7d().qco(this.dux_1.fp1_1, this.dux_1.hut_1, systemTimeInMillis(), 0, this.dux_1.dp2());
            this.hux_1 = this.dux_1.fp2().e7d().w8b(this.dux_1.fp1_1);
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.dux_1.fut_1, CourseGroupSetDetailViewModel$slambda$slambda_0(this.eux_1, this.gux_1, this.fux_1, this.dux_1, this.hux_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetDetailViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseGroupSetDetailViewModel$slambda(this.dux_1, completion);
    i.eux_1 = $this$launch;
    return i;
  };
  function CourseGroupSetDetailViewModel$slambda_0(this$0, resultContinuation) {
    var i = new CourseGroupSetDetailViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetDetailViewModel(di, savedStateHandle) {
    DetailViewModel.call(this, di, savedStateHandle, 'CourseGroupSet');
    this.fut_1 = MutableStateFlow(new CourseGroupSetDetailUiState());
    this.gut_1 = asStateFlow(this.fut_1);
    var tmp = this;
    Companion_getInstance_112();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.hut_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this.cp2();
    launch(tmp_0, VOID, VOID, CourseGroupSetDetailViewModel$slambda_0(this, null));
  }
  protoOf(CourseGroupSetDetailViewModel).iut = function () {
    Companion_getInstance_102();
    var tmp = to('entityUid', this.fp1_1.toString());
    Companion_getInstance_112();
    this.np1_1.sns('CourseGroupsEdit', mapOf([tmp, to('clazzUid', this.hut_1.toString())]));
  };
  function CourseGroupSetDetailUiState(courseGroupSet, membersList) {
    courseGroupSet = courseGroupSet === VOID ? null : courseGroupSet;
    membersList = membersList === VOID ? emptyList() : membersList;
    this.huu_1 = courseGroupSet;
    this.iuu_1 = membersList;
  }
  protoOf(CourseGroupSetDetailUiState).iux = function (courseGroupSet, membersList) {
    return new CourseGroupSetDetailUiState(courseGroupSet, membersList);
  };
  protoOf(CourseGroupSetDetailUiState).juu = function (courseGroupSet, membersList, $super) {
    courseGroupSet = courseGroupSet === VOID ? this.huu_1 : courseGroupSet;
    membersList = membersList === VOID ? this.iuu_1 : membersList;
    return $super === VOID ? this.iux(courseGroupSet, membersList) : $super.iux.call(this, courseGroupSet, membersList);
  };
  protoOf(CourseGroupSetDetailUiState).toString = function () {
    return 'CourseGroupSetDetailUiState(courseGroupSet=' + this.huu_1 + ', membersList=' + this.iuu_1 + ')';
  };
  protoOf(CourseGroupSetDetailUiState).hashCode = function () {
    var result = this.huu_1 == null ? 0 : hashCode(this.huu_1);
    result = imul(result, 31) + hashCode(this.iuu_1) | 0;
    return result;
  };
  protoOf(CourseGroupSetDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CourseGroupSetDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof CourseGroupSetDetailUiState ? other : THROW_CCE();
    if (!equals(this.huu_1, tmp0_other_with_cast.huu_1))
      return false;
    if (!equals(this.iuu_1, tmp0_other_with_cast.iuu_1))
      return false;
    return true;
  };
  function appendGroupNumIfNotInList(_this__u8e3s4, assignedGroupNum) {
    var tmp;
    var tmp0_elvis_lhs = lastOrNull(_this__u8e3s4);
    if ((tmp0_elvis_lhs == null ? 0 : tmp0_elvis_lhs) < assignedGroupNum) {
      tmp = plus(_this__u8e3s4, listOf_0(assignedGroupNum));
    } else {
      tmp = _this__u8e3s4;
    }
    return tmp;
  }
  function CourseGroupSetEditViewModel$slambda$slambda$slambda(this$0, $courseGroupSetUid, resultContinuation) {
    this.rux_1 = this$0;
    this.sux_1 = $courseGroupSetUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda).fuy = function (db, $completion) {
    var tmp = this.gmp(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.fuy(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 6;
            this.hd_1 = 1;
            suspendResult = this.tux_1.f7d().pco(this.rux_1.rp7_1, this.rux_1.fuz_1, systemTimeInMillis(), 0, this.rux_1.dp2(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.uux_1 = suspendResult;
            var tmp_0 = this;
            tmp_0.vux_1 = this.uux_1;
            var tmp_1 = this;
            tmp_1.wux_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.uux_1, 10));
            this.xux_1 = this.vux_1.w();
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (!this.xux_1.f()) {
              this.hd_1 = 5;
              continue $sm;
            }

            this.yux_1 = this.xux_1.e();
            var tmp_2 = this;
            tmp_2.zux_1 = this.yux_1;
            if (this.zux_1.ecq_1 == null) {
              var tmp_3 = this;
              tmp_3.buy_1 = new CourseGroupMemberAndName();
              var tmp_4 = this;
              tmp_4.cuy_1 = this.buy_1;
              this.cuy_1.fcq_1 = this.zux_1.fcq_1;
              this.cuy_1.hcq_1 = this.zux_1.hcq_1;
              this.cuy_1.gcq_1 = this.zux_1.gcq_1;
              this.cuy_1.icq_1 = this.zux_1.icq_1;
              var tmp_5 = this;
              tmp_5.duy_1 = new CourseGroupMember();
              var tmp_6 = this;
              tmp_6.euy_1 = this.duy_1;
              this.hd_1 = 3;
              var tmp_7 = get_doorPrimaryKeyManager(this.rux_1.ep2());
              suspendResult = tmp_7.b62(243, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              var tmp_8 = this;
              tmp_8.auy_1 = this.zux_1;
              this.hd_1 = 4;
              continue $sm;
            }

          case 3:
            var ARGUMENT = suspendResult;
            this.euy_1.mcp_1 = ARGUMENT;
            this.euy_1.ncp_1 = this.sux_1;
            this.euy_1.pcp_1 = this.zux_1.gcq_1;
            var ARGUMENT_0 = this.duy_1;
            this.cuy_1.ecq_1 = ARGUMENT_0;
            this.auy_1 = this.buy_1;
            this.hd_1 = 4;
            continue $sm;
          case 4:
            var ARGUMENT_1 = this.auy_1;
            this.wux_1.i1(ARGUMENT_1);
            this.hd_1 = 2;
            continue $sm;
          case 5:
            return this.wux_1;
          case 6:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 6) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda).gmp = function (db, completion) {
    var i = new CourseGroupSetEditViewModel$slambda$slambda$slambda(this.rux_1, this.sux_1, completion);
    i.tux_1 = db;
    return i;
  };
  function CourseGroupSetEditViewModel$slambda$slambda$slambda_0(this$0, $courseGroupSetUid, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$slambda$slambda$slambda(this$0, $courseGroupSetUid, resultContinuation);
    var l = function (db, $completion) {
      return i.fuy(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel$slambda$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_1).ouz = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_1).z77 = function ($completion) {
    return this.ouz($completion);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return emptyList();
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_1).y77 = function (completion) {
    return new CourseGroupSetEditViewModel$slambda$slambda$slambda_1(completion);
  };
  function CourseGroupSetEditViewModel$slambda$slambda$slambda_2(resultContinuation) {
    var i = new CourseGroupSetEditViewModel$slambda$slambda$slambda_1(resultContinuation);
    var l = function ($completion) {
      return i.ouz($completion);
    };
    l.$arity = 0;
    return l;
  }
  function CourseGroupSetEditViewModel$slambda$slambda$lambda(this$0) {
    return function (memberList) {
      var tmp;
      if (!(memberList == null)) {
        var tmp$ret$1;
        $l$block: {
          // Inline function 'kotlinx.coroutines.flow.update' call
          var this_0 = this$0.duz_1;
          while (true) {
            var prevValue = this_0.t2();
            // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
            var nextValue = prevValue.uuz(VOID, memberList);
            if (this_0.y1k(prevValue, nextValue)) {
              tmp$ret$1 = Unit_instance;
              break $l$block;
            }
          }
        }
        tmp = tmp$ret$1;
      }
      return Unit_instance;
    };
  }
  function CourseGroupSetEditViewModel$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.dv0_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_3).hv0 = function (db, $completion) {
    var tmp = this.gmp(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.hv0(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            var this_0 = this.ev0_1;
            var tmp_1;
            if (!this.dv0_1.rp7_1.equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            var tmp0_safe_receiver = tmp_1;
            tmp_0.fv0_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.e7d();
            if (this.fv0_1 == null) {
              this.gv0_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.fv0_1.mcx(this.dv0_1.rp7_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.gv0_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.gv0_1;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_3).gmp = function (db, completion) {
    var i = new CourseGroupSetEditViewModel$slambda$slambda$slambda_3(this.dv0_1, completion);
    i.ev0_1 = db;
    return i;
  };
  function CourseGroupSetEditViewModel$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.hv0(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel$slambda$slambda$slambda_5($courseGroupSetUid, this$0, resultContinuation) {
    this.qv0_1 = $courseGroupSetUid;
    this.rv0_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_5).od1 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_5).z77 = function ($completion) {
    return this.od1($completion);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = new CourseGroupSet();
          this_0.d7y_1 = this.qv0_1;
          this_0.h7y_1 = this.rv0_1.fuz_1;
          return this_0;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda$slambda_5).y77 = function (completion) {
    return new CourseGroupSetEditViewModel$slambda$slambda$slambda_5(this.qv0_1, this.rv0_1, completion);
  };
  function CourseGroupSetEditViewModel$slambda$slambda$slambda_6($courseGroupSetUid, this$0, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$slambda$slambda$slambda_5($courseGroupSetUid, this$0, resultContinuation);
    var l = function ($completion) {
      return i.od1($completion);
    };
    l.$arity = 0;
    return l;
  }
  function CourseGroupSetEditViewModel$slambda$slambda$lambda_0(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.duz_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.uuz(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function CourseGroupSetEditViewModel$slambda$slambda(this$0, $courseGroupSetUid, resultContinuation) {
    this.av1_1 = this$0;
    this.bv1_1 = $courseGroupSetUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$slambda$slambda).dv1 = function ($this$async, $completion) {
    var tmp = this.v1m($this$async, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.dv1((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = ListSerializer(Companion_instance_42.a4r());
            var tmp_1 = listOf_0('courseGroupMembers');
            var tmp_2 = CourseGroupSetEditViewModel$slambda$slambda$slambda_0(this.av1_1, this.bv1_1, null);
            var tmp_3 = CourseGroupSetEditViewModel$slambda$slambda$slambda_2(null);
            suspendResult = this.av1_1.tp2(tmp_0, tmp_1, VOID, tmp_2, tmp_3, CourseGroupSetEditViewModel$slambda$slambda$lambda(this.av1_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda).v1m = function ($this$async, completion) {
    var i = new CourseGroupSetEditViewModel$slambda$slambda(this.av1_1, this.bv1_1, completion);
    i.cv1_1 = $this$async;
    return i;
  };
  function CourseGroupSetEditViewModel$slambda$slambda_0(this$0, $courseGroupSetUid, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$slambda$slambda(this$0, $courseGroupSetUid, resultContinuation);
    var l = function ($this$async, $completion) {
      return i.dv1($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel$slambda$slambda_1(this$0, $courseGroupSetUid, resultContinuation) {
    this.mv1_1 = this$0;
    this.nv1_1 = $courseGroupSetUid;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$slambda$slambda_1).pv1 = function ($this$async, $completion) {
    var tmp = this.v1m($this$async, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda_1).he = function (p1, $completion) {
    return this.pv1((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = Companion_instance_43.a4r();
            var tmp_1 = CourseGroupSetEditViewModel$slambda$slambda$slambda_4(this.mv1_1, null);
            var tmp_2 = CourseGroupSetEditViewModel$slambda$slambda$slambda_6(this.nv1_1, this.mv1_1, null);
            suspendResult = this.mv1_1.tp2(tmp_0, VOID, VOID, tmp_1, tmp_2, CourseGroupSetEditViewModel$slambda$slambda$lambda_0(this.mv1_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetEditViewModel$slambda$slambda_1).v1m = function ($this$async, completion) {
    var i = new CourseGroupSetEditViewModel$slambda$slambda_1(this.mv1_1, this.nv1_1, completion);
    i.ov1_1 = $this$async;
    return i;
  };
  function CourseGroupSetEditViewModel$slambda$slambda_2(this$0, $courseGroupSetUid, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$slambda$slambda_1(this$0, $courseGroupSetUid, resultContinuation);
    var l = function ($this$async, $completion) {
      return i.pv1($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.cqf();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function CourseGroupSetEditViewModel$onClickSave$slambda$slambda(this$0, $courseGroupSet, $membersToSave, resultContinuation) {
    this.yv1_1 = this$0;
    this.zv1_1 = $courseGroupSet;
    this.av2_1 = $membersToSave;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$onClickSave$slambda$slambda).fmp = function (it, $completion) {
    var tmp = this.gmp(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetEditViewModel$onClickSave$slambda$slambda).he = function (p1, $completion) {
    return this.fmp(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetEditViewModel$onClickSave$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            suspendResult = this.yv1_1.fp2().e7d().ncx(this.zv1_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            suspendResult = this.yv1_1.fp2().f7d().rco(this.av2_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetEditViewModel$onClickSave$slambda$slambda).gmp = function (it, completion) {
    var i = new CourseGroupSetEditViewModel$onClickSave$slambda$slambda(this.yv1_1, this.zv1_1, this.av2_1, completion);
    i.bv2_1 = it;
    return i;
  };
  function CourseGroupSetEditViewModel$onClickSave$slambda$slambda_0(this$0, $courseGroupSet, $membersToSave, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$onClickSave$slambda$slambda(this$0, $courseGroupSet, $membersToSave, resultContinuation);
    var l = function (it, $completion) {
      return i.fmp(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function Companion_140() {
    this.cv2_1 = 'CourseGroupsEdit';
    this.dv2_1 = 'courseGroupMembers';
  }
  var Companion_instance_188;
  function Companion_getInstance_157() {
    return Companion_instance_188;
  }
  function CourseGroupSetEditViewModel$slambda(this$0, resultContinuation) {
    this.mv2_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$slambda).oqh = function (db, $completion) {
    var tmp = this.gmp(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetEditViewModel$slambda).he = function (p1, $completion) {
    return this.oqh(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetEditViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.nv2_1.b7f();
            var tmp_1 = this.mv2_1.dp2();
            PermissionFlags_getInstance();
            suspendResult = tmp_0.gd5(tmp_1, this.mv2_1.fuz_1, new Long(8, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetEditViewModel$slambda).gmp = function (db, completion) {
    var i = new CourseGroupSetEditViewModel$slambda(this.mv2_1, completion);
    i.nv2_1 = db;
    return i;
  };
  function CourseGroupSetEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.oqh(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel$slambda_1(this$0, resultContinuation) {
    this.wv2_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$slambda_1).u1m = function ($this$launchIfHasPermission, $completion) {
    var tmp = this.v1m($this$launchIfHasPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetEditViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetEditViewModel$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            if (!this.wv2_1.rp7_1.equals(new Long(0, 0))) {
              this.yv2_1 = this.wv2_1.rp7_1;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              var tmp_0 = get_doorPrimaryKeyManager(this.wv2_1.ep2());
              suspendResult = tmp_0.b62(242, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.yv2_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.zv2_1 = this.yv2_1;
            this.hd_1 = 3;
            var tmp_1 = async(this.xv2_1, VOID, VOID, CourseGroupSetEditViewModel$slambda$slambda_0(this.wv2_1, this.zv2_1, null));
            suspendResult = awaitAll([tmp_1, async(this.xv2_1, VOID, VOID, CourseGroupSetEditViewModel$slambda$slambda_2(this.wv2_1, this.zv2_1, null))], this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            l$ret$1: do {
              var this_0 = this.wv2_1.pp1_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_2 = this.wv2_1.jp2().en6(strings_getInstance().alw_1);
                var tmp0_actionBarButtonState = new ActionBarButtonUiState(true, tmp_2, true, CourseGroupSetEditViewModel$onClickSave$ref(this.wv2_1));
                var tmp1_loadingState = Companion_getInstance_85().vol_1;
                var nextValue = prevValue.nol(VOID, tmp1_loadingState, VOID, VOID, VOID, VOID, VOID, VOID, tmp0_actionBarButtonState);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.wv2_1.duz_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.uuz(VOID, VOID, VOID, VOID, true);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetEditViewModel$slambda_1).v1m = function ($this$launchIfHasPermission, completion) {
    var i = new CourseGroupSetEditViewModel$slambda_1(this.wv2_1, completion);
    i.xv2_1 = $this$launchIfHasPermission;
    return i;
  };
  function CourseGroupSetEditViewModel$slambda_2(this$0, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$slambda_1(this$0, resultContinuation);
    var l = function ($this$launchIfHasPermission, $completion) {
      return i.u1m($this$launchIfHasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.iv3_1 = $commitDelay;
    this.jv3_1 = $entity;
    this.kv3_1 = $this;
    this.lv3_1 = $key;
    this.mv3_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$onEntityChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetEditViewModel$onEntityChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetEditViewModel$onEntityChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.iv3_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.jv3_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.kv3_1.pp2(this.kv3_1.lp1_1, this.lv3_1, this.mv3_1, this.jv3_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetEditViewModel$onEntityChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseGroupSetEditViewModel$onEntityChanged$slambda(this.iv3_1, this.jv3_1, this.kv3_1, this.lv3_1, this.mv3_1, completion);
    i.nv3_1 = $this$launch;
    return i;
  };
  function CourseGroupSetEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel$onChangeGroupAssignment$lambda($groupNumber) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.ocp_1 = $groupNumber;
      return Unit_instance;
    };
  }
  function CourseGroupSetEditViewModel$onChangeGroupAssignment$lambda_0($personUid) {
    return function (it) {
      return it.gcq_1.equals($personUid);
    };
  }
  function CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda(this$0, $newState, resultContinuation) {
    this.wv3_1 = this$0;
    this.xv3_1 = $newState;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.wv3_1.pp2(this.wv3_1.lp1_1, 'courseGroupMembers', ListSerializer(Companion_instance_42.a4r()), this.xv3_1.quz_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda(this.wv3_1, this.xv3_1, completion);
    i.yv3_1 = $this$launch;
    return i;
  };
  function CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda_0(this$0, $newState, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda(this$0, $newState, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel$onClickAssignRandomly$lambda($shuffledPersonUidList, $it, $totalGroups) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.ocp_1 = ($shuffledPersonUidList.x($it.gcq_1) % $totalGroups | 0) + 1 | 0;
      return Unit_instance;
    };
  }
  function CourseGroupSetEditViewModel$onClickAssignRandomly$slambda(this$0, $newMemberList, resultContinuation) {
    this.hv4_1 = this$0;
    this.iv4_1 = $newMemberList;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$onClickAssignRandomly$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetEditViewModel$onClickAssignRandomly$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetEditViewModel$onClickAssignRandomly$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.hv4_1.pp2(this.hv4_1.lp1_1, 'courseGroupMembers', ListSerializer(Companion_instance_42.a4r()), this.iv4_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetEditViewModel$onClickAssignRandomly$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseGroupSetEditViewModel$onClickAssignRandomly$slambda(this.hv4_1, this.iv4_1, completion);
    i.jv4_1 = $this$launch;
    return i;
  };
  function CourseGroupSetEditViewModel$onClickAssignRandomly$slambda_0(this$0, $newMemberList, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$onClickAssignRandomly$slambda(this$0, $newMemberList, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel$onClickSave$slambda(this$0, $courseGroupSet, $membersToSave, resultContinuation) {
    this.sv4_1 = this$0;
    this.tv4_1 = $courseGroupSet;
    this.uv4_1 = $membersToSave;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetEditViewModel$onClickSave$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetEditViewModel$onClickSave$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetEditViewModel$onClickSave$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.sv4_1.fp2();
            suspendResult = withDoorTransactionAsync(tmp_0, VOID, CourseGroupSetEditViewModel$onClickSave$slambda$slambda_0(this.sv4_1, this.tv4_1, this.uv4_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp_1 = this.tv4_1.d7y_1;
            Companion_getInstance_112();
            this.sv4_1.sp7('CourseGroupSet', tmp_1, this.tv4_1, mapOf_0(to('clazzUid', this.sv4_1.fuz_1.toString())));
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetEditViewModel$onClickSave$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseGroupSetEditViewModel$onClickSave$slambda(this.sv4_1, this.tv4_1, this.uv4_1, completion);
    i.vv4_1 = $this$launch;
    return i;
  };
  function CourseGroupSetEditViewModel$onClickSave$slambda_0(this$0, $courseGroupSet, $membersToSave, resultContinuation) {
    var i = new CourseGroupSetEditViewModel$onClickSave$slambda(this$0, $courseGroupSet, $membersToSave, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetEditViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'CourseGroupsEdit');
    this.duz_1 = MutableStateFlow(new CourseGroupSetEditUiState());
    this.euz_1 = asStateFlow(this.duz_1);
    var tmp = this;
    Companion_getInstance_102();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.fuz_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.pp1_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.<anonymous>' call
        var tmp0_title = this.vp8(strings_getInstance().cmb_1, strings_getInstance().dmb_1);
        var tmp1_loadingState = Companion_getInstance_85().uol_1;
        var nextValue = prevValue.nol(VOID, tmp1_loadingState, tmp0_title, VOID, true);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_0 = CourseGroupSetEditViewModel$slambda_0(this, null);
    this.vp2(tmp_0, VOID, VOID, CourseGroupSetEditViewModel$slambda_2(this, null));
  }
  protoOf(CourseGroupSetEditViewModel).wv4 = function (courseGroupSet) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.duz_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.onEntityChanged.<anonymous>' call
        var tmp0_safe_receiver = prevValue.puz_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.e7y_1;
        var tmp_0 = this.wp8(tmp, courseGroupSet == null ? null : courseGroupSet.e7y_1, prevValue.ruz_1);
        var tmp2_safe_receiver = prevValue.puz_1;
        var tmp_1 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.f7y_1;
        var nextValue = prevValue.uuz(courseGroupSet, VOID, tmp_0, this.wp8(tmp_1, courseGroupSet == null ? null : courseGroupSet.f7y_1, prevValue.suz_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_43.a4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_112();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.qp7_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_2 = this;
    var tmp_3 = this.cp2();
    tmp_2.qp7_1 = launch(tmp_3, VOID, VOID, CourseGroupSetEditViewModel$onEntityChanged$slambda_0(commitDelay, courseGroupSet, this, key, serializer, null));
  };
  protoOf(CourseGroupSetEditViewModel).xv4 = function (personUid, groupNumber) {
    var tmp$ret$3;
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.duz_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.onChangeGroupAssignment.<anonymous>' call
        var tmp$ret$1;
        $l$block: {
          // Inline function 'kotlin.collections.first' call
          var tmp0_iterator = prevValue.quz_1.w();
          while (tmp0_iterator.f()) {
            var element = tmp0_iterator.e();
            // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.onChangeGroupAssignment.<anonymous>.<anonymous>' call
            if (element.gcq_1.equals(personUid)) {
              tmp$ret$1 = element;
              break $l$block;
            }
          }
          throw NoSuchElementException_init_$Create$_0('Collection contains no element matching the predicate.');
        }
        var currentGroupMemberAndName = tmp$ret$1;
        var tmp0_safe_receiver = currentGroupMemberAndName.ecq_1;
        var tmp;
        if (tmp0_safe_receiver == null) {
          tmp = null;
        } else {
          tmp = shallowCopy_9(tmp0_safe_receiver, CourseGroupSetEditViewModel$onChangeGroupAssignment$lambda(groupNumber));
        }
        var tmp_0 = currentGroupMemberAndName.nji(tmp);
        var nextValue = prevValue.uuz(VOID, replace_0(prevValue.quz_1, tmp_0, CourseGroupSetEditViewModel$onChangeGroupAssignment$lambda_0(personUid)));
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$3 = nextValue;
          break $l$block_0;
        }
      }
    }
    var newState = tmp$ret$3;
    var tmp_1 = this.cp2();
    launch(tmp_1, VOID, VOID, CourseGroupSetEditViewModel$onChangeGroupAssignment$slambda_0(this, newState, null));
  };
  protoOf(CourseGroupSetEditViewModel).yv4 = function () {
    var tmp0_safe_receiver = this.duz_1.t2().puz_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.f7y_1;
    var totalGroups = tmp1_elvis_lhs == null ? 1 : tmp1_elvis_lhs;
    // Inline function 'kotlin.collections.map' call
    var this_0 = this.duz_1.t2().quz_1;
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.onClickAssignRandomly.<anonymous>' call
      var tmp$ret$0 = item.gcq_1;
      destination.i1(tmp$ret$0);
    }
    var shuffledPersonUidList = shuffled(destination);
    // Inline function 'kotlin.collections.map' call
    var this_1 = this.duz_1.t2().quz_1;
    // Inline function 'kotlin.collections.mapTo' call
    var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_1, 10));
    var tmp0_iterator_0 = this_1.w();
    while (tmp0_iterator_0.f()) {
      var item_0 = tmp0_iterator_0.e();
      // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.onClickAssignRandomly.<anonymous>' call
      var tmp0_safe_receiver_0 = item_0.ecq_1;
      var tmp;
      if (tmp0_safe_receiver_0 == null) {
        tmp = null;
      } else {
        tmp = shallowCopy_9(tmp0_safe_receiver_0, CourseGroupSetEditViewModel$onClickAssignRandomly$lambda(shuffledPersonUidList, item_0, totalGroups));
      }
      var tmp$ret$3 = item_0.nji(tmp);
      destination_0.i1(tmp$ret$3);
    }
    var newMemberList = destination_0;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.duz_1;
      while (true) {
        var prevValue = this_2.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.onClickAssignRandomly.<anonymous>' call
        var nextValue = prevValue.uuz(VOID, newMemberList);
        if (this_2.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_0 = this.cp2();
    launch(tmp_0, VOID, VOID, CourseGroupSetEditViewModel$onClickAssignRandomly$slambda_0(this, newMemberList, null));
  };
  protoOf(CourseGroupSetEditViewModel).cqf = function () {
    var tmp0_elvis_lhs = this.duz_1.t2().puz_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var courseGroupSet = tmp;
    // Inline function 'kotlin.collections.mapNotNull' call
    // Inline function 'kotlin.collections.mapNotNullTo' call
    var this_0 = this.duz_1.t2().quz_1;
    var destination = ArrayList_init_$Create$();
    // Inline function 'kotlin.collections.forEach' call
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'kotlin.collections.mapNotNullTo.<anonymous>' call
      // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.onClickSave.<anonymous>' call
      var tmp0_safe_receiver = element.ecq_1;
      if (tmp0_safe_receiver == null)
        null;
      else {
        // Inline function 'kotlin.let' call
        // Inline function 'kotlin.contracts.contract' call
        destination.i1(tmp0_safe_receiver);
      }
    }
    var membersToSave = destination;
    var tmp$ret$4;
    $l$block_0: {
      // Inline function 'kotlin.collections.any' call
      var tmp_0;
      if (isInterface(membersToSave, Collection)) {
        tmp_0 = membersToSave.c1();
      } else {
        tmp_0 = false;
      }
      if (tmp_0) {
        tmp$ret$4 = false;
        break $l$block_0;
      }
      var tmp0_iterator_0 = membersToSave.w();
      while (tmp0_iterator_0.f()) {
        var element_0 = tmp0_iterator_0.e();
        // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.onClickSave.<anonymous>' call
        if (element_0.ocp_1 > courseGroupSet.f7y_1) {
          tmp$ret$4 = true;
          break $l$block_0;
        }
      }
      tmp$ret$4 = false;
    }
    var hasInvalidAssignments = tmp$ret$4;
    if (hasInvalidAssignments) {
      this.hp2().com(new Snack(this.jp2().en6(strings_getInstance().glc_1)));
    }
    // Inline function 'kotlin.text.isNullOrBlank' call
    var this_1 = courseGroupSet.e7y_1;
    // Inline function 'kotlin.contracts.contract' call
    if (this_1 == null ? true : isBlank(this_1)) {
      $l$block_1: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_2 = this.duz_1;
        while (true) {
          var prevValue = this_2.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.onClickSave.<anonymous>' call
          var nextValue = prevValue.uuz(VOID, VOID, this.jp2().en6(strings_getInstance().blh_1));
          if (this_2.y1k(prevValue, nextValue)) {
            break $l$block_1;
          }
        }
      }
    }
    if (courseGroupSet.f7y_1 < 1) {
      $l$block_2: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_3 = this.duz_1;
        while (true) {
          var prevValue_0 = this_3.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.edit.CourseGroupSetEditViewModel.onClickSave.<anonymous>' call
          var nextValue_0 = prevValue_0.uuz(VOID, VOID, VOID, this.jp2().en6(strings_getInstance().pm9_1));
          if (this_3.y1k(prevValue_0, nextValue_0)) {
            break $l$block_2;
          }
        }
      }
    }
    if ((hasInvalidAssignments ? true : !(this.duz_1.t2().suz_1 == null)) ? true : !(this.duz_1.t2().ruz_1 == null)) {
      return Unit_instance;
    }
    var tmp_1 = this.cp2();
    launch(tmp_1, VOID, VOID, CourseGroupSetEditViewModel$onClickSave$slambda_0(this, courseGroupSet, membersToSave, null));
  };
  function CourseGroupSetEditUiState(courseGroupSet, membersList, courseTitleError, numOfGroupsError, fieldsEnabled) {
    courseGroupSet = courseGroupSet === VOID ? null : courseGroupSet;
    membersList = membersList === VOID ? emptyList() : membersList;
    courseTitleError = courseTitleError === VOID ? null : courseTitleError;
    numOfGroupsError = numOfGroupsError === VOID ? null : numOfGroupsError;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    this.puz_1 = courseGroupSet;
    this.quz_1 = membersList;
    this.ruz_1 = courseTitleError;
    this.suz_1 = numOfGroupsError;
    this.tuz_1 = fieldsEnabled;
  }
  protoOf(CourseGroupSetEditUiState).zv4 = function (courseGroupSet, membersList, courseTitleError, numOfGroupsError, fieldsEnabled) {
    return new CourseGroupSetEditUiState(courseGroupSet, membersList, courseTitleError, numOfGroupsError, fieldsEnabled);
  };
  protoOf(CourseGroupSetEditUiState).uuz = function (courseGroupSet, membersList, courseTitleError, numOfGroupsError, fieldsEnabled, $super) {
    courseGroupSet = courseGroupSet === VOID ? this.puz_1 : courseGroupSet;
    membersList = membersList === VOID ? this.quz_1 : membersList;
    courseTitleError = courseTitleError === VOID ? this.ruz_1 : courseTitleError;
    numOfGroupsError = numOfGroupsError === VOID ? this.suz_1 : numOfGroupsError;
    fieldsEnabled = fieldsEnabled === VOID ? this.tuz_1 : fieldsEnabled;
    return $super === VOID ? this.zv4(courseGroupSet, membersList, courseTitleError, numOfGroupsError, fieldsEnabled) : $super.zv4.call(this, courseGroupSet, membersList, courseTitleError, numOfGroupsError, fieldsEnabled);
  };
  protoOf(CourseGroupSetEditUiState).toString = function () {
    return 'CourseGroupSetEditUiState(courseGroupSet=' + this.puz_1 + ', membersList=' + this.quz_1 + ', courseTitleError=' + this.ruz_1 + ', numOfGroupsError=' + this.suz_1 + ', fieldsEnabled=' + this.tuz_1 + ')';
  };
  protoOf(CourseGroupSetEditUiState).hashCode = function () {
    var result = this.puz_1 == null ? 0 : hashCode(this.puz_1);
    result = imul(result, 31) + hashCode(this.quz_1) | 0;
    result = imul(result, 31) + (this.ruz_1 == null ? 0 : getStringHashCode(this.ruz_1)) | 0;
    result = imul(result, 31) + (this.suz_1 == null ? 0 : getStringHashCode(this.suz_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.tuz_1) | 0;
    return result;
  };
  protoOf(CourseGroupSetEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CourseGroupSetEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof CourseGroupSetEditUiState ? other : THROW_CCE();
    if (!equals(this.puz_1, tmp0_other_with_cast.puz_1))
      return false;
    if (!equals(this.quz_1, tmp0_other_with_cast.quz_1))
      return false;
    if (!(this.ruz_1 == tmp0_other_with_cast.ruz_1))
      return false;
    if (!(this.suz_1 == tmp0_other_with_cast.suz_1))
      return false;
    if (!(this.tuz_1 === tmp0_other_with_cast.tuz_1))
      return false;
    return true;
  };
  function CourseGroupSetListViewModel$slambda$lambda(this$0) {
    return function () {
      var tmp = this$0.fp2().b7f();
      var tmp_0 = this$0.dp2();
      PermissionFlags_getInstance();
      return tmp.cd5(tmp_0, this$0.av6_1, new Long(8, 0));
    };
  }
  function CourseGroupSetListViewModel$slambda$lambda$lambda($visible) {
    return function () {
      return 'CourseGroupSetList: set showAddItem visible = ' + $visible;
    };
  }
  function CourseGroupSetListViewModel$slambda$lambda_0(this$0) {
    return function (visible) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.gpa_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.list.CourseGroupSetListViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var tmp = Napier_getInstance();
          tmp.r5d(VOID, VOID, CourseGroupSetListViewModel$slambda$lambda$lambda(visible));
          var nextValue = prevValue.gv6(visible);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function CourseGroupSetListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.pv6_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetListViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetListViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetListViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = collectClazzNameAndUpdateTitle(this.pv6_1.av6_1, this.pv6_1.ep2(), this.pv6_1.pp1_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetListViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseGroupSetListViewModel$slambda$slambda$slambda(this.pv6_1, completion);
    i.qv6_1 = $this$launch;
    return i;
  };
  function CourseGroupSetListViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new CourseGroupSetListViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetListViewModel$slambda$slambda($this_launch, this$0, resultContinuation) {
    this.zv6_1 = $this_launch;
    this.av7_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetListViewModel$slambda$slambda).m86 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetListViewModel$slambda$slambda).z77 = function ($completion) {
    return this.m86($completion);
  };
  protoOf(CourseGroupSetListViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.zv6_1, VOID, VOID, CourseGroupSetListViewModel$slambda$slambda$slambda_0(this.av7_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseGroupSetListViewModel$slambda$slambda).y77 = function (completion) {
    return new CourseGroupSetListViewModel$slambda$slambda(this.zv6_1, this.av7_1, completion);
  };
  function CourseGroupSetListViewModel$slambda$slambda_0($this_launch, this$0, resultContinuation) {
    var i = new CourseGroupSetListViewModel$slambda$slambda($this_launch, this$0, resultContinuation);
    var l = function ($completion) {
      return i.m86($completion);
    };
    l.$arity = 0;
    return l;
  }
  function Companion_141() {
    this.bv7_1 = 'CourseGroups';
  }
  var Companion_instance_189;
  function Companion_getInstance_158() {
    return Companion_instance_189;
  }
  function CourseGroupSetListViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.fp2().e7d().lcx(this$0.av6_1, toQueryLikeParam(this$0.pp1_1.t2().fol_1.uok_1), this$0.gpa_1.t2().fv6_1.lor_1);
    };
  }
  function CourseGroupSetListViewModel$slambda(this$0, resultContinuation) {
    this.kv7_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetListViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetListViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetListViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = CourseGroupSetListViewModel$slambda$lambda(this.kv7_1);
            var tmp_1 = strings_getInstance().qlt_1;
            suspendResult = this.kv7_1.qpb(tmp_0, tmp_1, CourseGroupSetListViewModel$slambda$lambda_0(this.kv7_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetListViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseGroupSetListViewModel$slambda(this.kv7_1, completion);
    i.lv7_1 = $this$launch;
    return i;
  };
  function CourseGroupSetListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new CourseGroupSetListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetListViewModel$slambda_1(this$0, resultContinuation) {
    this.uv7_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseGroupSetListViewModel$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseGroupSetListViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseGroupSetListViewModel$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.uv7_1.gpa_1, CourseGroupSetListViewModel$slambda$slambda_0(this.vv7_1, this.uv7_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseGroupSetListViewModel$slambda_1).v1m = function ($this$launch, completion) {
    var i = new CourseGroupSetListViewModel$slambda_1(this.uv7_1, completion);
    i.vv7_1 = $this$launch;
    return i;
  };
  function CourseGroupSetListViewModel$slambda_2(this$0, resultContinuation) {
    var i = new CourseGroupSetListViewModel$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseGroupSetListViewModel(di, savedStateHandle) {
    UstadListViewModel.call(this, di, savedStateHandle, new CourseGroupSetListUiState(), 'CourseGroups');
    var tmp = this;
    Companion_getInstance_102();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.av6_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    tmp_0.bv6_1 = CourseGroupSetListViewModel$pagingSourceFactory$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.gpa_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.list.CourseGroupSetListViewModel.<anonymous>' call
        var nextValue = prevValue.gv6(VOID, this.bv6_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.pp1_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.list.CourseGroupSetListViewModel.<anonymous>' call
        var nextValue_0 = prevValue_0.nol(VOID, VOID, VOID, true, VOID, VOID, VOID, this.ppb());
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_1 = this.cp2();
    launch(tmp_1, VOID, VOID, CourseGroupSetListViewModel$slambda_0(this, null));
    var tmp_2 = this.cp2();
    launch(tmp_2, VOID, VOID, CourseGroupSetListViewModel$slambda_2(this, null));
  }
  protoOf(CourseGroupSetListViewModel).apb = function (searchText) {
    this.ipa_1.i1h(new RefreshCommand());
  };
  protoOf(CourseGroupSetListViewModel).wv7 = function (sortOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.gpa_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.coursegroupset.list.CourseGroupSetListViewModel.onSortOptionChanged.<anonymous>' call
        var nextValue = prevValue.gv6(VOID, VOID, VOID, sortOption);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.ipa_1.i1h(new RefreshCommand());
  };
  protoOf(CourseGroupSetListViewModel).bpb = function () {
    Companion_getInstance_102();
    this.tpb('CourseGroupsEdit', mapOf_0(to('clazzUid', this.av6_1.toString())));
  };
  protoOf(CourseGroupSetListViewModel).xv7 = function (entry) {
    var tmp = entry.d7y_1;
    Companion_getInstance_112();
    this.vpb('CourseGroupSet', tmp, entry, mapOf_0(to('clazzUid', this.av6_1.toString())));
  };
  function Companion_142() {
    Companion_instance_190 = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().yld_1;
    var tmp_1 = new SortOrderOption(tmp_0, 1, true);
    var tmp_2 = strings_getInstance().yld_1;
    tmp.yv7_1 = listOf([tmp_1, new SortOrderOption(tmp_2, 2, false)]);
  }
  var Companion_instance_190;
  function Companion_getInstance_159() {
    if (Companion_instance_190 == null)
      new Companion_142();
    return Companion_instance_190;
  }
  function CourseGroupSetListUiState$_init_$lambda_2d65m2() {
    return new EmptyPagingSource();
  }
  function CourseGroupSetListUiState(showAddItem, courseGroupSets, sortOptions, sortOption) {
    Companion_getInstance_159();
    showAddItem = showAddItem === VOID ? false : showAddItem;
    var tmp;
    if (courseGroupSets === VOID) {
      tmp = CourseGroupSetListUiState$_init_$lambda_2d65m2;
    } else {
      tmp = courseGroupSets;
    }
    courseGroupSets = tmp;
    sortOptions = sortOptions === VOID ? Companion_getInstance_159().yv7_1 : sortOptions;
    sortOption = sortOption === VOID ? first_0(sortOptions) : sortOption;
    this.cv6_1 = showAddItem;
    this.dv6_1 = courseGroupSets;
    this.ev6_1 = sortOptions;
    this.fv6_1 = sortOption;
  }
  protoOf(CourseGroupSetListUiState).zv7 = function (showAddItem, courseGroupSets, sortOptions, sortOption) {
    return new CourseGroupSetListUiState(showAddItem, courseGroupSets, sortOptions, sortOption);
  };
  protoOf(CourseGroupSetListUiState).gv6 = function (showAddItem, courseGroupSets, sortOptions, sortOption, $super) {
    showAddItem = showAddItem === VOID ? this.cv6_1 : showAddItem;
    courseGroupSets = courseGroupSets === VOID ? this.dv6_1 : courseGroupSets;
    sortOptions = sortOptions === VOID ? this.ev6_1 : sortOptions;
    sortOption = sortOption === VOID ? this.fv6_1 : sortOption;
    return $super === VOID ? this.zv7(showAddItem, courseGroupSets, sortOptions, sortOption) : $super.zv7.call(this, showAddItem, courseGroupSets, sortOptions, sortOption);
  };
  protoOf(CourseGroupSetListUiState).toString = function () {
    return 'CourseGroupSetListUiState(showAddItem=' + this.cv6_1 + ', courseGroupSets=' + this.dv6_1 + ', sortOptions=' + this.ev6_1 + ', sortOption=' + this.fv6_1 + ')';
  };
  protoOf(CourseGroupSetListUiState).hashCode = function () {
    var result = getBooleanHashCode(this.cv6_1);
    result = imul(result, 31) + hashCode(this.dv6_1) | 0;
    result = imul(result, 31) + hashCode(this.ev6_1) | 0;
    result = imul(result, 31) + this.fv6_1.hashCode() | 0;
    return result;
  };
  protoOf(CourseGroupSetListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CourseGroupSetListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof CourseGroupSetListUiState ? other : THROW_CCE();
    if (!(this.cv6_1 === tmp0_other_with_cast.cv6_1))
      return false;
    if (!equals(this.dv6_1, tmp0_other_with_cast.dv6_1))
      return false;
    if (!equals(this.ev6_1, tmp0_other_with_cast.ev6_1))
      return false;
    if (!this.fv6_1.equals(tmp0_other_with_cast.fv6_1))
      return false;
    return true;
  };
  function CourseTerminologyEditViewModel$slambda$slambda(this$0, resultContinuation) {
    this.iv8_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseTerminologyEditViewModel$slambda$slambda).bpq = function (it, $completion) {
    var tmp = this.gmp(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseTerminologyEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.bpq(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseTerminologyEditViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            var this_0 = this.jv8_1.d7d();
            var tmp_1;
            if (!this.iv8_1.rp7_1.equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            tmp_0.kv8_1 = tmp_1;
            if (this.kv8_1 == null) {
              this.lv8_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.kv8_1.dds(this.iv8_1.rp7_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.lv8_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.lv8_1;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseTerminologyEditViewModel$slambda$slambda).gmp = function (it, completion) {
    var i = new CourseTerminologyEditViewModel$slambda$slambda(this.iv8_1, completion);
    i.jv8_1 = it;
    return i;
  };
  function CourseTerminologyEditViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new CourseTerminologyEditViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.bpq(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseTerminologyEditViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.uv8_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseTerminologyEditViewModel$slambda$slambda_1).xv8 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseTerminologyEditViewModel$slambda$slambda_1).z77 = function ($completion) {
    return this.xv8($completion);
  };
  protoOf(CourseTerminologyEditViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.vv8_1 = new CourseTerminology();
            var tmp_1 = this;
            tmp_1.wv8_1 = this.vv8_1;
            this.hd_1 = 1;
            var tmp_2 = get_doorPrimaryKeyManager(this.uv8_1.ep2());
            suspendResult = tmp_2.b62(450, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            this.wv8_1.p8f_1 = ARGUMENT;
            return this.vv8_1;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseTerminologyEditViewModel$slambda$slambda_1).y77 = function (completion) {
    return new CourseTerminologyEditViewModel$slambda$slambda_1(this.uv8_1, completion);
  };
  function CourseTerminologyEditViewModel$slambda$slambda_2(this$0, resultContinuation) {
    var i = new CourseTerminologyEditViewModel$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($completion) {
      return i.xv8($completion);
    };
    l.$arity = 0;
    return l;
  }
  function CourseTerminologyEditViewModel$slambda$lambda(this$0) {
    return function (terminology) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.vv9_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.courseterminology.edit.CourseTerminologyEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.bva(VOID, terminology, VOID, toTerminologyEntries(terminology, this$0.z4q(), this$0.jp2()));
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function CourseTerminologyEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.cqf();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function Companion_143() {
    this.cva_1 = 'CourseTerminologyEdit';
  }
  var Companion_instance_191;
  function Companion_getInstance_160() {
    return Companion_instance_191;
  }
  function CourseTerminologyEditViewModel$slambda(this$0, resultContinuation) {
    this.lva_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseTerminologyEditViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseTerminologyEditViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseTerminologyEditViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.nva_1 = Companion_instance_33.a4r();
            this.hd_1 = 1;
            var tmp_0 = CourseTerminologyEditViewModel$slambda$slambda_0(this.lva_1, null);
            var tmp_1 = CourseTerminologyEditViewModel$slambda$slambda_2(this.lva_1, null);
            suspendResult = this.lva_1.tp2(this.nva_1, VOID, VOID, tmp_0, tmp_1, CourseTerminologyEditViewModel$slambda$lambda(this.lva_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.lva_1.vv9_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.bva(VOID, VOID, true);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.lva_1.pp1_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var tmp_2 = this.lva_1.jp2().en6(strings_getInstance().alw_1);
                var tmp0_actionBarButtonState = new ActionBarButtonUiState(true, tmp_2, VOID, CourseTerminologyEditViewModel$onClickSave$ref(this.lva_1));
                var tmp1_loadingState = Companion_getInstance_85().vol_1;
                var nextValue_0 = prevValue_0.nol(VOID, tmp1_loadingState, VOID, VOID, VOID, VOID, VOID, VOID, tmp0_actionBarButtonState);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseTerminologyEditViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseTerminologyEditViewModel$slambda(this.lva_1, completion);
    i.mva_1 = $this$launch;
    return i;
  };
  function CourseTerminologyEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new CourseTerminologyEditViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseTerminologyEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.wva_1 = $commitDelay;
    this.xva_1 = $entity;
    this.yva_1 = $this;
    this.zva_1 = $key;
    this.avb_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseTerminologyEditViewModel$onEntityChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseTerminologyEditViewModel$onEntityChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseTerminologyEditViewModel$onEntityChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.wva_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.xva_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.yva_1.pp2(this.yva_1.lp1_1, this.zva_1, this.avb_1, this.xva_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseTerminologyEditViewModel$onEntityChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseTerminologyEditViewModel$onEntityChanged$slambda(this.wva_1, this.xva_1, this.yva_1, this.zva_1, this.avb_1, completion);
    i.bvb_1 = $this$launch;
    return i;
  };
  function CourseTerminologyEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new CourseTerminologyEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseTerminologyEditViewModel$onTerminologyTermChanged$lambda($terminologyEntry) {
    return function (it) {
      return it.jon_1.equals($terminologyEntry.jon_1);
    };
  }
  function CourseTerminologyEditViewModel$onTerminologyTermChanged$lambda_0($newTermList, this$0) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.r8f_1 = encodeToStringMap($newTermList, this$0.z4q());
      return Unit_instance;
    };
  }
  function CourseTerminologyEditViewModel$onClickSave$slambda(this$0, resultContinuation) {
    this.kvb_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseTerminologyEditViewModel$onClickSave$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseTerminologyEditViewModel$onClickSave$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseTerminologyEditViewModel$onClickSave$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var tmp0_elvis_lhs = this.kvb_1.vv9_1.t2().yv9_1;
            var tmp_1;
            if (tmp0_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_1 = tmp0_elvis_lhs;
            }

            tmp_0.mvb_1 = tmp_1;
            this.hd_1 = 1;
            suspendResult = this.kvb_1.fp2().d7d().eds(this.mvb_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.kvb_1.vv9_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.bva(VOID, VOID, true);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.kvb_1.up7(this.mvb_1);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseTerminologyEditViewModel$onClickSave$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseTerminologyEditViewModel$onClickSave$slambda(this.kvb_1, completion);
    i.lvb_1 = $this$launch;
    return i;
  };
  function CourseTerminologyEditViewModel$onClickSave$slambda_0(this$0, resultContinuation) {
    var i = new CourseTerminologyEditViewModel$onClickSave$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseTerminologyEditViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'CourseTerminologyEdit');
    this.vv9_1 = MutableStateFlow(new CourseTerminologyEditUiState());
    this.wv9_1 = asStateFlow(this.vv9_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.pp1_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.courseterminology.edit.CourseTerminologyEditViewModel.<anonymous>' call
        var tmp0_title = this.vp8(strings_getInstance().wma_1, strings_getInstance().xma_1);
        var tmp1_loadingState = Companion_getInstance_85().uol_1;
        var nextValue = prevValue.nol(VOID, tmp1_loadingState, tmp0_title);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp = this.cp2();
    launch(tmp, VOID, VOID, CourseTerminologyEditViewModel$slambda_0(this, null));
  }
  protoOf(CourseTerminologyEditViewModel).nvb = function (courseTerminology) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.vv9_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.courseterminology.edit.CourseTerminologyEditViewModel.onEntityChanged.<anonymous>' call
        var nextValue = prevValue.bva(VOID, courseTerminology);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_33.a4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_112();
    var key = 'entityState';
    var tmp0_safe_receiver = this.qp7_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp = this;
    var tmp_0 = this.cp2();
    tmp.qp7_1 = launch(tmp_0, VOID, VOID, CourseTerminologyEditViewModel$onEntityChanged$slambda_0(commitDelay, courseTerminology, this, key, serializer, null));
  };
  protoOf(CourseTerminologyEditViewModel).ovb = function (terminologyEntry) {
    var tmp = this.vv9_1.t2().ava_1;
    var newTermList = replace_0(tmp, terminologyEntry, CourseTerminologyEditViewModel$onTerminologyTermChanged$lambda(terminologyEntry));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.vv9_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.courseterminology.edit.CourseTerminologyEditViewModel.onTerminologyTermChanged.<anonymous>' call
        var nextValue = prevValue.bva(VOID, VOID, VOID, newTermList);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp0_safe_receiver = this.vv9_1.t2().yv9_1;
    var tmp_0;
    if (tmp0_safe_receiver == null) {
      tmp_0 = null;
    } else {
      tmp_0 = shallowCopy_10(tmp0_safe_receiver, CourseTerminologyEditViewModel$onTerminologyTermChanged$lambda_0(newTermList, this));
    }
    this.nvb(tmp_0);
  };
  protoOf(CourseTerminologyEditViewModel).cqf = function () {
    if (!this.vv9_1.t2().zv9_1)
      return Unit_instance;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.vv9_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.courseterminology.edit.CourseTerminologyEditViewModel.onClickSave.<anonymous>' call
        var nextValue = prevValue.bva(VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp = this.cp2();
    launch(tmp, VOID, VOID, CourseTerminologyEditViewModel$onClickSave$slambda_0(this, null));
  };
  function CourseTerminologyEditUiState(titleError, entity, fieldsEnabled, terminologyTermList) {
    titleError = titleError === VOID ? null : titleError;
    entity = entity === VOID ? null : entity;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    terminologyTermList = terminologyTermList === VOID ? emptyList() : terminologyTermList;
    this.xv9_1 = titleError;
    this.yv9_1 = entity;
    this.zv9_1 = fieldsEnabled;
    this.ava_1 = terminologyTermList;
  }
  protoOf(CourseTerminologyEditUiState).pvb = function (titleError, entity, fieldsEnabled, terminologyTermList) {
    return new CourseTerminologyEditUiState(titleError, entity, fieldsEnabled, terminologyTermList);
  };
  protoOf(CourseTerminologyEditUiState).bva = function (titleError, entity, fieldsEnabled, terminologyTermList, $super) {
    titleError = titleError === VOID ? this.xv9_1 : titleError;
    entity = entity === VOID ? this.yv9_1 : entity;
    fieldsEnabled = fieldsEnabled === VOID ? this.zv9_1 : fieldsEnabled;
    terminologyTermList = terminologyTermList === VOID ? this.ava_1 : terminologyTermList;
    return $super === VOID ? this.pvb(titleError, entity, fieldsEnabled, terminologyTermList) : $super.pvb.call(this, titleError, entity, fieldsEnabled, terminologyTermList);
  };
  protoOf(CourseTerminologyEditUiState).toString = function () {
    return 'CourseTerminologyEditUiState(titleError=' + this.xv9_1 + ', entity=' + this.yv9_1 + ', fieldsEnabled=' + this.zv9_1 + ', terminologyTermList=' + this.ava_1 + ')';
  };
  protoOf(CourseTerminologyEditUiState).hashCode = function () {
    var result = this.xv9_1 == null ? 0 : getStringHashCode(this.xv9_1);
    result = imul(result, 31) + (this.yv9_1 == null ? 0 : hashCode(this.yv9_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.zv9_1) | 0;
    result = imul(result, 31) + hashCode(this.ava_1) | 0;
    return result;
  };
  protoOf(CourseTerminologyEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CourseTerminologyEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof CourseTerminologyEditUiState ? other : THROW_CCE();
    if (!(this.xv9_1 == tmp0_other_with_cast.xv9_1))
      return false;
    if (!equals(this.yv9_1, tmp0_other_with_cast.yv9_1))
      return false;
    if (!(this.zv9_1 === tmp0_other_with_cast.zv9_1))
      return false;
    if (!equals(this.ava_1, tmp0_other_with_cast.ava_1))
      return false;
    return true;
  };
  function CourseTerminologyListViewModel$slambda$lambda() {
    return flowOf(true);
  }
  function CourseTerminologyListViewModel$slambda$lambda_0(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.gpa_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.courseterminology.list.CourseTerminologyListViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.svb(VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function Companion_144() {
    this.tvb_1 = 'CourseTerminologyList';
  }
  var Companion_instance_192;
  function Companion_getInstance_161() {
    return Companion_instance_192;
  }
  function CourseTerminologyListViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.fp2().d7d().ads();
    };
  }
  function CourseTerminologyListViewModel$slambda(this$0, resultContinuation) {
    this.cvc_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseTerminologyListViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseTerminologyListViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseTerminologyListViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = CourseTerminologyListViewModel$slambda$lambda;
            var tmp_1 = strings_getInstance().uma_1;
            suspendResult = this.cvc_1.qpb(tmp_0, tmp_1, CourseTerminologyListViewModel$slambda$lambda_0(this.cvc_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseTerminologyListViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseTerminologyListViewModel$slambda(this.cvc_1, completion);
    i.dvc_1 = $this$launch;
    return i;
  };
  function CourseTerminologyListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new CourseTerminologyListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseTerminologyListViewModel(di, savedStateHandle) {
    UstadListViewModel.call(this, di, savedStateHandle, new CourseTerminologyListUiState(), 'CourseTerminologyList');
    var tmp = this;
    tmp.evd_1 = CourseTerminologyListViewModel$pagingSourceFactory$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.pp1_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.courseterminology.list.CourseTerminologyListViewModel.<anonymous>' call
        var nextValue = prevValue.nol(VOID, VOID, this.xpb(strings_getInstance().uma_1, strings_getInstance().vma_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.gpa_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.courseterminology.list.CourseTerminologyListViewModel.<anonymous>' call
        var nextValue_0 = prevValue_0.svb(this.evd_1);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_0 = this.cp2();
    launch(tmp_0, VOID, VOID, CourseTerminologyListViewModel$slambda_0(this, null));
  }
  protoOf(CourseTerminologyListViewModel).bpb = function () {
    this.upb('CourseTerminologyEdit');
  };
  protoOf(CourseTerminologyListViewModel).fvd = function (entry) {
    this.wpb('CourseTerminologyEdit', entry.p8f_1, entry);
  };
  protoOf(CourseTerminologyListViewModel).apb = function (searchText) {
  };
  function CourseTerminologyListUiState$_init_$lambda_k6bmuc() {
    return new EmptyPagingSource();
  }
  function CourseTerminologyListUiState(terminologyList, showAddItemInList) {
    var tmp;
    if (terminologyList === VOID) {
      tmp = CourseTerminologyListUiState$_init_$lambda_k6bmuc;
    } else {
      tmp = terminologyList;
    }
    terminologyList = tmp;
    showAddItemInList = showAddItemInList === VOID ? false : showAddItemInList;
    this.qvb_1 = terminologyList;
    this.rvb_1 = showAddItemInList;
  }
  protoOf(CourseTerminologyListUiState).gvd = function (terminologyList, showAddItemInList) {
    return new CourseTerminologyListUiState(terminologyList, showAddItemInList);
  };
  protoOf(CourseTerminologyListUiState).svb = function (terminologyList, showAddItemInList, $super) {
    terminologyList = terminologyList === VOID ? this.qvb_1 : terminologyList;
    showAddItemInList = showAddItemInList === VOID ? this.rvb_1 : showAddItemInList;
    return $super === VOID ? this.gvd(terminologyList, showAddItemInList) : $super.gvd.call(this, terminologyList, showAddItemInList);
  };
  protoOf(CourseTerminologyListUiState).toString = function () {
    return 'CourseTerminologyListUiState(terminologyList=' + this.qvb_1 + ', showAddItemInList=' + this.rvb_1 + ')';
  };
  protoOf(CourseTerminologyListUiState).hashCode = function () {
    var result = hashCode(this.qvb_1);
    result = imul(result, 31) + getBooleanHashCode(this.rvb_1) | 0;
    return result;
  };
  protoOf(CourseTerminologyListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CourseTerminologyListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof CourseTerminologyListUiState ? other : THROW_CCE();
    if (!equals(this.qvb_1, tmp0_other_with_cast.qvb_1))
      return false;
    if (!(this.rvb_1 === tmp0_other_with_cast.rvb_1))
      return false;
    return true;
  };
  function get_delItemContentTypeStringResource(_this__u8e3s4) {
    var tmp;
    var tmp_0;
    var tmp_1 = _this__u8e3s4.he1_1;
    if (tmp_1 === 7) {
      tmp_0 = _this__u8e3s4.le1_1;
    } else {
      tmp_0 = false;
    }
    if (tmp_0) {
      tmp = strings_getInstance().wm5_1;
    } else {
      var tmp_2 = _this__u8e3s4.he1_1;
      if (tmp_2 === 7) {
        tmp = strings_getInstance().blx_1;
      } else {
        tmp = null;
      }
    }
    return tmp;
  }
  function _get_restoreDeletedItemUseCase__7lscig($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.ive_1;
    restoreDeletedItemUseCase$factory_0();
    return this_0.t2();
  }
  function _get_deletePermanentlyUseCase__wdw610($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.jve_1;
    deletePermanentlyUseCase$factory_0();
    return this_0.t2();
  }
  function restoreItems($this, items) {
    var tmp = $this.cp2();
    launch(tmp, VOID, VOID, DeletedItemListViewModel$restoreItems$slambda_0($this, items, null));
  }
  function Companion_145() {
    this.kve_1 = 'DeletedItems';
  }
  var Companion_instance_193;
  function Companion_getInstance_162() {
    return Companion_instance_193;
  }
  function DeletedItemListViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.fp2().z7e().ae1(this$0.dp2(), false);
    };
  }
  function DeletedItemListViewModel$onConfirmDeletePermanently$slambda(this$0, $itemsToDelete, resultContinuation) {
    this.tve_1 = this$0;
    this.uve_1 = $itemsToDelete;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DeletedItemListViewModel$onConfirmDeletePermanently$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DeletedItemListViewModel$onConfirmDeletePermanently$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DeletedItemListViewModel$onConfirmDeletePermanently$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = _get_deletePermanentlyUseCase__wdw610(this.tve_1).rnx(this.uve_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.tve_1.hp2().com(new Snack(this.tve_1.jp2().nud(plurals_getInstance().umi_1, this.uve_1.u())));
            this.id_1 = 3;
            this.hd_1 = 4;
            continue $sm;
          case 2:
            this.id_1 = 3;
            var tmp_0 = this.kd_1;
            if (tmp_0 instanceof Error) {
              var e = this.kd_1;
              Napier_getInstance().d5e('Exception deleting', e);
              this.tve_1.hp2().com(new Snack(this.tve_1.jp2().en6(strings_getInstance().glc_1) + ': ' + e.message));
              this.hd_1 = 4;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 3:
            throw this.kd_1;
          case 4:
            this.id_1 = 3;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 3) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(DeletedItemListViewModel$onConfirmDeletePermanently$slambda).v1m = function ($this$launch, completion) {
    var i = new DeletedItemListViewModel$onConfirmDeletePermanently$slambda(this.tve_1, this.uve_1, completion);
    i.vve_1 = $this$launch;
    return i;
  };
  function DeletedItemListViewModel$onConfirmDeletePermanently$slambda_0(this$0, $itemsToDelete, resultContinuation) {
    var i = new DeletedItemListViewModel$onConfirmDeletePermanently$slambda(this$0, $itemsToDelete, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DeletedItemListViewModel$restoreItems$slambda(this$0, $items, resultContinuation) {
    this.evf_1 = this$0;
    this.fvf_1 = $items;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DeletedItemListViewModel$restoreItems$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DeletedItemListViewModel$restoreItems$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DeletedItemListViewModel$restoreItems$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = _get_restoreDeletedItemUseCase__7lscig(this.evf_1).rnx(this.fvf_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.evf_1.hp2().com(new Snack(this.evf_1.jp2().nud(plurals_getInstance().vmi_1, this.fvf_1.u())));
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(DeletedItemListViewModel$restoreItems$slambda).v1m = function ($this$launch, completion) {
    var i = new DeletedItemListViewModel$restoreItems$slambda(this.evf_1, this.fvf_1, completion);
    i.gvf_1 = $this$launch;
    return i;
  };
  function DeletedItemListViewModel$restoreItems$slambda_0(this$0, $items, resultContinuation) {
    var i = new DeletedItemListViewModel$restoreItems$slambda(this$0, $items, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DeletedItemListViewModel(di, savedStateHandle) {
    UstadListViewModel.call(this, di, savedStateHandle, new DeletedItemListUiState(), 'DeletedItems');
    var tmp = this;
    tmp.hve_1 = DeletedItemListViewModel$pagingSourceFactory$lambda(this);
    var tmp_0 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(RestoreDeletedItemUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    tmp_0.ive_1 = Instance(this_0, tmp$ret$0, null).n5c(this, restoreDeletedItemUseCase$factory());
    var tmp_2 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_1 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(DeletePermanentlyUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    tmp_2.jve_1 = Instance(this_1, tmp$ret$2, null).n5c(this, deletePermanentlyUseCase$factory());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.gpa_1;
      while (true) {
        var prevValue = this_2.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.deleteditem.DeletedItemListViewModel.<anonymous>' call
        var nextValue = prevValue.lvf(this.hve_1);
        if (this_2.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_3 = this.pp1_1;
      while (true) {
        var prevValue_0 = this_3.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.deleteditem.DeletedItemListViewModel.<anonymous>' call
        var nextValue_0 = prevValue_0.nol(VOID, VOID, this.jp2().en6(strings_getInstance().vmf_1));
        if (this_3.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
  }
  protoOf(DeletedItemListViewModel).apb = function (searchText) {
  };
  protoOf(DeletedItemListViewModel).mvf = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.gpa_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.deleteditem.DeletedItemListViewModel.onDismissConfirmDialog.<anonymous>' call
        var nextValue = prevValue.lvf(VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(DeletedItemListViewModel).nvf = function () {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.getAndUpdate' call
      var this_0 = this.gpa_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.deleteditem.DeletedItemListViewModel.onConfirmDeletePermanently.<anonymous>' call
        var nextValue = prevValue.lvf(VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = prevValue;
          break $l$block;
        }
      }
    }
    var itemsToDelete = tmp$ret$1.kvf_1;
    var tmp = this.cp2();
    launch(tmp, VOID, VOID, DeletedItemListViewModel$onConfirmDeletePermanently$slambda_0(this, itemsToDelete, null));
  };
  protoOf(DeletedItemListViewModel).ovf = function (item) {
    restoreItems(this, listOf_0(item));
  };
  protoOf(DeletedItemListViewModel).pvf = function (item) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.gpa_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.deleteditem.DeletedItemListViewModel.onClickDeletePermanently.<anonymous>' call
        var tmp0_itemsToConfirmDeletion = listOf_0(item);
        var tmp1_deleteConfirmText = this.jp2().nud(plurals_getInstance().wmi_1, 1);
        var nextValue = prevValue.lvf(VOID, true, tmp1_deleteConfirmText, tmp0_itemsToConfirmDeletion);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(DeletedItemListViewModel).bpb = function () {
  };
  function DeletedItemListUiState$_init_$lambda_114460() {
    return new EmptyPagingSource();
  }
  function DeletedItemListUiState(deletedItemsList, confirmDialogVisible, deleteConfirmText, itemsToConfirmDeletion) {
    var tmp;
    if (deletedItemsList === VOID) {
      tmp = DeletedItemListUiState$_init_$lambda_114460;
    } else {
      tmp = deletedItemsList;
    }
    deletedItemsList = tmp;
    confirmDialogVisible = confirmDialogVisible === VOID ? false : confirmDialogVisible;
    deleteConfirmText = deleteConfirmText === VOID ? null : deleteConfirmText;
    itemsToConfirmDeletion = itemsToConfirmDeletion === VOID ? emptyList() : itemsToConfirmDeletion;
    this.hvf_1 = deletedItemsList;
    this.ivf_1 = confirmDialogVisible;
    this.jvf_1 = deleteConfirmText;
    this.kvf_1 = itemsToConfirmDeletion;
  }
  protoOf(DeletedItemListUiState).qvf = function (deletedItemsList, confirmDialogVisible, deleteConfirmText, itemsToConfirmDeletion) {
    return new DeletedItemListUiState(deletedItemsList, confirmDialogVisible, deleteConfirmText, itemsToConfirmDeletion);
  };
  protoOf(DeletedItemListUiState).lvf = function (deletedItemsList, confirmDialogVisible, deleteConfirmText, itemsToConfirmDeletion, $super) {
    deletedItemsList = deletedItemsList === VOID ? this.hvf_1 : deletedItemsList;
    confirmDialogVisible = confirmDialogVisible === VOID ? this.ivf_1 : confirmDialogVisible;
    deleteConfirmText = deleteConfirmText === VOID ? this.jvf_1 : deleteConfirmText;
    itemsToConfirmDeletion = itemsToConfirmDeletion === VOID ? this.kvf_1 : itemsToConfirmDeletion;
    return $super === VOID ? this.qvf(deletedItemsList, confirmDialogVisible, deleteConfirmText, itemsToConfirmDeletion) : $super.qvf.call(this, deletedItemsList, confirmDialogVisible, deleteConfirmText, itemsToConfirmDeletion);
  };
  protoOf(DeletedItemListUiState).toString = function () {
    return 'DeletedItemListUiState(deletedItemsList=' + this.hvf_1 + ', confirmDialogVisible=' + this.ivf_1 + ', deleteConfirmText=' + this.jvf_1 + ', itemsToConfirmDeletion=' + this.kvf_1 + ')';
  };
  protoOf(DeletedItemListUiState).hashCode = function () {
    var result = hashCode(this.hvf_1);
    result = imul(result, 31) + getBooleanHashCode(this.ivf_1) | 0;
    result = imul(result, 31) + (this.jvf_1 == null ? 0 : getStringHashCode(this.jvf_1)) | 0;
    result = imul(result, 31) + hashCode(this.kvf_1) | 0;
    return result;
  };
  protoOf(DeletedItemListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof DeletedItemListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof DeletedItemListUiState ? other : THROW_CCE();
    if (!equals(this.hvf_1, tmp0_other_with_cast.hvf_1))
      return false;
    if (!(this.ivf_1 === tmp0_other_with_cast.ivf_1))
      return false;
    if (!(this.jvf_1 == tmp0_other_with_cast.jvf_1))
      return false;
    if (!equals(this.kvf_1, tmp0_other_with_cast.kvf_1))
      return false;
    return true;
  };
  function restoreDeletedItemUseCase$factory() {
    return getPropertyCallableRef('restoreDeletedItemUseCase', 1, KProperty1, function (receiver) {
      return _get_restoreDeletedItemUseCase__7lscig(receiver);
    }, null);
  }
  function deletePermanentlyUseCase$factory() {
    return getPropertyCallableRef('deletePermanentlyUseCase', 1, KProperty1, function (receiver) {
      return _get_deletePermanentlyUseCase__wdw610(receiver);
    }, null);
  }
  function restoreDeletedItemUseCase$factory_0() {
    return getPropertyCallableRef('restoreDeletedItemUseCase', 1, KProperty1, function (receiver) {
      return _get_restoreDeletedItemUseCase__7lscig(receiver);
    }, null);
  }
  function deletePermanentlyUseCase$factory_0() {
    return getPropertyCallableRef('deletePermanentlyUseCase', 1, KProperty1, function (receiver) {
      return _get_deletePermanentlyUseCase__wdw610(receiver);
    }, null);
  }
  function CourseDiscussionDetailViewModel$onClickAdd$ref($boundThis) {
    var l = function () {
      $boundThis.bpb();
      return Unit_instance;
    };
    l.callableName = 'onClickAdd';
    return l;
  }
  function CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.cvh_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda).auq = function (it, $completion) {
    var tmp = this.buq(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.auq((p1 == null ? true : p1 instanceof CourseBlockAndPicture) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.cvh_1.gpa_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.jvh(this.dvh_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda).buq = function (it, completion) {
    var i = new CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda(this.cvh_1, completion);
    i.dvh_1 = it;
    return i;
  };
  function CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.auq(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseDiscussionDetailViewModel$slambda$slambda$slambda$lambda() {
    return new EmptyPagingSource();
  }
  function CourseDiscussionDetailViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.svh_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda$slambda).yr6 = function (permissionPair, $completion) {
    var tmp = this.zr6(permissionPair, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.yr6(p1 instanceof PermissionPair ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.uvh_1 = this.tvh_1;
            this.vvh_1 = this.uvh_1.y6();
            this.wvh_1 = this.uvh_1.z6();
            if (this.vvh_1) {
              l$ret$1: do {
                var this_0 = this.svh_1.pp1_1;
                while (true) {
                  var prevValue = this_0.t2();
                  var tmp_0 = this.svh_1.jp2().en6(strings_getInstance().kmc_1);
                  var tmp_1 = FabIcon_ADD_getInstance();
                  var nextValue = prevValue.nol(new FabUiState(true, tmp_0, tmp_1, CourseDiscussionDetailViewModel$onClickAdd$ref(this.svh_1)));
                  if (this_0.y1k(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
              l$ret$3: do {
                var this_1 = this.svh_1.gpa_1;
                while (true) {
                  var prevValue_0 = this_1.t2();
                  var nextValue_0 = prevValue_0.jvh(VOID, this.svh_1.tvg_1, this.wvh_1, VOID, this.svh_1.jp2().iok());
                  if (this_1.y1k(prevValue_0, nextValue_0)) {
                    break l$ret$3;
                  }
                }
              }
               while (false);
              this.hd_1 = 1;
              var tmp_2 = this.svh_1.fp2().c7d().dc6(this.svh_1.rvg_1);
              var tmp_3 = CourseDiscussionDetailViewModel$slambda$slambda$slambda$slambda_0(this.svh_1, null);
              suspendResult = tmp_2.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_27(tmp_3), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              l$ret$5: do {
                var this_2 = this.svh_1.pp1_1;
                while (true) {
                  var prevValue_1 = this_2.t2();
                  var nextValue_1 = prevValue_1.nol(new FabUiState());
                  if (this_2.y1k(prevValue_1, nextValue_1)) {
                    break l$ret$5;
                  }
                }
              }
               while (false);
              l$ret$7: do {
                var this_3 = this.svh_1.gpa_1;
                while (true) {
                  var prevValue_2 = this_3.t2();
                  var nextValue_2 = prevValue_2.jvh(null, CourseDiscussionDetailViewModel$slambda$slambda$slambda$lambda, false);
                  if (this_3.y1k(prevValue_2, nextValue_2)) {
                    break l$ret$7;
                  }
                }
              }
               while (false);
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda$slambda).zr6 = function (permissionPair, completion) {
    var i = new CourseDiscussionDetailViewModel$slambda$slambda$slambda(this.svh_1, completion);
    i.tvh_1 = permissionPair;
    return i;
  };
  function CourseDiscussionDetailViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new CourseDiscussionDetailViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (permissionPair, $completion) {
      return i.yr6(permissionPair, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseDiscussionDetailViewModel$slambda$slambda(this$0, resultContinuation) {
    this.fvi_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda).m86 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda).z77 = function ($completion) {
    return this.m86($completion);
  };
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.fvi_1.fp2().b7f();
            var tmp_1 = this.fvi_1.dp2();
            PermissionFlags_getInstance();
            var tmp_2 = new Long(1, 0);
            PermissionFlags_getInstance();
            var tmp_3 = distinctUntilChanged(tmp_0.dd5(tmp_1, this.fvi_1.svg_1, tmp_2, new Long(4, 0)));
            suspendResult = collectLatest(tmp_3, CourseDiscussionDetailViewModel$slambda$slambda$slambda_0(this.fvi_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseDiscussionDetailViewModel$slambda$slambda).y77 = function (completion) {
    return new CourseDiscussionDetailViewModel$slambda$slambda(this.fvi_1, completion);
  };
  function CourseDiscussionDetailViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new CourseDiscussionDetailViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.m86($completion);
    };
    l.$arity = 0;
    return l;
  }
  function Companion_146() {
    this.gvi_1 = 'CourseDiscussion';
  }
  var Companion_instance_194;
  function Companion_getInstance_163() {
    return Companion_instance_194;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_27(function_0) {
    this.hvi_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_27).t1d = function (value, $completion) {
    return this.hvi_1(value, $completion);
  };
  function CourseDiscussionDetailViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.fp2().u7e().re6(this$0.rvg_1, false);
    };
  }
  function CourseDiscussionDetailViewModel$slambda(this$0, resultContinuation) {
    this.qvi_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseDiscussionDetailViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseDiscussionDetailViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseDiscussionDetailViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.qvi_1.gpa_1, CourseDiscussionDetailViewModel$slambda$slambda_0(this.qvi_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseDiscussionDetailViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseDiscussionDetailViewModel$slambda(this.qvi_1, completion);
    i.rvi_1 = $this$launch;
    return i;
  };
  function CourseDiscussionDetailViewModel$slambda_0(this$0, resultContinuation) {
    var i = new CourseDiscussionDetailViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseDiscussionDetailViewModel$lambda(this$0) {
    return function (title) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.pp1_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.discussionpost.courediscussiondetail.CourseDiscussionDetailViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.nol(VOID, VOID, title);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function CourseDiscussionDetailViewModel$onDeletePost$slambda(this$0, $post, resultContinuation) {
    this.avj_1 = this$0;
    this.bvj_1 = $post;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(CourseDiscussionDetailViewModel$onDeletePost$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CourseDiscussionDetailViewModel$onDeletePost$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(CourseDiscussionDetailViewModel$onDeletePost$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.avj_1.fp2().u7e().ve6(this.bvj_1.ke7_1, true, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.avj_1.hp2().com(new Snack(this.avj_1.jp2().en6(strings_getInstance().zlc_1)));
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(CourseDiscussionDetailViewModel$onDeletePost$slambda).v1m = function ($this$launch, completion) {
    var i = new CourseDiscussionDetailViewModel$onDeletePost$slambda(this.avj_1, this.bvj_1, completion);
    i.cvj_1 = $this$launch;
    return i;
  };
  function CourseDiscussionDetailViewModel$onDeletePost$slambda_0(this$0, $post, resultContinuation) {
    var i = new CourseDiscussionDetailViewModel$onDeletePost$slambda(this$0, $post, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function CourseDiscussionDetailViewModel(di, savedStateHandle) {
    UstadListViewModel.call(this, di, savedStateHandle, new CourseDiscussionDetailUiState(), 'CourseDiscussion');
    var tmp = this;
    Companion_getInstance_102();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.rvg_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    Companion_getInstance_112();
    var tmp0_safe_receiver_0 = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : toLong_0(tmp0_safe_receiver_0);
    tmp_0.svg_1 = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
    var tmp_1 = this;
    tmp_1.tvg_1 = CourseDiscussionDetailViewModel$pagingSourceFactory$lambda(this);
    var tmp_2 = this.cp2();
    launch(tmp_2, VOID, VOID, CourseDiscussionDetailViewModel$slambda_0(this, null));
    launchSetTitleFromClazzUid(this, this.svg_1, CourseDiscussionDetailViewModel$lambda(this));
  }
  protoOf(CourseDiscussionDetailViewModel).apb = function (searchText) {
  };
  protoOf(CourseDiscussionDetailViewModel).bpb = function () {
    Companion_getInstance_112();
    var tmp = to('courseBlockUid', this.rvg_1.toString());
    Companion_getInstance_112();
    this.tpb('DiscussionPostEdit', mapOf([tmp, to('clazzUid', this.svg_1.toString())]));
  };
  protoOf(CourseDiscussionDetailViewModel).dvj = function (post) {
    Companion_getInstance_102();
    var tmp = to('entityUid', post.ke7_1.toString());
    Companion_getInstance_112();
    this.np1_1.sns('CourseDiscussionPost', mapOf([tmp, to('clazzUid', this.svg_1.toString())]));
  };
  protoOf(CourseDiscussionDetailViewModel).evj = function (post) {
    var tmp = this.cp2();
    launch(tmp, VOID, VOID, CourseDiscussionDetailViewModel$onDeletePost$slambda_0(this, post, null));
  };
  function CourseDiscussionDetailUiState$_init_$lambda_ogyezm() {
    return new EmptyPagingSource();
  }
  function CourseDiscussionDetailUiState(courseBlock, posts, showModerateOptions, localDateTimeNow, dayOfWeekStrings) {
    courseBlock = courseBlock === VOID ? null : courseBlock;
    var tmp;
    if (posts === VOID) {
      tmp = CourseDiscussionDetailUiState$_init_$lambda_ogyezm;
    } else {
      tmp = posts;
    }
    posts = tmp;
    showModerateOptions = showModerateOptions === VOID ? false : showModerateOptions;
    localDateTimeNow = localDateTimeNow === VOID ? toLocalDateTime(System_instance.sl7(), Companion_getInstance_9().rlb()) : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? emptyMap() : dayOfWeekStrings;
    this.evh_1 = courseBlock;
    this.fvh_1 = posts;
    this.gvh_1 = showModerateOptions;
    this.hvh_1 = localDateTimeNow;
    this.ivh_1 = dayOfWeekStrings;
  }
  protoOf(CourseDiscussionDetailUiState).fvj = function (courseBlock, posts, showModerateOptions, localDateTimeNow, dayOfWeekStrings) {
    return new CourseDiscussionDetailUiState(courseBlock, posts, showModerateOptions, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(CourseDiscussionDetailUiState).jvh = function (courseBlock, posts, showModerateOptions, localDateTimeNow, dayOfWeekStrings, $super) {
    courseBlock = courseBlock === VOID ? this.evh_1 : courseBlock;
    posts = posts === VOID ? this.fvh_1 : posts;
    showModerateOptions = showModerateOptions === VOID ? this.gvh_1 : showModerateOptions;
    localDateTimeNow = localDateTimeNow === VOID ? this.hvh_1 : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? this.ivh_1 : dayOfWeekStrings;
    return $super === VOID ? this.fvj(courseBlock, posts, showModerateOptions, localDateTimeNow, dayOfWeekStrings) : $super.fvj.call(this, courseBlock, posts, showModerateOptions, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(CourseDiscussionDetailUiState).toString = function () {
    return 'CourseDiscussionDetailUiState(courseBlock=' + this.evh_1 + ', posts=' + this.fvh_1 + ', showModerateOptions=' + this.gvh_1 + ', localDateTimeNow=' + this.hvh_1 + ', dayOfWeekStrings=' + this.ivh_1 + ')';
  };
  protoOf(CourseDiscussionDetailUiState).hashCode = function () {
    var result = this.evh_1 == null ? 0 : this.evh_1.hashCode();
    result = imul(result, 31) + hashCode(this.fvh_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.gvh_1) | 0;
    result = imul(result, 31) + this.hvh_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.ivh_1) | 0;
    return result;
  };
  protoOf(CourseDiscussionDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof CourseDiscussionDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof CourseDiscussionDetailUiState ? other : THROW_CCE();
    if (!equals(this.evh_1, tmp0_other_with_cast.evh_1))
      return false;
    if (!equals(this.fvh_1, tmp0_other_with_cast.fvh_1))
      return false;
    if (!(this.gvh_1 === tmp0_other_with_cast.gvh_1))
      return false;
    if (!this.hvh_1.equals(tmp0_other_with_cast.hvh_1))
      return false;
    if (!equals(this.ivh_1, tmp0_other_with_cast.ivh_1))
      return false;
    return true;
  };
  function DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.ovj_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda).jop = function (result, $completion) {
    var tmp = this.kop(result, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.jop(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var tmp_1 = this.pvj_1.qoo_1;
            var tmp0_elvis_lhs = (!(tmp_1 == null) ? typeof tmp_1 === 'string' : false) ? tmp_1 : null;
            var tmp_2;
            if (tmp0_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_2 = tmp0_elvis_lhs;
            }

            tmp_0.qvj_1 = tmp_2;
            this.hd_1 = 1;
            suspendResult = submitReply(this.ovj_1, this.qvj_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda).kop = function (result, completion) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda(this.ovj_1, completion);
    i.pvj_1 = result;
    return i;
  };
  function DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (result, $completion) {
      return i.jop(result, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.zvj_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_1).epo = function (postTitle, $completion) {
    var tmp = this.fpo(postTitle, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.epo((p1 == null ? true : typeof p1 === 'string') ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = this.zvj_1.pp1_1;
          var tmp_0;
          if (!(this_0.t2().aol_1 == this.avk_1)) {
            tmp_0 = this_0;
          } else {
            tmp_0 = null;
          }
          var tmp0_safe_receiver = tmp_0;
          if (tmp0_safe_receiver == null)
            null;
          else {
            l$ret$1: do {
              while (true) {
                var prevValue = tmp0_safe_receiver.t2();
                var nextValue = prevValue.nol(VOID, VOID, this.avk_1);
                if (tmp0_safe_receiver.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
          }
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_1).fpo = function (postTitle, completion) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_1(this.zvj_1, completion);
    i.avk_1 = postTitle;
    return i;
  };
  function DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (postTitle, $completion) {
      return i.epo(postTitle, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation) {
    this.jvk_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.jvk_1.np2(this.jvk_1.ip2(), 'replyTextResult');
            var tmp_1 = DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_0(this.jvk_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_28(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda(this.jvk_1, completion);
    i.kvk_1 = $this$launch;
    return i;
  };
  function DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.tvk_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.tvk_1.fp2().u7e().c8c(this.tvk_1.fp1_1);
            var tmp_1 = DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda$slambda_2(this.tvk_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_28(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_1(this.tvk_1, completion);
    i.uvk_1 = $this$launch;
    return i;
  };
  function DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostDetailViewModel$slambda$slambda$slambda$lambda() {
    return new EmptyPagingSource();
  }
  function DiscussionPostDetailViewModel$slambda$slambda$slambda(this$0, $savedStateHandle, $this_launch, resultContinuation) {
    this.dvl_1 = this$0;
    this.evl_1 = $savedStateHandle;
    this.fvl_1 = $this_launch;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda).yr6 = function (permissionPair, $completion) {
    var tmp = this.zr6(permissionPair, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.yr6(p1 instanceof PermissionPair ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp0_container = this.gvl_1;
          var hasViewPermission = tmp0_container.y6();
          var hasModeratePermission = tmp0_container.z6();
          if (hasViewPermission) {
            l$ret$1: do {
              var this_0 = this.dvl_1.evm_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_0 = this.dvl_1.dp2();
                var tmp_1 = this.dvl_1.bp2().emx().kmk_1.xjm();
                var tmp0_safe_receiver = this.dvl_1.bp2().emx().mmk_1;
                var nextValue = prevValue.svm(this.dvl_1.dvm_1, tmp_0, tmp_1, tmp0_safe_receiver == null ? null : tmp0_safe_receiver.g96_1, VOID, hasModeratePermission);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            var tmp1_elvis_lhs = this.evl_1.ba('replyText');
            this.dvl_1.gvm_1.x1k(tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
            launch(this.fvl_1, VOID, VOID, DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_0(this.dvl_1, null));
            launch(this.fvl_1, VOID, VOID, DiscussionPostDetailViewModel$slambda$slambda$slambda$slambda_2(this.dvl_1, null));
          } else {
            l$ret$3: do {
              var this_1 = this.dvl_1.evm_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var tmp_2 = DiscussionPostDetailViewModel$slambda$slambda$slambda$lambda;
                var tmp_3 = this.dvl_1.dp2();
                var tmp_4 = this.dvl_1.bp2().emx().kmk_1.xjm();
                var tmp0_safe_receiver_0 = this.dvl_1.bp2().emx().mmk_1;
                var nextValue_0 = prevValue_0.svm(tmp_2, tmp_3, tmp_4, tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.g96_1, VOID, false);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            var tmp2_elvis_lhs = this.evl_1.ba('replyText');
            this.dvl_1.gvm_1.x1k(tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs);
          }
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda$slambda).zr6 = function (permissionPair, completion) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda(this.dvl_1, this.evl_1, this.fvl_1, completion);
    i.gvl_1 = permissionPair;
    return i;
  };
  function DiscussionPostDetailViewModel$slambda$slambda$slambda_0(this$0, $savedStateHandle, $this_launch, resultContinuation) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda$slambda(this$0, $savedStateHandle, $this_launch, resultContinuation);
    var l = function (permissionPair, $completion) {
      return i.yr6(permissionPair, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostDetailViewModel$slambda$slambda(this$0, $savedStateHandle, $this_launch, resultContinuation) {
    this.bvn_1 = this$0;
    this.cvn_1 = $savedStateHandle;
    this.dvn_1 = $this_launch;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$slambda$slambda).m86 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda).z77 = function ($completion) {
    return this.m86($completion);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.bvn_1.fp2().b7f();
            var tmp_1 = this.bvn_1.dp2();
            PermissionFlags_getInstance();
            var tmp_2 = new Long(1, 0);
            PermissionFlags_getInstance();
            var tmp_3 = distinctUntilChanged(tmp_0.dd5(tmp_1, this.bvn_1.jvm_1, tmp_2, new Long(4, 0)));
            suspendResult = collectLatest(tmp_3, DiscussionPostDetailViewModel$slambda$slambda$slambda_0(this.bvn_1, this.cvn_1, this.dvn_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(DiscussionPostDetailViewModel$slambda$slambda).y77 = function (completion) {
    return new DiscussionPostDetailViewModel$slambda$slambda(this.bvn_1, this.cvn_1, this.dvn_1, completion);
  };
  function DiscussionPostDetailViewModel$slambda$slambda_0(this$0, $savedStateHandle, $this_launch, resultContinuation) {
    var i = new DiscussionPostDetailViewModel$slambda$slambda(this$0, $savedStateHandle, $this_launch, resultContinuation);
    var l = function ($completion) {
      return i.m86($completion);
    };
    l.$arity = 0;
    return l;
  }
  function submitReply($this, replyText, $completion) {
    var tmp = new $submitReplyCOROUTINE$65($this, replyText, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function Companion_147() {
    this.uvn_1 = 'replyTextResult';
    this.vvn_1 = 'replyText';
    this.wvn_1 = 'CourseDiscussionPost';
  }
  var Companion_instance_195;
  function Companion_getInstance_164() {
    return Companion_instance_195;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_28(function_0) {
    this.xvn_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_28).t1d = function (value, $completion) {
    return this.xvn_1(value, $completion);
  };
  function DiscussionPostDetailViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.fp2().u7e().te6(this$0.fp1_1, false);
    };
  }
  function DiscussionPostDetailViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.gvo_1 = this$0;
    this.hvo_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostDetailViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostDetailViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.gvo_1.evm_1, DiscussionPostDetailViewModel$slambda$slambda_0(this.gvo_1, this.hvo_1, this.ivo_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(DiscussionPostDetailViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new DiscussionPostDetailViewModel$slambda(this.gvo_1, this.hvo_1, completion);
    i.ivo_1 = $this$launch;
    return i;
  };
  function DiscussionPostDetailViewModel$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new DiscussionPostDetailViewModel$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostDetailViewModel$onChangeReplyText$slambda(this$0, $replyText, resultContinuation) {
    this.rvo_1 = this$0;
    this.svo_1 = $replyText;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$onChangeReplyText$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostDetailViewModel$onChangeReplyText$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostDetailViewModel$onChangeReplyText$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = delay(new Long(200, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.rvo_1.lp1_1.rox('replyText', this.svo_1);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(DiscussionPostDetailViewModel$onChangeReplyText$slambda).v1m = function ($this$launch, completion) {
    var i = new DiscussionPostDetailViewModel$onChangeReplyText$slambda(this.rvo_1, this.svo_1, completion);
    i.tvo_1 = $this$launch;
    return i;
  };
  function DiscussionPostDetailViewModel$onChangeReplyText$slambda_0(this$0, $replyText, resultContinuation) {
    var i = new DiscussionPostDetailViewModel$onChangeReplyText$slambda(this$0, $replyText, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostDetailViewModel$onClickPostReply$slambda(this$0, resultContinuation) {
    this.cvp_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$onClickPostReply$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostDetailViewModel$onClickPostReply$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostDetailViewModel$onClickPostReply$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = submitReply(this.cvp_1, this.cvp_1.gvm_1.t2(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(DiscussionPostDetailViewModel$onClickPostReply$slambda).v1m = function ($this$launch, completion) {
    var i = new DiscussionPostDetailViewModel$onClickPostReply$slambda(this.cvp_1, completion);
    i.dvp_1 = $this$launch;
    return i;
  };
  function DiscussionPostDetailViewModel$onClickPostReply$slambda_0(this$0, resultContinuation) {
    var i = new DiscussionPostDetailViewModel$onClickPostReply$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostDetailViewModel$submitReply$slambda(this$0, $replyText, $clazzAndBlockUids, resultContinuation) {
    this.mvp_1 = this$0;
    this.nvp_1 = $replyText;
    this.ovp_1 = $clazzAndBlockUids;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$submitReply$slambda).fmp = function (it, $completion) {
    var tmp = this.gmp(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostDetailViewModel$submitReply$slambda).he = function (p1, $completion) {
    return this.fmp(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostDetailViewModel$submitReply$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.mvp_1.fp2().u7e();
            var this_0 = new DiscussionPost();
            this_0.oe7_1 = systemTimeInMillis();
            this_0.le7_1 = this.mvp_1.fp1_1;
            this_0.ne7_1 = this.nvp_1;
            this_0.re7_1 = this.mvp_1.dp2();
            this_0.se7_1 = this.ovp_1.pc9_1;
            this_0.pe7_1 = this.ovp_1.qc9_1;
            suspendResult = tmp_0.insertAsync(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.mvp_1.qvp('');
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(DiscussionPostDetailViewModel$submitReply$slambda).gmp = function (it, completion) {
    var i = new DiscussionPostDetailViewModel$submitReply$slambda(this.mvp_1, this.nvp_1, this.ovp_1, completion);
    i.pvp_1 = it;
    return i;
  };
  function DiscussionPostDetailViewModel$submitReply$slambda_0(this$0, $replyText, $clazzAndBlockUids, resultContinuation) {
    var i = new DiscussionPostDetailViewModel$submitReply$slambda(this$0, $replyText, $clazzAndBlockUids, resultContinuation);
    var l = function (it, $completion) {
      return i.fmp(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostDetailViewModel$onDeletePost$slambda(this$0, $post, resultContinuation) {
    this.zvp_1 = this$0;
    this.avq_1 = $post;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostDetailViewModel$onDeletePost$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostDetailViewModel$onDeletePost$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostDetailViewModel$onDeletePost$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.zvp_1.fp2().u7e().ve6(this.avq_1.ke7_1, true, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.zvp_1.hp2().com(new Snack(this.zvp_1.jp2().en6(strings_getInstance().zlc_1)));
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(DiscussionPostDetailViewModel$onDeletePost$slambda).v1m = function ($this$launch, completion) {
    var i = new DiscussionPostDetailViewModel$onDeletePost$slambda(this.zvp_1, this.avq_1, completion);
    i.bvq_1 = $this$launch;
    return i;
  };
  function DiscussionPostDetailViewModel$onDeletePost$slambda_0(this$0, $post, resultContinuation) {
    var i = new DiscussionPostDetailViewModel$onDeletePost$slambda(this$0, $post, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $submitReplyCOROUTINE$65(_this__u8e3s4, replyText, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.mvn_1 = _this__u8e3s4;
    this.nvn_1 = replyText;
  }
  protoOf($submitReplyCOROUTINE$65).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 11;
            l$ret$1: do {
              var this_0 = this.mvn_1.evm_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.svm(VOID, VOID, VOID, VOID, false);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.mvn_1.lp2(Companion_getInstance_85().uol_1);
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.id_1 = 10;
            this.hd_1 = 3;
            suspendResult = this.mvn_1.ep2().c7d().ic6(this.mvn_1.fp1_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.qvn_1 = suspendResult;
            var tmp_0 = this;
            tmp_0.rvn_1 = this.qvn_1;
            if ((!(this.rvn_1 == null) ? !this.rvn_1.pc9_1.equals(new Long(0, 0)) : false) ? !this.rvn_1.qc9_1.equals(new Long(0, 0)) : false) {
              this.svn_1 = this.rvn_1;
              this.hd_1 = 5;
              continue $sm;
            } else {
              this.hd_1 = 4;
              suspendResult = this.mvn_1.fp2().c7d().ic6(this.mvn_1.fp1_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 4:
            this.svn_1 = suspendResult;
            this.hd_1 = 5;
            continue $sm;
          case 5:
            this.tvn_1 = this.svn_1;
            if ((this.tvn_1 == null ? true : this.tvn_1.qc9_1.equals(new Long(0, 0))) ? true : this.tvn_1.pc9_1.equals(new Long(0, 0))) {
              this.mvn_1.hp2().com(new Snack(this.mvn_1.jp2().en6(strings_getInstance().glc_1)));
              this.pvn_1 = Unit_instance;
              this.id_1 = 11;
              this.hd_1 = 8;
              continue $sm;
            } else {
              this.hd_1 = 6;
              continue $sm;
            }

          case 6:
            this.hd_1 = 7;
            var tmp_1 = this.mvn_1.fp2();
            suspendResult = withDoorTransactionAsync(tmp_1, VOID, DiscussionPostDetailViewModel$submitReply$slambda_0(this.mvn_1, this.nvn_1, this.tvn_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            this.ovn_1 = suspendResult;
            this.id_1 = 11;
            this.hd_1 = 9;
            continue $sm;
          case 8:
            this.id_1 = 11;
            this.mvn_1.lp2(Companion_getInstance_85().vol_1);
            l$ret$9: do {
              var this_1 = this.mvn_1.evm_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.svm(VOID, VOID, VOID, VOID, true);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$9;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 9:
            this.id_1 = 11;
            this.mvn_1.lp2(Companion_getInstance_85().vol_1);
            l$ret$11: do {
              var this_2 = this.mvn_1.evm_1;
              while (true) {
                var prevValue_1 = this_2.t2();
                var nextValue_1 = prevValue_1.svm(VOID, VOID, VOID, VOID, true);
                if (this_2.y1k(prevValue_1, nextValue_1)) {
                  break l$ret$11;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 10:
            this.id_1 = 11;
            var t = this.kd_1;
            this.mvn_1.lp2(Companion_getInstance_85().vol_1);
            l$ret$7: do {
              var this_3 = this.mvn_1.evm_1;
              while (true) {
                var prevValue_2 = this_3.t2();
                var nextValue_2 = prevValue_2.svm(VOID, VOID, VOID, VOID, true);
                if (this_3.y1k(prevValue_2, nextValue_2)) {
                  break l$ret$7;
                }
              }
            }
             while (false);
            throw t;
          case 11:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 11) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function DiscussionPostDetailViewModel(di, savedStateHandle, destinationName) {
    destinationName = destinationName === VOID ? 'CourseDiscussionPost' : destinationName;
    DetailViewModel.call(this, di, savedStateHandle, destinationName);
    var tmp = this;
    tmp.dvm_1 = DiscussionPostDetailViewModel$pagingSourceFactory$lambda(this);
    this.evm_1 = MutableStateFlow(new DiscussionPostDetailUiState2());
    this.fvm_1 = asStateFlow(this.evm_1);
    this.gvm_1 = MutableStateFlow('');
    this.hvm_1 = asStateFlow(this.gvm_1);
    this.ivm_1 = null;
    var tmp_0 = this;
    Companion_getInstance_112();
    var tmp0_safe_receiver = savedStateHandle.ba('clazzUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_0.jvm_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_1 = this.cp2();
    launch(tmp_1, VOID, VOID, DiscussionPostDetailViewModel$slambda_0(this, savedStateHandle, null));
  }
  protoOf(DiscussionPostDetailViewModel).qvp = function (replyText) {
    this.gvm_1.x1k(replyText);
    var tmp0_safe_receiver = this.ivm_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp = this;
    var tmp_0 = this.cp2();
    tmp.ivm_1 = launch(tmp_0, VOID, VOID, DiscussionPostDetailViewModel$onChangeReplyText$slambda_0(this, replyText, null));
  };
  protoOf(DiscussionPostDetailViewModel).cvq = function () {
    var tmp = this.cp2();
    launch(tmp, VOID, VOID, DiscussionPostDetailViewModel$onClickPostReply$slambda_0(this, null));
  };
  protoOf(DiscussionPostDetailViewModel).evj = function (post) {
    var tmp = this.cp2();
    launch(tmp, VOID, VOID, DiscussionPostDetailViewModel$onDeletePost$slambda_0(this, post, null));
  };
  function DiscussionPostDetailUiState2$_init_$lambda_c4cn31() {
    return new EmptyPagingSource();
  }
  function DiscussionPostDetailUiState2(discussionPosts, loggedInPersonUid, loggedInPersonName, loggedInPersonPictureUri, fieldsEnabled, showModerateOptions, localDateTimeNow, dayOfWeekStrings) {
    var tmp;
    if (discussionPosts === VOID) {
      tmp = DiscussionPostDetailUiState2$_init_$lambda_c4cn31;
    } else {
      tmp = discussionPosts;
    }
    discussionPosts = tmp;
    loggedInPersonUid = loggedInPersonUid === VOID ? new Long(0, 0) : loggedInPersonUid;
    loggedInPersonName = loggedInPersonName === VOID ? '' : loggedInPersonName;
    loggedInPersonPictureUri = loggedInPersonPictureUri === VOID ? null : loggedInPersonPictureUri;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    showModerateOptions = showModerateOptions === VOID ? false : showModerateOptions;
    localDateTimeNow = localDateTimeNow === VOID ? toLocalDateTime(System_instance.sl7(), Companion_getInstance_9().rlb()) : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? emptyMap() : dayOfWeekStrings;
    this.kvm_1 = discussionPosts;
    this.lvm_1 = loggedInPersonUid;
    this.mvm_1 = loggedInPersonName;
    this.nvm_1 = loggedInPersonPictureUri;
    this.ovm_1 = fieldsEnabled;
    this.pvm_1 = showModerateOptions;
    this.qvm_1 = localDateTimeNow;
    this.rvm_1 = dayOfWeekStrings;
  }
  protoOf(DiscussionPostDetailUiState2).dvq = function (discussionPosts, loggedInPersonUid, loggedInPersonName, loggedInPersonPictureUri, fieldsEnabled, showModerateOptions, localDateTimeNow, dayOfWeekStrings) {
    return new DiscussionPostDetailUiState2(discussionPosts, loggedInPersonUid, loggedInPersonName, loggedInPersonPictureUri, fieldsEnabled, showModerateOptions, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(DiscussionPostDetailUiState2).svm = function (discussionPosts, loggedInPersonUid, loggedInPersonName, loggedInPersonPictureUri, fieldsEnabled, showModerateOptions, localDateTimeNow, dayOfWeekStrings, $super) {
    discussionPosts = discussionPosts === VOID ? this.kvm_1 : discussionPosts;
    loggedInPersonUid = loggedInPersonUid === VOID ? this.lvm_1 : loggedInPersonUid;
    loggedInPersonName = loggedInPersonName === VOID ? this.mvm_1 : loggedInPersonName;
    loggedInPersonPictureUri = loggedInPersonPictureUri === VOID ? this.nvm_1 : loggedInPersonPictureUri;
    fieldsEnabled = fieldsEnabled === VOID ? this.ovm_1 : fieldsEnabled;
    showModerateOptions = showModerateOptions === VOID ? this.pvm_1 : showModerateOptions;
    localDateTimeNow = localDateTimeNow === VOID ? this.qvm_1 : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? this.rvm_1 : dayOfWeekStrings;
    return $super === VOID ? this.dvq(discussionPosts, loggedInPersonUid, loggedInPersonName, loggedInPersonPictureUri, fieldsEnabled, showModerateOptions, localDateTimeNow, dayOfWeekStrings) : $super.dvq.call(this, discussionPosts, loggedInPersonUid, loggedInPersonName, loggedInPersonPictureUri, fieldsEnabled, showModerateOptions, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(DiscussionPostDetailUiState2).toString = function () {
    return 'DiscussionPostDetailUiState2(discussionPosts=' + this.kvm_1 + ', loggedInPersonUid=' + this.lvm_1.toString() + ', loggedInPersonName=' + this.mvm_1 + ', loggedInPersonPictureUri=' + this.nvm_1 + ', fieldsEnabled=' + this.ovm_1 + ', showModerateOptions=' + this.pvm_1 + ', localDateTimeNow=' + this.qvm_1 + ', dayOfWeekStrings=' + this.rvm_1 + ')';
  };
  protoOf(DiscussionPostDetailUiState2).hashCode = function () {
    var result = hashCode(this.kvm_1);
    result = imul(result, 31) + this.lvm_1.hashCode() | 0;
    result = imul(result, 31) + getStringHashCode(this.mvm_1) | 0;
    result = imul(result, 31) + (this.nvm_1 == null ? 0 : getStringHashCode(this.nvm_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ovm_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.pvm_1) | 0;
    result = imul(result, 31) + this.qvm_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.rvm_1) | 0;
    return result;
  };
  protoOf(DiscussionPostDetailUiState2).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof DiscussionPostDetailUiState2))
      return false;
    var tmp0_other_with_cast = other instanceof DiscussionPostDetailUiState2 ? other : THROW_CCE();
    if (!equals(this.kvm_1, tmp0_other_with_cast.kvm_1))
      return false;
    if (!this.lvm_1.equals(tmp0_other_with_cast.lvm_1))
      return false;
    if (!(this.mvm_1 === tmp0_other_with_cast.mvm_1))
      return false;
    if (!(this.nvm_1 == tmp0_other_with_cast.nvm_1))
      return false;
    if (!(this.ovm_1 === tmp0_other_with_cast.ovm_1))
      return false;
    if (!(this.pvm_1 === tmp0_other_with_cast.pvm_1))
      return false;
    if (!this.qvm_1.equals(tmp0_other_with_cast.qvm_1))
      return false;
    if (!equals(this.rvm_1, tmp0_other_with_cast.rvm_1))
      return false;
    return true;
  };
  function DiscussionPostEditViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.mvq_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostEditViewModel$slambda$slambda$slambda).qvq = function (it, $completion) {
    var tmp = this.gmp(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostEditViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.qvq(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostEditViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            var this_0 = this.nvq_1.u7e();
            var tmp_1;
            if (!this.mvq_1.rp7_1.equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            tmp_0.ovq_1 = tmp_1;
            if (this.ovq_1 == null) {
              this.pvq_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.ovq_1.se6(this.mvq_1.rp7_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.pvq_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.pvq_1;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(DiscussionPostEditViewModel$slambda$slambda$slambda).gmp = function (it, completion) {
    var i = new DiscussionPostEditViewModel$slambda$slambda$slambda(this.mvq_1, completion);
    i.nvq_1 = it;
    return i;
  };
  function DiscussionPostEditViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new DiscussionPostEditViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.qvq(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostEditViewModel$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.zvq_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostEditViewModel$slambda$slambda$slambda_1).cvr = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostEditViewModel$slambda$slambda$slambda_1).z77 = function ($completion) {
    return this.cvr($completion);
  };
  protoOf(DiscussionPostEditViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.avr_1 = new DiscussionPost();
            var tmp_1 = this;
            tmp_1.bvr_1 = this.avr_1;
            this.hd_1 = 1;
            var tmp_2 = get_doorPrimaryKeyManager(this.zvq_1.ep2());
            suspendResult = tmp_2.b62(132, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            this.bvr_1.ke7_1 = ARGUMENT;
            this.bvr_1.pe7_1 = _get_courseBlockUidArg__1bqljt(this.zvq_1);
            this.bvr_1.re7_1 = this.zvq_1.bp2().vmx().gju_1;
            this.bvr_1.oe7_1 = systemTimeInMillis();
            return this.avr_1;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(DiscussionPostEditViewModel$slambda$slambda$slambda_1).y77 = function (completion) {
    return new DiscussionPostEditViewModel$slambda$slambda$slambda_1(this.zvq_1, completion);
  };
  function DiscussionPostEditViewModel$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new DiscussionPostEditViewModel$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($completion) {
      return i.cvr($completion);
    };
    l.$arity = 0;
    return l;
  }
  function DiscussionPostEditViewModel$slambda$slambda$lambda(this$0) {
    return function (entityToDisplay) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.avs_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.discussionpost.edit.DiscussionPostEditViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.gvs(entityToDisplay);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function DiscussionPostEditViewModel$slambda$slambda(this$0, resultContinuation) {
    this.pvs_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostEditViewModel$slambda$slambda).rvs = function ($this$async, $completion) {
    var tmp = this.v1m($this$async, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.rvs((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostEditViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = Companion_instance_44.a4r();
            var tmp_1 = DiscussionPostEditViewModel$slambda$slambda$slambda_0(this.pvs_1, null);
            var tmp_2 = DiscussionPostEditViewModel$slambda$slambda$slambda_2(this.pvs_1, null);
            suspendResult = this.pvs_1.tp2(tmp_0, VOID, VOID, tmp_1, tmp_2, DiscussionPostEditViewModel$slambda$slambda$lambda(this.pvs_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(DiscussionPostEditViewModel$slambda$slambda).v1m = function ($this$async, completion) {
    var i = new DiscussionPostEditViewModel$slambda$slambda(this.pvs_1, completion);
    i.qvs_1 = $this$async;
    return i;
  };
  function DiscussionPostEditViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new DiscussionPostEditViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$async, $completion) {
      return i.rvs($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.cqf();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function DiscussionPostEditViewModel$onClickSave$slambda$slambda(this$0, $post, resultContinuation) {
    this.avt_1 = this$0;
    this.bvt_1 = $post;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostEditViewModel$onClickSave$slambda$slambda).fmp = function (it, $completion) {
    var tmp = this.gmp(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostEditViewModel$onClickSave$slambda$slambda).he = function (p1, $completion) {
    return this.fmp(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostEditViewModel$onClickSave$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.avt_1.fp2().u7e().ue6(this.bvt_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(DiscussionPostEditViewModel$onClickSave$slambda$slambda).gmp = function (it, completion) {
    var i = new DiscussionPostEditViewModel$onClickSave$slambda$slambda(this.avt_1, this.bvt_1, completion);
    i.cvt_1 = it;
    return i;
  };
  function DiscussionPostEditViewModel$onClickSave$slambda$slambda_0(this$0, $post, resultContinuation) {
    var i = new DiscussionPostEditViewModel$onClickSave$slambda$slambda(this$0, $post, resultContinuation);
    var l = function (it, $completion) {
      return i.fmp(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_discussionPostUid__impog9($this) {
    Companion_getInstance_102();
    var tmp0_safe_receiver = $this.lp1_1.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    return tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
  }
  function _get_courseBlockUidArg__1bqljt($this) {
    Companion_getInstance_112();
    var tmp0_safe_receiver = $this.lp1_1.ba('courseBlockUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    return tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
  }
  function Companion_148() {
    this.dvt_1 = 'DiscussionPostEdit';
  }
  var Companion_instance_196;
  function Companion_getInstance_165() {
    return Companion_instance_196;
  }
  function DiscussionPostEditViewModel$slambda(this$0, resultContinuation) {
    this.mvt_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostEditViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostEditViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostEditViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = awaitAll([async(this.nvt_1, VOID, VOID, DiscussionPostEditViewModel$slambda$slambda_0(this.mvt_1, null))], this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.mvt_1.avs_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.gvs(VOID, true);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.mvt_1.pp1_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var tmp_0 = this.mvt_1.jp2().en6(strings_getInstance().kmc_1);
                var tmp0_actionBarButtonState = new ActionBarButtonUiState(true, tmp_0, VOID, DiscussionPostEditViewModel$onClickSave$ref(this.mvt_1));
                var tmp1_loadingState = Companion_getInstance_85().vol_1;
                var nextValue_0 = prevValue_0.nol(VOID, tmp1_loadingState, VOID, VOID, VOID, VOID, VOID, VOID, tmp0_actionBarButtonState);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(DiscussionPostEditViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new DiscussionPostEditViewModel$slambda(this.mvt_1, completion);
    i.nvt_1 = $this$launch;
    return i;
  };
  function DiscussionPostEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new DiscussionPostEditViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.wvt_1 = $commitDelay;
    this.xvt_1 = $entity;
    this.yvt_1 = $this;
    this.zvt_1 = $key;
    this.avu_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostEditViewModel$onEntityChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostEditViewModel$onEntityChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostEditViewModel$onEntityChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.wvt_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.xvt_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.yvt_1.pp2(this.yvt_1.lp1_1, this.zvt_1, this.avu_1, this.xvt_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(DiscussionPostEditViewModel$onEntityChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new DiscussionPostEditViewModel$onEntityChanged$slambda(this.wvt_1, this.xvt_1, this.yvt_1, this.zvt_1, this.avu_1, completion);
    i.bvu_1 = $this$launch;
    return i;
  };
  function DiscussionPostEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new DiscussionPostEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostEditViewModel$onClickSave$slambda(this$0, $post, resultContinuation) {
    this.kvu_1 = this$0;
    this.lvu_1 = $post;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(DiscussionPostEditViewModel$onClickSave$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(DiscussionPostEditViewModel$onClickSave$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(DiscussionPostEditViewModel$onClickSave$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 6;
            if (this.kvu_1.avs_1.t2().evs_1 == null ? this.kvu_1.avs_1.t2().fvs_1 == null : false) {
              this.hd_1 = 1;
              suspendResult = this.kvu_1.ep2().c7d().jc6(this.lvu_1.pe7_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 5;
              continue $sm;
            }

          case 1:
            this.nvu_1 = suspendResult;
            this.lvu_1.se7_1 = this.nvu_1;
            if (this.lvu_1.se7_1.equals(new Long(0, 0))) {
              this.hd_1 = 2;
              suspendResult = this.kvu_1.fp2().c7d().jc6(this.lvu_1.pe7_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.ovu_1 = suspendResult;
            this.lvu_1.se7_1 = this.ovu_1;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.hd_1 = 4;
            var tmp_0 = this.kvu_1.fp2();
            suspendResult = withDoorTransactionAsync(tmp_0, VOID, DiscussionPostEditViewModel$onClickSave$slambda$slambda_0(this.kvu_1, this.lvu_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            var tmp_1 = this.lvu_1.ke7_1;
            var this_0 = LinkedHashMap_init_$Create$();
            Companion_getInstance_112();
            this.kvu_1.wp2(this_0, 'clazzUid');
            this.kvu_1.sp7('CourseDiscussionPost', tmp_1, this.lvu_1, this_0.f3());
            this.hd_1 = 5;
            continue $sm;
          case 5:
            return Unit_instance;
          case 6:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 6) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(DiscussionPostEditViewModel$onClickSave$slambda).v1m = function ($this$launch, completion) {
    var i = new DiscussionPostEditViewModel$onClickSave$slambda(this.kvu_1, this.lvu_1, completion);
    i.mvu_1 = $this$launch;
    return i;
  };
  function DiscussionPostEditViewModel$onClickSave$slambda_0(this$0, $post, resultContinuation) {
    var i = new DiscussionPostEditViewModel$onClickSave$slambda(this$0, $post, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function DiscussionPostEditViewModel(di, savedStateHandle, destinationName) {
    destinationName = destinationName === VOID ? 'DiscussionPostEdit' : destinationName;
    UstadEditViewModel.call(this, di, savedStateHandle, destinationName);
    this.avs_1 = MutableStateFlow(new DiscussionPostEditUiState());
    this.bvs_1 = asStateFlow(this.avs_1);
    this.lp2(Companion_getInstance_85().uol_1);
    var title = _get_discussionPostUid__impog9(this).equals(new Long(0, 0)) ? this.jp2().en6(strings_getInstance().jme_1) : this.jp2().en6(strings_getInstance().mlo_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.pp1_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.discussionpost.edit.DiscussionPostEditViewModel.<anonymous>' call
        var nextValue = new AppUiState(VOID, VOID, title, VOID, true);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp = this.cp2();
    launch(tmp, VOID, VOID, DiscussionPostEditViewModel$slambda_0(this, null));
  }
  protoOf(DiscussionPostEditViewModel).pvu = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.avs_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.discussionpost.edit.DiscussionPostEditViewModel.onEntityChanged.<anonymous>' call
        var tmp0_safe_receiver = prevValue.cvs_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.me7_1;
        var tmp_0 = this.wp8(tmp, entity == null ? null : entity.me7_1, prevValue.evs_1);
        var tmp2_safe_receiver = prevValue.cvs_1;
        var tmp_1 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.ne7_1;
        var nextValue = prevValue.gvs(entity, VOID, tmp_0, this.wp8(tmp_1, entity == null ? null : entity.ne7_1, prevValue.fvs_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_44.a4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_112();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.qp7_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_2 = this;
    var tmp_3 = this.cp2();
    tmp_2.qp7_1 = launch(tmp_3, VOID, VOID, DiscussionPostEditViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(DiscussionPostEditViewModel).cqf = function () {
    var tmp0_elvis_lhs = this.avs_1.t2().cvs_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var post = tmp;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.avs_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.discussionpost.edit.DiscussionPostEditViewModel.onClickSave.<anonymous>' call
        var tmp_0;
        // Inline function 'kotlin.text.isNullOrEmpty' call
        var this_1 = post.me7_1;
        // Inline function 'kotlin.contracts.contract' call
        if (this_1 == null ? true : charSequenceLength(this_1) === 0) {
          tmp_0 = this.jp2().en6(strings_getInstance().blh_1);
        } else {
          tmp_0 = null;
        }
        var tmp_1 = tmp_0;
        var tmp_2;
        // Inline function 'kotlin.text.isNullOrEmpty' call
        var this_2 = post.ne7_1;
        // Inline function 'kotlin.contracts.contract' call
        if (this_2 == null ? true : charSequenceLength(this_2) === 0) {
          tmp_2 = this.jp2().en6(strings_getInstance().blh_1);
        } else {
          tmp_2 = null;
        }
        var nextValue = prevValue.gvs(VOID, VOID, tmp_1, tmp_2);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_3 = this.cp2();
    launch(tmp_3, VOID, VOID, DiscussionPostEditViewModel$onClickSave$slambda_0(this, post, null));
  };
  function DiscussionPostEditUiState(discussionPost, fieldsEnabled, discussionPostTitleError, discussionPostDescError) {
    discussionPost = discussionPost === VOID ? null : discussionPost;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    discussionPostTitleError = discussionPostTitleError === VOID ? null : discussionPostTitleError;
    discussionPostDescError = discussionPostDescError === VOID ? null : discussionPostDescError;
    this.cvs_1 = discussionPost;
    this.dvs_1 = fieldsEnabled;
    this.evs_1 = discussionPostTitleError;
    this.fvs_1 = discussionPostDescError;
  }
  protoOf(DiscussionPostEditUiState).qvu = function (discussionPost, fieldsEnabled, discussionPostTitleError, discussionPostDescError) {
    return new DiscussionPostEditUiState(discussionPost, fieldsEnabled, discussionPostTitleError, discussionPostDescError);
  };
  protoOf(DiscussionPostEditUiState).gvs = function (discussionPost, fieldsEnabled, discussionPostTitleError, discussionPostDescError, $super) {
    discussionPost = discussionPost === VOID ? this.cvs_1 : discussionPost;
    fieldsEnabled = fieldsEnabled === VOID ? this.dvs_1 : fieldsEnabled;
    discussionPostTitleError = discussionPostTitleError === VOID ? this.evs_1 : discussionPostTitleError;
    discussionPostDescError = discussionPostDescError === VOID ? this.fvs_1 : discussionPostDescError;
    return $super === VOID ? this.qvu(discussionPost, fieldsEnabled, discussionPostTitleError, discussionPostDescError) : $super.qvu.call(this, discussionPost, fieldsEnabled, discussionPostTitleError, discussionPostDescError);
  };
  protoOf(DiscussionPostEditUiState).toString = function () {
    return 'DiscussionPostEditUiState(discussionPost=' + this.cvs_1 + ', fieldsEnabled=' + this.dvs_1 + ', discussionPostTitleError=' + this.evs_1 + ', discussionPostDescError=' + this.fvs_1 + ')';
  };
  protoOf(DiscussionPostEditUiState).hashCode = function () {
    var result = this.cvs_1 == null ? 0 : hashCode(this.cvs_1);
    result = imul(result, 31) + getBooleanHashCode(this.dvs_1) | 0;
    result = imul(result, 31) + (this.evs_1 == null ? 0 : getStringHashCode(this.evs_1)) | 0;
    result = imul(result, 31) + (this.fvs_1 == null ? 0 : getStringHashCode(this.fvs_1)) | 0;
    return result;
  };
  protoOf(DiscussionPostEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof DiscussionPostEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof DiscussionPostEditUiState ? other : THROW_CCE();
    if (!equals(this.cvs_1, tmp0_other_with_cast.cvs_1))
      return false;
    if (!(this.dvs_1 === tmp0_other_with_cast.dvs_1))
      return false;
    if (!(this.evs_1 == tmp0_other_with_cast.evs_1))
      return false;
    if (!(this.fvs_1 == tmp0_other_with_cast.fvs_1))
      return false;
    return true;
  };
  function invoke$urlToLoad(_this__u8e3s4, cevOpenUri, manifest, this$0, cevManifestUrlObj) {
    var prefix = substringBeforeLast(cevOpenUri, '/', '');
    var tmp;
    // Inline function 'kotlin.text.isNotEmpty' call
    if (charSequenceLength(prefix) > 0) {
      tmp = prefix + '/' + _this__u8e3s4.pn1_1;
    } else {
      tmp = _this__u8e3s4.pn1_1;
    }
    var pathInManifest = tmp;
    return invoke$urlToLoad_0(requireEntryByUri(manifest, pathInManifest), this$0, cevManifestUrlObj);
  }
  function EpubContentViewModel$slambda$slambda$lambda(this$0) {
    return function () {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.vvv_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.epubcontent.EpubContentViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.jvw(VOID, VOID, VOID, true);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function EpubContentViewModel$slambda$slambda$slambda(this$0, $cevOpenUri, $manifest, $cevManifestUrlObj, resultContinuation) {
    this.svw_1 = this$0;
    this.tvw_1 = $cevOpenUri;
    this.uvw_1 = $manifest;
    this.vvw_1 = $cevManifestUrlObj;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(EpubContentViewModel$slambda$slambda$slambda).fvx = function (it, $completion) {
    var tmp = this.gvx(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(EpubContentViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.fvx(p1 instanceof Item ? p1 : THROW_CCE(), $completion);
  };
  protoOf(EpubContentViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            tmp_0.xvw_1 = _get_httpClient__2ty1zc_2(this.svw_1);
            var tmp_1 = this;
            tmp_1.yvw_1 = invoke$urlToLoad(this.wvw_1, this.tvw_1, this.uvw_1, this.svw_1, this.vvw_1);
            var tmp_2 = this;
            tmp_2.zvw_1 = this.xvw_1;
            var tmp_3 = this;
            tmp_3.avx_1 = this.zvw_1;
            var tmp_4 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.yvw_1);
            tmp_4.bvx_1 = this_0;
            this.bvx_1.j38_1 = Companion_getInstance().y2w_1;
            var tmp_5 = this;
            tmp_5.cvx_1 = this.avx_1;
            var tmp_6 = this;
            tmp_6.dvx_1 = this.bvx_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.dvx_1, this.cvx_1)).u3y(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.evx_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = bodyAsDecodedText(this.evx_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return suspendResult;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(EpubContentViewModel$slambda$slambda$slambda).gvx = function (it, completion) {
    var i = new EpubContentViewModel$slambda$slambda$slambda(this.svw_1, this.tvw_1, this.uvw_1, this.vvw_1, completion);
    i.wvw_1 = it;
    return i;
  };
  function EpubContentViewModel$slambda$slambda$slambda_0(this$0, $cevOpenUri, $manifest, $cevManifestUrlObj, resultContinuation) {
    var i = new EpubContentViewModel$slambda$slambda$slambda(this$0, $cevOpenUri, $manifest, $cevManifestUrlObj, resultContinuation);
    var l = function (it, $completion) {
      return i.fvx(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function invoke$urlToLoad_0(_this__u8e3s4, this$0, cevManifestUrlObj) {
    var tmp;
    if (this$0.rvv_1) {
      tmp = _this__u8e3s4.tn3_1;
    } else {
      tmp = cevManifestUrlObj.ono(_this__u8e3s4.ln3_1).toString();
    }
    return tmp;
  }
  function EpubContentViewModel$slambda$slambda($manifest, $cevOpenUri, this$0, $opfBaseUrl, $argTocString, $cevManifestUrlObj, resultContinuation) {
    this.pvx_1 = $manifest;
    this.qvx_1 = $cevOpenUri;
    this.rvx_1 = this$0;
    this.svx_1 = $opfBaseUrl;
    this.tvx_1 = $argTocString;
    this.uvx_1 = $cevManifestUrlObj;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(EpubContentViewModel$slambda$slambda).u1m = function ($this$withContext, $completion) {
    var tmp = this.v1m($this$withContext, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(EpubContentViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(EpubContentViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.id_1 = 4;
            this.wvx_1 = requireEntryByUri(this.pvx_1, this.qvx_1);
            var tmp_0 = this;
            tmp_0.xvx_1 = _get_httpClient__2ty1zc_2(this.rvx_1);
            var tmp_1 = this;
            tmp_1.yvx_1 = invoke$urlToLoad_0(this.wvx_1, this.rvx_1, this.uvx_1);
            var tmp_2 = this;
            tmp_2.zvx_1 = this.xvx_1;
            var tmp_3 = this;
            tmp_3.avy_1 = this.zvx_1;
            var tmp_4 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.yvx_1);
            tmp_4.bvy_1 = this_0;
            this.bvy_1.j38_1 = Companion_getInstance().y2w_1;
            var tmp_5 = this;
            tmp_5.cvy_1 = this.avy_1;
            var tmp_6 = this;
            tmp_6.dvy_1 = this.bvy_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.dvy_1, this.cvy_1)).u3y(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.evy_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = bodyAsDecodedText(this.evy_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.fvy_1 = suspendResult;
            this.gvy_1 = _get_xml__e6jxp6(this.rvx_1).f45(Companion_instance_74.a4r(), this.fvy_1);
            var tmp_7 = this;
            var this_1 = this.gvy_1.tn2_1.yn1_1;
            var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(this_1, 10)), 16);
            var destination = LinkedHashMap_init_$Create$_0(capacity);
            var tmp0_iterator = this_1.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              destination.s(element.on1_1, element);
            }

            tmp_7.hvy_1 = destination;
            var tmp_8 = this;
            var this_2 = this.gvy_1.un2_1.xn2_1;
            var destination_0 = ArrayList_init_$Create$();
            var tmp0_iterator_0 = this_2.w();
            while (tmp0_iterator_0.f()) {
              var element_0 = tmp0_iterator_0.e();
              var tmp0_safe_receiver = this.hvy_1.q(element_0.un1_1);
              var tmp_9;
              if (tmp0_safe_receiver == null) {
                tmp_9 = null;
              } else {
                tmp_9 = this.svx_1.ono(tmp0_safe_receiver.pn1_1);
              }
              var tmp1_safe_receiver = tmp_9;
              var tmp0_safe_receiver_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.toString();
              if (tmp0_safe_receiver_0 == null)
                null;
              else {
                destination_0.i1(tmp0_safe_receiver_0);
              }
            }

            tmp_8.ivy_1 = destination_0;
            var tmp_10 = this;
            var tmp0_safe_receiver_1 = this.gvy_1.vn2();
            var tmp_11;
            if (tmp0_safe_receiver_1 == null) {
              tmp_11 = null;
            } else {
              tmp_11 = this.svx_1.ono(tmp0_safe_receiver_1.pn1_1);
            }

            var tmp1_safe_receiver_0 = tmp_11;
            tmp_10.jvy_1 = tmp1_safe_receiver_0 == null ? null : tmp1_safe_receiver_0.toString();
            l$ret$1: do {
              var this_3 = this.rvx_1.vvv_1;
              while (true) {
                var prevValue = this_3.t2();
                var tmp0_safe_receiver_2 = firstOrNull(this.gvy_1.sn2_1.in2_1);
                var nextValue = prevValue.jvw(VOID, this.ivy_1, VOID, VOID, VOID, this.jvy_1, tmp0_safe_receiver_2 == null ? null : tmp0_safe_receiver_2.hn1_1);
                if (this_3.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_4 = this.rvx_1.pp1_1;
              while (true) {
                var prevValue_0 = this_4.t2();
                var tmp0_safe_receiver_3 = firstOrNull(this.gvy_1.sn2_1.gn2_1);
                var tmp1_elvis_lhs = tmp0_safe_receiver_3 == null ? null : tmp0_safe_receiver_3.ln1_1;
                var tmp_12 = tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs;
                var tmp2_elvis_lhs = this.tvx_1;
                var tmp_13 = tmp2_elvis_lhs == null ? this.rvx_1.jp2().en6(strings_getInstance().sme_1) : tmp2_elvis_lhs;
                var nextValue_0 = prevValue_0.nol(VOID, VOID, tmp_12, VOID, VOID, VOID, VOID, VOID, VOID, listOf_0(new OverflowItem(tmp_13, EpubContentViewModel$slambda$slambda$lambda(this.rvx_1))));
                if (this_4.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            var tmp_14 = this.rvx_1;
            var tmp2_safe_receiver = this.gvy_1.wn2();
            var tmp_15;
            if (tmp2_safe_receiver == null) {
              tmp_15 = null;
            } else {
              tmp_15 = this.svx_1.ono(tmp2_safe_receiver.pn1_1).toString();
            }

            tmp_14.avw_1 = tmp_15;
            this.hd_1 = 3;
            suspendResult = this.rvx_1.qvv_1.hnz(this.gvy_1, EpubContentViewModel$slambda$slambda$slambda_0(this.rvx_1, this.qvx_1, this.pvx_1, this.uvx_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            var tmp3_elvis_lhs = suspendResult;
            var tocItems = tmp3_elvis_lhs == null ? emptyList() : tmp3_elvis_lhs;
            l$ret$5: do {
              var this_5 = this.rvx_1.vvv_1;
              while (true) {
                var prevValue_1 = this_5.t2();
                var nextValue_1 = prevValue_1.jvw(VOID, VOID, tocItems);
                if (this_5.y1k(prevValue_1, nextValue_1)) {
                  break l$ret$5;
                }
              }
            }
             while (false);
            this.id_1 = 5;
            this.hd_1 = 6;
            continue $sm;
          case 4:
            this.id_1 = 5;
            var tmp_16 = this.kd_1;
            if (tmp_16 instanceof Error) {
              var e = this.kd_1;
              printStackTrace(e);
              this.hd_1 = 6;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 5:
            throw this.kd_1;
          case 6:
            this.id_1 = 5;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 5) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(EpubContentViewModel$slambda$slambda).v1m = function ($this$withContext, completion) {
    var i = new EpubContentViewModel$slambda$slambda(this.pvx_1, this.qvx_1, this.rvx_1, this.svx_1, this.tvx_1, this.uvx_1, completion);
    i.vvx_1 = $this$withContext;
    return i;
  };
  function EpubContentViewModel$slambda$slambda_0($manifest, $cevOpenUri, this$0, $opfBaseUrl, $argTocString, $cevManifestUrlObj, resultContinuation) {
    var i = new EpubContentViewModel$slambda$slambda($manifest, $cevOpenUri, this$0, $opfBaseUrl, $argTocString, $cevManifestUrlObj, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.u1m($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_httpClient__2ty1zc_2($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.tvv_1;
    httpClient$factory_6();
    return this_0.t2();
  }
  function _get_xml__e6jxp6($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.uvv_1;
    xml$factory_0();
    return this_0.t2();
  }
  function _get_openExternalLinkUseCase__ku5z07($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.xvv_1;
    openExternalLinkUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_149() {
    this.kvy_1 = 'manifestUrl';
    this.lvy_1 = 'cevUri';
    this.mvy_1 = 'navigationVisible';
    this.nvy_1 = 'tocString';
    this.ovy_1 = 'xapiStatementsUrl';
    this.pvy_1 = 'EpubContent';
  }
  var Companion_instance_197;
  function Companion_getInstance_166() {
    return Companion_instance_197;
  }
  function EpubContentViewModel$slambda($argManifestUrl, $argCevOpenUri, this$0, $argTocString, resultContinuation) {
    this.yvy_1 = $argManifestUrl;
    this.zvy_1 = $argCevOpenUri;
    this.avz_1 = this$0;
    this.bvz_1 = $argTocString;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(EpubContentViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(EpubContentViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(EpubContentViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 6;
            if (!(this.yvy_1 == null) ? !(this.zvy_1 == null) : false) {
              var tmp_0 = this;
              tmp_0.dvz_1 = to(this.yvy_1, this.zvy_1);
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.avz_1.fp2().v7e().cbb(this.avz_1.svv_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.evz_1 = suspendResult;
            var tmp_1 = this;
            var tmp_2;
            if (this.evz_1 == null) {
              return Unit_instance;
            } else {
              tmp_2 = this.evz_1;
            }

            tmp_1.fvz_1 = tmp_2;
            var tmp_3 = this;
            var tmp1_elvis_lhs = this.fvz_1.haj_1;
            var tmp_4;
            if (tmp1_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_4 = tmp1_elvis_lhs;
            }

            tmp_3.gvz_1 = tmp_4;
            var tmp_5 = this;
            var tmp2_elvis_lhs = this.fvz_1.faj_1;
            var tmp_6;
            if (tmp2_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_6 = tmp2_elvis_lhs;
            }

            tmp_5.hvz_1 = tmp_6;
            this.dvz_1 = to(this.gvz_1, this.hvz_1);
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.ivz_1 = this.dvz_1;
            this.jvz_1 = this.ivz_1.y6();
            this.kvz_1 = this.ivz_1.z6();
            this.lvz_1 = UrlKmp(this.jvz_1);
            this.mvz_1 = this.lvz_1.ono(this.kvz_1);
            var tmp_7 = this;
            tmp_7.nvz_1 = this.avz_1.z4q();
            var tmp_8 = this;
            tmp_8.ovz_1 = _get_httpClient__2ty1zc_2(this.avz_1);
            var tmp_9 = this;
            tmp_9.pvz_1 = this.jvz_1;
            var tmp_10 = this;
            tmp_10.qvz_1 = this.ovz_1;
            var tmp_11 = this;
            tmp_11.rvz_1 = this.qvz_1;
            var tmp_12 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.pvz_1);
            tmp_12.svz_1 = this_0;
            this.svz_1.j38_1 = Companion_getInstance().y2w_1;
            var tmp_13 = this;
            tmp_13.tvz_1 = this.rvz_1;
            var tmp_14 = this;
            tmp_14.uvz_1 = this.svz_1;
            this.hd_1 = 3;
            suspendResult = (new HttpStatement(this.uvz_1, this.tvz_1)).u3y(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.vvz_1 = suspendResult;
            this.hd_1 = 4;
            suspendResult = bodyAsDecodedText(this.vvz_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.wvz_1 = suspendResult;
            var tmp_15 = this;
            var this_1 = this.nvz_1.g45();
            var this_2 = serializer(this_1, createKType(getKClass(ContentManifest), arrayOf([]), false));
            tmp_15.xvz_1 = this.nvz_1.f45(isInterface(this_2, KSerializer) ? this_2 : THROW_CCE(), this.wvz_1);
            this.hd_1 = 5;
            var tmp_16 = Dispatchers_getInstance().p12_1;
            suspendResult = withContext(tmp_16, EpubContentViewModel$slambda$slambda_0(this.xvz_1, this.kvz_1, this.avz_1, this.mvz_1, this.bvz_1, this.lvz_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            return Unit_instance;
          case 6:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 6) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(EpubContentViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new EpubContentViewModel$slambda(this.yvy_1, this.zvy_1, this.avz_1, this.bvz_1, completion);
    i.cvz_1 = $this$launch;
    return i;
  };
  function EpubContentViewModel$slambda_0($argManifestUrl, $argCevOpenUri, this$0, $argTocString, resultContinuation) {
    var i = new EpubContentViewModel$slambda($argManifestUrl, $argCevOpenUri, this$0, $argTocString, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function EpubContentViewModel(di, savedStateHandle, getEpubTableOfContentsUseCase, useBodyDataUrls) {
    var tmp;
    if (getEpubTableOfContentsUseCase === VOID) {
      // Inline function 'org.kodein.di.instance' call
      var tmp_0 = get_direct(di).s57();
      // Inline function 'org.kodein.type.generic' call
      var tmp_1 = typeToken(createKType(getKClass(XML), arrayOf([]), false));
      var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
      var tmp$ret$1 = tmp_0.q57(tmp$ret$0, null);
      tmp = new GetEpubTableOfContentsUseCase(tmp$ret$1);
    } else {
      tmp = getEpubTableOfContentsUseCase;
    }
    getEpubTableOfContentsUseCase = tmp;
    useBodyDataUrls = useBodyDataUrls === VOID ? false : useBodyDataUrls;
    AbstractNonInteractiveContentViewModel.call(this, di, savedStateHandle, 'EpubContent');
    this.qvv_1 = getEpubTableOfContentsUseCase;
    this.rvv_1 = useBodyDataUrls;
    var tmp_2 = this;
    Companion_getInstance_102();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_2.svv_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_3 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    tmp_3.tvv_1 = Instance(this, tmp$ret$2, null).n5c(this, httpClient$factory_5());
    var tmp_5 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(XML), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    tmp_5.uvv_1 = Instance(this, tmp$ret$4, null).n5c(this, xml$factory());
    this.vvv_1 = MutableStateFlow(new EpubContentUiState(this.svv_1));
    this.wvv_1 = asStateFlow(this.vvv_1);
    var tmp_7 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_8 = typeToken(createKType(getKClass(OpenExternalLinkUseCase), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
    tmp_7.xvv_1 = Instance(this, tmp$ret$6, null).n5c(this, openExternalLinkUseCase$factory());
    this.yvv_1 = MutableSharedFlow(1, 0, BufferOverflow_DROP_OLDEST_getInstance());
    this.zvv_1 = asSharedFlow(this.yvv_1);
    this.avw_1 = null;
    var argManifestUrl = savedStateHandle.ba('manifestUrl');
    var argCevOpenUri = savedStateHandle.ba('cevUri');
    var tmp0_safe_receiver_0 = savedStateHandle.ba('navigationVisible');
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_0 == null ? null : toBoolean(tmp0_safe_receiver_0);
    var argNavigationVisible = tmp1_elvis_lhs_0 == null ? true : tmp1_elvis_lhs_0;
    var argTocString = savedStateHandle.ba('tocString');
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.pp1_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.epubcontent.EpubContentViewModel.<anonymous>' call
        var nextValue = prevValue.nol(VOID, VOID, VOID, argNavigationVisible, true);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_9 = this.cp2();
    launch(tmp_9, VOID, VOID, EpubContentViewModel$slambda_0(argManifestUrl, argCevOpenUri, this, argTocString, null));
  }
  protoOf(EpubContentViewModel).yvz = function () {
    var langCodeVal = this.vvv_1.t2().hvw_1;
    var titleVal = this.pp1_1.t2().aol_1;
    var tmp;
    if (!(langCodeVal == null) ? !(titleVal == null) : false) {
      tmp = new TitleAndLangCode(titleVal, langCodeVal);
    } else {
      tmp = null;
    }
    return tmp;
  };
  protoOf(EpubContentViewModel).zvz = function (baseUrl, href) {
    var url = UrlKmp(baseUrl).ono(href);
    var urlStr = url.toString();
    var hashIndex = indexOf_0(urlStr, '#');
    var urlWithoutHash = substringBefore_0(urlStr, '#');
    var indexInSpine = this.vvv_1.t2().cvw_1.x(urlWithoutHash);
    if (indexInSpine >= 0) {
      var tmp;
      if (hashIndex > 0) {
        // Inline function 'kotlin.text.substring' call
        // Inline function 'kotlin.js.asDynamic' call
        tmp = urlStr.substring(hashIndex);
      } else {
        tmp = null;
      }
      this.yvv_1.i1h(new EpubScrollCommand(indexInSpine, tmp));
    } else {
      _get_openExternalLinkUseCase__ku5z07(this).eo0(url.toString(), LinkTarget_BLANK_getInstance());
    }
  };
  protoOf(EpubContentViewModel).aw0 = function (tocItem) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.vvv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.epubcontent.EpubContentViewModel.onClickTocItem.<anonymous>' call
        var nextValue = prevValue.jvw(VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp0_elvis_lhs = this.avw_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var baseHref = tmp;
    var tmp1_elvis_lhs = tocItem.cnz_1;
    var tmp_0;
    if (tmp1_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp_0 = tmp1_elvis_lhs;
    }
    var itemUrl = tmp_0;
    this.zvz(baseHref, itemUrl);
  };
  protoOf(EpubContentViewModel).bw0 = function (tocItem) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.vvv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.epubcontent.EpubContentViewModel.onClickToggleTocItem.<anonymous>' call
        var tmp;
        if (prevValue.fvw_1.a1(tocItem.anz_1)) {
          // Inline function 'kotlin.collections.filter' call
          // Inline function 'kotlin.collections.filterTo' call
          var this_1 = prevValue.fvw_1;
          var destination = ArrayList_init_$Create$();
          var tmp0_iterator = this_1.w();
          while (tmp0_iterator.f()) {
            var element = tmp0_iterator.e();
            // Inline function 'com.ustadmobile.core.viewmodel.epubcontent.EpubContentViewModel.onClickToggleTocItem.<anonymous>.<anonymous>' call
            if (!(element === tocItem.anz_1)) {
              destination.i1(element);
            }
          }
          tmp = toSet(destination);
        } else {
          tmp = plus_2(prevValue.fvw_1, tocItem.anz_1);
        }
        var nextValue = prevValue.jvw(VOID, VOID, VOID, VOID, tmp);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(EpubContentViewModel).cw0 = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.vvv_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.epubcontent.EpubContentViewModel.onDismissTableOfContentsDrawer.<anonymous>' call
        var nextValue = prevValue.jvw(VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(EpubContentViewModel).dw0 = function (index) {
    var spineSize = this.vvv_1.t2().cvw_1.u();
    if (spineSize <= 0)
      return Unit_instance;
    if (index === (spineSize - 1 | 0)) {
      this.hoi();
    } else {
      this.goi(imul(index, 100) / spineSize | 0);
    }
  };
  function EpubContentUiState(contentEntryVersionUid, spineUrls, tableOfContents, tableOfContentsOpen, collapsedTocUids, coverImageUrl, langCode) {
    contentEntryVersionUid = contentEntryVersionUid === VOID ? new Long(0, 0) : contentEntryVersionUid;
    spineUrls = spineUrls === VOID ? emptyList() : spineUrls;
    tableOfContents = tableOfContents === VOID ? emptyList() : tableOfContents;
    tableOfContentsOpen = tableOfContentsOpen === VOID ? false : tableOfContentsOpen;
    collapsedTocUids = collapsedTocUids === VOID ? emptySet() : collapsedTocUids;
    coverImageUrl = coverImageUrl === VOID ? null : coverImageUrl;
    langCode = langCode === VOID ? null : langCode;
    this.bvw_1 = contentEntryVersionUid;
    this.cvw_1 = spineUrls;
    this.dvw_1 = tableOfContents;
    this.evw_1 = tableOfContentsOpen;
    this.fvw_1 = collapsedTocUids;
    this.gvw_1 = coverImageUrl;
    this.hvw_1 = langCode;
    var tmp = this;
    // Inline function 'kotlin.collections.filter' call
    // Inline function 'kotlin.collections.filterTo' call
    var this_0 = this.dvw_1;
    var destination = ArrayList_init_$Create$();
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.viewmodel.epubcontent.EpubContentUiState.tableOfContentToDisplay.<anonymous>' call
      var tmp$ret$0;
      $l$block_0: {
        // Inline function 'kotlin.collections.any' call
        var this_1 = this.fvw_1;
        var tmp_0;
        if (isInterface(this_1, Collection)) {
          tmp_0 = this_1.c1();
        } else {
          tmp_0 = false;
        }
        if (tmp_0) {
          tmp$ret$0 = false;
          break $l$block_0;
        }
        var tmp0_iterator_0 = this_1.w();
        while (tmp0_iterator_0.f()) {
          var element_0 = tmp0_iterator_0.e();
          // Inline function 'com.ustadmobile.core.viewmodel.epubcontent.EpubContentUiState.tableOfContentToDisplay.<anonymous>.<anonymous>' call
          if (element.dw1(element_0)) {
            tmp$ret$0 = true;
            break $l$block_0;
          }
        }
        tmp$ret$0 = false;
      }
      if (!tmp$ret$0) {
        destination.i1(element);
      }
    }
    tmp.ivw_1 = destination;
  }
  protoOf(EpubContentUiState).ew1 = function (contentEntryVersionUid, spineUrls, tableOfContents, tableOfContentsOpen, collapsedTocUids, coverImageUrl, langCode) {
    return new EpubContentUiState(contentEntryVersionUid, spineUrls, tableOfContents, tableOfContentsOpen, collapsedTocUids, coverImageUrl, langCode);
  };
  protoOf(EpubContentUiState).jvw = function (contentEntryVersionUid, spineUrls, tableOfContents, tableOfContentsOpen, collapsedTocUids, coverImageUrl, langCode, $super) {
    contentEntryVersionUid = contentEntryVersionUid === VOID ? this.bvw_1 : contentEntryVersionUid;
    spineUrls = spineUrls === VOID ? this.cvw_1 : spineUrls;
    tableOfContents = tableOfContents === VOID ? this.dvw_1 : tableOfContents;
    tableOfContentsOpen = tableOfContentsOpen === VOID ? this.evw_1 : tableOfContentsOpen;
    collapsedTocUids = collapsedTocUids === VOID ? this.fvw_1 : collapsedTocUids;
    coverImageUrl = coverImageUrl === VOID ? this.gvw_1 : coverImageUrl;
    langCode = langCode === VOID ? this.hvw_1 : langCode;
    return $super === VOID ? this.ew1(contentEntryVersionUid, spineUrls, tableOfContents, tableOfContentsOpen, collapsedTocUids, coverImageUrl, langCode) : $super.ew1.call(this, contentEntryVersionUid, spineUrls, tableOfContents, tableOfContentsOpen, collapsedTocUids, coverImageUrl, langCode);
  };
  protoOf(EpubContentUiState).toString = function () {
    return 'EpubContentUiState(contentEntryVersionUid=' + this.bvw_1.toString() + ', spineUrls=' + this.cvw_1 + ', tableOfContents=' + this.dvw_1 + ', tableOfContentsOpen=' + this.evw_1 + ', collapsedTocUids=' + this.fvw_1 + ', coverImageUrl=' + this.gvw_1 + ', langCode=' + this.hvw_1 + ')';
  };
  protoOf(EpubContentUiState).hashCode = function () {
    var result = this.bvw_1.hashCode();
    result = imul(result, 31) + hashCode(this.cvw_1) | 0;
    result = imul(result, 31) + hashCode(this.dvw_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.evw_1) | 0;
    result = imul(result, 31) + hashCode(this.fvw_1) | 0;
    result = imul(result, 31) + (this.gvw_1 == null ? 0 : getStringHashCode(this.gvw_1)) | 0;
    result = imul(result, 31) + (this.hvw_1 == null ? 0 : getStringHashCode(this.hvw_1)) | 0;
    return result;
  };
  protoOf(EpubContentUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof EpubContentUiState))
      return false;
    var tmp0_other_with_cast = other instanceof EpubContentUiState ? other : THROW_CCE();
    if (!this.bvw_1.equals(tmp0_other_with_cast.bvw_1))
      return false;
    if (!equals(this.cvw_1, tmp0_other_with_cast.cvw_1))
      return false;
    if (!equals(this.dvw_1, tmp0_other_with_cast.dvw_1))
      return false;
    if (!(this.evw_1 === tmp0_other_with_cast.evw_1))
      return false;
    if (!equals(this.fvw_1, tmp0_other_with_cast.fvw_1))
      return false;
    if (!(this.gvw_1 == tmp0_other_with_cast.gvw_1))
      return false;
    if (!(this.hvw_1 == tmp0_other_with_cast.hvw_1))
      return false;
    return true;
  };
  function EpubScrollCommand(spineIndex, hash) {
    hash = hash === VOID ? null : hash;
    this.fw1_1 = spineIndex;
    this.gw1_1 = hash;
  }
  protoOf(EpubScrollCommand).toString = function () {
    return 'EpubScrollCommand(spineIndex=' + this.fw1_1 + ', hash=' + this.gw1_1 + ')';
  };
  protoOf(EpubScrollCommand).hashCode = function () {
    var result = this.fw1_1;
    result = imul(result, 31) + (this.gw1_1 == null ? 0 : getStringHashCode(this.gw1_1)) | 0;
    return result;
  };
  protoOf(EpubScrollCommand).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof EpubScrollCommand))
      return false;
    var tmp0_other_with_cast = other instanceof EpubScrollCommand ? other : THROW_CCE();
    if (!(this.fw1_1 === tmp0_other_with_cast.fw1_1))
      return false;
    if (!(this.gw1_1 == tmp0_other_with_cast.gw1_1))
      return false;
    return true;
  };
  function EpubTocItem(uid, label, href, children, parentUids, indentLevel) {
    parentUids = parentUids === VOID ? emptySet() : parentUids;
    indentLevel = indentLevel === VOID ? 0 : indentLevel;
    this.anz_1 = uid;
    this.bnz_1 = label;
    this.cnz_1 = href;
    this.dnz_1 = children;
    this.enz_1 = parentUids;
    this.fnz_1 = indentLevel;
    var tmp = this;
    // Inline function 'kotlin.collections.isNotEmpty' call
    tmp.gnz_1 = !this.dnz_1.c1();
  }
  protoOf(EpubTocItem).dw1 = function (uid) {
    return this.enz_1.a1(uid);
  };
  protoOf(EpubTocItem).toString = function () {
    return 'EpubTocItem(uid=' + this.anz_1 + ', label=' + this.bnz_1 + ', href=' + this.cnz_1 + ', children=' + this.dnz_1 + ', parentUids=' + this.enz_1 + ', indentLevel=' + this.fnz_1 + ')';
  };
  protoOf(EpubTocItem).hashCode = function () {
    var result = this.anz_1;
    result = imul(result, 31) + getStringHashCode(this.bnz_1) | 0;
    result = imul(result, 31) + (this.cnz_1 == null ? 0 : getStringHashCode(this.cnz_1)) | 0;
    result = imul(result, 31) + hashCode(this.dnz_1) | 0;
    result = imul(result, 31) + hashCode(this.enz_1) | 0;
    result = imul(result, 31) + this.fnz_1 | 0;
    return result;
  };
  protoOf(EpubTocItem).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof EpubTocItem))
      return false;
    var tmp0_other_with_cast = other instanceof EpubTocItem ? other : THROW_CCE();
    if (!(this.anz_1 === tmp0_other_with_cast.anz_1))
      return false;
    if (!(this.bnz_1 === tmp0_other_with_cast.bnz_1))
      return false;
    if (!(this.cnz_1 == tmp0_other_with_cast.cnz_1))
      return false;
    if (!equals(this.dnz_1, tmp0_other_with_cast.dnz_1))
      return false;
    if (!equals(this.enz_1, tmp0_other_with_cast.enz_1))
      return false;
    if (!(this.fnz_1 === tmp0_other_with_cast.fnz_1))
      return false;
    return true;
  };
  function httpClient$factory_5() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_2(receiver);
    }, null);
  }
  function xml$factory() {
    return getPropertyCallableRef('xml', 1, KProperty1, function (receiver) {
      return _get_xml__e6jxp6(receiver);
    }, null);
  }
  function openExternalLinkUseCase$factory() {
    return getPropertyCallableRef('openExternalLinkUseCase', 1, KProperty1, function (receiver) {
      return _get_openExternalLinkUseCase__ku5z07(receiver);
    }, null);
  }
  function httpClient$factory_6() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_2(receiver);
    }, null);
  }
  function xml$factory_0() {
    return getPropertyCallableRef('xml', 1, KProperty1, function (receiver) {
      return _get_xml__e6jxp6(receiver);
    }, null);
  }
  function openExternalLinkUseCase$factory_0() {
    return getPropertyCallableRef('openExternalLinkUseCase', 1, KProperty1, function (receiver) {
      return _get_openExternalLinkUseCase__ku5z07(receiver);
    }, null);
  }
  function Companion_150() {
    this.hw1_1 = 'Error';
  }
  var Companion_instance_198;
  function Companion_getInstance_167() {
    return Companion_instance_198;
  }
  function _get_impl__d88w17($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.hw2_1;
    impl$factory_0();
    return this_0.t2();
  }
  function _get_httpClient__2ty1zc_3($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.iw2_1;
    httpClient$factory_8();
    return this_0.t2();
  }
  function _get_apiUrlConfig__mldllg_1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.jw2_1;
    apiUrlConfig$factory_4();
    return this_0.t2();
  }
  function _get_setLanguageUseCase__st7nci($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.lw2_1;
    setLanguageUseCase$factory_0();
    return this_0.t2();
  }
  function _get_languagesConfig__hebcss($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.mw2_1;
    languagesConfig$factory_0();
    return this_0.t2();
  }
  function _get_getVersionUseCase__n7x57g_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.nw2_1;
    getVersionUseCase$factory_2();
    return this_0.t2();
  }
  function _get_getShowPoweredByUseCase__5l0p0e_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.ow2_1;
    getShowPoweredByUseCase$factory_2();
    return this_0.t2();
  }
  function onSiteVerified($this, site) {
    $this.kw2_1 = site;
    $this.lp2(Companion_getInstance_85().vol_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = $this.dw2_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.onSiteVerified.<anonymous>' call
        var tmp0_createAccountVisible = site.xgz_1;
        var tmp1_connectAsGuestVisible = site.wgz_1;
        var nextValue = prevValue.ew3(VOID, VOID, true, VOID, VOID, VOID, tmp0_createAccountVisible, tmp1_connectAsGuestVisible, VOID, null);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  }
  function goToNextDestAfterLoginOrGuestSelected($this, personUid) {
    var goOptions = new UstadGoOptions(VOID, VOID, true);
    var tmp = Napier_getInstance();
    tmp.x5d(VOID, VOID, LoginViewModel$goToNextDestAfterLoginOrGuestSelected$lambda($this));
    $this.xp8($this.np1_1, appendSelectedAccount($this.fw2_1, personUid, new Endpoint($this.gw2_1)), goOptions);
  }
  function Companion_151() {
    this.fw3_1 = 'Login';
  }
  var Companion_instance_199;
  function Companion_getInstance_168() {
    return Companion_instance_199;
  }
  function LoginViewModel$slambda(this$0, resultContinuation) {
    this.ow3_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(LoginViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(LoginViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(LoginViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 7;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            if (!(this.ow3_1.kw2_1 == null)) {
              this.hd_1 = 6;
              continue $sm;
            }

            this.id_1 = 3;
            this.hd_1 = 2;
            suspendResult = verifySite(_get_httpClient__2ty1zc_3(this.ow3_1), this.ow3_1.gw2_1, new Long(10000, 0), this.ow3_1.z4q(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.qw3_1 = suspendResult;
            onSiteVerified(this.ow3_1, this.qw3_1);
            this.id_1 = 7;
            this.hd_1 = 5;
            continue $sm;
          case 3:
            this.id_1 = 7;
            var tmp_0 = this.kd_1;
            if (tmp_0 instanceof Exception) {
              this.rw3_1 = this.kd_1;
              Napier_getInstance().z5d('Could not load site object for ' + this.ow3_1.gw2_1, this.rw3_1);
              l$ret$1: do {
                var this_0 = this.ow3_1.dw2_1;
                while (true) {
                  var prevValue = this_0.t2();
                  var nextValue = prevValue.ew3(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, _get_impl__d88w17(this.ow3_1).en6(strings_getInstance().olc_1));
                  if (this_0.y1k(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
              this.hd_1 = 4;
              suspendResult = delay(new Long(10000, 0), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 4:
            this.hd_1 = 5;
            continue $sm;
          case 5:
            this.id_1 = 7;
            this.hd_1 = 1;
            continue $sm;
          case 6:
            return Unit_instance;
          case 7:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 7) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(LoginViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new LoginViewModel$slambda(this.ow3_1, completion);
    i.pw3_1 = $this$launch;
    return i;
  };
  function LoginViewModel$slambda_0(this$0, resultContinuation) {
    var i = new LoginViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function LoginViewModel$goToNextDestAfterLoginOrGuestSelected$lambda(this$0) {
    return function () {
      return 'LoginPresenter: go to next destination: ' + this$0.fw2_1;
    };
  }
  function LoginViewModel$onClickLogin$slambda(this$0, $username, $password, resultContinuation) {
    this.aw4_1 = this$0;
    this.bw4_1 = $username;
    this.cw4_1 = $password;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(LoginViewModel$onClickLogin$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(LoginViewModel$onClickLogin$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(LoginViewModel$onClickLogin$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.ew4_1 = null;
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.id_1 = 4;
            this.id_1 = 3;
            this.hd_1 = 2;
            var tmp_0 = this.aw4_1.bp2();
            var this_0 = this.bw4_1;
            var tmp_1 = toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
            var this_1 = this.cw4_1;
            var tmp_2 = toString(trim(isCharSequence(this_1) ? this_1 : THROW_CCE()));
            var tmp_3 = this.aw4_1.gw2_1;
            Companion_getInstance_102();
            var tmp0_safe_receiver = this.aw4_1.lp1_1.ba('maxDob');
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
            suspendResult = tmp_0.dmy(tmp_1, tmp_2, tmp_3, tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs, this.aw4_1.pw2_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var account = suspendResult;
            var tmp_4 = this;
            goToNextDestAfterLoginOrGuestSelected(this.aw4_1, account.gju_1);
            tmp_4.fw4_1 = Unit_instance;
            this.id_1 = 5;
            this.hd_1 = 6;
            continue $sm;
          case 3:
            this.id_1 = 4;
            var tmp_5 = this.kd_1;
            if (tmp_5 instanceof AdultAccountRequiredException) {
              var e = this.kd_1;
              var tmp_6 = this;
              this.ew4_1 = _get_impl__d88w17(this.aw4_1).en6(strings_getInstance().xm7_1);
              tmp_6.fw4_1 = Unit_instance;
              this.id_1 = 5;
              this.hd_1 = 6;
              continue $sm;
            } else {
              var tmp_7 = this.kd_1;
              if (tmp_7 instanceof UnauthorizedException) {
                var e_0 = this.kd_1;
                var tmp_8 = this;
                this.ew4_1 = _get_impl__d88w17(this.aw4_1).en6(strings_getInstance().nlc_1);
                tmp_8.fw4_1 = Unit_instance;
                this.id_1 = 5;
                this.hd_1 = 6;
                continue $sm;
              } else {
                var tmp_9 = this.kd_1;
                if (tmp_9 instanceof ConsentNotGrantedException) {
                  var e_1 = this.kd_1;
                  var tmp_10 = this;
                  this.ew4_1 = _get_impl__d88w17(this.aw4_1).en6(strings_getInstance().wm7_1);
                  tmp_10.fw4_1 = Unit_instance;
                  this.id_1 = 5;
                  this.hd_1 = 6;
                  continue $sm;
                } else {
                  var tmp_11 = this.kd_1;
                  if (tmp_11 instanceof Exception) {
                    var e_2 = this.kd_1;
                    var tmp_12 = this;
                    this.ew4_1 = _get_impl__d88w17(this.aw4_1).en6(strings_getInstance().olc_1);
                    tmp_12.fw4_1 = Unit_instance;
                    this.id_1 = 5;
                    this.hd_1 = 6;
                    continue $sm;
                  } else {
                    throw this.kd_1;
                  }
                }
              }
            }

          case 4:
            this.id_1 = 5;
            var t = this.kd_1;
            this.aw4_1.lp2(Companion_getInstance_85().vol_1);
            l$ret$3: do {
              var this_2 = this.aw4_1.dw2_1;
              while (true) {
                var prevValue = this_2.t2();
                var nextValue = prevValue.ew3(VOID, VOID, true, VOID, VOID, VOID, VOID, VOID, VOID, this.ew4_1);
                if (this_2.y1k(prevValue, nextValue)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            throw t;
          case 5:
            throw this.kd_1;
          case 6:
            this.id_1 = 5;
            this.aw4_1.lp2(Companion_getInstance_85().vol_1);
            l$ret$5: do {
              var this_3 = this.aw4_1.dw2_1;
              while (true) {
                var prevValue_0 = this_3.t2();
                var nextValue_0 = prevValue_0.ew3(VOID, VOID, true, VOID, VOID, VOID, VOID, VOID, VOID, this.ew4_1);
                if (this_3.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$5;
                }
              }
            }
             while (false);
            return Unit_instance;
        }
      } catch ($p) {
        var e_3 = $p;
        if (this.id_1 === 5) {
          throw e_3;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_3;
        }
      }
     while (true);
  };
  protoOf(LoginViewModel$onClickLogin$slambda).v1m = function ($this$launch, completion) {
    var i = new LoginViewModel$onClickLogin$slambda(this.aw4_1, this.bw4_1, this.cw4_1, completion);
    i.dw4_1 = $this$launch;
    return i;
  };
  function LoginViewModel$onClickLogin$slambda_0(this$0, $username, $password, resultContinuation) {
    var i = new LoginViewModel$onClickLogin$slambda(this$0, $username, $password, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function LoginViewModel$onClickConnectAsGuest$slambda(this$0, resultContinuation) {
    this.ow4_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(LoginViewModel$onClickConnectAsGuest$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(LoginViewModel$onClickConnectAsGuest$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(LoginViewModel$onClickConnectAsGuest$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.ow4_1.bp2().emy(this.ow4_1.gw2_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var guestPerson = suspendResult;
            goToNextDestAfterLoginOrGuestSelected(this.ow4_1, guestPerson.kmk_1.f95_1);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(LoginViewModel$onClickConnectAsGuest$slambda).v1m = function ($this$launch, completion) {
    var i = new LoginViewModel$onClickConnectAsGuest$slambda(this.ow4_1, completion);
    i.pw4_1 = $this$launch;
    return i;
  };
  function LoginViewModel$onClickConnectAsGuest$slambda_0(this$0, resultContinuation) {
    var i = new LoginViewModel$onClickConnectAsGuest$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function LoginViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'Login');
    this.dw2_1 = MutableStateFlow(new LoginUiState());
    this.ew2_1 = asStateFlow(this.dw2_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UstadMobileSystemImpl), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.hw2_1 = Instance(this, tmp$ret$0, null).n5c(this, impl$factory());
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.iw2_1 = Instance(this, tmp$ret$2, null).n5c(this, httpClient$factory_7());
    var tmp_3 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(ApiUrlConfig), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    tmp_3.jw2_1 = Instance(this, tmp$ret$4, null).n5c(this, apiUrlConfig$factory_3());
    this.kw2_1 = null;
    var tmp_5 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(SetLanguageUseCase), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    tmp_5.lw2_1 = Instance(this, tmp$ret$6, null).n5c(this, setLanguageUseCase$factory());
    var tmp_7 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_8 = typeToken(createKType(getKClass(SupportedLanguagesConfig), arrayOf([]), false));
    var tmp$ret$8 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
    tmp_7.mw2_1 = Instance(this, tmp$ret$8, null).n5c(this, languagesConfig$factory());
    var tmp_9 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_10 = typeToken(createKType(getKClass(GetVersionUseCase), arrayOf([]), false));
    var tmp$ret$10 = isInterface(tmp_10, TypeToken) ? tmp_10 : THROW_CCE();
    tmp_9.nw2_1 = InstanceOrNull(this, tmp$ret$10, null).n5c(this, getVersionUseCase$factory_1());
    var tmp_11 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_12 = typeToken(createKType(getKClass(GetShowPoweredByUseCase), arrayOf([]), false));
    var tmp$ret$12 = isInterface(tmp_12, TypeToken) ? tmp_12 : THROW_CCE();
    tmp_11.ow2_1 = InstanceOrNull(this, tmp$ret$12, null).n5c(this, getShowPoweredByUseCase$factory_1());
    var tmp_13 = this;
    Companion_getInstance_112();
    var tmp0_safe_receiver = savedStateHandle.ba('noSessionChange');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toBoolean(tmp0_safe_receiver);
    tmp_13.pw2_1 = tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;
    var tmp_14 = this;
    Companion_getInstance_102();
    var tmp0_elvis_lhs = savedStateHandle.ba('next');
    var tmp_15;
    if (tmp0_elvis_lhs == null) {
      Companion_getInstance_122();
      tmp_15 = 'CourseListHome';
    } else {
      tmp_15 = tmp0_elvis_lhs;
    }
    tmp_14.fw2_1 = tmp_15;
    var tmp_16 = this;
    Companion_getInstance_102();
    var tmp1_elvis_lhs_0 = savedStateHandle.ba('serverUrl');
    var tmp2_elvis_lhs = tmp1_elvis_lhs_0 == null ? _get_apiUrlConfig__mldllg_1(this).smx_1 : tmp1_elvis_lhs_0;
    tmp_16.gw2_1 = tmp2_elvis_lhs == null ? 'http://localhost' : tmp2_elvis_lhs;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.dw2_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.<anonymous>' call
        var tmp_17 = this.jp2().en6(strings_getInstance().jmf_1) + ': ';
        var tmp0_safe_receiver_0 = _get_getVersionUseCase__n7x57g_0(this);
        var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.lnz();
        var tmp_18 = tmp_17 + (tmp1_safe_receiver == null ? null : tmp1_safe_receiver.jnz_1);
        Companion_getInstance_102();
        var tmp_19 = savedStateHandle.ba('intMsg');
        var tmp_20 = _get_languagesConfig__hebcss(this).aon(this.jp2());
        var tmp_21 = _get_languagesConfig__hebcss(this).bon(this.jp2());
        var tmp2_safe_receiver = _get_getShowPoweredByUseCase__5l0p0e_0(this);
        var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.lnz();
        var nextValue = prevValue.ew3(VOID, VOID, VOID, VOID, VOID, tmp_18, VOID, VOID, tmp_19, VOID, tmp_20, tmp_21, VOID, tmp3_elvis_lhs == null ? false : tmp3_elvis_lhs);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp3_title = _get_impl__d88w17(this).en6(strings_getInstance().clc_1);
    var baseAppUiState = new AppUiState(VOID, VOID, tmp3_title, false, VOID, VOID, false);
    this.gw2_1 = requirePostfix(this.gw2_1, '/');
    Companion_getInstance_102();
    var siteJsonStr = savedStateHandle.ba('site');
    if (!(siteJsonStr == null)) {
      this.pp1_1.x1k(baseAppUiState);
      // Inline function 'kotlinx.serialization.json.Json.decodeFromString' call
      var this_1 = this.z4q();
      // Inline function 'kotlinx.serialization.serializer' call
      var this_2 = this_1.g45();
      // Inline function 'kotlinx.serialization.internal.cast' call
      var this_3 = serializer(this_2, createKType(getKClass(Site), arrayOf([]), false));
      var tmp$ret$17 = isInterface(this_3, KSerializer) ? this_3 : THROW_CCE();
      var tmp$ret$18 = this_1.f45(tmp$ret$17, siteJsonStr);
      onSiteVerified(this, tmp$ret$18);
    } else {
      $l$block_0: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_4 = this.dw2_1;
        while (true) {
          var prevValue_0 = this_4.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.<anonymous>' call
          var nextValue_0 = prevValue_0.ew3(VOID, VOID, false);
          if (this_4.y1k(prevValue_0, nextValue_0)) {
            break $l$block_0;
          }
        }
      }
      this.pp1_1.x1k(baseAppUiState.nol(VOID, Companion_getInstance_85().uol_1));
      var tmp_22 = this.cp2();
      launch(tmp_22, VOID, VOID, LoginViewModel$slambda_0(this, null));
    }
  }
  protoOf(LoginViewModel).qw4 = function (username) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.dw2_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.onUsernameChanged.<anonymous>' call
        var nextValue = prevValue.ew3(username);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(LoginViewModel).rw4 = function (password) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.dw2_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.onPasswordChanged.<anonymous>' call
        var nextValue = prevValue.ew3(VOID, password);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(LoginViewModel).sw4 = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.dw2_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.onClickLogin.<anonymous>' call
        // Inline function 'kotlin.text.trim' call
        var this_1 = prevValue.qw2_1;
        var tmp0_username = toString(trim(isCharSequence(this_1) ? this_1 : THROW_CCE()));
        // Inline function 'kotlin.text.trim' call
        var this_2 = prevValue.rw2_1;
        var tmp1_password = toString(trim(isCharSequence(this_2) ? this_2 : THROW_CCE()));
        var nextValue = prevValue.ew3(tmp0_username, tmp1_password, false, null, null);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var username = this.dw2_1.t2().qw2_1;
    var password = this.dw2_1.t2().rw2_1;
    var tmp;
    // Inline function 'kotlin.text.isNotEmpty' call
    if (charSequenceLength(username) > 0) {
      // Inline function 'kotlin.text.isNotEmpty' call
      tmp = charSequenceLength(password) > 0;
    } else {
      tmp = false;
    }
    if (tmp) {
      this.lp2(Companion_getInstance_85().uol_1);
      var tmp_0 = this.cp2();
      launch(tmp_0, VOID, VOID, LoginViewModel$onClickLogin$slambda_0(this, username, password, null));
    } else {
      this.lp2(Companion_getInstance_85().vol_1);
      $l$block_0: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_3 = this.dw2_1;
        while (true) {
          var prevValue_0 = this_3.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.onClickLogin.<anonymous>' call
          var tmp_1;
          // Inline function 'kotlin.text.isEmpty' call
          var this_4 = prevValue_0.qw2_1;
          if (charSequenceLength(this_4) === 0) {
            tmp_1 = _get_impl__d88w17(this).en6(strings_getInstance().blh_1);
          } else {
            tmp_1 = null;
          }
          var tmp_2 = tmp_1;
          var tmp_3;
          // Inline function 'kotlin.text.isEmpty' call
          var this_5 = prevValue_0.rw2_1;
          if (charSequenceLength(this_5) === 0) {
            tmp_3 = _get_impl__d88w17(this).en6(strings_getInstance().blh_1);
          } else {
            tmp_3 = null;
          }
          var nextValue_0 = prevValue_0.ew3(VOID, VOID, true, tmp_2, tmp_3);
          if (this_3.y1k(prevValue_0, nextValue_0)) {
            break $l$block_0;
          }
        }
      }
    }
  };
  protoOf(LoginViewModel).tw4 = function () {
    Companion_getInstance_102();
    var tmp = to('serverUrl', this.gw2_1);
    var tmp_0 = to('showAccept', 'true');
    Companion_getInstance_102();
    Companion_getInstance_102();
    var tmp0_elvis_lhs = this.lp1_1.ba('popUpToOnFinish');
    var args = mutableMapOf([tmp, tmp_0, to('popUpToOnFinish', tmp0_elvis_lhs == null ? 'Login' : tmp0_elvis_lhs)]);
    this.xp2(args, Companion_getInstance_179().ew5_1);
    this.np1_1.sns('RegisterAgeRedirect', args);
  };
  protoOf(LoginViewModel).gw5 = function (uiLanguage) {
    if (!uiLanguage.equals(this.dw2_1.t2().aw3_1)) {
      var tmp = _get_setLanguageUseCase__st7nci(this);
      // Inline function 'kotlin.collections.buildMap' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'kotlin.collections.buildMapInternal' call
      // Inline function 'kotlin.apply' call
      var this_0 = LinkedHashMap_init_$Create$();
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.onChangeLanguage.<anonymous>' call
      Companion_getInstance_102();
      this.wp2(this_0, 'next');
      Companion_getInstance_102();
      this.wp2(this_0, 'serverUrl');
      Companion_getInstance_102();
      this.wp2(this_0, 'site');
      var tmp$ret$2 = this_0.f3();
      var result = tmp.vnz(uiLanguage, 'Login', this.np1_1, tmp$ret$2);
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_1 = this.dw2_1;
        while (true) {
          var prevValue = this_1.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.login.LoginViewModel.onChangeLanguage.<anonymous>' call
          var nextValue = prevValue.ew3(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, uiLanguage, VOID, result.unz_1);
          if (this_1.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    }
  };
  protoOf(LoginViewModel).hw5 = function () {
    var tmp = this.cp2();
    launch(tmp, VOID, VOID, LoginViewModel$onClickConnectAsGuest$slambda_0(this, null));
  };
  function LoginUiState(username, password, fieldsEnabled, usernameError, passwordError, versionInfo, createAccountVisible, connectAsGuestVisible, loginIntentMessage, errorMessage, currentLanguage, languageList, showWaitForRestart, showPoweredBy) {
    username = username === VOID ? '' : username;
    password = password === VOID ? '' : password;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    usernameError = usernameError === VOID ? null : usernameError;
    passwordError = passwordError === VOID ? null : passwordError;
    versionInfo = versionInfo === VOID ? 'v42' : versionInfo;
    createAccountVisible = createAccountVisible === VOID ? false : createAccountVisible;
    connectAsGuestVisible = connectAsGuestVisible === VOID ? false : connectAsGuestVisible;
    loginIntentMessage = loginIntentMessage === VOID ? null : loginIntentMessage;
    errorMessage = errorMessage === VOID ? null : errorMessage;
    currentLanguage = currentLanguage === VOID ? new UiLanguage('en', 'English') : currentLanguage;
    languageList = languageList === VOID ? listOf_0(currentLanguage) : languageList;
    showWaitForRestart = showWaitForRestart === VOID ? false : showWaitForRestart;
    showPoweredBy = showPoweredBy === VOID ? false : showPoweredBy;
    this.qw2_1 = username;
    this.rw2_1 = password;
    this.sw2_1 = fieldsEnabled;
    this.tw2_1 = usernameError;
    this.uw2_1 = passwordError;
    this.vw2_1 = versionInfo;
    this.ww2_1 = createAccountVisible;
    this.xw2_1 = connectAsGuestVisible;
    this.yw2_1 = loginIntentMessage;
    this.zw2_1 = errorMessage;
    this.aw3_1 = currentLanguage;
    this.bw3_1 = languageList;
    this.cw3_1 = showWaitForRestart;
    this.dw3_1 = showPoweredBy;
  }
  protoOf(LoginUiState).iw5 = function (username, password, fieldsEnabled, usernameError, passwordError, versionInfo, createAccountVisible, connectAsGuestVisible, loginIntentMessage, errorMessage, currentLanguage, languageList, showWaitForRestart, showPoweredBy) {
    return new LoginUiState(username, password, fieldsEnabled, usernameError, passwordError, versionInfo, createAccountVisible, connectAsGuestVisible, loginIntentMessage, errorMessage, currentLanguage, languageList, showWaitForRestart, showPoweredBy);
  };
  protoOf(LoginUiState).ew3 = function (username, password, fieldsEnabled, usernameError, passwordError, versionInfo, createAccountVisible, connectAsGuestVisible, loginIntentMessage, errorMessage, currentLanguage, languageList, showWaitForRestart, showPoweredBy, $super) {
    username = username === VOID ? this.qw2_1 : username;
    password = password === VOID ? this.rw2_1 : password;
    fieldsEnabled = fieldsEnabled === VOID ? this.sw2_1 : fieldsEnabled;
    usernameError = usernameError === VOID ? this.tw2_1 : usernameError;
    passwordError = passwordError === VOID ? this.uw2_1 : passwordError;
    versionInfo = versionInfo === VOID ? this.vw2_1 : versionInfo;
    createAccountVisible = createAccountVisible === VOID ? this.ww2_1 : createAccountVisible;
    connectAsGuestVisible = connectAsGuestVisible === VOID ? this.xw2_1 : connectAsGuestVisible;
    loginIntentMessage = loginIntentMessage === VOID ? this.yw2_1 : loginIntentMessage;
    errorMessage = errorMessage === VOID ? this.zw2_1 : errorMessage;
    currentLanguage = currentLanguage === VOID ? this.aw3_1 : currentLanguage;
    languageList = languageList === VOID ? this.bw3_1 : languageList;
    showWaitForRestart = showWaitForRestart === VOID ? this.cw3_1 : showWaitForRestart;
    showPoweredBy = showPoweredBy === VOID ? this.dw3_1 : showPoweredBy;
    return $super === VOID ? this.iw5(username, password, fieldsEnabled, usernameError, passwordError, versionInfo, createAccountVisible, connectAsGuestVisible, loginIntentMessage, errorMessage, currentLanguage, languageList, showWaitForRestart, showPoweredBy) : $super.iw5.call(this, username, password, fieldsEnabled, usernameError, passwordError, versionInfo, createAccountVisible, connectAsGuestVisible, loginIntentMessage, errorMessage, currentLanguage, languageList, showWaitForRestart, showPoweredBy);
  };
  protoOf(LoginUiState).toString = function () {
    return 'LoginUiState(username=' + this.qw2_1 + ', password=' + this.rw2_1 + ', fieldsEnabled=' + this.sw2_1 + ', usernameError=' + this.tw2_1 + ', passwordError=' + this.uw2_1 + ', versionInfo=' + this.vw2_1 + ', createAccountVisible=' + this.ww2_1 + ', connectAsGuestVisible=' + this.xw2_1 + ', loginIntentMessage=' + this.yw2_1 + ', errorMessage=' + this.zw2_1 + ', currentLanguage=' + this.aw3_1 + ', languageList=' + this.bw3_1 + ', showWaitForRestart=' + this.cw3_1 + ', showPoweredBy=' + this.dw3_1 + ')';
  };
  protoOf(LoginUiState).hashCode = function () {
    var result = getStringHashCode(this.qw2_1);
    result = imul(result, 31) + getStringHashCode(this.rw2_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.sw2_1) | 0;
    result = imul(result, 31) + (this.tw2_1 == null ? 0 : getStringHashCode(this.tw2_1)) | 0;
    result = imul(result, 31) + (this.uw2_1 == null ? 0 : getStringHashCode(this.uw2_1)) | 0;
    result = imul(result, 31) + getStringHashCode(this.vw2_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ww2_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.xw2_1) | 0;
    result = imul(result, 31) + (this.yw2_1 == null ? 0 : getStringHashCode(this.yw2_1)) | 0;
    result = imul(result, 31) + (this.zw2_1 == null ? 0 : getStringHashCode(this.zw2_1)) | 0;
    result = imul(result, 31) + this.aw3_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.bw3_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.cw3_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.dw3_1) | 0;
    return result;
  };
  protoOf(LoginUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof LoginUiState))
      return false;
    var tmp0_other_with_cast = other instanceof LoginUiState ? other : THROW_CCE();
    if (!(this.qw2_1 === tmp0_other_with_cast.qw2_1))
      return false;
    if (!(this.rw2_1 === tmp0_other_with_cast.rw2_1))
      return false;
    if (!(this.sw2_1 === tmp0_other_with_cast.sw2_1))
      return false;
    if (!(this.tw2_1 == tmp0_other_with_cast.tw2_1))
      return false;
    if (!(this.uw2_1 == tmp0_other_with_cast.uw2_1))
      return false;
    if (!(this.vw2_1 === tmp0_other_with_cast.vw2_1))
      return false;
    if (!(this.ww2_1 === tmp0_other_with_cast.ww2_1))
      return false;
    if (!(this.xw2_1 === tmp0_other_with_cast.xw2_1))
      return false;
    if (!(this.yw2_1 == tmp0_other_with_cast.yw2_1))
      return false;
    if (!(this.zw2_1 == tmp0_other_with_cast.zw2_1))
      return false;
    if (!this.aw3_1.equals(tmp0_other_with_cast.aw3_1))
      return false;
    if (!equals(this.bw3_1, tmp0_other_with_cast.bw3_1))
      return false;
    if (!(this.cw3_1 === tmp0_other_with_cast.cw3_1))
      return false;
    if (!(this.dw3_1 === tmp0_other_with_cast.dw3_1))
      return false;
    return true;
  };
  function impl$factory() {
    return getPropertyCallableRef('impl', 1, KProperty1, function (receiver) {
      return _get_impl__d88w17(receiver);
    }, null);
  }
  function httpClient$factory_7() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_3(receiver);
    }, null);
  }
  function apiUrlConfig$factory_3() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_1(receiver);
    }, null);
  }
  function setLanguageUseCase$factory() {
    return getPropertyCallableRef('setLanguageUseCase', 1, KProperty1, function (receiver) {
      return _get_setLanguageUseCase__st7nci(receiver);
    }, null);
  }
  function languagesConfig$factory() {
    return getPropertyCallableRef('languagesConfig', 1, KProperty1, function (receiver) {
      return _get_languagesConfig__hebcss(receiver);
    }, null);
  }
  function getVersionUseCase$factory_1() {
    return getPropertyCallableRef('getVersionUseCase', 1, KProperty1, function (receiver) {
      return _get_getVersionUseCase__n7x57g_0(receiver);
    }, null);
  }
  function getShowPoweredByUseCase$factory_1() {
    return getPropertyCallableRef('getShowPoweredByUseCase', 1, KProperty1, function (receiver) {
      return _get_getShowPoweredByUseCase__5l0p0e_0(receiver);
    }, null);
  }
  function impl$factory_0() {
    return getPropertyCallableRef('impl', 1, KProperty1, function (receiver) {
      return _get_impl__d88w17(receiver);
    }, null);
  }
  function httpClient$factory_8() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_3(receiver);
    }, null);
  }
  function apiUrlConfig$factory_4() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_1(receiver);
    }, null);
  }
  function setLanguageUseCase$factory_0() {
    return getPropertyCallableRef('setLanguageUseCase', 1, KProperty1, function (receiver) {
      return _get_setLanguageUseCase__st7nci(receiver);
    }, null);
  }
  function languagesConfig$factory_0() {
    return getPropertyCallableRef('languagesConfig', 1, KProperty1, function (receiver) {
      return _get_languagesConfig__hebcss(receiver);
    }, null);
  }
  function getVersionUseCase$factory_2() {
    return getPropertyCallableRef('getVersionUseCase', 1, KProperty1, function (receiver) {
      return _get_getVersionUseCase__n7x57g_0(receiver);
    }, null);
  }
  function getShowPoweredByUseCase$factory_2() {
    return getPropertyCallableRef('getShowPoweredByUseCase', 1, KProperty1, function (receiver) {
      return _get_getShowPoweredByUseCase__5l0p0e_0(receiver);
    }, null);
  }
  function daysUntil_0(_this__u8e3s4, other) {
    return daysUntil(Companion_getInstance_6().zla(_this__u8e3s4.sf6_1), Companion_getInstance_6().zla(other.sf6_1), Companion_getInstance_9().rlb());
  }
  function Companion_152() {
    Companion_instance_200 = this;
    this.jw5_1 = 'ConversationList';
    this.kw5_1 = 'ConversationListHome';
    this.lw5_1 = listOf(['ConversationList', 'ConversationListHome']);
  }
  var Companion_instance_200;
  function Companion_getInstance_169() {
    if (Companion_instance_200 == null)
      new Companion_152();
    return Companion_instance_200;
  }
  function ConversationListViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.fp2().s7e().yf5(toQueryLikeParam(this$0.pp1_1.t2().fol_1.uok_1), this$0.dp2());
    };
  }
  function ConversationListViewModel$onClickAdd$ref($boundThis) {
    var l = function () {
      $boundThis.bpb();
      return Unit_instance;
    };
    l.callableName = 'onClickAdd';
    return l;
  }
  function ConversationListViewModel(di, savedStateHandle, destinationName) {
    Companion_getInstance_169();
    destinationName = destinationName === VOID ? 'ConversationList' : destinationName;
    UstadListViewModel.call(this, di, savedStateHandle, new ConversationListUiState(), destinationName);
    var tmp = this;
    tmp.mw6_1 = ConversationListViewModel$pagingSourceFactory$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.gpa_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.message.conversationlist.ConversationListViewModel.<anonymous>' call
        // Inline function 'kotlin.collections.associateWith' call
        var this_1 = values();
        var result = LinkedHashMap_init_$Create$_0(coerceAtLeast(mapCapacity(this_1.length), 16));
        // Inline function 'kotlin.collections.associateWithTo' call
        var inductionVariable = 0;
        var last = this_1.length;
        while (inductionVariable < last) {
          var element = this_1[inductionVariable];
          inductionVariable = inductionVariable + 1 | 0;
          // Inline function 'com.ustadmobile.core.viewmodel.message.conversationlist.ConversationListViewModel.<anonymous>.<anonymous>' call
          var tmp$ret$0 = this.jp2().en6(get_dayStringResource(element));
          result.s(element, tmp$ret$0);
        }
        var tmp1_conversations = this.mw6_1;
        var nextValue = prevValue.sw6(tmp1_conversations, VOID, VOID, VOID, result);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.pp1_1;
      while (true) {
        var prevValue_0 = this_2.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.message.conversationlist.ConversationListViewModel.<anonymous>' call
        var tmp0_searchState = this.ppb();
        var tmp1_title = this.xpb(strings_getInstance().imb_1, strings_getInstance().fme_1);
        var tmp_0 = this.jp2().en6(strings_getInstance().jmb_1);
        var tmp_1 = FabIcon_ADD_getInstance();
        var tmp2_fabState = new FabUiState(true, tmp_0, tmp_1, ConversationListViewModel$onClickAdd$ref(this));
        var nextValue_0 = prevValue_0.nol(tmp2_fabState, VOID, tmp1_title, true, VOID, VOID, VOID, tmp0_searchState);
        if (this_2.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
  }
  protoOf(ConversationListViewModel).apb = function (searchText) {
    this.ipa_1.i1h(new RefreshCommand());
  };
  protoOf(ConversationListViewModel).bpb = function () {
    Companion_getInstance_180();
    var tmp = to('goToOnPersonSelected', 'MessageList');
    Companion_getInstance_102();
    var tmp_0 = to('listMode', ListViewMode_PICKER_getInstance().ooy_1);
    Companion_getInstance_180();
    var tmp_1 = to('excludeAlreadySelectedList', this.dp2().toString());
    Companion_getInstance_180();
    this.np1_1.sns('People', mapOf([tmp, tmp_0, tmp_1, to('popUpToOnPersonSelected', 'People')]));
  };
  protoOf(ConversationListViewModel).tw6 = function (entry) {
    Companion_getInstance_102();
    var tmp0_safe_receiver = entry.uf7_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.f95_1;
    this.np1_1.sns('MessageList', mapOf_0(to('personUid', (tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs).toString())));
  };
  function ConversationListUiState$_init_$lambda_uo1nhr() {
    return new EmptyPagingSource();
  }
  function ConversationListUiState(conversations, sortOptions, showAddItem, localDateTimeNow, dayOfWeekStrings) {
    var tmp;
    if (conversations === VOID) {
      tmp = ConversationListUiState$_init_$lambda_uo1nhr;
    } else {
      tmp = conversations;
    }
    conversations = tmp;
    sortOptions = sortOptions === VOID ? emptyList() : sortOptions;
    showAddItem = showAddItem === VOID ? false : showAddItem;
    localDateTimeNow = localDateTimeNow === VOID ? toLocalDateTime(System_instance.sl7(), Companion_getInstance_9().rlb()) : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? emptyMap() : dayOfWeekStrings;
    this.nw6_1 = conversations;
    this.ow6_1 = sortOptions;
    this.pw6_1 = showAddItem;
    this.qw6_1 = localDateTimeNow;
    this.rw6_1 = dayOfWeekStrings;
  }
  protoOf(ConversationListUiState).uw6 = function (conversations, sortOptions, showAddItem, localDateTimeNow, dayOfWeekStrings) {
    return new ConversationListUiState(conversations, sortOptions, showAddItem, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(ConversationListUiState).sw6 = function (conversations, sortOptions, showAddItem, localDateTimeNow, dayOfWeekStrings, $super) {
    conversations = conversations === VOID ? this.nw6_1 : conversations;
    sortOptions = sortOptions === VOID ? this.ow6_1 : sortOptions;
    showAddItem = showAddItem === VOID ? this.pw6_1 : showAddItem;
    localDateTimeNow = localDateTimeNow === VOID ? this.qw6_1 : localDateTimeNow;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? this.rw6_1 : dayOfWeekStrings;
    return $super === VOID ? this.uw6(conversations, sortOptions, showAddItem, localDateTimeNow, dayOfWeekStrings) : $super.uw6.call(this, conversations, sortOptions, showAddItem, localDateTimeNow, dayOfWeekStrings);
  };
  protoOf(ConversationListUiState).toString = function () {
    return 'ConversationListUiState(conversations=' + this.nw6_1 + ', sortOptions=' + this.ow6_1 + ', showAddItem=' + this.pw6_1 + ', localDateTimeNow=' + this.qw6_1 + ', dayOfWeekStrings=' + this.rw6_1 + ')';
  };
  protoOf(ConversationListUiState).hashCode = function () {
    var result = hashCode(this.nw6_1);
    result = imul(result, 31) + hashCode(this.ow6_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.pw6_1) | 0;
    result = imul(result, 31) + this.qw6_1.hashCode() | 0;
    result = imul(result, 31) + hashCode(this.rw6_1) | 0;
    return result;
  };
  protoOf(ConversationListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ConversationListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ConversationListUiState ? other : THROW_CCE();
    if (!equals(this.nw6_1, tmp0_other_with_cast.nw6_1))
      return false;
    if (!equals(this.ow6_1, tmp0_other_with_cast.ow6_1))
      return false;
    if (!(this.pw6_1 === tmp0_other_with_cast.pw6_1))
      return false;
    if (!this.qw6_1.equals(tmp0_other_with_cast.qw6_1))
      return false;
    if (!equals(this.rw6_1, tmp0_other_with_cast.rw6_1))
      return false;
    return true;
  };
  function MessageListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.dw7_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(MessageListViewModel$slambda$slambda$slambda).xn9 = function (it, $completion) {
    var tmp = this.yn9(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(MessageListViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.xn9((p1 == null ? true : p1 instanceof PersonNames) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(MessageListViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.dw7_1.pp1_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp0_safe_receiver = this.ew7_1;
              var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ofr_1;
              var tmp_0 = tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs;
              var tmp2_safe_receiver = this.ew7_1;
              var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.pfr_1;
              var nextValue = prevValue.nol(VOID, VOID, tmp_0 + ' ' + (tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs));
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(MessageListViewModel$slambda$slambda$slambda).yn9 = function (it, completion) {
    var i = new MessageListViewModel$slambda$slambda$slambda(this.dw7_1, completion);
    i.ew7_1 = it;
    return i;
  };
  function MessageListViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new MessageListViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.xn9(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function MessageListViewModel$slambda$slambda(this$0, resultContinuation) {
    this.nw7_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(MessageListViewModel$slambda$slambda).m86 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(MessageListViewModel$slambda$slambda).z77 = function ($completion) {
    return this.m86($completion);
  };
  protoOf(MessageListViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.nw7_1.fp2().a7d().wfn(this.nw7_1.ow8_1);
            var tmp_1 = MessageListViewModel$slambda$slambda$slambda_0(this.nw7_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_29(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(MessageListViewModel$slambda$slambda).y77 = function (completion) {
    return new MessageListViewModel$slambda$slambda(this.nw7_1, completion);
  };
  function MessageListViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new MessageListViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.m86($completion);
    };
    l.$arity = 0;
    return l;
  }
  function Companion_153() {
    this.qw8_1 = 'MessageList';
  }
  var Companion_instance_201;
  function Companion_getInstance_170() {
    return Companion_instance_201;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_29(function_0) {
    this.rw8_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_29).t1d = function (value, $completion) {
    return this.rw8_1(value, $completion);
  };
  function MessageListViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.fp2().s7e().xf5(this$0.dp2(), this$0.ow8_1);
    };
  }
  function MessageListViewModel$slambda(this$0, resultContinuation) {
    this.aw9_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(MessageListViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(MessageListViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(MessageListViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.aw9_1.gpa_1, MessageListViewModel$slambda$slambda_0(this.aw9_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(MessageListViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new MessageListViewModel$slambda(this.aw9_1, completion);
    i.bw9_1 = $this$launch;
    return i;
  };
  function MessageListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new MessageListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function MessageListViewModel$onClickSend$slambda(this$0, resultContinuation) {
    this.kw9_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(MessageListViewModel$onClickSend$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(MessageListViewModel$onClickSend$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(MessageListViewModel$onClickSend$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.kw9_1.fp2().s7e();
            var tmp0_messageSenderPersonUid = this.kw9_1.dp2();
            var this_0 = this.kw9_1.gpa_1.t2().ow9_1;
            var tmp1_messageText = toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
            var tmp2_messageToPersonUid = this.kw9_1.ow8_1;
            var tmp3_messageTimestamp = systemTimeInMillis();
            suspendResult = tmp_0.zf5(new Message(VOID, tmp0_messageSenderPersonUid, tmp2_messageToPersonUid, tmp1_messageText, tmp3_messageTimestamp), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_1 = this.kw9_1.gpa_1;
              while (true) {
                var prevValue = this_1.t2();
                var nextValue = prevValue.rw9(VOID, VOID, '');
                if (this_1.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(MessageListViewModel$onClickSend$slambda).v1m = function ($this$launch, completion) {
    var i = new MessageListViewModel$onClickSend$slambda(this.kw9_1, completion);
    i.lw9_1 = $this$launch;
    return i;
  };
  function MessageListViewModel$onClickSend$slambda_0(this$0, resultContinuation) {
    var i = new MessageListViewModel$onClickSend$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function MessageListViewModel(di, savedStateHandle, destinationName) {
    destinationName = destinationName === VOID ? 'MessageList' : destinationName;
    UstadListViewModel.call(this, di, savedStateHandle, new MessageListUiState(), destinationName);
    var tmp = this;
    Companion_getInstance_102();
    var tmp0_safe_receiver = savedStateHandle.ba('personUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.ow8_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    tmp_0.pw8_1 = MessageListViewModel$pagingSourceFactory$lambda(this);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.pp1_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.message.messagelist.MessageListViewModel.<anonymous>' call
        var nextValue = prevValue.nol(VOID, VOID, VOID, true, true, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.gpa_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.message.messagelist.MessageListViewModel.<anonymous>' call
        // Inline function 'kotlin.collections.associateWith' call
        var this_2 = values();
        var result = LinkedHashMap_init_$Create$_0(coerceAtLeast(mapCapacity(this_2.length), 16));
        // Inline function 'kotlin.collections.associateWithTo' call
        var inductionVariable = 0;
        var last = this_2.length;
        while (inductionVariable < last) {
          var element = this_2[inductionVariable];
          inductionVariable = inductionVariable + 1 | 0;
          // Inline function 'com.ustadmobile.core.viewmodel.message.messagelist.MessageListViewModel.<anonymous>.<anonymous>' call
          var tmp$ret$2 = this.jp2().en6(get_dayStringResource(element));
          result.s(element, tmp$ret$2);
        }
        var tmp1_messages = this.pw8_1;
        var tmp2_activePersonUid = this.dp2();
        var nextValue_0 = prevValue_0.rw9(tmp1_messages, tmp2_activePersonUid, VOID, result);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_1 = this.cp2();
    launch(tmp_1, VOID, VOID, MessageListViewModel$slambda_0(this, null));
  }
  protoOf(MessageListViewModel).apb = function (searchText) {
    // Inline function 'kotlin.TODO' call
    var reason = 'Not yet implemented';
    throw new NotImplementedError('An operation is not implemented: ' + reason);
  };
  protoOf(MessageListViewModel).bpb = function () {
  };
  protoOf(MessageListViewModel).sw9 = function (text) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.gpa_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.message.messagelist.MessageListViewModel.onChangeNewMessageText.<anonymous>' call
        var nextValue = prevValue.rw9(VOID, VOID, text);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(MessageListViewModel).tw9 = function () {
    var tmp = this.cp2();
    launch(tmp, VOID, VOID, MessageListViewModel$onClickSend$slambda_0(this, null));
  };
  function MessageListUiState$_init_$lambda_mkfto3() {
    return new EmptyPagingSource();
  }
  function MessageListUiState(messages, activePersonUid, newMessageText, dayOfWeekStrings, localDateTimeNow) {
    var tmp;
    if (messages === VOID) {
      tmp = MessageListUiState$_init_$lambda_mkfto3;
    } else {
      tmp = messages;
    }
    messages = tmp;
    activePersonUid = activePersonUid === VOID ? new Long(0, 0) : activePersonUid;
    newMessageText = newMessageText === VOID ? '' : newMessageText;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? emptyMap() : dayOfWeekStrings;
    localDateTimeNow = localDateTimeNow === VOID ? toLocalDateTime(System_instance.sl7(), Companion_getInstance_9().rlb()) : localDateTimeNow;
    this.mw9_1 = messages;
    this.nw9_1 = activePersonUid;
    this.ow9_1 = newMessageText;
    this.pw9_1 = dayOfWeekStrings;
    this.qw9_1 = localDateTimeNow;
  }
  protoOf(MessageListUiState).uw9 = function (messages, activePersonUid, newMessageText, dayOfWeekStrings, localDateTimeNow) {
    return new MessageListUiState(messages, activePersonUid, newMessageText, dayOfWeekStrings, localDateTimeNow);
  };
  protoOf(MessageListUiState).rw9 = function (messages, activePersonUid, newMessageText, dayOfWeekStrings, localDateTimeNow, $super) {
    messages = messages === VOID ? this.mw9_1 : messages;
    activePersonUid = activePersonUid === VOID ? this.nw9_1 : activePersonUid;
    newMessageText = newMessageText === VOID ? this.ow9_1 : newMessageText;
    dayOfWeekStrings = dayOfWeekStrings === VOID ? this.pw9_1 : dayOfWeekStrings;
    localDateTimeNow = localDateTimeNow === VOID ? this.qw9_1 : localDateTimeNow;
    return $super === VOID ? this.uw9(messages, activePersonUid, newMessageText, dayOfWeekStrings, localDateTimeNow) : $super.uw9.call(this, messages, activePersonUid, newMessageText, dayOfWeekStrings, localDateTimeNow);
  };
  protoOf(MessageListUiState).toString = function () {
    return 'MessageListUiState(messages=' + this.mw9_1 + ', activePersonUid=' + this.nw9_1.toString() + ', newMessageText=' + this.ow9_1 + ', dayOfWeekStrings=' + this.pw9_1 + ', localDateTimeNow=' + this.qw9_1 + ')';
  };
  protoOf(MessageListUiState).hashCode = function () {
    var result = hashCode(this.mw9_1);
    result = imul(result, 31) + this.nw9_1.hashCode() | 0;
    result = imul(result, 31) + getStringHashCode(this.ow9_1) | 0;
    result = imul(result, 31) + hashCode(this.pw9_1) | 0;
    result = imul(result, 31) + this.qw9_1.hashCode() | 0;
    return result;
  };
  protoOf(MessageListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof MessageListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof MessageListUiState ? other : THROW_CCE();
    if (!equals(this.mw9_1, tmp0_other_with_cast.mw9_1))
      return false;
    if (!this.nw9_1.equals(tmp0_other_with_cast.nw9_1))
      return false;
    if (!(this.ow9_1 === tmp0_other_with_cast.ow9_1))
      return false;
    if (!equals(this.pw9_1, tmp0_other_with_cast.pw9_1))
      return false;
    if (!this.qw9_1.equals(tmp0_other_with_cast.qw9_1))
      return false;
    return true;
  };
  function TitleAndLangCode(title, langCode) {
    this.vw9_1 = title;
    this.ww9_1 = langCode;
  }
  protoOf(TitleAndLangCode).toString = function () {
    return 'TitleAndLangCode(title=' + this.vw9_1 + ', langCode=' + this.ww9_1 + ')';
  };
  protoOf(TitleAndLangCode).hashCode = function () {
    var result = getStringHashCode(this.vw9_1);
    result = imul(result, 31) + getStringHashCode(this.ww9_1) | 0;
    return result;
  };
  protoOf(TitleAndLangCode).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof TitleAndLangCode))
      return false;
    var tmp0_other_with_cast = other instanceof TitleAndLangCode ? other : THROW_CCE();
    if (!(this.vw9_1 === tmp0_other_with_cast.vw9_1))
      return false;
    if (!(this.ww9_1 === tmp0_other_with_cast.ww9_1))
      return false;
    return true;
  };
  function _get_statementRecorder__l4o9jw($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.cw1_1;
    statementRecorder$factory();
    return this_0.t2();
  }
  function AbstractNonInteractiveContentViewModel$statementRecorder$delegate$lambda$lambda(this$0) {
    return function () {
      var titleAndLangCodeVal = this$0.yvz();
      var tmp = this$0.bw1_1.oix_1;
      var tmp_0;
      if (!(titleAndLangCodeVal == null)) {
        tmp_0 = mapOf_0(to(titleAndLangCodeVal.ww9_1, titleAndLangCodeVal.vw9_1));
      } else {
        tmp_0 = null;
      }
      return new XapiActivityStatementObject(VOID, tmp, new XapiActivity(tmp_0));
    };
  }
  function AbstractNonInteractiveContentViewModel$statementRecorder$delegate$lambda(this$0) {
    return function () {
      var tmp = this$0.bp3(this$0.aw1_1);
      var tmp_0 = this$0.cp2();
      return this$0.zw0_1.ooi(tmp, tmp_0, AbstractNonInteractiveContentViewModel$statementRecorder$delegate$lambda$lambda(this$0));
    };
  }
  function AbstractNonInteractiveContentViewModel(di, savedStateHandle, destName) {
    UstadViewModel.call(this, di, savedStateHandle, destName);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    var tmp_0 = get_direct(onActiveEndpoint(di)).s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(NonInteractiveContentXapiStatementRecorderFactory), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    tmp.zw0_1 = tmp_0.q57(tmp$ret$0, null);
    var tmp_2 = this;
    Companion_getInstance_112();
    var tmp0_safe_receiver = savedStateHandle.ba('entryid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_2.aw1_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    this.bw1_1 = this.bp3(this.aw1_1);
    var tmp_3 = this;
    tmp_3.cw1_1 = lazy_0(AbstractNonInteractiveContentViewModel$statementRecorder$delegate$lambda(this));
  }
  protoOf(AbstractNonInteractiveContentViewModel).hoi = function () {
    _get_statementRecorder__l4o9jw(this).hoi();
  };
  protoOf(AbstractNonInteractiveContentViewModel).goi = function (progress) {
    _get_statementRecorder__l4o9jw(this).goi(progress);
  };
  protoOf(AbstractNonInteractiveContentViewModel).toh = function (active) {
    _get_statementRecorder__l4o9jw(this).toh(active);
  };
  protoOf(AbstractNonInteractiveContentViewModel).pl1 = function () {
    _get_statementRecorder__l4o9jw(this).pl1();
    protoOf(UstadViewModel).pl1.call(this);
  };
  protoOf(AbstractNonInteractiveContentViewModel).joi = function () {
    _get_statementRecorder__l4o9jw(this).joi();
  };
  function statementRecorder$factory() {
    return getPropertyCallableRef('statementRecorder', 1, KProperty1, function (receiver) {
      return _get_statementRecorder__l4o9jw(receiver);
    }, null);
  }
  function ParentalConsentManagementViewModel$lambda$slambda$slambda(this$0, resultContinuation) {
    this.fwa_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ParentalConsentManagementViewModel$lambda$slambda$slambda).hwa = function (db, $completion) {
    var tmp = this.gmp(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda$slambda).he = function (p1, $completion) {
    return this.hwa(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.gwa_1.k7e().zga(this.fwa_1.rp7_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp0_safe_receiver = suspendResult;
            var tmp_0;
            if (tmp0_safe_receiver == null) {
              tmp_0 = null;
            } else {
              var tmp_1;
              var tmp0_safe_receiver_0 = tmp0_safe_receiver.qgb_1;
              var tmp_2;
              if (tmp0_safe_receiver_0 == null) {
                tmp_2 = null;
              } else {
                tmp_2 = !(!tmp0_safe_receiver_0.tfq_1.equals(new Long(0, 0)) ? !tmp0_safe_receiver_0.tfq_1.equals(this.fwa_1.dp2()) : false);
              }
              var tmp1_elvis_lhs = tmp_2;
              if (tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs) {
                tmp_1 = tmp0_safe_receiver;
              } else {
                tmp_1 = null;
              }
              tmp_0 = tmp_1;
            }

            return tmp_0;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda$slambda).gmp = function (db, completion) {
    var i = new ParentalConsentManagementViewModel$lambda$slambda$slambda(this.fwa_1, completion);
    i.gwa_1 = db;
    return i;
  };
  function ParentalConsentManagementViewModel$lambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new ParentalConsentManagementViewModel$lambda$slambda$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.hwa(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ParentalConsentManagementViewModel$lambda$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ParentalConsentManagementViewModel$lambda$slambda$slambda_1).qwa = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda$slambda_1).z77 = function ($completion) {
    return this.qwa($completion);
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return null;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda$slambda_1).y77 = function (completion) {
    return new ParentalConsentManagementViewModel$lambda$slambda$slambda_1(completion);
  };
  function ParentalConsentManagementViewModel$lambda$slambda$slambda_2(resultContinuation) {
    var i = new ParentalConsentManagementViewModel$lambda$slambda$slambda_1(resultContinuation);
    var l = function ($completion) {
      return i.qwa($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ParentalConsentManagementViewModel$lambda$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.owb_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.parentalconsentmanagement.ParentalConsentManagementViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.wwb(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function _get_getLocaleForSiteTermsUseCase__hxw5id($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.qwb_1;
    getLocaleForSiteTermsUseCase$factory_0();
    return this_0.t2();
  }
  function updateStatus($this, status) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = $this.owb_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.parentalconsentmanagement.ParentalConsentManagementViewModel.updateStatus.<anonymous>' call
        var tmp1_safe_receiver = prevValue.rwb_1;
        var tmp;
        if (tmp1_safe_receiver == null) {
          tmp = null;
        } else {
          var tmp0_safe_receiver = prevValue.rwb_1.qgb_1;
          var tmp_0;
          if (tmp0_safe_receiver == null) {
            tmp_0 = null;
          } else {
            tmp_0 = shallowCopy_11(tmp0_safe_receiver, ParentalConsentManagementViewModel$updateStatus$lambda(status, $this));
          }
          tmp = tmp1_safe_receiver.fjo(tmp_0);
        }
        var nextValue = prevValue.wwb(tmp);
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var newState = tmp$ret$1;
    var tmp0_safe_receiver_0 = newState.rwb_1;
    var tmp1_safe_receiver_0 = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.qgb_1;
    if (tmp1_safe_receiver_0 == null)
      null;
    else {
      // Inline function 'kotlin.also' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.parentalconsentmanagement.ParentalConsentManagementViewModel.updateStatus.<anonymous>' call
      var tmp_1 = $this.cp2();
      launch(tmp_1, VOID, VOID, ParentalConsentManagementViewModel$updateStatus$slambda_0($this, tmp1_safe_receiver_0, null));
    }
    $this.hp2().com(new Snack($this.jp2().en6(strings_getInstance().om8_1)));
  }
  function Companion_154() {
    this.xwb_1 = 'ParentalConsentManagement';
  }
  var Companion_instance_202;
  function Companion_getInstance_171() {
    return Companion_instance_202;
  }
  function ParentalConsentManagementViewModel$lambda$slambda(this$0, resultContinuation) {
    this.gwc_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ParentalConsentManagementViewModel$lambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = Companion_instance_45.a4r();
            var tmp_1 = ParentalConsentManagementViewModel$lambda$slambda$slambda_0(this.gwc_1, null);
            var tmp_2 = ParentalConsentManagementViewModel$lambda$slambda$slambda_2(null);
            suspendResult = this.gwc_1.tp2(tmp_0, VOID, VOID, tmp_1, tmp_2, ParentalConsentManagementViewModel$lambda$slambda$lambda(this.gwc_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.gwc_1.owb_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.wwb(VOID, VOID, VOID, !(prevValue.rwb_1 == null));
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda).v1m = function ($this$launch, completion) {
    var i = new ParentalConsentManagementViewModel$lambda$slambda(this.gwc_1, completion);
    i.hwc_1 = $this$launch;
    return i;
  };
  function ParentalConsentManagementViewModel$lambda$slambda_0(this$0, resultContinuation) {
    var i = new ParentalConsentManagementViewModel$lambda$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ParentalConsentManagementViewModel$lambda$slambda_1(this$0, resultContinuation) {
    this.qwc_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ParentalConsentManagementViewModel$lambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.swc_1 = this.qwc_1.fp2().j7e();
            this.hd_1 = 1;
            suspendResult = _get_getLocaleForSiteTermsUseCase__hxw5id(this.qwc_1).vo3(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.twc_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = this.swc_1.jh4(this.twc_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var terms = suspendResult;
            l$ret$1: do {
              var this_0 = this.qwc_1.owb_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.wwb(VOID, VOID, terms);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ParentalConsentManagementViewModel$lambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new ParentalConsentManagementViewModel$lambda$slambda_1(this.qwc_1, completion);
    i.rwc_1 = $this$launch;
    return i;
  };
  function ParentalConsentManagementViewModel$lambda$slambda_2(this$0, resultContinuation) {
    var i = new ParentalConsentManagementViewModel$lambda$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ParentalConsentManagementViewModel$lambda(this$0) {
    return function () {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.pp1_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.parentalconsentmanagement.ParentalConsentManagementViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.nol(VOID, VOID, this$0.jp2().en6(strings_getInstance().fm4_1));
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      var tmp = this$0.cp2();
      launch(tmp, VOID, VOID, ParentalConsentManagementViewModel$lambda$slambda_0(this$0, null));
      var tmp_0 = this$0.cp2();
      launch(tmp_0, VOID, VOID, ParentalConsentManagementViewModel$lambda$slambda_2(this$0, null));
      return Unit_instance;
    };
  }
  function ParentalConsentManagementViewModel$updateStatus$lambda($status, this$0) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.zfq_1 = $status;
      $this$shallowCopy.tfq_1 = this$0.dp2();
      $this$shallowCopy.afr_1 = systemTimeInMillis();
      return Unit_instance;
    };
  }
  function ParentalConsentManagementViewModel$updateStatus$slambda(this$0, $personParentJoin, resultContinuation) {
    this.cwd_1 = this$0;
    this.dwd_1 = $personParentJoin;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ParentalConsentManagementViewModel$updateStatus$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ParentalConsentManagementViewModel$updateStatus$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ParentalConsentManagementViewModel$updateStatus$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.cwd_1.fp2().k7e().agb(this.dwd_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ParentalConsentManagementViewModel$updateStatus$slambda).v1m = function ($this$launch, completion) {
    var i = new ParentalConsentManagementViewModel$updateStatus$slambda(this.cwd_1, this.dwd_1, completion);
    i.ewd_1 = $this$launch;
    return i;
  };
  function ParentalConsentManagementViewModel$updateStatus$slambda_0(this$0, $personParentJoin, resultContinuation) {
    var i = new ParentalConsentManagementViewModel$updateStatus$slambda(this$0, $personParentJoin, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ParentalConsentManagementViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'ParentalConsentManagement');
    this.owb_1 = MutableStateFlow(new ParentalConsentManagementUiState());
    this.pwb_1 = asStateFlow(this.owb_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = this.bp2().xmx();
    var trigger = this.q56();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_0 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var tmp$ret$1 = tmp_0.u56(tmp$ret$0, context);
    var this_0 = On(this, tmp$ret$1, trigger);
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(GetLocaleForSiteTermsUseCase), arrayOf([]), false));
    var tmp$ret$3 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp.qwb_1 = Instance(this_0, tmp$ret$3, null).n5c(this, getLocaleForSiteTermsUseCase$factory());
    Companion_getInstance_112();
    var tmp_3 = mapOf_0(to('entityUid', this.rp7_1.toString()));
    this.yp2(true, tmp_3, ParentalConsentManagementViewModel$lambda(this));
  }
  protoOf(ParentalConsentManagementViewModel).fwd = function (personParentJoin) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.owb_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.parentalconsentmanagement.ParentalConsentManagementViewModel.onEntityChanged.<anonymous>' call
        var tmp0_safe_receiver = prevValue.rwb_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.fjo(personParentJoin);
        var tmp1_safe_receiver = prevValue.rwb_1;
        var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.qgb_1;
        var tmp_0 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.vfq_1;
        var nextValue = prevValue.wwb(tmp, this.wp8(tmp_0, personParentJoin == null ? null : personParentJoin.vfq_1, prevValue.swb_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(ParentalConsentManagementViewModel).gwd = function () {
    var tmp0_safe_receiver = this.owb_1.t2().rwb_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.qgb_1;
    var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.vfq_1;
    var tmp;
    if (tmp2_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.parentalconsentmanagement.ParentalConsentManagementViewModel.onClickConsent.<anonymous>' call
      tmp = listOf([1, 2, 4]).a1(tmp2_safe_receiver);
    }
    if (!(tmp === true)) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this.owb_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.parentalconsentmanagement.ParentalConsentManagementViewModel.onClickConsent.<anonymous>' call
          var nextValue = prevValue.wwb(VOID, this.jp2().en6(strings_getInstance().blh_1));
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    }
    updateStatus(this, 1);
  };
  protoOf(ParentalConsentManagementViewModel).hwd = function () {
    updateStatus(this, 2);
  };
  protoOf(ParentalConsentManagementViewModel).iwd = function () {
    var tmp0_safe_receiver = this.owb_1.t2().rwb_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.qgb_1;
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.zfq_1;
    var tmp;
    if (tmp2_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp2_elvis_lhs;
    }
    var currentStatus = tmp;
    var tmp_0;
    if (currentStatus === 2) {
      tmp_0 = 1;
    } else {
      tmp_0 = 2;
    }
    updateStatus(this, tmp_0);
  };
  function ParentalConsentManagementUiState(parentJoinAndMinor, relationshipError, siteTerms, fieldsEnabled, appName) {
    parentJoinAndMinor = parentJoinAndMinor === VOID ? null : parentJoinAndMinor;
    relationshipError = relationshipError === VOID ? null : relationshipError;
    siteTerms = siteTerms === VOID ? null : siteTerms;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    appName = appName === VOID ? 'Ustad Mobile' : appName;
    this.rwb_1 = parentJoinAndMinor;
    this.swb_1 = relationshipError;
    this.twb_1 = siteTerms;
    this.uwb_1 = fieldsEnabled;
    this.vwb_1 = appName;
  }
  protoOf(ParentalConsentManagementUiState).jwd = function () {
    var tmp0_safe_receiver = this.rwb_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.qgb_1;
    return equals(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.tfq_1, new Long(0, 0));
  };
  protoOf(ParentalConsentManagementUiState).kwd = function () {
    var tmp0_safe_receiver = this.rwb_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.qgb_1;
    return equals(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.tfq_1, new Long(0, 0));
  };
  protoOf(ParentalConsentManagementUiState).lwd = function () {
    var tmp0_safe_receiver = this.rwb_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.qgb_1;
    return equals(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.tfq_1, new Long(0, 0));
  };
  protoOf(ParentalConsentManagementUiState).mwd = function () {
    // Inline function 'kotlin.let' call
    var tmp0_safe_receiver = this.rwb_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.qgb_1;
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.parentalconsentmanagement.ParentalConsentManagementUiState.<get-changeConsentButtonVisible>.<anonymous>' call
    var it = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.tfq_1;
    return !(it == null) ? !equals(it, new Long(0, 0)) : false;
  };
  protoOf(ParentalConsentManagementUiState).nwd = function () {
    // Inline function 'kotlin.let' call
    var tmp0_safe_receiver = this.rwb_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.qgb_1;
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.parentalconsentmanagement.ParentalConsentManagementUiState.<get-consentStatusVisible>.<anonymous>' call
    var it = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.zfq_1;
    return !(it == null) ? !(it === 0) : false;
  };
  protoOf(ParentalConsentManagementUiState).owd = function () {
    var tmp0_safe_receiver = this.rwb_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.qgb_1;
    var tmp2_subject = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.zfq_1;
    var tmp;
    if (tmp2_subject === 1) {
      tmp = strings_getInstance().cm4_1;
    } else {
      if (tmp2_subject === 2) {
        tmp = strings_getInstance().dm4_1;
      } else {
        tmp = null;
      }
    }
    return tmp;
  };
  protoOf(ParentalConsentManagementUiState).pwd = function () {
    var tmp0_safe_receiver = this.rwb_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.qgb_1;
    var tmp2_subject = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.zfq_1;
    var tmp;
    if (tmp2_subject === 1) {
      tmp = strings_getInstance().am4_1;
    } else {
      if (tmp2_subject === 2) {
        tmp = strings_getInstance().bm4_1;
      } else {
        tmp = null;
      }
    }
    return tmp;
  };
  protoOf(ParentalConsentManagementUiState).qwd = function (parentJoinAndMinor, relationshipError, siteTerms, fieldsEnabled, appName) {
    return new ParentalConsentManagementUiState(parentJoinAndMinor, relationshipError, siteTerms, fieldsEnabled, appName);
  };
  protoOf(ParentalConsentManagementUiState).wwb = function (parentJoinAndMinor, relationshipError, siteTerms, fieldsEnabled, appName, $super) {
    parentJoinAndMinor = parentJoinAndMinor === VOID ? this.rwb_1 : parentJoinAndMinor;
    relationshipError = relationshipError === VOID ? this.swb_1 : relationshipError;
    siteTerms = siteTerms === VOID ? this.twb_1 : siteTerms;
    fieldsEnabled = fieldsEnabled === VOID ? this.uwb_1 : fieldsEnabled;
    appName = appName === VOID ? this.vwb_1 : appName;
    return $super === VOID ? this.qwd(parentJoinAndMinor, relationshipError, siteTerms, fieldsEnabled, appName) : $super.qwd.call(this, parentJoinAndMinor, relationshipError, siteTerms, fieldsEnabled, appName);
  };
  protoOf(ParentalConsentManagementUiState).toString = function () {
    return 'ParentalConsentManagementUiState(parentJoinAndMinor=' + this.rwb_1 + ', relationshipError=' + this.swb_1 + ', siteTerms=' + this.twb_1 + ', fieldsEnabled=' + this.uwb_1 + ', appName=' + this.vwb_1 + ')';
  };
  protoOf(ParentalConsentManagementUiState).hashCode = function () {
    var result = this.rwb_1 == null ? 0 : this.rwb_1.hashCode();
    result = imul(result, 31) + (this.swb_1 == null ? 0 : getStringHashCode(this.swb_1)) | 0;
    result = imul(result, 31) + (this.twb_1 == null ? 0 : hashCode(this.twb_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.uwb_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.vwb_1) | 0;
    return result;
  };
  protoOf(ParentalConsentManagementUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ParentalConsentManagementUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ParentalConsentManagementUiState ? other : THROW_CCE();
    if (!equals(this.rwb_1, tmp0_other_with_cast.rwb_1))
      return false;
    if (!(this.swb_1 == tmp0_other_with_cast.swb_1))
      return false;
    if (!equals(this.twb_1, tmp0_other_with_cast.twb_1))
      return false;
    if (!(this.uwb_1 === tmp0_other_with_cast.uwb_1))
      return false;
    if (!(this.vwb_1 === tmp0_other_with_cast.vwb_1))
      return false;
    return true;
  };
  function getLocaleForSiteTermsUseCase$factory() {
    return getPropertyCallableRef('getLocaleForSiteTermsUseCase', 1, KProperty1, function (receiver) {
      return _get_getLocaleForSiteTermsUseCase__hxw5id(receiver);
    }, null);
  }
  function getLocaleForSiteTermsUseCase$factory_0() {
    return getPropertyCallableRef('getLocaleForSiteTermsUseCase', 1, KProperty1, function (receiver) {
      return _get_getLocaleForSiteTermsUseCase__hxw5id(receiver);
    }, null);
  }
  function _get_httpClient__2ty1zc_4($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.twe_1;
    httpClient$factory_10();
    return this_0.t2();
  }
  function Companion_155() {
    this.uwe_1 = 'PdfContent';
  }
  var Companion_instance_203;
  function Companion_getInstance_172() {
    return Companion_instance_203;
  }
  function PdfContentViewModel$slambda(this$0, resultContinuation) {
    this.dwf_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PdfContentViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PdfContentViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PdfContentViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            this.hd_1 = 1;
            suspendResult = this.dwf_1.fp2().v7e().cbb(this.dwf_1.qwe_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.fwf_1 = suspendResult;
            var tmp_0 = this;
            var tmp_1;
            if (this.fwf_1 == null) {
              return Unit_instance;
            } else {
              tmp_1 = this.fwf_1;
            }

            tmp_0.gwf_1 = tmp_1;
            this.hwf_1 = ensureNotNull(this.gwf_1.haj_1);
            var tmp_2 = this;
            tmp_2.iwf_1 = this.dwf_1.z4q();
            var tmp_3 = this;
            tmp_3.jwf_1 = _get_httpClient__2ty1zc_4(this.dwf_1);
            var tmp_4 = this;
            tmp_4.kwf_1 = this.hwf_1;
            var tmp_5 = this;
            tmp_5.lwf_1 = this.jwf_1;
            var tmp_6 = this;
            tmp_6.mwf_1 = this.lwf_1;
            var tmp_7 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.kwf_1);
            tmp_7.nwf_1 = this_0;
            this.nwf_1.j38_1 = Companion_getInstance().y2w_1;
            var tmp_8 = this;
            tmp_8.owf_1 = this.mwf_1;
            var tmp_9 = this;
            tmp_9.pwf_1 = this.nwf_1;
            this.hd_1 = 2;
            suspendResult = (new HttpStatement(this.pwf_1, this.owf_1)).u3y(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.qwf_1 = suspendResult;
            this.hd_1 = 3;
            suspendResult = bodyAsDecodedText(this.qwf_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.rwf_1 = suspendResult;
            var tmp_10 = this;
            var this_1 = this.iwf_1.g45();
            var this_2 = serializer(this_1, createKType(getKClass(ContentManifest), arrayOf([]), false));
            tmp_10.swf_1 = this.iwf_1.f45(isInterface(this_2, KSerializer) ? this_2 : THROW_CCE(), this.rwf_1);
            var tmp_11 = this;
            var tmp1_elvis_lhs = this.gwf_1.faj_1;
            var tmp_12;
            if (tmp1_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_12 = tmp1_elvis_lhs;
            }

            tmp_11.twf_1 = tmp_12;
            this.uwf_1 = UrlKmp(this.hwf_1).ono(this.twf_1).toString();
            this.vwf_1 = bodyDataUrlForUri(this.swf_1, this.twf_1);
            l$ret$1: do {
              var this_3 = this.dwf_1.rwe_1;
              while (true) {
                var prevValue = this_3.t2();
                var nextValue = prevValue.zwf(this.uwf_1, this.vwf_1);
                if (this_3.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.hd_1 = 4;
            suspendResult = this.dwf_1.fp2().i7d().kag(this.gwf_1.eaj_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            var contentEntry = suspendResult;
            l$ret$3: do {
              var this_4 = this.dwf_1.pp1_1;
              while (true) {
                var prevValue_0 = this_4.t2();
                var tmp1_elvis_lhs_0 = contentEntry == null ? null : contentEntry.gah_1;
                var nextValue_0 = prevValue_0.nol(VOID, VOID, tmp1_elvis_lhs_0 == null ? '' : tmp1_elvis_lhs_0);
                if (this_4.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PdfContentViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new PdfContentViewModel$slambda(this.dwf_1, completion);
    i.ewf_1 = $this$launch;
    return i;
  };
  function PdfContentViewModel$slambda_0(this$0, resultContinuation) {
    var i = new PdfContentViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PdfContentViewModel(di, savedStateHandle) {
    AbstractNonInteractiveContentViewModel.call(this, di, savedStateHandle, 'PdfContent');
    var tmp = this;
    Companion_getInstance_102();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.qwe_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    this.rwe_1 = MutableStateFlow(new PdfContentUiState());
    this.swe_1 = asStateFlow(this.rwe_1);
    var tmp_0 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    tmp_0.twe_1 = Instance(di, tmp$ret$0, null).n5c(this, httpClient$factory_9());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.pp1_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.pdfcontent.PdfContentViewModel.<anonymous>' call
        var nextValue = prevValue.nol(VOID, VOID, VOID, VOID, true);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_2 = this.cp2();
    launch(tmp_2, VOID, VOID, PdfContentViewModel$slambda_0(this, null));
  }
  protoOf(PdfContentViewModel).yvz = function () {
    var tmp0_safe_receiver = this.rwe_1.t2().ywf_1;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.pdfcontent.PdfContentViewModel.<get-titleAndLangCode>.<anonymous>' call
      var titleVal = tmp0_safe_receiver.gah_1;
      var langVal = 'en';
      var tmp_0;
      if (!(titleVal == null) ? !(langVal == null) : false) {
        tmp_0 = new TitleAndLangCode(titleVal, langVal);
      } else {
        tmp_0 = null;
      }
      tmp = tmp_0;
    }
    return tmp;
  };
  function PdfContentUiState(pdfUrl, dataUrl, contentEntry) {
    pdfUrl = pdfUrl === VOID ? null : pdfUrl;
    dataUrl = dataUrl === VOID ? null : dataUrl;
    contentEntry = contentEntry === VOID ? null : contentEntry;
    this.wwf_1 = pdfUrl;
    this.xwf_1 = dataUrl;
    this.ywf_1 = contentEntry;
  }
  protoOf(PdfContentUiState).awg = function (pdfUrl, dataUrl, contentEntry) {
    return new PdfContentUiState(pdfUrl, dataUrl, contentEntry);
  };
  protoOf(PdfContentUiState).zwf = function (pdfUrl, dataUrl, contentEntry, $super) {
    pdfUrl = pdfUrl === VOID ? this.wwf_1 : pdfUrl;
    dataUrl = dataUrl === VOID ? this.xwf_1 : dataUrl;
    contentEntry = contentEntry === VOID ? this.ywf_1 : contentEntry;
    return $super === VOID ? this.awg(pdfUrl, dataUrl, contentEntry) : $super.awg.call(this, pdfUrl, dataUrl, contentEntry);
  };
  protoOf(PdfContentUiState).toString = function () {
    return 'PdfContentUiState(pdfUrl=' + this.wwf_1 + ', dataUrl=' + this.xwf_1 + ', contentEntry=' + this.ywf_1 + ')';
  };
  protoOf(PdfContentUiState).hashCode = function () {
    var result = this.wwf_1 == null ? 0 : getStringHashCode(this.wwf_1);
    result = imul(result, 31) + (this.xwf_1 == null ? 0 : getStringHashCode(this.xwf_1)) | 0;
    result = imul(result, 31) + (this.ywf_1 == null ? 0 : this.ywf_1.hashCode()) | 0;
    return result;
  };
  protoOf(PdfContentUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof PdfContentUiState))
      return false;
    var tmp0_other_with_cast = other instanceof PdfContentUiState ? other : THROW_CCE();
    if (!(this.wwf_1 == tmp0_other_with_cast.wwf_1))
      return false;
    if (!(this.xwf_1 == tmp0_other_with_cast.xwf_1))
      return false;
    if (!equals(this.ywf_1, tmp0_other_with_cast.ywf_1))
      return false;
    return true;
  };
  function httpClient$factory_9() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_4(receiver);
    }, null);
  }
  function httpClient$factory_10() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_4(receiver);
    }, null);
  }
  function PersonViewModelConstants() {
    this.bwg_1 = 'goToOnPersonSelected';
    this.cwg_1 = 'popUpToOnPersonSelected';
  }
  var PersonViewModelConstants_instance;
  function PersonViewModelConstants_getInstance() {
    return PersonViewModelConstants_instance;
  }
  function PersonAccountEditViewModel$slambda$slambda(this$0, resultContinuation) {
    this.lwg_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonAccountEditViewModel$slambda$slambda).owg = function (db, $completion) {
    var tmp = this.gmp(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonAccountEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.owg(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonAccountEditViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            suspendResult = this.mwg_1.a7d().sfn(this.lwg_1.rp7_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.nwg_1 = suspendResult;
            this.hd_1 = 2;
            var tmp_0 = this.mwg_1.c7f();
            var tmp_1 = this.lwg_1.dp2();
            PermissionFlags_getInstance();
            suspendResult = tmp_0.thc(tmp_1, new Long(131072, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var hasResetPermission = suspendResult;
            var tmp_2;
            if (this.nwg_1 == null) {
              tmp_2 = null;
            } else {
              var tmp_3 = this.nwg_1.g95_1 == null ? 1 : hasResetPermission ? 2 : 3;
              var tmp_4 = this.nwg_1.f95_1;
              var tmp0_elvis_lhs = this.nwg_1.g95_1;
              tmp_2 = new PersonUsernameAndPasswordModel(tmp_3, tmp_4, tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs, '', '');
            }

            return tmp_2;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonAccountEditViewModel$slambda$slambda).gmp = function (db, completion) {
    var i = new PersonAccountEditViewModel$slambda$slambda(this.lwg_1, completion);
    i.mwg_1 = db;
    return i;
  };
  function PersonAccountEditViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new PersonAccountEditViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.owg(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonAccountEditViewModel$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonAccountEditViewModel$slambda$slambda_1).xwg = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonAccountEditViewModel$slambda$slambda_1).z77 = function ($completion) {
    return this.xwg($completion);
  };
  protoOf(PersonAccountEditViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return null;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PersonAccountEditViewModel$slambda$slambda_1).y77 = function (completion) {
    return new PersonAccountEditViewModel$slambda$slambda_1(completion);
  };
  function PersonAccountEditViewModel$slambda$slambda_2(resultContinuation) {
    var i = new PersonAccountEditViewModel$slambda$slambda_1(resultContinuation);
    var l = function ($completion) {
      return i.xwg($completion);
    };
    l.$arity = 0;
    return l;
  }
  function PersonAccountEditViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.vwh_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.accountedit.PersonAccountEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.fwi(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function PersonAccountEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.cqf();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function PersonAccountEditViewModel$onClickSave$slambda$slambda(this$0, $entity, resultContinuation) {
    this.owi_1 = this$0;
    this.pwi_1 = $entity;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonAccountEditViewModel$onClickSave$slambda$slambda).fmp = function (it, $completion) {
    var tmp = this.gmp(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonAccountEditViewModel$onClickSave$slambda$slambda).he = function (p1, $completion) {
    return this.fmp(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonAccountEditViewModel$onClickSave$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            suspendResult = _get_authManager__mo6de4(this.owi_1).rmj(this.owi_1.rp7_1, this.pwi_1.vwi_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            suspendResult = this.owi_1.fp2().a7d().yfn(this.owi_1.rp7_1, this.pwi_1.twi_1, systemTimeInMillis(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var numChanges = suspendResult;
            Napier_getInstance().d5e('Updated username: ' + numChanges + ' changes');
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonAccountEditViewModel$onClickSave$slambda$slambda).gmp = function (it, completion) {
    var i = new PersonAccountEditViewModel$onClickSave$slambda$slambda(this.owi_1, this.pwi_1, completion);
    i.qwi_1 = it;
    return i;
  };
  function PersonAccountEditViewModel$onClickSave$slambda$slambda_0(this$0, $entity, resultContinuation) {
    var i = new PersonAccountEditViewModel$onClickSave$slambda$slambda(this$0, $entity, resultContinuation);
    var l = function (it, $completion) {
      return i.fmp(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_authManager__mo6de4($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.xwh_1;
    authManager$factory_0();
    return this_0.t2();
  }
  function _get_setPasswordUseCase__c0ja9b($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.ywh_1;
    setPasswordUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_156() {
    this.wwi_1 = 'AccountEdit';
    this.xwi_1 = 1;
    this.ywi_1 = 2;
    this.zwi_1 = 3;
  }
  var Companion_instance_204;
  function Companion_getInstance_173() {
    return Companion_instance_204;
  }
  function PersonAccountEditViewModel$slambda(this$0, resultContinuation) {
    this.iwj_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonAccountEditViewModel$slambda).oqh = function (db, $completion) {
    var tmp = this.gmp(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonAccountEditViewModel$slambda).he = function (p1, $completion) {
    return this.oqh(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonAccountEditViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            if (this.iwj_1.rp7_1.equals(this.iwj_1.dp2())) {
              var tmp_0 = this;
              tmp_0.kwj_1 = true;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              var tmp_1 = this.jwj_1.c7f();
              var tmp_2 = this.iwj_1.dp2();
              PermissionFlags_getInstance();
              suspendResult = tmp_1.thc(tmp_2, new Long(32768, 0), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.kwj_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.kwj_1;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonAccountEditViewModel$slambda).gmp = function (db, completion) {
    var i = new PersonAccountEditViewModel$slambda(this.iwj_1, completion);
    i.jwj_1 = db;
    return i;
  };
  function PersonAccountEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new PersonAccountEditViewModel$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.oqh(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonAccountEditViewModel$slambda_1(this$0, resultContinuation) {
    this.twj_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonAccountEditViewModel$slambda_1).u1m = function ($this$launchIfHasPermission, $completion) {
    var tmp = this.v1m($this$launchIfHasPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonAccountEditViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonAccountEditViewModel$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = Companion_instance_205.a4r();
            var tmp_1 = PersonAccountEditViewModel$slambda$slambda_0(this.twj_1, null);
            var tmp_2 = PersonAccountEditViewModel$slambda$slambda_2(null);
            suspendResult = this.twj_1.tp2(tmp_0, VOID, VOID, tmp_1, tmp_2, PersonAccountEditViewModel$slambda$lambda(this.twj_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.twj_1.pp1_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_3 = this.twj_1.jp2().en6(strings_getInstance().alw_1);
                var tmp0_actionBarButtonState = new ActionBarButtonUiState(true, tmp_3, VOID, PersonAccountEditViewModel$onClickSave$ref(this.twj_1));
                var tmp1_loadingState = Companion_getInstance_85().vol_1;
                var nextValue = prevValue.nol(VOID, tmp1_loadingState, VOID, VOID, VOID, VOID, VOID, VOID, tmp0_actionBarButtonState);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.twj_1.vwh_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.fwi(VOID, VOID, VOID, VOID, VOID, true);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonAccountEditViewModel$slambda_1).v1m = function ($this$launchIfHasPermission, completion) {
    var i = new PersonAccountEditViewModel$slambda_1(this.twj_1, completion);
    i.uwj_1 = $this$launchIfHasPermission;
    return i;
  };
  function PersonAccountEditViewModel$slambda_2(this$0, resultContinuation) {
    var i = new PersonAccountEditViewModel$slambda_1(this$0, resultContinuation);
    var l = function ($this$launchIfHasPermission, $completion) {
      return i.u1m($this$launchIfHasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonAccountEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.dwk_1 = $commitDelay;
    this.ewk_1 = $entity;
    this.fwk_1 = $this;
    this.gwk_1 = $key;
    this.hwk_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonAccountEditViewModel$onEntityChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonAccountEditViewModel$onEntityChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonAccountEditViewModel$onEntityChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.dwk_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.ewk_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.fwk_1.pp2(this.fwk_1.lp1_1, this.gwk_1, this.hwk_1, this.ewk_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonAccountEditViewModel$onEntityChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new PersonAccountEditViewModel$onEntityChanged$slambda(this.dwk_1, this.ewk_1, this.fwk_1, this.gwk_1, this.hwk_1, completion);
    i.iwk_1 = $this$launch;
    return i;
  };
  function PersonAccountEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new PersonAccountEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonAccountEditViewModel$onClickSave$slambda($entity, this$0, resultContinuation) {
    this.rwk_1 = $entity;
    this.swk_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonAccountEditViewModel$onClickSave$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonAccountEditViewModel$onClickSave$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonAccountEditViewModel$onClickSave$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 14;
            if (this.rwk_1.rwi_1 === 1 ? isBlank(this.rwk_1.twi_1) : false) {
              l$ret$1: do {
                var this_0 = this.swk_1.vwh_1;
                while (true) {
                  var prevValue = this_0.t2();
                  var nextValue = prevValue.fwi(VOID, this.swk_1.jp2().en6(strings_getInstance().blh_1));
                  if (this_0.y1k(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
            }

            if (isBlank(this.rwk_1.vwi_1)) {
              l$ret$3: do {
                var this_1 = this.swk_1.vwh_1;
                while (true) {
                  var prevValue_0 = this_1.t2();
                  var nextValue_0 = prevValue_0.fwi(VOID, VOID, VOID, this.swk_1.jp2().en6(strings_getInstance().blh_1));
                  if (this_1.y1k(prevValue_0, nextValue_0)) {
                    break l$ret$3;
                  }
                }
              }
               while (false);
            }

            if (this.rwk_1.rwi_1 === 3 ? isBlank(this.rwk_1.uwi_1) : false)
              if (this.swk_1.vwh_1.t2().ns3()) {
                this.swk_1.lp2(Companion_getInstance_85().vol_1);
                l$ret$5: do {
                  var this_2 = this.swk_1.vwh_1;
                  while (true) {
                    var prevValue_1 = this_2.t2();
                    var nextValue_1 = prevValue_1.fwi(VOID, VOID, VOID, VOID, VOID, true);
                    if (this_2.y1k(prevValue_1, nextValue_1)) {
                      break l$ret$5;
                    }
                  }
                }
                 while (false);
                return Unit_instance;
              }

            if (this.rwk_1.rwi_1 === 1) {
              this.hd_1 = 6;
              continue $sm;
            } else {
              this.hd_1 = 1;
              continue $sm;
            }

          case 1:
            this.id_1 = 4;
            this.id_1 = 3;
            this.hd_1 = 2;
            suspendResult = _get_setPasswordUseCase__c0ja9b(this.swk_1).dn5(this.swk_1.dp2(), this.rwk_1.swi_1, this.rwk_1.twi_1, this.rwk_1.vwi_1, this.rwk_1.rwi_1 === 3 ? this.rwk_1.uwi_1 : null, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.swk_1.hp2().com(new Snack(this.swk_1.jp2().en6(strings_getInstance().cmf_1)));
            var tmp_0 = this;
            this.swk_1.up7(null);
            tmp_0.vwk_1 = Unit_instance;
            this.id_1 = 14;
            this.hd_1 = 5;
            continue $sm;
          case 3:
            this.id_1 = 4;
            var tmp_1 = this.kd_1;
            if (tmp_1 instanceof Exception) {
              this.wwk_1 = this.kd_1;
              var tmp_2 = this;
              var tmp_3;
              var tmp_4 = this.wwk_1;
              if (tmp_4 instanceof UnauthorizedException) {
                l$ret$19: do {
                  var this_3 = this.swk_1.vwh_1;
                  while (true) {
                    var prevValue_2 = this_3.t2();
                    var nextValue_2 = prevValue_2.fwi(VOID, VOID, this.swk_1.jp2().en6(strings_getInstance().nlc_1));
                    if (this_3.y1k(prevValue_2, nextValue_2)) {
                      break l$ret$19;
                    }
                  }
                }
                 while (false);
                tmp_3 = Unit_instance;
              } else {
                l$ret$21: do {
                  var this_4 = this.swk_1.vwh_1;
                  while (true) {
                    var prevValue_3 = this_4.t2();
                    var nextValue_3 = prevValue_3.fwi(VOID, VOID, VOID, VOID, this.wwk_1.message);
                    if (this_4.y1k(prevValue_3, nextValue_3)) {
                      break l$ret$21;
                    }
                  }
                }
                 while (false);
                tmp_3 = Unit_instance;
              }
              tmp_2.vwk_1 = tmp_3;
              this.id_1 = 14;
              this.hd_1 = 5;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 4:
            this.id_1 = 14;
            this.xwk_1 = this.kd_1;
            this.swk_1.lp2(Companion_getInstance_85().vol_1);
            l$ret$23: do {
              var this_5 = this.swk_1.vwh_1;
              while (true) {
                var prevValue_4 = this_5.t2();
                var nextValue_4 = prevValue_4.fwi(VOID, VOID, VOID, VOID, VOID, true);
                if (this_5.y1k(prevValue_4, nextValue_4)) {
                  break l$ret$23;
                }
              }
            }
             while (false);
            throw this.xwk_1;
          case 5:
            this.id_1 = 14;
            this.swk_1.lp2(Companion_getInstance_85().vol_1);
            l$ret$25: do {
              var this_6 = this.swk_1.vwh_1;
              while (true) {
                var prevValue_5 = this_6.t2();
                var nextValue_5 = prevValue_5.fwi(VOID, VOID, VOID, VOID, VOID, true);
                if (this_6.y1k(prevValue_5, nextValue_5)) {
                  break l$ret$25;
                }
              }
            }
             while (false);
            this.hd_1 = 13;
            continue $sm;
          case 6:
            this.id_1 = 11;
            this.id_1 = 10;
            this.hd_1 = 7;
            suspendResult = this.swk_1.fp2().a7d().qfn(this.rwk_1.twi_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            this.ywk_1 = suspendResult;
            if (this.ywk_1 === 0) {
              this.hd_1 = 8;
              var tmp_5 = this.swk_1.fp2();
              suspendResult = withDoorTransactionAsync(tmp_5, VOID, PersonAccountEditViewModel$onClickSave$slambda$slambda_0(this.swk_1, this.rwk_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              l$ret$7: do {
                var this_7 = this.swk_1.vwh_1;
                while (true) {
                  var prevValue_6 = this_7.t2();
                  var nextValue_6 = prevValue_6.fwi(VOID, this.swk_1.jp2().en6(strings_getInstance().rm0_1));
                  if (this_7.y1k(prevValue_6, nextValue_6)) {
                    break l$ret$7;
                  }
                }
              }
               while (false);
              this.hd_1 = 9;
              continue $sm;
            }

          case 8:
            this.swk_1.up7(null);
            this.hd_1 = 9;
            continue $sm;
          case 9:
            this.uwk_1 = Unit_instance;
            this.id_1 = 14;
            this.hd_1 = 12;
            continue $sm;
          case 10:
            this.id_1 = 11;
            var tmp_6 = this.kd_1;
            if (tmp_6 instanceof Exception) {
              var e = this.kd_1;
              var tmp_7 = this;
              l$ret$11: do {
                var this_8 = this.swk_1.vwh_1;
                while (true) {
                  var prevValue_7 = this_8.t2();
                  var nextValue_7 = prevValue_7.fwi(VOID, this.swk_1.jp2().en6(strings_getInstance().olc_1));
                  if (this_8.y1k(prevValue_7, nextValue_7)) {
                    break l$ret$11;
                  }
                }
              }
               while (false);
              tmp_7.uwk_1 = Unit_instance;
              this.id_1 = 14;
              this.hd_1 = 12;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 11:
            this.id_1 = 14;
            var t = this.kd_1;
            this.swk_1.lp2(Companion_getInstance_85().vol_1);
            l$ret$13: do {
              var this_9 = this.swk_1.vwh_1;
              while (true) {
                var prevValue_8 = this_9.t2();
                var nextValue_8 = prevValue_8.fwi(VOID, VOID, VOID, VOID, VOID, true);
                if (this_9.y1k(prevValue_8, nextValue_8)) {
                  break l$ret$13;
                }
              }
            }
             while (false);
            throw t;
          case 12:
            this.id_1 = 14;
            this.swk_1.lp2(Companion_getInstance_85().vol_1);
            l$ret$15: do {
              var this_10 = this.swk_1.vwh_1;
              while (true) {
                var prevValue_9 = this_10.t2();
                var nextValue_9 = prevValue_9.fwi(VOID, VOID, VOID, VOID, VOID, true);
                if (this_10.y1k(prevValue_9, nextValue_9)) {
                  break l$ret$15;
                }
              }
            }
             while (false);
            this.hd_1 = 13;
            continue $sm;
          case 13:
            return Unit_instance;
          case 14:
            throw this.kd_1;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 14) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(PersonAccountEditViewModel$onClickSave$slambda).v1m = function ($this$launch, completion) {
    var i = new PersonAccountEditViewModel$onClickSave$slambda(this.rwk_1, this.swk_1, completion);
    i.twk_1 = $this$launch;
    return i;
  };
  function PersonAccountEditViewModel$onClickSave$slambda_0($entity, this$0, resultContinuation) {
    var i = new PersonAccountEditViewModel$onClickSave$slambda($entity, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonAccountEditViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'AccountEdit');
    this.vwh_1 = MutableStateFlow(new PersonAccountEditUiState());
    this.wwh_1 = asStateFlow(this.vwh_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = this.bp2().xmx();
    var trigger = this.q56();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_0 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var tmp$ret$1 = tmp_0.u56(tmp$ret$0, context);
    var this_0 = On(this, tmp$ret$1, trigger);
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(AuthManager), arrayOf([]), false));
    var tmp$ret$3 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp.xwh_1 = Instance(this_0, tmp$ret$3, null).n5c(this, authManager$factory());
    var tmp_3 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context_0 = this.bp2().xmx();
    var trigger_0 = this.q56();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_4 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_5 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
    var tmp$ret$5 = isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE();
    var tmp$ret$6 = tmp_4.u56(tmp$ret$5, context_0);
    var this_1 = On(this, tmp$ret$6, trigger_0);
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(SetPasswordUseCase), arrayOf([]), false));
    var tmp$ret$8 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    tmp_3.ywh_1 = Instance(this_1, tmp$ret$8, null).n5c(this, setPasswordUseCase$factory());
    this.pp1_1.x1k(new AppUiState(VOID, Companion_getInstance_85().uol_1));
    var tmp_7 = PersonAccountEditViewModel$slambda_0(this, null);
    this.vp2(tmp_7, VOID, VOID, PersonAccountEditViewModel$slambda_2(this, null));
  }
  protoOf(PersonAccountEditViewModel).zwk = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.vwh_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.accountedit.PersonAccountEditViewModel.onEntityChanged.<anonymous>' call
        var tmp;
        var tmp_0;
        if (!(prevValue.awi_1 == null)) {
          var tmp0_safe_receiver = prevValue.zwh_1;
          var tmp_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.twi_1;
          tmp_0 = tmp_1 == (entity == null ? null : entity.twi_1);
        } else {
          tmp_0 = false;
        }
        if (tmp_0) {
          tmp = prevValue.awi_1;
        } else {
          tmp = null;
        }
        var tmp_2 = tmp;
        var tmp_3;
        var tmp_4;
        if (!(prevValue.bwi_1 == null)) {
          var tmp2_safe_receiver = prevValue.zwh_1;
          var tmp_5 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.uwi_1;
          tmp_4 = tmp_5 == (entity == null ? null : entity.uwi_1);
        } else {
          tmp_4 = false;
        }
        if (tmp_4) {
          tmp_3 = prevValue.bwi_1;
        } else {
          tmp_3 = null;
        }
        var tmp_6 = tmp_3;
        var tmp_7;
        var tmp_8;
        if (!(prevValue.cwi_1 == null)) {
          var tmp4_safe_receiver = prevValue.zwh_1;
          var tmp_9 = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.vwi_1;
          tmp_8 = tmp_9 == (entity == null ? null : entity.vwi_1);
        } else {
          tmp_8 = false;
        }
        if (tmp_8) {
          tmp_7 = prevValue.cwi_1;
        } else {
          tmp_7 = null;
        }
        var nextValue = prevValue.fwi(entity, tmp_2, tmp_6, tmp_7);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_205.a4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_112();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.qp7_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_10 = this;
    var tmp_11 = this.cp2();
    tmp_10.qp7_1 = launch(tmp_11, VOID, VOID, PersonAccountEditViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(PersonAccountEditViewModel).cqf = function () {
    if (this.mp2().equals(Companion_getInstance_85().uol_1))
      return Unit_instance;
    var tmp0_elvis_lhs = this.vwh_1.t2().zwh_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var entity = tmp;
    this.lp2(Companion_getInstance_85().uol_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.vwh_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.accountedit.PersonAccountEditViewModel.onClickSave.<anonymous>' call
        var nextValue = prevValue.fwi(VOID, VOID, VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_0 = this.cp2();
    launch(tmp_0, VOID, VOID, PersonAccountEditViewModel$onClickSave$slambda_0(entity, this, null));
  };
  function PersonAccountEditUiState(personAccount, usernameError, currentPasswordError, newPasswordError, errorMessage, fieldsEnabled) {
    personAccount = personAccount === VOID ? new PersonUsernameAndPasswordModel() : personAccount;
    usernameError = usernameError === VOID ? null : usernameError;
    currentPasswordError = currentPasswordError === VOID ? null : currentPasswordError;
    newPasswordError = newPasswordError === VOID ? null : newPasswordError;
    errorMessage = errorMessage === VOID ? null : errorMessage;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    this.zwh_1 = personAccount;
    this.awi_1 = usernameError;
    this.bwi_1 = currentPasswordError;
    this.cwi_1 = newPasswordError;
    this.dwi_1 = errorMessage;
    this.ewi_1 = fieldsEnabled;
  }
  protoOf(PersonAccountEditUiState).awl = function () {
    var tmp0_safe_receiver = this.zwh_1;
    return (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.rwi_1) === 1;
  };
  protoOf(PersonAccountEditUiState).bwl = function () {
    var tmp0_safe_receiver = this.zwh_1;
    return (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.rwi_1) === 3;
  };
  protoOf(PersonAccountEditUiState).ns3 = function () {
    return (!(this.awi_1 == null) ? true : !(this.bwi_1 == null)) ? true : !(this.cwi_1 == null);
  };
  protoOf(PersonAccountEditUiState).cwl = function (personAccount, usernameError, currentPasswordError, newPasswordError, errorMessage, fieldsEnabled) {
    return new PersonAccountEditUiState(personAccount, usernameError, currentPasswordError, newPasswordError, errorMessage, fieldsEnabled);
  };
  protoOf(PersonAccountEditUiState).fwi = function (personAccount, usernameError, currentPasswordError, newPasswordError, errorMessage, fieldsEnabled, $super) {
    personAccount = personAccount === VOID ? this.zwh_1 : personAccount;
    usernameError = usernameError === VOID ? this.awi_1 : usernameError;
    currentPasswordError = currentPasswordError === VOID ? this.bwi_1 : currentPasswordError;
    newPasswordError = newPasswordError === VOID ? this.cwi_1 : newPasswordError;
    errorMessage = errorMessage === VOID ? this.dwi_1 : errorMessage;
    fieldsEnabled = fieldsEnabled === VOID ? this.ewi_1 : fieldsEnabled;
    return $super === VOID ? this.cwl(personAccount, usernameError, currentPasswordError, newPasswordError, errorMessage, fieldsEnabled) : $super.cwl.call(this, personAccount, usernameError, currentPasswordError, newPasswordError, errorMessage, fieldsEnabled);
  };
  protoOf(PersonAccountEditUiState).toString = function () {
    return 'PersonAccountEditUiState(personAccount=' + this.zwh_1 + ', usernameError=' + this.awi_1 + ', currentPasswordError=' + this.bwi_1 + ', newPasswordError=' + this.cwi_1 + ', errorMessage=' + this.dwi_1 + ', fieldsEnabled=' + this.ewi_1 + ')';
  };
  protoOf(PersonAccountEditUiState).hashCode = function () {
    var result = this.zwh_1 == null ? 0 : this.zwh_1.hashCode();
    result = imul(result, 31) + (this.awi_1 == null ? 0 : getStringHashCode(this.awi_1)) | 0;
    result = imul(result, 31) + (this.bwi_1 == null ? 0 : getStringHashCode(this.bwi_1)) | 0;
    result = imul(result, 31) + (this.cwi_1 == null ? 0 : getStringHashCode(this.cwi_1)) | 0;
    result = imul(result, 31) + (this.dwi_1 == null ? 0 : getStringHashCode(this.dwi_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ewi_1) | 0;
    return result;
  };
  protoOf(PersonAccountEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof PersonAccountEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof PersonAccountEditUiState ? other : THROW_CCE();
    if (!equals(this.zwh_1, tmp0_other_with_cast.zwh_1))
      return false;
    if (!(this.awi_1 == tmp0_other_with_cast.awi_1))
      return false;
    if (!(this.bwi_1 == tmp0_other_with_cast.bwi_1))
      return false;
    if (!(this.cwi_1 == tmp0_other_with_cast.cwi_1))
      return false;
    if (!(this.dwi_1 == tmp0_other_with_cast.dwi_1))
      return false;
    if (!(this.ewi_1 === tmp0_other_with_cast.ewi_1))
      return false;
    return true;
  };
  function Companion_157() {
  }
  protoOf(Companion_157).a4r = function () {
    return $serializer_getInstance_68();
  };
  var Companion_instance_205;
  function Companion_getInstance_174() {
    return Companion_instance_205;
  }
  function $serializer_56() {
    $serializer_instance_56 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.viewmodel.person.accountedit.PersonUsernameAndPasswordModel', this, 5);
    tmp0_serialDesc.g4f('mode', true);
    tmp0_serialDesc.g4f('personUid', true);
    tmp0_serialDesc.g4f('username', true);
    tmp0_serialDesc.g4f('currentPassword', true);
    tmp0_serialDesc.g4f('newPassword', true);
    this.dwl_1 = tmp0_serialDesc;
  }
  protoOf($serializer_56).d44 = function () {
    return this.dwl_1;
  };
  protoOf($serializer_56).x4f = function () {
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [IntSerializer_getInstance(), LongSerializer_getInstance(), StringSerializer_getInstance(), StringSerializer_getInstance(), StringSerializer_getInstance()];
  };
  protoOf($serializer_56).f44 = function (decoder) {
    var tmp0_desc = this.dwl_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = 0;
    var tmp5_local1 = new Long(0, 0);
    var tmp6_local2 = null;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_input = decoder.v47(tmp0_desc);
    if (tmp9_input.k48()) {
      tmp4_local0 = tmp9_input.a48(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp9_input.b48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp9_input.f48(tmp0_desc, 2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp9_input.f48(tmp0_desc, 3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp9_input.f48(tmp0_desc, 4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp9_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp9_input.a48(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp9_input.b48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp9_input.f48(tmp0_desc, 2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp9_input.f48(tmp0_desc, 3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp9_input.f48(tmp0_desc, 4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp9_input.w47(tmp0_desc);
    return PersonUsernameAndPasswordModel_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, null);
  };
  protoOf($serializer_56).ewl = function (encoder, value) {
    var tmp0_desc = this.dwl_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    if (tmp1_output.r49(tmp0_desc, 0) ? true : !(value.rwi_1 === 1)) {
      tmp1_output.e49(tmp0_desc, 0, value.rwi_1);
    }
    if (tmp1_output.r49(tmp0_desc, 1) ? true : !value.swi_1.equals(new Long(0, 0))) {
      tmp1_output.f49(tmp0_desc, 1, value.swi_1);
    }
    if (tmp1_output.r49(tmp0_desc, 2) ? true : !(value.twi_1 === '')) {
      tmp1_output.j49(tmp0_desc, 2, value.twi_1);
    }
    if (tmp1_output.r49(tmp0_desc, 3) ? true : !(value.uwi_1 === '')) {
      tmp1_output.j49(tmp0_desc, 3, value.uwi_1);
    }
    if (tmp1_output.r49(tmp0_desc, 4) ? true : !(value.vwi_1 === '')) {
      tmp1_output.j49(tmp0_desc, 4, value.vwi_1);
    }
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_56).e44 = function (encoder, value) {
    return this.ewl(encoder, value instanceof PersonUsernameAndPasswordModel ? value : THROW_CCE());
  };
  var $serializer_instance_56;
  function $serializer_getInstance_68() {
    if ($serializer_instance_56 == null)
      new $serializer_56();
    return $serializer_instance_56;
  }
  function PersonUsernameAndPasswordModel_init_$Init$(seen1, mode, personUid, username, currentPassword, newPassword, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_68().dwl_1);
    }
    if (0 === (seen1 & 1))
      $this.rwi_1 = 1;
    else
      $this.rwi_1 = mode;
    if (0 === (seen1 & 2))
      $this.swi_1 = new Long(0, 0);
    else
      $this.swi_1 = personUid;
    if (0 === (seen1 & 4))
      $this.twi_1 = '';
    else
      $this.twi_1 = username;
    if (0 === (seen1 & 8))
      $this.uwi_1 = '';
    else
      $this.uwi_1 = currentPassword;
    if (0 === (seen1 & 16))
      $this.vwi_1 = '';
    else
      $this.vwi_1 = newPassword;
    return $this;
  }
  function PersonUsernameAndPasswordModel_init_$Create$(seen1, mode, personUid, username, currentPassword, newPassword, serializationConstructorMarker) {
    return PersonUsernameAndPasswordModel_init_$Init$(seen1, mode, personUid, username, currentPassword, newPassword, serializationConstructorMarker, objectCreate(protoOf(PersonUsernameAndPasswordModel)));
  }
  function PersonUsernameAndPasswordModel(mode, personUid, username, currentPassword, newPassword) {
    mode = mode === VOID ? 1 : mode;
    personUid = personUid === VOID ? new Long(0, 0) : personUid;
    username = username === VOID ? '' : username;
    currentPassword = currentPassword === VOID ? '' : currentPassword;
    newPassword = newPassword === VOID ? '' : newPassword;
    this.rwi_1 = mode;
    this.swi_1 = personUid;
    this.twi_1 = username;
    this.uwi_1 = currentPassword;
    this.vwi_1 = newPassword;
  }
  protoOf(PersonUsernameAndPasswordModel).fwl = function (mode, personUid, username, currentPassword, newPassword) {
    return new PersonUsernameAndPasswordModel(mode, personUid, username, currentPassword, newPassword);
  };
  protoOf(PersonUsernameAndPasswordModel).gwl = function (mode, personUid, username, currentPassword, newPassword, $super) {
    mode = mode === VOID ? this.rwi_1 : mode;
    personUid = personUid === VOID ? this.swi_1 : personUid;
    username = username === VOID ? this.twi_1 : username;
    currentPassword = currentPassword === VOID ? this.uwi_1 : currentPassword;
    newPassword = newPassword === VOID ? this.vwi_1 : newPassword;
    return $super === VOID ? this.fwl(mode, personUid, username, currentPassword, newPassword) : $super.fwl.call(this, mode, personUid, username, currentPassword, newPassword);
  };
  protoOf(PersonUsernameAndPasswordModel).toString = function () {
    return 'PersonUsernameAndPasswordModel(mode=' + this.rwi_1 + ', personUid=' + this.swi_1.toString() + ', username=' + this.twi_1 + ', currentPassword=' + this.uwi_1 + ', newPassword=' + this.vwi_1 + ')';
  };
  protoOf(PersonUsernameAndPasswordModel).hashCode = function () {
    var result = this.rwi_1;
    result = imul(result, 31) + this.swi_1.hashCode() | 0;
    result = imul(result, 31) + getStringHashCode(this.twi_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.uwi_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.vwi_1) | 0;
    return result;
  };
  protoOf(PersonUsernameAndPasswordModel).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof PersonUsernameAndPasswordModel))
      return false;
    var tmp0_other_with_cast = other instanceof PersonUsernameAndPasswordModel ? other : THROW_CCE();
    if (!(this.rwi_1 === tmp0_other_with_cast.rwi_1))
      return false;
    if (!this.swi_1.equals(tmp0_other_with_cast.swi_1))
      return false;
    if (!(this.twi_1 === tmp0_other_with_cast.twi_1))
      return false;
    if (!(this.uwi_1 === tmp0_other_with_cast.uwi_1))
      return false;
    if (!(this.vwi_1 === tmp0_other_with_cast.vwi_1))
      return false;
    return true;
  };
  function authManager$factory() {
    return getPropertyCallableRef('authManager', 1, KProperty1, function (receiver) {
      return _get_authManager__mo6de4(receiver);
    }, null);
  }
  function setPasswordUseCase$factory() {
    return getPropertyCallableRef('setPasswordUseCase', 1, KProperty1, function (receiver) {
      return _get_setPasswordUseCase__c0ja9b(receiver);
    }, null);
  }
  function authManager$factory_0() {
    return getPropertyCallableRef('authManager', 1, KProperty1, function (receiver) {
      return _get_authManager__mo6de4(receiver);
    }, null);
  }
  function setPasswordUseCase$factory_0() {
    return getPropertyCallableRef('setPasswordUseCase', 1, KProperty1, function (receiver) {
      return _get_setPasswordUseCase__c0ja9b(receiver);
    }, null);
  }
  function BulkAddPersonRunImportViewModel$slambda$lambda(this$0) {
    return function (numImported, totalRecords) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.cwm_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.bulkaddrunimport.BulkAddPersonRunImportViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.lwm(VOID, totalRecords, numImported);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function _get_bulkAddFromUriUseCase__ahhheb($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.fwm_1;
    bulkAddFromUriUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_158() {
    this.mwm_1 = 'BulkAddPersonRunImport';
    this.nwm_1 = 'uri';
  }
  var Companion_instance_206;
  function Companion_getInstance_175() {
    return Companion_instance_206;
  }
  function sam$com_ustadmobile_core_domain_person_bulkadd_BulkAddPersonsUseCase_BulkAddOnProgress$0(function_0) {
    this.owm_1 = function_0;
  }
  protoOf(sam$com_ustadmobile_core_domain_person_bulkadd_BulkAddPersonsUseCase_BulkAddOnProgress$0).pwm = function (numImported, totalRecords) {
    return this.owm_1(numImported, totalRecords);
  };
  function BulkAddPersonRunImportViewModel$slambda(this$0, resultContinuation) {
    this.ywm_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(BulkAddPersonRunImportViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(BulkAddPersonRunImportViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(BulkAddPersonRunImportViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = _get_bulkAddFromUriUseCase__ahhheb(this.ywm_1);
            var tmp_1 = Companion_getInstance_3().b2r(this.ywm_1.ewm_1);
            var tmp_2 = this.ywm_1.dp2();
            var tmp_3 = BulkAddPersonRunImportViewModel$slambda$lambda(this.ywm_1);
            suspendResult = tmp_0.to2(tmp_1, tmp_2, new sam$com_ustadmobile_core_domain_person_bulkadd_BulkAddPersonsUseCase_BulkAddOnProgress$0(tmp_3), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var result = suspendResult;
            l$ret$1: do {
              var this_0 = this.ywm_1.cwm_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.lwm(false, VOID, result.wo2_1);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.id_1 = 3;
            this.hd_1 = 4;
            continue $sm;
          case 2:
            this.id_1 = 3;
            var tmp_4 = this.kd_1;
            if (tmp_4 instanceof Error) {
              var e = this.kd_1;
              Napier_getInstance().d5e('Exception running import', e);
              l$ret$3: do {
                var this_1 = this.ywm_1.cwm_1;
                while (true) {
                  var prevValue_0 = this_1.t2();
                  var tmp0_safe_receiver = e instanceof BulkAddPersonException ? e : null;
                  var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.no2_1;
                  var nextValue_0 = prevValue_0.lwm(false, VOID, VOID, tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs, e.message);
                  if (this_1.y1k(prevValue_0, nextValue_0)) {
                    break l$ret$3;
                  }
                }
              }
               while (false);
              this.hd_1 = 4;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 3:
            throw this.kd_1;
          case 4:
            this.id_1 = 3;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 3) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(BulkAddPersonRunImportViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new BulkAddPersonRunImportViewModel$slambda(this.ywm_1, completion);
    i.zwm_1 = $this$launch;
    return i;
  };
  function BulkAddPersonRunImportViewModel$slambda_0(this$0, resultContinuation) {
    var i = new BulkAddPersonRunImportViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function BulkAddPersonRunImportViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'BulkAddPersonRunImport');
    this.cwm_1 = MutableStateFlow(new BulkAddPersonRunImportUiState());
    this.dwm_1 = asStateFlow(this.cwm_1);
    var tmp = this;
    var tmp0_elvis_lhs = savedStateHandle.ba('uri');
    var tmp_0;
    if (tmp0_elvis_lhs == null) {
      throw IllegalArgumentException_init_$Create$('No fileUri');
    } else {
      tmp_0 = tmp0_elvis_lhs;
    }
    tmp.ewm_1 = tmp_0;
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(BulkAddPersonsFromLocalUriUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.fwm_1 = Instance(this_0, tmp$ret$0, null).n5c(this, bulkAddFromUriUseCase$factory());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.pp1_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.bulkaddrunimport.BulkAddPersonRunImportViewModel.<anonymous>' call
        var nextValue = prevValue.nol(VOID, VOID, this.jp2().en6(strings_getInstance().gmh_1));
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_3 = this.cp2();
    launch(tmp_3, VOID, VOID, BulkAddPersonRunImportViewModel$slambda_0(this, null));
  }
  function Companion_159() {
    Companion_instance_207 = this;
    var tmp = this;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    tmp.awn_1 = [null, null, null, new ArrayListSerializer($serializer_getInstance_47()), null];
  }
  var Companion_instance_207;
  function Companion_getInstance_176() {
    if (Companion_instance_207 == null)
      new Companion_159();
    return Companion_instance_207;
  }
  function $serializer_57() {
    $serializer_instance_57 = this;
    var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('com.ustadmobile.core.viewmodel.person.bulkaddrunimport.BulkAddPersonRunImportUiState', this, 5);
    tmp0_serialDesc.g4f('inProgress', true);
    tmp0_serialDesc.g4f('totalRecords', true);
    tmp0_serialDesc.g4f('numImported', true);
    tmp0_serialDesc.g4f('errors', true);
    tmp0_serialDesc.g4f('errorMessage', true);
    this.bwn_1 = tmp0_serialDesc;
  }
  protoOf($serializer_57).d44 = function () {
    return this.bwn_1;
  };
  protoOf($serializer_57).x4f = function () {
    var tmp0_cached = Companion_getInstance_176().awn_1;
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return [BooleanSerializer_getInstance(), IntSerializer_getInstance(), IntSerializer_getInstance(), tmp0_cached[3], get_nullable(StringSerializer_getInstance())];
  };
  protoOf($serializer_57).f44 = function (decoder) {
    var tmp0_desc = this.bwn_1;
    var tmp1_flag = true;
    var tmp2_index = 0;
    var tmp3_bitMask0 = 0;
    var tmp4_local0 = false;
    var tmp5_local1 = 0;
    var tmp6_local2 = 0;
    var tmp7_local3 = null;
    var tmp8_local4 = null;
    var tmp9_input = decoder.v47(tmp0_desc);
    var tmp10_cached = Companion_getInstance_176().awn_1;
    if (tmp9_input.k48()) {
      tmp4_local0 = tmp9_input.x47(tmp0_desc, 0);
      tmp3_bitMask0 = tmp3_bitMask0 | 1;
      tmp5_local1 = tmp9_input.a48(tmp0_desc, 1);
      tmp3_bitMask0 = tmp3_bitMask0 | 2;
      tmp6_local2 = tmp9_input.a48(tmp0_desc, 2);
      tmp3_bitMask0 = tmp3_bitMask0 | 4;
      tmp7_local3 = tmp9_input.h48(tmp0_desc, 3, tmp10_cached[3], tmp7_local3);
      tmp3_bitMask0 = tmp3_bitMask0 | 8;
      tmp8_local4 = tmp9_input.j48(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
      tmp3_bitMask0 = tmp3_bitMask0 | 16;
    } else
      while (tmp1_flag) {
        tmp2_index = tmp9_input.l48(tmp0_desc);
        switch (tmp2_index) {
          case -1:
            tmp1_flag = false;
            break;
          case 0:
            tmp4_local0 = tmp9_input.x47(tmp0_desc, 0);
            tmp3_bitMask0 = tmp3_bitMask0 | 1;
            break;
          case 1:
            tmp5_local1 = tmp9_input.a48(tmp0_desc, 1);
            tmp3_bitMask0 = tmp3_bitMask0 | 2;
            break;
          case 2:
            tmp6_local2 = tmp9_input.a48(tmp0_desc, 2);
            tmp3_bitMask0 = tmp3_bitMask0 | 4;
            break;
          case 3:
            tmp7_local3 = tmp9_input.h48(tmp0_desc, 3, tmp10_cached[3], tmp7_local3);
            tmp3_bitMask0 = tmp3_bitMask0 | 8;
            break;
          case 4:
            tmp8_local4 = tmp9_input.j48(tmp0_desc, 4, StringSerializer_getInstance(), tmp8_local4);
            tmp3_bitMask0 = tmp3_bitMask0 | 16;
            break;
          default:
            throw UnknownFieldException_init_$Create$(tmp2_index);
        }
      }
    tmp9_input.w47(tmp0_desc);
    return BulkAddPersonRunImportUiState_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, null);
  };
  protoOf($serializer_57).cwn = function (encoder, value) {
    var tmp0_desc = this.bwn_1;
    var tmp1_output = encoder.v47(tmp0_desc);
    var tmp2_cached = Companion_getInstance_176().awn_1;
    if (tmp1_output.r49(tmp0_desc, 0) ? true : !(value.gwm_1 === true)) {
      tmp1_output.b49(tmp0_desc, 0, value.gwm_1);
    }
    if (tmp1_output.r49(tmp0_desc, 1) ? true : !(value.hwm_1 === 0)) {
      tmp1_output.e49(tmp0_desc, 1, value.hwm_1);
    }
    if (tmp1_output.r49(tmp0_desc, 2) ? true : !(value.iwm_1 === 0)) {
      tmp1_output.e49(tmp0_desc, 2, value.iwm_1);
    }
    if (tmp1_output.r49(tmp0_desc, 3) ? true : !equals(value.jwm_1, emptyList())) {
      tmp1_output.l49(tmp0_desc, 3, tmp2_cached[3], value.jwm_1);
    }
    if (tmp1_output.r49(tmp0_desc, 4) ? true : !(value.kwm_1 == null)) {
      tmp1_output.n49(tmp0_desc, 4, StringSerializer_getInstance(), value.kwm_1);
    }
    tmp1_output.w47(tmp0_desc);
  };
  protoOf($serializer_57).e44 = function (encoder, value) {
    return this.cwn(encoder, value instanceof BulkAddPersonRunImportUiState ? value : THROW_CCE());
  };
  var $serializer_instance_57;
  function $serializer_getInstance_69() {
    if ($serializer_instance_57 == null)
      new $serializer_57();
    return $serializer_instance_57;
  }
  function BulkAddPersonRunImportUiState_init_$Init$(seen1, inProgress, totalRecords, numImported, errors, errorMessage, serializationConstructorMarker, $this) {
    if (!(0 === (0 & seen1))) {
      throwMissingFieldException(seen1, 0, $serializer_getInstance_69().bwn_1);
    }
    if (0 === (seen1 & 1))
      $this.gwm_1 = true;
    else
      $this.gwm_1 = inProgress;
    if (0 === (seen1 & 2))
      $this.hwm_1 = 0;
    else
      $this.hwm_1 = totalRecords;
    if (0 === (seen1 & 4))
      $this.iwm_1 = 0;
    else
      $this.iwm_1 = numImported;
    if (0 === (seen1 & 8))
      $this.jwm_1 = emptyList();
    else
      $this.jwm_1 = errors;
    if (0 === (seen1 & 16))
      $this.kwm_1 = null;
    else
      $this.kwm_1 = errorMessage;
    return $this;
  }
  function BulkAddPersonRunImportUiState_init_$Create$(seen1, inProgress, totalRecords, numImported, errors, errorMessage, serializationConstructorMarker) {
    return BulkAddPersonRunImportUiState_init_$Init$(seen1, inProgress, totalRecords, numImported, errors, errorMessage, serializationConstructorMarker, objectCreate(protoOf(BulkAddPersonRunImportUiState)));
  }
  function BulkAddPersonRunImportUiState(inProgress, totalRecords, numImported, errors, errorMessage) {
    Companion_getInstance_176();
    inProgress = inProgress === VOID ? true : inProgress;
    totalRecords = totalRecords === VOID ? 0 : totalRecords;
    numImported = numImported === VOID ? 0 : numImported;
    errors = errors === VOID ? emptyList() : errors;
    errorMessage = errorMessage === VOID ? null : errorMessage;
    this.gwm_1 = inProgress;
    this.hwm_1 = totalRecords;
    this.iwm_1 = numImported;
    this.jwm_1 = errors;
    this.kwm_1 = errorMessage;
  }
  protoOf(BulkAddPersonRunImportUiState).ns3 = function () {
    var tmp;
    // Inline function 'kotlin.collections.isNotEmpty' call
    if (!this.jwm_1.c1()) {
      tmp = true;
    } else {
      tmp = !(this.kwm_1 == null);
    }
    return tmp;
  };
  protoOf(BulkAddPersonRunImportUiState).rnp = function () {
    var tmp;
    if (this.hwm_1 > 0) {
      tmp = this.iwm_1 / this.hwm_1;
    } else {
      tmp = 0.0;
    }
    return tmp;
  };
  protoOf(BulkAddPersonRunImportUiState).dwn = function (inProgress, totalRecords, numImported, errors, errorMessage) {
    return new BulkAddPersonRunImportUiState(inProgress, totalRecords, numImported, errors, errorMessage);
  };
  protoOf(BulkAddPersonRunImportUiState).lwm = function (inProgress, totalRecords, numImported, errors, errorMessage, $super) {
    inProgress = inProgress === VOID ? this.gwm_1 : inProgress;
    totalRecords = totalRecords === VOID ? this.hwm_1 : totalRecords;
    numImported = numImported === VOID ? this.iwm_1 : numImported;
    errors = errors === VOID ? this.jwm_1 : errors;
    errorMessage = errorMessage === VOID ? this.kwm_1 : errorMessage;
    return $super === VOID ? this.dwn(inProgress, totalRecords, numImported, errors, errorMessage) : $super.dwn.call(this, inProgress, totalRecords, numImported, errors, errorMessage);
  };
  protoOf(BulkAddPersonRunImportUiState).toString = function () {
    return 'BulkAddPersonRunImportUiState(inProgress=' + this.gwm_1 + ', totalRecords=' + this.hwm_1 + ', numImported=' + this.iwm_1 + ', errors=' + this.jwm_1 + ', errorMessage=' + this.kwm_1 + ')';
  };
  protoOf(BulkAddPersonRunImportUiState).hashCode = function () {
    var result = getBooleanHashCode(this.gwm_1);
    result = imul(result, 31) + this.hwm_1 | 0;
    result = imul(result, 31) + this.iwm_1 | 0;
    result = imul(result, 31) + hashCode(this.jwm_1) | 0;
    result = imul(result, 31) + (this.kwm_1 == null ? 0 : getStringHashCode(this.kwm_1)) | 0;
    return result;
  };
  protoOf(BulkAddPersonRunImportUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof BulkAddPersonRunImportUiState))
      return false;
    var tmp0_other_with_cast = other instanceof BulkAddPersonRunImportUiState ? other : THROW_CCE();
    if (!(this.gwm_1 === tmp0_other_with_cast.gwm_1))
      return false;
    if (!(this.hwm_1 === tmp0_other_with_cast.hwm_1))
      return false;
    if (!(this.iwm_1 === tmp0_other_with_cast.iwm_1))
      return false;
    if (!equals(this.jwm_1, tmp0_other_with_cast.jwm_1))
      return false;
    if (!(this.kwm_1 == tmp0_other_with_cast.kwm_1))
      return false;
    return true;
  };
  function bulkAddFromUriUseCase$factory() {
    return getPropertyCallableRef('bulkAddFromUriUseCase', 1, KProperty1, function (receiver) {
      return _get_bulkAddFromUriUseCase__ahhheb(receiver);
    }, null);
  }
  function bulkAddFromUriUseCase$factory_0() {
    return getPropertyCallableRef('bulkAddFromUriUseCase', 1, KProperty1, function (receiver) {
      return _get_bulkAddFromUriUseCase__ahhheb(receiver);
    }, null);
  }
  function BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda$lambda(it) {
    return Unit_instance;
  }
  function _get_openBlobUiUseCase__fzusqz_1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.bwo_1;
    openBlobUiUseCase$factory_4();
    return this_0.t2();
  }
  function Companion_160() {
    this.cwo_1 = 'BulkAddPersonSelectFile';
  }
  var Companion_instance_208;
  function Companion_getInstance_177() {
    return Companion_instance_208;
  }
  function BulkAddPersonSelectFileViewModel$slambda(this$0, resultContinuation) {
    this.lwo_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(BulkAddPersonSelectFileViewModel$slambda).oqh = function (db, $completion) {
    var tmp = this.gmp(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(BulkAddPersonSelectFileViewModel$slambda).he = function (p1, $completion) {
    return this.oqh(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(BulkAddPersonSelectFileViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.mwo_1.c7f();
            var tmp_1 = this.lwo_1.dp2();
            PermissionFlags_getInstance();
            var tmp_2 = new Long(1024, 0);
            PermissionFlags_getInstance();
            suspendResult = tmp_0.whc(tmp_1, tmp_2, new Long(8192, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var it = suspendResult;
            return it.ed8_1 ? it.fd8_1 : false;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(BulkAddPersonSelectFileViewModel$slambda).gmp = function (db, completion) {
    var i = new BulkAddPersonSelectFileViewModel$slambda(this.lwo_1, completion);
    i.mwo_1 = db;
    return i;
  };
  function BulkAddPersonSelectFileViewModel$slambda_0(this$0, resultContinuation) {
    var i = new BulkAddPersonSelectFileViewModel$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.oqh(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function BulkAddPersonSelectFileViewModel$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.zwn_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.bulkaddselectfile.BulkAddPersonSelectFileViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.rwo(VOID, VOID, VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function BulkAddPersonSelectFileViewModel$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(BulkAddPersonSelectFileViewModel$slambda_1).u1m = function ($this$launchIfHasPermission, $completion) {
    var tmp = this.v1m($this$launchIfHasPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(BulkAddPersonSelectFileViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(BulkAddPersonSelectFileViewModel$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(BulkAddPersonSelectFileViewModel$slambda_1).v1m = function ($this$launchIfHasPermission, completion) {
    var i = new BulkAddPersonSelectFileViewModel$slambda_1(completion);
    i.awp_1 = $this$launchIfHasPermission;
    return i;
  };
  function BulkAddPersonSelectFileViewModel$slambda_2(resultContinuation) {
    var i = new BulkAddPersonSelectFileViewModel$slambda_1(resultContinuation);
    var l = function ($this$launchIfHasPermission, $completion) {
      return i.u1m($this$launchIfHasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda(this$0, $templatePath, resultContinuation) {
    this.jwp_1 = this$0;
    this.kwp_1 = $templatePath;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = _get_openBlobUiUseCase__fzusqz_1(this.jwp_1);
            var tmp_1 = new OpenBlobItem(this.kwp_1, 'text/csv', 'bulk-add-persons-template.csv', new Long(186, 0));
            suspendResult = tmp_0.gnc(tmp_1, BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda$lambda, OpenBlobIntent_SEND_getInstance(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.id_1 = 3;
            this.hd_1 = 4;
            continue $sm;
          case 2:
            this.id_1 = 3;
            var tmp_2 = this.kd_1;
            if (tmp_2 instanceof Error) {
              var e = this.kd_1;
              printStackTrace(e);
              this.hd_1 = 4;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 3:
            throw this.kd_1;
          case 4:
            this.id_1 = 3;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 3) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda).v1m = function ($this$launch, completion) {
    var i = new BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda(this.jwp_1, this.kwp_1, completion);
    i.lwp_1 = $this$launch;
    return i;
  };
  function BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda_0(this$0, $templatePath, resultContinuation) {
    var i = new BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda(this$0, $templatePath, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function BulkAddPersonSelectFileViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'BulkAddPersonSelectFile');
    this.zwn_1 = MutableStateFlow(new BulkAddPersonSelectFileUiState());
    this.awo_1 = asStateFlow(this.zwn_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(OpenBlobUiUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.bwo_1 = Instance(this_0, tmp$ret$0, null).n5c(this, openBlobUiUseCase$factory_3());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.pp1_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.bulkaddselectfile.BulkAddPersonSelectFileViewModel.<anonymous>' call
        var nextValue = prevValue.nol(VOID, VOID, this.jp2().en6(strings_getInstance().gmh_1));
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_1 = BulkAddPersonSelectFileViewModel$slambda_0(this, null);
    var tmp_2 = BulkAddPersonSelectFileViewModel$lambda(this);
    this.up2(tmp_1, true, tmp_2, BulkAddPersonSelectFileViewModel$slambda_2(null));
  }
  protoOf(BulkAddPersonSelectFileViewModel).mwp = function (uri, name) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.zwn_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.bulkaddselectfile.BulkAddPersonSelectFileViewModel.onFileSelected.<anonymous>' call
        var nextValue = prevValue.rwo(uri, name);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(BulkAddPersonSelectFileViewModel).nwp = function () {
    var tmp0_elvis_lhs = this.zwn_1.t2().nwo_1;
    this.np1_1.sns('BulkAddPersonRunImport', mapOf_0(to('uri', tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs)));
  };
  protoOf(BulkAddPersonSelectFileViewModel).owp = function () {
    var templatePath = this.bp2().xmx().umj_1 + 'staticfiles/bulkaddpersons/bulk-add-persons-template.csv';
    var tmp = this.cp2();
    launch(tmp, VOID, VOID, BulkAddPersonSelectFileViewModel$onClickGetTemplate$slambda_0(this, templatePath, null));
  };
  function BulkAddPersonSelectFileUiState(selectedFileUri, selectedFileName, fileSelectError, fieldsEnabled) {
    selectedFileUri = selectedFileUri === VOID ? null : selectedFileUri;
    selectedFileName = selectedFileName === VOID ? null : selectedFileName;
    fileSelectError = fileSelectError === VOID ? null : fileSelectError;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    this.nwo_1 = selectedFileUri;
    this.owo_1 = selectedFileName;
    this.pwo_1 = fileSelectError;
    this.qwo_1 = fieldsEnabled;
  }
  protoOf(BulkAddPersonSelectFileUiState).pwp = function () {
    return !(this.nwo_1 == null) ? this.qwo_1 : false;
  };
  protoOf(BulkAddPersonSelectFileUiState).qwp = function (selectedFileUri, selectedFileName, fileSelectError, fieldsEnabled) {
    return new BulkAddPersonSelectFileUiState(selectedFileUri, selectedFileName, fileSelectError, fieldsEnabled);
  };
  protoOf(BulkAddPersonSelectFileUiState).rwo = function (selectedFileUri, selectedFileName, fileSelectError, fieldsEnabled, $super) {
    selectedFileUri = selectedFileUri === VOID ? this.nwo_1 : selectedFileUri;
    selectedFileName = selectedFileName === VOID ? this.owo_1 : selectedFileName;
    fileSelectError = fileSelectError === VOID ? this.pwo_1 : fileSelectError;
    fieldsEnabled = fieldsEnabled === VOID ? this.qwo_1 : fieldsEnabled;
    return $super === VOID ? this.qwp(selectedFileUri, selectedFileName, fileSelectError, fieldsEnabled) : $super.qwp.call(this, selectedFileUri, selectedFileName, fileSelectError, fieldsEnabled);
  };
  protoOf(BulkAddPersonSelectFileUiState).toString = function () {
    return 'BulkAddPersonSelectFileUiState(selectedFileUri=' + this.nwo_1 + ', selectedFileName=' + this.owo_1 + ', fileSelectError=' + this.pwo_1 + ', fieldsEnabled=' + this.qwo_1 + ')';
  };
  protoOf(BulkAddPersonSelectFileUiState).hashCode = function () {
    var result = this.nwo_1 == null ? 0 : getStringHashCode(this.nwo_1);
    result = imul(result, 31) + (this.owo_1 == null ? 0 : getStringHashCode(this.owo_1)) | 0;
    result = imul(result, 31) + (this.pwo_1 == null ? 0 : getStringHashCode(this.pwo_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.qwo_1) | 0;
    return result;
  };
  protoOf(BulkAddPersonSelectFileUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof BulkAddPersonSelectFileUiState))
      return false;
    var tmp0_other_with_cast = other instanceof BulkAddPersonSelectFileUiState ? other : THROW_CCE();
    if (!(this.nwo_1 == tmp0_other_with_cast.nwo_1))
      return false;
    if (!(this.owo_1 == tmp0_other_with_cast.owo_1))
      return false;
    if (!(this.pwo_1 == tmp0_other_with_cast.pwo_1))
      return false;
    if (!(this.qwo_1 === tmp0_other_with_cast.qwo_1))
      return false;
    return true;
  };
  function openBlobUiUseCase$factory_3() {
    return getPropertyCallableRef('openBlobUiUseCase', 1, KProperty1, function (receiver) {
      return _get_openBlobUiUseCase__fzusqz_1(receiver);
    }, null);
  }
  function openBlobUiUseCase$factory_4() {
    return getPropertyCallableRef('openBlobUiUseCase', 1, KProperty1, function (receiver) {
      return _get_openBlobUiUseCase__fzusqz_1(receiver);
    }, null);
  }
  function PersonDetailViewModel$slambda$slambda$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda).bwq = function (entity, permissions, $completion) {
    var tmp = this.cwq(entity, permissions, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda).um = function (p1, p2, $completion) {
    var tmp = (p1 == null ? true : p1 instanceof PersonAndDisplayDetail) ? p1 : THROW_CCE();
    return this.bwq(tmp, p2 instanceof EditAndViewPermission ? p2 : THROW_CCE(), $completion);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = this.zwp_1;
          var tmp_0;
          if (this.awq_1.bhf_1) {
            tmp_0 = this_0;
          } else {
            tmp_0 = null;
          }
          return tmp_0;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda).cwq = function (entity, permissions, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda(completion);
    i.zwp_1 = entity;
    i.awq_1 = permissions;
    return i;
  };
  function PersonDetailViewModel$slambda$slambda$slambda$slambda_0(resultContinuation) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda(resultContinuation);
    var l = function (entity, permissions, $completion) {
      return i.bwq(entity, permissions, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function PersonDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.lwq_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_1).nwq = function (person, $completion) {
    var tmp = this.owq(person, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.nwq((p1 == null ? true : p1 instanceof PersonAndDisplayDetail) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.lwq_1.lwr_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp0_safe_receiver = this.mwq_1;
              var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.kfq_1;
              var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.k95_1;
              var tmp_0;
              if (tmp2_safe_receiver == null) {
                tmp_0 = null;
              } else {
                var tmp0_safe_receiver_0 = _get_phoneNumberUtil__i6ank8(this.lwq_1);
                tmp_0 = tmp0_safe_receiver_0 == null ? null : formatInternationalOrNull(tmp0_safe_receiver_0, tmp2_safe_receiver);
              }
              var nextValue = prevValue.zwr(this.mwq_1, tmp_0);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_1 = this.lwq_1.pp1_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var tmp0_safe_receiver_1 = this.mwq_1;
              var tmp1_safe_receiver_0 = tmp0_safe_receiver_1 == null ? null : tmp0_safe_receiver_1.kfq_1;
              var tmp2_elvis_lhs = tmp1_safe_receiver_0 == null ? null : personFullName(tmp1_safe_receiver_0);
              var tmp3_title = tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs;
              var tmp_1;
              if (!(this.mwq_1 == null)) {
                tmp_1 = Companion_getInstance_85().vol_1;
              } else {
                tmp_1 = Companion_getInstance_85().uol_1;
              }
              var tmp4_loadingState = tmp_1;
              var nextValue_0 = prevValue_0.nol(VOID, tmp4_loadingState, tmp3_title);
              if (this_1.y1k(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_1).owq = function (person, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda_1(this.lwq_1, completion);
    i.mwq_1 = person;
    return i;
  };
  function PersonDetailViewModel$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (person, $completion) {
      return i.nwq(person, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonDetailViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.iws_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_3).dou = function (it, $completion) {
    var tmp = this.eou(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.dou((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.iws_1.lwr_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.zwr(VOID, VOID, VOID, VOID, VOID, this.jws_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_3).eou = function (it, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda_3(this.iws_1, completion);
    i.jws_1 = it;
    return i;
  };
  function PersonDetailViewModel$slambda$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.dou(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonDetailViewModel$onClickEdit$ref($boundThis) {
    var l = function () {
      $boundThis.iut();
      return Unit_instance;
    };
    l.callableName = 'onClickEdit';
    return l;
  }
  function PersonDetailViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.sws_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_5).uws = function (it, $completion) {
    var tmp = this.vws(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_5).he = function (p1, $completion) {
    return this.uws(p1 instanceof EditAndViewPermission ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.sws_1.lwr_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.zwr(VOID, VOID, VOID, VOID, this.tws_1.chf_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_1 = this.sws_1.pp1_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var tmp_0;
              if (this.tws_1.chf_1) {
                var tmp_1 = this.sws_1.jp2().en6(strings_getInstance().mlo_1);
                var tmp_2 = FabIcon_EDIT_getInstance();
                tmp_0 = new FabUiState(true, tmp_1, tmp_2, PersonDetailViewModel$onClickEdit$ref(this.sws_1));
              } else {
                tmp_0 = new FabUiState();
              }
              var nextValue_0 = prevValue_0.nol(tmp_0);
              if (this_1.y1k(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_5).vws = function (it, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda_5(this.sws_1, completion);
    i.tws_1 = it;
    return i;
  };
  function PersonDetailViewModel$slambda$slambda$slambda$slambda_6(this$0, resultContinuation) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda_5(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.uws(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonDetailViewModel$slambda$slambda$slambda$slambda_7(this$0, resultContinuation) {
    this.ewt_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_7).gwt = function (it, $completion) {
    var tmp = this.hwt(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_7).he = function (p1, $completion) {
    return this.gwt((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_7).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.ewt_1.lwr_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.zwr(VOID, VOID, VOID, this.fwt_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda$slambda_7).hwt = function (it, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda_7(this.ewt_1, completion);
    i.fwt_1 = it;
    return i;
  };
  function PersonDetailViewModel$slambda$slambda$slambda$slambda_8(this$0, resultContinuation) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda$slambda_7(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.gwt(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonDetailViewModel$slambda$slambda$slambda($entityFlow, $viewAndEditPermissionFlow, this$0, resultContinuation) {
    this.qwt_1 = $entityFlow;
    this.rwt_1 = $viewAndEditPermissionFlow;
    this.swt_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = combine(this.qwt_1, this.rwt_1, PersonDetailViewModel$slambda$slambda$slambda$slambda_0(null));
            var tmp_1 = PersonDetailViewModel$slambda$slambda$slambda$slambda_2(this.swt_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_30(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda(this.qwt_1, this.rwt_1, this.swt_1, completion);
    i.twt_1 = $this$launch;
    return i;
  };
  function PersonDetailViewModel$slambda$slambda$slambda_0($entityFlow, $viewAndEditPermissionFlow, this$0, resultContinuation) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda($entityFlow, $viewAndEditPermissionFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonDetailViewModel$slambda$slambda$slambda_1($hasManagePermissionsPermissionFlow, this$0, resultContinuation) {
    this.cwu_1 = $hasManagePermissionsPermissionFlow;
    this.dwu_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = distinctUntilChanged(this.cwu_1);
            var tmp_1 = PersonDetailViewModel$slambda$slambda$slambda$slambda_4(this.dwu_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_30(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda_1(this.cwu_1, this.dwu_1, completion);
    i.ewu_1 = $this$launch;
    return i;
  };
  function PersonDetailViewModel$slambda$slambda$slambda_2($hasManagePermissionsPermissionFlow, this$0, resultContinuation) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda_1($hasManagePermissionsPermissionFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonDetailViewModel$slambda$slambda$slambda_3($viewAndEditPermissionFlow, this$0, resultContinuation) {
    this.nwu_1 = $viewAndEditPermissionFlow;
    this.owu_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_3).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = PersonDetailViewModel$slambda$slambda$slambda$slambda_6(this.owu_1, null);
            suspendResult = this.nwu_1.h1h(new sam$kotlinx_coroutines_flow_FlowCollector$0_30(tmp_0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            throwKotlinNothingValueException();
            break;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_3).v1m = function ($this$launch, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda_3(this.nwu_1, this.owu_1, completion);
    i.pwu_1 = $this$launch;
    return i;
  };
  function PersonDetailViewModel$slambda$slambda$slambda_4($viewAndEditPermissionFlow, this$0, resultContinuation) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda_3($viewAndEditPermissionFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonDetailViewModel$slambda$slambda$slambda_5(this$0, resultContinuation) {
    this.ywu_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_5).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_5).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.ywu_1.ep2().g7d().j92(this.ywu_1.dp2(), this.ywu_1.fp1_1);
            var tmp_1 = PersonDetailViewModel$slambda$slambda$slambda$slambda_8(this.ywu_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_30(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonDetailViewModel$slambda$slambda$slambda_5).v1m = function ($this$launch, completion) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda_5(this.ywu_1, completion);
    i.zwu_1 = $this$launch;
    return i;
  };
  function PersonDetailViewModel$slambda$slambda$slambda_6(this$0, resultContinuation) {
    var i = new PersonDetailViewModel$slambda$slambda$slambda_5(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonDetailViewModel$slambda$slambda($this_launch, $entityFlow, $viewAndEditPermissionFlow, this$0, $hasManagePermissionsPermissionFlow, resultContinuation) {
    this.iwv_1 = $this_launch;
    this.jwv_1 = $entityFlow;
    this.kwv_1 = $viewAndEditPermissionFlow;
    this.lwv_1 = this$0;
    this.mwv_1 = $hasManagePermissionsPermissionFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda$slambda).m86 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonDetailViewModel$slambda$slambda).z77 = function ($completion) {
    return this.m86($completion);
  };
  protoOf(PersonDetailViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.iwv_1, VOID, VOID, PersonDetailViewModel$slambda$slambda$slambda_0(this.jwv_1, this.kwv_1, this.lwv_1, null));
          launch(this.iwv_1, VOID, VOID, PersonDetailViewModel$slambda$slambda$slambda_2(this.mwv_1, this.lwv_1, null));
          launch(this.iwv_1, VOID, VOID, PersonDetailViewModel$slambda$slambda$slambda_4(this.kwv_1, this.lwv_1, null));
          launch(this.iwv_1, VOID, VOID, PersonDetailViewModel$slambda$slambda$slambda_6(this.lwv_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PersonDetailViewModel$slambda$slambda).y77 = function (completion) {
    return new PersonDetailViewModel$slambda$slambda(this.iwv_1, this.jwv_1, this.kwv_1, this.lwv_1, this.mwv_1, completion);
  };
  function PersonDetailViewModel$slambda$slambda_0($this_launch, $entityFlow, $viewAndEditPermissionFlow, this$0, $hasManagePermissionsPermissionFlow, resultContinuation) {
    var i = new PersonDetailViewModel$slambda$slambda($this_launch, $entityFlow, $viewAndEditPermissionFlow, this$0, $hasManagePermissionsPermissionFlow, resultContinuation);
    var l = function ($completion) {
      return i.m86($completion);
    };
    l.$arity = 0;
    return l;
  }
  function _get_phoneNumberUtil__i6ank8($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.owr_1;
    phoneNumberUtil$factory_0();
    return this_0.t2();
  }
  function _get_onClickPhoneNumUseCase__2tcaut($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.pwr_1;
    onClickPhoneNumUseCase$factory_0();
    return this_0.t2();
  }
  function _get_onClickSendSmsUseCase__plj4zm($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.qwr_1;
    onClickSendSmsUseCase$factory_0();
    return this_0.t2();
  }
  function _get_onClickEmailUseCase__v8uzjh($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.rwr_1;
    onClickEmailUseCase$factory_0();
    return this_0.t2();
  }
  function navigateToEditAccount($this) {
    Companion_getInstance_112();
    $this.np1_1.sns('AccountEdit', mapOf_0(to('entityUid', $this.nwr_1.toString())));
  }
  function Companion_161() {
    this.nwv_1 = 'PersonDetailView';
  }
  var Companion_instance_209;
  function Companion_getInstance_178() {
    return Companion_instance_209;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_30(function_0) {
    this.owv_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_30).t1d = function (value, $completion) {
    return this.owv_1(value, $completion);
  };
  function PersonDetailViewModel$onClickEdit$ref_0($boundThis) {
    var l = function () {
      $boundThis.iut();
      return Unit_instance;
    };
    l.callableName = 'onClickEdit';
    return l;
  }
  function PersonDetailViewModel$slambda(this$0, resultContinuation) {
    this.xwv_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonDetailViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonDetailViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonDetailViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.zwv_1 = this.xwv_1.fp2().a7d().vfn(this.xwv_1.fp1_1, this.xwv_1.dp2());
            this.aww_1 = shareIn(this.xwv_1.fp2().c7f().xhc(this.xwv_1.dp2(), this.xwv_1.fp1_1), this.xwv_1.cp2(), Companion_getInstance_12().v1h());
            var tmp_0 = this;
            var tmp_1 = this.xwv_1.ep2().c7f();
            var tmp_2 = this.xwv_1.dp2();
            PermissionFlags_getInstance();
            tmp_0.bww_1 = tmp_1.uhc(tmp_2, new Long(4096, 0));
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.xwv_1.lwr_1, PersonDetailViewModel$slambda$slambda_0(this.ywv_1, this.zwv_1, this.aww_1, this.xwv_1, this.bww_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonDetailViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new PersonDetailViewModel$slambda(this.xwv_1, completion);
    i.ywv_1 = $this$launch;
    return i;
  };
  function PersonDetailViewModel$slambda_0(this$0, resultContinuation) {
    var i = new PersonDetailViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonDetailViewModel(di, savedStateHandle) {
    DetailViewModel.call(this, di, savedStateHandle, 'PersonDetailView');
    this.lwr_1 = MutableStateFlow(new PersonDetailUiState());
    this.mwr_1 = asStateFlow(this.lwr_1);
    var tmp = this;
    Companion_getInstance_112();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.nwr_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(IPhoneNumberUtil), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    tmp_0.owr_1 = InstanceOrNull(this, tmp$ret$0, null).n5c(this, phoneNumberUtil$factory());
    var tmp_2 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(OnClickPhoneNumUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    tmp_2.pwr_1 = Instance(this, tmp$ret$2, null).n5c(this, onClickPhoneNumUseCase$factory());
    var tmp_4 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_5 = typeToken(createKType(getKClass(OnClickSendSmsUseCase), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE();
    tmp_4.qwr_1 = InstanceOrNull(this, tmp$ret$4, null).n5c(this, onClickSendSmsUseCase$factory());
    var tmp_6 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_7 = typeToken(createKType(getKClass(OnClickEmailUseCase), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    tmp_6.rwr_1 = Instance(this, tmp$ret$6, null).n5c(this, onClickEmailUseCase$factory());
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_8 = typeToken(createKType(getKClass(UstadAccountManager), arrayOf([]), false));
    var tmp$ret$8 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
    var accountManager$delegate = Instance(this, tmp$ret$8, null).n5c(null, getLocalDelegateReference('accountManager', KProperty0, false, function () {
      return THROW_ISE();
    }));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.pp1_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.detail.PersonDetailViewModel.<anonymous>' call
        var tmp0_loadingState = Companion_getInstance_85().uol_1;
        var tmp_9 = this.jp2().en6(strings_getInstance().mlo_1);
        var tmp_10 = FabIcon_EDIT_getInstance();
        var tmp1_fabState = new FabUiState(false, tmp_9, tmp_10, PersonDetailViewModel$onClickEdit$ref_0(this));
        var nextValue = prevValue.nol(tmp1_fabState, tmp0_loadingState);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.lwr_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.detail.PersonDetailViewModel.<anonymous>' call
        var tmp0_isActiveUser = this.fp1_1.equals(this.dp2());
        var tmp1_canSendSms = !(_get_onClickSendSmsUseCase__plj4zm(this) == null);
        var nextValue_0 = prevValue_0.zwr(VOID, VOID, tmp1_canSendSms, VOID, VOID, VOID, tmp0_isActiveUser);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_11 = this.cp2();
    launch(tmp_11, VOID, VOID, PersonDetailViewModel$slambda_0(this, null));
  }
  protoOf(PersonDetailViewModel).iut = function () {
    Companion_getInstance_179();
    Companion_getInstance_112();
    this.np1_1.sns('PersonEditView', mapOf_0(to('entityUid', this.nwr_1.toString())));
  };
  protoOf(PersonDetailViewModel).tw4 = function () {
    return navigateToEditAccount(this);
  };
  protoOf(PersonDetailViewModel).cww = function () {
    return navigateToEditAccount(this);
  };
  protoOf(PersonDetailViewModel).dww = function () {
    Companion_getInstance_102();
    this.np1_1.sns('MessageList', mapOf_0(to('personUid', this.nwr_1.toString())));
  };
  protoOf(PersonDetailViewModel).eww = function () {
    var tmp0_safe_receiver = this.lwr_1.t2().swr_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.kfq_1;
    var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.k95_1;
    if (tmp2_safe_receiver == null)
      null;
    else {
      // Inline function 'kotlin.also' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.person.detail.PersonDetailViewModel.onClickDial.<anonymous>' call
      _get_onClickPhoneNumUseCase__2tcaut(this).xnn(tmp2_safe_receiver);
    }
  };
  protoOf(PersonDetailViewModel).fww = function () {
    var tmp0_safe_receiver = this.lwr_1.t2().swr_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.kfq_1;
    var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.j95_1;
    if (tmp2_safe_receiver == null)
      null;
    else {
      // Inline function 'kotlin.also' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.person.detail.PersonDetailViewModel.onClickEmail.<anonymous>' call
      _get_onClickEmailUseCase__v8uzjh(this).xnn(tmp2_safe_receiver);
    }
  };
  protoOf(PersonDetailViewModel).zq3 = function () {
    Companion_getInstance_112();
    this.np1_1.sns('SystemPermission', mapOf_0(to('personUid', this.fp1_1.toString())));
  };
  protoOf(PersonDetailViewModel).gww = function () {
    var tmp0_safe_receiver = this.lwr_1.t2().swr_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.lfq_1;
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.ofq_1;
    var ppjUid = tmp2_elvis_lhs == null ? new Long(0, 0) : tmp2_elvis_lhs;
    if (!ppjUid.equals(new Long(0, 0))) {
      Companion_getInstance_112();
      var tmp = to('entityUid', ppjUid.toString());
      Companion_getInstance_112();
      Companion_getInstance_102();
      this.np1_1.sns('ParentalConsentManagement', mapOf([tmp, to('next', '')]));
    }
  };
  function PersonDetailUiState(person, displayPhoneNum, canSendSms, clazzes, hasChangePasswordPermission, showPermissionButton, isActiveUser) {
    person = person === VOID ? null : person;
    displayPhoneNum = displayPhoneNum === VOID ? null : displayPhoneNum;
    canSendSms = canSendSms === VOID ? false : canSendSms;
    clazzes = clazzes === VOID ? emptyList() : clazzes;
    hasChangePasswordPermission = hasChangePasswordPermission === VOID ? false : hasChangePasswordPermission;
    showPermissionButton = showPermissionButton === VOID ? false : showPermissionButton;
    isActiveUser = isActiveUser === VOID ? false : isActiveUser;
    this.swr_1 = person;
    this.twr_1 = displayPhoneNum;
    this.uwr_1 = canSendSms;
    this.vwr_1 = clazzes;
    this.wwr_1 = hasChangePasswordPermission;
    this.xwr_1 = showPermissionButton;
    this.ywr_1 = isActiveUser;
  }
  protoOf(PersonDetailUiState).hww = function () {
    var tmp0_safe_receiver = this.swr_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.kfq_1;
    return isDateSet(tmp1_safe_receiver == null ? null : tmp1_safe_receiver.n95_1);
  };
  protoOf(PersonDetailUiState).iww = function () {
    var tmp;
    var tmp0_safe_receiver = this.swr_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.kfq_1;
    if (!((tmp1_safe_receiver == null ? null : tmp1_safe_receiver.l95_1) == null)) {
      var tmp2_safe_receiver = this.swr_1.kfq_1;
      tmp = !((tmp2_safe_receiver == null ? null : tmp2_safe_receiver.l95_1) === 0);
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(PersonDetailUiState).jww = function () {
    var tmp;
    var tmp0_safe_receiver = this.swr_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.kfq_1;
    if (!((tmp1_safe_receiver == null ? null : tmp1_safe_receiver.g95_1) == null)) {
      tmp = this.wwr_1;
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(PersonDetailUiState).kww = function () {
    var tmp;
    var tmp_0;
    if (!(this.swr_1 == null)) {
      var tmp0_safe_receiver = this.swr_1.kfq_1;
      tmp_0 = (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.g95_1) == null;
    } else {
      tmp_0 = false;
    }
    if (tmp_0) {
      tmp = this.wwr_1;
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(PersonDetailUiState).lww = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.swr_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.kfq_1;
    var this_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.o95_1;
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  };
  protoOf(PersonDetailUiState).mww = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.swr_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.kfq_1;
    var this_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.k95_1;
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  };
  protoOf(PersonDetailUiState).nww = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.swr_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.kfq_1;
    var this_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.j95_1;
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  };
  protoOf(PersonDetailUiState).oww = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.swr_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.kfq_1;
    var this_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.p95_1;
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  };
  protoOf(PersonDetailUiState).pww = function () {
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.swr_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.kfq_1;
    var this_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.g95_1;
    // Inline function 'kotlin.contracts.contract' call
    return !(this_0 == null ? true : isBlank(this_0));
  };
  protoOf(PersonDetailUiState).qww = function () {
    var tmp0_safe_receiver = this.swr_1;
    return !((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.lfq_1) == null);
  };
  protoOf(PersonDetailUiState).rww = function () {
    var tmp;
    // Inline function 'kotlin.text.isNullOrBlank' call
    var tmp0_safe_receiver = this.swr_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.kfq_1;
    var this_0 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.g95_1;
    // Inline function 'kotlin.contracts.contract' call
    if (!(this_0 == null ? true : isBlank(this_0))) {
      tmp = !this.ywr_1;
    } else {
      tmp = false;
    }
    return tmp;
  };
  protoOf(PersonDetailUiState).sww = function (person, displayPhoneNum, canSendSms, clazzes, hasChangePasswordPermission, showPermissionButton, isActiveUser) {
    return new PersonDetailUiState(person, displayPhoneNum, canSendSms, clazzes, hasChangePasswordPermission, showPermissionButton, isActiveUser);
  };
  protoOf(PersonDetailUiState).zwr = function (person, displayPhoneNum, canSendSms, clazzes, hasChangePasswordPermission, showPermissionButton, isActiveUser, $super) {
    person = person === VOID ? this.swr_1 : person;
    displayPhoneNum = displayPhoneNum === VOID ? this.twr_1 : displayPhoneNum;
    canSendSms = canSendSms === VOID ? this.uwr_1 : canSendSms;
    clazzes = clazzes === VOID ? this.vwr_1 : clazzes;
    hasChangePasswordPermission = hasChangePasswordPermission === VOID ? this.wwr_1 : hasChangePasswordPermission;
    showPermissionButton = showPermissionButton === VOID ? this.xwr_1 : showPermissionButton;
    isActiveUser = isActiveUser === VOID ? this.ywr_1 : isActiveUser;
    return $super === VOID ? this.sww(person, displayPhoneNum, canSendSms, clazzes, hasChangePasswordPermission, showPermissionButton, isActiveUser) : $super.sww.call(this, person, displayPhoneNum, canSendSms, clazzes, hasChangePasswordPermission, showPermissionButton, isActiveUser);
  };
  protoOf(PersonDetailUiState).toString = function () {
    return 'PersonDetailUiState(person=' + this.swr_1 + ', displayPhoneNum=' + this.twr_1 + ', canSendSms=' + this.uwr_1 + ', clazzes=' + this.vwr_1 + ', hasChangePasswordPermission=' + this.wwr_1 + ', showPermissionButton=' + this.xwr_1 + ', isActiveUser=' + this.ywr_1 + ')';
  };
  protoOf(PersonDetailUiState).hashCode = function () {
    var result = this.swr_1 == null ? 0 : this.swr_1.hashCode();
    result = imul(result, 31) + (this.twr_1 == null ? 0 : getStringHashCode(this.twr_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.uwr_1) | 0;
    result = imul(result, 31) + hashCode(this.vwr_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.wwr_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.xwr_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ywr_1) | 0;
    return result;
  };
  protoOf(PersonDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof PersonDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof PersonDetailUiState ? other : THROW_CCE();
    if (!equals(this.swr_1, tmp0_other_with_cast.swr_1))
      return false;
    if (!(this.twr_1 == tmp0_other_with_cast.twr_1))
      return false;
    if (!(this.uwr_1 === tmp0_other_with_cast.uwr_1))
      return false;
    if (!equals(this.vwr_1, tmp0_other_with_cast.vwr_1))
      return false;
    if (!(this.wwr_1 === tmp0_other_with_cast.wwr_1))
      return false;
    if (!(this.xwr_1 === tmp0_other_with_cast.xwr_1))
      return false;
    if (!(this.ywr_1 === tmp0_other_with_cast.ywr_1))
      return false;
    return true;
  };
  function phoneNumberUtil$factory() {
    return getPropertyCallableRef('phoneNumberUtil', 1, KProperty1, function (receiver) {
      return _get_phoneNumberUtil__i6ank8(receiver);
    }, null);
  }
  function onClickPhoneNumUseCase$factory() {
    return getPropertyCallableRef('onClickPhoneNumUseCase', 1, KProperty1, function (receiver) {
      return _get_onClickPhoneNumUseCase__2tcaut(receiver);
    }, null);
  }
  function onClickSendSmsUseCase$factory() {
    return getPropertyCallableRef('onClickSendSmsUseCase', 1, KProperty1, function (receiver) {
      return _get_onClickSendSmsUseCase__plj4zm(receiver);
    }, null);
  }
  function onClickEmailUseCase$factory() {
    return getPropertyCallableRef('onClickEmailUseCase', 1, KProperty1, function (receiver) {
      return _get_onClickEmailUseCase__v8uzjh(receiver);
    }, null);
  }
  function phoneNumberUtil$factory_0() {
    return getPropertyCallableRef('phoneNumberUtil', 1, KProperty1, function (receiver) {
      return _get_phoneNumberUtil__i6ank8(receiver);
    }, null);
  }
  function onClickPhoneNumUseCase$factory_0() {
    return getPropertyCallableRef('onClickPhoneNumUseCase', 1, KProperty1, function (receiver) {
      return _get_onClickPhoneNumUseCase__2tcaut(receiver);
    }, null);
  }
  function onClickSendSmsUseCase$factory_0() {
    return getPropertyCallableRef('onClickSendSmsUseCase', 1, KProperty1, function (receiver) {
      return _get_onClickSendSmsUseCase__plj4zm(receiver);
    }, null);
  }
  function onClickEmailUseCase$factory_0() {
    return getPropertyCallableRef('onClickEmailUseCase', 1, KProperty1, function (receiver) {
      return _get_onClickEmailUseCase__v8uzjh(receiver);
    }, null);
  }
  function PersonEditViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.bwx_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$slambda$slambda$slambda).fwx = function (it, $completion) {
    var tmp = this.gmp(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.fwx(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            var this_0 = this.cwx_1.a7d();
            var tmp_1;
            if (!_get_entityUid__ovkepw(this.bwx_1).equals(new Long(0, 0))) {
              tmp_1 = this_0;
            } else {
              tmp_1 = null;
            }

            tmp_0.dwx_1 = tmp_1;
            if (this.dwx_1 == null) {
              this.ewx_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.dwx_1.sfn(_get_entityUid__ovkepw(this.bwx_1), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.ewx_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return this.ewx_1;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda).gmp = function (it, completion) {
    var i = new PersonEditViewModel$slambda$slambda$slambda(this.bwx_1, completion);
    i.cwx_1 = it;
    return i;
  };
  function PersonEditViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new PersonEditViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.fwx(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonEditViewModel$slambda$slambda$slambda_1($savedStateHandle, resultContinuation) {
    this.owx_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$slambda$slambda$slambda_1).pwx = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda_1).z77 = function ($completion) {
    return this.pwx($completion);
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = new Person();
          var tmp_0 = this_0;
          var tmp0_safe_receiver = this.owx_1.ba('DateOfBirth');
          var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
          tmp_0.n95_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
          return this_0;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda_1).y77 = function (completion) {
    return new PersonEditViewModel$slambda$slambda$slambda_1(this.owx_1, completion);
  };
  function PersonEditViewModel$slambda$slambda$slambda_2($savedStateHandle, resultContinuation) {
    var i = new PersonEditViewModel$slambda$slambda$slambda_1($savedStateHandle, resultContinuation);
    var l = function ($completion) {
      return i.pwx($completion);
    };
    l.$arity = 0;
    return l;
  }
  function PersonEditViewModel$slambda$slambda$lambda(this$0) {
    return function (entityToDisplay) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.nwy_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.swz(entityToDisplay);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function PersonEditViewModel$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.bx0_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$slambda$slambda$slambda_3).dx0 = function (it, $completion) {
    var tmp = this.gmp(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.dx0(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.cx0_1.s7d().ugg(_get_entityUid__ovkepw(this.bx0_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda_3).gmp = function (it, completion) {
    var i = new PersonEditViewModel$slambda$slambda$slambda_3(this.bx0_1, completion);
    i.cx0_1 = it;
    return i;
  };
  function PersonEditViewModel$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new PersonEditViewModel$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.dx0(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonEditViewModel$slambda$slambda$slambda_5(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$slambda$slambda$slambda_5).mx0 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda_5).z77 = function ($completion) {
    return this.mx0($completion);
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return null;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PersonEditViewModel$slambda$slambda$slambda_5).y77 = function (completion) {
    return new PersonEditViewModel$slambda$slambda$slambda_5(completion);
  };
  function PersonEditViewModel$slambda$slambda$slambda_6(resultContinuation) {
    var i = new PersonEditViewModel$slambda$slambda$slambda_5(resultContinuation);
    var l = function ($completion) {
      return i.mx0($completion);
    };
    l.$arity = 0;
    return l;
  }
  function PersonEditViewModel$slambda$slambda$lambda_0(this$0) {
    return function (personPicture) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.nwy_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.swz(VOID, VOID, VOID, personPicture);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function PersonEditViewModel$slambda$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.vx0_1 = this$0;
    this.wx0_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$slambda$slambda).yx0 = function ($this$async, $completion) {
    var tmp = this.v1m($this$async, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.yx0((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonEditViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = Companion_instance_3.a4r();
            var tmp_1 = PersonEditViewModel$slambda$slambda$slambda_0(this.vx0_1, null);
            var tmp_2 = PersonEditViewModel$slambda$slambda$slambda_2(this.wx0_1, null);
            suspendResult = this.vx0_1.tp2(tmp_0, VOID, VOID, tmp_1, tmp_2, PersonEditViewModel$slambda$slambda$lambda(this.vx0_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonEditViewModel$slambda$slambda).v1m = function ($this$async, completion) {
    var i = new PersonEditViewModel$slambda$slambda(this.vx0_1, this.wx0_1, completion);
    i.xx0_1 = $this$async;
    return i;
  };
  function PersonEditViewModel$slambda$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new PersonEditViewModel$slambda$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$async, $completion) {
      return i.yx0($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonEditViewModel$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.hx1_1 = this$0;
    this.ix1_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$slambda$slambda_1).kx1 = function ($this$async, $completion) {
    var tmp = this.v1m($this$async, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonEditViewModel$slambda$slambda_1).he = function (p1, $completion) {
    return this.kx1((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonEditViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = Companion_instance_7.a4r();
            var tmp_1 = listOf_0('picState');
            var tmp_2;
            if (!_get_entityUid__ovkepw(this.hx1_1).equals(new Long(0, 0))) {
              tmp_2 = PersonEditViewModel$slambda$slambda$slambda_4(this.hx1_1, null);
            } else {
              tmp_2 = null;
            }

            var tmp_3 = tmp_2;
            var tmp_4 = PersonEditViewModel$slambda$slambda$slambda_6(null);
            suspendResult = this.hx1_1.tp2(tmp_0, tmp_1, VOID, tmp_3, tmp_4, PersonEditViewModel$slambda$slambda$lambda_0(this.hx1_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var this_0 = suspendResult;
            Companion_getInstance_110();
            var tmp1_elvis_lhs = this_0 == null ? null : this_0.f96_1;
            setIfNoValueSetYet(this.ix1_1, 'initPicUri', tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
            return this_0;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonEditViewModel$slambda$slambda_1).v1m = function ($this$async, completion) {
    var i = new PersonEditViewModel$slambda$slambda_1(this.hx1_1, this.ix1_1, completion);
    i.jx1_1 = $this$async;
    return i;
  };
  function PersonEditViewModel$slambda$slambda_2(this$0, $savedStateHandle, resultContinuation) {
    var i = new PersonEditViewModel$slambda$slambda_1(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$async, $completion) {
      return i.kx1($this$async, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.cqf();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function PersonEditViewModel$onClickSave$slambda$slambda(this$0, $savePerson, $consentToUpsert, resultContinuation) {
    this.tx1_1 = this$0;
    this.ux1_1 = $savePerson;
    this.vx1_1 = $consentToUpsert;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$onClickSave$slambda$slambda).cx2 = function (it, $completion) {
    var tmp = this.gmp(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonEditViewModel$onClickSave$slambda$slambda).he = function (p1, $completion) {
    return this.cx2(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonEditViewModel$onClickSave$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 6;
            if (this.tx1_1.rp7_1.equals(new Long(0, 0))) {
              this.hd_1 = 4;
              suspendResult = _get_addNewPersonUseCase__raa2qa(this.tx1_1).mo2(this.ux1_1, this.tx1_1.dp2(), true, VOID, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 1;
              suspendResult = this.tx1_1.fp2().a7d().tfn(this.ux1_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            this.yx1_1 = this.vx1_1;
            if (this.yx1_1 == null) {
              this.zx1_1 = null;
              this.hd_1 = 3;
              continue $sm;
            } else {
              var tmp_0 = this;
              tmp_0.ax2_1 = this.yx1_1;
              var tmp_1 = this;
              tmp_1.bx2_1 = this.ax2_1;
              this.hd_1 = 2;
              suspendResult = this.tx1_1.fp2().k7e().yga(this.bx2_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 2:
            this.zx1_1 = this.ax2_1;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            this.xx1_1 = this.zx1_1;
            this.hd_1 = 5;
            continue $sm;
          case 4:
            this.xx1_1 = suspendResult;
            this.hd_1 = 5;
            continue $sm;
          case 5:
            return this.xx1_1;
          case 6:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 6) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonEditViewModel$onClickSave$slambda$slambda).gmp = function (it, completion) {
    var i = new PersonEditViewModel$onClickSave$slambda$slambda(this.tx1_1, this.ux1_1, this.vx1_1, completion);
    i.wx1_1 = it;
    return i;
  };
  function PersonEditViewModel$onClickSave$slambda$slambda_0(this$0, $savePerson, $consentToUpsert, resultContinuation) {
    var i = new PersonEditViewModel$onClickSave$slambda$slambda(this$0, $savePerson, $consentToUpsert, resultContinuation);
    var l = function (it, $completion) {
      return i.cx2(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_apiUrlConfig__mldllg_2($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.qwy_1;
    apiUrlConfig$factory_6();
    return this_0.t2();
  }
  function _get_entityUid__ovkepw($this) {
    Companion_getInstance_102();
    var tmp0_safe_receiver = $this.lp1_1.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    return tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
  }
  function _get_phoneNumValidatorUseCase__4guu7i($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.twy_1;
    phoneNumValidatorUseCase$factory_0();
    return this_0.t2();
  }
  function _get_genderConfig__kyr0zc($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.vwy_1;
    genderConfig$factory_0();
    return this_0.t2();
  }
  function _get_enqueueSavePictureUseCase__rl1s31($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.wwy_1;
    enqueueSavePictureUseCase$factory_0();
    return this_0.t2();
  }
  function _get_addNewPersonUseCase__raa2qa($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.xwy_1;
    addNewPersonUseCase$factory_0();
    return this_0.t2();
  }
  function hasErrors_3(_this__u8e3s4, $this) {
    return ((((((((!(_this__u8e3s4.gwz_1 == null) ? true : !(_this__u8e3s4.iwz_1 == null)) ? true : !(_this__u8e3s4.kwz_1 == null)) ? true : !(_this__u8e3s4.lwz_1 == null)) ? true : !(_this__u8e3s4.owz_1 == null)) ? true : !(_this__u8e3s4.pwz_1 == null)) ? true : !(_this__u8e3s4.nwz_1 == null)) ? true : !(_this__u8e3s4.jwz_1 == null)) ? true : !(_this__u8e3s4.mwz_1 == null)) ? true : !(_this__u8e3s4.qwz_1 == null);
  }
  function validateUsername($this, username) {
    var isValid = true;
    // Inline function 'kotlin.text.isNullOrEmpty' call
    // Inline function 'kotlin.contracts.contract' call
    if (username == null ? true : charSequenceLength(username) === 0) {
      isValid = false;
    }
    if (isValid) {
      if (contains(username, ' ')) {
        isValid = false;
      }
    }
    if (isValid) {
      var usernameChars = toCharArray(username);
      var inductionVariable = 1;
      // Inline function 'kotlin.collections.count' call
      var last = usernameChars.length;
      if (inductionVariable < last)
        do {
          var i = inductionVariable;
          inductionVariable = inductionVariable + 1 | 0;
          if (isUpperCase(usernameChars[i])) {
            isValid = false;
          }
        }
         while (inductionVariable < last);
    }
    return isValid;
  }
  function Companion_162() {
    Companion_instance_210 = this;
    this.uw4_1 = 'picState';
    this.vw4_1 = 'PersonEditView';
    this.ww4_1 = 'Register';
    this.xw4_1 = listOf(['PersonEditView', 'Register']);
    this.yw4_1 = 'RegMode';
    this.zw4_1 = 'DateOfBirth';
    this.aw5_1 = 'RegViaLink';
    this.bw5_1 = 0;
    this.cw5_1 = 1;
    this.dw5_1 = 2;
    var tmp = this;
    Companion_getInstance_102();
    Companion_getInstance_102();
    Companion_getInstance_112();
    Companion_getInstance_112();
    tmp.ew5_1 = listOf(['serverUrl', 'showAccept', 'popUpToOnFinish', 'next', 'RegViaLink', 'DateOfBirth', 'RegMode', 'noSessionChange']);
    this.fw5_1 = 'initDob';
  }
  var Companion_instance_210;
  function Companion_getInstance_179() {
    if (Companion_instance_210 == null)
      new Companion_162();
    return Companion_instance_210;
  }
  function PersonEditViewModel$slambda(this$0, resultContinuation) {
    this.lx2_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$slambda).oqh = function (db, $completion) {
    var tmp = this.gmp(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonEditViewModel$slambda).he = function (p1, $completion) {
    return this.oqh(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonEditViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            if (!(this.lx2_1.pwy_1 === 0) ? this.lx2_1.rp7_1.equals(new Long(0, 0)) : false) {
              this.nx2_1 = true;
              this.hd_1 = 4;
              continue $sm;
            } else {
              if (!this.lx2_1.rp7_1.equals(new Long(0, 0)) ? this.lx2_1.dp2().equals(this.lx2_1.rp7_1) : false) {
                this.nx2_1 = true;
                this.hd_1 = 4;
                continue $sm;
              } else {
                if (this.lx2_1.rp7_1.equals(new Long(0, 0))) {
                  this.hd_1 = 2;
                  var tmp_0 = this.mx2_1.c7f();
                  var tmp_1 = this.lx2_1.dp2();
                  PermissionFlags_getInstance();
                  suspendResult = tmp_0.thc(tmp_1, new Long(1024, 0), this);
                  if (suspendResult === get_COROUTINE_SUSPENDED()) {
                    return suspendResult;
                  }
                  continue $sm;
                } else {
                  this.hd_1 = 1;
                  var tmp_2 = this.mx2_1.c7f();
                  var tmp_3 = this.lx2_1.dp2();
                  PermissionFlags_getInstance();
                  suspendResult = tmp_2.thc(tmp_3, new Long(32768, 0), this);
                  if (suspendResult === get_COROUTINE_SUSPENDED()) {
                    return suspendResult;
                  }
                  continue $sm;
                }
              }
            }

          case 1:
            this.nx2_1 = suspendResult;
            this.hd_1 = 4;
            continue $sm;
          case 2:
            this.nx2_1 = suspendResult;
            this.hd_1 = 4;
            continue $sm;
          case 3:
            throw this.kd_1;
          case 4:
            return this.nx2_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonEditViewModel$slambda).gmp = function (db, completion) {
    var i = new PersonEditViewModel$slambda(this.lx2_1, completion);
    i.mx2_1 = db;
    return i;
  };
  function PersonEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new PersonEditViewModel$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.oqh(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonEditViewModel$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.nwy_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.swz(VOID, VOID, VOID, VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function PersonEditViewModel$slambda_1(this$0, $savedStateHandle, resultContinuation) {
    this.wx2_1 = this$0;
    this.xx2_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$slambda_1).u1m = function ($this$launchIfHasPermission, $completion) {
    var tmp = this.v1m($this$launchIfHasPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonEditViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonEditViewModel$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = async(this.yx2_1, VOID, VOID, PersonEditViewModel$slambda$slambda_0(this.wx2_1, this.xx2_1, null));
            suspendResult = awaitAll([tmp_0, async(this.yx2_1, VOID, VOID, PersonEditViewModel$slambda$slambda_2(this.wx2_1, this.xx2_1, null))], this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.wx2_1.pp1_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_1;
                if (hasFlag(this.wx2_1.pwy_1, 1)) {
                  tmp_1 = this.wx2_1.jp2().en6(strings_getInstance().wld_1);
                } else {
                  tmp_1 = this.wx2_1.jp2().en6(strings_getInstance().alw_1);
                }
                var tmp_2 = tmp_1;
                var nextValue = prevValue.nol(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_2, VOID, PersonEditViewModel$onClickSave$ref(this.wx2_1)));
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            var tmp_3;
            if (hasFlag(this.wx2_1.pwy_1, 2)) {
              tmp_3 = new PersonParentJoin();
            } else {
              tmp_3 = null;
            }

            var personParentJoin = tmp_3;
            l$ret$3: do {
              var this_1 = this.wx2_1.nwy_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.swz(VOID, VOID, VOID, VOID, true, personParentJoin);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            this.wx2_1.lp2(Companion_getInstance_85().vol_1);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonEditViewModel$slambda_1).v1m = function ($this$launchIfHasPermission, completion) {
    var i = new PersonEditViewModel$slambda_1(this.wx2_1, this.xx2_1, completion);
    i.yx2_1 = $this$launchIfHasPermission;
    return i;
  };
  function PersonEditViewModel$slambda_2(this$0, $savedStateHandle, resultContinuation) {
    var i = new PersonEditViewModel$slambda_1(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launchIfHasPermission, $completion) {
      return i.u1m($this$launchIfHasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.hx3_1 = $commitDelay;
    this.ix3_1 = $entity;
    this.jx3_1 = $this;
    this.kx3_1 = $key;
    this.lx3_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$onEntityChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonEditViewModel$onEntityChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonEditViewModel$onEntityChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.hx3_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.ix3_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.jx3_1.pp2(this.jx3_1.lp1_1, this.kx3_1, this.lx3_1, this.ix3_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonEditViewModel$onEntityChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new PersonEditViewModel$onEntityChanged$slambda(this.hx3_1, this.ix3_1, this.jx3_1, this.kx3_1, this.lx3_1, completion);
    i.mx3_1 = $this$launch;
    return i;
  };
  function PersonEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new PersonEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonEditViewModel$onPersonPictureChanged$slambda(this$0, $personPicture, resultContinuation) {
    this.vx3_1 = this$0;
    this.wx3_1 = $personPicture;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$onPersonPictureChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonEditViewModel$onPersonPictureChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonEditViewModel$onPersonPictureChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.vx3_1.pp2(this.vx3_1.lp1_1, 'picState', Companion_instance_7.a4r(), this.wx3_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonEditViewModel$onPersonPictureChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new PersonEditViewModel$onPersonPictureChanged$slambda(this.vx3_1, this.wx3_1, completion);
    i.xx3_1 = $this$launch;
    return i;
  };
  function PersonEditViewModel$onPersonPictureChanged$slambda_0(this$0, $personPicture, resultContinuation) {
    var i = new PersonEditViewModel$onPersonPictureChanged$slambda(this$0, $personPicture, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonEditViewModel$onClickSave$lambda($this$shallowCopy) {
    var tmp = $this$shallowCopy;
    var tmp0_safe_receiver = $this$shallowCopy.k95_1;
    var tmp_0;
    if (tmp0_safe_receiver == null) {
      tmp_0 = null;
    } else {
      // Inline function 'kotlin.text.trim' call
      tmp_0 = toString(trim(isCharSequence(tmp0_safe_receiver) ? tmp0_safe_receiver : THROW_CCE()));
    }
    var tmp1_safe_receiver = tmp_0;
    tmp.k95_1 = tmp1_safe_receiver == null ? null : replace(tmp1_safe_receiver, ' ', '');
    var tmp_1 = $this$shallowCopy;
    var tmp2_safe_receiver = $this$shallowCopy.j95_1;
    var tmp_2;
    if (tmp2_safe_receiver == null) {
      tmp_2 = null;
    } else {
      // Inline function 'kotlin.text.trim' call
      tmp_2 = toString(trim(isCharSequence(tmp2_safe_receiver) ? tmp2_safe_receiver : THROW_CCE()));
    }
    tmp_1.j95_1 = tmp_2;
    return Unit_instance;
  }
  function PersonEditViewModel$onClickSave$slambda($isRegistrationMode, this$0, $savePerson, $requiredFieldMessage, resultContinuation) {
    this.gx4_1 = $isRegistrationMode;
    this.hx4_1 = this$0;
    this.ix4_1 = $savePerson;
    this.jx4_1 = $requiredFieldMessage;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonEditViewModel$onClickSave$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonEditViewModel$onClickSave$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonEditViewModel$onClickSave$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 14;
            if (this.gx4_1) {
              this.lx4_1 = this.hx4_1.nwy_1.t2().ewz_1;
              this.mx4_1 = this.hx4_1.nwy_1.t2().awz_1;
              var tmp_0 = this;
              var tmp$ret$0;
              l$ret$1: do {
                var this_0 = this.hx4_1.nwy_1;
                while (true) {
                  var prevValue = this_0.t2();
                  var tmp_1;
                  var this_1 = this.ix4_1.g95_1;
                  if (this_1 == null ? true : charSequenceLength(this_1) === 0) {
                    tmp_1 = this.jx4_1;
                  } else {
                    tmp_1 = null;
                  }
                  var tmp3_usernameError = tmp_1;
                  var tmp_2;
                  var this_2 = this.mx4_1;
                  if (this_2 == null ? true : charSequenceLength(this_2) === 0) {
                    tmp_2 = this.jx4_1;
                  } else {
                    tmp_2 = null;
                  }
                  var tmp4_passwordError = tmp_2;
                  var tmp_3;
                  if (!hasFlag(this.hx4_1.pwy_1, 2)) {
                    tmp_3 = null;
                  } else {
                    var tmp0_safe_receiver = this.lx4_1;
                    var this_3 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.wfq_1;
                    if (this_3 == null ? true : charSequenceLength(this_3) === 0) {
                      tmp_3 = this.jx4_1;
                    } else {
                      var tmp1_safe_receiver = this.lx4_1;
                      var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.wfq_1;
                      var tmp_4;
                      if (tmp2_safe_receiver == null) {
                        tmp_4 = null;
                      } else {
                        tmp_4 = this.hx4_1.uwy_1.vnv(tmp2_safe_receiver);
                      }
                      if (tmp_4 == null) {
                        tmp_3 = this.hx4_1.jp2().en6(strings_getInstance().hm3_1);
                      } else {
                        tmp_3 = null;
                      }
                    }
                  }
                  var tmp5_parentContactError = tmp_3;
                  var tmp_5;
                  if (this.ix4_1.n95_1.equals(new Long(0, 0))) {
                    tmp_5 = this.jx4_1;
                  } else {
                    tmp_5 = null;
                  }
                  var tmp6_dateOfBirthError = tmp_5;
                  var nextValue = prevValue.swz(VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp3_usernameError, VOID, tmp4_passwordError, VOID, VOID, tmp6_dateOfBirthError, tmp5_parentContactError);
                  if (this_0.y1k(prevValue, nextValue)) {
                    tmp$ret$0 = nextValue;
                    break l$ret$1;
                  }
                }
              }
               while (false);
              tmp_0.nx4_1 = tmp$ret$0;
              if (hasErrors_3(this.nx4_1, this.hx4_1) ? true : this.mx4_1 == null) {
                this.hx4_1.lp2(Companion_getInstance_85().vol_1);
                l$ret$3: do {
                  var this_4 = this.hx4_1.nwy_1;
                  while (true) {
                    var prevValue_0 = this_4.t2();
                    var nextValue_0 = prevValue_0.swz(VOID, VOID, VOID, VOID, true);
                    if (this_4.y1k(prevValue_0, nextValue_0)) {
                      break l$ret$3;
                    }
                  }
                }
                 while (false);
                return Unit_instance;
              }
              this.hd_1 = 9;
              continue $sm;
            } else {
              var tmp_6;
              if (!this.hx4_1.rp7_1.equals(new Long(0, 0)) ? isDateOfBirthAMinor(Companion_getInstance_6().zla(this.ix4_1.n95_1)) : false) {
                var tmp_7 = Companion_getInstance_6();
                var tmp0_safe_receiver_0 = this.hx4_1.lp1_1.ba('initDob');
                var tmp1_elvis_lhs = tmp0_safe_receiver_0 == null ? null : toLong_0(tmp0_safe_receiver_0);
                tmp_6 = !isDateOfBirthAMinor(tmp_7.zla(tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs));
              } else {
                tmp_6 = false;
              }
              if (tmp_6) {
                this.hd_1 = 1;
                suspendResult = this.hx4_1.fp2().k7e().bgb(this.ix4_1.f95_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                this.qx4_1 = false;
                this.hd_1 = 2;
                continue $sm;
              }
            }

          case 1:
            this.rx4_1 = suspendResult;
            this.qx4_1 = !this.rx4_1;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (this.qx4_1) {
              var tmp_8 = this;
              var this_5 = new PersonParentJoin();
              this_5.ufq_1 = this.ix4_1.f95_1;
              this_5.tfq_1 = this.hx4_1.bp2().vmx().gju_1;
              var tmp_9 = this_5;
              tmp_9.zfq_1 = 1;
              this_5.afr_1 = systemTimeInMillis();
              tmp_8.px4_1 = this_5;
              this.hd_1 = 3;
              continue $sm;
            } else {
              var tmp_10 = this;
              tmp_10.px4_1 = null;
              this.hd_1 = 3;
              continue $sm;
            }

          case 3:
            this.sx4_1 = this.px4_1;
            this.hd_1 = 4;
            var tmp_11 = this.hx4_1.fp2();
            suspendResult = withDoorTransactionAsync(tmp_11, VOID, PersonEditViewModel$onClickSave$slambda$slambda_0(this.hx4_1, this.ix4_1, this.sx4_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.tx4_1 = this.hx4_1.nwy_1.t2().cwz_1;
            if (!(this.tx4_1 == null)) {
              this.tx4_1.d96_1 = this.ix4_1.f95_1;
              this.tx4_1.e96_1 = systemTimeInMillis();
              var tmp_12 = this;
              Companion_getInstance_110();
              var tmp2_elvis_lhs = this.hx4_1.lp1_1.ba('initPicUri');
              tmp_12.ux4_1 = tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs;
              this.vx4_1 = this.tx4_1.f96_1;
              if (!(this.ux4_1 === this.vx4_1)) {
                this.hd_1 = 5;
                suspendResult = this.hx4_1.ep2().s7d().tgg(this.tx4_1, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                this.hd_1 = 7;
                continue $sm;
              }
            } else {
              this.hd_1 = 8;
              continue $sm;
            }

          case 5:
            this.hd_1 = 6;
            var tmp_13 = _get_enqueueSavePictureUseCase__rl1s31(this.hx4_1);
            var tmp_14 = this.ix4_1.f95_1;
            suspendResult = tmp_13.pne(tmp_14, 50, this.vx4_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            this.hd_1 = 7;
            continue $sm;
          case 7:
            this.hd_1 = 8;
            continue $sm;
          case 8:
            var tmp_15 = this;
            tmp_15.wx4_1 = this.hx4_1.lp1_1.ba('goToOnPersonSelected');
            if (!(this.wx4_1 == null)) {
              var tmp_16 = UMFileUtil_getInstance().parseURLQueryString(this.wx4_1);
              Companion_getInstance_102();
              var args = plus_0(tmp_16, mapOf_0(to('personUid', this.ix4_1.f95_1.toString())));
              this.hx4_1.np1_1.sns(substringBefore_0(this.wx4_1, '?'), args);
            } else {
              this.hx4_1.tp7('PersonDetailView', this.ix4_1.f95_1, this.ix4_1);
            }

            this.hd_1 = 17;
            continue $sm;
          case 9:
            this.hd_1 = 10;
            continue $sm;
          case 10:
            this.id_1 = 13;
            this.id_1 = 12;
            this.hd_1 = 11;
            suspendResult = this.hx4_1.bp2().amy(this.ix4_1, this.mx4_1, this.hx4_1.rwy_1, new AccountRegisterOptions(!hasFlag(this.hx4_1.pwy_1, 2) ? !this.hx4_1.ywy_1 : false, this.lx4_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 11:
            var registeredPerson = suspendResult;
            var tmp_17 = this;
            var tmp_18;
            if (hasFlag(this.hx4_1.pwy_1, 2)) {
              var goOptions = new UstadGoOptions('RegisterAgeRedirect', true);
              var this_6 = LinkedHashMap_init_$Create$();
              var key = 'username';
              var tmp0_elvis_lhs = this.ix4_1.g95_1;
              var value = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
              this_6.s(key, value);
              var key_0 = 'parentContact';
              var tmp1_safe_receiver_0 = this.lx4_1;
              var tmp2_elvis_lhs_0 = tmp1_safe_receiver_0 == null ? null : tmp1_safe_receiver_0.wfq_1;
              var value_0 = tmp2_elvis_lhs_0 == null ? '' : tmp2_elvis_lhs_0;
              this_6.s(key_0, value_0);
              var key_1 = 'password';
              var tmp3_elvis_lhs = this.hx4_1.nwy_1.t2().awz_1;
              var value_1 = tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs;
              this_6.s(key_1, value_1);
              Companion_getInstance_102();
              putFromSavedStateIfPresent(this_6, this.hx4_1.lp1_1, 'popUpToOnFinish');
              var args_0 = this_6;
              this.hx4_1.np1_1.eoo('WaitForParent', args_0, goOptions);
              tmp_18 = Unit_instance;
            } else {
              this.hx4_1.xp8(this.hx4_1.np1_1, appendSelectedAccount(this.hx4_1.swy_1, registeredPerson.f95_1, new Endpoint(this.hx4_1.rwy_1)), new UstadGoOptions(VOID, VOID, true));
              tmp_18 = Unit_instance;
            }

            tmp_17.ox4_1 = tmp_18;
            this.id_1 = 14;
            this.hd_1 = 16;
            continue $sm;
          case 12:
            this.id_1 = 13;
            var tmp_19 = this.kd_1;
            if (tmp_19 instanceof Exception) {
              var e = this.kd_1;
              if (e instanceof IllegalStateException) {
                l$ret$7: do {
                  var this_7 = this.hx4_1.nwy_1;
                  while (true) {
                    var prevValue_1 = this_7.t2();
                    var nextValue_1 = prevValue_1.swz(VOID, VOID, VOID, VOID, VOID, VOID, VOID, this.hx4_1.jp2().en6(strings_getInstance().rm0_1));
                    if (this_7.y1k(prevValue_1, nextValue_1)) {
                      break l$ret$7;
                    }
                  }
                }
                 while (false);
              } else {
                this.hx4_1.hp2().com(new Snack(this.hx4_1.jp2().en6(strings_getInstance().olc_1)));
              }
              this.xx4_1 = Unit_instance;
              this.id_1 = 14;
              this.hd_1 = 15;
              var tmp_20 = this;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 13:
            this.id_1 = 14;
            var t = this.kd_1;
            this.hx4_1.lp2(Companion_getInstance_85().vol_1);
            l$ret$11: do {
              var this_8 = this.hx4_1.nwy_1;
              while (true) {
                var prevValue_2 = this_8.t2();
                var nextValue_2 = prevValue_2.swz(VOID, VOID, VOID, VOID, true);
                if (this_8.y1k(prevValue_2, nextValue_2)) {
                  break l$ret$11;
                }
              }
            }
             while (false);
            throw t;
          case 14:
            throw this.kd_1;
          case 15:
            this.id_1 = 14;
            this.hx4_1.lp2(Companion_getInstance_85().vol_1);
            l$ret$13: do {
              var this_9 = this.hx4_1.nwy_1;
              while (true) {
                var prevValue_3 = this_9.t2();
                var nextValue_3 = prevValue_3.swz(VOID, VOID, VOID, VOID, true);
                if (this_9.y1k(prevValue_3, nextValue_3)) {
                  break l$ret$13;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 16:
            this.id_1 = 14;
            this.hx4_1.lp2(Companion_getInstance_85().vol_1);
            l$ret$15: do {
              var this_10 = this.hx4_1.nwy_1;
              while (true) {
                var prevValue_4 = this_10.t2();
                var nextValue_4 = prevValue_4.swz(VOID, VOID, VOID, VOID, true);
                if (this_10.y1k(prevValue_4, nextValue_4)) {
                  break l$ret$15;
                }
              }
            }
             while (false);
            this.hd_1 = 17;
            continue $sm;
          case 17:
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 14) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(PersonEditViewModel$onClickSave$slambda).v1m = function ($this$launch, completion) {
    var i = new PersonEditViewModel$onClickSave$slambda(this.gx4_1, this.hx4_1, this.ix4_1, this.jx4_1, completion);
    i.kx4_1 = $this$launch;
    return i;
  };
  function PersonEditViewModel$onClickSave$slambda_0($isRegistrationMode, this$0, $savePerson, $requiredFieldMessage, resultContinuation) {
    var i = new PersonEditViewModel$onClickSave$slambda($isRegistrationMode, this$0, $savePerson, $requiredFieldMessage, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonEditViewModel(di, savedStateHandle, destName) {
    Companion_getInstance_179();
    destName = destName === VOID ? 'PersonEditView' : destName;
    UstadEditViewModel.call(this, di, savedStateHandle, destName);
    this.nwy_1 = MutableStateFlow(new PersonEditUiState());
    this.owy_1 = asStateFlow(this.nwy_1);
    var tmp = this;
    var tmp0_safe_receiver = savedStateHandle.ba('RegMode');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toInt(tmp0_safe_receiver);
    tmp.pwy_1 = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
    var tmp_0 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(ApiUrlConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    tmp_0.qwy_1 = Instance(this, tmp$ret$0, null).n5c(this, apiUrlConfig$factory_5());
    var tmp_2 = this;
    Companion_getInstance_102();
    var tmp0_elvis_lhs = savedStateHandle.ba('serverUrl');
    var tmp1_elvis_lhs_0 = tmp0_elvis_lhs == null ? _get_apiUrlConfig__mldllg_2(this).smx_1 : tmp0_elvis_lhs;
    tmp_2.rwy_1 = tmp1_elvis_lhs_0 == null ? 'http://localhost' : tmp1_elvis_lhs_0;
    var tmp_3 = this;
    Companion_getInstance_102();
    var tmp0_elvis_lhs_0 = savedStateHandle.ba('next');
    tmp_3.swy_1 = tmp0_elvis_lhs_0 == null ? this.jp2().hok() : tmp0_elvis_lhs_0;
    var tmp_4 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_5 = typeToken(createKType(getKClass(PhoneNumValidatorUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_5, TypeToken) ? tmp_5 : THROW_CCE();
    tmp_4.twy_1 = Instance(this, tmp$ret$2, null).n5c(this, phoneNumValidatorUseCase$factory());
    this.uwy_1 = new ValidateEmailUseCase();
    var tmp_6 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_7 = typeToken(createKType(getKClass(GenderConfig), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    tmp_6.vwy_1 = Instance(this, tmp$ret$4, null).n5c(this, genderConfig$factory());
    var tmp_8 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = this.bp2().xmx();
    var trigger = this.q56();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_9 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_10 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_10, TypeToken) ? tmp_10 : THROW_CCE();
    var tmp$ret$7 = tmp_9.u56(tmp$ret$6, context);
    var this_0 = On(this, tmp$ret$7, trigger);
    // Inline function 'org.kodein.type.generic' call
    var tmp_11 = typeToken(createKType(getKClass(EnqueueSavePictureUseCase), arrayOf([]), false));
    var tmp$ret$9 = isInterface(tmp_11, TypeToken) ? tmp_11 : THROW_CCE();
    tmp_8.wwy_1 = Instance(this_0, tmp$ret$9, null).n5c(this, enqueueSavePictureUseCase$factory());
    var tmp_12 = this;
    // Inline function 'org.kodein.di.instance' call
    var this_1 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_13 = typeToken(createKType(getKClass(AddNewPersonUseCase), arrayOf([]), false));
    var tmp$ret$11 = isInterface(tmp_13, TypeToken) ? tmp_13 : THROW_CCE();
    tmp_12.xwy_1 = Instance(this_1, tmp$ret$11, null).n5c(this, addNewPersonUseCase$factory());
    var tmp_14 = this;
    Companion_getInstance_112();
    var tmp0_safe_receiver_0 = savedStateHandle.ba('noSessionChange');
    var tmp1_elvis_lhs_1 = tmp0_safe_receiver_0 == null ? null : toBoolean(tmp0_safe_receiver_0);
    tmp_14.ywy_1 = tmp1_elvis_lhs_1 == null ? false : tmp1_elvis_lhs_1;
    this.lp2(Companion_getInstance_85().uol_1);
    var tmp_15;
    if (hasFlag(this.pwy_1, 1)) {
      tmp_15 = this.jp2().en6(strings_getInstance().cme_1);
    } else {
      tmp_15 = _get_entityUid__ovkepw(this).equals(new Long(0, 0)) ? this.jp2().en6(strings_getInstance().mlu_1) : this.jp2().en6(strings_getInstance().nlu_1);
    }
    var title = tmp_15;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.pp1_1;
      while (true) {
        var prevValue = this_2.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.<anonymous>' call
        var tmp0_navigationVisible = !hasFlag(this.pwy_1, 1);
        var nextValue = new AppUiState(VOID, VOID, title, tmp0_navigationVisible, true);
        if (this_2.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_3 = this.nwy_1;
      while (true) {
        var prevValue_0 = this_3.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.<anonymous>' call
        var nextValue_0 = prevValue_0.swz(VOID, VOID, _get_genderConfig__kyr0zc(this).mom_1, VOID, VOID, VOID, this.pwy_1);
        if (this_3.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp_16 = PersonEditViewModel$slambda_0(this, null);
    var tmp_17 = PersonEditViewModel$lambda(this);
    this.up2(tmp_16, true, tmp_17, PersonEditViewModel$slambda_2(this, savedStateHandle, null));
  }
  protoOf(PersonEditViewModel).yx4 = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.nwy_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onEntityChanged.<anonymous>' call
        var tmp4_safe_receiver = prevValue.zwy_1;
        var tmp = tmp4_safe_receiver == null ? null : tmp4_safe_receiver.l95_1;
        var tmp12_genderError = this.wp8(tmp, entity == null ? null : entity.l95_1, prevValue.nwz_1);
        var tmp6_safe_receiver = prevValue.zwy_1;
        var tmp_0 = tmp6_safe_receiver == null ? null : tmp6_safe_receiver.h95_1;
        var tmp13_firstNameError = this.wp8(tmp_0, entity == null ? null : entity.h95_1, prevValue.owz_1);
        var tmp8_safe_receiver = prevValue.zwy_1;
        var tmp_1 = tmp8_safe_receiver == null ? null : tmp8_safe_receiver.i95_1;
        var tmp14_lastNameError = this.wp8(tmp_1, entity == null ? null : entity.i95_1, prevValue.pwz_1);
        var tmp10_safe_receiver = prevValue.zwy_1;
        var tmp_2 = tmp10_safe_receiver == null ? null : tmp10_safe_receiver.k95_1;
        var tmp15_phoneNumError = this.wp8(tmp_2, entity == null ? null : entity.k95_1, prevValue.qwz_1);
        var tmp2_safe_receiver = prevValue.zwy_1;
        var tmp_3 = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.j95_1;
        var tmp16_emailError = this.wp8(tmp_3, entity == null ? null : entity.j95_1, prevValue.jwz_1);
        var tmp0_safe_receiver = prevValue.zwy_1;
        var tmp_4 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.g95_1;
        var tmp17_usernameError = this.wp8(tmp_4, entity == null ? null : entity.g95_1, prevValue.gwz_1);
        var nextValue = prevValue.swz(entity, VOID, VOID, VOID, VOID, VOID, VOID, tmp17_usernameError, VOID, VOID, tmp16_emailError, VOID, VOID, VOID, tmp12_genderError, tmp13_firstNameError, tmp14_lastNameError, tmp15_phoneNumError);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_3.a4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_112();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.qp7_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_5 = this;
    var tmp_6 = this.cp2();
    tmp_5.qp7_1 = launch(tmp_6, VOID, VOID, PersonEditViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(PersonEditViewModel).zx4 = function (password) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.nwy_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onPasswordChanged.<anonymous>' call
        var nextValue = prevValue.swz(VOID, password, VOID, VOID, VOID, VOID, VOID, VOID, VOID, null);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(PersonEditViewModel).ax5 = function (pictureUri) {
    // Inline function 'kotlin.apply' call
    var this_0 = new PersonPicture();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onPersonPictureChanged.<anonymous>' call
    var tmp = this_0;
    var tmp0_safe_receiver = this.nwy_1.t2().cwz_1;
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.d96_1;
    tmp.d96_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    this_0.f96_1 = pictureUri;
    var personPicture = this_0;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.nwy_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onPersonPictureChanged.<anonymous>' call
        var nextValue = prevValue.swz(VOID, VOID, VOID, personPicture);
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_0 = this.cp2();
    launch(tmp_0, VOID, VOID, PersonEditViewModel$onPersonPictureChanged$slambda_0(this, personPicture, null));
  };
  protoOf(PersonEditViewModel).bx5 = function (personParentJoin) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.nwy_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onApprovalPersonParentJoinChanged.<anonymous>' call
        var nextValue = prevValue.swz(VOID, VOID, VOID, VOID, VOID, personParentJoin);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(PersonEditViewModel).cx5 = function (phoneNumSet) {
    // Inline function 'kotlin.takeIf' call
    var this_0 = this.nwy_1;
    // Inline function 'kotlin.contracts.contract' call
    var tmp;
    // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onNationalPhoneNumSetChanged.<anonymous>' call
    if (!(this_0.t2().rwz_1 === phoneNumSet)) {
      tmp = this_0;
    } else {
      tmp = null;
    }
    var tmp0_safe_receiver = tmp;
    if (tmp0_safe_receiver == null)
      null;
    else {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        while (true) {
          var prevValue = tmp0_safe_receiver.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onNationalPhoneNumSetChanged.<anonymous>' call
          var nextValue = prevValue.swz(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, phoneNumSet);
          if (tmp0_safe_receiver.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    }
  };
  protoOf(PersonEditViewModel).cqf = function () {
    if (!this.nwy_1.t2().dwz_1)
      return Unit_instance;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.nwy_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onClickSave.<anonymous>' call
        var nextValue = prevValue.swz(VOID, VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.lp2(Companion_getInstance_85().uol_1);
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.nwy_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onClickSave.<anonymous>' call
        var nextValue_0 = prevValue_0.swz(VOID, VOID, VOID, VOID, false);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
    var tmp0_safe_receiver = this.nwy_1.t2().zwy_1;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      tmp = shallowCopy(tmp0_safe_receiver, PersonEditViewModel$onClickSave$lambda);
    }
    var tmp1_elvis_lhs = tmp;
    var tmp_0;
    if (tmp1_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp_0 = tmp1_elvis_lhs;
    }
    var savePerson = tmp_0;
    var requiredFieldMessage = this.jp2().en6(strings_getInstance().blh_1);
    var currentTime = systemTimeInMillis();
    var isRegistrationMode = hasFlag(this.pwy_1, 1);
    var tmp2_safe_receiver = savePerson.j95_1;
    var tmp_1;
    if (tmp2_safe_receiver == null) {
      tmp_1 = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onClickSave.<anonymous>' call
      tmp_1 = this.uwy_1.vnv(tmp2_safe_receiver);
    }
    var validatedEmailAddr = tmp_1;
    $l$block_1: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_2 = this.nwy_1;
      while (true) {
        var prevValue_1 = this_2.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onClickSave.<anonymous>' call
        var tmp_2;
        var tmp_3;
        if (isRegistrationMode) {
          var tmp0_elvis_lhs = savePerson.g95_1;
          tmp_3 = !validateUsername(this, tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs);
        } else {
          tmp_3 = false;
        }
        if (tmp_3) {
          tmp_2 = this.jp2().en6(strings_getInstance().flj_1);
        } else {
          tmp_2 = null;
        }
        var tmp2_usernameError = tmp_2;
        var tmp_4;
        var tmp_5;
        if (isRegistrationMode) {
          // Inline function 'kotlin.text.isNullOrBlank' call
          var this_3 = savePerson.g95_1;
          // Inline function 'kotlin.contracts.contract' call
          tmp_5 = this_3 == null ? true : isBlank(this_3);
        } else {
          tmp_5 = false;
        }
        if (tmp_5) {
          tmp_4 = this.jp2().en6(strings_getInstance().blh_1);
        } else {
          tmp_4 = null;
        }
        var tmp3_passwordError = tmp_4;
        var tmp_6;
        if (savePerson.n95_1.c7(currentTime) > 0) {
          tmp_6 = this.jp2().en6(strings_getInstance().flj_1);
        } else if (isRegistrationMode ? !isDateSet(savePerson.n95_1) : false) {
          tmp_6 = this.jp2().en6(strings_getInstance().blh_1);
        } else {
          tmp_6 = null;
        }
        var tmp4_dateOfBirthError = tmp_6;
        var tmp_7;
        // Inline function 'kotlin.text.isNullOrEmpty' call
        var this_4 = savePerson.h95_1;
        // Inline function 'kotlin.contracts.contract' call
        if (this_4 == null ? true : charSequenceLength(this_4) === 0) {
          tmp_7 = requiredFieldMessage;
        } else {
          tmp_7 = null;
        }
        var tmp5_firstNameError = tmp_7;
        var tmp_8;
        // Inline function 'kotlin.text.isNullOrEmpty' call
        var this_5 = savePerson.i95_1;
        // Inline function 'kotlin.contracts.contract' call
        if (this_5 == null ? true : charSequenceLength(this_5) === 0) {
          tmp_8 = requiredFieldMessage;
        } else {
          tmp_8 = null;
        }
        var tmp6_lastNameError = tmp_8;
        var tmp_9;
        var tmp_10 = savePerson.l95_1;
        if (tmp_10 === 0) {
          tmp_9 = requiredFieldMessage;
        } else {
          tmp_9 = null;
        }
        var tmp7_genderError = tmp_9;
        var tmp_11;
        var tmp_12;
        if (this.nwy_1.t2().rwz_1) {
          var tmp1_safe_receiver = savePerson.k95_1;
          var tmp_13;
          if (tmp1_safe_receiver == null) {
            tmp_13 = null;
          } else {
            // Inline function 'kotlin.let' call
            // Inline function 'kotlin.contracts.contract' call
            // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onClickSave.<anonymous>.<anonymous>' call
            tmp_13 = _get_phoneNumValidatorUseCase__4guu7i(this).zo2(tmp1_safe_receiver);
          }
          tmp_12 = !(tmp_13 === true);
        } else {
          tmp_12 = false;
        }
        if (tmp_12) {
          tmp_11 = this.jp2().en6(strings_getInstance().flj_1);
        } else {
          tmp_11 = null;
        }
        var tmp8_phoneNumError = tmp_11;
        var tmp_14;
        var tmp_15;
        // Inline function 'kotlin.text.isNullOrBlank' call
        var this_6 = savePerson.j95_1;
        // Inline function 'kotlin.contracts.contract' call
        if (!(this_6 == null ? true : isBlank(this_6))) {
          tmp_15 = validatedEmailAddr == null;
        } else {
          tmp_15 = false;
        }
        if (tmp_15) {
          tmp_14 = this.jp2().en6(strings_getInstance().flj_1);
        } else {
          tmp_14 = null;
        }
        var tmp9_emailError = tmp_14;
        var nextValue_1 = prevValue_1.swz(VOID, VOID, VOID, VOID, VOID, VOID, VOID, tmp2_usernameError, VOID, tmp3_passwordError, tmp9_emailError, null, tmp4_dateOfBirthError, null, tmp7_genderError, tmp5_firstNameError, tmp6_lastNameError, tmp8_phoneNumError);
        if (this_2.y1k(prevValue_1, nextValue_1)) {
          break $l$block_1;
        }
      }
    }
    if (hasErrors_3(this.nwy_1.t2(), this)) {
      this.lp2(Companion_getInstance_85().vol_1);
      $l$block_2: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_7 = this.nwy_1;
        while (true) {
          var prevValue_2 = this_7.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.edit.PersonEditViewModel.onClickSave.<anonymous>' call
          var nextValue_2 = prevValue_2.swz(VOID, VOID, VOID, VOID, true);
          if (this_7.y1k(prevValue_2, nextValue_2)) {
            break $l$block_2;
          }
        }
      }
      return Unit_instance;
    }
    var tmp_16 = this.cp2();
    launch(tmp_16, VOID, VOID, PersonEditViewModel$onClickSave$slambda_0(isRegistrationMode, this, savePerson, requiredFieldMessage, null));
  };
  function PersonEditUiState(person, password, genderOptions, personPicture, fieldsEnabled, approvalPersonParentJoin, registrationMode, usernameError, passwordConfirmedError, passwordError, emailError, confirmError, dateOfBirthError, parentContactError, genderError, firstNameError, lastNameError, phoneNumError, nationalPhoneNumSet) {
    person = person === VOID ? null : person;
    password = password === VOID ? null : password;
    genderOptions = genderOptions === VOID ? PersonConstants_getInstance_0().oom_1 : genderOptions;
    personPicture = personPicture === VOID ? null : personPicture;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    approvalPersonParentJoin = approvalPersonParentJoin === VOID ? null : approvalPersonParentJoin;
    registrationMode = registrationMode === VOID ? 0 : registrationMode;
    usernameError = usernameError === VOID ? null : usernameError;
    passwordConfirmedError = passwordConfirmedError === VOID ? null : passwordConfirmedError;
    passwordError = passwordError === VOID ? null : passwordError;
    emailError = emailError === VOID ? null : emailError;
    confirmError = confirmError === VOID ? null : confirmError;
    dateOfBirthError = dateOfBirthError === VOID ? null : dateOfBirthError;
    parentContactError = parentContactError === VOID ? null : parentContactError;
    genderError = genderError === VOID ? null : genderError;
    firstNameError = firstNameError === VOID ? null : firstNameError;
    lastNameError = lastNameError === VOID ? null : lastNameError;
    phoneNumError = phoneNumError === VOID ? null : phoneNumError;
    nationalPhoneNumSet = nationalPhoneNumSet === VOID ? false : nationalPhoneNumSet;
    this.zwy_1 = person;
    this.awz_1 = password;
    this.bwz_1 = genderOptions;
    this.cwz_1 = personPicture;
    this.dwz_1 = fieldsEnabled;
    this.ewz_1 = approvalPersonParentJoin;
    this.fwz_1 = registrationMode;
    this.gwz_1 = usernameError;
    this.hwz_1 = passwordConfirmedError;
    this.iwz_1 = passwordError;
    this.jwz_1 = emailError;
    this.kwz_1 = confirmError;
    this.lwz_1 = dateOfBirthError;
    this.mwz_1 = parentContactError;
    this.nwz_1 = genderError;
    this.owz_1 = firstNameError;
    this.pwz_1 = lastNameError;
    this.qwz_1 = phoneNumError;
    this.rwz_1 = nationalPhoneNumSet;
  }
  protoOf(PersonEditUiState).dx5 = function () {
    return !(this.ewz_1 == null);
  };
  protoOf(PersonEditUiState).hww = function () {
    return !hasFlag(this.fwz_1, 1);
  };
  protoOf(PersonEditUiState).awl = function () {
    return hasFlag(this.fwz_1, 1);
  };
  protoOf(PersonEditUiState).ex5 = function () {
    return hasFlag(this.fwz_1, 1);
  };
  protoOf(PersonEditUiState).nww = function () {
    return !hasFlag(this.fwz_1, 2);
  };
  protoOf(PersonEditUiState).mww = function () {
    return !hasFlag(this.fwz_1, 2);
  };
  protoOf(PersonEditUiState).lww = function () {
    return !hasFlag(this.fwz_1, 2);
  };
  protoOf(PersonEditUiState).fx5 = function (person, password, genderOptions, personPicture, fieldsEnabled, approvalPersonParentJoin, registrationMode, usernameError, passwordConfirmedError, passwordError, emailError, confirmError, dateOfBirthError, parentContactError, genderError, firstNameError, lastNameError, phoneNumError, nationalPhoneNumSet) {
    return new PersonEditUiState(person, password, genderOptions, personPicture, fieldsEnabled, approvalPersonParentJoin, registrationMode, usernameError, passwordConfirmedError, passwordError, emailError, confirmError, dateOfBirthError, parentContactError, genderError, firstNameError, lastNameError, phoneNumError, nationalPhoneNumSet);
  };
  protoOf(PersonEditUiState).swz = function (person, password, genderOptions, personPicture, fieldsEnabled, approvalPersonParentJoin, registrationMode, usernameError, passwordConfirmedError, passwordError, emailError, confirmError, dateOfBirthError, parentContactError, genderError, firstNameError, lastNameError, phoneNumError, nationalPhoneNumSet, $super) {
    person = person === VOID ? this.zwy_1 : person;
    password = password === VOID ? this.awz_1 : password;
    genderOptions = genderOptions === VOID ? this.bwz_1 : genderOptions;
    personPicture = personPicture === VOID ? this.cwz_1 : personPicture;
    fieldsEnabled = fieldsEnabled === VOID ? this.dwz_1 : fieldsEnabled;
    approvalPersonParentJoin = approvalPersonParentJoin === VOID ? this.ewz_1 : approvalPersonParentJoin;
    registrationMode = registrationMode === VOID ? this.fwz_1 : registrationMode;
    usernameError = usernameError === VOID ? this.gwz_1 : usernameError;
    passwordConfirmedError = passwordConfirmedError === VOID ? this.hwz_1 : passwordConfirmedError;
    passwordError = passwordError === VOID ? this.iwz_1 : passwordError;
    emailError = emailError === VOID ? this.jwz_1 : emailError;
    confirmError = confirmError === VOID ? this.kwz_1 : confirmError;
    dateOfBirthError = dateOfBirthError === VOID ? this.lwz_1 : dateOfBirthError;
    parentContactError = parentContactError === VOID ? this.mwz_1 : parentContactError;
    genderError = genderError === VOID ? this.nwz_1 : genderError;
    firstNameError = firstNameError === VOID ? this.owz_1 : firstNameError;
    lastNameError = lastNameError === VOID ? this.pwz_1 : lastNameError;
    phoneNumError = phoneNumError === VOID ? this.qwz_1 : phoneNumError;
    nationalPhoneNumSet = nationalPhoneNumSet === VOID ? this.rwz_1 : nationalPhoneNumSet;
    return $super === VOID ? this.fx5(person, password, genderOptions, personPicture, fieldsEnabled, approvalPersonParentJoin, registrationMode, usernameError, passwordConfirmedError, passwordError, emailError, confirmError, dateOfBirthError, parentContactError, genderError, firstNameError, lastNameError, phoneNumError, nationalPhoneNumSet) : $super.fx5.call(this, person, password, genderOptions, personPicture, fieldsEnabled, approvalPersonParentJoin, registrationMode, usernameError, passwordConfirmedError, passwordError, emailError, confirmError, dateOfBirthError, parentContactError, genderError, firstNameError, lastNameError, phoneNumError, nationalPhoneNumSet);
  };
  protoOf(PersonEditUiState).toString = function () {
    return 'PersonEditUiState(person=' + this.zwy_1 + ', password=' + this.awz_1 + ', genderOptions=' + this.bwz_1 + ', personPicture=' + this.cwz_1 + ', fieldsEnabled=' + this.dwz_1 + ', approvalPersonParentJoin=' + this.ewz_1 + ', registrationMode=' + this.fwz_1 + ', usernameError=' + this.gwz_1 + ', passwordConfirmedError=' + this.hwz_1 + ', passwordError=' + this.iwz_1 + ', emailError=' + this.jwz_1 + ', confirmError=' + this.kwz_1 + ', dateOfBirthError=' + this.lwz_1 + ', parentContactError=' + this.mwz_1 + ', genderError=' + this.nwz_1 + ', firstNameError=' + this.owz_1 + ', lastNameError=' + this.pwz_1 + ', phoneNumError=' + this.qwz_1 + ', nationalPhoneNumSet=' + this.rwz_1 + ')';
  };
  protoOf(PersonEditUiState).hashCode = function () {
    var result = this.zwy_1 == null ? 0 : this.zwy_1.hashCode();
    result = imul(result, 31) + (this.awz_1 == null ? 0 : getStringHashCode(this.awz_1)) | 0;
    result = imul(result, 31) + hashCode(this.bwz_1) | 0;
    result = imul(result, 31) + (this.cwz_1 == null ? 0 : this.cwz_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.dwz_1) | 0;
    result = imul(result, 31) + (this.ewz_1 == null ? 0 : this.ewz_1.hashCode()) | 0;
    result = imul(result, 31) + this.fwz_1 | 0;
    result = imul(result, 31) + (this.gwz_1 == null ? 0 : getStringHashCode(this.gwz_1)) | 0;
    result = imul(result, 31) + (this.hwz_1 == null ? 0 : getStringHashCode(this.hwz_1)) | 0;
    result = imul(result, 31) + (this.iwz_1 == null ? 0 : getStringHashCode(this.iwz_1)) | 0;
    result = imul(result, 31) + (this.jwz_1 == null ? 0 : getStringHashCode(this.jwz_1)) | 0;
    result = imul(result, 31) + (this.kwz_1 == null ? 0 : getStringHashCode(this.kwz_1)) | 0;
    result = imul(result, 31) + (this.lwz_1 == null ? 0 : getStringHashCode(this.lwz_1)) | 0;
    result = imul(result, 31) + (this.mwz_1 == null ? 0 : getStringHashCode(this.mwz_1)) | 0;
    result = imul(result, 31) + (this.nwz_1 == null ? 0 : getStringHashCode(this.nwz_1)) | 0;
    result = imul(result, 31) + (this.owz_1 == null ? 0 : getStringHashCode(this.owz_1)) | 0;
    result = imul(result, 31) + (this.pwz_1 == null ? 0 : getStringHashCode(this.pwz_1)) | 0;
    result = imul(result, 31) + (this.qwz_1 == null ? 0 : getStringHashCode(this.qwz_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.rwz_1) | 0;
    return result;
  };
  protoOf(PersonEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof PersonEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof PersonEditUiState ? other : THROW_CCE();
    if (!equals(this.zwy_1, tmp0_other_with_cast.zwy_1))
      return false;
    if (!(this.awz_1 == tmp0_other_with_cast.awz_1))
      return false;
    if (!equals(this.bwz_1, tmp0_other_with_cast.bwz_1))
      return false;
    if (!equals(this.cwz_1, tmp0_other_with_cast.cwz_1))
      return false;
    if (!(this.dwz_1 === tmp0_other_with_cast.dwz_1))
      return false;
    if (!equals(this.ewz_1, tmp0_other_with_cast.ewz_1))
      return false;
    if (!(this.fwz_1 === tmp0_other_with_cast.fwz_1))
      return false;
    if (!(this.gwz_1 == tmp0_other_with_cast.gwz_1))
      return false;
    if (!(this.hwz_1 == tmp0_other_with_cast.hwz_1))
      return false;
    if (!(this.iwz_1 == tmp0_other_with_cast.iwz_1))
      return false;
    if (!(this.jwz_1 == tmp0_other_with_cast.jwz_1))
      return false;
    if (!(this.kwz_1 == tmp0_other_with_cast.kwz_1))
      return false;
    if (!(this.lwz_1 == tmp0_other_with_cast.lwz_1))
      return false;
    if (!(this.mwz_1 == tmp0_other_with_cast.mwz_1))
      return false;
    if (!(this.nwz_1 == tmp0_other_with_cast.nwz_1))
      return false;
    if (!(this.owz_1 == tmp0_other_with_cast.owz_1))
      return false;
    if (!(this.pwz_1 == tmp0_other_with_cast.pwz_1))
      return false;
    if (!(this.qwz_1 == tmp0_other_with_cast.qwz_1))
      return false;
    if (!(this.rwz_1 === tmp0_other_with_cast.rwz_1))
      return false;
    return true;
  };
  function apiUrlConfig$factory_5() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_2(receiver);
    }, null);
  }
  function phoneNumValidatorUseCase$factory() {
    return getPropertyCallableRef('phoneNumValidatorUseCase', 1, KProperty1, function (receiver) {
      return _get_phoneNumValidatorUseCase__4guu7i(receiver);
    }, null);
  }
  function genderConfig$factory() {
    return getPropertyCallableRef('genderConfig', 1, KProperty1, function (receiver) {
      return _get_genderConfig__kyr0zc(receiver);
    }, null);
  }
  function enqueueSavePictureUseCase$factory() {
    return getPropertyCallableRef('enqueueSavePictureUseCase', 1, KProperty1, function (receiver) {
      return _get_enqueueSavePictureUseCase__rl1s31(receiver);
    }, null);
  }
  function addNewPersonUseCase$factory() {
    return getPropertyCallableRef('addNewPersonUseCase', 1, KProperty1, function (receiver) {
      return _get_addNewPersonUseCase__raa2qa(receiver);
    }, null);
  }
  function apiUrlConfig$factory_6() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_2(receiver);
    }, null);
  }
  function phoneNumValidatorUseCase$factory_0() {
    return getPropertyCallableRef('phoneNumValidatorUseCase', 1, KProperty1, function (receiver) {
      return _get_phoneNumValidatorUseCase__4guu7i(receiver);
    }, null);
  }
  function genderConfig$factory_0() {
    return getPropertyCallableRef('genderConfig', 1, KProperty1, function (receiver) {
      return _get_genderConfig__kyr0zc(receiver);
    }, null);
  }
  function enqueueSavePictureUseCase$factory_0() {
    return getPropertyCallableRef('enqueueSavePictureUseCase', 1, KProperty1, function (receiver) {
      return _get_enqueueSavePictureUseCase__rl1s31(receiver);
    }, null);
  }
  function addNewPersonUseCase$factory_0() {
    return getPropertyCallableRef('addNewPersonUseCase', 1, KProperty1, function (receiver) {
      return _get_addNewPersonUseCase__raa2qa(receiver);
    }, null);
  }
  function EmptyPagingSource() {
    PagingSource.call(this);
  }
  protoOf(EmptyPagingSource).c54 = function (params, $completion) {
    var tmp = Page_init_$Create$(emptyList(), null, null);
    return tmp instanceof LoadResult ? tmp : THROW_CCE();
  };
  function PersonListViewModel$slambda$slambda$slambda$lambda() {
    return new EmptyPagingSource();
  }
  function PersonListViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.px5_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonListViewModel$slambda$slambda$slambda).dou = function (hasPermissionToList, $completion) {
    var tmp = this.eou(hasPermissionToList, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonListViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.dou((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonListViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.px5_1.gpa_1;
            while (true) {
              var prevValue = this_0.t2();
              var tmp_0;
              if (this.qx5_1) {
                tmp_0 = this.px5_1.ux6_1;
              } else {
                tmp_0 = PersonListViewModel$slambda$slambda$slambda$lambda;
              }
              var nextValue = prevValue.gx7(tmp_0, VOID, VOID, VOID, !(this.px5_1.vx6_1 == null), this.px5_1.vx6_1, this.qx5_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_1 = this.px5_1.pp1_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var nextValue_0 = prevValue_0.nol(VOID, VOID, VOID, VOID, VOID, VOID, VOID, prevValue_0.fol_1.xok(this.qx5_1));
              if (this_1.y1k(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PersonListViewModel$slambda$slambda$slambda).eou = function (hasPermissionToList, completion) {
    var i = new PersonListViewModel$slambda$slambda$slambda(this.px5_1, completion);
    i.qx5_1 = hasPermissionToList;
    return i;
  };
  function PersonListViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new PersonListViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (hasPermissionToList, $completion) {
      return i.dou(hasPermissionToList, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonListViewModel$slambda$slambda($hasPermissionToListFlow, this$0, resultContinuation) {
    this.px7_1 = $hasPermissionToListFlow;
    this.qx7_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonListViewModel$slambda$slambda).m86 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonListViewModel$slambda$slambda).z77 = function ($completion) {
    return this.m86($completion);
  };
  protoOf(PersonListViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = distinctUntilChanged(this.px7_1);
            var tmp_1 = PersonListViewModel$slambda$slambda$slambda_0(this.qx7_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_31(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonListViewModel$slambda$slambda).y77 = function (completion) {
    return new PersonListViewModel$slambda$slambda(this.px7_1, this.qx7_1, completion);
  };
  function PersonListViewModel$slambda$slambda_0($hasPermissionToListFlow, this$0, resultContinuation) {
    var i = new PersonListViewModel$slambda$slambda($hasPermissionToListFlow, this$0, resultContinuation);
    var l = function ($completion) {
      return i.m86($completion);
    };
    l.$arity = 0;
    return l;
  }
  function PersonListViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.zx7_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonListViewModel$slambda$slambda_1).yr6 = function (it, $completion) {
    var tmp = this.zr6(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonListViewModel$slambda$slambda_1).he = function (p1, $completion) {
    return this.yr6(p1 instanceof PermissionPair ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonListViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp0_container = this.ax8_1;
          var hasAddPermission = tmp0_container.y6();
          var hasViewAllPermission = tmp0_container.z6();
          var hasBulkAddPermission = hasAddPermission ? hasViewAllPermission : false;
          l$ret$1: do {
            var this_0 = this.zx7_1.gpa_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.gx7(VOID, VOID, VOID, this.zx7_1.lpa().equals(ListViewMode_PICKER_getInstance()) ? hasAddPermission : false, VOID, VOID, VOID, VOID, hasBulkAddPermission);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_1 = this.zx7_1.pp1_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var nextValue_0 = prevValue_0.nol(prevValue_0.yok_1.tol(this.zx7_1.lpa().equals(ListViewMode_BROWSER_getInstance()) ? hasAddPermission : false));
              if (this_1.y1k(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(PersonListViewModel$slambda$slambda_1).zr6 = function (it, completion) {
    var i = new PersonListViewModel$slambda$slambda_1(this.zx7_1, completion);
    i.ax8_1 = it;
    return i;
  };
  function PersonListViewModel$slambda$slambda_2(this$0, resultContinuation) {
    var i = new PersonListViewModel$slambda$slambda_1(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.yr6(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_setClipboardStringUseCase__31i1s1_1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.wx6_1;
    setClipboardStringUseCase$factory_4();
    return this_0.t2();
  }
  function onClickFab($this) {
    if ($this.gpa_1.t2().fx7_1) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = $this.gpa_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.list.PersonListViewModel.onClickFab.<anonymous>' call
          var nextValue = prevValue.gx7(VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    } else {
      $this.bpb();
    }
  }
  function Companion_163() {
    Companion_instance_211 = this;
    this.bx8_1 = 'People';
    this.cx8_1 = 'PersonListHome';
    this.dx8_1 = listOf(['People', 'PersonListHome']);
    this.ex8_1 = 'exlcudeFromClazz';
    this.fx8_1 = 'excludeAlreadySelectedList';
    this.gx8_1 = 'showAddViaInviteLink';
    this.hx8_1 = 'rptsl';
  }
  var Companion_instance_211;
  function Companion_getInstance_180() {
    if (Companion_instance_211 == null)
      new Companion_163();
    return Companion_instance_211;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_31(function_0) {
    this.ix8_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_31).t1d = function (value, $completion) {
    return this.ix8_1(value, $completion);
  };
  function PersonListViewModel$pagingSourceFactory$lambda(this$0) {
    return function () {
      return this$0.fp2().a7d().ufn(getSystemTimeInMillis(), this$0.rx6_1, this$0.sx6_1, this$0.dp2(), this$0.gpa_1.t2().zx6_1.lor_1, toQueryLikeParam(this$0.pp1_1.t2().fol_1.uok_1));
    };
  }
  function PersonListViewModel$onClickFab$ref($boundThis) {
    var l = function () {
      onClickFab($boundThis);
      return Unit_instance;
    };
    l.callableName = 'onClickFab';
    return l;
  }
  function PersonListViewModel$slambda(this$0, $hasPermissionToListFlow, resultContinuation) {
    this.rx8_1 = this$0;
    this.sx8_1 = $hasPermissionToListFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonListViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonListViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonListViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.rx8_1.gpa_1, PersonListViewModel$slambda$slambda_0(this.sx8_1, this.rx8_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonListViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new PersonListViewModel$slambda(this.rx8_1, this.sx8_1, completion);
    i.tx8_1 = $this$launch;
    return i;
  };
  function PersonListViewModel$slambda_0(this$0, $hasPermissionToListFlow, resultContinuation) {
    var i = new PersonListViewModel$slambda(this$0, $hasPermissionToListFlow, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonListViewModel$slambda_1(this$0, resultContinuation) {
    this.cx9_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(PersonListViewModel$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(PersonListViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(PersonListViewModel$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.cx9_1.fp2().c7f();
            var tmp_1 = this.cx9_1.dp2();
            PermissionFlags_getInstance();
            var tmp_2 = new Long(1024, 0);
            PermissionFlags_getInstance();
            var tmp_3 = tmp_0.vhc(tmp_1, tmp_2, new Long(8192, 0));
            var tmp_4 = PersonListViewModel$slambda$slambda_2(this.cx9_1, null);
            suspendResult = tmp_3.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_31(tmp_4), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(PersonListViewModel$slambda_1).v1m = function ($this$launch, completion) {
    var i = new PersonListViewModel$slambda_1(this.cx9_1, completion);
    i.dx9_1 = $this$launch;
    return i;
  };
  function PersonListViewModel$slambda_2(this$0, resultContinuation) {
    var i = new PersonListViewModel$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function PersonListViewModel(di, savedStateHandle, destinationName) {
    Companion_getInstance_180();
    destinationName = destinationName === VOID ? 'People' : destinationName;
    UstadListViewModel.call(this, di, savedStateHandle, new PersonListUiState(), destinationName);
    var tmp = this;
    var tmp0_safe_receiver = savedStateHandle.ba('exlcudeFromClazz');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.rx6_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    var tmp_0 = this;
    var tmp0_safe_receiver_0 = savedStateHandle.ba('excludeAlreadySelectedList');
    var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : split(tmp0_safe_receiver_0, [',']);
    var tmp_1;
    if (tmp1_safe_receiver == null) {
      tmp_1 = null;
    } else {
      // Inline function 'kotlin.collections.filter' call
      // Inline function 'kotlin.collections.filterTo' call
      var destination = ArrayList_init_$Create$();
      var tmp0_iterator = tmp1_safe_receiver.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.viewmodel.person.list.PersonListViewModel.filterAlreadySelectedList.<anonymous>' call
        // Inline function 'kotlin.text.isNotEmpty' call
        if (charSequenceLength(element) > 0) {
          destination.i1(element);
        }
      }
      tmp_1 = destination;
    }
    var tmp2_safe_receiver = tmp_1;
    var tmp_2;
    if (tmp2_safe_receiver == null) {
      tmp_2 = null;
    } else {
      // Inline function 'kotlin.collections.map' call
      // Inline function 'kotlin.collections.mapTo' call
      var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp2_safe_receiver, 10));
      var tmp0_iterator_0 = tmp2_safe_receiver.w();
      while (tmp0_iterator_0.f()) {
        var item = tmp0_iterator_0.e();
        // Inline function 'com.ustadmobile.core.viewmodel.person.list.PersonListViewModel.filterAlreadySelectedList.<anonymous>' call
        // Inline function 'kotlin.text.trim' call
        var tmp$ret$4 = toString(trim(isCharSequence(item) ? item : THROW_CCE()));
        var tmp$ret$5 = toLong_0(tmp$ret$4);
        destination_0.i1(tmp$ret$5);
      }
      tmp_2 = destination_0;
    }
    var tmp3_elvis_lhs = tmp_2;
    var tmp_3;
    if (tmp3_elvis_lhs == null) {
      // Inline function 'kotlin.collections.listOf' call
      tmp_3 = emptyList();
    } else {
      tmp_3 = tmp3_elvis_lhs;
    }
    tmp_0.sx6_1 = tmp_3;
    var tmp_4 = this;
    var tmp0_safe_receiver_1 = savedStateHandle.ba('rptsl');
    var tmp1_elvis_lhs_0 = tmp0_safe_receiver_1 == null ? null : toLong_0(tmp0_safe_receiver_1);
    tmp_4.tx6_1 = tmp1_elvis_lhs_0 == null ? new Long(0, 0) : tmp1_elvis_lhs_0;
    var tmp_5 = this;
    tmp_5.ux6_1 = PersonListViewModel$pagingSourceFactory$lambda(this);
    this.vx6_1 = savedStateHandle.ba('showAddViaInviteLink');
    var tmp_6 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_7 = typeToken(createKType(getKClass(SetClipboardStringUseCase), arrayOf([]), false));
    var tmp$ret$9 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    tmp_6.wx6_1 = Instance(this, tmp$ret$9, null).n5c(this, setClipboardStringUseCase$factory_3());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.pp1_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.list.PersonListViewModel.<anonymous>' call
        var tmp1_searchState = this.opb(false);
        Companion_getInstance_112();
        var tmp0_elvis_lhs = savedStateHandle.ba('t');
        var tmp2_title = tmp0_elvis_lhs == null ? this.xpb(strings_getInstance().oln_1, strings_getInstance().fme_1) : tmp0_elvis_lhs;
        var tmp_8 = this.jp2().en6(strings_getInstance().llu_1);
        var tmp_9 = FabIcon_ADD_getInstance();
        var tmp3_fabState = new FabUiState(VOID, tmp_8, tmp_9, PersonListViewModel$onClickFab$ref(this));
        var nextValue = prevValue.nol(tmp3_fabState, VOID, tmp2_title, true, VOID, VOID, VOID, tmp1_searchState);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_10;
    if (this.tx6_1.equals(new Long(0, 0))) {
      tmp_10 = flowOf(true);
    } else {
      tmp_10 = this.fp2().c7f().uhc(this.dp2(), this.tx6_1);
    }
    var hasPermissionToListFlow = tmp_10;
    var tmp_11 = this.cp2();
    launch(tmp_11, VOID, VOID, PersonListViewModel$slambda_0(this, hasPermissionToListFlow, null));
    var tmp_12 = this.cp2();
    launch(tmp_12, VOID, VOID, PersonListViewModel$slambda_2(this, null));
  }
  protoOf(PersonListViewModel).apb = function (searchText) {
    this.ipa_1.i1h(new RefreshCommand());
  };
  protoOf(PersonListViewModel).zqy = function (sortOption) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.gpa_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.list.PersonListViewModel.onSortOrderChanged.<anonymous>' call
        var nextValue = prevValue.gx7(VOID, VOID, sortOption);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.ipa_1.i1h(new RefreshCommand());
  };
  protoOf(PersonListViewModel).ex9 = function () {
    if (this.vx6_1 == null)
      return Unit_instance;
    Companion_getInstance_112();
    this.np1_1.sns('InviteWithLink', mapOf_0(to('inviteCode', this.vx6_1)));
  };
  protoOf(PersonListViewModel).fx9 = function () {
    var tmp0_safe_receiver = this.gpa_1.t2().cx7_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      // Inline function 'kotlin.also' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.person.list.PersonListViewModel.onClickCopyInviteCode.<anonymous>' call
      _get_setClipboardStringUseCase__31i1s1_1(this).xnn(tmp0_safe_receiver);
      this.hp2().com(new Snack(this.jp2().en6(strings_getInstance().km1_1)));
    }
  };
  protoOf(PersonListViewModel).gx9 = function () {
    this.np1_1.sns('BulkAddPersonSelectFile', emptyMap());
  };
  protoOf(PersonListViewModel).bpb = function () {
    Companion_getInstance_179();
    var tmp0_safe_receiver = this.lp1_1.ba('goToOnPersonSelected');
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.person.list.PersonListViewModel.onClickAdd.<anonymous>' call
      tmp = mapOf_0(to('goToOnPersonSelected', tmp0_safe_receiver));
    }
    var tmp1_elvis_lhs = tmp;
    this.tpb('PersonEditView', tmp1_elvis_lhs == null ? emptyMap() : tmp1_elvis_lhs);
  };
  protoOf(PersonListViewModel).hx9 = function (entry) {
    var goToOnPersonSelected = this.lp1_1.ba('goToOnPersonSelected');
    if (!(goToOnPersonSelected == null)) {
      var tmp = UMFileUtil_getInstance().parseURLQueryString(goToOnPersonSelected);
      Companion_getInstance_102();
      var args = plus_0(tmp, mapOf_0(to('personUid', entry.f95_1.toString())));
      var goToDestName = substringBefore_0(goToOnPersonSelected, '?');
      var popUpTo = this.lp1_1.ba('popUpToOnPersonSelected');
      this.np1_1.eoo(goToDestName, args, new UstadGoOptions(popUpTo, true));
    } else {
      this.wpb('PersonDetailView', entry.f95_1, entry);
    }
  };
  protoOf(PersonListViewModel).ix9 = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.gpa_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.list.PersonListViewModel.onDismissAddSheetOrDialog.<anonymous>' call
        var nextValue = prevValue.gx7(VOID, VOID, VOID, VOID, VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  function PersonListUiState$_init_$lambda_st3t8h() {
    return new EmptyPagingSource();
  }
  function PersonListUiState(personList, sortOptions, sortOption, showAddItem, showInviteViaLink, inviteCode, showSortOptions, addSheetOrDialogVisible, hasBulkImportPermission) {
    var tmp;
    if (personList === VOID) {
      tmp = PersonListUiState$_init_$lambda_st3t8h;
    } else {
      tmp = personList;
    }
    personList = tmp;
    var tmp_0;
    if (sortOptions === VOID) {
      var tmp_1 = strings_getInstance().qld_1;
      var tmp_2 = new SortOrderOption(tmp_1, 1, true);
      var tmp_3 = strings_getInstance().qld_1;
      var tmp_4 = new SortOrderOption(tmp_3, 2, false);
      var tmp_5 = strings_getInstance().pld_1;
      var tmp_6 = new SortOrderOption(tmp_5, 3, true);
      var tmp_7 = strings_getInstance().pld_1;
      tmp_0 = listOf([tmp_2, tmp_4, tmp_6, new SortOrderOption(tmp_7, 4, false)]);
    } else {
      tmp_0 = sortOptions;
    }
    sortOptions = tmp_0;
    sortOption = sortOption === VOID ? first_0(sortOptions) : sortOption;
    showAddItem = showAddItem === VOID ? false : showAddItem;
    showInviteViaLink = showInviteViaLink === VOID ? false : showInviteViaLink;
    inviteCode = inviteCode === VOID ? null : inviteCode;
    showSortOptions = showSortOptions === VOID ? true : showSortOptions;
    addSheetOrDialogVisible = addSheetOrDialogVisible === VOID ? false : addSheetOrDialogVisible;
    hasBulkImportPermission = hasBulkImportPermission === VOID ? false : hasBulkImportPermission;
    this.xx6_1 = personList;
    this.yx6_1 = sortOptions;
    this.zx6_1 = sortOption;
    this.ax7_1 = showAddItem;
    this.bx7_1 = showInviteViaLink;
    this.cx7_1 = inviteCode;
    this.dx7_1 = showSortOptions;
    this.ex7_1 = addSheetOrDialogVisible;
    this.fx7_1 = hasBulkImportPermission;
  }
  protoOf(PersonListUiState).jx9 = function (personList, sortOptions, sortOption, showAddItem, showInviteViaLink, inviteCode, showSortOptions, addSheetOrDialogVisible, hasBulkImportPermission) {
    return new PersonListUiState(personList, sortOptions, sortOption, showAddItem, showInviteViaLink, inviteCode, showSortOptions, addSheetOrDialogVisible, hasBulkImportPermission);
  };
  protoOf(PersonListUiState).gx7 = function (personList, sortOptions, sortOption, showAddItem, showInviteViaLink, inviteCode, showSortOptions, addSheetOrDialogVisible, hasBulkImportPermission, $super) {
    personList = personList === VOID ? this.xx6_1 : personList;
    sortOptions = sortOptions === VOID ? this.yx6_1 : sortOptions;
    sortOption = sortOption === VOID ? this.zx6_1 : sortOption;
    showAddItem = showAddItem === VOID ? this.ax7_1 : showAddItem;
    showInviteViaLink = showInviteViaLink === VOID ? this.bx7_1 : showInviteViaLink;
    inviteCode = inviteCode === VOID ? this.cx7_1 : inviteCode;
    showSortOptions = showSortOptions === VOID ? this.dx7_1 : showSortOptions;
    addSheetOrDialogVisible = addSheetOrDialogVisible === VOID ? this.ex7_1 : addSheetOrDialogVisible;
    hasBulkImportPermission = hasBulkImportPermission === VOID ? this.fx7_1 : hasBulkImportPermission;
    return $super === VOID ? this.jx9(personList, sortOptions, sortOption, showAddItem, showInviteViaLink, inviteCode, showSortOptions, addSheetOrDialogVisible, hasBulkImportPermission) : $super.jx9.call(this, personList, sortOptions, sortOption, showAddItem, showInviteViaLink, inviteCode, showSortOptions, addSheetOrDialogVisible, hasBulkImportPermission);
  };
  protoOf(PersonListUiState).toString = function () {
    return 'PersonListUiState(personList=' + this.xx6_1 + ', sortOptions=' + this.yx6_1 + ', sortOption=' + this.zx6_1 + ', showAddItem=' + this.ax7_1 + ', showInviteViaLink=' + this.bx7_1 + ', inviteCode=' + this.cx7_1 + ', showSortOptions=' + this.dx7_1 + ', addSheetOrDialogVisible=' + this.ex7_1 + ', hasBulkImportPermission=' + this.fx7_1 + ')';
  };
  protoOf(PersonListUiState).hashCode = function () {
    var result = hashCode(this.xx6_1);
    result = imul(result, 31) + hashCode(this.yx6_1) | 0;
    result = imul(result, 31) + this.zx6_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ax7_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.bx7_1) | 0;
    result = imul(result, 31) + (this.cx7_1 == null ? 0 : getStringHashCode(this.cx7_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.dx7_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ex7_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fx7_1) | 0;
    return result;
  };
  protoOf(PersonListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof PersonListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof PersonListUiState ? other : THROW_CCE();
    if (!equals(this.xx6_1, tmp0_other_with_cast.xx6_1))
      return false;
    if (!equals(this.yx6_1, tmp0_other_with_cast.yx6_1))
      return false;
    if (!this.zx6_1.equals(tmp0_other_with_cast.zx6_1))
      return false;
    if (!(this.ax7_1 === tmp0_other_with_cast.ax7_1))
      return false;
    if (!(this.bx7_1 === tmp0_other_with_cast.bx7_1))
      return false;
    if (!(this.cx7_1 == tmp0_other_with_cast.cx7_1))
      return false;
    if (!(this.dx7_1 === tmp0_other_with_cast.dx7_1))
      return false;
    if (!(this.ex7_1 === tmp0_other_with_cast.ex7_1))
      return false;
    if (!(this.fx7_1 === tmp0_other_with_cast.fx7_1))
      return false;
    return true;
  };
  function setClipboardStringUseCase$factory_3() {
    return getPropertyCallableRef('setClipboardStringUseCase', 1, KProperty1, function (receiver) {
      return _get_setClipboardStringUseCase__31i1s1_1(receiver);
    }, null);
  }
  function setClipboardStringUseCase$factory_4() {
    return getPropertyCallableRef('setClipboardStringUseCase', 1, KProperty1, function (receiver) {
      return _get_setClipboardStringUseCase__31i1s1_1(receiver);
    }, null);
  }
  function Companion_164() {
    this.kx9_1 = 'RegisterAgeRedirect';
  }
  var Companion_instance_212;
  function Companion_getInstance_181() {
    return Companion_instance_212;
  }
  function RegisterAgeRedirectViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'RegisterAgeRedirect');
    this.gxa_1 = MutableStateFlow(new RegisterAgeRedirectUiState(VOID, systemTimeInMillis()));
    this.hxa_1 = asStateFlow(this.gxa_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.pp1_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.registerageredirect.RegisterAgeRedirectViewModel.<anonymous>' call
        var tmp0_title = this.jp2().en6(strings_getInstance().wld_1);
        var nextValue = prevValue.nol(VOID, VOID, tmp0_title, false, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  }
  protoOf(RegisterAgeRedirectViewModel).ixa = function (date) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.gxa_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.registerageredirect.RegisterAgeRedirectViewModel.onSetDate.<anonymous>' call
        var nextValue = prevValue.mxa(date, VOID, !prevValue.jxa_1.equals(date) ? null : prevValue.lxa_1);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(RegisterAgeRedirectViewModel).wu7 = function () {
    var date = this.gxa_1.t2().jxa_1;
    if (date.equals(new Long(0, 0))) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this.gxa_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.registerageredirect.RegisterAgeRedirectViewModel.onClickNext.<anonymous>' call
          var nextValue = prevValue.mxa(VOID, VOID, this.jp2().en6(strings_getInstance().blh_1));
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    }
    // Inline function 'kotlin.Long.minus' call
    var this_1 = systemTimeInMillis();
    var other = imul(24, get_MS_PER_HOUR());
    var tmp$ret$2 = this_1.mc(toLong(other));
    if (date.c7(tmp$ret$2) > 0) {
      $l$block_0: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_2 = this.gxa_1;
        while (true) {
          var prevValue_0 = this_2.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.person.registerageredirect.RegisterAgeRedirectViewModel.onClickNext.<anonymous>' call
          var nextValue_0 = prevValue_0.mxa(VOID, VOID, this.jp2().en6(strings_getInstance().flj_1));
          if (this_2.y1k(prevValue_0, nextValue_0)) {
            break $l$block_0;
          }
        }
      }
      return Unit_instance;
    }
    var dateOfBirthInstant = Companion_getInstance_6().zla(date);
    var isMinor = isDateOfBirthAMinor(dateOfBirthInstant);
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_3 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.person.registerageredirect.RegisterAgeRedirectViewModel.onClickNext.<anonymous>' call
    this.xp2(this_3, Companion_getInstance_179().ew5_1);
    var tmp;
    if (isMinor) {
      Companion_getInstance_179();
      Companion_getInstance_179();
      tmp = 1 | 2;
    } else {
      Companion_getInstance_179();
      tmp = 1;
    }
    var registrationMode = tmp;
    Companion_getInstance_179();
    this_3.s('RegMode', registrationMode.toString());
    Companion_getInstance_179();
    this_3.s('DateOfBirth', date.toString());
    var args = this_3.f3();
    if (isMinor) {
      Companion_getInstance_179();
      this.np1_1.sns('Register', args);
    } else {
      this.np1_1.sns('Terms', args);
    }
  };
  function RegisterAgeRedirectUiState(dateOfBirth, maxDate, dateOfBirthError) {
    dateOfBirth = dateOfBirth === VOID ? new Long(0, 0) : dateOfBirth;
    var tmp;
    if (maxDate === VOID) {
      Companion_getInstance_2();
      tmp = new Long(-1, 2147483647);
    } else {
      tmp = maxDate;
    }
    maxDate = tmp;
    dateOfBirthError = dateOfBirthError === VOID ? null : dateOfBirthError;
    this.jxa_1 = dateOfBirth;
    this.kxa_1 = maxDate;
    this.lxa_1 = dateOfBirthError;
  }
  protoOf(RegisterAgeRedirectUiState).nxa = function (dateOfBirth, maxDate, dateOfBirthError) {
    return new RegisterAgeRedirectUiState(dateOfBirth, maxDate, dateOfBirthError);
  };
  protoOf(RegisterAgeRedirectUiState).mxa = function (dateOfBirth, maxDate, dateOfBirthError, $super) {
    dateOfBirth = dateOfBirth === VOID ? this.jxa_1 : dateOfBirth;
    maxDate = maxDate === VOID ? this.kxa_1 : maxDate;
    dateOfBirthError = dateOfBirthError === VOID ? this.lxa_1 : dateOfBirthError;
    return $super === VOID ? this.nxa(dateOfBirth, maxDate, dateOfBirthError) : $super.nxa.call(this, dateOfBirth, maxDate, dateOfBirthError);
  };
  protoOf(RegisterAgeRedirectUiState).toString = function () {
    return 'RegisterAgeRedirectUiState(dateOfBirth=' + this.jxa_1.toString() + ', maxDate=' + this.kxa_1.toString() + ', dateOfBirthError=' + this.lxa_1 + ')';
  };
  protoOf(RegisterAgeRedirectUiState).hashCode = function () {
    var result = this.jxa_1.hashCode();
    result = imul(result, 31) + this.kxa_1.hashCode() | 0;
    result = imul(result, 31) + (this.lxa_1 == null ? 0 : getStringHashCode(this.lxa_1)) | 0;
    return result;
  };
  protoOf(RegisterAgeRedirectUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof RegisterAgeRedirectUiState))
      return false;
    var tmp0_other_with_cast = other instanceof RegisterAgeRedirectUiState ? other : THROW_CCE();
    if (!this.jxa_1.equals(tmp0_other_with_cast.jxa_1))
      return false;
    if (!this.kxa_1.equals(tmp0_other_with_cast.kxa_1))
      return false;
    if (!(this.lxa_1 == tmp0_other_with_cast.lxa_1))
      return false;
    return true;
  };
  function Companion_165() {
    this.oxa_1 = 'WaitForParent';
    this.pxa_1 = 'username';
    this.qxa_1 = 'password';
    this.rxa_1 = 'parentContact';
  }
  var Companion_instance_213;
  function Companion_getInstance_182() {
    return Companion_instance_213;
  }
  function RegisterMinorWaitForParentViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'WaitForParent');
    this.nxb_1 = MutableStateFlow(new RegisterMinorWaitForParentUiState());
    this.oxb_1 = asStateFlow(this.nxb_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.pp1_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.registerminorwaitforparent.RegisterMinorWaitForParentViewModel.<anonymous>' call
        var nextValue = prevValue.nol(VOID, VOID, this.jp2().en6(strings_getInstance().wld_1), false, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.nxb_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.person.registerminorwaitforparent.RegisterMinorWaitForParentViewModel.<anonymous>' call
        var tmp0_elvis_lhs = savedStateHandle.ba('username');
        var tmp = tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs;
        var tmp1_elvis_lhs = savedStateHandle.ba('password');
        var tmp_0 = tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs;
        var tmp2_elvis_lhs = savedStateHandle.ba('parentContact');
        var nextValue_0 = prevValue_0.sxb(tmp, tmp_0, tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
  }
  protoOf(RegisterMinorWaitForParentViewModel).txb = function () {
    this.np1_1.foo('WaitForParent', true);
  };
  function RegisterMinorWaitForParentUiState(username, password, parentContact) {
    username = username === VOID ? '' : username;
    password = password === VOID ? '' : password;
    parentContact = parentContact === VOID ? '' : parentContact;
    this.pxb_1 = username;
    this.qxb_1 = password;
    this.rxb_1 = parentContact;
  }
  protoOf(RegisterMinorWaitForParentUiState).sxb = function (username, password, parentContact) {
    return new RegisterMinorWaitForParentUiState(username, password, parentContact);
  };
  protoOf(RegisterMinorWaitForParentUiState).toString = function () {
    return 'RegisterMinorWaitForParentUiState(username=' + this.pxb_1 + ', password=' + this.qxb_1 + ', parentContact=' + this.rxb_1 + ')';
  };
  protoOf(RegisterMinorWaitForParentUiState).hashCode = function () {
    var result = getStringHashCode(this.pxb_1);
    result = imul(result, 31) + getStringHashCode(this.qxb_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.rxb_1) | 0;
    return result;
  };
  protoOf(RegisterMinorWaitForParentUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof RegisterMinorWaitForParentUiState))
      return false;
    var tmp0_other_with_cast = other instanceof RegisterMinorWaitForParentUiState ? other : THROW_CCE();
    if (!(this.pxb_1 === tmp0_other_with_cast.pxb_1))
      return false;
    if (!(this.qxb_1 === tmp0_other_with_cast.qxb_1))
      return false;
    if (!(this.rxb_1 === tmp0_other_with_cast.rxb_1))
      return false;
    return true;
  };
  function RedirectViewModel$slambda$lambda(_anonymous_parameter_0__qggqh8, _anonymous_parameter_1__qggqgd) {
    return Unit_instance;
  }
  function _get_apiUrlConfig__mldllg_3($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.rxc_1;
    apiUrlConfig$factory_8();
    return this_0.t2();
  }
  function _get_settings__lbkut4($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.sxc_1;
    settings$factory_0();
    return this_0.t2();
  }
  function Companion_166() {
    this.txc_1 = '';
  }
  var Companion_instance_214;
  function Companion_getInstance_183() {
    return Companion_instance_214;
  }
  function sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0_1(function_0) {
    this.uxc_1 = function_0;
  }
  protoOf(sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0_1).eo0 = function (url, target) {
    return this.uxc_1(url, target);
  };
  function RedirectViewModel$slambda(this$0, $destinationArg, $destination, resultContinuation) {
    this.dxd_1 = this$0;
    this.exd_1 = $destinationArg;
    this.fxd_1 = $destination;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(RedirectViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(RedirectViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(RedirectViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp0_$receiver = this.dxd_1.np1_1;
          var tmp1_accountManager = this.dxd_1.bp2();
          var tmp_0 = RedirectViewModel$slambda$lambda;
          var tmp2_openExternalLinkUseCase = new sam$com_ustadmobile_core_domain_openlink_OpenExternalLinkUseCase$0_1(tmp_0);
          var tmp3_userCanSelectServer = _get_apiUrlConfig__mldllg_3(this.dxd_1).tmx_1;
          var tmp4_goOptions = new UstadGoOptions(VOID, VOID, true);
          var tmp5_forceAccountSelection = !(this.exd_1 == null);
          navigateToLink(tmp0_$receiver, this.fxd_1, tmp1_accountManager, tmp2_openExternalLinkUseCase, tmp4_goOptions, tmp5_forceAccountSelection, tmp3_userCanSelectServer);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(RedirectViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new RedirectViewModel$slambda(this.dxd_1, this.exd_1, this.fxd_1, completion);
    i.gxd_1 = $this$launch;
    return i;
  };
  function RedirectViewModel$slambda_0(this$0, $destinationArg, $destination, resultContinuation) {
    var i = new RedirectViewModel$slambda(this$0, $destinationArg, $destination, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function RedirectViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, '');
    var tmp = this;
    Companion_getInstance_102();
    tmp.pxc_1 = savedStateHandle.ba('next');
    var tmp_0 = this;
    Companion_getInstance_102();
    tmp_0.qxc_1 = savedStateHandle.ba('openLink');
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(ApiUrlConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.rxc_1 = Instance(this, tmp$ret$0, null).n5c(this, apiUrlConfig$factory_7());
    var tmp_3 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(Settings), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    tmp_3.sxc_1 = Instance(this, tmp$ret$2, null).n5c(this, settings$factory());
    this.pp1_1.x1k(new AppUiState(VOID, VOID, VOID, false, VOID, VOID, VOID, VOID, VOID, VOID, true));
    var tmp0_elvis_lhs = this.qxc_1;
    var destinationArg = tmp0_elvis_lhs == null ? this.pxc_1 : tmp0_elvis_lhs;
    var activeEndpoint = this.bp2().xmx();
    if (!contains(activeEndpoint.umj_1, 'localhost')) {
      // Inline function 'org.kodein.di.instance' call
      // Inline function 'org.kodein.di.on' call
      var tmp_5 = get_direct(di).s57();
      // Inline function 'org.kodein.di.diContext' call
      var tmp_6 = Companion_instance_0;
      // Inline function 'org.kodein.type.generic' call
      var tmp_7 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$4 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
      var tmp$ret$5 = tmp_6.u56(tmp$ret$4, activeEndpoint);
      var tmp_8 = tmp_5.p57(tmp$ret$5).s57();
      // Inline function 'org.kodein.type.generic' call
      var tmp_9 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
      var tmp$ret$7 = isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE();
      var db = tmp_8.q57(tmp$ret$7, 1);
      println(db);
    }
    var tmp_10 = _get_settings__lbkut4(this);
    if (!(tmp_10.tl1('onboaring_screen') === 'true')) {
      // Inline function 'kotlin.collections.buildMap' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'kotlin.collections.buildMapInternal' call
      // Inline function 'kotlin.apply' call
      var this_0 = LinkedHashMap_init_$Create$();
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.redirect.RedirectViewModel.<anonymous>' call
      Companion_getInstance_112();
      this.wp2(this_0, 'next');
      Companion_getInstance_112();
      this.wp2(this_0, 'openLink');
      var tmp$ret$11 = this_0.f3();
      this.np1_1.sns('Onboarding', tmp$ret$11);
    } else {
      var tmp_11;
      if (destinationArg == null) {
        Companion_getInstance_122();
        tmp_11 = 'CourseListHome';
      } else {
        tmp_11 = destinationArg;
      }
      var destination = tmp_11;
      var tmp_12 = this.cp2();
      launch(tmp_12, VOID, VOID, RedirectViewModel$slambda_0(this, destinationArg, destination, null));
    }
  }
  function apiUrlConfig$factory_7() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_3(receiver);
    }, null);
  }
  function settings$factory() {
    return getPropertyCallableRef('settings', 1, KProperty1, function (receiver) {
      return _get_settings__lbkut4(receiver);
    }, null);
  }
  function apiUrlConfig$factory_8() {
    return getPropertyCallableRef('apiUrlConfig', 1, KProperty1, function (receiver) {
      return _get_apiUrlConfig__mldllg_3(receiver);
    }, null);
  }
  function settings$factory_0() {
    return getPropertyCallableRef('settings', 1, KProperty1, function (receiver) {
      return _get_settings__lbkut4(receiver);
    }, null);
  }
  function ScheduleEditViewModel$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ScheduleEditViewModel$slambda$slambda).qxd = function (it, $completion) {
    var tmp = this.gmp(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ScheduleEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.qxd(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ScheduleEditViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return null;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(ScheduleEditViewModel$slambda$slambda).gmp = function (it, completion) {
    var i = new ScheduleEditViewModel$slambda$slambda(completion);
    i.pxd_1 = it;
    return i;
  };
  function ScheduleEditViewModel$slambda$slambda_0(resultContinuation) {
    var i = new ScheduleEditViewModel$slambda$slambda(resultContinuation);
    var l = function (it, $completion) {
      return i.qxd(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ScheduleEditViewModel$slambda$slambda_1(this$0, resultContinuation) {
    this.zxd_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ScheduleEditViewModel$slambda$slambda_1).cxe = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ScheduleEditViewModel$slambda$slambda_1).z77 = function ($completion) {
    return this.cxe($completion);
  };
  protoOf(ScheduleEditViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            tmp_0.axe_1 = new Schedule();
            var tmp_1 = this;
            tmp_1.bxe_1 = this.axe_1;
            this.hd_1 = 1;
            var tmp_2 = get_doorPrimaryKeyManager(this.zxd_1.ep2());
            suspendResult = tmp_2.b62(21, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var ARGUMENT = suspendResult;
            this.bxe_1.pgr_1 = ARGUMENT;
            this.bxe_1.bgs_1 = true;
            this.bxe_1.ugr_1 = Companion_instance_28.ijr_1;
            return this.axe_1;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ScheduleEditViewModel$slambda$slambda_1).y77 = function (completion) {
    return new ScheduleEditViewModel$slambda$slambda_1(this.zxd_1, completion);
  };
  function ScheduleEditViewModel$slambda$slambda_2(this$0, resultContinuation) {
    var i = new ScheduleEditViewModel$slambda$slambda_1(this$0, resultContinuation);
    var l = function ($completion) {
      return i.cxe($completion);
    };
    l.$arity = 0;
    return l;
  }
  function ScheduleEditViewModel$slambda$lambda(this$0) {
    return function (schedule) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.axf_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.schedule.edit.ScheduleEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.gxf(schedule);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function Companion_167() {
    this.hxf_1 = 'ScheduleEdit';
  }
  var Companion_instance_215;
  function Companion_getInstance_184() {
    return Companion_instance_215;
  }
  function ScheduleEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.cqf();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function ScheduleEditViewModel$slambda(this$0, resultContinuation) {
    this.qxf_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ScheduleEditViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ScheduleEditViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ScheduleEditViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.sxf_1 = Companion_instance_28.a4r();
            this.hd_1 = 1;
            var tmp_0 = ScheduleEditViewModel$slambda$slambda_0(null);
            var tmp_1 = ScheduleEditViewModel$slambda$slambda_2(this.qxf_1, null);
            suspendResult = this.qxf_1.tp2(this.sxf_1, VOID, VOID, tmp_0, tmp_1, ScheduleEditViewModel$slambda$lambda(this.qxf_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.qxf_1.axf_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.gxf(VOID, VOID, VOID, true);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ScheduleEditViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new ScheduleEditViewModel$slambda(this.qxf_1, completion);
    i.rxf_1 = $this$launch;
    return i;
  };
  function ScheduleEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new ScheduleEditViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ScheduleEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.bxg_1 = $commitDelay;
    this.cxg_1 = $entity;
    this.dxg_1 = $this;
    this.exg_1 = $key;
    this.fxg_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ScheduleEditViewModel$onEntityChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ScheduleEditViewModel$onEntityChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(ScheduleEditViewModel$onEntityChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.bxg_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.cxg_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.dxg_1.pp2(this.dxg_1.lp1_1, this.exg_1, this.fxg_1, this.cxg_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ScheduleEditViewModel$onEntityChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new ScheduleEditViewModel$onEntityChanged$slambda(this.bxg_1, this.cxg_1, this.dxg_1, this.exg_1, this.fxg_1, completion);
    i.gxg_1 = $this$launch;
    return i;
  };
  function ScheduleEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new ScheduleEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function ScheduleEditViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'ScheduleEdit');
    this.axf_1 = MutableStateFlow(new ScheduleEditUiState(VOID, VOID, VOID, false));
    this.bxf_1 = asStateFlow(this.axf_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.pp1_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.schedule.edit.ScheduleEditViewModel.<anonymous>' call
        var tmp0_title = this.vp8(strings_getInstance().uln_1, strings_getInstance().vln_1);
        var tmp = this.jp2().en6(strings_getInstance().olk_1);
        var tmp1_actionBarButtonState = new ActionBarButtonUiState(true, tmp, VOID, ScheduleEditViewModel$onClickSave$ref(this));
        var nextValue = prevValue.nol(VOID, VOID, tmp0_title, VOID, true, VOID, VOID, VOID, tmp1_actionBarButtonState);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_0 = this.cp2();
    launch(tmp_0, VOID, VOID, ScheduleEditViewModel$slambda_0(this, null));
  }
  protoOf(ScheduleEditViewModel).hxg = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.axf_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.schedule.edit.ScheduleEditViewModel.onEntityChanged.<anonymous>' call
        var tmp2_safe_receiver = prevValue.cxf_1;
        var tmp = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.qgr_1;
        var tmp4_toTimeError = this.wp8(tmp, entity == null ? null : entity.qgr_1, prevValue.exf_1);
        var tmp0_safe_receiver = prevValue.cxf_1;
        var tmp_0 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.rgr_1;
        var tmp5_fromTimeError = this.wp8(tmp_0, entity == null ? null : entity.rgr_1, prevValue.dxf_1);
        var nextValue = prevValue.gxf(entity, tmp5_fromTimeError, tmp4_toTimeError);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_28.a4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_112();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.qp7_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_1 = this;
    var tmp_2 = this.cp2();
    tmp_1.qp7_1 = launch(tmp_2, VOID, VOID, ScheduleEditViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(ScheduleEditViewModel).cqf = function () {
    var tmp0_elvis_lhs = this.axf_1.t2().cxf_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var schedule = tmp;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.axf_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.schedule.edit.ScheduleEditViewModel.onClickSave.<anonymous>' call
        var tmp_0;
        if (schedule.qgr_1.equals(new Long(0, 0))) {
          tmp_0 = this.jp2().en6(strings_getInstance().blh_1);
        } else {
          tmp_0 = null;
        }
        var tmp_1 = tmp_0;
        var tmp_2;
        if (schedule.rgr_1.equals(new Long(0, 0))) {
          tmp_2 = this.jp2().en6(strings_getInstance().blh_1);
        } else if (schedule.rgr_1.c7(schedule.qgr_1) <= 0) {
          tmp_2 = this.jp2().en6(strings_getInstance().hm2_1);
        } else {
          tmp_2 = null;
        }
        var nextValue = prevValue.gxf(VOID, tmp_1, tmp_2);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    if (this.axf_1.t2().dxf_1 == null ? this.axf_1.t2().exf_1 == null : false) {
      this.up7(schedule);
    }
  };
  function ScheduleEditUiState(entity, fromTimeError, toTimeError, fieldsEnabled) {
    entity = entity === VOID ? null : entity;
    fromTimeError = fromTimeError === VOID ? null : fromTimeError;
    toTimeError = toTimeError === VOID ? null : toTimeError;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    this.cxf_1 = entity;
    this.dxf_1 = fromTimeError;
    this.exf_1 = toTimeError;
    this.fxf_1 = fieldsEnabled;
  }
  protoOf(ScheduleEditUiState).ixg = function (entity, fromTimeError, toTimeError, fieldsEnabled) {
    return new ScheduleEditUiState(entity, fromTimeError, toTimeError, fieldsEnabled);
  };
  protoOf(ScheduleEditUiState).gxf = function (entity, fromTimeError, toTimeError, fieldsEnabled, $super) {
    entity = entity === VOID ? this.cxf_1 : entity;
    fromTimeError = fromTimeError === VOID ? this.dxf_1 : fromTimeError;
    toTimeError = toTimeError === VOID ? this.exf_1 : toTimeError;
    fieldsEnabled = fieldsEnabled === VOID ? this.fxf_1 : fieldsEnabled;
    return $super === VOID ? this.ixg(entity, fromTimeError, toTimeError, fieldsEnabled) : $super.ixg.call(this, entity, fromTimeError, toTimeError, fieldsEnabled);
  };
  protoOf(ScheduleEditUiState).toString = function () {
    return 'ScheduleEditUiState(entity=' + this.cxf_1 + ', fromTimeError=' + this.dxf_1 + ', toTimeError=' + this.exf_1 + ', fieldsEnabled=' + this.fxf_1 + ')';
  };
  protoOf(ScheduleEditUiState).hashCode = function () {
    var result = this.cxf_1 == null ? 0 : this.cxf_1.hashCode();
    result = imul(result, 31) + (this.dxf_1 == null ? 0 : getStringHashCode(this.dxf_1)) | 0;
    result = imul(result, 31) + (this.exf_1 == null ? 0 : getStringHashCode(this.exf_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.fxf_1) | 0;
    return result;
  };
  protoOf(ScheduleEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ScheduleEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof ScheduleEditUiState ? other : THROW_CCE();
    if (!equals(this.cxf_1, tmp0_other_with_cast.cxf_1))
      return false;
    if (!(this.dxf_1 == tmp0_other_with_cast.dxf_1))
      return false;
    if (!(this.exf_1 == tmp0_other_with_cast.exf_1))
      return false;
    if (!(this.fxf_1 === tmp0_other_with_cast.fxf_1))
      return false;
    return true;
  };
  function Companion_168() {
    this.jxg_1 = 'DevSettings';
    this.kxg_1 = 'showDevSettings';
  }
  var Companion_instance_216;
  function Companion_getInstance_185() {
    return Companion_instance_216;
  }
  function SettingsViewModel$slambda$slambda(this$0, resultContinuation) {
    this.txg_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SettingsViewModel$slambda$slambda).dou = function (siteAdminSettingsVisible, $completion) {
    var tmp = this.eou(siteAdminSettingsVisible, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SettingsViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.dou((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SettingsViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.txg_1.qxh_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.uxi(VOID, VOID, VOID, this.uxg_1);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SettingsViewModel$slambda$slambda).eou = function (siteAdminSettingsVisible, completion) {
    var i = new SettingsViewModel$slambda$slambda(this.txg_1, completion);
    i.uxg_1 = siteAdminSettingsVisible;
    return i;
  };
  function SettingsViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new SettingsViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function (siteAdminSettingsVisible, $completion) {
      return i.dou(siteAdminSettingsVisible, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_supportedLangConfig__llzj1v($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.sxh_1;
    supportedLangConfig$factory_0();
    return this_0.t2();
  }
  function _get_setLanguageUseCase__st7nci_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.txh_1;
    setLanguageUseCase$factory_2();
    return this_0.t2();
  }
  function _get_getHtmlContentDisplayOptsUseCase__lppxoi($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.vxh_1;
    getHtmlContentDisplayOptsUseCase$factory_0();
    return this_0.t2();
  }
  function _get_getHtmlContentDisplaySettingUseCase__usawf4($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.wxh_1;
    getHtmlContentDisplaySettingUseCase$factory_0();
    return this_0.t2();
  }
  function _get_setHtmlContentDisplaySettingUseCase__8cgzqk($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.xxh_1;
    setHtmlContentDisplaySettingUseCase$factory_0();
    return this_0.t2();
  }
  function _get_getVersionUseCase__n7x57g_1($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.yxh_1;
    getVersionUseCase$factory_4();
    return this_0.t2();
  }
  function _get_getStorageOptionsUseCase__v5dedp($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.zxh_1;
    getStorageOptionsUseCase$factory_0();
    return this_0.t2();
  }
  function _get_getOfflineStorageSettingUseCase__5c8mhw($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.axi_1;
    getOfflineStorageSettingUseCase$factory_0();
    return this_0.t2();
  }
  function _get_setOfflineStorageSettingUseCase__lx9or4($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.bxi_1;
    setOfflineStorageSettingUseCase$factory_0();
    return this_0.t2();
  }
  function _get_getOfflineStorageAvailableSpace__om40zq($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.cxi_1;
    getOfflineStorageAvailableSpace$factory_0();
    return this_0.t2();
  }
  function _get_settings__lbkut4_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.exi_1;
    settings$factory_2();
    return this_0.t2();
  }
  function Companion_169() {
    this.vxi_1 = 'Settings';
  }
  var Companion_instance_217;
  function Companion_getInstance_186() {
    return Companion_instance_217;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_32(function_0) {
    this.wxi_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_32).t1d = function (value, $completion) {
    return this.wxi_1(value, $completion);
  };
  function SettingsViewModel$slambda(this$0, resultContinuation) {
    this.fxj_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SettingsViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SettingsViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SettingsViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 6;
            var tmp_0 = this;
            var tmp0_safe_receiver = _get_getStorageOptionsUseCase__v5dedp(this.fxj_1);
            tmp_0.hxj_1 = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.lnz();
            var tmp_1 = this;
            var tmp1_safe_receiver = _get_getOfflineStorageSettingUseCase__5c8mhw(this.fxj_1);
            tmp_1.ixj_1 = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.lnz();
            if (!(this.hxj_1 == null)) {
              var tmp_2 = this;
              tmp_2.jxj_1 = this.hxj_1;
              var tmp_3 = this;
              tmp_3.kxj_1 = this.jxj_1;
              var tmp_4 = this;
              tmp_4.lxj_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.jxj_1, 10));
              this.mxj_1 = this.kxj_1.w();
              this.hd_1 = 1;
              continue $sm;
            } else {
              this.hd_1 = 5;
              continue $sm;
            }

          case 1:
            if (!this.mxj_1.f()) {
              this.hd_1 = 4;
              continue $sm;
            }

            this.nxj_1 = this.mxj_1.e();
            var tmp_5 = this;
            tmp_5.oxj_1 = this.nxj_1;
            this.pxj_1 = _get_getOfflineStorageAvailableSpace__om40zq(this.fxj_1);
            if (this.pxj_1 == null) {
              this.qxj_1 = null;
              this.hd_1 = 3;
              continue $sm;
            } else {
              this.hd_1 = 2;
              suspendResult = this.pxj_1.wo3(this.oxj_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 2:
            this.qxj_1 = suspendResult;
            this.hd_1 = 3;
            continue $sm;
          case 3:
            var tmp1_elvis_lhs = this.qxj_1;
            var ARGUMENT = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
            var ARGUMENT_0 = new SettingsOfflineStorageOption(this.oxj_1, ARGUMENT);
            this.lxj_1.i1(ARGUMENT_0);
            this.hd_1 = 1;
            continue $sm;
          case 4:
            var optionsWithSpace = this.lxj_1;
            l$ret$1: do {
              var this_0 = this.fxj_1.qxh_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp0_elvis_lhs = this.ixj_1;
                var nextValue = prevValue.uxi(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, optionsWithSpace, tmp0_elvis_lhs == null ? first_0(this.hxj_1) : tmp0_elvis_lhs);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.hd_1 = 5;
            continue $sm;
          case 5:
            return Unit_instance;
          case 6:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 6) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SettingsViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new SettingsViewModel$slambda(this.fxj_1, completion);
    i.gxj_1 = $this$launch;
    return i;
  };
  function SettingsViewModel$slambda_0(this$0, resultContinuation) {
    var i = new SettingsViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SettingsViewModel$slambda_1(this$0, resultContinuation) {
    this.zxj_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SettingsViewModel$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SettingsViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SettingsViewModel$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.zxj_1.fp2().c7f();
            var tmp_1 = this.zxj_1.dp2();
            PermissionFlags_getInstance();
            var tmp_2 = tmp_0.uhc(tmp_1, new Long(16384, 0));
            var tmp_3 = SettingsViewModel$slambda$slambda_0(this.zxj_1, null);
            suspendResult = tmp_2.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_32(tmp_3), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SettingsViewModel$slambda_1).v1m = function ($this$launch, completion) {
    var i = new SettingsViewModel$slambda_1(this.zxj_1, completion);
    i.axk_1 = $this$launch;
    return i;
  };
  function SettingsViewModel$slambda_2(this$0, resultContinuation) {
    var i = new SettingsViewModel$slambda_1(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SettingsViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'Settings');
    this.qxh_1 = MutableStateFlow(new SettingsUiState());
    this.rxh_1 = asStateFlow(this.qxh_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(SupportedLanguagesConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.sxh_1 = Instance(this, tmp$ret$0, null).n5c(this, supportedLangConfig$factory());
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(SetLanguageUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.txh_1 = Instance(this, tmp$ret$2, null).n5c(this, setLanguageUseCase$factory_1());
    this.uxh_1 = _get_supportedLangConfig__llzj1v(this).bon(this.jp2());
    var tmp_3 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(GetHtmlContentDisplayEngineOptionsUseCase), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    tmp_3.vxh_1 = InstanceOrNull(this, tmp$ret$4, null).n5c(this, getHtmlContentDisplayOptsUseCase$factory());
    var tmp_5 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(GetHtmlContentDisplayEngineUseCase), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    tmp_5.wxh_1 = InstanceOrNull(this, tmp$ret$6, null).n5c(this, getHtmlContentDisplaySettingUseCase$factory());
    var tmp_7 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_8 = typeToken(createKType(getKClass(SetHtmlContentDisplayEngineUseCase), arrayOf([]), false));
    var tmp$ret$8 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
    tmp_7.xxh_1 = InstanceOrNull(this, tmp$ret$8, null).n5c(this, setHtmlContentDisplaySettingUseCase$factory());
    var tmp_9 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_10 = typeToken(createKType(getKClass(GetVersionUseCase), arrayOf([]), false));
    var tmp$ret$10 = isInterface(tmp_10, TypeToken) ? tmp_10 : THROW_CCE();
    tmp_9.yxh_1 = Instance(this, tmp$ret$10, null).n5c(this, getVersionUseCase$factory_3());
    var tmp_11 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_12 = typeToken(createKType(getKClass(GetOfflineStorageOptionsUseCase), arrayOf([]), false));
    var tmp$ret$12 = isInterface(tmp_12, TypeToken) ? tmp_12 : THROW_CCE();
    tmp_11.zxh_1 = InstanceOrNull(this, tmp$ret$12, null).n5c(this, getStorageOptionsUseCase$factory());
    var tmp_13 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_14 = typeToken(createKType(getKClass(GetOfflineStorageSettingUseCase), arrayOf([]), false));
    var tmp$ret$14 = isInterface(tmp_14, TypeToken) ? tmp_14 : THROW_CCE();
    tmp_13.axi_1 = InstanceOrNull(this, tmp$ret$14, null).n5c(this, getOfflineStorageSettingUseCase$factory());
    var tmp_15 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_16 = typeToken(createKType(getKClass(SetOfflineStorageSettingUseCase), arrayOf([]), false));
    var tmp$ret$16 = isInterface(tmp_16, TypeToken) ? tmp_16 : THROW_CCE();
    tmp_15.bxi_1 = InstanceOrNull(this, tmp$ret$16, null).n5c(this, setOfflineStorageSettingUseCase$factory());
    var tmp_17 = this;
    // Inline function 'org.kodein.di.instanceOrNull' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_18 = typeToken(createKType(getKClass(GetOfflineStorageAvailableSpace), arrayOf([]), false));
    var tmp$ret$18 = isInterface(tmp_18, TypeToken) ? tmp_18 : THROW_CCE();
    tmp_17.cxi_1 = InstanceOrNull(this, tmp$ret$18, null).n5c(this, getOfflineStorageAvailableSpace$factory());
    this.dxi_1 = atomic$int$1(0);
    var tmp_19 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_20 = typeToken(createKType(getKClass(Settings), arrayOf([]), false));
    var tmp$ret$20 = isInterface(tmp_20, TypeToken) ? tmp_20 : THROW_CCE();
    tmp_19.exi_1 = Instance(this, tmp$ret$20, null).n5c(this, settings$factory_1());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.pp1_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.settings.SettingsViewModel.<anonymous>' call
        var nextValue = prevValue.nol(VOID, VOID, this.jp2().en6(strings_getInstance().ele_1), VOID, true);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp0_elvis_lhs = _get_supportedLangConfig__llzj1v(this).tom();
    var tmp_21;
    if (tmp0_elvis_lhs == null) {
      Companion_getInstance_84();
      tmp_21 = '';
    } else {
      tmp_21 = tmp0_elvis_lhs;
    }
    var langSetting = tmp_21;
    var tmp$ret$25;
    $l$block_0: {
      // Inline function 'kotlin.collections.first' call
      var tmp0_iterator = this.uxh_1.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.viewmodel.settings.SettingsViewModel.<anonymous>' call
        if (element.ioj_1 === langSetting) {
          tmp$ret$25 = element;
          break $l$block_0;
        }
      }
      throw NoSuchElementException_init_$Create$_0('Collection contains no element matching the predicate.');
    }
    var currentLang = tmp$ret$25;
    $l$block_1: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.qxh_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.settings.SettingsViewModel.<anonymous>' call
        var tmp3_currentLanguage = currentLang.joj_1;
        var tmp4_availableLanguages = this.uxh_1;
        var tmp0_safe_receiver = _get_getHtmlContentDisplayOptsUseCase__lppxoi(this);
        var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.lnz();
        var tmp5_htmlContentDisplayOptions = tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;
        var tmp2_safe_receiver = _get_getHtmlContentDisplaySettingUseCase__usawf4(this);
        var tmp6_currentHtmlContentDisplayOption = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.lnz();
        var tmp7_version = _get_getVersionUseCase__n7x57g_1(this).lnz().jnz_1;
        var tmp_22 = _get_settings__lbkut4_0(this);
        var tmp8_showDeveloperOptions = tmp_22.ul1('showDevSettings', false);
        var nextValue_0 = prevValue_0.uxi(tmp5_htmlContentDisplayOptions, tmp6_currentHtmlContentDisplayOption, VOID, VOID, VOID, VOID, VOID, tmp3_currentLanguage, tmp4_availableLanguages, VOID, tmp8_showDeveloperOptions, tmp7_version);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_1;
        }
      }
    }
    var tmp_23 = this.cp2();
    launch(tmp_23, VOID, VOID, SettingsViewModel$slambda_0(this, null));
    var tmp_24 = this.cp2();
    launch(tmp_24, VOID, VOID, SettingsViewModel$slambda_2(this, null));
  }
  protoOf(SettingsViewModel).bxk = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.qxh_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.settings.SettingsViewModel.onClickLanguage.<anonymous>' call
        var nextValue = prevValue.uxi(VOID, VOID, VOID, VOID, VOID, true);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(SettingsViewModel).cxk = function (lang) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.qxh_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.settings.SettingsViewModel.onClickLang.<anonymous>' call
        var nextValue = prevValue.uxi(VOID, VOID, VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var result = _get_setLanguageUseCase__st7nci_0(this).wnz(lang, 'Settings', this.np1_1);
    if (result.unz_1) {
      $l$block_0: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_1 = this.qxh_1;
        while (true) {
          var prevValue_0 = this_1.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.settings.SettingsViewModel.onClickLang.<anonymous>' call
          var nextValue_0 = prevValue_0.uxi(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, true);
          if (this_1.y1k(prevValue_0, nextValue_0)) {
            break $l$block_0;
          }
        }
      }
    } else {
      $l$block_1: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_2 = this.qxh_1;
        while (true) {
          var prevValue_1 = this_2.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.settings.SettingsViewModel.onClickLang.<anonymous>' call
          var nextValue_1 = prevValue_1.uxi(VOID, VOID, VOID, VOID, VOID, VOID, VOID, lang.joj_1);
          if (this_2.y1k(prevValue_1, nextValue_1)) {
            break $l$block_1;
          }
        }
      }
    }
  };
  protoOf(SettingsViewModel).dxk = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.qxh_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.settings.SettingsViewModel.onDismissLangDialog.<anonymous>' call
        var nextValue = prevValue.uxi(VOID, VOID, VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(SettingsViewModel).exk = function () {
    this.np1_1.sns('Community', emptyMap());
  };
  protoOf(SettingsViewModel).fxk = function () {
    this.np1_1.sns('DeletedItems', emptyMap());
  };
  function SettingsUiState(htmlContentDisplayOptions, currentHtmlContentDisplayOption, holidayCalendarVisible, workspaceSettingsVisible, reasonLeavingVisible, langDialogVisible, htmlContentDisplayDialogVisible, currentLanguage, availableLanguages, waitForRestartDialogVisible, showDeveloperOptions, version, storageOptions, selectedOfflineStorageOption, storageOptionsDialogVisible) {
    htmlContentDisplayOptions = htmlContentDisplayOptions === VOID ? emptyList() : htmlContentDisplayOptions;
    currentHtmlContentDisplayOption = currentHtmlContentDisplayOption === VOID ? null : currentHtmlContentDisplayOption;
    holidayCalendarVisible = holidayCalendarVisible === VOID ? false : holidayCalendarVisible;
    workspaceSettingsVisible = workspaceSettingsVisible === VOID ? false : workspaceSettingsVisible;
    reasonLeavingVisible = reasonLeavingVisible === VOID ? false : reasonLeavingVisible;
    langDialogVisible = langDialogVisible === VOID ? false : langDialogVisible;
    htmlContentDisplayDialogVisible = htmlContentDisplayDialogVisible === VOID ? false : htmlContentDisplayDialogVisible;
    currentLanguage = currentLanguage === VOID ? '' : currentLanguage;
    availableLanguages = availableLanguages === VOID ? emptyList() : availableLanguages;
    waitForRestartDialogVisible = waitForRestartDialogVisible === VOID ? false : waitForRestartDialogVisible;
    showDeveloperOptions = showDeveloperOptions === VOID ? false : showDeveloperOptions;
    version = version === VOID ? '' : version;
    storageOptions = storageOptions === VOID ? emptyList() : storageOptions;
    selectedOfflineStorageOption = selectedOfflineStorageOption === VOID ? null : selectedOfflineStorageOption;
    storageOptionsDialogVisible = storageOptionsDialogVisible === VOID ? false : storageOptionsDialogVisible;
    this.fxi_1 = htmlContentDisplayOptions;
    this.gxi_1 = currentHtmlContentDisplayOption;
    this.hxi_1 = holidayCalendarVisible;
    this.ixi_1 = workspaceSettingsVisible;
    this.jxi_1 = reasonLeavingVisible;
    this.kxi_1 = langDialogVisible;
    this.lxi_1 = htmlContentDisplayDialogVisible;
    this.mxi_1 = currentLanguage;
    this.nxi_1 = availableLanguages;
    this.oxi_1 = waitForRestartDialogVisible;
    this.pxi_1 = showDeveloperOptions;
    this.qxi_1 = version;
    this.rxi_1 = storageOptions;
    this.sxi_1 = selectedOfflineStorageOption;
    this.txi_1 = storageOptionsDialogVisible;
  }
  protoOf(SettingsUiState).gxk = function (htmlContentDisplayOptions, currentHtmlContentDisplayOption, holidayCalendarVisible, workspaceSettingsVisible, reasonLeavingVisible, langDialogVisible, htmlContentDisplayDialogVisible, currentLanguage, availableLanguages, waitForRestartDialogVisible, showDeveloperOptions, version, storageOptions, selectedOfflineStorageOption, storageOptionsDialogVisible) {
    return new SettingsUiState(htmlContentDisplayOptions, currentHtmlContentDisplayOption, holidayCalendarVisible, workspaceSettingsVisible, reasonLeavingVisible, langDialogVisible, htmlContentDisplayDialogVisible, currentLanguage, availableLanguages, waitForRestartDialogVisible, showDeveloperOptions, version, storageOptions, selectedOfflineStorageOption, storageOptionsDialogVisible);
  };
  protoOf(SettingsUiState).uxi = function (htmlContentDisplayOptions, currentHtmlContentDisplayOption, holidayCalendarVisible, workspaceSettingsVisible, reasonLeavingVisible, langDialogVisible, htmlContentDisplayDialogVisible, currentLanguage, availableLanguages, waitForRestartDialogVisible, showDeveloperOptions, version, storageOptions, selectedOfflineStorageOption, storageOptionsDialogVisible, $super) {
    htmlContentDisplayOptions = htmlContentDisplayOptions === VOID ? this.fxi_1 : htmlContentDisplayOptions;
    currentHtmlContentDisplayOption = currentHtmlContentDisplayOption === VOID ? this.gxi_1 : currentHtmlContentDisplayOption;
    holidayCalendarVisible = holidayCalendarVisible === VOID ? this.hxi_1 : holidayCalendarVisible;
    workspaceSettingsVisible = workspaceSettingsVisible === VOID ? this.ixi_1 : workspaceSettingsVisible;
    reasonLeavingVisible = reasonLeavingVisible === VOID ? this.jxi_1 : reasonLeavingVisible;
    langDialogVisible = langDialogVisible === VOID ? this.kxi_1 : langDialogVisible;
    htmlContentDisplayDialogVisible = htmlContentDisplayDialogVisible === VOID ? this.lxi_1 : htmlContentDisplayDialogVisible;
    currentLanguage = currentLanguage === VOID ? this.mxi_1 : currentLanguage;
    availableLanguages = availableLanguages === VOID ? this.nxi_1 : availableLanguages;
    waitForRestartDialogVisible = waitForRestartDialogVisible === VOID ? this.oxi_1 : waitForRestartDialogVisible;
    showDeveloperOptions = showDeveloperOptions === VOID ? this.pxi_1 : showDeveloperOptions;
    version = version === VOID ? this.qxi_1 : version;
    storageOptions = storageOptions === VOID ? this.rxi_1 : storageOptions;
    selectedOfflineStorageOption = selectedOfflineStorageOption === VOID ? this.sxi_1 : selectedOfflineStorageOption;
    storageOptionsDialogVisible = storageOptionsDialogVisible === VOID ? this.txi_1 : storageOptionsDialogVisible;
    return $super === VOID ? this.gxk(htmlContentDisplayOptions, currentHtmlContentDisplayOption, holidayCalendarVisible, workspaceSettingsVisible, reasonLeavingVisible, langDialogVisible, htmlContentDisplayDialogVisible, currentLanguage, availableLanguages, waitForRestartDialogVisible, showDeveloperOptions, version, storageOptions, selectedOfflineStorageOption, storageOptionsDialogVisible) : $super.gxk.call(this, htmlContentDisplayOptions, currentHtmlContentDisplayOption, holidayCalendarVisible, workspaceSettingsVisible, reasonLeavingVisible, langDialogVisible, htmlContentDisplayDialogVisible, currentLanguage, availableLanguages, waitForRestartDialogVisible, showDeveloperOptions, version, storageOptions, selectedOfflineStorageOption, storageOptionsDialogVisible);
  };
  protoOf(SettingsUiState).toString = function () {
    return 'SettingsUiState(htmlContentDisplayOptions=' + this.fxi_1 + ', currentHtmlContentDisplayOption=' + this.gxi_1 + ', holidayCalendarVisible=' + this.hxi_1 + ', workspaceSettingsVisible=' + this.ixi_1 + ', reasonLeavingVisible=' + this.jxi_1 + ', langDialogVisible=' + this.kxi_1 + ', htmlContentDisplayDialogVisible=' + this.lxi_1 + ', currentLanguage=' + this.mxi_1 + ', availableLanguages=' + this.nxi_1 + ', waitForRestartDialogVisible=' + this.oxi_1 + ', showDeveloperOptions=' + this.pxi_1 + ', version=' + this.qxi_1 + ', storageOptions=' + this.rxi_1 + ', selectedOfflineStorageOption=' + this.sxi_1 + ', storageOptionsDialogVisible=' + this.txi_1 + ')';
  };
  protoOf(SettingsUiState).hashCode = function () {
    var result = hashCode(this.fxi_1);
    result = imul(result, 31) + (this.gxi_1 == null ? 0 : this.gxi_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.hxi_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.ixi_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.jxi_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.kxi_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.lxi_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.mxi_1) | 0;
    result = imul(result, 31) + hashCode(this.nxi_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.oxi_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.pxi_1) | 0;
    result = imul(result, 31) + getStringHashCode(this.qxi_1) | 0;
    result = imul(result, 31) + hashCode(this.rxi_1) | 0;
    result = imul(result, 31) + (this.sxi_1 == null ? 0 : this.sxi_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.txi_1) | 0;
    return result;
  };
  protoOf(SettingsUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SettingsUiState))
      return false;
    var tmp0_other_with_cast = other instanceof SettingsUiState ? other : THROW_CCE();
    if (!equals(this.fxi_1, tmp0_other_with_cast.fxi_1))
      return false;
    if (!equals(this.gxi_1, tmp0_other_with_cast.gxi_1))
      return false;
    if (!(this.hxi_1 === tmp0_other_with_cast.hxi_1))
      return false;
    if (!(this.ixi_1 === tmp0_other_with_cast.ixi_1))
      return false;
    if (!(this.jxi_1 === tmp0_other_with_cast.jxi_1))
      return false;
    if (!(this.kxi_1 === tmp0_other_with_cast.kxi_1))
      return false;
    if (!(this.lxi_1 === tmp0_other_with_cast.lxi_1))
      return false;
    if (!(this.mxi_1 === tmp0_other_with_cast.mxi_1))
      return false;
    if (!equals(this.nxi_1, tmp0_other_with_cast.nxi_1))
      return false;
    if (!(this.oxi_1 === tmp0_other_with_cast.oxi_1))
      return false;
    if (!(this.pxi_1 === tmp0_other_with_cast.pxi_1))
      return false;
    if (!(this.qxi_1 === tmp0_other_with_cast.qxi_1))
      return false;
    if (!equals(this.rxi_1, tmp0_other_with_cast.rxi_1))
      return false;
    if (!equals(this.sxi_1, tmp0_other_with_cast.sxi_1))
      return false;
    if (!(this.txi_1 === tmp0_other_with_cast.txi_1))
      return false;
    return true;
  };
  function SettingsOfflineStorageOption(option, availableSpace) {
    this.hxk_1 = option;
    this.ixk_1 = availableSpace;
  }
  protoOf(SettingsOfflineStorageOption).toString = function () {
    return 'SettingsOfflineStorageOption(option=' + this.hxk_1 + ', availableSpace=' + this.ixk_1.toString() + ')';
  };
  protoOf(SettingsOfflineStorageOption).hashCode = function () {
    var result = this.hxk_1.hashCode();
    result = imul(result, 31) + this.ixk_1.hashCode() | 0;
    return result;
  };
  protoOf(SettingsOfflineStorageOption).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SettingsOfflineStorageOption))
      return false;
    var tmp0_other_with_cast = other instanceof SettingsOfflineStorageOption ? other : THROW_CCE();
    if (!this.hxk_1.equals(tmp0_other_with_cast.hxk_1))
      return false;
    if (!this.ixk_1.equals(tmp0_other_with_cast.ixk_1))
      return false;
    return true;
  };
  function supportedLangConfig$factory() {
    return getPropertyCallableRef('supportedLangConfig', 1, KProperty1, function (receiver) {
      return _get_supportedLangConfig__llzj1v(receiver);
    }, null);
  }
  function setLanguageUseCase$factory_1() {
    return getPropertyCallableRef('setLanguageUseCase', 1, KProperty1, function (receiver) {
      return _get_setLanguageUseCase__st7nci_0(receiver);
    }, null);
  }
  function getHtmlContentDisplayOptsUseCase$factory() {
    return getPropertyCallableRef('getHtmlContentDisplayOptsUseCase', 1, KProperty1, function (receiver) {
      return _get_getHtmlContentDisplayOptsUseCase__lppxoi(receiver);
    }, null);
  }
  function getHtmlContentDisplaySettingUseCase$factory() {
    return getPropertyCallableRef('getHtmlContentDisplaySettingUseCase', 1, KProperty1, function (receiver) {
      return _get_getHtmlContentDisplaySettingUseCase__usawf4(receiver);
    }, null);
  }
  function setHtmlContentDisplaySettingUseCase$factory() {
    return getPropertyCallableRef('setHtmlContentDisplaySettingUseCase', 1, KProperty1, function (receiver) {
      return _get_setHtmlContentDisplaySettingUseCase__8cgzqk(receiver);
    }, null);
  }
  function getVersionUseCase$factory_3() {
    return getPropertyCallableRef('getVersionUseCase', 1, KProperty1, function (receiver) {
      return _get_getVersionUseCase__n7x57g_1(receiver);
    }, null);
  }
  function getStorageOptionsUseCase$factory() {
    return getPropertyCallableRef('getStorageOptionsUseCase', 1, KProperty1, function (receiver) {
      return _get_getStorageOptionsUseCase__v5dedp(receiver);
    }, null);
  }
  function getOfflineStorageSettingUseCase$factory() {
    return getPropertyCallableRef('getOfflineStorageSettingUseCase', 1, KProperty1, function (receiver) {
      return _get_getOfflineStorageSettingUseCase__5c8mhw(receiver);
    }, null);
  }
  function setOfflineStorageSettingUseCase$factory() {
    return getPropertyCallableRef('setOfflineStorageSettingUseCase', 1, KProperty1, function (receiver) {
      return _get_setOfflineStorageSettingUseCase__lx9or4(receiver);
    }, null);
  }
  function getOfflineStorageAvailableSpace$factory() {
    return getPropertyCallableRef('getOfflineStorageAvailableSpace', 1, KProperty1, function (receiver) {
      return _get_getOfflineStorageAvailableSpace__om40zq(receiver);
    }, null);
  }
  function settings$factory_1() {
    return getPropertyCallableRef('settings', 1, KProperty1, function (receiver) {
      return _get_settings__lbkut4_0(receiver);
    }, null);
  }
  function supportedLangConfig$factory_0() {
    return getPropertyCallableRef('supportedLangConfig', 1, KProperty1, function (receiver) {
      return _get_supportedLangConfig__llzj1v(receiver);
    }, null);
  }
  function setLanguageUseCase$factory_2() {
    return getPropertyCallableRef('setLanguageUseCase', 1, KProperty1, function (receiver) {
      return _get_setLanguageUseCase__st7nci_0(receiver);
    }, null);
  }
  function getHtmlContentDisplayOptsUseCase$factory_0() {
    return getPropertyCallableRef('getHtmlContentDisplayOptsUseCase', 1, KProperty1, function (receiver) {
      return _get_getHtmlContentDisplayOptsUseCase__lppxoi(receiver);
    }, null);
  }
  function getHtmlContentDisplaySettingUseCase$factory_0() {
    return getPropertyCallableRef('getHtmlContentDisplaySettingUseCase', 1, KProperty1, function (receiver) {
      return _get_getHtmlContentDisplaySettingUseCase__usawf4(receiver);
    }, null);
  }
  function setHtmlContentDisplaySettingUseCase$factory_0() {
    return getPropertyCallableRef('setHtmlContentDisplaySettingUseCase', 1, KProperty1, function (receiver) {
      return _get_setHtmlContentDisplaySettingUseCase__8cgzqk(receiver);
    }, null);
  }
  function getVersionUseCase$factory_4() {
    return getPropertyCallableRef('getVersionUseCase', 1, KProperty1, function (receiver) {
      return _get_getVersionUseCase__n7x57g_1(receiver);
    }, null);
  }
  function getStorageOptionsUseCase$factory_0() {
    return getPropertyCallableRef('getStorageOptionsUseCase', 1, KProperty1, function (receiver) {
      return _get_getStorageOptionsUseCase__v5dedp(receiver);
    }, null);
  }
  function getOfflineStorageSettingUseCase$factory_0() {
    return getPropertyCallableRef('getOfflineStorageSettingUseCase', 1, KProperty1, function (receiver) {
      return _get_getOfflineStorageSettingUseCase__5c8mhw(receiver);
    }, null);
  }
  function setOfflineStorageSettingUseCase$factory_0() {
    return getPropertyCallableRef('setOfflineStorageSettingUseCase', 1, KProperty1, function (receiver) {
      return _get_setOfflineStorageSettingUseCase__lx9or4(receiver);
    }, null);
  }
  function getOfflineStorageAvailableSpace$factory_0() {
    return getPropertyCallableRef('getOfflineStorageAvailableSpace', 1, KProperty1, function (receiver) {
      return _get_getOfflineStorageAvailableSpace__om40zq(receiver);
    }, null);
  }
  function settings$factory_2() {
    return getPropertyCallableRef('settings', 1, KProperty1, function (receiver) {
      return _get_settings__lbkut4_0(receiver);
    }, null);
  }
  function SiteDetailViewModel$slambda$slambda$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteDetailViewModel$slambda$slambda$slambda$slambda).txk = function (site, hasAdminPermission, $completion) {
    var tmp = this.uxk(site, hasAdminPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteDetailViewModel$slambda$slambda$slambda$slambda).um = function (p1, p2, $completion) {
    var tmp = (p1 == null ? true : p1 instanceof Site) ? p1 : THROW_CCE();
    return this.txk(tmp, (!(p2 == null) ? typeof p2 === 'boolean' : false) ? p2 : THROW_CCE(), $completion);
  };
  protoOf(SiteDetailViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return new Pair(this.rxk_1, this.sxk_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SiteDetailViewModel$slambda$slambda$slambda$slambda).uxk = function (site, hasAdminPermission, completion) {
    var i = new SiteDetailViewModel$slambda$slambda$slambda$slambda(completion);
    i.rxk_1 = site;
    i.sxk_1 = hasAdminPermission;
    return i;
  };
  function SiteDetailViewModel$slambda$slambda$slambda$slambda_0(resultContinuation) {
    var i = new SiteDetailViewModel$slambda$slambda$slambda$slambda(resultContinuation);
    var l = function (site, hasAdminPermission, $completion) {
      return i.txk(site, hasAdminPermission, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function SiteDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.dxl_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteDetailViewModel$slambda$slambda$slambda$slambda_1).fxl = function (it, $completion) {
    var tmp = this.gxl(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteDetailViewModel$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.fxl(p1 instanceof Pair ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteDetailViewModel$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp0_container = this.exl_1;
          var entity = tmp0_container.y6();
          var hasEditSitePermission = tmp0_container.z6();
          l$ret$1: do {
            var this_0 = this.dxl_1.dxm_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.hxm(entity);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          l$ret$3: do {
            var this_1 = this.dxl_1.pp1_1;
            while (true) {
              var prevValue_0 = this_1.t2();
              var nextValue_0 = prevValue_0.nol(prevValue_0.yok_1.tol(!(this.exl_1.w6_1 == null) ? hasEditSitePermission : false));
              if (this_1.y1k(prevValue_0, nextValue_0)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SiteDetailViewModel$slambda$slambda$slambda$slambda_1).gxl = function (it, completion) {
    var i = new SiteDetailViewModel$slambda$slambda$slambda$slambda_1(this.dxl_1, completion);
    i.exl_1 = it;
    return i;
  };
  function SiteDetailViewModel$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new SiteDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.fxl(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteDetailViewModel$slambda$slambda$slambda$slambda_3(this$0, $uiLangList, resultContinuation) {
    this.qxm_1 = this$0;
    this.rxm_1 = $uiLangList;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteDetailViewModel$slambda$slambda$slambda$slambda_3).txm = function (it, $completion) {
    var tmp = this.uxm(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteDetailViewModel$slambda$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.txm((!(p1 == null) ? isInterface(p1, List) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteDetailViewModel$slambda$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$3: do {
            var this_0 = this.qxm_1.dxm_1;
            while (true) {
              var prevValue = this_0.t2();
              var this_1 = this.sxm_1;
              var destination = ArrayList_init_$Create$();
              var tmp0_iterator = this_1.w();
              while (tmp0_iterator.f()) {
                var element = tmp0_iterator.e();
                var tmp$ret$0;
                l$ret$1: do {
                  var tmp0_iterator_0 = this.rxm_1.w();
                  while (tmp0_iterator_0.f()) {
                    var element_0 = tmp0_iterator_0.e();
                    if (element_0.ioj_1 === element.fh5_1) {
                      tmp$ret$0 = element_0;
                      break l$ret$1;
                    }
                  }
                  tmp$ret$0 = null;
                }
                 while (false);
                var tmp0_safe_receiver = tmp$ret$0;
                var tmp_0;
                if (tmp0_safe_receiver == null) {
                  tmp_0 = null;
                } else {
                  tmp_0 = new SiteTermsAndLangName(element, tmp0_safe_receiver.joj_1);
                }
                var tmp0_safe_receiver_0 = tmp_0;
                if (tmp0_safe_receiver_0 == null)
                  null;
                else {
                  destination.i1(tmp0_safe_receiver_0);
                }
              }
              var nextValue = prevValue.hxm(VOID, destination);
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$3;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SiteDetailViewModel$slambda$slambda$slambda$slambda_3).uxm = function (it, completion) {
    var i = new SiteDetailViewModel$slambda$slambda$slambda$slambda_3(this.qxm_1, this.rxm_1, completion);
    i.sxm_1 = it;
    return i;
  };
  function SiteDetailViewModel$slambda$slambda$slambda$slambda_4(this$0, $uiLangList, resultContinuation) {
    var i = new SiteDetailViewModel$slambda$slambda$slambda$slambda_3(this$0, $uiLangList, resultContinuation);
    var l = function (it, $completion) {
      return i.txm(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteDetailViewModel$slambda$slambda$slambda($siteFlow, $permissionFlow, this$0, resultContinuation) {
    this.dxn_1 = $siteFlow;
    this.exn_1 = $permissionFlow;
    this.fxn_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteDetailViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteDetailViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteDetailViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = combine(this.dxn_1, this.exn_1, SiteDetailViewModel$slambda$slambda$slambda$slambda_0(null));
            var tmp_1 = SiteDetailViewModel$slambda$slambda$slambda$slambda_2(this.fxn_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_33(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SiteDetailViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new SiteDetailViewModel$slambda$slambda$slambda(this.dxn_1, this.exn_1, this.fxn_1, completion);
    i.gxn_1 = $this$launch;
    return i;
  };
  function SiteDetailViewModel$slambda$slambda$slambda_0($siteFlow, $permissionFlow, this$0, resultContinuation) {
    var i = new SiteDetailViewModel$slambda$slambda$slambda($siteFlow, $permissionFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteDetailViewModel$slambda$slambda$slambda_1(this$0, $uiLangList, resultContinuation) {
    this.pxn_1 = this$0;
    this.qxn_1 = $uiLangList;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteDetailViewModel$slambda$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteDetailViewModel$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteDetailViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.pxn_1.fp2().j7e().fh4(1);
            var tmp_1 = SiteDetailViewModel$slambda$slambda$slambda$slambda_4(this.pxn_1, this.qxn_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_33(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SiteDetailViewModel$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new SiteDetailViewModel$slambda$slambda$slambda_1(this.pxn_1, this.qxn_1, completion);
    i.rxn_1 = $this$launch;
    return i;
  };
  function SiteDetailViewModel$slambda$slambda$slambda_2(this$0, $uiLangList, resultContinuation) {
    var i = new SiteDetailViewModel$slambda$slambda$slambda_1(this$0, $uiLangList, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteDetailViewModel$slambda$slambda(this$0, $this_launch, $uiLangList, resultContinuation) {
    this.axo_1 = this$0;
    this.bxo_1 = $this_launch;
    this.cxo_1 = $uiLangList;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteDetailViewModel$slambda$slambda).m86 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteDetailViewModel$slambda$slambda).z77 = function ($completion) {
    return this.m86($completion);
  };
  protoOf(SiteDetailViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var siteFlow = this.axo_1.fp2().i7e().mgz();
          var tmp_0 = this.axo_1.fp2().c7f();
          var tmp_1 = this.axo_1.dp2();
          PermissionFlags_getInstance();
          var permissionFlow = tmp_0.uhc(tmp_1, new Long(16384, 0));
          launch(this.bxo_1, VOID, VOID, SiteDetailViewModel$slambda$slambda$slambda_0(siteFlow, permissionFlow, this.axo_1, null));
          launch(this.bxo_1, VOID, VOID, SiteDetailViewModel$slambda$slambda$slambda_2(this.axo_1, this.cxo_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SiteDetailViewModel$slambda$slambda).y77 = function (completion) {
    return new SiteDetailViewModel$slambda$slambda(this.axo_1, this.bxo_1, this.cxo_1, completion);
  };
  function SiteDetailViewModel$slambda$slambda_0(this$0, $this_launch, $uiLangList, resultContinuation) {
    var i = new SiteDetailViewModel$slambda$slambda(this$0, $this_launch, $uiLangList, resultContinuation);
    var l = function ($completion) {
      return i.m86($completion);
    };
    l.$arity = 0;
    return l;
  }
  function Companion_170() {
    this.dxo_1 = 'Community';
  }
  var Companion_instance_218;
  function Companion_getInstance_187() {
    return Companion_instance_218;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_33(function_0) {
    this.exo_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_33).t1d = function (value, $completion) {
    return this.exo_1(value, $completion);
  };
  function SiteDetailViewModel$onClickEdit$ref($boundThis) {
    var l = function () {
      $boundThis.iut();
      return Unit_instance;
    };
    l.callableName = 'onClickEdit';
    return l;
  }
  function SiteDetailViewModel$slambda(this$0, $uiLangList, resultContinuation) {
    this.nxo_1 = this$0;
    this.oxo_1 = $uiLangList;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteDetailViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteDetailViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteDetailViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.nxo_1.dxm_1, SiteDetailViewModel$slambda$slambda_0(this.nxo_1, this.pxo_1, this.oxo_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SiteDetailViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new SiteDetailViewModel$slambda(this.nxo_1, this.oxo_1, completion);
    i.pxo_1 = $this$launch;
    return i;
  };
  function SiteDetailViewModel$slambda_0(this$0, $uiLangList, resultContinuation) {
    var i = new SiteDetailViewModel$slambda(this$0, $uiLangList, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteDetailViewModel(di, savedStateHandle) {
    DetailViewModel.call(this, di, savedStateHandle, 'Community');
    this.dxm_1 = MutableStateFlow(new SiteDetailUiState());
    this.exm_1 = asStateFlow(this.dxm_1);
    // Inline function 'org.kodein.di.instance' call
    var tmp = get_direct(this).s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(SupportedLanguagesConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var supportLangConfig = tmp.q57(tmp$ret$0, null);
    var uiLangList = supportLangConfig.qo3_1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.pp1_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.site.detail.SiteDetailViewModel.<anonymous>' call
        var tmp0_text = this.jp2().en6(strings_getInstance().mlo_1);
        var tmp1_onClick = SiteDetailViewModel$onClickEdit$ref(this);
        var tmp2_icon = FabIcon_EDIT_getInstance();
        var nextValue = prevValue.nol(new FabUiState(false, tmp0_text, tmp2_icon, tmp1_onClick), VOID, this.jp2().en6(strings_getInstance().sm2_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_1 = this.cp2();
    launch(tmp_1, VOID, VOID, SiteDetailViewModel$slambda_0(this, uiLangList, null));
  }
  protoOf(SiteDetailViewModel).iut = function () {
    Companion_getInstance_112();
    var tmp0_safe_receiver = this.dxm_1.t2().fxm_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.qgz_1;
    var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.toString();
    this.np1_1.sns('SiteEdit', mapOf_0(to('entityUid', tmp2_elvis_lhs == null ? '-1' : tmp2_elvis_lhs)));
  };
  protoOf(SiteDetailViewModel).qxo = function (termsAndLang) {
    var tmp0_elvis_lhs = termsAndLang.tj7_1.fh5_1;
    this.np1_1.sns('Terms', mapOf_0(to('locale', tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs)));
  };
  function SiteDetailUiState(site, siteTerms) {
    site = site === VOID ? null : site;
    siteTerms = siteTerms === VOID ? emptyList() : siteTerms;
    this.fxm_1 = site;
    this.gxm_1 = siteTerms;
  }
  protoOf(SiteDetailUiState).rxo = function (site, siteTerms) {
    return new SiteDetailUiState(site, siteTerms);
  };
  protoOf(SiteDetailUiState).hxm = function (site, siteTerms, $super) {
    site = site === VOID ? this.fxm_1 : site;
    siteTerms = siteTerms === VOID ? this.gxm_1 : siteTerms;
    return $super === VOID ? this.rxo(site, siteTerms) : $super.rxo.call(this, site, siteTerms);
  };
  protoOf(SiteDetailUiState).toString = function () {
    return 'SiteDetailUiState(site=' + this.fxm_1 + ', siteTerms=' + this.gxm_1 + ')';
  };
  protoOf(SiteDetailUiState).hashCode = function () {
    var result = this.fxm_1 == null ? 0 : hashCode(this.fxm_1);
    result = imul(result, 31) + hashCode(this.gxm_1) | 0;
    return result;
  };
  protoOf(SiteDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SiteDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof SiteDetailUiState ? other : THROW_CCE();
    if (!equals(this.fxm_1, tmp0_other_with_cast.fxm_1))
      return false;
    if (!equals(this.gxm_1, tmp0_other_with_cast.gxm_1))
      return false;
    return true;
  };
  function SiteEditViewModel$slambda$slambda$slambda(this$0, resultContinuation) {
    this.axp_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteEditViewModel$slambda$slambda$slambda).jop = function (it, $completion) {
    var tmp = this.kop(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteEditViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.jop(p1 instanceof NavResult ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteEditViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var tmp_0 = this.bxp_1.qoo_1;
          var tmp0_elvis_lhs = (!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) ? tmp_0 : null;
          var tmp_1;
          if (tmp0_elvis_lhs == null) {
            return Unit_instance;
          } else {
            tmp_1 = tmp0_elvis_lhs;
          }
          var newTerms = tmp_1;
          this.axp_1.dxq(newTerms);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SiteEditViewModel$slambda$slambda$slambda).kop = function (it, completion) {
    var i = new SiteEditViewModel$slambda$slambda$slambda(this.axp_1, completion);
    i.bxp_1 = it;
    return i;
  };
  function SiteEditViewModel$slambda$slambda$slambda_0(this$0, resultContinuation) {
    var i = new SiteEditViewModel$slambda$slambda$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.jop(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteEditViewModel$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteEditViewModel$slambda$slambda).nxq = function (db, $completion) {
    var tmp = this.gmp(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.nxq(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteEditViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.mxq_1.i7e().lgz(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SiteEditViewModel$slambda$slambda).gmp = function (db, completion) {
    var i = new SiteEditViewModel$slambda$slambda(completion);
    i.mxq_1 = db;
    return i;
  };
  function SiteEditViewModel$slambda$slambda_0(resultContinuation) {
    var i = new SiteEditViewModel$slambda$slambda(resultContinuation);
    var l = function (db, $completion) {
      return i.nxq(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteEditViewModel$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteEditViewModel$slambda$slambda_1).th1 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteEditViewModel$slambda$slambda_1).z77 = function ($completion) {
    return this.th1($completion);
  };
  protoOf(SiteEditViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return new Site();
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SiteEditViewModel$slambda$slambda_1).y77 = function (completion) {
    return new SiteEditViewModel$slambda$slambda_1(completion);
  };
  function SiteEditViewModel$slambda$slambda_2(resultContinuation) {
    var i = new SiteEditViewModel$slambda$slambda_1(resultContinuation);
    var l = function ($completion) {
      return i.th1($completion);
    };
    l.$arity = 0;
    return l;
  }
  function SiteEditViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.zxp_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.exr(it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function SiteEditViewModel$slambda$slambda_3($supportedLangCodes, resultContinuation) {
    this.nxr_1 = $supportedLangCodes;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteEditViewModel$slambda$slambda_3).pxr = function (it, $completion) {
    var tmp = this.gmp(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteEditViewModel$slambda$slambda_3).he = function (p1, $completion) {
    return this.pxr(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteEditViewModel$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.oxr_1.j7e().gh4(1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var this_0 = suspendResult;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              if (contains_0(this.nxr_1, element.fh5_1)) {
                destination.i1(element);
              }
            }

            var termsLoadedFromDb = destination;
            var destination_0 = ArrayList_init_$Create$();
            var tmp0_iterator_0 = termsLoadedFromDb.w();
            while (tmp0_iterator_0.f()) {
              var element_0 = tmp0_iterator_0.e();
              var tmp0_safe_receiver = element_0.fh5_1;
              if (tmp0_safe_receiver == null)
                null;
              else {
                destination_0.i1(tmp0_safe_receiver);
              }
            }

            var langsLoadedFromDb = destination_0;
            var this_1 = ArrayList_init_$Create$();
            this_1.m1(termsLoadedFromDb);
            var this_2 = this.nxr_1;
            var destination_1 = ArrayList_init_$Create$();
            var tmp0_iterator_1 = this_2.w();
            while (tmp0_iterator_1.f()) {
              var element_1 = tmp0_iterator_1.e();
              if (!langsLoadedFromDb.a1(element_1)) {
                destination_1.i1(element_1);
              }
            }

            var destination_2 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination_1, 10));
            var tmp0_iterator_2 = destination_1.w();
            while (tmp0_iterator_2.f()) {
              var item = tmp0_iterator_2.e();
              var this_3 = new SiteTerms();
              this_3.fh5_1 = item;
              destination_2.i1(this_3);
            }

            this_1.m1(destination_2);
            return this_1.f3();
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SiteEditViewModel$slambda$slambda_3).gmp = function (it, completion) {
    var i = new SiteEditViewModel$slambda$slambda_3(this.nxr_1, completion);
    i.oxr_1 = it;
    return i;
  };
  function SiteEditViewModel$slambda$slambda_4($supportedLangCodes, resultContinuation) {
    var i = new SiteEditViewModel$slambda$slambda_3($supportedLangCodes, resultContinuation);
    var l = function (it, $completion) {
      return i.pxr(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteEditViewModel$slambda$slambda_5(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteEditViewModel$slambda$slambda_5).yxr = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteEditViewModel$slambda$slambda_5).z77 = function ($completion) {
    return this.yxr($completion);
  };
  protoOf(SiteEditViewModel$slambda$slambda_5).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return null;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SiteEditViewModel$slambda$slambda_5).y77 = function (completion) {
    return new SiteEditViewModel$slambda$slambda_5(completion);
  };
  function SiteEditViewModel$slambda$slambda_6(resultContinuation) {
    var i = new SiteEditViewModel$slambda$slambda_5(resultContinuation);
    var l = function ($completion) {
      return i.yxr($completion);
    };
    l.$arity = 0;
    return l;
  }
  function SiteEditViewModel$slambda$lambda_0(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.zxp_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var nextValue = prevValue.exr(VOID, it == null ? emptyList() : it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function SiteEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.cqf();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function SiteEditViewModel$slambda$slambda_7(this$0, resultContinuation) {
    this.hxs_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteEditViewModel$slambda$slambda_7).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteEditViewModel$slambda$slambda_7).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteEditViewModel$slambda$slambda_7).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.hxs_1.np2(this.hxs_1.gp2(), 'siteTermsHtml');
            var tmp_1 = SiteEditViewModel$slambda$slambda$slambda_0(this.hxs_1, null);
            suspendResult = tmp_0.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_34(tmp_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SiteEditViewModel$slambda$slambda_7).v1m = function ($this$launch, completion) {
    var i = new SiteEditViewModel$slambda$slambda_7(this.hxs_1, completion);
    i.ixs_1 = $this$launch;
    return i;
  };
  function SiteEditViewModel$slambda$slambda_8(this$0, resultContinuation) {
    var i = new SiteEditViewModel$slambda$slambda_7(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteEditViewModel$onClickSave$slambda$lambda($it) {
    return function ($this$shallowCopy) {
      var tmp = $this$shallowCopy;
      // Inline function 'kotlin.text.isNullOrBlank' call
      var tmp0_safe_receiver = $it.eh5_1;
      var this_0 = tmp0_safe_receiver == null ? null : htmlToPlainText(tmp0_safe_receiver);
      // Inline function 'kotlin.contracts.contract' call
      tmp.hh5_1 = !(this_0 == null ? true : isBlank(this_0));
      return Unit_instance;
    };
  }
  function _get_languagesConfig__hebcss_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.bxq_1;
    languagesConfig$factory_2();
    return this_0.t2();
  }
  function Companion_171() {
    this.jxs_1 = 'SiteEdit';
    this.kxs_1 = 'siteTermsLang';
    this.lxs_1 = 'termsList';
    this.mxs_1 = 'siteTermsHtml';
  }
  var Companion_instance_219;
  function Companion_getInstance_188() {
    return Companion_instance_219;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_34(function_0) {
    this.nxs_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_34).t1d = function (value, $completion) {
    return this.nxs_1(value, $completion);
  };
  function SiteEditViewModel$slambda(this$0, resultContinuation) {
    this.wxs_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteEditViewModel$slambda).oqh = function (db, $completion) {
    var tmp = this.gmp(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteEditViewModel$slambda).he = function (p1, $completion) {
    return this.oqh(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteEditViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.xxs_1.c7f();
            var tmp_1 = this.wxs_1.dp2();
            PermissionFlags_getInstance();
            suspendResult = tmp_0.thc(tmp_1, new Long(16384, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SiteEditViewModel$slambda).gmp = function (db, completion) {
    var i = new SiteEditViewModel$slambda(this.wxs_1, completion);
    i.xxs_1 = db;
    return i;
  };
  function SiteEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new SiteEditViewModel$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.oqh(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteEditViewModel$lambda(this$0) {
    return function (enabled) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.zxp_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.exr(VOID, VOID, VOID, enabled);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function SiteEditViewModel$slambda_1(this$0, $supportedLangCodes, resultContinuation) {
    this.gxt_1 = this$0;
    this.hxt_1 = $supportedLangCodes;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteEditViewModel$slambda_1).u1m = function ($this$launchIfHasPermission, $completion) {
    var tmp = this.v1m($this$launchIfHasPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteEditViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteEditViewModel$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            var tmp_0 = Companion_instance_30.a4r();
            var tmp_1 = SiteEditViewModel$slambda$slambda_0(null);
            var tmp_2 = SiteEditViewModel$slambda$slambda_2(null);
            suspendResult = this.gxt_1.tp2(tmp_0, VOID, VOID, tmp_1, tmp_2, SiteEditViewModel$slambda$lambda(this.gxt_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            var tmp_3 = ListSerializer(Companion_instance_46.a4r());
            var tmp_4 = listOf_0('termsList');
            var tmp_5 = SiteEditViewModel$slambda$slambda_4(this.hxt_1, null);
            var tmp_6 = SiteEditViewModel$slambda$slambda_6(null);
            suspendResult = this.gxt_1.sp2(tmp_3, tmp_4, 'termsList', tmp_5, tmp_6, SiteEditViewModel$slambda$lambda_0(this.gxt_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            l$ret$1: do {
              var this_0 = this.gxt_1.pp1_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_7 = this.gxt_1.jp2().en6(strings_getInstance().alw_1);
                var nextValue = prevValue.nol(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_7, VOID, SiteEditViewModel$onClickSave$ref(this.gxt_1)));
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            launch(this.ixt_1, VOID, VOID, SiteEditViewModel$slambda$slambda_8(this.gxt_1, null));
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SiteEditViewModel$slambda_1).v1m = function ($this$launchIfHasPermission, completion) {
    var i = new SiteEditViewModel$slambda_1(this.gxt_1, this.hxt_1, completion);
    i.ixt_1 = $this$launchIfHasPermission;
    return i;
  };
  function SiteEditViewModel$slambda_2(this$0, $supportedLangCodes, resultContinuation) {
    var i = new SiteEditViewModel$slambda_1(this$0, $supportedLangCodes, resultContinuation);
    var l = function ($this$launchIfHasPermission, $completion) {
      return i.u1m($this$launchIfHasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteEditViewModel$onChangeTermsHtml$lambda($html) {
    return function ($this$shallowCopy) {
      $this$shallowCopy.eh5_1 = $html;
      return Unit_instance;
    };
  }
  function SiteEditViewModel$onChangeTermsHtml$lambda_0($prev) {
    return function (it) {
      return it.fh5_1 === $prev.cxr_1.ioj_1;
    };
  }
  function SiteEditViewModel$onChangeTermsHtml$slambda(this$0, $newTerms, resultContinuation) {
    this.rxt_1 = this$0;
    this.sxt_1 = $newTerms;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteEditViewModel$onChangeTermsHtml$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteEditViewModel$onChangeTermsHtml$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteEditViewModel$onChangeTermsHtml$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            suspendResult = delay(new Long(200, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            suspendResult = this.rxt_1.pp2(this.rxt_1.lp1_1, 'termsList', ListSerializer(Companion_instance_46.a4r()), this.sxt_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SiteEditViewModel$onChangeTermsHtml$slambda).v1m = function ($this$launch, completion) {
    var i = new SiteEditViewModel$onChangeTermsHtml$slambda(this.rxt_1, this.sxt_1, completion);
    i.txt_1 = $this$launch;
    return i;
  };
  function SiteEditViewModel$onChangeTermsHtml$slambda_0(this$0, $newTerms, resultContinuation) {
    var i = new SiteEditViewModel$onChangeTermsHtml$slambda(this$0, $newTerms, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    this.cxu_1 = $commitDelay;
    this.dxu_1 = $entity;
    this.exu_1 = $this;
    this.fxu_1 = $key;
    this.gxu_1 = $serializer;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteEditViewModel$onEntityChanged$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteEditViewModel$onEntityChanged$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteEditViewModel$onEntityChanged$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = delay(this.cxu_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            if (!(this.dxu_1 == null)) {
              this.hd_1 = 2;
              suspendResult = this.exu_1.pp2(this.exu_1.lp1_1, this.fxu_1, this.gxu_1, this.dxu_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 3;
              continue $sm;
            }

          case 2:
            this.hd_1 = 3;
            continue $sm;
          case 3:
            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SiteEditViewModel$onEntityChanged$slambda).v1m = function ($this$launch, completion) {
    var i = new SiteEditViewModel$onEntityChanged$slambda(this.cxu_1, this.dxu_1, this.exu_1, this.fxu_1, this.gxu_1, completion);
    i.hxu_1 = $this$launch;
    return i;
  };
  function SiteEditViewModel$onEntityChanged$slambda_0($commitDelay, $entity, $this, $key, $serializer, resultContinuation) {
    var i = new SiteEditViewModel$onEntityChanged$slambda($commitDelay, $entity, $this, $key, $serializer, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteEditViewModel$onClickSave$slambda(this$0, $siteToSave, resultContinuation) {
    this.qxu_1 = this$0;
    this.rxu_1 = $siteToSave;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteEditViewModel$onClickSave$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteEditViewModel$onClickSave$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteEditViewModel$onClickSave$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            suspendResult = this.qxu_1.fp2().i7e().ngz(this.rxu_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            var tmp_0 = this.qxu_1.fp2().j7e();
            var this_0 = this.qxu_1.zxp_1.t2().xxq_1;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              var tmp_1;
              var tmp0_safe_receiver = element.eh5_1;
              var this_1 = tmp0_safe_receiver == null ? null : htmlToPlainText(tmp0_safe_receiver);
              if (!(this_1 == null ? true : isBlank(this_1))) {
                tmp_1 = true;
              } else {
                tmp_1 = !element.dh5_1.equals(new Long(0, 0));
              }
              if (tmp_1) {
                destination.i1(element);
              }
            }

            var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination, 10));
            var tmp0_iterator_0 = destination.w();
            while (tmp0_iterator_0.f()) {
              var item = tmp0_iterator_0.e();
              destination_0.i1(shallowCopy_12(item, SiteEditViewModel$onClickSave$slambda$lambda(item)));
            }

            suspendResult = tmp_0.hh4(destination_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.qxu_1.tp7('Community', this.rxu_1.qgz_1, this.rxu_1);
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SiteEditViewModel$onClickSave$slambda).v1m = function ($this$launch, completion) {
    var i = new SiteEditViewModel$onClickSave$slambda(this.qxu_1, this.rxu_1, completion);
    i.sxu_1 = $this$launch;
    return i;
  };
  function SiteEditViewModel$onClickSave$slambda_0(this$0, $siteToSave, resultContinuation) {
    var i = new SiteEditViewModel$onClickSave$slambda(this$0, $siteToSave, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteEditViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'SiteEdit');
    this.zxp_1 = MutableStateFlow(new SiteEditUiState());
    this.axq_1 = asStateFlow(this.zxp_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(SupportedLanguagesConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.bxq_1 = Instance(this, tmp$ret$0, null).n5c(this, languagesConfig$factory_1());
    this.cxq_1 = null;
    var supportedLangs = _get_languagesConfig__hebcss_0(this).qo3_1;
    // Inline function 'kotlin.collections.map' call
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(supportedLangs, 10));
    var tmp0_iterator = supportedLangs.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.<anonymous>' call
      var tmp$ret$2 = item.ioj_1;
      destination.i1(tmp$ret$2);
    }
    var supportedLangCodes = destination;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.pp1_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.<anonymous>' call
        var tmp0_title = this.jp2().en6(strings_getInstance().rm2_1);
        var nextValue = prevValue.nol(VOID, VOID, tmp0_title, VOID, true);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_1: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.zxp_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.<anonymous>' call
        var tmp$ret$8;
        $l$block_0: {
          // Inline function 'kotlin.collections.first' call
          var tmp0_iterator_0 = supportedLangs.w();
          while (tmp0_iterator_0.f()) {
            var element = tmp0_iterator_0.e();
            // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.<anonymous>.<anonymous>' call
            var tmp0_elvis_lhs = savedStateHandle.ba('siteTermsLang');
            if (element.ioj_1 === (tmp0_elvis_lhs == null ? _get_languagesConfig__hebcss_0(this).so3_1 : tmp0_elvis_lhs)) {
              tmp$ret$8 = element;
              break $l$block_0;
            }
          }
          throw NoSuchElementException_init_$Create$_0('Collection contains no element matching the predicate.');
        }
        var nextValue_0 = prevValue_0.exr(VOID, VOID, supportedLangs, VOID, VOID, VOID, tmp$ret$8);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_1;
        }
      }
    }
    var tmp_1 = SiteEditViewModel$slambda_0(this, null);
    var tmp_2 = SiteEditViewModel$lambda(this);
    this.up2(tmp_1, true, tmp_2, SiteEditViewModel$slambda_2(this, supportedLangCodes, null));
  }
  protoOf(SiteEditViewModel).txu = function (uiLang) {
    this.lp1_1.rox('siteTermsLang', uiLang.ioj_1);
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.zxp_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.onChangeTermsLanguage.<anonymous>' call
        var nextValue = prevValue.exr(VOID, VOID, VOID, VOID, VOID, VOID, uiLang);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(SiteEditViewModel).dxq = function (html) {
    var tmp0_elvis_lhs = this.zxp_1.t2().uxu();
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var currentSiteTerms = tmp;
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.updateAndGet' call
      var this_0 = this.zxp_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.onChangeTermsHtml.<anonymous>' call
        var tmp_0 = shallowCopy_12(currentSiteTerms, SiteEditViewModel$onChangeTermsHtml$lambda(html));
        var nextValue = prevValue.exr(VOID, replace_0(prevValue.xxq_1, tmp_0, SiteEditViewModel$onChangeTermsHtml$lambda_0(prevValue)), VOID, VOID, VOID, null);
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = nextValue;
          break $l$block;
        }
      }
    }
    var newTerms = tmp$ret$1.xxq_1;
    var tmp1_safe_receiver = this.cxq_1;
    if (tmp1_safe_receiver == null)
      null;
    else {
      tmp1_safe_receiver.mr();
    }
    var tmp_1 = this;
    var tmp_2 = this.cp2();
    tmp_1.cxq_1 = launch(tmp_2, VOID, VOID, SiteEditViewModel$onChangeTermsHtml$slambda_0(this, newTerms, null));
  };
  protoOf(SiteEditViewModel).vxu = function (entity) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.zxp_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.onEntityChanged.<anonymous>' call
        var tmp0_safe_receiver = prevValue.wxq_1;
        var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.vgz_1;
        var nextValue = prevValue.exr(entity, VOID, VOID, VOID, this.wp8(tmp, entity == null ? null : entity.vgz_1, prevValue.axr_1));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    // Inline function 'com.ustadmobile.core.viewmodel.UstadEditViewModel.scheduleEntityCommitToSavedState' call
    var serializer = Companion_instance_30.a4r();
    var commitDelay = new Long(200, 0);
    Companion_getInstance_112();
    var key = 'entityState';
    var tmp0_safe_receiver_0 = this.qp7_1;
    if (tmp0_safe_receiver_0 == null)
      null;
    else {
      tmp0_safe_receiver_0.mr();
    }
    var tmp_0 = this;
    var tmp_1 = this.cp2();
    tmp_0.qp7_1 = launch(tmp_1, VOID, VOID, SiteEditViewModel$onEntityChanged$slambda_0(commitDelay, entity, this, key, serializer, null));
  };
  protoOf(SiteEditViewModel).cqf = function () {
    var tmp0_elvis_lhs = this.zxp_1.t2().wxq_1;
    var tmp;
    if (tmp0_elvis_lhs == null) {
      return Unit_instance;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    var siteToSave = tmp;
    // Inline function 'kotlin.text.isNullOrBlank' call
    var this_0 = siteToSave.vgz_1;
    // Inline function 'kotlin.contracts.contract' call
    if (this_0 == null ? true : isBlank(this_0)) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_1 = this.zxp_1;
        while (true) {
          var prevValue = this_1.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.onClickSave.<anonymous>' call
          var nextValue = prevValue.exr(VOID, VOID, VOID, VOID, this.jp2().en6(strings_getInstance().ome_1));
          if (this_1.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
    }
    // Inline function 'kotlin.collections.map' call
    var this_2 = this.zxp_1.t2().xxq_1;
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_2, 10));
    var tmp0_iterator = this_2.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.onClickSave.<anonymous>' call
      var tmp2_elvis_lhs = item.fh5_1;
      var tmp_0 = tmp2_elvis_lhs == null ? '' : tmp2_elvis_lhs;
      var tmp0_safe_receiver = item.eh5_1;
      var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : htmlToPlainText(tmp0_safe_receiver);
      var tmp$ret$3 = to(tmp_0, tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
      destination.i1(tmp$ret$3);
    }
    var siteTermsPlainText = toMap(destination);
    var tmp_1;
    if (siteToSave.xgz_1) {
      var tmp$ret$6;
      $l$block_1: {
        // Inline function 'kotlin.collections.all' call
        if (siteTermsPlainText.c1()) {
          tmp$ret$6 = true;
          break $l$block_1;
        }
        // Inline function 'kotlin.collections.iterator' call
        var tmp0_iterator_0 = siteTermsPlainText.q2().w();
        while (tmp0_iterator_0.f()) {
          var element = tmp0_iterator_0.e();
          // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.onClickSave.<anonymous>' call
          if (!isBlank(element.t2())) {
            tmp$ret$6 = false;
            break $l$block_1;
          }
        }
        tmp$ret$6 = true;
      }
      tmp_1 = tmp$ret$6;
    } else {
      tmp_1 = false;
    }
    if (tmp_1) {
      $l$block_2: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_3 = this.zxp_1;
        while (true) {
          var prevValue_0 = this_3.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditViewModel.onClickSave.<anonymous>' call
          var nextValue_0 = prevValue_0.exr(VOID, VOID, VOID, VOID, VOID, this.jp2().en6(strings_getInstance().zme_1));
          if (this_3.y1k(prevValue_0, nextValue_0)) {
            break $l$block_2;
          }
        }
      }
    }
    if (this.zxp_1.t2().dxr_1)
      return Unit_instance;
    var tmp_2 = this.cp2();
    launch(tmp_2, VOID, VOID, SiteEditViewModel$onClickSave$slambda_0(this, siteToSave, null));
  };
  function SiteEditUiState(site, siteTerms, uiLangs, fieldsEnabled, siteNameError, registrationEnabledError, currentSiteTermsLang) {
    site = site === VOID ? null : site;
    siteTerms = siteTerms === VOID ? emptyList() : siteTerms;
    uiLangs = uiLangs === VOID ? listOf_0(new UiLanguage('en', 'English')) : uiLangs;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    siteNameError = siteNameError === VOID ? null : siteNameError;
    registrationEnabledError = registrationEnabledError === VOID ? null : registrationEnabledError;
    currentSiteTermsLang = currentSiteTermsLang === VOID ? first_0(uiLangs) : currentSiteTermsLang;
    this.wxq_1 = site;
    this.xxq_1 = siteTerms;
    this.yxq_1 = uiLangs;
    this.zxq_1 = fieldsEnabled;
    this.axr_1 = siteNameError;
    this.bxr_1 = registrationEnabledError;
    this.cxr_1 = currentSiteTermsLang;
    this.dxr_1 = !(this.axr_1 == null) ? true : !(this.bxr_1 == null);
  }
  protoOf(SiteEditUiState).uxu = function () {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlin.collections.firstOrNull' call
      var tmp0_iterator = this.xxq_1.w();
      while (tmp0_iterator.f()) {
        var element = tmp0_iterator.e();
        // Inline function 'com.ustadmobile.core.viewmodel.site.edit.SiteEditUiState.<get-currentSiteTerms>.<anonymous>' call
        if (element.fh5_1 === this.cxr_1.ioj_1) {
          tmp$ret$1 = element;
          break $l$block;
        }
      }
      tmp$ret$1 = null;
    }
    return tmp$ret$1;
  };
  protoOf(SiteEditUiState).wxu = function () {
    var tmp0_safe_receiver = this.uxu();
    return tmp0_safe_receiver == null ? null : tmp0_safe_receiver.eh5_1;
  };
  protoOf(SiteEditUiState).xxu = function (site, siteTerms, uiLangs, fieldsEnabled, siteNameError, registrationEnabledError, currentSiteTermsLang) {
    return new SiteEditUiState(site, siteTerms, uiLangs, fieldsEnabled, siteNameError, registrationEnabledError, currentSiteTermsLang);
  };
  protoOf(SiteEditUiState).exr = function (site, siteTerms, uiLangs, fieldsEnabled, siteNameError, registrationEnabledError, currentSiteTermsLang, $super) {
    site = site === VOID ? this.wxq_1 : site;
    siteTerms = siteTerms === VOID ? this.xxq_1 : siteTerms;
    uiLangs = uiLangs === VOID ? this.yxq_1 : uiLangs;
    fieldsEnabled = fieldsEnabled === VOID ? this.zxq_1 : fieldsEnabled;
    siteNameError = siteNameError === VOID ? this.axr_1 : siteNameError;
    registrationEnabledError = registrationEnabledError === VOID ? this.bxr_1 : registrationEnabledError;
    currentSiteTermsLang = currentSiteTermsLang === VOID ? this.cxr_1 : currentSiteTermsLang;
    return $super === VOID ? this.xxu(site, siteTerms, uiLangs, fieldsEnabled, siteNameError, registrationEnabledError, currentSiteTermsLang) : $super.xxu.call(this, site, siteTerms, uiLangs, fieldsEnabled, siteNameError, registrationEnabledError, currentSiteTermsLang);
  };
  protoOf(SiteEditUiState).toString = function () {
    return 'SiteEditUiState(site=' + this.wxq_1 + ', siteTerms=' + this.xxq_1 + ', uiLangs=' + this.yxq_1 + ', fieldsEnabled=' + this.zxq_1 + ', siteNameError=' + this.axr_1 + ', registrationEnabledError=' + this.bxr_1 + ', currentSiteTermsLang=' + this.cxr_1 + ')';
  };
  protoOf(SiteEditUiState).hashCode = function () {
    var result = this.wxq_1 == null ? 0 : hashCode(this.wxq_1);
    result = imul(result, 31) + hashCode(this.xxq_1) | 0;
    result = imul(result, 31) + hashCode(this.yxq_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.zxq_1) | 0;
    result = imul(result, 31) + (this.axr_1 == null ? 0 : getStringHashCode(this.axr_1)) | 0;
    result = imul(result, 31) + (this.bxr_1 == null ? 0 : getStringHashCode(this.bxr_1)) | 0;
    result = imul(result, 31) + this.cxr_1.hashCode() | 0;
    return result;
  };
  protoOf(SiteEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SiteEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof SiteEditUiState ? other : THROW_CCE();
    if (!equals(this.wxq_1, tmp0_other_with_cast.wxq_1))
      return false;
    if (!equals(this.xxq_1, tmp0_other_with_cast.xxq_1))
      return false;
    if (!equals(this.yxq_1, tmp0_other_with_cast.yxq_1))
      return false;
    if (!(this.zxq_1 === tmp0_other_with_cast.zxq_1))
      return false;
    if (!(this.axr_1 == tmp0_other_with_cast.axr_1))
      return false;
    if (!(this.bxr_1 == tmp0_other_with_cast.bxr_1))
      return false;
    if (!this.cxr_1.equals(tmp0_other_with_cast.cxr_1))
      return false;
    return true;
  };
  function languagesConfig$factory_1() {
    return getPropertyCallableRef('languagesConfig', 1, KProperty1, function (receiver) {
      return _get_languagesConfig__hebcss_0(receiver);
    }, null);
  }
  function languagesConfig$factory_2() {
    return getPropertyCallableRef('languagesConfig', 1, KProperty1, function (receiver) {
      return _get_languagesConfig__hebcss_0(receiver);
    }, null);
  }
  function _get_getLocaleForSiteTermsUseCase__hxw5id_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.wxv_1;
    getLocaleForSiteTermsUseCase$factory_2();
    return this_0.t2();
  }
  function Companion_172() {
    this.xxv_1 = 'locale';
    this.yxv_1 = 'Terms';
  }
  var Companion_instance_220;
  function Companion_getInstance_189() {
    return Companion_instance_220;
  }
  function SiteTermsDetailViewModel$slambda($acceptButtonMode, $apiUrl, $di, this$0, $savedStateHandle, resultContinuation) {
    this.hxw_1 = $acceptButtonMode;
    this.ixw_1 = $apiUrl;
    this.jxw_1 = $di;
    this.kxw_1 = this$0;
    this.lxw_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteTermsDetailViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteTermsDetailViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteTermsDetailViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            var tmp_0 = this;
            var tmp_1;
            if (this.hxw_1 ? !(this.ixw_1 == null) : false) {
              var this_0 = get_direct(this.jxw_1);
              var context = new Endpoint(this.ixw_1);
              var tmp_2 = this_0.s57();
              var tmp_3 = Companion_instance_0;
              var tmp_4 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
              var tmp_5 = tmp_2.p57(tmp_3.u56(isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE(), context)).s57();
              var tmp_6 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
              tmp_1 = tmp_5.q57(isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE(), 2);
            } else {
              tmp_1 = this.kxw_1.fp2();
            }

            tmp_0.nxw_1 = tmp_1;
            this.oxw_1 = this.lxw_1.ba('locale');
            this.pxw_1 = this.oxw_1;
            if (this.pxw_1 == null) {
              this.hd_1 = 1;
              suspendResult = _get_getLocaleForSiteTermsUseCase__hxw5id_0(this.kxw_1).vo3(this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.qxw_1 = this.pxw_1;
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            this.qxw_1 = suspendResult;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.rxw_1 = this.qxw_1;
            this.hd_1 = 3;
            suspendResult = this.nxw_1.j7e().jh4(this.rxw_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            var displayTerms = suspendResult;
            if (!(displayTerms == null)) {
              l$ret$1: do {
                var this_1 = this.kxw_1.uxv_1;
                while (true) {
                  var prevValue = this_1.t2();
                  var nextValue = prevValue.vxw(displayTerms, this.hxw_1);
                  if (this_1.y1k(prevValue, nextValue)) {
                    break l$ret$1;
                  }
                }
              }
               while (false);
            } else {
              l$ret$3: do {
                var this_2 = this.kxw_1.uxv_1;
                while (true) {
                  var prevValue_0 = this_2.t2();
                  var nextValue_0 = prevValue_0.vxw(VOID, VOID, this.kxw_1.jp2().en6(strings_getInstance().olc_1));
                  if (this_2.y1k(prevValue_0, nextValue_0)) {
                    break l$ret$3;
                  }
                }
              }
               while (false);
            }

            return Unit_instance;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SiteTermsDetailViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new SiteTermsDetailViewModel$slambda(this.hxw_1, this.ixw_1, this.jxw_1, this.kxw_1, this.lxw_1, completion);
    i.mxw_1 = $this$launch;
    return i;
  };
  function SiteTermsDetailViewModel$slambda_0($acceptButtonMode, $apiUrl, $di, this$0, $savedStateHandle, resultContinuation) {
    var i = new SiteTermsDetailViewModel$slambda($acceptButtonMode, $apiUrl, $di, this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteTermsDetailViewModel(di, savedStateHandle) {
    DetailViewModel.call(this, di, savedStateHandle, 'Terms');
    this.uxv_1 = MutableStateFlow(new SiteTermsDetailUiState());
    this.vxv_1 = asStateFlow(this.uxv_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.di.on' call
    var context = this.bp2().xmx();
    var trigger = this.q56();
    // Inline function 'org.kodein.di.diContext' call
    var tmp_0 = Companion_instance_0;
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var tmp$ret$1 = tmp_0.u56(tmp$ret$0, context);
    var this_0 = On(this, tmp$ret$1, trigger);
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(GetLocaleForSiteTermsUseCase), arrayOf([]), false));
    var tmp$ret$3 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp.wxv_1 = Instance(this_0, tmp$ret$3, null).n5c(this, getLocaleForSiteTermsUseCase$factory_1());
    var tmp0_safe_receiver = savedStateHandle.ba('showAccept');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toBoolean(tmp0_safe_receiver);
    var acceptButtonMode = tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;
    Companion_getInstance_102();
    var apiUrl = savedStateHandle.ba('serverUrl');
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.pp1_1;
      while (true) {
        var prevValue = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.site.termsdetail.SiteTermsDetailViewModel.<anonymous>' call
        var tmp0_navigationVisible = !acceptButtonMode;
        var tmp1_userAccountIconVisible = !acceptButtonMode;
        var tmp2_title = this.jp2().en6(strings_getInstance().lm2_1);
        var nextValue = prevValue.nol(VOID, VOID, tmp2_title, tmp0_navigationVisible, VOID, VOID, tmp1_userAccountIconVisible);
        if (this_1.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_3 = this.cp2();
    launch(tmp_3, VOID, VOID, SiteTermsDetailViewModel$slambda_0(acceptButtonMode, apiUrl, di, this, savedStateHandle, null));
  }
  protoOf(SiteTermsDetailViewModel).wxw = function () {
    Companion_getInstance_179();
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.site.termsdetail.SiteTermsDetailViewModel.onClickAccept.<anonymous>' call
    this.xp2(this_0, Companion_getInstance_179().ew5_1);
    var tmp$ret$2 = this_0.f3();
    this.np1_1.sns('Register', tmp$ret$2);
  };
  function SiteTermsDetailUiState(siteTerms, acceptButtonVisible, error) {
    siteTerms = siteTerms === VOID ? null : siteTerms;
    acceptButtonVisible = acceptButtonVisible === VOID ? false : acceptButtonVisible;
    error = error === VOID ? null : error;
    this.sxw_1 = siteTerms;
    this.txw_1 = acceptButtonVisible;
    this.uxw_1 = error;
  }
  protoOf(SiteTermsDetailUiState).xxw = function (siteTerms, acceptButtonVisible, error) {
    return new SiteTermsDetailUiState(siteTerms, acceptButtonVisible, error);
  };
  protoOf(SiteTermsDetailUiState).vxw = function (siteTerms, acceptButtonVisible, error, $super) {
    siteTerms = siteTerms === VOID ? this.sxw_1 : siteTerms;
    acceptButtonVisible = acceptButtonVisible === VOID ? this.txw_1 : acceptButtonVisible;
    error = error === VOID ? this.uxw_1 : error;
    return $super === VOID ? this.xxw(siteTerms, acceptButtonVisible, error) : $super.xxw.call(this, siteTerms, acceptButtonVisible, error);
  };
  protoOf(SiteTermsDetailUiState).toString = function () {
    return 'SiteTermsDetailUiState(siteTerms=' + this.sxw_1 + ', acceptButtonVisible=' + this.txw_1 + ', error=' + this.uxw_1 + ')';
  };
  protoOf(SiteTermsDetailUiState).hashCode = function () {
    var result = this.sxw_1 == null ? 0 : hashCode(this.sxw_1);
    result = imul(result, 31) + getBooleanHashCode(this.txw_1) | 0;
    result = imul(result, 31) + (this.uxw_1 == null ? 0 : getStringHashCode(this.uxw_1)) | 0;
    return result;
  };
  protoOf(SiteTermsDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SiteTermsDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof SiteTermsDetailUiState ? other : THROW_CCE();
    if (!equals(this.sxw_1, tmp0_other_with_cast.sxw_1))
      return false;
    if (!(this.txw_1 === tmp0_other_with_cast.txw_1))
      return false;
    if (!(this.uxw_1 == tmp0_other_with_cast.uxw_1))
      return false;
    return true;
  };
  function getLocaleForSiteTermsUseCase$factory_1() {
    return getPropertyCallableRef('getLocaleForSiteTermsUseCase', 1, KProperty1, function (receiver) {
      return _get_getLocaleForSiteTermsUseCase__hxw5id_0(receiver);
    }, null);
  }
  function getLocaleForSiteTermsUseCase$factory_2() {
    return getPropertyCallableRef('getLocaleForSiteTermsUseCase', 1, KProperty1, function (receiver) {
      return _get_getLocaleForSiteTermsUseCase__hxw5id_0(receiver);
    }, null);
  }
  function SiteEnterLinkViewModel$onClickNext$slambda$lambda($endpointUrl) {
    return function () {
      return 'SiteEnterLink: not working: ' + $endpointUrl;
    };
  }
  function _get_httpClient__2ty1zc_5($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.vxx_1;
    httpClient$factory_12();
    return this_0.t2();
  }
  function _get_impl__d88w17_0($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.wxx_1;
    impl$factory_2();
    return this_0.t2();
  }
  function Companion_173() {
    Companion_instance_221 = this;
    this.xxx_1 = 'SiteEnterLink';
    var tmp = this;
    Companion_getInstance_112();
    Companion_getInstance_102();
    Companion_getInstance_112();
    tmp.yxx_1 = listOf(['next', 'intMsg', 'noSessionChange']);
    this.zxx_1 = 'stateUrl';
  }
  var Companion_instance_221;
  function Companion_getInstance_190() {
    if (Companion_instance_221 == null)
      new Companion_173();
    return Companion_instance_221;
  }
  function SiteEnterLinkViewModel$onClickNext$slambda(this$0, $endpointUrl, resultContinuation) {
    this.ixy_1 = this$0;
    this.jxy_1 = $endpointUrl;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SiteEnterLinkViewModel$onClickNext$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SiteEnterLinkViewModel$onClickNext$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SiteEnterLinkViewModel$onClickNext$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = verifySite(_get_httpClient__2ty1zc_5(this.ixy_1), this.jxy_1, VOID, this.ixy_1.z4q(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var site = suspendResult;
            Companion_getInstance_102();
            var tmp_0 = to('serverUrl', this.jxy_1);
            Companion_getInstance_102();
            var this_0 = this.ixy_1.z4q();
            var this_1 = this_0.g45();
            var this_2 = serializer(this_1, createKType(getKClass(Site), arrayOf([]), false));
            var args = mutableMapOf([tmp_0, to('site', this_0.e45(isInterface(this_2, KSerializer) ? this_2 : THROW_CCE(), site))]);
            var tmp0_iterator = Companion_getInstance_190().yxx_1.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              this.ixy_1.wp2(args, element);
            }

            this.ixy_1.lp2(Companion_getInstance_85().vol_1);
            l$ret$1: do {
              var this_3 = this.ixy_1.txx_1;
              while (true) {
                var prevValue = this_3.t2();
                var nextValue = prevValue.qxy(VOID, true, VOID, null, true);
                if (this_3.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.ixy_1.np1_1.sns('Login', args);
            this.id_1 = 3;
            this.hd_1 = 4;
            continue $sm;
          case 2:
            this.id_1 = 3;
            var tmp_1 = this.kd_1;
            if (tmp_1 instanceof Error) {
              var e = this.kd_1;
              var tmp_2 = Napier_getInstance();
              tmp_2.x5d(e, VOID, SiteEnterLinkViewModel$onClickNext$slambda$lambda(this.jxy_1));
              l$ret$3: do {
                var this_4 = this.ixy_1.txx_1;
                while (true) {
                  var prevValue_0 = this_4.t2();
                  this.ixy_1.lp2(Companion_getInstance_85().vol_1);
                  var tmp0_linkError = _get_impl__d88w17_0(this.ixy_1).en6(strings_getInstance().qlm_1);
                  var nextValue_0 = prevValue_0.qxy(VOID, false, VOID, tmp0_linkError, true);
                  if (this_4.y1k(prevValue_0, nextValue_0)) {
                    break l$ret$3;
                  }
                }
              }
               while (false);
              this.hd_1 = 4;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 3:
            throw this.kd_1;
          case 4:
            this.id_1 = 3;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 3) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(SiteEnterLinkViewModel$onClickNext$slambda).v1m = function ($this$launch, completion) {
    var i = new SiteEnterLinkViewModel$onClickNext$slambda(this.ixy_1, this.jxy_1, completion);
    i.kxy_1 = $this$launch;
    return i;
  };
  function SiteEnterLinkViewModel$onClickNext$slambda_0(this$0, $endpointUrl, resultContinuation) {
    var i = new SiteEnterLinkViewModel$onClickNext$slambda(this$0, $endpointUrl, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SiteEnterLinkViewModel(di, savedStateHandle) {
    Companion_getInstance_190();
    UstadViewModel.call(this, di, savedStateHandle, 'SiteEnterLink');
    this.txx_1 = MutableStateFlow(new SiteEnterLinkUiState());
    this.uxx_1 = asStateFlow(this.txx_1);
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.vxx_1 = Instance(this, tmp$ret$0, null).n5c(this, httpClient$factory_11());
    var tmp_1 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(UstadMobileSystemImpl), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    tmp_1.wxx_1 = Instance(this, tmp$ret$2, null).n5c(this, impl$factory_1());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.pp1_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.siteenterlink.SiteEnterLinkViewModel.<anonymous>' call
        var tmp0_title = _get_impl__d88w17_0(this).en6(strings_getInstance().jm5_1);
        var nextValue = prevValue.nol(VOID, VOID, tmp0_title, false, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    $l$block_0: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_1 = this.txx_1;
      while (true) {
        var prevValue_0 = this_1.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.siteenterlink.SiteEnterLinkViewModel.<anonymous>' call
        var tmp0_elvis_lhs = savedStateHandle.ba(Companion_getInstance_190().zxx_1);
        var nextValue_0 = prevValue_0.qxy(tmp0_elvis_lhs == null ? '' : tmp0_elvis_lhs);
        if (this_1.y1k(prevValue_0, nextValue_0)) {
          break $l$block_0;
        }
      }
    }
  }
  protoOf(SiteEnterLinkViewModel).wu7 = function () {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.txx_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.siteenterlink.SiteEnterLinkViewModel.onClickNext.<anonymous>' call
        var nextValue = prevValue.qxy(VOID, VOID, VOID, VOID, false);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.lp2(Companion_getInstance_85().uol_1);
    var endpointUrl = requirePostfix(requireHttpPrefix(this.txx_1.t2().lxy_1), '/');
    var tmp = this.cp2();
    launch(tmp, VOID, VOID, SiteEnterLinkViewModel$onClickNext$slambda_0(this, endpointUrl, null));
  };
  protoOf(SiteEnterLinkViewModel).rxy = function (siteLink) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.txx_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.siteenterlink.SiteEnterLinkViewModel.onSiteLinkUpdated.<anonymous>' call
        var nextValue = prevValue.qxy(siteLink);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    this.lp1_1.rox(Companion_getInstance_190().zxx_1, siteLink);
  };
  function SiteEnterLinkUiState(siteLink, validLink, progressVisible, linkError, fieldsEnabled) {
    siteLink = siteLink === VOID ? '' : siteLink;
    validLink = validLink === VOID ? false : validLink;
    progressVisible = progressVisible === VOID ? false : progressVisible;
    linkError = linkError === VOID ? null : linkError;
    fieldsEnabled = fieldsEnabled === VOID ? true : fieldsEnabled;
    this.lxy_1 = siteLink;
    this.mxy_1 = validLink;
    this.nxy_1 = progressVisible;
    this.oxy_1 = linkError;
    this.pxy_1 = fieldsEnabled;
  }
  protoOf(SiteEnterLinkUiState).sxy = function (siteLink, validLink, progressVisible, linkError, fieldsEnabled) {
    return new SiteEnterLinkUiState(siteLink, validLink, progressVisible, linkError, fieldsEnabled);
  };
  protoOf(SiteEnterLinkUiState).qxy = function (siteLink, validLink, progressVisible, linkError, fieldsEnabled, $super) {
    siteLink = siteLink === VOID ? this.lxy_1 : siteLink;
    validLink = validLink === VOID ? this.mxy_1 : validLink;
    progressVisible = progressVisible === VOID ? this.nxy_1 : progressVisible;
    linkError = linkError === VOID ? this.oxy_1 : linkError;
    fieldsEnabled = fieldsEnabled === VOID ? this.pxy_1 : fieldsEnabled;
    return $super === VOID ? this.sxy(siteLink, validLink, progressVisible, linkError, fieldsEnabled) : $super.sxy.call(this, siteLink, validLink, progressVisible, linkError, fieldsEnabled);
  };
  protoOf(SiteEnterLinkUiState).toString = function () {
    return 'SiteEnterLinkUiState(siteLink=' + this.lxy_1 + ', validLink=' + this.mxy_1 + ', progressVisible=' + this.nxy_1 + ', linkError=' + this.oxy_1 + ', fieldsEnabled=' + this.pxy_1 + ')';
  };
  protoOf(SiteEnterLinkUiState).hashCode = function () {
    var result = getStringHashCode(this.lxy_1);
    result = imul(result, 31) + getBooleanHashCode(this.mxy_1) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.nxy_1) | 0;
    result = imul(result, 31) + (this.oxy_1 == null ? 0 : getStringHashCode(this.oxy_1)) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.pxy_1) | 0;
    return result;
  };
  protoOf(SiteEnterLinkUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SiteEnterLinkUiState))
      return false;
    var tmp0_other_with_cast = other instanceof SiteEnterLinkUiState ? other : THROW_CCE();
    if (!(this.lxy_1 === tmp0_other_with_cast.lxy_1))
      return false;
    if (!(this.mxy_1 === tmp0_other_with_cast.mxy_1))
      return false;
    if (!(this.nxy_1 === tmp0_other_with_cast.nxy_1))
      return false;
    if (!(this.oxy_1 == tmp0_other_with_cast.oxy_1))
      return false;
    if (!(this.pxy_1 === tmp0_other_with_cast.pxy_1))
      return false;
    return true;
  };
  function httpClient$factory_11() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_5(receiver);
    }, null);
  }
  function impl$factory_1() {
    return getPropertyCallableRef('impl', 1, KProperty1, function (receiver) {
      return _get_impl__d88w17_0(receiver);
    }, null);
  }
  function httpClient$factory_12() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_5(receiver);
    }, null);
  }
  function impl$factory_2() {
    return getPropertyCallableRef('impl', 1, KProperty1, function (receiver) {
      return _get_impl__d88w17_0(receiver);
    }, null);
  }
  function SystemPermissionConstants() {
    SystemPermissionConstants_instance = this;
    var tmp = this;
    var tmp_0 = strings_getInstance().vmg_1;
    PermissionFlags_getInstance();
    var tmp_1 = to(tmp_0, new Long(1024, 0));
    var tmp_2 = strings_getInstance().wmg_1;
    PermissionFlags_getInstance();
    var tmp_3 = to(tmp_2, new Long(8192, 0));
    var tmp_4 = strings_getInstance().xmg_1;
    PermissionFlags_getInstance();
    var tmp_5 = to(tmp_4, new Long(32768, 0));
    var tmp_6 = strings_getInstance().cmh_1;
    PermissionFlags_getInstance();
    var tmp_7 = to(tmp_6, new Long(131072, 0));
    var tmp_8 = strings_getInstance().bmh_1;
    PermissionFlags_getInstance();
    var tmp_9 = to(tmp_8, new Long(4096, 0));
    var tmp_10 = strings_getInstance().amh_1;
    PermissionFlags_getInstance();
    var tmp_11 = to(tmp_10, new Long(512, 0));
    var tmp_12 = strings_getInstance().omg_1;
    PermissionFlags_getInstance();
    var tmp_13 = to(tmp_12, new Long(1, 0));
    var tmp_14 = strings_getInstance().pmg_1;
    PermissionFlags_getInstance();
    var tmp_15 = to(tmp_14, new Long(2, 0));
    var tmp_16 = strings_getInstance().qmg_1;
    PermissionFlags_getInstance();
    var tmp_17 = to(tmp_16, new Long(4, 0));
    var tmp_18 = strings_getInstance().lmg_1;
    PermissionFlags_getInstance();
    var tmp_19 = to(tmp_18, new Long(2048, 0));
    var tmp_20 = strings_getInstance().rmg_1;
    PermissionFlags_getInstance();
    var tmp_21 = to(tmp_20, new Long(8, 0));
    var tmp_22 = strings_getInstance().smg_1;
    PermissionFlags_getInstance();
    var tmp_23 = to(tmp_22, new Long(16, 0));
    var tmp_24 = strings_getInstance().tmg_1;
    PermissionFlags_getInstance();
    var tmp_25 = to(tmp_24, new Long(32, 0));
    var tmp_26 = strings_getInstance().umg_1;
    PermissionFlags_getInstance();
    var tmp_27 = to(tmp_26, new Long(64, 0));
    var tmp_28 = strings_getInstance().ymg_1;
    PermissionFlags_getInstance();
    var tmp_29 = to(tmp_28, new Long(128, 0));
    var tmp_30 = strings_getInstance().zmg_1;
    PermissionFlags_getInstance();
    tmp.txy_1 = listOf([tmp_1, tmp_3, tmp_5, tmp_7, tmp_9, tmp_11, tmp_13, tmp_15, tmp_17, tmp_19, tmp_21, tmp_23, tmp_25, tmp_27, tmp_29, to(tmp_30, new Long(256, 0))]);
  }
  var SystemPermissionConstants_instance;
  function SystemPermissionConstants_getInstance() {
    if (SystemPermissionConstants_instance == null)
      new SystemPermissionConstants();
    return SystemPermissionConstants_instance;
  }
  function personHasSystemPermissionAsFlowForUser(_this__u8e3s4, accountPersonUid, personUid) {
    var tmp;
    if (!accountPersonUid.equals(new Long(0, 0)) ? accountPersonUid.equals(personUid) : false) {
      tmp = flowOf(true);
    } else {
      PermissionFlags_getInstance();
      tmp = _this__u8e3s4.uhc(accountPersonUid, new Long(-1, 2147483647));
    }
    return tmp;
  }
  function SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda).exz = function (entity, hasViewPermission, $completion) {
    var tmp = this.fxz(entity, hasViewPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda).um = function (p1, p2, $completion) {
    var tmp = (p1 == null ? true : p1 instanceof SystemPermission) ? p1 : THROW_CCE();
    return this.exz(tmp, (!(p2 == null) ? typeof p2 === 'boolean' : false) ? p2 : THROW_CCE(), $completion);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = this.cxz_1;
          var tmp_0;
          if (this.dxz_1) {
            tmp_0 = this_0;
          } else {
            tmp_0 = null;
          }
          return tmp_0;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda).fxz = function (entity, hasViewPermission, completion) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda(completion);
    i.cxz_1 = entity;
    i.dxz_1 = hasViewPermission;
    return i;
  };
  function SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_0(resultContinuation) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda(resultContinuation);
    var l = function (entity, hasViewPermission, $completion) {
      return i.exz(entity, hasViewPermission, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation) {
    this.oxz_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_1).qxz = function (it, $completion) {
    var tmp = this.rxz(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.qxz((p1 == null ? true : p1 instanceof SystemPermission) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            l$ret$1: do {
              var this_0 = this.oxz_1.py0_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_0;
                if (!(this.pxz_1 == null)) {
                  tmp_0 = SystemPermissionConstants_getInstance().txy_1;
                } else {
                  tmp_0 = emptyList();
                }
                var nextValue = prevValue.ty0(this.pxz_1, tmp_0);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            if (!(this.pxz_1 == null)) {
              this.hd_1 = 1;
              suspendResult = this.oxz_1.fp2().a7d().xfn(this.oxz_1.oy0_1, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 2;
              continue $sm;
            }

          case 1:
            var title = suspendResult;
            l$ret$3: do {
              var this_1 = this.oxz_1.pp1_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var tmp1_elvis_lhs = title == null ? null : title.toString();
                var nextValue_0 = prevValue_0.nol(VOID, VOID, tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_1).rxz = function (it, completion) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_1(this.oxz_1, completion);
    i.pxz_1 = it;
    return i;
  };
  function SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_2(this$0, resultContinuation) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_1(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.qxz(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation) {
    this.cy1_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_3).dou = function (hasEditPermission, $completion) {
    var tmp = this.eou(hasEditPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_3).he = function (p1, $completion) {
    return this.dou((!(p1 == null) ? typeof p1 === 'boolean' : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_3).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          l$ret$1: do {
            var this_0 = this.cy1_1.pp1_1;
            while (true) {
              var prevValue = this_0.t2();
              var nextValue = prevValue.nol(prevValue.yok_1.tol(this.dy1_1));
              if (this_0.y1k(prevValue, nextValue)) {
                break l$ret$1;
              }
            }
          }
           while (false);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_3).eou = function (hasEditPermission, completion) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_3(this.cy1_1, completion);
    i.dy1_1 = hasEditPermission;
    return i;
  };
  function SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_4(this$0, resultContinuation) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_3(this$0, resultContinuation);
    var l = function (hasEditPermission, $completion) {
      return i.dou(hasEditPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SystemPermissionDetailViewModel$slambda$slambda$slambda($entityFlow, $viewPermissionFlow, this$0, resultContinuation) {
    this.my1_1 = $entityFlow;
    this.ny1_1 = $viewPermissionFlow;
    this.oy1_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = combine(this.my1_1, this.ny1_1, SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_0(null));
            suspendResult = collectLatest(tmp_0, SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_2(this.oy1_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda$slambda(this.my1_1, this.ny1_1, this.oy1_1, completion);
    i.py1_1 = $this$launch;
    return i;
  };
  function SystemPermissionDetailViewModel$slambda$slambda$slambda_0($entityFlow, $viewPermissionFlow, this$0, resultContinuation) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda$slambda($entityFlow, $viewPermissionFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SystemPermissionDetailViewModel$slambda$slambda$slambda_1($editPermissionFlow, this$0, resultContinuation) {
    this.yy1_1 = $editPermissionFlow;
    this.zy1_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = SystemPermissionDetailViewModel$slambda$slambda$slambda$slambda_4(this.zy1_1, null);
            suspendResult = this.yy1_1.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_35(tmp_0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda$slambda_1(this.yy1_1, this.zy1_1, completion);
    i.ay2_1 = $this$launch;
    return i;
  };
  function SystemPermissionDetailViewModel$slambda$slambda$slambda_2($editPermissionFlow, this$0, resultContinuation) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda$slambda_1($editPermissionFlow, this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SystemPermissionDetailViewModel$slambda$slambda($this_launch, $entityFlow, $viewPermissionFlow, this$0, $editPermissionFlow, resultContinuation) {
    this.jy2_1 = $this_launch;
    this.ky2_1 = $entityFlow;
    this.ly2_1 = $viewPermissionFlow;
    this.my2_1 = this$0;
    this.ny2_1 = $editPermissionFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionDetailViewModel$slambda$slambda).m86 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda).z77 = function ($completion) {
    return this.m86($completion);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          launch(this.jy2_1, VOID, VOID, SystemPermissionDetailViewModel$slambda$slambda$slambda_0(this.ky2_1, this.ly2_1, this.my2_1, null));
          launch(this.jy2_1, VOID, VOID, SystemPermissionDetailViewModel$slambda$slambda$slambda_2(this.ny2_1, this.my2_1, null));
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SystemPermissionDetailViewModel$slambda$slambda).y77 = function (completion) {
    return new SystemPermissionDetailViewModel$slambda$slambda(this.jy2_1, this.ky2_1, this.ly2_1, this.my2_1, this.ny2_1, completion);
  };
  function SystemPermissionDetailViewModel$slambda$slambda_0($this_launch, $entityFlow, $viewPermissionFlow, this$0, $editPermissionFlow, resultContinuation) {
    var i = new SystemPermissionDetailViewModel$slambda$slambda($this_launch, $entityFlow, $viewPermissionFlow, this$0, $editPermissionFlow, resultContinuation);
    var l = function ($completion) {
      return i.m86($completion);
    };
    l.$arity = 0;
    return l;
  }
  function onClickEdit_1($this) {
    // Inline function 'kotlin.collections.buildMap' call
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'kotlin.collections.buildMapInternal' call
    // Inline function 'kotlin.apply' call
    var this_0 = LinkedHashMap_init_$Create$();
    // Inline function 'kotlin.contracts.contract' call
    // Inline function 'com.ustadmobile.core.viewmodel.systempermission.detail.SystemPermissionDetailViewModel.onClickEdit.<anonymous>' call
    Companion_getInstance_112();
    $this.wp2(this_0, 'personUid');
    var tmp$ret$2 = this_0.f3();
    $this.np1_1.sns('SystemPermissionEdit', tmp$ret$2);
  }
  function Companion_174() {
    this.oy2_1 = 'SystemPermission';
  }
  var Companion_instance_222;
  function Companion_getInstance_191() {
    return Companion_instance_222;
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_35(function_0) {
    this.py2_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_35).t1d = function (value, $completion) {
    return this.py2_1(value, $completion);
  };
  function SystemPermissionDetailViewModel$onClickEdit$ref($boundThis) {
    var l = function () {
      onClickEdit_1($boundThis);
      return Unit_instance;
    };
    l.callableName = 'onClickEdit';
    return l;
  }
  function SystemPermissionDetailViewModel$slambda(this$0, $entityFlow, $viewPermissionFlow, $editPermissionFlow, resultContinuation) {
    this.yy2_1 = this$0;
    this.zy2_1 = $entityFlow;
    this.ay3_1 = $viewPermissionFlow;
    this.by3_1 = $editPermissionFlow;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionDetailViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SystemPermissionDetailViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SystemPermissionDetailViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = whenSubscribed(this.yy2_1.py0_1, SystemPermissionDetailViewModel$slambda$slambda_0(this.cy3_1, this.zy2_1, this.ay3_1, this.yy2_1, this.by3_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SystemPermissionDetailViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new SystemPermissionDetailViewModel$slambda(this.yy2_1, this.zy2_1, this.ay3_1, this.by3_1, completion);
    i.cy3_1 = $this$launch;
    return i;
  };
  function SystemPermissionDetailViewModel$slambda_0(this$0, $entityFlow, $viewPermissionFlow, $editPermissionFlow, resultContinuation) {
    var i = new SystemPermissionDetailViewModel$slambda(this$0, $entityFlow, $viewPermissionFlow, $editPermissionFlow, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SystemPermissionDetailViewModel(di, savedStateHandle) {
    DetailViewModel.call(this, di, savedStateHandle, 'SystemPermission');
    var tmp = this;
    Companion_getInstance_112();
    var tmp0_safe_receiver = savedStateHandle.ba('personUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.oy0_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    this.py0_1 = MutableStateFlow(new SystemPermissionDetailUiState());
    this.qy0_1 = asStateFlow(this.py0_1);
    var entityFlow = this.fp2().c7f().rhc(this.oy0_1);
    var viewPermissionFlow = personHasSystemPermissionAsFlowForUser(this.fp2().c7f(), this.dp2(), this.oy0_1);
    var tmp_0 = this.fp2().c7f();
    var tmp_1 = this.dp2();
    PermissionFlags_getInstance();
    var editPermissionFlow = tmp_0.uhc(tmp_1, new Long(4096, 0));
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.pp1_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.systempermission.detail.SystemPermissionDetailViewModel.<anonymous>' call
        var tmp0_text = this.jp2().en6(strings_getInstance().mlo_1);
        var tmp1_onClick = SystemPermissionDetailViewModel$onClickEdit$ref(this);
        var tmp2_icon = FabIcon_EDIT_getInstance();
        var nextValue = prevValue.nol(new FabUiState(VOID, tmp0_text, tmp2_icon, tmp1_onClick));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_2 = this.cp2();
    launch(tmp_2, VOID, VOID, SystemPermissionDetailViewModel$slambda_0(this, entityFlow, viewPermissionFlow, editPermissionFlow, null));
  }
  function SystemPermissionDetailUiState(systemPermission, permissionLabels) {
    systemPermission = systemPermission === VOID ? null : systemPermission;
    permissionLabels = permissionLabels === VOID ? emptyList() : permissionLabels;
    this.ry0_1 = systemPermission;
    this.sy0_1 = permissionLabels;
  }
  protoOf(SystemPermissionDetailUiState).ty0 = function (systemPermission, permissionLabels) {
    return new SystemPermissionDetailUiState(systemPermission, permissionLabels);
  };
  protoOf(SystemPermissionDetailUiState).toString = function () {
    return 'SystemPermissionDetailUiState(systemPermission=' + this.ry0_1 + ', permissionLabels=' + this.sy0_1 + ')';
  };
  protoOf(SystemPermissionDetailUiState).hashCode = function () {
    var result = this.ry0_1 == null ? 0 : this.ry0_1.hashCode();
    result = imul(result, 31) + hashCode(this.sy0_1) | 0;
    return result;
  };
  protoOf(SystemPermissionDetailUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SystemPermissionDetailUiState))
      return false;
    var tmp0_other_with_cast = other instanceof SystemPermissionDetailUiState ? other : THROW_CCE();
    if (!equals(this.ry0_1, tmp0_other_with_cast.ry0_1))
      return false;
    if (!equals(this.sy0_1, tmp0_other_with_cast.sy0_1))
      return false;
    return true;
  };
  function SystemPermissionEditViewModel$slambda$slambda(this$0, resultContinuation) {
    this.ly3_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionEditViewModel$slambda$slambda).ny3 = function (db, $completion) {
    var tmp = this.gmp(db, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SystemPermissionEditViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.ny3(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SystemPermissionEditViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.my3_1.c7f().shc(this.ly3_1.ny4_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SystemPermissionEditViewModel$slambda$slambda).gmp = function (db, completion) {
    var i = new SystemPermissionEditViewModel$slambda$slambda(this.ly3_1, completion);
    i.my3_1 = db;
    return i;
  };
  function SystemPermissionEditViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new SystemPermissionEditViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function (db, $completion) {
      return i.ny3(db, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SystemPermissionEditViewModel$slambda$slambda_1(resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionEditViewModel$slambda$slambda_1).ehg = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SystemPermissionEditViewModel$slambda$slambda_1).z77 = function ($completion) {
    return this.ehg($completion);
  };
  protoOf(SystemPermissionEditViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return null;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(SystemPermissionEditViewModel$slambda$slambda_1).y77 = function (completion) {
    return new SystemPermissionEditViewModel$slambda$slambda_1(completion);
  };
  function SystemPermissionEditViewModel$slambda$slambda_2(resultContinuation) {
    var i = new SystemPermissionEditViewModel$slambda$slambda_1(resultContinuation);
    var l = function ($completion) {
      return i.ehg($completion);
    };
    l.$arity = 0;
    return l;
  }
  function SystemPermissionEditViewModel$slambda$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.ly4_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.systempermission.edit.SystemPermissionEditViewModel.<anonymous>.<anonymous>.<anonymous>' call
          var tmp;
          if (!(it == null)) {
            tmp = SystemPermissionConstants_getInstance().txy_1;
          } else {
            tmp = emptyList();
          }
          var nextValue = prevValue.zy4(it, VOID, tmp);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function SystemPermissionEditViewModel$onClickSave$ref($boundThis) {
    var l = function () {
      $boundThis.cqf();
      return Unit_instance;
    };
    l.callableName = 'onClickSave';
    return l;
  }
  function SystemPermissionEditViewModel$onClickSave$slambda$slambda(this$0, $entity, resultContinuation) {
    this.iy5_1 = this$0;
    this.jy5_1 = $entity;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionEditViewModel$onClickSave$slambda$slambda).fmp = function (it, $completion) {
    var tmp = this.gmp(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SystemPermissionEditViewModel$onClickSave$slambda$slambda).he = function (p1, $completion) {
    return this.fmp(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SystemPermissionEditViewModel$onClickSave$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.iy5_1.fp2().c7f().yhc(this.jy5_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SystemPermissionEditViewModel$onClickSave$slambda$slambda).gmp = function (it, completion) {
    var i = new SystemPermissionEditViewModel$onClickSave$slambda$slambda(this.iy5_1, this.jy5_1, completion);
    i.ky5_1 = it;
    return i;
  };
  function SystemPermissionEditViewModel$onClickSave$slambda$slambda_0(this$0, $entity, resultContinuation) {
    var i = new SystemPermissionEditViewModel$onClickSave$slambda$slambda(this$0, $entity, resultContinuation);
    var l = function (it, $completion) {
      return i.fmp(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function Companion_175() {
    this.ly5_1 = 'SystemPermissionEdit';
  }
  var Companion_instance_223;
  function Companion_getInstance_192() {
    return Companion_instance_223;
  }
  function SystemPermissionEditViewModel$slambda(this$0, resultContinuation) {
    this.uy5_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionEditViewModel$slambda).oqh = function (it, $completion) {
    var tmp = this.gmp(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SystemPermissionEditViewModel$slambda).he = function (p1, $completion) {
    return this.oqh(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SystemPermissionEditViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = this.uy5_1.fp2().c7f();
            var tmp_1 = this.uy5_1.dp2();
            PermissionFlags_getInstance();
            suspendResult = tmp_0.thc(tmp_1, new Long(4096, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return suspendResult;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SystemPermissionEditViewModel$slambda).gmp = function (it, completion) {
    var i = new SystemPermissionEditViewModel$slambda(this.uy5_1, completion);
    i.vy5_1 = it;
    return i;
  };
  function SystemPermissionEditViewModel$slambda_0(this$0, resultContinuation) {
    var i = new SystemPermissionEditViewModel$slambda(this$0, resultContinuation);
    var l = function (it, $completion) {
      return i.oqh(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SystemPermissionEditViewModel$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.ly4_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.systempermission.edit.SystemPermissionEditViewModel.<anonymous>.<anonymous>' call
          var nextValue = prevValue.zy4(VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function SystemPermissionEditViewModel$slambda_1(this$0, resultContinuation) {
    this.ey6_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionEditViewModel$slambda_1).u1m = function ($this$launchIfHasPermission, $completion) {
    var tmp = this.v1m($this$launchIfHasPermission, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SystemPermissionEditViewModel$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SystemPermissionEditViewModel$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            var tmp_0 = Companion_getInstance_7().a4r();
            var tmp_1 = SystemPermissionEditViewModel$slambda$slambda_0(this.ey6_1, null);
            var tmp_2 = SystemPermissionEditViewModel$slambda$slambda_2(null);
            suspendResult = this.ey6_1.tp2(tmp_0, VOID, VOID, tmp_1, tmp_2, SystemPermissionEditViewModel$slambda$lambda(this.ey6_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            l$ret$1: do {
              var this_0 = this.ey6_1.pp1_1;
              while (true) {
                var prevValue = this_0.t2();
                var tmp_3 = this.ey6_1.jp2().en6(strings_getInstance().alw_1);
                var nextValue = prevValue.nol(VOID, VOID, VOID, VOID, VOID, VOID, VOID, VOID, new ActionBarButtonUiState(true, tmp_3, VOID, SystemPermissionEditViewModel$onClickSave$ref(this.ey6_1)));
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            this.hd_1 = 2;
            suspendResult = this.ey6_1.fp2().a7d().xfn(this.ey6_1.ny4_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var title = suspendResult;
            l$ret$3: do {
              var this_1 = this.ey6_1.pp1_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var tmp1_elvis_lhs = title == null ? null : title.toString();
                var nextValue_0 = prevValue_0.nol(VOID, VOID, tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SystemPermissionEditViewModel$slambda_1).v1m = function ($this$launchIfHasPermission, completion) {
    var i = new SystemPermissionEditViewModel$slambda_1(this.ey6_1, completion);
    i.fy6_1 = $this$launchIfHasPermission;
    return i;
  };
  function SystemPermissionEditViewModel$slambda_2(this$0, resultContinuation) {
    var i = new SystemPermissionEditViewModel$slambda_1(this$0, resultContinuation);
    var l = function ($this$launchIfHasPermission, $completion) {
      return i.u1m($this$launchIfHasPermission, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SystemPermissionEditViewModel$onClickSave$lambda(this$0) {
    return function (it) {
      $l$block: {
        // Inline function 'kotlinx.coroutines.flow.update' call
        var this_0 = this$0.ly4_1;
        while (true) {
          var prevValue = this_0.t2();
          // Inline function 'com.ustadmobile.core.viewmodel.systempermission.edit.SystemPermissionEditViewModel.onClickSave.<anonymous>.<anonymous>' call
          var nextValue = prevValue.zy4(VOID, it);
          if (this_0.y1k(prevValue, nextValue)) {
            break $l$block;
          }
        }
      }
      return Unit_instance;
    };
  }
  function SystemPermissionEditViewModel$onClickSave$slambda(this$0, resultContinuation) {
    this.oy6_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SystemPermissionEditViewModel$onClickSave$slambda).m86 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SystemPermissionEditViewModel$onClickSave$slambda).z77 = function ($completion) {
    return this.m86($completion);
  };
  protoOf(SystemPermissionEditViewModel$onClickSave$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this;
            var tmp0_elvis_lhs = this.oy6_1.ly4_1.t2().wy4_1;
            var tmp_1;
            if (tmp0_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_1 = tmp0_elvis_lhs;
            }

            tmp_0.py6_1 = tmp_1;
            this.hd_1 = 1;
            var tmp_2 = this.oy6_1.fp2();
            suspendResult = withDoorTransactionAsync(tmp_2, VOID, SystemPermissionEditViewModel$onClickSave$slambda$slambda_0(this.oy6_1, this.py6_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            Companion_getInstance_102();
            this.oy6_1.np1_1.foo('', true);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SystemPermissionEditViewModel$onClickSave$slambda).y77 = function (completion) {
    return new SystemPermissionEditViewModel$onClickSave$slambda(this.oy6_1, completion);
  };
  function SystemPermissionEditViewModel$onClickSave$slambda_0(this$0, resultContinuation) {
    var i = new SystemPermissionEditViewModel$onClickSave$slambda(this$0, resultContinuation);
    var l = function ($completion) {
      return i.m86($completion);
    };
    l.$arity = 0;
    return l;
  }
  function SystemPermissionEditViewModel(di, savedStateHandle) {
    UstadEditViewModel.call(this, di, savedStateHandle, 'SystemPermissionEdit');
    this.ly4_1 = MutableStateFlow(new SystemPermissionEditUiState());
    this.my4_1 = asStateFlow(this.ly4_1);
    var tmp = this;
    Companion_getInstance_112();
    var tmp0_safe_receiver = savedStateHandle.ba('personUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.ny4_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.pp1_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.systempermission.edit.SystemPermissionEditViewModel.<anonymous>' call
        var nextValue = prevValue.nol(VOID, VOID, VOID, VOID, true);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_0 = SystemPermissionEditViewModel$slambda_0(this, null);
    var tmp_1 = SystemPermissionEditViewModel$lambda(this);
    this.vp2(tmp_0, VOID, tmp_1, SystemPermissionEditViewModel$slambda_2(this, null));
  }
  protoOf(SystemPermissionEditViewModel).mr6 = function (flag) {
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.ly4_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.systempermission.edit.SystemPermissionEditViewModel.onTogglePermission.<anonymous>' call
        var tmp0_safe_receiver = prevValue.wy4_1;
        var nextValue = prevValue.zy4(tmp0_safe_receiver == null ? null : tmp0_safe_receiver.mjt(VOID, VOID, VOID, toggleFlag(prevValue.wy4_1.qhd_1, flag)));
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
  };
  protoOf(SystemPermissionEditViewModel).cqf = function () {
    var tmp = SystemPermissionEditViewModel$onClickSave$lambda(this);
    this.yp8(tmp, SystemPermissionEditViewModel$onClickSave$slambda_0(this, null));
  };
  function SystemPermissionEditUiState(entity, fieldsEnabled, permissionLabels) {
    entity = entity === VOID ? null : entity;
    fieldsEnabled = fieldsEnabled === VOID ? false : fieldsEnabled;
    permissionLabels = permissionLabels === VOID ? emptyList() : permissionLabels;
    this.wy4_1 = entity;
    this.xy4_1 = fieldsEnabled;
    this.yy4_1 = permissionLabels;
  }
  protoOf(SystemPermissionEditUiState).qy6 = function (entity, fieldsEnabled, permissionLabels) {
    return new SystemPermissionEditUiState(entity, fieldsEnabled, permissionLabels);
  };
  protoOf(SystemPermissionEditUiState).zy4 = function (entity, fieldsEnabled, permissionLabels, $super) {
    entity = entity === VOID ? this.wy4_1 : entity;
    fieldsEnabled = fieldsEnabled === VOID ? this.xy4_1 : fieldsEnabled;
    permissionLabels = permissionLabels === VOID ? this.yy4_1 : permissionLabels;
    return $super === VOID ? this.qy6(entity, fieldsEnabled, permissionLabels) : $super.qy6.call(this, entity, fieldsEnabled, permissionLabels);
  };
  protoOf(SystemPermissionEditUiState).toString = function () {
    return 'SystemPermissionEditUiState(entity=' + this.wy4_1 + ', fieldsEnabled=' + this.xy4_1 + ', permissionLabels=' + this.yy4_1 + ')';
  };
  protoOf(SystemPermissionEditUiState).hashCode = function () {
    var result = this.wy4_1 == null ? 0 : this.wy4_1.hashCode();
    result = imul(result, 31) + getBooleanHashCode(this.xy4_1) | 0;
    result = imul(result, 31) + hashCode(this.yy4_1) | 0;
    return result;
  };
  protoOf(SystemPermissionEditUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof SystemPermissionEditUiState))
      return false;
    var tmp0_other_with_cast = other instanceof SystemPermissionEditUiState ? other : THROW_CCE();
    if (!equals(this.wy4_1, tmp0_other_with_cast.wy4_1))
      return false;
    if (!(this.xy4_1 === tmp0_other_with_cast.xy4_1))
      return false;
    if (!equals(this.yy4_1, tmp0_other_with_cast.yy4_1))
      return false;
    return true;
  };
  function TimeZoneListViewModel$slambda$slambda(this$0, resultContinuation) {
    this.zy6_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(TimeZoneListViewModel$slambda$slambda).by7 = function ($this$withContext, $completion) {
    var tmp = this.v1m($this$withContext, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(TimeZoneListViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.by7((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(TimeZoneListViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          return _get_allTimeZones__4t4mtu(this.zy6_1);
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(TimeZoneListViewModel$slambda$slambda).v1m = function ($this$withContext, completion) {
    var i = new TimeZoneListViewModel$slambda$slambda(this.zy6_1, completion);
    i.ay7_1 = $this$withContext;
    return i;
  };
  function TimeZoneListViewModel$slambda$slambda_0(this$0, resultContinuation) {
    var i = new TimeZoneListViewModel$slambda$slambda(this$0, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.by7($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda($searchText, this$0, resultContinuation) {
    this.ky7_1 = $searchText;
    this.ly7_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda).by7 = function ($this$withContext, $completion) {
    var tmp = this.v1m($this$withContext, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda).he = function (p1, $completion) {
    return this.by7((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          var this_0 = this.ky7_1;
          var searchWords = Regex_init_$Create$('\\s+').y9(this_0, 0);
          var this_1 = _get_allTimeZones__4t4mtu(this.ly7_1);
          var destination = ArrayList_init_$Create$();
          var tmp0_iterator = this_1.w();
          while (tmp0_iterator.f()) {
            var element = tmp0_iterator.e();
            var tmp$ret$0;
            l$ret$1: do {
              var tmp_0;
              if (isInterface(searchWords, Collection)) {
                tmp_0 = searchWords.c1();
              } else {
                tmp_0 = false;
              }
              if (tmp_0) {
                tmp$ret$0 = true;
                break l$ret$1;
              }
              var tmp0_iterator_0 = searchWords.w();
              while (tmp0_iterator_0.f()) {
                var element_0 = tmp0_iterator_0.e();
                if (!contains(element.sla(), element_0, true)) {
                  tmp$ret$0 = false;
                  break l$ret$1;
                }
              }
              tmp$ret$0 = true;
            }
             while (false);
            if (tmp$ret$0) {
              destination.i1(element);
            }
          }
          return destination;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda).v1m = function ($this$withContext, completion) {
    var i = new TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda(this.ky7_1, this.ly7_1, completion);
    i.my7_1 = $this$withContext;
    return i;
  };
  function TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda_0($searchText, this$0, resultContinuation) {
    var i = new TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda($searchText, this$0, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.by7($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function _get_allTimeZones__4t4mtu($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.ny8_1;
    allTimeZones$factory();
    return this_0.t2();
  }
  function Companion_176() {
    this.py8_1 = 'TimeZoneList';
  }
  var Companion_instance_224;
  function Companion_getInstance_193() {
    return Companion_instance_224;
  }
  function sam$kotlin_Comparator$0_3(function_0) {
    this.qy8_1 = function_0;
  }
  protoOf(sam$kotlin_Comparator$0_3).pa = function (a, b) {
    return this.qy8_1(a, b);
  };
  protoOf(sam$kotlin_Comparator$0_3).compare = function (a, b) {
    return this.pa(a, b);
  };
  function TimeZoneListViewModel$allTimeZones$delegate$lambda() {
    var now = System_instance.sl7();
    // Inline function 'kotlin.collections.sortedBy' call
    // Inline function 'kotlin.collections.map' call
    var this_0 = Companion_getInstance_9().slb();
    // Inline function 'kotlin.collections.mapTo' call
    var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
    var tmp0_iterator = this_0.w();
    while (tmp0_iterator.f()) {
      var item = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.viewmodel.timezone.TimeZoneListViewModel.allTimeZones$delegate.<anonymous>.<anonymous>' call
      var tmp$ret$0 = Companion_getInstance_9().pla(item);
      destination.i1(tmp$ret$0);
    }
    var this_1 = toList(destination);
    // Inline function 'kotlin.comparisons.compareBy' call
    var tmp = TimeZoneListViewModel$allTimeZones$delegate$lambda$lambda(now);
    var tmp$ret$3 = new sam$kotlin_Comparator$0_3(tmp);
    return sortedWith(this_1, tmp$ret$3);
  }
  function TimeZoneListViewModel$allTimeZones$delegate$lambda$lambda($now) {
    return function (a, b) {
      // Inline function 'kotlin.comparisons.compareValuesBy' call
      // Inline function 'com.ustadmobile.core.viewmodel.timezone.TimeZoneListViewModel.allTimeZones$delegate.<anonymous>.<anonymous>' call
      var tmp = offsetAt(a, $now).wlb();
      // Inline function 'com.ustadmobile.core.viewmodel.timezone.TimeZoneListViewModel.allTimeZones$delegate.<anonymous>.<anonymous>' call
      var tmp$ret$1 = offsetAt(b, $now).wlb();
      return compareValues(tmp, tmp$ret$1);
    };
  }
  function TimeZoneListViewModel$slambda(this$0, resultContinuation) {
    this.zy8_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(TimeZoneListViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(TimeZoneListViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(TimeZoneListViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = Dispatchers_getInstance().p12_1;
            suspendResult = withContext(tmp_0, TimeZoneListViewModel$slambda$slambda_0(this.zy8_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var allTimeZonesVal = suspendResult;
            l$ret$1: do {
              var this_0 = this.zy8_1.gpa_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.cy9(allTimeZonesVal);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(TimeZoneListViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new TimeZoneListViewModel$slambda(this.zy8_1, completion);
    i.ay9_1 = $this$launch;
    return i;
  };
  function TimeZoneListViewModel$slambda_0(this$0, resultContinuation) {
    var i = new TimeZoneListViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function TimeZoneListViewModel$onUpdateSearchResult$slambda(this$0, $searchText, resultContinuation) {
    this.ly9_1 = this$0;
    this.my9_1 = $searchText;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(TimeZoneListViewModel$onUpdateSearchResult$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(TimeZoneListViewModel$onUpdateSearchResult$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(TimeZoneListViewModel$onUpdateSearchResult$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = Dispatchers_getInstance().p12_1;
            suspendResult = withContext(tmp_0, TimeZoneListViewModel$onUpdateSearchResult$slambda$slambda_0(this.my9_1, this.ly9_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var filteredList = suspendResult;
            l$ret$1: do {
              var this_0 = this.ly9_1.gpa_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.cy9(filteredList);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(TimeZoneListViewModel$onUpdateSearchResult$slambda).v1m = function ($this$launch, completion) {
    var i = new TimeZoneListViewModel$onUpdateSearchResult$slambda(this.ly9_1, this.my9_1, completion);
    i.ny9_1 = $this$launch;
    return i;
  };
  function TimeZoneListViewModel$onUpdateSearchResult$slambda_0(this$0, $searchText, resultContinuation) {
    var i = new TimeZoneListViewModel$onUpdateSearchResult$slambda(this$0, $searchText, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function TimeZoneListViewModel(di, savedStateHandle) {
    UstadListViewModel.call(this, di, savedStateHandle, new TimezoneListUiState(), 'TimeZoneList');
    var tmp = this;
    tmp.ny8_1 = lazy_0(TimeZoneListViewModel$allTimeZones$delegate$lambda);
    this.oy8_1 = null;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.pp1_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.timezone.TimeZoneListViewModel.<anonymous>' call
        var nextValue = prevValue.nol(VOID, VOID, this.jp2().en6(strings_getInstance().elw_1), VOID, VOID, VOID, VOID, this.ppb());
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_0 = this.cp2();
    launch(tmp_0, VOID, VOID, TimeZoneListViewModel$slambda_0(this, null));
  }
  protoOf(TimeZoneListViewModel).apb = function (searchText) {
    var tmp0_safe_receiver = this.oy8_1;
    if (tmp0_safe_receiver == null)
      null;
    else {
      tmp0_safe_receiver.mr();
    }
    var tmp = this;
    var tmp_0 = this.cp2();
    tmp.oy8_1 = launch(tmp_0, VOID, VOID, TimeZoneListViewModel$onUpdateSearchResult$slambda_0(this, searchText, null));
  };
  protoOf(TimeZoneListViewModel).oy9 = function (entry) {
    this.up7(entry.sla());
  };
  protoOf(TimeZoneListViewModel).bpb = function () {
  };
  function TimezoneListUiState(timeZoneList) {
    timeZoneList = timeZoneList === VOID ? emptyList() : timeZoneList;
    this.by9_1 = timeZoneList;
  }
  protoOf(TimezoneListUiState).cy9 = function (timeZoneList) {
    return new TimezoneListUiState(timeZoneList);
  };
  protoOf(TimezoneListUiState).toString = function () {
    return 'TimezoneListUiState(timeZoneList=' + this.by9_1 + ')';
  };
  protoOf(TimezoneListUiState).hashCode = function () {
    return hashCode(this.by9_1);
  };
  protoOf(TimezoneListUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof TimezoneListUiState))
      return false;
    var tmp0_other_with_cast = other instanceof TimezoneListUiState ? other : THROW_CCE();
    if (!equals(this.by9_1, tmp0_other_with_cast.by9_1))
      return false;
    return true;
  };
  function allTimeZones$factory() {
    return getPropertyCallableRef('allTimeZones', 1, KProperty1, function (receiver) {
      return _get_allTimeZones__4t4mtu(receiver);
    }, null);
  }
  function VideoContentViewModel$slambda$slambda(this$0, $contentEntryVersion, resultContinuation) {
    this.xy9_1 = this$0;
    this.yy9_1 = $contentEntryVersion;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(VideoContentViewModel$slambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(VideoContentViewModel$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(VideoContentViewModel$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 5;
            var tmp_0 = this;
            tmp_0.aya_1 = this.xy9_1.z4q();
            var tmp_1 = this;
            tmp_1.bya_1 = _get_httpClient__2ty1zc_6(this.xy9_1);
            var tmp_2 = this;
            tmp_2.cya_1 = ensureNotNull(this.yy9_1.haj_1);
            var tmp_3 = this;
            tmp_3.dya_1 = this.bya_1;
            var tmp_4 = this;
            tmp_4.eya_1 = this.dya_1;
            var tmp_5 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.cya_1);
            tmp_5.fya_1 = this_0;
            this.fya_1.j38_1 = Companion_getInstance().y2w_1;
            var tmp_6 = this;
            tmp_6.gya_1 = this.eya_1;
            var tmp_7 = this;
            tmp_7.hya_1 = this.fya_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.hya_1, this.gya_1)).u3y(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.iya_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = bodyAsDecodedText(this.iya_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.jya_1 = suspendResult;
            var tmp_8 = this;
            var this_1 = this.aya_1.g45();
            var this_2 = serializer(this_1, createKType(getKClass(ContentManifest), arrayOf([]), false));
            tmp_8.kya_1 = this.aya_1.f45(isInterface(this_2, KSerializer) ? this_2 : THROW_CCE(), this.jya_1);
            this.lya_1 = requireBodyUrlForUri(this.kya_1, ensureNotNull(this.yy9_1.faj_1));
            var tmp_9 = this;
            tmp_9.mya_1 = this.xy9_1.z4q();
            var tmp_10 = this;
            tmp_10.nya_1 = _get_httpClient__2ty1zc_6(this.xy9_1);
            var tmp_11 = this;
            tmp_11.oya_1 = this.lya_1;
            var tmp_12 = this;
            tmp_12.pya_1 = this.nya_1;
            var tmp_13 = this;
            tmp_13.qya_1 = this.pya_1;
            var tmp_14 = this;
            var this_3 = new HttpRequestBuilder();
            url(this_3, this.oya_1);
            tmp_14.rya_1 = this_3;
            this.rya_1.j38_1 = Companion_getInstance().y2w_1;
            var tmp_15 = this;
            tmp_15.sya_1 = this.qya_1;
            var tmp_16 = this;
            tmp_16.tya_1 = this.rya_1;
            this.hd_1 = 3;
            suspendResult = (new HttpStatement(this.tya_1, this.sya_1)).u3y(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.uya_1 = suspendResult;
            this.hd_1 = 4;
            suspendResult = bodyAsDecodedText(this.uya_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            var string = suspendResult;
            var this_4 = this.mya_1.g45();
            var this_5 = serializer(this_4, createKType(getKClass(MediaContentInfo), arrayOf([]), false));
            var mediaInfo = this.mya_1.f45(isInterface(this_5, KSerializer) ? this_5 : THROW_CCE(), string);
            l$ret$1: do {
              var this_6 = this.xy9_1.wyb_1;
              while (true) {
                var prevValue = this_6.t2();
                var tmp0_contentEntryVersionUid = this.xy9_1.vyb_1;
                var tmp1_manifestUrl = ensureNotNull(this.yy9_1.haj_1);
                var tmp2_contentManifestMap = new ContentManifestMap(this.kya_1);
                var nextValue = prevValue.fyc(mediaInfo, tmp0_contentEntryVersionUid, tmp1_manifestUrl, tmp2_contentManifestMap);
                if (this_6.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 5:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 5) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(VideoContentViewModel$slambda$slambda).v1m = function ($this$launch, completion) {
    var i = new VideoContentViewModel$slambda$slambda(this.xy9_1, this.yy9_1, completion);
    i.zy9_1 = $this$launch;
    return i;
  };
  function VideoContentViewModel$slambda$slambda_0(this$0, $contentEntryVersion, resultContinuation) {
    var i = new VideoContentViewModel$slambda$slambda(this$0, $contentEntryVersion, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function VideoContentViewModel$slambda$slambda_1(this$0, $contentEntryVersion, resultContinuation) {
    this.oyc_1 = this$0;
    this.pyc_1 = $contentEntryVersion;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(VideoContentViewModel$slambda$slambda_1).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(VideoContentViewModel$slambda$slambda_1).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(VideoContentViewModel$slambda$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.oyc_1.fp2().i7d().kag(this.pyc_1.eaj_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var contentEntry = suspendResult;
            l$ret$1: do {
              var this_0 = this.oyc_1.wyb_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.fyc(VOID, VOID, VOID, VOID, contentEntry);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.oyc_1.pp1_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var tmp1_elvis_lhs = contentEntry == null ? null : contentEntry.gah_1;
                var nextValue_0 = prevValue_0.nol(VOID, VOID, tmp1_elvis_lhs == null ? '' : tmp1_elvis_lhs);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(VideoContentViewModel$slambda$slambda_1).v1m = function ($this$launch, completion) {
    var i = new VideoContentViewModel$slambda$slambda_1(this.oyc_1, this.pyc_1, completion);
    i.qyc_1 = $this$launch;
    return i;
  };
  function VideoContentViewModel$slambda$slambda_2(this$0, $contentEntryVersion, resultContinuation) {
    var i = new VideoContentViewModel$slambda$slambda_1(this$0, $contentEntryVersion, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function MediaPlayState(timestamp, timeInMillis, totalDuration, resumed) {
    timestamp = timestamp === VOID ? systemTimeInMillis() : timestamp;
    timeInMillis = timeInMillis === VOID ? new Long(0, 0) : timeInMillis;
    totalDuration = totalDuration === VOID ? new Long(0, 0) : totalDuration;
    resumed = resumed === VOID ? false : resumed;
    this.ryc_1 = timestamp;
    this.syc_1 = timeInMillis;
    this.tyc_1 = totalDuration;
    this.uyc_1 = resumed;
  }
  protoOf(MediaPlayState).vyc = function () {
    var tmp;
    if (this.tyc_1.c7(new Long(0, 0)) > 0) {
      // Inline function 'kotlin.Long.times' call
      tmp = this.syc_1.cb(toLong(100)).bb(this.tyc_1).mb();
    } else {
      tmp = 0;
    }
    return tmp;
  };
  protoOf(MediaPlayState).toString = function () {
    return 'MediaPlayState(timestamp=' + this.ryc_1.toString() + ', timeInMillis=' + this.syc_1.toString() + ', totalDuration=' + this.tyc_1.toString() + ', resumed=' + this.uyc_1 + ')';
  };
  protoOf(MediaPlayState).hashCode = function () {
    var result = this.ryc_1.hashCode();
    result = imul(result, 31) + this.syc_1.hashCode() | 0;
    result = imul(result, 31) + this.tyc_1.hashCode() | 0;
    result = imul(result, 31) + getBooleanHashCode(this.uyc_1) | 0;
    return result;
  };
  protoOf(MediaPlayState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof MediaPlayState))
      return false;
    var tmp0_other_with_cast = other instanceof MediaPlayState ? other : THROW_CCE();
    if (!this.ryc_1.equals(tmp0_other_with_cast.ryc_1))
      return false;
    if (!this.syc_1.equals(tmp0_other_with_cast.syc_1))
      return false;
    if (!this.tyc_1.equals(tmp0_other_with_cast.tyc_1))
      return false;
    if (!(this.uyc_1 === tmp0_other_with_cast.uyc_1))
      return false;
    return true;
  };
  function _get_httpClient__2ty1zc_6($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.yyb_1;
    httpClient$factory_14();
    return this_0.t2();
  }
  function Companion_177() {
    this.wyc_1 = 'Video';
  }
  var Companion_instance_225;
  function Companion_getInstance_194() {
    return Companion_instance_225;
  }
  function VideoContentViewModel$slambda(this$0, resultContinuation) {
    this.fyd_1 = this$0;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(VideoContentViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(VideoContentViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(VideoContentViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.fyd_1.fp2().v7e().cbb(this.fyd_1.vyb_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var tmp0_elvis_lhs = suspendResult;
            var tmp_0;
            if (tmp0_elvis_lhs == null) {
              return Unit_instance;
            } else {
              tmp_0 = tmp0_elvis_lhs;
            }

            var contentEntryVersion = tmp_0;
            launch(this.gyd_1, VOID, VOID, VideoContentViewModel$slambda$slambda_0(this.fyd_1, contentEntryVersion, null));
            launch(this.gyd_1, VOID, VOID, VideoContentViewModel$slambda$slambda_2(this.fyd_1, contentEntryVersion, null));
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(VideoContentViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new VideoContentViewModel$slambda(this.fyd_1, completion);
    i.gyd_1 = $this$launch;
    return i;
  };
  function VideoContentViewModel$slambda_0(this$0, resultContinuation) {
    var i = new VideoContentViewModel$slambda(this$0, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function VideoContentViewModel(di, savedStateHandle) {
    AbstractNonInteractiveContentViewModel.call(this, di, savedStateHandle, 'Video');
    this.uyb_1 = MutableStateFlow(new MediaPlayState());
    var tmp = this;
    Companion_getInstance_102();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp.vyb_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    this.wyb_1 = MutableStateFlow(new VideoContentUiState());
    this.xyb_1 = asStateFlow(this.wyb_1);
    var tmp_0 = this;
    // Inline function 'org.kodein.di.instance' call
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    tmp_0.yyb_1 = Instance(this, tmp$ret$0, null).n5c(this, httpClient$factory_13());
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.update' call
      var this_0 = this.pp1_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.videocontent.VideoContentViewModel.<anonymous>' call
        var nextValue = prevValue.nol(VOID, VOID, VOID, VOID, true);
        if (this_0.y1k(prevValue, nextValue)) {
          break $l$block;
        }
      }
    }
    var tmp_2 = this.cp2();
    launch(tmp_2, VOID, VOID, VideoContentViewModel$slambda_0(this, null));
  }
  protoOf(VideoContentViewModel).yvz = function () {
    var tmp0_safe_receiver = this.wyb_1.t2().dyc_1;
    var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.gah_1;
    var tmp;
    if (tmp1_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.let' call
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.viewmodel.videocontent.VideoContentViewModel.<get-titleAndLangCode>.<anonymous>' call
      tmp = new TitleAndLangCode(tmp1_safe_receiver, 'en');
    }
    return tmp;
  };
  protoOf(VideoContentViewModel).hyd = function (playState) {
    var tmp$ret$1;
    $l$block: {
      // Inline function 'kotlinx.coroutines.flow.getAndUpdate' call
      var this_0 = this.uyb_1;
      while (true) {
        var prevValue = this_0.t2();
        // Inline function 'com.ustadmobile.core.viewmodel.videocontent.VideoContentViewModel.onPlayStateChanged.<anonymous>' call
        var nextValue = playState;
        if (this_0.y1k(prevValue, nextValue)) {
          tmp$ret$1 = prevValue;
          break $l$block;
        }
      }
    }
    var prevState = tmp$ret$1;
    if (!(prevState.uyc_1 === playState.uyc_1)) {
      this.toh(playState.uyc_1);
    }
    this.goi(playState.vyc());
  };
  function VideoContentUiState(mediaContentInfo, contentEntryVersionUid, manifestUrl, contentManifestMap, contentEntry, isFullScreen) {
    mediaContentInfo = mediaContentInfo === VOID ? null : mediaContentInfo;
    contentEntryVersionUid = contentEntryVersionUid === VOID ? new Long(0, 0) : contentEntryVersionUid;
    manifestUrl = manifestUrl === VOID ? null : manifestUrl;
    contentManifestMap = contentManifestMap === VOID ? null : contentManifestMap;
    contentEntry = contentEntry === VOID ? null : contentEntry;
    isFullScreen = isFullScreen === VOID ? false : isFullScreen;
    this.zyb_1 = mediaContentInfo;
    this.ayc_1 = contentEntryVersionUid;
    this.byc_1 = manifestUrl;
    this.cyc_1 = contentManifestMap;
    this.dyc_1 = contentEntry;
    this.eyc_1 = isFullScreen;
  }
  protoOf(VideoContentUiState).iyd = function (mediaContentInfo, contentEntryVersionUid, manifestUrl, contentManifestMap, contentEntry, isFullScreen) {
    return new VideoContentUiState(mediaContentInfo, contentEntryVersionUid, manifestUrl, contentManifestMap, contentEntry, isFullScreen);
  };
  protoOf(VideoContentUiState).fyc = function (mediaContentInfo, contentEntryVersionUid, manifestUrl, contentManifestMap, contentEntry, isFullScreen, $super) {
    mediaContentInfo = mediaContentInfo === VOID ? this.zyb_1 : mediaContentInfo;
    contentEntryVersionUid = contentEntryVersionUid === VOID ? this.ayc_1 : contentEntryVersionUid;
    manifestUrl = manifestUrl === VOID ? this.byc_1 : manifestUrl;
    contentManifestMap = contentManifestMap === VOID ? this.cyc_1 : contentManifestMap;
    contentEntry = contentEntry === VOID ? this.dyc_1 : contentEntry;
    isFullScreen = isFullScreen === VOID ? this.eyc_1 : isFullScreen;
    return $super === VOID ? this.iyd(mediaContentInfo, contentEntryVersionUid, manifestUrl, contentManifestMap, contentEntry, isFullScreen) : $super.iyd.call(this, mediaContentInfo, contentEntryVersionUid, manifestUrl, contentManifestMap, contentEntry, isFullScreen);
  };
  protoOf(VideoContentUiState).toString = function () {
    return 'VideoContentUiState(mediaContentInfo=' + this.zyb_1 + ', contentEntryVersionUid=' + this.ayc_1.toString() + ', manifestUrl=' + this.byc_1 + ', contentManifestMap=' + this.cyc_1 + ', contentEntry=' + this.dyc_1 + ', isFullScreen=' + this.eyc_1 + ')';
  };
  protoOf(VideoContentUiState).hashCode = function () {
    var result = this.zyb_1 == null ? 0 : hashCode(this.zyb_1);
    result = imul(result, 31) + this.ayc_1.hashCode() | 0;
    result = imul(result, 31) + (this.byc_1 == null ? 0 : getStringHashCode(this.byc_1)) | 0;
    result = imul(result, 31) + (this.cyc_1 == null ? 0 : this.cyc_1.hashCode()) | 0;
    result = imul(result, 31) + (this.dyc_1 == null ? 0 : this.dyc_1.hashCode()) | 0;
    result = imul(result, 31) + getBooleanHashCode(this.eyc_1) | 0;
    return result;
  };
  protoOf(VideoContentUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof VideoContentUiState))
      return false;
    var tmp0_other_with_cast = other instanceof VideoContentUiState ? other : THROW_CCE();
    if (!equals(this.zyb_1, tmp0_other_with_cast.zyb_1))
      return false;
    if (!this.ayc_1.equals(tmp0_other_with_cast.ayc_1))
      return false;
    if (!(this.byc_1 == tmp0_other_with_cast.byc_1))
      return false;
    if (!equals(this.cyc_1, tmp0_other_with_cast.cyc_1))
      return false;
    if (!equals(this.dyc_1, tmp0_other_with_cast.dyc_1))
      return false;
    if (!(this.eyc_1 === tmp0_other_with_cast.eyc_1))
      return false;
    return true;
  };
  function httpClient$factory_13() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_6(receiver);
    }, null);
  }
  function httpClient$factory_14() {
    return getPropertyCallableRef('httpClient', 1, KProperty1, function (receiver) {
      return _get_httpClient__2ty1zc_6(receiver);
    }, null);
  }
  function _get_resolveXapiLaunchHrefUseCase__8u4pj4($this) {
    // Inline function 'kotlin.getValue' call
    var this_0 = $this.eye_1;
    resolveXapiLaunchHrefUseCase$factory_0();
    return this_0.t2();
  }
  function Companion_178() {
    this.iye_1 = 'XapiContent';
  }
  var Companion_instance_226;
  function Companion_getInstance_195() {
    return Companion_instance_226;
  }
  function XapiContentViewModel$slambda(this$0, $savedStateHandle, resultContinuation) {
    this.rye_1 = this$0;
    this.sye_1 = $savedStateHandle;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(XapiContentViewModel$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(XapiContentViewModel$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(XapiContentViewModel$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = _get_resolveXapiLaunchHrefUseCase__8u4pj4(this.rye_1);
            Companion_getInstance_112();
            var tmp0_safe_receiver = this.sye_1.ba('clazzUid');
            var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
            var tmp_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
            Companion_getInstance_112();
            var tmp2_safe_receiver = this.sye_1.ba('courseBlockUid');
            var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : toLong_0(tmp2_safe_receiver);
            suspendResult = tmp_0.cnw(this.rye_1.fye_1, tmp_1, tmp3_elvis_lhs == null ? new Long(0, 0) : tmp3_elvis_lhs, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var launchHrefResult = suspendResult;
            l$ret$1: do {
              var this_0 = this.rye_1.gye_1;
              while (true) {
                var prevValue = this_0.t2();
                var nextValue = prevValue.wye(launchHrefResult.vns_1);
                if (this_0.y1k(prevValue, nextValue)) {
                  break l$ret$1;
                }
              }
            }
             while (false);
            l$ret$3: do {
              var this_1 = this.rye_1.pp1_1;
              while (true) {
                var prevValue_0 = this_1.t2();
                var nextValue_0 = prevValue_0.nol(VOID, VOID, launchHrefResult.xns_1.qnv_1, VOID, true);
                if (this_1.y1k(prevValue_0, nextValue_0)) {
                  break l$ret$3;
                }
              }
            }
             while (false);
            this.id_1 = 3;
            this.hd_1 = 4;
            continue $sm;
          case 2:
            this.id_1 = 3;
            var tmp_2 = this.kd_1;
            if (tmp_2 instanceof Error) {
              var e = this.kd_1;
              Napier_getInstance().d5e('Exception opening xapi content', e);
              this.hd_1 = 4;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 3:
            throw this.kd_1;
          case 4:
            this.id_1 = 3;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 3) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  protoOf(XapiContentViewModel$slambda).v1m = function ($this$launch, completion) {
    var i = new XapiContentViewModel$slambda(this.rye_1, this.sye_1, completion);
    i.tye_1 = $this$launch;
    return i;
  };
  function XapiContentViewModel$slambda_0(this$0, $savedStateHandle, resultContinuation) {
    var i = new XapiContentViewModel$slambda(this$0, $savedStateHandle, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function XapiContentViewModel(di, savedStateHandle) {
    UstadViewModel.call(this, di, savedStateHandle, 'XapiContent');
    var tmp = this;
    // Inline function 'org.kodein.di.instance' call
    var this_0 = onActiveEndpoint(di);
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(ResolveXapiLaunchHrefUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    tmp.eye_1 = Instance(this_0, tmp$ret$0, null).n5c(this, resolveXapiLaunchHrefUseCase$factory());
    var tmp_1 = this;
    Companion_getInstance_102();
    var tmp0_safe_receiver = savedStateHandle.ba('entityUid');
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : toLong_0(tmp0_safe_receiver);
    tmp_1.fye_1 = tmp1_elvis_lhs == null ? new Long(0, 0) : tmp1_elvis_lhs;
    this.gye_1 = MutableStateFlow(new XapiContentUiState(VOID, this.fye_1));
    this.hye_1 = asStateFlow(this.gye_1);
    var tmp_2 = this.cp2();
    launch(tmp_2, VOID, VOID, XapiContentViewModel$slambda_0(this, savedStateHandle, null));
  }
  function XapiContentUiState(url, contentEntryVersionUid) {
    url = url === VOID ? null : url;
    contentEntryVersionUid = contentEntryVersionUid === VOID ? new Long(0, 0) : contentEntryVersionUid;
    this.uye_1 = url;
    this.vye_1 = contentEntryVersionUid;
  }
  protoOf(XapiContentUiState).xye = function (url, contentEntryVersionUid) {
    return new XapiContentUiState(url, contentEntryVersionUid);
  };
  protoOf(XapiContentUiState).wye = function (url, contentEntryVersionUid, $super) {
    url = url === VOID ? this.uye_1 : url;
    contentEntryVersionUid = contentEntryVersionUid === VOID ? this.vye_1 : contentEntryVersionUid;
    return $super === VOID ? this.xye(url, contentEntryVersionUid) : $super.xye.call(this, url, contentEntryVersionUid);
  };
  protoOf(XapiContentUiState).toString = function () {
    return 'XapiContentUiState(url=' + this.uye_1 + ', contentEntryVersionUid=' + this.vye_1.toString() + ')';
  };
  protoOf(XapiContentUiState).hashCode = function () {
    var result = this.uye_1 == null ? 0 : getStringHashCode(this.uye_1);
    result = imul(result, 31) + this.vye_1.hashCode() | 0;
    return result;
  };
  protoOf(XapiContentUiState).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof XapiContentUiState))
      return false;
    var tmp0_other_with_cast = other instanceof XapiContentUiState ? other : THROW_CCE();
    if (!(this.uye_1 == tmp0_other_with_cast.uye_1))
      return false;
    if (!this.vye_1.equals(tmp0_other_with_cast.vye_1))
      return false;
    return true;
  };
  function resolveXapiLaunchHrefUseCase$factory() {
    return getPropertyCallableRef('resolveXapiLaunchHrefUseCase', 1, KProperty1, function (receiver) {
      return _get_resolveXapiLaunchHrefUseCase__8u4pj4(receiver);
    }, null);
  }
  function resolveXapiLaunchHrefUseCase$factory_0() {
    return getPropertyCallableRef('resolveXapiLaunchHrefUseCase', 1, KProperty1, function (receiver) {
      return _get_resolveXapiLaunchHrefUseCase__8u4pj4(receiver);
    }, null);
  }
  function encryptPbkdf2(_this__u8e3s4, password, $completion) {
    var tmp = new $encryptPbkdf2COROUTINE$66(_this__u8e3s4, password, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function doublePbkdf2HashAsBase64(_this__u8e3s4, password, $completion) {
    var tmp = new $doublePbkdf2HashAsBase64COROUTINE$68(_this__u8e3s4, password, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  }
  function $encryptPbkdf2COROUTINE$66(_this__u8e3s4, password, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.gyf_1 = _this__u8e3s4;
    this.hyf_1 = password;
  }
  protoOf($encryptPbkdf2COROUTINE$66).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            var tmp_1 = get_direct(this.gyf_1.cmj_1).s57();
            var tmp_2 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
            tmp_0.iyf_1 = tmp_1.q57(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), null);
            var tmp_3 = this;
            tmp_3.jyf_1 = this.iyf_1;
            var tmp_4 = this;
            tmp_4.kyf_1 = this.gyf_1.bmj_1.umj_1 + 'api/pbkdf2/encryptPbkdf2';
            var tmp_5 = this;
            tmp_5.lyf_1 = this.jyf_1;
            var tmp_6 = this;
            tmp_6.myf_1 = this.lyf_1;
            var tmp_7 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.kyf_1);
            parameter(this_0, 'secret', this.hyf_1);
            tmp_7.nyf_1 = this_0;
            this.nyf_1.j38_1 = Companion_getInstance().y2w_1;
            var tmp_8 = this;
            tmp_8.oyf_1 = this.myf_1;
            var tmp_9 = this;
            tmp_9.pyf_1 = this.nyf_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.pyf_1, this.oyf_1)).u3y(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.qyf_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = bodyAsText(this.qyf_1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var ARGUMENT = suspendResult;
            return decodeBase64Bytes(ARGUMENT);
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function $doublePbkdf2HashAsBase64COROUTINE$68(_this__u8e3s4, password, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.zyf_1 = _this__u8e3s4;
    this.ayg_1 = password;
  }
  protoOf($doublePbkdf2HashAsBase64COROUTINE$68).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            var tmp_1 = get_direct(this.zyf_1.cmj_1).s57();
            var tmp_2 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
            tmp_0.byg_1 = tmp_1.q57(isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE(), null);
            var tmp_3 = this;
            tmp_3.cyg_1 = this.byg_1;
            var tmp_4 = this;
            tmp_4.dyg_1 = this.zyf_1.bmj_1.umj_1 + 'api/pbkdf2/doubleEncryptPbkdf2';
            var tmp_5 = this;
            tmp_5.eyg_1 = this.cyg_1;
            var tmp_6 = this;
            tmp_6.fyg_1 = this.eyg_1;
            var tmp_7 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.dyg_1);
            parameter(this_0, 'secret', this.ayg_1);
            tmp_7.gyg_1 = this_0;
            this.gyg_1.j38_1 = Companion_getInstance().y2w_1;
            var tmp_8 = this;
            tmp_8.hyg_1 = this.fyg_1;
            var tmp_9 = this;
            tmp_9.iyg_1 = this.gyg_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.iyg_1, this.hyg_1)).u3y(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.jyg_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = bodyAsText(this.jyg_1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return suspendResult;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function get_DIContext() {
    _init_properties_DiModule_kt__i4hbld();
    return DIContext;
  }
  var DIContext;
  function get_DIModule() {
    _init_properties_DiModule_kt__i4hbld();
    return DIModule;
  }
  var DIModule;
  function DIModule$lambda($this$FC, props) {
    _init_properties_DiModule_kt__i4hbld();
    // Inline function 'react.ChildrenBuilder.invoke' call
    var this_0 = get_DIContext();
    var value = props.di;
    var block = DIModule$lambda$lambda(props);
    addChild($this$FC, this_0, value, block);
    return Unit_instance;
  }
  function DIModule$lambda$lambda($props) {
    return function ($this$invoke) {
      var this_0 = $props.children;
      addChildNode($this$invoke, this_0);
      return Unit_instance;
    };
  }
  var properties_initialized_DiModule_kt_wik303;
  function _init_properties_DiModule_kt__i4hbld() {
    if (!properties_initialized_DiModule_kt_wik303) {
      properties_initialized_DiModule_kt_wik303 = true;
      DIContext = createContext();
      DIModule = FC(DIModule$lambda);
    }
  }
  function get_NavHostContext() {
    _init_properties_NavHost_kt__jjqoc9();
    return NavHostContext;
  }
  var NavHostContext;
  function get_NavHost() {
    _init_properties_NavHost_kt__jjqoc9();
    return NavHost;
  }
  var NavHost;
  function invoke$effectivePopUpTo(_this__u8e3s4, this$0) {
    var tmp;
    Companion_getInstance_102();
    if (_this__u8e3s4 === '') {
      tmp = get_ustadViewName(this$0.lyg_1);
    } else {
      tmp = _this__u8e3s4;
    }
    return tmp;
  }
  function NavHostFunction(navigateFn, location, onHideChildren) {
    this.kyg_1 = navigateFn;
    this.lyg_1 = location;
    this.myg_1 = onHideChildren;
  }
  protoOf(NavHostFunction).nyg = function (cmd) {
    if (cmd instanceof NavigateNavCommand) {
      var tmp1_safe_receiver = cmd.koo_1.eoj_1;
      var popUpToView = tmp1_safe_receiver == null ? null : invoke$effectivePopUpTo(tmp1_safe_receiver, this);
      if ((popUpToView == null ? true : popUpToView === get_ustadViewName(this.lyg_1)) ? !cmd.koo_1.goj_1 ? true : this.lyg_1.key === get_firstLocationKey() : false) {
        Napier_getInstance().v5d('NavHostFunction: go to /' + cmd.ioo_1 + '?' + toUrlQueryString(cmd.joo_1));
        var replaceNav = (popUpToView === get_ustadViewName(this.lyg_1) ? cmd.koo_1.foj_1 : false) ? true : cmd.koo_1.goj_1;
        var tmp = '/' + cmd.ioo_1 + '?' + toUrlQueryString(cmd.joo_1);
        // Inline function 'js.objects.jso' call
        // Inline function 'kotlin.apply' call
        // Inline function 'js.objects.jso' call
        var this_0 = {};
        // Inline function 'kotlin.contracts.contract' call
        // Inline function 'com.ustadmobile.core.components.NavHostFunction.invoke.<anonymous>' call
        this_0.replace = replaceNav;
        setIsNewFirstLocation(this_0, this.lyg_1);
        this.kyg_1(tmp, this_0);
      } else {
        Napier_getInstance().v5d('NavHostFunction: pop, then go /' + cmd.ioo_1 + '?' + toUrlQueryString(cmd.joo_1));
        clearNavHostCommands(sessionStorage);
        sessionStorage.removeItem('navControllerStackCleared');
        sessionStorage.removeItem('navHostHitPopupto');
        if (!(popUpToView == null)) {
          // Inline function 'org.w3c.dom.set' call
          // Inline function 'kotlin.js.asDynamic' call
          sessionStorage['navControllerPopUpTo'] = popUpToView;
        }
        // Inline function 'org.w3c.dom.set' call
        // Inline function 'kotlin.js.asDynamic' call
        sessionStorage['navControllerClearStack'] = cmd.koo_1.goj_1.toString();
        // Inline function 'org.w3c.dom.set' call
        // Inline function 'kotlin.js.asDynamic' call
        sessionStorage['navControllerPopUpToInc'] = cmd.koo_1.foj_1.toString();
        // Inline function 'org.w3c.dom.set' call
        // Inline function 'kotlin.js.asDynamic' call
        sessionStorage['navControllerGoToAfterPop'] = '/' + cmd.ioo_1 + '?' + toUrlQueryString(cmd.joo_1);
        this.myg_1();
        this.kyg_1(-1);
      }
    } else {
      if (cmd instanceof PopNavCommand) {
        var popUpTo = invoke$effectivePopUpTo(cmd.moo_1, this);
        if (popUpTo === get_ustadViewName(this.lyg_1) ? cmd.noo_1 : false) {
          Napier_getInstance().v5d('NavHostFunction: pop to current viewname ' + popUpTo + ' (inclusive) ' + 'e.g. go back one');
          this.kyg_1(-1);
        } else if (!(popUpTo === get_ustadViewName(this.lyg_1))) {
          Napier_getInstance().v5d('NavHostFunction: pop to ' + popUpTo + ' inclusive = ' + cmd.noo_1);
          sessionStorage.removeItem('navHostHitPopupto');
          // Inline function 'org.w3c.dom.set' call
          // Inline function 'kotlin.js.asDynamic' call
          sessionStorage['navControllerPopUpTo'] = cmd.moo_1;
          // Inline function 'org.w3c.dom.set' call
          // Inline function 'kotlin.js.asDynamic' call
          sessionStorage['navControllerPopUpToInc'] = cmd.noo_1.toString();
          this.myg_1();
          this.kyg_1(-1);
        } else {
          Napier_getInstance().v5d('NavHostFunction: pop up to current viewname, inclusive = false?? Nothing to do.');
        }
      } else {
        Napier_getInstance().v5d('NavHostFunction: command ignored: ' + cmd);
      }
    }
  };
  function get_NAVHOST_CLEARSTACK_VIEWNAME() {
    return NAVHOST_CLEARSTACK_VIEWNAME;
  }
  var NAVHOST_CLEARSTACK_VIEWNAME;
  function set_firstLocationKey(value) {
    _init_properties_NavHost_kt__jjqoc9();
    sessionStorage.setItem('firstLocationKey', value);
  }
  function get_firstLocationKey() {
    _init_properties_NavHost_kt__jjqoc9();
    var tmp0_elvis_lhs = sessionStorage.getItem('firstLocationKey');
    return tmp0_elvis_lhs == null ? 'default' : tmp0_elvis_lhs;
  }
  function clearNavHostCommands(_this__u8e3s4) {
    _init_properties_NavHost_kt__jjqoc9();
    _this__u8e3s4.removeItem('navControllerPopUpTo');
    _this__u8e3s4.removeItem('navControllerPopUpToInc');
    _this__u8e3s4.removeItem('navControllerClearStack');
    _this__u8e3s4.removeItem('navControllerGoToAfterPop');
    _this__u8e3s4.removeItem('navHostRoot');
  }
  function setIsNewFirstLocation(_this__u8e3s4, fromLocation) {
    _init_properties_NavHost_kt__jjqoc9();
    if (_this__u8e3s4.replace === true ? fromLocation.key === get_firstLocationKey() : false) {
      _this__u8e3s4.state = json([to('isNewFirstLocation', true)]);
    }
  }
  function NavHost$lambda($this$FC, props) {
    _init_properties_NavHost_kt__jjqoc9();
    var tmp;
    // Inline function 'org.w3c.dom.get' call
    // Inline function 'kotlin.js.asDynamic' call
    if (sessionStorage['navControllerPopUpTo'] == null) {
      // Inline function 'org.w3c.dom.get' call
      // Inline function 'kotlin.js.asDynamic' call
      tmp = !(sessionStorage['navControllerClearStack'] === 'false');
    } else {
      tmp = false;
    }
    var showChildren$delegate = useState(tmp);
    var navigateFn = useNavigate();
    var location = useLocation();
    // Inline function 'react.useMemo' call
    var dependencies = [navigateFn, location];
    var callback = NavHost$lambda$lambda(navigateFn, location, showChildren$delegate);
    var navHostFunction = useMemo(callback, dependencies);
    // Inline function 'react.ChildrenBuilder.invoke' call
    var this_0 = get_NavHostContext();
    var block = NavHost$lambda$lambda_0(location, props, navigateFn, showChildren$delegate);
    addChild($this$FC, this_0, navHostFunction, block);
    return Unit_instance;
  }
  function invoke$lambda_2($showChildren$delegate) {
    _init_properties_NavHost_kt__jjqoc9();
    // Inline function 'react.StateInstance.getValue' call
    getLocalDelegateReference('showChildren', KMutableProperty0, true, function () {
      return THROW_ISE();
    });
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return $showChildren$delegate[0];
  }
  function invoke$lambda_3($showChildren$delegate, value) {
    _init_properties_NavHost_kt__jjqoc9();
    getLocalDelegateReference('showChildren', KMutableProperty0, true, function () {
      return THROW_ISE();
    });
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    $showChildren$delegate[1](value);
    return Unit_instance;
  }
  function NavHost$lambda$lambda$lambda($showChildren$delegate) {
    return function () {
      invoke$lambda_3($showChildren$delegate, false);
      return Unit_instance;
    };
  }
  function NavHost$lambda$lambda($navigateFn, $location, $showChildren$delegate) {
    return function () {
      return new NavHostFunction($navigateFn, $location, NavHost$lambda$lambda$lambda($showChildren$delegate));
    };
  }
  function invoke$launchClearStackTimeout(_this__u8e3s4, navigateFn) {
    return launch(_this__u8e3s4, VOID, VOID, NavHost$lambda$lambda$launchClearStackTimeout$slambda_0(navigateFn, null));
  }
  function invoke$lambda_4($navTimeoutJob$delegate) {
    _init_properties_NavHost_kt__jjqoc9();
    // Inline function 'react.StateInstance.getValue' call
    getLocalDelegateReference('navTimeoutJob', KMutableProperty0, true, function () {
      return THROW_ISE();
    });
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return $navTimeoutJob$delegate[0];
  }
  function invoke$lambda_5($navTimeoutJob$delegate, value) {
    _init_properties_NavHost_kt__jjqoc9();
    getLocalDelegateReference('navTimeoutJob', KMutableProperty0, true, function () {
      return THROW_ISE();
    });
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    $navTimeoutJob$delegate[1](value);
    return Unit_instance;
  }
  function NavHost$lambda$lambda$lambda_0() {
    _init_properties_NavHost_kt__jjqoc9();
    return CoroutineScope_0(Dispatchers_getInstance().t12().lj(Job()));
  }
  function NavHost$lambda$lambda$lambda_1() {
    _init_properties_NavHost_kt__jjqoc9();
    return null;
  }
  function NavHost$lambda$lambda$lambda_2($location, $navigateFn, $coroutineScope, $navTimeoutJob$delegate, $showChildren$delegate) {
    return function ($this$useEffect) {
      console.log('NavHost: key = ' + $location.key);
      var tmp0_safe_receiver = $location.state;
      var tmp;
      if (tmp0_safe_receiver == null) {
        tmp = null;
      } else {
        // Inline function 'kotlin.js.unsafeCast' call
        // Inline function 'kotlin.js.asDynamic' call
        tmp = tmp0_safe_receiver;
      }
      var tmp1_safe_receiver = tmp;
      var isNewFirstLocation = equals(tmp1_safe_receiver == null ? null : tmp1_safe_receiver['isNewFirstLocation'], true);
      var tmp_0;
      if (isNewFirstLocation) {
        console.log('NavHost: New first location key = ' + $location.key);
        set_firstLocationKey($location.key);
        tmp_0 = Unit_instance;
      }
      var tmp2_safe_receiver = invoke$lambda_4($navTimeoutJob$delegate);
      if (tmp2_safe_receiver == null)
        null;
      else {
        tmp2_safe_receiver.mr();
      }
      // Inline function 'org.w3c.dom.get' call
      // Inline function 'kotlin.js.asDynamic' call
      var popupToTarget = sessionStorage['navControllerPopUpTo'];
      // Inline function 'org.w3c.dom.get' call
      // Inline function 'kotlin.js.asDynamic' call
      var navToAfterPop = sessionStorage['navControllerGoToAfterPop'];
      // Inline function 'org.w3c.dom.get' call
      // Inline function 'kotlin.js.asDynamic' call
      var tmp3_safe_receiver = sessionStorage['navControllerPopUpToInc'];
      var tmp4_elvis_lhs = tmp3_safe_receiver == null ? null : toBoolean(tmp3_safe_receiver);
      var popUpToInclusive = tmp4_elvis_lhs == null ? false : tmp4_elvis_lhs;
      // Inline function 'org.w3c.dom.get' call
      // Inline function 'kotlin.js.asDynamic' call
      var tmp5_safe_receiver = sessionStorage['navControllerClearStack'];
      var tmp6_elvis_lhs = tmp5_safe_receiver == null ? null : toBoolean(tmp5_safe_receiver);
      var clearStack = tmp6_elvis_lhs == null ? false : tmp6_elvis_lhs;
      // Inline function 'org.w3c.dom.get' call
      // Inline function 'kotlin.js.asDynamic' call
      var tmp7_safe_receiver = sessionStorage['navControllerStackCleared'];
      var tmp8_elvis_lhs = tmp7_safe_receiver == null ? null : toBoolean(tmp7_safe_receiver);
      var clearStackHitPlaceholder = tmp8_elvis_lhs == null ? false : tmp8_elvis_lhs;
      // Inline function 'org.w3c.dom.get' call
      // Inline function 'kotlin.js.asDynamic' call
      var tmp9_safe_receiver = sessionStorage['navHostHitPopupto'];
      var tmp10_elvis_lhs = tmp9_safe_receiver == null ? null : toBoolean(tmp9_safe_receiver);
      var popUpToHitDestination = tmp10_elvis_lhs == null ? false : tmp10_elvis_lhs;
      Napier_getInstance().p5d('NavHost: useEffect check: key = ' + $location.key + ' ' + ('current viewname = ' + get_ustadViewName($location) + ' ') + ('popUpToTarget = ' + popupToTarget + ' ') + ('navtoAfterPop = ' + navToAfterPop + ' ') + ('popUpToInclusive = ' + popUpToInclusive + ' ') + ('clearStack = ' + clearStack + ' ') + ('clearStackHitPlaceholder = ' + clearStackHitPlaceholder + ' ') + ('popUpToHitDestination = ' + popUpToHitDestination));
      var tmp_1;
      if ((popupToTarget == null ? !clearStack : false) ? !($location.pathname === '/ClearStack') : false) {
        Napier_getInstance().p5d('NavHost: action: no pop or other operation pending, show children');
        invoke$lambda_3($showChildren$delegate, true);
        tmp_1 = Unit_instance;
      } else if (popupToTarget === get_ustadViewName($location) ? popUpToInclusive : false) {
        Napier_getInstance().p5d('NavHost: action: reached popUpTo destination, popUpToInclusive is set, pop once more');
        invoke$lambda_3($showChildren$delegate, false);
        // Inline function 'org.w3c.dom.set' call
        // Inline function 'kotlin.js.asDynamic' call
        sessionStorage['navHostHitPopupto'] = 'true';
        $navigateFn(-1);
        var tmp_2;
        if (!(navToAfterPop == null)) {
          invoke$lambda_5($navTimeoutJob$delegate, invoke$launchClearStackTimeout($coroutineScope, $navigateFn));
          tmp_2 = Unit_instance;
        }
        tmp_1 = tmp_2;
      } else if (popupToTarget === get_ustadViewName($location) ? true : popUpToHitDestination) {
        Napier_getInstance().p5d('NavHost: action: reached popupToDestination with inclusive = false, or inclusive was true and destination was hit');
        clearNavHostCommands(sessionStorage);
        var tmp_3;
        if (!(navToAfterPop == null)) {
          $navigateFn(navToAfterPop);
          tmp_3 = Unit_instance;
        } else {
          invoke$lambda_3($showChildren$delegate, true);
          tmp_3 = Unit_instance;
        }
        tmp_1 = tmp_3;
      } else if ((clearStack ? $location.key === get_firstLocationKey() : false) ? !clearStackHitPlaceholder : false) {
        Napier_getInstance().p5d('NavHost: action: clearstack was set, reached first entry in history, but did not yet navigate to dummy placeholder. Going to /ClearStack');
        $navigateFn('/ClearStack');
        tmp_1 = Unit_instance;
      } else if ($location.pathname === '/ClearStack') {
        Napier_getInstance().p5d('NavHost: action: reached stack clear dummy placeholder. Going back');
        // Inline function 'org.w3c.dom.set' call
        // Inline function 'kotlin.js.asDynamic' call
        sessionStorage['navControllerStackCleared'] = 'true';
        $navigateFn(-1);
        tmp_1 = Unit_instance;
      } else if (clearStack ? clearStackHitPlaceholder : false) {
        Napier_getInstance().p5d('NavHost: action: clearStack was set and dummy placeholder was hit');
        clearNavHostCommands(sessionStorage);
        var tmp_4;
        if (!(navToAfterPop == null)) {
          // Inline function 'js.objects.jso' call
          // Inline function 'kotlin.apply' call
          // Inline function 'js.objects.jso' call
          var this_0 = {};
          // Inline function 'kotlin.contracts.contract' call
          // Inline function 'com.ustadmobile.core.components.NavHost.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
          this_0.replace = true;
          setIsNewFirstLocation(this_0, $location);
          $navigateFn(navToAfterPop, this_0);
          tmp_4 = Unit_instance;
        }
        tmp_1 = tmp_4;
      } else {
        Napier_getInstance().p5d('NavHost: action: need to continue history popping');
        invoke$lambda_3($showChildren$delegate, false);
        // Inline function 'kotlin.takeIf' call
        var this_1 = $navigateFn;
        // Inline function 'kotlin.contracts.contract' call
        var tmp_5;
        // Inline function 'com.ustadmobile.core.components.NavHost.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
        if (!($location.key === get_firstLocationKey())) {
          tmp_5 = this_1;
        } else {
          tmp_5 = null;
        }
        var tmp11_safe_receiver = tmp_5;
        if (tmp11_safe_receiver == null)
          null;
        else {
          tmp11_safe_receiver(-1);
        }
        invoke$lambda_5($navTimeoutJob$delegate, invoke$launchClearStackTimeout($coroutineScope, $navigateFn));
        tmp_1 = Unit_instance;
      }
      return Unit_instance;
    };
  }
  function NavHost$lambda$lambda$launchClearStackTimeout$slambda($navigateFn, resultContinuation) {
    this.wyg_1 = $navigateFn;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(NavHost$lambda$lambda$launchClearStackTimeout$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(NavHost$lambda$lambda$launchClearStackTimeout$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(NavHost$lambda$lambda$launchClearStackTimeout$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = delay(new Long(250, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            Napier_getInstance().p5d('NavHost: action: clearStackTimeout: apparently at the end of history. go to clearstack');
            sessionStorage['navControllerClearStack'] = 'true';
            this.wyg_1('/ClearStack');
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(NavHost$lambda$lambda$launchClearStackTimeout$slambda).v1m = function ($this$launch, completion) {
    var i = new NavHost$lambda$lambda$launchClearStackTimeout$slambda(this.wyg_1, completion);
    i.xyg_1 = $this$launch;
    return i;
  };
  function NavHost$lambda$lambda$launchClearStackTimeout$slambda_0($navigateFn, resultContinuation) {
    var i = new NavHost$lambda$lambda$launchClearStackTimeout$slambda($navigateFn, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function NavHost$lambda$lambda_0($location, $props, $navigateFn, $showChildren$delegate) {
    return function ($this$invoke) {
      // Inline function 'react.useMemo' call
      // Inline function 'kotlin.emptyArray' call
      var dependencies = [].slice();
      var callback = NavHost$lambda$lambda$lambda_0;
      var coroutineScope = useMemo(callback, dependencies);
      var navTimeoutJob$delegate = useState_0(NavHost$lambda$lambda$lambda_1);
      // Inline function 'kotlin.arrayOf' call
      // Inline function 'kotlin.js.unsafeCast' call
      // Inline function 'kotlin.js.asDynamic' call
      var tmp = [$location.key].slice();
      useEffect(tmp, NavHost$lambda$lambda$lambda_2($location, $navigateFn, coroutineScope, navTimeoutJob$delegate, $showChildren$delegate));
      var tmp_0;
      if (invoke$lambda_2($showChildren$delegate)) {
        var this_0 = $props.children;
        addChildNode($this$invoke, this_0);
        tmp_0 = Unit_instance;
      }
      return Unit_instance;
    };
  }
  var properties_initialized_NavHost_kt_vv2ix1;
  function _init_properties_NavHost_kt__jjqoc9() {
    if (!properties_initialized_NavHost_kt_vv2ix1) {
      properties_initialized_NavHost_kt_vv2ix1 = true;
      NavHostContext = createContext();
      NavHost = FC(NavHost$lambda);
    }
  }
  function get_NavHostClearStackPlaceholder() {
    _init_properties_NavHostClearStackPlaceholder_kt__f93zv7();
    return NavHostClearStackPlaceholder;
  }
  var NavHostClearStackPlaceholder;
  function NavHostClearStackPlaceholder$lambda($this$FC, props) {
    _init_properties_NavHostClearStackPlaceholder_kt__f93zv7();
    return Unit_instance;
  }
  var properties_initialized_NavHostClearStackPlaceholder_kt_6nlzsf;
  function _init_properties_NavHostClearStackPlaceholder_kt__f93zv7() {
    if (!properties_initialized_NavHostClearStackPlaceholder_kt_6nlzsf) {
      properties_initialized_NavHostClearStackPlaceholder_kt_6nlzsf = true;
      NavHostClearStackPlaceholder = FC(NavHostClearStackPlaceholder$lambda);
    }
  }
  function SetPasswordUseCaseJs$invoke$lambda() {
    return 'Exception setting password';
  }
  function $invokeCOROUTINE$69(_this__u8e3s4, activeUserPersonUid, personUid, username, newPassword, currentPassword, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.gyh_1 = _this__u8e3s4;
    this.hyh_1 = activeUserPersonUid;
    this.iyh_1 = personUid;
    this.jyh_1 = username;
    this.kyh_1 = newPassword;
    this.lyh_1 = currentPassword;
  }
  protoOf($invokeCOROUTINE$69).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            var tmp_1 = this.gyh_1.vyh_1;
            var tmp0_elvis_lhs = isInterface(tmp_1, DoorDatabaseRepository) ? tmp_1 : null;
            var tmp_2;
            if (tmp0_elvis_lhs == null) {
              throw IllegalArgumentException_init_$Create$_0();
            } else {
              tmp_2 = tmp0_elvis_lhs;
            }

            tmp_0.myh_1 = tmp_2;
            this.id_1 = 2;
            var tmp_3 = this;
            tmp_3.nyh_1 = this.gyh_1.wyh_1;
            var tmp_4 = this;
            tmp_4.oyh_1 = this.gyh_1.uyh_1.umj_1 + 'api/account/setpassword';
            var tmp_5 = this;
            tmp_5.pyh_1 = this.nyh_1;
            var tmp_6 = this;
            tmp_6.qyh_1 = this.pyh_1;
            var tmp_7 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.oyh_1);
            doorNodeIdHeader(this_0, this.myh_1);
            parameter(this_0, 'nodeActiveUserUid', this.hyh_1);
            parameter(this_0, 'personUid', this.iyh_1.toString());
            parameter(this_0, 'username', this.jyh_1);
            parameter(this_0, 'newPassword', this.kyh_1);
            var tmp0_safe_receiver = this.lyh_1;
            if (tmp0_safe_receiver == null)
              null;
            else {
              parameter(this_0, 'currentPassword', tmp0_safe_receiver);
            }

            set_expectSuccess(this_0, false);
            tmp_7.ryh_1 = this_0;
            this.ryh_1.j38_1 = Companion_getInstance().z2w_1;
            var tmp_8 = this;
            tmp_8.syh_1 = this.qyh_1;
            var tmp_9 = this;
            tmp_9.tyh_1 = this.ryh_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.tyh_1, this.syh_1)).u3y(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var result = suspendResult;
            if (result.w3a().equals(Companion_getInstance_0().k2y_1)) {
              throw new UnauthorizedException();
            } else if (!isSuccess(result.w3a())) {
              throw IllegalStateException_init_$Create$('Bad response to set password request: ' + result.w3a());
            }

            this.id_1 = 3;
            this.hd_1 = 4;
            continue $sm;
          case 2:
            this.id_1 = 3;
            var tmp_10 = this.kd_1;
            if (tmp_10 instanceof Error) {
              var e = this.kd_1;
              var tmp_11 = Napier_getInstance();
              tmp_11.f5e(e, VOID, SetPasswordUseCaseJs$invoke$lambda);
              throw e;
            } else {
              throw this.kd_1;
            }

          case 3:
            throw this.kd_1;
          case 4:
            this.id_1 = 3;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 3) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  function SetPasswordUseCaseJs(endpoint, repo, httpClient) {
    this.uyh_1 = endpoint;
    this.vyh_1 = repo;
    this.wyh_1 = httpClient;
  }
  protoOf(SetPasswordUseCaseJs).dn5 = function (activeUserPersonUid, personUid, username, newPassword, currentPassword, $completion) {
    var tmp = new $invokeCOROUTINE$69(this, activeUserPersonUid, personUid, username, newPassword, currentPassword, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function OpenBlobUseCaseJs() {
  }
  protoOf(OpenBlobUseCaseJs).fnc = function (item, onProgress, intent, $completion) {
    var element = document.createElement('a');
    element.setAttribute('href', item.nnb_1);
    element.setAttribute('download', item.pnb_1);
    element.style.display = 'none';
    document.body.appendChild(element);
    element.click();
    document.body.removeChild(element);
    return Unit_instance;
  };
  function SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda$slambda($transferJobItemStatusUpdater, this$0, $uriToSaveQueueItems, resultContinuation) {
    this.fyi_1 = $transferJobItemStatusUpdater;
    this.gyi_1 = this$0;
    this.hyi_1 = $uriToSaveQueueItems;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda$slambda).fmp = function (it, $completion) {
    var tmp = this.gmp(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda$slambda).he = function (p1, $completion) {
    return this.fmp(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            suspendResult = this.fyi_1.lnj(VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.hd_1 = 2;
            var tmp_0 = this.gyi_1.myi_1.x7e();
            var tmp0_safe_receiver = firstOrNull(this.hyi_1);
            var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.pyi_1;
            var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.wbw_1;
            suspendResult = tmp_0.yhq(tmp2_elvis_lhs == null ? 0 : tmp2_elvis_lhs, TransferJobItemStatus_FAILED_getInstance().pj8_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda$slambda).gmp = function (it, completion) {
    var i = new SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda$slambda(this.fyi_1, this.gyi_1, this.hyi_1, completion);
    i.iyi_1 = it;
    return i;
  };
  function SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda$slambda_0($transferJobItemStatusUpdater, this$0, $uriToSaveQueueItems, resultContinuation) {
    var i = new SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda$slambda($transferJobItemStatusUpdater, this$0, $uriToSaveQueueItems, resultContinuation);
    var l = function (it, $completion) {
      return i.fmp(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$lambda($transferJobItemStatusUpdater, $uploadItem) {
    return function (it) {
      $transferJobItemStatusUpdater.inj(new BlobTransferProgressUpdate($uploadItem, it.oo4_1));
      return Unit_instance;
    };
  }
  function SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda(this$0, $transferJobItemStatusUpdater, $uriToSaveQueueItems, resultContinuation) {
    this.yyi_1 = this$0;
    this.zyi_1 = $transferJobItemStatusUpdater;
    this.ayj_1 = $uriToSaveQueueItems;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda).u1m = function ($this$withContext, $completion) {
    var tmp = this.v1m($this$withContext, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = withDoorTransactionAsync(this.yyi_1.myi_1, VOID, SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda$slambda_0(this.zyi_1, this.yyi_1, this.ayj_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda).v1m = function ($this$withContext, completion) {
    var i = new SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda(this.yyi_1, this.zyi_1, this.ayj_1, completion);
    i.byj_1 = $this$withContext;
    return i;
  };
  function SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda_0(this$0, $transferJobItemStatusUpdater, $uriToSaveQueueItems, resultContinuation) {
    var i = new SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda(this$0, $transferJobItemStatusUpdater, $uriToSaveQueueItems, resultContinuation);
    var l = function ($this$withContext, $completion) {
      return i.u1m($this$withContext, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function UriToSaveQueueItem(uriToSaveItem, transferJobItem) {
    this.oyi_1 = uriToSaveItem;
    this.pyi_1 = transferJobItem;
  }
  protoOf(UriToSaveQueueItem).toString = function () {
    return 'UriToSaveQueueItem(uriToSaveItem=' + this.oyi_1 + ', transferJobItem=' + this.pyi_1 + ')';
  };
  protoOf(UriToSaveQueueItem).hashCode = function () {
    var result = this.oyi_1.hashCode();
    result = imul(result, 31) + this.pyi_1.hashCode() | 0;
    return result;
  };
  protoOf(UriToSaveQueueItem).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof UriToSaveQueueItem))
      return false;
    var tmp0_other_with_cast = other instanceof UriToSaveQueueItem ? other : THROW_CCE();
    if (!this.oyi_1.equals(tmp0_other_with_cast.oyi_1))
      return false;
    if (!this.pyi_1.equals(tmp0_other_with_cast.pyi_1))
      return false;
    return true;
  };
  function SaveLocalUrisAsBlobUseCaseJs$invoke$slambda(this$0, $localUrisToSave, $onTransferJobItemCreated, resultContinuation) {
    this.kyj_1 = this$0;
    this.lyj_1 = $localUrisToSave;
    this.myj_1 = $onTransferJobItemCreated;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda).fyk = function (it, $completion) {
    var tmp = this.gmp(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda).he = function (p1, $completion) {
    return this.fyk(p1 instanceof UmAppDatabase ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 8;
            this.hd_1 = 1;
            suspendResult = this.kyj_1.myi_1.w7e().kho(new TransferJob(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.oyj_1 = suspendResult;
            this.pyj_1 = this.oyj_1.mb();
            var tmp_0 = this;
            tmp_0.qyj_1 = this.lyj_1;
            var tmp_1 = this;
            tmp_1.ryj_1 = this.qyj_1;
            var tmp_2 = this;
            tmp_2.syj_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.qyj_1, 10));
            this.tyj_1 = this.ryj_1.w();
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (!this.tyj_1.f()) {
              this.hd_1 = 7;
              continue $sm;
            }

            this.uyj_1 = this.tyj_1.e();
            var tmp_3 = this;
            tmp_3.vyj_1 = this.uyj_1;
            var tmp_4 = this;
            tmp_4.wyj_1 = fetch(this.vyj_1.fne_1);
            this.hd_1 = 3;
            var this_0 = this.wyj_1;
            suspendResult = await_0(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.xyj_1 = suspendResult;
            this.yyj_1 = this.xyj_1.blob();
            this.hd_1 = 4;
            var this_1 = this.yyj_1;
            suspendResult = await_0(this_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.zyj_1 = suspendResult;
            this.ayk_1 = this.zyj_1.size;
            this.byk_1 = numberToLong(this.ayk_1);
            var tmp_5 = this;
            var tmp0_tjiSrc = this.vyj_1.fne_1;
            var tmp1_tjiTableId = this.vyj_1.hne_1;
            var tmp2_tjiEntityUid = this.vyj_1.gne_1;
            tmp_5.cyk_1 = new TransferJobItem(VOID, this.pyj_1, this.byk_1, VOID, VOID, tmp0_tjiSrc, VOID, VOID, VOID, tmp1_tjiTableId, tmp2_tjiEntityUid);
            this.hd_1 = 5;
            suspendResult = this.kyj_1.myi_1.x7e().uhq(this.cyk_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 5:
            this.dyk_1 = suspendResult;
            this.eyk_1 = this.dyk_1.mb();
            this.myj_1(this.vyj_1, this.cyk_1.zjt(this.eyk_1));
            this.hd_1 = 6;
            suspendResult = this.kyj_1.nyi_1.ank(this.kyj_1.myi_1, this.vyj_1.hne_1, this.vyj_1.gne_1, this.eyk_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            var ARGUMENT = new UriToSaveQueueItem(this.vyj_1, this.cyk_1.zjt(this.eyk_1));
            this.syj_1.i1(ARGUMENT);
            this.hd_1 = 2;
            continue $sm;
          case 7:
            return this.syj_1;
          case 8:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 8) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda).gmp = function (it, completion) {
    var i = new SaveLocalUrisAsBlobUseCaseJs$invoke$slambda(this.kyj_1, this.lyj_1, this.myj_1, completion);
    i.nyj_1 = it;
    return i;
  };
  function SaveLocalUrisAsBlobUseCaseJs$invoke$slambda_0(this$0, $localUrisToSave, $onTransferJobItemCreated, resultContinuation) {
    var i = new SaveLocalUrisAsBlobUseCaseJs$invoke$slambda(this$0, $localUrisToSave, $onTransferJobItemCreated, resultContinuation);
    var l = function (it, $completion) {
      return i.fyk(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SaveLocalUrisAsBlobUseCaseJs$invoke$slambda_1(this$0, $uriToSaveQueueItems, resultContinuation) {
    this.oyk_1 = this$0;
    this.pyk_1 = $uriToSaveQueueItems;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda_1).lyl = function ($this$coroutineScope, $completion) {
    var tmp = this.v1m($this$coroutineScope, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda_1).he = function (p1, $completion) {
    return this.lyl((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 8;
            this.ryk_1 = new TransferJobItemStatusUpdater(this.oyk_1.myi_1, null, this.qyk_1);
            this.id_1 = 5;
            var tmp_0 = this;
            tmp_0.tyk_1 = this.pyk_1;
            var tmp_1 = this;
            tmp_1.uyk_1 = this.tyk_1;
            var tmp_2 = this;
            tmp_2.vyk_1 = ArrayList_init_$Create$_0(collectionSizeOrDefault(this.tyk_1, 10));
            this.wyk_1 = this.uyk_1.w();
            this.hd_1 = 1;
            continue $sm;
          case 1:
            if (!this.wyk_1.f()) {
              this.hd_1 = 3;
              continue $sm;
            }

            this.xyk_1 = this.wyk_1.e();
            var tmp_3 = this;
            tmp_3.yyk_1 = this.xyk_1;
            this.zyk_1 = new BlobTransferJobItem('', this.yyk_1.pyi_1.vbw_1);
            this.ryk_1.jnj(new BlobTransferStatusUpdate(this.zyk_1, TransferJobItemStatus_IN_PROGRESS_getInstance().pj8_1));
            this.ayl_1 = this.oyk_1.jyi_1;
            this.byl_1 = randomUuidAsString();
            this.cyl_1 = Companion_getInstance_3().b2r(this.yyk_1.oyi_1.fne_1);
            this.dyl_1 = this.oyk_1.kyi_1.umj_1 + 'api/blob/upload-item';
            var tmp_4 = this;
            var this_0 = LinkedHashMap_init_$Create$();
            var tmp0_safe_receiver = this.yyk_1.oyi_1.ine_1;
            if (tmp0_safe_receiver == null)
              null;
            else {
              this_0.s('X-Blob-Response-' + 'Content-Type', listOf_0(tmp0_safe_receiver));
            }

            tmp_4.eyl_1 = asIStringValues(this_0.f3());
            this.hd_1 = 2;
            suspendResult = this.ayl_1.uo4(this.byl_1, this.cyl_1, this.dyl_1, VOID, VOID, SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$lambda(this.ryk_1, this.zyk_1), VOID, this.eyl_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.fyl_1 = suspendResult;
            var tmp_5 = this;
            var tmp5_elvis_lhs = this.fyl_1.qo4_1;
            var tmp_6;
            if (tmp5_elvis_lhs == null) {
              throw IllegalStateException_init_$Create$('SaveLocalUrisAsBlobUseCaseJs: no response body!');
            } else {
              tmp_6 = tmp5_elvis_lhs;
            }

            tmp_5.gyl_1 = tmp_6;
            this.ryk_1.jnj(new BlobTransferStatusUpdate(this.zyk_1, TransferJobItemStatus_COMPLETE_getInstance().pj8_1));
            this.hyl_1 = this.oyk_1.lyi_1.f45(Companion_instance_81.a4r(), this.gyl_1);
            Napier_getInstance().v5d('SaveLocalUrisAsBlobUseCaseJs: upload complete: ' + (this.yyk_1.oyi_1.fne_1 + ' stored as ' + this.hyl_1.fnd_1));
            this.iyl_1 = this.hyl_1.nne(this.yyk_1.oyi_1.gne_1, this.yyk_1.oyi_1.hne_1, this.yyk_1.oyi_1.fne_1);
            this.vyk_1.i1(this.iyl_1);
            this.hd_1 = 1;
            continue $sm;
          case 3:
            this.jyl_1 = this.vyk_1;
            this.hd_1 = 4;
            suspendResult = this.ryk_1.lnj(VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.syk_1 = this.jyl_1;
            this.id_1 = 8;
            this.hd_1 = 7;
            continue $sm;
          case 5:
            this.id_1 = 8;
            var tmp_7 = this.kd_1;
            if (tmp_7 instanceof Error) {
              this.kyl_1 = this.kd_1;
              Napier_getInstance().d5e('SaveLocalUriAsBlobUseCaseJs: exception uploading', this.kyl_1);
              this.hd_1 = 6;
              var tmp_8 = NonCancellable_getInstance();
              suspendResult = withContext(tmp_8, SaveLocalUrisAsBlobUseCaseJs$invoke$slambda$slambda_0(this.oyk_1, this.ryk_1, this.pyk_1, null), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 6:
            var tmp_9 = this;
            throw this.kyl_1;
          case 7:
            this.id_1 = 8;
            return this.syk_1;
          case 8:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 8) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda_1).v1m = function ($this$coroutineScope, completion) {
    var i = new SaveLocalUrisAsBlobUseCaseJs$invoke$slambda_1(this.oyk_1, this.pyk_1, completion);
    i.qyk_1 = $this$coroutineScope;
    return i;
  };
  function SaveLocalUrisAsBlobUseCaseJs$invoke$slambda_2(this$0, $uriToSaveQueueItems, resultContinuation) {
    var i = new SaveLocalUrisAsBlobUseCaseJs$invoke$slambda_1(this$0, $uriToSaveQueueItems, resultContinuation);
    var l = function ($this$coroutineScope, $completion) {
      return i.lyl($this$coroutineScope, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$70(_this__u8e3s4, localUrisToSave, onTransferJobItemCreated, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.uyl_1 = _this__u8e3s4;
    this.vyl_1 = localUrisToSave;
    this.wyl_1 = onTransferJobItemCreated;
  }
  protoOf($invokeCOROUTINE$70).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            suspendResult = withDoorTransactionAsync(this.uyl_1.myi_1, VOID, SaveLocalUrisAsBlobUseCaseJs$invoke$slambda_0(this.uyl_1, this.vyl_1, this.wyl_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.xyl_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = coroutineScope(SaveLocalUrisAsBlobUseCaseJs$invoke$slambda_2(this.uyl_1, this.xyl_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return suspendResult;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function SaveLocalUrisAsBlobUseCaseJs(chunkedUploadClientLocalUriUseCase, endpoint, json, db, updateTransferJobItemEtagUseCase) {
    updateTransferJobItemEtagUseCase = updateTransferJobItemEtagUseCase === VOID ? new UpdateTransferJobItemEtagUseCase() : updateTransferJobItemEtagUseCase;
    this.jyi_1 = chunkedUploadClientLocalUriUseCase;
    this.kyi_1 = endpoint;
    this.lyi_1 = json;
    this.myi_1 = db;
    this.nyi_1 = updateTransferJobItemEtagUseCase;
  }
  protoOf(SaveLocalUrisAsBlobUseCaseJs).one = function (localUrisToSave, onTransferJobItemCreated, $completion) {
    var tmp = new $invokeCOROUTINE$70(this, localUrisToSave, onTransferJobItemCreated, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function EnqueueSavePictureUseCaseJs$invoke$slambda(this$0, $entityUid, $tableId, $pictureUri, resultContinuation) {
    this.gym_1 = this$0;
    this.hym_1 = $entityUid;
    this.iym_1 = $tableId;
    this.jym_1 = $pictureUri;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(EnqueueSavePictureUseCaseJs$invoke$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(EnqueueSavePictureUseCaseJs$invoke$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(EnqueueSavePictureUseCaseJs$invoke$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.gym_1.lym_1.pne(this.hym_1, this.iym_1, this.jym_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(EnqueueSavePictureUseCaseJs$invoke$slambda).v1m = function ($this$launch, completion) {
    var i = new EnqueueSavePictureUseCaseJs$invoke$slambda(this.gym_1, this.hym_1, this.iym_1, this.jym_1, completion);
    i.kym_1 = $this$launch;
    return i;
  };
  function EnqueueSavePictureUseCaseJs$invoke$slambda_0(this$0, $entityUid, $tableId, $pictureUri, resultContinuation) {
    var i = new EnqueueSavePictureUseCaseJs$invoke$slambda(this$0, $entityUid, $tableId, $pictureUri, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function EnqueueSavePictureUseCaseJs(savePictureUseCase) {
    this.lym_1 = savePictureUseCase;
    this.mym_1 = CoroutineScope_0(Dispatchers_getInstance().p12_1.lj(Job()));
  }
  protoOf(EnqueueSavePictureUseCaseJs).pne = function (entityUid, tableId, pictureUri, $completion) {
    launch(this.mym_1, VOID, VOID, EnqueueSavePictureUseCaseJs$invoke$slambda_0(this, entityUid, tableId, pictureUri, null));
    return Unit_instance;
  };
  function SetClipboardStringUseCaseJs() {
  }
  protoOf(SetClipboardStringUseCaseJs).xnn = function (content) {
    try {
      navigator.clipboard.writeText(content);
    } catch ($p) {
      if ($p instanceof Error) {
        var e = $p;
      } else {
        throw $p;
      }
    }
  };
  function CompressImageUseCaseJs$invoke$lambda($fromUri, $completeable) {
    return function (it) {
      Napier_getInstance().v5d('CompressImageUseCaseJs: compressing ' + $fromUri + ' : success');
      $completeable.gy(it);
      return Unit_instance;
    };
  }
  function CompressImageUseCaseJs$invoke$lambda_0($fromUri, $completeable) {
    return function (it) {
      Napier_getInstance().d5e('CompressImageUseCaseJs: compressing ' + $fromUri + ' : error', it);
      $completeable.iy(it);
      return Unit_instance;
    };
  }
  function $invokeCOROUTINE$71(_this__u8e3s4, fromUri, toUri, params, onProgress, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.vym_1 = _this__u8e3s4;
    this.wym_1 = fromUri;
    this.xym_1 = toUri;
    this.yym_1 = params;
    this.zym_1 = onProgress;
  }
  protoOf($invokeCOROUTINE$71).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 6;
            this.ayn_1 = CompletableDeferred();
            Napier_getInstance().v5d('CompressImageUseCaseJs: compressing ' + this.wym_1);
            this.id_1 = 4;
            var tmp_0 = this;
            tmp_0.byn_1 = fetch(this.wym_1);
            this.hd_1 = 1;
            var this_0 = this.byn_1;
            suspendResult = await_0(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.cyn_1 = suspendResult;
            this.dyn_1 = this.cyn_1.blob();
            this.hd_1 = 2;
            var this_1 = this.dyn_1;
            suspendResult = await_0(this_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.eyn_1 = suspendResult;
            var this_2 = {};
            this_2.maxWidth = this.yym_1.ano_1;
            this_2.maxHeight = this.yym_1.bno_1;
            this_2.convertSize = 50000;
            this_2.convertTypes = ['image/png'];
            this_2.success = CompressImageUseCaseJs$invoke$lambda(this.wym_1, this.ayn_1);
            this_2.error = CompressImageUseCaseJs$invoke$lambda_0(this.wym_1, this.ayn_1);
            new com_ustadmobile_core_wrappers_compressorjs_default_j4zdfk(this.eyn_1, this_2);
            this.hd_1 = 3;
            suspendResult = this.ayn_1.nv(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            var compressedBlob = suspendResult;
            var resultUri = URL.createObjectURL(compressedBlob);
            return new CompressResult(resultUri, compressedBlob.type, numberToLong(this.eyn_1.size), numberToLong(compressedBlob.size));
          case 4:
            this.id_1 = 6;
            var tmp_1 = this.kd_1;
            if (tmp_1 instanceof Error) {
              var e = this.kd_1;
              Napier_getInstance().d5e('CompressImageUseCase: Exception caught: ', e);
              throw e;
            } else {
              throw this.kd_1;
            }

          case 5:
            this.id_1 = 6;
            return Unit_instance;
          case 6:
            throw this.kd_1;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 6) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  function CompressImageUseCaseJs() {
  }
  protoOf(CompressImageUseCaseJs).fyn = function (fromUri, toUri, params, onProgress, $completion) {
    var tmp = new $invokeCOROUTINE$71(this, fromUri, toUri, params, onProgress, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(CompressImageUseCaseJs).dno = function (fromUri, toUri, params, onProgress, $completion) {
    return this.fyn(fromUri, toUri, params, onProgress, $completion);
  };
  function Companion_179() {
    this.gyn_1 = 3;
  }
  var Companion_instance_227;
  function Companion_getInstance_196() {
    return Companion_instance_227;
  }
  function ContentEntryGetMetaDataFromUriUseCaseJs$invoke$lambda($onProgress) {
    return function (it) {
      $onProgress(new ContentEntryGetMetadataStatus(false, VOID, it.oo4_1, it.po4_1));
      return Unit_instance;
    };
  }
  function $invokeCOROUTINE$72(_this__u8e3s4, contentUri, fileName, endpoint, onProgress, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.pyn_1 = _this__u8e3s4;
    this.qyn_1 = contentUri;
    this.ryn_1 = fileName;
    this.syn_1 = endpoint;
    this.tyn_1 = onProgress;
  }
  protoOf($invokeCOROUTINE$72).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 9;
            this.uyn_1 = randomUuid().toString();
            this.hd_1 = 1;
            continue $sm;
          case 1:
            this.hd_1 = 2;
            continue $sm;
          case 2:
            this.id_1 = 8;
            this.wyn_1 = until(0, 3).w();
            this.hd_1 = 3;
            continue $sm;
          case 3:
            if (!this.wyn_1.f()) {
              this.hd_1 = 6;
              continue $sm;
            }

            this.xyn_1 = this.wyn_1.e();
            this.yyn_1 = this.pyn_1.cyo_1;
            this.zyn_1 = this.syn_1.umj_1 + 'api/contentupload/upload';
            var tmp_0 = this;
            var this_0 = LinkedHashMap_init_$Create$();
            if (!(this.ryn_1 == null)) {
              this_0.s('upload-original-filename', listOf_0(encodeURIComponent(this.ryn_1)));
            }

            tmp_0.ayo_1 = asIStringValues(this_0.f3());
            this.hd_1 = 4;
            var tmp_1 = new Long(0, 0);
            suspendResult = this.yyn_1.uo4(this.uyn_1, this.qyn_1, this.zyn_1, tmp_1, VOID, ContentEntryGetMetaDataFromUriUseCaseJs$invoke$lambda(this.tyn_1), VOID, this.ayo_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            var finalResponse = suspendResult;
            var tmp4_subject = finalResponse.ro4_1;
            if (tmp4_subject === 400) {
              var tmp5_elvis_lhs = finalResponse.qo4_1;
              throw new InvalidContentException(tmp5_elvis_lhs == null ? '' : tmp5_elvis_lhs);
            } else if (tmp4_subject === 406) {
              var tmp6_elvis_lhs = finalResponse.qo4_1;
              throw new UnsupportedContentException(tmp6_elvis_lhs == null ? '' : tmp6_elvis_lhs);
            }

            var tmp_2 = this;
            var tmp7_safe_receiver = finalResponse.qo4_1;
            var tmp_3;
            if (tmp7_safe_receiver == null) {
              tmp_3 = null;
            } else {
              tmp_3 = this.pyn_1.byo_1.f45(Companion_instance_80.a4r(), tmp7_safe_receiver);
            }

            var tmp8_elvis_lhs = tmp_3;
            var tmp_4;
            if (tmp8_elvis_lhs == null) {
              throw IllegalStateException_init_$Create$('Final response had no body');
            } else {
              tmp_4 = tmp8_elvis_lhs;
            }

            tmp_2.vyn_1 = tmp_4;
            this.id_1 = 9;
            this.hd_1 = 5;
            continue $sm;
          case 5:
            var tmp_5 = this.vyn_1;
            this.id_1 = 9;
            URL.revokeObjectURL(this.qyn_1.toString());
            return tmp_5;
          case 6:
            var tmp_6 = this;
            throw IllegalStateException_init_$Create$('Retried upload 3 times... failed.');
          case 7:
            this.id_1 = 9;
            URL.revokeObjectURL(this.qyn_1.toString());
            return Unit_instance;
          case 8:
            this.id_1 = 9;
            var t = this.kd_1;
            URL.revokeObjectURL(this.qyn_1.toString());
            throw t;
          case 9:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 9) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function ContentEntryGetMetaDataFromUriUseCaseJs(json, chunkedUploadClientLocalUriUseCase) {
    this.byo_1 = json;
    this.cyo_1 = chunkedUploadClientLocalUriUseCase;
  }
  protoOf(ContentEntryGetMetaDataFromUriUseCaseJs).mnp = function (contentUri, fileName, endpoint, onProgress, $completion) {
    var tmp = new $invokeCOROUTINE$72(this, contentUri, fileName, endpoint, onProgress, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function $invokeCOROUTINE$73(_this__u8e3s4, subtitleTrackUri, filename, locale, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.lyo_1 = _this__u8e3s4;
    this.myo_1 = subtitleTrackUri;
    this.nyo_1 = filename;
    this.oyo_1 = locale;
  }
  protoOf($invokeCOROUTINE$73).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 8;
            this.id_1 = 4;
            this.hd_1 = 1;
            suspendResult = fetch_0(toString(this.myo_1.d72_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.qyo_1 = suspendResult;
            this.ryo_1 = this.qyo_1.blob();
            this.hd_1 = 2;
            var this_0 = this.ryo_1;
            suspendResult = await_0(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.syo_1 = suspendResult;
            this.tyo_1 = this.syo_1.text();
            this.hd_1 = 3;
            var this_1 = this.tyo_1;
            suspendResult = await_0(this_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            this.pyo_1 = suspendResult;
            this.id_1 = 8;
            this.hd_1 = 5;
            continue $sm;
          case 4:
            this.id_1 = 8;
            var tmp_0 = this.kd_1;
            if (tmp_0 instanceof Error) {
              this.uyo_1 = this.kd_1;
              var tmp_1 = this;
              Napier_getInstance().d5e('GetSubtitleTrackFromUriUseCaseJs: exception fetching local uri ' + this.myo_1, this.uyo_1);
              throw IllegalStateException_init_$Create$_1('Failed to fetch blob for local uri ' + this.myo_1, this.uyo_1);
            } else {
              throw this.kd_1;
            }

          case 5:
            this.id_1 = 8;
            this.vyo_1 = this.pyo_1;
            var tmp_2 = this;
            tmp_2.wyo_1 = this.lyo_1.fyp_1;
            var tmp_3 = this;
            tmp_3.xyo_1 = this.lyo_1.eyp_1.umj_1 + 'api/contentupload/getsubtitletrack';
            var tmp_4 = this;
            tmp_4.yyo_1 = this.wyo_1;
            var tmp_5 = this;
            tmp_5.zyo_1 = this.yyo_1;
            var tmp_6 = this;
            var this_2 = new HttpRequestBuilder();
            url(this_2, this.xyo_1);
            parameter(this_2, 'filename', this.nyo_1);
            var tmp0_elvis_lhs = this.oyo_1;
            parameter(this_2, 'locale', tmp0_elvis_lhs == null ? this.lyo_1.hyp_1.so3_1 : tmp0_elvis_lhs);
            var body = new TextContent(this.vyo_1, Companion_getInstance_15().b2r('text/vtt; charset=utf-8'));
            if (body == null) {
              this_2.l38_1 = NullBody_instance;
              var tmp_7 = JsType_instance;
              var tmp_8 = getKClass(TextContent);
              var tmp_9;
              try {
                tmp_9 = createKType(getKClass(TextContent), arrayOf([]), false);
              } catch ($p) {
                var tmp_10;
                if ($p instanceof Error) {
                  var cause = $p;
                  tmp_10 = null;
                } else {
                  throw $p;
                }
                tmp_9 = tmp_10;
              }
              this_2.i3e(typeInfoImpl(tmp_7, tmp_8, tmp_9));
            } else {
              if (body instanceof OutgoingContent) {
                this_2.l38_1 = body;
                this_2.i3e(null);
              } else {
                this_2.l38_1 = body;
                var tmp_11 = JsType_instance;
                var tmp_12 = getKClass(TextContent);
                var tmp_13;
                try {
                  tmp_13 = createKType(getKClass(TextContent), arrayOf([]), false);
                } catch ($p) {
                  var tmp_14;
                  if ($p instanceof Error) {
                    var cause_0 = $p;
                    tmp_14 = null;
                  } else {
                    throw $p;
                  }
                  tmp_13 = tmp_14;
                }
                this_2.i3e(typeInfoImpl(tmp_11, tmp_12, tmp_13));
              }
            }

            tmp_6.ayp_1 = this_2;
            this.ayp_1.j38_1 = Companion_getInstance().z2w_1;
            var tmp_15 = this;
            tmp_15.byp_1 = this.zyo_1;
            var tmp_16 = this;
            tmp_16.cyp_1 = this.ayp_1;
            this.hd_1 = 6;
            suspendResult = (new HttpStatement(this.cyp_1, this.byp_1)).u3y(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            this.dyp_1 = suspendResult;
            this.hd_1 = 7;
            suspendResult = bodyAsText(this.dyp_1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 7:
            var subtitleJsonStr = suspendResult;
            return this.lyo_1.gyp_1.f45(Companion_instance_79.a4r(), subtitleJsonStr);
          case 8:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 8) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function GetSubtitleTrackFromUriUseCaseJs(endpoint, httpClient, json, supportedLanguagesConfig) {
    this.eyp_1 = endpoint;
    this.fyp_1 = httpClient;
    this.gyp_1 = json;
    this.hyp_1 = supportedLanguagesConfig;
  }
  protoOf(GetSubtitleTrackFromUriUseCaseJs).ynp = function (subtitleTrackUri, filename, locale, $completion) {
    var tmp = new $invokeCOROUTINE$73(this, subtitleTrackUri, filename, locale, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function LaunchXapiUseCaseJs$invoke$lambda($resolveResult) {
    return function () {
      return 'LaunchXapiUseCaseJs: launching xapi in new windows: ' + $resolveResult.vns_1;
    };
  }
  function LaunchXapiUseCaseJs$invoke$lambda_0($resolveResult) {
    return function () {
      return 'LaunchXapiUseCaseJs: navigating to: ' + $resolveResult.vns_1;
    };
  }
  function $invokeCOROUTINE$74(_this__u8e3s4, contentEntryVersion, navController, clazzUid, cbUid, target, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.qyp_1 = _this__u8e3s4;
    this.ryp_1 = contentEntryVersion;
    this.syp_1 = navController;
    this.typ_1 = clazzUid;
    this.uyp_1 = cbUid;
    this.vyp_1 = target;
  }
  protoOf($invokeCOROUTINE$74).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.qyp_1.wyp_1.cnw(this.ryp_1.daj_1, this.typ_1, this.uyp_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var resolveResult = suspendResult;
            if (!this.vyp_1.equals(LinkTarget_TOP_getInstance())) {
              var tmp_0 = Napier_getInstance();
              tmp_0.x5d(VOID, VOID, LaunchXapiUseCaseJs$invoke$lambda(resolveResult));
              window.open(resolveResult.vns_1, asWindowTarget(this.vyp_1), 'popup=true,noopener,noreferrer');
            } else {
              var tmp_1 = Napier_getInstance();
              tmp_1.x5d(VOID, VOID, LaunchXapiUseCaseJs$invoke$lambda_0(resolveResult));
              location.href = resolveResult.vns_1;
            }

            return new LaunchResult();
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function LaunchXapiUseCaseJs(resolveXapiLaunchHrefUseCase) {
    this.wyp_1 = resolveXapiLaunchHrefUseCase;
  }
  protoOf(LaunchXapiUseCaseJs).rns = function (contentEntryVersion, navController, clazzUid, cbUid, target, $completion) {
    var tmp = new $invokeCOROUTINE$74(this, contentEntryVersion, navController, clazzUid, cbUid, target, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(LaunchXapiUseCaseJs).tns = function (contentEntryVersion, navController, clazzUid, cbUid, target, $completion) {
    return this.rns(contentEntryVersion, navController, clazzUid, cbUid, target, $completion);
  };
  function SetLanguageUseCaseJs(languagesConfig) {
    this.xyp_1 = languagesConfig;
  }
  protoOf(SetLanguageUseCaseJs).vnz = function (uiLang, currentDestination, navController, navArgs) {
    var currentDisplayLang = this.xyp_1.so3_1;
    this.xyp_1.som(uiLang.ioj_1);
    var newDisplayLang = this.xyp_1.so3_1;
    if (!(currentDisplayLang === newDisplayLang)) {
      location.reload();
    }
    return new SetLangResult(false);
  };
  function OpenExternalLinkUseCaseJs() {
  }
  protoOf(OpenExternalLinkUseCaseJs).eo0 = function (url, target) {
    window.open(url, asWindowTarget(target));
  };
  function BulkAddPersonsFromLocalUriUseCaseJs$invoke$slambda(this$0, $text, $accountPersonUid, $onProgress, resultContinuation) {
    this.gyq_1 = this$0;
    this.hyq_1 = $text;
    this.iyq_1 = $accountPersonUid;
    this.jyq_1 = $onProgress;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(BulkAddPersonsFromLocalUriUseCaseJs$invoke$slambda).hyr = function ($this$coroutineScope, $completion) {
    var tmp = this.v1m($this$coroutineScope, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(BulkAddPersonsFromLocalUriUseCaseJs$invoke$slambda).he = function (p1, $completion) {
    return this.hyr((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(BulkAddPersonsFromLocalUriUseCaseJs$invoke$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 11;
            var tmp_0 = this;
            tmp_0.lyq_1 = this.gyq_1.iyr_1;
            var tmp_1 = this;
            tmp_1.myq_1 = this.gyq_1.jyr_1.umj_1 + 'api/person/bulkadd/enqueue';
            var tmp_2 = this;
            tmp_2.nyq_1 = this.lyq_1;
            var tmp_3 = this;
            tmp_3.oyq_1 = this.nyq_1;
            var tmp_4 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.myq_1);
            var body = new TextContent(this.hyq_1, Text_getInstance().d2s_1);
            if (body == null) {
              this_0.l38_1 = NullBody_instance;
              var tmp_5 = JsType_instance;
              var tmp_6 = getKClass(TextContent);
              var tmp_7;
              try {
                tmp_7 = createKType(getKClass(TextContent), arrayOf([]), false);
              } catch ($p) {
                var tmp_8;
                if ($p instanceof Error) {
                  var cause = $p;
                  tmp_8 = null;
                } else {
                  throw $p;
                }
                tmp_7 = tmp_8;
              }
              this_0.i3e(typeInfoImpl(tmp_5, tmp_6, tmp_7));
            } else {
              if (body instanceof OutgoingContent) {
                this_0.l38_1 = body;
                this_0.i3e(null);
              } else {
                this_0.l38_1 = body;
                var tmp_9 = JsType_instance;
                var tmp_10 = getKClass(TextContent);
                var tmp_11;
                try {
                  tmp_11 = createKType(getKClass(TextContent), arrayOf([]), false);
                } catch ($p) {
                  var tmp_12;
                  if ($p instanceof Error) {
                    var cause_0 = $p;
                    tmp_12 = null;
                  } else {
                    throw $p;
                  }
                  tmp_11 = tmp_12;
                }
                this_0.i3e(typeInfoImpl(tmp_9, tmp_10, tmp_11));
              }
            }

            parameter(this_0, 'accountPersonUid', this.iyq_1.toString());
            var tmp_13 = this.gyq_1.lyr_1;
            doorNodeAndVersionHeaders(this_0, isInterface(tmp_13, DoorDatabaseRepository) ? tmp_13 : THROW_CCE());
            tmp_4.pyq_1 = this_0;
            this.pyq_1.j38_1 = Companion_getInstance().z2w_1;
            var tmp_14 = this;
            tmp_14.qyq_1 = this.oyq_1;
            var tmp_15 = this;
            tmp_15.ryq_1 = this.pyq_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.ryq_1, this.qyq_1)).u3y(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.syq_1 = suspendResult;
            this.hd_1 = 2;
            suspendResult = bodyAsText(this.syq_1, VOID, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.tyq_1 = suspendResult;
            this.uyq_1 = toLong_0(this.tyq_1);
            this.hd_1 = 3;
            continue $sm;
          case 3:
            if (!get_isActive(this.kyq_1)) {
              this.hd_1 = 10;
              continue $sm;
            }

            this.id_1 = 7;
            var tmp_16 = this;
            tmp_16.vyq_1 = this.gyq_1.iyr_1;
            var tmp_17 = this;
            tmp_17.wyq_1 = this.gyq_1.jyr_1.umj_1 + 'api/person/bulkadd/status';
            var tmp_18 = this;
            tmp_18.xyq_1 = this.vyq_1;
            var tmp_19 = this;
            tmp_19.yyq_1 = this.xyq_1;
            var tmp_20 = this;
            var this_1 = new HttpRequestBuilder();
            url(this_1, this.wyq_1);
            parameter(this_1, 'timestamp', this.uyq_1.toString());
            tmp_20.zyq_1 = this_1;
            this.zyq_1.j38_1 = Companion_getInstance().y2w_1;
            var tmp_21 = this;
            tmp_21.ayr_1 = this.yyq_1;
            var tmp_22 = this;
            tmp_22.byr_1 = this.zyq_1;
            this.hd_1 = 4;
            suspendResult = (new HttpStatement(this.byr_1, this.ayr_1)).u3y(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 4:
            this.cyr_1 = suspendResult;
            if (this.cyr_1.w3a().s2z_1 === 200) {
              var tmp_23 = this;
              tmp_23.dyr_1 = this.gyq_1.kyr_1;
              this.hd_1 = 5;
              suspendResult = bodyAsText(this.cyr_1, VOID, this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            } else {
              this.hd_1 = 6;
              continue $sm;
            }

          case 5:
            this.eyr_1 = suspendResult;
            var tmp_24 = this;
            var this_2 = this.dyr_1.g45();
            var this_3 = serializer(this_2, createKType(getKClass(BulkAddPersonRunImportUiState), arrayOf([]), false));
            tmp_24.fyr_1 = this.dyr_1.f45(isInterface(this_3, KSerializer) ? this_3 : THROW_CCE(), this.eyr_1);
            if (this.fyr_1.gwm_1) {
              this.jyq_1.pwm(this.fyr_1.iwm_1, this.fyr_1.hwm_1);
            } else {
              if (this.fyr_1.ns3()) {
                throw new BulkAddPersonException(this.fyr_1.kwm_1, this.fyr_1.jwm_1);
              }
              return new BulkAddUsersResult(this.fyr_1.iwm_1);
            }

            this.hd_1 = 6;
            continue $sm;
          case 6:
            this.id_1 = 11;
            this.hd_1 = 8;
            continue $sm;
          case 7:
            this.id_1 = 11;
            var tmp_25 = this.kd_1;
            if (tmp_25 instanceof Error) {
              this.gyr_1 = this.kd_1;
              Napier_getInstance().z5d('BulkAddPersonFromLocalUriUseCaseJs exception', this.gyr_1);
              var tmp_26 = this.gyr_1;
              if (tmp_26 instanceof BulkAddPersonException)
                throw this.gyr_1;
              this.hd_1 = 8;
              continue $sm;
            } else {
              throw this.kd_1;
            }

          case 8:
            this.id_1 = 11;
            this.hd_1 = 9;
            suspendResult = delay(new Long(1000, 0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 9:
            this.hd_1 = 3;
            continue $sm;
          case 10:
            throw IllegalStateException_init_$Create$('Should not get here');
          case 11:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 11) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(BulkAddPersonsFromLocalUriUseCaseJs$invoke$slambda).v1m = function ($this$coroutineScope, completion) {
    var i = new BulkAddPersonsFromLocalUriUseCaseJs$invoke$slambda(this.gyq_1, this.hyq_1, this.iyq_1, this.jyq_1, completion);
    i.kyq_1 = $this$coroutineScope;
    return i;
  };
  function BulkAddPersonsFromLocalUriUseCaseJs$invoke$slambda_0(this$0, $text, $accountPersonUid, $onProgress, resultContinuation) {
    var i = new BulkAddPersonsFromLocalUriUseCaseJs$invoke$slambda(this$0, $text, $accountPersonUid, $onProgress, resultContinuation);
    var l = function ($this$coroutineScope, $completion) {
      return i.hyr($this$coroutineScope, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function $invokeCOROUTINE$75(_this__u8e3s4, uri, accountPersonUid, onProgress, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.uyr_1 = _this__u8e3s4;
    this.vyr_1 = uri;
    this.wyr_1 = accountPersonUid;
    this.xyr_1 = onProgress;
  }
  protoOf($invokeCOROUTINE$75).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 4;
            console.log('Getting csv text');
            this.hd_1 = 1;
            suspendResult = fetch_0(this.vyr_1.toString(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.yyr_1 = suspendResult;
            this.zyr_1 = this.yyr_1.text();
            this.hd_1 = 2;
            var this_0 = this.zyr_1;
            suspendResult = await_0(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.ays_1 = suspendResult;
            console.log('csv text = ' + this.ays_1);
            this.hd_1 = 3;
            suspendResult = coroutineScope(BulkAddPersonsFromLocalUriUseCaseJs$invoke$slambda_0(this.uyr_1, this.ays_1, this.wyr_1, this.xyr_1, null), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            return suspendResult;
          case 4:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 4) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function BulkAddPersonsFromLocalUriUseCaseJs(httpClient, endpoint, json, repo) {
    this.iyr_1 = httpClient;
    this.jyr_1 = endpoint;
    this.kyr_1 = json;
    this.lyr_1 = repo;
  }
  protoOf(BulkAddPersonsFromLocalUriUseCaseJs).to2 = function (uri, accountPersonUid, onProgress, $completion) {
    var tmp = new $invokeCOROUTINE$75(this, uri, accountPersonUid, onProgress, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function OnClickPhoneNumUseCaseJs() {
  }
  protoOf(OnClickPhoneNumUseCaseJs).xnn = function (number) {
    var tmp = window;
    var tmp_0 = 'tel:' + number;
    // Inline function 'web.window.WindowTarget.Companion._blank' call
    0;
    tmp.open(tmp_0, '_blank');
  };
  function PhoneNumValidatorUseCaseJs() {
  }
  protoOf(PhoneNumValidatorUseCaseJs).zo2 = function (phoneNumber) {
    var tmp;
    try {
      tmp = parsePhoneNumber(phoneNumber, null, null).isValid();
    } catch ($p) {
      var tmp_0;
      if ($p instanceof Error) {
        var e = $p;
        tmp_0 = false;
      } else {
        throw $p;
      }
      tmp = tmp_0;
    }
    return tmp;
  };
  function PhoneNumberJs(phoneNumber) {
    this.bys_1 = phoneNumber;
  }
  function PhoneNumberUtilJs() {
  }
  protoOf(PhoneNumberUtilJs).xo2 = function (numberToParse, defaultRegion) {
    return new PhoneNumberJs(parsePhoneNumber(numberToParse, defaultRegion, null));
  };
  protoOf(PhoneNumberUtilJs).yo2 = function (number) {
    return (number instanceof PhoneNumberJs ? number : THROW_CCE()).bys_1.formatInternational();
  };
  function OnClickSendEmailUseCaseJs() {
  }
  protoOf(OnClickSendEmailUseCaseJs).xnn = function (emailAddr) {
    var tmp = window;
    var tmp_0 = 'mailto:' + emailAddr;
    // Inline function 'web.window.WindowTarget.Companion._blank' call
    0;
    tmp.open(tmp_0, '_blank');
  };
  function DeleteUrisUseCaseJs$invoke$lambda($uri) {
    return function () {
      return 'DeleteUrisUseCase: deleting (revoking) ' + $uri;
    };
  }
  function DeleteUrisUseCaseJs(isTempFileCheckerUseCase) {
    this.cys_1 = isTempFileCheckerUseCase;
  }
  protoOf(DeleteUrisUseCaseJs).rng = function (uris, onlyIfTemp, $completion) {
    // Inline function 'kotlin.collections.forEach' call
    var tmp0_iterator = uris.w();
    while (tmp0_iterator.f()) {
      var element = tmp0_iterator.e();
      // Inline function 'com.ustadmobile.core.domain.tmpfiles.DeleteUrisUseCaseJs.invoke.<anonymous>' call
      if (!onlyIfTemp ? true : this.cys_1.vnv(element)) {
        var tmp = Napier_getInstance();
        tmp.x5d(VOID, VOID, DeleteUrisUseCaseJs$invoke$lambda(element));
        URL.revokeObjectURL(element);
      }
    }
    return Unit_instance;
  };
  function IsTempFileCheckerUseCaseJs() {
  }
  protoOf(IsTempFileCheckerUseCaseJs).vnv = function (uri) {
    return startsWith(uri, 'blob:');
  };
  function ChunkedUploadClientLocalUriUseCaseJs$invoke$lambda($logPrefix, $index, $chunkInfo) {
    return function () {
      return $logPrefix + ' : upload chunk #' + ($index + 1 | 0) + '/' + $chunkInfo.jo4_1;
    };
  }
  function ChunkedUploadClientLocalUriUseCaseJs$invoke$lambda_0($logPrefix, $index, $chunkInfo) {
    return function () {
      return $logPrefix + ' : upload chunk #' + ($index + 1 | 0) + '/' + $chunkInfo.jo4_1 + ' complete ';
    };
  }
  function $invokeCOROUTINE$76(_this__u8e3s4, uploadUuid, localUri, remoteUrl, fromByte, chunkSize, onProgress, onStatusChange, lastChunkHeaders, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.lys_1 = _this__u8e3s4;
    this.mys_1 = uploadUuid;
    this.nys_1 = localUri;
    this.oys_1 = remoteUrl;
    this.pys_1 = fromByte;
    this.qys_1 = chunkSize;
    this.rys_1 = onProgress;
    this.sys_1 = onStatusChange;
    this.tys_1 = lastChunkHeaders;
  }
  protoOf($invokeCOROUTINE$76).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 14;
            this.uys_1 = 'ChunkedUploadClientLocalUriUseCaseJs (' + this.mys_1 + ') : ' + this.nys_1 + ' -> ' + this.oys_1 + ':';
            this.id_1 = 13;
            Napier_getInstance().v5d(this.uys_1 + ' : starting');
            this.id_1 = 3;
            this.hd_1 = 1;
            suspendResult = fetch_0(toString(this.nys_1.d72_1), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.wys_1 = suspendResult;
            this.xys_1 = this.wys_1.blob();
            this.hd_1 = 2;
            var this_0 = this.xys_1;
            suspendResult = await_0(this_0, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            this.vys_1 = suspendResult;
            this.id_1 = 13;
            this.hd_1 = 4;
            continue $sm;
          case 3:
            this.id_1 = 13;
            var tmp_0 = this.kd_1;
            if (tmp_0 instanceof Error) {
              this.yys_1 = this.kd_1;
              var tmp_1 = this;
              Napier_getInstance().d5e(this.uys_1 + ' exception fetching local uri ' + this.nys_1, this.yys_1);
              throw IllegalStateException_init_$Create$_1(this.uys_1 + ': failed to fetch blob for local uri ' + this.nys_1.d72_1, this.yys_1);
            } else {
              throw this.kd_1;
            }

          case 4:
            this.id_1 = 13;
            this.zys_1 = this.vys_1;
            this.ayt_1 = this.zys_1.size;
            if (this.ayt_1 <= 0.0)
              throw IllegalArgumentException_init_$Create$('Upload size <= 0');
            this.byt_1 = new ChunkInfo(numberToLong(this.ayt_1), this.qys_1, this.pys_1);
            if (this.ayt_1 >= IntCompanionObject_instance.MAX_VALUE)
              throw IllegalArgumentException_init_$Create$('JS: upload size(' + numberToLong(this.ayt_1).toString() + ') > ' + IntCompanionObject_instance.MAX_VALUE + ' not supported');
            this.sys_1(TransferJobItemStatus_IN_PROGRESS_getInstance());
            var tmp_2 = this;
            tmp_2.cyt_1 = this.byt_1;
            this.dyt_1 = 0;
            this.eyt_1 = this.cyt_1.w();
            this.hd_1 = 5;
            continue $sm;
          case 5:
            if (!this.eyt_1.f()) {
              this.hd_1 = 12;
              continue $sm;
            }

            this.fyt_1 = this.eyt_1.e();
            var tmp_3 = this;
            var tmp1 = this.dyt_1;
            this.dyt_1 = tmp1 + 1 | 0;
            tmp_3.gyt_1 = checkIndexOverflow(tmp1);
            var tmp_4 = this;
            tmp_4.hyt_1 = this.fyt_1;
            var tmp_5 = Napier_getInstance();
            tmp_5.r5d(VOID, VOID, ChunkedUploadClientLocalUriUseCaseJs$invoke$lambda(this.uys_1, this.gyt_1, this.byt_1));
            this.iyt_1 = this.zys_1.slice(this.hyt_1.ko4_1.a7(), this.hyt_1.lo4_1.a7());
            this.id_1 = 7;
            var tmp_6 = this;
            var this_1 = {};
            this_1.body = this.iyt_1;
            this_1.method = 'POST';
            var this_2 = new Headers();
            this_2.set(get_HEADER_UPLOAD_UUID(), this.mys_1);
            this_2.set(get_HEADER_IS_FINAL_CHUNK(), this.hyt_1.mo4_1.toString());
            this_2.set(get_HEADER_UPLOAD_START_BYTE(), this.hyt_1.ko4_1.toString());
            if (this.hyt_1.mo4_1 ? !(this.tys_1 == null) : false) {
              var tmp0_iterator = this.tys_1.b2n().w();
              while (tmp0_iterator.f()) {
                var element = tmp0_iterator.e();
                var tmp0_iterator_0 = this.tys_1.a2n(element).w();
                while (tmp0_iterator_0.f()) {
                  var element_0 = tmp0_iterator_0.e();
                  this_2.append(element, element_0);
                }
              }
            }

            this_1.headers = this_2;
            tmp_6.kyt_1 = fetch(this.oys_1, this_1);
            this.hd_1 = 6;
            var this_3 = this.kyt_1;
            suspendResult = await_0(this_3, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 6:
            this.jyt_1 = suspendResult;
            this.id_1 = 13;
            this.hd_1 = 8;
            continue $sm;
          case 7:
            this.id_1 = 13;
            var tmp_7 = this.kd_1;
            if (tmp_7 instanceof Error) {
              this.lyt_1 = this.kd_1;
              var tmp_8 = this;
              Napier_getInstance().d5e(this.uys_1 + ' exception fetching response for blob upload ' + ('fromByte=' + this.byt_1.ho4_1.toString()), this.lyt_1);
              throw IllegalStateException_init_$Create$_1(this.uys_1 + ' exception fetching response for blob upload ', this.lyt_1);
            } else {
              throw this.kd_1;
            }

          case 8:
            this.id_1 = 13;
            this.myt_1 = this.jyt_1;
            var tmp_9 = Napier_getInstance();
            tmp_9.r5d(VOID, VOID, ChunkedUploadClientLocalUriUseCaseJs$invoke$lambda_0(this.uys_1, this.gyt_1, this.byt_1));
            this.rys_1(new UploadProgress(this.hyt_1.lo4_1, numberToLong(this.ayt_1)));
            if (this.hyt_1.mo4_1) {
              this.sys_1(TransferJobItemStatus_COMPLETE_getInstance());
              Napier_getInstance().v5d(this.uys_1 + ': Complete!');
              if (!(this.myt_1.status === 204)) {
                var tmp_10 = this;
                tmp_10.oyt_1 = this.myt_1.text();
                this.hd_1 = 10;
                var this_4 = this.oyt_1;
                suspendResult = await_0(this_4, this);
                if (suspendResult === get_COROUTINE_SUSPENDED()) {
                  return suspendResult;
                }
                continue $sm;
              } else {
                var tmp_11 = this;
                tmp_11.nyt_1 = null;
                this.hd_1 = 11;
                continue $sm;
              }
            } else {
              this.hd_1 = 9;
              continue $sm;
            }

          case 9:
            this.hd_1 = 5;
            continue $sm;
          case 10:
            this.nyt_1 = suspendResult;
            this.hd_1 = 11;
            continue $sm;
          case 11:
            var ARGUMENT = this.nyt_1;
            return new LastChunkResponse(ARGUMENT, this.myt_1.status, asIStringValues_0(this.myt_1.headers));
          case 12:
            throw IllegalStateException_init_$Create$(this.uys_1 + ' should have returned with last chunk');
          case 13:
            this.id_1 = 14;
            var tmp_12 = this.kd_1;
            if (tmp_12 instanceof Error) {
              var e = this.kd_1;
              Napier_getInstance().d5e(this.uys_1 + ', ChunkedUploadClientLocalUriUseCaseJs: Exception', e);
              this.sys_1(TransferJobItemStatus_FAILED_getInstance());
              throw e;
            } else {
              throw this.kd_1;
            }

          case 14:
            throw this.kd_1;
          case 15:
            this.id_1 = 14;
            return Unit_instance;
        }
      } catch ($p) {
        var e_0 = $p;
        if (this.id_1 === 14) {
          throw e_0;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e_0;
        }
      }
     while (true);
  };
  function ChunkedUploadClientLocalUriUseCaseJs() {
  }
  protoOf(ChunkedUploadClientLocalUriUseCaseJs).to4 = function (uploadUuid, localUri, remoteUrl, fromByte, chunkSize, onProgress, onStatusChange, lastChunkHeaders, $completion) {
    var tmp = new $invokeCOROUTINE$76(this, uploadUuid, localUri, remoteUrl, fromByte, chunkSize, onProgress, onStatusChange, lastChunkHeaders, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function SaveStatementOnClearUseCaseJs$invoke$slambda(this$0, $statements, $xapiSession, resultContinuation) {
    this.xyt_1 = this$0;
    this.yyt_1 = $statements;
    this.zyt_1 = $xapiSession;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(SaveStatementOnClearUseCaseJs$invoke$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(SaveStatementOnClearUseCaseJs$invoke$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(SaveStatementOnClearUseCaseJs$invoke$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.xyt_1.byu_1.on7(this.yyt_1, this.zyt_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(SaveStatementOnClearUseCaseJs$invoke$slambda).v1m = function ($this$launch, completion) {
    var i = new SaveStatementOnClearUseCaseJs$invoke$slambda(this.xyt_1, this.yyt_1, this.zyt_1, completion);
    i.ayu_1 = $this$launch;
    return i;
  };
  function SaveStatementOnClearUseCaseJs$invoke$slambda_0(this$0, $statements, $xapiSession, resultContinuation) {
    var i = new SaveStatementOnClearUseCaseJs$invoke$slambda(this$0, $statements, $xapiSession, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function SaveStatementOnClearUseCaseJs(xapiStatementResource) {
    this.byu_1 = xapiStatementResource;
  }
  protoOf(SaveStatementOnClearUseCaseJs).ioi = function (statements, xapiSession) {
    var tmp = GlobalScope_instance;
    launch(tmp, VOID, VOID, SaveStatementOnClearUseCaseJs$invoke$slambda_0(this, statements, xapiSession, null));
  };
  function SaveStatementOnUnloadUseCaseJs(endpoint, json) {
    this.cyu_1 = endpoint;
    this.dyu_1 = json;
  }
  protoOf(SaveStatementOnUnloadUseCaseJs).ioi = function (statements, xapiSession) {
    var tmp = navigator;
    var tmp_0 = this.cyu_1.umj_1 + 'api/xapi-ext/statementOnUnload';
    // Inline function 'web.http.BodyInit' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    var tmp$ret$2 = this.dyu_1.e45(Companion_getInstance_82().a4r(), new XapiStatementsAndSession(statements, xapiSession));
    tmp.sendBeacon(tmp_0, tmp$ret$2);
  };
  function $invokeCOROUTINE$77(_this__u8e3s4, accountPersonUid, actor, activityId, clazzUid, cbUid, contentEntryUid, contentEntryVersionUid, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.myu_1 = _this__u8e3s4;
    this.nyu_1 = accountPersonUid;
    this.oyu_1 = actor;
    this.pyu_1 = activityId;
    this.qyu_1 = clazzUid;
    this.ryu_1 = cbUid;
    this.syu_1 = contentEntryUid;
    this.tyu_1 = contentEntryVersionUid;
  }
  protoOf($invokeCOROUTINE$77).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            var tmp_0 = this;
            tmp_0.uyu_1 = this.myu_1.dyv_1;
            var tmp_1 = this;
            tmp_1.vyu_1 = this.myu_1.cyv_1.umj_1 + 'api/xapi-ext/resumeOrStartSession';
            var tmp_2 = this;
            tmp_2.wyu_1 = this.uyu_1;
            var tmp_3 = this;
            tmp_3.xyu_1 = this.wyu_1;
            var tmp_4 = this;
            var this_0 = new HttpRequestBuilder();
            url(this_0, this.vyu_1);
            var tmp_5 = this.myu_1.eyv_1;
            doorNodeIdHeader(this_0, isInterface(tmp_5, DoorDatabaseRepository) ? tmp_5 : THROW_CCE());
            parameter(this_0, 'accountPersonUid', this.nyu_1.toString());
            parameter(this_0, 'actor', this.myu_1.fyv_1.e45(Companion_instance_99.a4r(), this.oyu_1));
            parameter(this_0, 'activityId', this.pyu_1);
            parameter(this_0, 'clazzUid', this.qyu_1.toString());
            parameter(this_0, 'cbUid', this.ryu_1.toString());
            parameter(this_0, 'contentEntryUid', this.syu_1.toString());
            parameter(this_0, 'contentEntryVersionUid', this.tyu_1.toString());
            tmp_4.yyu_1 = this_0;
            this.yyu_1.j38_1 = Companion_getInstance().z2w_1;
            var tmp_6 = this;
            tmp_6.zyu_1 = this.xyu_1;
            var tmp_7 = this;
            tmp_7.ayv_1 = this.yyu_1;
            this.hd_1 = 1;
            suspendResult = (new HttpStatement(this.ayv_1, this.zyu_1)).u3y(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.byv_1 = suspendResult;
            this.hd_1 = 2;
            var tmp_8 = this.byv_1.r3b();
            var tmp_9 = JsType_instance;
            var tmp_10 = getKClass(XapiSessionEntity);
            var tmp_11;
            try {
              tmp_11 = createKType(getKClass(XapiSessionEntity), arrayOf([]), false);
            } catch ($p) {
              var tmp_12;
              if ($p instanceof Error) {
                var cause = $p;
                tmp_12 = null;
              } else {
                throw $p;
              }
              tmp_11 = tmp_12;
            }

            suspendResult = tmp_8.u3a(typeInfoImpl(tmp_9, tmp_10, tmp_11), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            var result = suspendResult instanceof XapiSessionEntity ? suspendResult : THROW_CCE();
            return result;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function ResumeOrStartXapiSessionUseCaseJs(endpoint, httpClient, repo, xapiJson) {
    this.cyv_1 = endpoint;
    this.dyv_1 = httpClient;
    this.eyv_1 = repo;
    this.fyv_1 = xapiJson.ko7_1;
  }
  protoOf(ResumeOrStartXapiSessionUseCaseJs).unv = function (accountPersonUid, actor, activityId, clazzUid, cbUid, contentEntryUid, contentEntryVersionUid, $completion) {
    var tmp = new $invokeCOROUTINE$77(this, accountPersonUid, actor, activityId, clazzUid, cbUid, contentEntryUid, contentEntryVersionUid, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function XXHasher64FactoryJs() {
  }
  protoOf(XXHasher64FactoryJs).bog = function (seed) {
    var hasher = XXH.h64();
    hasher.init(seed);
    return new XXHasher64Js(hasher);
  };
  function XXHasher64Js(hasher64) {
    this.gyv_1 = hasher64;
  }
  protoOf(XXHasher64Js).cog = function (data) {
    // Inline function 'js.typedarrays.toUint8Array' call
    // Inline function 'js.typedarrays.asInt8Array' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    var array = data;
    var array_0 = new Uint8Array(array.buffer, array.byteOffset, array.length);
    this.gyv_1.update(array_0.buffer);
  };
  protoOf(XXHasher64Js).dog = function () {
    var digestStr = this.gyv_1.digest().toString(10);
    // Inline function 'kotlin.ULong.toLong' call
    var this_0 = toULong(digestStr);
    return _ULong___get_data__impl__fggpzb(this_0);
  };
  function XXStringHasherJs() {
  }
  protoOf(XXStringHasherJs).vod = function (string) {
    // Inline function 'js.typedarrays.toUint8Array' call
    var tmp$ret$0;
    $l$block: {
      // Inline function 'io.ktor.utils.io.core.toByteArray' call
      var charset = Charsets_getInstance().m2h_1;
      if (charset.equals(Charsets_getInstance().m2h_1)) {
        tmp$ret$0 = encodeToByteArray(string);
        break $l$block;
      }
      tmp$ret$0 = encodeToByteArray_0(charset.q2h(), string, 0, string.length);
    }
    // Inline function 'js.typedarrays.asInt8Array' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    var array = tmp$ret$0;
    var array_0 = new Uint8Array(array.buffer, array.byteOffset, array.length);
    var hash = XXH.h64(array_0.buffer, 0).toString(10);
    // Inline function 'kotlin.ULong.toLong' call
    var this_0 = toULong(hash);
    return _ULong___get_data__impl__fggpzb(this_0);
  };
  function collectAsState(_this__u8e3s4, initialState, dispatcher) {
    dispatcher = dispatcher === VOID ? Dispatchers_getInstance().t12() : dispatcher;
    var state = useState_0(collectAsState$lambda(initialState));
    // Inline function 'kotlin.arrayOf' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    var tmp = [_this__u8e3s4, dispatcher].slice();
    useEffect(tmp, collectAsState$lambda_0(dispatcher, _this__u8e3s4, state));
    return state;
  }
  function collectAsState$lambda($initialState) {
    return function () {
      return $initialState;
    };
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_36(function_0) {
    this.hyv_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_36).t1d = function (value, $completion) {
    return this.hyv_1(value, $completion);
  };
  function collectAsState$lambda$slambda$slambda($state, resultContinuation) {
    this.qyv_1 = $state;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(collectAsState$lambda$slambda$slambda).e1o = function (it, $completion) {
    var tmp = this.f1o(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(collectAsState$lambda$slambda$slambda).he = function (p1, $completion) {
    return this.e1o((p1 == null ? true : !(p1 == null)) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(collectAsState$lambda$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          this.qyv_1[1](this.ryv_1);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(collectAsState$lambda$slambda$slambda).f1o = function (it, completion) {
    var i = new collectAsState$lambda$slambda$slambda(this.qyv_1, completion);
    i.ryv_1 = it;
    return i;
  };
  function collectAsState$lambda$slambda$slambda_0($state, resultContinuation) {
    var i = new collectAsState$lambda$slambda$slambda($state, resultContinuation);
    var l = function (it, $completion) {
      return i.e1o(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function collectAsState$lambda$slambda($this_collectAsState, $state, resultContinuation) {
    this.ayw_1 = $this_collectAsState;
    this.byw_1 = $state;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(collectAsState$lambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(collectAsState$lambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(collectAsState$lambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            var tmp_0 = collectAsState$lambda$slambda$slambda_0(this.byw_1, null);
            suspendResult = this.ayw_1.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_36(tmp_0), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(collectAsState$lambda$slambda).v1m = function ($this$launch, completion) {
    var i = new collectAsState$lambda$slambda(this.ayw_1, this.byw_1, completion);
    i.cyw_1 = $this$launch;
    return i;
  };
  function collectAsState$lambda$slambda_0($this_collectAsState, $state, resultContinuation) {
    var i = new collectAsState$lambda$slambda($this_collectAsState, $state, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function collectAsState$lambda$lambda($coroutineScope) {
    return function () {
      cancel($coroutineScope);
      return Unit_instance;
    };
  }
  function collectAsState$lambda_0($dispatcher, $this_collectAsState, $state) {
    return function ($this$useEffect) {
      var coroutineScope = CoroutineScope_0(Dispatchers_getInstance().t12().lj(Job()));
      launch(coroutineScope, $dispatcher, VOID, collectAsState$lambda$slambda_0($this_collectAsState, $state, null));
      $this$useEffect.push(collectAsState$lambda$lambda(coroutineScope));
      return Unit_instance;
    };
  }
  function useOnUnloadEffect(block) {
    // Inline function 'kotlin.emptyArray' call
    var tmp = [].slice();
    useEffect(tmp, useOnUnloadEffect$lambda(block));
  }
  function useOnUnloadEffect$lambda$lambda($block) {
    return function (it) {
      $block();
      return Unit_instance;
    };
  }
  function useOnUnloadEffect$lambda$lambda_0($evtListener) {
    return function () {
      window.removeEventListener('beforeunload', $evtListener);
      return Unit_instance;
    };
  }
  function useOnUnloadEffect$lambda($block) {
    return function ($this$useEffect) {
      var evtListener = useOnUnloadEffect$lambda$lambda($block);
      window.addEventListener('beforeunload', evtListener);
      $this$useEffect.push(useOnUnloadEffect$lambda$lambda_0(evtListener));
      return Unit_instance;
    };
  }
  function useLaunchedEffect(dependencies, block) {
    var tmp = dependencies.slice();
    useEffect(tmp, useLaunchedEffect$lambda(block));
  }
  function useCoroutineScope(dependencies) {
    // Inline function 'react.useMemo' call
    var dependencies_0 = dependencies.slice();
    var callback = useCoroutineScope$lambda;
    var coroutineScope = useMemo(callback, dependencies_0);
    var tmp = dependencies.slice();
    useEffect(tmp, useCoroutineScope$lambda_0(coroutineScope));
    return coroutineScope;
  }
  function useLaunchedEffect$lambda$slambda($block, resultContinuation) {
    this.lyw_1 = $block;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(useLaunchedEffect$lambda$slambda).u1m = function ($this$launch, $completion) {
    var tmp = this.v1m($this$launch, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(useLaunchedEffect$lambda$slambda).he = function (p1, $completion) {
    return this.u1m((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
  };
  protoOf(useLaunchedEffect$lambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            this.hd_1 = 1;
            suspendResult = this.lyw_1(this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            return Unit_instance;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(useLaunchedEffect$lambda$slambda).v1m = function ($this$launch, completion) {
    var i = new useLaunchedEffect$lambda$slambda(this.lyw_1, completion);
    i.myw_1 = $this$launch;
    return i;
  };
  function useLaunchedEffect$lambda$slambda_0($block, resultContinuation) {
    var i = new useLaunchedEffect$lambda$slambda($block, resultContinuation);
    var l = function ($this$launch, $completion) {
      return i.u1m($this$launch, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function useLaunchedEffect$lambda$lambda($coroutineScope) {
    return function () {
      cancel($coroutineScope);
      return Unit_instance;
    };
  }
  function useLaunchedEffect$lambda($block) {
    return function ($this$useEffect) {
      var coroutineScope = CoroutineScope_0(Dispatchers_getInstance().t12().lj(Job()));
      launch(coroutineScope, VOID, VOID, useLaunchedEffect$lambda$slambda_0($block, null));
      $this$useEffect.push(useLaunchedEffect$lambda$lambda(coroutineScope));
      return Unit_instance;
    };
  }
  function useCoroutineScope$lambda() {
    return CoroutineScope_0(Dispatchers_getInstance().t12().lj(Job()));
  }
  function useCoroutineScope$lambda$lambda($coroutineScope) {
    return function () {
      cancel($coroutineScope);
      return Unit_instance;
    };
  }
  function useCoroutineScope$lambda_0($coroutineScope) {
    return function ($this$useEffect) {
      $this$useEffect.push(useCoroutineScope$lambda$lambda($coroutineScope));
      return Unit_instance;
    };
  }
  function get_ustadViewName(_this__u8e3s4) {
    // Inline function 'kotlin.text.trim' call
    var this_0 = removePrefix(_this__u8e3s4.pathname, '/');
    return toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
  }
  function useNavControllerEffect(commandFlow) {
    var navHostFn = useRequiredContext(get_NavHostContext());
    useLaunchedEffect([commandFlow], useNavControllerEffect$slambda_0(commandFlow, navHostFn, null));
  }
  function sam$kotlinx_coroutines_flow_FlowCollector$0_37(function_0) {
    this.nyw_1 = function_0;
  }
  protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_37).t1d = function (value, $completion) {
    return this.nyw_1(value, $completion);
  };
  function useNavControllerEffect$slambda$slambda($navHostFn, resultContinuation) {
    this.wyw_1 = $navHostFn;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(useNavControllerEffect$slambda$slambda).yyw = function (it, $completion) {
    var tmp = this.zyw(it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(useNavControllerEffect$slambda$slambda).he = function (p1, $completion) {
    return this.yyw(p1 instanceof NavCommand ? p1 : THROW_CCE(), $completion);
  };
  protoOf(useNavControllerEffect$slambda$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        if (tmp === 0) {
          this.id_1 = 1;
          Napier_getInstance().v5d('useNavControllerEffect: collect command: ' + this.xyw_1);
          this.wyw_1.nyg(this.xyw_1);
          return Unit_instance;
        } else if (tmp === 1) {
          throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        throw e;
      }
     while (true);
  };
  protoOf(useNavControllerEffect$slambda$slambda).zyw = function (it, completion) {
    var i = new useNavControllerEffect$slambda$slambda(this.wyw_1, completion);
    i.xyw_1 = it;
    return i;
  };
  function useNavControllerEffect$slambda$slambda_0($navHostFn, resultContinuation) {
    var i = new useNavControllerEffect$slambda$slambda($navHostFn, resultContinuation);
    var l = function (it, $completion) {
      return i.yyw(it, $completion);
    };
    l.$arity = 1;
    return l;
  }
  function useNavControllerEffect$slambda($commandFlow, $navHostFn, resultContinuation) {
    this.iyx_1 = $commandFlow;
    this.jyx_1 = $navHostFn;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(useNavControllerEffect$slambda).m86 = function ($completion) {
    var tmp = this.y77($completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(useNavControllerEffect$slambda).z77 = function ($completion) {
    return this.m86($completion);
  };
  protoOf(useNavControllerEffect$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.kyx_1 = this.iyx_1;
            if (this.kyx_1 == null) {
              this.lyx_1 = null;
              this.hd_1 = 2;
              continue $sm;
            } else {
              this.hd_1 = 1;
              var tmp_0 = useNavControllerEffect$slambda$slambda_0(this.jyx_1, null);
              suspendResult = this.kyx_1.z1b(new sam$kotlinx_coroutines_flow_FlowCollector$0_37(tmp_0), this);
              if (suspendResult === get_COROUTINE_SUSPENDED()) {
                return suspendResult;
              }
              continue $sm;
            }

          case 1:
            var tmp_1 = this;
            tmp_1.lyx_1 = Unit_instance;
            this.hd_1 = 2;
            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(useNavControllerEffect$slambda).y77 = function (completion) {
    return new useNavControllerEffect$slambda(this.iyx_1, this.jyx_1, completion);
  };
  function useNavControllerEffect$slambda_0($commandFlow, $navHostFn, resultContinuation) {
    var i = new useNavControllerEffect$slambda($commandFlow, $navHostFn, resultContinuation);
    var l = function ($completion) {
      return i.m86($completion);
    };
    l.$arity = 0;
    return l;
  }
  function useStringProvider() {
    var di = useRequiredContext(get_DIContext());
    // Inline function 'org.kodein.di.instance' call
    var tmp = get_direct(di).s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(StringProviderJs), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var stringProvider = tmp.q57(tmp$ret$0, null);
    // Inline function 'react.useMemo' call
    // Inline function 'kotlin.emptyArray' call
    var dependencies = [].slice();
    var callback = useStringProvider$lambda(stringProvider);
    return useMemo(callback, dependencies);
  }
  function useStringProvider$lambda($stringProvider) {
    return function () {
      return $stringProvider;
    };
  }
  function useViewModel(overrideSearchParams, viewModelFactory) {
    overrideSearchParams = overrideSearchParams === VOID ? null : overrideSearchParams;
    // Inline function 'js.array.JsTuple1.component1' call
    // Inline function 'kotlin.js.asDynamic' call
    var searchParams = useSearchParams()[0];
    var locationKey = useLocation().key;
    var viewModelAndKey$delegate = useState_0(useViewModel$lambda_1(overrideSearchParams, searchParams, viewModelFactory, locationKey));
    useEffect([locationKey], useViewModel$lambda_2(locationKey, viewModelFactory, searchParams, viewModelAndKey$delegate));
    return useViewModel$lambda(viewModelAndKey$delegate).myx_1;
  }
  function ViewModelAndKey(viewModel, locationKey) {
    this.myx_1 = viewModel;
    this.nyx_1 = locationKey;
  }
  protoOf(ViewModelAndKey).toString = function () {
    return 'ViewModelAndKey(viewModel=' + this.myx_1 + ', locationKey=' + this.nyx_1 + ')';
  };
  protoOf(ViewModelAndKey).hashCode = function () {
    var result = hashCode(this.myx_1);
    result = imul(result, 31) + getStringHashCode(this.nyx_1) | 0;
    return result;
  };
  protoOf(ViewModelAndKey).equals = function (other) {
    if (this === other)
      return true;
    if (!(other instanceof ViewModelAndKey))
      return false;
    var tmp0_other_with_cast = other instanceof ViewModelAndKey ? other : THROW_CCE();
    if (!equals(this.myx_1, tmp0_other_with_cast.myx_1))
      return false;
    if (!(this.nyx_1 === tmp0_other_with_cast.nyx_1))
      return false;
    return true;
  };
  function useViewModel$lambda($viewModelAndKey$delegate) {
    // Inline function 'react.StateInstance.getValue' call
    getLocalDelegateReference('viewModelAndKey', KMutableProperty0, true, function () {
      return THROW_ISE();
    });
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return $viewModelAndKey$delegate[0];
  }
  function useViewModel$lambda_0($viewModelAndKey$delegate, value) {
    getLocalDelegateReference('viewModelAndKey', KMutableProperty0, true, function () {
      return THROW_ISE();
    });
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    $viewModelAndKey$delegate[1](value);
    return Unit_instance;
  }
  function useViewModel$lambda_1($overrideSearchParams, $searchParams, $viewModelFactory, $locationKey) {
    return function () {
      var tmp = window.history;
      var tmp0_elvis_lhs = $overrideSearchParams;
      var savedStateHandle = new SavedStateHandle2(tmp, tmp0_elvis_lhs == null ? $searchParams : tmp0_elvis_lhs);
      // Inline function 'kotlin.also' call
      var this_0 = new ViewModelAndKey($viewModelFactory(savedStateHandle), $locationKey);
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.hooks.useViewModel.<anonymous>.<anonymous>' call
      Napier_getInstance().v5d('Creating ViewModel: ' + getKClassFromExpression(this_0.myx_1).f7());
      return this_0;
    };
  }
  function useViewModel$lambda$lambda($viewModelAndKey$delegate) {
    return function () {
      Napier_getInstance().v5d('Close ViewModel: ' + getKClassFromExpression(useViewModel$lambda($viewModelAndKey$delegate).myx_1).f7());
      useViewModel$lambda($viewModelAndKey$delegate).myx_1.n();
      return Unit_instance;
    };
  }
  function useViewModel$lambda_2($locationKey, $viewModelFactory, $searchParams, $viewModelAndKey$delegate) {
    return function ($this$useEffect) {
      var tmp;
      if (!(useViewModel$lambda($viewModelAndKey$delegate).nyx_1 === $locationKey)) {
        useViewModel$lambda_0($viewModelAndKey$delegate, new ViewModelAndKey($viewModelFactory(new SavedStateHandle2(window.history, $searchParams)), $locationKey));
        Napier_getInstance().v5d('Recreating ViewModel ' + getKClassFromExpression(useViewModel$lambda($viewModelAndKey$delegate).myx_1).f7());
        tmp = Unit_instance;
      }
      $this$useEffect.push(useViewModel$lambda$lambda($viewModelAndKey$delegate));
      return Unit_instance;
    };
  }
  function Companion_180() {
  }
  var Companion_instance_228;
  function Companion_getInstance_197() {
    return Companion_instance_228;
  }
  function UstadMobileSystemImpl(settings, langConfig, jsStringProvider) {
    UstadMobileSystemCommon.call(this, settings, langConfig);
    this.dn6_1 = jsStringProvider;
  }
  protoOf(UstadMobileSystemImpl).en6 = function (stringResource) {
    return stringResource.bl2(this.dn6_1, this.fok_1.so3_1);
  };
  protoOf(UstadMobileSystemImpl).fn6 = function (stringResource, args) {
    return stringResource.cl2(this.dn6_1, this.fok_1.so3_1, args.slice());
  };
  protoOf(UstadMobileSystemImpl).nud = function (pluralsResource, number) {
    return format(pluralsResource, number, [number]).gl2(this.dn6_1);
  };
  protoOf(UstadMobileSystemImpl).oyx = function (context, zip, $completion) {
    // Inline function 'kotlin.TODO' call
    var reason = 'not implemented';
    throw new NotImplementedError('An operation is not implemented: ' + reason);
  };
  protoOf(UstadMobileSystemImpl).getAppSetupFile = function (context, zip, $completion) {
    return this.oyx(context, zip, $completion);
  };
  protoOf(UstadMobileSystemImpl).pyx = function (viewName, args, context, flags, ustadGoOptions) {
    throw IllegalStateException_init_$Create$('Not supported on JS anymore!');
  };
  protoOf(UstadMobileSystemImpl).go = function (viewName, args, context, flags, ustadGoOptions) {
    return this.pyx(viewName, args, context, flags, ustadGoOptions);
  };
  function DomainDiModuleJs(endpointScope) {
    return Module_init_$Create$('DomainDiModuleJs', VOID, VOID, DomainDiModuleJs$lambda(endpointScope));
  }
  function DomainDiModuleJs$lambda$lambda($this$provider) {
    var tmp = $this$provider.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp_0 = $this$provider.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var tmp_2 = tmp_0.q57(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_3 = $this$provider.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(Json), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    var tmp$ret$3 = tmp_3.q57(tmp$ret$2, null);
    return new EnqueueImportContentEntryUseCaseRemote(tmp, tmp_2, tmp$ret$3);
  }
  function DomainDiModuleJs$lambda$lambda_0($this$provider) {
    return new OpenExternalLinkUseCaseJs();
  }
  function DomainDiModuleJs$lambda$lambda_1($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UstadNavController), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.q57(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$singleton.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(UstadAccountManager), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp_4 = tmp_2.q57(tmp$ret$2, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_5 = $this$singleton.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(OpenExternalLinkUseCase), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    var tmp_7 = tmp_5.q57(tmp$ret$4, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_8 = $this$singleton.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_9 = typeToken(createKType(getKClass(ApiUrlConfig), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_9, TypeToken) ? tmp_9 : THROW_CCE();
    var tmp$ret$7 = tmp_8.q57(tmp$ret$6, null);
    return OnClickLinkUseCase_init_$Create$(tmp_1, tmp_4, tmp_7, tmp$ret$7);
  }
  function DomainDiModuleJs$lambda$lambda_2($this$singleton) {
    return new PhoneNumberUtilJs();
  }
  function DomainDiModuleJs$lambda$lambda_3($this$provider) {
    return new PhoneNumValidatorUseCaseJs();
  }
  function DomainDiModuleJs$lambda$lambda_4($this$provider) {
    return new OnClickPhoneNumUseCaseJs();
  }
  function DomainDiModuleJs$lambda$lambda_5($this$provider) {
    return new OnClickSendEmailUseCaseJs();
  }
  function DomainDiModuleJs$lambda$lambda_6($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(SupportedLanguagesConfig), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp$ret$1 = tmp.q57(tmp$ret$0, null);
    return new SetLanguageUseCaseJs(tmp$ret$1);
  }
  function DomainDiModuleJs$lambda$lambda_7($this$singleton) {
    return new ChunkedUploadClientLocalUriUseCaseJs();
  }
  function DomainDiModuleJs$lambda$lambda_8($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(SavePictureUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp$ret$1 = tmp.q57(tmp$ret$0, null);
    return new EnqueueSavePictureUseCaseJs(tmp$ret$1);
  }
  function DomainDiModuleJs$lambda$lambda_9($this$singleton) {
    return new IsTempFileCheckerUseCaseJs();
  }
  function DomainDiModuleJs$lambda$lambda_10($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(IsTempFileCheckerUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp$ret$1 = tmp.q57(tmp$ret$0, null);
    return new DeleteUrisUseCaseJs(tmp$ret$1);
  }
  function DomainDiModuleJs$lambda$lambda_11($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(SaveLocalUrisAsBlobsUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.q57(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$singleton.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp_4 = tmp_2.q57(tmp$ret$2, 1);
    // Inline function 'org.kodein.di.instance' call
    var tmp_5 = $this$singleton.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    var tmp_7 = tmp_5.q57(tmp$ret$4, 2);
    var tmp_8 = new CompressImageUseCaseJs();
    // Inline function 'org.kodein.di.instance' call
    var tmp_9 = $this$singleton.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_10 = typeToken(createKType(getKClass(DeleteUrisUseCase), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_10, TypeToken) ? tmp_10 : THROW_CCE();
    var tmp$ret$7 = tmp_9.q57(tmp$ret$6, null);
    return new SavePictureUseCase(tmp_1, null, tmp_4, tmp_7, tmp_8, tmp$ret$7);
  }
  function DomainDiModuleJs$lambda$lambda_12($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(ChunkedUploadClientLocalUriUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.q57(tmp$ret$0, null);
    var tmp_2 = $this$singleton.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp_3 = $this$singleton.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(Json), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    var tmp_5 = tmp_3.q57(tmp$ret$2, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_6 = $this$singleton.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_7 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    var tmp$ret$5 = tmp_6.q57(tmp$ret$4, 1);
    return new SaveLocalUrisAsBlobUseCaseJs(tmp_1, tmp_2, tmp_5, tmp$ret$5);
  }
  function DomainDiModuleJs$lambda$lambda_13($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(Json), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.q57(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$provider.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(ChunkedUploadClientLocalUriUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp$ret$3 = tmp_2.q57(tmp$ret$2, null);
    return new ContentEntryGetMetaDataFromUriUseCaseJs(tmp_1, tmp$ret$3);
  }
  function DomainDiModuleJs$lambda$lambda_14($this$provider) {
    var tmp = $this$provider.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp_0 = $this$provider.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var tmp_2 = tmp_0.q57(tmp$ret$0, 2);
    // Inline function 'org.kodein.di.instance' call
    var tmp_3 = $this$provider.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    var tmp$ret$3 = tmp_3.q57(tmp$ret$2, null);
    return new SetPasswordUseCaseJs(tmp, tmp_2, tmp$ret$3);
  }
  function DomainDiModuleJs$lambda$lambda_15($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp0_activeRepo = tmp.q57(tmp$ret$0, 2);
    // Inline function 'org.kodein.di.instance' call
    var tmp_1 = $this$provider.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    var tmp1_httpClient = tmp_1.q57(tmp$ret$2, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_3 = $this$provider.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(XapiJson), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    var tmp2_json = tmp_3.q57(tmp$ret$4, null).ko7_1;
    // Inline function 'org.kodein.di.instance' call
    var tmp_5 = $this$provider.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(XmlPullParserFactory), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    var tmp3_xppFactory = tmp_5.q57(tmp$ret$6, 1);
    var tmp4_endpoint = $this$provider.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp_7 = $this$provider.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_8 = typeToken(createKType(getKClass(ResumeOrStartXapiSessionUseCase), arrayOf([]), false));
    var tmp$ret$8 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
    var tmp5_resumeOrStartXapiSessionUseCase = tmp_7.q57(tmp$ret$8, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_9 = $this$provider.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_10 = typeToken(createKType(getKClass(UstadAccountManager), arrayOf([]), false));
    var tmp$ret$10 = isInterface(tmp_10, TypeToken) ? tmp_10 : THROW_CCE();
    var tmp6_accountManager = tmp_9.q57(tmp$ret$10, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_11 = $this$provider.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_12 = typeToken(createKType(getKClass(GetApiUrlUseCase), arrayOf([]), false));
    var tmp$ret$12 = isInterface(tmp_12, TypeToken) ? tmp_12 : THROW_CCE();
    var tmp7_getApiUrlUseCase = tmp_11.q57(tmp$ret$12, null);
    return new ResolveXapiLaunchHrefUseCase(tmp0_activeRepo, tmp1_httpClient, tmp2_json, tmp3_xppFactory, tmp5_resumeOrStartXapiSessionUseCase, tmp7_getApiUrlUseCase, tmp6_accountManager, tmp4_endpoint);
  }
  function DomainDiModuleJs$lambda$lambda_16($this$singleton) {
    return new XapiJson();
  }
  function DomainDiModuleJs$lambda$lambda_17($this$singleton) {
    return new GetApiUrlUseCaseDirect($this$singleton.od());
  }
  function DomainDiModuleJs$lambda$lambda_18($this$singleton) {
    var tmp = $this$singleton.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp_0 = $this$singleton.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var tmp_2 = tmp_0.q57(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_3 = $this$singleton.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    var tmp_5 = tmp_3.q57(tmp$ret$2, 2);
    // Inline function 'org.kodein.di.instance' call
    var tmp_6 = $this$singleton.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_7 = typeToken(createKType(getKClass(XapiJson), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    var tmp$ret$5 = tmp_6.q57(tmp$ret$4, null);
    return new ResumeOrStartXapiSessionUseCaseJs(tmp, tmp_2, tmp_5, tmp$ret$5);
  }
  function DomainDiModuleJs$lambda$lambda_19($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(ResolveXapiLaunchHrefUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp$ret$1 = tmp.q57(tmp$ret$0, null);
    return new LaunchXapiUseCaseJs(tmp$ret$1);
  }
  function DomainDiModuleJs$lambda$lambda_20($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.q57(tmp$ret$0, 2);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$provider.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(UstadMobileSystemImpl), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp$ret$3 = tmp_2.q57(tmp$ret$2, null);
    return new MoveContentEntriesUseCase(tmp_1, tmp$ret$3);
  }
  function DomainDiModuleJs$lambda$lambda_21($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp$ret$1 = tmp.q57(tmp$ret$0, 2);
    return new DeleteContentEntryParentChildJoinUseCase(tmp$ret$1);
  }
  function DomainDiModuleJs$lambda$lambda_22($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp$ret$1 = tmp.q57(tmp$ret$0, 2);
    return new RestoreDeletedItemUseCase(tmp$ret$1);
  }
  function DomainDiModuleJs$lambda$lambda_23($this$provider) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$provider.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp$ret$1 = tmp.q57(tmp$ret$0, 2);
    return new DeletePermanentlyUseCase(tmp$ret$1);
  }
  function DomainDiModuleJs$lambda$lambda_24($this$singleton) {
    return new SetClipboardStringUseCaseJs();
  }
  function DomainDiModuleJs$lambda$lambda_25($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(SaveLocalUrisAsBlobsUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.q57(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$singleton.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp_4 = tmp_2.q57(tmp$ret$2, 1);
    // Inline function 'org.kodein.di.instance' call
    var tmp_5 = $this$singleton.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    var tmp$ret$5 = tmp_5.q57(tmp$ret$4, 2);
    return new SaveAndUploadLocalUrisUseCase(tmp_1, null, tmp_4, tmp$ret$5);
  }
  function DomainDiModuleJs$lambda$lambda_26($this$provider) {
    return new OpenBlobUseCaseJs();
  }
  function DomainDiModuleJs$lambda$lambda_27($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(OpenBlobUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.q57(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$singleton.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(UstadMobileSystemImpl), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp$ret$3 = tmp_2.q57(tmp$ret$2, null);
    return new OpenBlobUiUseCase(tmp_1, tmp$ret$3);
  }
  function DomainDiModuleJs$lambda$lambda_28($this$singleton) {
    var tmp = $this$singleton.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp_0 = $this$singleton.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var tmp_2 = tmp_0.q57(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_3 = $this$singleton.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    var tmp$ret$3 = tmp_3.q57(tmp$ret$2, 2);
    return new CancelRemoteContentEntryImportUseCase(tmp, tmp_2, tmp$ret$3);
  }
  function DomainDiModuleJs$lambda$lambda_29($this$singleton) {
    var tmp0_endpoint = $this$singleton.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp1_httpClient = tmp.q57(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_1 = $this$singleton.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_2 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_2, TypeToken) ? tmp_2 : THROW_CCE();
    var tmp2_repo = tmp_1.q57(tmp$ret$2, 2);
    return new DismissRemoteContentEntryImportErrorUseCase(tmp1_httpClient, tmp0_endpoint, tmp2_repo);
  }
  function DomainDiModuleJs$lambda$lambda_30($this$singleton) {
    return new XXStringHasherJs();
  }
  function DomainDiModuleJs$lambda$lambda_31($this$singleton) {
    return new XXHasher64FactoryJs();
  }
  function DomainDiModuleJs$lambda$lambda_32($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.q57(tmp$ret$0, 1);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$singleton.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp$ret$3 = tmp_2.q57(tmp$ret$2, 2);
    return new StoreActivitiesUseCase(tmp_1, tmp$ret$3);
  }
  function DomainDiModuleJs$lambda$lambda_33($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.q57(tmp$ret$0, 1);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$singleton.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(UmAppDatabase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp_4 = tmp_2.q57(tmp$ret$2, 2);
    // Inline function 'org.kodein.di.instance' call
    var tmp_5 = $this$singleton.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(XXStringHasher), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    var tmp_7 = tmp_5.q57(tmp$ret$4, null);
    var tmp_8 = $this$singleton.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp_9 = $this$singleton.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_10 = typeToken(createKType(getKClass(XapiJson), arrayOf([]), false));
    var tmp$ret$6 = isInterface(tmp_10, TypeToken) ? tmp_10 : THROW_CCE();
    var tmp_11 = tmp_9.q57(tmp$ret$6, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_12 = $this$singleton.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_13 = typeToken(createKType(getKClass(XXHasher64Factory), arrayOf([]), false));
    var tmp$ret$8 = isInterface(tmp_13, TypeToken) ? tmp_13 : THROW_CCE();
    var tmp_14 = tmp_12.q57(tmp$ret$8, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_15 = $this$singleton.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_16 = typeToken(createKType(getKClass(StoreActivitiesUseCase), arrayOf([]), false));
    var tmp$ret$10 = isInterface(tmp_16, TypeToken) ? tmp_16 : THROW_CCE();
    var tmp$ret$11 = tmp_15.q57(tmp$ret$10, null);
    return new XapiStatementResource(tmp_1, tmp_4, tmp_7, tmp_8, tmp_11, tmp_14, tmp$ret$11);
  }
  function DomainDiModuleJs$lambda$lambda_34($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(XapiStatementResource), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp$ret$1 = tmp.q57(tmp$ret$0, null);
    return new SaveStatementOnClearUseCaseJs(tmp$ret$1);
  }
  function DomainDiModuleJs$lambda$lambda_35($this$singleton) {
    var tmp = $this$singleton.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp_0 = $this$singleton.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(Json), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var tmp$ret$1 = tmp_0.q57(tmp$ret$0, null);
    return new SaveStatementOnUnloadUseCaseJs(tmp, tmp$ret$1);
  }
  function DomainDiModuleJs$lambda$lambda_36($this$singleton) {
    // Inline function 'org.kodein.di.instance' call
    var tmp = $this$singleton.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_0 = typeToken(createKType(getKClass(SaveStatementOnClearUseCase), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_0, TypeToken) ? tmp_0 : THROW_CCE();
    var tmp_1 = tmp.q57(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_2 = $this$singleton.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_3 = typeToken(createKType(getKClass(SaveStatementOnUnloadUseCase), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
    var tmp_4 = tmp_2.q57(tmp$ret$2, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_5 = $this$singleton.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_6 = typeToken(createKType(getKClass(XapiStatementResource), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_6, TypeToken) ? tmp_6 : THROW_CCE();
    var tmp$ret$5 = tmp_5.q57(tmp$ret$4, null);
    return new NonInteractiveContentXapiStatementRecorderFactory(tmp_1, tmp_4, tmp$ret$5, $this$singleton.od());
  }
  function DomainDiModuleJs$lambda$lambda_37($this$singleton) {
    var tmp = $this$singleton.od();
    // Inline function 'org.kodein.di.instance' call
    var tmp_0 = $this$singleton.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_1 = typeToken(createKType(getKClass(HttpClient), arrayOf([]), false));
    var tmp$ret$0 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
    var tmp_2 = tmp_0.q57(tmp$ret$0, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_3 = $this$singleton.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_4 = typeToken(createKType(getKClass(Json), arrayOf([]), false));
    var tmp$ret$2 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
    var tmp_5 = tmp_3.q57(tmp$ret$2, null);
    // Inline function 'org.kodein.di.instance' call
    var tmp_6 = $this$singleton.s57();
    // Inline function 'org.kodein.type.generic' call
    var tmp_7 = typeToken(createKType(getKClass(SupportedLanguagesConfig), arrayOf([]), false));
    var tmp$ret$4 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
    var tmp$ret$5 = tmp_6.q57(tmp$ret$4, null);
    return new GetSubtitleTrackFromUriUseCaseJs(tmp, tmp_2, tmp_5, tmp$ret$5);
  }
  function DomainDiModuleJs$lambda($endpointScope) {
    return function ($this$$receiver) {
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp = typeToken(createKType(getKClass(EnqueueContentEntryImportUseCase), arrayOf([]), false));
      var tmp$ret$0 = isInterface(tmp, TypeToken) ? tmp : THROW_CCE();
      var tmp_0 = $this$$receiver.b56(tmp$ret$0, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_1 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$2 = isInterface(tmp_1, TypeToken) ? tmp_1 : THROW_CCE();
      var this_0 = new ImplWithScope(tmp$ret$2, scope);
      var creator = DomainDiModuleJs$lambda$lambda;
      var tmp_2 = this_0.o55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_3 = typeToken(createKType(getKClass(EnqueueImportContentEntryUseCaseRemote), arrayOf([]), false));
      var tmp$ret$4 = isInterface(tmp_3, TypeToken) ? tmp_3 : THROW_CCE();
      var tmp$ret$5 = new Provider(tmp_2, tmp$ret$4, creator);
      tmp_0.p5a(tmp$ret$5);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_4 = typeToken(createKType(getKClass(OpenExternalLinkUseCase), arrayOf([]), false));
      var tmp$ret$6 = isInterface(tmp_4, TypeToken) ? tmp_4 : THROW_CCE();
      var tmp_5 = $this$$receiver.b56(tmp$ret$6, null, null);
      // Inline function 'org.kodein.di.provider' call
      var creator_0 = DomainDiModuleJs$lambda$lambda_0;
      var tmp_6 = $this$$receiver.o55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_7 = typeToken(createKType(getKClass(OpenExternalLinkUseCaseJs), arrayOf([]), false));
      var tmp$ret$8 = isInterface(tmp_7, TypeToken) ? tmp_7 : THROW_CCE();
      var tmp$ret$9 = new Provider(tmp_6, tmp$ret$8, creator_0);
      tmp_5.p5a(tmp$ret$9);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_8 = typeToken(createKType(getKClass(OnClickLinkUseCase), arrayOf([]), false));
      var tmp$ret$10 = isInterface(tmp_8, TypeToken) ? tmp_8 : THROW_CCE();
      var tmp_9 = $this$$receiver.b56(tmp$ret$10, null, null);
      // Inline function 'org.kodein.di.singleton' call
      var creator_1 = DomainDiModuleJs$lambda$lambda_1;
      var tmp_10 = $this$$receiver.p55();
      var tmp_11 = $this$$receiver.o55();
      var tmp_12 = $this$$receiver.q55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_13 = typeToken(createKType(getKClass(OnClickLinkUseCase), arrayOf([]), false));
      var tmp$ret$12 = isInterface(tmp_13, TypeToken) ? tmp_13 : THROW_CCE();
      var tmp$ret$13 = new Singleton(tmp_10, tmp_11, tmp_12, tmp$ret$12, null, true, creator_1);
      tmp_9.p5a(tmp$ret$13);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_14 = typeToken(createKType(getKClass(IPhoneNumberUtil), arrayOf([]), false));
      var tmp$ret$14 = isInterface(tmp_14, TypeToken) ? tmp_14 : THROW_CCE();
      var tmp_15 = $this$$receiver.b56(tmp$ret$14, null, null);
      // Inline function 'org.kodein.di.singleton' call
      var creator_2 = DomainDiModuleJs$lambda$lambda_2;
      var tmp_16 = $this$$receiver.p55();
      var tmp_17 = $this$$receiver.o55();
      var tmp_18 = $this$$receiver.q55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_19 = typeToken(createKType(getKClass(PhoneNumberUtilJs), arrayOf([]), false));
      var tmp$ret$16 = isInterface(tmp_19, TypeToken) ? tmp_19 : THROW_CCE();
      var tmp$ret$17 = new Singleton(tmp_16, tmp_17, tmp_18, tmp$ret$16, null, true, creator_2);
      tmp_15.p5a(tmp$ret$17);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_20 = typeToken(createKType(getKClass(PhoneNumValidatorUseCase), arrayOf([]), false));
      var tmp$ret$18 = isInterface(tmp_20, TypeToken) ? tmp_20 : THROW_CCE();
      var tmp_21 = $this$$receiver.b56(tmp$ret$18, null, null);
      // Inline function 'org.kodein.di.provider' call
      var creator_3 = DomainDiModuleJs$lambda$lambda_3;
      var tmp_22 = $this$$receiver.o55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_23 = typeToken(createKType(getKClass(PhoneNumValidatorUseCaseJs), arrayOf([]), false));
      var tmp$ret$20 = isInterface(tmp_23, TypeToken) ? tmp_23 : THROW_CCE();
      var tmp$ret$21 = new Provider(tmp_22, tmp$ret$20, creator_3);
      tmp_21.p5a(tmp$ret$21);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_24 = typeToken(createKType(getKClass(OnClickPhoneNumUseCase), arrayOf([]), false));
      var tmp$ret$22 = isInterface(tmp_24, TypeToken) ? tmp_24 : THROW_CCE();
      var tmp_25 = $this$$receiver.b56(tmp$ret$22, null, null);
      // Inline function 'org.kodein.di.provider' call
      var creator_4 = DomainDiModuleJs$lambda$lambda_4;
      var tmp_26 = $this$$receiver.o55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_27 = typeToken(createKType(getKClass(OnClickPhoneNumUseCaseJs), arrayOf([]), false));
      var tmp$ret$24 = isInterface(tmp_27, TypeToken) ? tmp_27 : THROW_CCE();
      var tmp$ret$25 = new Provider(tmp_26, tmp$ret$24, creator_4);
      tmp_25.p5a(tmp$ret$25);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_28 = typeToken(createKType(getKClass(OnClickEmailUseCase), arrayOf([]), false));
      var tmp$ret$26 = isInterface(tmp_28, TypeToken) ? tmp_28 : THROW_CCE();
      var tmp_29 = $this$$receiver.b56(tmp$ret$26, null, null);
      // Inline function 'org.kodein.di.provider' call
      var creator_5 = DomainDiModuleJs$lambda$lambda_5;
      var tmp_30 = $this$$receiver.o55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_31 = typeToken(createKType(getKClass(OnClickSendEmailUseCaseJs), arrayOf([]), false));
      var tmp$ret$28 = isInterface(tmp_31, TypeToken) ? tmp_31 : THROW_CCE();
      var tmp$ret$29 = new Provider(tmp_30, tmp$ret$28, creator_5);
      tmp_29.p5a(tmp$ret$29);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_32 = typeToken(createKType(getKClass(SetLanguageUseCase), arrayOf([]), false));
      var tmp$ret$30 = isInterface(tmp_32, TypeToken) ? tmp_32 : THROW_CCE();
      var tmp_33 = $this$$receiver.b56(tmp$ret$30, null, null);
      // Inline function 'org.kodein.di.provider' call
      var creator_6 = DomainDiModuleJs$lambda$lambda_6;
      var tmp_34 = $this$$receiver.o55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_35 = typeToken(createKType(getKClass(SetLanguageUseCaseJs), arrayOf([]), false));
      var tmp$ret$32 = isInterface(tmp_35, TypeToken) ? tmp_35 : THROW_CCE();
      var tmp$ret$33 = new Provider(tmp_34, tmp$ret$32, creator_6);
      tmp_33.p5a(tmp$ret$33);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_36 = typeToken(createKType(getKClass(ChunkedUploadClientLocalUriUseCase), arrayOf([]), false));
      var tmp$ret$34 = isInterface(tmp_36, TypeToken) ? tmp_36 : THROW_CCE();
      var tmp_37 = $this$$receiver.b56(tmp$ret$34, null, null);
      // Inline function 'org.kodein.di.singleton' call
      var creator_7 = DomainDiModuleJs$lambda$lambda_7;
      var tmp_38 = $this$$receiver.p55();
      var tmp_39 = $this$$receiver.o55();
      var tmp_40 = $this$$receiver.q55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_41 = typeToken(createKType(getKClass(ChunkedUploadClientLocalUriUseCaseJs), arrayOf([]), false));
      var tmp$ret$36 = isInterface(tmp_41, TypeToken) ? tmp_41 : THROW_CCE();
      var tmp$ret$37 = new Singleton(tmp_38, tmp_39, tmp_40, tmp$ret$36, null, true, creator_7);
      tmp_37.p5a(tmp$ret$37);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_42 = typeToken(createKType(getKClass(EnqueueSavePictureUseCase), arrayOf([]), false));
      var tmp$ret$38 = isInterface(tmp_42, TypeToken) ? tmp_42 : THROW_CCE();
      var tmp_43 = $this$$receiver.b56(tmp$ret$38, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_0 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_44 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$40 = isInterface(tmp_44, TypeToken) ? tmp_44 : THROW_CCE();
      var this_1 = new ImplWithScope(tmp$ret$40, scope_0);
      var creator_8 = DomainDiModuleJs$lambda$lambda_8;
      var tmp_45 = this_1.p55();
      var tmp_46 = this_1.o55();
      var tmp_47 = this_1.q55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_48 = typeToken(createKType(getKClass(EnqueueSavePictureUseCaseJs), arrayOf([]), false));
      var tmp$ret$42 = isInterface(tmp_48, TypeToken) ? tmp_48 : THROW_CCE();
      var tmp$ret$43 = new Singleton(tmp_45, tmp_46, tmp_47, tmp$ret$42, null, true, creator_8);
      tmp_43.p5a(tmp$ret$43);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_49 = typeToken(createKType(getKClass(IsTempFileCheckerUseCase), arrayOf([]), false));
      var tmp$ret$44 = isInterface(tmp_49, TypeToken) ? tmp_49 : THROW_CCE();
      var tmp_50 = $this$$receiver.b56(tmp$ret$44, null, null);
      // Inline function 'org.kodein.di.singleton' call
      var creator_9 = DomainDiModuleJs$lambda$lambda_9;
      var tmp_51 = $this$$receiver.p55();
      var tmp_52 = $this$$receiver.o55();
      var tmp_53 = $this$$receiver.q55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_54 = typeToken(createKType(getKClass(IsTempFileCheckerUseCaseJs), arrayOf([]), false));
      var tmp$ret$46 = isInterface(tmp_54, TypeToken) ? tmp_54 : THROW_CCE();
      var tmp$ret$47 = new Singleton(tmp_51, tmp_52, tmp_53, tmp$ret$46, null, true, creator_9);
      tmp_50.p5a(tmp$ret$47);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_55 = typeToken(createKType(getKClass(DeleteUrisUseCase), arrayOf([]), false));
      var tmp$ret$48 = isInterface(tmp_55, TypeToken) ? tmp_55 : THROW_CCE();
      var tmp_56 = $this$$receiver.b56(tmp$ret$48, null, null);
      // Inline function 'org.kodein.di.singleton' call
      var creator_10 = DomainDiModuleJs$lambda$lambda_10;
      var tmp_57 = $this$$receiver.p55();
      var tmp_58 = $this$$receiver.o55();
      var tmp_59 = $this$$receiver.q55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_60 = typeToken(createKType(getKClass(DeleteUrisUseCaseJs), arrayOf([]), false));
      var tmp$ret$50 = isInterface(tmp_60, TypeToken) ? tmp_60 : THROW_CCE();
      var tmp$ret$51 = new Singleton(tmp_57, tmp_58, tmp_59, tmp$ret$50, null, true, creator_10);
      tmp_56.p5a(tmp$ret$51);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_61 = typeToken(createKType(getKClass(SavePictureUseCase), arrayOf([]), false));
      var tmp$ret$52 = isInterface(tmp_61, TypeToken) ? tmp_61 : THROW_CCE();
      var tmp_62 = $this$$receiver.b56(tmp$ret$52, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_1 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_63 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$54 = isInterface(tmp_63, TypeToken) ? tmp_63 : THROW_CCE();
      var this_2 = new ImplWithScope(tmp$ret$54, scope_1);
      var creator_11 = DomainDiModuleJs$lambda$lambda_11;
      var tmp_64 = this_2.p55();
      var tmp_65 = this_2.o55();
      var tmp_66 = this_2.q55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_67 = typeToken(createKType(getKClass(SavePictureUseCase), arrayOf([]), false));
      var tmp$ret$56 = isInterface(tmp_67, TypeToken) ? tmp_67 : THROW_CCE();
      var tmp$ret$57 = new Singleton(tmp_64, tmp_65, tmp_66, tmp$ret$56, null, true, creator_11);
      tmp_62.p5a(tmp$ret$57);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_68 = typeToken(createKType(getKClass(SaveLocalUrisAsBlobsUseCase), arrayOf([]), false));
      var tmp$ret$58 = isInterface(tmp_68, TypeToken) ? tmp_68 : THROW_CCE();
      var tmp_69 = $this$$receiver.b56(tmp$ret$58, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_2 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_70 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$60 = isInterface(tmp_70, TypeToken) ? tmp_70 : THROW_CCE();
      var this_3 = new ImplWithScope(tmp$ret$60, scope_2);
      var creator_12 = DomainDiModuleJs$lambda$lambda_12;
      var tmp_71 = this_3.p55();
      var tmp_72 = this_3.o55();
      var tmp_73 = this_3.q55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_74 = typeToken(createKType(getKClass(SaveLocalUrisAsBlobUseCaseJs), arrayOf([]), false));
      var tmp$ret$62 = isInterface(tmp_74, TypeToken) ? tmp_74 : THROW_CCE();
      var tmp$ret$63 = new Singleton(tmp_71, tmp_72, tmp_73, tmp$ret$62, null, true, creator_12);
      tmp_69.p5a(tmp$ret$63);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_75 = typeToken(createKType(getKClass(ContentEntryGetMetaDataFromUriUseCase), arrayOf([]), false));
      var tmp$ret$64 = isInterface(tmp_75, TypeToken) ? tmp_75 : THROW_CCE();
      var tmp_76 = $this$$receiver.b56(tmp$ret$64, null, null);
      // Inline function 'org.kodein.di.provider' call
      var creator_13 = DomainDiModuleJs$lambda$lambda_13;
      var tmp_77 = $this$$receiver.o55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_78 = typeToken(createKType(getKClass(ContentEntryGetMetaDataFromUriUseCaseJs), arrayOf([]), false));
      var tmp$ret$66 = isInterface(tmp_78, TypeToken) ? tmp_78 : THROW_CCE();
      var tmp$ret$67 = new Provider(tmp_77, tmp$ret$66, creator_13);
      tmp_76.p5a(tmp$ret$67);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_79 = typeToken(createKType(getKClass(SetPasswordUseCase), arrayOf([]), false));
      var tmp$ret$68 = isInterface(tmp_79, TypeToken) ? tmp_79 : THROW_CCE();
      var tmp_80 = $this$$receiver.b56(tmp$ret$68, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_3 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_81 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$70 = isInterface(tmp_81, TypeToken) ? tmp_81 : THROW_CCE();
      var this_4 = new ImplWithScope(tmp$ret$70, scope_3);
      var creator_14 = DomainDiModuleJs$lambda$lambda_14;
      var tmp_82 = this_4.o55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_83 = typeToken(createKType(getKClass(SetPasswordUseCaseJs), arrayOf([]), false));
      var tmp$ret$72 = isInterface(tmp_83, TypeToken) ? tmp_83 : THROW_CCE();
      var tmp$ret$73 = new Provider(tmp_82, tmp$ret$72, creator_14);
      tmp_80.p5a(tmp$ret$73);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_84 = typeToken(createKType(getKClass(ResolveXapiLaunchHrefUseCase), arrayOf([]), false));
      var tmp$ret$74 = isInterface(tmp_84, TypeToken) ? tmp_84 : THROW_CCE();
      var tmp_85 = $this$$receiver.b56(tmp$ret$74, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_4 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_86 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$76 = isInterface(tmp_86, TypeToken) ? tmp_86 : THROW_CCE();
      var this_5 = new ImplWithScope(tmp$ret$76, scope_4);
      var creator_15 = DomainDiModuleJs$lambda$lambda_15;
      var tmp_87 = this_5.o55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_88 = typeToken(createKType(getKClass(ResolveXapiLaunchHrefUseCase), arrayOf([]), false));
      var tmp$ret$78 = isInterface(tmp_88, TypeToken) ? tmp_88 : THROW_CCE();
      var tmp$ret$79 = new Provider(tmp_87, tmp$ret$78, creator_15);
      tmp_85.p5a(tmp$ret$79);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_89 = typeToken(createKType(getKClass(XapiJson), arrayOf([]), false));
      var tmp$ret$80 = isInterface(tmp_89, TypeToken) ? tmp_89 : THROW_CCE();
      var tmp_90 = $this$$receiver.b56(tmp$ret$80, null, null);
      // Inline function 'org.kodein.di.singleton' call
      var creator_16 = DomainDiModuleJs$lambda$lambda_16;
      var tmp_91 = $this$$receiver.p55();
      var tmp_92 = $this$$receiver.o55();
      var tmp_93 = $this$$receiver.q55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_94 = typeToken(createKType(getKClass(XapiJson), arrayOf([]), false));
      var tmp$ret$82 = isInterface(tmp_94, TypeToken) ? tmp_94 : THROW_CCE();
      var tmp$ret$83 = new Singleton(tmp_91, tmp_92, tmp_93, tmp$ret$82, null, true, creator_16);
      tmp_90.p5a(tmp$ret$83);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_95 = typeToken(createKType(getKClass(GetApiUrlUseCase), arrayOf([]), false));
      var tmp$ret$84 = isInterface(tmp_95, TypeToken) ? tmp_95 : THROW_CCE();
      var tmp_96 = $this$$receiver.b56(tmp$ret$84, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_5 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_97 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$86 = isInterface(tmp_97, TypeToken) ? tmp_97 : THROW_CCE();
      var this_6 = new ImplWithScope(tmp$ret$86, scope_5);
      var creator_17 = DomainDiModuleJs$lambda$lambda_17;
      var tmp_98 = this_6.p55();
      var tmp_99 = this_6.o55();
      var tmp_100 = this_6.q55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_101 = typeToken(createKType(getKClass(GetApiUrlUseCaseDirect), arrayOf([]), false));
      var tmp$ret$88 = isInterface(tmp_101, TypeToken) ? tmp_101 : THROW_CCE();
      var tmp$ret$89 = new Singleton(tmp_98, tmp_99, tmp_100, tmp$ret$88, null, true, creator_17);
      tmp_96.p5a(tmp$ret$89);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_102 = typeToken(createKType(getKClass(ResumeOrStartXapiSessionUseCase), arrayOf([]), false));
      var tmp$ret$90 = isInterface(tmp_102, TypeToken) ? tmp_102 : THROW_CCE();
      var tmp_103 = $this$$receiver.b56(tmp$ret$90, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_6 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_104 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$92 = isInterface(tmp_104, TypeToken) ? tmp_104 : THROW_CCE();
      var this_7 = new ImplWithScope(tmp$ret$92, scope_6);
      var creator_18 = DomainDiModuleJs$lambda$lambda_18;
      var tmp_105 = this_7.p55();
      var tmp_106 = this_7.o55();
      var tmp_107 = this_7.q55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_108 = typeToken(createKType(getKClass(ResumeOrStartXapiSessionUseCaseJs), arrayOf([]), false));
      var tmp$ret$94 = isInterface(tmp_108, TypeToken) ? tmp_108 : THROW_CCE();
      var tmp$ret$95 = new Singleton(tmp_105, tmp_106, tmp_107, tmp$ret$94, null, true, creator_18);
      tmp_103.p5a(tmp$ret$95);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_109 = typeToken(createKType(getKClass(LaunchXapiUseCase), arrayOf([]), false));
      var tmp$ret$96 = isInterface(tmp_109, TypeToken) ? tmp_109 : THROW_CCE();
      var tmp_110 = $this$$receiver.b56(tmp$ret$96, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_7 = $endpointScope;
      // Inline function 'org.kodein.type.generic' call
      var tmp_111 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$98 = isInterface(tmp_111, TypeToken) ? tmp_111 : THROW_CCE();
      var this_8 = new ImplWithScope(tmp$ret$98, scope_7);
      var creator_19 = DomainDiModuleJs$lambda$lambda_19;
      var tmp_112 = this_8.o55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_113 = typeToken(createKType(getKClass(LaunchXapiUseCaseJs), arrayOf([]), false));
      var tmp$ret$100 = isInterface(tmp_113, TypeToken) ? tmp_113 : THROW_CCE();
      var tmp$ret$101 = new Provider(tmp_112, tmp$ret$100, creator_19);
      tmp_110.p5a(tmp$ret$101);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_114 = typeToken(createKType(getKClass(MoveContentEntriesUseCase), arrayOf([]), false));
      var tmp$ret$102 = isInterface(tmp_114, TypeToken) ? tmp_114 : THROW_CCE();
      var tmp_115 = $this$$receiver.b56(tmp$ret$102, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_8 = Companion_getInstance_17().vmj_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_116 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$104 = isInterface(tmp_116, TypeToken) ? tmp_116 : THROW_CCE();
      var this_9 = new ImplWithScope(tmp$ret$104, scope_8);
      var creator_20 = DomainDiModuleJs$lambda$lambda_20;
      var tmp_117 = this_9.o55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_118 = typeToken(createKType(getKClass(MoveContentEntriesUseCase), arrayOf([]), false));
      var tmp$ret$106 = isInterface(tmp_118, TypeToken) ? tmp_118 : THROW_CCE();
      var tmp$ret$107 = new Provider(tmp_117, tmp$ret$106, creator_20);
      tmp_115.p5a(tmp$ret$107);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_119 = typeToken(createKType(getKClass(DeleteContentEntryParentChildJoinUseCase), arrayOf([]), false));
      var tmp$ret$108 = isInterface(tmp_119, TypeToken) ? tmp_119 : THROW_CCE();
      var tmp_120 = $this$$receiver.b56(tmp$ret$108, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_9 = Companion_getInstance_17().vmj_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_121 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$110 = isInterface(tmp_121, TypeToken) ? tmp_121 : THROW_CCE();
      var this_10 = new ImplWithScope(tmp$ret$110, scope_9);
      var creator_21 = DomainDiModuleJs$lambda$lambda_21;
      var tmp_122 = this_10.o55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_123 = typeToken(createKType(getKClass(DeleteContentEntryParentChildJoinUseCase), arrayOf([]), false));
      var tmp$ret$112 = isInterface(tmp_123, TypeToken) ? tmp_123 : THROW_CCE();
      var tmp$ret$113 = new Provider(tmp_122, tmp$ret$112, creator_21);
      tmp_120.p5a(tmp$ret$113);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_124 = typeToken(createKType(getKClass(RestoreDeletedItemUseCase), arrayOf([]), false));
      var tmp$ret$114 = isInterface(tmp_124, TypeToken) ? tmp_124 : THROW_CCE();
      var tmp_125 = $this$$receiver.b56(tmp$ret$114, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_10 = Companion_getInstance_17().vmj_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_126 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$116 = isInterface(tmp_126, TypeToken) ? tmp_126 : THROW_CCE();
      var this_11 = new ImplWithScope(tmp$ret$116, scope_10);
      var creator_22 = DomainDiModuleJs$lambda$lambda_22;
      var tmp_127 = this_11.o55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_128 = typeToken(createKType(getKClass(RestoreDeletedItemUseCase), arrayOf([]), false));
      var tmp$ret$118 = isInterface(tmp_128, TypeToken) ? tmp_128 : THROW_CCE();
      var tmp$ret$119 = new Provider(tmp_127, tmp$ret$118, creator_22);
      tmp_125.p5a(tmp$ret$119);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_129 = typeToken(createKType(getKClass(DeletePermanentlyUseCase), arrayOf([]), false));
      var tmp$ret$120 = isInterface(tmp_129, TypeToken) ? tmp_129 : THROW_CCE();
      var tmp_130 = $this$$receiver.b56(tmp$ret$120, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_11 = Companion_getInstance_17().vmj_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_131 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$122 = isInterface(tmp_131, TypeToken) ? tmp_131 : THROW_CCE();
      var this_12 = new ImplWithScope(tmp$ret$122, scope_11);
      var creator_23 = DomainDiModuleJs$lambda$lambda_23;
      var tmp_132 = this_12.o55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_133 = typeToken(createKType(getKClass(DeletePermanentlyUseCase), arrayOf([]), false));
      var tmp$ret$124 = isInterface(tmp_133, TypeToken) ? tmp_133 : THROW_CCE();
      var tmp$ret$125 = new Provider(tmp_132, tmp$ret$124, creator_23);
      tmp_130.p5a(tmp$ret$125);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_134 = typeToken(createKType(getKClass(SetClipboardStringUseCase), arrayOf([]), false));
      var tmp$ret$126 = isInterface(tmp_134, TypeToken) ? tmp_134 : THROW_CCE();
      var tmp_135 = $this$$receiver.b56(tmp$ret$126, null, null);
      // Inline function 'org.kodein.di.singleton' call
      var creator_24 = DomainDiModuleJs$lambda$lambda_24;
      var tmp_136 = $this$$receiver.p55();
      var tmp_137 = $this$$receiver.o55();
      var tmp_138 = $this$$receiver.q55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_139 = typeToken(createKType(getKClass(SetClipboardStringUseCaseJs), arrayOf([]), false));
      var tmp$ret$128 = isInterface(tmp_139, TypeToken) ? tmp_139 : THROW_CCE();
      var tmp$ret$129 = new Singleton(tmp_136, tmp_137, tmp_138, tmp$ret$128, null, true, creator_24);
      tmp_135.p5a(tmp$ret$129);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_140 = typeToken(createKType(getKClass(SaveAndUploadLocalUrisUseCase), arrayOf([]), false));
      var tmp$ret$130 = isInterface(tmp_140, TypeToken) ? tmp_140 : THROW_CCE();
      var tmp_141 = $this$$receiver.b56(tmp$ret$130, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_12 = Companion_getInstance_17().vmj_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_142 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$132 = isInterface(tmp_142, TypeToken) ? tmp_142 : THROW_CCE();
      var this_13 = new ImplWithScope(tmp$ret$132, scope_12);
      var creator_25 = DomainDiModuleJs$lambda$lambda_25;
      var tmp_143 = this_13.p55();
      var tmp_144 = this_13.o55();
      var tmp_145 = this_13.q55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_146 = typeToken(createKType(getKClass(SaveAndUploadLocalUrisUseCase), arrayOf([]), false));
      var tmp$ret$134 = isInterface(tmp_146, TypeToken) ? tmp_146 : THROW_CCE();
      var tmp$ret$135 = new Singleton(tmp_143, tmp_144, tmp_145, tmp$ret$134, null, true, creator_25);
      tmp_141.p5a(tmp$ret$135);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_147 = typeToken(createKType(getKClass(OpenBlobUseCase), arrayOf([]), false));
      var tmp$ret$136 = isInterface(tmp_147, TypeToken) ? tmp_147 : THROW_CCE();
      var tmp_148 = $this$$receiver.b56(tmp$ret$136, null, null);
      // Inline function 'org.kodein.di.provider' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_13 = Companion_getInstance_17().vmj_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_149 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$138 = isInterface(tmp_149, TypeToken) ? tmp_149 : THROW_CCE();
      var this_14 = new ImplWithScope(tmp$ret$138, scope_13);
      var creator_26 = DomainDiModuleJs$lambda$lambda_26;
      var tmp_150 = this_14.o55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_151 = typeToken(createKType(getKClass(OpenBlobUseCaseJs), arrayOf([]), false));
      var tmp$ret$140 = isInterface(tmp_151, TypeToken) ? tmp_151 : THROW_CCE();
      var tmp$ret$141 = new Provider(tmp_150, tmp$ret$140, creator_26);
      tmp_148.p5a(tmp$ret$141);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_152 = typeToken(createKType(getKClass(OpenBlobUiUseCase), arrayOf([]), false));
      var tmp$ret$142 = isInterface(tmp_152, TypeToken) ? tmp_152 : THROW_CCE();
      var tmp_153 = $this$$receiver.b56(tmp$ret$142, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_14 = Companion_getInstance_17().vmj_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_154 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$144 = isInterface(tmp_154, TypeToken) ? tmp_154 : THROW_CCE();
      var this_15 = new ImplWithScope(tmp$ret$144, scope_14);
      var creator_27 = DomainDiModuleJs$lambda$lambda_27;
      var tmp_155 = this_15.p55();
      var tmp_156 = this_15.o55();
      var tmp_157 = this_15.q55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_158 = typeToken(createKType(getKClass(OpenBlobUiUseCase), arrayOf([]), false));
      var tmp$ret$146 = isInterface(tmp_158, TypeToken) ? tmp_158 : THROW_CCE();
      var tmp$ret$147 = new Singleton(tmp_155, tmp_156, tmp_157, tmp$ret$146, null, true, creator_27);
      tmp_153.p5a(tmp$ret$147);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_159 = typeToken(createKType(getKClass(CancelRemoteContentEntryImportUseCase), arrayOf([]), false));
      var tmp$ret$148 = isInterface(tmp_159, TypeToken) ? tmp_159 : THROW_CCE();
      var tmp_160 = $this$$receiver.b56(tmp$ret$148, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_15 = Companion_getInstance_17().vmj_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_161 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$150 = isInterface(tmp_161, TypeToken) ? tmp_161 : THROW_CCE();
      var this_16 = new ImplWithScope(tmp$ret$150, scope_15);
      var creator_28 = DomainDiModuleJs$lambda$lambda_28;
      var tmp_162 = this_16.p55();
      var tmp_163 = this_16.o55();
      var tmp_164 = this_16.q55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_165 = typeToken(createKType(getKClass(CancelRemoteContentEntryImportUseCase), arrayOf([]), false));
      var tmp$ret$152 = isInterface(tmp_165, TypeToken) ? tmp_165 : THROW_CCE();
      var tmp$ret$153 = new Singleton(tmp_162, tmp_163, tmp_164, tmp$ret$152, null, true, creator_28);
      tmp_160.p5a(tmp$ret$153);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_166 = typeToken(createKType(getKClass(DismissRemoteContentEntryImportErrorUseCase), arrayOf([]), false));
      var tmp$ret$154 = isInterface(tmp_166, TypeToken) ? tmp_166 : THROW_CCE();
      var tmp_167 = $this$$receiver.b56(tmp$ret$154, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_16 = Companion_getInstance_17().vmj_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_168 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$156 = isInterface(tmp_168, TypeToken) ? tmp_168 : THROW_CCE();
      var this_17 = new ImplWithScope(tmp$ret$156, scope_16);
      var creator_29 = DomainDiModuleJs$lambda$lambda_29;
      var tmp_169 = this_17.p55();
      var tmp_170 = this_17.o55();
      var tmp_171 = this_17.q55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_172 = typeToken(createKType(getKClass(DismissRemoteContentEntryImportErrorUseCase), arrayOf([]), false));
      var tmp$ret$158 = isInterface(tmp_172, TypeToken) ? tmp_172 : THROW_CCE();
      var tmp$ret$159 = new Singleton(tmp_169, tmp_170, tmp_171, tmp$ret$158, null, true, creator_29);
      tmp_167.p5a(tmp$ret$159);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_173 = typeToken(createKType(getKClass(XXStringHasher), arrayOf([]), false));
      var tmp$ret$160 = isInterface(tmp_173, TypeToken) ? tmp_173 : THROW_CCE();
      var tmp_174 = $this$$receiver.b56(tmp$ret$160, null, null);
      // Inline function 'org.kodein.di.singleton' call
      var creator_30 = DomainDiModuleJs$lambda$lambda_30;
      var tmp_175 = $this$$receiver.p55();
      var tmp_176 = $this$$receiver.o55();
      var tmp_177 = $this$$receiver.q55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_178 = typeToken(createKType(getKClass(XXStringHasherJs), arrayOf([]), false));
      var tmp$ret$162 = isInterface(tmp_178, TypeToken) ? tmp_178 : THROW_CCE();
      var tmp$ret$163 = new Singleton(tmp_175, tmp_176, tmp_177, tmp$ret$162, null, true, creator_30);
      tmp_174.p5a(tmp$ret$163);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_179 = typeToken(createKType(getKClass(XXHasher64Factory), arrayOf([]), false));
      var tmp$ret$164 = isInterface(tmp_179, TypeToken) ? tmp_179 : THROW_CCE();
      var tmp_180 = $this$$receiver.b56(tmp$ret$164, null, null);
      // Inline function 'org.kodein.di.singleton' call
      var creator_31 = DomainDiModuleJs$lambda$lambda_31;
      var tmp_181 = $this$$receiver.p55();
      var tmp_182 = $this$$receiver.o55();
      var tmp_183 = $this$$receiver.q55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_184 = typeToken(createKType(getKClass(XXHasher64FactoryJs), arrayOf([]), false));
      var tmp$ret$166 = isInterface(tmp_184, TypeToken) ? tmp_184 : THROW_CCE();
      var tmp$ret$167 = new Singleton(tmp_181, tmp_182, tmp_183, tmp$ret$166, null, true, creator_31);
      tmp_180.p5a(tmp$ret$167);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_185 = typeToken(createKType(getKClass(StoreActivitiesUseCase), arrayOf([]), false));
      var tmp$ret$168 = isInterface(tmp_185, TypeToken) ? tmp_185 : THROW_CCE();
      var tmp_186 = $this$$receiver.b56(tmp$ret$168, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_17 = Companion_getInstance_17().vmj_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_187 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$170 = isInterface(tmp_187, TypeToken) ? tmp_187 : THROW_CCE();
      var this_18 = new ImplWithScope(tmp$ret$170, scope_17);
      var creator_32 = DomainDiModuleJs$lambda$lambda_32;
      var tmp_188 = this_18.p55();
      var tmp_189 = this_18.o55();
      var tmp_190 = this_18.q55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_191 = typeToken(createKType(getKClass(StoreActivitiesUseCase), arrayOf([]), false));
      var tmp$ret$172 = isInterface(tmp_191, TypeToken) ? tmp_191 : THROW_CCE();
      var tmp$ret$173 = new Singleton(tmp_188, tmp_189, tmp_190, tmp$ret$172, null, true, creator_32);
      tmp_186.p5a(tmp$ret$173);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_192 = typeToken(createKType(getKClass(XapiStatementResource), arrayOf([]), false));
      var tmp$ret$174 = isInterface(tmp_192, TypeToken) ? tmp_192 : THROW_CCE();
      var tmp_193 = $this$$receiver.b56(tmp$ret$174, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_18 = Companion_getInstance_17().vmj_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_194 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$176 = isInterface(tmp_194, TypeToken) ? tmp_194 : THROW_CCE();
      var this_19 = new ImplWithScope(tmp$ret$176, scope_18);
      var creator_33 = DomainDiModuleJs$lambda$lambda_33;
      var tmp_195 = this_19.p55();
      var tmp_196 = this_19.o55();
      var tmp_197 = this_19.q55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_198 = typeToken(createKType(getKClass(XapiStatementResource), arrayOf([]), false));
      var tmp$ret$178 = isInterface(tmp_198, TypeToken) ? tmp_198 : THROW_CCE();
      var tmp$ret$179 = new Singleton(tmp_195, tmp_196, tmp_197, tmp$ret$178, null, true, creator_33);
      tmp_193.p5a(tmp$ret$179);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_199 = typeToken(createKType(getKClass(SaveStatementOnClearUseCase), arrayOf([]), false));
      var tmp$ret$180 = isInterface(tmp_199, TypeToken) ? tmp_199 : THROW_CCE();
      var tmp_200 = $this$$receiver.b56(tmp$ret$180, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_19 = Companion_getInstance_17().vmj_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_201 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$182 = isInterface(tmp_201, TypeToken) ? tmp_201 : THROW_CCE();
      var this_20 = new ImplWithScope(tmp$ret$182, scope_19);
      var creator_34 = DomainDiModuleJs$lambda$lambda_34;
      var tmp_202 = this_20.p55();
      var tmp_203 = this_20.o55();
      var tmp_204 = this_20.q55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_205 = typeToken(createKType(getKClass(SaveStatementOnClearUseCaseJs), arrayOf([]), false));
      var tmp$ret$184 = isInterface(tmp_205, TypeToken) ? tmp_205 : THROW_CCE();
      var tmp$ret$185 = new Singleton(tmp_202, tmp_203, tmp_204, tmp$ret$184, null, true, creator_34);
      tmp_200.p5a(tmp$ret$185);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_206 = typeToken(createKType(getKClass(SaveStatementOnUnloadUseCase), arrayOf([]), false));
      var tmp$ret$186 = isInterface(tmp_206, TypeToken) ? tmp_206 : THROW_CCE();
      var tmp_207 = $this$$receiver.b56(tmp$ret$186, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_20 = Companion_getInstance_17().vmj_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_208 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$188 = isInterface(tmp_208, TypeToken) ? tmp_208 : THROW_CCE();
      var this_21 = new ImplWithScope(tmp$ret$188, scope_20);
      var creator_35 = DomainDiModuleJs$lambda$lambda_35;
      var tmp_209 = this_21.p55();
      var tmp_210 = this_21.o55();
      var tmp_211 = this_21.q55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_212 = typeToken(createKType(getKClass(SaveStatementOnUnloadUseCaseJs), arrayOf([]), false));
      var tmp$ret$190 = isInterface(tmp_212, TypeToken) ? tmp_212 : THROW_CCE();
      var tmp$ret$191 = new Singleton(tmp_209, tmp_210, tmp_211, tmp$ret$190, null, true, creator_35);
      tmp_207.p5a(tmp$ret$191);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_213 = typeToken(createKType(getKClass(NonInteractiveContentXapiStatementRecorderFactory), arrayOf([]), false));
      var tmp$ret$192 = isInterface(tmp_213, TypeToken) ? tmp_213 : THROW_CCE();
      var tmp_214 = $this$$receiver.b56(tmp$ret$192, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_21 = Companion_getInstance_17().vmj_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_215 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$194 = isInterface(tmp_215, TypeToken) ? tmp_215 : THROW_CCE();
      var this_22 = new ImplWithScope(tmp$ret$194, scope_21);
      var creator_36 = DomainDiModuleJs$lambda$lambda_36;
      var tmp_216 = this_22.p55();
      var tmp_217 = this_22.o55();
      var tmp_218 = this_22.q55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_219 = typeToken(createKType(getKClass(NonInteractiveContentXapiStatementRecorderFactory), arrayOf([]), false));
      var tmp$ret$196 = isInterface(tmp_219, TypeToken) ? tmp_219 : THROW_CCE();
      var tmp$ret$197 = new Singleton(tmp_216, tmp_217, tmp_218, tmp$ret$196, null, true, creator_36);
      tmp_214.p5a(tmp$ret$197);
      // Inline function 'org.kodein.di.bind' call
      // Inline function 'org.kodein.type.generic' call
      var tmp_220 = typeToken(createKType(getKClass(GetSubtitleTrackFromUriUseCase), arrayOf([]), false));
      var tmp$ret$198 = isInterface(tmp_220, TypeToken) ? tmp_220 : THROW_CCE();
      var tmp_221 = $this$$receiver.b56(tmp$ret$198, null, null);
      // Inline function 'org.kodein.di.singleton' call
      // Inline function 'org.kodein.di.scoped' call
      var scope_22 = Companion_getInstance_17().vmj_1;
      // Inline function 'org.kodein.type.generic' call
      var tmp_222 = typeToken(createKType(getKClass(Endpoint), arrayOf([]), false));
      var tmp$ret$200 = isInterface(tmp_222, TypeToken) ? tmp_222 : THROW_CCE();
      var this_23 = new ImplWithScope(tmp$ret$200, scope_22);
      var creator_37 = DomainDiModuleJs$lambda$lambda_37;
      var tmp_223 = this_23.p55();
      var tmp_224 = this_23.o55();
      var tmp_225 = this_23.q55();
      // Inline function 'org.kodein.type.generic' call
      var tmp_226 = typeToken(createKType(getKClass(GetSubtitleTrackFromUriUseCaseJs), arrayOf([]), false));
      var tmp$ret$202 = isInterface(tmp_226, TypeToken) ? tmp_226 : THROW_CCE();
      var tmp$ret$203 = new Singleton(tmp_223, tmp_224, tmp_225, tmp$ret$202, null, true, creator_37);
      tmp_221.p5a(tmp$ret$203);
      return Unit_instance;
    };
  }
  function StringProviderJs(locale, jsStringProvider) {
    this.qyx_1 = locale;
    this.ryx_1 = jsStringProvider;
  }
  protoOf(StringProviderJs).hon = function (stringResource) {
    return stringResource.bl2(this.ryx_1, this.qyx_1);
  };
  protoOf(StringProviderJs).syx = function (stringResource, args) {
    return stringResource.cl2(this.ryx_1, this.qyx_1, args.slice());
  };
  function isRemote(_this__u8e3s4, $completion) {
    // Inline function 'kotlin.text.lowercase' call
    // Inline function 'kotlin.js.asDynamic' call
    var prefix = substringBefore_0(toString(_this__u8e3s4.d72_1), '//').toLowerCase();
    return startsWith(prefix, 'http:') ? true : startsWith(prefix, 'https:');
  }
  function setStateKey(_this__u8e3s4, $this, key, value) {
    var tmp0_safe_receiver = _this__u8e3s4.state;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.js.unsafeCast' call
      // Inline function 'kotlin.js.asDynamic' call
      tmp = tmp0_safe_receiver;
    }
    var tmp1_elvis_lhs = tmp;
    var newState = tmp1_elvis_lhs == null ? json([]) : tmp1_elvis_lhs;
    newState[key] = value;
    _this__u8e3s4.replaceState(newState, '');
  }
  function Companion_181() {
    this.tyx_1 = '_handleId';
  }
  var Companion_instance_229;
  function Companion_getInstance_198() {
    return Companion_instance_229;
  }
  function SavedStateHandle2(history, searchParams) {
    this.uyx_1 = history;
    this.vyx_1 = searchParams;
    var storedHandleId = this.ba('_handleId');
    if (storedHandleId == null) {
      this.wyx_1 = Default_getInstance_0().fg().toString();
      setStateKey(this.uyx_1, this, '_handleId', this.wyx_1);
    } else {
      this.wyx_1 = storedHandleId;
    }
  }
  protoOf(SavedStateHandle2).rox = function (key, value) {
    var tmp0_safe_receiver = this.uyx_1.state;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.js.asDynamic' call
      tmp = tmp0_safe_receiver;
    }
    var tmp1_safe_receiver = tmp;
    if ((tmp1_safe_receiver == null ? null : tmp1_safe_receiver._handleId) != this.wyx_1) {
      throw IllegalStateException_init_$Create$('SavedState cannot save values after the user has changed page');
    }
    if (!(value == null)) {
      setStateKey(this.uyx_1, this, key, value);
    }
  };
  protoOf(SavedStateHandle2).ba = function (key) {
    var tmp0_safe_receiver = this.uyx_1.state;
    var tmp;
    if (tmp0_safe_receiver == null) {
      tmp = null;
    } else {
      // Inline function 'kotlin.js.unsafeCast' call
      // Inline function 'kotlin.js.asDynamic' call
      tmp = tmp0_safe_receiver;
    }
    var tmp1_safe_receiver = tmp;
    var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : tmp1_safe_receiver[key];
    var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : toString(tmp2_safe_receiver);
    return tmp3_elvis_lhs == null ? this.vyx_1.get(key) : tmp3_elvis_lhs;
  };
  function ClazzLogCreatorManagerJs() {
  }
  protoOf(ClazzLogCreatorManagerJs).joq = function (clazzUid, endpointUrl, fromTime, toTime) {
  };
  function UrlKmp(url) {
    return new UrlKmpJs(new URL(url));
  }
  function UrlKmpJs(url) {
    this.xyx_1 = url;
  }
  protoOf(UrlKmpJs).toString = function () {
    return toString(this.xyx_1);
  };
  protoOf(UrlKmpJs).ono = function (path) {
    return new UrlKmpJs(new URL(path, toString(this.xyx_1)));
  };
  function Companion_182() {
  }
  protoOf(Companion_182).por = function (text) {
    return encodeURIComponent(text);
  };
  protoOf(Companion_182).oor = function (text) {
    return decodeURIComponent(text);
  };
  var Companion_instance_230;
  function Companion_getInstance_199() {
    return Companion_instance_230;
  }
  function UstadAntilog(defaultTag) {
    defaultTag = defaultTag === VOID ? 'NoTag' : defaultTag;
    Antilog.call(this);
    this.yyx_1 = defaultTag;
  }
  protoOf(UstadAntilog).g5d = function (priority, tag) {
    var tmp;
    var tmp_0;
    if (tag === 'DoorLog') {
      tmp_0 = priority.equals(LogLevel_DEBUG_getInstance()) ? true : priority.equals(LogLevel_VERBOSE_getInstance());
    } else {
      tmp_0 = false;
    }
    if (tmp_0) {
      tmp = false;
    } else {
      tmp = true;
    }
    return tmp;
  };
  protoOf(UstadAntilog).i5d = function (priority, tag, throwable, message) {
    var logTag = tag == null ? this.yyx_1 : tag;
    var tmp;
    if (!(message == null)) {
      var tmp_0;
      if (!(throwable == null)) {
        tmp_0 = '' + message + '\n' + throwable.message;
      } else {
        tmp_0 = message;
      }
      tmp = tmp_0;
    } else {
      var tmp2_elvis_lhs = throwable == null ? null : throwable.message;
      var tmp_1;
      if (tmp2_elvis_lhs == null) {
        return Unit_instance;
      } else {
        tmp_1 = tmp2_elvis_lhs;
      }
      tmp = tmp_1;
    }
    var fullMessage = tmp;
    switch (priority.za_1) {
      case 0:
        console.log('VERBOSE ' + logTag + ' : ' + fullMessage);
        break;
      case 1:
        console.log('DEBUG ' + logTag + ' : ' + fullMessage);
        break;
      case 2:
        console.info('INFO ' + logTag + ' : ' + fullMessage);
        break;
      case 3:
        console.warn('WARNING ' + logTag + ' : ' + fullMessage);
        break;
      case 4:
        console.error('ERROR ' + logTag + ' : ' + fullMessage);
        break;
      case 5:
        console.error('ASSERT ' + logTag + ' : ' + fullMessage);
        break;
    }
  };
  function forEach(_this__u8e3s4, block) {
    var collection = _this__u8e3s4;
    var inductionVariable = 0;
    var last = _this__u8e3s4.length;
    if (inductionVariable < last)
      do {
        var i = inductionVariable;
        inductionVariable = inductionVariable + 1 | 0;
        block(collection[i]);
      }
       while (inductionVariable < last);
  }
  function bodyAsDecodedText(_this__u8e3s4, $completion) {
    return bodyAsText(_this__u8e3s4, VOID, $completion);
  }
  function rgbColorProperty(_this__u8e3s4) {
    // Inline function 'web.cssom.rgb' call
    // Inline function 'kotlin.js.unsafeCast' call
    // Inline function 'kotlin.js.asDynamic' call
    return 'rgb(' + (_this__u8e3s4 >> 24 & 255) + ' ' + (_this__u8e3s4 >> 16 & 255) + ' ' + (_this__u8e3s4 >> 8 & 255) + ')';
  }
  function asWindowTarget(_this__u8e3s4) {
    var tmp;
    switch (_this__u8e3s4.za_1) {
      case 0:
        // Inline function 'web.window.WindowTarget.Companion._blank' call

        0;
        tmp = '_blank';
        break;
      case 1:
        // Inline function 'web.window.WindowTarget.Companion._top' call

        0;
        tmp = '_top';
        break;
      case 2:
        // Inline function 'web.window.WindowTarget.Companion._self' call

        0;
        tmp = '_self';
        break;
      case 3:
        // Inline function 'web.window.WindowTarget.Companion._blank' call

        0;
        tmp = '_blank';
        break;
      default:
        noWhenBranchMatchedException();
        break;
    }
    return tmp;
  }
  function getOrPut(_this__u8e3s4, key, block) {
    var tmp0_elvis_lhs = _this__u8e3s4.getItem(key);
    var tmp;
    if (tmp0_elvis_lhs == null) {
      // Inline function 'kotlin.also' call
      var this_0 = block();
      // Inline function 'kotlin.contracts.contract' call
      // Inline function 'com.ustadmobile.core.util.ext.getOrPut.<anonymous>' call
      _this__u8e3s4.setItem(key, this_0);
      tmp = this_0;
    } else {
      tmp = tmp0_elvis_lhs;
    }
    return tmp;
  }
  function htmlToPlainText(_this__u8e3s4) {
    var element = document.createElement('div');
    element.innerHTML = replace(replace(replace(_this__u8e3s4, '<br/>', ' '), '<br>', ' '), '<\/p><p>', ' ');
    return element.innerText;
  }
  function JsHeaderStringValuesAdapter(headers) {
    this.zyx_1 = headers;
  }
  protoOf(JsHeaderStringValuesAdapter).a2n = function (key) {
    var tmp0_safe_receiver = this.zyx_1.get(key);
    var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : split(tmp0_safe_receiver, [',']);
    return tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs;
  };
  protoOf(JsHeaderStringValuesAdapter).b2n = function () {
    return toSet_0(this.zyx_1.keys());
  };
  function asIStringValues_0(_this__u8e3s4) {
    return new JsHeaderStringValuesAdapter(_this__u8e3s4);
  }
  function randomUuidAsString() {
    var tmp;
    // Inline function 'com.ustadmobile.core.wrappers.window.isSecureContext' call
    // Inline function 'kotlin.js.asDynamic' call
    var tmp_0 = window.isSecureContext;
    if ((!(tmp_0 == null) ? typeof tmp_0 === 'boolean' : false) ? tmp_0 : THROW_CCE()) {
      tmp = crypto.randomUUID();
    } else {
      tmp = v4();
    }
    return tmp;
  }
  //region block: post-declaration
  protoOf(AuthManager).p56 = get_diContext;
  protoOf(AuthManager).q56 = get_diTrigger;
  protoOf($serializer).y4f = typeParametersSerializers;
  protoOf($serializer_0).y4f = typeParametersSerializers;
  protoOf($serializer_1).y4f = typeParametersSerializers;
  protoOf($serializer_2).y4f = typeParametersSerializers;
  protoOf($serializer_3).y4f = typeParametersSerializers;
  protoOf($serializer_4).y4f = typeParametersSerializers;
  protoOf($serializer_5).y4f = typeParametersSerializers;
  protoOf($serializer_6).y4f = typeParametersSerializers;
  protoOf($serializer_7).y4f = typeParametersSerializers;
  protoOf($serializer_8).y4f = typeParametersSerializers;
  protoOf($serializer_9).y4f = typeParametersSerializers;
  protoOf($serializer_10).y4f = typeParametersSerializers;
  protoOf($serializer_11).y4f = typeParametersSerializers;
  protoOf($serializer_12).y4f = typeParametersSerializers;
  protoOf($serializer_13).y4f = typeParametersSerializers;
  protoOf($serializer_14).y4f = typeParametersSerializers;
  protoOf($serializer_15).y4f = typeParametersSerializers;
  protoOf($serializer_16).y4f = typeParametersSerializers;
  protoOf($serializer_17).y4f = typeParametersSerializers;
  protoOf($serializer_18).y4f = typeParametersSerializers;
  protoOf($serializer_19).y4f = typeParametersSerializers;
  protoOf($serializer_20).y4f = typeParametersSerializers;
  protoOf($serializer_21).y4f = typeParametersSerializers;
  protoOf($serializer_22).y4f = typeParametersSerializers;
  protoOf($serializer_23).y4f = typeParametersSerializers;
  protoOf($serializer_24).y4f = typeParametersSerializers;
  protoOf($serializer_25).y4f = typeParametersSerializers;
  protoOf($serializer_26).y4f = typeParametersSerializers;
  protoOf($serializer_27).y4f = typeParametersSerializers;
  protoOf($serializer_28).y4f = typeParametersSerializers;
  protoOf($serializer_29).y4f = typeParametersSerializers;
  protoOf($serializer_30).y4f = typeParametersSerializers;
  protoOf($serializer_31).y4f = typeParametersSerializers;
  protoOf($serializer_32).y4f = typeParametersSerializers;
  protoOf($serializer_33).y4f = typeParametersSerializers;
  protoOf($serializer_34).y4f = typeParametersSerializers;
  protoOf($serializer_35).y4f = typeParametersSerializers;
  protoOf($serializer_36).y4f = typeParametersSerializers;
  protoOf($serializer_37).y4f = typeParametersSerializers;
  protoOf($serializer_38).y4f = typeParametersSerializers;
  protoOf($serializer_39).y4f = typeParametersSerializers;
  protoOf($serializer_40).y4f = typeParametersSerializers;
  protoOf($serializer_41).y4f = typeParametersSerializers;
  protoOf($serializer_42).y4f = typeParametersSerializers;
  protoOf($serializer_43).y4f = typeParametersSerializers;
  protoOf($serializer_44).y4f = typeParametersSerializers;
  protoOf($serializer_45).y4f = typeParametersSerializers;
  protoOf($serializer_46).y4f = typeParametersSerializers;
  protoOf($serializer_47).y4f = typeParametersSerializers;
  protoOf($serializer_48).y4f = typeParametersSerializers;
  protoOf($serializer_49).y4f = typeParametersSerializers;
  protoOf($serializer_50).y4f = typeParametersSerializers;
  protoOf($serializer_51).y4f = typeParametersSerializers;
  protoOf(CommandFlowUstadNavController).sns = navigate$default;
  protoOf(UstadViewModel).p56 = get_diContext;
  protoOf(UstadViewModel).q56 = get_diTrigger;
  protoOf($serializer_52).y4f = typeParametersSerializers;
  protoOf($serializer_53).y4f = typeParametersSerializers;
  protoOf($serializer_54).y4f = typeParametersSerializers;
  protoOf($serializer_55).y4f = typeParametersSerializers;
  protoOf($serializer_56).y4f = typeParametersSerializers;
  protoOf($serializer_57).y4f = typeParametersSerializers;
  protoOf(SaveLocalUrisAsBlobUseCaseJs).ane = invoke$default;
  protoOf(CompressImageUseCaseJs).mng = invoke$default_2;
  protoOf(GetSubtitleTrackFromUriUseCaseJs).znp = invoke$default_3;
  protoOf(SetLanguageUseCaseJs).wnz = invoke$default_4;
  protoOf(ChunkedUploadClientLocalUriUseCaseJs).uo4 = invoke$default_5;
  //endregion
  //region block: init
  Companion_instance_47 = new Companion();
  Companion_instance_49 = new Companion_1();
  Companion_instance_50 = new Companion_2();
  Companion_instance_52 = new Companion_4();
  Companion_instance_53 = new Companion_5();
  Companion_instance_54 = new Companion_6();
  BodySerializer_instance = new BodySerializer();
  Companion_instance_55 = new Companion_7();
  Companion_instance_56 = new Companion_8();
  Companion_instance_57 = new Companion_9();
  Companion_instance_59 = new Companion_11();
  Companion_instance_64 = new Companion_16();
  Companion_instance_65 = new Companion_17();
  Companion_instance_66 = new Companion_18();
  Companion_instance_67 = new Companion_19();
  Companion_instance_68 = new Companion_20();
  Companion_instance_69 = new Companion_21();
  Companion_instance_70 = new Companion_22();
  Companion_instance_72 = new Companion_24();
  Companion_instance_74 = new Companion_26();
  Companion_instance_79 = new Companion_31();
  Companion_instance_80 = new Companion_32();
  Companion_instance_81 = new Companion_33();
  Companion_instance_82 = new Companion_34();
  Companion_instance_83 = new Companion_35();
  Companion_instance_84 = new Companion_36();
  Companion_instance_86 = new Companion_38();
  Companion_instance_87 = new Companion_39();
  Companion_instance_88 = new Companion_40();
  Companion_instance_89 = new Companion_41();
  Companion_instance_90 = new Companion_42();
  Companion_instance_91 = new Companion_43();
  Companion_instance_92 = new Companion_44();
  Companion_instance_93 = new Companion_45();
  Companion_instance_94 = new Companion_46();
  HEADER_UPLOAD_UUID = 'upload-uuid';
  HEADER_IS_FINAL_CHUNK = 'upload-final-chunk';
  HEADER_UPLOAD_START_BYTE = 'upload-start-byte';
  DEFAULT_CHUNK_SIZE = 524288;
  Companion_instance_96 = new Companion_48();
  Companion_instance_99 = new Companion_51();
  Companion_instance_100 = new Companion_52();
  Companion_instance_102 = new Companion_54();
  XapiInteractionTypeSerializer_instance = new XapiInteractionTypeSerializer();
  XapiObjectTypeSerializer_instance = new XapiObjectTypeSerializer();
  Companion_instance_107 = new Companion_59();
  XAPI_RESULT_EXTENSION_PROGRESS = 'https://w3id.org/xapi/cmi5/result/extensions/progress';
  Companion_instance_110 = new Companion_62();
  Companion_instance_111 = new Companion_63();
  VERB_COMPLETED = 'http://adlnet.gov/expapi/verbs/completed';
  VERB_PROGRESSED = 'http://adlnet.gov/expapi/verbs/progressed';
  Companion_instance_117 = new Companion_69();
  Companion_instance_118 = new Companion_70();
  Companion_instance_120 = new Companion_72();
  DiTag_instance = new DiTag();
  MS_PER_HOUR = 3600000;
  MS_PER_MIN = 60000;
  Companion_instance_122 = new Companion_74();
  UNSET_DISTANT_FUTURE = new Long(-289930240, 1689);
  Companion_instance_123 = new Companion_75();
  Companion_instance_124 = new Companion_76();
  Companion_instance_125 = new Companion_77();
  Companion_instance_126 = new Companion_78();
  Companion_instance_127 = new Companion_79();
  Companion_instance_128 = new Companion_80();
  Companion_instance_129 = new Companion_81();
  Companion_instance_130 = new Companion_82();
  Companion_instance_131 = new Companion_83();
  Companion_instance_134 = new Companion_86();
  Companion_instance_135 = new Companion_87();
  Companion_instance_136 = new Companion_88();
  Companion_instance_137 = new Companion_89();
  Companion_instance_138 = new Companion_90();
  Companion_instance_139 = new Companion_91();
  Companion_instance_140 = new Companion_92();
  Companion_instance_142 = new Companion_94();
  Companion_instance_144 = new Companion_96();
  Companion_instance_145 = new Companion_97();
  Companion_instance_146 = new Companion_98();
  Companion_instance_147 = new Companion_99();
  Companion_instance_148 = new Companion_100();
  Companion_instance_150 = new Companion_102();
  Companion_instance_151 = new Companion_103();
  Companion_instance_152 = new Companion_104();
  Companion_instance_155 = new Companion_107();
  Companion_instance_156 = new Companion_108();
  Companion_instance_157 = new Companion_109();
  Companion_instance_158 = new Companion_110();
  Companion_instance_159 = new Companion_111();
  Companion_instance_160 = new Companion_112();
  Companion_instance_162 = new Companion_114();
  Companion_instance_163 = new Companion_115();
  Companion_instance_165 = new Companion_117();
  Companion_instance_166 = new Companion_118();
  Companion_instance_167 = new Companion_119();
  Companion_instance_168 = new Companion_120();
  Companion_instance_169 = new Companion_121();
  Companion_instance_170 = new Companion_122();
  Companion_instance_171 = new Companion_123();
  Companion_instance_172 = new Companion_124();
  Companion_instance_174 = new Companion_126();
  Companion_instance_175 = new Companion_127();
  Companion_instance_176 = new Companion_128();
  Companion_instance_177 = new Companion_129();
  Companion_instance_178 = new Companion_130();
  Companion_instance_181 = new Companion_133();
  Companion_instance_182 = new Companion_134();
  Companion_instance_186 = new Companion_138();
  Companion_instance_187 = new Companion_139();
  Companion_instance_188 = new Companion_140();
  Companion_instance_189 = new Companion_141();
  Companion_instance_191 = new Companion_143();
  Companion_instance_192 = new Companion_144();
  Companion_instance_193 = new Companion_145();
  Companion_instance_194 = new Companion_146();
  Companion_instance_195 = new Companion_147();
  Companion_instance_196 = new Companion_148();
  Companion_instance_197 = new Companion_149();
  Companion_instance_198 = new Companion_150();
  Companion_instance_199 = new Companion_151();
  Companion_instance_201 = new Companion_153();
  Companion_instance_202 = new Companion_154();
  Companion_instance_203 = new Companion_155();
  PersonViewModelConstants_instance = new PersonViewModelConstants();
  Companion_instance_204 = new Companion_156();
  Companion_instance_205 = new Companion_157();
  Companion_instance_206 = new Companion_158();
  Companion_instance_208 = new Companion_160();
  Companion_instance_209 = new Companion_161();
  Companion_instance_212 = new Companion_164();
  Companion_instance_213 = new Companion_165();
  Companion_instance_214 = new Companion_166();
  Companion_instance_215 = new Companion_167();
  Companion_instance_216 = new Companion_168();
  Companion_instance_217 = new Companion_169();
  Companion_instance_218 = new Companion_170();
  Companion_instance_219 = new Companion_171();
  Companion_instance_220 = new Companion_172();
  Companion_instance_222 = new Companion_174();
  Companion_instance_223 = new Companion_175();
  Companion_instance_224 = new Companion_176();
  Companion_instance_225 = new Companion_177();
  Companion_instance_226 = new Companion_178();
  NAVHOST_CLEARSTACK_VIEWNAME = 'ClearStack';
  Companion_instance_227 = new Companion_179();
  Companion_instance_228 = new Companion_180();
  Companion_instance_229 = new Companion_181();
  Companion_instance_230 = new Companion_182();
  //endregion
  //region block: exports
  _.$_$ = _.$_$ || {};
  _.$_$.a = AuthManager;
  _.$_$.b = Endpoint;
  _.$_$.c = Pbkdf2Params;
  _.$_$.d = UserSessionWithPersonAndEndpoint;
  _.$_$.e = UstadAccountManager;
  _.$_$.f = get_DIContext;
  _.$_$.g = get_DIModule;
  _.$_$.h = get_NAVHOST_CLEARSTACK_VIEWNAME;
  _.$_$.i = get_NavHost;
  _.$_$.j = get_NavHostClearStackPlaceholder;
  _.$_$.k = get_entries;
  _.$_$.l = ContentEntryGetMetadataStatus;
  _.$_$.m = VersionInfo;
  _.$_$.n = GetVersionUseCase;
  _.$_$.o = OnClickLinkUseCase;
  _.$_$.p = OpenExternalLinkUseCase;
  _.$_$.q = BulkAddPersonsFromLocalUriUseCaseJs;
  _.$_$.r = BulkAddPersonsFromLocalUriUseCase;
  _.$_$.s = GetShowPoweredByUseCase;
  _.$_$.t = collectAsState;
  _.$_$.u = useCoroutineScope;
  _.$_$.v = useLaunchedEffect;
  _.$_$.w = useNavControllerEffect;
  _.$_$.x = useOnUnloadEffect;
  _.$_$.y = useStringProvider;
  _.$_$.z = useViewModel;
  _.$_$.a1 = get_ustadViewName;
  _.$_$.b1 = AppUiState;
  _.$_$.c1 = SnackBarDispatcher;
  _.$_$.d1 = TabItem;
  _.$_$.e1 = ApiUrlConfig;
  _.$_$.f1 = AppConfigMap;
  _.$_$.g1 = AppConfig;
  _.$_$.h1 = GenderConfig;
  _.$_$.i1 = SupportedLanguagesConfig;
  _.$_$.j1 = DomainDiModuleJs;
  _.$_$.k1 = commonDomainDiModule;
  _.$_$.l1 = StringProviderJs;
  _.$_$.m1 = mapLookup;
  _.$_$.n1 = CommandFlowUstadNavController;
  _.$_$.o1 = NavResultReturnerImpl;
  _.$_$.p1 = NavResultReturner;
  _.$_$.q1 = UstadMobileSystemImpl;
  _.$_$.r1 = BitmaskFlag;
  _.$_$.s1 = ListPagingSource;
  _.$_$.t1 = RefreshCommand;
  _.$_$.u1 = ClazzLogCreatorManagerJs;
  _.$_$.v1 = ClazzLogCreatorManager;
  _.$_$.w1 = get_totalAttendeeStatusRecorded;
  _.$_$.x1 = capitalizeFirstLetter;
  _.$_$.y1 = chopOffSeconds_0;
  _.$_$.z1 = chopOffSeconds;
  _.$_$.a2 = filterByFlags;
  _.$_$.b2 = forEach;
  _.$_$.c2 = formattedString;
  _.$_$.d2 = getOrPut;
  _.$_$.e2 = hasFlag_0;
  _.$_$.f2 = htmlToPlainText;
  _.$_$.g2 = initial;
  _.$_$.h2 = maxScoreSummedIfModule;
  _.$_$.i2 = penaltyPercentage;
  _.$_$.j2 = personFullName;
  _.$_$.k2 = get_progressAsFloat;
  _.$_$.l2 = requirePostfix;
  _.$_$.m2 = rgbColorProperty;
  _.$_$.n2 = textLength;
  _.$_$.o2 = toDisplayString;
  _.$_$.p2 = toNullIfBlank;
  _.$_$.q2 = toTerminologyEntries;
  _.$_$.r2 = get_MS_PER_HOUR;
  _.$_$.s2 = get_MS_PER_MIN;
  _.$_$.t2 = MessageIdOption2;
  _.$_$.u2 = SortOrderOption;
  _.$_$.v2 = UstadAntilog;
  _.$_$.w2 = avatarColorForName;
  _.$_$.x2 = OpenLicensesViewModel;
  _.$_$.y2 = AccountListUiState;
  _.$_$.z2 = AccountListViewModel;
  _.$_$.a3 = ClazzDetailUiState;
  _.$_$.b3 = ClazzDetailViewModel;
  _.$_$.c3 = ClazzDetailOverviewUiState;
  _.$_$.d3 = ClazzDetailOverviewViewModel;
  _.$_$.e3 = ClazzEditUiState;
  _.$_$.f3 = ClazzEditViewModel;
  _.$_$.g3 = ClazzGradebookUiState;
  _.$_$.h3 = ClazzGradebookViewModel;
  _.$_$.i3 = aggregateIfModule;
  _.$_$.j3 = displayMarkFor;
  _.$_$.k3 = maxScoreForBlock;
  _.$_$.l3 = get_thumbnailUri;
  _.$_$.m3 = InviteViaLinkUiState;
  _.$_$.n3 = InviteViaLinkViewModel;
  _.$_$.o3 = JoinWithCodeUiState;
  _.$_$.p3 = JoinWithCodeViewModel;
  _.$_$.q3 = ClazzListUiState;
  _.$_$.r3 = ClazzListViewModel;
  _.$_$.s3 = CoursePermissionDetailUiState;
  _.$_$.t3 = CoursePermissionDetailViewModel;
  _.$_$.u3 = CoursePermissionEditUiState;
  _.$_$.v3 = CoursePermissionEditViewModel;
  _.$_$.w3 = CoursePermissionListUiState;
  _.$_$.x3 = CoursePermissionListViewModel;
  _.$_$.y3 = get_blockTypeStringResource;
  _.$_$.z3 = defaultCourseBannerImageIndex;
  _.$_$.a4 = AssignmentSubmitterSummaryUiState;
  _.$_$.b4 = ClazzAssignmentDetailSubmissionsTabUiState;
  _.$_$.c4 = ClazzAssignmentDetailSubmissionsTabViewModel;
  _.$_$.d4 = get_listItemUiState;
  _.$_$.e4 = ClazzAssignmentDetailUiState;
  _.$_$.f4 = ClazzAssignmentDetailViewModel;
  _.$_$.g4 = ClazzAssignmentDetailOverviewUiState;
  _.$_$.h4 = ClazzAssignmentDetailOverviewViewModel;
  _.$_$.i4 = ClazzAssignmentDetailoverviewSubmissionUiState;
  _.$_$.j4 = ClazzAssignmentEditUiState;
  _.$_$.k4 = ClazzAssignmentEditViewModel;
  _.$_$.l4 = PeerReviewerAllocationEditUIState;
  _.$_$.m4 = PeerReviewerAllocationEditViewModel;
  _.$_$.n4 = ClazzAssignmentSubmitterDetailUiState;
  _.$_$.o4 = ClazzAssignmentSubmitterDetailViewModel;
  _.$_$.p4 = get_entries_1;
  _.$_$.q4 = values_2;
  _.$_$.r4 = UstadCourseAssignmentMarkListItemUiState;
  _.$_$.s4 = avatarColorName;
  _.$_$.t4 = avatarName;
  _.$_$.u4 = get_isFromSubmitterGroup;
  _.$_$.v4 = ClazzMemberListUiState;
  _.$_$.w4 = ClazzMemberListViewModel;
  _.$_$.x4 = ClazzEnrolmentEditUiState;
  _.$_$.y4 = ClazzEnrolmentEditViewModel;
  _.$_$.z4 = ClazzEnrolmentListUiState;
  _.$_$.a5 = ClazzEnrolmentListViewModel;
  _.$_$.b5 = ClazzLogListAttendanceUiState;
  _.$_$.c5 = ClazzLogListAttendanceViewModel;
  _.$_$.d5 = ClazzLogEditUiState;
  _.$_$.e5 = ClazzLogEditViewModel;
  _.$_$.f5 = ClazzLogEditAttendanceUiState;
  _.$_$.g5 = ClazzLogEditAttendanceViewModel;
  _.$_$.h5 = ContentEntryDetailUiState;
  _.$_$.i5 = ContentEntryDetailViewModel;
  _.$_$.j5 = ContentEntryDetailOverviewUiState;
  _.$_$.k5 = ContentEntryDetailOverviewViewModel;
  _.$_$.l5 = get_progress;
  _.$_$.m5 = ContentEntryEditUiState;
  _.$_$.n5 = ContentEntryEditViewModel;
  _.$_$.o5 = ContentEntryGetMetadataUiState;
  _.$_$.p5 = ContentEntryGetMetadataViewModel;
  _.$_$.q5 = GetSubtitleUiState;
  _.$_$.r5 = GetSubtitleViewModel;
  _.$_$.s5 = ContentEntryImportLinkUiState;
  _.$_$.t5 = ContentEntryImportLinkViewModel;
  _.$_$.u5 = ContentEntryListItemUiState;
  _.$_$.v5 = ContentEntryListUiState;
  _.$_$.w5 = ContentEntryListViewModel;
  _.$_$.x5 = get_listItemUiState_0;
  _.$_$.y5 = SubtitleEditUiState;
  _.$_$.z5 = SubtitleEditViewModel;
  _.$_$.a6 = get_contentTypeStringResource;
  _.$_$.b6 = get_stringResource;
  _.$_$.c6 = CourseBlockEditUiState;
  _.$_$.d6 = CourseBlockEditViewModel;
  _.$_$.e6 = TextBlockDetailUiState;
  _.$_$.f6 = TextBlockDetailViewModel;
  _.$_$.g6 = CourseGroupSetDetailUiState;
  _.$_$.h6 = CourseGroupSetDetailViewModel;
  _.$_$.i6 = CourseGroupSetEditUiState;
  _.$_$.j6 = CourseGroupSetEditViewModel;
  _.$_$.k6 = appendGroupNumIfNotInList;
  _.$_$.l6 = CourseGroupSetListUiState;
  _.$_$.m6 = CourseGroupSetListViewModel;
  _.$_$.n6 = CourseTerminologyEditUiState;
  _.$_$.o6 = CourseTerminologyEditViewModel;
  _.$_$.p6 = CourseTerminologyListUiState;
  _.$_$.q6 = CourseTerminologyListViewModel;
  _.$_$.r6 = DeletedItemListUiState;
  _.$_$.s6 = DeletedItemListViewModel;
  _.$_$.t6 = get_delItemContentTypeStringResource;
  _.$_$.u6 = CourseDiscussionDetailUiState;
  _.$_$.v6 = CourseDiscussionDetailViewModel;
  _.$_$.w6 = DiscussionPostDetailUiState2;
  _.$_$.x6 = DiscussionPostDetailViewModel;
  _.$_$.y6 = DiscussionPostEditUiState;
  _.$_$.z6 = DiscussionPostEditViewModel;
  _.$_$.a7 = EpubContentUiState;
  _.$_$.b7 = EpubContentViewModel;
  _.$_$.c7 = EpubScrollCommand;
  _.$_$.d7 = LoginUiState;
  _.$_$.e7 = LoginViewModel;
  _.$_$.f7 = ConversationListUiState;
  _.$_$.g7 = ConversationListViewModel;
  _.$_$.h7 = MessageListUiState;
  _.$_$.i7 = MessageListViewModel;
  _.$_$.j7 = daysUntil_0;
  _.$_$.k7 = ParentalConsentManagementUiState;
  _.$_$.l7 = ParentalConsentManagementViewModel;
  _.$_$.m7 = PdfContentUiState;
  _.$_$.n7 = PdfContentViewModel;
  _.$_$.o7 = PersonAccountEditUiState;
  _.$_$.p7 = PersonAccountEditViewModel;
  _.$_$.q7 = PersonUsernameAndPasswordModel;
  _.$_$.r7 = BulkAddPersonRunImportUiState;
  _.$_$.s7 = BulkAddPersonRunImportViewModel;
  _.$_$.t7 = BulkAddPersonSelectFileUiState;
  _.$_$.u7 = BulkAddPersonSelectFileViewModel;
  _.$_$.v7 = PersonDetailUiState;
  _.$_$.w7 = PersonDetailViewModel;
  _.$_$.x7 = PersonEditUiState;
  _.$_$.y7 = PersonEditViewModel;
  _.$_$.z7 = PersonListUiState;
  _.$_$.a8 = PersonListViewModel;
  _.$_$.b8 = RegisterAgeRedirectUiState;
  _.$_$.c8 = RegisterAgeRedirectViewModel;
  _.$_$.d8 = RegisterMinorWaitForParentUiState;
  _.$_$.e8 = RegisterMinorWaitForParentViewModel;
  _.$_$.f8 = RedirectViewModel;
  _.$_$.g8 = ScheduleEditUiState;
  _.$_$.h8 = ScheduleEditViewModel;
  _.$_$.i8 = SettingsUiState;
  _.$_$.j8 = SettingsViewModel;
  _.$_$.k8 = SiteDetailUiState;
  _.$_$.l8 = SiteDetailViewModel;
  _.$_$.m8 = SiteEditUiState;
  _.$_$.n8 = SiteEditViewModel;
  _.$_$.o8 = SiteTermsDetailUiState;
  _.$_$.p8 = SiteTermsDetailViewModel;
  _.$_$.q8 = SiteEnterLinkUiState;
  _.$_$.r8 = SiteEnterLinkViewModel;
  _.$_$.s8 = SystemPermissionDetailUiState;
  _.$_$.t8 = SystemPermissionDetailViewModel;
  _.$_$.u8 = SystemPermissionEditUiState;
  _.$_$.v8 = SystemPermissionEditViewModel;
  _.$_$.w8 = TimeZoneListViewModel;
  _.$_$.x8 = TimezoneListUiState;
  _.$_$.y8 = VideoContentUiState;
  _.$_$.z8 = MediaPlayState;
  _.$_$.a9 = VideoContentViewModel;
  _.$_$.b9 = XapiContentUiState;
  _.$_$.c9 = XapiContentViewModel;
  _.$_$.d9 = ErrorReportUiState;
  _.$_$.e9 = HolidayCalendarDetailUIState;
  _.$_$.f9 = HolidayCalendarEditUiState;
  _.$_$.g9 = HolidayCalendarListUiState;
  _.$_$.h9 = LanguageDetailUiState;
  _.$_$.i9 = LanguageEditUiState;
  _.$_$.j9 = LanguageListUiState;
  _.$_$.k9 = LeavingReasonEditUiState;
  _.$_$.l9 = LeavingReasonEditViewModel;
  _.$_$.m9 = ReportFilterEditUiState;
  _.$_$.n9 = ScopedGrantDetailUiState;
  _.$_$.o9 = ScopedGrantEditUiState;
  _.$_$.p9 = CompressionLevel_MEDIUM_getInstance;
  _.$_$.q9 = LinkTarget_DEFAULT_getInstance;
  _.$_$.r9 = AppBarColors_SELECTION_MODE_getInstance;
  _.$_$.s9 = AppBarColors_STANDARD_getInstance;
  _.$_$.t9 = FabIcon_ADD_getInstance;
  _.$_$.u9 = FabIcon_EDIT_getInstance;
  _.$_$.v9 = State_INDETERMINATE_getInstance;
  _.$_$.w9 = MarkingType_PEERS_getInstance;
  _.$_$.x9 = TextLimitType_LIMIT_WORDS_getInstance;
  _.$_$.y9 = SupportedLanguagesConfig_init_$Create$;
  _.$_$.z9 = _AssignmentSubmitterSummaryUiState___get_fileSubmissionStatusIconVisible__impl__so25h0;
  _.$_$.aa = _AssignmentSubmitterSummaryUiState___get_latestPrivateCommentVisible__impl__bdq0p0;
  _.$_$.ba = _ContentEntryListItemUiState___get_contentEntry__impl__3g9nl2;
  _.$_$.ca = _ContentEntryListItemUiState___get_descriptionVisible__impl__xyu083;
  _.$_$.da = _ContentEntryListItemUiState___get_mimetypeVisible__impl__l8r8g7;
  _.$_$.ea = Companion_getInstance_17;
  _.$_$.fa = PersonConstants_getInstance;
  _.$_$.ga = SubmissionConstants_getInstance;
  _.$_$.ha = Companion_getInstance_54;
  _.$_$.ia = Companion_instance_90;
  _.$_$.ja = Companion_instance_117;
  _.$_$.ka = Companion_instance_118;
  _.$_$.la = ClazzEnrolmentListConstants_getInstance;
  _.$_$.ma = ConditionConstants_getInstance;
  _.$_$.na = ContentCompletionStatusConstants_getInstance;
  _.$_$.oa = EnrolmentPolicyConstants_getInstance;
  _.$_$.pa = FieldConstants_getInstance;
  _.$_$.qa = LicenceConstants_getInstance;
  _.$_$.ra = OutcomeConstants_getInstance;
  _.$_$.sa = PersonParentJoinConstants_getInstance;
  _.$_$.ta = RoleConstants_getInstance;
  _.$_$.ua = ScheduleConstants_getInstance;
  _.$_$.va = SubmissionPolicyConstants_getInstance;
  _.$_$.wa = UstadMobileConstants_getInstance;
  _.$_$.xa = Companion_getInstance_84;
  _.$_$.ya = DiTag_instance;
  _.$_$.za = Companion_getInstance_90;
  _.$_$.ab = UMFileUtil_getInstance;
  _.$_$.bb = Companion_instance_122;
  _.$_$.cb = Companion_instance_124;
  _.$_$.db = Companion_instance_125;
  _.$_$.eb = Companion_instance_126;
  _.$_$.fb = Companion_instance_128;
  _.$_$.gb = Companion_instance_129;
  _.$_$.hb = Companion_instance_130;
  _.$_$.ib = Companion_instance_131;
  _.$_$.jb = Companion_instance_144;
  _.$_$.kb = Companion_instance_145;
  _.$_$.lb = Companion_instance_146;
  _.$_$.mb = Companion_instance_147;
  _.$_$.nb = Companion_instance_148;
  _.$_$.ob = Companion_instance_150;
  _.$_$.pb = Companion_instance_151;
  _.$_$.qb = Companion_instance_152;
  _.$_$.rb = Companion_getInstance_123;
  _.$_$.sb = Companion_getInstance_122;
  _.$_$.tb = Companion_instance_155;
  _.$_$.ub = Companion_instance_156;
  _.$_$.vb = Companion_instance_157;
  _.$_$.wb = Companion_instance_160;
  _.$_$.xb = Companion_instance_159;
  _.$_$.yb = Companion_instance_162;
  _.$_$.zb = Companion_instance_163;
  _.$_$.ac = Companion_instance_165;
  _.$_$.bc = Companion_instance_166;
  _.$_$.cc = Companion_instance_158;
  _.$_$.dc = ClazzAssignmentViewModelConstants_getInstance;
  _.$_$.ec = Companion_instance_167;
  _.$_$.fc = Companion_instance_168;
  _.$_$.gc = Companion_instance_169;
  _.$_$.hc = Companion_instance_170;
  _.$_$.ic = Companion_instance_171;
  _.$_$.jc = Companion_instance_172;
  _.$_$.kc = Companion_getInstance_142;
  _.$_$.lc = Companion_instance_174;
  _.$_$.mc = Companion_instance_175;
  _.$_$.nc = Companion_instance_176;
  _.$_$.oc = Companion_instance_177;
  _.$_$.pc = Companion_instance_178;
  _.$_$.qc = Companion_getInstance_148;
  _.$_$.rc = Companion_instance_182;
  _.$_$.sc = Companion_getInstance_153;
  _.$_$.tc = Companion_instance_186;
  _.$_$.uc = Companion_getInstance_152;
  _.$_$.vc = Companion_instance_187;
  _.$_$.wc = Companion_instance_188;
  _.$_$.xc = Companion_instance_189;
  _.$_$.yc = Companion_instance_191;
  _.$_$.zc = Companion_instance_192;
  _.$_$.ad = Companion_instance_193;
  _.$_$.bd = Companion_instance_194;
  _.$_$.cd = Companion_instance_195;
  _.$_$.dd = Companion_instance_196;
  _.$_$.ed = Companion_instance_197;
  _.$_$.fd = Companion_instance_199;
  _.$_$.gd = Companion_getInstance_169;
  _.$_$.hd = Companion_instance_201;
  _.$_$.id = Companion_instance_202;
  _.$_$.jd = Companion_instance_203;
  _.$_$.kd = Companion_instance_204;
  _.$_$.ld = Companion_instance_206;
  _.$_$.md = Companion_instance_208;
  _.$_$.nd = Companion_instance_209;
  _.$_$.od = Companion_getInstance_179;
  _.$_$.pd = Companion_getInstance_180;
  _.$_$.qd = Companion_instance_212;
  _.$_$.rd = Companion_instance_213;
  _.$_$.sd = Companion_instance_215;
  _.$_$.td = Companion_instance_217;
  _.$_$.ud = Companion_instance_218;
  _.$_$.vd = Companion_instance_219;
  _.$_$.wd = Companion_instance_220;
  _.$_$.xd = Companion_getInstance_190;
  _.$_$.yd = Companion_instance_222;
  _.$_$.zd = Companion_instance_223;
  _.$_$.ae = Companion_instance_224;
  _.$_$.be = Companion_instance_225;
  _.$_$.ce = Companion_instance_226;
  _.$_$.de = Companion_instance_134;
  _.$_$.ee = Companion_instance_135;
  _.$_$.fe = Companion_instance_136;
  _.$_$.ge = Companion_instance_137;
  _.$_$.he = Companion_instance_138;
  _.$_$.ie = Companion_instance_139;
  _.$_$.je = Companion_instance_140;
  _.$_$.ke = Companion_getInstance_112;
  _.$_$.le = strings_getInstance;
  _.$_$.me = MR_getInstance;
  //endregion
  return _;
}(module.exports, require('react'), require('react-router'), require('compressorjs'), require('libphonenumber-js'), require('xxhashjs'), require('react-router-dom'), require('uuid'), require('./kotlin-kotlin-stdlib.js'), require('./moko-resources-resources.js'), require('./UstadMobile-lib-database.js'), require('./Kosi-Kodein-kodein-di.js'), require('./Kosi-Kaverit-kaverit.js'), require('./door-door-runtime.js'), require('./kotlinx-serialization-kotlinx-serialization-core.js'), require('./kotlinx-coroutines-core.js'), require('./ktor-ktor-client-core.js'), require('./kotlinx-serialization-kotlinx-serialization-json.js'), require('./ktor-ktor-http.js'), require('./kotlinx-atomicfu.js'), require('./xmlutil-serialization.js'), require('./xmlutil-core.js'), require('./Napier-napier-js-ir.js'), require('./uuid.js'), require('./UstadMobile-lib-util.js'), require('./Kotlin-DateTime-library-kotlinx-datetime-js-ir.js'), require('./urlencoder-urlencoder-lib.js'), require('./xmlpullparserkmp.js'), require('./ktor-ktor-utils.js'), require('./multiplatform-paging-root-paging-common.js'), require('./precompose-precompose-viewmodel.js'), require('./MultiplatformSettings-multiplatform-settings.js'), require('./kotlin-react-core.js'), require('./kotlin-react.js'), require('./kotlin-web.js'), require('./ktor-ktor-io.js'), require('./kotlin-js.js')));

//# sourceMappingURL=UstadMobile-core.js.map
